Codebase list argyll / d7f89e6
Imported Upstream version 1.5.1 Jörg Frings-Fürst 9 years ago
174 changed file(s) with 4 addition(s) and 88409 deletion(s). Raw diff Collapse all Expand all
+0
-1
.pc/.quilt_patches less more
0 debian/patches
+0
-1
.pc/.quilt_series less more
0 series
+0
-1
.pc/.version less more
0 2
+0
-0
.pc/01_autotools-support.diff/Makefile.am less more
(Empty file)
+0
-0
.pc/01_autotools-support.diff/Makefile.shared less more
(Empty file)
+0
-0
.pc/01_autotools-support.diff/aclocal.m4 less more
(Empty file)
+0
-0
.pc/01_autotools-support.diff/cgats/Makefile.am less more
(Empty file)
+0
-0
.pc/01_autotools-support.diff/config.guess less more
(Empty file)
+0
-0
.pc/01_autotools-support.diff/config.h.in less more
(Empty file)
+0
-0
.pc/01_autotools-support.diff/config.sub less more
(Empty file)
+0
-0
.pc/01_autotools-support.diff/configure less more
(Empty file)
+0
-0
.pc/01_autotools-support.diff/configure.ac less more
(Empty file)
+0
-0
.pc/01_autotools-support.diff/depcomp less more
(Empty file)
+0
-0
.pc/01_autotools-support.diff/doc/Makefile.am less more
(Empty file)
+0
-0
.pc/01_autotools-support.diff/gamut/Makefile.am less more
(Empty file)
+0
-0
.pc/01_autotools-support.diff/h/Makefile.am less more
(Empty file)
+0
-0
.pc/01_autotools-support.diff/icc/Makefile.am less more
(Empty file)
+0
-0
.pc/01_autotools-support.diff/imdi/Makefile.am less more
(Empty file)
+0
-0
.pc/01_autotools-support.diff/imdi/imdi_k.h less more
(Empty file)
+0
-0
.pc/01_autotools-support.diff/install-sh less more
(Empty file)
+0
-0
.pc/01_autotools-support.diff/jcnf/Makefile.am less more
(Empty file)
+0
-0
.pc/01_autotools-support.diff/jcnf/yajl/Makefile.am less more
(Empty file)
+0
-0
.pc/01_autotools-support.diff/link/Makefile.am less more
(Empty file)
+0
-0
.pc/01_autotools-support.diff/m4/libtool.m4 less more
(Empty file)
+0
-0
.pc/01_autotools-support.diff/m4/ltoptions.m4 less more
(Empty file)
+0
-0
.pc/01_autotools-support.diff/m4/ltsugar.m4 less more
(Empty file)
+0
-0
.pc/01_autotools-support.diff/m4/ltversion.m4 less more
(Empty file)
+0
-0
.pc/01_autotools-support.diff/m4/lt~obsolete.m4 less more
(Empty file)
+0
-0
.pc/01_autotools-support.diff/missing less more
(Empty file)
+0
-0
.pc/01_autotools-support.diff/numlib/Makefile.am less more
(Empty file)
+0
-0
.pc/01_autotools-support.diff/plot/Makefile.am less more
(Empty file)
+0
-0
.pc/01_autotools-support.diff/profile/Makefile.am less more
(Empty file)
+0
-0
.pc/01_autotools-support.diff/ref/Makefile.am less more
(Empty file)
+0
-0
.pc/01_autotools-support.diff/render/Makefile.am less more
(Empty file)
+0
-0
.pc/01_autotools-support.diff/rspl/Makefile.am less more
(Empty file)
+0
-0
.pc/01_autotools-support.diff/scanin/Makefile.am less more
(Empty file)
+0
-0
.pc/01_autotools-support.diff/spectro/Makefile.am less more
(Empty file)
+0
-0
.pc/01_autotools-support.diff/target/Makefile.am less more
(Empty file)
+0
-0
.pc/01_autotools-support.diff/tweak/Makefile.am less more
(Empty file)
+0
-0
.pc/01_autotools-support.diff/ucmm/Makefile.am less more
(Empty file)
+0
-0
.pc/01_autotools-support.diff/xicc/Makefile.am less more
(Empty file)
+0
-0
.pc/02_firmware-package-builder.diff/firmware-package-builder/argyll-firmware-spyder2/debian/changelog less more
(Empty file)
+0
-0
.pc/02_firmware-package-builder.diff/firmware-package-builder/argyll-firmware-spyder2/debian/compat less more
(Empty file)
+0
-0
.pc/02_firmware-package-builder.diff/firmware-package-builder/argyll-firmware-spyder2/debian/control less more
(Empty file)
+0
-0
.pc/02_firmware-package-builder.diff/firmware-package-builder/argyll-firmware-spyder2/debian/copyright less more
(Empty file)
+0
-0
.pc/02_firmware-package-builder.diff/firmware-package-builder/argyll-firmware-spyder2/debian/install less more
(Empty file)
+0
-0
.pc/02_firmware-package-builder.diff/firmware-package-builder/argyll-firmware-spyder2/debian/rules less more
(Empty file)
+0
-90
.pc/03_usb-db.diff/usb/55-Argyll.rules less more
0 # udev rule to recognize instruments and make them accessible to user applications.
1 # Copy this to /etc/udev/rules.d/55-Argyll.rules
2
3 # Skip all this to speed things up if it'a not a usb add.
4 ACTION!="add", GOTO="argyll_rules_end"
5 SUBSYSTEM!="usb", GOTO="argyll_rules_end"
6
7 # Recognize the color measurement devices
8
9 # Colorimtre HCFR
10 ATTRS{idVendor}=="04db", ATTRS{idProduct}=="005b", ENV{COLOR_MEASUREMENT_DEVICE}="1"
11
12
13 # MonacoOPTIX (Same as i1 Display 1)
14 ATTRS{idVendor}=="0670", ATTRS{idProduct}=="0001", ENV{COLOR_MEASUREMENT_DEVICE}="1"
15
16
17 # HueyL (not tested)
18 ATTRS{idVendor}=="0765", ATTRS{idProduct}=="5001", ENV{COLOR_MEASUREMENT_DEVICE}="1"
19
20 # HueyL (not tested)
21 ATTRS{idVendor}=="0765", ATTRS{idProduct}=="5010", ENV{COLOR_MEASUREMENT_DEVICE}="1"
22
23 # i1Display 3
24 ATTRS{idVendor}=="0765", ATTRS{idProduct}=="5020", ENV{COLOR_MEASUREMENT_DEVICE}="1"
25
26 # ColorMunki Smile
27 ATTRS{idVendor}=="0765", ATTRS{idProduct}=="6003", ENV{COLOR_MEASUREMENT_DEVICE}="1"
28
29 # DTP20
30 ATTRS{idVendor}=="0765", ATTRS{idProduct}=="d020", ENV{COLOR_MEASUREMENT_DEVICE}="1"
31
32 # DTP92Q (not tested)
33 ATTRS{idVendor}=="0765", ATTRS{idProduct}=="d092", ENV{COLOR_MEASUREMENT_DEVICE}="1"
34
35 # DTP94
36 ATTRS{idVendor}=="0765", ATTRS{idProduct}=="d094", ENV{COLOR_MEASUREMENT_DEVICE}="1"
37
38
39 # i1Pro
40 ATTRS{idVendor}=="0971", ATTRS{idProduct}=="2000", ENV{COLOR_MEASUREMENT_DEVICE}="1"
41
42 # i1Monitor
43 ATTRS{idVendor}=="0971", ATTRS{idProduct}=="2001", ENV{COLOR_MEASUREMENT_DEVICE}="1"
44
45 # i1Display
46 ATTRS{idVendor}=="0971", ATTRS{idProduct}=="2003", ENV{COLOR_MEASUREMENT_DEVICE}="1"
47
48 # i1 io table (not tested)
49 ATTRS{idVendor}=="0971", ATTRS{idProduct}=="2004", ENV{COLOR_MEASUREMENT_DEVICE}="1"
50
51 # Huey
52 ATTRS{idVendor}=="0971", ATTRS{idProduct}=="2005", ENV{COLOR_MEASUREMENT_DEVICE}="1"
53
54 # i1 iSis (not tested)
55 ATTRS{idVendor}=="0971", ATTRS{idProduct}=="2006", ENV{COLOR_MEASUREMENT_DEVICE}="1"
56
57 # ColorMunki
58 ATTRS{idVendor}=="0971", ATTRS{idProduct}=="2007", ENV{COLOR_MEASUREMENT_DEVICE}="1"
59
60
61 # Spyder 1
62 ATTRS{idVendor}=="085c", ATTRS{idProduct}=="0100", ENV{COLOR_MEASUREMENT_DEVICE}="1"
63
64 # Spyder 2
65 ATTRS{idVendor}=="085c", ATTRS{idProduct}=="0200", ENV{COLOR_MEASUREMENT_DEVICE}="1"
66
67 # Spyder 3
68 ATTRS{idVendor}=="085c", ATTRS{idProduct}=="0300", ENV{COLOR_MEASUREMENT_DEVICE}="1"
69
70 # Spyder 4
71 ATTRS{idVendor}=="085c", ATTRS{idProduct}=="0400", ENV{COLOR_MEASUREMENT_DEVICE}="1"
72
73
74 # ColorHug, old and new
75 ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="f8da", ENV{COLOR_MEASUREMENT_DEVICE}="1"
76 ATTRS{idVendor}=="273f", ATTRS{idProduct}=="1001", ENV{COLOR_MEASUREMENT_DEVICE}="1"
77
78
79 # Let udev-acl manage these devices, if it's available
80 TEST=="/var/run/ConsoleKit/database", ENV{COLOR_MEASUREMENT_DEVICE}=="*?", ENV{ACL_MANAGE}="1"
81
82 # Otherwise, restrict access to members of the plugdev group,
83 # which the user may have to add to the system.
84 ENV{COLOR_MEASUREMENT_DEVICE}=="*?", ENV{ACL_MANAGE}!="*?", MODE="660", GROUP="plugdev"
85
86 # Set ID_VENDOR and ID_MODEL acording to VID and PID
87 IMPORT{program}="usb-db %p"
88
89 LABEL="argyll_rules_end"
+0
-17833
.pc/04_CVE-2012-4405.diff/icc/icc.c less more
0
1 /*
2 * International Color Consortium Format Library (icclib)
3 * For ICC profile version 3.4
4 *
5 * Author: Graeme W. Gill
6 * Date: 2002/04/22
7 * Version: 2.15
8 *
9 * Copyright 1997 - 2012 Graeme W. Gill
10 *
11 * This material is licensed with an "MIT" free use license:-
12 * see the License.txt file in this directory for licensing details.
13 */
14
15 /*
16 * TTBD:
17 *
18 * Add a "warning mode" to file reading, in which file format
19 * errors are ignored where possible, rather than generating
20 * a fatal error (see ICM_STRICT #define).
21 *
22 * NameColor Dump doesn't handle device space correctly -
23 * should use appropriate interpretation in case device is Lab etc.
24 *
25 * Should recognise & honour unicode 0xFFFE endian marker.
26 * Should generate it on writing too ?
27 *
28 * Add support for copying tags from one icc to another.
29 *
30 * Should fix all write_number failure errors to indicate failed value.
31 * (Partially implemented - need to check all write_number functions)
32 *
33 * Make write fail error messages be specific on which element failed.
34 *
35 * Should add named color space lookup function support.
36 *
37 * Would be nice to add generic ability to add new tag type handling,
38 * so that the base library doesn't need to be modified (ie. VideoCardGamma) ?
39 *
40 * Need to add DeviceSettings and OutputResponse tags to bring up to
41 * ICC.1:1998-09 [started but not complete]
42 *
43 */
44
45 #undef ICM_STRICT /* Not fully implimented - switch off strict checking of file format */
46
47 /* Make the default grid points of the Lab clut be symetrical about */
48 /* a/b 0.0, and also make L = 100.0 fall on a grid point. */
49 #define SYMETRICAL_DEFAULT_LAB_RANGE
50
51 #define _ICC_C_ /* Turn on implimentation code */
52
53 #undef DEBUG_SETLUT /* Show each value being set in setting lut contents */
54 #undef DEBUG_SETLUT_CLIP /* Show clipped values when setting LUT */
55 #undef DEBUG_LULUT /* Show each value being looked up from lut contents */
56 #undef DEBUG_LLULUT /* Debug individual lookup steps (not fully implemented) */
57
58 #include <stdio.h>
59 #include <stdlib.h>
60 #include <stdarg.h>
61 #include <sys/types.h>
62 #include <sys/stat.h>
63 #include <fcntl.h>
64 #include <string.h>
65 #include <ctype.h>
66 #include <math.h>
67 #include <time.h>
68 #ifdef __sun
69 #include <unistd.h>
70 #endif
71 #if defined(__IBMC__) && defined(_M_IX86)
72 #include <float.h>
73 #endif
74 #include "icc.h"
75
76 #ifdef _MSC_VER
77 #define vsnprintf _vsnprintf
78 #define snprintf _snprintf
79 #endif
80
81 /* ========================================================== */
82 /* Default system interface object implementations */
83
84 #ifndef SEPARATE_STD
85 #define COMBINED_STD
86
87 #include "iccstd.c"
88
89 #undef COMBINED_STD
90 #endif /* SEPARATE_STD */
91
92 /* Forced byte alignment for tag table and tags */
93 #define ALIGN_SIZE 4
94
95 /* =========================================================== */
96
97 #ifdef DEBUG_SETLUT
98 #undef DBGSL
99 #define DBGSL(xxx) printf xxx ;
100 #else
101 #undef DBGSL
102 #define DBGSL(xxx)
103 #endif
104
105 #if defined(DEBUG_SETLUT) || defined(DEBUG_SETLUT_CLIP)
106 #undef DBGSLC
107 #define DBGSLC(xxx) printf xxx ;
108 #else
109 #undef DBGSLC
110 #define DBGSLC(xxx)
111 #endif
112
113 #ifdef DEBUG_LULUT
114 #undef DBGLL
115 #define DBGLL(xxx) printf xxx ;
116 #else
117 #undef DBGLL
118 #define DBGLL(xxx)
119 #endif
120
121 #ifdef DEBUG_LLULUT
122 #undef DBLLL
123 #define DBLLL(xxx) printf xxx ;
124 #else
125 #undef DBLLL
126 #define DBLLL(xxx)
127 #endif
128
129 /* =========================================================== */
130 /* Overflow protected unsigned int arithmatic functions. */
131 /* These functions saturate rather than wrapping around. */
132 /* (Divide doesn't need protection) */
133 /* They return UINT_MAX if there was an overflow */
134
135 /* a + b */
136 static unsigned int sat_add(unsigned int a, unsigned int b) {
137 if (b > (UINT_MAX - a))
138 return UINT_MAX;
139 return a + b;
140 }
141
142 /* a - b */
143 static unsigned int sat_sub(unsigned int a, unsigned int b) {
144 if (a < b)
145 return UINT_MAX;
146 return a - b;
147 }
148
149 /* a * b */
150 static unsigned int sat_mul(unsigned int a, unsigned int b) {
151 unsigned int c;
152
153 if (a == 0 || b == 0)
154 return 0;
155
156 if (a > (UINT_MAX/b))
157 return UINT_MAX;
158 else
159 return a * b;
160 }
161
162 /* A + B + C */
163 #define sat_addadd(A, B, C) sat_add(A, sat_add(B, C))
164
165 /* A + B * C */
166 #define sat_addmul(A, B, C) sat_add(A, sat_mul(B, C))
167
168 /* A + B + C * D */
169 #define sat_addaddmul(A, B, C, D) sat_add(A, sat_add(B, sat_mul(C, D)))
170
171 /* A * B * C */
172 #define sat_mul3(A, B, C) sat_mul(A, sat_mul(B, C))
173
174 /* a ^ b */
175 static unsigned int sat_pow(unsigned int a, unsigned int b) {
176 unsigned int c = 1;
177 for (; b > 0; b--) {
178 c = sat_mul(c, a);
179 if (c == UINT_MAX)
180 break;
181 }
182 return c;
183 }
184
185 /* Alignment */
186 static unsigned int sat_align(unsigned int align_size, unsigned int a) {
187 align_size--;
188
189 if (align_size > (UINT_MAX - a))
190 return UINT_MAX;
191
192 return (a + align_size) & ~align_size;
193 }
194
195 /* These test functions detect whether an overflow would occur */
196
197 /* Return nz if add would overflow */
198 static int ovr_add(unsigned int a, unsigned int b) {
199
200 if (b > (UINT_MAX - a))
201 return 1;
202 return 0;
203 }
204
205 /* Return nz if sub would overflow */
206 static int ovr_sub(unsigned int a, unsigned int b) {
207 if (a < b)
208 return 1;
209 return 0;
210 }
211
212 /* Return nz if mult would overflow */
213 static int ovr_mul(unsigned int a, unsigned int b) {
214 if (a > (UINT_MAX/b))
215 return 1;
216 return 0;
217 }
218
219
220 /* size_t versions of saturating arithmatic */
221
222 #ifndef SIZE_MAX
223 # define SIZE_MAX ((size_t)(-1))
224 #endif
225
226 /* a + b */
227 static size_t ssat_add(size_t a, size_t b) {
228 if (b > (SIZE_MAX - a))
229 return SIZE_MAX;
230 return a + b;
231 }
232
233 /* a - b */
234 static size_t ssat_sub(size_t a, size_t b) {
235 if (a < b)
236 return SIZE_MAX;
237 return a - b;
238 }
239
240 /* a * b */
241 static size_t ssat_mul(size_t a, size_t b) {
242 size_t c;
243
244 if (a == 0 || b == 0)
245 return 0;
246
247 if (a > (SIZE_MAX/b))
248 return SIZE_MAX;
249 else
250 return a * b;
251 }
252
253 /* ------------------------------------------------- */
254 /* Memory image icmFile compatible class */
255 /* Buffer is assumed to have been allocated by the given allocator, */
256 /* and will be expanded on write. */
257
258 /* Get the size of the file */
259 static size_t icmFileMem_get_size(icmFile *pp) {
260 icmFileMem *p = (icmFileMem *)pp;
261
262 return p->end - p->start;
263 }
264
265 /* Set current position to offset. Return 0 on success, nz on failure. */
266 static int icmFileMem_seek(
267 icmFile *pp,
268 unsigned int offset
269 ) {
270 icmFileMem *p = (icmFileMem *)pp;
271 unsigned char *np;
272
273 np = p->start + offset;
274 if (np < p->start || np >= p->end)
275 return 1;
276 p->cur = np;
277 return 0;
278 }
279
280 /* Read count items of size length. Return number of items successfully read. */
281 static size_t icmFileMem_read(
282 icmFile *pp,
283 void *buffer,
284 size_t size,
285 size_t count
286 ) {
287 icmFileMem *p = (icmFileMem *)pp;
288 size_t len;
289
290 len = ssat_mul(size, count);
291 if (len > (p->end - p->cur)) { /* Too much */
292 if (size > 0)
293 count = (p->end - p->cur)/size;
294 else
295 count = 0;
296 }
297 len = size * count;
298 if (len > 0)
299 memmove(buffer, p->cur, len);
300 p->cur += len;
301 return count;
302 }
303
304 /* Expand the memory buffer file to hold up to pointer ep */
305 /* Don't expand if realloc fails */
306 static void icmFileMem_filemem_resize(icmFileMem *p, unsigned char *ep) {
307 size_t na, co, ce;
308 unsigned char *nstart;
309
310 /* No need to realloc */
311 if (ep <= p->aend) {
312 return;
313 }
314
315 co = p->cur - p->start; /* Current offset */
316 ce = p->end - p->start; /* Current end */
317 na = ep - p->start; /* new allocated size */
318
319 /* Round new allocation up */
320 if (na <= 1024)
321 na += 1024;
322 else
323 na += 4096;
324
325 if ((nstart = p->al->realloc(p->al, p->start, na)) != NULL) {
326 p->start = nstart;
327 p->cur = nstart + co;
328 p->end = nstart + ce;
329 p->aend = nstart + na;
330 }
331 }
332
333 /* write count items of size length. Return number of items successfully written. */
334 static size_t icmFileMem_write(
335 icmFile *pp,
336 void *buffer,
337 size_t size,
338 size_t count
339 ) {
340 icmFileMem *p = (icmFileMem *)pp;
341 size_t len;
342
343 len = ssat_mul(size, count);
344 if (len > (size_t)(p->aend - p->cur)) /* Try and expand buffer */
345 icmFileMem_filemem_resize(p, p->start + len);
346
347 if (len > (size_t)(p->aend - p->cur)) {
348 if (size > 0)
349 count = (p->aend - p->cur)/size;
350 else
351 count = 0;
352 }
353 len = size * count;
354 if (len > 0)
355 memmove(p->cur, buffer, len);
356 p->cur += len;
357 if (p->end < p->cur)
358 p->end = p->cur;
359 return count;
360 }
361
362 /* do a printf */
363 static int icmFileMem_printf(
364 icmFile *pp,
365 const char *format,
366 ...
367 ) {
368 int rv;
369 va_list args;
370 icmFileMem *p = (icmFileMem *)pp;
371 int len;
372
373 va_start(args, format);
374
375 rv = 1;
376 len = 100; /* Initial allocation for printf */
377 icmFileMem_filemem_resize(p, p->cur + len);
378
379 /* We have to use the available printf functions to resize the buffer if needed. */
380 for (;rv != 0;) {
381 /* vsnprintf() either returns -1 if it doesn't fit, or */
382 /* returns the size-1 needed in order to fit. */
383 len = vsnprintf((char *)p->cur, (p->aend - p->cur), format, args);
384
385 if (len > -1 && ((p->cur + len +1) <= p->aend)) /* Fitted in current allocation */
386 break;
387
388 if (len > -1) /* vsnprintf returned needed size-1 */
389 len = len+2; /* (In case vsnprintf returned 1 less than it needs) */
390 else
391 len *= 2; /* We just have to guess */
392
393 /* Attempt to resize */
394 icmFileMem_filemem_resize(p, p->cur + len);
395
396 /* If resize failed */
397 if ((p->aend - p->cur) < len) {
398 rv = 0;
399 break;
400 }
401 }
402 if (rv != 0) {
403 /* Figure out where end of printf is */
404 len = strlen((char *)p->cur); /* Length excluding nul */
405 p->cur += len;
406 if (p->cur > p->end)
407 p->end = p->cur;
408 rv = len;
409 }
410 va_end(args);
411 return rv;
412 }
413
414 /* flush all write data out to secondary storage. Return nz on failure. */
415 static int icmFileMem_flush(
416 icmFile *pp
417 ) {
418 return 0;
419 }
420
421 /* Return the memory buffer. Error if not icmFileMem */
422 static int icmFileMem_get_buf(
423 icmFile *pp,
424 unsigned char **buf,
425 size_t *len
426 ) {
427 icmFileMem *p = (icmFileMem *)pp;
428 if (buf != NULL)
429 *buf = p->start;
430 if (len != NULL)
431 *len = p->end - p->start;
432 return 0;
433 }
434
435 /* we're done with the file object, return nz on failure */
436 static int icmFileMem_delete(
437 icmFile *pp
438 ) {
439 icmFileMem *p = (icmFileMem *)pp;
440 icmAlloc *al = p->al;
441 int del_al = p->del_al;
442
443 if (p->del_buf) /* Free the memory buffer */
444 al->free(al, p->start);
445 al->free(al, p); /* Free object */
446 if (del_al) /* We are responsible for deleting allocator */
447 al->del(al);
448 return 0;
449 }
450
451 /* Create a memory image file access class with allocator */
452 /* Buffer is used as is. */
453 icmFile *new_icmFileMem_a(
454 void *base, /* Pointer to base of memory buffer */
455 size_t length, /* Number of bytes in buffer */
456 icmAlloc *al /* heap allocator */
457 ) {
458 icmFileMem *p;
459
460 if ((p = (icmFileMem *) al->calloc(al, 1, sizeof(icmFileMem))) == NULL) {
461 return NULL;
462 }
463 p->al = al; /* Heap allocator */
464 p->get_size = icmFileMem_get_size;
465 p->seek = icmFileMem_seek;
466 p->read = icmFileMem_read;
467 p->write = icmFileMem_write;
468 p->gprintf = icmFileMem_printf;
469 p->flush = icmFileMem_flush;
470 p->get_buf = icmFileMem_get_buf;
471 p->del = icmFileMem_delete;
472
473 p->start = (unsigned char *)base;
474 p->cur = p->start;
475 p->aend = p->end = p->start + length;
476
477 return (icmFile *)p;
478 }
479
480 /* Create a memory image file access class with given allocator */
481 /* and delete base when icmFile is deleted. */
482 icmFile *new_icmFileMem_ad(void *base, size_t length, icmAlloc *al) {
483 icmFile *fp;
484
485 if ((fp = new_icmFileMem_a(base, length, al)) != NULL) {
486 ((icmFileMem *)fp)->del_buf = 1;
487 }
488
489 return fp;
490 }
491
492 /* ========================================================== */
493 /* Conversion support functions */
494 /* Convert between ICC storage types and native C types */
495 /* Write routine return non-zero if numbers can't be represented */
496
497 /* Unsigned */
498 static unsigned int read_UInt8Number(char *p) {
499 unsigned int rv;
500 rv = (unsigned int)((ORD8 *)p)[0];
501 return rv;
502 }
503
504 static int write_UInt8Number(unsigned int d, char *p) {
505 if (d > 255)
506 return 1;
507 ((ORD8 *)p)[0] = (ORD8)d;
508 return 0;
509 }
510
511 static unsigned int read_UInt16Number(char *p) {
512 unsigned int rv;
513 rv = 256 * (unsigned int)((ORD8 *)p)[0]
514 + (unsigned int)((ORD8 *)p)[1];
515 return rv;
516 }
517
518 static int write_UInt16Number(unsigned int d, char *p) {
519 if (d > 65535)
520 return 1;
521 ((ORD8 *)p)[0] = (ORD8)(d >> 8);
522 ((ORD8 *)p)[1] = (ORD8)(d);
523 return 0;
524 }
525
526 static unsigned int read_UInt32Number(char *p) {
527 unsigned int rv;
528 rv = 16777216 * (unsigned int)((ORD8 *)p)[0]
529 + 65536 * (unsigned int)((ORD8 *)p)[1]
530 + 256 * (unsigned int)((ORD8 *)p)[2]
531 + (unsigned int)((ORD8 *)p)[3];
532 return rv;
533 }
534
535 static int write_UInt32Number(unsigned int d, char *p) {
536 ((ORD8 *)p)[0] = (ORD8)(d >> 24);
537 ((ORD8 *)p)[1] = (ORD8)(d >> 16);
538 ((ORD8 *)p)[2] = (ORD8)(d >> 8);
539 ((ORD8 *)p)[3] = (ORD8)(d);
540 return 0;
541 }
542
543 static void read_UInt64Number(icmUint64 *d, char *p) {
544 d->h = 16777216 * (unsigned int)((ORD8 *)p)[0]
545 + 65536 * (unsigned int)((ORD8 *)p)[1]
546 + 256 * (unsigned int)((ORD8 *)p)[2]
547 + (unsigned int)((ORD8 *)p)[3];
548 d->l = 16777216 * (unsigned int)((ORD8 *)p)[4]
549 + 65536 * (unsigned int)((ORD8 *)p)[5]
550 + 256 * (unsigned int)((ORD8 *)p)[6]
551 + (unsigned int)((ORD8 *)p)[7];
552 }
553
554 static int write_UInt64Number(icmUint64 *d, char *p) {
555 ((ORD8 *)p)[0] = (ORD8)(d->h >> 24);
556 ((ORD8 *)p)[1] = (ORD8)(d->h >> 16);
557 ((ORD8 *)p)[2] = (ORD8)(d->h >> 8);
558 ((ORD8 *)p)[3] = (ORD8)(d->h);
559 ((ORD8 *)p)[4] = (ORD8)(d->l >> 24);
560 ((ORD8 *)p)[5] = (ORD8)(d->l >> 16);
561 ((ORD8 *)p)[6] = (ORD8)(d->l >> 8);
562 ((ORD8 *)p)[7] = (ORD8)(d->l);
563 return 0;
564 }
565
566 static double read_U8Fixed8Number(char *p) {
567 ORD32 o32;
568 o32 = 256 * (ORD32)((ORD8 *)p)[0] /* Read big endian 16 bit unsigned */
569 + (ORD32)((ORD8 *)p)[1];
570 return (double)o32/256.0;
571 }
572
573 static int write_U8Fixed8Number(double d, char *p) {
574 ORD32 o32;
575 d = d * 256.0 + 0.5;
576 if (d >= 65536.0)
577 return 1;
578 if (d < 0.0)
579 return 1;
580 o32 = (ORD32)d;
581 ((ORD8 *)p)[0] = (ORD8)((o32) >> 8);
582 ((ORD8 *)p)[1] = (ORD8)((o32));
583 return 0;
584 }
585
586 static double read_U16Fixed16Number(char *p) {
587 ORD32 o32;
588 o32 = 16777216 * (ORD32)((ORD8 *)p)[0] /* Read big endian 32 bit unsigned */
589 + 65536 * (ORD32)((ORD8 *)p)[1]
590 + 256 * (ORD32)((ORD8 *)p)[2]
591 + (ORD32)((ORD8 *)p)[3];
592 return (double)o32/65536.0;
593 }
594
595 static int write_U16Fixed16Number(double d, char *p) {
596 ORD32 o32;
597 d = d * 65536.0 + 0.5;
598 if (d >= 4294967296.0)
599 return 1;
600 if (d < 0.0)
601 return 1;
602 o32 = (ORD32)d;
603 ((ORD8 *)p)[0] = (ORD8)((o32) >> 24);
604 ((ORD8 *)p)[1] = (ORD8)((o32) >> 16);
605 ((ORD8 *)p)[2] = (ORD8)((o32) >> 8);
606 ((ORD8 *)p)[3] = (ORD8)((o32));
607 return 0;
608 }
609
610
611 /* Signed numbers */
612 static int read_SInt8Number(char *p) {
613 int rv;
614 rv = (int)((INR8 *)p)[0];
615 return rv;
616 }
617
618 static int write_SInt8Number(int d, char *p) {
619 if (d > 127)
620 return 1;
621 else if (d < -128)
622 return 1;
623 ((INR8 *)p)[0] = (INR8)d;
624 return 0;
625 }
626
627 static int read_SInt16Number(char *p) {
628 int rv;
629 rv = 256 * (int)((INR8 *)p)[0]
630 + (int)((ORD8 *)p)[1];
631 return rv;
632 }
633
634 static int write_SInt16Number(int d, char *p) {
635 if (d > 32767)
636 return 1;
637 else if (d < -32768)
638 return 1;
639 ((INR8 *)p)[0] = (INR8)(d >> 8);
640 ((ORD8 *)p)[1] = (ORD8)(d);
641 return 0;
642 }
643
644 static int read_SInt32Number(char *p) {
645 int rv;
646 rv = 16777216 * (int)((INR8 *)p)[0]
647 + 65536 * (int)((ORD8 *)p)[1]
648 + 256 * (int)((ORD8 *)p)[2]
649 + (int)((ORD8 *)p)[3];
650 return rv;
651 }
652
653 static int write_SInt32Number(int d, char *p) {
654 ((INR8 *)p)[0] = (INR8)(d >> 24);
655 ((ORD8 *)p)[1] = (ORD8)(d >> 16);
656 ((ORD8 *)p)[2] = (ORD8)(d >> 8);
657 ((ORD8 *)p)[3] = (ORD8)(d);
658 return 0;
659 }
660
661 static void read_SInt64Number(icmInt64 *d, char *p) {
662 d->h = 16777216 * (int)((INR8 *)p)[0]
663 + 65536 * (int)((ORD8 *)p)[1]
664 + 256 * (int)((ORD8 *)p)[2]
665 + (int)((ORD8 *)p)[3];
666 d->l = 16777216 * (unsigned int)((ORD8 *)p)[4]
667 + 65536 * (unsigned int)((ORD8 *)p)[5]
668 + 256 * (unsigned int)((ORD8 *)p)[6]
669 + (unsigned int)((ORD8 *)p)[7];
670 }
671
672 static int write_SInt64Number(icmInt64 *d, char *p) {
673 ((INR8 *)p)[0] = (INR8)(d->h >> 24);
674 ((ORD8 *)p)[1] = (ORD8)(d->h >> 16);
675 ((ORD8 *)p)[2] = (ORD8)(d->h >> 8);
676 ((ORD8 *)p)[3] = (ORD8)(d->h);
677 ((ORD8 *)p)[4] = (ORD8)(d->l >> 24);
678 ((ORD8 *)p)[5] = (ORD8)(d->l >> 16);
679 ((ORD8 *)p)[6] = (ORD8)(d->l >> 8);
680 ((ORD8 *)p)[7] = (ORD8)(d->l);
681 return 0;
682 }
683
684 static double read_S15Fixed16Number(char *p) {
685 INR32 i32;
686 i32 = 16777216 * (INR32)((INR8 *)p)[0] /* Read big endian 32 bit signed */
687 + 65536 * (INR32)((ORD8 *)p)[1]
688 + 256 * (INR32)((ORD8 *)p)[2]
689 + (INR32)((ORD8 *)p)[3];
690 return (double)i32/65536.0;
691 }
692
693 static int write_S15Fixed16Number(double d, char *p) {
694 INR32 i32;
695 d = floor(d * 65536.0 + 0.5); /* Beware! (int)(d + 0.5) doesn't work! */
696 if (d >= 2147483648.0)
697 return 1;
698 if (d < -2147483648.0)
699 return 1;
700 i32 = (INR32)d;
701 ((INR8 *)p)[0] = (INR8)((i32) >> 24); /* Write big endian 32 bit signed */
702 ((ORD8 *)p)[1] = (ORD8)((i32) >> 16);
703 ((ORD8 *)p)[2] = (ORD8)((i32) >> 8);
704 ((ORD8 *)p)[3] = (ORD8)((i32));
705 return 0;
706 }
707
708 /* Device coordinate as 8 bit value range 0.0 - 1.0 */
709 static double read_DCS8Number(char *p) {
710 unsigned int rv;
711 rv = (unsigned int)((ORD8 *)p)[0];
712 return (double)rv/255.0;
713 }
714
715 static int write_DCS8Number(double d, char *p) {
716 ORD32 o32;
717 d = d * 255.0 + 0.5;
718 if (d >= 256.0)
719 return 1;
720 if (d < 0.0)
721 return 1;
722 o32 = (ORD32)d;
723 ((ORD8 *)p)[0] = (ORD8)(o32);
724 return 0;
725 }
726
727 /* Device coordinate as 16 bit value range 0.0 - 1.0 */
728 static double read_DCS16Number(char *p) {
729 unsigned int rv;
730 rv = 256 * (unsigned int)((ORD8 *)p)[0]
731 + (unsigned int)((ORD8 *)p)[1];
732 return (double)rv/65535.0;
733 }
734
735 static int write_DCS16Number(double d, char *p) {
736 ORD32 o32;
737 d = d * 65535.0 + 0.5;
738 if (d >= 65536.0)
739 return 1;
740 if (d < 0.0)
741 return 1;
742 o32 = (ORD32)d;
743 ((ORD8 *)p)[0] = (ORD8)(o32 >> 8);
744 ((ORD8 *)p)[1] = (ORD8)(o32);
745 return 0;
746 }
747
748 static void Lut_Lut2XYZ(double *out, double *in);
749 static void Lut_XYZ2Lut(double *out, double *in);
750 static void Lut_Lut2Lab_8(double *out, double *in);
751 static void Lut_Lab2Lut_8(double *out, double *in);
752 static void Lut_Lut2LabV2_16(double *out, double *in);
753 static void Lut_Lab2LutV2_16(double *out, double *in);
754 static void Lut_Lut2LabV4_16(double *out, double *in);
755 static void Lut_Lab2LutV4_16(double *out, double *in);
756
757 static void Lut_Lut2Y(double *out, double *in);
758 static void Lut_Y2Lut(double *out, double *in);
759 static void Lut_Lut2L_8(double *out, double *in);
760 static void Lut_L2Lut_8(double *out, double *in);
761 static void Lut_Lut2LV2_16(double *out, double *in);
762 static void Lut_L2LutV2_16(double *out, double *in);
763 static void Lut_Lut2LV4_16(double *out, double *in);
764 static void Lut_L2LutV4_16(double *out, double *in);
765
766 //~~~~888888
767 /* read a PCS number. PCS can be profile PCS, profile version Lab, */
768 /* or a specific type of Lab, depending on the value of csig: */
769 /* icmSigPCSData, icSigXYZData, icmSigLab8Data, icSigLabData, */
770 /* icmSigLabV2Data or icmSigLabV4Data */
771 /* Do nothing if not one of the above. */
772 static void read_PCSNumber(icc *icp, icColorSpaceSignature csig, double pcs[3], char *p) {
773
774 if (csig == icmSigPCSData)
775 csig = icp->header->pcs;
776 if (csig == icSigLabData) {
777 if (icp->ver != 0)
778 csig = icmSigLabV4Data;
779 else
780 csig = icmSigLabV2Data;
781 }
782
783 if (csig == icmSigLab8Data) {
784 pcs[0] = read_DCS8Number(p);
785 pcs[1] = read_DCS8Number(p+1);
786 pcs[2] = read_DCS8Number(p+2);
787 } else {
788 pcs[0] = read_DCS16Number(p);
789 pcs[1] = read_DCS16Number(p+2);
790 pcs[2] = read_DCS16Number(p+4);
791 }
792 switch (csig) {
793 case icSigXYZData:
794 Lut_Lut2XYZ(pcs, pcs);
795 break;
796 case icmSigLab8Data:
797 Lut_Lut2Lab_8(pcs, pcs);
798 break;
799 case icmSigLabV2Data:
800 Lut_Lut2LabV2_16(pcs, pcs);
801 break;
802 case icmSigLabV4Data:
803 Lut_Lut2LabV4_16(pcs, pcs);
804 break;
805 default:
806 break;
807 }
808 }
809
810 /* write a PCS number. PCS can be profile PCS, profile version Lab, */
811 /* or a specific type of Lab, depending on the value of csig: */
812 /* icmSigPCSData, icSigXYZData, icmSigLab8Data, icSigLabData, */
813 /* icmSigLabV2Data or icmSigLabV4Data */
814 /* Return 1 if error */
815 static int write_PCSNumber(icc *icp, icColorSpaceSignature csig, double pcs[3], char *p) {
816 double v[3];
817 int j;
818
819 if (csig == icmSigPCSData)
820 csig = icp->header->pcs;
821 if (csig == icSigLabData) {
822 if (icp->ver != 0)
823 csig = icmSigLabV4Data;
824 else
825 csig = icmSigLabV2Data;
826 }
827
828 switch (csig) {
829 case icSigXYZData:
830 Lut_XYZ2Lut(v, pcs);
831 break;
832 case icmSigLab8Data:
833 Lut_Lab2Lut_8(v, pcs);
834 break;
835 case icmSigLabV2Data:
836 Lut_Lab2LutV2_16(v, pcs);
837 break;
838 case icmSigLabV4Data:
839 Lut_Lab2LutV4_16(v, pcs);
840 break;
841 default:
842 return 1;
843 }
844 if (csig == icmSigLab8Data) {
845 for (j = 0; j < 3; j++) {
846 if (write_DCS8Number(v[j], p+j))
847 return 1;
848 }
849 } else {
850 for (j = 0; j < 3; j++) {
851 if (write_DCS16Number(v[j], p+(2 * j)))
852 return 1;
853 }
854 }
855
856 return 0;
857 }
858
859 /* Read a given primitive type. Return non-zero on error */
860 /* (Not currently used internaly ?) */
861 /* Public: */
862 int read_Primitive(icc *icp, icmPrimType ptype, void *prim, char *p) {
863
864 switch(ptype) {
865 case icmUInt8Number:
866 *((unsigned int *)prim) = read_UInt8Number(p);
867 return 0;
868 case icmUInt16Number:
869 *((unsigned int *)prim) = read_UInt16Number(p);
870 return 0;
871 case icmUInt32Number:
872 *((unsigned int *)prim) = read_UInt32Number(p);
873 return 0;
874 case icmUInt64Number:
875 read_UInt64Number((icmUint64 *)prim, p);
876 return 0;
877 case icmU8Fixed8Number:
878 *((double *)prim) = read_U8Fixed8Number(p);
879 return 0;
880 case icmU16Fixed16Number:
881 *((double *)prim) = read_U16Fixed16Number(p);
882 return 0;
883 case icmSInt8Number:
884 *((int *)prim) = read_SInt8Number(p);
885 return 0;
886 case icmSInt16Number:
887 *((int *)prim) = read_SInt16Number(p);
888 return 0;
889 case icmSInt32Number:
890 *((int *)prim) = read_SInt32Number(p);
891 return 0;
892 case icmSInt64Number:
893 read_SInt64Number((icmInt64 *)prim, p);
894 return 0;
895 case icmS15Fixed16Number:
896 *((double *)prim) = read_S15Fixed16Number(p);
897 return 0;
898 case icmDCS8Number:
899 *((double *)prim) = read_DCS8Number(p);
900 return 0;
901 case icmDCS16Number:
902 *((double *)prim) = read_DCS16Number(p);
903 return 0;
904 case icmPCSNumber:
905 read_PCSNumber(icp, icmSigPCSData, ((double *)prim), p);
906 return 0;
907 case icmPCSXYZNumber:
908 read_PCSNumber(icp, icSigXYZData, ((double *)prim), p);
909 return 0;
910 case icmPCSLab8Number:
911 read_PCSNumber(icp, icmSigLab8Data, ((double *)prim), p);
912 return 0;
913 case icmPCSLabNumber:
914 read_PCSNumber(icp, icSigLabData, ((double *)prim), p);
915 return 0;
916 case icmPCSLabV2Number:
917 read_PCSNumber(icp, icmSigLabV2Data, ((double *)prim), p);
918 return 0;
919 case icmPCSLabV4Number:
920 read_PCSNumber(icp, icmSigLabV4Data, ((double *)prim), p);
921 return 0;
922 }
923
924 return 2;
925 }
926
927 /* Write a given primitive type. Return non-zero on error */
928 /* (Not currently used internaly ?) */
929 /* Public: */
930 int write_Primitive(icc *icp, icmPrimType ptype, char *p, void *prim) {
931
932 switch(ptype) {
933 case icmUInt8Number:
934 return write_UInt8Number(*((unsigned int *)prim), p);
935 case icmUInt16Number:
936 return write_UInt16Number(*((unsigned int *)prim), p);
937 case icmUInt32Number:
938 return write_UInt32Number(*((unsigned int *)prim), p);
939 case icmUInt64Number:
940 return write_UInt64Number((icmUint64 *)prim, p);
941 case icmU8Fixed8Number:
942 return write_U8Fixed8Number(*((double *)prim), p);
943 case icmU16Fixed16Number:
944 return write_U16Fixed16Number(*((double *)prim), p);
945 case icmSInt8Number:
946 return write_SInt8Number(*((int *)prim), p);
947 case icmSInt16Number:
948 return write_SInt16Number(*((int *)prim), p);
949 case icmSInt32Number:
950 return write_SInt32Number(*((int *)prim), p);
951 case icmSInt64Number:
952 return write_SInt64Number((icmInt64 *)prim, p);
953 case icmS15Fixed16Number:
954 return write_S15Fixed16Number(*((double *)prim), p);
955 case icmDCS8Number:
956 return write_DCS8Number(*((double *)prim), p);
957 case icmDCS16Number:
958 return write_DCS16Number(*((double *)prim), p);
959 case icmPCSNumber:
960 return write_PCSNumber(icp, icmSigPCSData, ((double *)prim), p);
961 case icmPCSXYZNumber:
962 return write_PCSNumber(icp, icSigXYZData, ((double *)prim), p);
963 case icmPCSLab8Number:
964 return write_PCSNumber(icp, icmSigLab8Data, ((double *)prim), p);
965 case icmPCSLabNumber:
966 return write_PCSNumber(icp, icSigLabData, ((double *)prim), p);
967 case icmPCSLabV2Number:
968 return write_PCSNumber(icp, icmSigLabV2Data, ((double *)prim), p);
969 case icmPCSLabV4Number:
970 return write_PCSNumber(icp, icmSigLabV4Data, ((double *)prim), p);
971 }
972
973 return 2;
974 }
975
976 /* ---------------------------------------------------------- */
977 /* Auiliary function - return a string that represents a tag */
978 /* Note - returned buffers are static, can only be used 5 */
979 /* times before buffers get reused. */
980 char *tag2str(
981 int tag
982 ) {
983 int i;
984 static int si = 0; /* String buffer index */
985 static char buf[5][20]; /* String buffers */
986 char *bp;
987 unsigned char c[4];
988
989 bp = buf[si++];
990 si %= 5; /* Rotate through buffers */
991
992 c[0] = 0xff & (tag >> 24);
993 c[1] = 0xff & (tag >> 16);
994 c[2] = 0xff & (tag >> 8);
995 c[3] = 0xff & (tag >> 0);
996 for (i = 0; i < 4; i++) { /* Can we represent it as a string ? */
997 if (!isprint(c[i]))
998 break;
999 }
1000 if (i < 4) { /* Not printable - use hex */
1001 sprintf(bp,"0x%x",tag);
1002 } else { /* Printable */
1003 sprintf(bp,"'%c%c%c%c'",c[0],c[1],c[2],c[3]);
1004 }
1005 return bp;
1006 }
1007
1008 /* Auiliary function - return a tag created from a string */
1009 /* Note there is also the icmMakeTag() macro */
1010 unsigned int str2tag(
1011 const char *str
1012 ) {
1013 unsigned int tag;
1014 tag = (((unsigned int)str[0]) << 24)
1015 + (((unsigned int)str[1]) << 16)
1016 + (((unsigned int)str[2]) << 8)
1017 + (((unsigned int)str[3]));
1018 return tag;
1019 }
1020
1021 /* helper - return 1 if the string doesn't have a */
1022 /* null terminator within len, return 0 has null at exactly len, */
1023 /* and 2 if it has null before len. */
1024 /* Note: will return 1 if len == 0 */
1025 static int check_null_string(char *cp, int len) {
1026 for (; len > 0; len--) {
1027 if (cp[0] == '\000')
1028 break;
1029 cp++;
1030 }
1031 if (len == 0)
1032 return 1;
1033 if (len > 1)
1034 return 2;
1035 return 0;
1036 }
1037
1038 /* helper - return 1 if the string doesn't have a */
1039 /* null terminator within len, return 0 has null at exactly len, */
1040 /* and 2 if it has null before len. */
1041 /* Note: will return 1 if len == 0 */
1042 /* Unicode version */
1043 static int check_null_string16(char *cp, int len) {
1044 for (; len > 0; len--) { /* Length is in characters */
1045 if (cp[0] == 0 && cp[1] == 0)
1046 break;
1047 cp += 2;
1048 }
1049 if (len == 0)
1050 return 1;
1051 if (len > 1)
1052 return 2;
1053 return 0;
1054 }
1055
1056 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1057
1058 /* Color Space to number of component conversion */
1059 /* Return 0 on error */
1060 static unsigned int number_ColorSpaceSignature(icColorSpaceSignature sig) {
1061 switch(sig) {
1062 case icSigXYZData:
1063 return 3;
1064 case icSigLabData:
1065 return 3;
1066 case icSigLuvData:
1067 return 3;
1068 case icSigYCbCrData:
1069 return 3;
1070 case icSigYxyData:
1071 return 3;
1072 case icSigRgbData:
1073 return 3;
1074 case icSigGrayData:
1075 return 1;
1076 case icSigHsvData:
1077 return 3;
1078 case icSigHlsData:
1079 return 3;
1080 case icSigCmykData:
1081 return 4;
1082 case icSigCmyData:
1083 return 3;
1084 case icSig2colorData:
1085 return 2;
1086 case icSig3colorData:
1087 return 3;
1088 case icSig4colorData:
1089 return 4;
1090 case icSig5colorData:
1091 case icSigMch5Data:
1092 return 5;
1093 case icSig6colorData:
1094 case icSigMch6Data:
1095 return 6;
1096 case icSig7colorData:
1097 case icSigMch7Data:
1098 return 7;
1099 case icSig8colorData:
1100 case icSigMch8Data:
1101 return 8;
1102 case icSig9colorData:
1103 return 9;
1104 case icSig10colorData:
1105 return 10;
1106 case icSig11colorData:
1107 return 11;
1108 case icSig12colorData:
1109 return 12;
1110 case icSig13colorData:
1111 return 13;
1112 case icSig14colorData:
1113 return 14;
1114 case icSig15colorData:
1115 return 15;
1116
1117 /* Non-standard and Pseudo spaces */
1118 case icmSigYData:
1119 return 1;
1120 case icmSigLData:
1121 return 1;
1122 case icmSigL8Data:
1123 return 1;
1124 case icmSigLV2Data:
1125 return 1;
1126 case icmSigLV4Data:
1127 return 1;
1128 case icmSigPCSData:
1129 return 3;
1130 case icmSigLab8Data:
1131 return 3;
1132 case icmSigLabV2Data:
1133 return 3;
1134 case icmSigLabV4Data:
1135 return 3;
1136
1137 default:
1138 break;
1139 }
1140 return 0;
1141 }
1142
1143 /* Public version of above */
1144
1145 /* Return the number of channels for the given color space. Return 0 if unknown. */
1146 ICCLIB_API unsigned int icmCSSig2nchan(icColorSpaceSignature sig) {
1147 return number_ColorSpaceSignature(sig);
1148 }
1149
1150 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1151
1152 /* Return the individual channel names and number of channels give a colorspace signature. */
1153 /* Return 0 if it is not a colorspace that itself defines particular channels, */
1154 /* 1 if it is a colorant based colorspace, and 2 if it is not a colorant based space */
1155 static int chnames_ColorSpaceSignature(
1156 icColorSpaceSignature sig,
1157 char *cvals[] /* Pointers to return for each channel */
1158 ) {
1159 switch (sig) {
1160 case icSigXYZData:
1161 cvals[0] = "CIE X";
1162 cvals[1] = "CIE Y";
1163 cvals[2] = "CIE Z";
1164 return 2;
1165
1166 case icSigLabData:
1167 cvals[0] = "CIE L*";
1168 cvals[1] = "CIE a*";
1169 cvals[2] = "CIE b*";
1170 return 2;
1171
1172 case icSigLuvData:
1173 cvals[0] = "CIE L*";
1174 cvals[1] = "CIE u*";
1175 cvals[2] = "CIE v*";
1176 return 2;
1177
1178 /* Usually ITU-R BT.601 (was CCIR 601) */
1179 case icSigYCbCrData:
1180 cvals[0] = "ITU Y";
1181 cvals[1] = "ITU Cb";
1182 cvals[2] = "ITU Cr";
1183 return 2;
1184
1185 case icSigYxyData:
1186 cvals[0] = "CIE Y";
1187 cvals[1] = "CIE x";
1188 cvals[2] = "CIE y";
1189 return 2;
1190
1191 /* Alvy Ray Smith ? */
1192 case icSigHsvData:
1193 cvals[0] = "RGB Hue";
1194 cvals[1] = "RGB Saturation";
1195 cvals[2] = "RGB Value";
1196 return 2;
1197
1198 /* GSPC ? */
1199 case icSigHlsData:
1200 cvals[0] = "RGB Hue";
1201 cvals[1] = "RGB Lightness";
1202 cvals[2] = "RGB Saturation";
1203 return 2;
1204
1205 case icSigCmyData:
1206 cvals[0] = "Cyan";
1207 cvals[1] = "Magenta";
1208 cvals[2] = "Yellow";
1209 return 1;
1210
1211 case icSigRgbData:
1212 cvals[0] = "Red";
1213 cvals[1] = "Green";
1214 cvals[2] = "Blue";
1215 return 1;
1216
1217 case icSigCmykData:
1218 cvals[0] = "Cyan";
1219 cvals[1] = "Magenta";
1220 cvals[2] = "Yellow";
1221 cvals[3] = "Black";
1222 return 1;
1223
1224
1225 /* Non-standard and Pseudo spaces */
1226 case icmSigYData:
1227 cvals[0] = "CIE Y";
1228 return 2;
1229
1230 case icmSigLData:
1231 cvals[0] = "CIE L*";
1232 return 2;
1233
1234 default:
1235 break;
1236
1237 }
1238 return 0;
1239 }
1240
1241 /* Public version of above */
1242
1243 /* Return the individual channel names and number of channels give a colorspace signature. */
1244 /* Return 0 if it is not a colorspace that itself defines particular channels, */
1245 /* 1 if it is a colorant based colorspace, and 2 if it is not a colorant based space */
1246 ICCLIB_API unsigned int icmCSSig2chanNames(icColorSpaceSignature sig, char *cvals[]) {
1247
1248 return chnames_ColorSpaceSignature(sig, cvals);
1249 }
1250
1251 /* ------------------------------------------------------- */
1252 /* Flag dump functions */
1253 /* Note - returned buffers are static, can only be used 5 */
1254 /* times before buffers get reused. */
1255
1256 /* Screening Encodings */
1257 static char *string_ScreenEncodings(unsigned int flags) {
1258 static int si = 0; /* String buffer index */
1259 static char buf[5][80]; /* String buffers */
1260 char *bp, *cp;
1261
1262 cp = bp = buf[si++];
1263 si %= 5; /* Rotate through buffers */
1264
1265 if (flags & icPrtrDefaultScreensTrue) {
1266 sprintf(cp,"Default Screen");
1267 } else {
1268 sprintf(cp,"No Default Screen");
1269 }
1270 cp = cp + strlen(cp);
1271 if (flags & icLinesPerInch) {
1272 sprintf(cp,", Lines Per Inch");
1273 } else {
1274 sprintf(cp,", Lines Per cm");
1275 }
1276 cp = cp + strlen(cp);
1277
1278 return bp;
1279 }
1280
1281 /* Device attributes */
1282 static char *string_DeviceAttributes(unsigned int flags) {
1283 static int si = 0; /* String buffer index */
1284 static char buf[5][80]; /* String buffers */
1285 char *bp, *cp;
1286
1287 cp = bp = buf[si++];
1288 si %= 5; /* Rotate through buffers */
1289
1290 if (flags & icTransparency) {
1291 sprintf(cp,"Transparency");
1292 } else {
1293 sprintf(cp,"Reflective");
1294 }
1295 cp = cp + strlen(cp);
1296 if (flags & icMatte) {
1297 sprintf(cp,", Matte");
1298 } else {
1299 sprintf(cp,", Glossy");
1300 }
1301 cp = cp + strlen(cp);
1302 if (flags & icNegative) {
1303 sprintf(cp,", Negative");
1304 } else {
1305 sprintf(cp,", Positive");
1306 }
1307 cp = cp + strlen(cp);
1308 if (flags & icBlackAndWhite) {
1309 sprintf(cp,", BlackAndWhite");
1310 } else {
1311 sprintf(cp,", Color");
1312 }
1313 cp = cp + strlen(cp);
1314
1315 return bp;
1316 }
1317
1318 /* Profile header flags */
1319 static char *string_ProfileHeaderFlags(unsigned int flags) {
1320 static int si = 0; /* String buffer index */
1321 static char buf[5][80]; /* String buffers */
1322 char *bp, *cp;
1323
1324 cp = bp = buf[si++];
1325 si %= 5; /* Rotate through buffers */
1326
1327 if (flags & icEmbeddedProfileTrue) {
1328 sprintf(cp,"Embedded Profile");
1329 } else {
1330 sprintf(cp,"Not Embedded Profile");
1331 }
1332 cp = cp + strlen(cp);
1333 if (flags & icUseWithEmbeddedDataOnly) {
1334 sprintf(cp,", Use with embedded data only");
1335 } else {
1336 sprintf(cp,", Use anywhere");
1337 }
1338 cp = cp + strlen(cp);
1339
1340 return bp;
1341 }
1342
1343
1344 static char *string_AsciiOrBinaryData(unsigned int flags) {
1345 static int si = 0; /* String buffer index */
1346 static char buf[5][80]; /* String buffers */
1347 char *bp, *cp;
1348
1349 cp = bp = buf[si++];
1350 si %= 5; /* Rotate through buffers */
1351
1352 if (flags & icBinaryData) {
1353 sprintf(cp,"Binary");
1354 } else {
1355 sprintf(cp,"Ascii");
1356 }
1357 cp = cp + strlen(cp);
1358
1359 return bp;
1360 }
1361
1362 /* ------------------------------------------------------------ */
1363 /* Enumeration dump functions */
1364 /* Note - returned buffers are static, can only be used once */
1365 /* before buffers get reused if type is unknown. */
1366
1367 /* public tags and sizes */
1368 static const char *string_TagSignature(icTagSignature sig) {
1369 static char buf[80];
1370 switch(sig) {
1371 case icSigAToB0Tag:
1372 return "AToB0 Multidimentional Transform";
1373 case icSigAToB1Tag:
1374 return "AToB1 Multidimentional Transform";
1375 case icSigAToB2Tag:
1376 return "AToB2 Multidimentional Transform";
1377 case icSigBlueColorantTag:
1378 return "Blue Colorant";
1379 case icSigBlueTRCTag:
1380 return "Blue Tone Reproduction Curve";
1381 case icSigBToA0Tag:
1382 return "BToA0 Multidimentional Transform";
1383 case icSigBToA1Tag:
1384 return "BToA1 Multidimentional Transform";
1385 case icSigBToA2Tag:
1386 return "BToA2 Multidimentional Transform";
1387 case icSigCalibrationDateTimeTag:
1388 return "Calibration Date & Time";
1389 case icSigCharTargetTag:
1390 return "Characterization Target";
1391 case icSigCopyrightTag:
1392 return "Copyright";
1393 case icSigCrdInfoTag:
1394 return "CRD Info";
1395 case icSigDeviceMfgDescTag:
1396 return "Device Manufacturer Description";
1397 case icSigDeviceModelDescTag:
1398 return "Device Model Description";
1399 case icSigGamutTag:
1400 return "Gamut";
1401 case icSigGrayTRCTag:
1402 return "Gray Tone Reproduction Curve";
1403 case icSigGreenColorantTag:
1404 return "Green Colorant";
1405 case icSigGreenTRCTag:
1406 return "Green Tone Reproduction Curve";
1407 case icSigLuminanceTag:
1408 return "Luminance";
1409 case icSigMeasurementTag:
1410 return "Measurement";
1411 case icSigMediaBlackPointTag:
1412 return "Media Black Point";
1413 case icSigMediaWhitePointTag:
1414 return "Media White Point";
1415 case icSigNamedColorTag:
1416 return "Named Color";
1417 case icSigNamedColor2Tag:
1418 return "Named Color 2";
1419 case icSigPreview0Tag:
1420 return "Preview0";
1421 case icSigPreview1Tag:
1422 return "Preview1";
1423 case icSigPreview2Tag:
1424 return "Preview2";
1425 case icSigProfileDescriptionTag:
1426 return "Profile Description";
1427 case icSigProfileSequenceDescTag:
1428 return "Profile Sequence";
1429 case icSigPs2CRD0Tag:
1430 return "PS Level 2 CRD perceptual";
1431 case icSigPs2CRD1Tag:
1432 return "PS Level 2 CRD colorimetric";
1433 case icSigPs2CRD2Tag:
1434 return "PS Level 2 CRD saturation";
1435 case icSigPs2CRD3Tag:
1436 return "PS Level 2 CRD absolute";
1437 case icSigPs2CSATag:
1438 return "PS Level 2 color space array";
1439 case icSigPs2RenderingIntentTag:
1440 return "PS Level 2 Rendering Intent";
1441 case icSigRedColorantTag:
1442 return "Red Colorant";
1443 case icSigRedTRCTag:
1444 return "Red Tone Reproduction Curve";
1445 case icSigScreeningDescTag:
1446 return "Screening Description";
1447 case icSigScreeningTag:
1448 return "Screening Attributes";
1449 case icSigTechnologyTag:
1450 return "Device Technology";
1451 case icSigUcrBgTag:
1452 return "Under Color Removal & Black Generation";
1453 case icSigVideoCardGammaTag:
1454 return "Video Card Gamma Curve";
1455 case icSigViewingCondDescTag:
1456 return "Viewing Condition Description";
1457 case icSigViewingConditionsTag:
1458 return "Viewing Condition Paramaters";
1459 default:
1460 sprintf(buf,"Unrecognized - %s",tag2str(sig));
1461 return buf;
1462 }
1463 }
1464
1465 /* technology signature descriptions */
1466 static const char *string_TechnologySignature(icTechnologySignature sig) {
1467 static char buf[80];
1468 switch(sig) {
1469 case icSigDigitalCamera:
1470 return "Digital Camera";
1471 case icSigFilmScanner:
1472 return "Film Scanner";
1473 case icSigReflectiveScanner:
1474 return "Reflective Scanner";
1475 case icSigInkJetPrinter:
1476 return "InkJet Printer";
1477 case icSigThermalWaxPrinter:
1478 return "Thermal WaxPrinter";
1479 case icSigElectrophotographicPrinter:
1480 return "Electrophotographic Printer";
1481 case icSigElectrostaticPrinter:
1482 return "Electrostatic Printer";
1483 case icSigDyeSublimationPrinter:
1484 return "DyeSublimation Printer";
1485 case icSigPhotographicPaperPrinter:
1486 return "Photographic Paper Printer";
1487 case icSigFilmWriter:
1488 return "Film Writer";
1489 case icSigVideoMonitor:
1490 return "Video Monitor";
1491 case icSigVideoCamera:
1492 return "Video Camera";
1493 case icSigProjectionTelevision:
1494 return "Projection Television";
1495 case icSigCRTDisplay:
1496 return "Cathode Ray Tube Display";
1497 case icSigPMDisplay:
1498 return "Passive Matrix Display";
1499 case icSigAMDisplay:
1500 return "Active Matrix Display";
1501 case icSigPhotoCD:
1502 return "Photo CD";
1503 case icSigPhotoImageSetter:
1504 return "Photo ImageSetter";
1505 case icSigGravure:
1506 return "Gravure";
1507 case icSigOffsetLithography:
1508 return "Offset Lithography";
1509 case icSigSilkscreen:
1510 return "Silkscreen";
1511 case icSigFlexography:
1512 return "Flexography";
1513 default:
1514 sprintf(buf,"Unrecognized - %s",tag2str(sig));
1515 return buf;
1516 }
1517 }
1518
1519 /* type signatures */
1520 static const char *string_TypeSignature(icTagTypeSignature sig) {
1521 static char buf[80];
1522 switch(sig) {
1523 case icSigCurveType:
1524 return "Curve";
1525 case icSigDataType:
1526 return "Data";
1527 case icSigDateTimeType:
1528 return "DateTime";
1529 case icSigLut16Type:
1530 return "Lut16";
1531 case icSigLut8Type:
1532 return "Lut8";
1533 case icSigMeasurementType:
1534 return "Measurement";
1535 case icSigNamedColorType:
1536 return "Named Color";
1537 case icSigProfileSequenceDescType:
1538 return "Profile Sequence Desc";
1539 case icSigS15Fixed16ArrayType:
1540 return "S15Fixed16 Array";
1541 case icSigScreeningType:
1542 return "Screening";
1543 case icSigSignatureType:
1544 return "Signature";
1545 case icSigTextType:
1546 return "Text";
1547 case icSigTextDescriptionType:
1548 return "Text Description";
1549 case icSigU16Fixed16ArrayType:
1550 return "U16Fixed16 Array";
1551 case icSigUcrBgType:
1552 return "Under Color Removal & Black Generation";
1553 case icSigUInt16ArrayType:
1554 return "UInt16 Array";
1555 case icSigUInt32ArrayType:
1556 return "UInt32 Array";
1557 case icSigUInt64ArrayType:
1558 return "UInt64 Array";
1559 case icSigUInt8ArrayType:
1560 return "UInt8 Array";
1561 case icSigVideoCardGammaType:
1562 return "Video Card Gamma";
1563 case icSigViewingConditionsType:
1564 return "Viewing Conditions";
1565 case icSigXYZType:
1566 return "XYZ (Array?)";
1567 case icSigNamedColor2Type:
1568 return "Named Color 2";
1569 case icSigCrdInfoType:
1570 return "CRD Info";
1571 default:
1572 sprintf(buf,"Unrecognized - %s",tag2str(sig));
1573 return buf;
1574 }
1575 }
1576
1577 /* Color Space Signatures */
1578 static const char *string_ColorSpaceSignature(icColorSpaceSignature sig) {
1579 static char buf[80];
1580 switch(sig) {
1581 case icSigXYZData:
1582 return "XYZ";
1583 case icSigLabData:
1584 return "Lab";
1585 case icSigLuvData:
1586 return "Luv";
1587 case icSigYCbCrData:
1588 return "YCbCr";
1589 case icSigYxyData:
1590 return "Yxy";
1591 case icSigRgbData:
1592 return "RGB";
1593 case icSigGrayData:
1594 return "Gray";
1595 case icSigHsvData:
1596 return "HSV";
1597 case icSigHlsData:
1598 return "HLS";
1599 case icSigCmykData:
1600 return "CMYK";
1601 case icSigCmyData:
1602 return "CMY";
1603 case icSig2colorData:
1604 return "2 Color";
1605 case icSig3colorData:
1606 return "3 Color";
1607 case icSig4colorData:
1608 return "4 Color";
1609 case icSig5colorData:
1610 case icSigMch5Data:
1611 return "5 Color";
1612 case icSig6colorData:
1613 case icSigMch6Data:
1614 return "6 Color";
1615 case icSig7colorData:
1616 case icSigMch7Data:
1617 return "7 Color";
1618 case icSig8colorData:
1619 case icSigMch8Data:
1620 return "8 Color";
1621 case icSig9colorData:
1622 return "9 Color";
1623 case icSig10colorData:
1624 return "10 Color";
1625 case icSig11colorData:
1626 return "11 Color";
1627 case icSig12colorData:
1628 return "12 Color";
1629 case icSig13colorData:
1630 return "13 Color";
1631 case icSig14colorData:
1632 return "14 Color";
1633 case icSig15colorData:
1634 return "15 Color";
1635
1636 /* Non-standard and Pseudo spaces */
1637 case icmSigYData:
1638 return "Y";
1639 case icmSigLData:
1640 return "L";
1641 case icmSigL8Data:
1642 return "L";
1643 case icmSigLV2Data:
1644 return "L";
1645 case icmSigLV4Data:
1646 return "L";
1647 case icmSigPCSData:
1648 return "PCS";
1649 case icmSigLab8Data:
1650 return "Lab";
1651 case icmSigLabV2Data:
1652 return "Lab";
1653 case icmSigLabV4Data:
1654 return "Lab";
1655
1656 default:
1657 sprintf(buf,"Unrecognized - %s",tag2str(sig));
1658 return buf;
1659 }
1660 }
1661
1662 #ifdef NEVER
1663 /* Public version of above */
1664 char *ColorSpaceSignature2str(icColorSpaceSignature sig) {
1665 return string_ColorSpaceSignature(sig);
1666 }
1667 #endif
1668
1669
1670 /* profileClass enumerations */
1671 static const char *string_ProfileClassSignature(icProfileClassSignature sig) {
1672 static char buf[80];
1673 switch(sig) {
1674 case icSigInputClass:
1675 return "Input";
1676 case icSigDisplayClass:
1677 return "Display";
1678 case icSigOutputClass:
1679 return "Output";
1680 case icSigLinkClass:
1681 return "Link";
1682 case icSigAbstractClass:
1683 return "Abstract";
1684 case icSigColorSpaceClass:
1685 return "Color Space";
1686 case icSigNamedColorClass:
1687 return "Named Color";
1688 default:
1689 sprintf(buf,"Unrecognized - %s",tag2str(sig));
1690 return buf;
1691 }
1692 }
1693
1694 /* Platform Signatures */
1695 static const char *string_PlatformSignature(icPlatformSignature sig) {
1696 static char buf[80];
1697 switch(sig) {
1698 case icSigMacintosh:
1699 return "Macintosh";
1700 case icSigMicrosoft:
1701 return "Microsoft";
1702 case icSigSolaris:
1703 return "Solaris";
1704 case icSigSGI:
1705 return "SGI";
1706 case icSigTaligent:
1707 return "Taligent";
1708 case icmSig_nix:
1709 return "*nix";
1710 default:
1711 sprintf(buf,"Unrecognized - %s",tag2str(sig));
1712 return buf;
1713 }
1714 }
1715
1716 /* Measurement Geometry, used in the measurmentType tag */
1717 static const char *string_MeasurementGeometry(icMeasurementGeometry sig) {
1718 static char buf[30];
1719 switch(sig) {
1720 case icGeometryUnknown:
1721 return "Unknown";
1722 case icGeometry045or450:
1723 return "0/45 or 45/0";
1724 case icGeometry0dord0:
1725 return "0/d or d/0";
1726 default:
1727 sprintf(buf,"Unrecognized - 0x%x",sig);
1728 return buf;
1729 }
1730 }
1731
1732 /* Rendering Intents, used in the profile header */
1733 static const char *string_RenderingIntent(icRenderingIntent sig) {
1734 static char buf[30];
1735 switch(sig) {
1736 case icPerceptual:
1737 return "Perceptual";
1738 case icRelativeColorimetric:
1739 return "Relative Colorimetric";
1740 case icSaturation:
1741 return "Saturation";
1742 case icAbsoluteColorimetric:
1743 return "Absolute Colorimetric";
1744 case icmAbsolutePerceptual: /* icclib specials */
1745 return "Absolute Perceptual";
1746 case icmAbsoluteSaturation: /* icclib specials */
1747 return "Absolute Saturation";
1748 case icmDefaultIntent: /* icclib specials */
1749 return "Default Intent";
1750 default:
1751 sprintf(buf,"Unrecognized - 0x%x",sig);
1752 return buf;
1753 }
1754 }
1755
1756 /* Transform Lookup function */
1757 static const char *string_LookupFunc(icmLookupFunc sig) {
1758 static char buf[30];
1759 switch(sig) {
1760 case icmFwd:
1761 return "Forward";
1762 case icmBwd:
1763 return "Backward";
1764 case icmGamut:
1765 return "Gamut";
1766 case icmPreview:
1767 return "Preview";
1768 default:
1769 sprintf(buf,"Unrecognized - 0x%x",sig);
1770 return buf;
1771 }
1772 }
1773
1774
1775 /* Different Spot Shapes currently defined, used for screeningType */
1776 static const char *string_SpotShape(icSpotShape sig) {
1777 static char buf[30];
1778 switch(sig) {
1779 case icSpotShapeUnknown:
1780 return "Unknown";
1781 case icSpotShapePrinterDefault:
1782 return "Printer Default";
1783 case icSpotShapeRound:
1784 return "Round";
1785 case icSpotShapeDiamond:
1786 return "Diamond";
1787 case icSpotShapeEllipse:
1788 return "Ellipse";
1789 case icSpotShapeLine:
1790 return "Line";
1791 case icSpotShapeSquare:
1792 return "Square";
1793 case icSpotShapeCross:
1794 return "Cross";
1795 default:
1796 sprintf(buf,"Unrecognized - 0x%x",sig);
1797 return buf;
1798 }
1799 }
1800
1801 /* Standard Observer, used in the measurmentType tag */
1802 static const char *string_StandardObserver(icStandardObserver sig) {
1803 static char buf[30];
1804 switch(sig) {
1805 case icStdObsUnknown:
1806 return "Unknown";
1807 case icStdObs1931TwoDegrees:
1808 return "1931 Two Degrees";
1809 case icStdObs1964TenDegrees:
1810 return "1964 Ten Degrees";
1811 default:
1812 sprintf(buf,"Unrecognized - 0x%x",sig);
1813 return buf;
1814 }
1815 }
1816
1817 /* Pre-defined illuminants, used in measurement and viewing conditions type */
1818 static const char *string_Illuminant(icIlluminant sig) {
1819 static char buf[30];
1820 switch(sig) {
1821 case icIlluminantUnknown:
1822 return "Unknown";
1823 case icIlluminantD50:
1824 return "D50";
1825 case icIlluminantD65:
1826 return "D65";
1827 case icIlluminantD93:
1828 return "D93";
1829 case icIlluminantF2:
1830 return "F2";
1831 case icIlluminantD55:
1832 return "D55";
1833 case icIlluminantA:
1834 return "A";
1835 case icIlluminantEquiPowerE:
1836 return "Equi-Power(E)";
1837 case icIlluminantF8:
1838 return "F8";
1839 default:
1840 sprintf(buf,"Unrecognized - 0x%x",sig);
1841 return buf;
1842 }
1843 }
1844
1845 /* Return a text abreviation of a color lookup algorithm */
1846 static const char *string_LuAlg(icmLuAlgType alg) {
1847 static char buf[80];
1848
1849 switch(alg) {
1850 case icmMonoFwdType:
1851 return "MonoFwd";
1852 case icmMonoBwdType:
1853 return "MonoBwd";
1854 case icmMatrixFwdType:
1855 return "MatrixFwd";
1856 case icmMatrixBwdType:
1857 return "MatrixBwd";
1858 case icmLutType:
1859 return "Lut";
1860 default:
1861 sprintf(buf,"Unrecognized - %d",alg);
1862 return buf;
1863 }
1864 }
1865
1866 /* Return a string description of the given enumeration value */
1867 /* Public: */
1868 const char *icm2str(icmEnumType etype, int enumval) {
1869
1870 switch(etype) {
1871 case icmScreenEncodings:
1872 return string_ScreenEncodings((unsigned int) enumval);
1873 case icmDeviceAttributes:
1874 return string_DeviceAttributes((unsigned int) enumval);
1875 case icmProfileHeaderFlags:
1876 return string_ProfileHeaderFlags((unsigned int) enumval);
1877 case icmAsciiOrBinaryData:
1878 return string_AsciiOrBinaryData((unsigned int) enumval);
1879 case icmTagSignature:
1880 return string_TagSignature((icTagSignature) enumval);
1881 case icmTechnologySignature:
1882 return string_TechnologySignature((icTechnologySignature) enumval);
1883 case icmTypeSignature:
1884 return string_TypeSignature((icTagTypeSignature) enumval);
1885 case icmColorSpaceSignature:
1886 return string_ColorSpaceSignature((icColorSpaceSignature) enumval);
1887 case icmProfileClassSignature:
1888 return string_ProfileClassSignature((icProfileClassSignature) enumval);
1889 case icmPlatformSignature:
1890 return string_PlatformSignature((icPlatformSignature) enumval);
1891 case icmMeasurementGeometry:
1892 return string_MeasurementGeometry((icMeasurementGeometry) enumval);
1893 case icmRenderingIntent:
1894 return string_RenderingIntent((icRenderingIntent) enumval);
1895 case icmTransformLookupFunc:
1896 return string_LookupFunc((icmLookupFunc) enumval);
1897 case icmSpotShape:
1898 return string_SpotShape((icSpotShape) enumval);
1899 case icmStandardObserver:
1900 return string_StandardObserver((icStandardObserver) enumval);
1901 case icmIlluminant:
1902 return string_Illuminant((icIlluminant) enumval);
1903 case icmLuAlg:
1904 return string_LuAlg((icmLuAlgType) enumval);
1905 default:
1906 return "enum2str got unknown type";
1907 }
1908 }
1909
1910 /* ========================================================== */
1911 /* Object I/O routines */
1912 /* ========================================================== */
1913 /* icmUnknown object */
1914
1915 /* Return the number of bytes needed to write this tag */
1916 static unsigned int icmUnknown_get_size(
1917 icmBase *pp
1918 ) {
1919 icmUnknown *p = (icmUnknown *)pp;
1920 unsigned int len = 0;
1921 len = sat_add(len, 8); /* 8 bytes for tag and padding */
1922 len = sat_addmul(len, p->size, 1); /* 1 byte for each unknown data */
1923 return len;
1924 }
1925
1926 /* read the object, return 0 on success, error code on fail */
1927 static int icmUnknown_read(
1928 icmBase *pp,
1929 unsigned int len, /* tag length */
1930 unsigned int of /* start offset within file */
1931 ) {
1932 icmUnknown *p = (icmUnknown *)pp;
1933 icc *icp = p->icp;
1934 int rv = 0;
1935 unsigned int i, size;
1936 char *bp, *buf;
1937
1938 if (len < 8) {
1939 sprintf(icp->err,"icmUnknown_read: Tag too small to be legal");
1940 return icp->errc = 1;
1941 }
1942
1943 /* Allocate a file read buffer */
1944 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
1945 sprintf(icp->err,"icmUnknown_read: malloc() failed");
1946 return icp->errc = 2;
1947 }
1948 bp = buf;
1949
1950 /* Read portion of file into buffer */
1951 if ( icp->fp->seek(icp->fp, of) != 0
1952 || icp->fp->read(icp->fp, bp, 1, len) != len) {
1953 sprintf(icp->err,"icmUnknown_read: fseek() or fread() failed");
1954 icp->al->free(icp->al, buf);
1955 return icp->errc = 1;
1956 }
1957 p->size = size = (len - 8)/1; /* Number of elements in the array */
1958
1959 if ((rv = p->allocate((icmBase *)p)) != 0) {
1960 icp->al->free(icp->al, buf);
1961 return rv;
1962 }
1963
1964 /* Read type descriptor from the buffer */
1965 p->uttype = (icTagTypeSignature)read_SInt32Number(bp);
1966 bp += 8; /* Skip padding */
1967
1968 /* Read all the data from the buffer */
1969 for (i = 0; i < size; i++, bp += 1) {
1970 p->data[i] = read_UInt8Number(bp);
1971 }
1972 icp->al->free(p->icp->al, buf);
1973 return 0;
1974 }
1975
1976 /* Write the contents of the object. Return 0 on sucess, error code on failure */
1977 static int icmUnknown_write(
1978 icmBase *pp,
1979 unsigned int of /* File offset to write from */
1980 ) {
1981 icmUnknown *p = (icmUnknown *)pp;
1982 icc *icp = p->icp;
1983 unsigned int i;
1984 unsigned int len;
1985 char *bp, *buf; /* Buffer to write from */
1986 int rv = 0;
1987
1988 /* Allocate a file write buffer */
1989 if ((len = p->get_size((icmBase *)p)) == UINT_MAX) {
1990 sprintf(icp->err,"icmUnknown_write get_size overflow");
1991 return icp->errc = 1;
1992 }
1993 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
1994 sprintf(icp->err,"icmUnknown_write malloc() failed");
1995 return icp->errc = 2;
1996 }
1997 bp = buf;
1998
1999 /* Write type descriptor to the buffer */
2000 if ((rv = write_SInt32Number((int)p->uttype,bp)) != 0) {
2001 sprintf(icp->err,"icmUnknown_write: write_SInt32Number() failed");
2002 icp->al->free(icp->al, buf);
2003 return icp->errc = rv;
2004 }
2005 write_SInt32Number(0,bp+4); /* Set padding to 0 */
2006 bp += 8; /* Skip padding */
2007
2008 /* Write all the data to the buffer */
2009 for (i = 0; i < p->size; i++, bp += 1) {
2010 if ((rv = write_UInt8Number(p->data[i],bp)) != 0) {
2011 sprintf(icp->err,"icmUnknown_write: write_UInt8umber() failed");
2012 icp->al->free(icp->al, buf);
2013 return icp->errc = rv;
2014 }
2015 }
2016
2017 /* Write to the file */
2018 if ( icp->fp->seek(icp->fp, of) != 0
2019 || icp->fp->write(icp->fp, buf, 1, len) != len) {
2020 sprintf(icp->err,"icmUnknown_write fseek() or fwrite() failed");
2021 icp->al->free(icp->al, buf);
2022 return icp->errc = 2;
2023 }
2024 icp->al->free(icp->al, buf);
2025 return 0;
2026 }
2027
2028 /* Dump a text description of the object */
2029 static void icmUnknown_dump(
2030 icmBase *pp,
2031 icmFile *op, /* Output to dump to */
2032 int verb /* Verbosity level */
2033 ) {
2034 icmUnknown *p = (icmUnknown *)pp;
2035 unsigned int i, ii, r, ph;
2036
2037 if (verb <= 1)
2038 return;
2039
2040 op->gprintf(op,"Unknown:\n");
2041 op->gprintf(op," Payload size in bytes = %u\n",p->size);
2042
2043 /* Print one row of binary and ASCII interpretation if verb == 2, All if == 3 */
2044 /* else print all of it. */
2045 ii = i = ph = 0;
2046 for (r = 1;; r++) { /* count rows */
2047 int c = 1; /* Character location */
2048
2049 c = 1;
2050 if (ph != 0) { /* Print ASCII under binary */
2051 op->gprintf(op," ");
2052 i = ii; /* Swap */
2053 c += 12;
2054 } else {
2055 op->gprintf(op," 0x%04lx: ",i);
2056 ii = i; /* Swap */
2057 c += 12;
2058 }
2059 while (i < p->size && c < 60) {
2060 if (ph == 0)
2061 op->gprintf(op,"%02x ",p->data[i]);
2062 else {
2063 if (isprint(p->data[i]))
2064 op->gprintf(op,"%c ",p->data[i]);
2065 else
2066 op->gprintf(op," ",p->data[i]);
2067 }
2068 c += 3;
2069 i++;
2070 }
2071 if (ph == 0 || i < p->size)
2072 op->gprintf(op,"\n");
2073
2074 if (ph == 1 && i >= p->size) {
2075 op->gprintf(op,"\n");
2076 break;
2077 }
2078 if (ph == 1 && r > 1 && verb < 3) {
2079 op->gprintf(op," ...\n");
2080 break; /* Print 1 row if not verbose */
2081 }
2082
2083 if (ph == 0)
2084 ph = 1;
2085 else
2086 ph = 0;
2087
2088 }
2089 }
2090
2091 /* Allocate variable sized data elements */
2092 static int icmUnknown_allocate(
2093 icmBase *pp
2094 ) {
2095 icmUnknown *p = (icmUnknown *)pp;
2096 icc *icp = p->icp;
2097
2098 if (p->size != p->_size) {
2099 if (ovr_mul(p->size, sizeof(unsigned char))) {
2100 sprintf(icp->err,"icmUnknown_alloc: size overflow");
2101 return icp->errc = 1;
2102 }
2103 if (p->data != NULL)
2104 icp->al->free(icp->al, p->data);
2105 if ((p->data = (unsigned char *) icp->al->calloc(icp->al, p->size, sizeof(unsigned char)))
2106 == NULL) {
2107 sprintf(icp->err,"icmUnknown_alloc: malloc() of icmUnknown data failed");
2108 return icp->errc = 2;
2109 }
2110 p->_size = p->size;
2111 }
2112 return 0;
2113 }
2114
2115 /* Free all storage in the object */
2116 static void icmUnknown_delete(
2117 icmBase *pp
2118 ) {
2119 icmUnknown *p = (icmUnknown *)pp;
2120 icc *icp = p->icp;
2121
2122 if (p->data != NULL)
2123 icp->al->free(icp->al, p->data);
2124 icp->al->free(icp->al, p);
2125 }
2126
2127 /* Create an empty object. Return null on error */
2128 static icmBase *new_icmUnknown(
2129 icc *icp
2130 ) {
2131 icmUnknown *p;
2132 if ((p = (icmUnknown *) icp->al->calloc(icp->al,1,sizeof(icmUnknown))) == NULL)
2133 return NULL;
2134 p->ttype = icmSigUnknownType;
2135 p->uttype = icmSigUnknownType;
2136 p->refcount = 1;
2137 p->get_size = icmUnknown_get_size;
2138 p->read = icmUnknown_read;
2139 p->write = icmUnknown_write;
2140 p->dump = icmUnknown_dump;
2141 p->allocate = icmUnknown_allocate;
2142 p->del = icmUnknown_delete;
2143 p->icp = icp;
2144
2145 return (icmBase *)p;
2146 }
2147
2148 /* ---------------------------------------------------------- */
2149 /* icmUInt8Array object */
2150
2151 /* Return the number of bytes needed to write this tag */
2152 static unsigned int icmUInt8Array_get_size(
2153 icmBase *pp
2154 ) {
2155 icmUInt8Array *p = (icmUInt8Array *)pp;
2156 unsigned int len = 0;
2157 len = sat_add(len, 8); /* 8 bytes for tag and padding */
2158 len = sat_addmul(len, p->size, 1); /* 1 byte for each UInt8 */
2159 return len;
2160 }
2161
2162 /* read the object, return 0 on success, error code on fail */
2163 static int icmUInt8Array_read(
2164 icmBase *pp,
2165 unsigned int len, /* tag length */
2166 unsigned int of /* start offset within file */
2167 ) {
2168 icmUInt8Array *p = (icmUInt8Array *)pp;
2169 icc *icp = p->icp;
2170 int rv = 0;
2171 unsigned int i, size;
2172 char *bp, *buf;
2173
2174 if (len < 8) {
2175 sprintf(icp->err,"icmUInt8Array_read: Tag too small to be legal");
2176 return icp->errc = 1;
2177 }
2178
2179 /* Allocate a file read buffer */
2180 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
2181 sprintf(icp->err,"icmUInt8Array_read: malloc() failed");
2182 return icp->errc = 2;
2183 }
2184 bp = buf;
2185
2186 /* Read portion of file into buffer */
2187 if ( icp->fp->seek(icp->fp, of) != 0
2188 || icp->fp->read(icp->fp, bp, 1, len) != len) {
2189 sprintf(icp->err,"icmUInt8Array_read: fseek() or fread() failed");
2190 icp->al->free(icp->al, buf);
2191 return icp->errc = 1;
2192 }
2193 p->size = size = (len - 8)/1; /* Number of elements in the array */
2194
2195 if ((rv = p->allocate((icmBase *)p)) != 0) {
2196 icp->al->free(icp->al, buf);
2197 return rv;
2198 }
2199
2200 /* Read type descriptor from the buffer */
2201 if (((icTagTypeSignature)read_SInt32Number(bp)) != p->ttype) {
2202 icp->al->free(icp->al, buf);
2203 sprintf(icp->err,"icmUInt8Array_read: Wrong tag type for icmUInt8Array");
2204 return icp->errc = 1;
2205 }
2206 bp += 8; /* Skip padding */
2207
2208 /* Read all the data from the buffer */
2209 for (i = 0; i < size; i++, bp += 1) {
2210 p->data[i] = read_UInt8Number(bp);
2211 }
2212 icp->al->free(p->icp->al, buf);
2213 return 0;
2214 }
2215
2216 /* Write the contents of the object. Return 0 on sucess, error code on failure */
2217 static int icmUInt8Array_write(
2218 icmBase *pp,
2219 unsigned int of /* File offset to write from */
2220 ) {
2221 icmUInt8Array *p = (icmUInt8Array *)pp;
2222 icc *icp = p->icp;
2223 unsigned int i;
2224 unsigned int len;
2225 char *bp, *buf; /* Buffer to write from */
2226 int rv = 0;
2227
2228 /* Allocate a file write buffer */
2229 if ((len = p->get_size((icmBase *)p)) == UINT_MAX) {
2230 sprintf(icp->err,"icmUInt8Array_write get_size overflow");
2231 return icp->errc = 1;
2232 }
2233 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
2234 sprintf(icp->err,"icmUInt8Array_write malloc() failed");
2235 return icp->errc = 2;
2236 }
2237 bp = buf;
2238
2239 /* Write type descriptor to the buffer */
2240 if ((rv = write_SInt32Number((int)p->ttype,bp)) != 0) {
2241 sprintf(icp->err,"icmUInt8Array_write: write_SInt32Number() failed");
2242 icp->al->free(icp->al, buf);
2243 return icp->errc = rv;
2244 }
2245 write_SInt32Number(0,bp+4); /* Set padding to 0 */
2246 bp += 8; /* Skip padding */
2247
2248 /* Write all the data to the buffer */
2249 for (i = 0; i < p->size; i++, bp += 1) {
2250 if ((rv = write_UInt8Number(p->data[i],bp)) != 0) {
2251 sprintf(icp->err,"icmUInt8Array_write: write_UInt8umber() failed");
2252 icp->al->free(icp->al, buf);
2253 return icp->errc = rv;
2254 }
2255 }
2256
2257 /* Write to the file */
2258 if ( icp->fp->seek(icp->fp, of) != 0
2259 || icp->fp->write(icp->fp, buf, 1, len) != len) {
2260 sprintf(icp->err,"icmUInt8Array_write fseek() or fwrite() failed");
2261 icp->al->free(icp->al, buf);
2262 return icp->errc = 2;
2263 }
2264 icp->al->free(icp->al, buf);
2265 return 0;
2266 }
2267
2268 /* Dump a text description of the object */
2269 static void icmUInt8Array_dump(
2270 icmBase *pp,
2271 icmFile *op, /* Output to dump to */
2272 int verb /* Verbosity level */
2273 ) {
2274 icmUInt8Array *p = (icmUInt8Array *)pp;
2275 if (verb <= 0)
2276 return;
2277
2278 op->gprintf(op,"UInt8Array:\n");
2279 op->gprintf(op," No. elements = %lu\n",p->size);
2280 if (verb >= 2) {
2281 unsigned int i;
2282 for (i = 0; i < p->size; i++)
2283 op->gprintf(op," %lu: %u\n",i,p->data[i]);
2284 }
2285 }
2286
2287 /* Allocate variable sized data elements */
2288 static int icmUInt8Array_allocate(
2289 icmBase *pp
2290 ) {
2291 icmUInt8Array *p = (icmUInt8Array *)pp;
2292 icc *icp = p->icp;
2293
2294 if (p->size != p->_size) {
2295 if (ovr_mul(p->size, sizeof(unsigned int))) {
2296 sprintf(icp->err,"icmUInt8Array_alloc: size overflow");
2297 return icp->errc = 1;
2298 }
2299 if (p->data != NULL)
2300 icp->al->free(icp->al, p->data);
2301 if ((p->data = (unsigned int *) icp->al->calloc(icp->al, p->size, sizeof(unsigned int)))
2302 == NULL) {
2303 sprintf(icp->err,"icmUInt8Array_alloc: malloc() of icmUInt8Array data failed");
2304 return icp->errc = 2;
2305 }
2306 p->_size = p->size;
2307 }
2308 return 0;
2309 }
2310
2311 /* Free all storage in the object */
2312 static void icmUInt8Array_delete(
2313 icmBase *pp
2314 ) {
2315 icmUInt8Array *p = (icmUInt8Array *)pp;
2316 icc *icp = p->icp;
2317
2318 if (p->data != NULL)
2319 icp->al->free(icp->al, p->data);
2320 icp->al->free(icp->al, p);
2321 }
2322
2323 /* Create an empty object. Return null on error */
2324 static icmBase *new_icmUInt8Array(
2325 icc *icp
2326 ) {
2327 icmUInt8Array *p;
2328 if ((p = (icmUInt8Array *) icp->al->calloc(icp->al,1,sizeof(icmUInt8Array))) == NULL)
2329 return NULL;
2330 p->ttype = icSigUInt8ArrayType;
2331 p->refcount = 1;
2332 p->get_size = icmUInt8Array_get_size;
2333 p->read = icmUInt8Array_read;
2334 p->write = icmUInt8Array_write;
2335 p->dump = icmUInt8Array_dump;
2336 p->allocate = icmUInt8Array_allocate;
2337 p->del = icmUInt8Array_delete;
2338 p->icp = icp;
2339
2340 return (icmBase *)p;
2341 }
2342
2343 /* ---------------------------------------------------------- */
2344 /* icmUInt16Array object */
2345
2346 /* Return the number of bytes needed to write this tag */
2347 static unsigned int icmUInt16Array_get_size(
2348 icmBase *pp
2349 ) {
2350 icmUInt16Array *p = (icmUInt16Array *)pp;
2351 unsigned int len = 0;
2352 len = sat_add(len, 8); /* 8 bytes for tag and padding */
2353 len = sat_addmul(len, p->size, 2); /* 2 bytes for each UInt16 */
2354 return len;
2355 }
2356
2357 /* read the object, return 0 on success, error code on fail */
2358 static int icmUInt16Array_read(
2359 icmBase *pp,
2360 unsigned int len, /* tag length */
2361 unsigned int of /* start offset within file */
2362 ) {
2363 icmUInt16Array *p = (icmUInt16Array *)pp;
2364 icc *icp = p->icp;
2365 int rv = 0;
2366 unsigned int i, size;
2367 char *bp, *buf;
2368
2369 if (len < 8) {
2370 sprintf(icp->err,"icmUInt16Array_read: Tag too small to be legal");
2371 return icp->errc = 1;
2372 }
2373
2374 /* Allocate a file read buffer */
2375 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
2376 sprintf(icp->err,"icmUInt16Array_read: malloc() failed");
2377 return icp->errc = 2;
2378 }
2379 bp = buf;
2380
2381 /* Read portion of file into buffer */
2382 if ( icp->fp->seek(icp->fp, of) != 0
2383 || icp->fp->read(icp->fp, bp, 1, len) != len) {
2384 sprintf(icp->err,"icmUInt16Array_read: fseek() or fread() failed");
2385 icp->al->free(icp->al, buf);
2386 return icp->errc = 1;
2387 }
2388 p->size = size = (len - 8)/2; /* Number of elements in the array */
2389
2390 if ((rv = p->allocate((icmBase *)p)) != 0) {
2391 icp->al->free(icp->al, buf);
2392 return rv;
2393 }
2394
2395 /* Read type descriptor from the buffer */
2396 if (((icTagTypeSignature)read_SInt32Number(bp)) != p->ttype) {
2397 sprintf(icp->err,"icmUInt16Array_read: Wrong tag type for icmUInt16Array");
2398 icp->al->free(icp->al, buf);
2399 return icp->errc = 1;
2400 }
2401 bp += 8; /* Skip padding */
2402
2403 /* Read all the data from the buffer */
2404 for (i = 0; i < size; i++, bp += 2) {
2405 p->data[i] = read_UInt16Number(bp);
2406 }
2407 icp->al->free(icp->al, buf);
2408 return 0;
2409 }
2410
2411 /* Write the contents of the object. Return 0 on sucess, error code on failure */
2412 static int icmUInt16Array_write(
2413 icmBase *pp,
2414 unsigned int of /* File offset to write from */
2415 ) {
2416 icmUInt16Array *p = (icmUInt16Array *)pp;
2417 icc *icp = p->icp;
2418 unsigned int i;
2419 unsigned int len;
2420 char *bp, *buf; /* Buffer to write from */
2421 int rv = 0;
2422
2423 /* Allocate a file write buffer */
2424 if ((len = p->get_size((icmBase *)p)) == UINT_MAX) {
2425 sprintf(icp->err,"icmUInt16Array_write get_size overflow");
2426 return icp->errc = 1;
2427 }
2428 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
2429 sprintf(icp->err,"icmUInt16Array_write malloc() failed");
2430 return icp->errc = 2;
2431 }
2432 bp = buf;
2433
2434 /* Write type descriptor to the buffer */
2435 if ((rv = write_SInt32Number((int)p->ttype,bp)) != 0) {
2436 sprintf(icp->err,"icmUInt16Array_write: write_SInt32Number() failed");
2437 icp->al->free(icp->al, buf);
2438 return icp->errc = rv;
2439 }
2440 write_SInt32Number(0,bp+4); /* Set padding to 0 */
2441
2442 /* Write all the data to the buffer */
2443 bp += 8; /* Skip padding */
2444 for (i = 0; i < p->size; i++, bp += 2) {
2445 if ((rv = write_UInt16Number(p->data[i],bp)) != 0) {
2446 sprintf(icp->err,"icmUInt16Array_write: write_UInt16umber() failed");
2447 icp->al->free(icp->al, buf);
2448 return icp->errc = rv;
2449 }
2450 }
2451
2452 /* Write to the file */
2453 if ( icp->fp->seek(icp->fp, of) != 0
2454 || icp->fp->write(icp->fp, buf, 1, len) != len) {
2455 sprintf(icp->err,"icmUInt16Array_write fseek() or fwrite() failed");
2456 icp->al->free(icp->al, buf);
2457 return icp->errc = 2;
2458 }
2459 icp->al->free(icp->al, buf);
2460 return 0;
2461 }
2462
2463 /* Dump a text description of the object */
2464 static void icmUInt16Array_dump(
2465 icmBase *pp,
2466 icmFile *op, /* Output to dump to */
2467 int verb /* Verbosity level */
2468 ) {
2469 icmUInt16Array *p = (icmUInt16Array *)pp;
2470 if (verb <= 0)
2471 return;
2472
2473 op->gprintf(op,"UInt16Array:\n");
2474 op->gprintf(op," No. elements = %lu\n",p->size);
2475 if (verb >= 2) {
2476 unsigned int i;
2477 for (i = 0; i < p->size; i++)
2478 op->gprintf(op," %lu: %u\n",i,p->data[i]);
2479 }
2480 }
2481
2482 /* Allocate variable sized data elements */
2483 static int icmUInt16Array_allocate(
2484 icmBase *pp
2485 ) {
2486 icmUInt16Array *p = (icmUInt16Array *)pp;
2487 icc *icp = p->icp;
2488
2489 if (p->size != p->_size) {
2490 if (ovr_mul(p->size, sizeof(unsigned int))) {
2491 sprintf(icp->err,"icmUInt16Array_alloc:: size overflow");
2492 return icp->errc = 1;
2493 }
2494 if (p->data != NULL)
2495 icp->al->free(icp->al, p->data);
2496 if ((p->data = (unsigned int *) icp->al->calloc(icp->al, p->size, sizeof(unsigned int)))
2497 == NULL) {
2498 sprintf(icp->err,"icmUInt16Array_alloc: malloc() of icmUInt16Array data failed");
2499 return icp->errc = 2;
2500 }
2501 p->_size = p->size;
2502 }
2503 return 0;
2504 }
2505
2506 /* Free all storage in the object */
2507 static void icmUInt16Array_delete(
2508 icmBase *pp
2509 ) {
2510 icmUInt16Array *p = (icmUInt16Array *)pp;
2511 icc *icp = p->icp;
2512
2513 if (p->data != NULL)
2514 icp->al->free(icp->al, p->data);
2515 icp->al->free(icp->al, p);
2516 }
2517
2518 /* Create an empty object. Return null on error */
2519 static icmBase *new_icmUInt16Array(
2520 icc *icp
2521 ) {
2522 icmUInt16Array *p;
2523 if ((p = (icmUInt16Array *) icp->al->calloc(icp->al,1,sizeof(icmUInt16Array))) == NULL)
2524 return NULL;
2525 p->ttype = icSigUInt16ArrayType;
2526 p->refcount = 1;
2527 p->get_size = icmUInt16Array_get_size;
2528 p->read = icmUInt16Array_read;
2529 p->write = icmUInt16Array_write;
2530 p->dump = icmUInt16Array_dump;
2531 p->allocate = icmUInt16Array_allocate;
2532 p->del = icmUInt16Array_delete;
2533 p->icp = icp;
2534
2535 return (icmBase *)p;
2536 }
2537
2538 /* ---------------------------------------------------------- */
2539 /* icmUInt32Array object */
2540
2541 /* Return the number of bytes needed to write this tag */
2542 static unsigned int icmUInt32Array_get_size(
2543 icmBase *pp
2544 ) {
2545 icmUInt32Array *p = (icmUInt32Array *)pp;
2546 unsigned int len = 0;
2547 len = sat_add(len, 8); /* 8 bytes for tag and padding */
2548 len = sat_addmul(len, p->size, 4); /* 4 bytes for each UInt32 */
2549 return len;
2550 }
2551
2552 /* read the object, return 0 on success, error code on fail */
2553 static int icmUInt32Array_read(
2554 icmBase *pp,
2555 unsigned int len, /* tag length */
2556 unsigned int of /* start offset within file */
2557 ) {
2558 icmUInt32Array *p = (icmUInt32Array *)pp;
2559 icc *icp = p->icp;
2560 int rv = 0;
2561 unsigned int i, size;
2562 char *bp, *buf;
2563
2564 if (len < 8) {
2565 sprintf(icp->err,"icmUInt32Array_read: Tag too small to be legal");
2566 return icp->errc = 1;
2567 }
2568
2569 /* Allocate a file read buffer */
2570 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
2571 sprintf(icp->err,"icmUInt32Array_read: malloc() failed");
2572 return icp->errc = 2;
2573 }
2574 bp = buf;
2575
2576 /* Read portion of file into buffer */
2577 if ( icp->fp->seek(icp->fp, of) != 0
2578 || icp->fp->read(icp->fp, bp, 1, len) != len) {
2579 sprintf(icp->err,"icmUInt32Array_read: fseek() or fread() failed");
2580 icp->al->free(icp->al, buf);
2581 return icp->errc = 1;
2582 }
2583 p->size = size = (len - 8)/4; /* Number of elements in the array */
2584
2585 if ((rv = p->allocate((icmBase *)p)) != 0) {
2586 icp->al->free(icp->al, buf);
2587 return rv;
2588 }
2589
2590 /* Read type descriptor from the buffer */
2591 if (((icTagTypeSignature)read_SInt32Number(bp)) != p->ttype) {
2592 sprintf(icp->err,"icmUInt32Array_read: Wrong tag type for icmUInt32Array");
2593 icp->al->free(icp->al, buf);
2594 return icp->errc = 1;
2595 }
2596 bp += 8; /* Skip padding */
2597
2598 /* Read all the data from the buffer */
2599 for (i = 0; i < size; i++, bp += 4) {
2600 p->data[i] = read_UInt32Number(bp);
2601 }
2602 icp->al->free(icp->al, buf);
2603 return 0;
2604 }
2605
2606 /* Write the contents of the object. Return 0 on sucess, error code on failure */
2607 static int icmUInt32Array_write(
2608 icmBase *pp,
2609 unsigned int of /* File offset to write from */
2610 ) {
2611 icmUInt32Array *p = (icmUInt32Array *)pp;
2612 icc *icp = p->icp;
2613 unsigned int i;
2614 unsigned int len;
2615 char *bp, *buf; /* Buffer to write from */
2616 int rv = 0;
2617
2618 /* Allocate a file write buffer */
2619 if ((len = p->get_size((icmBase *)p)) == UINT_MAX) {
2620 sprintf(icp->err,"icmUInt32Array_write get_size overflow");
2621 return icp->errc = 1;
2622 }
2623 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
2624 sprintf(icp->err,"icmUInt32Array_write malloc() failed");
2625 return icp->errc = 2;
2626 }
2627 bp = buf;
2628
2629 /* Write type descriptor to the buffer */
2630 if ((rv = write_SInt32Number((int)p->ttype,bp)) != 0) {
2631 sprintf(icp->err,"icmUInt32Array_write: write_SInt32Number() failed");
2632 icp->al->free(icp->al, buf);
2633 return icp->errc = rv;
2634 }
2635 write_SInt32Number(0,bp+4); /* Set padding to 0 */
2636
2637 /* Write all the data to the buffer */
2638 bp += 8; /* Skip padding */
2639 for (i = 0; i < p->size; i++, bp += 4) {
2640 if ((rv = write_UInt32Number(p->data[i],bp)) != 0) {
2641 sprintf(icp->err,"icmUInt32Array_write: write_UInt32umber() failed");
2642 icp->al->free(icp->al, buf);
2643 return icp->errc = rv;
2644 }
2645 }
2646
2647 /* Write to the file */
2648 if ( icp->fp->seek(icp->fp, of) != 0
2649 || icp->fp->write(icp->fp, buf, 1, len) != len) {
2650 sprintf(icp->err,"icmUInt32Array_write fseek() or fwrite() failed");
2651 icp->al->free(icp->al, buf);
2652 return icp->errc = 2;
2653 }
2654 icp->al->free(icp->al, buf);
2655 return 0;
2656 }
2657
2658 /* Dump a text description of the object */
2659 static void icmUInt32Array_dump(
2660 icmBase *pp,
2661 icmFile *op, /* Output to dump to */
2662 int verb /* Verbosity level */
2663 ) {
2664 icmUInt32Array *p = (icmUInt32Array *)pp;
2665 if (verb <= 0)
2666 return;
2667
2668 op->gprintf(op,"UInt32Array:\n");
2669 op->gprintf(op," No. elements = %lu\n",p->size);
2670 if (verb >= 2) {
2671 unsigned int i;
2672 for (i = 0; i < p->size; i++)
2673 op->gprintf(op," %lu: %u\n",i,p->data[i]);
2674 }
2675 }
2676
2677 /* Allocate variable sized data elements */
2678 static int icmUInt32Array_allocate(
2679 icmBase *pp
2680 ) {
2681 icmUInt32Array *p = (icmUInt32Array *)pp;
2682 icc *icp = p->icp;
2683
2684 if (p->size != p->_size) {
2685 if (ovr_mul(p->size, sizeof(unsigned int))) {
2686 sprintf(icp->err,"icmUInt32Array_alloc: size overflow");
2687 return icp->errc = 1;
2688 }
2689 if (p->data != NULL)
2690 icp->al->free(icp->al, p->data);
2691 if ((p->data = (unsigned int *) icp->al->calloc(icp->al, p->size, sizeof(unsigned int)))
2692 == NULL) {
2693 sprintf(icp->err,"icmUInt32Array_alloc: malloc() of icmUInt32Array data failed");
2694 return icp->errc = 2;
2695 }
2696 p->_size = p->size;
2697 }
2698 return 0;
2699 }
2700
2701 /* Free all storage in the object */
2702 static void icmUInt32Array_delete(
2703 icmBase *pp
2704 ) {
2705 icmUInt32Array *p = (icmUInt32Array *)pp;
2706 icc *icp = p->icp;
2707
2708 if (p->data != NULL)
2709 icp->al->free(icp->al, p->data);
2710 icp->al->free(icp->al, p);
2711 }
2712
2713 /* Create an empty object. Return null on error */
2714 static icmBase *new_icmUInt32Array(
2715 icc *icp
2716 ) {
2717 icmUInt32Array *p;
2718 if ((p = (icmUInt32Array *) icp->al->calloc(icp->al,1,sizeof(icmUInt32Array))) == NULL)
2719 return NULL;
2720 p->ttype = icSigUInt32ArrayType;
2721 p->refcount = 1;
2722 p->get_size = icmUInt32Array_get_size;
2723 p->read = icmUInt32Array_read;
2724 p->write = icmUInt32Array_write;
2725 p->dump = icmUInt32Array_dump;
2726 p->allocate = icmUInt32Array_allocate;
2727 p->del = icmUInt32Array_delete;
2728 p->icp = icp;
2729
2730 return (icmBase *)p;
2731 }
2732
2733 /* ---------------------------------------------------------- */
2734 /* icmUInt64Array object */
2735
2736 /* Return the number of bytes needed to write this tag */
2737 static unsigned int icmUInt64Array_get_size(
2738 icmBase *pp
2739 ) {
2740 icmUInt64Array *p = (icmUInt64Array *)pp;
2741 unsigned int len = 0;
2742 len = sat_add(len, 8); /* 8 bytes for tag and padding */
2743 len = sat_addmul(len, p->size, 8); /* 8 bytes for each UInt64 */
2744 return len;
2745 }
2746
2747 /* read the object, return 0 on success, error code on fail */
2748 static int icmUInt64Array_read(
2749 icmBase *pp,
2750 unsigned int len, /* tag length */
2751 unsigned int of /* start offset within file */
2752 ) {
2753 icmUInt64Array *p = (icmUInt64Array *)pp;
2754 icc *icp = p->icp;
2755 int rv = 0;
2756 unsigned int i, size;
2757 char *bp, *buf;
2758
2759 if (len < 8) {
2760 sprintf(icp->err,"icmUInt64Array_read: Tag too small to be legal");
2761 return icp->errc = 1;
2762 }
2763
2764 /* Allocate a file read buffer */
2765 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
2766 sprintf(icp->err,"icmUInt64Array_read: malloc() failed");
2767 return icp->errc = 2;
2768 }
2769 bp = buf;
2770
2771 /* Read portion of file into buffer */
2772 if ( icp->fp->seek(icp->fp, of) != 0
2773 || icp->fp->read(icp->fp, bp, 1, len) != len) {
2774 sprintf(icp->err,"icmUInt64Array_read: fseek() or fread() failed");
2775 icp->al->free(icp->al, buf);
2776 return icp->errc = 1;
2777 }
2778 p->size = size = (len - 8)/8; /* Number of elements in the array */
2779
2780 if ((rv = p->allocate((icmBase *)p)) != 0) {
2781 icp->al->free(icp->al, buf);
2782 return rv;
2783 }
2784
2785 /* Read type descriptor from the buffer */
2786 if (((icTagTypeSignature)read_SInt32Number(bp)) != p->ttype) {
2787 sprintf(icp->err,"icmUInt64Array_read: Wrong tag type for icmUInt64Array");
2788 icp->al->free(icp->al, buf);
2789 return icp->errc = 1;
2790 }
2791 bp += 8; /* Skip padding */
2792
2793 /* Read all the data from the buffer */
2794 for (i = 0; i < size; i++, bp += 8) {
2795 read_UInt64Number(&p->data[i], bp);
2796 }
2797 icp->al->free(icp->al, buf);
2798 return 0;
2799 }
2800
2801 /* Write the contents of the object. Return 0 on sucess, error code on failure */
2802 static int icmUInt64Array_write(
2803 icmBase *pp,
2804 unsigned int of /* File offset to write from */
2805 ) {
2806 icmUInt64Array *p = (icmUInt64Array *)pp;
2807 icc *icp = p->icp;
2808 unsigned int i;
2809 unsigned int len;
2810 char *bp, *buf; /* Buffer to write from */
2811 int rv = 0;
2812
2813 /* Allocate a file write buffer */
2814 if ((len = p->get_size((icmBase *)p)) == UINT_MAX) {
2815 sprintf(icp->err,"icmUInt64Array_write get_size overflow");
2816 return icp->errc = 1;
2817 }
2818 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
2819 sprintf(icp->err,"icmUInt64Array_write malloc() failed");
2820 return icp->errc = 2;
2821 }
2822 bp = buf;
2823
2824 /* Write type descriptor to the buffer */
2825 if ((rv = write_SInt32Number((int)p->ttype,bp)) != 0) {
2826 sprintf(icp->err,"icmUInt64Array_write: write_SInt32Number() failed");
2827 icp->al->free(icp->al, buf);
2828 return icp->errc = rv;
2829 }
2830 write_SInt32Number(0,bp+4); /* Set padding to 0 */
2831
2832 /* Write all the data to the buffer */
2833 bp += 8; /* Skip padding */
2834 for (i = 0; i < p->size; i++, bp += 8) {
2835 if ((rv = write_UInt64Number(&p->data[i],bp)) != 0) {
2836 sprintf(icp->err,"icmUInt64Array_write: write_UInt64umber() failed");
2837 icp->al->free(icp->al, buf);
2838 return icp->errc = rv;
2839 }
2840 }
2841
2842 /* Write to the file */
2843 if ( icp->fp->seek(icp->fp, of) != 0
2844 || icp->fp->write(icp->fp, buf, 1, len) != len) {
2845 sprintf(icp->err,"icmUInt64Array_write fseek() or fwrite() failed");
2846 icp->al->free(icp->al, buf);
2847 return icp->errc = 2;
2848 }
2849 icp->al->free(icp->al, buf);
2850 return 0;
2851 }
2852
2853 /* Dump a text description of the object */
2854 static void icmUInt64Array_dump(
2855 icmBase *pp,
2856 icmFile *op, /* Output to dump to */
2857 int verb /* Verbosity level */
2858 ) {
2859 icmUInt64Array *p = (icmUInt64Array *)pp;
2860 if (verb <= 0)
2861 return;
2862
2863 op->gprintf(op,"UInt64Array:\n");
2864 op->gprintf(op," No. elements = %lu\n",p->size);
2865 if (verb >= 2) {
2866 unsigned int i;
2867 for (i = 0; i < p->size; i++)
2868 op->gprintf(op," %lu: h=%lu, l=%lu\n",i,p->data[i].h,p->data[i].l);
2869 }
2870 }
2871
2872 /* Allocate variable sized data elements */
2873 static int icmUInt64Array_allocate(
2874 icmBase *pp
2875 ) {
2876 icmUInt64Array *p = (icmUInt64Array *)pp;
2877 icc *icp = p->icp;
2878
2879 if (p->size != p->_size) {
2880 if (ovr_mul(p->size, sizeof(icmUint64))) {
2881 sprintf(icp->err,"icmUInt64Array_alloc: size overflow");
2882 return icp->errc = 1;
2883 }
2884 if (p->data != NULL)
2885 icp->al->free(icp->al, p->data);
2886 if ((p->data = (icmUint64 *) icp->al->calloc(icp->al, p->size, sizeof(icmUint64)))
2887 == NULL) {
2888 sprintf(icp->err,"icmUInt64Array_alloc: malloc() of icmUInt64Array data failed");
2889 return icp->errc = 2;
2890 }
2891 p->_size = p->size;
2892 }
2893 return 0;
2894 }
2895
2896 /* Free all storage in the object */
2897 static void icmUInt64Array_delete(
2898 icmBase *pp
2899 ) {
2900 icmUInt64Array *p = (icmUInt64Array *)pp;
2901 icc *icp = p->icp;
2902
2903 if (p->data != NULL)
2904 icp->al->free(icp->al, p->data);
2905 icp->al->free(icp->al, p);
2906 }
2907
2908 /* Create an empty object. Return null on error */
2909 static icmBase *new_icmUInt64Array(
2910 icc *icp
2911 ) {
2912 icmUInt64Array *p;
2913 if ((p = (icmUInt64Array *) icp->al->calloc(icp->al,1,sizeof(icmUInt64Array))) == NULL)
2914 return NULL;
2915 p->ttype = icSigUInt64ArrayType;
2916 p->refcount = 1;
2917 p->get_size = icmUInt64Array_get_size;
2918 p->read = icmUInt64Array_read;
2919 p->write = icmUInt64Array_write;
2920 p->dump = icmUInt64Array_dump;
2921 p->allocate = icmUInt64Array_allocate;
2922 p->del = icmUInt64Array_delete;
2923 p->icp = icp;
2924
2925 return (icmBase *)p;
2926 }
2927
2928 /* ---------------------------------------------------------- */
2929 /* icmU16Fixed16Array object */
2930
2931 /* Return the number of bytes needed to write this tag */
2932 static unsigned int icmU16Fixed16Array_get_size(
2933 icmBase *pp
2934 ) {
2935 icmU16Fixed16Array *p = (icmU16Fixed16Array *)pp;
2936 unsigned int len = 0;
2937 len = sat_add(len, 8); /* 8 bytes for tag and padding */
2938 len = sat_addmul(len, p->size, 4); /* 4 byte for each U16Fixed16 */
2939 return len;
2940 }
2941
2942 /* read the object, return 0 on success, error code on fail */
2943 static int icmU16Fixed16Array_read(
2944 icmBase *pp,
2945 unsigned int len, /* tag length */
2946 unsigned int of /* start offset within file */
2947 ) {
2948 icmU16Fixed16Array *p = (icmU16Fixed16Array *)pp;
2949 icc *icp = p->icp;
2950 int rv = 0;
2951 unsigned int i, size;
2952 char *bp, *buf;
2953
2954 if (len < 8) {
2955 sprintf(icp->err,"icmU16Fixed16Array_read: Tag too small to be legal");
2956 return icp->errc = 1;
2957 }
2958
2959 /* Allocate a file read buffer */
2960 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
2961 sprintf(icp->err,"icmU16Fixed16Array_read: malloc() failed");
2962 return icp->errc = 2;
2963 }
2964 bp = buf;
2965
2966 /* Read portion of file into buffer */
2967 if ( icp->fp->seek(icp->fp, of) != 0
2968 || icp->fp->read(icp->fp, bp, 1, len) != len) {
2969 sprintf(icp->err,"icmU16Fixed16Array_read: fseek() or fread() failed");
2970 icp->al->free(icp->al, buf);
2971 return icp->errc = 1;
2972 }
2973 p->size = size = (len - 8)/4; /* Number of elements in the array */
2974
2975 if ((rv = p->allocate((icmBase *)p)) != 0) {
2976 icp->al->free(icp->al, buf);
2977 return rv;
2978 }
2979
2980 /* Read type descriptor from the buffer */
2981 if (((icTagTypeSignature)read_SInt32Number(bp)) != p->ttype) {
2982 sprintf(icp->err,"icmU16Fixed16Array_read: Wrong tag type for icmU16Fixed16Array");
2983 icp->al->free(icp->al, buf);
2984 return icp->errc = 1;
2985 }
2986 bp += 8; /* Skip padding */
2987
2988 /* Read all the data from the buffer */
2989 for (i = 0; i < size; i++, bp += 4) {
2990 p->data[i] = read_U16Fixed16Number(bp);
2991 }
2992 icp->al->free(icp->al, buf);
2993 return 0;
2994 }
2995
2996 /* Write the contents of the object. Return 0 on sucess, error code on failure */
2997 static int icmU16Fixed16Array_write(
2998 icmBase *pp,
2999 unsigned int of /* File offset to write from */
3000 ) {
3001 icmU16Fixed16Array *p = (icmU16Fixed16Array *)pp;
3002 icc *icp = p->icp;
3003 unsigned int i;
3004 unsigned int len;
3005 char *bp, *buf; /* Buffer to write from */
3006 int rv = 0;
3007
3008 /* Allocate a file write buffer */
3009 if ((len = p->get_size((icmBase *)p)) == UINT_MAX) {
3010 sprintf(icp->err,"icmU16Fixed16Array_write get_size overflow");
3011 return icp->errc = 1;
3012 }
3013 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
3014 sprintf(icp->err,"icmU16Fixed16Array_write malloc() failed");
3015 return icp->errc = 2;
3016 }
3017 bp = buf;
3018
3019 /* Write type descriptor to the buffer */
3020 if ((rv = write_SInt32Number((int)p->ttype,bp)) != 0) {
3021 sprintf(icp->err,"icmU16Fixed16Array_write: write_SInt32Number() failed");
3022 icp->al->free(icp->al, buf);
3023 return icp->errc = rv;
3024 }
3025 write_SInt32Number(0,bp+4); /* Set padding to 0 */
3026
3027 /* Write all the data to the buffer */
3028 bp += 8; /* Skip padding */
3029 for (i = 0; i < p->size; i++, bp += 4) {
3030 if ((rv = write_U16Fixed16Number(p->data[i],bp)) != 0) {
3031 sprintf(icp->err,"icmU16Fixed16Array_write: write_U16Fixed16umber() failed");
3032 icp->al->free(icp->al, buf);
3033 return icp->errc = rv;
3034 }
3035 }
3036
3037 /* Write to the file */
3038 if ( icp->fp->seek(icp->fp, of) != 0
3039 || icp->fp->write(icp->fp, buf, 1, len) != len) {
3040 sprintf(icp->err,"icmU16Fixed16Array_write fseek() or fwrite() failed");
3041 icp->al->free(icp->al, buf);
3042 return icp->errc = 2;
3043 }
3044 icp->al->free(icp->al, buf);
3045 return 0;
3046 }
3047
3048 /* Dump a text description of the object */
3049 static void icmU16Fixed16Array_dump(
3050 icmBase *pp,
3051 icmFile *op, /* Output to dump to */
3052 int verb /* Verbosity level */
3053 ) {
3054 icmU16Fixed16Array *p = (icmU16Fixed16Array *)pp;
3055 if (verb <= 0)
3056 return;
3057
3058 op->gprintf(op,"U16Fixed16Array:\n");
3059 op->gprintf(op," No. elements = %lu\n",p->size);
3060 if (verb >= 2) {
3061 unsigned int i;
3062 for (i = 0; i < p->size; i++)
3063 op->gprintf(op," %lu: %f\n",i,p->data[i]);
3064 }
3065 }
3066
3067 /* Allocate variable sized data elements */
3068 static int icmU16Fixed16Array_allocate(
3069 icmBase *pp
3070 ) {
3071 icmU16Fixed16Array *p = (icmU16Fixed16Array *)pp;
3072 icc *icp = p->icp;
3073
3074 if (p->size != p->_size) {
3075 if (ovr_mul(p->size, sizeof(double))) {
3076 sprintf(icp->err,"icmU16Fixed16Array_alloc: size overflow");
3077 return icp->errc = 1;
3078 }
3079 if (p->data != NULL)
3080 icp->al->free(icp->al, p->data);
3081 if ((p->data = (double *) icp->al->calloc(icp->al, p->size, sizeof(double))) == NULL) {
3082 sprintf(icp->err,"icmU16Fixed16Array_alloc: malloc() of icmU16Fixed16Array data failed");
3083 return icp->errc = 2;
3084 }
3085 p->_size = p->size;
3086 }
3087 return 0;
3088 }
3089
3090 /* Free all storage in the object */
3091 static void icmU16Fixed16Array_delete(
3092 icmBase *pp
3093 ) {
3094 icmU16Fixed16Array *p = (icmU16Fixed16Array *)pp;
3095 icc *icp = p->icp;
3096
3097 if (p->data != NULL)
3098 icp->al->free(icp->al, p->data);
3099 icp->al->free(icp->al, p);
3100 }
3101
3102 /* Create an empty object. Return null on error */
3103 static icmBase *new_icmU16Fixed16Array(
3104 icc *icp
3105 ) {
3106 icmU16Fixed16Array *p;
3107 if ((p = (icmU16Fixed16Array *) icp->al->calloc(icp->al,1,sizeof(icmU16Fixed16Array))) == NULL)
3108 return NULL;
3109 p->ttype = icSigU16Fixed16ArrayType;
3110 p->refcount = 1;
3111 p->get_size = icmU16Fixed16Array_get_size;
3112 p->read = icmU16Fixed16Array_read;
3113 p->write = icmU16Fixed16Array_write;
3114 p->dump = icmU16Fixed16Array_dump;
3115 p->allocate = icmU16Fixed16Array_allocate;
3116 p->del = icmU16Fixed16Array_delete;
3117 p->icp = icp;
3118
3119 return (icmBase *)p;
3120 }
3121
3122 /* ---------------------------------------------------------- */
3123 /* icmS15Fixed16Array object */
3124
3125 /* Return the number of bytes needed to write this tag */
3126 static unsigned int icmS15Fixed16Array_get_size(
3127 icmBase *pp
3128 ) {
3129 icmS15Fixed16Array *p = (icmS15Fixed16Array *)pp;
3130 unsigned int len = 0;
3131 len = sat_add(len, 8); /* 8 bytes for tag and padding */
3132 len = sat_addmul(len, p->size, 4); /* 4 byte for each S15Fixed16 */
3133 return len;
3134 }
3135
3136 /* read the object, return 0 on success, error code on fail */
3137 static int icmS15Fixed16Array_read(
3138 icmBase *pp,
3139 unsigned int len, /* tag length */
3140 unsigned int of /* start offset within file */
3141 ) {
3142 icmS15Fixed16Array *p = (icmS15Fixed16Array *)pp;
3143 icc *icp = p->icp;
3144 int rv = 0;
3145 unsigned int i, size;
3146 char *bp, *buf;
3147
3148 if (len < 8) {
3149 sprintf(icp->err,"icmS15Fixed16Array_read: Tag too small to be legal");
3150 return icp->errc = 1;
3151 }
3152
3153 /* Allocate a file read buffer */
3154 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
3155 sprintf(icp->err,"icmS15Fixed16Array_read: malloc() failed");
3156 return icp->errc = 2;
3157 }
3158 bp = buf;
3159
3160 /* Read portion of file into buffer */
3161 if ( icp->fp->seek(icp->fp, of) != 0
3162 || icp->fp->read(icp->fp, bp, 1, len) != len) {
3163 sprintf(icp->err,"icmS15Fixed16Array_read: fseek() or fread() failed");
3164 icp->al->free(icp->al, buf);
3165 return icp->errc = 1;
3166 }
3167 p->size = size = (len - 8)/4; /* Number of elements in the array */
3168
3169 if ((rv = p->allocate((icmBase *)p)) != 0) {
3170 icp->al->free(icp->al, buf);
3171 return rv;
3172 }
3173
3174 /* Read type descriptor from the buffer */
3175 if (((icTagTypeSignature)read_SInt32Number(bp)) != p->ttype) {
3176 sprintf(icp->err,"icmS15Fixed16Array_read: Wrong tag type for icmS15Fixed16Array");
3177 icp->al->free(icp->al, buf);
3178 return icp->errc = 1;
3179 }
3180 bp += 8; /* Skip padding */
3181
3182 /* Read all the data from the buffer */
3183 for (i = 0; i < size; i++, bp += 4) {
3184 p->data[i] = read_S15Fixed16Number(bp);
3185 }
3186 icp->al->free(icp->al, buf);
3187 return 0;
3188 }
3189
3190 /* Write the contents of the object. Return 0 on sucess, error code on failure */
3191 static int icmS15Fixed16Array_write(
3192 icmBase *pp,
3193 unsigned int of /* File offset to write from */
3194 ) {
3195 icmS15Fixed16Array *p = (icmS15Fixed16Array *)pp;
3196 icc *icp = p->icp;
3197 unsigned int i;
3198 unsigned int len;
3199 char *bp, *buf; /* Buffer to write from */
3200 int rv = 0;
3201
3202 /* Allocate a file write buffer */
3203 if ((len = p->get_size((icmBase *)p)) == UINT_MAX) {
3204 sprintf(icp->err,"icmS15Fixed16Array_write get_size overflow");
3205 return icp->errc = 1;
3206 }
3207 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
3208 sprintf(icp->err,"icmS15Fixed16Array_write malloc() failed");
3209 return icp->errc = 2;
3210 }
3211 bp = buf;
3212
3213 /* Write type descriptor to the buffer */
3214 if ((rv = write_SInt32Number((int)p->ttype,bp)) != 0) {
3215 sprintf(icp->err,"icmS15Fixed16Array_write: write_SInt32Number() failed");
3216 icp->al->free(icp->al, buf);
3217 return icp->errc = rv;
3218 }
3219 write_SInt32Number(0,bp+4); /* Set padding to 0 */
3220
3221 /* Write all the data to the buffer */
3222 bp += 8; /* Skip padding */
3223 for (i = 0; i < p->size; i++, bp += 4) {
3224 if ((rv = write_S15Fixed16Number(p->data[i],bp)) != 0) {
3225 sprintf(icp->err,"icmS15Fixed16Array_write: write_S15Fixed16umber() failed");
3226 icp->al->free(icp->al, buf);
3227 return icp->errc = rv;
3228 }
3229 }
3230
3231 /* Write to the file */
3232 if ( icp->fp->seek(icp->fp, of) != 0
3233 || icp->fp->write(icp->fp, buf, 1, len) != len) {
3234 sprintf(icp->err,"icmS15Fixed16Array_write fseek() or fwrite() failed");
3235 icp->al->free(icp->al, buf);
3236 return icp->errc = 2;
3237 }
3238 icp->al->free(icp->al, buf);
3239 return 0;
3240 }
3241
3242 /* Dump a text description of the object */
3243 static void icmS15Fixed16Array_dump(
3244 icmBase *pp,
3245 icmFile *op, /* Output to dump to */
3246 int verb /* Verbosity level */
3247 ) {
3248 icmS15Fixed16Array *p = (icmS15Fixed16Array *)pp;
3249 if (verb <= 0)
3250 return;
3251
3252 op->gprintf(op,"S15Fixed16Array:\n");
3253 op->gprintf(op," No. elements = %lu\n",p->size);
3254 if (verb >= 2) {
3255 unsigned int i;
3256 for (i = 0; i < p->size; i++)
3257 op->gprintf(op," %lu: %f\n",i,p->data[i]);
3258 }
3259 }
3260
3261 /* Allocate variable sized data elements */
3262 static int icmS15Fixed16Array_allocate(
3263 icmBase *pp
3264 ) {
3265 icmS15Fixed16Array *p = (icmS15Fixed16Array *)pp;
3266 icc *icp = p->icp;
3267
3268 if (p->size != p->_size) {
3269 if (ovr_mul(p->size, sizeof(double))) {
3270 sprintf(icp->err,"icmS15Fixed16Array_alloc: size overflow");
3271 return icp->errc = 1;
3272 }
3273 if (p->data != NULL)
3274 icp->al->free(icp->al, p->data);
3275 if ((p->data = (double *) icp->al->calloc(icp->al, p->size, sizeof(double))) == NULL) {
3276 sprintf(icp->err,"icmS15Fixed16Array_alloc: malloc() of icmS15Fixed16Array data failed");
3277 return icp->errc = 2;
3278 }
3279 p->_size = p->size;
3280 }
3281 return 0;
3282 }
3283
3284 /* Free all storage in the object */
3285 static void icmS15Fixed16Array_delete(
3286 icmBase *pp
3287 ) {
3288 icmS15Fixed16Array *p = (icmS15Fixed16Array *)pp;
3289 icc *icp = p->icp;
3290
3291 if (p->data != NULL)
3292 icp->al->free(icp->al, p->data);
3293 icp->al->free(icp->al, p);
3294 }
3295
3296 /* Create an empty object. Return null on error */
3297 static icmBase *new_icmS15Fixed16Array(
3298 icc *icp
3299 ) {
3300 icmS15Fixed16Array *p;
3301 if ((p = (icmS15Fixed16Array *) icp->al->calloc(icp->al,1,sizeof(icmS15Fixed16Array))) == NULL)
3302 return NULL;
3303 p->ttype = icSigS15Fixed16ArrayType;
3304 p->refcount = 1;
3305 p->get_size = icmS15Fixed16Array_get_size;
3306 p->read = icmS15Fixed16Array_read;
3307 p->write = icmS15Fixed16Array_write;
3308 p->dump = icmS15Fixed16Array_dump;
3309 p->allocate = icmS15Fixed16Array_allocate;
3310 p->del = icmS15Fixed16Array_delete;
3311 p->icp = icp;
3312
3313 return (icmBase *)p;
3314 }
3315
3316 /* ---------------------------------------------------------- */
3317
3318 /* Data conversion support functions */
3319 static int write_XYZNumber(icmXYZNumber *p, char *d) {
3320 int rv;
3321 if ((rv = write_S15Fixed16Number(p->X, d + 0)) != 0)
3322 return rv;
3323 if ((rv = write_S15Fixed16Number(p->Y, d + 4)) != 0)
3324 return rv;
3325 if ((rv = write_S15Fixed16Number(p->Z, d + 8)) != 0)
3326 return rv;
3327 return 0;
3328 }
3329
3330 static int read_XYZNumber(icmXYZNumber *p, char *d) {
3331 p->X = read_S15Fixed16Number(d + 0);
3332 p->Y = read_S15Fixed16Number(d + 4);
3333 p->Z = read_S15Fixed16Number(d + 8);
3334 return 0;
3335 }
3336
3337
3338 /* Helper: Return a string that shows the XYZ number value */
3339 static char *string_XYZNumber(icmXYZNumber *p) {
3340 static char buf[40];
3341
3342 sprintf(buf,"%f, %f, %f", p->X, p->Y, p->Z);
3343 return buf;
3344 }
3345
3346 /* Helper: Return a string that shows the XYZ number value, */
3347 /* and the Lab D50 number in paren. Note the buffer will be re-used on every call. */
3348 static char *string_XYZNumber_and_Lab(icmXYZNumber *p) {
3349 static char buf[100];
3350 double lab[3];
3351 lab[0] = p->X;
3352 lab[1] = p->Y;
3353 lab[2] = p->Z;
3354 icmXYZ2Lab(&icmD50, lab, lab);
3355 snprintf(buf,sizeof(buf),"%f, %f, %f [Lab %f, %f, %f]", p->X, p->Y, p->Z, lab[0], lab[1], lab[2]);
3356 return buf;
3357 }
3358
3359 /* icmXYZArray object */
3360
3361 /* Return the number of bytes needed to write this tag */
3362 static unsigned int icmXYZArray_get_size(
3363 icmBase *pp
3364 ) {
3365 icmXYZArray *p = (icmXYZArray *)pp;
3366 unsigned int len = 0;
3367 len = sat_add(len, 8); /* 8 bytes for tag and padding */
3368 len = sat_addmul(len, p->size, 12); /* 12 bytes for each XYZ */
3369 return len;
3370 }
3371
3372 /* read the object, return 0 on success, error code on fail */
3373 static int icmXYZArray_read(
3374 icmBase *pp,
3375 unsigned int len, /* tag length */
3376 unsigned int of /* start offset within file */
3377 ) {
3378 icmXYZArray *p = (icmXYZArray *)pp;
3379 icc *icp = p->icp;
3380 int rv = 0;
3381 unsigned int i, size;
3382 char *bp, *buf;
3383
3384 if (len < 8) {
3385 sprintf(icp->err,"icmXYZArray_read: Tag too small to be legal");
3386 return icp->errc = 1;
3387 }
3388
3389 /* Allocate a file read buffer */
3390 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
3391 sprintf(icp->err,"icmXYZArray_read: malloc() failed");
3392 return icp->errc = 2;
3393 }
3394 bp = buf;
3395
3396 /* Read portion of file into buffer */
3397 if ( icp->fp->seek(icp->fp, of) != 0
3398 || icp->fp->read(icp->fp, bp, 1, len) != len) {
3399 sprintf(icp->err,"icmXYZArray_read: fseek() or fread() failed");
3400 icp->al->free(icp->al, buf);
3401 return icp->errc = 1;
3402 }
3403 p->size = size = (len - 8)/12; /* Number of elements in the array */
3404
3405 if ((rv = p->allocate((icmBase *)p)) != 0) {
3406 icp->al->free(icp->al, buf);
3407 return rv;
3408 }
3409
3410 /* Read type descriptor from the buffer */
3411 if (((icTagTypeSignature)read_SInt32Number(bp)) != p->ttype) {
3412 sprintf(icp->err,"icmXYZArray_read: Wrong tag type for icmXYZArray");
3413 icp->al->free(icp->al, buf);
3414 return icp->errc = 1;
3415 }
3416 bp += 8; /* Skip padding */
3417
3418 /* Read all the data from the buffer */
3419 for (i = 0; i < size; i++, bp += 12) {
3420 read_XYZNumber(&p->data[i], bp);
3421 }
3422 icp->al->free(icp->al, buf);
3423 return 0;
3424 }
3425
3426 /* Write the contents of the object. Return 0 on sucess, error code on failure */
3427 static int icmXYZArray_write(
3428 icmBase *pp,
3429 unsigned int of /* File offset to write from */
3430 ) {
3431 icmXYZArray *p = (icmXYZArray *)pp;
3432 icc *icp = p->icp;
3433 unsigned int i;
3434 unsigned int len;
3435 char *bp, *buf; /* Buffer to write from */
3436 int rv = 0;
3437
3438 /* Allocate a file write buffer */
3439 if ((len = p->get_size((icmBase *)p)) == UINT_MAX) {
3440 sprintf(icp->err,"icmXYZArray_write get_size overflow");
3441 return icp->errc = 1;
3442 }
3443 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
3444 sprintf(icp->err,"icmXYZArray_write malloc() failed");
3445 return icp->errc = 2;
3446 }
3447 bp = buf;
3448
3449 /* Write type descriptor to the buffer */
3450 if ((rv = write_SInt32Number((int)p->ttype,bp)) != 0) {
3451 sprintf(icp->err,"icmXYZArray_write: write_SInt32Number() failed");
3452 icp->al->free(icp->al, buf);
3453 return icp->errc = rv;
3454 }
3455 write_SInt32Number(0,bp+4); /* Set padding to 0 */
3456
3457 /* Write all the data to the buffer */
3458 bp += 8; /* Skip padding */
3459 for (i = 0; i < p->size; i++, bp += 12) {
3460 if ((rv = write_XYZNumber(&p->data[i],bp)) != 0) {
3461 sprintf(icp->err,"icmXYZArray_write: write_XYZumber() failed");
3462 icp->al->free(icp->al, buf);
3463 return icp->errc = rv;
3464 }
3465 }
3466
3467 /* Write to the file */
3468 if ( icp->fp->seek(icp->fp, of) != 0
3469 || icp->fp->write(icp->fp, buf, 1, len) != len) {
3470 sprintf(icp->err,"icmXYZArray_write fseek() or fwrite() failed");
3471 icp->al->free(icp->al, buf);
3472 return icp->errc = 2;
3473 }
3474 icp->al->free(icp->al, buf);
3475 return 0;
3476 }
3477
3478 /* Dump a text description of the object */
3479 static void icmXYZArray_dump(
3480 icmBase *pp,
3481 icmFile *op, /* Output to dump to */
3482 int verb /* Verbosity level */
3483 ) {
3484 icmXYZArray *p = (icmXYZArray *)pp;
3485 if (verb <= 0)
3486 return;
3487
3488 op->gprintf(op,"XYZArray:\n");
3489 op->gprintf(op," No. elements = %lu\n",p->size);
3490 if (verb >= 2) {
3491 unsigned int i;
3492 for (i = 0; i < p->size; i++) {
3493 op->gprintf(op," %lu: %s\n",i,string_XYZNumber_and_Lab(&p->data[i]));
3494
3495 }
3496 }
3497 }
3498
3499 /* Allocate variable sized data elements */
3500 static int icmXYZArray_allocate(
3501 icmBase *pp
3502 ) {
3503 icmXYZArray *p = (icmXYZArray *)pp;
3504 icc *icp = p->icp;
3505
3506 if (p->size != p->_size) {
3507 if (ovr_mul(p->size, sizeof(icmXYZNumber))) {
3508 sprintf(icp->err,"icmXYZArray_alloc: size overflow");
3509 return icp->errc = 1;
3510 }
3511 if (p->data != NULL)
3512 icp->al->free(icp->al, p->data);
3513 if ((p->data = (icmXYZNumber *) icp->al->malloc(icp->al, sat_mul(p->size, sizeof(icmXYZNumber)))) == NULL) {
3514 sprintf(icp->err,"icmXYZArray_alloc: malloc() of icmXYZArray data failed");
3515 return icp->errc = 2;
3516 }
3517 p->_size = p->size;
3518 }
3519 return 0;
3520 }
3521
3522 /* Free all storage in the object */
3523 static void icmXYZArray_delete(
3524 icmBase *pp
3525 ) {
3526 icmXYZArray *p = (icmXYZArray *)pp;
3527 icc *icp = p->icp;
3528
3529 if (p->data != NULL)
3530 icp->al->free(icp->al, p->data);
3531 icp->al->free(icp->al, p);
3532 }
3533
3534 /* Create an empty object. Return null on error */
3535 static icmBase *new_icmXYZArray(
3536 icc *icp
3537 ) {
3538 icmXYZArray *p;
3539 if ((p = (icmXYZArray *) icp->al->calloc(icp->al,1,sizeof(icmXYZArray))) == NULL)
3540 return NULL;
3541 p->ttype = icSigXYZArrayType;
3542 p->refcount = 1;
3543 p->get_size = icmXYZArray_get_size;
3544 p->read = icmXYZArray_read;
3545 p->write = icmXYZArray_write;
3546 p->dump = icmXYZArray_dump;
3547 p->allocate = icmXYZArray_allocate;
3548 p->del = icmXYZArray_delete;
3549 p->icp = icp;
3550
3551 return (icmBase *)p;
3552 }
3553
3554 /* ---------------------------------------------------------- */
3555 /* icmCurve object */
3556
3557 /* Do a forward lookup through the curve */
3558 /* Return 0 on success, 1 if clipping occured, 2 on other error */
3559 static int icmCurve_lookup_fwd(
3560 icmCurve *p,
3561 double *out,
3562 double *in
3563 ) {
3564 int rv = 0;
3565 if (p->flag == icmCurveLin) {
3566 *out = *in;
3567 } else if (p->flag == icmCurveGamma) {
3568 double val = *in;
3569 if (val <= 0.0)
3570 *out = 0.0;
3571 else
3572 *out = pow(val, p->data[0]);
3573 } else if (p->size == 0) { /* Table of 0 size */
3574 *out = *in;
3575 } else { /* Use linear interpolation */
3576 unsigned int ix;
3577 double val, w;
3578 double inputEnt_1 = (double)(p->size-1);
3579
3580 val = *in * inputEnt_1;
3581 if (val < 0.0) {
3582 val = 0.0;
3583 rv |= 1;
3584 } else if (val > inputEnt_1) {
3585 val = inputEnt_1;
3586 rv |= 1;
3587 }
3588 ix = (unsigned int)floor(val); /* Coordinate */
3589 if (ix > (p->size-2))
3590 ix = (p->size-2);
3591 w = val - (double)ix; /* weight */
3592 val = p->data[ix];
3593 *out = val + w * (p->data[ix+1] - val);
3594 }
3595 return rv;
3596 }
3597
3598 /* - - - - - - - - - - - - */
3599 /* Support for reverse interpolation of 1D lookup tables */
3600
3601 /* Create a reverse curve lookup acceleration table */
3602 /* return non-zero on error, 2 = malloc error. */
3603 static int icmTable_setup_bwd(
3604 icc *icp, /* Base icc object */
3605 icmRevTable *rt, /* Reverse table data to setup */
3606 unsigned int size, /* Size of fwd table */
3607 double *data /* Table */
3608 ) {
3609 unsigned int i;
3610
3611 rt->size = size; /* Stash pointers to these away */
3612 rt->data = data;
3613
3614 /* Find range of output values */
3615 rt->rmin = 1e300;
3616 rt->rmax = -1e300;
3617 for (i = 0; i < rt->size; i++) {
3618 if (rt->data[i] > rt->rmax)
3619 rt->rmax = rt->data[i];
3620 if (rt->data[i] < rt->rmin)
3621 rt->rmin = rt->data[i];
3622 }
3623
3624 /* Decide on reverse granularity */
3625 rt->rsize = sat_add(rt->size,2)/2;
3626 rt->qscale = (double)rt->rsize/(rt->rmax - rt->rmin); /* Scale factor to quantize to */
3627
3628 if (ovr_mul(rt->size, sizeof(unsigned int *))) {
3629 return 2;
3630 }
3631 /* Initialize the reverse lookup structures, and get overall min/max */
3632 if ((rt->rlists = (unsigned int **) icp->al->calloc(icp->al, rt->rsize, sizeof(unsigned int *))) == NULL) {
3633 return 2;
3634 }
3635
3636 /* Assign each output value range bucket lists it intersects */
3637 for (i = 0; i < (rt->size-1); i++) {
3638 unsigned int s, e, j; /* Start and end indexes (inclusive) */
3639 s = (unsigned int)((rt->data[i] - rt->rmin) * rt->qscale);
3640 e = (unsigned int)((rt->data[i+1] - rt->rmin) * rt->qscale);
3641 if (s >= rt->rsize)
3642 s = rt->rsize-1;
3643 if (e >= rt->rsize)
3644 e = rt->rsize-1;
3645 if (s > e) { /* swap */
3646 unsigned int t;
3647 t = s; s = e; e = t;
3648 }
3649
3650 /* For all buckets that may contain this output range, add index of this output */
3651 for (j = s; j <= e; j++) {
3652 unsigned int as; /* Allocation size */
3653 unsigned int nf; /* Next free slot */
3654 if (rt->rlists[j] == NULL) { /* No allocation */
3655 as = 5; /* Start with space for 5 */
3656 if ((rt->rlists[j] = (unsigned int *) icp->al->calloc(icp->al, as, sizeof(unsigned int))) == NULL) {
3657 return 2;
3658 }
3659 rt->rlists[j][0] = as;
3660 nf = rt->rlists[j][1] = 2;
3661 } else {
3662 as = rt->rlists[j][0]; /* Allocate space for this list */
3663 nf = rt->rlists[j][1]; /* Next free location in list */
3664 if (nf >= as) { /* need to expand space */
3665 if ((as = sat_mul(as, 2)) == UINT_MAX
3666 || ovr_mul(as, sizeof(unsigned int))) {
3667 return 2;
3668 }
3669 rt->rlists[j] = (unsigned int *) icp->al->realloc(icp->al,rt->rlists[j], as * sizeof(unsigned int));
3670 if (rt->rlists[j] == NULL) {
3671 return 2;
3672 }
3673 rt->rlists[j][0] = as;
3674 }
3675 }
3676 rt->rlists[j][nf++] = i;
3677 rt->rlists[j][1] = nf;
3678 }
3679 }
3680 rt->inited = 1;
3681 return 0;
3682 }
3683
3684 /* Free up any data */
3685 static void icmTable_delete_bwd(
3686 icc *icp, /* Base icc */
3687 icmRevTable *rt /* Reverse table data to setup */
3688 ) {
3689 if (rt->inited != 0) {
3690 while (rt->rsize > 0)
3691 icp->al->free(icp->al, rt->rlists[--rt->rsize]);
3692 icp->al->free(icp->al, rt->rlists);
3693 rt->size = 0; /* Don't keep these */
3694 rt->data = NULL;
3695 }
3696 }
3697
3698 /* Do a reverse lookup through the curve */
3699 /* Return 0 on success, 1 if clipping occured, 2 on other error */
3700 static int icmTable_lookup_bwd(
3701 icmRevTable *rt,
3702 double *out,
3703 double *in
3704 ) {
3705 int rv = 0;
3706 unsigned int ix, k, i;
3707 double oval, ival = *in, val;
3708 double rsize_1;
3709
3710 /* Find appropriate reverse list */
3711 rsize_1 = (double)(rt->rsize-1);
3712 val = ((ival - rt->rmin) * rt->qscale);
3713 if (val < 0.0)
3714 val = 0.0;
3715 else if (val > rsize_1)
3716 val = rsize_1;
3717 ix = (unsigned int)floor(val); /* Coordinate */
3718
3719 if (ix > (rt->size-2))
3720 ix = (rt->size-2);
3721 if (rt->rlists[ix] != NULL) { /* There is a list of fwd candidates */
3722 /* For each candidate forward range */
3723 for (i = 2; i < rt->rlists[ix][1]; i++) { /* For all fwd indexes */
3724 double lv,hv;
3725 k = rt->rlists[ix][i]; /* Base index */
3726 lv = rt->data[k];
3727 hv = rt->data[k+1];
3728 if ((ival >= lv && ival <= hv) /* If this slot contains output value */
3729 || (ival >= hv && ival <= lv)) {
3730 /* Reverse linear interpolation */
3731 if (hv == lv) { /* Technically non-monotonic - due to quantization ? */
3732 oval = (k + 0.5)/(rt->size-1.0);
3733 } else
3734 oval = (k + ((ival - lv)/(hv - lv)))/(rt->size-1.0);
3735 /* If we kept looking, we would find multiple */
3736 /* solution for non-monotonic curve */
3737 *out = oval;
3738 return rv;
3739 }
3740 }
3741 }
3742
3743 /* We have failed to find an exact value, so return the nearest value */
3744 /* (This is slow !) */
3745 val = fabs(ival - rt->data[0]);
3746 for (k = 0, i = 1; i < rt->size; i++) {
3747 double er;
3748 er = fabs(ival - rt->data[i]);
3749 if (er < val) { /* new best */
3750 val = er;
3751 k = i;
3752 }
3753 }
3754 *out = k/(rt->size-1.0);
3755 rv |= 1;
3756 return rv;
3757 }
3758
3759
3760 /* - - - - - - - - - - - - */
3761
3762 /* Do a reverse lookup through the curve */
3763 /* Return 0 on success, 1 if clipping occured, 2 on other error */
3764 static int icmCurve_lookup_bwd(
3765 icmCurve *p,
3766 double *out,
3767 double *in
3768 ) {
3769 icc *icp = p->icp;
3770 int rv = 0;
3771 if (p->flag == icmCurveLin) {
3772 *out = *in;
3773 } else if (p->flag == icmCurveGamma) {
3774 double val = *in;
3775 if (val <= 0.0)
3776 *out = 0.0;
3777 else
3778 *out = pow(val, 1.0/p->data[0]);
3779 } else if (p->size == 0) { /* Table of 0 size */
3780 *out = *in;
3781 } else { /* Use linear interpolation */
3782 if (p->rt.inited == 0) {
3783 rv = icmTable_setup_bwd(icp, &p->rt, p->size, p->data);
3784 if (rv != 0) {
3785 sprintf(icp->err,"icmCurve_lookup: Malloc failure in reverse lookup init.");
3786 return icp->errc = rv;
3787 }
3788 }
3789 rv = icmTable_lookup_bwd(&p->rt, out, in);
3790 }
3791 return rv;
3792 }
3793
3794 /* Return the number of bytes needed to write this tag */
3795 static unsigned int icmCurve_get_size(
3796 icmBase *pp
3797 ) {
3798 icmCurve *p = (icmCurve *)pp;
3799 unsigned int len = 0;
3800 len = sat_add(len, 12); /* 12 bytes for tag, padding and count */
3801 len = sat_addmul(len, p->size, 2); /* 2 bytes for each UInt16 */
3802 return len;
3803 }
3804
3805 /* read the object, return 0 on success, error code on fail */
3806 static int icmCurve_read(
3807 icmBase *pp,
3808 unsigned int len, /* tag length */
3809 unsigned int of /* start offset within file */
3810 ) {
3811 icmCurve *p = (icmCurve *)pp;
3812 icc *icp = p->icp;
3813 int rv = 0;
3814 unsigned int i;
3815 char *bp, *buf, *end;
3816
3817 if (len < 12) {
3818 sprintf(icp->err,"icmCurve_read: Tag too small to be legal");
3819 return icp->errc = 1;
3820 }
3821
3822 /* Allocate a file read buffer */
3823 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
3824 sprintf(icp->err,"icmCurve_read: malloc() failed");
3825 return icp->errc = 2;
3826 }
3827 bp = buf;
3828 end = buf + len;
3829
3830 /* Read portion of file into buffer */
3831 if ( icp->fp->seek(icp->fp, of) != 0
3832 || icp->fp->read(icp->fp, bp, 1, len) != len) {
3833 sprintf(icp->err,"icmCurve_read: fseek() or fread() failed");
3834 icp->al->free(icp->al, buf);
3835 return icp->errc = 1;
3836 }
3837
3838 /* Read type descriptor from the buffer */
3839 if (((icTagTypeSignature)read_SInt32Number(bp)) != p->ttype) {
3840 sprintf(icp->err,"icmCurve_read: Wrong tag type for icmCurve");
3841 icp->al->free(icp->al, buf);
3842 return icp->errc = 1;
3843 }
3844
3845 p->size = read_UInt32Number(bp+8);
3846 bp = bp + 12;
3847
3848 /* Set flag up before allocating */
3849 if (p->size == 0) { /* Linear curve */
3850 p->flag = icmCurveLin;
3851 } else if (p->size == 1) { /* Gamma curve */
3852 p->flag = icmCurveGamma;
3853 } else {
3854 p->flag = icmCurveSpec;
3855 if (p->size > (len - 12)/2) {
3856 sprintf(icp->err,"icmCurve_read: size overflow");
3857 icp->al->free(icp->al, buf);
3858 return icp->errc = 1;
3859 }
3860 }
3861
3862 if ((rv = p->allocate((icmBase *)p)) != 0) {
3863 icp->al->free(icp->al, buf);
3864 return rv;
3865 }
3866
3867 if (p->flag == icmCurveGamma) { /* Gamma curve */
3868 if (bp > end || 1 > (end - bp)) {
3869 sprintf(icp->err,"icmCurve_read: Data too short for curve gamma");
3870 icp->al->free(icp->al, buf);
3871 return icp->errc = 1;
3872 }
3873 p->data[0] = read_U8Fixed8Number(bp);
3874 } else if (p->flag == icmCurveSpec) {
3875 /* Read all the data from the buffer */
3876 for (i = 0; i < p->size; i++, bp += 2) {
3877 if (bp > end || 2 > (end - bp)) {
3878 sprintf(icp->err,"icmCurve_read: Data too short for curve value");
3879 icp->al->free(icp->al, buf);
3880 return icp->errc = 1;
3881 }
3882 p->data[i] = read_DCS16Number(bp);
3883 }
3884 }
3885 icp->al->free(icp->al, buf);
3886 return 0;
3887 }
3888
3889 /* Write the contents of the object. Return 0 on sucess, error code on failure */
3890 static int icmCurve_write(
3891 icmBase *pp,
3892 unsigned int of /* File offset to write from */
3893 ) {
3894 icmCurve *p = (icmCurve *)pp;
3895 icc *icp = p->icp;
3896 unsigned int i;
3897 unsigned int len;
3898 char *bp, *buf; /* Buffer to write from */
3899 int rv = 0;
3900
3901 /* Allocate a file write buffer */
3902 if ((len = p->get_size((icmBase *)p)) == UINT_MAX) {
3903 sprintf(icp->err,"icmCurve_write get_size overflow");
3904 return icp->errc = 1;
3905 }
3906 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
3907 sprintf(icp->err,"icmCurve_write malloc() failed");
3908 return icp->errc = 2;
3909 }
3910 bp = buf;
3911
3912 /* Write type descriptor to the buffer */
3913 if ((rv = write_SInt32Number((int)p->ttype,bp)) != 0) {
3914 sprintf(icp->err,"icmCurve_write: write_SInt32Number() failed");
3915 icp->al->free(icp->al, buf);
3916 return icp->errc = rv;
3917 }
3918 write_SInt32Number(0,bp+4); /* Set padding to 0 */
3919
3920 /* Write count */
3921 if ((rv = write_UInt32Number(p->size,bp+8)) != 0) {
3922 sprintf(icp->err,"icmCurve_write: write_UInt32Number() failed");
3923 icp->al->free(icp->al, buf);
3924 return icp->errc = rv;
3925 }
3926
3927 /* Write all the data to the buffer */
3928 bp += 12; /* Skip padding */
3929 if (p->flag == icmCurveLin) {
3930 if (p->size != 0) {
3931 sprintf(icp->err,"icmCurve_write: Must be exactly 0 entry for Linear");
3932 icp->al->free(icp->al, buf);
3933 return icp->errc = 1;
3934 }
3935 } else if (p->flag == icmCurveGamma) {
3936 if (p->size != 1) {
3937 sprintf(icp->err,"icmCurve_write: Must be exactly 1 entry for Gamma");
3938 icp->al->free(icp->al, buf);
3939 return icp->errc = 1;
3940 }
3941 if ((rv = write_U8Fixed8Number(p->data[0],bp)) != 0) {
3942 sprintf(icp->err,"icmCurve_write: write_U8Fixed8umber(%f) failed",p->data[0]);
3943 icp->al->free(icp->al, buf);
3944 return icp->errc = rv;
3945 }
3946 } else if (p->flag == icmCurveSpec) {
3947 if (p->size < 2) {
3948 sprintf(icp->err,"icmCurve_write: Must be 2 or more entries for Specified curve");
3949 icp->al->free(icp->al, buf);
3950 return icp->errc = 1;
3951 }
3952 for (i = 0; i < p->size; i++, bp += 2) {
3953 if ((rv = write_DCS16Number(p->data[i],bp)) != 0) {
3954 sprintf(icp->err,"icmCurve_write: write_UInt16umber(%f) failed",p->data[i]);
3955 icp->al->free(icp->al, buf);
3956 return icp->errc = rv;
3957 }
3958 }
3959 }
3960
3961 /* Write to the file */
3962 if ( icp->fp->seek(icp->fp, of) != 0
3963 || icp->fp->write(icp->fp, buf, 1, len) != len) {
3964 sprintf(icp->err,"icmCurve_write fseek() or fwrite() failed");
3965 icp->al->free(icp->al, buf);
3966 return icp->errc = 2;
3967 }
3968 icp->al->free(icp->al, buf);
3969 return 0;
3970 }
3971
3972 /* Dump a text description of the object */
3973 static void icmCurve_dump(
3974 icmBase *pp,
3975 icmFile *op, /* Output to dump to */
3976 int verb /* Verbosity level */
3977 ) {
3978 icmCurve *p = (icmCurve *)pp;
3979 if (verb <= 0)
3980 return;
3981
3982 op->gprintf(op,"Curve:\n");
3983
3984 if (p->flag == icmCurveLin) {
3985 op->gprintf(op," Curve is linear\n");
3986 } else if (p->flag == icmCurveGamma) {
3987 op->gprintf(op," Curve is gamma of %f\n",p->data[0]);
3988 } else {
3989 op->gprintf(op," No. elements = %lu\n",p->size);
3990 if (verb >= 2) {
3991 unsigned int i;
3992 for (i = 0; i < p->size; i++)
3993 op->gprintf(op," %3lu: %f\n",i,p->data[i]);
3994 }
3995 }
3996 }
3997
3998 /* Allocate variable sized data elements */
3999 static int icmCurve_allocate(
4000 icmBase *pp
4001 ) {
4002 icmCurve *p = (icmCurve *)pp;
4003 icc *icp = p->icp;
4004
4005 if (p->flag == icmCurveUndef) {
4006 sprintf(icp->err,"icmCurve_alloc: flag not set");
4007 return icp->errc = 1;
4008 } else if (p->flag == icmCurveLin) {
4009 p->size = 0;
4010 } else if (p->flag == icmCurveGamma) {
4011 p->size = 1;
4012 }
4013 if (p->size != p->_size) {
4014 if (ovr_mul(p->size, sizeof(double))) {
4015 sprintf(icp->err,"icmCurve_alloc: size overflow");
4016 return icp->errc = 1;
4017 }
4018 if (p->data != NULL)
4019 icp->al->free(icp->al, p->data);
4020 if ((p->data = (double *) icp->al->calloc(icp->al, p->size, sizeof(double))) == NULL) {
4021 sprintf(icp->err,"icmCurve_alloc: malloc() of icmCurve data failed");
4022 return icp->errc = 2;
4023 }
4024 p->_size = p->size;
4025 }
4026 return 0;
4027 }
4028
4029 /* Free all storage in the object */
4030 static void icmCurve_delete(
4031 icmBase *pp
4032 ) {
4033 icmCurve *p = (icmCurve *)pp;
4034 icc *icp = p->icp;
4035
4036 if (p->data != NULL)
4037 icp->al->free(icp->al, p->data);
4038 icmTable_delete_bwd(icp, &p->rt); /* Free reverse table info */
4039 icp->al->free(icp->al, p);
4040 }
4041
4042 /* Create an empty object. Return null on error */
4043 static icmBase *new_icmCurve(
4044 icc *icp
4045 ) {
4046 icmCurve *p;
4047 if ((p = (icmCurve *) icp->al->calloc(icp->al,1,sizeof(icmCurve))) == NULL)
4048 return NULL;
4049 p->ttype = icSigCurveType;
4050 p->refcount = 1;
4051 p->get_size = icmCurve_get_size;
4052 p->read = icmCurve_read;
4053 p->write = icmCurve_write;
4054 p->dump = icmCurve_dump;
4055 p->allocate = icmCurve_allocate;
4056 p->del = icmCurve_delete;
4057 p->icp = icp;
4058
4059 p->lookup_fwd = icmCurve_lookup_fwd;
4060 p->lookup_bwd = icmCurve_lookup_bwd;
4061
4062 p->rt.inited = 0;
4063
4064 p->flag = icmCurveUndef;
4065 return (icmBase *)p;
4066 }
4067
4068 /* ---------------------------------------------------------- */
4069 /* icmData object */
4070
4071 /* Return the number of bytes needed to write this tag */
4072 static unsigned int icmData_get_size(
4073 icmBase *pp
4074 ) {
4075 icmData *p = (icmData *)pp;
4076 unsigned int len = 0;
4077 len = sat_add(len, 12); /* 12 bytes for tag and padding */
4078 len = sat_addmul(len, p->size, 1); /* 1 byte for each data element */
4079 return len;
4080 }
4081
4082 /* read the object, return 0 on success, error code on fail */
4083 static int icmData_read(
4084 icmBase *pp,
4085 unsigned int len, /* tag length */
4086 unsigned int of /* start offset within file */
4087 ) {
4088 icmData *p = (icmData *)pp;
4089 icc *icp = p->icp;
4090 int rv;
4091 unsigned size, f;
4092 char *bp, *buf;
4093
4094 if (len < 12) {
4095 sprintf(icp->err,"icmData_read: Tag too small to be legal");
4096 return icp->errc = 1;
4097 }
4098
4099 /* Allocate a file read buffer */
4100 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
4101 sprintf(icp->err,"icmData_read: malloc() failed");
4102 return icp->errc = 2;
4103 }
4104 bp = buf;
4105
4106 /* Read portion of file into buffer */
4107 if ( icp->fp->seek(icp->fp, of) != 0
4108 || icp->fp->read(icp->fp, bp, 1, len) != len) {
4109 sprintf(icp->err,"icmData_read: fseek() or fread() failed");
4110 icp->al->free(icp->al, buf);
4111 return icp->errc = 1;
4112 }
4113 p->size = size = (len - 12)/1; /* Number of elements in the array */
4114
4115 /* Read type descriptor from the buffer */
4116 if (((icTagTypeSignature)read_SInt32Number(bp)) != p->ttype) {
4117 sprintf(icp->err,"icmData_read: Wrong tag type for icmData");
4118 icp->al->free(icp->al, buf);
4119 return icp->errc = 1;
4120 }
4121 /* Read the data type flag */
4122 f = read_UInt32Number(bp+8);
4123 if (f == 0) {
4124 p->flag = icmDataASCII;
4125 } else if (f == 1) {
4126 p->flag = icmDataBin;
4127 #ifndef ICM_STRICT /* Profile maker sometimes has a problem */
4128 } else if (f == 0x01000000) {
4129 p->flag = icmDataBin;
4130 #endif
4131 } else {
4132 sprintf(icp->err,"icmData_read: Unknown flag value 0x%x",f);
4133 icp->al->free(icp->al, buf);
4134 return icp->errc = 1;
4135 }
4136 bp += 12; /* Skip padding and flag */
4137
4138 if (p->size > 0) {
4139 if (p->flag == icmDataASCII) {
4140 if ((rv = check_null_string(bp,p->size)) == 1) {
4141 sprintf(icp->err,"icmData_read: ACSII is not null terminated");
4142 icp->al->free(icp->al, buf);
4143 return icp->errc = 1;
4144 }
4145 /* Haven't checked if rv == 2 is legal or not */
4146 }
4147 if ((rv = p->allocate((icmBase *)p)) != 0) {
4148 icp->al->free(icp->al, buf);
4149 return rv;
4150 }
4151
4152 memmove((void *)p->data, (void *)bp, p->size);
4153 }
4154 icp->al->free(icp->al, buf);
4155 return 0;
4156 }
4157
4158 /* Write the contents of the object. Return 0 on sucess, error code on failure */
4159 static int icmData_write(
4160 icmBase *pp,
4161 unsigned int of /* File offset to write from */
4162 ) {
4163 icmData *p = (icmData *)pp;
4164 icc *icp = p->icp;
4165 unsigned int len, f;
4166 char *bp, *buf; /* Buffer to write from */
4167 int rv;
4168
4169 /* Allocate a file write buffer */
4170 if ((len = p->get_size((icmBase *)p)) == UINT_MAX) {
4171 sprintf(icp->err,"icmData_write get_size overflow");
4172 return icp->errc = 1;
4173 }
4174 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
4175 sprintf(icp->err,"icmData_write malloc() failed");
4176 return icp->errc = 2;
4177 }
4178 bp = buf;
4179
4180 /* Write type descriptor to the buffer */
4181 if ((rv = write_SInt32Number((int)p->ttype,bp)) != 0) {
4182 sprintf(icp->err,"icmData_write: write_SInt32Number() failed");
4183 icp->al->free(icp->al, buf);
4184 return icp->errc = rv;
4185 }
4186 write_SInt32Number(0,bp+4); /* Set padding to 0 */
4187 switch(p->flag) {
4188 case icmDataASCII:
4189 f = 0;
4190 break;
4191 case icmDataBin:
4192 f = 1;
4193 break;
4194 default:
4195 sprintf(icp->err,"icmData_write: Unknown Data Flag value");
4196 icp->al->free(icp->al, buf);
4197 return icp->errc = 1;
4198 }
4199 /* Write data flag descriptor to the buffer */
4200 if ((rv = write_UInt32Number(f,bp+8)) != 0) {
4201 sprintf(icp->err,"icmData_write: write_SInt32Number() failed");
4202 icp->al->free(icp->al, buf);
4203 return icp->errc = rv;
4204 }
4205 bp += 12; /* Skip padding */
4206
4207 if (p->data != NULL) {
4208 if (p->flag == icmDataASCII) {
4209 if ((rv = check_null_string((char *)p->data, p->size)) == 1) {
4210 sprintf(icp->err,"icmData_write: ASCII is not null terminated");
4211 icp->al->free(icp->al, buf);
4212 return icp->errc = 1;
4213 }
4214 /* Haven't checked if rv == 2 is legal or not */
4215 }
4216 memmove((void *)bp, (void *)p->data, p->size);
4217 }
4218
4219 /* Write to the file */
4220 if ( icp->fp->seek(icp->fp, of) != 0
4221 || icp->fp->write(icp->fp, buf, 1, len) != len) {
4222 sprintf(icp->err,"icmData_write fseek() or fwrite() failed");
4223 icp->al->free(icp->al, buf);
4224 return icp->errc = 2;
4225 }
4226 icp->al->free(icp->al, buf);
4227 return 0;
4228 }
4229
4230 /* Dump a text description of the object */
4231 static void icmData_dump(
4232 icmBase *pp,
4233 icmFile *op, /* Output to dump to */
4234 int verb /* Verbosity level */
4235 ) {
4236 icmData *p = (icmData *)pp;
4237 unsigned int i, r, c, ii, size = 0;
4238 int ph = 0; /* Phase */
4239
4240 if (verb <= 0)
4241 return;
4242
4243 op->gprintf(op,"Data:\n");
4244 switch(p->flag) {
4245 case icmDataASCII:
4246 op->gprintf(op," ASCII data\n");
4247 size = p->size > 0 ? p->size-1 : 0;
4248 break;
4249 case icmDataBin:
4250 op->gprintf(op," Binary data\n");
4251 size = p->size;
4252 break;
4253 case icmDataUndef:
4254 op->gprintf(op," Undefined data\n");
4255 size = p->size;
4256 break;
4257 }
4258 op->gprintf(op," No. elements = %lu\n",p->size);
4259
4260 ii = i = 0;
4261 for (r = 1;; r++) { /* count rows */
4262 if (i >= size) {
4263 op->gprintf(op,"\n");
4264 break;
4265 }
4266 if (r > 1 && verb < 2) {
4267 op->gprintf(op,"...\n");
4268 break; /* Print 1 row if not verbose */
4269 }
4270
4271 c = 1;
4272 if (ph != 0) { /* Print ASCII under binary */
4273 op->gprintf(op," ");
4274 i = ii;
4275 c += 11;
4276 } else {
4277 op->gprintf(op," 0x%04lx: ",i);
4278 ii = i;
4279 c += 10;
4280 }
4281 while (i < size && c < 75) {
4282 if (p->flag == icmDataASCII) {
4283 if (isprint(p->data[i])) {
4284 op->gprintf(op,"%c",p->data[i]);
4285 c++;
4286 } else {
4287 op->gprintf(op,"\\%03o",p->data[i]);
4288 c += 4;
4289 }
4290 } else {
4291 if (ph == 0)
4292 op->gprintf(op,"%02x ",p->data[i]);
4293 else {
4294 if (isprint(p->data[i]))
4295 op->gprintf(op," %c ",p->data[i]);
4296 else
4297 op->gprintf(op," ",p->data[i]);
4298 }
4299 c += 3;
4300 }
4301 i++;
4302 }
4303 if (i < size)
4304 op->gprintf(op,"\n");
4305 if (verb > 2 && p->flag != icmDataASCII && ph == 0)
4306 ph = 1;
4307 else
4308 ph = 0;
4309 }
4310 }
4311
4312 /* Allocate variable sized data elements */
4313 static int icmData_allocate(
4314 icmBase *pp
4315 ) {
4316 icmData *p = (icmData *)pp;
4317 icc *icp = p->icp;
4318
4319 if (p->size != p->_size) {
4320 if (ovr_mul(p->size, sizeof(unsigned char))) {
4321 sprintf(icp->err,"icmData_alloc: size overflow");
4322 return icp->errc = 1;
4323 }
4324 if (p->data != NULL)
4325 icp->al->free(icp->al, p->data);
4326 if ((p->data = (unsigned char *) icp->al->calloc(icp->al, p->size, sizeof(unsigned char))) == NULL) {
4327 sprintf(icp->err,"icmData_alloc: malloc() of icmData data failed");
4328 return icp->errc = 2;
4329 }
4330 p->_size = p->size;
4331 }
4332 return 0;
4333 }
4334
4335 /* Free all storage in the object */
4336 static void icmData_delete(
4337 icmBase *pp
4338 ) {
4339 icmData *p = (icmData *)pp;
4340 icc *icp = p->icp;
4341
4342 if (p->data != NULL)
4343 icp->al->free(icp->al, p->data);
4344 icp->al->free(icp->al, p);
4345 }
4346
4347 /* Create an empty object. Return null on error */
4348 static icmBase *new_icmData(
4349 icc *icp
4350 ) {
4351 icmData *p;
4352 if ((p = (icmData *) icp->al->calloc(icp->al,1,sizeof(icmData))) == NULL)
4353 return NULL;
4354 p->ttype = icSigDataType;
4355 p->refcount = 1;
4356 p->get_size = icmData_get_size;
4357 p->read = icmData_read;
4358 p->write = icmData_write;
4359 p->dump = icmData_dump;
4360 p->allocate = icmData_allocate;
4361 p->del = icmData_delete;
4362 p->icp = icp;
4363
4364 p->flag = icmDataUndef;
4365 return (icmBase *)p;
4366 }
4367
4368 /* ---------------------------------------------------------- */
4369 /* icmText object */
4370
4371 /* Return the number of bytes needed to write this tag */
4372 static unsigned int icmText_get_size(
4373 icmBase *pp
4374 ) {
4375 icmText *p = (icmText *)pp;
4376 unsigned int len = 0;
4377 len = sat_add(len, 8); /* 8 bytes for tag and padding */
4378 len = sat_addmul(len, p->size, 1); /* 1 byte for each character element (inc. null) */
4379 return len;
4380 }
4381
4382 /* read the object, return 0 on success, error code on fail */
4383 static int icmText_read(
4384 icmBase *pp,
4385 unsigned int len, /* tag length */
4386 unsigned int of /* start offset within file */
4387 ) {
4388 icmText *p = (icmText *)pp;
4389 icc *icp = p->icp;
4390 int rv;
4391 char *bp, *buf;
4392
4393 if (len < 8) {
4394 sprintf(icp->err,"icmText_read: Tag too short to be legal");
4395 return icp->errc = 1;
4396 }
4397
4398 /* Allocate a file read buffer */
4399 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
4400 sprintf(icp->err,"icmText_read: malloc() failed");
4401 return icp->errc = 2;
4402 }
4403 bp = buf;
4404
4405 /* Read portion of file into buffer */
4406 if ( icp->fp->seek(icp->fp, of) != 0
4407 || icp->fp->read(icp->fp, bp, 1, len) != len) {
4408 sprintf(icp->err,"icmText_read: fseek() or fread() failed");
4409 icp->al->free(icp->al, buf);
4410 return icp->errc = 1;
4411 }
4412 p->size = (len - 8)/1; /* Number of elements in the array */
4413
4414 /* Read type descriptor from the buffer */
4415 if (((icTagTypeSignature)read_SInt32Number(bp)) != p->ttype) {
4416 sprintf(icp->err,"icmText_read: Wrong tag type for icmText");
4417 icp->al->free(icp->al, buf);
4418 return icp->errc = 1;
4419 }
4420 bp = bp + 8;
4421
4422 if (p->size > 0) {
4423 if ((rv = check_null_string(bp,p->size)) == 1) {
4424 sprintf(icp->err,"icmText_read: text is not null terminated");
4425 icp->al->free(icp->al, buf);
4426 return icp->errc = 1;
4427 }
4428 /* Haven't checked if rv == 2 is legal or not */
4429
4430 if ((rv = p->allocate((icmBase *)p)) != 0) {
4431 icp->al->free(icp->al, buf);
4432 return rv;
4433 }
4434 memmove((void *)p->data, (void *)bp, p->size);
4435 }
4436 icp->al->free(icp->al, buf);
4437 return 0;
4438 }
4439
4440 /* Write the contents of the object. Return 0 on sucess, error code on failure */
4441 static int icmText_write(
4442 icmBase *pp,
4443 unsigned int of /* File offset to write from */
4444 ) {
4445 icmText *p = (icmText *)pp;
4446 icc *icp = p->icp;
4447 unsigned int len;
4448 char *bp, *buf; /* Buffer to write from */
4449 int rv;
4450
4451 /* Allocate a file write buffer */
4452 if ((len = p->get_size((icmBase *)p)) == UINT_MAX) {
4453 sprintf(icp->err,"icmText_write get_size overflow");
4454 return icp->errc = 1;
4455 }
4456 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
4457 sprintf(icp->err,"icmText_write malloc() failed");
4458 return icp->errc = 2;
4459 }
4460 bp = buf;
4461
4462 /* Write type descriptor to the buffer */
4463 if ((rv = write_SInt32Number((int)p->ttype,bp)) != 0) {
4464 sprintf(icp->err,"icmText_write: write_SInt32Number() failed");
4465 icp->al->free(icp->al, buf);
4466 return icp->errc = rv;
4467 }
4468 write_SInt32Number(0,bp+4); /* Set padding to 0 */
4469 bp = bp + 8;
4470
4471 if (p->data != NULL) {
4472 if ((rv = check_null_string(p->data, p->size)) == 1) {
4473 sprintf(icp->err,"icmText_write: text is not null terminated");
4474 icp->al->free(icp->al, buf);
4475 return icp->errc = 1;
4476 }
4477 /* Haven't checked if rv == 2 is legal or not */
4478 memmove((void *)bp, (void *)p->data, p->size);
4479 }
4480
4481 /* Write to the file */
4482 if ( icp->fp->seek(icp->fp, of) != 0
4483 || icp->fp->write(icp->fp, buf, 1, len) != len) {
4484 sprintf(icp->err,"icmText_write fseek() or fwrite() failed");
4485 icp->al->free(icp->al, buf);
4486 return icp->errc = 2;
4487 }
4488 icp->al->free(icp->al, buf);
4489 return 0;
4490 }
4491
4492 /* Dump a text description of the object */
4493 static void icmText_dump(
4494 icmBase *pp,
4495 icmFile *op, /* Output to dump to */
4496 int verb /* Verbosity level */
4497 ) {
4498 icmText *p = (icmText *)pp;
4499 unsigned int i, r, c, size;
4500
4501 if (verb <= 0)
4502 return;
4503
4504 op->gprintf(op,"Text:\n");
4505 op->gprintf(op," No. chars = %lu\n",p->size);
4506
4507 size = p->size > 0 ? p->size-1 : 0;
4508 i = 0;
4509 for (r = 1;; r++) { /* count rows */
4510 if (i >= size) {
4511 op->gprintf(op,"\n");
4512 break;
4513 }
4514 if (r > 1 && verb < 2) {
4515 op->gprintf(op,"...\n");
4516 break; /* Print 1 row if not verbose */
4517 }
4518 c = 1;
4519 op->gprintf(op," 0x%04lx: ",i);
4520 c += 10;
4521 while (i < size && c < 75) {
4522 if (isprint(p->data[i])) {
4523 op->gprintf(op,"%c",p->data[i]);
4524 c++;
4525 } else {
4526 op->gprintf(op,"\\%03o",p->data[i]);
4527 c += 4;
4528 }
4529 i++;
4530 }
4531 if (i < size)
4532 op->gprintf(op,"\n");
4533 }
4534 }
4535
4536 /* Allocate variable sized data elements */
4537 static int icmText_allocate(
4538 icmBase *pp
4539 ) {
4540 icmText *p = (icmText *)pp;
4541 icc *icp = p->icp;
4542
4543 if (p->size != p->_size) {
4544 if (ovr_mul(p->size, sizeof(char))) {
4545 sprintf(icp->err,"icmText_alloc: size overflow");
4546 return icp->errc = 1;
4547 }
4548 if (p->data != NULL)
4549 icp->al->free(icp->al, p->data);
4550 if ((p->data = (char *) icp->al->calloc(icp->al, p->size, sizeof(char))) == NULL) {
4551 sprintf(icp->err,"icmText_alloc: malloc() of icmText data failed");
4552 return icp->errc = 2;
4553 }
4554 p->_size = p->size;
4555 }
4556 return 0;
4557 }
4558
4559 /* Free all storage in the object */
4560 static void icmText_delete(
4561 icmBase *pp
4562 ) {
4563 icmText *p = (icmText *)pp;
4564 icc *icp = p->icp;
4565
4566 if (p->data != NULL)
4567 icp->al->free(icp->al, p->data);
4568 icp->al->free(icp->al, p);
4569 }
4570
4571 /* Create an empty object. Return null on error */
4572 static icmBase *new_icmText(
4573 icc *icp
4574 ) {
4575 icmText *p;
4576 if ((p = (icmText *) icp->al->calloc(icp->al,1,sizeof(icmText))) == NULL)
4577 return NULL;
4578 p->ttype = icSigTextType;
4579 p->refcount = 1;
4580 p->get_size = icmText_get_size;
4581 p->read = icmText_read;
4582 p->write = icmText_write;
4583 p->dump = icmText_dump;
4584 p->allocate = icmText_allocate;
4585 p->del = icmText_delete;
4586 p->icp = icp;
4587
4588 return (icmBase *)p;
4589 }
4590
4591 /* ---------------------------------------------------------- */
4592
4593 /* Data conversion support functions */
4594 static int write_DateTimeNumber(icmDateTimeNumber *p, char *d) {
4595 int rv;
4596 if (p->year < 1900 || p->year > 3000
4597 || p->month == 0 || p->month > 12
4598 || p->day == 0 || p->day > 31
4599 || p->hours > 23
4600 || p->minutes > 59
4601 || p->seconds > 59)
4602 return 1;
4603
4604 if ((rv = write_UInt16Number(p->year, d + 0)) != 0)
4605 return rv;
4606 if ((rv = write_UInt16Number(p->month, d + 2)) != 0)
4607 return rv;
4608 if ((rv = write_UInt16Number(p->day, d + 4)) != 0)
4609 return rv;
4610 if ((rv = write_UInt16Number(p->hours, d + 6)) != 0)
4611 return rv;
4612 if ((rv = write_UInt16Number(p->minutes, d + 8)) != 0)
4613 return rv;
4614 if ((rv = write_UInt16Number(p->seconds, d + 10)) != 0)
4615 return rv;
4616 return 0;
4617 }
4618
4619 static int read_DateTimeNumber(icmDateTimeNumber *p, char *d) {
4620
4621 p->year = read_UInt16Number(d + 0);
4622 p->month = read_UInt16Number(d + 2);
4623 p->day = read_UInt16Number(d + 4);
4624 p->hours = read_UInt16Number(d + 6);
4625 p->minutes = read_UInt16Number(d + 8);
4626 p->seconds = read_UInt16Number(d + 10);
4627
4628 /* Sanity check the date and time */
4629 if (p->year >= 1900 && p->year <= 3000
4630 && p->month != 0 && p->month <= 12
4631 && p->day != 0 && p->day <= 31
4632 && p->hours <= 23
4633 && p->minutes <= 59
4634 && p->seconds <= 59)
4635 return 0;
4636
4637 #ifdef NEVER
4638 printf("Raw year = %d, month = %d, day = %d\n",p->year, p->month, p->day);
4639 printf("Raw hour = %d, minutes = %d, seconds = %d\n", p->hours, p->minutes, p->seconds);
4640 #endif /* NEVER */
4641
4642 #ifdef ICM_STRICT
4643 return 1; /* Not legal */
4644
4645 #else
4646 /* Be more forgiving */
4647
4648 /* Check for Adobe problem */
4649 if (p->month >= 1900 && p->month <= 3000
4650 && p->year != 0 && p->year <= 12
4651 && p->hours != 0 && p->hours <= 31
4652 && p->day <= 23
4653 && p->seconds <= 59
4654 && p->minutes <= 59) {
4655 unsigned int tt;
4656
4657 /* Correct Adobe's faulty profile */
4658 tt = p->month; p->month = p->year; p->year = tt;
4659 tt = p->hours; p->hours = p->day; p->day = tt;
4660 tt = p->seconds; p->seconds = p->minutes; p->minutes = tt;
4661
4662 return 0;
4663 }
4664
4665 /* Hmm. some other sort of corruption. Limit values to sane */
4666 if (p->year < 1900) {
4667 if (p->year < 100) /* Hmm. didn't use 4 digit year, guess it's 19xx ? */
4668 p->year += 1900;
4669 else
4670 p->year = 1900;
4671 } else if (p->year > 3000)
4672 p->year = 3000;
4673
4674 if (p->month == 0)
4675 p->month = 1;
4676 else if (p->month > 12)
4677 p->month = 12;
4678
4679 if (p->day == 0)
4680 p->day = 1;
4681 else if (p->day > 31)
4682 p->day = 31;
4683
4684 if (p->hours > 23)
4685 p->hours = 23;
4686
4687 if (p->minutes > 59)
4688 p->minutes = 59;
4689
4690 if (p->seconds > 59)
4691 p->seconds = 59;
4692
4693 return 0;
4694 #endif
4695 }
4696
4697 /* Return a string that shows the given date and time */
4698 static char *string_DateTimeNumber(icmDateTimeNumber *p) {
4699 static const char *mstring[13] = {"Bad", "Jan","Feb","Mar","Apr","May","Jun",
4700 "Jul","Aug","Sep","Oct","Nov","Dec"};
4701 static char buf[80];
4702
4703 sprintf(buf,"%d %s %4d, %d:%02d:%02d",
4704 p->day, mstring[p->month > 12 ? 0 : p->month], p->year,
4705 p->hours, p->minutes, p->seconds);
4706 return buf;
4707 }
4708
4709 /* Set the DateTime structure to the current date and time */
4710 static void setcur_DateTimeNumber(icmDateTimeNumber *p) {
4711 time_t cclk;
4712 struct tm *ctm;
4713
4714 cclk = time(NULL);
4715 ctm = localtime(&cclk);
4716
4717 p->year = ctm->tm_year + 1900;
4718 p->month = ctm->tm_mon + 1;
4719 p->day = ctm->tm_mday;
4720 p->hours = ctm->tm_hour;
4721 p->minutes = ctm->tm_min;
4722 p->seconds = ctm->tm_sec;
4723 }
4724
4725 /* Return the number of bytes needed to write this tag */
4726 static unsigned int icmDateTimeNumber_get_size(
4727 icmBase *pp
4728 ) {
4729 unsigned int len = 0;
4730 len = sat_add(len, 8); /* 8 bytes for tag and padding */
4731 len = sat_add(len, 12); /* 12 bytes for Date & Time */
4732 return len;
4733 }
4734
4735 /* read the object, return 0 on success, error code on fail */
4736 static int icmDateTimeNumber_read(
4737 icmBase *pp,
4738 unsigned int len, /* tag length */
4739 unsigned int of /* start offset within file */
4740 ) {
4741 icmDateTimeNumber *p = (icmDateTimeNumber *)pp;
4742 icc *icp = p->icp;
4743 int rv;
4744 char *bp, *buf;
4745
4746 if (len < 20) {
4747 sprintf(icp->err,"icmDateTimeNumber_read: Tag too small to be legal");
4748 return icp->errc = 1;
4749 }
4750
4751 /* Allocate a file read buffer */
4752 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
4753 sprintf(icp->err,"icmDateTimeNumber_read: malloc() failed");
4754 return icp->errc = 2;
4755 }
4756 bp = buf;
4757
4758 /* Read portion of file into buffer */
4759 if ( icp->fp->seek(icp->fp, of) != 0
4760 || icp->fp->read(icp->fp, bp, 1, len) != len) {
4761 sprintf(icp->err,"icmDateTimeNumber_read: fseek() or fread() failed");
4762 icp->al->free(icp->al, buf);
4763 return icp->errc = 1;
4764 }
4765
4766 /* Read type descriptor from the buffer */
4767 if (((icTagTypeSignature)read_SInt32Number(bp)) != p->ttype) {
4768 sprintf(icp->err,"icmDateTimeNumber_read: Wrong tag type for icmDateTimeNumber");
4769 icp->al->free(icp->al, buf);
4770 return icp->errc = 1;
4771 }
4772 bp += 8; /* Skip padding */
4773
4774 /* Read the time and date from buffer */
4775 if((rv = read_DateTimeNumber(p, bp)) != 0) {
4776 sprintf(icp->err,"icmDateTimeNumber_read: Corrupted DateTime");
4777 icp->al->free(icp->al, buf);
4778 return icp->errc = rv;
4779 }
4780
4781 icp->al->free(icp->al, buf);
4782 return 0;
4783 }
4784
4785 /* Write the contents of the object. Return 0 on sucess, error code on failure */
4786 static int icmDateTimeNumber_write(
4787 icmBase *pp,
4788 unsigned int of /* File offset to write from */
4789 ) {
4790 icmDateTimeNumber *p = (icmDateTimeNumber *)pp;
4791 icc *icp = p->icp;
4792 unsigned int len;
4793 char *bp, *buf; /* Buffer to write from */
4794 int rv = 0;
4795
4796 /* Allocate a file write buffer */
4797 if ((len = p->get_size((icmBase *)p)) == UINT_MAX) {
4798 sprintf(icp->err,"icmDateTimeNumber_write get_size overflow");
4799 return icp->errc = 1;
4800 }
4801 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
4802 sprintf(icp->err,"icmDateTimeNumber_write malloc() failed");
4803 return icp->errc = 2;
4804 }
4805 bp = buf;
4806
4807 /* Write type descriptor to the buffer */
4808 if ((rv = write_SInt32Number((int)p->ttype,bp)) != 0) {
4809 sprintf(icp->err,"icmDateTimeNumber_write: write_SInt32Number() failed");
4810 icp->al->free(icp->al, buf);
4811 return icp->errc = rv;
4812 }
4813 write_SInt32Number(0,bp+4); /* Set padding to 0 */
4814
4815 /* Write all the data to the buffer */
4816 bp += 8; /* Skip padding */
4817 if ((rv = write_DateTimeNumber(p, bp)) != 0) {
4818 sprintf(icp->err,"icmDateTimeNumber_write: write_DateTimeNumber() failed");
4819 icp->al->free(icp->al, buf);
4820 return icp->errc = rv;
4821 }
4822
4823 /* Write to the file */
4824 if ( icp->fp->seek(icp->fp, of) != 0
4825 || icp->fp->write(icp->fp, buf, 1, len) != len) {
4826 sprintf(icp->err,"icmDateTimeNumber_write fseek() or fwrite() failed");
4827 icp->al->free(icp->al, buf);
4828 return icp->errc = 2;
4829 }
4830 icp->al->free(icp->al, buf);
4831 return 0;
4832 }
4833
4834 /* Dump a text description of the object */
4835 static void icmDateTimeNumber_dump(
4836 icmBase *pp,
4837 icmFile *op, /* Output to dump to */
4838 int verb /* Verbosity level */
4839 ) {
4840 icmDateTimeNumber *p = (icmDateTimeNumber *)pp;
4841 if (verb <= 0)
4842 return;
4843
4844 op->gprintf(op,"DateTimeNumber:\n");
4845 op->gprintf(op," Date = %s\n", string_DateTimeNumber(p));
4846 }
4847
4848 /* Allocate variable sized data elements */
4849 static int icmDateTimeNumber_allocate(
4850 icmBase *pp
4851 ) {
4852 /* Nothing to do */
4853 return 0;
4854 }
4855
4856 /* Free all storage in the object */
4857 static void icmDateTimeNumber_delete(
4858 icmBase *pp
4859 ) {
4860 icmDateTimeNumber *p = (icmDateTimeNumber *)pp;
4861 icc *icp = p->icp;
4862
4863 icp->al->free(icp->al, p);
4864 }
4865
4866 /* Create an empty object. Return null on error */
4867 static icmBase *new_icmDateTimeNumber(
4868 icc *icp
4869 ) {
4870 icmDateTimeNumber *p;
4871 if ((p = (icmDateTimeNumber *) icp->al->calloc(icp->al,1,sizeof(icmDateTimeNumber))) == NULL)
4872 return NULL;
4873 p->ttype = icSigDateTimeType;
4874 p->refcount = 1;
4875 p->get_size = icmDateTimeNumber_get_size;
4876 p->read = icmDateTimeNumber_read;
4877 p->write = icmDateTimeNumber_write;
4878 p->dump = icmDateTimeNumber_dump;
4879 p->allocate = icmDateTimeNumber_allocate;
4880 p->del = icmDateTimeNumber_delete;
4881 p->icp = icp;
4882
4883 setcur_DateTimeNumber(p); /* Default to current date and time */
4884 return (icmBase *)p;
4885 }
4886
4887 /* ---------------------------------------------------------- */
4888 /* icmLut object */
4889
4890 /* Check if the matrix is non-zero */
4891 static int icmLut_nu_matrix(
4892 icmLut *p /* Pointer to Lut object */
4893 ) {
4894 int i, j;
4895
4896 for (j = 0; j < 3; j++) { /* Rows */
4897 for (i = 0; i < 3; i++) { /* Columns */
4898 if ( (i == j && p->e[j][i] != 1.0)
4899 || (i != j && p->e[j][i] != 0.0))
4900 return 1;
4901 }
4902 }
4903 return 0;
4904 }
4905
4906 /* return the locations of the minimum and */
4907 /* maximum values of the given channel, in the clut */
4908 static void icmLut_min_max(
4909 icmLut *p, /* Pointer to Lut object */
4910 double *minp, /* Return position of min/max */
4911 double *maxp,
4912 int chan /* Channel, -1 for average of all */
4913 ) {
4914 double *tp;
4915 double minv, maxv; /* Values */
4916 unsigned int e, ee, f;
4917 int gc[MAX_CHAN]; /* Grid coordinate */
4918
4919 minv = 1e6;
4920 maxv = -1e6;
4921
4922 for (e = 0; e < p->inputChan; e++)
4923 gc[e] = 0; /* init coords */
4924
4925 /* Search the whole table */
4926 for (tp = p->clutTable, e = 0; e < p->inputChan; tp += p->outputChan) {
4927 double v;
4928 if (chan == -1) {
4929 for (v = 0.0, f = 0; f < p->outputChan; f++)
4930 v += tp[f];
4931 } else {
4932 v = tp[chan];
4933 }
4934 if (v < minv) {
4935 minv = v;
4936 for (ee = 0; ee < p->inputChan; ee++)
4937 minp[ee] = gc[ee]/(p->clutPoints-1.0);
4938 }
4939 if (v > maxv) {
4940 maxv = v;
4941 for (ee = 0; ee < p->inputChan; ee++)
4942 maxp[ee] = gc[ee]/(p->clutPoints-1.0);
4943 }
4944
4945 /* Increment coord */
4946 for (e = 0; e < p->inputChan; e++) {
4947 if (++gc[e] < p->clutPoints)
4948 break; /* No carry */
4949 gc[e] = 0;
4950 }
4951 }
4952 }
4953
4954 /* Convert XYZ throught Luts matrix */
4955 /* Return 0 on success, 1 if clipping occured, 2 on other error */
4956 static int icmLut_lookup_matrix(
4957 icmLut *p, /* Pointer to Lut object */
4958 double *out, /* Output array[outputChan] in ICC order - see Table 39 in 6.5.5 */
4959 double *in /* Input array[inputChan] */
4960 ) {
4961 double t0,t1; /* Take care if out == in */
4962 t0 = p->e[0][0] * in[0] + p->e[0][1] * in[1] + p->e[0][2] * in[2];
4963 t1 = p->e[1][0] * in[0] + p->e[1][1] * in[1] + p->e[1][2] * in[2];
4964 out[2] = p->e[2][0] * in[0] + p->e[2][1] * in[1] + p->e[2][2] * in[2];
4965 out[0] = t0;
4966 out[1] = t1;
4967
4968 return 0;
4969 }
4970
4971 /* Convert normalized numbers though this Luts input tables. */
4972 /* Return 0 on success, 1 if clipping occured, 2 on other error */
4973 static int icmLut_lookup_input(
4974 icmLut *p, /* Pointer to Lut object */
4975 double *out, /* Output array[inputChan] */
4976 double *in /* Input array[inputChan] */
4977 ) {
4978 int rv = 0;
4979 unsigned int ix, n;
4980 double inputEnt_1 = (double)(p->inputEnt-1);
4981 double *table = p->inputTable;
4982
4983 if (p->inputEnt == 0) { /* Hmm. */
4984 for (n = 0; n < p->inputChan; n++)
4985 out[n] = in[n];
4986 } else {
4987 /* Use linear interpolation */
4988 for (n = 0; n < p->inputChan; n++, table += p->inputEnt) {
4989 double val, w;
4990 val = in[n] * inputEnt_1;
4991 if (val < 0.0) {
4992 val = 0.0;
4993 rv |= 1;
4994 } else if (val > inputEnt_1) {
4995 val = inputEnt_1;
4996 rv |= 1;
4997 }
4998 ix = (unsigned int)floor(val); /* Grid coordinate */
4999 if (ix > (p->inputEnt-2))
5000 ix = (p->inputEnt-2);
5001 w = val - (double)ix; /* weight */
5002 val = table[ix];
5003 out[n] = val + w * (table[ix+1] - val);
5004 }
5005 }
5006 return rv;
5007 }
5008
5009 /* Convert normalized numbers though this Luts multi-dimensional table. */
5010 /* using multi-linear interpolation. */
5011 static int icmLut_lookup_clut_nl(
5012 /* Return 0 on success, 1 if clipping occured, 2 on other error */
5013 icmLut *p, /* Pointer to Lut object */
5014 double *out, /* Output array[inputChan] */
5015 double *in /* Input array[outputChan] */
5016 ) {
5017 icc *icp = p->icp;
5018 int rv = 0;
5019 double *gp; /* Pointer to grid cube base */
5020 double co[MAX_CHAN]; /* Coordinate offset with the grid cell */
5021 double *gw, GW[1 << 8]; /* weight for each grid cube corner */
5022
5023 if (p->inputChan <= 8) {
5024 gw = GW; /* Use stack allocation */
5025 } else {
5026 if ((gw = (double *) icp->al->malloc(icp->al, sat_mul((1 << p->inputChan), sizeof(double)))) == NULL) {
5027 sprintf(icp->err,"icmLut_lookup_clut: malloc() failed");
5028 return icp->errc = 2;
5029 }
5030 }
5031
5032 /* We are using an multi-linear (ie. Trilinear for 3D input) interpolation. */
5033 /* The implementation here uses more multiplies that some other schemes, */
5034 /* (for instance, see "Tri-Linear Interpolation" by Steve Hill, */
5035 /* Graphics Gems IV, page 521), but has less involved bookeeping, */
5036 /* needs less local storage for intermediate output values, does fewer */
5037 /* output and intermediate value reads, and fp multiplies are fast on */
5038 /* todays processors! */
5039
5040 /* Compute base index into grid and coordinate offsets */
5041 {
5042 unsigned int e;
5043 double clutPoints_1 = (double)(p->clutPoints-1);
5044 int clutPoints_2 = p->clutPoints-2;
5045 gp = p->clutTable; /* Base of grid array */
5046
5047 for (e = 0; e < p->inputChan; e++) {
5048 unsigned int x;
5049 double val;
5050 val = in[e] * clutPoints_1;
5051 if (val < 0.0) {
5052 val = 0.0;
5053 rv |= 1;
5054 } else if (val > clutPoints_1) {
5055 val = clutPoints_1;
5056 rv |= 1;
5057 }
5058 x = (unsigned int)floor(val); /* Grid coordinate */
5059 if (x > clutPoints_2)
5060 x = clutPoints_2;
5061 co[e] = val - (double)x; /* 1.0 - weight */
5062 gp += x * p->dinc[e]; /* Add index offset for base of cube */
5063 }
5064 }
5065 /* Compute corner weights needed for interpolation */
5066 {
5067 unsigned int e;
5068 int i, g = 1;
5069 gw[0] = 1.0;
5070 for (e = 0; e < p->inputChan; e++) {
5071 for (i = 0; i < g; i++) {
5072 gw[g+i] = gw[i] * co[e];
5073 gw[i] *= (1.0 - co[e]);
5074 }
5075 g *= 2;
5076 }
5077 }
5078 /* Now compute the output values */
5079 {
5080 int i;
5081 unsigned int f;
5082 double w = gw[0];
5083 double *d = gp + p->dcube[0];
5084 for (f = 0; f < p->outputChan; f++) /* Base of cube */
5085 out[f] = w * d[f];
5086 for (i = 1; i < (1 << p->inputChan); i++) { /* For all other corners of cube */
5087 w = gw[i]; /* Strength reduce */
5088 d = gp + p->dcube[i];
5089 for (f = 0; f < p->outputChan; f++)
5090 out[f] += w * d[f];
5091 }
5092 }
5093 if (gw != GW)
5094 icp->al->free(icp->al, (void *)gw);
5095 return rv;
5096 }
5097
5098 /* Convert normalized numbers though this Luts multi-dimensional table */
5099 /* using simplex interpolation. */
5100 static int icmLut_lookup_clut_sx(
5101 /* Return 0 on success, 1 if clipping occured, 2 on other error */
5102 icmLut *p, /* Pointer to Lut object */
5103 double *out, /* Output array[inputChan] */
5104 double *in /* Input array[outputChan] */
5105 ) {
5106 int rv = 0;
5107 double *gp; /* Pointer to grid cube base */
5108 double co[MAX_CHAN]; /* Coordinate offset with the grid cell */
5109 int si[MAX_CHAN]; /* co[] Sort index, [0] = smalest */
5110
5111 /* We are using a simplex (ie. tetrahedral for 3D input) interpolation. */
5112 /* This method is more appropriate for XYZ/RGB/CMYK input spaces, */
5113
5114 /* Compute base index into grid and coordinate offsets */
5115 {
5116 unsigned int e;
5117 double clutPoints_1 = (double)(p->clutPoints-1);
5118 int clutPoints_2 = p->clutPoints-2;
5119 gp = p->clutTable; /* Base of grid array */
5120
5121 for (e = 0; e < p->inputChan; e++) {
5122 unsigned int x;
5123 double val;
5124 val = in[e] * clutPoints_1;
5125 if (val < 0.0) {
5126 val = 0.0;
5127 rv |= 1;
5128 } else if (val > clutPoints_1) {
5129 val = clutPoints_1;
5130 rv |= 1;
5131 }
5132 x = (unsigned int)floor(val); /* Grid coordinate */
5133 if (x > clutPoints_2)
5134 x = clutPoints_2;
5135 co[e] = val - (double)x; /* 1.0 - weight */
5136 gp += x * p->dinc[e]; /* Add index offset for base of cube */
5137 }
5138 }
5139 #ifdef NEVER
5140 /* Do selection sort on coordinates, smallest to largest. */
5141 {
5142 int e, f;
5143 for (e = 0; e < p->inputChan; e++)
5144 si[e] = e; /* Initial unsorted indexes */
5145 for (e = 0; e < (p->inputChan-1); e++) {
5146 double cosn;
5147 cosn = co[si[e]]; /* Current smallest value */
5148 for (f = e+1; f < p->inputChan; f++) { /* Check against rest */
5149 int tt;
5150 tt = si[f];
5151 if (cosn > co[tt]) {
5152 si[f] = si[e]; /* Exchange */
5153 si[e] = tt;
5154 cosn = co[tt];
5155 }
5156 }
5157 }
5158 }
5159 #else
5160 /* Do insertion sort on coordinates, smallest to largest. */
5161 {
5162 int f, vf;
5163 unsigned int e;
5164 double v;
5165 for (e = 0; e < p->inputChan; e++)
5166 si[e] = e; /* Initial unsorted indexes */
5167
5168 for (e = 1; e < p->inputChan; e++) {
5169 f = e;
5170 v = co[si[f]];
5171 vf = f;
5172 while (f > 0 && co[si[f-1]] > v) {
5173 si[f] = si[f-1];
5174 f--;
5175 }
5176 si[f] = vf;
5177 }
5178 }
5179 #endif
5180 /* Now compute the weightings, simplex vertices and output values */
5181 {
5182 unsigned int e, f;
5183 double w; /* Current vertex weight */
5184
5185 w = 1.0 - co[si[p->inputChan-1]]; /* Vertex at base of cell */
5186 for (f = 0; f < p->outputChan; f++)
5187 out[f] = w * gp[f];
5188
5189 for (e = p->inputChan-1; e > 0; e--) { /* Middle verticies */
5190 w = co[si[e]] - co[si[e-1]];
5191 gp += p->dinc[si[e]]; /* Move to top of cell in next largest dimension */
5192 for (f = 0; f < p->outputChan; f++)
5193 out[f] += w * gp[f];
5194 }
5195
5196 w = co[si[0]];
5197 gp += p->dinc[si[0]]; /* Far corner from base of cell */
5198 for (f = 0; f < p->outputChan; f++)
5199 out[f] += w * gp[f];
5200 }
5201 return rv;
5202 }
5203
5204 #ifdef NEVER // ~~~99 development code
5205
5206 /* Convert normalized numbers though this Luts multi-dimensional table */
5207 /* using optimised simplex interpolation. */
5208 /* This version optimses the simplex split axis depending on the input */
5209 /* colorspace. */
5210 static int icmLut_lookup_clut_osx(
5211 /* Return 0 on success, 1 if clipping occured, 2 on other error */
5212 icmLut *p, /* Pointer to Lut object */
5213 double *out, /* Output array[inputChan] */
5214 double *in /* Input array[outputChan] */
5215 ) {
5216 int rv = 0;
5217 double *gp; /* Pointer to grid cube base */
5218 double co[MAX_CHAN]; /* Coordinate offset with the grid cell */
5219 int si[MAX_CHAN]; /* co[] Sort index, [0] = smalest */
5220 char xflip[MAX_CHAN]; /* Optimised simplex axis flip flags */
5221
5222 /* Compute base index into grid and coordinate offsets */
5223 {
5224 unsigned int e;
5225 double clutPoints_1 = (double)(p->clutPoints-1);
5226 int clutPoints_2 = p->clutPoints-2;
5227 gp = p->clutTable; /* Base of grid array */
5228
5229 for (e = 0; e < p->inputChan; e++) {
5230 unsigned int x;
5231 double val;
5232 // ~~~999
5233 #ifdef NEVER
5234 xflip[e] = p->finfo[e].bthff;
5235 if (in[e] >= p->finfo[e].fth)
5236 xflip[e] = p->finfo[e].athff;
5237 #else
5238
5239 xflip[e] = 0;
5240 if (e == 0)
5241 xflip[e] = 1;
5242 #endif
5243 val = in[e] * clutPoints_1;
5244 if (val < 0.0) {
5245 val = 0.0;
5246 rv |= 1;
5247 } else if (val > clutPoints_1) {
5248 val = clutPoints_1;
5249 rv |= 1;
5250 }
5251 x = (unsigned int)floor(val); /* Grid coordinate */
5252 if (x > clutPoints_2)
5253 x = clutPoints_2;
5254 co[e] = val - (double)x; /* 1.0 - weight */
5255 gp += x * p->dinc[e]; /* Add index offset for base of cube */
5256 if (xflip[e]) { /* Reverse sense of direction for this axis */
5257 co[e] = 1.0 - co[e];
5258 gp += p->dinc[e];
5259 }
5260 }
5261 }
5262 //printf("*");fflush(stdout);
5263 #ifdef NEVER
5264 /* Do selection sort on coordinates, smallest to largest. */
5265 {
5266 int e, f;
5267 for (e = 0; e < p->inputChan; e++)
5268 si[e] = e; /* Initial unsorted indexes */
5269 for (e = 0; e < (p->inputChan-1); e++) {
5270 double cosn;
5271 cosn = co[si[e]]; /* Current smallest value */
5272 for (f = e+1; f < p->inputChan; f++) { /* Check against rest */
5273 int tt;
5274 tt = si[f];
5275 if (cosn > co[tt]) {
5276 si[f] = si[e]; /* Exchange */
5277 si[e] = tt;
5278 cosn = co[tt];
5279 }
5280 }
5281 }
5282 }
5283 #else
5284 /* Do insertion sort on coordinates, smallest to largest. */
5285 {
5286 int f, vf;
5287 unsigned int e;
5288 double v;
5289 for (e = 0; e < p->inputChan; e++)
5290 si[e] = e; /* Initial unsorted indexes */
5291
5292 for (e = 1; e < p->inputChan; e++) {
5293 f = e;
5294 v = co[si[f]];
5295 vf = f;
5296 while (f > 0 && co[si[f-1]] > v) {
5297 si[f] = si[f-1];
5298 f--;
5299 }
5300 si[f] = vf;
5301 }
5302 }
5303 #endif
5304 /* Now compute the weightings, simplex vertices and output values */
5305 {
5306 unsigned int e, f;
5307 double w; /* Current vertex weight */
5308
5309 w = 1.0 - co[si[p->inputChan-1]]; /* Vertex at base of cell */
5310 for (f = 0; f < p->outputChan; f++)
5311 out[f] = w * gp[f];
5312
5313 for (e = p->inputChan-1; e > 0; e--) { /* Middle verticies */
5314 w = co[si[e]] - co[si[e-1]];
5315 if (xflip[e])
5316 gp -= p->dinc[si[e]]; /* Move to top of cell in next largest dimension */
5317 else
5318 gp += p->dinc[si[e]]; /* Move to top of cell in next largest dimension */
5319 for (f = 0; f < p->outputChan; f++)
5320 out[f] += w * gp[f];
5321 }
5322
5323 w = co[si[0]];
5324 if (xflip[0])
5325 gp -= p->dinc[si[0]]; /* Far corner from base of cell */
5326 else
5327 gp += p->dinc[si[0]]; /* Far corner from base of cell */
5328 for (f = 0; f < p->outputChan; f++)
5329 out[f] += w * gp[f];
5330 }
5331 return rv;
5332 }
5333
5334 #endif /* NEVER */ // ~~~99 development code
5335
5336
5337 /* Convert normalized numbers though this Luts output tables. */
5338 /* Return 0 on success, 1 if clipping occured, 2 on other error */
5339 static int icmLut_lookup_output(
5340 icmLut *p, /* Pointer to Lut object */
5341 double *out, /* Output array[outputChan] */
5342 double *in /* Input array[outputChan] */
5343 ) {
5344 int rv = 0;
5345 unsigned int ix, n;
5346 double outputEnt_1 = (double)(p->outputEnt-1);
5347 double *table = p->outputTable;
5348
5349 if (p->outputEnt == 0) { /* Hmm. */
5350 for (n = 0; n < p->outputChan; n++)
5351 out[n] = in[n];
5352 } else {
5353 /* Use linear interpolation */
5354 for (n = 0; n < p->outputChan; n++, table += p->outputEnt) {
5355 double val, w;
5356 val = in[n] * outputEnt_1;
5357 if (val < 0.0) {
5358 val = 0.0;
5359 rv |= 1;
5360 } else if (val > outputEnt_1) {
5361 val = outputEnt_1;
5362 rv |= 1;
5363 }
5364 ix = (unsigned int)floor(val); /* Grid coordinate */
5365 if (ix > (p->outputEnt-2))
5366 ix = (p->outputEnt-2);
5367 w = val - (double)ix; /* weight */
5368 val = table[ix];
5369 out[n] = val + w * (table[ix+1] - val);
5370 }
5371 }
5372 return rv;
5373 }
5374
5375 /* ----------------------------------------------- */
5376 /* Pseudo - Hilbert count sequencer */
5377
5378 /* This multi-dimensional count sequence is a distributed */
5379 /* Gray code sequence, with direction reversal on every */
5380 /* alternate power of 2 scale. */
5381 /* It is intended to aid cache coherence in multi-dimensional */
5382 /* regular sampling. It approximates the Hilbert curve sequence. */
5383
5384 /* Initialise, returns total usable count */
5385 unsigned
5386 psh_init(
5387 psh *p, /* Pointer to structure to initialise */
5388 int di, /* Dimensionality */
5389 unsigned int res, /* Size per coordinate */
5390 int co[] /* Coordinates to initialise (May be NULL) */
5391 ) {
5392 int e;
5393
5394 p->di = di;
5395 p->res = res;
5396
5397 /* Compute bits */
5398 for (p->bits = 0; (1u << p->bits) < res; p->bits++)
5399 ;
5400
5401 /* Compute the total count mask */
5402 p->tmask = ((((unsigned)1) << (p->bits * di))-1);
5403
5404 /* Compute usable count */
5405 p->count = 1;
5406 for (e = 0; e < di; e++)
5407 p->count *= res;
5408
5409 p->ix = 0;
5410
5411 if (co != NULL) {
5412 for (e = 0; e < di; e++)
5413 co[e] = 0;
5414 }
5415
5416 return p->count;
5417 }
5418
5419 /* Reset the counter */
5420 void
5421 psh_reset(
5422 psh *p /* Pointer to structure */
5423 ) {
5424 p->ix = 0;
5425 }
5426
5427 /* Increment pseudo-hilbert coordinates */
5428 /* Return non-zero if count rolls over to 0 */
5429 int
5430 psh_inc(
5431 psh *p, /* Pointer to structure */
5432 int co[] /* Coordinates to return */
5433 ) {
5434 int di = p->di;
5435 unsigned int res = p->res;
5436 unsigned int bits = p->bits;
5437 int e;
5438
5439 do {
5440 unsigned int b;
5441 int gix; /* Gray code index */
5442
5443 p->ix = (p->ix + 1) & p->tmask;
5444
5445 gix = p->ix ^ (p->ix >> 1); /* Convert to gray code index */
5446
5447 for (e = 0; e < di; e++)
5448 co[e] = 0;
5449
5450 for (b = 0; b < bits; b++) { /* Distribute bits */
5451 if (b & 1) {
5452 for (e = di-1; e >= 0; e--) { /* In reverse order */
5453 co[e] |= (gix & 1) << b;
5454 gix >>= 1;
5455 }
5456 } else {
5457 for (e = 0; e < di; e++) { /* In normal order */
5458 co[e] |= (gix & 1) << b;
5459 gix >>= 1;
5460 }
5461 }
5462 }
5463
5464 /* Convert from Gray to binary coordinates */
5465 for (e = 0; e < di; e++) {
5466 unsigned int sh, tv;
5467
5468 for(sh = 1, tv = co[e];; sh <<= 1) {
5469 unsigned ptv = tv;
5470 tv ^= (tv >> sh);
5471 if (ptv <= 1 || sh == 16)
5472 break;
5473 }
5474 if (tv >= res) /* Dumbo filter - increment again if outside cube range */
5475 break;
5476 co[e] = tv;
5477 }
5478
5479 } while (e < di);
5480
5481 return (p->ix == 0);
5482 }
5483
5484 /* ------------------------------------------------------- */
5485
5486 #ifndef COUNTERS_H
5487
5488 /* Macros for a multi-dimensional counter. */
5489
5490 /* Declare the counter name nn, maximum di mxdi, dimensions di, & count */
5491 /* This counter can have each dimension range clipped */
5492
5493 #define FCOUNT(nn, mxdi, di) \
5494 int nn[mxdi]; /* counter value */ \
5495 int nn##_di = (di); /* Number of dimensions */ \
5496 int nn##_stt[mxdi]; /* start count value */ \
5497 int nn##_res[mxdi]; /* last count +1 */ \
5498 int nn##_e /* dimension index */
5499
5500 #define FRECONF(nn, start, endp1) \
5501 for (nn##_e = 0; nn##_e < nn##_di; nn##_e++) { \
5502 nn##_stt[nn##_e] = (start); /* start count value */ \
5503 nn##_res[nn##_e] = (endp1); /* last count +1 */ \
5504 }
5505
5506 /* Set the counter value to 0 */
5507 #define FC_INIT(nn) \
5508 { \
5509 for (nn##_e = 0; nn##_e < nn##_di; nn##_e++) \
5510 nn[nn##_e] = nn##_stt[nn##_e]; \
5511 nn##_e = 0; \
5512 }
5513
5514 /* Increment the counter value */
5515 #define FC_INC(nn) \
5516 { \
5517 for (nn##_e = 0; nn##_e < nn##_di; nn##_e++) { \
5518 nn[nn##_e]++; \
5519 if (nn[nn##_e] < nn##_res[nn##_e]) \
5520 break; /* No carry */ \
5521 nn[nn##_e] = nn##_stt[nn##_e]; \
5522 } \
5523 }
5524
5525 /* After increment, expression is TRUE if counter is done */
5526 #define FC_DONE(nn) \
5527 (nn##_e >= nn##_di)
5528
5529 #endif /* COUNTERS_H */
5530
5531 /* Parameter to getNormFunc function */
5532 typedef enum {
5533 icmFromLuti = 0, /* return "fromo Lut normalized index" conversion function */
5534 icmToLuti = 1, /* return "to Lut normalized index" conversion function */
5535 icmFromLutv = 2, /* return "from Lut normalized value" conversion function */
5536 icmToLutv = 3 /* return "to Lut normalized value" conversion function */
5537 } icmNormFlag;
5538
5539 /* Return an appropriate color space normalization function, */
5540 /* given the color space and Lut type */
5541 /* Return 0 on success, 1 on match failure */
5542 static int getNormFunc(
5543 icc *icp,
5544 icColorSpaceSignature csig,
5545 icTagTypeSignature tagSig,
5546 icmNormFlag flag,
5547 void (**nfunc)(double *out, double *in)
5548 );
5549
5550 #define CLIP_MARGIN 0.005 /* Margine to allow before reporting clipping = 0.5% */
5551
5552 /* Helper function to set multiple Lut tables simultaneously. */
5553 /* Note that these tables all have to be compatible in */
5554 /* having the same configuration and resolution. */
5555 /* Set errc and return error number in underlying icc */
5556 /* Set warnc if there is clipping in the output values */
5557 /* 1 = input table, 2 = main clut, 3 = clut midpoin, 4 = midpoint interp, 5 = output table */
5558 int icmSetMultiLutTables(
5559 int ntables, /* Number of tables to be set, 1..n */
5560 icmLut **pp, /* Pointer to array of Lut objects */
5561 int flags, /* Setting flags */
5562 void *cbctx, /* Opaque callback context pointer value */
5563 icColorSpaceSignature insig, /* Input color space */
5564 icColorSpaceSignature outsig, /* Output color space */
5565 void (*infunc)(void *cbctx, double *out, double *in),
5566 /* Input transfer function, inspace->inspace' (NULL = default) */
5567 /* Will be called ntables times for each input grid value */
5568 double *inmin, double *inmax, /* Maximum range of inspace' values */
5569 /* (NULL = default) */
5570 void (*clutfunc)(void *cbntx, double *out, double *in),
5571 /* inspace' -> outspace[ntables]' transfer function */
5572 /* will be called once for each input' grid value, and */
5573 /* ntables output values should be written consecutively */
5574 /* to out[]. */
5575 double *clutmin, double *clutmax, /* Maximum range of outspace' values */
5576 /* (NULL = default) */
5577 void (*outfunc)(void *cbntx, double *out, double *in))
5578 /* Output transfer function, outspace'->outspace (NULL = deflt) */
5579 /* Will be called ntables times on each output value */
5580 {
5581 icmLut *p, *pn; /* Pointer to 0'th nd tn'th Lut object */
5582 icc *icp; /* Pointer to common icc */
5583 int tn;
5584 unsigned int e, f, i, n;
5585 double **clutTable2 = NULL; /* Cell center values for ICM_CLUT_SET_APXLS */
5586 double *clutTable3 = NULL; /* Vertex smoothing radius values [ntables] per entry */
5587 int dinc3[MAX_CHAN]; /* Dimensional increment through clut3 (in doubles) */
5588 int dcube3[1 << MAX_CHAN]; /* Hyper cube offsets throught clut3 (in doubles) */
5589 int ii[MAX_CHAN]; /* Index value */
5590 psh counter; /* Pseudo-Hilbert counter */
5591 // double _iv[4 * MAX_CHAN], *iv = &_iv[MAX_CHAN], *ivn; /* Real index value/table value */
5592 int maxchan; /* Actual max of input and output */
5593 double *_iv, *iv, *ivn; /* Real index value/table value */
5594 double imin[MAX_CHAN], imax[MAX_CHAN];
5595 double omin[MAX_CHAN], omax[MAX_CHAN];
5596 void (*ifromindex)(double *out, double *in); /* Index to input color space function */
5597 void (*itoentry)(double *out, double *in); /* Input color space to entry function */
5598 void (*ifromentry)(double *out, double *in); /* Entry to input color space function */
5599 void (*otoentry)(double *out, double *in); /* Output colorspace to table value function */
5600 void (*ofromentry)(double *out, double *in); /* Table value to output color space function */
5601 int clip = 0;
5602
5603 /* Check that everything is OK to proceed */
5604 if (ntables < 1 || ntables > MAX_CHAN) {
5605 if (ntables >= 1) {
5606 icp = pp[0]->icp;
5607 sprintf(icp->err,"icmSetMultiLutTables has illegal number of tables %d",ntables);
5608 return icp->errc = 1;
5609 } else {
5610 /* Can't write error message anywhere */
5611 return 1;
5612 }
5613 }
5614
5615 p = pp[0];
5616 icp = p->icp;
5617
5618 for (tn = 1; tn < ntables; tn++) {
5619 if (pp[tn]->icp != icp) {
5620 sprintf(icp->err,"icmSetMultiLutTables Tables base icc is different");
5621 return icp->errc = 1;
5622 }
5623 if (pp[tn]->ttype != p->ttype) {
5624 sprintf(icp->err,"icmSetMultiLutTables Tables have different Tage Type");
5625 return icp->errc = 1;
5626 }
5627
5628 if (pp[tn]->inputChan != p->inputChan) {
5629 sprintf(icp->err,"icmSetMultiLutTables Tables have different inputChan");
5630 return icp->errc = 1;
5631 }
5632 if (pp[tn]->outputChan != p->outputChan) {
5633 sprintf(icp->err,"icmSetMultiLutTables Tables have different outputChan");
5634 return icp->errc = 1;
5635 }
5636 if (pp[tn]->clutPoints != p->clutPoints) {
5637 sprintf(icp->err,"icmSetMultiLutTables Tables have different clutPoints");
5638 return icp->errc = 1;
5639 }
5640 }
5641
5642 if (getNormFunc(icp, insig, p->ttype, icmFromLuti, &ifromindex) != 0) {
5643 sprintf(icp->err,"icmLut_set_tables index to input colorspace function lookup failed");
5644 return icp->errc = 1;
5645 }
5646 if (getNormFunc(icp, insig, p->ttype, icmToLutv, &itoentry) != 0) {
5647 sprintf(icp->err,"icmLut_set_tables input colorspace to table entry function lookup failed");
5648 return icp->errc = 1;
5649 }
5650 if (getNormFunc(icp, insig, p->ttype, icmFromLutv, &ifromentry) != 0) {
5651 sprintf(icp->err,"icmLut_set_tables table entry to input colorspace function lookup failed");
5652 return icp->errc = 1;
5653 }
5654
5655 if (getNormFunc(icp, outsig, p->ttype, icmToLutv, &otoentry) != 0) {
5656 sprintf(icp->err,"icmLut_set_tables output colorspace to table entry function lookup failed");
5657 return icp->errc = 1;
5658 }
5659 if (getNormFunc(icp, outsig, p->ttype, icmFromLutv, &ofromentry) != 0) {
5660 sprintf(icp->err,"icmLut_set_tables table entry to output colorspace function lookup failed");
5661 return icp->errc = 1;
5662 }
5663
5664 /* Allocate an array to hold the input and output values. */
5665 /* It needs to be able to hold di "index under valus as in[], */
5666 /* and ntables ICM_CLUT_SET_FILTER values as out[], so we assume maxchan >= di */
5667 maxchan = p->inputChan > p->outputChan ? p->inputChan : p->outputChan;
5668 if ((_iv = (double *) icp->al->malloc(icp->al, sizeof(double) * maxchan * (ntables+1)))
5669 == NULL) {
5670 sprintf(icp->err,"icmLut_read: malloc() failed");
5671 return icp->errc = 2;
5672 }
5673 iv = _iv + maxchan; /* Allow for "index under" and smoothing radius values */
5674
5675 /* Setup input table value min-max */
5676 if (inmin == NULL || imax == NULL) {
5677 #ifdef SYMETRICAL_DEFAULT_LAB_RANGE /* Symetrical default range. */
5678 /* We are assuming V2 Lab16 encoding, since this is a lut16type that always uses */
5679 /* this encoding */
5680 if (insig == icSigLabData) { /* Special case Lab */
5681 double mn[3], mx[3];
5682 /* This is to ensure that Lab 100,0,0 maps exactly to a clut grid point. */
5683 /* This should work well if there is an odd grid resolution, */
5684 /* and icclib is being used, as input lookup will */
5685 /* be computed using floating point, so that the CLUT input value */
5686 /* 0.5 can be represented exactly. */
5687 /* Because the symetric range will cause slight clipping, */
5688 /* only do it if the input table has sufficient resolution */
5689 /* to represent the clipping faithfuly. */
5690 if (p->inputEnt >= 64) {
5691 if (p->ttype == icSigLut8Type) {
5692 mn[0] = 0.0, mn[1] = mn[2] = -127.0;
5693 mx[0] = 100.0, mx[1] = mx[2] = 127.0;
5694 } else {
5695 mn[0] = 0.0, mn[1] = mn[2] = -127.0 - 255.0/256.0;
5696 mx[0] = 100.0, mx[1] = mx[2] = 127.0 + 255.0/256.0;
5697 }
5698 itoentry(imin, mn); /* Convert from input color space to table representation */
5699 itoentry(imax, mx);
5700 } else {
5701 for (e = 0; e < p->inputChan; e++) {
5702 imin[e] = 0.0;
5703 imax[e] = 1.0;
5704 }
5705 }
5706 } else
5707 #endif
5708 {
5709 for (e = 0; e < p->inputChan; e++) {
5710 imin[e] = 0.0; /* We are assuming this is true for all other color spaces. */
5711 imax[e] = 1.0;
5712 }
5713 }
5714 } else {
5715 itoentry(imin, inmin); /* Convert from input color space to table representation */
5716 itoentry(imax, inmax);
5717 }
5718
5719 /* Setup output table value min-max */
5720 if (clutmin == NULL || clutmax == NULL) {
5721 #ifdef SYMETRICAL_DEFAULT_LAB_RANGE
5722 /* This really isn't doing much, since the full range encoding doesn't need */
5723 /* any adjustment to map a*b* 0 to an integer value. */
5724 /* We are tweaking the 16 bit L* = 100 to the last index into */
5725 /* the output table, which may help its accuracy slightly. */
5726 /* We are assuming V2 Lab16 encoding, since this is a lut16type that always uses */
5727 /* this encoding */
5728 if (outsig == icSigLabData) { /* Special case Lab */
5729 double mn[3], mx[3];
5730 /* The output of the CLUT will be an 8 or 16 bit value, and we want to */
5731 /* adjust the range so that the input grid point holding the white */
5732 /* point can encode 0.0 exactly. */
5733 /* Note that in the case of the a & b values, the range equates to */
5734 /* normalised 0.0 .. 1.0, since 0 can be represented exactly in it. */
5735 if (p->outputEnt >= 64) {
5736 if (p->ttype == icSigLut8Type) {
5737 mn[0] = 0.0, mn[1] = mn[2] = -128.0;
5738 mx[0] = 100.0, mx[1] = mx[2] = 127.0;
5739 } else {
5740 mn[0] = 0.0, mn[1] = mn[2] = -128.0;
5741 mx[0] = 100.0, mx[1] = mx[2] = (65535.0 * 255.0)/65280.0 - 128.0;
5742 }
5743 otoentry(omin, mn);/* Convert from output color space to table representation */
5744 otoentry(omax, mx);
5745 } else {
5746 for (e = 0; e < p->inputChan; e++) {
5747 omin[e] = 0.0;
5748 omax[e] = 1.0;
5749 }
5750 }
5751 } else
5752 #endif
5753 {
5754 for (f = 0; f < p->outputChan; f++) {
5755 omin[f] = 0.0; /* We are assuming this is true for all other color spaces. */
5756 omax[f] = 1.0;
5757 }
5758 }
5759 } else {
5760 otoentry(omin, clutmin);/* Convert from output color space to table representation */
5761 otoentry(omax, clutmax);
5762 }
5763
5764 /* Create the input table entry values */
5765 for (tn = 0; tn < ntables; tn++) {
5766 pn = pp[tn];
5767 for (n = 0; n < pn->inputEnt; n++) {
5768 double fv;
5769 fv = n/(pn->inputEnt-1.0);
5770 for (e = 0; e < pn->inputChan; e++)
5771 iv[e] = fv;
5772
5773 ifromindex(iv,iv); /* Convert from index value to input color space value */
5774
5775 if (infunc != NULL)
5776 infunc(cbctx, iv, iv); /* In colorspace -> input table -> In colorspace. */
5777
5778 itoentry(iv,iv); /* Convert from input color space value to table value */
5779
5780 /* Expand used range to 0.0 - 1.0, and clip to legal values */
5781 /* Note that if the range is reduced, and clipping occurs, */
5782 /* then there should be enough resolution within the input */
5783 /* table, to represent the sharp edges of the clipping. */
5784 for (e = 0; e < pn->inputChan; e++) {
5785 double tt;
5786 tt = (iv[e] - imin[e])/(imax[e] - imin[e]);
5787 if (tt < 0.0) {
5788 DBGSLC(("iclip: tt = %f, iv = %f, omin = %f, omax = %f\n",tt,iv[e],omin[e],omax[e]));
5789 if (tt < -CLIP_MARGIN)
5790 clip = 1;
5791 tt = 0.0;
5792 } else if (tt > 1.0) {
5793 DBGSLC(("iclip: tt = %f, iv = %f, omin = %f, omax = %f\n",tt,iv[e],omin[e],omax[e]));
5794 if (tt > (1.0 + CLIP_MARGIN))
5795 clip = 1;
5796 tt = 1.0;
5797 }
5798 iv[e] = tt;
5799 }
5800
5801 for (e = 0; e < pn->inputChan; e++) /* Input tables */
5802 pn->inputTable[e * pn->inputEnt + n] = iv[e];
5803 }
5804 }
5805
5806 /* Allocate space for cell center value lookup */
5807 if (flags & ICM_CLUT_SET_APXLS) {
5808 if ((clutTable2 = (double **) icp->al->calloc(icp->al,sizeof(double *), ntables)) == NULL) {
5809 sprintf(icp->err,"icmLut_set_tables malloc of cube center array failed");
5810 icp->al->free(icp->al, _iv);
5811 return icp->errc = 1;
5812 }
5813 for (tn = 0; tn < ntables; tn++) {
5814 if ((clutTable2[tn] = (double *) icp->al->calloc(icp->al,sizeof(double),
5815 p->clutTable_size)) == NULL) {
5816 for (--tn; tn >= 0; tn--)
5817 icp->al->free(icp->al, clutTable2[tn]);
5818 icp->al->free(icp->al, _iv);
5819 icp->al->free(icp->al, clutTable2);
5820 sprintf(icp->err,"icmLut_set_tables malloc of cube center array failed");
5821 return icp->errc = 1;
5822 }
5823 }
5824 }
5825
5826 /* Allocate space for smoothing radius values */
5827 if (flags & ICM_CLUT_SET_FILTER) {
5828 unsigned int j, g, size;
5829
5830 /* Private: compute dimensional increment though clut3 */
5831 i = p->inputChan-1;
5832 dinc3[i--] = ntables;
5833 for (; i < p->inputChan; i--)
5834 dinc3[i] = dinc3[i+1] * p->clutPoints;
5835
5836 /* Private: compute offsets from base of cube to other corners */
5837 for (dcube3[0] = 0, g = 1, j = 0; j < p->inputChan; j++) {
5838 for (i = 0; i < g; i++)
5839 dcube3[g+i] = dcube3[i] + dinc3[j];
5840 g *= 2;
5841 }
5842
5843 if ((size = sat_mul(ntables, sat_pow(p->clutPoints,p->inputChan))) == UINT_MAX) {
5844 sprintf(icp->err,"icmLut_alloc size overflow");
5845 if (flags & ICM_CLUT_SET_APXLS) {
5846 for (tn = 0; tn < ntables; tn++)
5847 icp->al->free(icp->al, clutTable2[tn]);
5848 }
5849 icp->al->free(icp->al, clutTable2);
5850 icp->al->free(icp->al, _iv);
5851 return icp->errc = 1;
5852 }
5853
5854 if ((clutTable3 = (double *) icp->al->calloc(icp->al,sizeof(double),
5855 size)) == NULL) {
5856 if (flags & ICM_CLUT_SET_APXLS) {
5857 for (tn = 0; tn < ntables; tn++)
5858 icp->al->free(icp->al, clutTable2[tn]);
5859 }
5860 icp->al->free(icp->al, clutTable2);
5861 icp->al->free(icp->al, _iv);
5862 sprintf(icp->err,"icmLut_set_tables malloc of vertex smoothing value array failed");
5863 return icp->errc = 1;
5864 }
5865 }
5866
5867 /* Create the multi-dimensional lookup table values */
5868
5869 /* To make this clut function cache friendly, we use the pseudo-hilbert */
5870 /* count sequence. This keeps each point close to the last in the */
5871 /* multi-dimensional space. This is the point of setting multiple Luts at */
5872 /* once too - the assumption is that these tables are all related (different */
5873 /* gamut compressions for instance), and hence calling the clutfunc() with */
5874 /* close values will maximise reverse lookup cache hit rate. */
5875
5876 psh_init(&counter, p->inputChan, p->clutPoints, ii); /* Initialise counter */
5877
5878 /* Itterate through all verticies in the grid */
5879 for (;;) {
5880 int ti, ti3; /* Table indexes */
5881
5882 for (ti = e = 0; e < p->inputChan; e++) { /* Input tables */
5883 ti += ii[e] * p->dinc[e]; /* Clut index */
5884 iv[e] = ii[e]/(p->clutPoints-1.0); /* Vertex coordinates */
5885 iv[e] = iv[e] * (imax[e] - imin[e]) + imin[e]; /* Undo expansion to 0.0 - 1.0 */
5886 *((int *)&iv[-((int)e)-1]) = ii[e]; /* Trick to supply grid index in iv[] */
5887 }
5888
5889 if (flags & ICM_CLUT_SET_FILTER) {
5890 for (ti3 = e = 0; e < p->inputChan; e++) /* Input tables */
5891 ti3 += ii[e] * dinc3[e]; /* Clut3 index */
5892 }
5893
5894 DBGSL(("\nix %s\n",icmPiv(p->inputChan, ii)));
5895 DBGSL(("raw itv %s to iv'",icmPdv(p->inputChan, iv)));
5896 ifromentry(iv,iv); /* Convert from table value to input color space */
5897 DBGSL((" %s\n",icmPdv(p->inputChan, iv)));
5898
5899 /* Apply incolor -> outcolor function we want to represent for all tables */
5900 DBGSL(("iv: %s to ov'",icmPdv(p->inputChan, iv)));
5901 clutfunc(cbctx, iv, iv);
5902 DBGSL((" %s\n",icmPdv(p->outputChan, iv)));
5903
5904 /* Save the results to the output tables */
5905 for (tn = 0, ivn = iv; tn < ntables; ivn += p->outputChan, tn++) {
5906 pn = pp[tn];
5907
5908 DBGSL(("tn %d, ov' %s -> otv",tn,icmPdv(p->outputChan, ivn)));
5909 otoentry(ivn,ivn); /* Convert from output color space value to table value */
5910 DBGSL((" %s\n -> oval",icmPdv(p->outputChan, ivn)));
5911
5912 /* Expand used range to 0.0 - 1.0, and clip to legal values */
5913 for (f = 0; f < pn->outputChan; f++) {
5914 double tt;
5915 tt = (ivn[f] - omin[f])/(omax[f] - omin[f]);
5916 if (tt < 0.0) {
5917 DBGSLC(("lclip: tt = %f, ivn= %f, omin = %f, omax = %f\n",tt,ivn[f],omin[f],omax[f]));
5918 if (tt < -CLIP_MARGIN)
5919 clip = 2;
5920 tt = 0.0;
5921 } else if (tt > 1.0) {
5922 DBGSLC(("lclip: tt = %f, ivn= %f, omin = %f, omax = %f\n",tt,ivn[f],omin[f],omax[f]));
5923 if (tt > (1.0 + CLIP_MARGIN))
5924 clip = 2;
5925 tt = 1.0;
5926 }
5927 ivn[f] = tt;
5928 }
5929
5930 for (f = 0; f < pn->outputChan; f++) /* Output chans */
5931 pn->clutTable[ti + f] = ivn[f];
5932 DBGSL((" %s\n",icmPdv(pn->outputChan, ivn)));
5933
5934 if (flags & ICM_CLUT_SET_FILTER) {
5935 clutTable3[ti3 + tn] = iv[-1 -tn]; /* Filter radiuses */
5936 }
5937 }
5938
5939 /* Lookup cell center value if ICM_CLUT_SET_APXLS */
5940 if (clutTable2 != NULL) {
5941
5942 for (e = 0; e < p->inputChan; e++) {
5943 if (ii[e] >= (p->clutPoints-1))
5944 break; /* Don't lookup beyond last */
5945 iv[e] = (ii[e] + 0.5)/(p->clutPoints-1.0); /* Vertex coordinates + 0.5 */
5946 iv[e] = iv[e] * (imax[e] - imin[e]) + imin[e]; /* Undo expansion to 0.0 - 1.0 */
5947 *((int *)&iv[-((int)e)-1]) = ii[e]; /* Trick to supply grid index in iv[] */
5948 /* (Not this is only the base for +0.5) */
5949 }
5950
5951 if (e >= p->inputChan) { /* We're not on the last row */
5952
5953 ifromentry(iv,iv); /* Convert from table value to input color space */
5954
5955 /* Apply incolor -> outcolor function we want to represent */
5956 clutfunc(cbctx, iv, iv);
5957
5958 /* Save the results to the output tables */
5959 for (tn = 0, ivn = iv; tn < ntables; ivn += p->outputChan, tn++) {
5960 pn = pp[tn];
5961
5962 otoentry(ivn,ivn); /* Convert from output color space value to table value */
5963
5964 /* Expand used range to 0.0 - 1.0, and clip to legal values */
5965 for (f = 0; f < pn->outputChan; f++) {
5966 double tt;
5967 tt = (ivn[f] - omin[f])/(omax[f] - omin[f]);
5968 if (tt < 0.0) {
5969 DBGSLC(("lclip: tt = %f, ivn= %f, omin = %f, omax = %f\n",tt,ivn[f],omin[f],omax[f]));
5970 if (tt < -CLIP_MARGIN)
5971 clip = 3;
5972 tt = 0.0;
5973 } else if (tt > 1.0) {
5974 DBGSLC(("lclip: tt = %f, ivn= %f, omin = %f, omax = %f\n",tt,ivn[f],omin[f],omax[f]));
5975 if (tt > (1.0 + CLIP_MARGIN))
5976 clip = 3;
5977 tt = 1.0;
5978 }
5979 ivn[f] = tt;
5980 }
5981
5982 for (f = 0; f < pn->outputChan; f++) /* Output chans */
5983 clutTable2[tn][ti + f] = ivn[f];
5984 }
5985 }
5986 }
5987
5988 /* Increment index within block (Reverse index significancd) */
5989 if (psh_inc(&counter, ii))
5990 break;
5991 }
5992
5993 #define APXLS_WHT 0.5
5994 #define APXLS_DIFF_THRHESH 0.2
5995 /* Deal with cell center value, aproximate least squares adjustment. */
5996 /* Subtract some of the mean of the surrounding center values from each grid value. */
5997 /* Skip the edges so that things like the white point are not changed. */
5998 /* Avoid modifying the value if the difference between the */
5999 /* interpolated value and the current value is too great, */
6000 /* and there is the possibility of different color aliases. */
6001 if (clutTable2 != NULL) {
6002 int ti; /* cube vertex table index */
6003 int ti2; /* cube center table2 index */
6004 int ee;
6005 double cw = 1.0/(double)(1 << p->inputChan); /* Weight for each cube corner */
6006
6007 /* For each cell center point except last row */
6008 for (e = 0; e < p->inputChan; e++)
6009 ii[e] = 0; /* init coords */
6010
6011 /* Compute linear interpolated value from center values */
6012 for (ee = 0; ee < p->inputChan;) {
6013
6014 /* Compute base index for table2 */
6015 for (ti2 = e = 0; e < p->inputChan; e++) /* Input tables */
6016 ti2 += ii[e] * p->dinc[e]; /* Clut index */
6017
6018 ti = ti2 + p->dcube[(1 << p->inputChan)-1]; /* +1 to each coord for vertex index */
6019
6020 for (tn = 0; tn < ntables; tn++) {
6021 double mval[MAX_CHAN], vv;
6022 double maxd = 0.0;
6023
6024 pn = pp[tn];
6025
6026 /* Compute mean of center values */
6027 for (f = 0; f < pn->outputChan; f++) { /* Output chans */
6028
6029 mval[f] = 0.0;
6030 for (i = 0; i < (1 << p->inputChan); i++) { /* For surrounding center values */
6031 mval[f] += clutTable2[tn][ti2 + p->dcube[i] + f];
6032 }
6033 mval[f] = pn->clutTable[ti + f] - mval[f] * cw; /* Diff to mean */
6034 vv = fabs(mval[f]);
6035 if (vv > maxd)
6036 maxd = vv;
6037 }
6038
6039 if (pn->outputChan <= 3 || maxd < APXLS_DIFF_THRHESH) {
6040 for (f = 0; f < pn->outputChan; f++) { /* Output chans */
6041
6042 vv = pn->clutTable[ti + f] + APXLS_WHT * mval[f];
6043
6044 /* Hmm. This is a bit crude. How do we know valid range is 0-1 ? */
6045 /* What about an ink limit ? */
6046 if (vv < 0.0) {
6047 vv = 0.0;
6048 } else if (vv > 1.0) {
6049 vv = 1.0;
6050 }
6051 pn->clutTable[ti + f] = vv;
6052 }
6053 }
6054 }
6055
6056 /* Increment coord */
6057 for (ee = 0; ee < p->inputChan; ee++) {
6058 if (++ii[ee] < (p->clutPoints-2)) /* Don't go through upper edge */
6059 break; /* No carry */
6060 ii[ee] = 0;
6061 }
6062 }
6063
6064 /* Done with center values */
6065 for (tn = 0; tn < ntables; tn++)
6066 icp->al->free(icp->al, clutTable2[tn]);
6067 icp->al->free(icp->al, clutTable2);
6068 }
6069
6070 /* Apply any smoothing in the clipped region to the resulting clutTable */
6071 if (clutTable3 != NULL) {
6072 double *clutTable1; /* Copy of current unfilted values */
6073 FCOUNT(cc, MAX_CHAN, p->inputChan); /* Surrounding counter */
6074
6075 if ((clutTable1 = (double *) icp->al->calloc(icp->al,sizeof(double),
6076 p->clutTable_size)) == NULL) {
6077 icp->al->free(icp->al, clutTable3);
6078 icp->al->free(icp->al, _iv);
6079 sprintf(icp->err,"icmLut_set_tables malloc of grid copy failed");
6080 return icp->errc = 1;
6081 }
6082
6083 for (tn = 0; tn < ntables; tn++) {
6084 int aa;
6085 int ee;
6086 int ti, ti3; /* Table indexes */
6087
6088 pn = pp[tn];
6089
6090 /* For each pass */
6091 for (aa = 0; aa < 2; aa++) {
6092
6093 /* Copy current values */
6094 memcpy(clutTable1, pn->clutTable, sizeof(double) * pn->clutTable_size);
6095
6096 /* Filter each point */
6097 for (e = 0; e < pn->inputChan; e++)
6098 ii[e] = 0; /* init coords */
6099
6100 /* Compute linear interpolated error to actual cell center value */
6101 for (ee = 0; ee < pn->inputChan;) {
6102 double rr; /* Filter radius */
6103 int ir; /* Integer radius */
6104 double tw; /* Total weight */
6105
6106 /* Compute base index for this cell */
6107 for (ti3 = ti = e = 0; e < pn->inputChan; e++) { /* Input tables */
6108 ti += ii[e] * pn->dinc[e]; /* Clut index */
6109 ti3 += ii[e] * dinc3[e]; /* Clut3 index */
6110 }
6111 rr = clutTable3[ti3 + tn] * (pn->clutPoints-1.0);
6112 ir = (int)floor(rr + 0.5); /* Don't bother unless 1/2 over vertex */
6113
6114 if (ir < 1)
6115 goto next_vert;
6116
6117 //FRECONF(cc, -ir, ir + 1); /* Set size of surroundign grid */
6118
6119 /* Clip scanning cube to be within grid */
6120 for (e = 0; e < pn->inputChan; e++) {
6121 int cr = ir;
6122 if ((ii[e] - ir) < 0)
6123 cr = ii[e];
6124 if ((ii[e] + ir) >= pn->clutPoints)
6125 cr = pn->clutPoints -1 -ii[e];
6126
6127 cc_stt[e] = -cr;
6128 cc_res[e] = cr + 1;
6129 }
6130
6131 for (f = 0; f < pn->outputChan; f++)
6132 pn->clutTable[ti + f] = 0.0;
6133 tw = 0.0;
6134
6135 FC_INIT(cc)
6136 for (tw = 0.0; !FC_DONE(cc);) {
6137 double r;
6138 int tti;
6139
6140 /* Radius of this cell */
6141 for (r = 0.0, tti = e = 0; e < pn->inputChan; e++) {
6142 int ix;
6143 r += cc[e] * cc[e];
6144 tti += (ii[e] + cc[e]) * p->dinc[e];
6145 }
6146 r = sqrt(r);
6147
6148 if (r <= rr && e >= pn->inputChan) {
6149 double w = (rr - r)/rr; /* Triangle weighting */
6150 w = sqrt(w);
6151 for (f = 0; f < pn->outputChan; f++)
6152 pn->clutTable[ti+f] += w * clutTable1[tti + f];
6153 tw += w;
6154 }
6155 FC_INC(cc);
6156 }
6157 for (f = 0; f < pn->outputChan; f++) {
6158 double vv = pn->clutTable[ti+f] / tw;
6159 if (vv < 0.0) {
6160 vv = 0.0;
6161 } else if (vv > 1.0) {
6162 vv = 1.0;
6163 }
6164 pn->clutTable[ti+f] = vv;
6165 }
6166
6167 /* Increment coord */
6168 next_vert:;
6169 for (ee = 0; ee < pn->inputChan; ee++) {
6170 if (++ii[ee] < (pn->clutPoints-1)) /* Don't go through upper edge */
6171 break; /* No carry */
6172 ii[ee] = 0;
6173 }
6174 } /* Next grid point to filter */
6175 } /* Next pass */
6176 } /* Next table */
6177
6178 free(clutTable1);
6179 free(clutTable3);
6180 }
6181
6182 /* Create the output table entry values */
6183 for (tn = 0; tn < ntables; tn++) {
6184 pn = pp[tn];
6185 for (n = 0; n < pn->outputEnt; n++) {
6186 double fv;
6187 fv = n/(pn->outputEnt-1.0);
6188 for (f = 0; f < pn->outputChan; f++)
6189 iv[f] = fv;
6190
6191 /* Undo expansion to 0.0 - 1.0 */
6192 for (f = 0; f < pn->outputChan; f++) /* Output tables */
6193 iv[f] = iv[f] * (omax[f] - omin[f]) + omin[f];
6194
6195 ofromentry(iv,iv); /* Convert from table value to output color space value */
6196
6197 if (outfunc != NULL)
6198 outfunc(cbctx, iv, iv); /* Out colorspace -> output table -> out colorspace. */
6199
6200 otoentry(iv,iv); /* Convert from output color space value to table value */
6201
6202 /* Clip to legal values */
6203 for (f = 0; f < pn->outputChan; f++) {
6204 double tt;
6205 tt = iv[f];
6206 if (tt < 0.0) {
6207 DBGSLC(("oclip: tt = %f\n",tt));
6208 if (tt < -CLIP_MARGIN)
6209 clip = 5;
6210 tt = 0.0;
6211 } else if (tt > 1.0) {
6212 DBGSLC(("oclip: tt = %f\n",tt));
6213 if (tt > (1.0 + CLIP_MARGIN))
6214 clip = 5;
6215 tt = 1.0;
6216 }
6217 iv[f] = tt;
6218 }
6219
6220 for (f = 0; f < pn->outputChan; f++) /* Input tables */
6221 pn->outputTable[f * pn->outputEnt + n] = iv[f];
6222 }
6223 }
6224
6225 icp->al->free(icp->al, _iv);
6226
6227 icp->warnc = 0;
6228 if (clip) {
6229 DBGSLC(("Returning clip status = %d\n",clip));
6230 icp->warnc = clip;
6231 }
6232
6233 return 0;
6234 }
6235
6236 /* Helper function to initialize a Lut tables contents */
6237 /* from supplied transfer functions. */
6238 /* Set errc and return error number */
6239 /* Set warnc if there is clipping in the output values */
6240 static int icmLut_set_tables (
6241 icmLut *p, /* Pointer to Lut object */
6242 int flags, /* Setting flags */
6243 void *cbctx, /* Opaque callback context pointer value */
6244 icColorSpaceSignature insig, /* Input color space */
6245 icColorSpaceSignature outsig, /* Output color space */
6246 void (*infunc)(void *cbcntx, double *out, double *in),
6247 /* Input transfer function, inspace->inspace' (NULL = default) */
6248 double *inmin, double *inmax, /* Maximum range of inspace' values (NULL = default) */
6249 void (*clutfunc)(void *cbctx, double *out, double *in),
6250 /* inspace' -> outspace' transfer function */
6251 double *clutmin, double *clutmax, /* Maximum range of outspace' values (NULL = default) */
6252 void (*outfunc)(void *cbctx, double *out, double *in)
6253 /* Output transfer function, outspace'->outspace (NULL = deflt) */
6254 ) {
6255 struct _icmLut *pp[3];
6256
6257 /* Simply call the multiple table function with one table */
6258 pp[0] = p;
6259 return icmSetMultiLutTables(1, pp, flags,
6260 cbctx, insig, outsig,
6261 infunc,
6262 inmin, inmax,
6263 clutfunc,
6264 clutmin, clutmax,
6265 outfunc);
6266 }
6267
6268 /* - - - - - - - - - - - - - - - - */
6269 /* Return the number of bytes needed to write this tag */
6270 static unsigned int icmLut_get_size(
6271 icmBase *pp
6272 ) {
6273 icmLut *p = (icmLut *)pp;
6274 unsigned int len = 0;
6275
6276 if (p->ttype == icSigLut8Type) {
6277 len = sat_add(len, 48); /* tag and header */
6278 len = sat_add(len, sat_mul3(1, p->inputChan, p->inputEnt));
6279 len = sat_add(len, sat_mul3(1, p->outputChan, sat_pow(p->clutPoints,p->inputChan)));
6280 len = sat_add(len, sat_mul3(1, p->outputChan, p->outputEnt));
6281 } else {
6282 len = sat_add(len, 52); /* tag and header */
6283 len = sat_add(len, sat_mul3(2, p->inputChan, p->inputEnt));
6284 len = sat_add(len, sat_mul3(2, p->outputChan, sat_pow(p->clutPoints,p->inputChan)));
6285 len = sat_add(len, sat_mul3(2, p->outputChan, p->outputEnt));
6286 }
6287 return len;
6288 }
6289
6290 /* read the object, return 0 on success, error code on fail */
6291 static int icmLut_read(
6292 icmBase *pp,
6293 unsigned int len, /* tag length */
6294 unsigned int of /* start offset within file */
6295 ) {
6296 icmLut *p = (icmLut *)pp;
6297 icc *icp = p->icp;
6298 int rv = 0;
6299 unsigned int i, j, g, size;
6300 char *bp, *buf;
6301
6302 if (len < 4) {
6303 sprintf(icp->err,"icmLut_read: Tag too small to be legal");
6304 return icp->errc = 1;
6305 }
6306
6307 /* Allocate a file read buffer */
6308 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
6309 sprintf(icp->err,"icmLut_read: malloc() failed");
6310 return icp->errc = 2;
6311 }
6312 bp = buf;
6313
6314 /* Read portion of file into buffer */
6315 if ( icp->fp->seek(icp->fp, of) != 0
6316 || icp->fp->read(icp->fp, bp, 1, len) != len) {
6317 sprintf(icp->err,"icmLut_read: fseek() or fread() failed");
6318 icp->al->free(icp->al, buf);
6319 return icp->errc = 1;
6320 }
6321
6322 /* Read type descriptor from the buffer */
6323 p->ttype = (icTagTypeSignature)read_SInt32Number(bp);
6324 if (p->ttype != icSigLut8Type && p->ttype != icSigLut16Type) {
6325 sprintf(icp->err,"icmLut_read: Wrong tag type for icmLut");
6326 icp->al->free(icp->al, buf);
6327 return icp->errc = 1;
6328 }
6329
6330 if (p->ttype == icSigLut8Type) {
6331 if (len < 48) {
6332 sprintf(icp->err,"icmLut_read: Tag too small to be legal");
6333 icp->al->free(icp->al, buf);
6334 return icp->errc = 1;
6335 }
6336 } else {
6337 if (len < 52) {
6338 sprintf(icp->err,"icmLut_read: Tag too small to be legal");
6339 icp->al->free(icp->al, buf);
6340 return icp->errc = 1;
6341 }
6342 }
6343
6344 /* Read in the info common to 8 and 16 bit Lut */
6345 p->inputChan = read_UInt8Number(bp+8);
6346 p->outputChan = read_UInt8Number(bp+9);
6347 p->clutPoints = read_UInt8Number(bp+10);
6348
6349 /* Sanity check */
6350 if (p->inputChan > MAX_CHAN) {
6351 sprintf(icp->err,"icmLut_read: Can't handle > %d input channels\n",MAX_CHAN);
6352 return icp->errc = 1;
6353 }
6354
6355 if (p->outputChan > MAX_CHAN) {
6356 sprintf(icp->err,"icmLut_read: Can't handle > %d output channels\n",MAX_CHAN);
6357 return icp->errc = 1;
6358 }
6359
6360 /* Read 3x3 transform matrix */
6361 for (j = 0; j < 3; j++) { /* Rows */
6362 for (i = 0; i < 3; i++) { /* Columns */
6363 p->e[j][i] = read_S15Fixed16Number(bp + 12 + ((j * 3 + i) * 4));
6364 }
6365 }
6366 /* Read 16 bit specific stuff */
6367 if (p->ttype == icSigLut8Type) {
6368 p->inputEnt = 256; /* By definition */
6369 p->outputEnt = 256; /* By definition */
6370 bp = buf+48;
6371 } else {
6372 p->inputEnt = read_UInt16Number(bp+48);
6373 p->outputEnt = read_UInt16Number(bp+50);
6374 bp = buf+52;
6375 }
6376
6377 /* Sanity check dimensions. This protects against */
6378 /* subsequent integer overflows involving the dimensions. */
6379 if ((size = icmLut_get_size((icmBase *)p)) == UINT_MAX
6380 || size > len) {
6381 sprintf(icp->err,"icmLut_read: Tag wrong size for contents");
6382 icp->al->free(icp->al, buf);
6383 return icp->errc = 1;
6384 }
6385
6386 /* Read the input tables */
6387 size = (p->inputChan * p->inputEnt);
6388 if ((rv = p->allocate((icmBase *)p)) != 0) {
6389 icp->al->free(icp->al, buf);
6390 return rv;
6391 }
6392 if (p->ttype == icSigLut8Type) {
6393 for (i = 0; i < size; i++, bp += 1)
6394 p->inputTable[i] = read_DCS8Number(bp);
6395 } else {
6396 for (i = 0; i < size; i++, bp += 2)
6397 p->inputTable[i] = read_DCS16Number(bp);
6398 }
6399
6400 /* Read the clut table */
6401 size = (p->outputChan * sat_pow(p->clutPoints,p->inputChan));
6402 if ((rv = p->allocate((icmBase *)p)) != 0) {
6403 icp->al->free(icp->al, buf);
6404 return rv;
6405 }
6406 if (p->ttype == icSigLut8Type) {
6407 for (i = 0; i < size; i++, bp += 1)
6408 p->clutTable[i] = read_DCS8Number(bp);
6409 } else {
6410 for (i = 0; i < size; i++, bp += 2)
6411 p->clutTable[i] = read_DCS16Number(bp);
6412 }
6413
6414 /* Read the output tables */
6415 size = (p->outputChan * p->outputEnt);
6416 if ((rv = p->allocate((icmBase *)p)) != 0) {
6417 icp->al->free(icp->al, buf);
6418 return rv;
6419 }
6420 if (p->ttype == icSigLut8Type) {
6421 for (i = 0; i < size; i++, bp += 1)
6422 p->outputTable[i] = read_DCS8Number(bp);
6423 } else {
6424 for (i = 0; i < size; i++, bp += 2)
6425 p->outputTable[i] = read_DCS16Number(bp);
6426 }
6427
6428 /* Private: compute dimensional increment though clut */
6429 /* Note that first channel varies least rapidly. */
6430 i = p->inputChan-1;
6431 p->dinc[i--] = p->outputChan;
6432 for (; i < p->inputChan; i--)
6433 p->dinc[i] = p->dinc[i+1] * p->clutPoints;
6434
6435 /* Private: compute offsets from base of cube to other corners */
6436 for (p->dcube[0] = 0, g = 1, j = 0; j < p->inputChan; j++) {
6437 for (i = 0; i < g; i++)
6438 p->dcube[g+i] = p->dcube[i] + p->dinc[j];
6439 g *= 2;
6440 }
6441
6442 icp->al->free(icp->al, buf);
6443 return 0;
6444 }
6445
6446 /* Write the contents of the object. Return 0 on sucess, error code on failure */
6447 static int icmLut_write(
6448 icmBase *pp,
6449 unsigned int of /* File offset to write from */
6450 ) {
6451 icmLut *p = (icmLut *)pp;
6452 icc *icp = p->icp;
6453 unsigned int i,j;
6454 unsigned int len, size;
6455 char *bp, *buf; /* Buffer to write from */
6456 int rv = 0;
6457
6458 /* Allocate a file write buffer */
6459 if ((len = p->get_size((icmBase *)p)) == UINT_MAX) {
6460 sprintf(icp->err,"icmLut_write get_size overflow");
6461 return icp->errc = 1;
6462 }
6463 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
6464 sprintf(icp->err,"icmLut_write malloc() failed");
6465 return icp->errc = 2;
6466 }
6467 bp = buf;
6468
6469 /* Write type descriptor to the buffer */
6470 if ((rv = write_SInt32Number((int)p->ttype,bp)) != 0) {
6471 sprintf(icp->err,"icmLut_write: write_SInt32Number() failed");
6472 icp->al->free(icp->al, buf);
6473 return icp->errc = rv;
6474 }
6475 write_SInt32Number(0,bp+4); /* Set padding to 0 */
6476
6477 /* Write the info common to 8 and 16 bit Lut */
6478 if ((rv = write_UInt8Number(p->inputChan, bp+8)) != 0) {
6479 sprintf(icp->err,"icmLut_write: write_UInt8Number() failed");
6480 icp->al->free(icp->al, buf);
6481 return icp->errc = rv;
6482 }
6483 if ((rv = write_UInt8Number(p->outputChan, bp+9)) != 0) {
6484 sprintf(icp->err,"icmLut_write: write_UInt8Number() failed");
6485 icp->al->free(icp->al, buf);
6486 return icp->errc = rv;
6487 }
6488 if ((rv = write_UInt8Number(p->clutPoints, bp+10)) != 0) {
6489 sprintf(icp->err,"icmLut_write: write_UInt8Number() failed");
6490 icp->al->free(icp->al, buf);
6491 return icp->errc = rv;
6492 }
6493
6494 write_UInt8Number(0, bp+11); /* Set padding to 0 */
6495
6496 /* Write 3x3 transform matrix */
6497 for (j = 0; j < 3; j++) { /* Rows */
6498 for (i = 0; i < 3; i++) { /* Columns */
6499 if ((rv = write_S15Fixed16Number(p->e[j][i],bp + 12 + ((j * 3 + i) * 4))) != 0) {
6500 sprintf(icp->err,"icmLut_write: write_S15Fixed16Number() failed");
6501 icp->al->free(icp->al, buf);
6502 return icp->errc = rv;
6503 }
6504 }
6505 }
6506
6507 /* Write 16 bit specific stuff */
6508 if (p->ttype == icSigLut8Type) {
6509 if (p->inputEnt != 256 || p->outputEnt != 256) {
6510 sprintf(icp->err,"icmLut_write: 8 bit Input and Output tables must be 256 entries");
6511 icp->al->free(icp->al, buf);
6512 return icp->errc = 1;
6513 }
6514 bp = buf+48;
6515 } else {
6516 if (p->inputEnt > 4096 || p->outputEnt > 4096) {
6517 sprintf(icp->err,"icmLut_write: 16 bit Input and Output tables must each be less than 4096 entries");
6518 icp->al->free(icp->al, buf);
6519 return icp->errc = 1;
6520 }
6521 if ((rv = write_UInt16Number(p->inputEnt, bp+48)) != 0) {
6522 sprintf(icp->err,"icmLut_write: write_UInt16Number() failed");
6523 icp->al->free(icp->al, buf);
6524 return icp->errc = rv;
6525 }
6526 if ((rv = write_UInt16Number(p->outputEnt, bp+50)) != 0) {
6527 sprintf(icp->err,"icmLut_write: write_UInt16Number() failed");
6528 icp->al->free(icp->al, buf);
6529 return icp->errc = rv;
6530 }
6531 bp = buf+52;
6532 }
6533
6534 /* Write the input tables */
6535 size = (p->inputChan * p->inputEnt);
6536 if (p->ttype == icSigLut8Type) {
6537 for (i = 0; i < size; i++, bp += 1) {
6538 if ((rv = write_DCS8Number(p->inputTable[i], bp)) != 0) {
6539 sprintf(icp->err,"icmLut_write: inputTable write_DCS8Number() failed");
6540 icp->al->free(icp->al, buf);
6541 return icp->errc = rv;
6542 }
6543 }
6544 } else {
6545 for (i = 0; i < size; i++, bp += 2) {
6546 if ((rv = write_DCS16Number(p->inputTable[i], bp)) != 0) {
6547 sprintf(icp->err,"icmLut_write: inputTable write_DCS16Number(%f) failed",p->inputTable[i]);
6548 icp->al->free(icp->al, buf);
6549 return icp->errc = rv;
6550 }
6551 }
6552 }
6553
6554 /* Write the clut table */
6555 size = (p->outputChan * sat_pow(p->clutPoints,p->inputChan));
6556 if (p->ttype == icSigLut8Type) {
6557 for (i = 0; i < size; i++, bp += 1) {
6558 if ((rv = write_DCS8Number(p->clutTable[i], bp)) != 0) {
6559 sprintf(icp->err,"icmLut_write: clutTable write_DCS8Number() failed");
6560 icp->al->free(icp->al, buf);
6561 return icp->errc = rv;
6562 }
6563 }
6564 } else {
6565 for (i = 0; i < size; i++, bp += 2) {
6566 if ((rv = write_DCS16Number(p->clutTable[i], bp)) != 0) {
6567 sprintf(icp->err,"icmLut_write: clutTable write_DCS16Number(%f) failed",p->clutTable[i]);
6568 icp->al->free(icp->al, buf);
6569 return icp->errc = rv;
6570 }
6571 }
6572 }
6573
6574 /* Write the output tables */
6575 size = (p->outputChan * p->outputEnt);
6576 if (p->ttype == icSigLut8Type) {
6577 for (i = 0; i < size; i++, bp += 1) {
6578 if ((rv = write_DCS8Number(p->outputTable[i], bp)) != 0) {
6579 sprintf(icp->err,"icmLut_write: outputTable write_DCS8Number() failed");
6580 icp->al->free(icp->al, buf);
6581 return icp->errc = rv;
6582 }
6583 }
6584 } else {
6585 for (i = 0; i < size; i++, bp += 2) {
6586 if ((rv = write_DCS16Number(p->outputTable[i], bp)) != 0) {
6587 sprintf(icp->err,"icmLut_write: outputTable write_DCS16Number(%f) failed",p->outputTable[i]);
6588 icp->al->free(icp->al, buf);
6589 return icp->errc = rv;
6590 }
6591 }
6592 }
6593
6594 /* Write buffer to the file */
6595 if ( icp->fp->seek(icp->fp, of) != 0
6596 || icp->fp->write(icp->fp, buf, 1, len) != len) {
6597 sprintf(icp->err,"icmLut_write fseek() or fwrite() failed");
6598 icp->al->free(icp->al, buf);
6599 return icp->errc = 2;
6600 }
6601 icp->al->free(icp->al, buf);
6602 return 0;
6603 }
6604
6605 /* Dump a text description of the object */
6606 static void icmLut_dump(
6607 icmBase *pp,
6608 icmFile *op, /* Output to dump to */
6609 int verb /* Verbosity level */
6610 ) {
6611 icmLut *p = (icmLut *)pp;
6612 if (verb <= 0)
6613 return;
6614
6615 if (p->ttype == icSigLut8Type) {
6616 op->gprintf(op,"Lut8:\n");
6617 } else {
6618 op->gprintf(op,"Lut16:\n");
6619 }
6620 op->gprintf(op," Input Channels = %u\n",p->inputChan);
6621 op->gprintf(op," Output Channels = %u\n",p->outputChan);
6622 op->gprintf(op," CLUT resolution = %u\n",p->clutPoints);
6623 op->gprintf(op," Input Table entries = %u\n",p->inputEnt);
6624 op->gprintf(op," Output Table entries = %u\n",p->outputEnt);
6625 op->gprintf(op," XYZ matrix = %f, %f, %f\n",p->e[0][0],p->e[0][1],p->e[0][2]);
6626 op->gprintf(op," %f, %f, %f\n",p->e[1][0],p->e[1][1],p->e[1][2]);
6627 op->gprintf(op," %f, %f, %f\n",p->e[2][0],p->e[2][1],p->e[2][2]);
6628
6629 if (verb >= 2) {
6630 unsigned int i, j, size;
6631 unsigned int ii[MAX_CHAN]; /* maximum no of input channels */
6632
6633 op->gprintf(op," Input table:\n");
6634 for (i = 0; i < p->inputEnt; i++) {
6635 op->gprintf(op," %3u: ",i);
6636 for (j = 0; j < p->inputChan; j++)
6637 op->gprintf(op," %1.10f",p->inputTable[j * p->inputEnt + i]);
6638 op->gprintf(op,"\n");
6639 }
6640
6641 op->gprintf(op,"\n CLUT table:\n");
6642 if (p->inputChan > MAX_CHAN) {
6643 op->gprintf(op," !!Can't dump > %d input channel CLUT table!!\n",MAX_CHAN);
6644 } else {
6645 size = (p->outputChan * sat_pow(p->clutPoints,p->inputChan));
6646 for (j = 0; j < p->inputChan; j++)
6647 ii[j] = 0;
6648 for (i = 0; i < size;) {
6649 unsigned int k;
6650 /* Print table entry index */
6651 op->gprintf(op," ");
6652 for (j = p->inputChan-1; j < p->inputChan; j--)
6653 op->gprintf(op," %2u",ii[j]);
6654 op->gprintf(op,":");
6655 /* Print table entry contents */
6656 for (k = 0; k < p->outputChan; k++, i++)
6657 op->gprintf(op," %1.10f",p->clutTable[i]);
6658 op->gprintf(op,"\n");
6659
6660 for (j = 0; j < p->inputChan; j++) { /* Increment index */
6661 ii[j]++;
6662 if (ii[j] < p->clutPoints)
6663 break; /* No carry */
6664 ii[j] = 0;
6665 }
6666 }
6667 }
6668
6669 op->gprintf(op,"\n Output table:\n");
6670 for (i = 0; i < p->outputEnt; i++) {
6671 op->gprintf(op," %3u: ",i);
6672 for (j = 0; j < p->outputChan; j++)
6673 op->gprintf(op," %1.10f",p->outputTable[j * p->outputEnt + i]);
6674 op->gprintf(op,"\n");
6675 }
6676
6677 }
6678 }
6679
6680 /* Allocate variable sized data elements */
6681 static int icmLut_allocate(
6682 icmBase *pp
6683 ) {
6684 unsigned int i, j, g, size;
6685 icmLut *p = (icmLut *)pp;
6686 icc *icp = p->icp;
6687
6688 /* Sanity check */
6689 if (p->inputChan < 1) {
6690 sprintf(icp->err,"icmLut_alloc: Can't handle %d input channels\n",p->inputChan);
6691 return icp->errc = 1;
6692 }
6693
6694 if (p->inputChan > MAX_CHAN) {
6695 sprintf(icp->err,"icmLut_alloc: Can't handle > %d input channels\n",MAX_CHAN);
6696 return icp->errc = 1;
6697 }
6698
6699 if (p->outputChan > MAX_CHAN) {
6700 sprintf(icp->err,"icmLut_alloc: Can't handle > %d output channels\n",MAX_CHAN);
6701 return icp->errc = 1;
6702 }
6703
6704 if ((size = sat_mul(p->inputChan, p->inputEnt)) == UINT_MAX) {
6705 sprintf(icp->err,"icmLut_alloc size overflow");
6706 return icp->errc = 1;
6707 }
6708 if (size != p->inputTable_size) {
6709 if (ovr_mul(size, sizeof(double))) {
6710 sprintf(icp->err,"icmLut_alloc: size overflow");
6711 return icp->errc = 1;
6712 }
6713 if (p->inputTable != NULL)
6714 icp->al->free(icp->al, p->inputTable);
6715 if ((p->inputTable = (double *) icp->al->calloc(icp->al,size, sizeof(double))) == NULL) {
6716 sprintf(icp->err,"icmLut_alloc: calloc() of Lut inputTable data failed");
6717 return icp->errc = 2;
6718 }
6719 p->inputTable_size = size;
6720 }
6721 if ((size = sat_mul(p->outputChan, sat_pow(p->clutPoints,p->inputChan))) == UINT_MAX) {
6722 sprintf(icp->err,"icmLut_alloc size overflow");
6723 return icp->errc = 1;
6724 }
6725 if (size != p->clutTable_size) {
6726 if (ovr_mul(size, sizeof(double))) {
6727 sprintf(icp->err,"icmLut_alloc: size overflow");
6728 return icp->errc = 1;
6729 }
6730 if (p->clutTable != NULL)
6731 icp->al->free(icp->al, p->clutTable);
6732 if ((p->clutTable = (double *) icp->al->calloc(icp->al,size, sizeof(double))) == NULL) {
6733 sprintf(icp->err,"icmLut_alloc: calloc() of Lut clutTable data failed");
6734 return icp->errc = 2;
6735 }
6736 p->clutTable_size = size;
6737 }
6738 if ((size = sat_mul(p->outputChan, p->outputEnt)) == UINT_MAX) {
6739 sprintf(icp->err,"icmLut_alloc size overflow");
6740 return icp->errc = 1;
6741 }
6742 if (size != p->outputTable_size) {
6743 if (ovr_mul(size, sizeof(double))) {
6744 sprintf(icp->err,"icmLut_alloc: size overflow");
6745 return icp->errc = 1;
6746 }
6747 if (p->outputTable != NULL)
6748 icp->al->free(icp->al, p->outputTable);
6749 if ((p->outputTable = (double *) icp->al->calloc(icp->al,size, sizeof(double))) == NULL) {
6750 sprintf(icp->err,"icmLut_alloc: calloc() of Lut outputTable data failed");
6751 return icp->errc = 2;
6752 }
6753 p->outputTable_size = size;
6754 }
6755
6756 /* Private: compute dimensional increment though clut */
6757 /* Note that first channel varies least rapidly. */
6758 i = p->inputChan-1;
6759 p->dinc[i--] = p->outputChan;
6760 for (; i < p->inputChan; i--)
6761 p->dinc[i] = p->dinc[i+1] * p->clutPoints;
6762
6763 /* Private: compute offsets from base of cube to other corners */
6764 for (p->dcube[0] = 0, g = 1, j = 0; j < p->inputChan; j++) {
6765 for (i = 0; i < g; i++)
6766 p->dcube[g+i] = p->dcube[i] + p->dinc[j];
6767 g *= 2;
6768 }
6769
6770 return 0;
6771 }
6772
6773 /* Free all storage in the object */
6774 static void icmLut_delete(
6775 icmBase *pp
6776 ) {
6777 icmLut *p = (icmLut *)pp;
6778 icc *icp = p->icp;
6779 int i;
6780
6781 if (p->inputTable != NULL)
6782 icp->al->free(icp->al, p->inputTable);
6783 if (p->clutTable != NULL)
6784 icp->al->free(icp->al, p->clutTable);
6785 if (p->outputTable != NULL)
6786 icp->al->free(icp->al, p->outputTable);
6787 for (i = 0; i < p->inputChan; i++)
6788 icmTable_delete_bwd(icp, &p->rit[i]);
6789 for (i = 0; i < p->outputChan; i++)
6790 icmTable_delete_bwd(icp, &p->rot[i]);
6791 icp->al->free(icp->al, p);
6792 }
6793
6794 /* Create an empty object. Return null on error */
6795 static icmBase *new_icmLut(
6796 icc *icp
6797 ) {
6798 int i,j;
6799 icmLut *p;
6800 if ((p = (icmLut *) icp->al->calloc(icp->al,1,sizeof(icmLut))) == NULL)
6801 return NULL;
6802 p->ttype = icSigLut16Type;
6803 p->refcount = 1;
6804 p->get_size = icmLut_get_size;
6805 p->read = icmLut_read;
6806 p->write = icmLut_write;
6807 p->dump = icmLut_dump;
6808 p->allocate = icmLut_allocate;
6809 p->del = icmLut_delete;
6810
6811 /* Lookup methods */
6812 p->nu_matrix = icmLut_nu_matrix;
6813 p->min_max = icmLut_min_max;
6814 p->lookup_matrix = icmLut_lookup_matrix;
6815 p->lookup_input = icmLut_lookup_input;
6816 p->lookup_clut_nl = icmLut_lookup_clut_nl;
6817 p->lookup_clut_sx = icmLut_lookup_clut_sx;
6818 p->lookup_output = icmLut_lookup_output;
6819
6820 /* Set method */
6821 p->set_tables = icmLut_set_tables;
6822
6823 p->icp = icp;
6824
6825 /* Set matrix to reasonable default */
6826 for (i = 0; i < 3; i++)
6827 for (j = 0; j < 3; j++) {
6828 if (i == j)
6829 p->e[i][j] = 1.0;
6830 else
6831 p->e[i][j] = 0.0;
6832 }
6833
6834 /* Init lookups to non-dangerous values */
6835 for (i = 0; i < MAX_CHAN; i++)
6836 p->dinc[i] = 0;
6837
6838 for (i = 0; i < (1 << MAX_CHAN); i++)
6839 p->dcube[i] = 0;
6840
6841 for (i = 0; i < MAX_CHAN; i++) {
6842 p->rit[i].inited = 0;
6843 p->rot[i].inited = 0;
6844 }
6845
6846 return (icmBase *)p;
6847 }
6848
6849 /* ---------------------------------------------------------- */
6850 /* Measurement */
6851
6852 /* Return the number of bytes needed to write this tag */
6853 static unsigned int icmMeasurement_get_size(
6854 icmBase *pp
6855 ) {
6856 unsigned int len = 0;
6857 len = sat_add(len, 8); /* 8 bytes for tag and padding */
6858 len = sat_add(len, 4); /* 4 for standard observer */
6859 len = sat_add(len, 12); /* 12 for XYZ of measurement backing */
6860 len = sat_add(len, 4); /* 4 for measurement geometry */
6861 len = sat_add(len, 4); /* 4 for measurement flare */
6862 len = sat_add(len, 4); /* 4 for standard illuminant */
6863 return len;
6864 }
6865
6866 /* read the object, return 0 on success, error code on fail */
6867 static int icmMeasurement_read(
6868 icmBase *pp,
6869 unsigned int len, /* tag length */
6870 unsigned int of /* start offset within file */
6871 ) {
6872 icmMeasurement *p = (icmMeasurement *)pp;
6873 icc *icp = p->icp;
6874 int rv;
6875 char *bp, *buf;
6876
6877 if (len < 36) {
6878 sprintf(icp->err,"icmMeasurement_read: Tag too small to be legal");
6879 return icp->errc = 1;
6880 }
6881
6882 /* Allocate a file read buffer */
6883 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
6884 sprintf(icp->err,"icmMeasurement_read: malloc() failed");
6885 return icp->errc = 2;
6886 }
6887 bp = buf;
6888
6889 /* Read portion of file into buffer */
6890 if ( icp->fp->seek(icp->fp, of) != 0
6891 || icp->fp->read(icp->fp, bp, 1, len) != len) {
6892 sprintf(icp->err,"icmMeasurement_read: fseek() or fread() failed");
6893 icp->al->free(icp->al, buf);
6894 return icp->errc = 1;
6895 }
6896
6897 /* Read type descriptor from the buffer */
6898 if (((icTagTypeSignature)read_SInt32Number(bp)) != p->ttype) {
6899 sprintf(icp->err,"icmMeasurement_read: Wrong tag type for icmMeasurement");
6900 icp->al->free(icp->al, buf);
6901 return icp->errc = 1;
6902 }
6903
6904 /* Read the encoded standard observer */
6905 p->observer = (icStandardObserver)read_SInt32Number(bp + 8);
6906
6907 /* Read the XYZ values for measurement backing */
6908 if ((rv = read_XYZNumber(&p->backing, bp+12)) != 0) {
6909 sprintf(icp->err,"icmMeasurement: read_XYZNumber error");
6910 icp->al->free(icp->al, buf);
6911 return icp->errc = rv;
6912 }
6913
6914 /* Read the encoded measurement geometry */
6915 p->geometry = (icMeasurementGeometry)read_SInt32Number(bp + 24);
6916
6917 /* Read the proportion of flare */
6918 p->flare = read_U16Fixed16Number(bp + 28);
6919
6920 /* Read the encoded standard illuminant */
6921 p->illuminant = (icIlluminant)read_SInt32Number(bp + 32);
6922
6923 icp->al->free(icp->al, buf);
6924 return 0;
6925 }
6926
6927 /* Write the contents of the object. Return 0 on sucess, error code on failure */
6928 static int icmMeasurement_write(
6929 icmBase *pp,
6930 unsigned int of /* File offset to write from */
6931 ) {
6932 icmMeasurement *p = (icmMeasurement *)pp;
6933 icc *icp = p->icp;
6934 unsigned int len;
6935 char *bp, *buf; /* Buffer to write from */
6936 int rv = 0;
6937
6938 /* Allocate a file write buffer */
6939 if ((len = p->get_size((icmBase *)p)) == UINT_MAX) {
6940 sprintf(icp->err,"icmMeasurement_write get_size overflow");
6941 return icp->errc = 1;
6942 }
6943 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
6944 sprintf(icp->err,"icmMeasurement_write malloc() failed");
6945 return icp->errc = 2;
6946 }
6947 bp = buf;
6948
6949 /* Write type descriptor to the buffer */
6950 if ((rv = write_SInt32Number((int)p->ttype,bp)) != 0) {
6951 sprintf(icp->err,"icmMeasurement_write, type: write_SInt32Number() failed");
6952 icp->al->free(icp->al, buf);
6953 return icp->errc = rv;
6954 }
6955 write_SInt32Number(0,bp+4); /* Set padding to 0 */
6956
6957 /* Write the encoded standard observer */
6958 if ((rv = write_SInt32Number((int)p->observer, bp + 8)) != 0) {
6959 sprintf(icp->err,"icmMeasurementa_write, observer: write_SInt32Number() failed");
6960 icp->al->free(icp->al, buf);
6961 return icp->errc = rv;
6962 }
6963
6964 /* Write the XYZ values for measurement backing */
6965 if ((rv = write_XYZNumber(&p->backing, bp+12)) != 0) {
6966 sprintf(icp->err,"icmMeasurement, backing: write_XYZNumber error");
6967 icp->al->free(icp->al, buf);
6968 return icp->errc = rv;
6969 }
6970
6971 /* Write the encoded measurement geometry */
6972 if ((rv = write_SInt32Number((int)p->geometry, bp + 24)) != 0) {
6973 sprintf(icp->err,"icmMeasurementa_write, geometry: write_SInt32Number() failed");
6974 icp->al->free(icp->al, buf);
6975 return icp->errc = rv;
6976 }
6977
6978 /* Write the proportion of flare */
6979 if ((rv = write_U16Fixed16Number(p->flare, bp + 28)) != 0) {
6980 sprintf(icp->err,"icmMeasurementa_write, flare: write_U16Fixed16Number() failed");
6981 icp->al->free(icp->al, buf);
6982 return icp->errc = rv;
6983 }
6984
6985 /* Write the encoded standard illuminant */
6986 if ((rv = write_SInt32Number((int)p->illuminant, bp + 32)) != 0) {
6987 sprintf(icp->err,"icmMeasurementa_write, illuminant: write_SInt32Number() failed");
6988 icp->al->free(icp->al, buf);
6989 return icp->errc = rv;
6990 }
6991
6992 /* Write to the file */
6993 if ( icp->fp->seek(icp->fp, of) != 0
6994 || icp->fp->write(icp->fp, buf, 1, len) != len) {
6995 sprintf(icp->err,"icmMeasurement_write fseek() or fwrite() failed");
6996 icp->al->free(icp->al, buf);
6997 return icp->errc = 2;
6998 }
6999 icp->al->free(icp->al, buf);
7000 return 0;
7001 }
7002
7003 /* Dump a text description of the object */
7004 static void icmMeasurement_dump(
7005 icmBase *pp,
7006 icmFile *op, /* Output to dump to */
7007 int verb /* Verbosity level */
7008 ) {
7009 icmMeasurement *p = (icmMeasurement *)pp;
7010 if (verb <= 0)
7011 return;
7012
7013 op->gprintf(op,"Measurement:\n");
7014 op->gprintf(op," Standard Observer = %s\n", string_StandardObserver(p->observer));
7015 op->gprintf(op," XYZ for Measurement Backing = %s\n", string_XYZNumber_and_Lab(&p->backing));
7016 op->gprintf(op," Measurement Geometry = %s\n", string_MeasurementGeometry(p->geometry));
7017 op->gprintf(op," Measurement Flare = %5.1f%%\n", p->flare * 100.0);
7018 op->gprintf(op," Standard Illuminant = %s\n", string_Illuminant(p->illuminant));
7019 }
7020
7021 /* Allocate variable sized data elements */
7022 static int icmMeasurement_allocate(
7023 icmBase *pp
7024 ) {
7025 /* Nothing to do */
7026 return 0;
7027 }
7028
7029 /* Free all storage in the object */
7030 static void icmMeasurement_delete(
7031 icmBase *pp
7032 ) {
7033 icmMeasurement *p = (icmMeasurement *)pp;
7034 icc *icp = p->icp;
7035
7036 icp->al->free(icp->al, p);
7037 }
7038
7039 /* Create an empty object. Return null on error */
7040 static icmBase *new_icmMeasurement(
7041 icc *icp
7042 ) {
7043 icmMeasurement *p;
7044 if ((p = (icmMeasurement *) icp->al->calloc(icp->al,1,sizeof(icmMeasurement))) == NULL)
7045 return NULL;
7046 p->ttype = icSigMeasurementType;
7047 p->refcount = 1;
7048 p->get_size = icmMeasurement_get_size;
7049 p->read = icmMeasurement_read;
7050 p->write = icmMeasurement_write;
7051 p->dump = icmMeasurement_dump;
7052 p->allocate = icmMeasurement_allocate;
7053 p->del = icmMeasurement_delete;
7054 p->icp = icp;
7055
7056 return (icmBase *)p;
7057 }
7058
7059 /* ---------------------------------------------------------- */
7060
7061 /* Named color structure read/write support */
7062 static int read_NamedColorVal(
7063 icmNamedColorVal *p,
7064 char *bp,
7065 char *end,
7066 icColorSpaceSignature pcs, /* Header Profile Connection Space */
7067 unsigned int ndc /* Number of device corrds */
7068 ) {
7069 icc *icp = p->icp;
7070 unsigned int i;
7071 unsigned int mxl; /* Max possible string length */
7072 int rv;
7073
7074 if (bp > end) {
7075 sprintf(icp->err,"icmNamedColorVal_read: Data too short to read");
7076 return icp->errc = 1;
7077 }
7078 mxl = (end - bp) < 32 ? (end - bp) : 32;
7079 if ((rv = check_null_string(bp,mxl)) == 1) {
7080 sprintf(icp->err,"icmNamedColorVal_read: Root name string not terminated");
7081 return icp->errc = 1;
7082 }
7083 /* Haven't checked if rv == 2 is legal or not */
7084 strcpy(p->root, bp);
7085 bp += strlen(p->root) + 1;
7086 if (bp > end || ndc > (end - bp)) {
7087 sprintf(icp->err,"icmNamedColorVal_read: Data too short to read device coords");
7088 return icp->errc = 1;
7089 }
7090 for (i = 0; i < ndc; i++) {
7091 p->deviceCoords[i] = read_DCS8Number(bp);
7092 bp += 1;
7093 }
7094 return 0;
7095 }
7096
7097 static int read_NamedColorVal2(
7098 icmNamedColorVal *p,
7099 char *bp,
7100 char *end,
7101 icColorSpaceSignature pcs, /* Header Profile Connection Space */
7102 unsigned int ndc /* Number of device coords */
7103 ) {
7104 int rv;
7105 icc *icp = p->icp;
7106 unsigned int i;
7107
7108 if (bp > end
7109 || (32 + 6) > (end - bp)
7110 || ndc > (end - bp - 32 - 6)/2) {
7111 sprintf(icp->err,"icmNamedColorVal2_read: Data too short to read");
7112 return icp->errc = 1;
7113 }
7114 if ((rv = check_null_string(bp,32)) == 1) {
7115 sprintf(icp->err,"icmNamedColorVal2_read: Root name string not terminated");
7116 return icp->errc = 1;
7117 }
7118 memmove((void *)p->root,(void *)(bp + 0),32);
7119 switch(pcs) {
7120 case icSigXYZData:
7121 read_PCSNumber(icp, icSigXYZData, p->pcsCoords, bp+32);
7122 break;
7123 case icSigLabData:
7124 /* namedColor2Type retains legacy Lab encoding */
7125 read_PCSNumber(icp, icmSigLabV2Data, p->pcsCoords, bp+32);
7126 break;
7127 default:
7128 return 1; /* Unknown PCS */
7129 }
7130 for (i = 0; i < ndc; i++)
7131 p->deviceCoords[i] = read_DCS16Number(bp + 32 + 6 + 2 * i);
7132 return 0;
7133 }
7134
7135 static int write_NamedColorVal(
7136 icmNamedColorVal *p,
7137 char *d,
7138 icColorSpaceSignature pcs, /* Header Profile Connection Space */
7139 unsigned int ndc /* Number of device corrds */
7140 ) {
7141 icc *icp = p->icp;
7142 unsigned int i;
7143 int rv;
7144
7145 if ((rv = check_null_string(p->root,32)) == 1) {
7146 sprintf(icp->err,"icmNamedColorVal_write: Root string names is unterminated");
7147 return icp->errc = 1;
7148 }
7149 strcpy(d, p->root);
7150 d += strlen(p->root) + 1;
7151 for (i = 0; i < ndc; i++) {
7152 if ((rv = write_DCS8Number(p->deviceCoords[i], d)) != 0) {
7153 sprintf(icp->err,"icmNamedColorVal_write: write of device coord failed");
7154 return icp->errc = 1;
7155 }
7156 d += 1;
7157 }
7158 return 0;
7159 }
7160
7161 static int write_NamedColorVal2(
7162 icmNamedColorVal *p,
7163 char *bp,
7164 icColorSpaceSignature pcs, /* Header Profile Connection Space */
7165 unsigned int ndc /* Number of device coords */
7166 ) {
7167 icc *icp = p->icp;
7168 unsigned int i;
7169 int rv;
7170
7171 if ((rv = check_null_string(p->root,32)) == 1) {
7172 sprintf(icp->err,"icmNamedColorVal2_write: Root string names is unterminated");
7173 return icp->errc = 1;
7174 }
7175 rv = 0;
7176 memmove((void *)(bp + 0),(void *)p->root,32);
7177 switch(pcs) {
7178 case icSigXYZData:
7179 rv |= write_PCSNumber(icp, icSigXYZData, p->pcsCoords, bp+32);
7180 break;
7181 case icSigLabData:
7182 /* namedColor2Type retains legacy Lab encoding */
7183 rv |= write_PCSNumber(icp, icmSigLabV2Data, p->pcsCoords, bp+32);
7184 break;
7185 default:
7186 sprintf(icp->err,"icmNamedColorVal2_write: Unknown PCS");
7187 return icp->errc = 1;
7188 }
7189 if (rv) {
7190 sprintf(icp->err,"icmNamedColorVal2_write: write of PCS coord failed");
7191 return icp->errc = 1;
7192 }
7193 for (i = 0; i < ndc; i++) {
7194 if ((rv = write_DCS16Number(p->deviceCoords[i], bp + 32 + 6 + 2 * i)) != 0) {
7195 sprintf(icp->err,"icmNamedColorVal2_write: write of device coord failed");
7196 return icp->errc = 1;
7197 }
7198 }
7199 return 0;
7200 }
7201
7202 /* - - - - - - - - - - - */
7203 /* icmNamedColor object */
7204
7205 /* Return the number of bytes needed to write this tag */
7206 static unsigned int icmNamedColor_get_size(
7207 icmBase *pp
7208 ) {
7209 icmNamedColor *p = (icmNamedColor *)pp;
7210 unsigned int len = 0;
7211 if (p->ttype == icSigNamedColorType) {
7212 unsigned int i;
7213 len = sat_add(len, 8); /* 8 bytes for tag and padding */
7214 len = sat_add(len, 4); /* 4 for vendor specific flags */
7215 len = sat_add(len, 4); /* 4 for count of named colors */
7216 len = sat_add(len, strlen(p->prefix) + 1); /* prefix of color names */
7217 len = sat_add(len, strlen(p->suffix) + 1); /* suffix of color names */
7218 for (i = 0; i < p->count; i++) {
7219 len = sat_add(len, strlen(p->data[i].root) + 1); /* color names */
7220 len = sat_add(len, p->nDeviceCoords * 1); /* bytes for each named color */
7221 }
7222 } else { /* Named Color 2 */
7223 len = sat_add(len, 8); /* 8 bytes for tag and padding */
7224 len = sat_add(len, 4); /* 4 for vendor specific flags */
7225 len = sat_add(len, 4); /* 4 for count of named colors */
7226 len = sat_add(len, 4); /* 4 for number of device coords */
7227 len = sat_add(len, 32); /* 32 for prefix of color names */
7228 len = sat_add(len, 32); /* 32 for suffix of color names */
7229 len = sat_add(len, sat_mul(p->count, (32 + 6 + p->nDeviceCoords * 2)));
7230 /* bytes for each named color */
7231 }
7232 return len;
7233 }
7234
7235 /* read the object, return 0 on success, error code on fail */
7236 static int icmNamedColor_read(
7237 icmBase *pp,
7238 unsigned int len, /* tag length */
7239 unsigned int of /* start offset within file */
7240 ) {
7241 icmNamedColor *p = (icmNamedColor *)pp;
7242 icc *icp = p->icp;
7243 unsigned int i;
7244 char *bp, *buf, *end;
7245 int rv;
7246
7247 if (len < 4) {
7248 sprintf(icp->err,"icmNamedColor_read: Tag too small to be legal");
7249 return icp->errc = 1;
7250 }
7251
7252 /* Allocate a file read buffer */
7253 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
7254 sprintf(icp->err,"icmNamedColor_read: malloc() failed");
7255 return icp->errc = 2;
7256 }
7257 bp = buf;
7258 end = buf + len;
7259
7260 /* Read portion of file into buffer */
7261 if ( icp->fp->seek(icp->fp, of) != 0
7262 || icp->fp->read(icp->fp, bp, 1, len) != len) {
7263 sprintf(icp->err,"icmNamedColor_read: fseek() or fread() failed");
7264 icp->al->free(icp->al, buf);
7265 return icp->errc = 1;
7266 }
7267
7268 /* Read type descriptor from the buffer */
7269 p->ttype = (icTagTypeSignature)read_SInt32Number(bp);
7270 if (p->ttype != icSigNamedColorType && p->ttype != icSigNamedColor2Type) {
7271 sprintf(icp->err,"icmNamedColor_read: Wrong tag type for icmNamedColor");
7272 icp->al->free(icp->al, buf);
7273 return icp->errc = 1;
7274 }
7275
7276 if (p->ttype == icSigNamedColorType) {
7277 if (len < 16) {
7278 sprintf(icp->err,"icmNamedColor_read: Tag too small to be legal");
7279 icp->al->free(icp->al, buf);
7280 return icp->errc = 1;
7281 }
7282 /* Make sure that the number of device coords in known */
7283 p->nDeviceCoords = number_ColorSpaceSignature(icp->header->colorSpace);
7284 if (p->nDeviceCoords > MAX_CHAN) {
7285 sprintf(icp->err,"icmNamedColor_read: Can't handle more than %d device channels",MAX_CHAN);
7286 icp->al->free(icp->al, buf);
7287 return icp->errc = 1;
7288 }
7289
7290 } else { /* icmNC2 */
7291 if (len < 84) {
7292 sprintf(icp->err,"icmNamedColor_read: Tag too small to be legal");
7293 icp->al->free(icp->al, buf);
7294 return icp->errc = 1;
7295 }
7296 }
7297
7298 /* Read vendor specific flag */
7299 p->vendorFlag = read_UInt32Number(bp+8);
7300
7301 /* Read count of named colors */
7302 p->count = read_UInt32Number(bp+12);
7303
7304 if (p->ttype == icSigNamedColorType) {
7305 unsigned int mxl; /* Max possible string length */
7306 bp = bp + 16;
7307
7308 /* Prefix for each color name */
7309 if (bp > end) {
7310 sprintf(icp->err,"icmNamedColor_read: Data too short to read");
7311 return icp->errc = 1;
7312 }
7313 mxl = (end - bp) < 32 ? (end - bp) : 32;
7314 if ((rv = check_null_string(bp,mxl)) == 1) {
7315 sprintf(icp->err,"icmNamedColor_read: Color prefix is not null terminated");
7316 icp->al->free(icp->al, buf);
7317 return icp->errc = 1;
7318 }
7319 /* Haven't checked if rv == 2 is legal or not */
7320 strcpy(p->prefix, bp);
7321 bp += strlen(p->prefix) + 1;
7322
7323 /* Suffix for each color name */
7324 if (bp > end) {
7325 sprintf(icp->err,"icmNamedColor_read: Data too short to read");
7326 return icp->errc = 1;
7327 }
7328 mxl = (end - bp) < 32 ? (end - bp) : 32;
7329 if ((rv = check_null_string(bp,mxl)) == 1) {
7330 sprintf(icp->err,"icmNamedColor_read: Color suffix is not null terminated");
7331 icp->al->free(icp->al, buf);
7332 return icp->errc = 1;
7333 }
7334 /* Haven't checked if rv == 2 is legal or not */
7335 strcpy(p->suffix, bp);
7336 bp += strlen(p->suffix) + 1;
7337
7338 if ((rv = p->allocate((icmBase *)p)) != 0) {
7339 icp->al->free(icp->al, buf);
7340 return rv;
7341 }
7342
7343 /* Read all the data from the buffer */
7344 for (i = 0; i < p->count; i++) {
7345 if ((rv = read_NamedColorVal(p->data+i, bp, end, icp->header->pcs, p->nDeviceCoords)) != 0) {
7346 icp->al->free(icp->al, buf);
7347 return rv;
7348 }
7349 bp += strlen(p->data[i].root) + 1;
7350 bp += p->nDeviceCoords * 1;
7351 }
7352 } else { /* icmNC2 */
7353 /* Number of device coords per color */
7354 p->nDeviceCoords = read_UInt32Number(bp+16);
7355 if (p->nDeviceCoords > MAX_CHAN) {
7356 sprintf(icp->err,"icmNamedColor_read: Can't handle more than %d device channels",MAX_CHAN);
7357 icp->al->free(icp->al, buf);
7358 return icp->errc = 1;
7359 }
7360
7361 /* Prefix for each color name */
7362 memmove((void *)p->prefix, (void *)(bp + 20), 32);
7363 if ((rv = check_null_string(p->prefix,32)) == 1) {
7364 sprintf(icp->err,"icmNamedColor_read: Color prefix is not null terminated");
7365 icp->al->free(icp->al, buf);
7366 return icp->errc = 1;
7367 }
7368
7369 /* Suffix for each color name */
7370 memmove((void *)p->suffix, (void *)(bp + 52), 32);
7371 if ((rv = check_null_string(p->suffix,32)) == 1) {
7372 sprintf(icp->err,"icmNamedColor_read: Color suffix is not null terminated");
7373 icp->al->free(icp->al, buf);
7374 return icp->errc = 1;
7375 }
7376
7377 if ((rv = p->allocate((icmBase *)p)) != 0) {
7378 icp->al->free(icp->al, buf);
7379 return rv;
7380 }
7381
7382 /* Read all the data from the buffer */
7383 bp = bp + 84;
7384 for (i = 0; i < p->count; i++) {
7385 if ((rv = read_NamedColorVal2(p->data+i, bp, end, icp->header->pcs, p->nDeviceCoords)) != 0) {
7386 icp->al->free(icp->al, buf);
7387 return rv;
7388 }
7389 bp += 32 + 6 + p->nDeviceCoords * 2;
7390 }
7391 }
7392 icp->al->free(icp->al, buf);
7393 return 0;
7394 }
7395
7396 /* Write the contents of the object. Return 0 on sucess, error code on failure */
7397 static int icmNamedColor_write(
7398 icmBase *pp,
7399 unsigned int of /* File offset to write from */
7400 ) {
7401 icmNamedColor *p = (icmNamedColor *)pp;
7402 icc *icp = p->icp;
7403 unsigned int i;
7404 unsigned int len;
7405 char *bp, *buf; /* Buffer to write from */
7406 int rv;
7407
7408 /* Allocate a file write buffer */
7409 if ((len = p->get_size((icmBase *)p)) == UINT_MAX) {
7410 sprintf(icp->err,"icmNamedColor_write get_size overflow");
7411 return icp->errc = 1;
7412 }
7413 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
7414 sprintf(icp->err,"icmNamedColor_write malloc() failed");
7415 return icp->errc = 2;
7416 }
7417 bp = buf;
7418
7419 /* Write type descriptor to the buffer */
7420 if ((rv = write_SInt32Number((int)p->ttype,bp)) != 0) {
7421 sprintf(icp->err,"icmNamedColor_write: write_SInt32Number() failed");
7422 icp->al->free(icp->al, buf);
7423 return icp->errc = rv;
7424 }
7425 write_SInt32Number(0,bp+4); /* Set padding to 0 */
7426
7427 /* Write vendor specific flag */
7428 if ((rv = write_UInt32Number(p->vendorFlag, bp+8)) != 0) {
7429 sprintf(icp->err,"icmNamedColor_write: write_UInt32Number() failed");
7430 icp->al->free(icp->al, buf);
7431 return icp->errc = rv;
7432 }
7433
7434 /* Write count of named colors */
7435 if ((rv = write_UInt32Number(p->count, bp+12)) != 0) {
7436 sprintf(icp->err,"icmNamedColor_write: write_UInt32Number() failed");
7437 icp->al->free(icp->al, buf);
7438 return icp->errc = rv;
7439 }
7440
7441 if (p->ttype == icSigNamedColorType) {
7442 bp = bp + 16;
7443
7444 /* Prefix for each color name */
7445 if ((rv = check_null_string(p->prefix,32)) == 1) {
7446 sprintf(icp->err,"icmNamedColor_write: Color prefix is not null terminated");
7447 icp->al->free(icp->al, buf);
7448 return icp->errc = 1;
7449 }
7450 strcpy(bp, p->prefix);
7451 bp += strlen(p->prefix) + 1;
7452
7453 /* Suffix for each color name */
7454 if ((rv = check_null_string(p->suffix,32)) == 1) {
7455 sprintf(icp->err,"icmNamedColor_write: Color sufix is not null terminated");
7456 icp->al->free(icp->al, buf);
7457 return icp->errc = 1;
7458 }
7459 strcpy(bp, p->suffix);
7460 bp += strlen(p->suffix) + 1;
7461
7462 /* Write all the data to the buffer */
7463
7464 for (i = 0; i < p->count; i++) {
7465 if ((rv = write_NamedColorVal(p->data+i, bp, icp->header->pcs, p->nDeviceCoords)) != 0) {
7466 icp->al->free(icp->al, buf);
7467 return rv;
7468 }
7469 bp += strlen(p->data[i].root) + 1;
7470 bp += p->nDeviceCoords * 1;
7471 }
7472 } else { /* icmNC2 */
7473 /* Number of device coords per color */
7474 if ((rv = write_UInt32Number(p->nDeviceCoords, bp+16)) != 0) {
7475 sprintf(icp->err,"icmNamedColor_write: write_UInt32Number() failed");
7476 icp->al->free(icp->al, buf);
7477 return icp->errc = rv;
7478 }
7479
7480 /* Prefix for each color name */
7481 if ((rv = check_null_string(p->prefix,32)) == 1) {
7482 sprintf(icp->err,"icmNamedColor_write: Color prefix is not null terminated");
7483 icp->al->free(icp->al, buf);
7484 return icp->errc = 1;
7485 }
7486 memmove((void *)(bp + 20), (void *)p->prefix, 32);
7487
7488 /* Suffix for each color name */
7489 if ((rv = check_null_string(p->suffix,32)) == 1) {
7490 sprintf(icp->err,"icmNamedColor_write: Color sufix is not null terminated");
7491 icp->al->free(icp->al, buf);
7492 return icp->errc = 1;
7493 }
7494 memmove((void *)(bp + 52), (void *)p->suffix, 32);
7495
7496 /* Write all the data to the buffer */
7497 bp = bp + 84;
7498 for (i = 0; i < p->count; i++, bp += (32 + 6 + p->nDeviceCoords * 2)) {
7499 if ((rv = write_NamedColorVal2(p->data+i, bp, icp->header->pcs, p->nDeviceCoords)) != 0) {
7500 icp->al->free(icp->al, buf);
7501 return rv;
7502 }
7503 }
7504 }
7505
7506 /* Write to the file */
7507 if ( icp->fp->seek(icp->fp, of) != 0
7508 || icp->fp->write(icp->fp, buf, 1, len) != len) {
7509 sprintf(icp->err,"icmNamedColor_write fseek() or fwrite() failed");
7510 icp->al->free(icp->al, buf);
7511 return icp->errc = 2;
7512 }
7513 icp->al->free(icp->al, buf);
7514 return 0;
7515 }
7516
7517 /* Dump a text description of the object */
7518 static void icmNamedColor_dump(
7519 icmBase *pp,
7520 icmFile *op, /* Output to dump to */
7521 int verb /* Verbosity level */
7522 ) {
7523 icmNamedColor *p = (icmNamedColor *)pp;
7524 icc *icp = p->icp;
7525 if (verb <= 0)
7526 return;
7527
7528 if (p->ttype == icSigNamedColorType)
7529 op->gprintf(op,"NamedColor:\n");
7530 else
7531 op->gprintf(op,"NamedColor2:\n");
7532 op->gprintf(op," Vendor Flag = 0x%x\n",p->vendorFlag);
7533 op->gprintf(op," No. colors = %u\n",p->count);
7534 op->gprintf(op," No. dev. coords = %u\n",p->nDeviceCoords);
7535 op->gprintf(op," Name prefix = '%s'\n",p->prefix);
7536 op->gprintf(op," Name suffix = '%s'\n",p->suffix);
7537 if (verb >= 2) {
7538 unsigned int i, n;
7539 icmNamedColorVal *vp;
7540 for (i = 0; i < p->count; i++) {
7541 vp = p->data + i;
7542 op->gprintf(op," Color %lu:\n",i);
7543 op->gprintf(op," Name root = '%s'\n",vp->root);
7544
7545 if (p->ttype == icSigNamedColor2Type) {
7546 switch(icp->header->pcs) {
7547 case icSigXYZData:
7548 op->gprintf(op," XYZ = %f, %f, %f\n",
7549 vp->pcsCoords[0],vp->pcsCoords[1],vp->pcsCoords[2]);
7550 break;
7551 case icSigLabData:
7552 op->gprintf(op," Lab = %f, %f, %f\n",
7553 vp->pcsCoords[0],vp->pcsCoords[1],vp->pcsCoords[2]);
7554 break;
7555 default:
7556 op->gprintf(op," Unexpected PCS\n");
7557 break;
7558 }
7559 }
7560 if (p->nDeviceCoords > 0) {
7561 op->gprintf(op," Device Coords = ");
7562 for (n = 0; n < p->nDeviceCoords; n++) {
7563 if (n > 0)
7564 op->gprintf(op,", ");
7565 op->gprintf(op,"%f",vp->deviceCoords[n]);
7566 }
7567 op->gprintf(op,"\n");
7568 }
7569 }
7570 }
7571 }
7572
7573 /* Allocate variable sized data elements */
7574 static int icmNamedColor_allocate(
7575 icmBase *pp
7576 ) {
7577 icmNamedColor *p = (icmNamedColor *)pp;
7578 icc *icp = p->icp;
7579
7580 if (p->count != p->_count) {
7581 unsigned int i;
7582 if (ovr_mul(p->count, sizeof(icmNamedColorVal))) {
7583 sprintf(icp->err,"icmNamedColor_alloc: size overflow");
7584 return icp->errc = 1;
7585 }
7586 if (p->data != NULL)
7587 icp->al->free(icp->al, p->data);
7588 if ((p->data = (icmNamedColorVal *) icp->al->calloc(icp->al,p->count, sizeof(icmNamedColorVal))) == NULL) {
7589 sprintf(icp->err,"icmNamedColor_alloc: malloc() of icmNamedColor data failed");
7590 return icp->errc = 2;
7591 }
7592 for (i = 0; i < p->count; i++) {
7593 p->data[i].icp = icp; /* Do init */
7594 }
7595 p->_count = p->count;
7596 }
7597 return 0;
7598 }
7599
7600 /* Free all storage in the object */
7601 static void icmNamedColor_delete(
7602 icmBase *pp
7603 ) {
7604 icmNamedColor *p = (icmNamedColor *)pp;
7605 icc *icp = p->icp;
7606
7607 if (p->data != NULL)
7608 icp->al->free(icp->al, p->data);
7609 icp->al->free(icp->al, p);
7610 }
7611
7612 /* Create an empty object. Return null on error */
7613 static icmBase *new_icmNamedColor(
7614 icc *icp
7615 ) {
7616 icmNamedColor *p;
7617 if ((p = (icmNamedColor *) icp->al->calloc(icp->al,1,sizeof(icmNamedColor))) == NULL)
7618 return NULL;
7619 p->ttype = icSigNamedColor2Type;
7620 p->refcount = 1;
7621 p->get_size = icmNamedColor_get_size;
7622 p->read = icmNamedColor_read;
7623 p->write = icmNamedColor_write;
7624 p->dump = icmNamedColor_dump;
7625 p->allocate = icmNamedColor_allocate;
7626 p->del = icmNamedColor_delete;
7627 p->icp = icp;
7628
7629 /* Default the the number of device coords appropriately for NamedColorType */
7630 p->nDeviceCoords = number_ColorSpaceSignature(icp->header->colorSpace);
7631
7632 return (icmBase *)p;
7633 }
7634
7635 /* ---------------------------------------------------------- */
7636 /* Colorant table structure read/write support */
7637 /* (Contribution from Piet Vandenborre) */
7638
7639 static int read_ColorantTableVal(
7640 icmColorantTableVal *p,
7641 char *bp,
7642 char *end,
7643 icColorSpaceSignature pcs /* Header Profile Connection Space */
7644 ) {
7645 int rv;
7646 icc *icp = p->icp;
7647 if (bp > end || (32 + 6) > (end - bp)) {
7648 sprintf(icp->err,"icmColorantTableVal_read: Data too short to read");
7649 return icp->errc = 1;
7650 }
7651 if ((rv = check_null_string(bp,32)) == 1) {
7652 sprintf(icp->err,"icmColorantTableVal_read: Name string not terminated");
7653 return icp->errc = 1;
7654 }
7655 memmove((void *)p->name,(void *)(bp + 0),32);
7656 switch(pcs) {
7657 case icSigXYZData:
7658 case icSigLabData:
7659 read_PCSNumber(icp, pcs, p->pcsCoords, bp+32);
7660 break;
7661 default:
7662 return 1; /* Unknown PCS */
7663 }
7664 return 0;
7665 }
7666
7667 static int write_ColorantTableVal(
7668 icmColorantTableVal *p,
7669 char *bp,
7670 icColorSpaceSignature pcs /* Header Profile Connection Space */
7671 ) {
7672 int rv;
7673 icc *icp = p->icp;
7674
7675 if ((rv = check_null_string(p->name,32)) == 1) {
7676 sprintf(icp->err,"icmColorantTableVal_write: Name string is unterminated");
7677 return icp->errc = 1;
7678 }
7679 memmove((void *)(bp + 0),(void *)p->name,32);
7680 rv = 0;
7681 switch(pcs) {
7682 case icSigXYZData:
7683 case icSigLabData:
7684 rv |= write_PCSNumber(icp, pcs, p->pcsCoords, bp+32);
7685 break;
7686 default:
7687 sprintf(icp->err,"icmColorantTableVal_write: Unknown PCS");
7688 return icp->errc = 1;
7689 }
7690 if (rv) {
7691 sprintf(icp->err,"icmColorantTableVal_write: write of PCS coord failed");
7692 return icp->errc = 1;
7693 }
7694 return 0;
7695 }
7696
7697 /* - - - - - - - - - - - */
7698 /* icmColorantTable object */
7699
7700 /* Return the number of bytes needed to write this tag */
7701 static unsigned int icmColorantTable_get_size(
7702 icmBase *pp
7703 ) {
7704 icmColorantTable *p = (icmColorantTable *)pp;
7705 unsigned int len = 0;
7706 if (p->ttype == icSigColorantTableType
7707 || p->ttype == icmSigAltColorantTableType) {
7708 unsigned int i;
7709 len = sat_add(len, 8); /* 8 bytes for tag and padding */
7710 len = sat_add(len, 4); /* 4 for count of colorants */
7711 for (i = 0; i < p->count; i++) {
7712 len = sat_add(len, 32); /* colorant names - 32 bytes*/
7713 len = sat_add(len, 6); /* colorant pcs value - 3 x 16bit number*/
7714 }
7715 }
7716 return len;
7717 }
7718
7719 /* read the object, return 0 on success, error code on fail */
7720 static int icmColorantTable_read(
7721 icmBase *pp,
7722 unsigned int len, /* tag length */
7723 unsigned int of /* start offset within file */
7724 ) {
7725 icmColorantTable *p = (icmColorantTable *)pp;
7726 icc *icp = p->icp;
7727 icColorSpaceSignature pcs;
7728 unsigned int i;
7729 char *bp, *buf, *end;
7730 int rv = 0;
7731
7732 if (icp->header->deviceClass != icSigLinkClass)
7733 pcs = icp->header->pcs;
7734 else
7735 pcs = icSigLabData;
7736
7737 if (len < 4) {
7738 sprintf(icp->err,"icmColorantTable_read: Tag too small to be legal");
7739 return icp->errc = 1;
7740 }
7741
7742 /* Allocate a file read buffer */
7743 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
7744 sprintf(icp->err,"icmColorantTable_read: malloc() failed");
7745 return icp->errc = 2;
7746 }
7747 bp = buf;
7748 end = buf + len;
7749
7750 /* Read portion of file into buffer */
7751 if ( icp->fp->seek(icp->fp, of) != 0
7752 || icp->fp->read(icp->fp, bp, 1, len) != len) {
7753 sprintf(icp->err,"icmColorantTable_read: fseek() or fread() failed");
7754 icp->al->free(icp->al, buf);
7755 return icp->errc = 1;
7756 }
7757
7758 /* Read type descriptor from the buffer */
7759 p->ttype = (icTagTypeSignature)read_SInt32Number(bp);
7760 if (p->ttype != icSigColorantTableType
7761 && p->ttype != icmSigAltColorantTableType) {
7762 sprintf(icp->err,"icmColorantTable_read: Wrong tag type for icmColorantTable");
7763 icp->al->free(icp->al, buf);
7764 return icp->errc = 1;
7765 }
7766
7767 if (len < 12) {
7768 sprintf(icp->err,"icmColorantTable_read: Tag too small to be legal");
7769 icp->al->free(icp->al, buf);
7770 return icp->errc = 1;
7771 }
7772
7773 /* Read count of colorants */
7774 if (p->ttype == icmSigAltColorantTableType)
7775 p->count = read_UInt8Number(bp+8); /* Hmm. This is Little Endian */
7776 else
7777 p->count = read_UInt32Number(bp+8);
7778
7779 if (p->count > ((len - 12) / (32 + 6))) {
7780 sprintf(icp->err,"icmColorantTable_read count overflow, count %x, len %d",p->count,len);
7781 icp->al->free(icp->al, buf);
7782 return icp->errc = 1;
7783 }
7784
7785 bp = bp + 12;
7786
7787 if ((rv = p->allocate((icmBase *)p)) != 0) {
7788 icp->al->free(icp->al, buf);
7789 return rv;
7790 }
7791
7792 /* Read all the data from the buffer */
7793 for (i = 0; i < p->count; i++, bp += (32 + 6)) {
7794 if (p->ttype == icmSigAltColorantTableType /* Hack to reverse little endian */
7795 && (end - bp) >= 38) {
7796 int tt;
7797 tt = *(bp + 32);
7798 *(bp+32) = *(bp+33);
7799 *(bp+33) = tt;
7800 tt = *(bp + 34);
7801 *(bp+34) = *(bp+35);
7802 *(bp+35) = tt;
7803 tt = *(bp + 36);
7804 *(bp+36) = *(bp+37);
7805 *(bp+37) = tt;
7806 }
7807 if ((rv = read_ColorantTableVal(p->data+i, bp, end, pcs)) != 0) {
7808 icp->al->free(icp->al, buf);
7809 return rv;
7810 }
7811 }
7812
7813 icp->al->free(icp->al, buf);
7814 return rv;
7815 }
7816
7817 /* Write the contents of the object. Return 0 on sucess, error code on failure */
7818 static int icmColorantTable_write(
7819 icmBase *pp,
7820 unsigned int of /* File offset to write from */
7821 ) {
7822 icmColorantTable *p = (icmColorantTable *)pp;
7823 icc *icp = p->icp;
7824 icColorSpaceSignature pcs;
7825 unsigned int i;
7826 unsigned int len;
7827 char *bp, *buf; /* Buffer to write from */
7828 int rv = 0;
7829
7830 if (icp->header->deviceClass != icSigLinkClass)
7831 pcs = icp->header->pcs;
7832 else
7833 pcs = icSigLabData;
7834
7835 /* Allocate a file write buffer */
7836 if ((len = p->get_size((icmBase *)p)) == UINT_MAX) {
7837 sprintf(icp->err,"icmColorantTable_write get_size overflow");
7838 return icp->errc = 1;
7839 }
7840 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
7841 sprintf(icp->err,"icmColorantTable_write malloc() failed");
7842 return icp->errc = 2;
7843 }
7844 bp = buf;
7845
7846 /* Write type descriptor to the buffer */
7847 if ((rv = write_SInt32Number((int)p->ttype,bp)) != 0) {
7848 sprintf(icp->err,"icmColorantTable_write: write_SInt32Number() failed");
7849 icp->al->free(icp->al, buf);
7850 return icp->errc = rv;
7851 }
7852 write_SInt32Number(0,bp+4); /* Set padding to 0 */
7853
7854 /* Write count of colorants */
7855 if ((rv = write_UInt32Number(p->count, bp+8)) != 0) {
7856 sprintf(icp->err,"icmColorantTable_write: write_UInt32Number() failed");
7857 icp->al->free(icp->al, buf);
7858 return icp->errc = rv;
7859 }
7860
7861 bp = bp + 12;
7862
7863 /* Write all the data to the buffer */
7864 for (i = 0; i < p->count; i++, bp += (32 + 6)) {
7865 if ((rv = write_ColorantTableVal(p->data+i, bp, pcs)) != 0) {
7866 icp->al->free(icp->al, buf);
7867 return rv;
7868 }
7869 }
7870
7871 /* Write to the file */
7872 if ( icp->fp->seek(icp->fp, of) != 0
7873 || icp->fp->write(icp->fp, buf, 1, len) != len) {
7874 sprintf(icp->err,"icmColorantTable_write fseek() or fwrite() failed");
7875 icp->al->free(icp->al, buf);
7876 return icp->errc = 2;
7877 }
7878 icp->al->free(icp->al, buf);
7879 return 0;
7880 }
7881
7882 /* Dump a text description of the object */
7883 static void icmColorantTable_dump(
7884 icmBase *pp,
7885 icmFile *op, /* Output to dump to */
7886 int verb /* Verbosity level */
7887 ) {
7888 icmColorantTable *p = (icmColorantTable *)pp;
7889 icc *icp = p->icp;
7890 icColorSpaceSignature pcs;
7891
7892 if (icp->header->deviceClass != icSigLinkClass)
7893 pcs = icp->header->pcs;
7894 else
7895 pcs = icSigLabData;
7896
7897 if (verb <= 0)
7898 return;
7899
7900 if (p->ttype == icSigColorantTableType
7901 || p->ttype == icmSigAltColorantTableType)
7902 op->gprintf(op,"ColorantTable:\n");
7903 op->gprintf(op," No. colorants = %u\n",p->count);
7904 if (verb >= 2) {
7905 unsigned int i;
7906 icmColorantTableVal *vp;
7907 for (i = 0; i < p->count; i++) {
7908 vp = p->data + i;
7909 op->gprintf(op," Colorant %lu:\n",i);
7910 op->gprintf(op," Name = '%s'\n",vp->name);
7911
7912 if (p->ttype == icSigColorantTableType
7913 || p->ttype == icmSigAltColorantTableType) {
7914
7915 switch(pcs) {
7916 case icSigXYZData:
7917 op->gprintf(op," XYZ = %f, %f, %f\n",
7918 vp->pcsCoords[0],vp->pcsCoords[1],vp->pcsCoords[2]);
7919 break;
7920 case icSigLabData:
7921 op->gprintf(op," Lab = %f, %f, %f\n",
7922 vp->pcsCoords[0],vp->pcsCoords[1],vp->pcsCoords[2]);
7923 break;
7924 default:
7925 op->gprintf(op," Unexpected PCS\n");
7926 break;
7927 }
7928 }
7929 }
7930 }
7931 }
7932
7933 /* Allocate variable sized data elements */
7934 static int icmColorantTable_allocate(
7935 icmBase *pp
7936 ) {
7937 icmColorantTable *p = (icmColorantTable *)pp;
7938 icc *icp = p->icp;
7939
7940 if (p->count != p->_count) {
7941 unsigned int i;
7942 if (ovr_mul(p->count, sizeof(icmColorantTableVal))) {
7943 sprintf(icp->err,"icmColorantTable_alloc: count overflow (%d of %ld bytes)",p->count,sizeof(icmColorantTableVal));
7944 return icp->errc = 1;
7945 }
7946 if (p->data != NULL)
7947 icp->al->free(icp->al, p->data);
7948 if ((p->data = (icmColorantTableVal *) icp->al->calloc(icp->al,p->count, sizeof(icmColorantTableVal))) == NULL) {
7949 sprintf(icp->err,"icmColorantTable_alloc: malloc() of icmColorantTable data failed");
7950 return icp->errc = 2;
7951 }
7952 for (i = 0; i < p->count; i++) {
7953 p->data[i].icp = icp; /* Do init */
7954 }
7955 p->_count = p->count;
7956 }
7957 return 0;
7958 }
7959
7960 /* Free all storage in the object */
7961 static void icmColorantTable_delete(
7962 icmBase *pp
7963 ) {
7964 icmColorantTable *p = (icmColorantTable *)pp;
7965 icc *icp = p->icp;
7966
7967 if (p->data != NULL)
7968 icp->al->free(icp->al, p->data);
7969 icp->al->free(icp->al, p);
7970 }
7971
7972 /* Create an empty object. Return null on error */
7973 static icmBase *new_icmColorantTable(
7974 icc *icp
7975 ) {
7976 icmColorantTable *p;
7977 if ((p = (icmColorantTable *) icp->al->calloc(icp->al,1,sizeof(icmColorantTable))) == NULL)
7978 return NULL;
7979 p->ttype = icSigColorantTableType;
7980 p->refcount = 1;
7981 p->get_size = icmColorantTable_get_size;
7982 p->read = icmColorantTable_read;
7983 p->write = icmColorantTable_write;
7984 p->dump = icmColorantTable_dump;
7985 p->allocate = icmColorantTable_allocate;
7986 p->del = icmColorantTable_delete;
7987 p->icp = icp;
7988
7989 return (icmBase *)p;
7990 }
7991
7992 /* ---------------------------------------------------------- */
7993 /* textDescription */
7994
7995 /* Return the number of bytes needed to write this tag */
7996 static unsigned int icmTextDescription_get_size(
7997 icmBase *pp
7998 ) {
7999 icmTextDescription *p = (icmTextDescription *)pp;
8000 unsigned int len = 0;
8001 len = sat_add(len, 8); /* 8 bytes for tag and padding */
8002 len = sat_addadd(len, 4, p->size); /* Ascii string length + ascii string */
8003 len = sat_addaddmul(len, 8, 2, p->ucSize); /* Unicode language code + length + string */
8004 len = sat_addadd(len, 3, 67); /* ScriptCode code, length string */
8005 return len;
8006 }
8007
8008 /* read the object, return 0 on success, error code on fail */
8009 static int icmTextDescription_read(
8010 icmBase *pp,
8011 unsigned int len, /* tag length */
8012 unsigned int of /* start offset within file */
8013 ) {
8014 icmTextDescription *p = (icmTextDescription *)pp;
8015 icc *icp = p->icp;
8016 int rv;
8017 char *bp, *buf, *end;
8018
8019 #ifdef ICM_STRICT
8020 if (len < (8 + 4 + 8 + 3 /* + 67 */)) {
8021 #else
8022 if (len < (8 + 4 + 8 + 3)) {
8023 #endif
8024 sprintf(icp->err,"icmTextDescription_read: Tag too small to be legal");
8025 return icp->errc = 1;
8026 }
8027
8028 /* Allocate a file read buffer */
8029 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
8030 sprintf(icp->err,"icmTextDescription_read: malloc() failed");
8031 return icp->errc = 2;
8032 }
8033 bp = buf;
8034 end = buf + len;
8035
8036 /* Read portion of file into buffer */
8037 if ( icp->fp->seek(icp->fp, of) != 0
8038 || icp->fp->read(icp->fp, bp, 1, len) != len) {
8039 sprintf(icp->err,"icmTextDescription_read: fseek() or fread() failed");
8040 icp->al->free(icp->al, buf);
8041 return icp->errc = 1;
8042 }
8043
8044 /* Read from the buffer into the structure */
8045 if ((rv = p->core_read(p, &bp, end)) != 0) {
8046 icp->al->free(icp->al, buf);
8047 return rv;
8048 }
8049
8050 icp->al->free(icp->al, buf);
8051 return 0;
8052 }
8053
8054 /* core read the object, return 0 on success, error code on fail */
8055 static int icmTextDescription_core_read(
8056 icmTextDescription *p,
8057 char **bpp, /* Pointer to buffer pointer, returns next after read */
8058 char *end /* Pointer to past end of read buffer */
8059 ) {
8060 icc *icp = p->icp;
8061 int rv;
8062 char *bp = *bpp;
8063
8064 if (bp > end || 8 > (end - bp)) {
8065 sprintf(icp->err,"icmTextDescription_read: Data too short to type descriptor");
8066 *bpp = bp;
8067 return icp->errc = 1;
8068 }
8069
8070 p->size = read_UInt32Number(bp);
8071 /* Read type descriptor from the buffer */
8072 if (((icTagTypeSignature)read_SInt32Number(bp)) != p->ttype) {
8073 *bpp = bp;
8074 sprintf(icp->err,"icmTextDescription_read: Wrong tag type ('%s') for icmTextDescription",
8075 tag2str((icTagTypeSignature)read_SInt32Number(bp)));
8076 return icp->errc = 1;
8077 }
8078 bp = bp + 8;
8079
8080 /* Read the Ascii string */
8081 if (bp > end || 4 > (end - bp)) {
8082 *bpp = bp;
8083 sprintf(icp->err,"icmTextDescription_read: Data too short to read Ascii header");
8084 return icp->errc = 1;
8085 }
8086 p->size = read_UInt32Number(bp);
8087 bp += 4;
8088 if (p->size > 0) {
8089 if (bp > end || p->size > (end - bp)) {
8090 *bpp = bp;
8091 sprintf(icp->err,"icmTextDescription_read: Data too short to read Ascii string");
8092 return icp->errc = 1;
8093 }
8094 if ((rv = check_null_string(bp,p->size)) == 1) {
8095 *bpp = bp;
8096 sprintf(icp->err,"icmTextDescription_read: ascii string is not terminated");
8097 return icp->errc = 1;
8098 }
8099 #ifdef ICM_STRICT
8100 if (rv == 2) {
8101 *bpp = bp;
8102 sprintf(icp->err,"icmTextDescription_read: ascii string is shorter than count");
8103 return icp->errc = 1;
8104 }
8105 #endif
8106 if ((rv = p->allocate((icmBase *)p)) != 0) {
8107 return rv;
8108 }
8109 strcpy(p->desc, bp);
8110 bp += p->size;
8111 }
8112
8113 /* Read the Unicode string */
8114 if (bp > end || 8 > (end - bp)) {
8115 *bpp = bp;
8116 sprintf(icp->err,"icmTextDescription_read: Data too short to read Unicode string");
8117 return icp->errc = 1;
8118 }
8119 p->ucLangCode = read_UInt32Number(bp);
8120 bp += 4;
8121 p->ucSize = read_UInt32Number(bp);
8122 bp += 4;
8123 if (p->ucSize > 0) {
8124 ORD16 *up;
8125 char *tbp;
8126 if (bp > end || p->ucSize > (end - bp)/2) {
8127 *bpp = bp;
8128 sprintf(icp->err,"icmTextDescription_read: Data too short to read Unicode string");
8129 return icp->errc = 1;
8130 }
8131 if ((rv = check_null_string16(bp,p->ucSize)) == 1) {
8132 *bpp = bp;
8133 sprintf(icp->err,"icmTextDescription_read: Unicode string is not terminated");
8134 return icp->errc = 1;
8135 }
8136 #ifdef ICM_STRICT
8137 if (rv == 2) {
8138 *bpp = bp;
8139 sprintf(icp->err,"icmTextDescription_read: Unicode string is shorter than count");
8140 return icp->errc = 1;
8141 }
8142 #endif
8143 if ((rv = p->allocate((icmBase *)p)) != 0) {
8144 return rv;
8145 }
8146 for (up = p->ucDesc, tbp = bp; tbp[0] != 0 || tbp[1] != 0; up++, tbp += 2)
8147 *up = read_UInt16Number(tbp);
8148 *up = 0; /* Unicode null */
8149 bp += p->ucSize * 2;
8150 }
8151
8152 /* Read the ScriptCode string */
8153 if (bp > end || 3 > (end - bp)) {
8154 *bpp = bp;
8155 sprintf(icp->err,"icmTextDescription_read: Data too short to read ScriptCode header");
8156 return icp->errc = 1;
8157 }
8158 p->scCode = read_UInt16Number(bp);
8159 bp += 2;
8160 p->scSize = read_UInt8Number(bp);
8161 bp += 1;
8162 if (p->scSize > 0) {
8163 if (p->scSize > 67) {
8164 *bpp = bp;
8165 sprintf(icp->err,"icmTextDescription_read: ScriptCode string too long");
8166 return icp->errc = 1;
8167 }
8168 if (bp > end || p->scSize > (end - bp)) {
8169 *bpp = bp;
8170 sprintf(icp->err,"icmTextDescription_read: Data too short to read ScriptCode string");
8171 return icp->errc = 1;
8172 }
8173 if ((rv = check_null_string(bp,p->scSize)) == 1) {
8174 #ifdef ICM_STRICT
8175 *bpp = bp;
8176 sprintf(icp->err,"icmTextDescription_read: ScriptCode string is not terminated");
8177 return icp->errc = 1;
8178 #else
8179 /* Patch it up */
8180 bp[p->scSize-1] = '\000';
8181 #endif
8182 }
8183 memmove((void *)p->scDesc, (void *)bp, p->scSize);
8184 } else {
8185 memset((void *)p->scDesc, 0, 67);
8186 }
8187 bp += 67;
8188
8189 *bpp = bp;
8190 return 0;
8191 }
8192
8193 /* Write the contents of the object. Return 0 on sucess, error code on failure */
8194 static int icmTextDescription_write(
8195 icmBase *pp,
8196 unsigned int of /* File offset to write from */
8197 ) {
8198 icmTextDescription *p = (icmTextDescription *)pp;
8199 icc *icp = p->icp;
8200 unsigned int len;
8201 char *bp, *buf; /* Buffer to write from */
8202 int rv = 0;
8203
8204 /* Allocate a file write buffer */
8205 if ((len = p->get_size((icmBase *)p)) == UINT_MAX) {
8206 sprintf(icp->err,"icmTextDescription_write get_size overflow");
8207 return icp->errc = 1;
8208 }
8209 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
8210 sprintf(icp->err,"icmTextDescription_write malloc() failed");
8211 return icp->errc = 2;
8212 }
8213 bp = buf;
8214
8215 /* Write to the buffer from the structure */
8216 if ((rv = p->core_write(p, &bp)) != 0) {
8217 icp->al->free(icp->al, buf);
8218 return rv;
8219 }
8220
8221 /* Write to the file */
8222 if ( icp->fp->seek(icp->fp, of) != 0
8223 || icp->fp->write(icp->fp, buf, 1, len) != len) {
8224 sprintf(icp->err,"icmTextDescription_write fseek() or fwrite() failed");
8225 icp->al->free(icp->al, buf);
8226 return icp->errc = 2;
8227 }
8228 icp->al->free(icp->al, buf);
8229 return 0;
8230 }
8231
8232 /* Core write the contents of the object. Return 0 on sucess, error code on failure */
8233 static int icmTextDescription_core_write(
8234 icmTextDescription *p,
8235 char **bpp /* Pointer to buffer pointer, returns next after read */
8236 ) {
8237 icc *icp = p->icp;
8238 char *bp = *bpp;
8239 int rv;
8240
8241 /* Write type descriptor to the buffer */
8242 if ((rv = write_SInt32Number((int)p->ttype,bp)) != 0) {
8243 sprintf(icp->err,"icmTextDescription_write: write_SInt32Number() failed");
8244 *bpp = bp;
8245 return icp->errc = rv;
8246 }
8247 write_SInt32Number(0,bp+4); /* Set padding to 0 */
8248 bp = bp + 8;
8249
8250 /* Write the Ascii string */
8251 if ((rv = write_UInt32Number(p->size,bp)) != 0) {
8252 sprintf(icp->err,"icmTextDescription_write: write_UInt32Number() failed");
8253 *bpp = bp;
8254 return icp->errc = rv;
8255 }
8256 bp += 4;
8257 if (p->size > 0) {
8258 if ((rv = check_null_string(p->desc,p->size)) == 1) {
8259 *bpp = bp;
8260 sprintf(icp->err,"icmTextDescription_write: ascii string is not terminated");
8261 return icp->errc = 1;
8262 }
8263 if (rv == 2) {
8264 *bpp = bp;
8265 sprintf(icp->err,"icmTextDescription_write: ascii string is shorter than length");
8266 return icp->errc = 1;
8267 }
8268 strcpy(bp, p->desc);
8269 bp += strlen(p->desc) + 1;
8270 }
8271
8272 /* Write the Unicode string */
8273 if ((rv = write_UInt32Number(p->ucLangCode, bp)) != 0) {
8274 sprintf(icp->err,"icmTextDescription_write: write_UInt32Number() failed");
8275 *bpp = bp;
8276 return icp->errc = rv;
8277 }
8278 bp += 4;
8279 if ((rv = write_UInt32Number(p->ucSize, bp)) != 0) {
8280 sprintf(icp->err,"icmTextDescription_write: write_UInt32Number() failed");
8281 *bpp = bp;
8282 return icp->errc = rv;
8283 }
8284 bp += 4;
8285 if (p->ucSize > 0) {
8286 ORD16 *up;
8287 if ((rv = check_null_string16((char *)p->ucDesc,p->ucSize)) == 1) {
8288 *bpp = bp;
8289 sprintf(icp->err,"icmTextDescription_write: Unicode string is not terminated");
8290 return icp->errc = 1;
8291 }
8292 if (rv == 2) {
8293 *bpp = bp;
8294 sprintf(icp->err,"icmTextDescription_write: Unicode string is shorter than length");
8295 return icp->errc = 1;
8296 }
8297 for(up = p->ucDesc; *up != 0; up++, bp += 2) {
8298 if ((rv = write_UInt16Number(((unsigned int)*up), bp)) != 0) {
8299 sprintf(icp->err,"icmTextDescription_write: write_UInt16Number() failed");
8300 *bpp = bp;
8301 return icp->errc = rv;
8302 }
8303 }
8304 bp[0] = 0; /* null */
8305 bp[1] = 0;
8306 bp += 2;
8307 }
8308
8309 /* Write the ScriptCode string */
8310 if ((rv = write_UInt16Number(p->scCode, bp)) != 0) {
8311 sprintf(icp->err,"icmTextDescription_write: write_UInt16Number() failed");
8312 *bpp = bp;
8313 return icp->errc = rv;
8314 }
8315 bp += 2;
8316 if ((rv = write_UInt8Number(p->scSize, bp)) != 0) {
8317 sprintf(icp->err,"icmTextDescription_write: write_UInt8Number() failed");
8318 *bpp = bp;
8319 return icp->errc = rv;
8320 }
8321 bp += 1;
8322 if (p->scSize > 0) {
8323 if (p->scSize > 67) {
8324 *bpp = bp;
8325 sprintf(icp->err,"icmTextDescription_write: ScriptCode string too long");
8326 return icp->errc = 1;
8327 }
8328 if ((rv = check_null_string((char *)p->scDesc,p->scSize)) == 1) {
8329 *bpp = bp;
8330 sprintf(icp->err,"icmTextDescription_write: ScriptCode string is not terminated");
8331 return icp->errc = 1;
8332 }
8333 memmove((void *)bp, (void *)p->scDesc, 67);
8334 } else {
8335 memset((void *)bp, 0, 67);
8336 }
8337 bp += 67;
8338
8339 *bpp = bp;
8340 return 0;
8341 }
8342
8343 /* Dump a text description of the object */
8344 static void icmTextDescription_dump(
8345 icmBase *pp,
8346 icmFile *op, /* Output to dump to */
8347 int verb /* Verbosity level */
8348 ) {
8349 icmTextDescription *p = (icmTextDescription *)pp;
8350 unsigned int i, r, c;
8351
8352 if (verb <= 0)
8353 return;
8354
8355 op->gprintf(op,"TextDescription:\n");
8356
8357 if (p->size > 0) {
8358 unsigned int size = p->size > 0 ? p->size-1 : 0;
8359 op->gprintf(op," ASCII data, length %lu chars:\n",p->size);
8360
8361 i = 0;
8362 for (r = 1;; r++) { /* count rows */
8363 if (i >= size) {
8364 op->gprintf(op,"\n");
8365 break;
8366 }
8367 if (r > 1 && verb < 2) {
8368 op->gprintf(op,"...\n");
8369 break; /* Print 1 row if not verbose */
8370 }
8371 c = 1;
8372 op->gprintf(op," 0x%04lx: ",i);
8373 c += 10;
8374 while (i < size && c < 75) {
8375 if (isprint(p->desc[i])) {
8376 op->gprintf(op,"%c",p->desc[i]);
8377 c++;
8378 } else {
8379 op->gprintf(op,"\\%03o",p->desc[i]);
8380 c += 4;
8381 }
8382 i++;
8383 }
8384 if (i < size)
8385 op->gprintf(op,"\n");
8386 }
8387 } else {
8388 op->gprintf(op," No ASCII data\n");
8389 }
8390
8391 /* Can't dump Unicode or ScriptCode as text with portable code */
8392 if (p->ucSize > 0) {
8393 unsigned int size = p->ucSize;
8394 op->gprintf(op," Unicode Data, Language code 0x%x, length %lu chars\n",
8395 p->ucLangCode, p->ucSize);
8396 i = 0;
8397 for (r = 1;; r++) { /* count rows */
8398 if (i >= size) {
8399 op->gprintf(op,"\n");
8400 break;
8401 }
8402 if (r > 1 && verb < 2) {
8403 op->gprintf(op,"...\n");
8404 break; /* Print 1 row if not verbose */
8405 }
8406 c = 1;
8407 op->gprintf(op," 0x%04lx: ",i);
8408 c += 10;
8409 while (i < size && c < 75) {
8410 op->gprintf(op,"%04x ",p->ucDesc[i]);
8411 c += 5;
8412 i++;
8413 }
8414 if (i < size)
8415 op->gprintf(op,"\n");
8416 }
8417 } else {
8418 op->gprintf(op," No Unicode data\n");
8419 }
8420 if (p->scSize > 0) {
8421 unsigned int size = p->scSize;
8422 op->gprintf(op," ScriptCode Data, Code 0x%x, length %lu chars\n",
8423 p->scCode, p->scSize);
8424 i = 0;
8425 for (r = 1;; r++) { /* count rows */
8426 if (i >= size) {
8427 op->gprintf(op,"\n");
8428 break;
8429 }
8430 if (r > 1 && verb < 2) {
8431 op->gprintf(op,"...\n");
8432 break; /* Print 1 row if not verbose */
8433 }
8434 c = 1;
8435 op->gprintf(op," 0x%04lx: ",i);
8436 c += 10;
8437 while (i < size && c < 75) {
8438 op->gprintf(op,"%02x ",p->scDesc[i]);
8439 c += 3;
8440 i++;
8441 }
8442 if (i < size)
8443 op->gprintf(op,"\n");
8444 }
8445 } else {
8446 op->gprintf(op," No ScriptCode data\n");
8447 }
8448 }
8449
8450 /* Allocate variable sized data elements */
8451 static int icmTextDescription_allocate(
8452 icmBase *pp
8453 ) {
8454 icmTextDescription *p = (icmTextDescription *)pp;
8455 icc *icp = p->icp;
8456
8457 if (p->size != p->_size) {
8458 if (ovr_mul(p->size, sizeof(char))) {
8459 sprintf(icp->err,"icmTextDescription_alloc: size overflow");
8460 return icp->errc = 1;
8461 }
8462 if (p->desc != NULL)
8463 icp->al->free(icp->al, p->desc);
8464 if ((p->desc = (char *) icp->al->calloc(icp->al, p->size, sizeof(char))) == NULL) {
8465 sprintf(icp->err,"icmTextDescription_alloc: malloc() of Ascii description failed");
8466 return icp->errc = 2;
8467 }
8468 p->_size = p->size;
8469 }
8470 if (p->ucSize != p->uc_size) {
8471 if (ovr_mul(p->ucSize, sizeof(ORD16))) {
8472 sprintf(icp->err,"icmTextDescription_alloc: size overflow");
8473 return icp->errc = 1;
8474 }
8475 if (p->ucDesc != NULL)
8476 icp->al->free(icp->al, p->ucDesc);
8477 if ((p->ucDesc = (ORD16 *) icp->al->calloc(icp->al, p->ucSize, sizeof(ORD16))) == NULL) {
8478 sprintf(icp->err,"icmTextDescription_alloc: malloc() of Unicode description failed");
8479 return icp->errc = 2;
8480 }
8481 p->uc_size = p->ucSize;
8482 }
8483 return 0;
8484 }
8485
8486 /* Free all variable sized elements */
8487 static void icmTextDescription_unallocate(
8488 icmTextDescription *p
8489 ) {
8490 icc *icp = p->icp;
8491
8492 if (p->desc != NULL)
8493 icp->al->free(icp->al, p->desc);
8494 if (p->ucDesc != NULL)
8495 icp->al->free(icp->al, p->ucDesc);
8496 }
8497
8498 /* Free all storage in the object */
8499 static void icmTextDescription_delete(
8500 icmBase *pp
8501 ) {
8502 icmTextDescription *p = (icmTextDescription *)pp;
8503 icc *icp = p->icp;
8504
8505 icmTextDescription_unallocate(p);
8506 icp->al->free(icp->al, p);
8507 }
8508
8509 /* Initialze a named object */
8510 static void icmTextDescription_init(
8511 icmTextDescription *p,
8512 icc *icp
8513 ) {
8514 memset((void *)p, 0, sizeof(icmTextDescription)); /* Imitate calloc */
8515
8516 p->ttype = icSigTextDescriptionType;
8517 p->refcount = 1;
8518 p->get_size = icmTextDescription_get_size;
8519 p->read = icmTextDescription_read;
8520 p->write = icmTextDescription_write;
8521 p->dump = icmTextDescription_dump;
8522 p->allocate = icmTextDescription_allocate;
8523 p->del = icmTextDescription_delete;
8524 p->icp = icp;
8525
8526 p->core_read = icmTextDescription_core_read;
8527 p->core_write = icmTextDescription_core_write;
8528 }
8529
8530 /* Create an empty object. Return null on error */
8531 static icmBase *new_icmTextDescription(
8532 icc *icp
8533 ) {
8534 icmTextDescription *p;
8535 if ((p = (icmTextDescription *) icp->al->calloc(icp->al,1,sizeof(icmTextDescription))) == NULL)
8536 return NULL;
8537
8538 icmTextDescription_init(p,icp);
8539 return (icmBase *)p;
8540 }
8541
8542 /* ---------------------------------------------------------- */
8543
8544 /* Support for icmDescStruct */
8545
8546 /* Return the number of bytes needed to write this tag */
8547 static unsigned int icmDescStruct_get_size(
8548 icmDescStruct *p
8549 ) {
8550 unsigned int len = 0;
8551 len = sat_add(len, 20); /* 20 bytes for header info */
8552 len = sat_add(len, p->device.get_size((icmBase *)&p->device));
8553 if (p->device.size == 0)
8554 len = sat_add(len, 1); /* Extra 1 because of zero length desciption */
8555 len = sat_add(len, p->model.get_size((icmBase *)&p->model));
8556 if (p->model.size == 0)
8557 len = sat_add(len, 1); /* Extra 1 because of zero length desciption */
8558 return len;
8559 }
8560
8561 /* read the object, return 0 on success, error code on fail */
8562 static int icmDescStruct_read(
8563 icmDescStruct *p,
8564 char **bpp, /* Pointer to buffer pointer, returns next after read */
8565 char *end /* Pointer to past end of read buffer */
8566 ) {
8567 icc *icp = p->icp;
8568 char *bp = *bpp;
8569 int rv = 0;
8570
8571 if (bp > end || 20 > (end - bp)) {
8572 sprintf(icp->err,"icmDescStruct_read: Data too short read header");
8573 *bpp = bp;
8574 return icp->errc = 1;
8575 }
8576
8577 p->deviceMfg = read_SInt32Number(bp + 0);
8578 p->deviceModel = read_UInt32Number(bp + 4);
8579 read_UInt64Number(&p->attributes, bp + 8);
8580 p->technology = (icTechnologySignature) read_UInt32Number(bp + 16);
8581 *bpp = bp += 20;
8582
8583 /* Read the device text description */
8584 if ((rv = p->device.core_read(&p->device, bpp, end)) != 0) {
8585 return rv;
8586 }
8587
8588 /* Read the model text description */
8589 if ((rv = p->model.core_read(&p->model, bpp, end)) != 0) {
8590 return rv;
8591 }
8592
8593 return 0;
8594 }
8595
8596 /* Write the contents of the object. Return 0 on sucess, error code on failure */
8597 static int icmDescStruct_write(
8598 icmDescStruct *p,
8599 char **bpp /* Pointer to buffer pointer, returns next after read */
8600 ) {
8601 icc *icp = p->icp;
8602 char *bp = *bpp;
8603 int rv = 0;
8604 char *ttd = NULL;
8605 unsigned int tts = 0;
8606
8607 if ((rv = write_SInt32Number(p->deviceMfg, bp + 0)) != 0) {
8608 sprintf(icp->err,"icmDescStruct_write: write_SInt32Number() failed");
8609 *bpp = bp;
8610 return icp->errc = rv;
8611 }
8612 if ((rv = write_UInt32Number(p->deviceModel, bp + 4)) != 0) {
8613 sprintf(icp->err,"icmDescStruct_write: write_UInt32Number() failed");
8614 *bpp = bp;
8615 return icp->errc = rv;
8616 }
8617 if ((rv = write_UInt64Number(&p->attributes, bp + 8)) != 0) {
8618 sprintf(icp->err,"icmDescStruct_write: write_UInt64Number() failed");
8619 *bpp = bp;
8620 return icp->errc = rv;
8621 }
8622 if ((rv = write_UInt32Number(p->technology, bp + 16)) != 0) {
8623 sprintf(icp->err,"icmDescStruct_write: write_UInt32Number() failed");
8624 *bpp = bp;
8625 return icp->errc = rv;
8626 }
8627 *bpp = bp += 20;
8628
8629 /* Make sure the ASCII device text is a minimum size of 1, as per the spec. */
8630 ttd = p->device.desc;
8631 tts = p->device.size;
8632
8633 if (p->device.size == 0) {
8634 p->device.desc = "";
8635 p->device.size = 1;
8636 }
8637
8638 /* Write the device text description */
8639 if ((rv = p->device.core_write(&p->device, bpp)) != 0) {
8640 return rv;
8641 }
8642
8643 p->device.desc = ttd;
8644 p->device.size = tts;
8645
8646 /* Make sure the ASCII model text is a minimum size of 1, as per the spec. */
8647 ttd = p->model.desc;
8648 tts = p->model.size;
8649
8650 if (p->model.size == 0) {
8651 p->model.desc = "";
8652 p->model.size = 1;
8653 }
8654
8655 /* Write the model text description */
8656 if ((rv = p->model.core_write(&p->model, bpp)) != 0) {
8657 return rv;
8658 }
8659
8660 p->model.desc = ttd;
8661 p->model.size = tts;
8662
8663 /* Make sure the ASCII model text is a minimum size of 1, as per the spec. */
8664 ttd = p->device.desc;
8665 tts = p->device.size;
8666
8667 return 0;
8668 }
8669
8670 /* Dump a text description of the object */
8671 static void icmDescStruct_dump(
8672 icmDescStruct *p,
8673 icmFile *op, /* Output to dump to */
8674 int verb, /* Verbosity level */
8675 int index /* Description index */
8676 ) {
8677 if (verb <= 0)
8678 return;
8679
8680 op->gprintf(op,"DescStruct %u:\n",index);
8681 if (verb >= 1) {
8682 op->gprintf(op," Dev. Mnfctr. = %s\n",tag2str(p->deviceMfg)); /* ~~~ */
8683 op->gprintf(op," Dev. Model = %s\n",tag2str(p->deviceModel)); /* ~~~ */
8684 op->gprintf(op," Dev. Attrbts = %s\n", string_DeviceAttributes(p->attributes.l));
8685 op->gprintf(op," Dev. Technology = %s\n", string_TechnologySignature(p->technology));
8686 p->device.dump((icmBase *)&p->device, op,verb);
8687 p->model.dump((icmBase *)&p->model, op,verb);
8688 op->gprintf(op,"\n");
8689 }
8690 }
8691
8692 /* Allocate variable sized data elements (ie. descriptions) */
8693 static int icmDescStruct_allocate(
8694 icmDescStruct *p
8695 ) {
8696 int rv;
8697
8698 if ((rv = p->device.allocate((icmBase *)&p->device)) != 0) {
8699 return rv;
8700 }
8701 if ((rv = p->model.allocate((icmBase *)&p->model)) != 0) {
8702 return rv;
8703 }
8704 return 0;
8705 }
8706
8707 /* Free all storage in the object */
8708 static void icmDescStruct_delete(
8709 icmDescStruct *p
8710 ) {
8711 icmTextDescription_unallocate(&p->device);
8712 icmTextDescription_unallocate(&p->model);
8713 }
8714
8715 /* Init a DescStruct object */
8716 static void icmDescStruct_init(
8717 icmDescStruct *p,
8718 icc *icp
8719 ) {
8720
8721 p->allocate = icmDescStruct_allocate;
8722 p->icp = icp;
8723
8724 icmTextDescription_init(&p->device, icp);
8725 icmTextDescription_init(&p->model, icp);
8726 }
8727
8728 /* - - - - - - - - - - - - - - - */
8729 /* icmProfileSequenceDesc object */
8730
8731 /* Return the number of bytes needed to write this tag */
8732 static unsigned int icmProfileSequenceDesc_get_size(
8733 icmBase *pp
8734 ) {
8735 icmProfileSequenceDesc *p = (icmProfileSequenceDesc *)pp;
8736 unsigned int len = 0;
8737 unsigned int i;
8738 len = sat_add(len, 12); /* 12 bytes for tag, padding and count */
8739 for (i = 0; i < p->count; i++) { /* All the description structures */
8740 len = sat_add(len, icmDescStruct_get_size(&p->data[i]));
8741 }
8742 return len;
8743 }
8744
8745 /* read the object, return 0 on success, error code on fail */
8746 static int icmProfileSequenceDesc_read(
8747 icmBase *pp,
8748 unsigned int len, /* tag length */
8749 unsigned int of /* start offset within file */
8750 ) {
8751 icmProfileSequenceDesc *p = (icmProfileSequenceDesc *)pp;
8752 icc *icp = p->icp;
8753 unsigned int i;
8754 char *bp, *buf, *end;
8755 int rv = 0;
8756
8757 if (len < 12) {
8758 sprintf(icp->err,"icmProfileSequenceDesc_read: Tag too small to be legal");
8759 return icp->errc = 1;
8760 }
8761
8762 /* Allocate a file read buffer */
8763 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
8764 sprintf(icp->err,"icmProfileSequenceDesc_read: malloc() failed");
8765 return icp->errc = 2;
8766 }
8767 bp = buf;
8768 end = buf + len;
8769
8770 /* Read portion of file into buffer */
8771 if ( icp->fp->seek(icp->fp, of) != 0
8772 || icp->fp->read(icp->fp, bp, 1, len) != len) {
8773 sprintf(icp->err,"icmProfileSequenceDesc_read: fseek() or fread() failed");
8774 icp->al->free(icp->al, buf);
8775 return icp->errc = 1;
8776 }
8777
8778 /* Read type descriptor from the buffer */
8779 if (((icTagTypeSignature)read_SInt32Number(bp)) != p->ttype) {
8780 sprintf(icp->err,"icmProfileSequenceDesc_read: Wrong tag type for icmProfileSequenceDesc");
8781 icp->al->free(icp->al, buf);
8782 return icp->errc = 1;
8783 }
8784 bp += 8; /* Skip padding */
8785
8786 p->count = read_UInt32Number(bp); /* Number of sequence descriptions */
8787 bp += 4;
8788
8789 /* Read all the sequence descriptions */
8790 if ((rv = p->allocate((icmBase *)p)) != 0) {
8791 icp->al->free(icp->al, buf);
8792 return rv;
8793 }
8794 for (i = 0; i < p->count; i++) {
8795 if ((rv = icmDescStruct_read(&p->data[i], &bp, end)) != 0) {
8796 icp->al->free(icp->al, buf);
8797 return rv;
8798 }
8799 }
8800
8801 icp->al->free(icp->al, buf);
8802 return 0;
8803 }
8804
8805 /* Write the contents of the object. Return 0 on sucess, error code on failure */
8806 static int icmProfileSequenceDesc_write(
8807 icmBase *pp,
8808 unsigned int of /* File offset to write from */
8809 ) {
8810 icmProfileSequenceDesc *p = (icmProfileSequenceDesc *)pp;
8811 icc *icp = p->icp;
8812 unsigned int i;
8813 unsigned int len;
8814 char *bp, *buf; /* Buffer to write from */
8815 int rv = 0;
8816
8817 /* Allocate a file write buffer */
8818 if ((len = p->get_size((icmBase *)p)) == UINT_MAX) {
8819 sprintf(icp->err,"icmProfileSequenceDesc_write get_size overflow");
8820 return icp->errc = 1;
8821 }
8822 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
8823 sprintf(icp->err,"icmProfileSequenceDesc_write malloc() failed");
8824 return icp->errc = 2;
8825 }
8826 bp = buf;
8827
8828 /* Write type descriptor to the buffer */
8829 if ((rv = write_SInt32Number((int)p->ttype,bp)) != 0) {
8830 sprintf(icp->err,"icmProfileSequenceDesc_write: write_SInt32Number() failed");
8831 icp->al->free(icp->al, buf);
8832 return icp->errc = rv;
8833 }
8834 write_SInt32Number(0,bp+4); /* Set padding to 0 */
8835
8836 if ((rv = write_UInt32Number(p->count,bp+8)) != 0) {
8837 sprintf(icp->err,"icmProfileSequenceDesc_write: write_UInt32Number() failed");
8838 icp->al->free(icp->al, buf);
8839 return icp->errc = rv;
8840 }
8841 bp = bp + 12;
8842
8843 /* Write all the description structures */
8844 for (i = 0; i < p->count; i++) {
8845 if ((rv = icmDescStruct_write(&p->data[i], &bp)) != 0) {
8846 icp->al->free(icp->al, buf);
8847 return rv;
8848 }
8849 }
8850
8851 /* Write to the file */
8852 if ( icp->fp->seek(icp->fp, of) != 0
8853 || icp->fp->write(icp->fp, buf, 1, len) != len) {
8854 sprintf(icp->err,"icmProfileSequenceDesc_write fseek() or fwrite() failed");
8855 icp->al->free(icp->al, buf);
8856 return icp->errc = 2;
8857 }
8858 icp->al->free(icp->al, buf);
8859 return 0;
8860 }
8861
8862 /* Dump a text description of the object */
8863 static void icmProfileSequenceDesc_dump(
8864 icmBase *pp,
8865 icmFile *op, /* Output to dump to */
8866 int verb /* Verbosity level */
8867 ) {
8868 icmProfileSequenceDesc *p = (icmProfileSequenceDesc *)pp;
8869 if (verb <= 0)
8870 return;
8871
8872 op->gprintf(op,"ProfileSequenceDesc:\n");
8873 op->gprintf(op," No. elements = %u\n",p->count);
8874 if (verb >= 2) {
8875 unsigned int i;
8876 for (i = 0; i < p->count; i++)
8877 icmDescStruct_dump(&p->data[i], op, verb-1, i);
8878 }
8879 }
8880
8881 /* Allocate variable sized data elements (ie. count of profile descriptions) */
8882 static int icmProfileSequenceDesc_allocate(
8883 icmBase *pp
8884 ) {
8885 icmProfileSequenceDesc *p = (icmProfileSequenceDesc *)pp;
8886 icc *icp = p->icp;
8887 unsigned int i;
8888
8889 if (p->count != p->_count) {
8890 if (ovr_mul(p->count, sizeof(icmDescStruct))) {
8891 sprintf(icp->err,"icmProfileSequenceDesc_allocate: size overflow");
8892 return icp->errc = 1;
8893 }
8894 if (p->data != NULL)
8895 icp->al->free(icp->al, p->data);
8896 if ((p->data = (icmDescStruct *) icp->al->calloc(icp->al, p->count, sizeof(icmDescStruct))) == NULL) {
8897 sprintf(icp->err,"icmProfileSequenceDesc_allocate Allocation of DescStruct array failed");
8898 return icp->errc = 2;
8899 }
8900 /* Now init the DescStructs */
8901 for (i = 0; i < p->count; i++) {
8902 icmDescStruct_init(&p->data[i], icp);
8903 }
8904 p->_count = p->count;
8905 }
8906 return 0;
8907 }
8908
8909 /* Free all storage in the object */
8910 static void icmProfileSequenceDesc_delete(
8911 icmBase *pp
8912 ) {
8913 icmProfileSequenceDesc *p = (icmProfileSequenceDesc *)pp;
8914 icc *icp = p->icp;
8915 unsigned int i;
8916
8917 for (i = 0; i < p->count; i++) {
8918 icmDescStruct_delete(&p->data[i]); /* Free allocated contents */
8919 }
8920 if (p->data != NULL)
8921 icp->al->free(icp->al, p->data);
8922 icp->al->free(icp->al, p);
8923 }
8924
8925 /* Create an empty object. Return null on error */
8926 static icmBase *new_icmProfileSequenceDesc(
8927 icc *icp
8928 ) {
8929 icmProfileSequenceDesc *p;
8930 if ((p = (icmProfileSequenceDesc *) icp->al->calloc(icp->al,1,sizeof(icmProfileSequenceDesc))) == NULL)
8931 return NULL;
8932 p->ttype = icSigProfileSequenceDescType;
8933 p->refcount = 1;
8934 p->get_size = icmProfileSequenceDesc_get_size;
8935 p->read = icmProfileSequenceDesc_read;
8936 p->write = icmProfileSequenceDesc_write;
8937 p->dump = icmProfileSequenceDesc_dump;
8938 p->allocate = icmProfileSequenceDesc_allocate;
8939 p->del = icmProfileSequenceDesc_delete;
8940 p->icp = icp;
8941
8942 return (icmBase *)p;
8943 }
8944
8945 /* ---------------------------------------------------------- */
8946 /* Signature */
8947
8948 /* Return the number of bytes needed to write this tag */
8949 static unsigned int icmSignature_get_size(
8950 icmBase *pp
8951 ) {
8952 unsigned int len = 0;
8953 len = sat_add(len, 8); /* 8 bytes for tag and padding */
8954 len = sat_add(len, 4); /* 4 for signature */
8955 return len;
8956 }
8957
8958 /* read the object, return 0 on success, error code on fail */
8959 static int icmSignature_read(
8960 icmBase *pp,
8961 unsigned int len, /* tag length */
8962 unsigned int of /* start offset within file */
8963 ) {
8964 icmSignature *p = (icmSignature *)pp;
8965 icc *icp = p->icp;
8966 char *bp, *buf;
8967
8968 if (len < 12) {
8969 sprintf(icp->err,"icmSignature_read: Tag too small to be legal");
8970 return icp->errc = 1;
8971 }
8972
8973 /* Allocate a file read buffer */
8974 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
8975 sprintf(icp->err,"icmSignature_read: malloc() failed");
8976 return icp->errc = 2;
8977 }
8978 bp = buf;
8979
8980 /* Read portion of file into buffer */
8981 if ( icp->fp->seek(icp->fp, of) != 0
8982 || icp->fp->read(icp->fp, bp, 1, len) != len) {
8983 sprintf(icp->err,"icmSignature_read: fseek() or fread() failed");
8984 icp->al->free(icp->al, buf);
8985 return icp->errc = 1;
8986 }
8987
8988 /* Read type descriptor from the buffer */
8989 if (((icTagTypeSignature)read_SInt32Number(bp)) != p->ttype) {
8990 sprintf(icp->err,"icmSignaturSignatureng tag type for icmSignature");
8991 icp->al->free(icp->al, buf);
8992 return icp->errc = 1;
8993 }
8994
8995 /* Read the encoded measurement geometry */
8996 p->sig = (icTechnologySignature)read_SInt32Number(bp + 8);
8997
8998 icp->al->free(icp->al, buf);
8999 return 0;
9000 }
9001
9002 /* Write the contents of the object. Return 0 on sucess, error code on failure */
9003 static int icmSignature_write(
9004 icmBase *pp,
9005 unsigned int of /* File offset to write from */
9006 ) {
9007 icmSignature *p = (icmSignature *)pp;
9008 icc *icp = p->icp;
9009 unsigned int len;
9010 char *bp, *buf; /* Buffer to write from */
9011 int rv = 0;
9012
9013 /* Allocate a file write buffer */
9014 if ((len = p->get_size((icmBase *)p)) == UINT_MAX) {
9015 sprintf(icp->err,"icmSignature_write get_size overflow");
9016 return icp->errc = 1;
9017 }
9018 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
9019 sprintf(icp->err,"icmSignature_write malloc() failed");
9020 return icp->errc = 2;
9021 }
9022 bp = buf;
9023
9024 /* Write type descriptor to the buffer */
9025 if ((rv = write_SInt32Number((int)p->ttype,bp)) != 0) {
9026 sprintf(icp->err,"icmSignature_write: write_SInt32Number() failed");
9027 icp->al->free(icp->al, buf);
9028 return icp->errc = rv;
9029 }
9030 write_SInt32Number(0,bp+4); /* Set padding to 0 */
9031
9032 /* Write the signature */
9033 if ((rv = write_SInt32Number((int)p->sig, bp + 8)) != 0) {
9034 sprintf(icp->err,"icmSignaturea_write: write_SInt32Number() failed");
9035 icp->al->free(icp->al, buf);
9036 return icp->errc = rv;
9037 }
9038
9039 /* Write to the file */
9040 if ( icp->fp->seek(icp->fp, of) != 0
9041 || icp->fp->write(icp->fp, buf, 1, len) != len) {
9042 sprintf(icp->err,"icmSignature_write fseek() or fwrite() failed");
9043 icp->al->free(icp->al, buf);
9044 return icp->errc = 2;
9045 }
9046 icp->al->free(icp->al, buf);
9047 return 0;
9048 }
9049
9050 /* Dump a text description of the object */
9051 static void icmSignature_dump(
9052 icmBase *pp,
9053 icmFile *op, /* Output to dump to */
9054 int verb /* Verbosity level */
9055 ) {
9056 icmSignature *p = (icmSignature *)pp;
9057 if (verb <= 0)
9058 return;
9059
9060 op->gprintf(op,"Signature\n");
9061 op->gprintf(op," Technology = %s\n", string_TechnologySignature(p->sig));
9062 }
9063
9064 /* Allocate variable sized data elements */
9065 static int icmSignature_allocate(
9066 icmBase *pp
9067 ) {
9068 /* Nothing to do */
9069 return 0;
9070 }
9071
9072 /* Free all storage in the object */
9073 static void icmSignature_delete(
9074 icmBase *pp
9075 ) {
9076 icmSignature *p = (icmSignature *)pp;
9077 icc *icp = p->icp;
9078
9079 icp->al->free(icp->al, p);
9080 }
9081
9082 /* Create an empty object. Return null on error */
9083 static icmBase *new_icmSignature(
9084 icc *icp
9085 ) {
9086 icmSignature *p;
9087 if ((p = (icmSignature *) icp->al->calloc(icp->al,1,sizeof(icmSignature))) == NULL)
9088 return NULL;
9089 p->ttype = icSigSignatureType;
9090 p->refcount = 1;
9091 p->get_size = icmSignature_get_size;
9092 p->read = icmSignature_read;
9093 p->write = icmSignature_write;
9094 p->dump = icmSignature_dump;
9095 p->allocate = icmSignature_allocate;
9096 p->del = icmSignature_delete;
9097 p->icp = icp;
9098
9099 return (icmBase *)p;
9100 }
9101
9102 /* ---------------------------------------------------------- */
9103
9104 /* Data conversion support functions */
9105 static int read_ScreeningData(icmScreeningData *p, char *d) {
9106 p->frequency = read_S15Fixed16Number(d + 0);
9107 p->angle = read_S15Fixed16Number(d + 4);
9108 p->spotShape = (icSpotShape)read_SInt32Number(d + 8);
9109 return 0;
9110 }
9111
9112 static int write_ScreeningData(icmScreeningData *p, char *d) {
9113 int rv;
9114 if ((rv = write_S15Fixed16Number(p->frequency, d + 0)) != 0)
9115 return rv;
9116 if ((rv = write_S15Fixed16Number(p->angle, d + 4)) != 0)
9117 return rv;
9118 if ((rv = write_SInt32Number((int)p->spotShape, d + 8)) != 0)
9119 return rv;
9120 return 0;
9121 }
9122
9123
9124 /* icmScreening object */
9125
9126 /* Return the number of bytes needed to write this tag */
9127 static unsigned int icmScreening_get_size(
9128 icmBase *pp
9129 ) {
9130 icmScreening *p = (icmScreening *)pp;
9131 unsigned int len = 0;
9132 len = sat_add(len, 16); /* 16 bytes for tag, padding, flag & channeles */
9133 len = sat_addmul(len, p->channels, 12); /* 12 bytes for each channel */
9134 return len;
9135 }
9136
9137 /* read the object, return 0 on success, error code on fail */
9138 static int icmScreening_read(
9139 icmBase *pp,
9140 unsigned int len, /* tag length */
9141 unsigned int of /* start offset within file */
9142 ) {
9143 icmScreening *p = (icmScreening *)pp;
9144 icc *icp = p->icp;
9145 int rv = 0;
9146 unsigned int i;
9147 char *bp, *buf, *end;
9148
9149 if (len < 12) {
9150 sprintf(icp->err,"icmScreening_read: Tag too small to be legal");
9151 return icp->errc = 1;
9152 }
9153
9154 /* Allocate a file read buffer */
9155 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
9156 sprintf(icp->err,"icmScreening_read: malloc() failed");
9157 return icp->errc = 2;
9158 }
9159 bp = buf;
9160 end = buf + len;
9161
9162 /* Read portion of file into buffer */
9163 if ( icp->fp->seek(icp->fp, of) != 0
9164 || icp->fp->read(icp->fp, bp, 1, len) != len) {
9165 sprintf(icp->err,"icmScreening_read: fseek() or fread() failed");
9166 icp->al->free(icp->al, buf);
9167 return icp->errc = 1;
9168 }
9169
9170 /* Read type descriptor from the buffer */
9171 if (((icTagTypeSignature)read_SInt32Number(bp)) != p->ttype) {
9172 sprintf(icp->err,"icmScreening_read: Wrong tag type for icmScreening");
9173 icp->al->free(icp->al, buf);
9174 return icp->errc = 1;
9175 }
9176 p->screeningFlag = read_UInt32Number(bp+8); /* Flags */
9177 p->channels = read_UInt32Number(bp+12); /* Number of channels */
9178 bp = bp + 16;
9179
9180 if ((rv = p->allocate((icmBase *)p)) != 0) {
9181 icp->al->free(icp->al, buf);
9182 return rv;
9183 }
9184
9185 /* Read all the data from the buffer */
9186 for (i = 0; i < p->channels; i++, bp += 12) {
9187 if (bp > end || 12 > (end - bp)) {
9188 sprintf(icp->err,"icmScreening_read: Data too short to read Screening Data");
9189 icp->al->free(icp->al, buf);
9190 return icp->errc = 1;
9191 }
9192 read_ScreeningData(&p->data[i], bp);
9193 }
9194 icp->al->free(icp->al, buf);
9195 return 0;
9196 }
9197
9198 /* Write the contents of the object. Return 0 on sucess, error code on failure */
9199 static int icmScreening_write(
9200 icmBase *pp,
9201 unsigned int of /* File offset to write from */
9202 ) {
9203 icmScreening *p = (icmScreening *)pp;
9204 icc *icp = p->icp;
9205 unsigned int i;
9206 unsigned int len;
9207 char *bp, *buf; /* Buffer to write from */
9208 int rv = 0;
9209
9210 /* Allocate a file write buffer */
9211 if ((len = p->get_size((icmBase *)p)) == UINT_MAX) {
9212 sprintf(icp->err,"icmScreening_write get_size overflow");
9213 return icp->errc = 1;
9214 }
9215 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
9216 sprintf(icp->err,"icmScreening_write malloc() failed");
9217 return icp->errc = 2;
9218 }
9219 bp = buf;
9220
9221 /* Write type descriptor to the buffer */
9222 if ((rv = write_SInt32Number((int)p->ttype,bp)) != 0) {
9223 sprintf(icp->err,"icmScreening_write: write_SInt32Number() failed");
9224 icp->al->free(icp->al, buf);
9225 return icp->errc = rv;
9226 }
9227 write_SInt32Number(0,bp+4); /* Set padding to 0 */
9228
9229 if ((rv = write_UInt32Number(p->screeningFlag,bp+8)) != 0) {
9230 sprintf(icp->err,"icmScreening_write: write_UInt32Number() failed");
9231 icp->al->free(icp->al, buf);
9232 return icp->errc = rv;
9233 }
9234 if ((rv = write_UInt32Number(p->channels,bp+12)) != 0) {
9235 sprintf(icp->err,"icmScreening_write: write_UInt32NumberXYZumber() failed");
9236 icp->al->free(icp->al, buf);
9237 return icp->errc = rv;
9238 }
9239 bp = bp + 16;
9240
9241 /* Write all the data to the buffer */
9242 for (i = 0; i < p->channels; i++, bp += 12) {
9243 if ((rv = write_ScreeningData(&p->data[i],bp)) != 0) {
9244 sprintf(icp->err,"icmScreening_write: write_ScreeningData() failed");
9245 icp->al->free(icp->al, buf);
9246 return icp->errc = rv;
9247 }
9248 }
9249
9250 /* Write to the file */
9251 if ( icp->fp->seek(icp->fp, of) != 0
9252 || icp->fp->write(icp->fp, buf, 1, len) != len) {
9253 sprintf(icp->err,"icmScreening_write fseek() or fwrite() failed");
9254 icp->al->free(icp->al, buf);
9255 return icp->errc = 2;
9256 }
9257 icp->al->free(icp->al, buf);
9258 return 0;
9259 }
9260
9261 /* Dump a text description of the object */
9262 static void icmScreening_dump(
9263 icmBase *pp,
9264 icmFile *op, /* Output to dump to */
9265 int verb /* Verbosity level */
9266 ) {
9267 icmScreening *p = (icmScreening *)pp;
9268 if (verb <= 0)
9269 return;
9270
9271 op->gprintf(op,"Screening:\n");
9272 op->gprintf(op," Flags = %s\n", string_ScreenEncodings(p->screeningFlag));
9273 op->gprintf(op," No. channels = %u\n",p->channels);
9274 if (verb >= 2) {
9275 unsigned int i;
9276 for (i = 0; i < p->channels; i++) {
9277 op->gprintf(op," %lu:\n",i);
9278 op->gprintf(op," Frequency: %f\n",p->data[i].frequency);
9279 op->gprintf(op," Angle: %f\n",p->data[i].angle);
9280 op->gprintf(op," Spot shape: %s\n", string_SpotShape(p->data[i].spotShape));
9281 }
9282 }
9283 }
9284
9285 /* Allocate variable sized data elements */
9286 static int icmScreening_allocate(
9287 icmBase *pp
9288 ) {
9289 icmScreening *p = (icmScreening *)pp;
9290 icc *icp = p->icp;
9291
9292 if (p->channels != p->_channels) {
9293 if (ovr_mul(p->channels, sizeof(icmScreeningData))) {
9294 sprintf(icp->err,"icmScreening_alloc: size overflow");
9295 return icp->errc = 1;
9296 }
9297 if (p->data != NULL)
9298 icp->al->free(icp->al, p->data);
9299 if ((p->data = (icmScreeningData *) icp->al->malloc(icp->al, p->channels * sizeof(icmScreeningData))) == NULL) {
9300 sprintf(icp->err,"icmScreening_alloc: malloc() of icmScreening data failed");
9301 return icp->errc = 2;
9302 }
9303 p->_channels = p->channels;
9304 }
9305 return 0;
9306 }
9307
9308 /* Free all storage in the object */
9309 static void icmScreening_delete(
9310 icmBase *pp
9311 ) {
9312 icmScreening *p = (icmScreening *)pp;
9313 icc *icp = p->icp;
9314
9315 if (p->data != NULL)
9316 icp->al->free(icp->al, p->data);
9317 icp->al->free(icp->al, p);
9318 }
9319
9320 /* Create an empty object. Return null on error */
9321 static icmBase *new_icmScreening(
9322 icc *icp
9323 ) {
9324 icmScreening *p;
9325 if ((p = (icmScreening *) icp->al->calloc(icp->al,1,sizeof(icmScreening))) == NULL)
9326 return NULL;
9327 p->ttype = icSigScreeningType;
9328 p->refcount = 1;
9329 p->get_size = icmScreening_get_size;
9330 p->read = icmScreening_read;
9331 p->write = icmScreening_write;
9332 p->dump = icmScreening_dump;
9333 p->allocate = icmScreening_allocate;
9334 p->del = icmScreening_delete;
9335 p->icp = icp;
9336
9337 return (icmBase *)p;
9338 }
9339
9340 /* ---------------------------------------------------------- */
9341 /* icmUcrBg object */
9342
9343 /* Return the number of bytes needed to write this tag */
9344 static unsigned int icmUcrBg_get_size(
9345 icmBase *pp
9346 ) {
9347 icmUcrBg *p = (icmUcrBg *)pp;
9348 unsigned int len = 0;
9349 len = sat_add(len, 8); /* 8 bytes for tag and padding */
9350 len = sat_addaddmul(len, 4, p->UCRcount, 2); /* Undercolor Removal */
9351 len = sat_addaddmul(len, 4, p->BGcount, 2); /* Black Generation */
9352 len = sat_add(len, p->size); /* Description string */
9353 return len;
9354 }
9355
9356 /* read the object, return 0 on success, error code on fail */
9357 static int icmUcrBg_read(
9358 icmBase *pp,
9359 unsigned int len, /* tag length */
9360 unsigned int of /* start offset within file */
9361 ) {
9362 icmUcrBg *p = (icmUcrBg *)pp;
9363 icc *icp = p->icp;
9364 unsigned int i;
9365 int rv;
9366 char *bp, *buf, *end;
9367
9368 if (len < 16) {
9369 sprintf(icp->err,"icmUcrBg_read: Tag too small to be legal");
9370 return icp->errc = 1;
9371 }
9372
9373 /* Allocate a file read buffer */
9374 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
9375 sprintf(icp->err,"icmUcrBg_read: malloc() failed");
9376 return icp->errc = 2;
9377 }
9378 bp = buf;
9379 end = buf + len;
9380
9381 /* Read portion of file into buffer */
9382 if ( icp->fp->seek(icp->fp, of) != 0
9383 || icp->fp->read(icp->fp, bp, 1, len) != len) {
9384 sprintf(icp->err,"icmUcrBg_read: fseek() or fread() failed");
9385 icp->al->free(icp->al, buf);
9386 return icp->errc = 1;
9387 }
9388
9389 /* Read type descriptor from the buffer */
9390 if (((icTagTypeSignature)read_SInt32Number(bp)) != p->ttype) {
9391 sprintf(icp->err,"icmUcrBg_read: Wrong tag type for icmUcrBg");
9392 icp->al->free(icp->al, buf);
9393 return icp->errc = 1;
9394 }
9395 p->UCRcount = read_UInt32Number(bp+8); /* First curve count */
9396 bp = bp + 12;
9397
9398 if (p->UCRcount > 0) {
9399 if ((rv = p->allocate((icmBase *)p)) != 0) {
9400 icp->al->free(icp->al, buf);
9401 return rv;
9402 }
9403 for (i = 0; i < p->UCRcount; i++, bp += 2) {
9404 if (bp > end || 2 > (end - bp)) {
9405 sprintf(icp->err,"icmUcrBg_read: Data too short to read UCR Data");
9406 icp->al->free(icp->al, buf);
9407 return icp->errc = 1;
9408 }
9409 if (p->UCRcount == 1) /* % */
9410 p->UCRcurve[i] = (double)read_UInt16Number(bp);
9411 else /* 0.0 - 1.0 */
9412 p->UCRcurve[i] = read_DCS16Number(bp);
9413 }
9414 } else {
9415 p->UCRcurve = NULL;
9416 }
9417
9418 if (bp > end || 4 > (end - bp)) {
9419 sprintf(icp->err,"icmData_read: Data too short to read Black Gen count");
9420 icp->al->free(icp->al, buf);
9421 return icp->errc = 1;
9422 }
9423 p->BGcount = read_UInt32Number(bp); /* First curve count */
9424 bp += 4;
9425
9426 if (p->BGcount > 0) {
9427 if ((rv = p->allocate((icmBase *)p)) != 0) {
9428 icp->al->free(icp->al, buf);
9429 return rv;
9430 }
9431 for (i = 0; i < p->BGcount; i++, bp += 2) {
9432 if (bp > end || 2 > (end - bp)) {
9433 sprintf(icp->err,"icmUcrBg_read: Data too short to read BG Data");
9434 icp->al->free(icp->al, buf);
9435 return icp->errc = 1;
9436 }
9437 if (p->BGcount == 1) /* % */
9438 p->BGcurve[i] = (double)read_UInt16Number(bp);
9439 else /* 0.0 - 1.0 */
9440 p->BGcurve[i] = read_DCS16Number(bp);
9441 }
9442 } else {
9443 p->BGcurve = NULL;
9444 }
9445
9446 p->size = end - bp; /* Nominal string length */
9447 if (p->size > 0) {
9448 if ((rv = check_null_string(bp, p->size)) == 1) {
9449 sprintf(icp->err,"icmUcrBg_read: string is not null terminated");
9450 icp->al->free(icp->al, buf);
9451 return icp->errc = 1;
9452 }
9453 p->size = strlen(bp) + 1;
9454 if ((rv = p->allocate((icmBase *)p)) != 0) {
9455 icp->al->free(icp->al, buf);
9456 return rv;
9457 }
9458 memmove((void *)p->string, (void *)bp, p->size);
9459 bp += p->size;
9460 } else {
9461 p->string = NULL;
9462 }
9463
9464 icp->al->free(icp->al, buf);
9465 return 0;
9466 }
9467
9468 /* Write the contents of the object. Return 0 on sucess, error code on failure */
9469 static int icmUcrBg_write(
9470 icmBase *pp,
9471 unsigned int of /* File offset to write from */
9472 ) {
9473 icmUcrBg *p = (icmUcrBg *)pp;
9474 icc *icp = p->icp;
9475 unsigned int i;
9476 unsigned int len;
9477 char *bp, *buf; /* Buffer to write from */
9478 int rv;
9479
9480 /* Allocate a file write buffer */
9481 if ((len = p->get_size((icmBase *)p)) == UINT_MAX) {
9482 sprintf(icp->err,"icmUcrBg_write get_size overflow");
9483 return icp->errc = 1;
9484 }
9485 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
9486 sprintf(icp->err,"icmUcrBg_write malloc() failed");
9487 return icp->errc = 2;
9488 }
9489 bp = buf;
9490
9491 /* Write type descriptor to the buffer */
9492 if ((rv = write_SInt32Number((int)p->ttype,bp)) != 0) {
9493 sprintf(icp->err,"icmUcrBg_write: write_SInt32Number() failed");
9494 icp->al->free(icp->al, buf);
9495 return icp->errc = rv;
9496 }
9497 write_SInt32Number(0,bp+4); /* Set padding to 0 */
9498 bp = bp + 8;
9499
9500 /* Write UCR curve */
9501 if ((rv = write_UInt32Number(p->UCRcount,bp)) != 0) {
9502 sprintf(icp->err,"icmUcrBg_write: write_UInt32Number() failed");
9503 icp->al->free(icp->al, buf);
9504 return icp->errc = rv;
9505 }
9506 bp += 4;
9507
9508 for (i = 0; i < p->UCRcount; i++, bp += 2) {
9509 if (p->UCRcount == 1) { /* % */
9510 if ((rv = write_UInt16Number((unsigned int)(p->UCRcurve[i]+0.5),bp)) != 0) {
9511 sprintf(icp->err,"icmUcrBg_write: write_UInt16umber() failed");
9512 icp->al->free(icp->al, buf);
9513 return icp->errc = rv;
9514 }
9515 } else {
9516 if ((rv = write_DCS16Number(p->UCRcurve[i],bp)) != 0) {
9517 sprintf(icp->err,"icmUcrBg_write: write_DCS16umber(%f) failed",p->UCRcurve[i]);
9518 icp->al->free(icp->al, buf);
9519 return icp->errc = rv;
9520 }
9521 }
9522 }
9523
9524 /* Write BG curve */
9525 if ((rv = write_UInt32Number(p->BGcount,bp)) != 0) {
9526 sprintf(icp->err,"icmUcrBg_write: write_UInt32Number() failed");
9527 icp->al->free(icp->al, buf);
9528 return icp->errc = rv;
9529 }
9530 bp += 4;
9531
9532 for (i = 0; i < p->BGcount; i++, bp += 2) {
9533 if (p->BGcount == 1) { /* % */
9534 if ((rv = write_UInt16Number((unsigned int)(p->BGcurve[i]+0.5),bp)) != 0) {
9535 sprintf(icp->err,"icmUcrBg_write: write_UInt16umber() failed");
9536 icp->al->free(icp->al, buf);
9537 return icp->errc = rv;
9538 }
9539 } else {
9540 if ((rv = write_DCS16Number(p->BGcurve[i],bp)) != 0) {
9541 sprintf(icp->err,"icmUcrBg_write: write_DCS16umber(%f) failed",p->BGcurve[i]);
9542 icp->al->free(icp->al, buf);
9543 return icp->errc = rv;
9544 }
9545 }
9546 }
9547
9548 if (p->string != NULL) {
9549 if ((rv = check_null_string(p->string,p->size)) == 1) {
9550 sprintf(icp->err,"icmUcrBg_write: text is not null terminated");
9551 icp->al->free(icp->al, buf);
9552 return icp->errc = 1;
9553 }
9554 if (rv == 2) {
9555 sprintf(icp->err,"icmUcrBg_write: text is shorter than length");
9556 icp->al->free(icp->al, buf);
9557 return icp->errc = 1;
9558 }
9559 memmove((void *)bp, (void *)p->string, p->size);
9560 }
9561
9562 /* Write to the file */
9563 if ( icp->fp->seek(icp->fp, of) != 0
9564 || icp->fp->write(icp->fp, buf, 1, len) != len) {
9565 sprintf(icp->err,"icmUcrBg_write fseek() or fwrite() failed");
9566 icp->al->free(icp->al, buf);
9567 return icp->errc = 2;
9568 }
9569 icp->al->free(icp->al, buf);
9570 return 0;
9571 }
9572
9573 /* Dump a text description of the object */
9574 static void icmUcrBg_dump(
9575 icmBase *pp,
9576 icmFile *op, /* Output to dump to */
9577 int verb /* Verbosity level */
9578 ) {
9579 icmUcrBg *p = (icmUcrBg *)pp;
9580 if (verb <= 0)
9581 return;
9582
9583 op->gprintf(op,"Undercolor Removal Curve & Black Generation:\n");
9584
9585 if (p->UCRcount == 0) {
9586 op->gprintf(op," UCR: Not specified\n");
9587 } else if (p->UCRcount == 1) {
9588 op->gprintf(op," UCR: %f%%\n",p->UCRcurve[0]);
9589 } else {
9590 op->gprintf(op," UCR curve no. elements = %u\n",p->UCRcount);
9591 if (verb >= 2) {
9592 unsigned int i;
9593 for (i = 0; i < p->UCRcount; i++)
9594 op->gprintf(op," %3lu: %f\n",i,p->UCRcurve[i]);
9595 }
9596 }
9597 if (p->BGcount == 0) {
9598 op->gprintf(op," BG: Not specified\n");
9599 } else if (p->BGcount == 1) {
9600 op->gprintf(op," BG: %f%%\n",p->BGcurve[0]);
9601 } else {
9602 op->gprintf(op," BG curve no. elements = %u\n",p->BGcount);
9603 if (verb >= 2) {
9604 unsigned int i;
9605 for (i = 0; i < p->BGcount; i++)
9606 op->gprintf(op," %3lu: %f\n",i,p->BGcurve[i]);
9607 }
9608 }
9609
9610 {
9611 unsigned int i, r, c, size;
9612 op->gprintf(op," Description:\n");
9613 op->gprintf(op," No. chars = %lu\n",p->size);
9614
9615 size = p->size > 0 ? p->size-1 : 0;
9616 i = 0;
9617 for (r = 1;; r++) { /* count rows */
9618 if (i >= size) {
9619 op->gprintf(op,"\n");
9620 break;
9621 }
9622 if (r > 1 && verb < 2) {
9623 op->gprintf(op,"...\n");
9624 break; /* Print 1 row if not verbose */
9625 }
9626 c = 1;
9627 op->gprintf(op," 0x%04lx: ",i);
9628 c += 10;
9629 while (i < size && c < 73) {
9630 if (isprint(p->string[i])) {
9631 op->gprintf(op,"%c",p->string[i]);
9632 c++;
9633 } else {
9634 op->gprintf(op,"\\%03o",p->string[i]);
9635 c += 4;
9636 }
9637 i++;
9638 }
9639 if (i < size)
9640 op->gprintf(op,"\n");
9641 }
9642 }
9643 }
9644
9645 /* Allocate variable sized data elements */
9646 static int icmUcrBg_allocate(
9647 icmBase *pp
9648 ) {
9649 icmUcrBg *p = (icmUcrBg *)pp;
9650 icc *icp = p->icp;
9651
9652 if (p->UCRcount != p->UCR_count) {
9653 if (ovr_mul(p->UCRcount, sizeof(double))) {
9654 sprintf(icp->err,"icmUcrBg_allocate: size overflow");
9655 return icp->errc = 1;
9656 }
9657 if (p->UCRcurve != NULL)
9658 icp->al->free(icp->al, p->UCRcurve);
9659 if ((p->UCRcurve = (double *) icp->al->calloc(icp->al, p->UCRcount, sizeof(double))) == NULL) {
9660 sprintf(icp->err,"icmUcrBg_allocate: malloc() of UCR curve data failed");
9661 return icp->errc = 2;
9662 }
9663 p->UCR_count = p->UCRcount;
9664 }
9665 if (p->BGcount != p->BG_count) {
9666 if (ovr_mul(p->BGcount, sizeof(double))) {
9667 sprintf(icp->err,"icmUcrBg_allocate: size overflow");
9668 return icp->errc = 1;
9669 }
9670 if (p->BGcurve != NULL)
9671 icp->al->free(icp->al, p->BGcurve);
9672 if ((p->BGcurve = (double *) icp->al->calloc(icp->al, p->BGcount, sizeof(double))) == NULL) {
9673 sprintf(icp->err,"icmUcrBg_allocate: malloc() of BG curve data failed");
9674 return icp->errc = 2;
9675 }
9676 p->BG_count = p->BGcount;
9677 }
9678 if (p->size != p->_size) {
9679 if (ovr_mul(p->size, sizeof(char))) {
9680 sprintf(icp->err,"icmUcrBg_allocate: size overflow");
9681 return icp->errc = 1;
9682 }
9683 if (p->string != NULL)
9684 icp->al->free(icp->al, p->string);
9685 if ((p->string = (char *) icp->al->calloc(icp->al, p->size, sizeof(char))) == NULL) {
9686 sprintf(icp->err,"icmUcrBg_allocate: malloc() of string data failed");
9687 return icp->errc = 2;
9688 }
9689 p->_size = p->size;
9690 }
9691 return 0;
9692 }
9693
9694 /* Free all storage in the object */
9695 static void icmUcrBg_delete(
9696 icmBase *pp
9697 ) {
9698 icmUcrBg *p = (icmUcrBg *)pp;
9699 icc *icp = p->icp;
9700
9701 if (p->UCRcurve != NULL)
9702 icp->al->free(icp->al, p->UCRcurve);
9703 if (p->BGcurve != NULL)
9704 icp->al->free(icp->al, p->BGcurve);
9705 if (p->string != NULL)
9706 icp->al->free(icp->al, p->string);
9707 icp->al->free(icp->al, p);
9708 }
9709
9710 /* Create an empty object. Return null on error */
9711 static icmBase *new_icmUcrBg(
9712 icc *icp
9713 ) {
9714 icmUcrBg *p;
9715 if ((p = (icmUcrBg *) icp->al->calloc(icp->al,1,sizeof(icmUcrBg))) == NULL)
9716 return NULL;
9717 p->ttype = icSigUcrBgType;
9718 p->refcount = 1;
9719 p->get_size = icmUcrBg_get_size;
9720 p->read = icmUcrBg_read;
9721 p->write = icmUcrBg_write;
9722 p->dump = icmUcrBg_dump;
9723 p->allocate = icmUcrBg_allocate;
9724 p->del = icmUcrBg_delete;
9725 p->icp = icp;
9726
9727 return (icmBase *)p;
9728 }
9729
9730 /* ---------------------------------------------------------- */
9731 /* VideoCardGamma (ColorSync 2.5 specific - c/o Neil Okamoto) */
9732 /* 'vcgt' */
9733
9734 static unsigned int icmVideoCardGamma_get_size(
9735 icmBase *pp
9736 ) {
9737 icmVideoCardGamma *p = (icmVideoCardGamma *)pp;
9738 unsigned int len = 0;
9739
9740 len = sat_add(len, 8); /* 8 bytes for tag and padding */
9741 len = sat_add(len, 4); /* 4 for gamma type */
9742
9743 /* compute size of remainder */
9744 if (p->tagType == icmVideoCardGammaTableType) {
9745 len = sat_add(len, 2); /* 2 bytes for channels */
9746 len = sat_add(len, 2); /* 2 for entry count */
9747 len = sat_add(len, 2); /* 2 for entry size */
9748 len = sat_add(len, sat_mul3(p->u.table.channels, /* compute table size */
9749 p->u.table.entryCount, p->u.table.entrySize));
9750 }
9751 else if (p->tagType == icmVideoCardGammaFormulaType) {
9752 len = sat_add(len, 12); /* 4 bytes each for red gamma, min, & max */
9753 len = sat_add(len, 12); /* 4 bytes each for green gamma, min & max */
9754 len = sat_add(len, 12); /* 4 bytes each for blue gamma, min & max */
9755 }
9756 return len;
9757 }
9758
9759 /* read the object, return 0 on success, error code on fail */
9760 static int icmVideoCardGamma_read(
9761 icmBase *pp,
9762 unsigned int len, /* tag length */
9763 unsigned int of /* start offset within file */
9764 ) {
9765 icmVideoCardGamma *p = (icmVideoCardGamma *)pp;
9766 icc *icp = p->icp;
9767 int rv, c;
9768 char *bp, *buf;
9769 ORD8 *pchar;
9770 ORD16 *pshort;
9771
9772 if (len < 18) {
9773 sprintf(icp->err,"icmVideoCardGamma_read: Tag too small to be legal");
9774 return icp->errc = 1;
9775 }
9776
9777 /* Allocate a file read buffer */
9778 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
9779 sprintf(icp->err,"icmVideoCardGamma_read: malloc() failed");
9780 return icp->errc = 2;
9781 }
9782 bp = buf;
9783
9784 /* Read portion of file into buffer */
9785 if ( icp->fp->seek(icp->fp, of) != 0
9786 || icp->fp->read(icp->fp, bp, 1, len) != len) {
9787 sprintf(icp->err,"icmVideoCardGamma_read: fseek() or fread() failed");
9788 icp->al->free(icp->al, buf);
9789 return icp->errc = 1;
9790 }
9791
9792 /* Read type descriptor from the buffer */
9793 if (((icTagTypeSignature)read_SInt32Number(bp)) != p->ttype) {
9794 sprintf(icp->err,"icmVideoCardGamma_read: Wrong tag type for icmVideoCardGamma");
9795 icp->al->free(icp->al, buf);
9796 return icp->errc = 1;
9797 }
9798
9799 /* Read gamma format (eg. table or formula) from the buffer */
9800 p->tagType = (icmVideoCardGammaTagType)read_UInt32Number(bp+8);
9801
9802 /* Read remaining gamma data based on format */
9803 if (p->tagType == icmVideoCardGammaTableType) {
9804 p->u.table.channels = read_UInt16Number(bp+12);
9805 p->u.table.entryCount = read_UInt16Number(bp+14);
9806 p->u.table.entrySize = read_UInt16Number(bp+16);
9807 if ((len-18) < sat_mul3(p->u.table.channels, p->u.table.entryCount,
9808 p->u.table.entrySize)) {
9809 sprintf(icp->err,"icmVideoCardGamma_read: Tag too small to be legal");
9810 return icp->errc = 1;
9811 }
9812 if ((rv = pp->allocate(pp)) != 0) { /* make space for table */
9813 icp->al->free(icp->al, buf);
9814 return icp->errc = rv;
9815 }
9816 /* ~~~~ This should be a table of doubles like the rest of icclib ! ~~~~ */
9817 pchar = (ORD8 *)p->u.table.data;
9818 pshort = (ORD16 *)p->u.table.data;
9819 for (c=0, bp=bp+18; c<p->u.table.channels*p->u.table.entryCount; c++) {
9820 switch (p->u.table.entrySize) {
9821 case 1:
9822 *pchar++ = read_UInt8Number(bp);
9823 bp++;
9824 break;
9825 case 2:
9826 *pshort++ = read_UInt16Number(bp);
9827 bp+=2;
9828 break;
9829 default:
9830 sprintf(icp->err,"icmVideoCardGamma_read: unsupported table entry size");
9831 pp->del(pp);
9832 icp->al->free(icp->al, buf);
9833 return icp->errc = 1;
9834 }
9835 }
9836 } else if (p->tagType == icmVideoCardGammaFormulaType) {
9837 if (len < 48) {
9838 sprintf(icp->err,"icmVideoCardGamma_read: Tag too small to be legal");
9839 return icp->errc = 1;
9840 }
9841 p->u.table.channels = 3; /* Always 3 for formula */
9842 p->u.formula.redGamma = read_S15Fixed16Number(bp+12);
9843 p->u.formula.redMin = read_S15Fixed16Number(bp+16);
9844 p->u.formula.redMax = read_S15Fixed16Number(bp+20);
9845 p->u.formula.greenGamma = read_S15Fixed16Number(bp+24);
9846 p->u.formula.greenMin = read_S15Fixed16Number(bp+28);
9847 p->u.formula.greenMax = read_S15Fixed16Number(bp+32);
9848 p->u.formula.blueGamma = read_S15Fixed16Number(bp+36);
9849 p->u.formula.blueMin = read_S15Fixed16Number(bp+40);
9850 p->u.formula.blueMax = read_S15Fixed16Number(bp+44);
9851 } else {
9852 sprintf(icp->err,"icmVideoCardGammaTable_read: Unknown gamma format for icmVideoCardGamma");
9853 icp->al->free(icp->al, buf);
9854 return icp->errc = 1;
9855 }
9856
9857 icp->al->free(icp->al, buf);
9858 return 0;
9859 }
9860
9861 /* Write the contents of the object. Return 0 on sucess, error code on failure */
9862 static int icmVideoCardGamma_write(
9863 icmBase *pp,
9864 unsigned int of /* File offset to write from */
9865 ) {
9866 icmVideoCardGamma *p = (icmVideoCardGamma *)pp;
9867 icc *icp = p->icp;
9868 unsigned int len;
9869 char *bp, *buf; /* Buffer to write from */
9870 int rv = 0, c;
9871 ORD8 *pchar;
9872 ORD16 *pshort;
9873
9874 /* Allocate a file write buffer */
9875 if ((len = p->get_size((icmBase *)p)) == UINT_MAX) {
9876 sprintf(icp->err,"icmViewingConditions_write get_size overflow");
9877 return icp->errc = 1;
9878 }
9879 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
9880 sprintf(icp->err,"icmViewingConditions_write malloc() failed");
9881 return icp->errc = 2;
9882 }
9883 bp = buf;
9884
9885 /* Write type descriptor to the buffer */
9886 if ((rv = write_SInt32Number((int)p->ttype,bp)) != 0) {
9887 sprintf(icp->err,"icmVideoCardGamma_write: write_SInt32Number() failed");
9888 icp->al->free(icp->al, buf);
9889 return icp->errc = rv;
9890 }
9891 write_SInt32Number(0,bp+4); /* Set padding to 0 */
9892
9893 /* Write gamma format (eg. table of formula) */
9894 if ((rv = write_UInt32Number(p->tagType,bp+8)) != 0) {
9895 sprintf(icp->err,"icmVideoCardGamma_write: write_UInt32Number() failed");
9896 icp->al->free(icp->al, buf);
9897 return icp->errc = rv;
9898 }
9899
9900 /* Write remaining gamma data based on format */
9901 if (p->tagType == icmVideoCardGammaTableType) {
9902 if ((rv = write_UInt16Number(p->u.table.channels,bp+12)) != 0) {
9903 sprintf(icp->err,"icmVideoCardGamma_write: write_UInt16Number() failed");
9904 icp->al->free(icp->al, buf);
9905 return icp->errc = rv;
9906 }
9907 if ((rv = write_UInt16Number(p->u.table.entryCount,bp+14)) != 0) {
9908 sprintf(icp->err,"icmVideoCardGamma_write: write_UInt16Number() failed");
9909 icp->al->free(icp->al, buf);
9910 return icp->errc = rv;
9911 }
9912 if ((rv = write_UInt16Number(p->u.table.entrySize,bp+16)) != 0) {
9913 sprintf(icp->err,"icmVideoCardGamma_write: write_UInt16Number() failed");
9914 icp->al->free(icp->al, buf);
9915 return icp->errc = rv;
9916 }
9917 pchar = (ORD8 *)p->u.table.data;
9918 pshort = (ORD16 *)p->u.table.data;
9919 for (c=0, bp=bp+18; c<p->u.table.channels*p->u.table.entryCount; c++) {
9920 switch (p->u.table.entrySize) {
9921 case 1:
9922 write_UInt8Number(*pchar++,bp);
9923 bp++;
9924 break;
9925 case 2:
9926 write_UInt16Number(*pshort++,bp);
9927 bp+=2;
9928 break;
9929 default:
9930 sprintf(icp->err,"icmVideoCardGamma_write: unsupported table entry size");
9931 icp->al->free(icp->al, buf);
9932 return icp->errc = 1;
9933 }
9934 }
9935 } else if (p->tagType == icmVideoCardGammaFormulaType) {
9936 if ((rv = write_S15Fixed16Number(p->u.formula.redGamma,bp+12)) != 0) {
9937 sprintf(icp->err,"icmVideoCardGamma_write: write_S15Fixed16Number() failed");
9938 icp->al->free(icp->al, buf);
9939 return icp->errc = rv;
9940 }
9941 if ((rv = write_S15Fixed16Number(p->u.formula.redMin,bp+16)) != 0) {
9942 sprintf(icp->err,"icmVideoCardGamma_write: write_S15Fixed16Number() failed");
9943 icp->al->free(icp->al, buf);
9944 return icp->errc = rv;
9945 }
9946 if ((rv = write_S15Fixed16Number(p->u.formula.redMax,bp+20)) != 0) {
9947 sprintf(icp->err,"icmVideoCardGamma_write: write_S15Fixed16Number() failed");
9948 icp->al->free(icp->al, buf);
9949 return icp->errc = rv;
9950 }
9951 if ((rv = write_S15Fixed16Number(p->u.formula.greenGamma,bp+24)) != 0) {
9952 sprintf(icp->err,"icmVideoCardGamma_write: write_S15Fixed16Number() failed");
9953 icp->al->free(icp->al, buf);
9954 return icp->errc = rv;
9955 }
9956 if ((rv = write_S15Fixed16Number(p->u.formula.greenMin,bp+28)) != 0) {
9957 sprintf(icp->err,"icmVideoCardGamma_write: write_S15Fixed16Number() failed");
9958 icp->al->free(icp->al, buf);
9959 return icp->errc = rv;
9960 }
9961 if ((rv = write_S15Fixed16Number(p->u.formula.greenMax,bp+32)) != 0) {
9962 sprintf(icp->err,"icmVideoCardGamma_write: write_S15Fixed16Number() failed");
9963 icp->al->free(icp->al, buf);
9964 return icp->errc = rv;
9965 }
9966 if ((rv = write_S15Fixed16Number(p->u.formula.blueGamma,bp+36)) != 0) {
9967 sprintf(icp->err,"icmVideoCardGamma_write: write_S15Fixed16Number() failed");
9968 icp->al->free(icp->al, buf);
9969 return icp->errc = rv;
9970 }
9971 if ((rv = write_S15Fixed16Number(p->u.formula.blueMin,bp+40)) != 0) {
9972 sprintf(icp->err,"icmVideoCardGamma_write: write_S15Fixed16Number() failed");
9973 icp->al->free(icp->al, buf);
9974 return icp->errc = rv;
9975 }
9976 if ((rv = write_S15Fixed16Number(p->u.formula.blueMax,bp+44)) != 0) {
9977 sprintf(icp->err,"icmVideoCardGamma_write: write_S15Fixed16Number() failed");
9978 icp->al->free(icp->al, buf);
9979 return icp->errc = rv;
9980 }
9981 } else {
9982 sprintf(icp->err,"icmVideoCardGammaTable_write: Unknown gamma format for icmVideoCardGamma");
9983 icp->al->free(icp->al, buf);
9984 return icp->errc = 1;
9985 }
9986
9987 /* Write to the file */
9988 if ( icp->fp->seek(icp->fp, of) != 0
9989 || icp->fp->write(icp->fp, buf, 1, len) != len) {
9990 sprintf(icp->err,"icmViewingConditions_write fseek() or fwrite() failed");
9991 icp->al->free(icp->al, buf);
9992 return icp->errc = 2;
9993 }
9994 icp->al->free(icp->al, buf);
9995 return 0;
9996 }
9997
9998 /* Dump a text description of the object */
9999 static void icmVideoCardGamma_dump(
10000 icmBase *pp,
10001 icmFile *op, /* Output to dump to */
10002 int verb /* Verbosity level */
10003 ) {
10004 icmVideoCardGamma *p = (icmVideoCardGamma *)pp;
10005 int c,i;
10006
10007 if (verb <= 0)
10008 return;
10009
10010 if (p->tagType == icmVideoCardGammaTableType) {
10011 op->gprintf(op,"VideoCardGammaTable:\n");
10012 op->gprintf(op," channels = %d\n", p->u.table.channels);
10013 op->gprintf(op," entries = %d\n", p->u.table.entryCount);
10014 op->gprintf(op," entrysize = %d\n", p->u.table.entrySize);
10015 if (verb >= 2) {
10016 /* dump array contents also */
10017 for (c=0; c<p->u.table.channels; c++) {
10018 op->gprintf(op," channel #%d\n",c);
10019 for (i=0; i<p->u.table.entryCount; i++) {
10020 if (p->u.table.entrySize == 1) {
10021 op->gprintf(op," %d: %d\n",i,((ORD8 *)p->u.table.data)[c*p->u.table.entryCount+i]);
10022 }
10023 else if (p->u.table.entrySize == 2) {
10024 op->gprintf(op," %d: %d\n",i,((ORD16 *)p->u.table.data)[c*p->u.table.entryCount+i]);
10025 }
10026 }
10027 }
10028 }
10029 } else if (p->tagType == icmVideoCardGammaFormulaType) {
10030 op->gprintf(op,"VideoCardGammaFormula:\n");
10031 op->gprintf(op," red gamma = %f\n", p->u.formula.redGamma);
10032 op->gprintf(op," red min = %f\n", p->u.formula.redMin);
10033 op->gprintf(op," red max = %f\n", p->u.formula.redMax);
10034 op->gprintf(op," green gamma = %f\n", p->u.formula.greenGamma);
10035 op->gprintf(op," green min = %f\n", p->u.formula.greenMin);
10036 op->gprintf(op," green max = %f\n", p->u.formula.greenMax);
10037 op->gprintf(op," blue gamma = %f\n", p->u.formula.blueGamma);
10038 op->gprintf(op," blue min = %f\n", p->u.formula.blueMin);
10039 op->gprintf(op," blue max = %f\n", p->u.formula.blueMax);
10040 } else {
10041 op->gprintf(op," Unknown tag format\n");
10042 }
10043 }
10044
10045 /* Allocate variable sized data elements */
10046 static int icmVideoCardGamma_allocate(
10047 icmBase *pp
10048 ) {
10049 icmVideoCardGamma *p = (icmVideoCardGamma *)pp;
10050 icc *icp = p->icp;
10051 unsigned int size;
10052
10053 /* note: allocation is only relevant for table type
10054 * and in that case the channels, entryCount, and entrySize
10055 * fields must all be set prior to getting here
10056 */
10057
10058 if (p->tagType == icmVideoCardGammaTableType) {
10059 size = sat_mul(p->u.table.channels, p->u.table.entryCount);
10060 switch (p->u.table.entrySize) {
10061 case 1:
10062 size = sat_mul(size, sizeof(ORD8));
10063 break;
10064 case 2:
10065 size = sat_mul(size, sizeof(unsigned short));
10066 break;
10067 default:
10068 sprintf(icp->err,"icmVideoCardGamma_alloc: unsupported table entry size");
10069 return icp->errc = 1;
10070 }
10071 if (size == UINT_MAX) {
10072 sprintf(icp->err,"icmVideoCardGamma_alloc: size overflow");
10073 return icp->errc = 1;
10074 }
10075 if (p->u.table.data != NULL)
10076 icp->al->free(icp->al, p->u.table.data);
10077 if ((p->u.table.data = (void*) icp->al->malloc(icp->al, size)) == NULL) {
10078 sprintf(icp->err,"icmVideoCardGamma_alloc: malloc() of table data failed");
10079 return icp->errc = 2;
10080 }
10081 }
10082
10083 return 0;
10084 }
10085
10086 /* Read a value */
10087 static double icmVideoCardGamma_lookup(
10088 icmVideoCardGamma *p,
10089 int chan, /* Channel, 0, 1 or 2 */
10090 double iv /* Input value 0.0 - 1.0 */
10091 ) {
10092 double ov = 0.0;
10093
10094 if (chan < 0 || chan > (p->u.table.channels-1)
10095 || iv < 0.0 || iv > 1.0)
10096 return iv;
10097
10098 if (p->tagType == icmVideoCardGammaTableType && p->u.table.entryCount == 0) {
10099 /* Deal with siliness */
10100 ov = iv;
10101 } else if (p->tagType == icmVideoCardGammaTableType) {
10102 /* Use linear interpolation */
10103 unsigned int ix;
10104 double val0, val1, w;
10105 double inputEnt_1 = (double)(p->u.table.entryCount-1);
10106
10107 val0 = iv * inputEnt_1;
10108 if (val0 < 0.0)
10109 val0 = 0.0;
10110 else if (val0 > inputEnt_1)
10111 val0 = inputEnt_1;
10112 ix = (unsigned int)floor(val0); /* Coordinate */
10113 if (ix > (p->u.table.entryCount-2))
10114 ix = (p->u.table.entryCount-2);
10115 w = val0 - (double)ix; /* weight */
10116 if (p->u.table.entrySize == 1) {
10117 val0 = ((ORD8 *)p->u.table.data)[chan * p->u.table.entryCount + ix]/255.0;
10118 val1 = ((ORD8 *)p->u.table.data)[chan * p->u.table.entryCount + ix + 1]/255.0;
10119 } else if (p->u.table.entrySize == 2) {
10120 val0 = ((ORD16 *)p->u.table.data)[chan * p->u.table.entryCount + ix]/65535.0;
10121 val1 = ((ORD16 *)p->u.table.data)[chan * p->u.table.entryCount + ix + 1]/65535.0;
10122 } else {
10123 val0 = val1 = iv;
10124 }
10125 ov = val0 + w * (val1 - val0);
10126
10127 } else if (p->tagType == icmVideoCardGammaFormulaType) {
10128 double min, max, gam;
10129
10130 if (iv == 0) {
10131 min = p->u.formula.redMin;
10132 max = p->u.formula.redMax;
10133 gam = p->u.formula.redGamma;
10134 } else if (iv == 1) {
10135 min = p->u.formula.greenMin;
10136 max = p->u.formula.greenMax;
10137 gam = p->u.formula.greenGamma;
10138 } else {
10139 min = p->u.formula.blueMin;
10140 max = p->u.formula.blueMax;
10141 gam = p->u.formula.blueGamma;
10142 }
10143
10144 /* The Apple OSX doco confirms this is the formula */
10145 ov = min + (max - min) * pow(iv, gam);
10146 }
10147 return ov;
10148 }
10149
10150 /* Free all storage in the object */
10151 static void icmVideoCardGamma_delete(
10152 icmBase *pp
10153 ) {
10154 icmVideoCardGamma *p = (icmVideoCardGamma *)pp;
10155 icc *icp = p->icp;
10156
10157 if (p->tagType == icmVideoCardGammaTableType && p->u.table.data != NULL)
10158 icp->al->free(icp->al, p->u.table.data);
10159
10160 icp->al->free(icp->al, p);
10161 }
10162
10163 /* Create an empty object. Return null on error */
10164 static icmBase *new_icmVideoCardGamma(
10165 icc *icp
10166 ) {
10167 icmVideoCardGamma *p;
10168 if ((p = (icmVideoCardGamma *) icp->al->calloc(icp->al,1,sizeof(icmVideoCardGamma))) == NULL)
10169 return NULL;
10170 p->ttype = icSigVideoCardGammaType;
10171 p->refcount = 1;
10172 p->get_size = icmVideoCardGamma_get_size;
10173 p->read = icmVideoCardGamma_read;
10174 p->write = icmVideoCardGamma_write;
10175 p->lookup = icmVideoCardGamma_lookup;
10176 p->dump = icmVideoCardGamma_dump;
10177 p->allocate = icmVideoCardGamma_allocate;
10178 p->del = icmVideoCardGamma_delete;
10179 p->icp = icp;
10180
10181 return (icmBase *)p;
10182 }
10183
10184 /* ---------------------------------------------------------- */
10185 /* ViewingConditions */
10186
10187 /* Return the number of bytes needed to write this tag */
10188 static unsigned int icmViewingConditions_get_size(
10189 icmBase *pp
10190 ) {
10191 unsigned int len = 0;
10192 len = sat_add(len, 8); /* 8 bytes for tag and padding */
10193 len = sat_add(len, 12); /* 12 for XYZ of illuminant */
10194 len = sat_add(len, 12); /* 12 for XYZ of surround */
10195 len = sat_add(len, 4); /* 4 for illuminant type */
10196 return len;
10197 }
10198
10199 /* read the object, return 0 on success, error code on fail */
10200 static int icmViewingConditions_read(
10201 icmBase *pp,
10202 unsigned int len, /* tag length */
10203 unsigned int of /* start offset within file */
10204 ) {
10205 icmViewingConditions *p = (icmViewingConditions *)pp;
10206 icc *icp = p->icp;
10207 int rv;
10208 char *bp, *buf;
10209
10210 if (len < 36) {
10211 sprintf(icp->err,"icmViewingConditions_read: Tag too small to be legal");
10212 return icp->errc = 1;
10213 }
10214
10215 /* Allocate a file read buffer */
10216 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
10217 sprintf(icp->err,"icmViewingConditions_read: malloc() failed");
10218 return icp->errc = 2;
10219 }
10220 bp = buf;
10221
10222 /* Read portion of file into buffer */
10223 if ( icp->fp->seek(icp->fp, of) != 0
10224 || icp->fp->read(icp->fp, bp, 1, len) != len) {
10225 sprintf(icp->err,"icmViewingConditions_read: fseek() or fread() failed");
10226 icp->al->free(icp->al, buf);
10227 return icp->errc = 1;
10228 }
10229
10230 /* Read type descriptor from the buffer */
10231 if (((icTagTypeSignature)read_SInt32Number(bp)) != p->ttype) {
10232 sprintf(icp->err,"icmViewingConditions_read: Wrong tag type for icmViewingConditions");
10233 icp->al->free(icp->al, buf);
10234 return icp->errc = 1;
10235 }
10236
10237 /* Read the XYZ values for the illuminant */
10238 if ((rv = read_XYZNumber(&p->illuminant, bp+8)) != 0) {
10239 sprintf(icp->err,"icmViewingConditions: read_XYZNumber error");
10240 icp->al->free(icp->al, buf);
10241 return icp->errc = rv;
10242 }
10243
10244 /* Read the XYZ values for the surround */
10245 if ((rv = read_XYZNumber(&p->surround, bp+20)) != 0) {
10246 sprintf(icp->err,"icmViewingConditions: read_XYZNumber error");
10247 icp->al->free(icp->al, buf);
10248 return icp->errc = rv;
10249 }
10250
10251 /* Read the encoded standard illuminant */
10252 p->stdIlluminant = (icIlluminant)read_SInt32Number(bp + 32);
10253
10254 icp->al->free(icp->al, buf);
10255 return 0;
10256 }
10257
10258 /* Write the contents of the object. Return 0 on sucess, error code on failure */
10259 static int icmViewingConditions_write(
10260 icmBase *pp,
10261 unsigned int of /* File offset to write from */
10262 ) {
10263 icmViewingConditions *p = (icmViewingConditions *)pp;
10264 icc *icp = p->icp;
10265 unsigned int len;
10266 char *bp, *buf; /* Buffer to write from */
10267 int rv = 0;
10268
10269 /* Allocate a file write buffer */
10270 if ((len = p->get_size((icmBase *)p)) == UINT_MAX) {
10271 sprintf(icp->err,"icmViewingConditions_write get_size overflow");
10272 return icp->errc = 1;
10273 }
10274 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
10275 sprintf(icp->err,"icmViewingConditions_write malloc() failed");
10276 return icp->errc = 2;
10277 }
10278 bp = buf;
10279
10280 /* Write type descriptor to the buffer */
10281 if ((rv = write_SInt32Number((int)p->ttype,bp)) != 0) {
10282 sprintf(icp->err,"icmViewingConditions_write: write_SInt32Number() failed");
10283 icp->al->free(icp->al, buf);
10284 return icp->errc = rv;
10285 }
10286 write_SInt32Number(0,bp+4); /* Set padding to 0 */
10287
10288 /* Write the XYZ values for the illuminant */
10289 if ((rv = write_XYZNumber(&p->illuminant, bp+8)) != 0) {
10290 sprintf(icp->err,"icmViewingConditions: write_XYZNumber error");
10291 icp->al->free(icp->al, buf);
10292 return icp->errc = rv;
10293 }
10294
10295 /* Write the XYZ values for the surround */
10296 if ((rv = write_XYZNumber(&p->surround, bp+20)) != 0) {
10297 sprintf(icp->err,"icmViewingConditions: write_XYZNumber error");
10298 icp->al->free(icp->al, buf);
10299 return icp->errc = rv;
10300 }
10301
10302 /* Write the encoded standard illuminant */
10303 if ((rv = write_SInt32Number((int)p->stdIlluminant, bp + 32)) != 0) {
10304 sprintf(icp->err,"icmViewingConditionsa_write: write_SInt32Number() failed");
10305 icp->al->free(icp->al, buf);
10306 return icp->errc = rv;
10307 }
10308
10309 /* Write to the file */
10310 if ( icp->fp->seek(icp->fp, of) != 0
10311 || icp->fp->write(icp->fp, buf, 1, len) != len) {
10312 sprintf(icp->err,"icmViewingConditions_write fseek() or fwrite() failed");
10313 icp->al->free(icp->al, buf);
10314 return icp->errc = 2;
10315 }
10316 icp->al->free(icp->al, buf);
10317 return 0;
10318 }
10319
10320 /* Dump a text description of the object */
10321 static void icmViewingConditions_dump(
10322 icmBase *pp,
10323 icmFile *op, /* Output to dump to */
10324 int verb /* Verbosity level */
10325 ) {
10326 icmViewingConditions *p = (icmViewingConditions *)pp;
10327 if (verb <= 0)
10328 return;
10329
10330 op->gprintf(op,"Viewing Conditions:\n");
10331 op->gprintf(op," XYZ value of illuminant in cd/m^2 = %s\n", string_XYZNumber(&p->illuminant));
10332 op->gprintf(op," XYZ value of surround in cd/m^2 = %s\n", string_XYZNumber(&p->surround));
10333 op->gprintf(op," Illuminant type = %s\n", string_Illuminant(p->stdIlluminant));
10334 }
10335
10336 /* Allocate variable sized data elements */
10337 static int icmViewingConditions_allocate(
10338 icmBase *pp
10339 ) {
10340 /* Nothing to do */
10341 return 0;
10342 }
10343
10344 /* Free all storage in the object */
10345 static void icmViewingConditions_delete(
10346 icmBase *pp
10347 ) {
10348 icmViewingConditions *p = (icmViewingConditions *)pp;
10349 icc *icp = p->icp;
10350
10351 icp->al->free(icp->al, p);
10352 }
10353
10354 /* Create an empty object. Return null on error */
10355 static icmBase *new_icmViewingConditions(
10356 icc *icp
10357 ) {
10358 icmViewingConditions *p;
10359 if ((p = (icmViewingConditions *) icp->al->calloc(icp->al,1,sizeof(icmViewingConditions))) == NULL)
10360 return NULL;
10361 p->ttype = icSigViewingConditionsType;
10362 p->refcount = 1;
10363 p->get_size = icmViewingConditions_get_size;
10364 p->read = icmViewingConditions_read;
10365 p->write = icmViewingConditions_write;
10366 p->dump = icmViewingConditions_dump;
10367 p->allocate = icmViewingConditions_allocate;
10368 p->del = icmViewingConditions_delete;
10369 p->icp = icp;
10370
10371 return (icmBase *)p;
10372 }
10373
10374 /* ---------------------------------------------------------- */
10375 /* icmCrdInfo object */
10376
10377 /* Return the number of bytes needed to write this tag */
10378 static unsigned int icmCrdInfo_get_size(
10379 icmBase *pp
10380 ) {
10381 icmCrdInfo *p = (icmCrdInfo *)pp;
10382 unsigned int len = 0, t;
10383 len = sat_add(len, 8); /* 8 bytes for tag and padding */
10384 len = sat_addadd(len, 4, p->ppsize); /* Postscript product name */
10385 for (t = 0; t < 4; t++) { /* For all 4 intents */
10386 len = sat_addadd(len, 4, p->crdsize[t]); /* crd names */
10387 }
10388 return len;
10389 }
10390
10391 /* read the object, return 0 on success, error code on fail */
10392 static int icmCrdInfo_read(
10393 icmBase *pp,
10394 unsigned int len, /* tag length */
10395 unsigned int of /* start offset within file */
10396 ) {
10397 icmCrdInfo *p = (icmCrdInfo *)pp;
10398 icc *icp = p->icp;
10399 unsigned int t;
10400 int rv;
10401 char *bp, *buf, *end;
10402
10403 if (len < 28) {
10404 sprintf(icp->err,"icmCrdInfo_read: Tag too small to be legal");
10405 return icp->errc = 1;
10406 }
10407
10408 /* Allocate a file read buffer */
10409 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
10410 sprintf(icp->err,"icmCrdInfo_read: malloc() failed");
10411 return icp->errc = 2;
10412 }
10413 bp = buf;
10414 end = buf + len;
10415
10416 /* Read portion of file into buffer */
10417 if ( icp->fp->seek(icp->fp, of) != 0
10418 || icp->fp->read(icp->fp, bp, 1, len) != len) {
10419 sprintf(icp->err,"icmCrdInfo_read: fseek() or fread() failed");
10420 icp->al->free(icp->al, buf);
10421 return icp->errc = 1;
10422 }
10423
10424 /* Read type descriptor from the buffer */
10425 if (((icTagTypeSignature)read_SInt32Number(bp)) != p->ttype) {
10426 sprintf(icp->err,"icmCrdInfo_read: Wrong tag type for icmCrdInfo");
10427 icp->al->free(icp->al, buf);
10428 return icp->errc = 1;
10429 }
10430 bp = bp + 8;
10431
10432 /* Postscript product name */
10433 if (bp > end || 4 > (end - bp)) {
10434 sprintf(icp->err,"icmCrdInfo_read: Data too short to read Postscript product name");
10435 icp->al->free(icp->al, buf);
10436 return icp->errc = 1;
10437 }
10438 p->ppsize = read_UInt32Number(bp);
10439 bp += 4;
10440 if (p->ppsize > 0) {
10441 if (p->ppsize > (end - bp)) {
10442 sprintf(icp->err,"icmCrdInfo_read: Data to short to read Postscript product string");
10443 icp->al->free(icp->al, buf);
10444 return icp->errc = 1;
10445 }
10446 if ((rv = check_null_string(bp,p->ppsize)) == 1) {
10447 sprintf(icp->err,"icmCrdInfo_read: Postscript product name is not terminated");
10448 icp->al->free(icp->al, buf);
10449 return icp->errc = 1;
10450 }
10451 /* Haven't checked if rv == 2 is legal or not */
10452 if ((rv = p->allocate((icmBase *)p)) != 0) {
10453 icp->al->free(icp->al, buf);
10454 return rv;
10455 }
10456 memmove((void *)p->ppname, (void *)bp, p->ppsize);
10457 bp += p->ppsize;
10458 }
10459
10460 /* CRD names for the four rendering intents */
10461 for (t = 0; t < 4; t++) { /* For all 4 intents */
10462 if (bp > end || 4 > (end - bp)) {
10463 sprintf(icp->err,"icmCrdInfo_read: Data too short to read CRD%d name",t);
10464 icp->al->free(icp->al, buf);
10465 return icp->errc = 1;
10466 }
10467 p->crdsize[t] = read_UInt32Number(bp);
10468 bp += 4;
10469 if (p->crdsize[t] > 0) {
10470 if (p->crdsize[t] > (end - bp)) {
10471 sprintf(icp->err,"icmCrdInfo_read: Data to short to read CRD%d string",t);
10472 icp->al->free(icp->al, buf);
10473 return icp->errc = 1;
10474 }
10475 if ((rv = check_null_string(bp,p->crdsize[t])) == 1) {
10476 sprintf(icp->err,"icmCrdInfo_read: CRD%d name is not terminated",t);
10477 icp->al->free(icp->al, buf);
10478 return icp->errc = 1;
10479 }
10480 /* Haven't checked if rv == 2 is legal or not */
10481 if ((rv = p->allocate((icmBase *)p)) != 0) {
10482 icp->al->free(icp->al, buf);
10483 return rv;
10484 }
10485 memmove((void *)p->crdname[t], (void *)bp, p->crdsize[t]);
10486 bp += p->crdsize[t];
10487 }
10488 }
10489
10490 icp->al->free(icp->al, buf);
10491 return 0;
10492 }
10493
10494 /* Write the contents of the object. Return 0 on sucess, error code on failure */
10495 static int icmCrdInfo_write(
10496 icmBase *pp,
10497 unsigned int of /* File offset to write from */
10498 ) {
10499 icmCrdInfo *p = (icmCrdInfo *)pp;
10500 icc *icp = p->icp;
10501 unsigned int t;
10502 unsigned int len;
10503 char *bp, *buf; /* Buffer to write from */
10504 int rv;
10505
10506 /* Allocate a file write buffer */
10507 if ((len = p->get_size((icmBase *)p)) == UINT_MAX) {
10508 sprintf(icp->err,"icmCrdInfo_write get_size overflow");
10509 return icp->errc = 1;
10510 }
10511 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
10512 sprintf(icp->err,"icmCrdInfo_write malloc() failed");
10513 return icp->errc = 2;
10514 }
10515 bp = buf;
10516
10517 /* Write type descriptor to the buffer */
10518 if ((rv = write_SInt32Number((int)p->ttype,bp)) != 0) {
10519 sprintf(icp->err,"icmCrdInfo_write: write_SInt32Number() failed");
10520 icp->al->free(icp->al, buf);
10521 return icp->errc = rv;
10522 }
10523 write_SInt32Number(0,bp+4); /* Set padding to 0 */
10524 bp = bp + 8;
10525
10526 /* Postscript product name */
10527 if ((rv = write_UInt32Number(p->ppsize,bp)) != 0) {
10528 sprintf(icp->err,"icmCrdInfo_write: write_UInt32Number() failed");
10529 icp->al->free(icp->al, buf);
10530 return icp->errc = rv;
10531 }
10532 bp += 4;
10533 if (p->ppsize > 0) {
10534 if ((rv = check_null_string(p->ppname,p->ppsize)) == 1) {
10535 sprintf(icp->err,"icmCrdInfo_write: Postscript product name is not terminated");
10536 icp->al->free(icp->al, buf);
10537 return icp->errc = 1;
10538 }
10539 /* Haven't checked if rv == 2 is legal or not */
10540 memmove((void *)bp, (void *)p->ppname, p->ppsize);
10541 bp += p->ppsize;
10542 }
10543
10544 /* CRD names for the four rendering intents */
10545 for (t = 0; t < 4; t++) { /* For all 4 intents */
10546 if ((rv = write_UInt32Number(p->crdsize[t],bp)) != 0) {
10547 sprintf(icp->err,"icmCrdInfo_write: write_UInt32Number() failed");
10548 icp->al->free(icp->al, buf);
10549 return icp->errc = rv;
10550 }
10551 bp += 4;
10552 if (p->ppsize > 0) {
10553 if ((rv = check_null_string(p->crdname[t],p->crdsize[t])) == 1) {
10554 sprintf(icp->err,"icmCrdInfo_write: CRD%d name is not terminated",t);
10555 icp->al->free(icp->al, buf);
10556 return icp->errc = 1;
10557 }
10558 /* Haven't checked if rv == 2 is legal or not */
10559 memmove((void *)bp, (void *)p->crdname[t], p->crdsize[t]);
10560 bp += p->crdsize[t];
10561 }
10562 }
10563
10564 /* Write to the file */
10565 if ( icp->fp->seek(icp->fp, of) != 0
10566 || icp->fp->write(icp->fp, buf, 1, len) != len) {
10567 sprintf(icp->err,"icmCrdInfo_write fseek() or fwrite() failed");
10568 icp->al->free(icp->al, buf);
10569 return icp->errc = 2;
10570 }
10571 icp->al->free(icp->al, buf);
10572 return 0;
10573 }
10574
10575 /* Dump a text description of the object */
10576 static void icmCrdInfo_dump(
10577 icmBase *pp,
10578 icmFile *op, /* Output to dump to */
10579 int verb /* Verbosity level */
10580 ) {
10581 icmCrdInfo *p = (icmCrdInfo *)pp;
10582 unsigned int i, r, c, size, t;
10583
10584 if (verb <= 0)
10585 return;
10586
10587 op->gprintf(op,"PostScript Product name and CRD names:\n");
10588
10589 op->gprintf(op," Product name:\n");
10590 op->gprintf(op," No. chars = %lu\n",p->ppsize);
10591
10592 size = p->ppsize > 0 ? p->ppsize-1 : 0;
10593 i = 0;
10594 for (r = 1;; r++) { /* count rows */
10595 if (i >= size) {
10596 op->gprintf(op,"\n");
10597 break;
10598 }
10599 if (r > 1 && verb < 2) {
10600 op->gprintf(op,"...\n");
10601 break; /* Print 1 row if not verbose */
10602 }
10603 c = 1;
10604 op->gprintf(op," 0x%04lx: ",i);
10605 c += 10;
10606 while (i < size && c < 73) {
10607 if (isprint(p->ppname[i])) {
10608 op->gprintf(op,"%c",p->ppname[i]);
10609 c++;
10610 } else {
10611 op->gprintf(op,"\\%03o",p->ppname[i]);
10612 c += 4;
10613 }
10614 i++;
10615 }
10616 if (i < size)
10617 op->gprintf(op,"\n");
10618 }
10619
10620 for (t = 0; t < 4; t++) { /* For all 4 intents */
10621 op->gprintf(op," CRD%ld name:\n",t);
10622 op->gprintf(op," No. chars = %lu\n",p->crdsize[t]);
10623
10624 size = p->crdsize[t] > 0 ? p->crdsize[t]-1 : 0;
10625 i = 0;
10626 for (r = 1;; r++) { /* count rows */
10627 if (i >= size) {
10628 op->gprintf(op,"\n");
10629 break;
10630 }
10631 if (r > 1 && verb < 2) {
10632 op->gprintf(op,"...\n");
10633 break; /* Print 1 row if not verbose */
10634 }
10635 c = 1;
10636 op->gprintf(op," 0x%04lx: ",i);
10637 c += 10;
10638 while (i < size && c < 73) {
10639 if (isprint(p->crdname[t][i])) {
10640 op->gprintf(op,"%c",p->crdname[t][i]);
10641 c++;
10642 } else {
10643 op->gprintf(op,"\\%03o",p->crdname[t][i]);
10644 c += 4;
10645 }
10646 i++;
10647 }
10648 if (i < size)
10649 op->gprintf(op,"\n");
10650 }
10651 }
10652 }
10653
10654 /* Allocate variable sized data elements */
10655 static int icmCrdInfo_allocate(
10656 icmBase *pp
10657 ) {
10658 icmCrdInfo *p = (icmCrdInfo *)pp;
10659 icc *icp = p->icp;
10660 unsigned int t;
10661
10662 if (p->ppsize != p->_ppsize) {
10663 if (ovr_mul(p->ppsize, sizeof(char))) {
10664 sprintf(icp->err,"icmCrdInfo_alloc: size overflow");
10665 return icp->errc = 1;
10666 }
10667 if (p->ppname != NULL)
10668 icp->al->free(icp->al, p->ppname);
10669 if ((p->ppname = (char *) icp->al->calloc(icp->al, p->ppsize, sizeof(char))) == NULL) {
10670 sprintf(icp->err,"icmCrdInfo_alloc: malloc() of string data failed");
10671 return icp->errc = 2;
10672 }
10673 p->_ppsize = p->ppsize;
10674 }
10675 for (t = 0; t < 4; t++) { /* For all 4 intents */
10676 if (p->crdsize[t] != p->_crdsize[t]) {
10677 if (ovr_mul(p->crdsize[t], sizeof(char))) {
10678 sprintf(icp->err,"icmCrdInfo_alloc: size overflow");
10679 return icp->errc = 1;
10680 }
10681 if (p->crdname[t] != NULL)
10682 icp->al->free(icp->al, p->crdname[t]);
10683 if ((p->crdname[t] = (char *) icp->al->calloc(icp->al, p->crdsize[t], sizeof(char))) == NULL) {
10684 sprintf(icp->err,"icmCrdInfo_alloc: malloc() of CRD%d name string failed",t);
10685 return icp->errc = 2;
10686 }
10687 p->_crdsize[t] = p->crdsize[t];
10688 }
10689 }
10690 return 0;
10691 }
10692
10693 /* Free all storage in the object */
10694 static void icmCrdInfo_delete(
10695 icmBase *pp
10696 ) {
10697 icmCrdInfo *p = (icmCrdInfo *)pp;
10698 icc *icp = p->icp;
10699 unsigned int t;
10700
10701 if (p->ppname != NULL)
10702 icp->al->free(icp->al, p->ppname);
10703 for (t = 0; t < 4; t++) { /* For all 4 intents */
10704 if (p->crdname[t] != NULL)
10705 icp->al->free(icp->al, p->crdname[t]);
10706 }
10707 icp->al->free(icp->al, p);
10708 }
10709
10710 /* Create an empty object. Return null on error */
10711 static icmBase *new_icmCrdInfo(
10712 icc *icp
10713 ) {
10714 icmCrdInfo *p;
10715 if ((p = (icmCrdInfo *) icp->al->calloc(icp->al,1,sizeof(icmCrdInfo))) == NULL)
10716 return NULL;
10717 p->ttype = icSigCrdInfoType;
10718 p->refcount = 1;
10719 p->get_size = icmCrdInfo_get_size;
10720 p->read = icmCrdInfo_read;
10721 p->write = icmCrdInfo_write;
10722 p->dump = icmCrdInfo_dump;
10723 p->allocate = icmCrdInfo_allocate;
10724 p->del = icmCrdInfo_delete;
10725 p->icp = icp;
10726
10727 return (icmBase *)p;
10728 }
10729
10730 /* ========================================================== */
10731 /* icmHeader object */
10732 /* ========================================================== */
10733
10734 /* Return the number of bytes needed to write this tag */
10735 static unsigned int icmHeader_get_size(
10736 icmHeader *p
10737 ) {
10738 return 128; /* By definition */
10739 }
10740
10741 /* read the object, return 0 on success, error code on fail */
10742 static int icmHeader_read(
10743 icmHeader *p,
10744 unsigned int len, /* tag length */
10745 unsigned int of /* start offset within file */
10746 ) {
10747 icc *icp = p->icp;
10748 char *buf;
10749 unsigned int tt;
10750 int rv = 0;
10751
10752 if (len != 128) {
10753 sprintf(icp->err,"icmHeader_read: Length expected to be 128");
10754 return icp->errc = 1;
10755 }
10756
10757 if ((buf = (char *) icp->al->malloc(icp->al, len)) == NULL) {
10758 sprintf(icp->err,"icmHeader_read: malloc() failed");
10759 return icp->errc = 2;
10760 }
10761 if ( icp->fp->seek(icp->fp, of) != 0
10762 || icp->fp->read(icp->fp, buf, 1, len) != len) {
10763 sprintf(icp->err,"icmHeader_read: fseek() or fread() failed");
10764 icp->al->free(icp->al, buf);
10765 return icp->errc = 1;
10766 }
10767
10768 /* Check that the magic number is right */
10769 tt = read_SInt32Number(buf+36);
10770 if (tt != icMagicNumber) { /* Check magic number */
10771 sprintf(icp->err,"icmHeader_read: wrong magic number 0x%x",tt);
10772 icp->al->free(icp->al, buf);
10773 return icp->errc = 1;
10774 }
10775
10776 /* Fill in the in-memory structure */
10777 p->size = read_UInt32Number(buf + 0); /* Profile size in bytes */
10778 if (p->size < (128 + 4)) {
10779 sprintf(icp->err,"icmHeader_read: file size %d too small to be legal",p->size);
10780 icp->al->free(icp->al, buf);
10781 return icp->errc = 1;
10782 }
10783 p->cmmId = read_SInt32Number(buf + 4); /* CMM for profile */
10784 tt = read_UInt8Number(buf + 8); /* Raw major version number */
10785 p->majv = (tt >> 4) * 10 + (tt & 0xf); /* Integer major version number */
10786 icp->ver = p->majv > 3 ? 1 : 0; /* Set major version flag in icc */
10787 tt = read_UInt8Number(buf + 9); /* Raw minor/bug fix version numbers */
10788 p->minv = (tt >> 4); /* Integer minor version number */
10789 p->bfv = (tt & 0xf); /* Integer bug fix version number */
10790 p->deviceClass = (icProfileClassSignature)
10791 read_SInt32Number(buf + 12); /* Type of profile */
10792 p->colorSpace = (icColorSpaceSignature)
10793 read_SInt32Number(buf + 16); /* Color space of data */
10794 p->pcs = (icColorSpaceSignature)
10795 read_SInt32Number(buf + 20); /* PCS: XYZ or Lab */
10796 if ((rv = read_DateTimeNumber(&p->date, buf + 24)) != 0) { /* Creation Date */
10797 sprintf(icp->err,"icmHeader_read: read_DateTimeNumber corrupted");
10798 icp->al->free(icp->al, buf);
10799 return icp->errc = rv;
10800 }
10801 p->platform = (icPlatformSignature)
10802 read_SInt32Number(buf + 40); /* Primary platform */
10803 p->flags = read_UInt32Number(buf + 44); /* Various bits */
10804 p->manufacturer = read_SInt32Number(buf + 48); /* Dev manufacturer */
10805 p->model = read_SInt32Number(buf + 52); /* Dev model */
10806 read_UInt64Number(&p->attributes, buf + 56); /* Device attributes */
10807 p->renderingIntent = (icRenderingIntent)
10808 read_SInt32Number(buf + 64); /* Rendering intent */
10809 if ((rv = read_XYZNumber(&p->illuminant, buf + 68)) != 0) { /* Profile illuminant */
10810 sprintf(icp->err,"icmHeader_read: read_XYZNumber error");
10811 icp->al->free(icp->al, buf);
10812 return icp->errc = rv;
10813 }
10814 p->creator = read_SInt32Number(buf + 80); /* Profile creator */
10815
10816 for (tt = 0; tt < 16; tt++)
10817 p->id[tt] = icp->ver ? read_UInt8Number(buf + 84 + tt) : 0; /* Profile ID */
10818
10819 icp->al->free(icp->al, buf);
10820
10821 #ifndef ENABLE_V4
10822 if (icp->ver) {
10823 sprintf(icp->err,"icmHeader_read: ICC V4 not supported!");
10824 return icp->errc = 1;
10825 }
10826 #endif
10827 return 0;
10828 }
10829
10830 /* Write the contents of the object. Return 0 on sucess, error code on failure */
10831 static int icmHeader_write(
10832 icmHeader *p,
10833 unsigned int of, /* File offset to write from */
10834 int doid /* Flag, nz = writing to compute ID */
10835 ) {
10836 icc *icp = p->icp;
10837 char *buf; /* Buffer to write from */
10838 unsigned int len;
10839 unsigned int tt;
10840 int rv = 0;
10841
10842 /* Allocate a file write buffer */
10843 if ((len = p->get_size(p)) == UINT_MAX) {
10844 sprintf(icp->err,"icmHeader_write get_size overflow");
10845 return icp->errc = 1;
10846 }
10847 if ((buf = (char *) icp->al->calloc(icp->al,1,len)) == NULL) { /* Zero it - some CMS are fussy */
10848 sprintf(icp->err,"icmHeader_write calloc() failed");
10849 return icp->errc = 2;
10850 }
10851
10852 /* Fill in the write buffer */
10853 if ((rv = write_UInt32Number(p->size, buf + 0)) != 0) { /* Profile size in bytes */
10854 sprintf(icp->err,"icmHeader_write: profile size");
10855 icp->al->free(icp->al, buf);
10856 return icp->errc = rv;
10857 }
10858
10859 if ((rv = write_SInt32Number(p->cmmId, buf + 4)) != 0) { /* CMM for profile */
10860 sprintf(icp->err,"icmHeader_write: cmmId");
10861 icp->al->free(icp->al, buf);
10862 return icp->errc = rv;
10863 }
10864 if (p->majv < 0 || p->majv > 99 /* Sanity check version numbers */
10865 || p->minv < 0 || p->minv > 9
10866 || p->bfv < 0 || p->bfv > 9) {
10867 sprintf(icp->err,"icmHeader_write: version number");
10868 icp->al->free(icp->al, buf);
10869 return icp->errc = 1;
10870 }
10871 tt = ((p->majv/10) << 4) + (p->majv % 10);
10872 if ((rv = write_UInt8Number(tt, buf + 8)) != 0) { /* Raw major version number */
10873 sprintf(icp->err,"icmHeader_write: Uint8Number major version");
10874 icp->al->free(icp->al, buf);
10875 return icp->errc = rv;
10876 }
10877 tt = (p->minv << 4) + p->bfv;
10878 if ((rv = write_UInt8Number(tt, buf + 9)) != 0) { /* Raw minor/bug fix version numbers */
10879 sprintf(icp->err,"icmHeader_write: Uint8Number minor/bug fix");
10880 icp->al->free(icp->al, buf);
10881 return icp->errc = rv;
10882 }
10883 if ((rv = write_SInt32Number((int)p->deviceClass, buf + 12)) != 0) { /* Type of profile */
10884 sprintf(icp->err,"icmHeader_write: SInt32Number deviceClass");
10885 icp->al->free(icp->al, buf);
10886 return icp->errc = rv;
10887 }
10888 if ((rv = write_SInt32Number((int)p->colorSpace, buf + 16)) != 0) { /* Color space of data */
10889 sprintf(icp->err,"icmHeader_write: SInt32Number data color space");
10890 icp->al->free(icp->al, buf);
10891 return icp->errc = rv;
10892 }
10893 if ((rv = write_SInt32Number((int)p->pcs, buf + 20)) != 0) { /* PCS: XYZ or Lab */
10894 sprintf(icp->err,"icmHeader_write: SInt32Number PCS");
10895 icp->al->free(icp->al, buf);
10896 return icp->errc = rv;
10897 }
10898 if ((rv = write_DateTimeNumber(&p->date, buf + 24)) != 0) { /* Creation Date */
10899 sprintf(icp->err,"icmHeader_write: DateTimeNumber creation");
10900 icp->al->free(icp->al, buf);
10901 return icp->errc = rv;
10902 }
10903 if ((rv = write_SInt32Number(icMagicNumber, buf+36)) != 0) { /* Magic number */
10904 sprintf(icp->err,"icmHeader_write: SInt32Number magic");
10905 icp->al->free(icp->al, buf);
10906 return icp->errc = rv;
10907 }
10908 if ((rv = write_SInt32Number((int)p->platform, buf + 40)) != 0) { /* Primary platform */
10909 sprintf(icp->err,"icmHeader_write: SInt32Number platform");
10910 icp->al->free(icp->al, buf);
10911 return icp->errc = rv;
10912 }
10913 if ((rv = write_UInt32Number(doid ? 0 : p->flags, buf + 44)) != 0) { /* Various flag bits */
10914 sprintf(icp->err,"icmHeader_write: UInt32Number flags");
10915 icp->al->free(icp->al, buf);
10916 return icp->errc = rv;
10917 }
10918 if ((rv = write_SInt32Number(p->manufacturer, buf + 48)) != 0) { /* Dev manufacturer */
10919 sprintf(icp->err,"icmHeader_write: SInt32Number manufaturer");
10920 icp->al->free(icp->al, buf);
10921 return icp->errc = rv;
10922 }
10923 if ((write_SInt32Number(p->model, buf + 52)) != 0) { /* Dev model */
10924 sprintf(icp->err,"icmHeader_write: SInt32Number model");
10925 icp->al->free(icp->al, buf);
10926 return icp->errc = rv;
10927 }
10928 if ((rv = write_UInt64Number(&p->attributes, buf + 56)) != 0) { /* Device attributes */
10929 sprintf(icp->err,"icmHeader_write: UInt64Number attributes");
10930 icp->al->free(icp->al, buf);
10931 return icp->errc = rv;
10932 }
10933 if ((rv = write_SInt32Number(doid ? 0 : (int)p->renderingIntent, buf + 64)) != 0) { /* Rendering intent */
10934 sprintf(icp->err,"icmHeader_write: SInt32Number rendering intent");
10935 icp->al->free(icp->al, buf);
10936 return icp->errc = rv;
10937 }
10938 if ((rv = write_XYZNumber(&p->illuminant, buf + 68)) != 0) { /* Profile illuminant */
10939 sprintf(icp->err,"icmHeader_write: XYZNumber illuminant");
10940 icp->al->free(icp->al, buf);
10941 return icp->errc = rv;
10942 }
10943 if ((rv = write_SInt32Number(p->creator, buf + 80)) != 0) { /* Profile creator */
10944 sprintf(icp->err,"icmHeader_write: SInt32Number creator");
10945 icp->al->free(icp->al, buf);
10946 return icp->errc = rv;
10947 }
10948 if (doid == 0 && icp->ver) { /* ID is V4.0+ feature */
10949 for (tt = 0; tt < 16; tt++) {
10950 if ((rv = write_UInt8Number(p->id[tt], buf + 84 + tt)) != 0) { /* Profile ID */
10951 sprintf(icp->err,"icmHeader_write: UInt8Number creator");
10952 icp->al->free(icp->al, buf);
10953 return icp->errc = rv;
10954 }
10955 }
10956 }
10957
10958 if ( icp->fp->seek(icp->fp, of) != 0
10959 || icp->fp->write(icp->fp, buf, 1, len) != len) {
10960 sprintf(icp->err,"icmHeader_write fseek() or fwrite() failed");
10961 icp->al->free(icp->al, buf);
10962 return icp->errc = 2;
10963 }
10964
10965 icp->al->free(icp->al, buf);
10966 return rv;
10967 }
10968
10969 static void icmHeader_dump(
10970 icmHeader *p,
10971 icmFile *op, /* Output to dump to */
10972 int verb /* Verbosity level */
10973 ) {
10974 int i;
10975 if (verb <= 0)
10976 return;
10977
10978 op->gprintf(op,"Header:\n");
10979 op->gprintf(op," size = %d bytes\n",p->size);
10980 op->gprintf(op," CMM = %s\n",tag2str(p->cmmId));
10981 op->gprintf(op," Version = %d.%d.%d\n",p->majv, p->minv, p->bfv);
10982 op->gprintf(op," Device Class = %s\n", string_ProfileClassSignature(p->deviceClass));
10983 op->gprintf(op," Color Space = %s\n", string_ColorSpaceSignature(p->colorSpace));
10984 op->gprintf(op," Conn. Space = %s\n", string_ColorSpaceSignature(p->pcs));
10985 op->gprintf(op," Date, Time = %s\n", string_DateTimeNumber(&p->date));
10986 op->gprintf(op," Platform = %s\n", string_PlatformSignature(p->platform));
10987 op->gprintf(op," Flags = %s\n", string_ProfileHeaderFlags(p->flags));
10988 op->gprintf(op," Dev. Mnfctr. = %s\n", tag2str(p->manufacturer)); /* ~~~ */
10989 op->gprintf(op," Dev. Model = %s\n", tag2str(p->model)); /* ~~~ */
10990 op->gprintf(op," Dev. Attrbts = %s\n", string_DeviceAttributes(p->attributes.l));
10991 op->gprintf(op," Rndrng Intnt = %s\n", string_RenderingIntent(p->renderingIntent));
10992 op->gprintf(op," Illuminant = %s\n", string_XYZNumber_and_Lab(&p->illuminant));
10993 op->gprintf(op," Creator = %s\n", tag2str(p->creator)); /* ~~~ */
10994 if (p->icp->ver) { /* V4.0+ feature */
10995 for (i = 0; i < 16; i++) { /* Check if ID has been set */
10996 if (p->id[i] != 0)
10997 break;
10998 }
10999 if (i < 16)
11000 op->gprintf(op," ID = %02X%02X%02X%02X%02X%02X%02X%02X"
11001 "%02X%02X%02X%02X%02X%02X%02X%02X\n",
11002 p->id[0], p->id[1], p->id[2], p->id[3], p->id[4], p->id[5], p->id[6], p->id[7],
11003 p->id[8], p->id[9], p->id[10], p->id[11], p->id[12], p->id[13], p->id[14], p->id[15]);
11004 else
11005 op->gprintf(op," ID = <Not set>\n");
11006 }
11007 op->gprintf(op,"\n");
11008 }
11009
11010 static void icmHeader_delete(
11011 icmHeader *p
11012 ) {
11013 icc *icp = p->icp;
11014
11015 icp->al->free(icp->al, p);
11016 }
11017
11018 /* Create an empty object. Return null on error */
11019 static icmHeader *new_icmHeader(
11020 icc *icp
11021 ) {
11022 icmHeader *p;
11023 if ((p = (icmHeader *) icp->al->calloc(icp->al,1,sizeof(icmHeader))) == NULL)
11024 return NULL;
11025 p->icp = icp;
11026 p->get_size = icmHeader_get_size;
11027 p->read = icmHeader_read;
11028 p->write = icmHeader_write;
11029 p->dump = icmHeader_dump;
11030 p->del = icmHeader_delete;
11031
11032 return p;
11033 }
11034
11035 /* ---------------------------------------------------------- */
11036 /* Type vector table. Match the Tag type against the object creator */
11037 static struct {
11038 icTagTypeSignature ttype; /* The tag type signature */
11039 icmBase * (*new_obj)(icc *icp);
11040 } typetable[] = {
11041 {icSigColorantTableType, new_icmColorantTable},
11042 {icmSigAltColorantTableType, new_icmColorantTable},
11043 {icSigCrdInfoType, new_icmCrdInfo},
11044 {icSigCurveType, new_icmCurve},
11045 {icSigDataType, new_icmData},
11046 {icSigDateTimeType, new_icmDateTimeNumber},
11047 {icSigLut16Type, new_icmLut},
11048 {icSigLut8Type, new_icmLut},
11049 {icSigMeasurementType, new_icmMeasurement},
11050 {icSigNamedColorType, new_icmNamedColor},
11051 {icSigNamedColor2Type, new_icmNamedColor},
11052 {icSigProfileSequenceDescType, new_icmProfileSequenceDesc},
11053 {icSigS15Fixed16ArrayType, new_icmS15Fixed16Array},
11054 {icSigScreeningType, new_icmScreening},
11055 {icSigSignatureType, new_icmSignature},
11056 {icSigTextDescriptionType, new_icmTextDescription},
11057 {icSigTextType, new_icmText},
11058 {icSigU16Fixed16ArrayType, new_icmU16Fixed16Array},
11059 {icSigUcrBgType, new_icmUcrBg},
11060 {icSigVideoCardGammaType, new_icmVideoCardGamma},
11061 {icSigUInt16ArrayType, new_icmUInt16Array},
11062 {icSigUInt32ArrayType, new_icmUInt32Array},
11063 {icSigUInt64ArrayType, new_icmUInt64Array},
11064 {icSigUInt8ArrayType, new_icmUInt8Array},
11065 {icSigViewingConditionsType, new_icmViewingConditions},
11066 {icSigXYZArrayType, new_icmXYZArray},
11067 {icMaxEnumType, NULL}
11068 };
11069
11070 /* Table that lists the legal Types for each Tag Signature */
11071 static struct {
11072 icTagSignature sig;
11073 icTagTypeSignature ttypes[4]; /* Arbitrary max of 4 */
11074 } sigtypetable[] = {
11075 {icSigAToB0Tag, {icSigLut8Type,icSigLut16Type,icMaxEnumType}},
11076 {icSigAToB1Tag, {icSigLut8Type,icSigLut16Type,icMaxEnumType}},
11077 {icSigAToB2Tag, {icSigLut8Type,icSigLut16Type,icMaxEnumType}},
11078 {icSigBlueColorantTag, {icSigXYZType,icMaxEnumType}},
11079 {icSigBlueTRCTag, {icSigCurveType,icMaxEnumType}},
11080 {icSigBToA0Tag, {icSigLut8Type,icSigLut16Type,icMaxEnumType}},
11081 {icSigBToA1Tag, {icSigLut8Type,icSigLut16Type,icMaxEnumType}},
11082 {icSigBToA2Tag, {icSigLut8Type,icSigLut16Type,icMaxEnumType}},
11083 {icSigCalibrationDateTimeTag, {icSigDateTimeType,icMaxEnumType}},
11084 {icSigCharTargetTag, {icSigTextType,icMaxEnumType}},
11085 {icSigColorantTableTag, {icSigColorantTableType,icmSigAltColorantTableType,
11086 icMaxEnumType}},
11087 {icSigColorantTableOutTag, {icSigColorantTableType,icmSigAltColorantTableType,
11088 icMaxEnumType}},
11089 {icSigCopyrightTag, {icSigTextType,icMaxEnumType}},
11090 {icSigCrdInfoTag, {icSigCrdInfoType,icMaxEnumType}},
11091 {icSigDeviceMfgDescTag, {icSigTextDescriptionType,icMaxEnumType}},
11092 {icSigDeviceModelDescTag, {icSigTextDescriptionType,icMaxEnumType}},
11093 {icSigGamutTag, {icSigLut8Type,icSigLut16Type,icMaxEnumType}},
11094 {icSigGrayTRCTag, {icSigCurveType,icMaxEnumType}},
11095 {icSigGreenColorantTag, {icSigXYZType,icMaxEnumType}},
11096 {icSigGreenTRCTag, {icSigCurveType,icMaxEnumType}},
11097 {icSigLuminanceTag, {icSigXYZType,icMaxEnumType}},
11098 {icSigMeasurementTag, {icSigMeasurementType,icMaxEnumType}},
11099 {icSigMediaBlackPointTag, {icSigXYZType,icMaxEnumType}},
11100 {icSigMediaWhitePointTag, {icSigXYZType,icMaxEnumType}},
11101 {icSigNamedColorTag, {icSigNamedColorType,icMaxEnumType}},
11102 {icSigNamedColor2Tag, {icSigNamedColor2Type,icMaxEnumType}},
11103 {icSigPreview0Tag, {icSigLut8Type,icSigLut16Type,icMaxEnumType}},
11104 {icSigPreview1Tag, {icSigLut8Type,icSigLut16Type,icMaxEnumType}},
11105 {icSigPreview2Tag, {icSigLut8Type,icSigLut16Type,icMaxEnumType}},
11106 {icSigProfileDescriptionTag, {icSigTextDescriptionType,icMaxEnumType}},
11107 {icSigProfileSequenceDescTag, {icSigProfileSequenceDescType,icMaxEnumType}},
11108 {icSigPs2CRD0Tag, {icSigDataType,icMaxEnumType}},
11109 {icSigPs2CRD1Tag, {icSigDataType,icMaxEnumType}},
11110 {icSigPs2CRD2Tag, {icSigDataType,icMaxEnumType}},
11111 {icSigPs2CRD3Tag, {icSigDataType,icMaxEnumType}},
11112 {icSigPs2CSATag, {icSigDataType,icMaxEnumType}},
11113 {icSigPs2RenderingIntentTag, {icSigDataType,icMaxEnumType}},
11114 {icSigRedColorantTag, {icSigXYZType,icMaxEnumType}},
11115 {icSigRedTRCTag, {icSigCurveType,icMaxEnumType}},
11116 {icSigScreeningDescTag, {icSigTextDescriptionType,icMaxEnumType}},
11117 {icSigScreeningTag, {icSigScreeningType,icMaxEnumType}},
11118 {icSigTechnologyTag, {icSigSignatureType,icMaxEnumType}},
11119 {icSigUcrBgTag, {icSigUcrBgType,icMaxEnumType}},
11120 {icSigVideoCardGammaTag, {icSigVideoCardGammaType,icMaxEnumType}},
11121 {icSigViewingCondDescTag, {icSigTextDescriptionType,icMaxEnumType}},
11122 {icSigViewingConditionsTag, {icSigViewingConditionsType,icMaxEnumType}},
11123 {icMaxEnumTag, {icMaxEnumType}}
11124 };
11125
11126 /* Fake color tag for specifying PCS */
11127 #define icSigPCSData ((icColorSpaceSignature) 0x50435320L)
11128
11129 /* Table that lists the required tags for various profiles */
11130 static struct {
11131 icProfileClassSignature sig; /* Profile signature */
11132 int chans; /* Data Color channels, -ve for match but try next, */
11133 /* -100 for ignore, -200 for ignore and try next */
11134 icColorSpaceSignature colsig; /* Data Color space signature, icMaxEnumData for ignore, */
11135 /* icSigPCSData for XYZ of Lab */
11136 icColorSpaceSignature pcssig; /* PCS Color space signature, icMaxEnumData for ignore, */
11137 /* icSigPCSData for XYZ or Lab */
11138 icTagSignature tags[12]; /* Arbitrary max of 12 */
11139 } tagchecktable[] = {
11140 {icSigInputClass, -1, icMaxEnumData, icSigPCSData,
11141 {icSigProfileDescriptionTag,
11142 icSigGrayTRCTag,
11143 icSigMediaWhitePointTag,
11144 icSigCopyrightTag, icMaxEnumTag}},
11145
11146 {icSigInputClass, -3, icMaxEnumData, icSigXYZData,
11147 {icSigProfileDescriptionTag,
11148 icSigRedColorantTag,
11149 icSigGreenColorantTag,
11150 icSigBlueColorantTag,
11151 icSigRedTRCTag,
11152 icSigGreenTRCTag,
11153 icSigBlueTRCTag,
11154 icSigMediaWhitePointTag,
11155 icSigCopyrightTag, icMaxEnumTag}},
11156
11157 {icSigInputClass, -100, icMaxEnumData, icSigPCSData,
11158 {icSigProfileDescriptionTag,
11159 icSigAToB0Tag,
11160 icSigMediaWhitePointTag,
11161 icSigCopyrightTag, icMaxEnumTag}},
11162
11163 {icSigDisplayClass, -1, icMaxEnumData, icSigPCSData,
11164 {icSigProfileDescriptionTag,
11165 icSigGrayTRCTag,
11166 icSigMediaWhitePointTag,
11167 icSigCopyrightTag, icMaxEnumTag}},
11168
11169 {icSigDisplayClass, -3, icSigRgbData, icSigXYZData, /* Rgb or any 3 component space ?? */
11170 {icSigProfileDescriptionTag,
11171 icSigRedColorantTag,
11172 icSigGreenColorantTag,
11173 icSigBlueColorantTag,
11174 icSigRedTRCTag,
11175 icSigGreenTRCTag,
11176 icSigBlueTRCTag,
11177 icSigMediaWhitePointTag,
11178 icSigCopyrightTag, icMaxEnumTag}},
11179
11180 /* Non-3 component Display device */
11181 {icSigDisplayClass, -100, icMaxEnumData, icSigPCSData,
11182 {icSigProfileDescriptionTag,
11183 icSigAToB0Tag, /* BToA doesn't seem to be required, which is strange... */
11184 icSigMediaWhitePointTag,
11185 icSigCopyrightTag, icMaxEnumTag}},
11186
11187 {icSigOutputClass, -1, icMaxEnumData, icSigPCSData,
11188 {icSigProfileDescriptionTag,
11189 icSigGrayTRCTag,
11190 icSigMediaWhitePointTag,
11191 icSigCopyrightTag, icMaxEnumTag}},
11192
11193 {icSigOutputClass, -1, icMaxEnumData, icSigPCSData,
11194 {icSigProfileDescriptionTag,
11195 icSigAToB0Tag,
11196 icSigBToA0Tag,
11197 icSigGamutTag,
11198 icSigAToB1Tag,
11199 icSigBToA1Tag,
11200 icSigAToB2Tag,
11201 icSigBToA2Tag,
11202 icSigMediaWhitePointTag,
11203 icSigCopyrightTag, icMaxEnumTag}},
11204
11205 {icSigOutputClass, -2, icMaxEnumData, icSigPCSData,
11206 {icSigProfileDescriptionTag,
11207 icSigAToB0Tag,
11208 icSigBToA0Tag,
11209 icSigGamutTag,
11210 icSigAToB1Tag,
11211 icSigBToA1Tag,
11212 icSigAToB2Tag,
11213 icSigBToA2Tag,
11214 icSigMediaWhitePointTag,
11215 icSigCopyrightTag, icMaxEnumTag}},
11216
11217 {icSigOutputClass, -3, icMaxEnumData, icSigPCSData,
11218 {icSigProfileDescriptionTag,
11219 icSigAToB0Tag,
11220 icSigBToA0Tag,
11221 icSigGamutTag,
11222 icSigAToB1Tag,
11223 icSigBToA1Tag,
11224 icSigAToB2Tag,
11225 icSigBToA2Tag,
11226 icSigMediaWhitePointTag,
11227 icSigCopyrightTag, icMaxEnumTag}},
11228
11229 {icSigOutputClass, -4, icMaxEnumData, icSigPCSData,
11230 {icSigProfileDescriptionTag,
11231 icSigAToB0Tag,
11232 icSigBToA0Tag,
11233 icSigGamutTag,
11234 icSigAToB1Tag,
11235 icSigBToA1Tag,
11236 icSigAToB2Tag,
11237 icSigBToA2Tag,
11238 icSigMediaWhitePointTag,
11239 icSigCopyrightTag, icMaxEnumTag}},
11240
11241 {icSigOutputClass, -100, icMaxEnumData, icSigPCSData, /* Assumed from Hexachrome examples */
11242 {icSigProfileDescriptionTag,
11243 icSigBToA0Tag,
11244 icSigBToA1Tag,
11245 icSigBToA2Tag,
11246 icSigMediaWhitePointTag,
11247 icSigCopyrightTag, icMaxEnumTag}},
11248
11249 {icSigLinkClass, -100, icMaxEnumData, icMaxEnumData,
11250 {icSigProfileDescriptionTag,
11251 icSigAToB0Tag,
11252 icSigProfileSequenceDescTag,
11253 icSigCopyrightTag, icMaxEnumTag}},
11254
11255 {icSigColorSpaceClass, -100, icMaxEnumData, icSigPCSData,
11256 {icSigProfileDescriptionTag,
11257 icSigBToA0Tag,
11258 icSigAToB0Tag,
11259 icSigMediaWhitePointTag,
11260 icSigCopyrightTag, icMaxEnumTag}},
11261
11262 {icSigAbstractClass, -100, icSigPCSData, icSigPCSData,
11263 {icSigProfileDescriptionTag,
11264 icSigAToB0Tag,
11265 icSigMediaWhitePointTag,
11266 icSigCopyrightTag, icMaxEnumTag}},
11267
11268 {icSigNamedColorClass, -200, icMaxEnumData, icMaxEnumData,
11269 {icSigProfileDescriptionTag,
11270 icSigNamedColor2Tag,
11271 icSigMediaWhitePointTag,
11272 icSigCopyrightTag, icMaxEnumTag}},
11273
11274 {icSigNamedColorClass, -100, icMaxEnumData, icMaxEnumData,
11275 {icSigProfileDescriptionTag,
11276 icSigNamedColorTag, /* Not strictly V3.4 */
11277 icSigMediaWhitePointTag,
11278 icSigCopyrightTag, icMaxEnumTag}},
11279
11280 {icMaxEnumClass,-1,icMaxEnumData, icMaxEnumData, {icMaxEnumTag}}
11281 };
11282
11283 /* ------------------------------------------------------------- */
11284
11285 /* Return the current read fp (if any) */
11286 static icmFile *icc_get_rfp(icc *p) {
11287 return p->fp;
11288 }
11289
11290 /* Change the version to be non-default (ie. not 2.2.0), */
11291 /* e.g. ICC V4 (used for creation) */
11292 /* Return 0 if OK */
11293 /* Return 1 on error */
11294 static int icc_set_version(icc *p, icmICCVersion ver) {
11295
11296 if (p->header == NULL) {
11297 sprintf(p->err,"icc_set_version: Header is missing");
11298 return p->errc = 1;
11299 }
11300
11301 switch (ver) {
11302 case icmVersionDefault:
11303 p->header->majv = 2;
11304 p->header->minv = 2;
11305 p->header->bfv = 0;
11306 break;
11307 case icmVersion2_3:
11308 p->header->majv = 2;
11309 p->header->minv = 3;
11310 p->header->bfv = 0;
11311 break;
11312 case icmVersion2_4:
11313 p->header->majv = 2;
11314 p->header->minv = 4;
11315 p->header->bfv = 0;
11316 break;
11317 #ifdef ENABLE_V4
11318 case icmVersion4_1:
11319 p->header->majv = 4;
11320 p->header->minv = 1;
11321 p->header->bfv = 0;
11322 break;
11323 #endif
11324 default:
11325 sprintf(p->err,"icc_set_version: Unsupported version 0x%x",ver);
11326 return p->errc = 1;
11327 }
11328 return 0;
11329 }
11330
11331
11332 /* Check that the ICC profile looks like it will be legal. */
11333 /* Return non-zero and set error string if not */
11334 static int check_icc_legal(
11335 icc *p
11336 ) {
11337 int i, j;
11338 icProfileClassSignature sig;
11339 icColorSpaceSignature colsig;
11340 icColorSpaceSignature pcssig;
11341 int dchans;
11342
11343 if (p->header == NULL) {
11344 sprintf(p->err,"icc_check_legal: Header is missing");
11345 return p->errc = 1;
11346 }
11347
11348 sig = p->header->deviceClass;
11349 colsig = p->header->colorSpace;
11350 dchans = number_ColorSpaceSignature(colsig);
11351 pcssig = p->header->pcs;
11352
11353 /* Find a matching table entry */
11354 for (i = 0; tagchecktable[i].sig != icMaxEnumType; i++) {
11355 if ( tagchecktable[i].sig == sig
11356 && ( tagchecktable[i].chans == dchans /* Exactly matches */
11357 || tagchecktable[i].chans == -dchans /* Exactly matches, but can try next table */
11358 || tagchecktable[i].chans < -99) /* Doesn't have to match or try next table */
11359 && ( tagchecktable[i].colsig == colsig
11360 || (tagchecktable[i].colsig == icSigPCSData
11361 && (colsig == icSigXYZData || colsig == icSigLabData))
11362 || tagchecktable[i].colsig == icMaxEnumData)
11363 && ( tagchecktable[i].pcssig == pcssig
11364 || (tagchecktable[i].pcssig == icSigPCSData
11365 && (pcssig == icSigXYZData || pcssig == icSigLabData))
11366 || tagchecktable[i].pcssig == icMaxEnumData)) {
11367
11368 /* Found entry, so now check that all the required tags are present. */
11369 for (j = 0; tagchecktable[i].tags[j] != icMaxEnumType; j++) {
11370 if (p->find_tag(p, tagchecktable[i].tags[j]) != 0) { /* Not present! */
11371 if (tagchecktable[i].chans == -200
11372 || tagchecktable[i].chans == -dchans) { /* But can try next table */
11373 break;
11374 }
11375 sprintf(p->err,"icc_check_legal: deviceClass %s is missing required tag %s",
11376 tag2str(sig), tag2str(tagchecktable[i].tags[j]));
11377 return p->errc = 1;
11378 }
11379 }
11380 if (tagchecktable[i].tags[j] == icMaxEnumType) {
11381 break; /* Fount all required tags */
11382 }
11383 }
11384 }
11385
11386 /* According to the spec. if the deviceClass is:
11387 an Abstract Class: both in and out color spaces should be PCS
11388 an Link Class: both in and out color spaces can be any, and should
11389 be the input space of the first profile in the link, and the
11390 input space of the last profile in the link respectively.
11391 a Named Class: in and out color spaces are not defined in the spec.
11392 Input, Display, Output and ColorSpace Classes, input color
11393 space can be any, and the output space must be PCS.
11394 ~~ should check this here ???
11395 */
11396
11397 return 0; /* Assume anything is ok */
11398 }
11399
11400
11401 /* read the object, return 0 on success, error code on fail */
11402 /* NOTE: this doesn't read the tag types, they should be read on demand. */
11403 /* NOTE: fp ownership is taken even if the function fails. */
11404 static int icc_read_x(
11405 icc *p,
11406 icmFile *fp, /* File to read from */
11407 unsigned int of, /* File offset to read from */
11408 int take_fp /* NZ if icc is to take ownership of fp */
11409 ) {
11410 char tcbuf[4]; /* Tag count read buffer */
11411 unsigned int i, len;
11412 unsigned int minoff, maxoff; /* Minimum and maximum offsets of tag data */
11413 int er = 0; /* Error code */
11414
11415 p->fp = fp;
11416 if (take_fp)
11417 p->del_fp = 1;
11418 p->of = of;
11419 if (p->header == NULL) {
11420 sprintf(p->err,"icc_read: No header defined");
11421 return p->errc = 1;
11422 }
11423
11424 /* Read the header */
11425 if (p->header->read(p->header, 128, of)) {
11426 return 1;
11427 }
11428
11429 /* Read the tag count */
11430 if ( p->fp->seek(p->fp, of + 128) != 0
11431 || p->fp->read(p->fp, tcbuf, 1, 4) != 4) {
11432 sprintf(p->err,"icc_read: fseek() or fread() failed on tag count");
11433 return p->errc = 1;
11434 }
11435 p->count = read_UInt32Number(tcbuf);
11436
11437 /* Sanity check it */
11438 if (p->count > 357913940 /* (2^32-5)/12 */
11439 || (p->count > ((p->header->size - 128 - 4) / 12))) {
11440 sprintf(p->err,"icc_read: tag count %d is too large to be legal",p->count);
11441 return p->errc = 1;
11442 }
11443 minoff = 128 + 4 + p->count * 12;
11444 maxoff = p->header->size;
11445
11446 if (p->count > 0) {
11447 char *bp, *buf;
11448
11449 if (ovr_mul(p->count, sizeof(icmTag))) {
11450 sprintf(p->err,"icc_read: size overflow");
11451 return p->errc = 1;
11452 }
11453
11454 /* Read the table into memory */
11455 if ((p->data = (icmTag *) p->al->calloc(p->al, p->count, sizeof(icmTag))) == NULL) {
11456 sprintf(p->err,"icc_read: Tag table malloc() failed");
11457 return p->errc = 2;
11458 }
11459
11460 len = sat_mul(p->count, 12);
11461 if ((buf = (char *) p->al->malloc(p->al, len)) == NULL) {
11462 sprintf(p->err,"icc_read: Tag table read buffer malloc() failed");
11463 p->al->free(p->al, p->data);
11464 p->data = NULL;
11465 return p->errc = 2;
11466 }
11467 if ( p->fp->seek(p->fp, of + 128 + 4) != 0
11468 || p->fp->read(p->fp, buf, 1, len) != len) {
11469 sprintf(p->err,"icc_read: fseek() or fread() failed on tag table");
11470 p->al->free(p->al, p->data);
11471 p->data = NULL;
11472 p->al->free(p->al, buf);
11473 return p->errc = 1;
11474 }
11475
11476 /* Fill in the tag table structure for each tag */
11477 for (bp = buf, i = 0; i < p->count; i++, bp += 12) {
11478 p->data[i].sig = (icTagSignature)read_SInt32Number(bp + 0);
11479 p->data[i].offset = read_UInt32Number(bp + 4);
11480 p->data[i].size = read_UInt32Number(bp + 8);
11481 }
11482 p->al->free(p->al, buf);
11483
11484 /* Check that each tag lies within the nominated space available, */
11485 /* and has a reasonable size. */
11486 for (i = 0; i < p->count; i++) {
11487 if (p->data[i].offset < minoff
11488 || p->data[i].offset > maxoff
11489 || p->data[i].size < 4
11490 || p->data[i].size > (maxoff - minoff)
11491 || (p->data[i].offset + p->data[i].size) < p->data[i].offset /* Overflow */
11492 || (p->data[i].offset + p->data[i].size) > p->header->size) {
11493 sprintf(p->err,"icc_read: tag %d is out of range of the nominated file size",i);
11494 p->al->free(p->al, p->data);
11495 p->data = NULL;
11496 return p->errc = 1;
11497 }
11498 }
11499
11500 /* Read each tag type */
11501 for (i = 0; i < p->count; i++) {
11502 if ( p->fp->seek(p->fp, of + p->data[i].offset) != 0
11503 || p->fp->read(p->fp, tcbuf, 1, 4) != 4) {
11504 sprintf(p->err,"icc_read: fseek() or fread() failed on tag headers");
11505 p->al->free(p->al, p->data);
11506 p->data = NULL;
11507 return p->errc = 1;
11508 }
11509 p->data[i].ttype = (icTagTypeSignature) read_SInt32Number(tcbuf); /* Tag type */
11510 p->data[i].objp = NULL; /* Read on demand */
11511 }
11512 } /* p->count > 0 */
11513
11514 return er;
11515 }
11516
11517 /* read the object, return 0 on success, error code on fail */
11518 /* NOTE: this doesn't read the tag types, they should be read on demand. */
11519 /* (backward compatible version) */
11520 static int icc_read(
11521 icc *p,
11522 icmFile *fp, /* File to read from */
11523 unsigned int of /* File offset to read from */
11524 ) {
11525 return icc_read_x(p, fp, of, 0);
11526 }
11527
11528 /* Check the profiles ID. We assume the file has already been read. */
11529 /* Return 0 if OK, 1 if no ID to check, 2 if doesn't match, 3 if some other error. */
11530 /* NOTE: this reads the whole file again, to compute the checksum. */
11531 static int icc_check_id(
11532 icc *p,
11533 ORD8 *rid /* Optionaly return computed ID */
11534 ) {
11535 unsigned char buf[128];
11536 ORD8 id[16];
11537 icmMD5 *md5 = NULL;
11538 unsigned int len;
11539
11540 if (p->header == NULL) {
11541 sprintf(p->err,"icc_check_id: No header defined");
11542 return p->errc = 3;
11543 }
11544 len = p->header->size; /* Claimed size of profile */
11545
11546 /* See if there is an ID to compare against */
11547 for (len = 0; len < 16; len++) {
11548 if (p->header->id[len] != 0)
11549 break;
11550 }
11551 if (len >= 16) {
11552 return 1;
11553 }
11554
11555 if ((md5 = new_icmMD5(p->al)) == NULL) {
11556 sprintf(p->err,"icc_check_id: new_icmMD5 failed");
11557 return p->errc = 3;
11558 }
11559
11560 /* Check the header */
11561 if ( p->fp->seek(p->fp, p->of) != 0
11562 || p->fp->read(p->fp, buf, 1, 128) != 128) {
11563 sprintf(p->err,"icc_check_id: fseek() or fread() failed");
11564 return p->errc = 3;
11565 }
11566
11567 /* Zero the appropriate bytes in the header */
11568 buf[44] = buf[45] = buf[46] = buf[47] = 0;
11569 buf[64] = buf[65] = buf[66] = buf[67] = 0;
11570 buf[84] = buf[85] = buf[86] = buf[87] =
11571 buf[88] = buf[89] = buf[90] = buf[91] =
11572 buf[92] = buf[93] = buf[94] = buf[95] =
11573 buf[96] = buf[97] = buf[98] = buf[99] = 0;
11574
11575 md5->add(md5, buf, 128);
11576
11577 /* Suck in the rest of the profile */
11578 for (;len > 0;) {
11579 unsigned int rsize = 128;
11580 if (rsize > len)
11581 rsize = len;
11582 if (p->fp->read(p->fp, buf, 1, rsize) != rsize) {
11583 sprintf(p->err,"icc_check_id: fread() failed");
11584 return p->errc = 3;
11585 }
11586 md5->add(md5, buf, rsize);
11587 len -= rsize;
11588 }
11589
11590 md5->get(md5, id);
11591 md5->del(md5);
11592
11593 if (rid != NULL) {
11594 for (len = 0; len < 16; len++)
11595 rid[len] = id[len];
11596 }
11597
11598 /* Check the ID */
11599 for (len = 0; len < 16; len++) {
11600 if (p->header->id[len] != id[len])
11601 break;
11602 }
11603 if (len >= 16) {
11604 return 0; /* Matched */
11605 }
11606 return 2; /* Didn't match */
11607 }
11608
11609 /* Return the total size needed for the profile */
11610 /* Return 0 on error. */
11611 static unsigned int icc_get_size(
11612 icc *p
11613 ) {
11614 unsigned int i, size = 0;
11615
11616 #ifdef ICM_STRICT
11617 /* Check that the right tags etc. are present for a legal ICC profile */
11618 if (check_icc_legal(p) != 0) {
11619 return 0;
11620 }
11621 #endif /* ICM_STRICT */
11622
11623 /* Compute the total size and tag element data offsets */
11624 if (p->header == NULL) {
11625 sprintf(p->err,"icc_get_size: No header defined");
11626 p->errc = 1;
11627 return 0;
11628 }
11629
11630 size = sat_add(size, p->header->get_size(p->header));
11631 /* Assume header is aligned */
11632 size = sat_addaddmul(size, 4, p->count, 12); /* Tag table length */
11633 size = sat_align(ALIGN_SIZE, size);
11634
11635 if (size == UINT_MAX) {
11636 sprintf(p->err,"icc_get_size: size overflow");
11637 return p->errc = 1;
11638 }
11639
11640 /* Reset touched flag for each tag type */
11641 for (i = 0; i < p->count; i++) {
11642 if (p->data[i].objp == NULL) {
11643 sprintf(p->err,"icc_get_size: Internal error - NULL tag element");
11644 p->errc = 1;
11645 return 0;
11646 }
11647 p->data[i].objp->touched = 0;
11648 }
11649 /* Get size for each tag type, skipping links */
11650 for (i = 0; i < p->count; i++) {
11651 if (p->data[i].objp->touched == 0) { /* Not alllowed for previously */
11652 size = sat_add(size, p->data[i].objp->get_size(p->data[i].objp));
11653 size = sat_align(ALIGN_SIZE, size);
11654 p->data[i].objp->touched = 1; /* Don't account for this again */
11655 }
11656 }
11657
11658 return size; /* Total size needed, or UINT_MAX if overflow */
11659 }
11660
11661 /* Write the contents of the object. Return 0 on sucess, error code on failure */
11662 /* NOTE: fp ownership is taken even if the function fails. */
11663 static int icc_write_x(
11664 icc *p,
11665 icmFile *fp, /* File to write to */
11666 unsigned int of, /* File offset to write to */
11667 int take_fp /* NZ if icc is to take ownership of fp */
11668 ) {
11669 char *bp, *buf; /* tag table buffer */
11670 unsigned int len;
11671 int rv = 0;
11672 unsigned int i, size = 0;
11673 unsigned char pbuf[ALIGN_SIZE];
11674
11675 p->fp = fp; /* Open file pointer */
11676 if (take_fp)
11677 p->del_fp = 1;
11678 p->of = of; /* Offset of ICC profile */
11679
11680 for (i = 0; i < ALIGN_SIZE; i++)
11681 pbuf[i] = 0;
11682
11683 /* Check that the right tags etc. are present for a legal ICC profile */
11684 if ((rv = check_icc_legal(p)) != 0) {
11685 return rv;
11686 }
11687
11688 /* Compute the total size and tag element data offsets */
11689 if (p->header == NULL) {
11690 sprintf(p->err,"icc_write: No header defined");
11691 return p->errc = 1;
11692 }
11693
11694 size = sat_add(size, p->header->get_size(p->header));
11695 /* Assume header is aligned */
11696 len = sat_addmul(4, p->count, 12); /* Tag table length */
11697 len = sat_sub(sat_align(ALIGN_SIZE, sat_add(size, len)), size); /* Aligned size */
11698 size = sat_align(ALIGN_SIZE, sat_add(size, len));
11699
11700 if (len == UINT_MAX) {
11701 sprintf(p->err,"icc_write get_size overflow");
11702 return p->errc = 1;
11703 }
11704
11705 /* Allocate memory buffer for tag table */
11706 if ((buf = (char *) p->al->calloc(p->al, 1, len)) == NULL) {
11707 sprintf(p->err,"icc_write calloc() failed");
11708 return p->errc = 2;
11709 }
11710 bp = buf;
11711
11712 if ((rv = write_UInt32Number(p->count, bp)) != 0) { /* Tag count */
11713 sprintf(p->err,"icc_write: write_UInt32Number() failed on tag count");
11714 p->al->free(p->al, buf);
11715 return p->errc = rv;
11716 }
11717 bp += 4;
11718 /* Reset touched flag for each tag type */
11719 for (i = 0; i < p->count; i++) {
11720 if (p->data[i].objp == NULL) {
11721 sprintf(p->err,"icc_write: Internal error - NULL tag element");
11722 p->al->free(p->al, buf);
11723 return p->errc = 1;
11724 }
11725 p->data[i].objp->touched = 0;
11726 }
11727 /* Set the offset and size for each tag type, create the tag table write data */
11728 /* and compute the total profile size. */
11729 for (i = 0; i < p->count; i++) {
11730 if (p->data[i].objp->touched == 0) { /* Allocate space for tag type */
11731 p->data[i].offset = size; /* Profile relative target */
11732 p->data[i].size = p->data[i].objp->get_size(p->data[i].objp);
11733 size = sat_add(size, p->data[i].size);
11734 p->data[i].pad = sat_sub(sat_align(ALIGN_SIZE, size), size);
11735 size = sat_align(ALIGN_SIZE, size);
11736 p->data[i].objp->touched = 1; /* Allocated space for it */
11737 if (size == UINT_MAX) {
11738 sprintf(p->err,"icc_write: size overflow");
11739 return p->errc = 1;
11740 }
11741 } else { /* must be linked - copy allocation */
11742 unsigned int k;
11743 for (k = 0; k < p->count; k++) { /* Find linked tag */
11744 if (p->data[k].objp == p->data[i].objp)
11745 break;
11746 }
11747 if (k == p->count) {
11748 sprintf(p->err,"icc_write: corrupted link");
11749 return p->errc = 2;
11750 }
11751 p->data[i].offset = p->data[k].offset;
11752 p->data[i].size = p->data[k].size;
11753 p->data[i].pad = p->data[k].pad;
11754 }
11755 /* Write tag table entry for this tag */
11756 if ((rv = write_SInt32Number((int)p->data[i].sig,bp + 0)) != 0) {
11757 sprintf(p->err,"icc_write: write_SInt32Number() failed on tag signature");
11758 p->al->free(p->al, buf);
11759 return p->errc = rv;
11760 }
11761 if ((rv = write_UInt32Number(p->data[i].offset, bp + 4)) != 0) {
11762 sprintf(p->err,"icc_write: write_UInt32Number() failed on tag offset");
11763 p->al->free(p->al, buf);
11764 return p->errc = rv;
11765 }
11766 if ((rv = write_UInt32Number(p->data[i].size, bp + 8)) != 0) {
11767 sprintf(p->err,"icc_write: write_UInt32Number() failed on tag size");
11768 p->al->free(p->al, buf);
11769 return p->errc = rv;
11770 }
11771 bp += 12;
11772 }
11773 p->header->size = size; /* Record total icc padded size */
11774
11775
11776 /* If V4.0+, Compute the MD5 id for the profile. */
11777 /* We do this by writing to a fake icmFile */
11778 if (p->ver) {
11779 icmMD5 *md5 = NULL;
11780 icmFile *ofp, *dfp = NULL;
11781
11782 if ((md5 = new_icmMD5(p->al)) == NULL) {
11783 sprintf(p->err,"icc_write: new_icmMD5 failed");
11784 p->al->free(p->al, buf);
11785 return p->errc = 2;
11786 }
11787
11788 if ((dfp = new_icmFileMD5_a(md5, p->al)) == NULL) {
11789 sprintf(p->err,"icc_write: new_icmFileMD5 failed");
11790 md5->del(md5);
11791 p->al->free(p->al, buf);
11792 return p->errc = 2;
11793 }
11794
11795 ofp = p->fp;
11796 p->fp = dfp;
11797
11798 /* Dumy write the header */
11799 if ((rv = p->header->write(p->header, 0, 1)) != 0) {
11800 p->al->free(p->al, buf);
11801 return rv;
11802 }
11803
11804 /* Dumy write the tag table */
11805 if ( p->fp->seek(p->fp, 128) != 0
11806 || p->fp->write(p->fp, buf, 1, len) != len) {
11807 sprintf(p->err,"icc_write: seek() or write() failed");
11808 p->al->free(p->al, buf);
11809 return p->errc = 1;
11810 }
11811
11812 /* Dumy write all the tag element data */
11813 /* (We invert meaning of touched here) */
11814 for (i = 0; i < p->count; i++) { /* For all the tag element data */
11815 if (p->data[i].objp->touched == 0)
11816 continue; /* Must be linked, and we've already written it */
11817 if ((rv = p->data[i].objp->write(p->data[i].objp, p->data[i].offset)) != 0) {
11818 p->al->free(p->al, buf);
11819 return rv;
11820 }
11821 /* Pad with 0 to next boundary */
11822 if (p->data[i].pad > 0) {
11823 if (p->fp->write(p->fp, pbuf, 1, p->data[i].pad) != p->data[i].pad) {
11824 sprintf(p->err,"icc_write: write() failed");
11825 p->al->free(p->al, buf);
11826 return p->errc = 1;
11827 }
11828 }
11829 p->data[i].objp->touched = 0; /* Written it, so don't write it again. */
11830 }
11831
11832 if (p->fp->flush(p->fp) != 0) {
11833 sprintf(p->err,"icc_write flush() failed");
11834 p->al->free(p->al, buf);
11835 return p->errc = 1;
11836 }
11837
11838 if ((p->errc = ((icmFileMD5 *)dfp)->get_errc(dfp)) != 0) {
11839 sprintf(p->err,"icc_write compute ID failed with code %d", p->errc);
11840 p->al->free(p->al, buf);
11841 return p->errc;
11842 }
11843
11844 /* Get the MD5 checksum ID */
11845 md5->get(md5, p->header->id);
11846
11847 dfp->del(dfp);
11848 md5->del(md5);
11849 p->fp = ofp;
11850
11851 /* Reset the touched flags */
11852 for (i = 0; i < p->count; i++)
11853 p->data[i].objp->touched = 1;
11854 }
11855
11856 /* Now write out the profile for real. */
11857 /* Although it may appear like we're seeking for each element, */
11858 /* in fact elements will be written in file order. */
11859
11860 /* Write the header */
11861 if ((rv = p->header->write(p->header, of, 0)) != 0) {
11862 p->al->free(p->al, buf);
11863 return rv;
11864 }
11865
11866 /* Write the tag table */
11867 if ( p->fp->seek(p->fp, of + 128) != 0
11868 || p->fp->write(p->fp, buf, 1, len) != len) {
11869 sprintf(p->err,"icc_write: seek() or write() failed");
11870 p->al->free(p->al, buf);
11871 return p->errc = 1;
11872 }
11873 p->al->free(p->al, buf);
11874
11875 /* Write all the tag element data */
11876 /* (We invert the meaning of touched here) */
11877 for (i = 0; i < p->count; i++) { /* For all the tag element data */
11878 if (p->data[i].objp->touched == 0)
11879 continue; /* Must be linked, and we've already written it */
11880 if ((rv = p->data[i].objp->write(p->data[i].objp, of + p->data[i].offset)) != 0) {
11881 return rv;
11882 }
11883 /* Pad with 0 to next boundary */
11884 if (p->data[i].pad > 0) {
11885 if (p->fp->write(p->fp, pbuf, 1, p->data[i].pad) != p->data[i].pad) {
11886 sprintf(p->err,"icc_write: write() failed");
11887 return p->errc = 1;
11888 }
11889 }
11890 p->data[i].objp->touched = 0; /* Written it, so don't write it again. */
11891 }
11892
11893 if (p->fp->flush(p->fp) != 0) {
11894 sprintf(p->err,"icc_write flush() failed");
11895 return p->errc = 1;
11896 }
11897
11898 return rv;
11899 }
11900
11901 /* Write the contents of the object. Return 0 on sucess, error code on failure */
11902 /* (backwards compatible version) */
11903 static int icc_write(
11904 icc *p,
11905 icmFile *fp, /* File to write to */
11906 unsigned int of /* File offset to write to */
11907 ) {
11908 return icc_write_x(p, fp, of, 0);
11909 }
11910
11911 /* Create and add a tag with the given signature. */
11912 /* Returns a pointer to the element object */
11913 /* Returns NULL if error - icc->errc will contain */
11914 /* 2 on system error, */
11915 /* 3 if unknown tag */
11916 /* NOTE: that we prevent tag duplication */
11917 /* NOTE: to create a tag type icmSigUnknownType, set ttype to icmSigUnknownType, */
11918 /* and set the actual tag type in icmSigUnknownType->uttype */
11919 static icmBase *icc_add_tag(
11920 icc *p,
11921 icTagSignature sig, /* Tag signature - may be unknown */
11922 icTagTypeSignature ttype /* Tag type */
11923 ) {
11924 icmBase *tp;
11925 icmBase *nob;
11926 int i = 0, ok = 1;
11927 unsigned int j;
11928
11929 if (ttype != icmSigUnknownType) { /* Check only for possibly known types */
11930
11931 /* Check that a known signature has an acceptable type */
11932 for (i = 0; sigtypetable[i].sig != icMaxEnumType; i++) {
11933 if (sigtypetable[i].sig == sig) { /* recognized signature */
11934 ok = 0;
11935 for (j = 0; sigtypetable[i].ttypes[j] != icMaxEnumType; j++) {
11936 if (sigtypetable[i].ttypes[j] == ttype) /* recognized type */
11937 ok = 1;
11938 }
11939 break;
11940 }
11941 }
11942 if (!ok) {
11943 sprintf(p->err,"icc_add_tag: wrong tag type for signature");
11944 p->errc = 1;
11945 return NULL;
11946 }
11947
11948 /* Check that we know how to handle this type */
11949 for (i = 0; typetable[i].ttype != icMaxEnumType; i++) {
11950 if (typetable[i].ttype == ttype)
11951 break;
11952 }
11953 if (typetable[i].ttype == icMaxEnumType) {
11954 sprintf(p->err,"icc_add_tag: unsupported tag type");
11955 p->errc = 1;
11956 return NULL;
11957 }
11958 }
11959
11960 /* Check that this tag doesn't already exist */
11961 /* (Perhaps we should simply replace it, rather than erroring ?) */
11962 for (j = 0; j < p->count; j++) {
11963 if (p->data[j].sig == sig) {
11964 sprintf(p->err,"icc_add_tag: Already have tag '%s' in profile",tag2str(p->data[j].sig));
11965 p->errc = 1;
11966 return NULL;
11967 }
11968 }
11969
11970 /* Make space in tag table for new tag item */
11971 if (ovr_mul(sat_add(p->count,1), sizeof(icmTag))) {
11972 sprintf(p->err,"icc_add_tag: size overflow");
11973 p->errc = 1;
11974 return NULL;
11975 }
11976 if (p->data == NULL)
11977 tp = (icmBase *)p->al->malloc(p->al, (p->count+1) * sizeof(icmTag));
11978 else
11979 tp = (icmBase *)p->al->realloc(p->al, (void *)p->data, (p->count+1) * sizeof(icmTag));
11980 if (tp == NULL) {
11981 sprintf(p->err,"icc_add_tag: Tag table realloc() failed");
11982 p->errc = 2;
11983 return NULL;
11984 }
11985 p->data = (icmTag *)tp;
11986
11987 if (ttype == icmSigUnknownType) {
11988 if ((nob = new_icmUnknown(p)) == NULL)
11989 return NULL;
11990 } else {
11991 /* Allocate the empty object */
11992 if ((nob = typetable[i].new_obj(p)) == NULL)
11993 return NULL;
11994 }
11995
11996 /* Fill out our tag table entry */
11997 p->data[p->count].sig = sig; /* The tag signature */
11998 p->data[p->count].ttype = nob->ttype = ttype; /* The tag type signature */
11999 p->data[p->count].offset = 0; /* Unknown offset yet */
12000 p->data[p->count].size = 0; /* Unknown size yet */
12001 p->data[p->count].objp = nob; /* Empty object */
12002 p->count++;
12003
12004 return nob;
12005 }
12006
12007 /* Create and add a tag which is a link to an existing tag. */
12008 /* Returns a pointer to the element object */
12009 /* Returns NULL if error - icc->errc will contain */
12010 /* 3 if incompatible tag */
12011 /* NOTE: that we prevent tag duplication */
12012 static icmBase *icc_link_tag(
12013 icc *p,
12014 icTagSignature sig, /* Tag signature - may be unknown */
12015 icTagSignature ex_sig /* Tag signature of tag to link to */
12016 ) {
12017 icmBase *tp;
12018 unsigned int j, exi;
12019 int i, ok = 1;
12020
12021 /* Search for existing signature */
12022 for (exi = 0; exi < p->count; exi++) {
12023 if (p->data[exi].sig == ex_sig) /* Found it */
12024 break;
12025 }
12026 if (exi == p->count) {
12027 sprintf(p->err,"icc_link_tag: Can't find existing tag '%s'",tag2str(ex_sig));
12028 p->errc = 1;
12029 return NULL;
12030 }
12031
12032 if (p->data[exi].objp == NULL) {
12033 sprintf(p->err,"icc_link_tag: Existing tag '%s' isn't loaded",tag2str(ex_sig));
12034 p->errc = 1;
12035 return NULL;
12036 }
12037
12038 /* Check that a known signature has an acceptable type */
12039 for (i = 0; sigtypetable[i].sig != icMaxEnumType; i++) {
12040 if (sigtypetable[i].sig == sig) { /* recognized signature */
12041 ok = 0;
12042 for (j = 0; sigtypetable[i].ttypes[j] != icMaxEnumType; j++) {
12043 if (sigtypetable[i].ttypes[j] == p->data[exi].ttype) /* recognized type */
12044 ok = 1;
12045 }
12046 break;
12047 }
12048 }
12049 if (!ok) {
12050 sprintf(p->err,"icc_link_tag: wrong tag type for signature");
12051 p->errc = 1;
12052 return NULL;
12053 }
12054
12055 /* Check that this tag doesn't already exits */
12056 for (j = 0; j < p->count; j++) {
12057 if (p->data[j].sig == sig) {
12058 sprintf(p->err,"icc_link_tag: Already have tag '%s' in profile",tag2str(p->data[j].sig));
12059 p->errc = 1;
12060 return NULL;
12061 }
12062 }
12063
12064 /* Make space in tag table for new tag item */
12065 if (p->data == NULL)
12066 tp = (icmBase *)p->al->malloc(p->al, (p->count+1) * sizeof(icmTag));
12067 else
12068 tp = (icmBase *)p->al->realloc(p->al, (void *)p->data, (p->count+1) * sizeof(icmTag));
12069 if (tp == NULL) {
12070 sprintf(p->err,"icc_link_tag: Tag table realloc() failed");
12071 p->errc = 2;
12072 return NULL;
12073 }
12074 p->data = (icmTag *)tp;
12075
12076 /* Fill out our tag table entry */
12077 p->data[p->count].sig = sig; /* The tag signature */
12078 p->data[p->count].ttype = p->data[exi].ttype; /* The tag type signature */
12079 p->data[p->count].offset = p->data[exi].offset; /* Same offset (may not be allocated yet) */
12080 p->data[p->count].size = p->data[exi].size; /* Same size (may not be allocated yet) */
12081 p->data[p->count].objp = p->data[exi].objp; /* Shared object */
12082 p->data[exi].objp->refcount++; /* Bump reference count on tag type */
12083 p->count++;
12084
12085 return p->data[exi].objp;
12086 }
12087
12088 /* Search for tag signature */
12089 /* return: */
12090 /* 0 if found */
12091 /* 1 if found but not handled type */
12092 /* 2 if not found */
12093 /* NOTE: doesn't set icc->errc or icc->err[] */
12094 /* NOTE: we don't handle tag duplication - you'll always get the first in the file. */
12095 static int icc_find_tag(
12096 icc *p,
12097 icTagSignature sig /* Tag signature - may be unknown */
12098 ) {
12099 unsigned int i;
12100 int j;
12101
12102 /* Search for signature */
12103 for (i = 0; i < p->count; i++) {
12104 if (p->data[i].sig == sig) /* Found it */
12105 break;
12106 }
12107 if (i == p->count)
12108 return 2;
12109
12110 /* See if we can handle this type */
12111 for (j = 0; typetable[j].ttype != icMaxEnumType; j++) {
12112 if (typetable[j].ttype == p->data[i].ttype)
12113 break;
12114 }
12115 if (typetable[j].ttype == icMaxEnumType)
12116 return 1;
12117
12118 return 0;
12119 }
12120
12121 /* Read the specific tag element data, and return a pointer to the object */
12122 /* (This is an internal function) */
12123 /* Returns NULL if error - icc->errc will contain: */
12124 /* 2 if not found */
12125 /* Returns an icmSigUnknownType object if the tag type isn't handled by a */
12126 /* specific object and alow_unk is NZ */
12127 /* NOTE: we don't handle tag duplication - you'll always get the first in the file */
12128 static icmBase *icc_read_tag_ix(
12129 icc *p,
12130 unsigned int i, /* Index from 0.. p->count-1 */
12131 int alow_unk /* NZ to allow unknown tag to load */
12132 ) {
12133 icTagTypeSignature ttype; /* Tag type we will create */
12134 icmBase *nob;
12135 unsigned int k;
12136 int j;
12137
12138 if (i >= p->count) {
12139 sprintf(p->err,"icc_read_tag_ix: index %d is out of range",i);
12140 p->errc = 2;
12141 return NULL;
12142 }
12143
12144 /* See if it's already been read */
12145 if (p->data[i].objp != NULL) {
12146 return p->data[i].objp; /* Just return it */
12147 }
12148
12149 /* See if this should be a link */
12150 for (k = 0; k < p->count; k++) {
12151 if (i == k)
12152 continue;
12153 if (p->data[i].ttype == p->data[k].ttype /* Exact match and already read */
12154 && p->data[i].offset == p->data[k].offset
12155 && p->data[i].size == p->data[k].size
12156 && p->data[k].objp != NULL)
12157 break;
12158 }
12159 if (k < p->count) { /* Make this a link */
12160 p->data[i].objp = p->data[k].objp;
12161 p->data[k].objp->refcount++; /* Bump reference count */
12162 return p->data[k].objp; /* Done */
12163 }
12164
12165 /* See if we can handle this type */
12166 for (j = 0; typetable[j].ttype != icMaxEnumType; j++) {
12167 if (typetable[j].ttype == p->data[i].ttype)
12168 break;
12169 }
12170
12171 if (typetable[j].ttype == icMaxEnumType) {
12172 if (!alow_unk) {
12173 p->errc = 2;
12174 return NULL;
12175 }
12176 ttype = icmSigUnknownType; /* Use the Unknown type to handle an unknown tag type */
12177 } else {
12178 ttype = p->data[i].ttype; /* We known this type */
12179 }
12180
12181 /* Create and read in the object */
12182 if (ttype == icmSigUnknownType)
12183 nob = new_icmUnknown(p);
12184 else
12185 nob = typetable[j].new_obj(p);
12186
12187 if (nob == NULL)
12188 return NULL;
12189
12190 if ((nob->read(nob, p->data[i].size, p->of + p->data[i].offset)) != 0) {
12191 nob->del(nob); /* Failed, so destroy it */
12192 return NULL;
12193 }
12194 p->data[i].objp = nob;
12195 return nob;
12196 }
12197
12198 /* Read the tag element data of the first matching, and return a pointer to the object */
12199 /* Returns NULL if error - icc->errc will contain: */
12200 /* 2 if not found */
12201 /* Doesn't read uknown type tags */
12202 static icmBase *icc_read_tag(
12203 icc *p,
12204 icTagSignature sig /* Tag signature - may be unknown */
12205 ) {
12206 unsigned int i;
12207
12208 /* Search for signature */
12209 for (i = 0; i < p->count; i++) {
12210 if (p->data[i].sig == sig) /* Found it */
12211 break;
12212 }
12213 if (i >= p->count) {
12214 sprintf(p->err,"icc_read_tag: Tag '%s' not found",string_TagSignature(sig));
12215 p->errc = 2;
12216 return NULL;
12217 }
12218
12219 /* Let read_tag_ix do all the work */
12220 return icc_read_tag_ix(p, i, 0);
12221 }
12222
12223 /* Read the tag element data of the first matching, and return a pointer to the object */
12224 /* Returns NULL if error.
12225 /* Returns an icmSigUnknownType object if the tag type isn't handled by a specific object. */
12226 /* NOTE: we don't handle tag duplication - you'll always get the first in the file. */
12227 static icmBase *icc_read_tag_any(
12228 icc *p,
12229 icTagSignature sig /* Tag signature - may be unknown */
12230 ) {
12231 unsigned int i;
12232
12233 /* Search for signature */
12234 for (i = 0; i < p->count; i++) {
12235 if (p->data[i].sig == sig) /* Found it */
12236 break;
12237 }
12238 if (i >= p->count) {
12239 sprintf(p->err,"icc_read_tag: Tag '%s' not found",string_TagSignature(sig));
12240 p->errc = 2;
12241 return NULL;
12242 }
12243
12244 /* Let read_tag_ix do all the work */
12245 return icc_read_tag_ix(p, i, 1);
12246 }
12247
12248 /* Rename a tag signature */
12249 static int icc_rename_tag(
12250 icc *p,
12251 icTagSignature sig, /* Existing Tag signature - may be unknown */
12252 icTagSignature sigNew /* New Tag signature - may be unknown */
12253 ) {
12254 unsigned int k;
12255 int i, j, ok = 1;
12256
12257 /* Search for signature */
12258 for (k = 0; k < p->count; k++) {
12259 if (p->data[k].sig == sig) /* Found it */
12260 break;
12261 }
12262 if (k >= p->count) {
12263 sprintf(p->err,"icc_rename_tag: Tag '%s' not found",string_TagSignature(sig));
12264 return p->errc = 2;
12265 }
12266
12267 /* Check that a known new signature has an acceptable type */
12268 for (i = 0; sigtypetable[i].sig != icMaxEnumType; i++) {
12269 if (sigtypetable[i].sig == sigNew) { /* recognized signature */
12270 ok = 0;
12271 for (j = 0; sigtypetable[i].ttypes[j] != icMaxEnumType; j++) {
12272 if (sigtypetable[i].ttypes[j] == p->data[k].ttype) /* recognized type */
12273 ok = 1;
12274 }
12275 break;
12276 }
12277 }
12278
12279 if (!ok) {
12280 sprintf(p->err,"icc_rename_tag: wrong signature for tag type");
12281 p->errc = 1;
12282 return p->errc;
12283 }
12284
12285 /* change its signature */
12286 p->data[k].sig = sigNew;
12287
12288 return 0;
12289 }
12290
12291 /* Unread a specific tag, and free the underlying tag type data */
12292 /* if this was the last reference to it. */
12293 /* (This is an internal function) */
12294 /* Returns non-zero on error: */
12295 /* tag not found - icc->errc will contain 2 */
12296 /* tag not read - icc->errc will contain 2 */
12297 static int icc_unread_tag_ix(
12298 icc *p,
12299 unsigned int i /* Index from 0.. p->count-1 */
12300 ) {
12301 if (i >= p->count) {
12302 sprintf(p->err,"icc_unread_tag_ix: index %d is out of range",i);
12303 return p->errc = 2;
12304 }
12305
12306 /* See if it's been read */
12307 if (p->data[i].objp == NULL) {
12308 sprintf(p->err,"icc_unread_tag: Tag '%s' not currently loaded",string_TagSignature(p->data[i].sig));
12309 return p->errc = 2;
12310 }
12311
12312 if (--(p->data[i].objp->refcount) == 0) /* decrement reference count */
12313 (p->data[i].objp->del)(p->data[i].objp); /* Last reference */
12314 p->data[i].objp = NULL;
12315
12316 return 0;
12317 }
12318
12319 /* Unread the tag, and free the underlying tag type */
12320 /* if this was the last reference to it. */
12321 /* Returns non-zero on error: */
12322 /* tag not found - icc->errc will contain 2 */
12323 /* tag not read - icc->errc will contain 2 */
12324 /* NOTE: we don't handle tag duplication - you'll always get the first in the file */
12325 static int icc_unread_tag(
12326 icc *p,
12327 icTagSignature sig /* Tag signature - may be unknown */
12328 ) {
12329 unsigned int i;
12330
12331 /* Search for signature */
12332 for (i = 0; i < p->count; i++) {
12333 if (p->data[i].sig == sig) /* Found it */
12334 break;
12335 }
12336 if (i >= p->count) {
12337 sprintf(p->err,"icc_unread_tag: Tag '%s' not found",string_TagSignature(sig));
12338 return p->errc = 2;
12339 }
12340
12341 return icc_unread_tag(p, i);
12342 }
12343
12344 /* Delete the tag, and free the underlying tag type, */
12345 /* if this was the last reference to it. */
12346 /* Note this finds the first tag with a matching signature */
12347 /* Returns non-zero on error: */
12348 /* tag not found - icc->errc will contain 2 */
12349 static int icc_delete_tag_ix(
12350 icc *p,
12351 unsigned int i /* Index from 0.. p->count-1 */
12352 ) {
12353 if (i >= p->count) {
12354 sprintf(p->err,"icc_delete_tag_ix: index %d of range",i);
12355 return p->errc = 2;
12356 }
12357
12358 /* If it's been read into memory, decrement the reference count */
12359 if (p->data[i].objp != NULL) {
12360 if (--(p->data[i].objp->refcount) == 0) /* decrement reference count */
12361 (p->data[i].objp->del)(p->data[i].objp); /* Last reference */
12362 p->data[i].objp = NULL;
12363 }
12364
12365 /* Now remove it from the tag list */
12366 for (; i < (p->count-1); i++)
12367 p->data[i] = p->data[i+1]; /* Copy the structure down */
12368
12369 p->count--; /* One less tag in list */
12370
12371 return 0;
12372 }
12373
12374 /* Delete the tag, and free the underlying tag type, */
12375 /* if this was the last reference to it. */
12376 /* Note this finds the first tag with a matching signature. */
12377 /* Returns non-zero on error: */
12378 /* tag not found - icc->errc will contain 2 */
12379 static int icc_delete_tag(
12380 icc *p,
12381 icTagSignature sig /* Tag signature - may be unknown */
12382 ) {
12383 unsigned int i;
12384
12385 /* Search for signature */
12386 for (i = 0; i < p->count; i++) {
12387 if (p->data[i].sig == sig) /* Found it */
12388 break;
12389 }
12390 if (i >= p->count) {
12391 sprintf(p->err,"icc_delete_tag: Tag '%s' not found",string_TagSignature(sig));
12392 return p->errc = 2;
12393 }
12394
12395 return icc_delete_tag_ix(p, i);
12396 }
12397
12398 /* Read all the tags into memory, including unknown types. */
12399 /* Returns non-zero on error. */
12400 static int icc_read_all_tags(
12401 icc *p
12402 ) {
12403 unsigned int i;
12404
12405 for (i = 0; i < p->count; i++) { /* For all the tag element data */
12406 if (icc_read_tag_ix(p, i, 1) == NULL)
12407 return p->errc;
12408 }
12409 return 0;
12410 }
12411
12412
12413 static void icc_dump(
12414 icc *p,
12415 icmFile *op, /* Output to dump to */
12416 int verb /* Verbosity level */
12417 ) {
12418 unsigned int i;
12419 if (verb <= 0)
12420 return;
12421
12422 op->gprintf(op,"icc:\n");
12423
12424 /* Dump the header */
12425 if (p->header != NULL)
12426 p->header->dump(p->header,op,verb);
12427
12428 /* Dump all the tag elements */
12429 for (i = 0; i < p->count; i++) { /* For all the tag element data */
12430 icmBase *ob;
12431 int tr;
12432 op->gprintf(op,"tag %d:\n",i);
12433 op->gprintf(op," sig %s\n",tag2str(p->data[i].sig));
12434 op->gprintf(op," type %s\n",tag2str(p->data[i].ttype));
12435 op->gprintf(op," offset %d\n", p->data[i].offset);
12436 op->gprintf(op," size %d\n", p->data[i].size);
12437 tr = 0;
12438 if (p->data[i].objp == NULL) {
12439 /* The object is not loaded, so load it then free it */
12440 if (icc_read_tag_ix(p, i, 1) == NULL)
12441 op->gprintf(op,"Unable to read: %d, %s\n",p->errc,p->err);
12442 tr = 1;
12443 }
12444 if ((ob = p->data[i].objp) != NULL) {
12445 /* op->gprintf(op," refcount %d\n", ob->refcount); */
12446 ob->dump(ob,op,verb-1);
12447
12448 if (tr != 0) { /* Cleanup if temporary */
12449 icc_unread_tag_ix(p, i);
12450 }
12451 }
12452 op->gprintf(op,"\n");
12453 }
12454 }
12455
12456 static void icc_delete(
12457 icc *p
12458 ) {
12459 unsigned int i;
12460 icmAlloc *al = p->al;
12461 int del_al = p->del_al;
12462
12463 /* Free up the header */
12464 if (p->header != NULL)
12465 (p->header->del)(p->header);
12466
12467 /* Free up the tag data objects */
12468 if (p->data != NULL) {
12469 for (i = 0; i < p->count; i++) {
12470 if (p->data[i].objp != NULL) {
12471 if (--(p->data[i].objp->refcount) == 0) /* decrement reference count */
12472 (p->data[i].objp->del)(p->data[i].objp); /* Last reference */
12473 p->data[i].objp = NULL;
12474 }
12475 }
12476 /* Free tag table */
12477 al->free(al, p->data);
12478 }
12479
12480 /* We are responsible for deleting the file object */
12481 if (p->del_fp && p->fp != NULL)
12482 p->fp->del(p->fp);
12483
12484 /* This object */
12485 al->free(al, p);
12486
12487 if (del_al) /* We are responsible for deleting allocator */
12488 al->del(al);
12489 }
12490
12491 /* ================================================== */
12492 /* Lut Color normalizing and de-normalizing functions */
12493
12494 /* As a rule, I am representing Lut in memory as values in machine form as real */
12495 /* numbers in the range 0.0 - 1.0. For many color spaces (ie. RGB, Gray, */
12496 /* hsv, hls, cmyk and other device coords), this is entirely appropriate. */
12497 /* For CIE based spaces though, this is not correct, since (I assume!) the binary */
12498 /* representation will be consistent with the encoding in Annex A, page 74 */
12499 /* of the standard. Note that the standard doesn't specify the encoding of */
12500 /* many color spaces (ie. Yuv, Yxy etc.), and is unclear about PCS. */
12501
12502 /* The following functions convert to and from the CIE base spaces */
12503 /* and the real Lut input/output values. These are used to convert real color */
12504 /* space values into/out of the raw lut 0.0-1.0 representation (which subsequently */
12505 /* get converted to ICC integer values in the obvious way as a mapping to 0 .. 2^n-1). */
12506
12507 /* This is used internally to support the Lut->lookup() function, */
12508 /* and can also be used by someone writing a Lut based profile to determine */
12509 /* the colorspace range that the input lut indexes cover, as well */
12510 /* as processing the output luts values into normalized form ready */
12511 /* for writing. */
12512
12513 /* These functions should be accessed by calling icc.getNormFuncs() */
12514
12515 /* - - - - - - - - - - - - - - - - */
12516 /* According to 6.5.5 and 6.5.6 of the spec., */
12517 /* XYZ index values are represented the same as their table */
12518 /* values, ie. as a u1.15 representation, with a value */
12519 /* range from 0.0 -> 1.999969482422 */
12520
12521 /* Convert Lut index/value to XYZ coord. */
12522 static void Lut_Lut2XYZ(double *out, double *in) {
12523 out[0] = in[0] * (1.0 + 32767.0/32768); /* X */
12524 out[1] = in[1] * (1.0 + 32767.0/32768); /* Y */
12525 out[2] = in[2] * (1.0 + 32767.0/32768); /* Z */
12526 }
12527
12528 /* Convert XYZ coord to Lut index/value. */
12529 static void Lut_XYZ2Lut(double *out, double *in) {
12530 out[0] = in[0] * (1.0/(1.0 + 32767.0/32768));
12531 out[1] = in[1] * (1.0/(1.0 + 32767.0/32768));
12532 out[2] = in[2] * (1.0/(1.0 + 32767.0/32768));
12533 }
12534
12535 /* Convert Lut index/value to Y coord. */
12536 static void Lut_Lut2Y(double *out, double *in) {
12537 out[0] = in[0] * (1.0 + 32767.0/32768); /* Y */
12538 }
12539
12540 /* Convert Y coord to Lut index/value. */
12541 static void Lut_Y2Lut(double *out, double *in) {
12542 out[0] = in[0] * (1.0/(1.0 + 32767.0/32768));
12543 }
12544
12545 /* - - - - - - - - - - - - - - - - */
12546 /* Convert 8 bit Lab to Lut numbers */
12547 /* Annex A specifies 8 and 16 bit encoding, but is */
12548 /* silent on the Lut index normalization. */
12549 /* Following Michael Bourgoin's 1998 SIGGRAPH course comment on this, */
12550 /* we assume here that the index encoding is the same as the */
12551 /* value encoding. */
12552
12553 /* Convert Lut8 table index/value to Lab */
12554 static void Lut_Lut2Lab_8(double *out, double *in) {
12555 out[0] = in[0] * 100.0; /* L */
12556 out[1] = (in[1] * 255.0) - 128.0; /* a */
12557 out[2] = (in[2] * 255.0) - 128.0; /* b */
12558 }
12559
12560 /* Convert Lab to Lut8 table index/value */
12561 static void Lut_Lab2Lut_8(double *out, double *in) {
12562 out[0] = in[0] * 1.0/100.0; /* L */
12563 out[1] = (in[1] + 128.0) * 1.0/255.0; /* a */
12564 out[2] = (in[2] + 128.0) * 1.0/255.0; /* b */
12565 }
12566
12567 /* Convert Lut8 table index/value to L */
12568 static void Lut_Lut2L_8(double *out, double *in) {
12569 out[0] = in[0] * 100.0; /* L */
12570 }
12571
12572 /* Convert L to Lut8 table index/value */
12573 static void Lut_L2Lut_8(double *out, double *in) {
12574 out[0] = in[0] * 1.0/100.0; /* L */
12575 }
12576
12577 /* - - - - - - - - - - - - - - - - */
12578 /* Convert 16 bit Lab to Lut numbers, V2 */
12579
12580 /* Convert Lut16 table index/value to Lab */
12581 static void Lut_Lut2LabV2_16(double *out, double *in) {
12582 out[0] = in[0] * (100.0 * 65535.0)/65280.0; /* L */
12583 out[1] = (in[1] * (255.0 * 65535.0)/65280) - 128.0; /* a */
12584 out[2] = (in[2] * (255.0 * 65535.0)/65280) - 128.0; /* b */
12585 }
12586
12587 /* Convert Lab to Lut16 table index/value */
12588 static void Lut_Lab2LutV2_16(double *out, double *in) {
12589 out[0] = in[0] * 65280.0/(100.0 * 65535.0); /* L */
12590 out[1] = (in[1] + 128.0) * 65280.0/(255.0 * 65535.0); /* a */
12591 out[2] = (in[2] + 128.0) * 65280.0/(255.0 * 65535.0); /* b */
12592 }
12593
12594 /* Convert Lut16 table index/value to L */
12595 static void Lut_Lut2LV2_16(double *out, double *in) {
12596 out[0] = in[0] * (100.0 * 65535.0)/65280.0; /* L */
12597 }
12598
12599 /* Convert Lab to Lut16 table index/value */
12600 static void Lut_L2LutV2_16(double *out, double *in) {
12601 out[0] = in[0] * 65280.0/(100.0 * 65535.0); /* L */
12602 }
12603
12604 /* - - - - - - - - - - - - - - - - */
12605 /* Convert 16 bit Lab to Lut numbers, V4 */
12606
12607 /* Convert Lut16 table index/value to Lab */
12608 static void Lut_Lut2LabV4_16(double *out, double *in) {
12609 out[0] = in[0] * 100.0; /* L */
12610 out[1] = (in[1] * 255.0) - 128.0; /* a */
12611 out[2] = (in[2] * 255.0) - 128.0; /* b */
12612 }
12613
12614 /* Convert Lab to Lut16 table index/value */
12615 static void Lut_Lab2LutV4_16(double *out, double *in) {
12616 out[0] = in[0] * 1.0/100.0; /* L */
12617 out[1] = (in[1] + 128.0) * 1.0/255.0; /* a */
12618 out[2] = (in[2] + 128.0) * 1.0/255.0; /* b */
12619 }
12620
12621 /* Convert Lut16 table index/value to L */
12622 static void Lut_Lut2LV4_16(double *out, double *in) {
12623 out[0] = in[0] * 100.0; /* L */
12624 }
12625
12626 /* Convert L to Lut16 table index/value */
12627 static void Lut_L2LutV4_16(double *out, double *in) {
12628 out[0] = in[0] * 1.0/100.0; /* L */
12629 }
12630
12631 /* - - - - - - - - - - - - - - - - */
12632 /* Convert Luv to Lut number */
12633 /* This data normalization is taken from Apples */
12634 /* Colorsync specification. */
12635 /* As per other color spaces, we assume that the index */
12636 /* normalization is the same as the data normalization. */
12637
12638 /* Convert Lut table index/value to Luv */
12639 static void Lut_Lut2Luv(double *out, double *in) {
12640 out[0] = in[0] * 100.0; /* L */
12641 out[1] = (in[1] * 65535.0/256.0) - 128.0; /* u */
12642 out[2] = (in[2] * 65535.0/256.0) - 128.0; /* v */
12643 }
12644
12645 /* Convert Luv to Lut table index/value */
12646 static void Lut_Luv2Lut(double *out, double *in) {
12647 out[0] = in[0] * 1.0/100.0; /* L */
12648 out[1] = (in[1] + 128.0) * 256.0/65535.0; /* u */
12649 out[2] = (in[2] + 128.0) * 256.0/65535.0; /* v */
12650 }
12651
12652 /* - - - - - - - - - - - - - - - - */
12653 /* Default N component conversions */
12654 static void Lut_N(double *out, double *in, int nc) {
12655 for (--nc; nc >= 0; nc--)
12656 out[nc] = in[nc];
12657 }
12658
12659 /* 1 */
12660 static void Lut_1(double *out, double *in) {
12661 out[0] = in[0];
12662 }
12663
12664 /* 2 */
12665 static void Lut_2(double *out, double *in) {
12666 out[0] = in[0];
12667 out[1] = in[1];
12668 }
12669
12670 /* 3 */
12671 static void Lut_3(double *out, double *in) {
12672 out[0] = in[0];
12673 out[1] = in[1];
12674 out[2] = in[2];
12675 }
12676
12677 /* 4 */
12678 static void Lut_4(double *out, double *in) {
12679 out[0] = in[0];
12680 out[1] = in[1];
12681 out[2] = in[2];
12682 out[3] = in[3];
12683 }
12684
12685 /* 5 */
12686 static void Lut_5(double *out, double *in) {
12687 out[0] = in[0];
12688 out[1] = in[1];
12689 out[2] = in[2];
12690 out[3] = in[3];
12691 out[4] = in[4];
12692 }
12693
12694 /* 6 */
12695 static void Lut_6(double *out, double *in) {
12696 out[0] = in[0];
12697 out[1] = in[1];
12698 out[2] = in[2];
12699 out[3] = in[3];
12700 out[4] = in[4];
12701 out[5] = in[5];
12702 }
12703
12704 /* 7 */
12705 static void Lut_7(double *out, double *in) {
12706 Lut_N(out, in, 7);
12707 }
12708
12709 /* 8 */
12710 static void Lut_8(double *out, double *in) {
12711 Lut_N(out, in, 8);
12712 }
12713
12714 /* 9 */
12715 static void Lut_9(double *out, double *in) {
12716 Lut_N(out, in, 9);
12717 }
12718
12719 /* 10 */
12720 static void Lut_10(double *out, double *in) {
12721 Lut_N(out, in, 10);
12722 }
12723
12724 /* 11 */
12725 static void Lut_11(double *out, double *in) {
12726 Lut_N(out, in, 11);
12727 }
12728
12729 /* 12 */
12730 static void Lut_12(double *out, double *in) {
12731 Lut_N(out, in, 12);
12732 }
12733
12734 /* 13 */
12735 static void Lut_13(double *out, double *in) {
12736 Lut_N(out, in, 13);
12737 }
12738
12739 /* 14 */
12740 static void Lut_14(double *out, double *in) {
12741 Lut_N(out, in, 14);
12742 }
12743
12744 /* 15 */
12745 static void Lut_15(double *out, double *in) {
12746 Lut_N(out, in, 15);
12747 }
12748
12749 /* Function table - match conversions to color spaces. */
12750 /* Anything not here, we don't know how to convert. */
12751 /* (ie. YCbCr) */
12752 static struct {
12753 icColorSpaceSignature csig;
12754 void (*fromLut)(double *out, double *in); /* from Lut index/entry */
12755 void (*toLut)(double *out, double *in); /* to Lut index/entry */
12756 } colnormtable[] = {
12757 {icSigXYZData, Lut_Lut2XYZ, Lut_XYZ2Lut },
12758 {icmSigYData, Lut_Lut2Y, Lut_Y2Lut },
12759 {icmSigLab8Data, Lut_Lut2Lab_8, Lut_Lab2Lut_8 },
12760 {icmSigLabV2Data, Lut_Lut2LabV2_16, Lut_Lab2LutV2_16 },
12761 {icmSigLabV4Data, Lut_Lut2LabV4_16, Lut_Lab2LutV4_16 },
12762 {icmSigL8Data, Lut_Lut2L_8, Lut_L2Lut_8 },
12763 {icmSigLV2Data, Lut_Lut2LV2_16, Lut_L2LutV2_16 },
12764 {icmSigLV4Data, Lut_Lut2LV4_16, Lut_L2LutV4_16 },
12765 {icSigLuvData, Lut_Lut2Luv, Lut_Luv2Lut },
12766 {icSigYxyData, Lut_3, Lut_3 },
12767 {icSigRgbData, Lut_3, Lut_3 },
12768 {icSigGrayData, Lut_1, Lut_1 },
12769 {icSigHsvData, Lut_3, Lut_3 },
12770 {icSigHlsData, Lut_3, Lut_3 },
12771 {icSigCmykData, Lut_4, Lut_4 },
12772 {icSigCmyData, Lut_3, Lut_3 },
12773 {icSigMch6Data, Lut_6, Lut_6 },
12774 {icSig2colorData, Lut_2, Lut_2 },
12775 {icSig3colorData, Lut_3, Lut_3 },
12776 {icSig4colorData, Lut_4, Lut_4 },
12777 {icSig5colorData, Lut_5, Lut_5 },
12778 {icSig6colorData, Lut_6, Lut_6 },
12779 {icSig7colorData, Lut_7, Lut_7 },
12780 {icSigMch5Data, Lut_5, Lut_5 },
12781 {icSigMch6Data, Lut_6, Lut_6 },
12782 {icSigMch7Data, Lut_7, Lut_7 },
12783 {icSigMch8Data, Lut_8, Lut_8 },
12784 {icSig8colorData, Lut_8, Lut_8 },
12785 {icSig9colorData, Lut_9, Lut_9 },
12786 {icSig10colorData, Lut_10, Lut_10 },
12787 {icSig11colorData, Lut_11, Lut_11 },
12788 {icSig12colorData, Lut_12, Lut_12 },
12789 {icSig13colorData, Lut_13, Lut_13 },
12790 {icSig14colorData, Lut_14, Lut_14 },
12791 {icSig15colorData, Lut_15, Lut_15 },
12792 {icMaxEnumData, NULL, NULL }
12793 };
12794
12795 /*
12796 Legacy Lab encoding:
12797
12798 The V4 specificatins are misleading on this, since they assume in this
12799 instance that all devices spaces, however labeled, have no defined
12800 ICC encoding. The end result is simple enough though:
12801
12802 ICC V2 Lab encoding should be used in all PCS encodings in
12803 a icSigLut16Type or icSigNamedColor2Type tag, and can be used
12804 for Lab encoding in device spaces for these tags.
12805
12806 ICC V4 Lab encoding should be used in all PCS encodings in
12807 all other situations, and can be used for Lab encoding in
12808 device spaces for all other situtaions.
12809
12810 [ Since the ICC spec. doesn't cover device spaces labeled as Lab,
12811 these are ripe for mis-matches between different implementations.]
12812
12813 This logic has yet to be fully implemented here.
12814 */
12815
12816 /* Find appropriate conversion functions from the normalised */
12817 /* Lut data range 0.0 - 1.0 to/from a given colorspace value, */
12818 /* given the color space and Lut type. */
12819 /* Return 0 on success, 1 on match failure. */
12820 /* NOTE: doesn't set error value, message etc.! */
12821 static int getNormFunc(
12822 icc *icp,
12823 // icProfileClassSignature psig, /* Profile signature to use */
12824 icColorSpaceSignature csig, /* Colorspace to use. */
12825 // int lutin, /* 0 if this is for a icSigLut16Type input, nz for output */
12826 // icTagSignature tagSig, /* Tag signature involved (AtoB or B2A etc.) */
12827 icTagTypeSignature tagType, /* icSigLut8Type or icSigLut16Type or V4 lut */
12828 icmNormFlag flag, /* icmFromLuti, icmFromLutv or icmToLuti, icmToLutv */
12829 void (**nfunc)(double *out, double *in)
12830 ) {
12831 int i;
12832 if (tagType == icSigLut8Type && csig == icSigLabData) {
12833 csig = icmSigLab8Data;
12834 }
12835 if (csig == icSigLabData) {
12836 if (tagType == icSigLut16Type) /* Lut16 retains legacy encoding */
12837 csig = icmSigLabV2Data;
12838 else { /* Other tag types use version specific encoding */
12839 if (icp->ver)
12840 csig = icmSigLabV4Data;
12841 else
12842 csig = icmSigLabV2Data;
12843 }
12844 }
12845
12846 for (i = 0; colnormtable[i].csig != icMaxEnumData; i++) {
12847 if (colnormtable[i].csig == csig)
12848 break; /* Found it */
12849 }
12850 if (colnormtable[i].csig == icMaxEnumData) { /* Oops */
12851 *nfunc = NULL;
12852 return 1;
12853 }
12854
12855 if (flag == icmFromLuti || flag == icmFromLutv) { /* Table index/value decoding functions */
12856 *nfunc = colnormtable[i].fromLut;
12857 return 0;
12858 } else if (flag == icmToLuti || flag == icmToLutv) { /* Table index/value encoding functions */
12859 *nfunc = colnormtable[i].toLut;
12860 return 0;
12861 }
12862 *nfunc = NULL;
12863 return 1;
12864 }
12865
12866 /* - - - - - - - - - - - - - - - - - - - - - - - - */
12867 /* Colorspace ranges - used instead of norm/denorm by Mono, Matrix and */
12868 /* override PCS */
12869
12870 /* Function table - match ranges to color spaces. */
12871 /* Anything not here, we don't know how to convert. */
12872 /* (ie. YCbCr) */
12873 /* Hmm. we're not handling Lab8 properly ?? ~~~8888 */
12874 static struct {
12875 icColorSpaceSignature csig;
12876 int same; /* Non zero if first entry applies to all channels */
12877 double min[3]; /* Minimum value for this colorspace */
12878 double max[3]; /* Maximum value for this colorspace */
12879 } colorrangetable[] = {
12880 {icSigXYZData, 1, { 0.0 } , { 1.0 + 32767.0/32768.0 } },
12881 {icmSigLab8Data, 0, { 0.0, -128.0, -128.0 }, { 100.0, 127.0, 127.0 } },
12882 {icmSigLabV2Data, 0, { 0.0, -128.0, -128.0 },
12883 { 100.0 + 25500.0/65280.0, 127.0 + 255.0/256.0, 127.0 + 255.0/256.0 } },
12884 {icmSigLabV4Data, 0, { 0.0, -128.0, -128.0 }, { 100.0, 127.0, 127.0 } },
12885 {icmSigYData, 1, { 0.0 }, { 1.0 + 32767.0/32768.0 } },
12886 {icmSigL8Data, 1, { 0.0 }, { 100.0 } },
12887 {icmSigLV2Data, 1, { 0.0 }, { 100.0 + 25500.0/65280.0 } },
12888 {icmSigLV4Data, 1, { 0.0 }, { 100.0 } },
12889 {icSigLuvData, 0, { 0.0, -128.0, -128.0 },
12890 { 100.0, 127.0 + 255.0/256.0, 127.0 + 255.0/256.0 } },
12891 {icSigYCbCrData, 1, { 0.0 }, { 1.0 } }, /* ??? */
12892 {icSigYxyData, 1, { 0.0 }, { 1.0 } }, /* ??? */
12893 {icSigRgbData, 1, { 0.0 }, { 1.0 } },
12894 {icSigGrayData, 1, { 0.0 }, { 1.0 } },
12895 {icSigHsvData, 1, { 0.0 }, { 1.0 } },
12896 {icSigHlsData, 1, { 0.0 }, { 1.0 } },
12897 {icSigCmykData, 1, { 0.0 }, { 1.0 } },
12898 {icSigCmyData, 1, { 0.0 }, { 1.0 } },
12899 {icSigMch6Data, 1, { 0.0 }, { 1.0 } },
12900 {icSig2colorData, 1, { 0.0 }, { 1.0 } },
12901 {icSig3colorData, 1, { 0.0 }, { 1.0 } },
12902 {icSig4colorData, 1, { 0.0 }, { 1.0 } },
12903 {icSig5colorData, 1, { 0.0 }, { 1.0 } },
12904 {icSig6colorData, 1, { 0.0 }, { 1.0 } },
12905 {icSig7colorData, 1, { 0.0 }, { 1.0 } },
12906 {icSig8colorData, 1, { 0.0 }, { 1.0 } },
12907 {icSigMch5Data, 1, { 0.0 }, { 1.0 } },
12908 {icSigMch6Data, 1, { 0.0 }, { 1.0 } },
12909 {icSigMch7Data, 1, { 0.0 }, { 1.0 } },
12910 {icSigMch8Data, 1, { 0.0 }, { 1.0 } },
12911 {icSig9colorData, 1, { 0.0 }, { 1.0 } },
12912 {icSig10colorData, 1, { 0.0 }, { 1.0 } },
12913 {icSig11colorData, 1, { 0.0 }, { 1.0 } },
12914 {icSig12colorData, 1, { 0.0 }, { 1.0 } },
12915 {icSig13colorData, 1, { 0.0 }, { 1.0 } },
12916 {icSig14colorData, 1, { 0.0 }, { 1.0 } },
12917 {icSig15colorData, 1, { 0.0 }, { 1.0 } },
12918 {icMaxEnumData, 1, { 0.0 }, { 1.0 } }
12919 };
12920
12921 /* Find appropriate typical encoding ranges for a */
12922 /* colorspace given the color space. */
12923 /* Return 0 on success, 1 on match failure */
12924 static int getRange(
12925 icc *icp,
12926 // icProfileClassSignature psig, /* Profile signature to use */
12927 icColorSpaceSignature csig, /* Colorspace to use. */
12928 // int lutin, /* 0 if this is for a icSigLut16Type input, nz for output */
12929 // icTagSignature tagSig, /* Tag signature involved (AtoB or B2A etc.) */
12930 icTagTypeSignature tagType, /* icSigLut8Type or icSigLut16Type or V4 lut */
12931 double *min, double *max /* Return range values */
12932 ) {
12933 int i, e, ee;
12934
12935 if (tagType == icSigLut8Type && csig == icSigLabData) {
12936 csig = icmSigLab8Data;
12937 }
12938 if (csig == icSigLabData) {
12939 if (tagType == icSigLut16Type) /* Lut16 retains legacy encoding */
12940 csig = icmSigLabV2Data;
12941 else { /* Other tag types use version specific encoding */
12942 if (icp->ver)
12943 csig = icmSigLabV4Data;
12944 else
12945 csig = icmSigLabV2Data;
12946 }
12947 }
12948
12949 for (i = 0; colorrangetable[i].csig != icMaxEnumData; i++) {
12950 if (colorrangetable[i].csig == csig)
12951 break; /* Found it */
12952 }
12953 if (colorrangetable[i].csig == icMaxEnumData) { /* Oops */
12954 return 1;
12955 }
12956 ee = number_ColorSpaceSignature(csig); /* Get number of components */
12957
12958 if (colorrangetable[i].same) { /* All channels are the same */
12959 for (e = 0; e < ee; e++) {
12960 if (min != NULL)
12961 min[e] = colorrangetable[i].min[0];
12962 if (max != NULL)
12963 max[e] = colorrangetable[i].max[0];
12964 }
12965 } else {
12966 for (e = 0; e < ee; e++) {
12967 if (min != NULL)
12968 min[e] = colorrangetable[i].min[e];
12969 if (max != NULL)
12970 max[e] = colorrangetable[i].max[e];
12971 }
12972 }
12973 return 0;
12974 }
12975
12976 /* ============================================= */
12977 /* Misc. support functions. */
12978
12979 /* Clamp a 3 vector to be +ve */
12980 void icmClamp3(double out[3], double in[3]) {
12981 int i;
12982 for (i = 0; i < 3; i++)
12983 out[i] = in[i] < 0.0 ? 0.0 : in[i];
12984 }
12985
12986 /* Add two 3 vectors */
12987 void icmAdd3(double out[3], double in1[3], double in2[3]) {
12988 out[0] = in1[0] + in2[0];
12989 out[1] = in1[1] + in2[1];
12990 out[2] = in1[2] + in2[2];
12991 }
12992
12993 /* Subtract two 3 vectors, out = in1 - in2 */
12994 void icmSub3(double out[3], double in1[3], double in2[3]) {
12995 out[0] = in1[0] - in2[0];
12996 out[1] = in1[1] - in2[1];
12997 out[2] = in1[2] - in2[2];
12998 }
12999
13000 /* - - - - - - - - - - - - - - - - - - - - - - - - */
13001
13002 /* Set a 3x3 matrix to unity */
13003 void icmSetUnity3x3(double mat[3][3]) {
13004 int i, j;
13005 for (j = 0; j < 3; j++) {
13006 for (i = 0; i < 3; i++) {
13007 if (i == j)
13008 mat[j][i] = 1.0;
13009 else
13010 mat[j][i] = 0.0;
13011 }
13012 }
13013
13014 }
13015
13016 /* Copy a 3x3 transform matrix */
13017 void icmCpy3x3(double dst[3][3], double src[3][3]) {
13018 int i, j;
13019
13020 for (j = 0; j < 3; j++) {
13021 for (i = 0; i < 3; i++)
13022 dst[j][i] = src[j][i];
13023 }
13024 }
13025
13026 /* Scale each element of a 3x3 transform matrix */
13027 void icmScale3x3(double dst[3][3], double src[3][3], double scale) {
13028 int i, j;
13029
13030 for (j = 0; j < 3; j++) {
13031 for (i = 0; i < 3; i++)
13032 dst[j][i] = src[j][i] * scale;
13033 }
13034 }
13035
13036 /* - - - - - - - - - - - - - - - - - - - - - - - - */
13037
13038 /*
13039
13040 mat in out
13041
13042 [ ] [] []
13043 [ ] * [] => []
13044 [ ] [] []
13045
13046 */
13047
13048 /* Multiply 3 array by 3x3 transform matrix */
13049 void icmMulBy3x3(double out[3], double mat[3][3], double in[3]) {
13050 double tt[3];
13051
13052 tt[0] = mat[0][0] * in[0] + mat[0][1] * in[1] + mat[0][2] * in[2];
13053 tt[1] = mat[1][0] * in[0] + mat[1][1] * in[1] + mat[1][2] * in[2];
13054 tt[2] = mat[2][0] * in[0] + mat[2][1] * in[1] + mat[2][2] * in[2];
13055
13056 out[0] = tt[0];
13057 out[1] = tt[1];
13058 out[2] = tt[2];
13059 }
13060
13061 /* - - - - - - - - - - - - - - - - - - - - - - - - */
13062 /* Add one 3x3 to another */
13063 /* dst = src1 + src2 */
13064 void icmAdd3x3(double dst[3][3], double src1[3][3], double src2[3][3]) {
13065 int i, j;
13066
13067 for (j = 0; j < 3; j++) {
13068 for (i = 0; i < 3; i++)
13069 dst[j][i] = src1[j][i] + src2[j][i];
13070 }
13071 }
13072
13073 /* - - - - - - - - - - - - - - - - - - - - - - - - */
13074 /* Tensor product. Multiply two 3 vectors to form a 3x3 matrix */
13075 /* src1[] forms the colums, and src2[] forms the rows in the result */
13076 void icmTensMul3(double dst[3][3], double src1[3], double src2[3]) {
13077 int i, j;
13078
13079 for (j = 0; j < 3; j++) {
13080 for (i = 0; i < 3; i++)
13081 dst[j][i] = src1[j] * src2[i];
13082 }
13083 }
13084
13085 /* - - - - - - - - - - - - - - - - - - - - - - - - */
13086
13087 /* Multiply one 3x3 with another */
13088 /* dst = src * dst */
13089 void icmMul3x3(double dst[3][3], double src[3][3]) {
13090 int i, j, k;
13091 double td[3][3]; /* Temporary dest */
13092
13093 for (j = 0; j < 3; j++) {
13094 for (i = 0; i < 3; i++) {
13095 double tt = 0.0;
13096 for (k = 0; k < 3; k++)
13097 tt += src[j][k] * dst[k][i];
13098 td[j][i] = tt;
13099 }
13100 }
13101
13102 /* Copy result out */
13103 for (j = 0; j < 3; j++)
13104 for (i = 0; i < 3; i++)
13105 dst[j][i] = td[j][i];
13106 }
13107
13108 /* Multiply one 3x3 with another #2 */
13109 /* dst = src1 * src2 */
13110 void icmMul3x3_2(double dst[3][3], double src1[3][3], double src2[3][3]) {
13111 int i, j, k;
13112 double td[3][3]; /* Temporary dest */
13113
13114 for (j = 0; j < 3; j++) {
13115 for (i = 0; i < 3; i++) {
13116 double tt = 0.0;
13117 for (k = 0; k < 3; k++)
13118 tt += src1[j][k] * src2[k][i];
13119 td[j][i] = tt;
13120 }
13121 }
13122
13123 /* Copy result out */
13124 for (j = 0; j < 3; j++)
13125 for (i = 0; i < 3; i++)
13126 dst[j][i] = td[j][i];
13127 }
13128
13129 /* - - - - - - - - - - - - - - - - - - - - - - - - */
13130 /*
13131 Matrix Inversion
13132 by Richard Carling
13133 from "Graphics Gems", Academic Press, 1990
13134 */
13135
13136 /*
13137 * adjoint( original_matrix, inverse_matrix )
13138 *
13139 * calculate the adjoint of a 3x3 matrix
13140 *
13141 * Let a denote the minor determinant of matrix A obtained by
13142 * ij
13143 *
13144 * deleting the ith row and jth column from A.
13145 *
13146 * i+j
13147 * Let b = (-1) a
13148 * ij ji
13149 *
13150 * The matrix B = (b ) is the adjoint of A
13151 * ij
13152 */
13153
13154 #define det2x2(a, b, c, d) (a * d - b * c)
13155
13156 static void adjoint(
13157 double out[3][3],
13158 double in[3][3]
13159 ) {
13160 double a1, a2, a3, b1, b2, b3, c1, c2, c3;
13161
13162 /* assign to individual variable names to aid */
13163 /* selecting correct values */
13164
13165 a1 = in[0][0]; b1 = in[0][1]; c1 = in[0][2];
13166 a2 = in[1][0]; b2 = in[1][1]; c2 = in[1][2];
13167 a3 = in[2][0]; b3 = in[2][1]; c3 = in[2][2];
13168
13169 /* row column labeling reversed since we transpose rows & columns */
13170
13171 out[0][0] = det2x2(b2, b3, c2, c3);
13172 out[1][0] = - det2x2(a2, a3, c2, c3);
13173 out[2][0] = det2x2(a2, a3, b2, b3);
13174
13175 out[0][1] = - det2x2(b1, b3, c1, c3);
13176 out[1][1] = det2x2(a1, a3, c1, c3);
13177 out[2][1] = - det2x2(a1, a3, b1, b3);
13178
13179 out[0][2] = det2x2(b1, b2, c1, c2);
13180 out[1][2] = - det2x2(a1, a2, c1, c2);
13181 out[2][2] = det2x2(a1, a2, b1, b2);
13182 }
13183
13184 /*
13185 * double = icmDet3x3( a1, a2, a3, b1, b2, b3, c1, c2, c3 )
13186 *
13187 * calculate the determinant of a 3x3 matrix
13188 * in the form
13189 *
13190 * | a1, b1, c1 |
13191 * | a2, b2, c2 |
13192 * | a3, b3, c3 |
13193 */
13194
13195 double icmDet3x3(double in[3][3]) {
13196 double a1, a2, a3, b1, b2, b3, c1, c2, c3;
13197 double ans;
13198
13199 a1 = in[0][0]; b1 = in[0][1]; c1 = in[0][2];
13200 a2 = in[1][0]; b2 = in[1][1]; c2 = in[1][2];
13201 a3 = in[2][0]; b3 = in[2][1]; c3 = in[2][2];
13202
13203 ans = a1 * det2x2(b2, b3, c2, c3)
13204 - b1 * det2x2(a2, a3, c2, c3)
13205 + c1 * det2x2(a2, a3, b2, b3);
13206 return ans;
13207 }
13208
13209 #define ICM_SMALL_NUMBER 1.e-8
13210 /*
13211 * inverse( original_matrix, inverse_matrix )
13212 *
13213 * calculate the inverse of a 4x4 matrix
13214 *
13215 * -1
13216 * A = ___1__ adjoint A
13217 * det A
13218 */
13219
13220 /* Return non-zero if not invertable */
13221 int icmInverse3x3(
13222 double out[3][3],
13223 double in[3][3]
13224 ) {
13225 int i, j;
13226 double det;
13227
13228 /* calculate the 3x3 determinant
13229 * if the determinant is zero,
13230 * then the inverse matrix is not unique.
13231 */
13232 det = icmDet3x3(in);
13233
13234 if ( fabs(det) < ICM_SMALL_NUMBER)
13235 return 1;
13236
13237 /* calculate the adjoint matrix */
13238 adjoint(out, in);
13239
13240 /* scale the adjoint matrix to get the inverse */
13241 for (i = 0; i < 3; i++)
13242 for(j = 0; j < 3; j++)
13243 out[i][j] /= det;
13244 return 0;
13245 }
13246
13247 /* - - - - - - - - - - - - - - - - - - - - - - - - */
13248 /* Transpose a 3x3 matrix */
13249 void icmTranspose3x3(double out[3][3], double in[3][3]) {
13250 int i, j;
13251 if (out != in) {
13252 for (i = 0; i < 3; i++)
13253 for (j = 0; j < 3; j++)
13254 out[i][j] = in[j][i];
13255 } else {
13256 double tt[3][3];
13257 for (i = 0; i < 3; i++)
13258 for (j = 0; j < 3; j++)
13259 tt[i][j] = in[j][i];
13260 for (i = 0; i < 3; i++)
13261 for (j = 0; j < 3; j++)
13262 out[i][j] = tt[i][j];
13263 }
13264 }
13265
13266 /* - - - - - - - - - - - - - - - - - - - - - - - - */
13267 /* Compute the dot product of two 3 vectors */
13268 double icmDot3(double in1[3], double in2[3]) {
13269 return in1[0] * in2[0] + in1[1] * in2[1] + in1[2] * in2[2];
13270 }
13271
13272 /* - - - - - - - - - - - - - - - - - - - - - - - - */
13273 /* Compute the cross product of two 3D vectors, out = in1 x in2 */
13274 void icmCross3(double out[3], double in1[3], double in2[3]) {
13275 double tt[3];
13276 tt[0] = (in1[1] * in2[2]) - (in1[2] * in2[1]);
13277 tt[1] = (in1[2] * in2[0]) - (in1[0] * in2[2]);
13278 tt[2] = (in1[0] * in2[1]) - (in1[1] * in2[0]);
13279 out[0] = tt[0];
13280 out[1] = tt[1];
13281 out[2] = tt[2];
13282 }
13283
13284 /* - - - - - - - - - - - - - - - - - - - - - - - - */
13285 /* Compute the norm (length) squared of a 3 vector */
13286 double icmNorm3sq(double in[3]) {
13287 return in[0] * in[0] + in[1] * in[1] + in[2] * in[2];
13288 }
13289
13290 /* Compute the norm (length) of a 3 vector */
13291 double icmNorm3(double in[3]) {
13292 return sqrt(in[0] * in[0] + in[1] * in[1] + in[2] * in[2]);
13293 }
13294
13295 /* Scale a 3 vector by the given ratio */
13296 void icmScale3(double out[3], double in[3], double rat) {
13297 out[0] = in[0] * rat;
13298 out[1] = in[1] * rat;
13299 out[2] = in[2] * rat;
13300 }
13301
13302 /* Compute a blend between in0 and in1 */
13303 void icmBlend3(double out[3], double in0[3], double in1[3], double bf) {
13304 out[0] = (1.0 - bf) * in0[0] + bf * in1[0];
13305 out[1] = (1.0 - bf) * in0[1] + bf * in1[1];
13306 out[2] = (1.0 - bf) * in0[2] + bf * in1[2];
13307 }
13308
13309 /* Normalise a 3 vector to the given length. Return nz if not normalisable */
13310 int icmNormalize3(double out[3], double in[3], double len) {
13311 double tt = sqrt(in[0] * in[0] + in[1] * in[1] + in[2] * in[2]);
13312
13313 if (tt < ICM_SMALL_NUMBER)
13314 return 1;
13315 tt = len/tt;
13316 out[0] = in[0] * tt;
13317 out[1] = in[1] * tt;
13318 out[2] = in[2] * tt;
13319 return 0;
13320 }
13321
13322 /* Compute the norm (length) squared of a vector define by two points */
13323 double icmNorm33sq(double in1[3], double in0[3]) {
13324 int j;
13325 double rv;
13326 for (rv = 0.0, j = 0; j < 3; j++) {
13327 double tt = in1[j] - in0[j];
13328 rv += tt * tt;
13329 }
13330 return rv;
13331 }
13332
13333 /* Compute the norm (length) of a vector define by two points */
13334 double icmNorm33(double in1[3], double in0[3]) {
13335 int j;
13336 double rv;
13337 for (rv = 0.0, j = 0; j < 3; j++) {
13338 double tt = in1[j] - in0[j];
13339 rv += tt * tt;
13340 }
13341 return sqrt(rv);
13342 }
13343
13344 /* Scale a two point vector by the given ratio. in0[] is the origin */
13345 void icmScale33(double out[3], double in1[3], double in0[3], double rat) {
13346 out[0] = in0[0] + (in1[0] - in0[0]) * rat;
13347 out[1] = in0[1] + (in1[1] - in0[1]) * rat;
13348 out[2] = in0[2] + (in1[2] - in0[2]) * rat;
13349 }
13350
13351 /* Normalise a two point vector to the given length. */
13352 /* The new location of in1[] is returned in out[]. */
13353 /* Return nz if not normalisable */
13354 int icmNormalize33(double out[3], double in1[3], double in0[3], double len) {
13355 int j;
13356 double vl;
13357
13358 for (vl = 0.0, j = 0; j < 3; j++) {
13359 double tt = in1[j] - in0[j];
13360 vl += tt * tt;
13361 }
13362 vl = sqrt(vl);
13363 if (vl < ICM_SMALL_NUMBER)
13364 return 1;
13365
13366 vl = len/vl;
13367 for (j = 0; j < 3; j++) {
13368 out[j] = in0[j] + (in1[j] - in0[j]) * vl;
13369 }
13370 return 0;
13371 }
13372
13373 /* - - - - - - - - - - - - - - - - - - - - - - - - */
13374 /* Given two 3D points, create a matrix that rotates */
13375 /* and scales one onto the other about the origin 0,0,0. */
13376 /* The maths is from page 52 of Tomas Moller and Eric Haines "Real-Time Rendering". */
13377 /* s is source vector, t is target vector. */
13378 /* Usage of icmRotMat: */
13379 /* t[0] == mat[0][0] * s[0] + mat[0][1] * s[1] + mat[0][2] * s[2]; */
13380 /* t[1] == mat[1][0] * s[0] + mat[1][1] * s[1] + mat[1][2] * s[2]; */
13381 /* t[2] == mat[2][0] * s[0] + mat[2][1] * s[1] + mat[2][2] * s[2]; */
13382 /* i.e. use icmMulBy3x3 */
13383 void icmRotMat(double m[3][3], double s[3], double t[3]) {
13384 double sl, tl, sn[3], tn[3];
13385 double v[3]; /* Cross product */
13386 double e; /* Dot product */
13387 double h; /* 1-e/Cross product dot squared */
13388
13389 /* Normalise input vectors */
13390 /* The rotation will be about 0,0,0 */
13391 sl = sqrt(s[0] * s[0] + s[1] * s[1] + s[2] * s[2]);
13392 tl = sqrt(t[0] * t[0] + t[1] * t[1] + t[2] * t[2]);
13393
13394 if (sl < 1e-12 || tl < 1e-12) { /* Hmm. Do nothing */
13395 m[0][0] = 1.0;
13396 m[0][1] = 0.0;
13397 m[0][2] = 0.0;
13398 m[1][0] = 0.0;
13399 m[1][1] = 1.0;
13400 m[1][2] = 0.0;
13401 m[2][0] = 0.0;
13402 m[2][1] = 0.0;
13403 m[2][2] = 1.0;
13404 return;
13405 }
13406
13407 sn[0] = s[0]/sl; sn[1] = s[1]/sl; sn[2] = s[2]/sl;
13408 tn[0] = t[0]/tl; tn[1] = t[1]/tl; tn[2] = t[2]/tl;
13409
13410 /* Compute the cross product */
13411 v[0] = (sn[1] * tn[2]) - (sn[2] * tn[1]);
13412 v[1] = (sn[2] * tn[0]) - (sn[0] * tn[2]);
13413 v[2] = (sn[0] * tn[1]) - (sn[1] * tn[0]);
13414
13415 /* Compute the dot product */
13416 e = sn[0] * tn[0] + sn[1] * tn[1] + sn[2] * tn[2];
13417
13418 /* Cross product dot squared */
13419 h = v[0] * v[0] + v[1] * v[1] + v[2] * v[2];
13420
13421 /* If the two input vectors are close to being parallel, */
13422 /* then h will be close to zero. */
13423 if (fabs(h) < 1e-12) {
13424 m[0][0] = tl/sl;
13425 m[0][1] = 0.0;
13426 m[0][2] = 0.0;
13427 m[1][0] = 0.0;
13428 m[1][1] = tl/sl;
13429 m[1][2] = 0.0;
13430 m[2][0] = 0.0;
13431 m[2][1] = 0.0;
13432 m[2][2] = tl/sl;
13433 } else {
13434 /* 1-e/Cross product dot squared */
13435 h = (1.0 - e) / h;
13436
13437 m[0][0] = tl/sl * (e + h * v[0] * v[0]);
13438 m[0][1] = tl/sl * (h * v[0] * v[1] - v[2]);
13439 m[0][2] = tl/sl * (h * v[0] * v[2] + v[1]);
13440 m[1][0] = tl/sl * (h * v[0] * v[1] + v[2]);
13441 m[1][1] = tl/sl * (e + h * v[1] * v[1]);
13442 m[1][2] = tl/sl * (h * v[1] * v[2] - v[0]);
13443 m[2][0] = tl/sl * (h * v[0] * v[2] - v[1]);
13444 m[2][1] = tl/sl * (h * v[1] * v[2] + v[0]);
13445 m[2][2] = tl/sl * (e + h * v[2] * v[2]);
13446 }
13447 }
13448
13449 /* - - - - - - - - - - - - - - - - - - - - - - - - */
13450 /* Multiply 2 array by 2x2 transform matrix */
13451 void icmMulBy2x2(double out[2], double mat[2][2], double in[2]) {
13452 double tt[2];
13453
13454 tt[0] = mat[0][0] * in[0] + mat[0][1] * in[1];
13455 tt[1] = mat[1][0] * in[0] + mat[1][1] * in[1];
13456
13457 out[0] = tt[0];
13458 out[1] = tt[1];
13459 }
13460
13461 /* - - - - - - - - - - - - - - - - - - - - - - - - */
13462
13463 /* Copy a 3x4 transform matrix */
13464 void icmCpy3x4(double dst[3][4], double src[3][4]) {
13465 int i, j;
13466
13467 for (j = 0; j < 3; j++) {
13468 for (i = 0; i < 4; i++)
13469 dst[j][i] = src[j][i];
13470 }
13471 }
13472
13473 /* - - - - - - - - - - - - - - - - - - - - - - - - */
13474
13475 /* Multiply 3 array by 3x4 transform matrix */
13476 void icmMul3By3x4(double out[3], double mat[3][4], double in[3]) {
13477 double tt[3];
13478
13479 tt[0] = mat[0][0] * in[0] + mat[0][1] * in[1] + mat[0][2] * in[2] + mat[0][3];
13480 tt[1] = mat[1][0] * in[0] + mat[1][1] * in[1] + mat[1][2] * in[2] + mat[1][3];
13481 tt[2] = mat[2][0] * in[0] + mat[2][1] * in[1] + mat[2][2] * in[2] + mat[2][3];
13482
13483 out[0] = tt[0];
13484 out[1] = tt[1];
13485 out[2] = tt[2];
13486 }
13487
13488 /* - - - - - - - - - - - - - - - - - - - - - - - - */
13489 /* Given two 3D vectors, create a matrix that translates, */
13490 /* rotates and scales one onto the other. */
13491 /* The maths is from page 52 of Tomas Moller and Eric Haines */
13492 /* "Real-Time Rendering". */
13493 /* s0 -> s1 is source vector, t0 -> t1 is target vector. */
13494 /* Usage of icmRotMat: */
13495 /* t[0] == mat[0][0] * s[0] + mat[0][1] * s[1] + mat[0][2] * s[2] + mat[0][3]; */
13496 /* t[1] == mat[1][0] * s[0] + mat[1][1] * s[1] + mat[1][2] * s[2] + mat[1][3]; */
13497 /* t[2] == mat[2][0] * s[0] + mat[2][1] * s[1] + mat[2][2] * s[2] + mat[2][3]; */
13498 /* i.e. use icmMul3By3x4 */
13499 void icmVecRotMat(double m[3][4], double s1[3], double s0[3], double t1[3], double t0[3]) {
13500 int i, j;
13501 double ss[3], tt[3], rr[3][3];
13502
13503 /* Create the rotation matrix: */
13504 for (i = 0; i < 3; i++) {
13505 ss[i] = s1[i] - s0[i];
13506 tt[i] = t1[i] - t0[i];
13507 }
13508 icmRotMat(rr, ss, tt);
13509
13510 /* Create rotated version of s0: */
13511 icmMulBy3x3(ss, rr, s0);
13512
13513 /* Create 4x4 matrix */
13514 for (j = 0; j < 3; j++) {
13515 for (i = 0; i < 4; i++) {
13516 if (i < 3 && j < 3)
13517 m[j][i] = rr[j][i];
13518 else if (i == 3 && j < 3)
13519 m[j][i] = t0[j] - ss[j];
13520 else if (i == j)
13521 m[j][i] = 1.0;
13522 else
13523 m[j][i] = 0.0;
13524 }
13525 }
13526 }
13527
13528 /* - - - - - - - - - - - - - - - - - - - - - - - - */
13529 /* Compute the 3D intersection of a vector and a plane */
13530 /* return nz if there is no intersection */
13531 int icmVecPlaneIsect(
13532 double isect[3], /* return intersection point */
13533 double pl_const, /* Plane equation constant */
13534 double pl_norm[3], /* Plane normal vector */
13535 double ve_1[3], /* Point on line */
13536 double ve_0[3] /* Second point on line */
13537 ) {
13538 double den; /* denominator */
13539 double rv; /* Vector parameter value */
13540 double vvec[3]; /* Vector vector */
13541 double ival[3]; /* Intersection value */
13542
13543 /* Compute vector between the two points */
13544 vvec[0] = ve_1[0] - ve_0[0];
13545 vvec[1] = ve_1[1] - ve_0[1];
13546 vvec[2] = ve_1[2] - ve_0[2];
13547
13548 /* Compute the denominator */
13549 den = pl_norm[0] * vvec[0] + pl_norm[1] * vvec[1] + pl_norm[2] * vvec[2];
13550
13551 /* Too small to intersect ? */
13552 if (fabs(den) < 1e-12) {
13553 return 1;
13554 }
13555
13556 /* Compute the parameterized intersction point */
13557 rv = -(pl_norm[0] * ve_0[0] + pl_norm[1] * ve_0[1] + pl_norm[2] * ve_0[2] + pl_const)/den;
13558
13559 /* Compute the actual intersection point */
13560 isect[0] = ve_0[0] + rv * vvec[0];
13561 isect[1] = ve_0[1] + rv * vvec[1];
13562 isect[2] = ve_0[2] + rv * vvec[2];
13563
13564 return 0;
13565 }
13566
13567 /* - - - - - - - - - - - - - - - - - - - - - - - - */
13568 /* Compute the closest points between two lines a and b. */
13569 /* Return closest points and parameter values if not NULL. */
13570 /* Return nz if they are paralel. */
13571 /* The maths is from page 338 of Tomas Moller and Eric Haines "Real-Time Rendering". */
13572 int icmLineLineClosest(double ca[3], double cb[3], double *pa, double * pb,
13573 double la0[3], double la1[3], double lb0[3], double lb1[3]) {
13574 double va[3], vb[3];
13575 double vvab[3], vvabns; /* Cross product of va and vb and its norm squared */
13576 double vba0[3]; /* lb0 - la0 */
13577 double tt[3];
13578 double a, b; /* Parameter values */
13579
13580 icmSub3(va, la1, la0);
13581 icmSub3(vb, lb1, lb0);
13582 icmCross3(vvab, va, vb);
13583 vvabns = icmNorm3sq(vvab);
13584
13585 if (vvabns < 1e-12)
13586 return 1;
13587
13588 icmSub3(vba0, lb0, la0);
13589 icmCross3(tt, vba0, vb);
13590 a = icmDot3(tt, vvab) / vvabns;
13591
13592 icmCross3(tt, vba0, va);
13593 b = icmDot3(tt, vvab) / vvabns;
13594
13595 if (pa != NULL)
13596 *pa = a;
13597
13598 if (pb != NULL)
13599 *pb = b;
13600
13601 if (ca != NULL) {
13602 ca[0] = la0[0] + a * va[0];
13603 ca[1] = la0[1] + a * va[1];
13604 ca[2] = la0[2] + a * va[2];
13605 }
13606
13607 if (cb != NULL) {
13608 cb[0] = lb0[0] + b * vb[0];
13609 cb[1] = lb0[1] + b * vb[1];
13610 cb[2] = lb0[2] + b * vb[2];
13611 }
13612
13613 #ifdef NEVER /* Verify */
13614 {
13615 double vab[3]; /* Vector from ca to cb */
13616
13617 vab[0] = lb0[0] + b * vb[0] - la0[0] - a * va[0];
13618 vab[1] = lb0[1] + b * vb[1] - la0[1] - a * va[1];
13619 vab[2] = lb0[2] + b * vb[2] - la0[2] - a * va[2];
13620
13621 if (icmDot3(va, vab) > 1e-6
13622 || icmDot3(vb, vab) > 1e-6)
13623 warning("icmLineLineClosest verify failed\n");
13624 }
13625 #endif
13626
13627 return 0;
13628 }
13629
13630 /* - - - - - - - - - - - - - - - - - - - - - - - - */
13631 /* Given 3 3D points, compute a plane equation. */
13632 /* The normal will be right handed given the order of the points */
13633 /* The plane equation will be the 3 normal components and the constant. */
13634 /* Return nz if any points are cooincident or co-linear */
13635 int icmPlaneEqn3(double eq[4], double p0[3], double p1[3], double p2[3]) {
13636 double ll, v1[3], v2[3];
13637
13638 /* Compute vectors along edges */
13639 v2[0] = p1[0] - p0[0];
13640 v2[1] = p1[1] - p0[1];
13641 v2[2] = p1[2] - p0[2];
13642
13643 v1[0] = p2[0] - p0[0];
13644 v1[1] = p2[1] - p0[1];
13645 v1[2] = p2[2] - p0[2];
13646
13647 /* Compute cross products v1 x v2, which will be the normal */
13648 eq[0] = v1[1] * v2[2] - v1[2] * v2[1];
13649 eq[1] = v1[2] * v2[0] - v1[0] * v2[2];
13650 eq[2] = v1[0] * v2[1] - v1[1] * v2[0];
13651
13652 /* Normalise the equation */
13653 ll = sqrt(eq[0] * eq[0] + eq[1] * eq[1] + eq[2] * eq[2]);
13654 if (ll < 1e-10) {
13655 return 1;
13656 }
13657 eq[0] /= ll;
13658 eq[1] /= ll;
13659 eq[2] /= ll;
13660
13661 /* Compute the plane equation constant */
13662 eq[3] = - (eq[0] * p0[0])
13663 - (eq[1] * p0[1])
13664 - (eq[2] * p0[2]);
13665
13666 return 0;
13667 }
13668
13669 /* Given a 3D point and a plane equation, return the signed */
13670 /* distance from the plane */
13671 double icmPlaneDist3(double eq[4], double p[3]) {
13672 double rv;
13673
13674 rv = eq[0] * p[0]
13675 + eq[1] * p[1]
13676 + eq[2] * p[2]
13677 + eq[3];
13678
13679 return rv;
13680 }
13681
13682 /* - - - - - - - - - - - - - - - - - - - - - - - - */
13683 /* CIE Y (range 0 .. 1) to perceptual CIE 1976 L* (range 0 .. 100) */
13684 double
13685 icmY2L(double val) {
13686 if (val > 0.008856451586)
13687 val = pow(val,1.0/3.0);
13688 else
13689 val = 7.787036979 * val + 16.0/116.0;
13690
13691 val = (116.0 * val - 16.0);
13692 return val;
13693 }
13694
13695 /* Perceptual CIE 1976 L* (range 0 .. 100) to CIE Y (range 0 .. 1) */
13696 double
13697 icmL2Y(double val) {
13698 val = (val + 16.0)/116.0;
13699
13700 if (val > 24.0/116.0)
13701 val = pow(val,3.0);
13702 else
13703 val = (val - 16.0/116.0)/7.787036979;
13704 return val;
13705 }
13706
13707 /* CIE XYZ to perceptual CIE 1976 L*a*b* */
13708 void
13709 icmXYZ2Lab(icmXYZNumber *w, double *out, double *in) {
13710 double X = in[0], Y = in[1], Z = in[2];
13711 double x,y,z,fx,fy,fz;
13712
13713 x = X/w->X;
13714 y = Y/w->Y;
13715 z = Z/w->Z;
13716
13717 if (x > 0.008856451586)
13718 fx = pow(x,1.0/3.0);
13719 else
13720 fx = 7.787036979 * x + 16.0/116.0;
13721
13722 if (y > 0.008856451586)
13723 fy = pow(y,1.0/3.0);
13724 else
13725 fy = 7.787036979 * y + 16.0/116.0;
13726
13727 if (z > 0.008856451586)
13728 fz = pow(z,1.0/3.0);
13729 else
13730 fz = 7.787036979 * z + 16.0/116.0;
13731
13732 out[0] = 116.0 * fy - 16.0;
13733 out[1] = 500.0 * (fx - fy);
13734 out[2] = 200.0 * (fy - fz);
13735 }
13736
13737 /* Perceptual CIE 1976 L*a*b* to CIE XYZ */
13738 void
13739 icmLab2XYZ(icmXYZNumber *w, double *out, double *in) {
13740 double L = in[0], a = in[1], b = in[2];
13741 double x,y,z,fx,fy,fz;
13742
13743 fy = (L + 16.0)/116.0;
13744 fx = a/500.0 + fy;
13745 fz = fy - b/200.0;
13746
13747 if (fy > 24.0/116.0)
13748 y = pow(fy,3.0);
13749 else
13750 y = (fy - 16.0/116.0)/7.787036979;
13751
13752 if (fx > 24.0/116.0)
13753 x = pow(fx,3.0);
13754 else
13755 x = (fx - 16.0/116.0)/7.787036979;
13756
13757 if (fz > 24.0/116.0)
13758 z = pow(fz,3.0);
13759 else
13760 z = (fz - 16.0/116.0)/7.787036979;
13761
13762 out[0] = x * w->X;
13763 out[1] = y * w->Y;
13764 out[2] = z * w->Z;
13765 }
13766
13767
13768 /* LCh to Lab */
13769 void icmLCh2Lab(double *out, double *in) {
13770 double C, h;
13771
13772 C = in[1];
13773 h = 3.14159265359/180.0 * in[2];
13774
13775 out[0] = in[0];
13776 out[1] = C * cos(h);
13777 out[2] = C * sin(h);
13778 }
13779
13780 /* Lab to LCh */
13781 void icmLab2LCh(double *out, double *in) {
13782 double C, h;
13783
13784 C = sqrt(in[1] * in[1] + in[2] * in[2]);
13785
13786 h = (180.0/3.14159265359) * atan2(in[2], in[1]);
13787 h = (h < 0.0) ? h + 360.0 : h;
13788
13789 out[0] = in[0];
13790 out[1] = C;
13791 out[2] = h;
13792 }
13793
13794 /* XYZ to Yxy */
13795 extern ICCLIB_API void icmXYZ2Yxy(double *out, double *in) {
13796 double sum = in[0] + in[1] + in[2];
13797 double Y, x, y;
13798
13799 if (sum < 1e-9) {
13800 Y = 0.0;
13801 y = 0.333333333;
13802 x = 0.333333333;
13803 } else {
13804 Y = in[1];
13805 x = in[0]/sum;
13806 y = in[1]/sum;
13807 }
13808 out[0] = Y;
13809 out[1] = x;
13810 out[2] = y;
13811 }
13812
13813 /* Yxy to XYZ */
13814 extern ICCLIB_API void icmYxy2XYZ(double *out, double *in) {
13815 double Y = in[0];
13816 double x = in[1];
13817 double y = in[2];
13818 double z = 1.0 - x - y;
13819 double sum;
13820 if (y < 1e-9) {
13821 out[0] = out[1] = out[2] = 0.0;
13822 } else {
13823 sum = Y/y;
13824 out[0] = x * sum;
13825 out[1] = Y;
13826 out[2] = z * sum;
13827 }
13828 }
13829
13830
13831 /* CIE XYZ to perceptual CIE 1976 L*u*v* */
13832 extern ICCLIB_API void icmXYZ2Luv(icmXYZNumber *w, double *out, double *in) {
13833 double X = in[0], Y = in[1], Z = in[2];
13834 double un, vn, u, v, fl, fu, fv;
13835
13836 un = (4.0 * w->X) / (w->X + 15.0 * w->Y + 3.0 * w->Z);
13837 vn = (9.0 * w->Y) / (w->X + 15.0 * w->Y + 3.0 * w->Z);
13838 u = (4.0 * X) / (X + 15.0 * Y + 3.0 * Z);
13839 v = (9.0 * Y) / (X + 15.0 * Y + 3.0 * Z);
13840
13841 Y /= w->Y;
13842
13843 if (Y > 0.008856451586)
13844 fl = pow(Y,1.0/3.0);
13845 else
13846 fl = 7.787036979 * Y + 16.0/116.0;
13847
13848 fu = u - un;
13849 fv = v - vn;
13850
13851 out[0] = 116.0 * fl - 16.0;
13852 out[1] = 13.0 * out[0] * fu;
13853 out[2] = 13.0 * out[0] * fv;
13854 }
13855
13856 /* Perceptual CIE 1976 L*u*v* to CIE XYZ */
13857 extern ICCLIB_API void icmLuv2XYZ(icmXYZNumber *w, double *out, double *in) {
13858 double un, vn, u, v, fl, fu, fv, sum, X, Y, Z;
13859
13860 fl = (in[0] + 16.0)/116.0;
13861 fu = in[1] / (13.0 * in[0]);
13862 fv = in[2] / (13.0 * in[0]);
13863
13864 un = (4.0 * w->X) / (w->X + 15.0 * w->Y + 3.0 * w->Z);
13865 vn = (9.0 * w->Y) / (w->X + 15.0 * w->Y + 3.0 * w->Z);
13866
13867 u = fu + un;
13868 v = fv + vn;
13869
13870 if (fl > 24.0/116.0)
13871 Y = pow(fl,3.0);
13872 else
13873 Y = (fl - 16.0/116.0)/7.787036979;
13874 Y *= w->Y;
13875
13876 sum = (9.0 * Y)/v;
13877 X = (u * sum)/4.0;
13878 Z = (sum - X - 15.0 * Y)/3.0;
13879
13880 out[0] = X;
13881 out[1] = Y;
13882 out[2] = Z;
13883 }
13884
13885 /* NOTE :- none of the following seven have been protected */
13886 /* against arithmmetic issues (ie. for black) */
13887
13888 /* CIE XYZ to perceptual CIE 1976 UCS diagram Yu'v'*/
13889 /* (Yu'v' is a better chromaticity space than Yxy) */
13890 extern ICCLIB_API void icmXYZ21976UCS(double *out, double *in) {
13891 double X = in[0], Y = in[1], Z = in[2];
13892 double den, u, v;
13893
13894 den = (X + 15.0 * Y + 3.0 * Z);
13895 u = (4.0 * X) / den;
13896 v = (9.0 * Y) / den;
13897
13898 out[0] = Y;
13899 out[1] = u;
13900 out[2] = v;
13901 }
13902
13903 /* Perceptual CIE 1976 UCS diagram Yu'v' to CIE XYZ */
13904 extern ICCLIB_API void icm1976UCS2XYZ(double *out, double *in) {
13905 double u, v, fl, fu, fv, sum, X, Y, Z;
13906
13907 Y = in[0];
13908 u = in[1];
13909 v = in[2];
13910
13911 X = ((9.0 * u * Y)/(4.0 * v));
13912 Z = -(((20.0 * v + 3.0 * u - 12.0) * Y)/(4.0 * v));
13913
13914 out[0] = X;
13915 out[1] = Y;
13916 out[2] = Z;
13917 }
13918
13919 /* CIE XYZ to perceptual CIE 1960 UCS */
13920 /* (This was obsoleted by the 1976UCS, but is still used */
13921 /* in computing color temperatures.) */
13922 extern ICCLIB_API void icmXYZ21960UCS(double *out, double *in) {
13923 double X = in[0], Y = in[1], Z = in[2];
13924 double u, v;
13925
13926 u = (4.0 * X) / (X + 15.0 * Y + 3.0 * Z);
13927 v = (6.0 * Y) / (X + 15.0 * Y + 3.0 * Z);
13928
13929 out[0] = Y;
13930 out[1] = u;
13931 out[2] = v;
13932 }
13933
13934 /* Perceptual CIE 1960 UCS to CIE XYZ */
13935 extern ICCLIB_API void icm1960UCS2XYZ(double *out, double *in) {
13936 double u, v, fl, fu, fv, sum, X, Y, Z;
13937
13938 Y = in[0];
13939 u = in[1];
13940 v = in[2];
13941
13942 X = ((3.0 * u * Y)/(2.0 * v));
13943 Z = -(((10.0 * v + u - 4.0) * Y)/(2.0 * v));
13944
13945 out[0] = X;
13946 out[1] = Y;
13947 out[2] = Z;
13948 }
13949
13950 /* CIE XYZ to perceptual CIE 1964 WUV (U*V*W*) */
13951 /* (This is obsolete but still used in computing CRI) */
13952 extern ICCLIB_API void icmXYZ21964WUV(icmXYZNumber *w, double *out, double *in) {
13953 double W, U, V;
13954 double wucs[3];
13955 double iucs[3];
13956
13957 icmXYZ2Ary(wucs, *w);
13958 icmXYZ21960UCS(wucs, wucs);
13959 icmXYZ21960UCS(iucs, in);
13960
13961 W = 25.0 * pow(iucs[0] * 100.0/wucs[0], 1.0/3.0) - 17.0;
13962 U = 13.0 * W * (iucs[1] - wucs[1]);
13963 V = 13.0 * W * (iucs[2] - wucs[2]);
13964
13965 out[0] = W;
13966 out[1] = U;
13967 out[2] = V;
13968 }
13969
13970 /* Perceptual CIE 1964 WUV (U*V*W*) to CIE XYZ */
13971 extern ICCLIB_API void icm1964WUV2XYZ(icmXYZNumber *w, double *out, double *in) {
13972 double W, U, V;
13973 double wucs[3];
13974 double iucs[3];
13975
13976 icmXYZ2Ary(wucs, *w);
13977 icmXYZ21960UCS(wucs, wucs);
13978
13979 W = in[0];
13980 U = in[1];
13981 V = in[2];
13982
13983 iucs[0] = pow((W + 17.0)/25.0, 3.0) * wucs[0]/100.0;
13984 iucs[1] = U / (13.0 * W) + wucs[1];
13985 iucs[2] = V / (13.0 * W) + wucs[2];
13986
13987 icm1960UCS2XYZ(out, iucs);
13988 }
13989
13990 /* CIE CIE1960 UCS to perceptual CIE 1964 WUV (U*V*W*) */
13991 extern ICCLIB_API void icm1960UCS21964WUV(icmXYZNumber *w, double *out, double *in) {
13992 double W, U, V;
13993 double wucs[3];
13994
13995 icmXYZ2Ary(wucs, *w);
13996 icmXYZ21960UCS(wucs, wucs);
13997
13998 W = 25.0 * pow(in[0] * 100.0/wucs[0], 1.0/3.0) - 17.0;
13999 U = 13.0 * W * (in[1] - wucs[1]);
14000 V = 13.0 * W * (in[2] - wucs[2]);
14001
14002 out[0] = W;
14003 out[1] = U;
14004 out[2] = V;
14005 }
14006
14007 /* - - - - - - - - - - - - - - - - - - - - - - - - */
14008
14009 /* available D50 Illuminant */
14010 icmXYZNumber icmD50 = { /* Profile illuminant - D50 */
14011 0.9642, 1.0000, 0.8249
14012 };
14013
14014 icmXYZNumber icmD50_100 = { /* Profile illuminant - D50, scaled to 100 */
14015 96.42, 100.00, 82.49
14016 };
14017
14018 double icmD50_ary3[3] = { /* Profile illuminant - D50 */
14019 0.9642, 1.0000, 0.8249
14020 };
14021
14022 double icmD50_100_ary3[3] = { /* Profile illuminant - D50, scaled to 100 */
14023 96.42, 100.00, 82.49
14024 };
14025
14026 /* available D65 Illuminant */
14027 icmXYZNumber icmD65 = { /* Profile illuminant - D65 */
14028 0.9505, 1.0000, 1.0890
14029 };
14030
14031 icmXYZNumber icmD65_100 = { /* Profile illuminant - D65, scaled to 100 */
14032 95.05, 100.00, 108.90
14033 };
14034
14035 double icmD65_ary3[3] = { /* Profile illuminant - D65 */
14036 0.9505, 1.0000, 1.0890
14037 };
14038
14039 double icmD65_100_ary3[3] = { /* Profile illuminant - D65, scaled to 100 */
14040 95.05, 100.00, 108.90
14041 };
14042
14043 /* Default black point */
14044 icmXYZNumber icmBlack = {
14045 0.0000, 0.0000, 0.0000
14046 };
14047
14048 /* Return the normal Delta E given two Lab values */
14049 double icmLabDE(double *Lab0, double *Lab1) {
14050 double rv = 0.0, tt;
14051
14052 tt = Lab0[0] - Lab1[0];
14053 rv += tt * tt;
14054 tt = Lab0[1] - Lab1[1];
14055 rv += tt * tt;
14056 tt = Lab0[2] - Lab1[2];
14057 rv += tt * tt;
14058
14059 return sqrt(rv);
14060 }
14061
14062 /* Return the normal Delta E squared, given two Lab values */
14063 double icmLabDEsq(double *Lab0, double *Lab1) {
14064 double rv = 0.0, tt;
14065
14066 tt = Lab0[0] - Lab1[0];
14067 rv += tt * tt;
14068 tt = Lab0[1] - Lab1[1];
14069 rv += tt * tt;
14070 tt = Lab0[2] - Lab1[2];
14071 rv += tt * tt;
14072
14073 return rv;
14074 }
14075
14076 /* Return the normal Delta E given two XYZ values */
14077 extern ICCLIB_API double icmXYZLabDE(icmXYZNumber *w, double *in0, double *in1) {
14078 double lab0[3], lab1[3], rv;
14079
14080 icmXYZ2Lab(w, lab0, in0);
14081 icmXYZ2Lab(w, lab1, in1);
14082 rv = icmLabDE(lab0, lab1);
14083 return rv;
14084 }
14085
14086 /* (Note that CIE94 can give odd results for very large delta E's, */
14087 /* when one of the two points is near the neutral axis: */
14088 /* ie DE(A,B + del) != DE(A,B) + DE(del) */
14089 #ifdef NEVER
14090 {
14091 double w1[3] = { 99.996101, -0.058417, -0.010557 };
14092 double c1[3] = { 60.267956, 98.845863, -61.163277 };
14093 double w2[3] = { 100.014977, -0.138339, 0.089744 };
14094 double c2[3] = { 60.294464, 98.117104, -60.843159 };
14095
14096 printf("DE 1 = %f, 2 = %f\n", icmLabDE(c1, w1), icmLabDE(c2, w2));
14097 printf("DE94 1 = %f, 2 = %f\n", icmCIE94(c1, w1), icmCIE94(c2, w2));
14098 }
14099 #endif
14100
14101
14102 /* Return the CIE94 Delta E color difference measure, squared */
14103 double icmCIE94sq(double Lab0[3], double Lab1[3]) {
14104 double desq, dhsq;
14105 double dlsq, dcsq;
14106 double c12;
14107
14108 {
14109 double dl, da, db;
14110 dl = Lab0[0] - Lab1[0];
14111 dlsq = dl * dl; /* dl squared */
14112 da = Lab0[1] - Lab1[1];
14113 db = Lab0[2] - Lab1[2];
14114
14115 /* Compute normal Lab delta E squared */
14116 desq = dlsq + da * da + db * db;
14117 }
14118
14119 {
14120 double c1, c2, dc;
14121
14122 /* Compute chromanance for the two colors */
14123 c1 = sqrt(Lab0[1] * Lab0[1] + Lab0[2] * Lab0[2]);
14124 c2 = sqrt(Lab1[1] * Lab1[1] + Lab1[2] * Lab1[2]);
14125 c12 = sqrt(c1 * c2); /* Symetric chromanance */
14126
14127 /* delta chromanance squared */
14128 dc = c2 - c1;
14129 dcsq = dc * dc;
14130 }
14131
14132 /* Compute delta hue squared */
14133 if ((dhsq = desq - dlsq - dcsq) < 0.0)
14134 dhsq = 0.0;
14135 {
14136 double sc, sh;
14137
14138 /* Weighting factors for delta chromanance & delta hue */
14139 sc = 1.0 + 0.048 * c12;
14140 sh = 1.0 + 0.014 * c12;
14141 return dlsq + dcsq/(sc * sc) + dhsq/(sh * sh);
14142 }
14143 }
14144
14145 /* Return the CIE94 Delta E color difference measure */
14146 double icmCIE94(double Lab0[3], double Lab1[3]) {
14147 return sqrt(icmCIE94sq(Lab0, Lab1));
14148 }
14149
14150 /* Return the CIE94 Delta E color difference measure for two XYZ values */
14151 extern ICCLIB_API double icmXYZCIE94(icmXYZNumber *w, double *in0, double *in1) {
14152 double lab0[3], lab1[3];
14153
14154 icmXYZ2Lab(w, lab0, in0);
14155 icmXYZ2Lab(w, lab1, in1);
14156 return sqrt(icmCIE94sq(lab0, lab1));
14157 }
14158
14159
14160 /* From the paper "The CIEDE2000 Color-Difference Formula: Implementation Notes, */
14161 /* Supplementary Test Data, and Mathematical Observations", by */
14162 /* Gaurav Sharma, Wencheng Wu and Edul N. Dalal, */
14163 /* Color Res. Appl., vol. 30, no. 1, pp. 21-30, Feb. 2005. */
14164
14165 /* Return the CIEDE2000 Delta E color difference measure squared, for two Lab values */
14166 double icmCIE2Ksq(double *Lab0, double *Lab1) {
14167 double C1, C2;
14168 double h1, h2;
14169 double dL, dC, dH;
14170 double dsq;
14171
14172 /* The trucated value of PI is needed to ensure that the */
14173 /* test cases pass, as one of them lies on the edge of */
14174 /* a mathematical discontinuity. The precision is still */
14175 /* enough for any practical use. */
14176 #define RAD2DEG(xx) (180.0/3.14159265358979 * (xx))
14177 #define DEG2RAD(xx) (3.14159265358979/180.0 * (xx))
14178
14179 /* Compute Cromanance and Hue angles */
14180 {
14181 double C1ab, C2ab;
14182 double Cab, Cab7, G;
14183 double a1, a2;
14184
14185 C1ab = sqrt(Lab0[1] * Lab0[1] + Lab0[2] * Lab0[2]);
14186 C2ab = sqrt(Lab1[1] * Lab1[1] + Lab1[2] * Lab1[2]);
14187 Cab = 0.5 * (C1ab + C2ab);
14188 Cab7 = pow(Cab,7.0);
14189 G = 0.5 * (1.0 - sqrt(Cab7/(Cab7 + 6103515625.0)));
14190 a1 = (1.0 + G) * Lab0[1];
14191 a2 = (1.0 + G) * Lab1[1];
14192 C1 = sqrt(a1 * a1 + Lab0[2] * Lab0[2]);
14193 C2 = sqrt(a2 * a2 + Lab1[2] * Lab1[2]);
14194
14195 if (C1 < 1e-9)
14196 h1 = 0.0;
14197 else {
14198 h1 = RAD2DEG(atan2(Lab0[2], a1));
14199 if (h1 < 0.0)
14200 h1 += 360.0;
14201 }
14202
14203 if (C2 < 1e-9)
14204 h2 = 0.0;
14205 else {
14206 h2 = RAD2DEG(atan2(Lab1[2], a2));
14207 if (h2 < 0.0)
14208 h2 += 360.0;
14209 }
14210 }
14211
14212 /* Compute delta L, C and H */
14213 {
14214 double dh;
14215
14216 dL = Lab1[0] - Lab0[0];
14217 dC = C2 - C1;
14218 if (C1 < 1e-9 || C2 < 1e-9) {
14219 dh = 0.0;
14220 } else {
14221 dh = h2 - h1;
14222 if (dh > 180.0)
14223 dh -= 360.0;
14224 else if (dh < -180.0)
14225 dh += 360.0;
14226 }
14227
14228 dH = 2.0 * sqrt(C1 * C2) * sin(DEG2RAD(0.5 * dh));
14229 }
14230
14231 {
14232 double L, C, h, T;
14233 double hh, ddeg;
14234 double C7, RC, L50sq, SL, SC, SH, RT;
14235 double dLsq, dCsq, dHsq, RCH;
14236
14237 L = 0.5 * (Lab0[0] + Lab1[0]);
14238 C = 0.5 * (C1 + C2);
14239 if (C1 < 1e-9 || C2 < 1e-9) {
14240 h = h1 + h2;
14241 } else {
14242 h = h1 + h2;
14243 if (fabs(h1 - h2) > 180.0) {
14244 if (h < 360.0)
14245 h += 360.0;
14246 else if (h >= 360.0)
14247 h -= 360.0;
14248 }
14249 h *= 0.5;
14250 }
14251 T = 1.0 - 0.17 * cos(DEG2RAD(h-30.0)) + 0.24 * cos(DEG2RAD(2.0 * h))
14252 + 0.32 * cos(DEG2RAD(3.0 * h + 6.0)) - 0.2 * cos(DEG2RAD(4.0 * h - 63.0));
14253 hh = (h - 275.0)/25.0;
14254 ddeg = 30.0 * exp(-hh * hh);
14255 C7 = pow(C,7.0);
14256 RC = 2.0 * sqrt(C7/(C7 + 6103515625.0));
14257 L50sq = (L - 50.0) * (L - 50.0);
14258 SL = 1.0 + (0.015 * L50sq)/sqrt(20.0 + L50sq);
14259 SC = 1.0 + 0.045 * C;
14260 SH = 1.0 + 0.015 * C * T;
14261 RT = -sin(DEG2RAD(2 * ddeg)) * RC;
14262
14263 dLsq = dL/SL;
14264 dCsq = dC/SC;
14265 dHsq = dH/SH;
14266
14267 RCH = RT * dCsq * dHsq;
14268
14269 dLsq *= dLsq;
14270 dCsq *= dCsq;
14271 dHsq *= dHsq;
14272
14273 dsq = dLsq + dCsq + dHsq + RCH;
14274 }
14275
14276 return dsq;
14277
14278 #undef RAD2DEG
14279 #undef DEG2RAD
14280 }
14281
14282 /* Return the CIE2DE000 Delta E color difference measure for two Lab values */
14283 double icmCIE2K(double *Lab0, double *Lab1) {
14284 return sqrt(icmCIE2Ksq(Lab0, Lab1));
14285 }
14286
14287 /* Return the CIEDE2000 Delta E color difference measure for two XYZ values */
14288 extern ICCLIB_API double icmXYZCIE2K(icmXYZNumber *w, double *in0, double *in1) {
14289 double lab0[3], lab1[3];
14290
14291 icmXYZ2Lab(w, lab0, in0);
14292 icmXYZ2Lab(w, lab1, in1);
14293 return sqrt(icmCIE2Ksq(lab0, lab1));
14294 }
14295
14296
14297 /* - - - - - - - - - - - - - - - - - - - - - - - - */
14298 /* Chromatic adaptation transform utility */
14299 /* Return a 3x3 chromatic adaptation matrix */
14300 /* Use icmMulBy3x3(dst, mat, src) */
14301 void icmChromAdaptMatrix(
14302 int flags, /* Use bradford, Transform given matrix flags */
14303 icmXYZNumber d_wp, /* Destination white point */
14304 icmXYZNumber s_wp, /* Source white point */
14305 double mat[3][3] /* Destination matrix */
14306 ) {
14307 double dst[3], src[3]; /* Source & destination white points */
14308 double vkmat[3][3]; /* Von Kries matrix */
14309 #ifdef NEVER
14310 static double bradford[3][3] = { /* Linear cone space matrix */
14311 { 1.0, 0.0, 0.0 },
14312 { 0.0, 1.0, 0.0 },
14313 { 0.0, 0.0, 1.0 }
14314 };
14315 #endif /* NEVER */
14316 static double bradford[3][3] = { /* Bradford cone space matrix */
14317 { 0.8951, 0.2664, -0.1614 },
14318 { -0.7502, 1.7135, 0.0367 },
14319 { 0.0389, -0.0685, 1.0296 }
14320 };
14321 static int inited = 0; /* Compute inverse bradford once */
14322 static double ibradford[3][3]; /* Inverse Bradford */
14323
14324 /* Set initial matrix to unity */
14325 if (!(flags & ICM_CAM_MULMATRIX)) {
14326 icmSetUnity3x3(mat);
14327 }
14328
14329 icmXYZ2Ary(src, s_wp);
14330 icmXYZ2Ary(dst, d_wp);
14331
14332 if (flags & ICM_CAM_BRADFORD) {
14333 icmMulBy3x3(src, bradford, src);
14334 icmMulBy3x3(dst, bradford, dst);
14335 }
14336
14337 /* Setup the Von Kries white point adaptation matrix */
14338 vkmat[0][0] = dst[0]/src[0];
14339 vkmat[1][1] = dst[1]/src[1];
14340 vkmat[2][2] = dst[2]/src[2];
14341 vkmat[0][1] = vkmat[0][2] = 0.0;
14342 vkmat[1][0] = vkmat[1][2] = 0.0;
14343 vkmat[2][0] = vkmat[2][1] = 0.0;
14344
14345 /* Transform to Bradford space if requested */
14346 if (flags & ICM_CAM_BRADFORD) {
14347 icmMul3x3(mat, bradford);
14348 }
14349
14350 /* Apply chromatic adaptation */
14351 icmMul3x3(mat, vkmat);
14352
14353 /* Transform from Bradford space */
14354 if (flags & ICM_CAM_BRADFORD) {
14355 if (inited == 0) {
14356 icmInverse3x3(ibradford, bradford);
14357 inited = 1;
14358 }
14359 icmMul3x3(mat, ibradford);
14360 }
14361
14362 /* We're done */
14363 }
14364
14365 /* - - - - - - - - - - - - - - - - - - - - - - - - */
14366
14367 /* RGB primaries device to RGB->XYZ transform matrix. */
14368 /* We assume that the device is perfectly additive, but that */
14369 /* there may be a scale factor applied to the channels to */
14370 /* match the white point at RGB = 1. */
14371
14372 /* Return non-zero if matrix would be singular */
14373 int icmRGBprim2matrix(
14374 icmXYZNumber white, /* White point */
14375 icmXYZNumber red, /* Red colorant */
14376 icmXYZNumber green, /* Green colorant */
14377 icmXYZNumber blue, /* Blue colorant */
14378 double mat[3][3] /* Destination matrix */
14379 ) {
14380 double tmat[3][3];
14381 double t[3];
14382
14383 /* Assemble the colorants into a matrix */
14384 tmat[0][0] = red.X;
14385 tmat[0][1] = green.X;
14386 tmat[0][2] = blue.X;
14387 tmat[1][0] = red.Y;
14388 tmat[1][1] = green.Y;
14389 tmat[1][2] = blue.Y;
14390 tmat[2][0] = red.Z;
14391 tmat[2][1] = green.Z;
14392 tmat[2][2] = blue.Z;
14393
14394 /* Compute the inverse */
14395 if (icmInverse3x3(mat, tmat))
14396 return 1;
14397
14398 /* Compute scale vector that maps colorants to white point */
14399 t[0] = mat[0][0] * white.X
14400 + mat[0][1] * white.Y
14401 + mat[0][2] * white.Z;
14402 t[1] = mat[1][0] * white.X
14403 + mat[1][1] * white.Y
14404 + mat[1][2] * white.Z;
14405 t[2] = mat[2][0] * white.X
14406 + mat[2][1] * white.Y
14407 + mat[2][2] * white.Z;
14408
14409 /* Now formulate the transform matrix */
14410 mat[0][0] = red.X * t[0];
14411 mat[0][1] = green.X * t[1];
14412 mat[0][2] = blue.X * t[2];
14413 mat[1][0] = red.Y * t[0];
14414 mat[1][1] = green.Y * t[1];
14415 mat[1][2] = blue.Y * t[2];
14416 mat[2][0] = red.Z * t[0];
14417 mat[2][1] = green.Z * t[1];
14418 mat[2][2] = blue.Z * t[2];
14419
14420 return 0;
14421 }
14422
14423 /* - - - - - - - - - - - - - - - - - - - - - - - - */
14424 /* Some PCS utility functions */
14425
14426 /* Clip Lab, while maintaining hue angle. */
14427 /* Return nz if clipping occured */
14428 int icmClipLab(double out[3], double in[3]) {
14429 double C;
14430
14431 out[0] = in[0];
14432 out[1] = in[1];
14433 out[2] = in[2];
14434
14435 if (out[0] >= 0.0 && out[0] <= 100.0
14436 && out[1] >= -128.0 && out[1] <= 127.0
14437 && out[2] >= -128.0 && out[2] <= 127.0)
14438 return 0;
14439
14440 /* Clip L */
14441 if (out[0] < 0.0)
14442 out[0] = 0.0;
14443 else if (out[0] > 100.0)
14444 out[0] = 100.0;
14445
14446 C = out[1];
14447 if (fabs(out[2]) > fabs(C))
14448 C = out[2];
14449 if (C < -128.0 || C > 127.0) {
14450 if (C < 0.0)
14451 C = -128.0/C;
14452 else
14453 C = 127.0/C;
14454 out[1] *= C;
14455 out[2] *= C;
14456 }
14457
14458 return 1;
14459 }
14460
14461 /* Clip XYZ, while maintaining hue angle */
14462 /* Return nz if clipping occured */
14463 int icmClipXYZ(double out[3], double in[3]) {
14464 out[0] = in[0];
14465 out[1] = in[1];
14466 out[2] = in[2];
14467
14468 if (out[0] >= 0.0 && out[0] <= 1.9999
14469 && out[1] >= 0.0 && out[1] <= 1.9999
14470 && out[2] >= 0.0 && out[2] <= 1.9999)
14471 return 0;
14472
14473 /* Clip Y and scale X and Z similarly */
14474
14475 if (out[1] > 1.9999) {
14476 out[0] *= 1.9999/out[1];
14477 out[2] *= 1.9999/out[1];
14478 out[1] = 1.9999;
14479 } else if (out[1] < 0.0) {
14480 out[0] = 0.0;
14481 out[1] = 0.0;
14482 out[2] = 0.0;
14483 }
14484
14485 if (out[0] < 0.0 || out[0] > 1.9999
14486 || out[2] < 0.0 || out[2] > 1.9999) {
14487 double D50[3] = { 0.9642, 1.0000, 0.8249 };
14488 double bb = 0.0;
14489
14490 /* Scale the D50 so that it has the same Y value as our color */
14491 D50[0] *= out[1];
14492 D50[1] *= out[1];
14493 D50[2] *= out[1];
14494
14495 /* Figure out what blend factor with Y scaled D50, brings our */
14496 /* color X and Z values into range */
14497
14498 if (out[0] < 0.0) {
14499 double b;
14500 b = (0.0 - out[0])/(D50[0] - out[0]);
14501 if (b > bb)
14502 bb = b;
14503 } else if (out[0] > 1.9999) {
14504 double b;
14505 b = (1.9999 - out[0])/(D50[0] - out[0]);
14506 if (b > bb)
14507 bb = b;
14508 }
14509 if (out[2] < 0.0) {
14510 double b;
14511 b = (0.0 - out[2])/(D50[2] - out[2]);
14512 if (b > bb)
14513 bb = b;
14514 } else if (out[2] > 1.9999) {
14515 double b;
14516 b = (1.9999 - out[2])/(D50[2] - out[2]);
14517 if (b > bb)
14518 bb = b;
14519 }
14520 /* Do the desaturation */
14521 out[0] = D50[0] * bb + (1.0 - bb) * out[0];
14522 out[2] = D50[2] * bb + (1.0 - bb) * out[2];
14523 }
14524 return 1;
14525 }
14526
14527 /* - - - - - - - - - - - - - - - - - - - - - - - - */
14528
14529 /* Object for computing RFC 1321 MD5 checksums. */
14530 /* Derived from Colin Plumb's 1993 public domain code. */
14531
14532 /* Reset the checksum */
14533 static void icmMD5_reset(icmMD5 *p) {
14534 p->tlen = 0;
14535
14536 p->sum[0] = 0x67452301;
14537 p->sum[1] = 0xefcdab89;
14538 p->sum[2] = 0x98badcfe;
14539 p->sum[3] = 0x10325476;
14540
14541 p->fin = 0;
14542 }
14543
14544 #define F1(x, y, z) (z ^ (x & (y ^ z)))
14545 #define F2(x, y, z) F1(z, x, y)
14546 #define F3(x, y, z) (x ^ y ^ z)
14547 #define F4(x, y, z) (y ^ (x | ~z))
14548
14549 #define MD5STEP(f, w, x, y, z, pp, xtra, s) \
14550 data = (pp)[0] + ((pp)[3] << 24) + ((pp)[2] << 16) + ((pp)[1] << 8); \
14551 w += f(x, y, z) + data + xtra; \
14552 w = (w << s) | (w >> (32-s)); \
14553 w += x;
14554
14555 /* Add another 64 bytes to the checksum */
14556 static void icmMD5_accume(icmMD5 *p, ORD8 *in) {
14557 ORD32 data, a, b, c, d;
14558
14559 a = p->sum[0];
14560 b = p->sum[1];
14561 c = p->sum[2];
14562 d = p->sum[3];
14563
14564 MD5STEP(F1, a, b, c, d, in + (4 * 0), 0xd76aa478, 7);
14565 MD5STEP(F1, d, a, b, c, in + (4 * 1), 0xe8c7b756, 12);
14566 MD5STEP(F1, c, d, a, b, in + (4 * 2), 0x242070db, 17);
14567 MD5STEP(F1, b, c, d, a, in + (4 * 3), 0xc1bdceee, 22);
14568 MD5STEP(F1, a, b, c, d, in + (4 * 4), 0xf57c0faf, 7);
14569 MD5STEP(F1, d, a, b, c, in + (4 * 5), 0x4787c62a, 12);
14570 MD5STEP(F1, c, d, a, b, in + (4 * 6), 0xa8304613, 17);
14571 MD5STEP(F1, b, c, d, a, in + (4 * 7), 0xfd469501, 22);
14572 MD5STEP(F1, a, b, c, d, in + (4 * 8), 0x698098d8, 7);
14573 MD5STEP(F1, d, a, b, c, in + (4 * 9), 0x8b44f7af, 12);
14574 MD5STEP(F1, c, d, a, b, in + (4 * 10), 0xffff5bb1, 17);
14575 MD5STEP(F1, b, c, d, a, in + (4 * 11), 0x895cd7be, 22);
14576 MD5STEP(F1, a, b, c, d, in + (4 * 12), 0x6b901122, 7);
14577 MD5STEP(F1, d, a, b, c, in + (4 * 13), 0xfd987193, 12);
14578 MD5STEP(F1, c, d, a, b, in + (4 * 14), 0xa679438e, 17);
14579 MD5STEP(F1, b, c, d, a, in + (4 * 15), 0x49b40821, 22);
14580
14581 MD5STEP(F2, a, b, c, d, in + (4 * 1), 0xf61e2562, 5);
14582 MD5STEP(F2, d, a, b, c, in + (4 * 6), 0xc040b340, 9);
14583 MD5STEP(F2, c, d, a, b, in + (4 * 11), 0x265e5a51, 14);
14584 MD5STEP(F2, b, c, d, a, in + (4 * 0), 0xe9b6c7aa, 20);
14585 MD5STEP(F2, a, b, c, d, in + (4 * 5), 0xd62f105d, 5);
14586 MD5STEP(F2, d, a, b, c, in + (4 * 10), 0x02441453, 9);
14587 MD5STEP(F2, c, d, a, b, in + (4 * 15), 0xd8a1e681, 14);
14588 MD5STEP(F2, b, c, d, a, in + (4 * 4), 0xe7d3fbc8, 20);
14589 MD5STEP(F2, a, b, c, d, in + (4 * 9), 0x21e1cde6, 5);
14590 MD5STEP(F2, d, a, b, c, in + (4 * 14), 0xc33707d6, 9);
14591 MD5STEP(F2, c, d, a, b, in + (4 * 3), 0xf4d50d87, 14);
14592 MD5STEP(F2, b, c, d, a, in + (4 * 8), 0x455a14ed, 20);
14593 MD5STEP(F2, a, b, c, d, in + (4 * 13), 0xa9e3e905, 5);
14594 MD5STEP(F2, d, a, b, c, in + (4 * 2), 0xfcefa3f8, 9);
14595 MD5STEP(F2, c, d, a, b, in + (4 * 7), 0x676f02d9, 14);
14596 MD5STEP(F2, b, c, d, a, in + (4 * 12), 0x8d2a4c8a, 20);
14597
14598 MD5STEP(F3, a, b, c, d, in + (4 * 5), 0xfffa3942, 4);
14599 MD5STEP(F3, d, a, b, c, in + (4 * 8), 0x8771f681, 11);
14600 MD5STEP(F3, c, d, a, b, in + (4 * 11), 0x6d9d6122, 16);
14601 MD5STEP(F3, b, c, d, a, in + (4 * 14), 0xfde5380c, 23);
14602 MD5STEP(F3, a, b, c, d, in + (4 * 1), 0xa4beea44, 4);
14603 MD5STEP(F3, d, a, b, c, in + (4 * 4), 0x4bdecfa9, 11);
14604 MD5STEP(F3, c, d, a, b, in + (4 * 7), 0xf6bb4b60, 16);
14605 MD5STEP(F3, b, c, d, a, in + (4 * 10), 0xbebfbc70, 23);
14606 MD5STEP(F3, a, b, c, d, in + (4 * 13), 0x289b7ec6, 4);
14607 MD5STEP(F3, d, a, b, c, in + (4 * 0), 0xeaa127fa, 11);
14608 MD5STEP(F3, c, d, a, b, in + (4 * 3), 0xd4ef3085, 16);
14609 MD5STEP(F3, b, c, d, a, in + (4 * 6), 0x04881d05, 23);
14610 MD5STEP(F3, a, b, c, d, in + (4 * 9), 0xd9d4d039, 4);
14611 MD5STEP(F3, d, a, b, c, in + (4 * 12), 0xe6db99e5, 11);
14612 MD5STEP(F3, c, d, a, b, in + (4 * 15), 0x1fa27cf8, 16);
14613 MD5STEP(F3, b, c, d, a, in + (4 * 2), 0xc4ac5665, 23);
14614
14615 MD5STEP(F4, a, b, c, d, in + (4 * 0), 0xf4292244, 6);
14616 MD5STEP(F4, d, a, b, c, in + (4 * 7), 0x432aff97, 10);
14617 MD5STEP(F4, c, d, a, b, in + (4 * 14), 0xab9423a7, 15);
14618 MD5STEP(F4, b, c, d, a, in + (4 * 5), 0xfc93a039, 21);
14619 MD5STEP(F4, a, b, c, d, in + (4 * 12), 0x655b59c3, 6);
14620 MD5STEP(F4, d, a, b, c, in + (4 * 3), 0x8f0ccc92, 10);
14621 MD5STEP(F4, c, d, a, b, in + (4 * 10), 0xffeff47d, 15);
14622 MD5STEP(F4, b, c, d, a, in + (4 * 1), 0x85845dd1, 21);
14623 MD5STEP(F4, a, b, c, d, in + (4 * 8), 0x6fa87e4f, 6);
14624 MD5STEP(F4, d, a, b, c, in + (4 * 15), 0xfe2ce6e0, 10);
14625 MD5STEP(F4, c, d, a, b, in + (4 * 6), 0xa3014314, 15);
14626 MD5STEP(F4, b, c, d, a, in + (4 * 13), 0x4e0811a1, 21);
14627 MD5STEP(F4, a, b, c, d, in + (4 * 4), 0xf7537e82, 6);
14628 MD5STEP(F4, d, a, b, c, in + (4 * 11), 0xbd3af235, 10);
14629 MD5STEP(F4, c, d, a, b, in + (4 * 2), 0x2ad7d2bb, 15);
14630 MD5STEP(F4, b, c, d, a, in + (4 * 9), 0xeb86d391, 21);
14631
14632 p->sum[0] += a;
14633 p->sum[1] += b;
14634 p->sum[2] += c;
14635 p->sum[3] += d;
14636 }
14637
14638 #undef F1
14639 #undef F2
14640 #undef F3
14641 #undef F4
14642 #undef MD5STEP
14643
14644 /* Add some bytes */
14645 static void icmMD5_add(icmMD5 *p, ORD8 *ibuf, unsigned int len) {
14646 unsigned int bs;
14647
14648 if (p->fin)
14649 return; /* This is actually an error */
14650
14651 bs = p->tlen; /* Current bytes added */
14652 p->tlen = bs + len; /* Update length after adding this buffer */
14653 bs &= 0x3f; /* Bytes already in buffer */
14654
14655 /* Deal with any existing partial bytes in p->buf */
14656 if (bs) {
14657 ORD8 *np = (ORD8 *)p->buf + bs; /* Next free location in partial buffer */
14658
14659 bs = 64 - bs; /* Free space in partial buffer */
14660
14661 if (len < bs) { /* Not enought new to make a full buffer */
14662 memmove(np, ibuf, len);
14663 return;
14664 }
14665
14666 memmove(np, ibuf, bs); /* Now got one full buffer */
14667 icmMD5_accume(p, np);
14668 ibuf += bs;
14669 len -= bs;
14670 }
14671
14672 /* Deal with input data 64 bytes at a time */
14673 while (len >= 64) {
14674 icmMD5_accume(p, ibuf);
14675 ibuf += 64;
14676 len -= 64;
14677 }
14678
14679 /* Deal with any remaining bytes */
14680 memmove(p->buf, ibuf, len);
14681 }
14682
14683 /* Finalise the checksum and return the result. */
14684 static void icmMD5_get(icmMD5 *p, ORD8 chsum[16]) {
14685 int i;
14686 unsigned count;
14687 ORD32 bits1, bits0;
14688 ORD8 *pp;
14689
14690 if (p->fin == 0) {
14691
14692 /* Compute number of bytes processed mod 64 */
14693 count = p->tlen & 0x3f;
14694
14695 /* Set the first char of padding to 0x80. This is safe since there is
14696 always at least one byte free */
14697 pp = p->buf + count;
14698 *pp++ = 0x80;
14699
14700 /* Bytes of padding needed to make 64 bytes */
14701 count = 64 - 1 - count;
14702
14703 /* Pad out to 56 mod 64, allowing 8 bytes for length in bits. */
14704 if (count < 8) { /* Not enough space for padding and length */
14705
14706 memset(pp, 0, count);
14707 icmMD5_accume(p, p->buf);
14708
14709 /* Now fill the next block with 56 bytes */
14710 memset(p->buf, 0, 56);
14711 } else {
14712 /* Pad block to 56 bytes */
14713 memset(pp, 0, count - 8);
14714 }
14715
14716 /* Compute number of bits */
14717 bits1 = 0x7 & (p->tlen >> (32 - 3));
14718 bits0 = p->tlen << 3;
14719
14720 /* Append number of bits */
14721 p->buf[64 - 8] = bits0 & 0xff;
14722 p->buf[64 - 7] = (bits0 >> 8) & 0xff;
14723 p->buf[64 - 6] = (bits0 >> 16) & 0xff;
14724 p->buf[64 - 5] = (bits0 >> 24) & 0xff;
14725 p->buf[64 - 4] = bits1 & 0xff;
14726 p->buf[64 - 3] = (bits1 >> 8) & 0xff;
14727 p->buf[64 - 2] = (bits1 >> 16) & 0xff;
14728 p->buf[64 - 1] = (bits1 >> 24) & 0xff;
14729
14730 icmMD5_accume(p, p->buf);
14731
14732 p->fin = 1;
14733 }
14734
14735 /* Return the result, lsb to msb */
14736 pp = chsum;
14737 for (i = 0; i < 4; i++) {
14738 *pp++ = p->sum[i] & 0xff;
14739 *pp++ = (p->sum[i] >> 8) & 0xff;
14740 *pp++ = (p->sum[i] >> 16) & 0xff;
14741 *pp++ = (p->sum[i] >> 24) & 0xff;
14742 }
14743 }
14744
14745
14746 /* Delete the instance */
14747 static void icmMD5_del(icmMD5 *p) {
14748 p->al->free(p->al, p);
14749 }
14750
14751 /* Create a new MD5 checksumming object, with a reset checksum value */
14752 /* Return it or NULL if there is an error */
14753 icmMD5 *new_icmMD5(icmAlloc *al) {
14754 icmMD5 *p;
14755
14756 if ((p = (icmMD5 *)al->calloc(al,1,sizeof(icmMD5))) == NULL)
14757 return NULL;
14758
14759 p->al = al;
14760 p->reset = icmMD5_reset;
14761 p->add = icmMD5_add;
14762 p->get = icmMD5_get;
14763 p->del = icmMD5_del;
14764
14765 p->reset(p);
14766
14767 return p;
14768 }
14769
14770 /* - - - - - - - - - - - - - - - - - - - - - - - - */
14771
14772 /* Dumy icmFile used to compute MD5 checksum on write */
14773
14774 /* Get the size of the file (Only valid for reading file. */
14775 static size_t icmFileMD5_get_size(icmFile *pp) {
14776 icmFileMD5 *p = (icmFileMD5 *)pp;
14777
14778 return p->size;
14779 }
14780
14781 /* Set current position to offset. Return 0 on success, nz on failure. */
14782 /* Seek can't be supported for MD5, so and seek must be to current location. */
14783 static int icmFileMD5_seek(
14784 icmFile *pp,
14785 unsigned int offset
14786 ) {
14787 icmFileMD5 *p = (icmFileMD5 *)pp;
14788
14789 if (p->of != offset) {
14790 p->errc = 1;
14791 }
14792 if (p->of > p->size)
14793 p->size = p->of;
14794 return 0;
14795 }
14796
14797 /* Read count items of size length. Return number of items successfully read. */
14798 /* Read is not implemented */
14799 static size_t icmFileMD5_read(
14800 icmFile *pp,
14801 void *buffer,
14802 size_t size,
14803 size_t count
14804 ) {
14805 return 0;
14806 }
14807
14808 /* write count items of size length. Return number of items successfully written. */
14809 /* Simply pass to MD5 to compute checksum */
14810 static size_t icmFileMD5_write(
14811 icmFile *pp,
14812 void *buffer,
14813 size_t size,
14814 size_t count
14815 ) {
14816 icmFileMD5 *p = (icmFileMD5 *)pp;
14817 size_t len = size * count;
14818
14819 p->md5->add(p->md5, (ORD8 *)buffer, len);
14820 p->of += len;
14821 if (p->of > p->size)
14822 p->size = p->of;
14823 return count;
14824 }
14825
14826 /* do a printf */
14827 /* Not implemented */
14828 static int icmFileMD5_printf(
14829 icmFile *pp,
14830 const char *format,
14831 ...
14832 ) {
14833 icmFileMD5 *p = (icmFileMD5 *)pp;
14834 p->errc = 2;
14835 return 0;
14836 }
14837
14838 /* flush all write data out to secondary storage. Return nz on failure. */
14839 static int icmFileMD5_flush(
14840 icmFile *pp
14841 ) {
14842 return 0;
14843 }
14844
14845 /* we're done with the file object, return nz on failure */
14846 static int icmFileMD5_delete(
14847 icmFile *pp
14848 ) {
14849 icmFileMD5 *p = (icmFileMD5 *)pp;
14850
14851 p->al->free(p->al, p); /* Free object */
14852 return 0;
14853 }
14854
14855 /* Return the error code. Error code will usually be set */
14856 /* if we did a seek to other than the current location, */
14857 /* or did a printf. */
14858 static int icmFileMD5_geterrc(
14859 icmFile *pp
14860 ) {
14861 icmFileMD5 *p = (icmFileMD5 *)pp;
14862
14863 return p->errc;
14864 }
14865
14866 /* Create a checksum dump file access class with allocator */
14867 icmFile *new_icmFileMD5_a(
14868 icmMD5 *md5, /* MD5 object to use */
14869 icmAlloc *al /* heap allocator */
14870 ) {
14871 icmFileMD5 *p;
14872
14873 if ((p = (icmFileMD5 *) al->calloc(al, 1, sizeof(icmFileMD5))) == NULL) {
14874 return NULL;
14875 }
14876 p->md5 = md5; /* MD5 compute object */
14877 p->al = al; /* Heap allocator */
14878 p->get_size = icmFileMD5_get_size;
14879 p->seek = icmFileMD5_seek;
14880 p->read = icmFileMD5_read;
14881 p->write = icmFileMD5_write;
14882 p->gprintf = icmFileMD5_printf;
14883 p->flush = icmFileMD5_flush;
14884 p->del = icmFileMD5_delete;
14885 p->get_errc = icmFileMD5_geterrc;
14886
14887 p->of = 0;
14888 p->errc = 0;
14889
14890 return (icmFile *)p;
14891 }
14892
14893
14894 /* ============================================= */
14895 /* Implementation of color transform lookups. */
14896
14897 /* - - - - - - - - - - - - - - - - - - - - - - - */
14898 /* Methods common to all transforms (icmLuBase) : */
14899
14900 /* Return information about the native lut in/out/pcs colorspaces. */
14901 /* Any pointer may be NULL if value is not to be returned */
14902 static void
14903 icmLutSpaces(
14904 struct _icmLuBase *p, /* This */
14905 icColorSpaceSignature *ins, /* Return Native input color space */
14906 int *inn, /* Return number of input components */
14907 icColorSpaceSignature *outs, /* Return Native output color space */
14908 int *outn, /* Return number of output components */
14909 icColorSpaceSignature *pcs /* Return Native PCS color space */
14910 /* (this will be the same as ins or outs */
14911 /* depending on the lookup direction) */
14912 ) {
14913 if (ins != NULL)
14914 *ins = p->inSpace;
14915 if (inn != NULL)
14916 *inn = (int)number_ColorSpaceSignature(p->inSpace);
14917
14918 if (outs != NULL)
14919 *outs = p->outSpace;
14920 if (outn != NULL)
14921 *outn = (int)number_ColorSpaceSignature(p->outSpace);
14922 if (pcs != NULL)
14923 *pcs = p->pcs;
14924 }
14925
14926 /* Return information about the effective lookup in/out colorspaces, */
14927 /* including allowance for PCS override. */
14928 /* Any pointer may be NULL if value is not to be returned */
14929 static void
14930 icmLuSpaces(
14931 struct _icmLuBase *p, /* This */
14932 icColorSpaceSignature *ins, /* Return effective input color space */
14933 int *inn, /* Return number of input components */
14934 icColorSpaceSignature *outs, /* Return effective output color space */
14935 int *outn, /* Return number of output components */
14936 icmLuAlgType *alg, /* Return type of lookup algorithm used */
14937 icRenderingIntent *intt, /* Return the intent being implented */
14938 icmLookupFunc *fnc, /* Return the profile function being implemented */
14939 icColorSpaceSignature *pcs, /* Return the profile effective PCS */
14940 icmLookupOrder *ord /* return the search Order */
14941 ) {
14942 if (ins != NULL)
14943 *ins = p->e_inSpace;
14944 if (inn != NULL)
14945 *inn = (int)number_ColorSpaceSignature(p->e_inSpace);
14946
14947 if (outs != NULL)
14948 *outs = p->e_outSpace;
14949 if (outn != NULL)
14950 *outn = (int)number_ColorSpaceSignature(p->e_outSpace);
14951
14952 if (alg != NULL)
14953 *alg = p->ttype;
14954
14955 if (intt != NULL)
14956 *intt = p->intent;
14957
14958 if (fnc != NULL)
14959 *fnc = p->function;
14960
14961 if (pcs != NULL)
14962 *pcs = p->e_pcs;
14963
14964 if (ord != NULL)
14965 *ord = p->order;
14966 }
14967
14968 /* Relative to Absolute for this WP in XYZ */
14969 static void icmLuXYZ_Rel2Abs(icmLuBase *p, double *out, double *in) {
14970 icmMulBy3x3(out, p->toAbs, in);
14971 }
14972
14973 /* Absolute to Relative for this WP in XYZ */
14974 static void icmLuXYZ_Abs2Rel(icmLuBase *p, double *out, double *in) {
14975 icmMulBy3x3(out, p->fromAbs, in);
14976 }
14977
14978 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
14979 /* Methods common to all non-named transforms (icmLuBase) : */
14980
14981 /* Initialise the LU white and black points from the ICC tags, */
14982 /* and the corresponding absolute<->relative conversion matrices */
14983 /* return nz on error */
14984 static int icmLuInit_Wh_bk(
14985 struct _icmLuBase *lup
14986 ) {
14987 icmXYZArray *whitePointTag, *blackPointTag;
14988 icc *p = lup->icp;
14989
14990 if ((whitePointTag = (icmXYZArray *)p->read_tag(p, icSigMediaWhitePointTag)) == NULL
14991 || whitePointTag->ttype != icSigXYZType || whitePointTag->size < 1) {
14992 if (p->header->deviceClass != icSigLinkClass
14993 && (lup->intent == icAbsoluteColorimetric
14994 || lup->intent == icmAbsolutePerceptual
14995 || lup->intent == icmAbsoluteSaturation)) {
14996 sprintf(p->err,"icc_lookup: Profile is missing Media White Point Tag");
14997 p->errc = 1;
14998 return 1;
14999 }
15000 p->err[0] = '\000';
15001 p->errc = 0;
15002 lup->whitePoint = icmD50; /* safe value */
15003 } else
15004 lup->whitePoint = whitePointTag->data[0]; /* Copy structure */
15005
15006 if ((blackPointTag = (icmXYZArray *)p->read_tag(p, icSigMediaBlackPointTag)) == NULL
15007 || blackPointTag->ttype != icSigXYZType || blackPointTag->size < 1) {
15008 p->err[0] = '\000';
15009 p->errc = 0;
15010 lup->blackPoint = icmBlack; /* default */
15011 lup->blackisassumed = 1; /* We assumed the default */
15012 } else {
15013 lup->blackPoint = blackPointTag->data[0]; /* Copy structure */
15014 lup->blackisassumed = 0; /* The black is from the tag */
15015 }
15016
15017 /* Create absolute <-> relative conversion matricies */
15018 icmChromAdaptMatrix(ICM_CAM_BRADFORD, lup->whitePoint, icmD50, lup->toAbs);
15019 icmChromAdaptMatrix(ICM_CAM_BRADFORD, icmD50, lup->whitePoint, lup->fromAbs);
15020 DBLLL(("toAbs and fromAbs created from wp %f %f %f and D50 %f %f %f\n", lup->whitePoint.X, lup->whitePoint.Y, lup->whitePoint.Z, icmD50.X, icmD50.Y, icmD50.Z));
15021 DBLLL(("toAbs = %f %f %f\n %f %f %f\n %f %f %f\n", lup->toAbs[0][0], lup->toAbs[0][1], lup->toAbs[0][2], lup->toAbs[1][0], lup->toAbs[1][1], lup->toAbs[1][2], lup->toAbs[2][0], lup->toAbs[2][1], lup->toAbs[2][2]));
15022 DBLLL(("fromAbs = %f %f %f\n %f %f %f\n %f %f %f\n", lup->fromAbs[0][0], lup->fromAbs[0][1], lup->fromAbs[0][2], lup->fromAbs[1][0], lup->fromAbs[1][1], lup->fromAbs[1][2], lup->fromAbs[2][0], lup->fromAbs[2][1], lup->fromAbs[2][2]));
15023
15024 return 0;
15025 }
15026
15027 /* Return the media white and black points in absolute XYZ space. */
15028 /* Note that if not in the icc, the black point will be returned as 0, 0, 0, */
15029 /* and the function will return nz. */
15030 /* Any pointer may be NULL if value is not to be returned */
15031 static int icmLuWh_bk_points(
15032 struct _icmLuBase *p,
15033 double *wht,
15034 double *blk
15035 ) {
15036 if (wht != NULL) {
15037 icmXYZ2Ary(wht,p->whitePoint);
15038 }
15039
15040 if (blk != NULL) {
15041 icmXYZ2Ary(blk,p->blackPoint);
15042 }
15043 if (p->blackisassumed)
15044 return 1;
15045 return 0;
15046 }
15047
15048 /* Get the LU white and black points in LU PCS space, converted to XYZ. */
15049 /* (ie. white and black will be relative if LU is relative intent etc.) */
15050 /* Return nz if the black point is being assumed to be 0,0,0 rather */
15051 /* than being from the tag. */ \
15052 static int icmLuLu_wh_bk_points(
15053 struct _icmLuBase *p,
15054 double *wht,
15055 double *blk
15056 ) {
15057 if (wht != NULL) {
15058 icmXYZ2Ary(wht,p->whitePoint);
15059 }
15060
15061 if (blk != NULL) {
15062 icmXYZ2Ary(blk,p->blackPoint);
15063 }
15064 if (p->intent != icAbsoluteColorimetric
15065 && p->intent != icmAbsolutePerceptual
15066 && p->intent != icmAbsoluteSaturation) {
15067 if (wht != NULL)
15068 icmMulBy3x3(wht, p->fromAbs, wht);
15069 if (blk != NULL)
15070 icmMulBy3x3(blk, p->fromAbs, blk);
15071 }
15072 if (p->blackisassumed)
15073 return 1;
15074 return 0;
15075 }
15076
15077 /* Get the native (internal) ranges for the Monochrome or Matrix profile */
15078 /* Arguments may be NULL */
15079 static void
15080 icmLu_get_lutranges (
15081 struct _icmLuBase *p,
15082 double *inmin, double *inmax, /* Return maximum range of inspace values */
15083 double *outmin, double *outmax /* Return maximum range of outspace values */
15084 ) {
15085 icTagTypeSignature tagType;
15086
15087 if (p->ttype == icmLutType) {
15088 icmLuLut *pp = (icmLuLut *)p;
15089 tagType = pp->lut->ttype;
15090 } else {
15091 tagType = icMaxEnumType;
15092 }
15093
15094 /* Hmm. we have no way of handling an error from getRange. */
15095 /* It shouldn't ever return one unless there is a mismatch between */
15096 /* getRange and Lu creation... */
15097 getRange(p->icp, p->inSpace, tagType, inmin, inmax);
15098 getRange(p->icp, p->outSpace, tagType, outmin, outmax);
15099 }
15100
15101 /* Get the effective (externally visible) ranges for the all profile types */
15102 /* Arguments may be NULL */
15103 static void
15104 icmLu_get_ranges (
15105 struct _icmLuBase *p,
15106 double *inmin, double *inmax, /* Return maximum range of inspace values */
15107 double *outmin, double *outmax /* Return maximum range of outspace values */
15108 ) {
15109 icTagTypeSignature tagType;
15110
15111 if (p->ttype == icmLutType) {
15112 icmLuLut *pp = (icmLuLut *)p;
15113 tagType = pp->lut->ttype;
15114 } else {
15115 tagType = icMaxEnumType;
15116 }
15117 /* Hmm. we have no way of handling an error from getRange. */
15118 /* It shouldn't ever return one unless there is a mismatch between */
15119 /* getRange and Lu creation... */
15120 getRange(p->icp, p->e_inSpace, tagType, inmin, inmax);
15121 getRange(p->icp, p->e_outSpace, tagType, outmin, outmax);
15122 }
15123
15124 /* - - - - - - - - - - - - - - - - - - - - - - - - */
15125 /* Forward and Backward Monochrome type methods: */
15126 /* Return 0 on success, 1 if clipping occured, 2 on other error */
15127
15128 /* Individual components of Fwd conversion: */
15129
15130 /* Actual device to linearised device */
15131 static int
15132 icmLuMonoFwd_curve (
15133 icmLuMono *p, /* This */
15134 double *out, /* Vector of output values */
15135 double *in /* Vector of input values */
15136 ) {
15137 icc *icp = p->icp;
15138 int rv = 0;
15139
15140 /* Translate from device to PCS scale */
15141 if ((rv |= p->grayCurve->lookup_fwd(p->grayCurve,&out[0],&in[0])) > 1) {
15142 sprintf(icp->err,"icc_lookup: Curve->lookup_fwd() failed");
15143 icp->errc = rv;
15144 return 2;
15145 }
15146
15147 return rv;
15148 }
15149
15150 /* Linearised device to relative PCS */
15151 static int
15152 icmLuMonoFwd_map (
15153 icmLuMono *p, /* This */
15154 double *out, /* Vector of output values (native space) */
15155 double *in /* Vector of input values (native space) */
15156 ) {
15157 int rv = 0;
15158 double Y = in[0]; /* In case out == in */
15159
15160 out[0] = p->pcswht.X;
15161 out[1] = p->pcswht.Y;
15162 out[2] = p->pcswht.Z;
15163 if (p->pcs == icSigLabData)
15164 icmXYZ2Lab(&p->pcswht, out, out); /* in Lab */
15165
15166 /* Scale linearized device level to PCS white */
15167 out[0] *= Y;
15168 out[1] *= Y;
15169 out[2] *= Y;
15170
15171 return rv;
15172 }
15173
15174 /* relative PCS to absolute PCS (if required) */
15175 static int
15176 icmLuMonoFwd_abs ( /* Abs comes last in Fwd conversion */
15177 icmLuMono *p, /* This */
15178 double *out, /* Vector of output values in Effective PCS */
15179 double *in /* Vector of input values in Native PCS */
15180 ) {
15181 int rv = 0;
15182
15183 if (out != in) { /* Don't alter input values */
15184 out[0] = in[0];
15185 out[1] = in[1];
15186 out[2] = in[2];
15187 }
15188
15189 /* Do absolute conversion */
15190 if (p->intent == icAbsoluteColorimetric
15191 || p->intent == icmAbsolutePerceptual
15192 || p->intent == icmAbsoluteSaturation) {
15193
15194 if (p->pcs == icSigLabData) /* Convert L to Y */
15195 icmLab2XYZ(&p->pcswht, out, out);
15196
15197 /* Convert from Relative to Absolute colorimetric */
15198 icmMulBy3x3(out, p->toAbs, out);
15199
15200 if (p->e_pcs == icSigLabData)
15201 icmXYZ2Lab(&p->pcswht, out, out);
15202
15203 } else {
15204
15205 /* Convert from Native to Effective output space */
15206 if (p->pcs == icSigLabData && p->e_pcs == icSigXYZData)
15207 icmLab2XYZ(&p->pcswht, out, out);
15208 else if (p->pcs == icSigXYZData && p->e_pcs == icSigLabData)
15209 icmXYZ2Lab(&p->pcswht, out, out);
15210 }
15211
15212 return rv;
15213 }
15214
15215
15216 /* Overall Fwd conversion routine (Dev->PCS) */
15217 static int
15218 icmLuMonoFwd_lookup (
15219 icmLuBase *pp, /* This */
15220 double *out, /* Vector of output values */
15221 double *in /* Input value */
15222 ) {
15223 int rv = 0;
15224 icmLuMono *p = (icmLuMono *)pp;
15225 rv |= icmLuMonoFwd_curve(p, out, in);
15226 rv |= icmLuMonoFwd_map(p, out, out);
15227 rv |= icmLuMonoFwd_abs(p, out, out);
15228 return rv;
15229 }
15230
15231 /* Three stage conversion routines */
15232 static int
15233 icmLuMonoFwd_lookup_in(
15234 icmLuBase *pp, /* This */
15235 double *out, /* Output value */
15236 double *in /* Vector of input values */
15237 ) {
15238 int rv = 0;
15239 icmLuMono *p = (icmLuMono *)pp;
15240 rv |= icmLuMonoFwd_curve(p, out, in);
15241 return rv;
15242 }
15243
15244 static int
15245 icmLuMonoFwd_lookup_core(
15246 icmLuBase *pp, /* This */
15247 double *out, /* Output value */
15248 double *in /* Vector of input values */
15249 ) {
15250 int rv = 0;
15251 icmLuMono *p = (icmLuMono *)pp;
15252 rv |= icmLuMonoFwd_map(p, out, in);
15253 rv |= icmLuMonoFwd_abs(p, out, out);
15254 return rv;
15255 }
15256
15257 static int
15258 icmLuMonoFwd_lookup_out(
15259 icmLuBase *pp, /* This */
15260 double *out, /* Output value */
15261 double *in /* Vector of input values */
15262 ) {
15263 int rv = 0;
15264 out[0] = in[0];
15265 out[1] = in[1];
15266 out[2] = in[2];
15267 return rv;
15268 }
15269
15270
15271 /* - - - - - - - - - - - - - - */
15272 /* Individual components of Bwd conversion: */
15273
15274 /* Convert from relative PCS to absolute PCS (if required) */
15275 static int
15276 icmLuMonoBwd_abs ( /* Abs comes first in Bwd conversion */
15277 icmLuMono *p, /* This */
15278 double *out, /* Vector of output values in Native PCS */
15279 double *in /* Vector of input values in Effective PCS */
15280 ) {
15281 int rv = 0;
15282
15283 if (out != in) { /* Don't alter input values */
15284 out[0] = in[0];
15285 out[1] = in[1];
15286 out[2] = in[2];
15287 }
15288
15289 /* Force to monochrome locus in correct space */
15290 if (p->e_pcs == icSigLabData) {
15291 double wp[3];
15292
15293 if (p->intent == icAbsoluteColorimetric
15294 || p->intent == icmAbsolutePerceptual
15295 || p->intent == icmAbsoluteSaturation) {
15296 wp[0] = p->whitePoint.X;
15297 wp[1] = p->whitePoint.Y;
15298 wp[2] = p->whitePoint.Z;
15299 } else {
15300 wp[0] = p->pcswht.X;
15301 wp[1] = p->pcswht.Y;
15302 wp[2] = p->pcswht.Z;
15303 }
15304 icmXYZ2Lab(&p->pcswht, wp, wp); /* Convert to Lab white point */
15305 out[1] = out[0]/wp[0] * wp[1];
15306 out[2] = out[0]/wp[0] * wp[2];
15307
15308 } else {
15309 if (p->intent == icAbsoluteColorimetric
15310 || p->intent == icmAbsolutePerceptual
15311 || p->intent == icmAbsoluteSaturation) {
15312 out[0] = out[1]/p->whitePoint.Y * p->whitePoint.X;
15313 out[2] = out[1]/p->whitePoint.Y * p->whitePoint.Z;
15314 } else {
15315 out[0] = out[1]/p->pcswht.Y * p->pcswht.X;
15316 out[2] = out[1]/p->pcswht.Y * p->pcswht.Z;
15317 }
15318 }
15319
15320 /* Do absolute conversion, and conversion to effective PCS */
15321 if (p->intent == icAbsoluteColorimetric
15322 || p->intent == icmAbsolutePerceptual
15323 || p->intent == icmAbsoluteSaturation) {
15324
15325 if (p->e_pcs == icSigLabData)
15326 icmLab2XYZ(&p->pcswht, out, out);
15327
15328 icmMulBy3x3(out, p->fromAbs, out);
15329
15330 /* Convert from Effective to Native input space */
15331 if (p->pcs == icSigLabData)
15332 icmXYZ2Lab(&p->pcswht, out, out);
15333
15334 } else {
15335
15336 /* Convert from Effective to Native input space */
15337 if (p->e_pcs == icSigLabData && p->pcs == icSigXYZData)
15338 icmLab2XYZ(&p->pcswht, out, out);
15339 else if (p->e_pcs == icSigXYZData && p->pcs == icSigLabData)
15340 icmXYZ2Lab(&p->pcswht, out, out);
15341 }
15342
15343 return rv;
15344 }
15345
15346 /* Map from relative PCS to linearised device */
15347 static int
15348 icmLuMonoBwd_map (
15349 icmLuMono *p, /* This */
15350 double *out, /* Output value */
15351 double *in /* Vector of input values (native space) */
15352 ) {
15353 int rv = 0;
15354 double pcsw[3];
15355
15356 pcsw[0] = p->pcswht.X;
15357 pcsw[1] = p->pcswht.Y;
15358 pcsw[2] = p->pcswht.Z;
15359 if (p->pcs == icSigLabData)
15360 icmXYZ2Lab(&p->pcswht, pcsw, pcsw); /* in Lab (should be 100.0!) */
15361
15362 /* Divide linearized device level into PCS white luminence */
15363 if (p->pcs == icSigLabData)
15364 out[0] = in[0]/pcsw[0];
15365 else
15366 out[0] = in[1]/pcsw[1];
15367
15368 return rv;
15369 }
15370
15371 /* Map from linearised device to actual device */
15372 static int
15373 icmLuMonoBwd_curve (
15374 icmLuMono *p, /* This */
15375 double *out, /* Output value */
15376 double *in /* Input value */
15377 ) {
15378 icc *icp = p->icp;
15379 int rv = 0;
15380
15381 /* Convert to device value through curve */
15382 if ((rv = p->grayCurve->lookup_bwd(p->grayCurve,&out[0],&in[0])) > 1) {
15383 sprintf(icp->err,"icc_lookup: Curve->lookup_bwd() failed");
15384 icp->errc = rv;
15385 return 2;
15386 }
15387
15388 return rv;
15389 }
15390
15391 /* Overall Bwd conversion routine (PCS->Dev) */
15392 static int
15393 icmLuMonoBwd_lookup (
15394 icmLuBase *pp, /* This */
15395 double *out, /* Output value */
15396 double *in /* Vector of input values */
15397 ) {
15398 double temp[3];
15399 int rv = 0;
15400 icmLuMono *p = (icmLuMono *)pp;
15401 rv |= icmLuMonoBwd_abs(p, temp, in);
15402 rv |= icmLuMonoBwd_map(p, out, temp);
15403 rv |= icmLuMonoBwd_curve(p, out, out);
15404 return rv;
15405 }
15406
15407 /* Three stage conversion routines */
15408 static int
15409 icmLuMonoBwd_lookup_in(
15410 icmLuBase *pp, /* This */
15411 double *out, /* Output value */
15412 double *in /* Vector of input values */
15413 ) {
15414 int rv = 0;
15415 out[0] = in[0];
15416 out[1] = in[1];
15417 out[2] = in[2];
15418 return rv;
15419 }
15420
15421 static int
15422 icmLuMonoBwd_lookup_core(
15423 icmLuBase *pp, /* This */
15424 double *out, /* Output value */
15425 double *in /* Vector of input values */
15426 ) {
15427 double temp[3];
15428 int rv = 0;
15429 icmLuMono *p = (icmLuMono *)pp;
15430 rv |= icmLuMonoBwd_abs(p, temp, in);
15431 rv |= icmLuMonoBwd_map(p, out, temp);
15432 return rv;
15433 }
15434
15435 static int
15436 icmLuMonoBwd_lookup_out(
15437 icmLuBase *pp, /* This */
15438 double *out, /* Output value */
15439 double *in /* Vector of input values */
15440 ) {
15441 int rv = 0;
15442 icmLuMono *p = (icmLuMono *)pp;
15443 rv |= icmLuMonoBwd_curve(p, out, in);
15444 return rv;
15445 }
15446
15447 /* - - - - - - - - - - - - - - */
15448
15449 static void
15450 icmLuMono_delete(
15451 icmLuBase *p
15452 ) {
15453 icc *icp = p->icp;
15454
15455 icp->al->free(icp->al, p);
15456 }
15457
15458 static icmLuBase *
15459 new_icmLuMono(
15460 struct _icc *icp,
15461 icColorSpaceSignature inSpace, /* Native Input color space */
15462 icColorSpaceSignature outSpace, /* Native Output color space */
15463 icColorSpaceSignature pcs, /* Native PCS */
15464 icColorSpaceSignature e_inSpace, /* Effective Input color space */
15465 icColorSpaceSignature e_outSpace, /* Effective Output color space */
15466 icColorSpaceSignature e_pcs, /* Effective PCS */
15467 icRenderingIntent intent, /* Rendering intent */
15468 icmLookupFunc func, /* Functionality requested */
15469 int dir /* 0 = fwd, 1 = bwd */
15470 ) {
15471 icmLuMono *p;
15472
15473 if ((p = (icmLuMono *) icp->al->calloc(icp->al,1,sizeof(icmLuMono))) == NULL)
15474 return NULL;
15475 p->icp = icp;
15476 p->del = icmLuMono_delete;
15477 p->lutspaces= icmLutSpaces;
15478 p->spaces = icmLuSpaces;
15479 p->XYZ_Rel2Abs = icmLuXYZ_Rel2Abs;
15480 p->XYZ_Abs2Rel = icmLuXYZ_Abs2Rel;
15481 p->get_lutranges = icmLu_get_lutranges;
15482 p->get_ranges = icmLu_get_ranges;
15483 p->init_wh_bk = icmLuInit_Wh_bk;
15484 p->wh_bk_points = icmLuWh_bk_points;
15485 p->lu_wh_bk_points = icmLuLu_wh_bk_points;
15486 p->fwd_lookup = icmLuMonoFwd_lookup;
15487 p->fwd_curve = icmLuMonoFwd_curve;
15488 p->fwd_map = icmLuMonoFwd_map;
15489 p->fwd_abs = icmLuMonoFwd_abs;
15490 p->bwd_lookup = icmLuMonoBwd_lookup;
15491 p->bwd_abs = icmLuMonoFwd_abs;
15492 p->bwd_map = icmLuMonoFwd_map;
15493 p->bwd_curve = icmLuMonoFwd_curve;
15494 if (dir) {
15495 p->ttype = icmMonoBwdType;
15496 p->lookup = icmLuMonoBwd_lookup;
15497 p->lookup_in = icmLuMonoBwd_lookup_in;
15498 p->lookup_core = icmLuMonoBwd_lookup_core;
15499 p->lookup_out = icmLuMonoBwd_lookup_out;
15500 p->lookup_inv_in = icmLuMonoFwd_lookup_out; /* Opposite of Bwd_lookup_in */
15501 } else {
15502 p->ttype = icmMonoFwdType;
15503 p->lookup = icmLuMonoFwd_lookup;
15504 p->lookup_in = icmLuMonoFwd_lookup_in;
15505 p->lookup_core = icmLuMonoFwd_lookup_core;
15506 p->lookup_out = icmLuMonoFwd_lookup_out;
15507 p->lookup_inv_in = icmLuMonoBwd_lookup_out; /* Opposite of Fwd_lookup_in */
15508 }
15509
15510 /* Lookup the white and black points */
15511 if (p->init_wh_bk((icmLuBase *)p)) {
15512 p->del((icmLuBase *)p);
15513 return NULL;
15514 }
15515
15516 /* See if the color spaces are appropriate for the mono type */
15517 if (number_ColorSpaceSignature(icp->header->colorSpace) != 1
15518 || ( icp->header->pcs != icSigXYZData && icp->header->pcs != icSigLabData)) {
15519 p->del((icmLuBase *)p);
15520 return NULL;
15521 }
15522
15523 /* Find the appropriate tags */
15524 if ((p->grayCurve = (icmCurve *)icp->read_tag(icp, icSigGrayTRCTag)) == NULL
15525 || p->grayCurve->ttype != icSigCurveType) {
15526 p->del((icmLuBase *)p);
15527 return NULL;
15528 }
15529
15530 p->pcswht = icp->header->illuminant;
15531 p->intent = intent;
15532 p->function = func;
15533 p->inSpace = inSpace;
15534 p->outSpace = outSpace;
15535 p->pcs = pcs;
15536 p->e_inSpace = e_inSpace;
15537 p->e_outSpace = e_outSpace;
15538 p->e_pcs = e_pcs;
15539
15540 return (icmLuBase *)p;
15541 }
15542
15543 static icmLuBase *
15544 new_icmLuMonoFwd(
15545 struct _icc *icp,
15546 icColorSpaceSignature inSpace, /* Native Input color space */
15547 icColorSpaceSignature outSpace, /* Native Output color space */
15548 icColorSpaceSignature pcs, /* Native PCS */
15549 icColorSpaceSignature e_inSpace, /* Effective Input color space */
15550 icColorSpaceSignature e_outSpace, /* Effective Output color space */
15551 icColorSpaceSignature e_pcs, /* Effective PCS */
15552 icRenderingIntent intent, /* Rendering intent */
15553 icmLookupFunc func /* Functionality requested */
15554 ) {
15555 return new_icmLuMono(icp, inSpace, outSpace, pcs, e_inSpace, e_outSpace, e_pcs,
15556 intent, func, 0);
15557 }
15558
15559
15560 static icmLuBase *
15561 new_icmLuMonoBwd(
15562 struct _icc *icp,
15563 icColorSpaceSignature inSpace, /* Native Input color space */
15564 icColorSpaceSignature outSpace, /* Native Output color space */
15565 icColorSpaceSignature pcs, /* Native PCS */
15566 icColorSpaceSignature e_inSpace, /* Effective Input color space */
15567 icColorSpaceSignature e_outSpace, /* Effective Output color space */
15568 icColorSpaceSignature e_pcs, /* Effective PCS */
15569 icRenderingIntent intent, /* Rendering intent */
15570 icmLookupFunc func /* Functionality requested */
15571 ) {
15572 return new_icmLuMono(icp, inSpace, outSpace, pcs, e_inSpace, e_outSpace, e_pcs,
15573 intent, func, 1);
15574 }
15575
15576 /* - - - - - - - - - - - - - - - - - - - - - - - */
15577 /* Forward and Backward Matrix type conversion */
15578 /* Return 0 on success, 1 if clipping occured, 2 on other error */
15579
15580 /* Individual components of Fwd conversion: */
15581 static int
15582 icmLuMatrixFwd_curve (
15583 icmLuMatrix *p, /* This */
15584 double *out, /* Vector of output values */
15585 double *in /* Vector of input values */
15586 ) {
15587 icc *icp = p->icp;
15588 int rv = 0;
15589
15590 /* Curve lookups */
15591 if ((rv |= p->redCurve->lookup_fwd( p->redCurve, &out[0],&in[0])) > 1
15592 || (rv |= p->greenCurve->lookup_fwd(p->greenCurve,&out[1],&in[1])) > 1
15593 || (rv |= p->blueCurve->lookup_fwd( p->blueCurve, &out[2],&in[2])) > 1) {
15594 sprintf(icp->err,"icc_lookup: Curve->lookup_fwd() failed");
15595 icp->errc = rv;
15596 return 2;
15597 }
15598
15599 return rv;
15600 }
15601
15602 static int
15603 icmLuMatrixFwd_matrix (
15604 icmLuMatrix *p, /* This */
15605 double *out, /* Vector of output values */
15606 double *in /* Vector of input values */
15607 ) {
15608 int rv = 0;
15609 double tt[3];
15610
15611 /* Matrix */
15612 tt[0] = p->mx[0][0] * in[0] + p->mx[0][1] * in[1] + p->mx[0][2] * in[2];
15613 tt[1] = p->mx[1][0] * in[0] + p->mx[1][1] * in[1] + p->mx[1][2] * in[2];
15614 tt[2] = p->mx[2][0] * in[0] + p->mx[2][1] * in[1] + p->mx[2][2] * in[2];
15615
15616 out[0] = tt[0];
15617 out[1] = tt[1];
15618 out[2] = tt[2];
15619
15620 return rv;
15621 }
15622
15623 static int
15624 icmLuMatrixFwd_abs (/* Abs comes last in Fwd conversion */
15625 icmLuMatrix *p, /* This */
15626 double *out, /* Vector of output values */
15627 double *in /* Vector of input values */
15628 ) {
15629 int rv = 0;
15630
15631 if (out != in) { /* Don't alter input values */
15632 out[0] = in[0];
15633 out[1] = in[1];
15634 out[2] = in[2];
15635 }
15636
15637 /* If required, convert from Relative to Absolute colorimetric */
15638 if (p->intent == icAbsoluteColorimetric
15639 || p->intent == icmAbsolutePerceptual
15640 || p->intent == icmAbsoluteSaturation) {
15641 icmMulBy3x3(out, p->toAbs, out);
15642 }
15643
15644 /* If e_pcs is Lab, then convert XYZ to Lab */
15645 if (p->e_pcs == icSigLabData)
15646 icmXYZ2Lab(&p->pcswht, out, out);
15647
15648 return rv;
15649 }
15650
15651
15652 /* Overall Fwd conversion (Dev->PCS)*/
15653 static int
15654 icmLuMatrixFwd_lookup (
15655 icmLuBase *pp, /* This */
15656 double *out, /* Vector of output values */
15657 double *in /* Vector of input values */
15658 ) {
15659 int rv = 0;
15660 icmLuMatrix *p = (icmLuMatrix *)pp;
15661 rv |= icmLuMatrixFwd_curve(p, out, in);
15662 rv |= icmLuMatrixFwd_matrix(p, out, out);
15663 rv |= icmLuMatrixFwd_abs(p, out, out);
15664 return rv;
15665 }
15666
15667 /* Three stage conversion routines */
15668 static int
15669 icmLuMatrixFwd_lookup_in (
15670 icmLuBase *pp, /* This */
15671 double *out, /* Vector of output values */
15672 double *in /* Vector of input values */
15673 ) {
15674 int rv = 0;
15675 icmLuMatrix *p = (icmLuMatrix *)pp;
15676 rv |= icmLuMatrixFwd_curve(p, out, in);
15677 return rv;
15678 }
15679
15680 static int
15681 icmLuMatrixFwd_lookup_core (
15682 icmLuBase *pp, /* This */
15683 double *out, /* Vector of output values */
15684 double *in /* Vector of input values */
15685 ) {
15686 int rv = 0;
15687 icmLuMatrix *p = (icmLuMatrix *)pp;
15688 rv |= icmLuMatrixFwd_matrix(p, out, in);
15689 rv |= icmLuMatrixFwd_abs(p, out, out);
15690 return rv;
15691 }
15692
15693 static int
15694 icmLuMatrixFwd_lookup_out (
15695 icmLuBase *pp, /* This */
15696 double *out, /* Vector of output values */
15697 double *in /* Vector of input values */
15698 ) {
15699 int rv = 0;
15700 out[0] = in[0];
15701 out[1] = in[1];
15702 out[2] = in[2];
15703 return rv;
15704 }
15705
15706 /* - - - - - - - - - - - - - - */
15707 /* Individual components of Bwd conversion: */
15708
15709 static int
15710 icmLuMatrixBwd_abs (/* Abs comes first in Bwd conversion */
15711 icmLuMatrix *p, /* This */
15712 double *out, /* Vector of output values */
15713 double *in /* Vector of input values */
15714 ) {
15715 int rv = 0;
15716
15717 if (out != in) { /* Don't alter input values */
15718 out[0] = in[0];
15719 out[1] = in[1];
15720 out[2] = in[2];
15721 }
15722
15723 /* If e_pcs is Lab, then convert Lab to XYZ */
15724 if (p->e_pcs == icSigLabData)
15725 icmLab2XYZ(&p->pcswht, out, out);
15726
15727 /* If required, convert from Absolute to Relative colorimetric */
15728 if (p->intent == icAbsoluteColorimetric
15729 || p->intent == icmAbsolutePerceptual
15730 || p->intent == icmAbsoluteSaturation) {
15731 icmMulBy3x3(out, p->fromAbs, out);
15732 }
15733
15734 return rv;
15735 }
15736
15737 static int
15738 icmLuMatrixBwd_matrix (
15739 icmLuMatrix *p, /* This */
15740 double *out, /* Vector of output values */
15741 double *in /* Vector of input values */
15742 ) {
15743 int rv = 0;
15744 double tt[3];
15745
15746 tt[0] = in[0];
15747 tt[1] = in[1];
15748 tt[2] = in[2];
15749
15750 /* Matrix */
15751 out[0] = p->bmx[0][0] * tt[0] + p->bmx[0][1] * tt[1] + p->bmx[0][2] * tt[2];
15752 out[1] = p->bmx[1][0] * tt[0] + p->bmx[1][1] * tt[1] + p->bmx[1][2] * tt[2];
15753 out[2] = p->bmx[2][0] * tt[0] + p->bmx[2][1] * tt[1] + p->bmx[2][2] * tt[2];
15754
15755 return rv;
15756 }
15757
15758 static int
15759 icmLuMatrixBwd_curve (
15760 icmLuMatrix *p, /* This */
15761 double *out, /* Vector of output values */
15762 double *in /* Vector of input values */
15763 ) {
15764 icc *icp = p->icp;
15765 int rv = 0;
15766
15767 /* Curves */
15768 if ((rv |= p->redCurve->lookup_bwd(p->redCurve,&out[0],&in[0])) > 1
15769 || (rv |= p->greenCurve->lookup_bwd(p->greenCurve,&out[1],&in[1])) > 1
15770 || (rv |= p->blueCurve->lookup_bwd(p->blueCurve,&out[2],&in[2])) > 1) {
15771 sprintf(icp->err,"icc_lookup: Curve->lookup_bwd() failed");
15772 icp->errc = rv;
15773 return 2;
15774 }
15775 return rv;
15776 }
15777
15778 /* Overall Bwd conversion (PCS->Dev) */
15779 static int
15780 icmLuMatrixBwd_lookup (
15781 icmLuBase *pp, /* This */
15782 double *out, /* Vector of output values */
15783 double *in /* Vector of input values */
15784 ) {
15785 int rv = 0;
15786 icmLuMatrix *p = (icmLuMatrix *)pp;
15787 rv |= icmLuMatrixBwd_abs(p, out, in);
15788 rv |= icmLuMatrixBwd_matrix(p, out, out);
15789 rv |= icmLuMatrixBwd_curve(p, out, out);
15790 return rv;
15791 }
15792
15793 /* Three stage conversion routines */
15794 static int
15795 icmLuMatrixBwd_lookup_in (
15796 icmLuBase *pp, /* This */
15797 double *out, /* Vector of output values */
15798 double *in /* Vector of input values */
15799 ) {
15800 int rv = 0;
15801 out[0] = in[0];
15802 out[1] = in[1];
15803 out[2] = in[2];
15804 return rv;
15805 }
15806
15807 static int
15808 icmLuMatrixBwd_lookup_core (
15809 icmLuBase *pp, /* This */
15810 double *out, /* Vector of output values */
15811 double *in /* Vector of input values */
15812 ) {
15813 int rv = 0;
15814 icmLuMatrix *p = (icmLuMatrix *)pp;
15815 rv |= icmLuMatrixBwd_abs(p, out, in);
15816 rv |= icmLuMatrixBwd_matrix(p, out, out);
15817 return rv;
15818 }
15819
15820 static int
15821 icmLuMatrixBwd_lookup_out (
15822 icmLuBase *pp, /* This */
15823 double *out, /* Vector of output values */
15824 double *in /* Vector of input values */
15825 ) {
15826 int rv = 0;
15827 icmLuMatrix *p = (icmLuMatrix *)pp;
15828 rv |= icmLuMatrixBwd_curve(p, out, in);
15829 return rv;
15830 }
15831
15832 /* - - - - - - - - - - - - - - */
15833
15834 static void
15835 icmLuMatrix_delete(
15836 icmLuBase *p
15837 ) {
15838 icc *icp = p->icp;
15839
15840 icp->al->free(icp->al, p);
15841 }
15842
15843 /* We setup valid fwd and bwd component conversions, */
15844 /* but setup only the asked for overal conversion. */
15845 static icmLuBase *
15846 new_icmLuMatrix(
15847 struct _icc *icp,
15848 icColorSpaceSignature inSpace, /* Native Input color space */
15849 icColorSpaceSignature outSpace, /* Native Output color space */
15850 icColorSpaceSignature pcs, /* Native PCS */
15851 icColorSpaceSignature e_inSpace, /* Effective Input color space */
15852 icColorSpaceSignature e_outSpace, /* Effective Output color space */
15853 icColorSpaceSignature e_pcs, /* Effective PCS */
15854 icRenderingIntent intent, /* Rendering intent */
15855 icmLookupFunc func, /* Functionality requested */
15856 int dir /* 0 = fwd, 1 = bwd */
15857 ) {
15858 icmLuMatrix *p;
15859
15860 if ((p = (icmLuMatrix *) icp->al->calloc(icp->al,1,sizeof(icmLuMatrix))) == NULL)
15861 return NULL;
15862 p->icp = icp;
15863 p->del = icmLuMatrix_delete;
15864 p->lutspaces= icmLutSpaces;
15865 p->spaces = icmLuSpaces;
15866 p->XYZ_Rel2Abs = icmLuXYZ_Rel2Abs;
15867 p->XYZ_Abs2Rel = icmLuXYZ_Abs2Rel;
15868 p->get_lutranges = icmLu_get_lutranges;
15869 p->get_ranges = icmLu_get_ranges;
15870 p->init_wh_bk = icmLuInit_Wh_bk;
15871 p->wh_bk_points = icmLuWh_bk_points;
15872 p->lu_wh_bk_points = icmLuLu_wh_bk_points;
15873 p->fwd_lookup = icmLuMatrixFwd_lookup;
15874 p->fwd_curve = icmLuMatrixFwd_curve;
15875 p->fwd_matrix = icmLuMatrixFwd_matrix;
15876 p->fwd_abs = icmLuMatrixFwd_abs;
15877 p->bwd_lookup = icmLuMatrixBwd_lookup;
15878 p->bwd_abs = icmLuMatrixBwd_abs;
15879 p->bwd_matrix = icmLuMatrixBwd_matrix;
15880 p->bwd_curve = icmLuMatrixBwd_curve;
15881 if (dir) {
15882 p->ttype = icmMatrixBwdType;
15883 p->lookup = icmLuMatrixBwd_lookup;
15884 p->lookup_in = icmLuMatrixBwd_lookup_in;
15885 p->lookup_core = icmLuMatrixBwd_lookup_core;
15886 p->lookup_out = icmLuMatrixBwd_lookup_out;
15887 p->lookup_inv_in = icmLuMatrixFwd_lookup_out; /* Opposite of Bwd_lookup_in */
15888 } else {
15889 p->ttype = icmMatrixFwdType;
15890 p->lookup = icmLuMatrixFwd_lookup;
15891 p->lookup_in = icmLuMatrixFwd_lookup_in;
15892 p->lookup_core = icmLuMatrixFwd_lookup_core;
15893 p->lookup_out = icmLuMatrixFwd_lookup_out;
15894 p->lookup_inv_in = icmLuMatrixBwd_lookup_out; /* Opposite of Fwd_lookup_in */
15895 }
15896
15897 /* Lookup the white and black points */
15898 if (p->init_wh_bk((icmLuBase *)p)) {
15899 p->del((icmLuBase *)p);
15900 return NULL;
15901 }
15902
15903 /* Note that we can use matrix type even if PCS is Lab, */
15904 /* by simply converting it. */
15905
15906 /* Find the appropriate tags */
15907 if ((p->redCurve = (icmCurve *)icp->read_tag(icp, icSigRedTRCTag)) == NULL
15908 || p->redCurve->ttype != icSigCurveType
15909 || (p->greenCurve = (icmCurve *)icp->read_tag(icp, icSigGreenTRCTag)) == NULL
15910 || p->greenCurve->ttype != icSigCurveType
15911 || (p->blueCurve = (icmCurve *)icp->read_tag(icp, icSigBlueTRCTag)) == NULL
15912 || p->blueCurve->ttype != icSigCurveType
15913 || (p->redColrnt = (icmXYZArray *)icp->read_tag(icp, icSigRedColorantTag)) == NULL
15914 || p->redColrnt->ttype != icSigXYZType || p->redColrnt->size < 1
15915 || (p->greenColrnt = (icmXYZArray *)icp->read_tag(icp, icSigGreenColorantTag)) == NULL
15916 || p->greenColrnt->ttype != icSigXYZType || p->greenColrnt->size < 1
15917 || (p->blueColrnt = (icmXYZArray *)icp->read_tag(icp, icSigBlueColorantTag)) == NULL
15918 || p->blueColrnt->ttype != icSigXYZType || p->blueColrnt->size < 1) {
15919 p->del((icmLuBase *)p);
15920 return NULL;
15921 }
15922
15923 /* Setup the matrix */
15924 p->mx[0][0] = p->redColrnt->data[0].X;
15925 p->mx[0][1] = p->greenColrnt->data[0].X;
15926 p->mx[0][2] = p->blueColrnt->data[0].X;
15927 p->mx[1][1] = p->greenColrnt->data[0].Y;
15928 p->mx[1][0] = p->redColrnt->data[0].Y;
15929 p->mx[1][2] = p->blueColrnt->data[0].Y;
15930 p->mx[2][1] = p->greenColrnt->data[0].Z;
15931 p->mx[2][0] = p->redColrnt->data[0].Z;
15932 p->mx[2][2] = p->blueColrnt->data[0].Z;
15933
15934 #ifndef ICM_STRICT
15935 /* Workaround for buggy Kodak RGB profiles. Their matrix values */
15936 /* may be scaled to 100 rather than 1.0, and the colorant curves */
15937 /* may be scaled by 0.5 */
15938 if (icp->header->cmmId == str2tag("KCMS")) {
15939 int i, j, oc = 0;
15940 for (i = 0; i < 3; i++)
15941 for (j = 0; j < 3; j++)
15942 if (p->mx[i][j] > 5.0)
15943 oc++;
15944 if (oc > 4) { /* Looks like it */
15945 for (i = 0; i < 3; i++)
15946 for (j = 0; j < 3; j++)
15947 p->mx[i][j] /= 100.0;
15948 }
15949 }
15950 #endif /* ICM_STRICT */
15951
15952 if (icmInverse3x3(p->bmx, p->mx) != 0) { /* Compute inverse */
15953 sprintf(icp->err,"icc_new_iccLuMatrix: Matrix wasn't invertable");
15954 icp->errc = 2;
15955 p->del((icmLuBase *)p);
15956 return NULL;
15957 }
15958
15959 p->pcswht = icp->header->illuminant;
15960 p->intent = intent;
15961 p->function = func;
15962 p->inSpace = inSpace;
15963 p->outSpace = outSpace;
15964 p->pcs = pcs;
15965 p->e_inSpace = e_inSpace;
15966 p->e_outSpace = e_outSpace;
15967 p->e_pcs = e_pcs;
15968
15969 /* Lookup the white and black points */
15970 if (p->init_wh_bk((icmLuBase *)p)) {
15971 p->del((icmLuBase *)p);
15972 return NULL;
15973 }
15974
15975 return (icmLuBase *)p;
15976 }
15977
15978 static icmLuBase *
15979 new_icmLuMatrixFwd(
15980 struct _icc *icp,
15981 icColorSpaceSignature inSpace, /* Native Input color space */
15982 icColorSpaceSignature outSpace, /* Native Output color space */
15983 icColorSpaceSignature pcs, /* Native PCS */
15984 icColorSpaceSignature e_inSpace, /* Effective Input color space */
15985 icColorSpaceSignature e_outSpace, /* Effective Output color space */
15986 icColorSpaceSignature e_pcs, /* Effective PCS */
15987 icRenderingIntent intent, /* Rendering intent */
15988 icmLookupFunc func /* Functionality requested */
15989 ) {
15990 return new_icmLuMatrix(icp, inSpace, outSpace, pcs, e_inSpace, e_outSpace, e_pcs,
15991 intent, func, 0);
15992 }
15993
15994
15995 static icmLuBase *
15996 new_icmLuMatrixBwd(
15997 struct _icc *icp,
15998 icColorSpaceSignature inSpace, /* Native Input color space */
15999 icColorSpaceSignature outSpace, /* Native Output color space */
16000 icColorSpaceSignature pcs, /* Native PCS */
16001 icColorSpaceSignature e_inSpace, /* Effective Input color space */
16002 icColorSpaceSignature e_outSpace, /* Effective Output color space */
16003 icColorSpaceSignature e_pcs, /* Effective PCS */
16004 icRenderingIntent intent, /* Rendering intent */
16005 icmLookupFunc func /* Functionality requested */
16006 ) {
16007 return new_icmLuMatrix(icp, inSpace, outSpace, pcs, e_inSpace, e_outSpace, e_pcs,
16008 intent, func, 1);
16009 }
16010
16011 /* - - - - - - - - - - - - - - - - - - - - - - - */
16012 /* Forward and Backward Multi-Dimensional Interpolation type conversion */
16013 /* Return 0 on success, 1 if clipping occured, 2 on other error */
16014
16015 /* Components of overall lookup, in order */
16016 static int icmLuLut_in_abs(icmLuLut *p, double *out, double *in) {
16017 icmLut *lut = p->lut;
16018 int rv = 0;
16019
16020 DBLLL(("icm in_abs: input %s\n",icmPdv(lut->inputChan, in)));
16021 if (out != in) {
16022 unsigned int i;
16023 for (i = 0; i < lut->inputChan; i++) /* Don't alter input values */
16024 out[i] = in[i];
16025 }
16026
16027 /* If Bwd Lut, take care of Absolute color space and effective input space */
16028 if ((p->function == icmBwd || p->function == icmGamut || p->function == icmPreview)
16029 && (p->intent == icAbsoluteColorimetric
16030 || p->intent == icmAbsolutePerceptual
16031 || p->intent == icmAbsoluteSaturation)) {
16032
16033 if (p->e_inSpace == icSigLabData) {
16034 icmLab2XYZ(&p->pcswht, out, out);
16035 DBLLL(("icm in_abs: after Lab2XYZ %s\n",icmPdv(lut->inputChan, out)));
16036 }
16037
16038 /* Convert from Absolute to Relative colorimetric */
16039 icmMulBy3x3(out, p->fromAbs, out);
16040 DBLLL(("icm in_abs: after fromAbs %s\n",icmPdv(lut->inputChan, out)));
16041
16042 if (p->inSpace == icSigLabData) {
16043 icmXYZ2Lab(&p->pcswht, out, out);
16044 DBLLL(("icm in_abs: after XYZ2Lab %s\n",icmPdv(lut->inputChan, out)));
16045 }
16046
16047 } else {
16048
16049 /* Convert from Effective to Native input space */
16050 if (p->e_inSpace == icSigLabData && p->inSpace == icSigXYZData) {
16051 icmLab2XYZ(&p->pcswht, out, out);
16052 DBLLL(("icm in_abs: after Lab2XYZ %s\n",icmPdv(lut->inputChan, out)));
16053 } else if (p->e_inSpace == icSigXYZData && p->inSpace == icSigLabData) {
16054 icmXYZ2Lab(&p->pcswht, out, out);
16055 DBLLL(("icm in_abs: after XYZ2Lab %s\n",icmPdv(lut->inputChan, out)));
16056 }
16057 }
16058 DBLLL(("icm in_abs: returning %s\n",icmPdv(lut->inputChan, out)));
16059
16060 return rv;
16061 }
16062
16063 /* Possible matrix lookup */
16064 static int icmLuLut_matrix(icmLuLut *p, double *out, double *in) {
16065 icmLut *lut = p->lut;
16066 int rv = 0;
16067
16068 if (p->usematrix)
16069 rv |= lut->lookup_matrix(lut,out,in);
16070 else if (out != in) {
16071 unsigned int i;
16072 for (i = 0; i < lut->inputChan; i++)
16073 out[i] = in[i];
16074 }
16075 return rv;
16076 }
16077
16078 /* Do input -> input' lookup */
16079 static int icmLuLut_input(icmLuLut *p, double *out, double *in) {
16080 icmLut *lut = p->lut;
16081 int rv = 0;
16082
16083 p->in_normf(out, in); /* Normalize from input color space */
16084 rv |= lut->lookup_input(lut,out,out); /* Lookup though input tables */
16085 p->in_denormf(out,out); /* De-normalize to input color space */
16086 return rv;
16087 }
16088
16089 /* Do input'->output' lookup */
16090 static int icmLuLut_clut(icmLuLut *p, double *out, double *in) {
16091 icmLut *lut = p->lut;
16092 double temp[MAX_CHAN];
16093 int rv = 0;
16094
16095 p->in_normf(temp, in); /* Normalize from input color space */
16096 rv |= p->lookup_clut(lut,out,temp); /* Lookup though clut tables */
16097 p->out_denormf(out,out); /* De-normalize to output color space */
16098 return rv;
16099 }
16100
16101 /* Do output'->output lookup */
16102 static int icmLuLut_output(icmLuLut *p, double *out, double *in) {
16103 icmLut *lut = p->lut;
16104 int rv = 0;
16105
16106 p->out_normf(out,in); /* Normalize from output color space */
16107 rv |= lut->lookup_output(lut,out,out); /* Lookup though output tables */
16108 p->out_denormf(out, out); /* De-normalize to output color space */
16109 return rv;
16110 }
16111
16112 static int icmLuLut_out_abs(icmLuLut *p, double *out, double *in) {
16113 icmLut *lut = p->lut;
16114 int rv = 0;
16115
16116 DBLLL(("icm out_abs: input %s\n",icmPdv(lut->outputChan, in)));
16117 if (out != in) {
16118 unsigned int i;
16119 for (i = 0; i < lut->outputChan; i++) /* Don't alter input values */
16120 out[i] = in[i];
16121 }
16122
16123 /* If Fwd Lut, take care of Absolute color space */
16124 /* and convert from native to effective out PCS */
16125 if ((p->function == icmFwd || p->function == icmPreview)
16126 && (p->intent == icAbsoluteColorimetric
16127 || p->intent == icmAbsolutePerceptual
16128 || p->intent == icmAbsoluteSaturation)) {
16129
16130 if (p->outSpace == icSigLabData) {
16131 icmLab2XYZ(&p->pcswht, out, out);
16132 DBLLL(("icm out_abs: after Lab2XYZ %s\n",icmPdv(lut->outputChan, out)));
16133 }
16134
16135 /* Convert from Relative to Absolute colorimetric XYZ */
16136 icmMulBy3x3(out, p->toAbs, out);
16137 DBLLL(("icm out_abs: after toAbs %s\n",icmPdv(lut->outputChan, out)));
16138
16139 if (p->e_outSpace == icSigLabData) {
16140 icmXYZ2Lab(&p->pcswht, out, out);
16141 DBLLL(("icm out_abs: after XYZ2Lab %s\n",icmPdv(lut->outputChan, out)));
16142 }
16143 } else {
16144
16145 /* Convert from Native to Effective output space */
16146 if (p->outSpace == icSigLabData && p->e_outSpace == icSigXYZData) {
16147 icmLab2XYZ(&p->pcswht, out, out);
16148 DBLLL(("icm out_abs: after Lab2 %s\n",icmPdv(lut->outputChan, out)));
16149 } else if (p->outSpace == icSigXYZData && p->e_outSpace == icSigLabData) {
16150 icmXYZ2Lab(&p->pcswht, out, out);
16151 DBLLL(("icm out_abs: after XYZ2Lab %s\n",icmPdv(lut->outputChan, out)));
16152 }
16153 }
16154 DBLLL(("icm out_abs: returning %s\n",icmPdv(lut->outputChan, out)));
16155 return rv;
16156 }
16157
16158
16159 /* Overall lookup */
16160 static int
16161 icmLuLut_lookup (
16162 icmLuBase *pp, /* This */
16163 double *out, /* Vector of output values */
16164 double *in /* Vector of input values */
16165 ) {
16166 int rv = 0;
16167 icmLuLut *p = (icmLuLut *)pp;
16168 icmLut *lut = p->lut;
16169 double temp[MAX_CHAN];
16170
16171 DBGLL(("icmLuLut_lookup: in = %s\n", icmPdv(p->inputChan, in)));
16172 rv |= p->in_abs(p,temp,in); /* Possible absolute conversion */
16173 DBGLL(("icmLuLut_lookup: in_abs = %s\n", icmPdv(p->inputChan, temp)));
16174 if (p->usematrix) {
16175 rv |= lut->lookup_matrix(lut,temp,temp);/* If XYZ, multiply by non-unity matrix */
16176 DBGLL(("icmLuLut_lookup: matrix = %s\n", icmPdv(p->inputChan, temp)));
16177 }
16178 p->in_normf(temp, temp); /* Normalize for input color space */
16179 DBGLL(("icmLuLut_lookup: norm = %s\n", icmPdv(p->inputChan, temp)));
16180 rv |= lut->lookup_input(lut,temp,temp); /* Lookup though input tables */
16181 DBGLL(("icmLuLut_lookup: input = %s\n", icmPdv(p->inputChan, temp)));
16182 rv |= p->lookup_clut(lut,out,temp); /* Lookup though clut tables */
16183 DBGLL(("icmLuLut_lookup: clut = %s\n", icmPdv(p->outputChan, out)));
16184 rv |= lut->lookup_output(lut,out,out); /* Lookup though output tables */
16185 DBGLL(("icmLuLut_lookup: output = %s\n", icmPdv(p->outputChan, out)));
16186 p->out_denormf(out,out); /* Normalize for output color space */
16187 DBGLL(("icmLuLut_lookup: denorm = %s\n", icmPdv(p->outputChan, out)));
16188 rv |= p->out_abs(p,out,out); /* Possible absolute conversion */
16189 DBGLL(("icmLuLut_lookup: out_abse = %s\n", icmPdv(p->outputChan, out)));
16190
16191 return rv;
16192 }
16193
16194 #ifdef NEVER /* The following should be identical in effect to the above. */
16195
16196 /* Overall lookup */
16197 static int
16198 icmLuLut_lookup (
16199 icmLuBase *pp, /* This */
16200 double *out, /* Vector of output values */
16201 double *in /* Vector of input values */
16202 ) {
16203 int i, rv = 0;
16204 icmLuLut *p = (icmLuLut *)pp;
16205 icmLut *lut = p->lut;
16206 double temp[MAX_CHAN];
16207
16208 rv |= p->in_abs(p,temp,in);
16209 rv |= p->matrix(p,temp,temp);
16210 rv |= p->input(p,temp,temp);
16211 rv |= p->clut(p,out,temp);
16212 rv |= p->output(p,out,out);
16213 rv |= p->out_abs(p,out,out);
16214
16215 return rv;
16216 }
16217
16218 #endif /* NEVER */
16219
16220 /* Three stage conversion */
16221 static int
16222 icmLuLut_lookup_in (
16223 icmLuBase *pp, /* This */
16224 double *out, /* Vector of output values */
16225 double *in /* Vector of input values */
16226 ) {
16227 int rv = 0;
16228 icmLuLut *p = (icmLuLut *)pp;
16229 icmLut *lut = p->lut;
16230
16231 /* If in_abs() or matrix() are active, then we can't have a per component input curve */
16232 if (((p->function == icmBwd || p->function == icmGamut || p->function == icmPreview)
16233 && (p->intent == icAbsoluteColorimetric
16234 || p->intent == icmAbsolutePerceptual
16235 || p->intent == icmAbsoluteSaturation))
16236 || (p->e_inSpace != p->inSpace)
16237 || (p->usematrix)) {
16238 unsigned int i;
16239 for (i = 0; i < lut->inputChan; i++)
16240 out[i] = in[i];
16241 } else {
16242 rv |= p->input(p,out,in);
16243 }
16244 return rv;
16245 }
16246
16247 static int
16248 icmLuLut_lookup_core (
16249 icmLuBase *pp, /* This */
16250 double *out, /* Vector of output values */
16251 double *in /* Vector of input values */
16252 ) {
16253 int rv = 0;
16254 icmLuLut *p = (icmLuLut *)pp;
16255
16256 /* If in_abs() or matrix() are active, then we have to do the per component input curve here */
16257 if (((p->function == icmBwd || p->function == icmGamut || p->function == icmPreview)
16258 && (p->intent == icAbsoluteColorimetric
16259 || p->intent == icmAbsolutePerceptual
16260 || p->intent == icmAbsoluteSaturation))
16261 || (p->e_inSpace != p->inSpace)
16262 || (p->usematrix)) {
16263 double temp[MAX_CHAN];
16264 rv |= p->in_abs(p,temp,in);
16265 rv |= p->matrix(p,temp,temp);
16266 rv |= p->input(p,temp,temp);
16267 rv |= p->clut(p,out,temp);
16268 } else {
16269 rv |= p->clut(p,out,in);
16270 }
16271
16272 /* If out_abs() is active, then we can't have do per component out curve here */
16273 if (((p->function == icmFwd || p->function == icmPreview)
16274 && (p->intent == icAbsoluteColorimetric
16275 || p->intent == icmAbsolutePerceptual
16276 || p->intent == icmAbsoluteSaturation))
16277 || (p->outSpace != p->e_outSpace)) {
16278 rv |= p->output(p,out,out);
16279 rv |= p->out_abs(p,out,out);
16280 }
16281
16282 return rv;
16283 }
16284
16285 static int
16286 icmLuLut_lookup_out (
16287 icmLuBase *pp, /* This */
16288 double *out, /* Vector of output values */
16289 double *in /* Vector of input values */
16290 ) {
16291 int rv = 0;
16292 icmLuLut *p = (icmLuLut *)pp;
16293 icmLut *lut = p->lut;
16294
16295 /* If out_abs() is active, then we can't have a per component out curve */
16296 if (((p->function == icmFwd || p->function == icmPreview)
16297 && (p->intent == icAbsoluteColorimetric
16298 || p->intent == icmAbsolutePerceptual
16299 || p->intent == icmAbsoluteSaturation))
16300 || (p->outSpace != p->e_outSpace)) {
16301 unsigned int i;
16302 for (i = 0; i < lut->outputChan; i++)
16303 out[i] = in[i];
16304 } else {
16305 rv |= p->output(p,out,in);
16306 }
16307
16308 return rv;
16309 }
16310
16311 /* Inverse three stage conversion (partly implemented) */
16312 static int
16313 icmLuLut_lookup_inv_in (
16314 icmLuBase *pp, /* This */
16315 double *out, /* Vector of output values */
16316 double *in /* Vector of input values */
16317 ) {
16318 int rv = 0;
16319 icmLuLut *p = (icmLuLut *)pp;
16320 icmLut *lut = p->lut;
16321
16322 /* If in_abs() or matrix() are active, then we can't have a per component input curve */
16323 if (((p->function == icmBwd || p->function == icmGamut || p->function == icmPreview)
16324 && (p->intent == icAbsoluteColorimetric
16325 || p->intent == icmAbsolutePerceptual
16326 || p->intent == icmAbsoluteSaturation))
16327 || (p->e_inSpace != p->inSpace)
16328 || (p->usematrix)) {
16329 unsigned int i;
16330 for (i = 0; i < lut->inputChan; i++)
16331 out[i] = in[i];
16332 } else {
16333 rv |= p->inv_input(p,out,in);
16334 }
16335 return rv;
16336 }
16337
16338 /* - - - - - - - - - - - - - - - - - - - - - - - - - - */
16339 /* Some components of inverse lookup, in order */
16340 /* ~~ should these be in icmLut (like all the fwd transforms)? */
16341
16342 static int icmLuLut_inv_out_abs(icmLuLut *p, double *out, double *in) {
16343 icmLut *lut = p->lut;
16344 int rv = 0;
16345
16346 DBLLL(("icm inv_out_abs: input %s\n",icmPdv(lut->outputChan, in)));
16347 if (out != in) {
16348 unsigned int i;
16349 for (i = 0; i < lut->outputChan; i++) /* Don't alter input values */
16350 out[i] = in[i];
16351 }
16352
16353 /* If Fwd Lut, take care of Absolute color space */
16354 /* and convert from effective to native inverse output PCS */
16355 /* OutSpace must be PCS: XYZ or Lab */
16356 if ((p->function == icmFwd || p->function == icmPreview)
16357 && (p->intent == icAbsoluteColorimetric
16358 || p->intent == icmAbsolutePerceptual
16359 || p->intent == icmAbsoluteSaturation)) {
16360
16361 if (p->e_outSpace == icSigLabData) {
16362 icmLab2XYZ(&p->pcswht, out, out);
16363 DBLLL(("icm inv_out_abs: after Lab2XYZ %s\n",icmPdv(lut->outputChan, out)));
16364 }
16365
16366 /* Convert from Absolute to Relative colorimetric */
16367 icmMulBy3x3(out, p->fromAbs, out);
16368 DBLLL(("icm inv_out_abs: after fromAbs %s\n",icmPdv(lut->outputChan, out)));
16369
16370 if (p->outSpace == icSigLabData) {
16371 icmXYZ2Lab(&p->pcswht, out, out);
16372 DBLLL(("icm inv_out_abs: after XYZ2Lab %s\n",icmPdv(lut->outputChan, out)));
16373 }
16374
16375 } else {
16376
16377 /* Convert from Effective to Native output space */
16378 if (p->e_outSpace == icSigLabData && p->outSpace == icSigXYZData) {
16379 icmLab2XYZ(&p->pcswht, out, out);
16380 DBLLL(("icm inv_out_abs: after Lab2XYZ %s\n",icmPdv(lut->outputChan, out)));
16381 } else if (p->e_outSpace == icSigXYZData && p->outSpace == icSigLabData) {
16382 icmXYZ2Lab(&p->pcswht, out, out);
16383 DBLLL(("icm inv_out_abs: after XYZ2Lab %s\n",icmPdv(lut->outputChan, out)));
16384 }
16385 }
16386 return rv;
16387 }
16388
16389 /* Do output->output' inverse lookup */
16390 static int icmLuLut_inv_output(icmLuLut *p, double *out, double *in) {
16391 icc *icp = p->icp;
16392 icmLut *lut = p->lut;
16393 int i;
16394 int rv = 0;
16395
16396 if (lut->rot[0].inited == 0) {
16397 for (i = 0; i < lut->outputChan; i++) {
16398 rv = icmTable_setup_bwd(icp, &lut->rot[i], lut->outputEnt,
16399 lut->outputTable + i * lut->outputEnt);
16400 if (rv != 0) {
16401 sprintf(icp->err,"icc_Lut_inv_input: Malloc failure in inverse lookup init.");
16402 return icp->errc = rv;
16403 }
16404 }
16405 }
16406
16407 p->out_normf(out,in); /* Normalize from output color space */
16408 for (i = 0; i < lut->outputChan; i++) {
16409 /* Reverse lookup though output tables */
16410 rv |= icmTable_lookup_bwd(&lut->rot[i], &out[i], &out[i]);
16411 }
16412 p->out_denormf(out, out); /* De-normalize to output color space */
16413 return rv;
16414 }
16415
16416 /* No output' -> input inverse lookup. */
16417 /* This is non-trivial ! */
16418
16419 /* Do input' -> input inverse lookup */
16420 static int icmLuLut_inv_input(icmLuLut *p, double *out, double *in) {
16421 icc *icp = p->icp;
16422 icmLut *lut = p->lut;
16423 int i;
16424 int rv = 0;
16425
16426 if (lut->rit[0].inited == 0) {
16427 for (i = 0; i < lut->inputChan; i++) {
16428 rv = icmTable_setup_bwd(icp, &lut->rit[i], lut->inputEnt,
16429 lut->inputTable + i * lut->inputEnt);
16430 if (rv != 0) {
16431 sprintf(icp->err,"icc_Lut_inv_input: Malloc failure in inverse lookup init.");
16432 return icp->errc = rv;
16433 }
16434 }
16435 }
16436
16437 p->in_normf(out, in); /* Normalize from input color space */
16438 for (i = 0; i < lut->inputChan; i++) {
16439 /* Reverse lookup though input tables */
16440 rv |= icmTable_lookup_bwd(&lut->rit[i], &out[i], &out[i]);
16441 }
16442 p->in_denormf(out,out); /* De-normalize to input color space */
16443 return rv;
16444 }
16445
16446 /* Possible inverse matrix lookup */
16447 static int icmLuLut_inv_matrix(icmLuLut *p, double *out, double *in) {
16448 icc *icp = p->icp;
16449 icmLut *lut = p->lut;
16450 int rv = 0;
16451
16452 if (p->usematrix) {
16453 double tt[3];
16454 if (p->imx_valid == 0) {
16455 if (icmInverse3x3(p->imx, lut->e) != 0) { /* Compute inverse */
16456 sprintf(icp->err,"icc_new_iccLuMatrix: Matrix wasn't invertable");
16457 icp->errc = 2;
16458 return 2;
16459 }
16460 p->imx_valid = 1;
16461 }
16462 /* Matrix multiply */
16463 tt[0] = p->imx[0][0] * in[0] + p->imx[0][1] * in[1] + p->imx[0][2] * in[2];
16464 tt[1] = p->imx[1][0] * in[0] + p->imx[1][1] * in[1] + p->imx[1][2] * in[2];
16465 tt[2] = p->imx[2][0] * in[0] + p->imx[2][1] * in[1] + p->imx[2][2] * in[2];
16466 out[0] = tt[0], out[1] = tt[1], out[2] = tt[2];
16467 } else if (out != in) {
16468 unsigned int i;
16469 for (i = 0; i < lut->inputChan; i++)
16470 out[i] = in[i];
16471 }
16472 return rv;
16473 }
16474
16475 static int icmLuLut_inv_in_abs(icmLuLut *p, double *out, double *in) {
16476 icmLut *lut = p->lut;
16477 int rv = 0;
16478
16479 DBLLL(("icm inv_in_abs: input %s\n",icmPdv(lut->inputChan, in)));
16480 if (out != in) {
16481 unsigned int i;
16482 for (i = 0; i < lut->inputChan; i++) /* Don't alter input values */
16483 out[i] = in[i];
16484 }
16485
16486 /* If Bwd Lut, take care of Absolute color space, and */
16487 /* convert from native to effective input space */
16488 if ((p->function == icmBwd || p->function == icmGamut || p->function == icmPreview)
16489 && (p->intent == icAbsoluteColorimetric
16490 || p->intent == icmAbsolutePerceptual
16491 || p->intent == icmAbsoluteSaturation)) {
16492
16493 if (p->inSpace == icSigLabData) {
16494 icmLab2XYZ(&p->pcswht, out, out);
16495 DBLLL(("icm inv_in_abs: after Lab2XYZ %s\n",icmPdv(lut->inputChan, out)));
16496 }
16497
16498 /* Convert from Relative to Absolute colorimetric XYZ */
16499 icmMulBy3x3(out, p->toAbs, out);
16500 DBLLL(("icm inv_in_abs: after toAbs %s\n",icmPdv(lut->inputChan, out)));
16501
16502 if (p->e_inSpace == icSigLabData) {
16503 icmXYZ2Lab(&p->pcswht, out, out);
16504 DBLLL(("icm inv_in_abs: after XYZ2Lab %s\n",icmPdv(lut->inputChan, out)));
16505 }
16506 } else {
16507
16508 /* Convert from Native to Effective input space */
16509 if (p->inSpace == icSigLabData && p->e_inSpace == icSigXYZData) {
16510 icmLab2XYZ(&p->pcswht, out, out);
16511 DBLLL(("icm inv_in_abs: after Lab2XYZ %s\n",icmPdv(lut->inputChan, out)));
16512 } else if (p->inSpace == icSigXYZData && p->e_inSpace == icSigLabData) {
16513 icmXYZ2Lab(&p->pcswht, out, out);
16514 DBLLL(("icm inv_in_abs: after XYZ2Lab %s\n",icmPdv(lut->inputChan, out)));
16515 }
16516 }
16517 DBLLL(("icm inv_in_abs: returning %s\n",icmPdv(lut->inputChan, out)));
16518 return rv;
16519 }
16520
16521 /* - - - - - - - - - - - - - - - - - - - - - - - - - - */
16522
16523 /* Return LuLut information */
16524 static void icmLuLut_get_info(
16525 icmLuLut *p, /* this */
16526 icmLut **lutp, /* Pointer to icc lut type */
16527 icmXYZNumber *pcswhtp, /* Pointer to profile PCS white point */
16528 icmXYZNumber *whitep, /* Pointer to profile absolute white point */
16529 icmXYZNumber *blackp /* Pointer to profile absolute black point */
16530 ) {
16531 if (lutp != NULL)
16532 *lutp = p->lut;
16533 if (pcswhtp != NULL)
16534 *pcswhtp = p->pcswht;
16535 if (whitep != NULL)
16536 *whitep = p->whitePoint;
16537 if (blackp != NULL)
16538 *blackp = p->blackPoint;
16539 }
16540
16541 /* Get the native ranges for the LuLut */
16542 /* This is computed differently to the mono & matrix types, to */
16543 /* accurately take into account the different range for 8 bit Lab */
16544 /* lut type. The range returned for the effective PCS is not so accurate. */
16545 static void
16546 icmLuLut_get_lutranges (
16547 struct _icmLuBase *pp,
16548 double *inmin, double *inmax, /* Return maximum range of inspace values */
16549 double *outmin, double *outmax /* Return maximum range of outspace values */
16550 ) {
16551 icmLuLut *p = (icmLuLut *)pp;
16552 unsigned int i;
16553
16554 for (i = 0; i < p->lut->inputChan; i++) {
16555 inmin[i] = 0.0; /* Normalized range of input space values */
16556 inmax[i] = 1.0;
16557 }
16558 p->in_denormf(inmin,inmin); /* Convert to real colorspace range */
16559 p->in_denormf(inmax,inmax);
16560
16561 /* Make sure min and max are so. */
16562 for (i = 0; i < p->lut->inputChan; i++) {
16563 if (inmin[i] > inmax[i]) {
16564 double tt;
16565 tt = inmin[i];
16566 inmin[i] = inmax[i];
16567 inmax[i] = tt;
16568 }
16569 }
16570
16571 for (i = 0; i < p->lut->outputChan; i++) {
16572 outmin[i] = 0.0; /* Normalized range of output space values */
16573 outmax[i] = 1.0;
16574 }
16575 p->out_denormf(outmin,outmin); /* Convert to real colorspace range */
16576 p->out_denormf(outmax,outmax);
16577
16578 /* Make sure min and max are so. */
16579 for (i = 0; i < p->lut->outputChan; i++) {
16580 if (outmin[i] > outmax[i]) {
16581 double tt;
16582 tt = outmin[i];
16583 outmin[i] = outmax[i];
16584 outmax[i] = tt;
16585 }
16586 }
16587 }
16588
16589 /* Get the effective (externaly visible) ranges for the LuLut */
16590 /* This will be accurate if there is no override, but only */
16591 /* aproximate if a PCS override is in place. */
16592 static void
16593 icmLuLut_get_ranges (
16594 struct _icmLuBase *pp,
16595 double *inmin, double *inmax, /* Return maximum range of inspace values */
16596 double *outmin, double *outmax /* Return maximum range of outspace values */
16597 ) {
16598 icmLuLut *p = (icmLuLut *)pp;
16599
16600 /* Get the native ranges first */
16601 icmLuLut_get_lutranges(pp, inmin, inmax, outmin, outmax);
16602
16603 /* And replace them if the effective space is different */
16604 if (p->e_inSpace != p->inSpace)
16605 getRange(p->icp, p->e_inSpace, p->lut->ttype, inmin, inmax);
16606
16607 if (p->e_outSpace != p->outSpace)
16608 getRange(p->icp, p->e_outSpace, p->lut->ttype, outmin, outmax);
16609 }
16610
16611 /* Return the underlying Lut matrix */
16612 static void
16613 icmLuLut_get_matrix (
16614 struct _icmLuLut *p,
16615 double m[3][3]
16616 ) {
16617 int i, j;
16618 icmLut *lut = p->lut;
16619
16620 if (p->usematrix) {
16621 for (i = 0; i < 3; i++)
16622 for (j = 0; j < 3; j++)
16623 m[i][j] = lut->e[i][j]; /* Copy from Lut */
16624
16625 } else { /* return unity matrix */
16626 icmSetUnity3x3(m);
16627 }
16628 }
16629
16630
16631 static void
16632 icmLuLut_delete(
16633 icmLuBase *p
16634 ) {
16635 icc *icp = p->icp;
16636
16637 icp->al->free(icp->al, p);
16638 }
16639
16640 icmLuBase *
16641 icc_new_icmLuLut(
16642 icc *icp,
16643 icTagSignature ttag, /* Target Lut tag */
16644 icColorSpaceSignature inSpace, /* Native Input color space */
16645 icColorSpaceSignature outSpace, /* Native Output color space */
16646 icColorSpaceSignature pcs, /* Native PCS (from header) */
16647 icColorSpaceSignature e_inSpace, /* Effective Input color space */
16648 icColorSpaceSignature e_outSpace, /* Effective Output color space */
16649 icColorSpaceSignature e_pcs, /* Effective PCS */
16650 icRenderingIntent intent, /* Rendering intent (For absolute) */
16651 icmLookupFunc func /* Functionality requested (for icmLuSpaces()) */
16652 ) {
16653 icmLuLut *p;
16654
16655 if ((p = (icmLuLut *) icp->al->calloc(icp->al,1,sizeof(icmLuLut))) == NULL)
16656 return NULL;
16657 p->ttype = icmLutType;
16658 p->icp = icp;
16659 p->del = icmLuLut_delete;
16660 p->lutspaces= icmLutSpaces;
16661 p->spaces = icmLuSpaces;
16662 p->XYZ_Rel2Abs = icmLuXYZ_Rel2Abs;
16663 p->XYZ_Abs2Rel = icmLuXYZ_Abs2Rel;
16664 p->init_wh_bk = icmLuInit_Wh_bk;
16665 p->wh_bk_points = icmLuWh_bk_points;
16666 p->lu_wh_bk_points = icmLuLu_wh_bk_points;
16667
16668 p->lookup = icmLuLut_lookup;
16669 p->lookup_in = icmLuLut_lookup_in;
16670 p->lookup_core = icmLuLut_lookup_core;
16671 p->lookup_out = icmLuLut_lookup_out;
16672 p->lookup_inv_in = icmLuLut_lookup_inv_in;
16673
16674 p->in_abs = icmLuLut_in_abs;
16675 p->matrix = icmLuLut_matrix;
16676 p->input = icmLuLut_input;
16677 p->clut = icmLuLut_clut;
16678 p->output = icmLuLut_output;
16679 p->out_abs = icmLuLut_out_abs;
16680
16681 p->inv_in_abs = icmLuLut_inv_in_abs;
16682 p->inv_matrix = icmLuLut_inv_matrix;
16683 p->inv_input = icmLuLut_inv_input;
16684 p->inv_output = icmLuLut_inv_output;
16685 p->inv_out_abs = icmLuLut_inv_out_abs;
16686
16687 p->pcswht = icp->header->illuminant;
16688 p->intent = intent; /* used to trigger absolute processing */
16689 p->function = func;
16690 p->inSpace = inSpace;
16691 p->outSpace = outSpace;
16692 p->pcs = pcs;
16693 p->e_inSpace = e_inSpace;
16694 p->e_outSpace = e_outSpace;
16695 p->e_pcs = e_pcs;
16696 p->get_info = icmLuLut_get_info;
16697 p->get_lutranges = icmLuLut_get_lutranges;
16698 p->get_ranges = icmLuLut_get_ranges;
16699 p->get_matrix = icmLuLut_get_matrix;
16700
16701 /* Lookup the white and black points */
16702 if (p->init_wh_bk((icmLuBase *)p)) {
16703 p->del((icmLuBase *)p);
16704 return NULL;
16705 }
16706
16707 /* Get the Lut tag, & check that it is expected type */
16708 if ((p->lut = (icmLut *)icp->read_tag(icp, ttag)) == NULL
16709 || (p->lut->ttype != icSigLut8Type && p->lut->ttype != icSigLut16Type)) {
16710 p->del((icmLuBase *)p);
16711 return NULL;
16712 }
16713
16714 /* Check if matrix should be used */
16715 if (inSpace == icSigXYZData && p->lut->nu_matrix(p->lut))
16716 p->usematrix = 1;
16717 else
16718 p->usematrix = 0;
16719
16720 /* Lookup input color space to normalized index function */
16721 if (getNormFunc(icp, inSpace, p->lut->ttype, icmToLuti, &p->in_normf)) {
16722 sprintf(icp->err,"icc_get_luobj: Unknown colorspace");
16723 icp->errc = 1;
16724 p->del((icmLuBase *)p);
16725 return NULL;
16726 }
16727
16728 /* Lookup normalized index to input color space function */
16729 if (getNormFunc(icp, inSpace, p->lut->ttype, icmFromLuti, &p->in_denormf)) {
16730 sprintf(icp->err,"icc_get_luobj: Unknown colorspace");
16731 icp->errc = 1;
16732 p->del((icmLuBase *)p);
16733 return NULL;
16734 }
16735
16736 /* Lookup output color space to normalized Lut entry value function */
16737 if (getNormFunc(icp, outSpace, p->lut->ttype, icmToLutv, &p->out_normf)) {
16738 sprintf(icp->err,"icc_get_luobj: Unknown colorspace");
16739 icp->errc = 1;
16740 p->del((icmLuBase *)p);
16741 return NULL;
16742 }
16743
16744 /* Lookup normalized Lut entry value to output color space function */
16745 if (getNormFunc(icp, outSpace, p->lut->ttype, icmFromLutv, &p->out_denormf)) {
16746 sprintf(icp->err,"icc_get_luobj: Unknown colorspace");
16747 icp->errc = 1;
16748 p->del((icmLuBase *)p);
16749 return NULL;
16750 }
16751
16752 /* Note that the following two are only used in computing the expected */
16753 /* value ranges of the effective PCS. This might not be the best way of */
16754 /* doing this. */
16755 /* Lookup normalized index to effective input color space function */
16756 if (getNormFunc(icp, e_inSpace, p->lut->ttype, icmFromLuti, &p->e_in_denormf)) {
16757 sprintf(icp->err,"icc_get_luobj: Unknown effective colorspace");
16758 icp->errc = 1;
16759 p->del((icmLuBase *)p);
16760 return NULL;
16761 }
16762
16763 /* Lookup normalized Lut entry value to effective output color space function */
16764 if (getNormFunc(icp, e_outSpace, p->lut->ttype, icmFromLutv, &p->e_out_denormf)) {
16765 sprintf(icp->err,"icc_get_luobj: Unknown effective colorspace");
16766 icp->errc = 1;
16767 p->del((icmLuBase *)p);
16768 return NULL;
16769 }
16770
16771 // ~~~999
16772 #ifndef NEVER
16773 /* Standard code */
16774 /* Determine appropriate clut lookup algorithm */
16775 {
16776 int use_sx; /* -1 = undecided, 0 = N-linear, 1 = Simplex lookup */
16777 icColorSpaceSignature ins, outs; /* In and out Lut color spaces */
16778 int inn, outn; /* in and out number of Lut components */
16779
16780 p->lutspaces((icmLuBase *)p, &ins, &inn, &outs, &outn, NULL);
16781
16782 /* Determine if the input space is "Device" like, */
16783 /* ie. luminance will be expected to vary most strongly */
16784 /* with the diagonal change in input coordinates. */
16785 switch(ins) {
16786
16787 /* Luminence is carried by the sum of all the output channels, */
16788 /* so output luminence will dominantly be in diagonal direction. */
16789 case icSigXYZData: /* This seems to be appropriate ? */
16790 case icSigRgbData:
16791 case icSigGrayData:
16792 case icSigCmykData:
16793 case icSigCmyData:
16794 case icSigMch6Data:
16795 use_sx = 1; /* Simplex interpolation is appropriate */
16796 break;
16797
16798 /* A single channel carries the luminence information */
16799 case icSigLabData:
16800 case icSigLuvData:
16801 case icSigYCbCrData:
16802 case icSigYxyData:
16803 case icSigHlsData:
16804 case icSigHsvData:
16805 use_sx = 0; /* N-linear interpolation is appropriate */
16806 break;
16807 default:
16808 use_sx = -1; /* undecided */
16809 break;
16810 }
16811
16812 /* If we couldn't figure it out from the input space, */
16813 /* check output luminance variation with a diagonal input */
16814 /* change. */
16815 if (use_sx == -1) {
16816 int lc; /* Luminance channel */
16817
16818 /* Determine where the luminence is carried in the output */
16819 switch(outs) {
16820
16821 /* Luminence is carried by the sum of all the output channels */
16822 case icSigRgbData:
16823 case icSigGrayData:
16824 case icSigCmykData:
16825 case icSigCmyData:
16826 case icSigMch6Data:
16827 lc = -1; /* Average all channels */
16828 break;
16829
16830 /* A single channel carries the luminence information */
16831 case icSigLabData:
16832 case icSigLuvData:
16833 case icSigYCbCrData:
16834 case icSigYxyData:
16835 lc = 0;
16836 break;
16837
16838 case icSigXYZData:
16839 case icSigHlsData:
16840 lc = 1;
16841 break;
16842
16843 case icSigHsvData:
16844 lc = 2;
16845 break;
16846
16847 /* default means give up and use N-linear type lookup */
16848 default:
16849 lc = -2;
16850 break;
16851 }
16852
16853 /* If we know how luminance is represented in output space */
16854 if (lc != -2) {
16855 double tout1[MAX_CHAN]; /* Test output values */
16856 double tout2[MAX_CHAN];
16857 double tt, diag;
16858 int n;
16859
16860 /* Determine input space location of min and max of */
16861 /* given output channel (chan = -1 means average of all) */
16862 p->lut->min_max(p->lut, tout1, tout2, lc);
16863
16864 /* Convert to vector and then calculate normalized */
16865 /* dot product with diagonal vector (1,1,1...) */
16866 for (tt = 0.0, n = 0; n < inn; n++) {
16867 tout1[n] = tout2[n] - tout1[n];
16868 tt += tout1[n] * tout1[n];
16869 }
16870 if (tt > 0.0)
16871 tt = sqrt(tt); /* normalizing factor for maximum delta */
16872 else
16873 tt = 1.0; /* Hmm. */
16874 tt *= sqrt((double)inn); /* Normalizing factor for diagonal vector */
16875 for (diag = 0.0, n = 0; n < outn; n++)
16876 diag += tout1[n] / tt;
16877 diag = fabs(diag);
16878
16879 /* I'm not really convinced that this is a reliable */
16880 /* indicator of whether simplex interpolation should be used ... */
16881 /* It does seem to do the right thing with YCC space though. */
16882 if (diag > 0.8) /* Diagonal is dominant ? */
16883 use_sx = 1;
16884
16885 /* If we couldn't figure it out, use N-linear interpolation */
16886 if (use_sx == -1)
16887 use_sx = 0;
16888 }
16889 }
16890
16891 if (use_sx) {
16892 p->lookup_clut = p->lut->lookup_clut_sx;
16893 } else {
16894 p->lookup_clut = p->lut->lookup_clut_nl;
16895 }
16896 }
16897 #else /* Development code */
16898 /* Determine appropriate clut lookup algorithm, */
16899 /* and set optimised simplex tables */
16900 {
16901 int lualg = 0; /* 0 = simplex, 1 = multi-linear, 2 = optimised simlpex */
16902 icColorSpaceSignature ins, outs; /* In and out Lut color spaces */
16903 int inn, outn; /* in and out number of Lut components */
16904
16905 p->lutspaces((icmLuBase *)p, &ins, &inn, &outs, &outn, NULL);
16906
16907 /* Determine which type of Lut lookup algorithm is likely to give */
16908 /* minimal interpolation errors. */
16909 /* To use the optimised simplex, we should ideally determine */
16910 /* the simplex cell orientation that makes the simplex split diagonal */
16911 /* always point towards the white or black points. */
16912 switch(ins) {
16913
16914 case icSigXYZData: /* This seems to be appropriate ? */
16915 case icSigRgbData:
16916 case icSigGrayData:
16917 case icSigCmykData:
16918 case icSigCmyData:
16919 case icSigMch6Data:
16920 lualg = 0; /* Simplex interpolation is appropriate */
16921 break;
16922
16923 case icSigLabData:
16924 // ~~~~9999 this isn't right! need to lookup Lab 50,0,0 through input curves then */
16925 /* quantize to clut nodes to figure threshold for axis flips */
16926 p->lut->finfo[0].fth = 0.5; p->lut->finfo[0].bthff = 0; p->lut->finfo[0].athff = 1;
16927 p->lut->finfo[1].fth = 0.5; p->lut->finfo[1].bthff = 1; p->lut->finfo[1].athff = 0;
16928 p->lut->finfo[2].fth = 0.5; p->lut->finfo[2].bthff = 1; p->lut->finfo[2].athff = 0;
16929 lualg = 2;
16930 break;
16931
16932 /* !!! Should switch to optimised simplex for these too !!! */
16933 case icSigLuvData:
16934 case icSigYCbCrData:
16935 case icSigYxyData:
16936 case icSigHlsData:
16937 case icSigHsvData:
16938 lualg = 1; /* Multi-linear is best as a default for these ? */
16939 break;
16940
16941 default:
16942 lualg = 0; /* Simplex is best if we known nothing. */
16943 break;
16944 }
16945
16946 if (lualg == 2) {
16947 p->lookup_clut = icmLut_lookup_clut_osx;
16948 } else if (lualg == 1) {
16949 p->lookup_clut = p->lut->lookup_clut_nl;
16950 } else {
16951 p->lookup_clut = p->lut->lookup_clut_sx;
16952 }
16953 }
16954 #endif
16955 return (icmLuBase *)p;
16956 }
16957
16958 /* - - - - - - - - - - - - - - - - - - - - - - - */
16959
16960 /* Return an appropriate lookup object */
16961 /* Return NULL on error, and detailed error in icc */
16962 static icmLuBase* icc_get_luobj (
16963 icc *p, /* ICC */
16964 icmLookupFunc func, /* Conversion functionality */
16965 icRenderingIntent intent, /* Rendering intent, including icmAbsoluteColorimetricXYZ */
16966 icColorSpaceSignature pcsor,/* PCS override (0 = def) */
16967 icmLookupOrder order /* Conversion representation search Order */
16968 ) {
16969 icmLuBase *luobj = NULL; /* Lookup object to return */
16970 icColorSpaceSignature pcs, e_pcs; /* PCS and effective PCS */
16971
16972 #ifdef ICM_STRICT
16973 int rv;
16974 /* Check that the profile is legal, since we depend on it ? */
16975 if ((rv = check_icc_legal(p)) != 0)
16976 return NULL;
16977 #endif /* ICM_STRICT */
16978
16979 /* Figure out the native and effective PCS */
16980 e_pcs = pcs = p->header->pcs;
16981 if (pcsor != icmSigDefaultData)
16982 e_pcs = pcsor; /* Override */
16983
16984 /* How we expect to execute the request depends firstly on the type of profile */
16985 switch (p->header->deviceClass) {
16986 case icSigInputClass:
16987 case icSigDisplayClass:
16988 case icSigColorSpaceClass:
16989
16990 /* Look for Intent based AToBX profile + optional BToAX reverse */
16991 /* or for AToB0 based profile + optional BToA0 reverse */
16992 /* or three component matrix profile (reversable) */
16993 /* or momochrome table profile (reversable) */
16994 /* No Lut intent for ICC < V2.4, but possible for >= V2.4, */
16995 /* so fall back if we can't find the chosen Lut intent.. */
16996 /* Device <-> PCS */
16997 /* Determine the algorithm and set its parameters */
16998
16999 switch (func) {
17000 icRenderingIntent fbintent; /* Fallback intent */
17001 icTagSignature ttag, fbtag;
17002
17003 case icmFwd: /* Device to PCS */
17004 if (intent == icmDefaultIntent)
17005 intent = icPerceptual; /* Make this the default */
17006
17007 switch (intent) {
17008 case icAbsoluteColorimetric:
17009 ttag = icSigAToB1Tag;
17010 fbtag = icSigAToB0Tag;
17011 fbintent = intent;
17012 break;
17013 case icRelativeColorimetric:
17014 ttag = icSigAToB1Tag;
17015 fbtag = icSigAToB0Tag;
17016 fbintent = icmDefaultIntent;
17017 break;
17018 case icPerceptual:
17019 ttag = icSigAToB0Tag;
17020 fbtag = icSigAToB0Tag;
17021 fbintent = icmDefaultIntent;
17022 break;
17023 case icSaturation:
17024 ttag = icSigAToB2Tag;
17025 fbtag = icSigAToB0Tag;
17026 fbintent = icmDefaultIntent;
17027 break;
17028 case icmAbsolutePerceptual: /* Special icclib intent */
17029 ttag = icSigAToB0Tag;
17030 fbtag = icSigAToB0Tag;
17031 fbintent = intent;
17032 break;
17033 case icmAbsoluteSaturation: /* Special icclib intent */
17034 ttag = icSigAToB2Tag;
17035 fbtag = icSigAToB0Tag;
17036 fbintent = intent;
17037 break;
17038 default:
17039 sprintf(p->err,"icc_get_luobj: Unknown intent");
17040 p->errc = 1;
17041 return NULL;
17042 }
17043
17044 if (order != icmLuOrdRev) {
17045 /* Try Lut type lookup with the chosen intent first */
17046 if ((luobj = icc_new_icmLuLut(p, ttag,
17047 p->header->colorSpace, pcs, pcs,
17048 p->header->colorSpace, e_pcs, e_pcs,
17049 intent, func)) != NULL)
17050 break;
17051
17052 /* Try the fallback tag */
17053 if ((luobj = icc_new_icmLuLut(p, fbtag,
17054 p->header->colorSpace, pcs, pcs,
17055 p->header->colorSpace, e_pcs, e_pcs,
17056 fbintent, func)) != NULL)
17057 break;
17058
17059 /* See if it could be a matrix lookup */
17060 if ((luobj = new_icmLuMatrixFwd(p,
17061 p->header->colorSpace, pcs, pcs,
17062 p->header->colorSpace, e_pcs, e_pcs,
17063 intent, func)) != NULL)
17064 break;
17065
17066 /* See if it could be a monochrome lookup */
17067 if ((luobj = new_icmLuMonoFwd(p,
17068 p->header->colorSpace, pcs, pcs,
17069 p->header->colorSpace, e_pcs, e_pcs,
17070 intent, func)) != NULL)
17071 break;
17072
17073 } else {
17074 /* See if it could be a monochrome lookup */
17075 if ((luobj = new_icmLuMonoFwd(p,
17076 p->header->colorSpace, pcs, pcs,
17077 p->header->colorSpace, e_pcs, e_pcs,
17078 intent, func)) != NULL)
17079 break;
17080
17081 /* See if it could be a matrix lookup */
17082 if ((luobj = new_icmLuMatrixFwd(p,
17083 p->header->colorSpace, pcs, pcs,
17084 p->header->colorSpace, e_pcs, e_pcs,
17085 intent, func)) != NULL)
17086 break;
17087
17088 /* Try Lut type lookup last */
17089 if ((luobj = icc_new_icmLuLut(p, ttag,
17090 p->header->colorSpace, pcs, pcs,
17091 p->header->colorSpace, e_pcs, e_pcs,
17092 intent, func)) != NULL)
17093 break;
17094
17095 /* Try the fallback tag */
17096 if ((luobj = icc_new_icmLuLut(p, fbtag,
17097 p->header->colorSpace, pcs, pcs,
17098 p->header->colorSpace, e_pcs, e_pcs,
17099 fbintent, func)) != NULL)
17100 break;
17101 }
17102 break;
17103
17104 case icmBwd: /* PCS to Device */
17105 if (intent == icmDefaultIntent)
17106 intent = icPerceptual; /* Make this the default */
17107
17108 switch (intent) {
17109 case icAbsoluteColorimetric:
17110 ttag = icSigBToA1Tag;
17111 fbtag = icSigBToA0Tag;
17112 fbintent = intent;
17113 break;
17114 case icRelativeColorimetric:
17115 ttag = icSigBToA1Tag;
17116 fbtag = icSigBToA0Tag;
17117 fbintent = icmDefaultIntent;
17118 break;
17119 case icPerceptual:
17120 ttag = icSigBToA0Tag;
17121 fbtag = icSigBToA0Tag;
17122 fbintent = icmDefaultIntent;
17123 break;
17124 case icSaturation:
17125 ttag = icSigBToA2Tag;
17126 fbtag = icSigBToA0Tag;
17127 fbintent = icmDefaultIntent;
17128 break;
17129 case icmAbsolutePerceptual: /* Special icclib intent */
17130 ttag = icSigBToA0Tag;
17131 fbtag = icSigBToA0Tag;
17132 fbintent = intent;
17133 break;
17134 case icmAbsoluteSaturation: /* Special icclib intent */
17135 ttag = icSigBToA2Tag;
17136 fbtag = icSigBToA0Tag;
17137 fbintent = intent;
17138 break;
17139 default:
17140 sprintf(p->err,"icc_get_luobj: Unknown intent");
17141 p->errc = 1;
17142 return NULL;
17143 }
17144
17145
17146 if (order != icmLuOrdRev) {
17147 /* Try Lut type lookup first */
17148 if ((luobj = icc_new_icmLuLut(p, ttag,
17149 pcs, p->header->colorSpace, pcs,
17150 e_pcs, p->header->colorSpace, e_pcs,
17151 intent, func)) != NULL)
17152 break;
17153
17154 /* Try the fallback Lut */
17155 if ((luobj = icc_new_icmLuLut(p, fbtag,
17156 pcs, p->header->colorSpace, pcs,
17157 e_pcs, p->header->colorSpace, e_pcs,
17158 fbintent, func)) != NULL)
17159 break;
17160
17161 /* See if it could be a matrix lookup */
17162 if ((luobj = new_icmLuMatrixBwd(p,
17163 pcs, p->header->colorSpace, pcs,
17164 e_pcs, p->header->colorSpace, e_pcs,
17165 intent, func)) != NULL)
17166 break;
17167
17168 /* See if it could be a monochrome lookup */
17169 if ((luobj = new_icmLuMonoBwd(p,
17170 pcs, p->header->colorSpace, pcs,
17171 e_pcs, p->header->colorSpace, e_pcs,
17172 intent, func)) != NULL)
17173 break;
17174 } else {
17175 /* See if it could be a monochrome lookup */
17176 if ((luobj = new_icmLuMonoBwd(p,
17177 pcs, p->header->colorSpace, pcs,
17178 e_pcs, p->header->colorSpace, e_pcs,
17179 intent, func)) != NULL)
17180 break;
17181
17182 /* See if it could be a matrix lookup */
17183 if ((luobj = new_icmLuMatrixBwd(p,
17184 pcs, p->header->colorSpace, pcs,
17185 e_pcs, p->header->colorSpace, e_pcs,
17186 intent, func)) != NULL)
17187 break;
17188
17189 /* Try Lut type lookup last */
17190 if ((luobj = icc_new_icmLuLut(p, ttag,
17191 pcs, p->header->colorSpace, pcs,
17192 e_pcs, p->header->colorSpace, e_pcs,
17193 intent, func)) != NULL)
17194 break;
17195
17196 /* Try the fallback Lut */
17197 if ((luobj = icc_new_icmLuLut(p, fbtag,
17198 pcs, p->header->colorSpace, pcs,
17199 e_pcs, p->header->colorSpace, e_pcs,
17200 fbintent, func)) != NULL)
17201 break;
17202 }
17203 break;
17204
17205 default:
17206 sprintf(p->err,"icc_get_luobj: Inaproptiate function requested");
17207 p->errc = 1;
17208 return NULL;
17209 }
17210 break;
17211
17212 case icSigOutputClass:
17213 /* Expect BToA Lut and optional AToB Lut, All intents, expect gamut */
17214 /* or momochrome table profile (reversable) */
17215 /* Device <-> PCS */
17216 /* Gamut Lut - no intent */
17217 /* Optional preview links PCS <-> PCS */
17218
17219 /* Determine the algorithm and set its parameters */
17220 switch (func) {
17221 icTagSignature ttag;
17222
17223 case icmFwd: /* Device to PCS */
17224
17225 if (intent == icmDefaultIntent)
17226 intent = icPerceptual; /* Make this the default */
17227
17228 switch (intent) {
17229 case icRelativeColorimetric:
17230 case icAbsoluteColorimetric:
17231 ttag = icSigAToB1Tag;
17232 break;
17233 case icPerceptual:
17234 case icmAbsolutePerceptual: /* Special icclib intent */
17235 ttag = icSigAToB0Tag;
17236 break;
17237 case icSaturation:
17238 case icmAbsoluteSaturation: /* Special icclib intent */
17239 ttag = icSigAToB2Tag;
17240 break;
17241 default:
17242 sprintf(p->err,"icc_get_luobj: Unknown intent");
17243 p->errc = 1;
17244 return NULL;
17245 }
17246
17247 if (order != icmLuOrdRev) {
17248 /* Try Lut type lookup first */
17249 if ((luobj = icc_new_icmLuLut(p, ttag,
17250 p->header->colorSpace, pcs, pcs,
17251 p->header->colorSpace, e_pcs, e_pcs,
17252 intent, func)) != NULL) {
17253 break;
17254 }
17255
17256 /* See if it could be a matrix lookup */
17257 if ((luobj = new_icmLuMatrixFwd(p,
17258 p->header->colorSpace, pcs, pcs,
17259 p->header->colorSpace, e_pcs, e_pcs,
17260 intent, func)) != NULL)
17261 break;
17262
17263 /* See if it could be a monochrome lookup */
17264 if ((luobj = new_icmLuMonoFwd(p,
17265 p->header->colorSpace, pcs, pcs,
17266 p->header->colorSpace, e_pcs, e_pcs,
17267 intent, func)) != NULL)
17268 break;
17269 } else {
17270 /* See if it could be a monochrome lookup */
17271 if ((luobj = new_icmLuMonoFwd(p,
17272 p->header->colorSpace, pcs, pcs,
17273 p->header->colorSpace, e_pcs, e_pcs,
17274 intent, func)) != NULL)
17275 break;
17276
17277 /* See if it could be a matrix lookup */
17278 if ((luobj = new_icmLuMatrixFwd(p,
17279 p->header->colorSpace, pcs, pcs,
17280 p->header->colorSpace, e_pcs, e_pcs,
17281 intent, func)) != NULL)
17282 break;
17283
17284 /* Try Lut type lookup last */
17285 if ((luobj = icc_new_icmLuLut(p, ttag,
17286 p->header->colorSpace, pcs, pcs,
17287 p->header->colorSpace, e_pcs, e_pcs,
17288 intent, func)) != NULL)
17289 break;
17290 }
17291 break;
17292
17293 case icmBwd: /* PCS to Device */
17294
17295 if (intent == icmDefaultIntent)
17296 intent = icPerceptual; /* Make this the default */
17297
17298 switch (intent) {
17299 case icRelativeColorimetric:
17300 case icAbsoluteColorimetric:
17301 ttag = icSigBToA1Tag;
17302 break;
17303 case icPerceptual:
17304 case icmAbsolutePerceptual: /* Special icclib intent */
17305 ttag = icSigBToA0Tag;
17306 break;
17307 case icSaturation:
17308 case icmAbsoluteSaturation: /* Special icclib intent */
17309 ttag = icSigBToA2Tag;
17310 break;
17311 default:
17312 sprintf(p->err,"icc_get_luobj: Unknown intent");
17313 p->errc = 1;
17314 return NULL;
17315 }
17316
17317 if (order != icmLuOrdRev) {
17318 /* Try Lut type lookup first */
17319 if ((luobj = icc_new_icmLuLut(p, ttag,
17320 pcs, p->header->colorSpace, pcs,
17321 e_pcs, p->header->colorSpace, e_pcs,
17322 intent, func)) != NULL)
17323 break;
17324
17325 /* See if it could be a matrix lookup */
17326 if ((luobj = new_icmLuMatrixBwd(p,
17327 pcs, p->header->colorSpace, pcs,
17328 e_pcs, p->header->colorSpace, e_pcs,
17329 intent, func)) != NULL)
17330 break;
17331
17332 /* See if it could be a monochrome lookup */
17333 if ((luobj = new_icmLuMonoBwd(p,
17334 pcs, p->header->colorSpace, pcs,
17335 e_pcs, p->header->colorSpace, e_pcs,
17336 intent, func)) != NULL)
17337 break;
17338 } else {
17339 /* See if it could be a monochrome lookup */
17340 if ((luobj = new_icmLuMonoBwd(p,
17341 pcs, p->header->colorSpace, pcs,
17342 e_pcs, p->header->colorSpace, e_pcs,
17343 intent, func)) != NULL)
17344 break;
17345
17346 /* See if it could be a matrix lookup */
17347 if ((luobj = new_icmLuMatrixBwd(p,
17348 pcs, p->header->colorSpace, pcs,
17349 e_pcs, p->header->colorSpace, e_pcs,
17350 intent, func)) != NULL)
17351 break;
17352
17353 /* Try Lut type lookup last */
17354 if ((luobj = icc_new_icmLuLut(p, ttag,
17355 pcs, p->header->colorSpace, pcs,
17356 e_pcs, p->header->colorSpace, e_pcs,
17357 intent, func)) != NULL)
17358 break;
17359 }
17360 break;
17361
17362 case icmGamut: /* PCS to 1D */
17363
17364 #ifdef ICM_STRICT /* Allow only default and absolute */
17365 if (intent != icmDefaultIntent
17366 && intent != icAbsoluteColorimetric) {
17367 sprintf(p->err,"icc_get_luobj: Intent is inappropriate for Gamut table");
17368 p->errc = 1;
17369 return NULL;
17370 }
17371 #else /* Be more forgiving */
17372 switch (intent) {
17373 case icAbsoluteColorimetric:
17374 case icmAbsolutePerceptual: /* Special icclib intent */
17375 case icmAbsoluteSaturation: /* Special icclib intent */
17376 break;
17377 case icmDefaultIntent:
17378 case icRelativeColorimetric:
17379 case icPerceptual:
17380 case icSaturation:
17381 intent = icmDefaultIntent; /* Make all other look like default */
17382 break;
17383 default:
17384 sprintf(p->err,"icc_get_luobj: Unknown intent (0x%x)",intent);
17385 p->errc = 1;
17386 return NULL;
17387 }
17388
17389 #endif
17390 /* If the target tag exists, and it is a Lut */
17391 luobj = icc_new_icmLuLut(p, icSigGamutTag,
17392 pcs, icSigGrayData, pcs,
17393 e_pcs, icSigGrayData, e_pcs,
17394 intent, func);
17395 break;
17396
17397 case icmPreview: /* PCS to PCS */
17398
17399 switch (intent) {
17400 case icRelativeColorimetric:
17401 ttag = icSigPreview1Tag;
17402 break;
17403 case icPerceptual:
17404 ttag = icSigPreview0Tag;
17405 break;
17406 case icSaturation:
17407 ttag = icSigPreview2Tag;
17408 break;
17409 case icAbsoluteColorimetric:
17410 case icmAbsolutePerceptual: /* Special icclib intent */
17411 case icmAbsoluteSaturation: /* Special icclib intent */
17412 sprintf(p->err,"icc_get_luobj: Intent is inappropriate for preview table");
17413 p->errc = 1;
17414 return NULL;
17415 default:
17416 sprintf(p->err,"icc_get_luobj: Unknown intent");
17417 p->errc = 1;
17418 return NULL;
17419 }
17420
17421 /* If the target tag exists, and it is a Lut */
17422 luobj = icc_new_icmLuLut(p, ttag,
17423 pcs, pcs, pcs,
17424 e_pcs, e_pcs, e_pcs,
17425 intent, func);
17426 break;
17427
17428 default:
17429 sprintf(p->err,"icc_get_luobj: Inaproptiate function requested");
17430 p->errc = 1;
17431 return NULL;
17432 }
17433 break;
17434
17435 case icSigLinkClass:
17436 /* Expect AToB0 Lut and optional BToA0 Lut, One intent in header */
17437 /* Device <-> Device */
17438
17439 if (intent != p->header->renderingIntent
17440 && intent != icmDefaultIntent) {
17441 sprintf(p->err,"icc_get_luobj: Intent is inappropriate for Link profile");
17442 p->errc = 1;
17443 return NULL;
17444 }
17445 intent = p->header->renderingIntent;
17446
17447 /* Determine the algorithm and set its parameters */
17448 switch (func) {
17449 case icmFwd: /* Device to PCS (== Device) */
17450
17451 luobj = icc_new_icmLuLut(p, icSigAToB0Tag,
17452 p->header->colorSpace, pcs, pcs,
17453 p->header->colorSpace, pcs, pcs,
17454 intent, func);
17455 break;
17456
17457 case icmBwd: /* PCS (== Device) to Device */
17458
17459 luobj = icc_new_icmLuLut(p, icSigBToA0Tag,
17460 pcs, p->header->colorSpace, pcs,
17461 pcs, p->header->colorSpace, pcs,
17462 intent, func);
17463 break;
17464
17465 default:
17466 sprintf(p->err,"icc_get_luobj: Inaproptiate function requested");
17467 p->errc = 1;
17468 return NULL;
17469 }
17470 break;
17471
17472 case icSigAbstractClass:
17473 /* Expect AToB0 Lut and option BToA0 Lut, with either relative or absolute intent. */
17474 /* PCS <-> PCS */
17475 /* Determine the algorithm and set its parameters */
17476
17477 if (intent != icmDefaultIntent
17478 && intent != icRelativeColorimetric
17479 && intent != icAbsoluteColorimetric) {
17480 sprintf(p->err,"icc_get_luobj: Intent is inappropriate for Abstract profile");
17481 p->errc = 1;
17482 return NULL;
17483 }
17484
17485 switch (func) {
17486 case icmFwd: /* PCS (== Device) to PCS */
17487
17488 luobj = icc_new_icmLuLut(p, icSigAToB0Tag,
17489 p->header->colorSpace, pcs, pcs,
17490 e_pcs, e_pcs, e_pcs,
17491 intent, func);
17492 break;
17493
17494 case icmBwd: /* PCS to PCS (== Device) */
17495
17496 luobj = icc_new_icmLuLut(p, icSigBToA0Tag,
17497 pcs, p->header->colorSpace, pcs,
17498 e_pcs, e_pcs, e_pcs,
17499 intent, func);
17500 break;
17501
17502 default:
17503 sprintf(p->err,"icc_get_luobj: Inaproptiate function requested");
17504 p->errc = 1;
17505 return NULL;
17506 }
17507 break;
17508
17509 case icSigNamedColorClass:
17510 /* Expect Name -> Device, Optional PCS */
17511 /* and a reverse lookup would be useful */
17512 /* (ie. PCS or Device coords to closest named color) */
17513 /* ~~ to be implemented ~~ */
17514
17515 /* ~~ Absolute intent is valid for processing of */
17516 /* PCS from named Colors. Also allow for e_pcs */
17517 if (intent != icmDefaultIntent
17518 && intent != icRelativeColorimetric
17519 && intent != icAbsoluteColorimetric) {
17520 sprintf(p->err,"icc_get_luobj: Intent is inappropriate for Named Color profile");
17521 p->errc = 1;
17522 return NULL;
17523 }
17524
17525 sprintf(p->err,"icc_get_luobj: Named Colors not handled yet");
17526 p->errc = 1;
17527 return NULL;
17528
17529 default:
17530 sprintf(p->err,"icc_get_luobj: Unknown profile class");
17531 p->errc = 1;
17532 return NULL;
17533 }
17534
17535 if (luobj == NULL) {
17536 sprintf(p->err,"icc_get_luobj: Unable to locate usable conversion");
17537 p->errc = 1;
17538 } else {
17539 luobj->order = order;
17540 }
17541
17542 return luobj;
17543 }
17544
17545 /* - - - - - - - - - - - - - - - - - - - - - - - */
17546
17547 /* Returns total ink limit and channel maximums. */
17548 /* Returns -1.0 if not applicable for this type of profile. */
17549 /* Returns -1.0 for grey, additive, or any profiles < 4 channels. */
17550 /* This is a place holder that uses a heuristic, */
17551 /* until there is a private or standard tag for this information */
17552 static double icm_get_tac( /* return TAC */
17553 icc *p,
17554 double *chmax, /* device return channel sums. May be NULL */
17555 void (*calfunc)(void *cntx, double *out, double *in), /* Optional calibration func. */
17556 void *cntx
17557 ) {
17558 icmHeader *rh = p->header;
17559 icmLuBase *luo;
17560 icmLuLut *ll;
17561 icmLut *lut;
17562 icColorSpaceSignature outs; /* Type of output space */
17563 int inn, outn; /* Number of components */
17564 icmLuAlgType alg; /* Type of lookup algorithm */
17565 double tac = 0.0;
17566 double max[MAX_CHAN]; /* Channel maximums */
17567 int i, f;
17568 unsigned int uf;
17569 int size; /* Lut table size */
17570 double *gp; /* Pointer to grid cube base */
17571
17572 /* If not something that can really have a TAC */
17573 if (rh->deviceClass != icSigDisplayClass
17574 && rh->deviceClass != icSigOutputClass
17575 && rh->deviceClass != icSigLinkClass) {
17576 return -1.0;
17577 }
17578
17579 /* If not a suitable color space */
17580 switch (rh->colorSpace) {
17581 /* Not applicable */
17582 case icSigXYZData:
17583 case icSigLabData:
17584 case icSigLuvData:
17585 case icSigYCbCrData:
17586 case icSigYxyData:
17587 case icSigHsvData:
17588 case icSigHlsData:
17589 return -1.0;
17590
17591 /* Assume no limit */
17592 case icSigGrayData:
17593 case icSig2colorData:
17594 case icSig3colorData:
17595 case icSigRgbData:
17596 return -1.0;
17597
17598 default:
17599 break;
17600 }
17601
17602 /* Get a PCS->device colorimetric lookup */
17603 if ((luo = p->get_luobj(p, icmBwd, icRelativeColorimetric, icmSigDefaultData, icmLuOrdNorm)) == NULL) {
17604 if ((luo = p->get_luobj(p, icmBwd, icmDefaultIntent, icmSigDefaultData, icmLuOrdNorm)) == NULL) {
17605 return -1.0;
17606 }
17607 }
17608
17609 /* Get details of conversion (Arguments may be NULL if info not needed) */
17610 luo->spaces(luo, NULL, &inn, &outs, &outn, &alg, NULL, NULL, NULL, NULL);
17611
17612 /* Assume any non-Lut type doesn't have a TAC */
17613 if (alg != icmLutType) {
17614 return -1.0;
17615 }
17616
17617 ll = (icmLuLut *)luo;
17618
17619 /* We have a Lut type. Search the lut for the largest values */
17620 for (f = 0; f < outn; f++)
17621 max[f] = 0.0;
17622
17623 lut = ll->lut;
17624 gp = lut->clutTable; /* Base of grid array */
17625 size = sat_pow(lut->clutPoints,lut->inputChan);
17626 for (i = 0; i < size; i++) {
17627 double tot, vv[MAX_CHAN];
17628
17629 lut->lookup_output(lut,vv,gp); /* Lookup though output tables */
17630 ll->out_denormf(vv,vv); /* Normalize for output color space */
17631
17632 if (calfunc != NULL)
17633 calfunc(cntx, vv, vv); /* Apply device calibration */
17634
17635 for (tot = 0.0, uf = 0; uf < lut->outputChan; uf++) {
17636 tot += vv[uf];
17637 if (vv[uf] > max[uf])
17638 max[uf] = vv[uf];
17639 }
17640 if (tot > tac)
17641 tac = tot;
17642 gp += lut->outputChan;
17643 }
17644
17645 if (chmax != NULL) {
17646 for (f = 0; f < outn; f++)
17647 chmax[f] = max[f];
17648 }
17649
17650 luo->del(luo);
17651
17652 return tac;
17653 }
17654
17655 /* - - - - - - - - - - - - - - - - - - - - - - - - */
17656
17657 /* Create an empty object. Return NULL on error */
17658 icc *new_icc_a(
17659 icmAlloc *al /* Memory allocator */
17660 ) {
17661 unsigned int i;
17662 icc *p;
17663
17664 if ((p = (icc *) al->calloc(al, 1,sizeof(icc))) == NULL) {
17665 return NULL;
17666 }
17667 p->ver = 0; /* default is V2 profile */
17668
17669 p->al = al; /* Heap allocator */
17670
17671 p->get_rfp = icc_get_rfp;
17672 p->set_version = icc_set_version;
17673 p->get_size = icc_get_size;
17674 p->read = icc_read;
17675 p->read_x = icc_read_x;
17676 p->write = icc_write;
17677 p->write_x = icc_write_x;
17678 p->dump = icc_dump;
17679 p->del = icc_delete;
17680 p->add_tag = icc_add_tag;
17681 p->link_tag = icc_link_tag;
17682 p->find_tag = icc_find_tag;
17683 p->read_tag = icc_read_tag;
17684 p->read_tag_any = icc_read_tag_any;
17685 p->rename_tag = icc_rename_tag;
17686 p->unread_tag = icc_unread_tag;
17687 p->read_all_tags = icc_read_all_tags;
17688 p->delete_tag = icc_delete_tag;
17689 p->check_id = icc_check_id;
17690 p->get_tac = icm_get_tac;
17691 p->get_luobj = icc_get_luobj;
17692 p->new_clutluobj = icc_new_icmLuLut;
17693
17694 #if defined(__IBMC__) && defined(_M_IX86)
17695 _control87(EM_UNDERFLOW, EM_UNDERFLOW);
17696 #endif
17697
17698 /* Allocate a header object */
17699 if ((p->header = new_icmHeader(p)) == NULL) {
17700 al->free(al, p);
17701 return NULL;
17702 }
17703
17704 /* Values that must be set before writing */
17705 p->header->deviceClass = icMaxEnumClass;/* Type of profile - must be set! */
17706 p->header->colorSpace = icMaxEnumData; /* Clr space of data - must be set! */
17707 p->header->pcs = icMaxEnumData; /* PCS: XYZ or Lab - must be set! */
17708 p->header->renderingIntent = icMaxEnumIntent; /* Rendering intent - must be set ! */
17709
17710 /* Values that should be set before writing */
17711 p->header->manufacturer = -1; /* Dev manufacturer - should be set ! */
17712 p->header->model = -1; /* Dev model number - should be set ! */
17713 p->header->attributes.l = 0; /* ICC Device attributes - should set ! */
17714 p->header->flags = 0; /* Embedding flags - should be set ! */
17715
17716 /* Values that may be set before writing */
17717 p->header->attributes.h = 0; /* Dev Device attributes - may be set ! */
17718 p->header->creator = str2tag("argl"); /* Profile creator - Argyll - may be set ! */
17719
17720 /* Init default values in header */
17721 p->header->cmmId = str2tag("argl"); /* CMM for profile - Argyll CMM */
17722 p->header->majv = 2; /* Current version 2.2.0 */
17723 p->header->minv = 2;
17724 p->header->bfv = 0;
17725 setcur_DateTimeNumber(&p->header->date);/* Creation Date */
17726 p->header->platform = icSigMicrosoft; /* Primary Platform */
17727 p->header->illuminant = icmD50; /* Profile illuminant - D50 */
17728
17729 /* Values that will be created automatically */
17730 for (i = 0; i < 16; i++)
17731 p->header->id[i] = 0;
17732
17733 return p;
17734 }
17735
17736
17737 /* ---------------------------------------------------------- */
17738 /* Print an int vector to a string. */
17739 /* Returned static buffer is re-used every 5 calls. */
17740 char *icmPiv(int di, int *p) {
17741 static char buf[5][MAX_CHAN * 16];
17742 static int ix = 0;
17743 int e;
17744 char *bp;
17745
17746 if (++ix >= 5)
17747 ix = 0;
17748 bp = buf[ix];
17749
17750 if (di > MAX_CHAN)
17751 di = MAX_CHAN; /* Make sure that buf isn't overrun */
17752
17753 for (e = 0; e < di; e++) {
17754 if (e > 0)
17755 *bp++ = ' ';
17756 sprintf(bp, "%d", p[e]); bp += strlen(bp);
17757 }
17758 return buf[ix];
17759 }
17760
17761 /* Print a double color vector to a string. */
17762 /* Returned static buffer is re-used every 5 calls. */
17763 char *icmPdv(int di, double *p) {
17764 static char buf[5][MAX_CHAN * 16];
17765 static int ix = 0;
17766 int e;
17767 char *bp;
17768
17769 if (++ix >= 5)
17770 ix = 0;
17771 bp = buf[ix];
17772
17773 if (di > MAX_CHAN)
17774 di = MAX_CHAN; /* Make sure that buf isn't overrun */
17775
17776 for (e = 0; e < di; e++) {
17777 if (e > 0)
17778 *bp++ = ' ';
17779 sprintf(bp, "%f", p[e]); bp += strlen(bp);
17780 }
17781 return buf[ix];
17782 }
17783
17784 /* Print a float color vector to a string. */
17785 /* Returned static buffer is re-used every 5 calls. */
17786 char *icmPfv(int di, float *p) {
17787 static char buf[5][MAX_CHAN * 16];
17788 static int ix = 0;
17789 int e;
17790 char *bp;
17791
17792 if (++ix >= 5)
17793 ix = 0;
17794 bp = buf[ix];
17795
17796 if (di > MAX_CHAN)
17797 di = MAX_CHAN; /* Make sure that buf isn't overrun */
17798
17799 for (e = 0; e < di; e++) {
17800 if (e > 0)
17801 *bp++ = ' ';
17802 sprintf(bp, "%f", p[e]); bp += strlen(bp);
17803 }
17804 return buf[ix];
17805 }
17806
17807 /* Print an 0..1 range XYZ as a D50 Lab string */
17808 /* Returned static buffer is re-used every 5 calls. */
17809 char *icmPLab(double *p) {
17810 static char buf[5][MAX_CHAN * 16];
17811 static int ix = 0;
17812 int e;
17813 char *bp;
17814 double lab[3];
17815
17816 if (++ix >= 5)
17817 ix = 0;
17818 bp = buf[ix];
17819
17820 icmXYZ2Lab(&icmD50, lab, p);
17821
17822 for (e = 0; e < 3; e++) {
17823 if (e > 0)
17824 *bp++ = ' ';
17825 sprintf(bp, "%f", lab[e]); bp += strlen(bp);
17826 }
17827 return buf[ix];
17828 }
17829
17830
17831 /* ---------------------------------------------------------- */
17832
+0
-90
.pc/06_fix_udev_rule.patch/usb/55-Argyll.rules less more
0 # udev rule to recognize instruments and make them accessible to user applications.
1 # Copy this to /etc/udev/rules.d/55-Argyll.rules
2
3 # Skip all this to speed things up if it'a not a usb add.
4 ACTION!="add", GOTO="argyll_rules_end"
5 SUBSYSTEM!="usb", GOTO="argyll_rules_end"
6
7 # Recognize the color measurement devices
8
9 # Colorimtre HCFR
10 ATTRS{idVendor}=="04db", ATTRS{idProduct}=="005b", ENV{COLOR_MEASUREMENT_DEVICE}="1"
11
12
13 # MonacoOPTIX (Same as i1 Display 1)
14 ATTRS{idVendor}=="0670", ATTRS{idProduct}=="0001", ENV{COLOR_MEASUREMENT_DEVICE}="1"
15
16
17 # HueyL (not tested)
18 ATTRS{idVendor}=="0765", ATTRS{idProduct}=="5001", ENV{COLOR_MEASUREMENT_DEVICE}="1"
19
20 # HueyL (not tested)
21 ATTRS{idVendor}=="0765", ATTRS{idProduct}=="5010", ENV{COLOR_MEASUREMENT_DEVICE}="1"
22
23 # i1Display 3
24 ATTRS{idVendor}=="0765", ATTRS{idProduct}=="5020", ENV{COLOR_MEASUREMENT_DEVICE}="1"
25
26 # ColorMunki Smile
27 ATTRS{idVendor}=="0765", ATTRS{idProduct}=="6003", ENV{COLOR_MEASUREMENT_DEVICE}="1"
28
29 # DTP20
30 ATTRS{idVendor}=="0765", ATTRS{idProduct}=="d020", ENV{COLOR_MEASUREMENT_DEVICE}="1"
31
32 # DTP92Q (not tested)
33 ATTRS{idVendor}=="0765", ATTRS{idProduct}=="d092", ENV{COLOR_MEASUREMENT_DEVICE}="1"
34
35 # DTP94
36 ATTRS{idVendor}=="0765", ATTRS{idProduct}=="d094", ENV{COLOR_MEASUREMENT_DEVICE}="1"
37
38
39 # i1Pro
40 ATTRS{idVendor}=="0971", ATTRS{idProduct}=="2000", ENV{COLOR_MEASUREMENT_DEVICE}="1"
41
42 # i1Monitor
43 ATTRS{idVendor}=="0971", ATTRS{idProduct}=="2001", ENV{COLOR_MEASUREMENT_DEVICE}="1"
44
45 # i1Display
46 ATTRS{idVendor}=="0971", ATTRS{idProduct}=="2003", ENV{COLOR_MEASUREMENT_DEVICE}="1"
47
48 # i1 io table (not tested)
49 ATTRS{idVendor}=="0971", ATTRS{idProduct}=="2004", ENV{COLOR_MEASUREMENT_DEVICE}="1"
50
51 # Huey
52 ATTRS{idVendor}=="0971", ATTRS{idProduct}=="2005", ENV{COLOR_MEASUREMENT_DEVICE}="1"
53
54 # i1 iSis (not tested)
55 ATTRS{idVendor}=="0971", ATTRS{idProduct}=="2006", ENV{COLOR_MEASUREMENT_DEVICE}="1"
56
57 # ColorMunki
58 ATTRS{idVendor}=="0971", ATTRS{idProduct}=="2007", ENV{COLOR_MEASUREMENT_DEVICE}="1"
59
60
61 # Spyder 1
62 ATTRS{idVendor}=="085c", ATTRS{idProduct}=="0100", ENV{COLOR_MEASUREMENT_DEVICE}="1"
63
64 # Spyder 2
65 ATTRS{idVendor}=="085c", ATTRS{idProduct}=="0200", ENV{COLOR_MEASUREMENT_DEVICE}="1"
66
67 # Spyder 3
68 ATTRS{idVendor}=="085c", ATTRS{idProduct}=="0300", ENV{COLOR_MEASUREMENT_DEVICE}="1"
69
70 # Spyder 4
71 ATTRS{idVendor}=="085c", ATTRS{idProduct}=="0400", ENV{COLOR_MEASUREMENT_DEVICE}="1"
72
73
74 # ColorHug, old and new
75 ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="f8da", ENV{COLOR_MEASUREMENT_DEVICE}="1"
76 ATTRS{idVendor}=="273f", ATTRS{idProduct}=="1001", ENV{COLOR_MEASUREMENT_DEVICE}="1"
77
78
79 # Let udev-acl manage these devices, if it's available
80 TEST=="/var/run/ConsoleKit/database", ENV{COLOR_MEASUREMENT_DEVICE}=="*?", ENV{ACL_MANAGE}="1"
81
82 # Otherwise, restrict access to members of the plugdev group,
83 # which the user may have to add to the system.
84 ENV{COLOR_MEASUREMENT_DEVICE}=="*?", ENV{ACL_MANAGE}!="*?", MODE="660", GROUP="plugdev"
85
86 # Set ID_VENDOR and ID_MODEL acording to VID and PID
87 IMPORT{builtin}="hwdb --subsystem=usb"
88
89 LABEL="argyll_rules_end"
+0
-5
.pc/applied-patches less more
0 01_autotools-support.diff
1 02_firmware-package-builder.diff
2 03_usb-db.diff
3 04_CVE-2012-4405.diff
4 06_fix_udev_rule.patch
+0
-23
Makefile.am less more
0 include $(top_srcdir)/Makefile.shared
1
2 ACLOCAL_AMFLAGS = -I m4
3
4 privatelib_LTLIBRARIES = libargyll.la
5 privatelibdir = $(pkglibdir)
6
7 libargyll_la_SOURCES = xicc/xicc.c xicc/xicc.h xicc/xcam.c xicc/xcam.h \
8 gamut/gamut.c gamut/gamut.h xicc/xfit.c xicc/xfit.h \
9 xicc/cam97s3.c xicc/cam97s3.h xicc/cam02.c xicc/cam02.h \
10 xicc/moncurve.c xicc/moncurve.h xicc/xspect.c xicc/xspect.h \
11 xicc/xcal.c xicc/xcal.h xicc/xcolorants.h xicc/xcolorants.c xicc/ccmx.c
12 libargyll_la_LIBADD = ./rspl/librspl.la $(ICC_LIBS) \
13 ./numlib/libargyllnum.la ./cgats/libcgats.la
14
15 SUBDIRS = h doc ref numlib cgats $(ICC_SUBDIRS) plot rspl jcnf ucmm render . gamut \
16 spectro xicc target link tweak profile scanin imdi
17
18 #SUBDIRS = h doc ref numlib cgats $(ICC_SUBDIRS) plot rspl jcnf ucmm render . gamut \
19 # spectro xicc target link tweak profile scanin imdi
20
21
22 EXTRA_DIST = Readme.txt ttbd.txt log.txt
+0
-15
Makefile.shared less more
0 # Common CFLAGS for Argyll components
1
2 AM_CFLAGS = -D_GNU_SOURCE -DUNIX -DENABLE_USB -DENABLE_SERIAL -I$(top_srcdir)/cgats \
3 -I$(top_srcdir)/gamut -I$(top_srcdir)/h -I$(top_srcdir)/jcnf \
4 -I$(top_srcdir)/libusb1/libusb -I$(top_srcdir)/numlib \
5 -I$(top_srcdir)/plot -I$(top_srcdir)/profile -I$(top_srcdir)/render \
6 -I$(top_srcdir)/rspl -I$(top_srcdir)/spectro -I$(top_srcdir)/target \
7 -I$(top_srcdir)/ucmm -I$(top_srcdir)/xicc $(TIFF_CFLAGS) $(ICC_CFLAGS) \
8 $(YAJL_CFLAGS) -L$(top_srcdir)/spectro
9
10 # Build libs in other dirs when required
11 ../%.la:
12 $(MAKE) -C $(@D) $(@F)
13 ./%.la:
14 $(MAKE) -C $(@D) $(@F)
+0
-1073
aclocal.m4 less more
0 # generated automatically by aclocal 1.13.3 -*- Autoconf -*-
1
2 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
3
4 # This file is free software; the Free Software Foundation
5 # gives unlimited permission to copy and/or distribute it,
6 # with or without modifications, as long as this notice is preserved.
7
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11 # PARTICULAR PURPOSE.
12
13 m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
14 m4_ifndef([AC_AUTOCONF_VERSION],
15 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
17 [m4_warning([this file was generated for autoconf 2.69.
18 You have another version of autoconf. It may work, but is not guaranteed to.
19 If you have problems, you may need to regenerate the build system entirely.
20 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
21
22 # Copyright (C) 2002-2013 Free Software Foundation, Inc.
23 #
24 # This file is free software; the Free Software Foundation
25 # gives unlimited permission to copy and/or distribute it,
26 # with or without modifications, as long as this notice is preserved.
27
28 # AM_AUTOMAKE_VERSION(VERSION)
29 # ----------------------------
30 # Automake X.Y traces this macro to ensure aclocal.m4 has been
31 # generated from the m4 files accompanying Automake X.Y.
32 # (This private macro should not be called outside this file.)
33 AC_DEFUN([AM_AUTOMAKE_VERSION],
34 [am__api_version='1.13'
35 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
36 dnl require some minimum version. Point them to the right macro.
37 m4_if([$1], [1.13.3], [],
38 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
39 ])
40
41 # _AM_AUTOCONF_VERSION(VERSION)
42 # -----------------------------
43 # aclocal traces this macro to find the Autoconf version.
44 # This is a private macro too. Using m4_define simplifies
45 # the logic in aclocal, which can simply ignore this definition.
46 m4_define([_AM_AUTOCONF_VERSION], [])
47
48 # AM_SET_CURRENT_AUTOMAKE_VERSION
49 # -------------------------------
50 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
51 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
52 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
53 [AM_AUTOMAKE_VERSION([1.13.3])dnl
54 m4_ifndef([AC_AUTOCONF_VERSION],
55 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
56 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
57
58 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
59
60 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
61 #
62 # This file is free software; the Free Software Foundation
63 # gives unlimited permission to copy and/or distribute it,
64 # with or without modifications, as long as this notice is preserved.
65
66 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
67 # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
68 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
69 #
70 # Of course, Automake must honor this variable whenever it calls a
71 # tool from the auxiliary directory. The problem is that $srcdir (and
72 # therefore $ac_aux_dir as well) can be either absolute or relative,
73 # depending on how configure is run. This is pretty annoying, since
74 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
75 # source directory, any form will work fine, but in subdirectories a
76 # relative path needs to be adjusted first.
77 #
78 # $ac_aux_dir/missing
79 # fails when called from a subdirectory if $ac_aux_dir is relative
80 # $top_srcdir/$ac_aux_dir/missing
81 # fails if $ac_aux_dir is absolute,
82 # fails when called from a subdirectory in a VPATH build with
83 # a relative $ac_aux_dir
84 #
85 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
86 # are both prefixed by $srcdir. In an in-source build this is usually
87 # harmless because $srcdir is '.', but things will broke when you
88 # start a VPATH build or use an absolute $srcdir.
89 #
90 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
91 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
92 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
93 # and then we would define $MISSING as
94 # MISSING="\${SHELL} $am_aux_dir/missing"
95 # This will work as long as MISSING is not called from configure, because
96 # unfortunately $(top_srcdir) has no meaning in configure.
97 # However there are other variables, like CC, which are often used in
98 # configure, and could therefore not use this "fixed" $ac_aux_dir.
99 #
100 # Another solution, used here, is to always expand $ac_aux_dir to an
101 # absolute PATH. The drawback is that using absolute paths prevent a
102 # configured tree to be moved without reconfiguration.
103
104 AC_DEFUN([AM_AUX_DIR_EXPAND],
105 [dnl Rely on autoconf to set up CDPATH properly.
106 AC_PREREQ([2.50])dnl
107 # expand $ac_aux_dir to an absolute path
108 am_aux_dir=`cd $ac_aux_dir && pwd`
109 ])
110
111 # AM_CONDITIONAL -*- Autoconf -*-
112
113 # Copyright (C) 1997-2013 Free Software Foundation, Inc.
114 #
115 # This file is free software; the Free Software Foundation
116 # gives unlimited permission to copy and/or distribute it,
117 # with or without modifications, as long as this notice is preserved.
118
119 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
120 # -------------------------------------
121 # Define a conditional.
122 AC_DEFUN([AM_CONDITIONAL],
123 [AC_PREREQ([2.52])dnl
124 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
125 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
126 AC_SUBST([$1_TRUE])dnl
127 AC_SUBST([$1_FALSE])dnl
128 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
129 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
130 m4_define([_AM_COND_VALUE_$1], [$2])dnl
131 if $2; then
132 $1_TRUE=
133 $1_FALSE='#'
134 else
135 $1_TRUE='#'
136 $1_FALSE=
137 fi
138 AC_CONFIG_COMMANDS_PRE(
139 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
140 AC_MSG_ERROR([[conditional "$1" was never defined.
141 Usually this means the macro was only invoked conditionally.]])
142 fi])])
143
144 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
145 #
146 # This file is free software; the Free Software Foundation
147 # gives unlimited permission to copy and/or distribute it,
148 # with or without modifications, as long as this notice is preserved.
149
150
151 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
152 # written in clear, in which case automake, when reading aclocal.m4,
153 # will think it sees a *use*, and therefore will trigger all it's
154 # C support machinery. Also note that it means that autoscan, seeing
155 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
156
157
158 # _AM_DEPENDENCIES(NAME)
159 # ----------------------
160 # See how the compiler implements dependency checking.
161 # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
162 # We try a few techniques and use that to set a single cache variable.
163 #
164 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
165 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
166 # dependency, and given that the user is not expected to run this macro,
167 # just rely on AC_PROG_CC.
168 AC_DEFUN([_AM_DEPENDENCIES],
169 [AC_REQUIRE([AM_SET_DEPDIR])dnl
170 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
171 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
172 AC_REQUIRE([AM_DEP_TRACK])dnl
173
174 m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
175 [$1], [CXX], [depcc="$CXX" am_compiler_list=],
176 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
177 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
178 [$1], [UPC], [depcc="$UPC" am_compiler_list=],
179 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
180 [depcc="$$1" am_compiler_list=])
181
182 AC_CACHE_CHECK([dependency style of $depcc],
183 [am_cv_$1_dependencies_compiler_type],
184 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
185 # We make a subdir and do the tests there. Otherwise we can end up
186 # making bogus files that we don't know about and never remove. For
187 # instance it was reported that on HP-UX the gcc test will end up
188 # making a dummy file named 'D' -- because '-MD' means "put the output
189 # in D".
190 rm -rf conftest.dir
191 mkdir conftest.dir
192 # Copy depcomp to subdir because otherwise we won't find it if we're
193 # using a relative directory.
194 cp "$am_depcomp" conftest.dir
195 cd conftest.dir
196 # We will build objects and dependencies in a subdirectory because
197 # it helps to detect inapplicable dependency modes. For instance
198 # both Tru64's cc and ICC support -MD to output dependencies as a
199 # side effect of compilation, but ICC will put the dependencies in
200 # the current directory while Tru64 will put them in the object
201 # directory.
202 mkdir sub
203
204 am_cv_$1_dependencies_compiler_type=none
205 if test "$am_compiler_list" = ""; then
206 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
207 fi
208 am__universal=false
209 m4_case([$1], [CC],
210 [case " $depcc " in #(
211 *\ -arch\ *\ -arch\ *) am__universal=true ;;
212 esac],
213 [CXX],
214 [case " $depcc " in #(
215 *\ -arch\ *\ -arch\ *) am__universal=true ;;
216 esac])
217
218 for depmode in $am_compiler_list; do
219 # Setup a source with many dependencies, because some compilers
220 # like to wrap large dependency lists on column 80 (with \), and
221 # we should not choose a depcomp mode which is confused by this.
222 #
223 # We need to recreate these files for each test, as the compiler may
224 # overwrite some of them when testing with obscure command lines.
225 # This happens at least with the AIX C compiler.
226 : > sub/conftest.c
227 for i in 1 2 3 4 5 6; do
228 echo '#include "conftst'$i'.h"' >> sub/conftest.c
229 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
230 # Solaris 10 /bin/sh.
231 echo '/* dummy */' > sub/conftst$i.h
232 done
233 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
234
235 # We check with '-c' and '-o' for the sake of the "dashmstdout"
236 # mode. It turns out that the SunPro C++ compiler does not properly
237 # handle '-M -o', and we need to detect this. Also, some Intel
238 # versions had trouble with output in subdirs.
239 am__obj=sub/conftest.${OBJEXT-o}
240 am__minus_obj="-o $am__obj"
241 case $depmode in
242 gcc)
243 # This depmode causes a compiler race in universal mode.
244 test "$am__universal" = false || continue
245 ;;
246 nosideeffect)
247 # After this tag, mechanisms are not by side-effect, so they'll
248 # only be used when explicitly requested.
249 if test "x$enable_dependency_tracking" = xyes; then
250 continue
251 else
252 break
253 fi
254 ;;
255 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
256 # This compiler won't grok '-c -o', but also, the minuso test has
257 # not run yet. These depmodes are late enough in the game, and
258 # so weak that their functioning should not be impacted.
259 am__obj=conftest.${OBJEXT-o}
260 am__minus_obj=
261 ;;
262 none) break ;;
263 esac
264 if depmode=$depmode \
265 source=sub/conftest.c object=$am__obj \
266 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
267 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
268 >/dev/null 2>conftest.err &&
269 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
270 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
271 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
272 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
273 # icc doesn't choke on unknown options, it will just issue warnings
274 # or remarks (even with -Werror). So we grep stderr for any message
275 # that says an option was ignored or not supported.
276 # When given -MP, icc 7.0 and 7.1 complain thusly:
277 # icc: Command line warning: ignoring option '-M'; no argument required
278 # The diagnosis changed in icc 8.0:
279 # icc: Command line remark: option '-MP' not supported
280 if (grep 'ignoring option' conftest.err ||
281 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
282 am_cv_$1_dependencies_compiler_type=$depmode
283 break
284 fi
285 fi
286 done
287
288 cd ..
289 rm -rf conftest.dir
290 else
291 am_cv_$1_dependencies_compiler_type=none
292 fi
293 ])
294 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
295 AM_CONDITIONAL([am__fastdep$1], [
296 test "x$enable_dependency_tracking" != xno \
297 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
298 ])
299
300
301 # AM_SET_DEPDIR
302 # -------------
303 # Choose a directory name for dependency files.
304 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
305 AC_DEFUN([AM_SET_DEPDIR],
306 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
307 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
308 ])
309
310
311 # AM_DEP_TRACK
312 # ------------
313 AC_DEFUN([AM_DEP_TRACK],
314 [AC_ARG_ENABLE([dependency-tracking], [dnl
315 AS_HELP_STRING(
316 [--enable-dependency-tracking],
317 [do not reject slow dependency extractors])
318 AS_HELP_STRING(
319 [--disable-dependency-tracking],
320 [speeds up one-time build])])
321 if test "x$enable_dependency_tracking" != xno; then
322 am_depcomp="$ac_aux_dir/depcomp"
323 AMDEPBACKSLASH='\'
324 am__nodep='_no'
325 fi
326 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
327 AC_SUBST([AMDEPBACKSLASH])dnl
328 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
329 AC_SUBST([am__nodep])dnl
330 _AM_SUBST_NOTMAKE([am__nodep])dnl
331 ])
332
333 # Generate code to set up dependency tracking. -*- Autoconf -*-
334
335 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
336 #
337 # This file is free software; the Free Software Foundation
338 # gives unlimited permission to copy and/or distribute it,
339 # with or without modifications, as long as this notice is preserved.
340
341
342 # _AM_OUTPUT_DEPENDENCY_COMMANDS
343 # ------------------------------
344 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
345 [{
346 # Older Autoconf quotes --file arguments for eval, but not when files
347 # are listed without --file. Let's play safe and only enable the eval
348 # if we detect the quoting.
349 case $CONFIG_FILES in
350 *\'*) eval set x "$CONFIG_FILES" ;;
351 *) set x $CONFIG_FILES ;;
352 esac
353 shift
354 for mf
355 do
356 # Strip MF so we end up with the name of the file.
357 mf=`echo "$mf" | sed -e 's/:.*$//'`
358 # Check whether this is an Automake generated Makefile or not.
359 # We used to match only the files named 'Makefile.in', but
360 # some people rename them; so instead we look at the file content.
361 # Grep'ing the first line is not enough: some people post-process
362 # each Makefile.in and add a new line on top of each file to say so.
363 # Grep'ing the whole file is not good either: AIX grep has a line
364 # limit of 2048, but all sed's we know have understand at least 4000.
365 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
366 dirpart=`AS_DIRNAME("$mf")`
367 else
368 continue
369 fi
370 # Extract the definition of DEPDIR, am__include, and am__quote
371 # from the Makefile without running 'make'.
372 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
373 test -z "$DEPDIR" && continue
374 am__include=`sed -n 's/^am__include = //p' < "$mf"`
375 test -z "$am__include" && continue
376 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
377 # Find all dependency output files, they are included files with
378 # $(DEPDIR) in their names. We invoke sed twice because it is the
379 # simplest approach to changing $(DEPDIR) to its actual value in the
380 # expansion.
381 for file in `sed -n "
382 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
383 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
384 # Make sure the directory exists.
385 test -f "$dirpart/$file" && continue
386 fdir=`AS_DIRNAME(["$file"])`
387 AS_MKDIR_P([$dirpart/$fdir])
388 # echo "creating $dirpart/$file"
389 echo '# dummy' > "$dirpart/$file"
390 done
391 done
392 }
393 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
394
395
396 # AM_OUTPUT_DEPENDENCY_COMMANDS
397 # -----------------------------
398 # This macro should only be invoked once -- use via AC_REQUIRE.
399 #
400 # This code is only required when automatic dependency tracking
401 # is enabled. FIXME. This creates each '.P' file that we will
402 # need in order to bootstrap the dependency handling code.
403 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
404 [AC_CONFIG_COMMANDS([depfiles],
405 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
406 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
407 ])
408
409 # Do all the work for Automake. -*- Autoconf -*-
410
411 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
412 #
413 # This file is free software; the Free Software Foundation
414 # gives unlimited permission to copy and/or distribute it,
415 # with or without modifications, as long as this notice is preserved.
416
417 # This macro actually does too much. Some checks are only needed if
418 # your package does certain things. But this isn't really a big deal.
419
420 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
421 # AM_INIT_AUTOMAKE([OPTIONS])
422 # -----------------------------------------------
423 # The call with PACKAGE and VERSION arguments is the old style
424 # call (pre autoconf-2.50), which is being phased out. PACKAGE
425 # and VERSION should now be passed to AC_INIT and removed from
426 # the call to AM_INIT_AUTOMAKE.
427 # We support both call styles for the transition. After
428 # the next Automake release, Autoconf can make the AC_INIT
429 # arguments mandatory, and then we can depend on a new Autoconf
430 # release and drop the old call support.
431 AC_DEFUN([AM_INIT_AUTOMAKE],
432 [AC_PREREQ([2.65])dnl
433 dnl Autoconf wants to disallow AM_ names. We explicitly allow
434 dnl the ones we care about.
435 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
436 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
437 AC_REQUIRE([AC_PROG_INSTALL])dnl
438 if test "`cd $srcdir && pwd`" != "`pwd`"; then
439 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
440 # is not polluted with repeated "-I."
441 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
442 # test to see if srcdir already configured
443 if test -f $srcdir/config.status; then
444 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
445 fi
446 fi
447
448 # test whether we have cygpath
449 if test -z "$CYGPATH_W"; then
450 if (cygpath --version) >/dev/null 2>/dev/null; then
451 CYGPATH_W='cygpath -w'
452 else
453 CYGPATH_W=echo
454 fi
455 fi
456 AC_SUBST([CYGPATH_W])
457
458 # Define the identity of the package.
459 dnl Distinguish between old-style and new-style calls.
460 m4_ifval([$2],
461 [AC_DIAGNOSE([obsolete],
462 [$0: two- and three-arguments forms are deprecated.])
463 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
464 AC_SUBST([PACKAGE], [$1])dnl
465 AC_SUBST([VERSION], [$2])],
466 [_AM_SET_OPTIONS([$1])dnl
467 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
468 m4_if(
469 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
470 [ok:ok],,
471 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
472 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
473 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
474
475 _AM_IF_OPTION([no-define],,
476 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
477 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
478
479 # Some tools Automake needs.
480 AC_REQUIRE([AM_SANITY_CHECK])dnl
481 AC_REQUIRE([AC_ARG_PROGRAM])dnl
482 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
483 AM_MISSING_PROG([AUTOCONF], [autoconf])
484 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
485 AM_MISSING_PROG([AUTOHEADER], [autoheader])
486 AM_MISSING_PROG([MAKEINFO], [makeinfo])
487 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
488 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
489 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
490 # For better backward compatibility. To be removed once Automake 1.9.x
491 # dies out for good. For more background, see:
492 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
493 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
494 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
495 # We need awk for the "check" target. The system "awk" is bad on
496 # some platforms.
497 AC_REQUIRE([AC_PROG_AWK])dnl
498 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
499 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
500 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
501 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
502 [_AM_PROG_TAR([v7])])])
503 _AM_IF_OPTION([no-dependencies],,
504 [AC_PROVIDE_IFELSE([AC_PROG_CC],
505 [_AM_DEPENDENCIES([CC])],
506 [m4_define([AC_PROG_CC],
507 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
508 AC_PROVIDE_IFELSE([AC_PROG_CXX],
509 [_AM_DEPENDENCIES([CXX])],
510 [m4_define([AC_PROG_CXX],
511 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
512 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
513 [_AM_DEPENDENCIES([OBJC])],
514 [m4_define([AC_PROG_OBJC],
515 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
516 AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
517 [_AM_DEPENDENCIES([OBJCXX])],
518 [m4_define([AC_PROG_OBJCXX],
519 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
520 ])
521 AC_REQUIRE([AM_SILENT_RULES])dnl
522 dnl The testsuite driver may need to know about EXEEXT, so add the
523 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
524 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
525 AC_CONFIG_COMMANDS_PRE(dnl
526 [m4_provide_if([_AM_COMPILER_EXEEXT],
527 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
528 ])
529
530 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
531 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
532 dnl mangled by Autoconf and run in a shell conditional statement.
533 m4_define([_AC_COMPILER_EXEEXT],
534 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
535
536
537 # When config.status generates a header, we must update the stamp-h file.
538 # This file resides in the same directory as the config header
539 # that is generated. The stamp files are numbered to have different names.
540
541 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
542 # loop where config.status creates the headers, so we can generate
543 # our stamp files there.
544 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
545 [# Compute $1's index in $config_headers.
546 _am_arg=$1
547 _am_stamp_count=1
548 for _am_header in $config_headers :; do
549 case $_am_header in
550 $_am_arg | $_am_arg:* )
551 break ;;
552 * )
553 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
554 esac
555 done
556 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
557
558 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
559 #
560 # This file is free software; the Free Software Foundation
561 # gives unlimited permission to copy and/or distribute it,
562 # with or without modifications, as long as this notice is preserved.
563
564 # AM_PROG_INSTALL_SH
565 # ------------------
566 # Define $install_sh.
567 AC_DEFUN([AM_PROG_INSTALL_SH],
568 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
569 if test x"${install_sh}" != xset; then
570 case $am_aux_dir in
571 *\ * | *\ *)
572 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
573 *)
574 install_sh="\${SHELL} $am_aux_dir/install-sh"
575 esac
576 fi
577 AC_SUBST([install_sh])])
578
579 # Copyright (C) 2003-2013 Free Software Foundation, Inc.
580 #
581 # This file is free software; the Free Software Foundation
582 # gives unlimited permission to copy and/or distribute it,
583 # with or without modifications, as long as this notice is preserved.
584
585 # Check whether the underlying file-system supports filenames
586 # with a leading dot. For instance MS-DOS doesn't.
587 AC_DEFUN([AM_SET_LEADING_DOT],
588 [rm -rf .tst 2>/dev/null
589 mkdir .tst 2>/dev/null
590 if test -d .tst; then
591 am__leading_dot=.
592 else
593 am__leading_dot=_
594 fi
595 rmdir .tst 2>/dev/null
596 AC_SUBST([am__leading_dot])])
597
598 # Check to see how 'make' treats includes. -*- Autoconf -*-
599
600 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
601 #
602 # This file is free software; the Free Software Foundation
603 # gives unlimited permission to copy and/or distribute it,
604 # with or without modifications, as long as this notice is preserved.
605
606 # AM_MAKE_INCLUDE()
607 # -----------------
608 # Check to see how make treats includes.
609 AC_DEFUN([AM_MAKE_INCLUDE],
610 [am_make=${MAKE-make}
611 cat > confinc << 'END'
612 am__doit:
613 @echo this is the am__doit target
614 .PHONY: am__doit
615 END
616 # If we don't find an include directive, just comment out the code.
617 AC_MSG_CHECKING([for style of include used by $am_make])
618 am__include="#"
619 am__quote=
620 _am_result=none
621 # First try GNU make style include.
622 echo "include confinc" > confmf
623 # Ignore all kinds of additional output from 'make'.
624 case `$am_make -s -f confmf 2> /dev/null` in #(
625 *the\ am__doit\ target*)
626 am__include=include
627 am__quote=
628 _am_result=GNU
629 ;;
630 esac
631 # Now try BSD make style include.
632 if test "$am__include" = "#"; then
633 echo '.include "confinc"' > confmf
634 case `$am_make -s -f confmf 2> /dev/null` in #(
635 *the\ am__doit\ target*)
636 am__include=.include
637 am__quote="\""
638 _am_result=BSD
639 ;;
640 esac
641 fi
642 AC_SUBST([am__include])
643 AC_SUBST([am__quote])
644 AC_MSG_RESULT([$_am_result])
645 rm -f confinc confmf
646 ])
647
648 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
649
650 # Copyright (C) 1997-2013 Free Software Foundation, Inc.
651 #
652 # This file is free software; the Free Software Foundation
653 # gives unlimited permission to copy and/or distribute it,
654 # with or without modifications, as long as this notice is preserved.
655
656 # AM_MISSING_PROG(NAME, PROGRAM)
657 # ------------------------------
658 AC_DEFUN([AM_MISSING_PROG],
659 [AC_REQUIRE([AM_MISSING_HAS_RUN])
660 $1=${$1-"${am_missing_run}$2"}
661 AC_SUBST($1)])
662
663 # AM_MISSING_HAS_RUN
664 # ------------------
665 # Define MISSING if not defined so far and test if it is modern enough.
666 # If it is, set am_missing_run to use it, otherwise, to nothing.
667 AC_DEFUN([AM_MISSING_HAS_RUN],
668 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
669 AC_REQUIRE_AUX_FILE([missing])dnl
670 if test x"${MISSING+set}" != xset; then
671 case $am_aux_dir in
672 *\ * | *\ *)
673 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
674 *)
675 MISSING="\${SHELL} $am_aux_dir/missing" ;;
676 esac
677 fi
678 # Use eval to expand $SHELL
679 if eval "$MISSING --is-lightweight"; then
680 am_missing_run="$MISSING "
681 else
682 am_missing_run=
683 AC_MSG_WARN(['missing' script is too old or missing])
684 fi
685 ])
686
687 # -*- Autoconf -*-
688 # Obsolete and "removed" macros, that must however still report explicit
689 # error messages when used, to smooth transition.
690 #
691 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
692 #
693 # This file is free software; the Free Software Foundation
694 # gives unlimited permission to copy and/or distribute it,
695 # with or without modifications, as long as this notice is preserved.
696
697 AC_DEFUN([AM_CONFIG_HEADER],
698 [AC_DIAGNOSE([obsolete],
699 ['$0': this macro is obsolete.
700 You should use the 'AC][_CONFIG_HEADERS' macro instead.])dnl
701 AC_CONFIG_HEADERS($@)])
702
703 AC_DEFUN([AM_PROG_CC_STDC],
704 [AC_PROG_CC
705 am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
706 AC_DIAGNOSE([obsolete],
707 ['$0': this macro is obsolete.
708 You should simply use the 'AC][_PROG_CC' macro instead.
709 Also, your code should no longer depend upon 'am_cv_prog_cc_stdc',
710 but upon 'ac_cv_prog_cc_stdc'.])])
711
712 AC_DEFUN([AM_C_PROTOTYPES],
713 [AC_FATAL([automatic de-ANSI-fication support has been removed])])
714 AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES])
715
716 # Helper functions for option handling. -*- Autoconf -*-
717
718 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
719 #
720 # This file is free software; the Free Software Foundation
721 # gives unlimited permission to copy and/or distribute it,
722 # with or without modifications, as long as this notice is preserved.
723
724 # _AM_MANGLE_OPTION(NAME)
725 # -----------------------
726 AC_DEFUN([_AM_MANGLE_OPTION],
727 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
728
729 # _AM_SET_OPTION(NAME)
730 # --------------------
731 # Set option NAME. Presently that only means defining a flag for this option.
732 AC_DEFUN([_AM_SET_OPTION],
733 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
734
735 # _AM_SET_OPTIONS(OPTIONS)
736 # ------------------------
737 # OPTIONS is a space-separated list of Automake options.
738 AC_DEFUN([_AM_SET_OPTIONS],
739 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
740
741 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
742 # -------------------------------------------
743 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
744 AC_DEFUN([_AM_IF_OPTION],
745 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
746
747 # Check to make sure that the build environment is sane. -*- Autoconf -*-
748
749 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
750 #
751 # This file is free software; the Free Software Foundation
752 # gives unlimited permission to copy and/or distribute it,
753 # with or without modifications, as long as this notice is preserved.
754
755 # AM_SANITY_CHECK
756 # ---------------
757 AC_DEFUN([AM_SANITY_CHECK],
758 [AC_MSG_CHECKING([whether build environment is sane])
759 # Reject unsafe characters in $srcdir or the absolute working directory
760 # name. Accept space and tab only in the latter.
761 am_lf='
762 '
763 case `pwd` in
764 *[[\\\"\#\$\&\'\`$am_lf]]*)
765 AC_MSG_ERROR([unsafe absolute working directory name]);;
766 esac
767 case $srcdir in
768 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
769 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
770 esac
771
772 # Do 'set' in a subshell so we don't clobber the current shell's
773 # arguments. Must try -L first in case configure is actually a
774 # symlink; some systems play weird games with the mod time of symlinks
775 # (eg FreeBSD returns the mod time of the symlink's containing
776 # directory).
777 if (
778 am_has_slept=no
779 for am_try in 1 2; do
780 echo "timestamp, slept: $am_has_slept" > conftest.file
781 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
782 if test "$[*]" = "X"; then
783 # -L didn't work.
784 set X `ls -t "$srcdir/configure" conftest.file`
785 fi
786 if test "$[*]" != "X $srcdir/configure conftest.file" \
787 && test "$[*]" != "X conftest.file $srcdir/configure"; then
788
789 # If neither matched, then we have a broken ls. This can happen
790 # if, for instance, CONFIG_SHELL is bash and it inherits a
791 # broken ls alias from the environment. This has actually
792 # happened. Such a system could not be considered "sane".
793 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
794 alias in your environment])
795 fi
796 if test "$[2]" = conftest.file || test $am_try -eq 2; then
797 break
798 fi
799 # Just in case.
800 sleep 1
801 am_has_slept=yes
802 done
803 test "$[2]" = conftest.file
804 )
805 then
806 # Ok.
807 :
808 else
809 AC_MSG_ERROR([newly created file is older than distributed files!
810 Check your system clock])
811 fi
812 AC_MSG_RESULT([yes])
813 # If we didn't sleep, we still need to ensure time stamps of config.status and
814 # generated files are strictly newer.
815 am_sleep_pid=
816 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
817 ( sleep 1 ) &
818 am_sleep_pid=$!
819 fi
820 AC_CONFIG_COMMANDS_PRE(
821 [AC_MSG_CHECKING([that generated files are newer than configure])
822 if test -n "$am_sleep_pid"; then
823 # Hide warnings about reused PIDs.
824 wait $am_sleep_pid 2>/dev/null
825 fi
826 AC_MSG_RESULT([done])])
827 rm -f conftest.file
828 ])
829
830 # Copyright (C) 2009-2013 Free Software Foundation, Inc.
831 #
832 # This file is free software; the Free Software Foundation
833 # gives unlimited permission to copy and/or distribute it,
834 # with or without modifications, as long as this notice is preserved.
835
836 # AM_SILENT_RULES([DEFAULT])
837 # --------------------------
838 # Enable less verbose build rules; with the default set to DEFAULT
839 # ("yes" being less verbose, "no" or empty being verbose).
840 AC_DEFUN([AM_SILENT_RULES],
841 [AC_ARG_ENABLE([silent-rules], [dnl
842 AS_HELP_STRING(
843 [--enable-silent-rules],
844 [less verbose build output (undo: "make V=1")])
845 AS_HELP_STRING(
846 [--disable-silent-rules],
847 [verbose build output (undo: "make V=0")])dnl
848 ])
849 case $enable_silent_rules in @%:@ (((
850 yes) AM_DEFAULT_VERBOSITY=0;;
851 no) AM_DEFAULT_VERBOSITY=1;;
852 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
853 esac
854 dnl
855 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
856 dnl do not support nested variable expansions.
857 dnl See automake bug#9928 and bug#10237.
858 am_make=${MAKE-make}
859 AC_CACHE_CHECK([whether $am_make supports nested variables],
860 [am_cv_make_support_nested_variables],
861 [if AS_ECHO([['TRUE=$(BAR$(V))
862 BAR0=false
863 BAR1=true
864 V=1
865 am__doit:
866 @$(TRUE)
867 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
868 am_cv_make_support_nested_variables=yes
869 else
870 am_cv_make_support_nested_variables=no
871 fi])
872 if test $am_cv_make_support_nested_variables = yes; then
873 dnl Using '$V' instead of '$(V)' breaks IRIX make.
874 AM_V='$(V)'
875 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
876 else
877 AM_V=$AM_DEFAULT_VERBOSITY
878 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
879 fi
880 AC_SUBST([AM_V])dnl
881 AM_SUBST_NOTMAKE([AM_V])dnl
882 AC_SUBST([AM_DEFAULT_V])dnl
883 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
884 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
885 AM_BACKSLASH='\'
886 AC_SUBST([AM_BACKSLASH])dnl
887 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
888 ])
889
890 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
891 #
892 # This file is free software; the Free Software Foundation
893 # gives unlimited permission to copy and/or distribute it,
894 # with or without modifications, as long as this notice is preserved.
895
896 # AM_PROG_INSTALL_STRIP
897 # ---------------------
898 # One issue with vendor 'install' (even GNU) is that you can't
899 # specify the program used to strip binaries. This is especially
900 # annoying in cross-compiling environments, where the build's strip
901 # is unlikely to handle the host's binaries.
902 # Fortunately install-sh will honor a STRIPPROG variable, so we
903 # always use install-sh in "make install-strip", and initialize
904 # STRIPPROG with the value of the STRIP variable (set by the user).
905 AC_DEFUN([AM_PROG_INSTALL_STRIP],
906 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
907 # Installed binaries are usually stripped using 'strip' when the user
908 # run "make install-strip". However 'strip' might not be the right
909 # tool to use in cross-compilation environments, therefore Automake
910 # will honor the 'STRIP' environment variable to overrule this program.
911 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
912 if test "$cross_compiling" != no; then
913 AC_CHECK_TOOL([STRIP], [strip], :)
914 fi
915 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
916 AC_SUBST([INSTALL_STRIP_PROGRAM])])
917
918 # Copyright (C) 2006-2013 Free Software Foundation, Inc.
919 #
920 # This file is free software; the Free Software Foundation
921 # gives unlimited permission to copy and/or distribute it,
922 # with or without modifications, as long as this notice is preserved.
923
924 # _AM_SUBST_NOTMAKE(VARIABLE)
925 # ---------------------------
926 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
927 # This macro is traced by Automake.
928 AC_DEFUN([_AM_SUBST_NOTMAKE])
929
930 # AM_SUBST_NOTMAKE(VARIABLE)
931 # --------------------------
932 # Public sister of _AM_SUBST_NOTMAKE.
933 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
934
935 # Check how to create a tarball. -*- Autoconf -*-
936
937 # Copyright (C) 2004-2013 Free Software Foundation, Inc.
938 #
939 # This file is free software; the Free Software Foundation
940 # gives unlimited permission to copy and/or distribute it,
941 # with or without modifications, as long as this notice is preserved.
942
943 # _AM_PROG_TAR(FORMAT)
944 # --------------------
945 # Check how to create a tarball in format FORMAT.
946 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
947 #
948 # Substitute a variable $(am__tar) that is a command
949 # writing to stdout a FORMAT-tarball containing the directory
950 # $tardir.
951 # tardir=directory && $(am__tar) > result.tar
952 #
953 # Substitute a variable $(am__untar) that extract such
954 # a tarball read from stdin.
955 # $(am__untar) < result.tar
956 #
957 AC_DEFUN([_AM_PROG_TAR],
958 [# Always define AMTAR for backward compatibility. Yes, it's still used
959 # in the wild :-( We should find a proper way to deprecate it ...
960 AC_SUBST([AMTAR], ['$${TAR-tar}'])
961
962 # We'll loop over all known methods to create a tar archive until one works.
963 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
964
965 m4_if([$1], [v7],
966 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
967
968 [m4_case([$1],
969 [ustar],
970 [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
971 # There is notably a 21 bits limit for the UID and the GID. In fact,
972 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
973 # and bug#13588).
974 am_max_uid=2097151 # 2^21 - 1
975 am_max_gid=$am_max_uid
976 # The $UID and $GID variables are not portable, so we need to resort
977 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
978 # below are definitely unexpected, so allow the users to see them
979 # (that is, avoid stderr redirection).
980 am_uid=`id -u || echo unknown`
981 am_gid=`id -g || echo unknown`
982 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
983 if test $am_uid -le $am_max_uid; then
984 AC_MSG_RESULT([yes])
985 else
986 AC_MSG_RESULT([no])
987 _am_tools=none
988 fi
989 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
990 if test $am_gid -le $am_max_gid; then
991 AC_MSG_RESULT([yes])
992 else
993 AC_MSG_RESULT([no])
994 _am_tools=none
995 fi],
996
997 [pax],
998 [],
999
1000 [m4_fatal([Unknown tar format])])
1001
1002 AC_MSG_CHECKING([how to create a $1 tar archive])
1003
1004 # Go ahead even if we have the value already cached. We do so because we
1005 # need to set the values for the 'am__tar' and 'am__untar' variables.
1006 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1007
1008 for _am_tool in $_am_tools; do
1009 case $_am_tool in
1010 gnutar)
1011 for _am_tar in tar gnutar gtar; do
1012 AM_RUN_LOG([$_am_tar --version]) && break
1013 done
1014 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1015 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1016 am__untar="$_am_tar -xf -"
1017 ;;
1018 plaintar)
1019 # Must skip GNU tar: if it does not support --format= it doesn't create
1020 # ustar tarball either.
1021 (tar --version) >/dev/null 2>&1 && continue
1022 am__tar='tar chf - "$$tardir"'
1023 am__tar_='tar chf - "$tardir"'
1024 am__untar='tar xf -'
1025 ;;
1026 pax)
1027 am__tar='pax -L -x $1 -w "$$tardir"'
1028 am__tar_='pax -L -x $1 -w "$tardir"'
1029 am__untar='pax -r'
1030 ;;
1031 cpio)
1032 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1033 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1034 am__untar='cpio -i -H $1 -d'
1035 ;;
1036 none)
1037 am__tar=false
1038 am__tar_=false
1039 am__untar=false
1040 ;;
1041 esac
1042
1043 # If the value was cached, stop now. We just wanted to have am__tar
1044 # and am__untar set.
1045 test -n "${am_cv_prog_tar_$1}" && break
1046
1047 # tar/untar a dummy directory, and stop if the command works.
1048 rm -rf conftest.dir
1049 mkdir conftest.dir
1050 echo GrepMe > conftest.dir/file
1051 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1052 rm -rf conftest.dir
1053 if test -s conftest.tar; then
1054 AM_RUN_LOG([$am__untar <conftest.tar])
1055 AM_RUN_LOG([cat conftest.dir/file])
1056 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1057 fi
1058 done
1059 rm -rf conftest.dir
1060
1061 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1062 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1063
1064 AC_SUBST([am__tar])
1065 AC_SUBST([am__untar])
1066 ]) # _AM_PROG_TAR
1067
1068 m4_include([m4/libtool.m4])
1069 m4_include([m4/ltoptions.m4])
1070 m4_include([m4/ltsugar.m4])
1071 m4_include([m4/ltversion.m4])
1072 m4_include([m4/lt~obsolete.m4])
+0
-9
cgats/Makefile.am less more
0 include $(top_srcdir)/Makefile.shared
1
2 privatelib_LTLIBRARIES = libcgats.la
3 privatelibdir = $(pkglibdir)
4
5 libcgats_la_SOURCES = pars.c pars.h cgats.c cgats.h parsstd.c \
6 cgatsstd.c
7
8 EXTRA_DIST = License.txt Readme.txt
+0
-1558
config.guess less more
0 #! /bin/sh
1 # Attempt to guess a canonical system name.
2 # Copyright 1992-2013 Free Software Foundation, Inc.
3
4 timestamp='2013-06-10'
5
6 # This file is free software; you can redistribute it and/or modify it
7 # under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 of the License, or
9 # (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, see <http://www.gnu.org/licenses/>.
18 #
19 # As a special exception to the GNU General Public License, if you
20 # distribute this file as part of a program that contains a
21 # configuration script generated by Autoconf, you may include it under
22 # the same distribution terms that you use for the rest of that
23 # program. This Exception is an additional permission under section 7
24 # of the GNU General Public License, version 3 ("GPLv3").
25 #
26 # Originally written by Per Bothner.
27 #
28 # You can get the latest version of this script from:
29 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
30 #
31 # Please send patches with a ChangeLog entry to config-patches@gnu.org.
32
33
34 me=`echo "$0" | sed -e 's,.*/,,'`
35
36 usage="\
37 Usage: $0 [OPTION]
38
39 Output the configuration name of the system \`$me' is run on.
40
41 Operation modes:
42 -h, --help print this help, then exit
43 -t, --time-stamp print date of last modification, then exit
44 -v, --version print version number, then exit
45
46 Report bugs and patches to <config-patches@gnu.org>."
47
48 version="\
49 GNU config.guess ($timestamp)
50
51 Originally written by Per Bothner.
52 Copyright 1992-2013 Free Software Foundation, Inc.
53
54 This is free software; see the source for copying conditions. There is NO
55 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
56
57 help="
58 Try \`$me --help' for more information."
59
60 # Parse command line
61 while test $# -gt 0 ; do
62 case $1 in
63 --time-stamp | --time* | -t )
64 echo "$timestamp" ; exit ;;
65 --version | -v )
66 echo "$version" ; exit ;;
67 --help | --h* | -h )
68 echo "$usage"; exit ;;
69 -- ) # Stop option processing
70 shift; break ;;
71 - ) # Use stdin as input.
72 break ;;
73 -* )
74 echo "$me: invalid option $1$help" >&2
75 exit 1 ;;
76 * )
77 break ;;
78 esac
79 done
80
81 if test $# != 0; then
82 echo "$me: too many arguments$help" >&2
83 exit 1
84 fi
85
86 trap 'exit 1' 1 2 15
87
88 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
89 # compiler to aid in system detection is discouraged as it requires
90 # temporary files to be created and, as you can see below, it is a
91 # headache to deal with in a portable fashion.
92
93 # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
94 # use `HOST_CC' if defined, but it is deprecated.
95
96 # Portable tmp directory creation inspired by the Autoconf team.
97
98 set_cc_for_build='
99 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
100 trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
101 : ${TMPDIR=/tmp} ;
102 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
103 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
104 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
105 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
106 dummy=$tmp/dummy ;
107 tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
108 case $CC_FOR_BUILD,$HOST_CC,$CC in
109 ,,) echo "int x;" > $dummy.c ;
110 for c in cc gcc c89 c99 ; do
111 if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
112 CC_FOR_BUILD="$c"; break ;
113 fi ;
114 done ;
115 if test x"$CC_FOR_BUILD" = x ; then
116 CC_FOR_BUILD=no_compiler_found ;
117 fi
118 ;;
119 ,,*) CC_FOR_BUILD=$CC ;;
120 ,*,*) CC_FOR_BUILD=$HOST_CC ;;
121 esac ; set_cc_for_build= ;'
122
123 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
124 # (ghazi@noc.rutgers.edu 1994-08-24)
125 if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
126 PATH=$PATH:/.attbin ; export PATH
127 fi
128
129 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
130 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
131 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
132 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
133
134 case "${UNAME_SYSTEM}" in
135 Linux|GNU|GNU/*)
136 # If the system lacks a compiler, then just pick glibc.
137 # We could probably try harder.
138 LIBC=gnu
139
140 eval $set_cc_for_build
141 cat <<-EOF > $dummy.c
142 #include <features.h>
143 #if defined(__UCLIBC__)
144 LIBC=uclibc
145 #elif defined(__dietlibc__)
146 LIBC=dietlibc
147 #else
148 LIBC=gnu
149 #endif
150 EOF
151 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
152 ;;
153 esac
154
155 # Note: order is significant - the case branches are not exclusive.
156
157 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
158 *:NetBSD:*:*)
159 # NetBSD (nbsd) targets should (where applicable) match one or
160 # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
161 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
162 # switched to ELF, *-*-netbsd* would select the old
163 # object file format. This provides both forward
164 # compatibility and a consistent mechanism for selecting the
165 # object file format.
166 #
167 # Note: NetBSD doesn't particularly care about the vendor
168 # portion of the name. We always set it to "unknown".
169 sysctl="sysctl -n hw.machine_arch"
170 UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
171 /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
172 case "${UNAME_MACHINE_ARCH}" in
173 armeb) machine=armeb-unknown ;;
174 arm*) machine=arm-unknown ;;
175 sh3el) machine=shl-unknown ;;
176 sh3eb) machine=sh-unknown ;;
177 sh5el) machine=sh5le-unknown ;;
178 *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
179 esac
180 # The Operating System including object format, if it has switched
181 # to ELF recently, or will in the future.
182 case "${UNAME_MACHINE_ARCH}" in
183 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
184 eval $set_cc_for_build
185 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
186 | grep -q __ELF__
187 then
188 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
189 # Return netbsd for either. FIX?
190 os=netbsd
191 else
192 os=netbsdelf
193 fi
194 ;;
195 *)
196 os=netbsd
197 ;;
198 esac
199 # The OS release
200 # Debian GNU/NetBSD machines have a different userland, and
201 # thus, need a distinct triplet. However, they do not need
202 # kernel version information, so it can be replaced with a
203 # suitable tag, in the style of linux-gnu.
204 case "${UNAME_VERSION}" in
205 Debian*)
206 release='-gnu'
207 ;;
208 *)
209 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
210 ;;
211 esac
212 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
213 # contains redundant information, the shorter form:
214 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
215 echo "${machine}-${os}${release}"
216 exit ;;
217 *:Bitrig:*:*)
218 UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
219 echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
220 exit ;;
221 *:OpenBSD:*:*)
222 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
223 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
224 exit ;;
225 *:ekkoBSD:*:*)
226 echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
227 exit ;;
228 *:SolidBSD:*:*)
229 echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
230 exit ;;
231 macppc:MirBSD:*:*)
232 echo powerpc-unknown-mirbsd${UNAME_RELEASE}
233 exit ;;
234 *:MirBSD:*:*)
235 echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
236 exit ;;
237 alpha:OSF1:*:*)
238 case $UNAME_RELEASE in
239 *4.0)
240 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
241 ;;
242 *5.*)
243 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
244 ;;
245 esac
246 # According to Compaq, /usr/sbin/psrinfo has been available on
247 # OSF/1 and Tru64 systems produced since 1995. I hope that
248 # covers most systems running today. This code pipes the CPU
249 # types through head -n 1, so we only detect the type of CPU 0.
250 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
251 case "$ALPHA_CPU_TYPE" in
252 "EV4 (21064)")
253 UNAME_MACHINE="alpha" ;;
254 "EV4.5 (21064)")
255 UNAME_MACHINE="alpha" ;;
256 "LCA4 (21066/21068)")
257 UNAME_MACHINE="alpha" ;;
258 "EV5 (21164)")
259 UNAME_MACHINE="alphaev5" ;;
260 "EV5.6 (21164A)")
261 UNAME_MACHINE="alphaev56" ;;
262 "EV5.6 (21164PC)")
263 UNAME_MACHINE="alphapca56" ;;
264 "EV5.7 (21164PC)")
265 UNAME_MACHINE="alphapca57" ;;
266 "EV6 (21264)")
267 UNAME_MACHINE="alphaev6" ;;
268 "EV6.7 (21264A)")
269 UNAME_MACHINE="alphaev67" ;;
270 "EV6.8CB (21264C)")
271 UNAME_MACHINE="alphaev68" ;;
272 "EV6.8AL (21264B)")
273 UNAME_MACHINE="alphaev68" ;;
274 "EV6.8CX (21264D)")
275 UNAME_MACHINE="alphaev68" ;;
276 "EV6.9A (21264/EV69A)")
277 UNAME_MACHINE="alphaev69" ;;
278 "EV7 (21364)")
279 UNAME_MACHINE="alphaev7" ;;
280 "EV7.9 (21364A)")
281 UNAME_MACHINE="alphaev79" ;;
282 esac
283 # A Pn.n version is a patched version.
284 # A Vn.n version is a released version.
285 # A Tn.n version is a released field test version.
286 # A Xn.n version is an unreleased experimental baselevel.
287 # 1.2 uses "1.2" for uname -r.
288 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
289 # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
290 exitcode=$?
291 trap '' 0
292 exit $exitcode ;;
293 Alpha\ *:Windows_NT*:*)
294 # How do we know it's Interix rather than the generic POSIX subsystem?
295 # Should we change UNAME_MACHINE based on the output of uname instead
296 # of the specific Alpha model?
297 echo alpha-pc-interix
298 exit ;;
299 21064:Windows_NT:50:3)
300 echo alpha-dec-winnt3.5
301 exit ;;
302 Amiga*:UNIX_System_V:4.0:*)
303 echo m68k-unknown-sysv4
304 exit ;;
305 *:[Aa]miga[Oo][Ss]:*:*)
306 echo ${UNAME_MACHINE}-unknown-amigaos
307 exit ;;
308 *:[Mm]orph[Oo][Ss]:*:*)
309 echo ${UNAME_MACHINE}-unknown-morphos
310 exit ;;
311 *:OS/390:*:*)
312 echo i370-ibm-openedition
313 exit ;;
314 *:z/VM:*:*)
315 echo s390-ibm-zvmoe
316 exit ;;
317 *:OS400:*:*)
318 echo powerpc-ibm-os400
319 exit ;;
320 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
321 echo arm-acorn-riscix${UNAME_RELEASE}
322 exit ;;
323 arm*:riscos:*:*|arm*:RISCOS:*:*)
324 echo arm-unknown-riscos
325 exit ;;
326 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
327 echo hppa1.1-hitachi-hiuxmpp
328 exit ;;
329 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
330 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
331 if test "`(/bin/universe) 2>/dev/null`" = att ; then
332 echo pyramid-pyramid-sysv3
333 else
334 echo pyramid-pyramid-bsd
335 fi
336 exit ;;
337 NILE*:*:*:dcosx)
338 echo pyramid-pyramid-svr4
339 exit ;;
340 DRS?6000:unix:4.0:6*)
341 echo sparc-icl-nx6
342 exit ;;
343 DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
344 case `/usr/bin/uname -p` in
345 sparc) echo sparc-icl-nx7; exit ;;
346 esac ;;
347 s390x:SunOS:*:*)
348 echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
349 exit ;;
350 sun4H:SunOS:5.*:*)
351 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
352 exit ;;
353 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
354 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
355 exit ;;
356 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
357 echo i386-pc-auroraux${UNAME_RELEASE}
358 exit ;;
359 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
360 eval $set_cc_for_build
361 SUN_ARCH="i386"
362 # If there is a compiler, see if it is configured for 64-bit objects.
363 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
364 # This test works for both compilers.
365 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
366 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
367 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
368 grep IS_64BIT_ARCH >/dev/null
369 then
370 SUN_ARCH="x86_64"
371 fi
372 fi
373 echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
374 exit ;;
375 sun4*:SunOS:6*:*)
376 # According to config.sub, this is the proper way to canonicalize
377 # SunOS6. Hard to guess exactly what SunOS6 will be like, but
378 # it's likely to be more like Solaris than SunOS4.
379 echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
380 exit ;;
381 sun4*:SunOS:*:*)
382 case "`/usr/bin/arch -k`" in
383 Series*|S4*)
384 UNAME_RELEASE=`uname -v`
385 ;;
386 esac
387 # Japanese Language versions have a version number like `4.1.3-JL'.
388 echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
389 exit ;;
390 sun3*:SunOS:*:*)
391 echo m68k-sun-sunos${UNAME_RELEASE}
392 exit ;;
393 sun*:*:4.2BSD:*)
394 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
395 test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
396 case "`/bin/arch`" in
397 sun3)
398 echo m68k-sun-sunos${UNAME_RELEASE}
399 ;;
400 sun4)
401 echo sparc-sun-sunos${UNAME_RELEASE}
402 ;;
403 esac
404 exit ;;
405 aushp:SunOS:*:*)
406 echo sparc-auspex-sunos${UNAME_RELEASE}
407 exit ;;
408 # The situation for MiNT is a little confusing. The machine name
409 # can be virtually everything (everything which is not
410 # "atarist" or "atariste" at least should have a processor
411 # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
412 # to the lowercase version "mint" (or "freemint"). Finally
413 # the system name "TOS" denotes a system which is actually not
414 # MiNT. But MiNT is downward compatible to TOS, so this should
415 # be no problem.
416 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
417 echo m68k-atari-mint${UNAME_RELEASE}
418 exit ;;
419 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
420 echo m68k-atari-mint${UNAME_RELEASE}
421 exit ;;
422 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
423 echo m68k-atari-mint${UNAME_RELEASE}
424 exit ;;
425 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
426 echo m68k-milan-mint${UNAME_RELEASE}
427 exit ;;
428 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
429 echo m68k-hades-mint${UNAME_RELEASE}
430 exit ;;
431 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
432 echo m68k-unknown-mint${UNAME_RELEASE}
433 exit ;;
434 m68k:machten:*:*)
435 echo m68k-apple-machten${UNAME_RELEASE}
436 exit ;;
437 powerpc:machten:*:*)
438 echo powerpc-apple-machten${UNAME_RELEASE}
439 exit ;;
440 RISC*:Mach:*:*)
441 echo mips-dec-mach_bsd4.3
442 exit ;;
443 RISC*:ULTRIX:*:*)
444 echo mips-dec-ultrix${UNAME_RELEASE}
445 exit ;;
446 VAX*:ULTRIX*:*:*)
447 echo vax-dec-ultrix${UNAME_RELEASE}
448 exit ;;
449 2020:CLIX:*:* | 2430:CLIX:*:*)
450 echo clipper-intergraph-clix${UNAME_RELEASE}
451 exit ;;
452 mips:*:*:UMIPS | mips:*:*:RISCos)
453 eval $set_cc_for_build
454 sed 's/^ //' << EOF >$dummy.c
455 #ifdef __cplusplus
456 #include <stdio.h> /* for printf() prototype */
457 int main (int argc, char *argv[]) {
458 #else
459 int main (argc, argv) int argc; char *argv[]; {
460 #endif
461 #if defined (host_mips) && defined (MIPSEB)
462 #if defined (SYSTYPE_SYSV)
463 printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
464 #endif
465 #if defined (SYSTYPE_SVR4)
466 printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
467 #endif
468 #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
469 printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
470 #endif
471 #endif
472 exit (-1);
473 }
474 EOF
475 $CC_FOR_BUILD -o $dummy $dummy.c &&
476 dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
477 SYSTEM_NAME=`$dummy $dummyarg` &&
478 { echo "$SYSTEM_NAME"; exit; }
479 echo mips-mips-riscos${UNAME_RELEASE}
480 exit ;;
481 Motorola:PowerMAX_OS:*:*)
482 echo powerpc-motorola-powermax
483 exit ;;
484 Motorola:*:4.3:PL8-*)
485 echo powerpc-harris-powermax
486 exit ;;
487 Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
488 echo powerpc-harris-powermax
489 exit ;;
490 Night_Hawk:Power_UNIX:*:*)
491 echo powerpc-harris-powerunix
492 exit ;;
493 m88k:CX/UX:7*:*)
494 echo m88k-harris-cxux7
495 exit ;;
496 m88k:*:4*:R4*)
497 echo m88k-motorola-sysv4
498 exit ;;
499 m88k:*:3*:R3*)
500 echo m88k-motorola-sysv3
501 exit ;;
502 AViiON:dgux:*:*)
503 # DG/UX returns AViiON for all architectures
504 UNAME_PROCESSOR=`/usr/bin/uname -p`
505 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
506 then
507 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
508 [ ${TARGET_BINARY_INTERFACE}x = x ]
509 then
510 echo m88k-dg-dgux${UNAME_RELEASE}
511 else
512 echo m88k-dg-dguxbcs${UNAME_RELEASE}
513 fi
514 else
515 echo i586-dg-dgux${UNAME_RELEASE}
516 fi
517 exit ;;
518 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
519 echo m88k-dolphin-sysv3
520 exit ;;
521 M88*:*:R3*:*)
522 # Delta 88k system running SVR3
523 echo m88k-motorola-sysv3
524 exit ;;
525 XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
526 echo m88k-tektronix-sysv3
527 exit ;;
528 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
529 echo m68k-tektronix-bsd
530 exit ;;
531 *:IRIX*:*:*)
532 echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
533 exit ;;
534 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
535 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
536 exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
537 i*86:AIX:*:*)
538 echo i386-ibm-aix
539 exit ;;
540 ia64:AIX:*:*)
541 if [ -x /usr/bin/oslevel ] ; then
542 IBM_REV=`/usr/bin/oslevel`
543 else
544 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
545 fi
546 echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
547 exit ;;
548 *:AIX:2:3)
549 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
550 eval $set_cc_for_build
551 sed 's/^ //' << EOF >$dummy.c
552 #include <sys/systemcfg.h>
553
554 main()
555 {
556 if (!__power_pc())
557 exit(1);
558 puts("powerpc-ibm-aix3.2.5");
559 exit(0);
560 }
561 EOF
562 if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
563 then
564 echo "$SYSTEM_NAME"
565 else
566 echo rs6000-ibm-aix3.2.5
567 fi
568 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
569 echo rs6000-ibm-aix3.2.4
570 else
571 echo rs6000-ibm-aix3.2
572 fi
573 exit ;;
574 *:AIX:*:[4567])
575 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
576 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
577 IBM_ARCH=rs6000
578 else
579 IBM_ARCH=powerpc
580 fi
581 if [ -x /usr/bin/oslevel ] ; then
582 IBM_REV=`/usr/bin/oslevel`
583 else
584 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
585 fi
586 echo ${IBM_ARCH}-ibm-aix${IBM_REV}
587 exit ;;
588 *:AIX:*:*)
589 echo rs6000-ibm-aix
590 exit ;;
591 ibmrt:4.4BSD:*|romp-ibm:BSD:*)
592 echo romp-ibm-bsd4.4
593 exit ;;
594 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
595 echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
596 exit ;; # report: romp-ibm BSD 4.3
597 *:BOSX:*:*)
598 echo rs6000-bull-bosx
599 exit ;;
600 DPX/2?00:B.O.S.:*:*)
601 echo m68k-bull-sysv3
602 exit ;;
603 9000/[34]??:4.3bsd:1.*:*)
604 echo m68k-hp-bsd
605 exit ;;
606 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
607 echo m68k-hp-bsd4.4
608 exit ;;
609 9000/[34678]??:HP-UX:*:*)
610 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
611 case "${UNAME_MACHINE}" in
612 9000/31? ) HP_ARCH=m68000 ;;
613 9000/[34]?? ) HP_ARCH=m68k ;;
614 9000/[678][0-9][0-9])
615 if [ -x /usr/bin/getconf ]; then
616 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
617 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
618 case "${sc_cpu_version}" in
619 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
620 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
621 532) # CPU_PA_RISC2_0
622 case "${sc_kernel_bits}" in
623 32) HP_ARCH="hppa2.0n" ;;
624 64) HP_ARCH="hppa2.0w" ;;
625 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
626 esac ;;
627 esac
628 fi
629 if [ "${HP_ARCH}" = "" ]; then
630 eval $set_cc_for_build
631 sed 's/^ //' << EOF >$dummy.c
632
633 #define _HPUX_SOURCE
634 #include <stdlib.h>
635 #include <unistd.h>
636
637 int main ()
638 {
639 #if defined(_SC_KERNEL_BITS)
640 long bits = sysconf(_SC_KERNEL_BITS);
641 #endif
642 long cpu = sysconf (_SC_CPU_VERSION);
643
644 switch (cpu)
645 {
646 case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
647 case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
648 case CPU_PA_RISC2_0:
649 #if defined(_SC_KERNEL_BITS)
650 switch (bits)
651 {
652 case 64: puts ("hppa2.0w"); break;
653 case 32: puts ("hppa2.0n"); break;
654 default: puts ("hppa2.0"); break;
655 } break;
656 #else /* !defined(_SC_KERNEL_BITS) */
657 puts ("hppa2.0"); break;
658 #endif
659 default: puts ("hppa1.0"); break;
660 }
661 exit (0);
662 }
663 EOF
664 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
665 test -z "$HP_ARCH" && HP_ARCH=hppa
666 fi ;;
667 esac
668 if [ ${HP_ARCH} = "hppa2.0w" ]
669 then
670 eval $set_cc_for_build
671
672 # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
673 # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
674 # generating 64-bit code. GNU and HP use different nomenclature:
675 #
676 # $ CC_FOR_BUILD=cc ./config.guess
677 # => hppa2.0w-hp-hpux11.23
678 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
679 # => hppa64-hp-hpux11.23
680
681 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
682 grep -q __LP64__
683 then
684 HP_ARCH="hppa2.0w"
685 else
686 HP_ARCH="hppa64"
687 fi
688 fi
689 echo ${HP_ARCH}-hp-hpux${HPUX_REV}
690 exit ;;
691 ia64:HP-UX:*:*)
692 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
693 echo ia64-hp-hpux${HPUX_REV}
694 exit ;;
695 3050*:HI-UX:*:*)
696 eval $set_cc_for_build
697 sed 's/^ //' << EOF >$dummy.c
698 #include <unistd.h>
699 int
700 main ()
701 {
702 long cpu = sysconf (_SC_CPU_VERSION);
703 /* The order matters, because CPU_IS_HP_MC68K erroneously returns
704 true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
705 results, however. */
706 if (CPU_IS_PA_RISC (cpu))
707 {
708 switch (cpu)
709 {
710 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
711 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
712 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
713 default: puts ("hppa-hitachi-hiuxwe2"); break;
714 }
715 }
716 else if (CPU_IS_HP_MC68K (cpu))
717 puts ("m68k-hitachi-hiuxwe2");
718 else puts ("unknown-hitachi-hiuxwe2");
719 exit (0);
720 }
721 EOF
722 $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
723 { echo "$SYSTEM_NAME"; exit; }
724 echo unknown-hitachi-hiuxwe2
725 exit ;;
726 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
727 echo hppa1.1-hp-bsd
728 exit ;;
729 9000/8??:4.3bsd:*:*)
730 echo hppa1.0-hp-bsd
731 exit ;;
732 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
733 echo hppa1.0-hp-mpeix
734 exit ;;
735 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
736 echo hppa1.1-hp-osf
737 exit ;;
738 hp8??:OSF1:*:*)
739 echo hppa1.0-hp-osf
740 exit ;;
741 i*86:OSF1:*:*)
742 if [ -x /usr/sbin/sysversion ] ; then
743 echo ${UNAME_MACHINE}-unknown-osf1mk
744 else
745 echo ${UNAME_MACHINE}-unknown-osf1
746 fi
747 exit ;;
748 parisc*:Lites*:*:*)
749 echo hppa1.1-hp-lites
750 exit ;;
751 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
752 echo c1-convex-bsd
753 exit ;;
754 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
755 if getsysinfo -f scalar_acc
756 then echo c32-convex-bsd
757 else echo c2-convex-bsd
758 fi
759 exit ;;
760 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
761 echo c34-convex-bsd
762 exit ;;
763 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
764 echo c38-convex-bsd
765 exit ;;
766 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
767 echo c4-convex-bsd
768 exit ;;
769 CRAY*Y-MP:*:*:*)
770 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
771 exit ;;
772 CRAY*[A-Z]90:*:*:*)
773 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
774 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
775 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
776 -e 's/\.[^.]*$/.X/'
777 exit ;;
778 CRAY*TS:*:*:*)
779 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
780 exit ;;
781 CRAY*T3E:*:*:*)
782 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
783 exit ;;
784 CRAY*SV1:*:*:*)
785 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
786 exit ;;
787 *:UNICOS/mp:*:*)
788 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
789 exit ;;
790 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
791 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
792 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
793 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
794 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
795 exit ;;
796 5000:UNIX_System_V:4.*:*)
797 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
798 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
799 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
800 exit ;;
801 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
802 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
803 exit ;;
804 sparc*:BSD/OS:*:*)
805 echo sparc-unknown-bsdi${UNAME_RELEASE}
806 exit ;;
807 *:BSD/OS:*:*)
808 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
809 exit ;;
810 *:FreeBSD:*:*)
811 UNAME_PROCESSOR=`/usr/bin/uname -p`
812 case ${UNAME_PROCESSOR} in
813 amd64)
814 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
815 *)
816 echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
817 esac
818 exit ;;
819 i*:CYGWIN*:*)
820 echo ${UNAME_MACHINE}-pc-cygwin
821 exit ;;
822 *:MINGW64*:*)
823 echo ${UNAME_MACHINE}-pc-mingw64
824 exit ;;
825 *:MINGW*:*)
826 echo ${UNAME_MACHINE}-pc-mingw32
827 exit ;;
828 i*:MSYS*:*)
829 echo ${UNAME_MACHINE}-pc-msys
830 exit ;;
831 i*:windows32*:*)
832 # uname -m includes "-pc" on this system.
833 echo ${UNAME_MACHINE}-mingw32
834 exit ;;
835 i*:PW*:*)
836 echo ${UNAME_MACHINE}-pc-pw32
837 exit ;;
838 *:Interix*:*)
839 case ${UNAME_MACHINE} in
840 x86)
841 echo i586-pc-interix${UNAME_RELEASE}
842 exit ;;
843 authenticamd | genuineintel | EM64T)
844 echo x86_64-unknown-interix${UNAME_RELEASE}
845 exit ;;
846 IA64)
847 echo ia64-unknown-interix${UNAME_RELEASE}
848 exit ;;
849 esac ;;
850 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
851 echo i${UNAME_MACHINE}-pc-mks
852 exit ;;
853 8664:Windows_NT:*)
854 echo x86_64-pc-mks
855 exit ;;
856 i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
857 # How do we know it's Interix rather than the generic POSIX subsystem?
858 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
859 # UNAME_MACHINE based on the output of uname instead of i386?
860 echo i586-pc-interix
861 exit ;;
862 i*:UWIN*:*)
863 echo ${UNAME_MACHINE}-pc-uwin
864 exit ;;
865 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
866 echo x86_64-unknown-cygwin
867 exit ;;
868 p*:CYGWIN*:*)
869 echo powerpcle-unknown-cygwin
870 exit ;;
871 prep*:SunOS:5.*:*)
872 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
873 exit ;;
874 *:GNU:*:*)
875 # the GNU system
876 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
877 exit ;;
878 *:GNU/*:*:*)
879 # other systems with GNU libc and userland
880 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
881 exit ;;
882 i*86:Minix:*:*)
883 echo ${UNAME_MACHINE}-pc-minix
884 exit ;;
885 aarch64:Linux:*:*)
886 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
887 exit ;;
888 aarch64_be:Linux:*:*)
889 UNAME_MACHINE=aarch64_be
890 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
891 exit ;;
892 alpha:Linux:*:*)
893 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
894 EV5) UNAME_MACHINE=alphaev5 ;;
895 EV56) UNAME_MACHINE=alphaev56 ;;
896 PCA56) UNAME_MACHINE=alphapca56 ;;
897 PCA57) UNAME_MACHINE=alphapca56 ;;
898 EV6) UNAME_MACHINE=alphaev6 ;;
899 EV67) UNAME_MACHINE=alphaev67 ;;
900 EV68*) UNAME_MACHINE=alphaev68 ;;
901 esac
902 objdump --private-headers /bin/sh | grep -q ld.so.1
903 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
904 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
905 exit ;;
906 arc:Linux:*:* | arceb:Linux:*:*)
907 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
908 exit ;;
909 arm*:Linux:*:*)
910 eval $set_cc_for_build
911 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
912 | grep -q __ARM_EABI__
913 then
914 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
915 else
916 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
917 | grep -q __ARM_PCS_VFP
918 then
919 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
920 else
921 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
922 fi
923 fi
924 exit ;;
925 avr32*:Linux:*:*)
926 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
927 exit ;;
928 cris:Linux:*:*)
929 echo ${UNAME_MACHINE}-axis-linux-${LIBC}
930 exit ;;
931 crisv32:Linux:*:*)
932 echo ${UNAME_MACHINE}-axis-linux-${LIBC}
933 exit ;;
934 frv:Linux:*:*)
935 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
936 exit ;;
937 hexagon:Linux:*:*)
938 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
939 exit ;;
940 i*86:Linux:*:*)
941 echo ${UNAME_MACHINE}-pc-linux-${LIBC}
942 exit ;;
943 ia64:Linux:*:*)
944 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
945 exit ;;
946 m32r*:Linux:*:*)
947 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
948 exit ;;
949 m68*:Linux:*:*)
950 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
951 exit ;;
952 mips:Linux:*:* | mips64:Linux:*:*)
953 eval $set_cc_for_build
954 sed 's/^ //' << EOF >$dummy.c
955 #undef CPU
956 #undef ${UNAME_MACHINE}
957 #undef ${UNAME_MACHINE}el
958 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
959 CPU=${UNAME_MACHINE}el
960 #else
961 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
962 CPU=${UNAME_MACHINE}
963 #else
964 CPU=
965 #endif
966 #endif
967 EOF
968 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
969 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
970 ;;
971 or1k:Linux:*:*)
972 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
973 exit ;;
974 or32:Linux:*:*)
975 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
976 exit ;;
977 padre:Linux:*:*)
978 echo sparc-unknown-linux-${LIBC}
979 exit ;;
980 parisc64:Linux:*:* | hppa64:Linux:*:*)
981 echo hppa64-unknown-linux-${LIBC}
982 exit ;;
983 parisc:Linux:*:* | hppa:Linux:*:*)
984 # Look for CPU level
985 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
986 PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
987 PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
988 *) echo hppa-unknown-linux-${LIBC} ;;
989 esac
990 exit ;;
991 ppc64:Linux:*:*)
992 echo powerpc64-unknown-linux-${LIBC}
993 exit ;;
994 ppc:Linux:*:*)
995 echo powerpc-unknown-linux-${LIBC}
996 exit ;;
997 ppc64le:Linux:*:*)
998 echo powerpc64le-unknown-linux-${LIBC}
999 exit ;;
1000 ppcle:Linux:*:*)
1001 echo powerpcle-unknown-linux-${LIBC}
1002 exit ;;
1003 s390:Linux:*:* | s390x:Linux:*:*)
1004 echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
1005 exit ;;
1006 sh64*:Linux:*:*)
1007 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1008 exit ;;
1009 sh*:Linux:*:*)
1010 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1011 exit ;;
1012 sparc:Linux:*:* | sparc64:Linux:*:*)
1013 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1014 exit ;;
1015 tile*:Linux:*:*)
1016 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1017 exit ;;
1018 vax:Linux:*:*)
1019 echo ${UNAME_MACHINE}-dec-linux-${LIBC}
1020 exit ;;
1021 x86_64:Linux:*:*)
1022 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1023 exit ;;
1024 xtensa*:Linux:*:*)
1025 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1026 exit ;;
1027 i*86:DYNIX/ptx:4*:*)
1028 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
1029 # earlier versions are messed up and put the nodename in both
1030 # sysname and nodename.
1031 echo i386-sequent-sysv4
1032 exit ;;
1033 i*86:UNIX_SV:4.2MP:2.*)
1034 # Unixware is an offshoot of SVR4, but it has its own version
1035 # number series starting with 2...
1036 # I am not positive that other SVR4 systems won't match this,
1037 # I just have to hope. -- rms.
1038 # Use sysv4.2uw... so that sysv4* matches it.
1039 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
1040 exit ;;
1041 i*86:OS/2:*:*)
1042 # If we were able to find `uname', then EMX Unix compatibility
1043 # is probably installed.
1044 echo ${UNAME_MACHINE}-pc-os2-emx
1045 exit ;;
1046 i*86:XTS-300:*:STOP)
1047 echo ${UNAME_MACHINE}-unknown-stop
1048 exit ;;
1049 i*86:atheos:*:*)
1050 echo ${UNAME_MACHINE}-unknown-atheos
1051 exit ;;
1052 i*86:syllable:*:*)
1053 echo ${UNAME_MACHINE}-pc-syllable
1054 exit ;;
1055 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1056 echo i386-unknown-lynxos${UNAME_RELEASE}
1057 exit ;;
1058 i*86:*DOS:*:*)
1059 echo ${UNAME_MACHINE}-pc-msdosdjgpp
1060 exit ;;
1061 i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
1062 UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
1063 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1064 echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
1065 else
1066 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
1067 fi
1068 exit ;;
1069 i*86:*:5:[678]*)
1070 # UnixWare 7.x, OpenUNIX and OpenServer 6.
1071 case `/bin/uname -X | grep "^Machine"` in
1072 *486*) UNAME_MACHINE=i486 ;;
1073 *Pentium) UNAME_MACHINE=i586 ;;
1074 *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1075 esac
1076 echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
1077 exit ;;
1078 i*86:*:3.2:*)
1079 if test -f /usr/options/cb.name; then
1080 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1081 echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
1082 elif /bin/uname -X 2>/dev/null >/dev/null ; then
1083 UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
1084 (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
1085 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
1086 && UNAME_MACHINE=i586
1087 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
1088 && UNAME_MACHINE=i686
1089 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
1090 && UNAME_MACHINE=i686
1091 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
1092 else
1093 echo ${UNAME_MACHINE}-pc-sysv32
1094 fi
1095 exit ;;
1096 pc:*:*:*)
1097 # Left here for compatibility:
1098 # uname -m prints for DJGPP always 'pc', but it prints nothing about
1099 # the processor, so we play safe by assuming i586.
1100 # Note: whatever this is, it MUST be the same as what config.sub
1101 # prints for the "djgpp" host, or else GDB configury will decide that
1102 # this is a cross-build.
1103 echo i586-pc-msdosdjgpp
1104 exit ;;
1105 Intel:Mach:3*:*)
1106 echo i386-pc-mach3
1107 exit ;;
1108 paragon:*:*:*)
1109 echo i860-intel-osf1
1110 exit ;;
1111 i860:*:4.*:*) # i860-SVR4
1112 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1113 echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
1114 else # Add other i860-SVR4 vendors below as they are discovered.
1115 echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
1116 fi
1117 exit ;;
1118 mini*:CTIX:SYS*5:*)
1119 # "miniframe"
1120 echo m68010-convergent-sysv
1121 exit ;;
1122 mc68k:UNIX:SYSTEM5:3.51m)
1123 echo m68k-convergent-sysv
1124 exit ;;
1125 M680?0:D-NIX:5.3:*)
1126 echo m68k-diab-dnix
1127 exit ;;
1128 M68*:*:R3V[5678]*:*)
1129 test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
1130 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
1131 OS_REL=''
1132 test -r /etc/.relid \
1133 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1134 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1135 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1136 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1137 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1138 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1139 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1140 && { echo i486-ncr-sysv4; exit; } ;;
1141 NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1142 OS_REL='.3'
1143 test -r /etc/.relid \
1144 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1145 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1146 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1147 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1148 && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
1149 /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1150 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1151 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1152 echo m68k-unknown-lynxos${UNAME_RELEASE}
1153 exit ;;
1154 mc68030:UNIX_System_V:4.*:*)
1155 echo m68k-atari-sysv4
1156 exit ;;
1157 TSUNAMI:LynxOS:2.*:*)
1158 echo sparc-unknown-lynxos${UNAME_RELEASE}
1159 exit ;;
1160 rs6000:LynxOS:2.*:*)
1161 echo rs6000-unknown-lynxos${UNAME_RELEASE}
1162 exit ;;
1163 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1164 echo powerpc-unknown-lynxos${UNAME_RELEASE}
1165 exit ;;
1166 SM[BE]S:UNIX_SV:*:*)
1167 echo mips-dde-sysv${UNAME_RELEASE}
1168 exit ;;
1169 RM*:ReliantUNIX-*:*:*)
1170 echo mips-sni-sysv4
1171 exit ;;
1172 RM*:SINIX-*:*:*)
1173 echo mips-sni-sysv4
1174 exit ;;
1175 *:SINIX-*:*:*)
1176 if uname -p 2>/dev/null >/dev/null ; then
1177 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1178 echo ${UNAME_MACHINE}-sni-sysv4
1179 else
1180 echo ns32k-sni-sysv
1181 fi
1182 exit ;;
1183 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1184 # says <Richard.M.Bartel@ccMail.Census.GOV>
1185 echo i586-unisys-sysv4
1186 exit ;;
1187 *:UNIX_System_V:4*:FTX*)
1188 # From Gerald Hewes <hewes@openmarket.com>.
1189 # How about differentiating between stratus architectures? -djm
1190 echo hppa1.1-stratus-sysv4
1191 exit ;;
1192 *:*:*:FTX*)
1193 # From seanf@swdc.stratus.com.
1194 echo i860-stratus-sysv4
1195 exit ;;
1196 i*86:VOS:*:*)
1197 # From Paul.Green@stratus.com.
1198 echo ${UNAME_MACHINE}-stratus-vos
1199 exit ;;
1200 *:VOS:*:*)
1201 # From Paul.Green@stratus.com.
1202 echo hppa1.1-stratus-vos
1203 exit ;;
1204 mc68*:A/UX:*:*)
1205 echo m68k-apple-aux${UNAME_RELEASE}
1206 exit ;;
1207 news*:NEWS-OS:6*:*)
1208 echo mips-sony-newsos6
1209 exit ;;
1210 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1211 if [ -d /usr/nec ]; then
1212 echo mips-nec-sysv${UNAME_RELEASE}
1213 else
1214 echo mips-unknown-sysv${UNAME_RELEASE}
1215 fi
1216 exit ;;
1217 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1218 echo powerpc-be-beos
1219 exit ;;
1220 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
1221 echo powerpc-apple-beos
1222 exit ;;
1223 BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
1224 echo i586-pc-beos
1225 exit ;;
1226 BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
1227 echo i586-pc-haiku
1228 exit ;;
1229 x86_64:Haiku:*:*)
1230 echo x86_64-unknown-haiku
1231 exit ;;
1232 SX-4:SUPER-UX:*:*)
1233 echo sx4-nec-superux${UNAME_RELEASE}
1234 exit ;;
1235 SX-5:SUPER-UX:*:*)
1236 echo sx5-nec-superux${UNAME_RELEASE}
1237 exit ;;
1238 SX-6:SUPER-UX:*:*)
1239 echo sx6-nec-superux${UNAME_RELEASE}
1240 exit ;;
1241 SX-7:SUPER-UX:*:*)
1242 echo sx7-nec-superux${UNAME_RELEASE}
1243 exit ;;
1244 SX-8:SUPER-UX:*:*)
1245 echo sx8-nec-superux${UNAME_RELEASE}
1246 exit ;;
1247 SX-8R:SUPER-UX:*:*)
1248 echo sx8r-nec-superux${UNAME_RELEASE}
1249 exit ;;
1250 Power*:Rhapsody:*:*)
1251 echo powerpc-apple-rhapsody${UNAME_RELEASE}
1252 exit ;;
1253 *:Rhapsody:*:*)
1254 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1255 exit ;;
1256 *:Darwin:*:*)
1257 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1258 eval $set_cc_for_build
1259 if test "$UNAME_PROCESSOR" = unknown ; then
1260 UNAME_PROCESSOR=powerpc
1261 fi
1262 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1263 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1264 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1265 grep IS_64BIT_ARCH >/dev/null
1266 then
1267 case $UNAME_PROCESSOR in
1268 i386) UNAME_PROCESSOR=x86_64 ;;
1269 powerpc) UNAME_PROCESSOR=powerpc64 ;;
1270 esac
1271 fi
1272 fi
1273 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1274 exit ;;
1275 *:procnto*:*:* | *:QNX:[0123456789]*:*)
1276 UNAME_PROCESSOR=`uname -p`
1277 if test "$UNAME_PROCESSOR" = "x86"; then
1278 UNAME_PROCESSOR=i386
1279 UNAME_MACHINE=pc
1280 fi
1281 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1282 exit ;;
1283 *:QNX:*:4*)
1284 echo i386-pc-qnx
1285 exit ;;
1286 NEO-?:NONSTOP_KERNEL:*:*)
1287 echo neo-tandem-nsk${UNAME_RELEASE}
1288 exit ;;
1289 NSE-*:NONSTOP_KERNEL:*:*)
1290 echo nse-tandem-nsk${UNAME_RELEASE}
1291 exit ;;
1292 NSR-?:NONSTOP_KERNEL:*:*)
1293 echo nsr-tandem-nsk${UNAME_RELEASE}
1294 exit ;;
1295 *:NonStop-UX:*:*)
1296 echo mips-compaq-nonstopux
1297 exit ;;
1298 BS2000:POSIX*:*:*)
1299 echo bs2000-siemens-sysv
1300 exit ;;
1301 DS/*:UNIX_System_V:*:*)
1302 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
1303 exit ;;
1304 *:Plan9:*:*)
1305 # "uname -m" is not consistent, so use $cputype instead. 386
1306 # is converted to i386 for consistency with other x86
1307 # operating systems.
1308 if test "$cputype" = "386"; then
1309 UNAME_MACHINE=i386
1310 else
1311 UNAME_MACHINE="$cputype"
1312 fi
1313 echo ${UNAME_MACHINE}-unknown-plan9
1314 exit ;;
1315 *:TOPS-10:*:*)
1316 echo pdp10-unknown-tops10
1317 exit ;;
1318 *:TENEX:*:*)
1319 echo pdp10-unknown-tenex
1320 exit ;;
1321 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1322 echo pdp10-dec-tops20
1323 exit ;;
1324 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
1325 echo pdp10-xkl-tops20
1326 exit ;;
1327 *:TOPS-20:*:*)
1328 echo pdp10-unknown-tops20
1329 exit ;;
1330 *:ITS:*:*)
1331 echo pdp10-unknown-its
1332 exit ;;
1333 SEI:*:*:SEIUX)
1334 echo mips-sei-seiux${UNAME_RELEASE}
1335 exit ;;
1336 *:DragonFly:*:*)
1337 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1338 exit ;;
1339 *:*VMS:*:*)
1340 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1341 case "${UNAME_MACHINE}" in
1342 A*) echo alpha-dec-vms ; exit ;;
1343 I*) echo ia64-dec-vms ; exit ;;
1344 V*) echo vax-dec-vms ; exit ;;
1345 esac ;;
1346 *:XENIX:*:SysV)
1347 echo i386-pc-xenix
1348 exit ;;
1349 i*86:skyos:*:*)
1350 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
1351 exit ;;
1352 i*86:rdos:*:*)
1353 echo ${UNAME_MACHINE}-pc-rdos
1354 exit ;;
1355 i*86:AROS:*:*)
1356 echo ${UNAME_MACHINE}-pc-aros
1357 exit ;;
1358 x86_64:VMkernel:*:*)
1359 echo ${UNAME_MACHINE}-unknown-esx
1360 exit ;;
1361 esac
1362
1363 eval $set_cc_for_build
1364 cat >$dummy.c <<EOF
1365 #ifdef _SEQUENT_
1366 # include <sys/types.h>
1367 # include <sys/utsname.h>
1368 #endif
1369 main ()
1370 {
1371 #if defined (sony)
1372 #if defined (MIPSEB)
1373 /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
1374 I don't know.... */
1375 printf ("mips-sony-bsd\n"); exit (0);
1376 #else
1377 #include <sys/param.h>
1378 printf ("m68k-sony-newsos%s\n",
1379 #ifdef NEWSOS4
1380 "4"
1381 #else
1382 ""
1383 #endif
1384 ); exit (0);
1385 #endif
1386 #endif
1387
1388 #if defined (__arm) && defined (__acorn) && defined (__unix)
1389 printf ("arm-acorn-riscix\n"); exit (0);
1390 #endif
1391
1392 #if defined (hp300) && !defined (hpux)
1393 printf ("m68k-hp-bsd\n"); exit (0);
1394 #endif
1395
1396 #if defined (NeXT)
1397 #if !defined (__ARCHITECTURE__)
1398 #define __ARCHITECTURE__ "m68k"
1399 #endif
1400 int version;
1401 version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
1402 if (version < 4)
1403 printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
1404 else
1405 printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
1406 exit (0);
1407 #endif
1408
1409 #if defined (MULTIMAX) || defined (n16)
1410 #if defined (UMAXV)
1411 printf ("ns32k-encore-sysv\n"); exit (0);
1412 #else
1413 #if defined (CMU)
1414 printf ("ns32k-encore-mach\n"); exit (0);
1415 #else
1416 printf ("ns32k-encore-bsd\n"); exit (0);
1417 #endif
1418 #endif
1419 #endif
1420
1421 #if defined (__386BSD__)
1422 printf ("i386-pc-bsd\n"); exit (0);
1423 #endif
1424
1425 #if defined (sequent)
1426 #if defined (i386)
1427 printf ("i386-sequent-dynix\n"); exit (0);
1428 #endif
1429 #if defined (ns32000)
1430 printf ("ns32k-sequent-dynix\n"); exit (0);
1431 #endif
1432 #endif
1433
1434 #if defined (_SEQUENT_)
1435 struct utsname un;
1436
1437 uname(&un);
1438
1439 if (strncmp(un.version, "V2", 2) == 0) {
1440 printf ("i386-sequent-ptx2\n"); exit (0);
1441 }
1442 if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
1443 printf ("i386-sequent-ptx1\n"); exit (0);
1444 }
1445 printf ("i386-sequent-ptx\n"); exit (0);
1446
1447 #endif
1448
1449 #if defined (vax)
1450 # if !defined (ultrix)
1451 # include <sys/param.h>
1452 # if defined (BSD)
1453 # if BSD == 43
1454 printf ("vax-dec-bsd4.3\n"); exit (0);
1455 # else
1456 # if BSD == 199006
1457 printf ("vax-dec-bsd4.3reno\n"); exit (0);
1458 # else
1459 printf ("vax-dec-bsd\n"); exit (0);
1460 # endif
1461 # endif
1462 # else
1463 printf ("vax-dec-bsd\n"); exit (0);
1464 # endif
1465 # else
1466 printf ("vax-dec-ultrix\n"); exit (0);
1467 # endif
1468 #endif
1469
1470 #if defined (alliant) && defined (i860)
1471 printf ("i860-alliant-bsd\n"); exit (0);
1472 #endif
1473
1474 exit (1);
1475 }
1476 EOF
1477
1478 $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
1479 { echo "$SYSTEM_NAME"; exit; }
1480
1481 # Apollos put the system type in the environment.
1482
1483 test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
1484
1485 # Convex versions that predate uname can use getsysinfo(1)
1486
1487 if [ -x /usr/convex/getsysinfo ]
1488 then
1489 case `getsysinfo -f cpu_type` in
1490 c1*)
1491 echo c1-convex-bsd
1492 exit ;;
1493 c2*)
1494 if getsysinfo -f scalar_acc
1495 then echo c32-convex-bsd
1496 else echo c2-convex-bsd
1497 fi
1498 exit ;;
1499 c34*)
1500 echo c34-convex-bsd
1501 exit ;;
1502 c38*)
1503 echo c38-convex-bsd
1504 exit ;;
1505 c4*)
1506 echo c4-convex-bsd
1507 exit ;;
1508 esac
1509 fi
1510
1511 cat >&2 <<EOF
1512 $0: unable to guess system type
1513
1514 This script, last modified $timestamp, has failed to recognize
1515 the operating system you are using. It is advised that you
1516 download the most up to date version of the config scripts from
1517
1518 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
1519 and
1520 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
1521
1522 If the version you run ($0) is already up to date, please
1523 send the following data and any information you think might be
1524 pertinent to <config-patches@gnu.org> in order to provide the needed
1525 information to handle your system.
1526
1527 config.guess timestamp = $timestamp
1528
1529 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1530 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1531 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1532 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1533
1534 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
1535 /bin/uname -X = `(/bin/uname -X) 2>/dev/null`
1536
1537 hostinfo = `(hostinfo) 2>/dev/null`
1538 /bin/universe = `(/bin/universe) 2>/dev/null`
1539 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
1540 /bin/arch = `(/bin/arch) 2>/dev/null`
1541 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
1542 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
1543
1544 UNAME_MACHINE = ${UNAME_MACHINE}
1545 UNAME_RELEASE = ${UNAME_RELEASE}
1546 UNAME_SYSTEM = ${UNAME_SYSTEM}
1547 UNAME_VERSION = ${UNAME_VERSION}
1548 EOF
1549
1550 exit 1
1551
1552 # Local variables:
1553 # eval: (add-hook 'write-file-hooks 'time-stamp)
1554 # time-stamp-start: "timestamp='"
1555 # time-stamp-format: "%:y-%02m-%02d"
1556 # time-stamp-end: "'"
1557 # End:
+0
-95
config.h.in less more
0 /* config.h.in. Generated from configure.ac by autoheader. */
1
2 /* Define if building universal (internal helper macro) */
3 #undef AC_APPLE_UNIVERSAL_BUILD
4
5 /* Default visibility */
6 #undef API_EXPORTED
7
8 /* Define to 1 if you have the <dlfcn.h> header file. */
9 #undef HAVE_DLFCN_H
10
11 /* Define to 1 if you have the <inttypes.h> header file. */
12 #undef HAVE_INTTYPES_H
13
14 /* Define to 1 if you have the `m' library (-lm). */
15 #undef HAVE_LIBM
16
17 /* Define to 1 if you have the `pthread' library (-lpthread). */
18 #undef HAVE_LIBPTHREAD
19
20 /* Define to 1 if you have the `rt' library (-lrt). */
21 #undef HAVE_LIBRT
22
23 /* Define to 1 if you have the <memory.h> header file. */
24 #undef HAVE_MEMORY_H
25
26 /* Define to 1 if you have the <stdint.h> header file. */
27 #undef HAVE_STDINT_H
28
29 /* Define to 1 if you have the <stdlib.h> header file. */
30 #undef HAVE_STDLIB_H
31
32 /* Define to 1 if you have the <strings.h> header file. */
33 #undef HAVE_STRINGS_H
34
35 /* Define to 1 if you have the <string.h> header file. */
36 #undef HAVE_STRING_H
37
38 /* Define to 1 if you have the <sys/stat.h> header file. */
39 #undef HAVE_SYS_STAT_H
40
41 /* Define to 1 if you have the <sys/types.h> header file. */
42 #undef HAVE_SYS_TYPES_H
43
44 /* Define to 1 if you have the <unistd.h> header file. */
45 #undef HAVE_UNISTD_H
46
47 /* Define to the sub-directory in which libtool stores uninstalled libraries.
48 */
49 #undef LT_OBJDIR
50
51 /* Linux kernel */
52 #undef OS_LINUX
53
54 /* Name of package */
55 #undef PACKAGE
56
57 /* Define to the address where bug reports for this package should be sent. */
58 #undef PACKAGE_BUGREPORT
59
60 /* Define to the full name of this package. */
61 #undef PACKAGE_NAME
62
63 /* Define to the full name and version of this package. */
64 #undef PACKAGE_STRING
65
66 /* Define to the one symbol short name of this package. */
67 #undef PACKAGE_TARNAME
68
69 /* Define to the home page for this package. */
70 #undef PACKAGE_URL
71
72 /* Define to the version of this package. */
73 #undef PACKAGE_VERSION
74
75 /* Define to 1 if you have the ANSI C header files. */
76 #undef STDC_HEADERS
77
78 /* Version number of package */
79 #undef VERSION
80
81 /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
82 significant byte first (like Motorola and SPARC, unlike Intel). */
83 #if defined AC_APPLE_UNIVERSAL_BUILD
84 # if defined __BIG_ENDIAN__
85 # define WORDS_BIGENDIAN 1
86 # endif
87 #else
88 # ifndef WORDS_BIGENDIAN
89 # undef WORDS_BIGENDIAN
90 # endif
91 #endif
92
93 /* Define to 1 if the X Window System is missing or not being used. */
94 #undef X_DISPLAY_MISSING
+0
-1791
config.sub less more
0 #! /bin/sh
1 # Configuration validation subroutine script.
2 # Copyright 1992-2013 Free Software Foundation, Inc.
3
4 timestamp='2013-08-10'
5
6 # This file is free software; you can redistribute it and/or modify it
7 # under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 of the License, or
9 # (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, see <http://www.gnu.org/licenses/>.
18 #
19 # As a special exception to the GNU General Public License, if you
20 # distribute this file as part of a program that contains a
21 # configuration script generated by Autoconf, you may include it under
22 # the same distribution terms that you use for the rest of that
23 # program. This Exception is an additional permission under section 7
24 # of the GNU General Public License, version 3 ("GPLv3").
25
26
27 # Please send patches with a ChangeLog entry to config-patches@gnu.org.
28 #
29 # Configuration subroutine to validate and canonicalize a configuration type.
30 # Supply the specified configuration type as an argument.
31 # If it is invalid, we print an error message on stderr and exit with code 1.
32 # Otherwise, we print the canonical config type on stdout and succeed.
33
34 # You can get the latest version of this script from:
35 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
36
37 # This file is supposed to be the same for all GNU packages
38 # and recognize all the CPU types, system types and aliases
39 # that are meaningful with *any* GNU software.
40 # Each package is responsible for reporting which valid configurations
41 # it does not support. The user should be able to distinguish
42 # a failure to support a valid configuration from a meaningless
43 # configuration.
44
45 # The goal of this file is to map all the various variations of a given
46 # machine specification into a single specification in the form:
47 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
48 # or in some cases, the newer four-part form:
49 # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
50 # It is wrong to echo any other type of specification.
51
52 me=`echo "$0" | sed -e 's,.*/,,'`
53
54 usage="\
55 Usage: $0 [OPTION] CPU-MFR-OPSYS
56 $0 [OPTION] ALIAS
57
58 Canonicalize a configuration name.
59
60 Operation modes:
61 -h, --help print this help, then exit
62 -t, --time-stamp print date of last modification, then exit
63 -v, --version print version number, then exit
64
65 Report bugs and patches to <config-patches@gnu.org>."
66
67 version="\
68 GNU config.sub ($timestamp)
69
70 Copyright 1992-2013 Free Software Foundation, Inc.
71
72 This is free software; see the source for copying conditions. There is NO
73 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
74
75 help="
76 Try \`$me --help' for more information."
77
78 # Parse command line
79 while test $# -gt 0 ; do
80 case $1 in
81 --time-stamp | --time* | -t )
82 echo "$timestamp" ; exit ;;
83 --version | -v )
84 echo "$version" ; exit ;;
85 --help | --h* | -h )
86 echo "$usage"; exit ;;
87 -- ) # Stop option processing
88 shift; break ;;
89 - ) # Use stdin as input.
90 break ;;
91 -* )
92 echo "$me: invalid option $1$help"
93 exit 1 ;;
94
95 *local*)
96 # First pass through any local machine types.
97 echo $1
98 exit ;;
99
100 * )
101 break ;;
102 esac
103 done
104
105 case $# in
106 0) echo "$me: missing argument$help" >&2
107 exit 1;;
108 1) ;;
109 *) echo "$me: too many arguments$help" >&2
110 exit 1;;
111 esac
112
113 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
114 # Here we must recognize all the valid KERNEL-OS combinations.
115 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
116 case $maybe_os in
117 nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
118 linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
119 knetbsd*-gnu* | netbsd*-gnu* | \
120 kopensolaris*-gnu* | \
121 storm-chaos* | os2-emx* | rtmk-nova*)
122 os=-$maybe_os
123 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
124 ;;
125 android-linux)
126 os=-linux-android
127 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
128 ;;
129 *)
130 basic_machine=`echo $1 | sed 's/-[^-]*$//'`
131 if [ $basic_machine != $1 ]
132 then os=`echo $1 | sed 's/.*-/-/'`
133 else os=; fi
134 ;;
135 esac
136
137 ### Let's recognize common machines as not being operating systems so
138 ### that things like config.sub decstation-3100 work. We also
139 ### recognize some manufacturers as not being operating systems, so we
140 ### can provide default operating systems below.
141 case $os in
142 -sun*os*)
143 # Prevent following clause from handling this invalid input.
144 ;;
145 -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
146 -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
147 -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
148 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
149 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
150 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
151 -apple | -axis | -knuth | -cray | -microblaze*)
152 os=
153 basic_machine=$1
154 ;;
155 -bluegene*)
156 os=-cnk
157 ;;
158 -sim | -cisco | -oki | -wec | -winbond)
159 os=
160 basic_machine=$1
161 ;;
162 -scout)
163 ;;
164 -wrs)
165 os=-vxworks
166 basic_machine=$1
167 ;;
168 -chorusos*)
169 os=-chorusos
170 basic_machine=$1
171 ;;
172 -chorusrdb)
173 os=-chorusrdb
174 basic_machine=$1
175 ;;
176 -hiux*)
177 os=-hiuxwe2
178 ;;
179 -sco6)
180 os=-sco5v6
181 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
182 ;;
183 -sco5)
184 os=-sco3.2v5
185 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
186 ;;
187 -sco4)
188 os=-sco3.2v4
189 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
190 ;;
191 -sco3.2.[4-9]*)
192 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
193 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
194 ;;
195 -sco3.2v[4-9]*)
196 # Don't forget version if it is 3.2v4 or newer.
197 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
198 ;;
199 -sco5v6*)
200 # Don't forget version if it is 3.2v4 or newer.
201 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
202 ;;
203 -sco*)
204 os=-sco3.2v2
205 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
206 ;;
207 -udk*)
208 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
209 ;;
210 -isc)
211 os=-isc2.2
212 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
213 ;;
214 -clix*)
215 basic_machine=clipper-intergraph
216 ;;
217 -isc*)
218 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
219 ;;
220 -lynx*178)
221 os=-lynxos178
222 ;;
223 -lynx*5)
224 os=-lynxos5
225 ;;
226 -lynx*)
227 os=-lynxos
228 ;;
229 -ptx*)
230 basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
231 ;;
232 -windowsnt*)
233 os=`echo $os | sed -e 's/windowsnt/winnt/'`
234 ;;
235 -psos*)
236 os=-psos
237 ;;
238 -mint | -mint[0-9]*)
239 basic_machine=m68k-atari
240 os=-mint
241 ;;
242 esac
243
244 # Decode aliases for certain CPU-COMPANY combinations.
245 case $basic_machine in
246 # Recognize the basic CPU types without company name.
247 # Some are omitted here because they have special meanings below.
248 1750a | 580 \
249 | a29k \
250 | aarch64 | aarch64_be \
251 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
252 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
253 | am33_2.0 \
254 | arc | arceb \
255 | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
256 | avr | avr32 \
257 | be32 | be64 \
258 | bfin \
259 | c4x | c8051 | clipper \
260 | d10v | d30v | dlx | dsp16xx \
261 | epiphany \
262 | fido | fr30 | frv \
263 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
264 | hexagon \
265 | i370 | i860 | i960 | ia64 \
266 | ip2k | iq2000 \
267 | le32 | le64 \
268 | lm32 \
269 | m32c | m32r | m32rle | m68000 | m68k | m88k \
270 | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
271 | mips | mipsbe | mipseb | mipsel | mipsle \
272 | mips16 \
273 | mips64 | mips64el \
274 | mips64octeon | mips64octeonel \
275 | mips64orion | mips64orionel \
276 | mips64r5900 | mips64r5900el \
277 | mips64vr | mips64vrel \
278 | mips64vr4100 | mips64vr4100el \
279 | mips64vr4300 | mips64vr4300el \
280 | mips64vr5000 | mips64vr5000el \
281 | mips64vr5900 | mips64vr5900el \
282 | mipsisa32 | mipsisa32el \
283 | mipsisa32r2 | mipsisa32r2el \
284 | mipsisa64 | mipsisa64el \
285 | mipsisa64r2 | mipsisa64r2el \
286 | mipsisa64sb1 | mipsisa64sb1el \
287 | mipsisa64sr71k | mipsisa64sr71kel \
288 | mipsr5900 | mipsr5900el \
289 | mipstx39 | mipstx39el \
290 | mn10200 | mn10300 \
291 | moxie \
292 | mt \
293 | msp430 \
294 | nds32 | nds32le | nds32be \
295 | nios | nios2 | nios2eb | nios2el \
296 | ns16k | ns32k \
297 | open8 \
298 | or1k | or32 \
299 | pdp10 | pdp11 | pj | pjl \
300 | powerpc | powerpc64 | powerpc64le | powerpcle \
301 | pyramid \
302 | rl78 | rx \
303 | score \
304 | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
305 | sh64 | sh64le \
306 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
307 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
308 | spu \
309 | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
310 | ubicom32 \
311 | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
312 | we32k \
313 | x86 | xc16x | xstormy16 | xtensa \
314 | z8k | z80)
315 basic_machine=$basic_machine-unknown
316 ;;
317 c54x)
318 basic_machine=tic54x-unknown
319 ;;
320 c55x)
321 basic_machine=tic55x-unknown
322 ;;
323 c6x)
324 basic_machine=tic6x-unknown
325 ;;
326 m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
327 basic_machine=$basic_machine-unknown
328 os=-none
329 ;;
330 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
331 ;;
332 ms1)
333 basic_machine=mt-unknown
334 ;;
335
336 strongarm | thumb | xscale)
337 basic_machine=arm-unknown
338 ;;
339 xgate)
340 basic_machine=$basic_machine-unknown
341 os=-none
342 ;;
343 xscaleeb)
344 basic_machine=armeb-unknown
345 ;;
346
347 xscaleel)
348 basic_machine=armel-unknown
349 ;;
350
351 # We use `pc' rather than `unknown'
352 # because (1) that's what they normally are, and
353 # (2) the word "unknown" tends to confuse beginning users.
354 i*86 | x86_64)
355 basic_machine=$basic_machine-pc
356 ;;
357 # Object if more than one company name word.
358 *-*-*)
359 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
360 exit 1
361 ;;
362 # Recognize the basic CPU types with company name.
363 580-* \
364 | a29k-* \
365 | aarch64-* | aarch64_be-* \
366 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
367 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
368 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
369 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
370 | avr-* | avr32-* \
371 | be32-* | be64-* \
372 | bfin-* | bs2000-* \
373 | c[123]* | c30-* | [cjt]90-* | c4x-* \
374 | c8051-* | clipper-* | craynv-* | cydra-* \
375 | d10v-* | d30v-* | dlx-* \
376 | elxsi-* \
377 | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
378 | h8300-* | h8500-* \
379 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
380 | hexagon-* \
381 | i*86-* | i860-* | i960-* | ia64-* \
382 | ip2k-* | iq2000-* \
383 | le32-* | le64-* \
384 | lm32-* \
385 | m32c-* | m32r-* | m32rle-* \
386 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
387 | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
388 | microblaze-* | microblazeel-* \
389 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
390 | mips16-* \
391 | mips64-* | mips64el-* \
392 | mips64octeon-* | mips64octeonel-* \
393 | mips64orion-* | mips64orionel-* \
394 | mips64r5900-* | mips64r5900el-* \
395 | mips64vr-* | mips64vrel-* \
396 | mips64vr4100-* | mips64vr4100el-* \
397 | mips64vr4300-* | mips64vr4300el-* \
398 | mips64vr5000-* | mips64vr5000el-* \
399 | mips64vr5900-* | mips64vr5900el-* \
400 | mipsisa32-* | mipsisa32el-* \
401 | mipsisa32r2-* | mipsisa32r2el-* \
402 | mipsisa64-* | mipsisa64el-* \
403 | mipsisa64r2-* | mipsisa64r2el-* \
404 | mipsisa64sb1-* | mipsisa64sb1el-* \
405 | mipsisa64sr71k-* | mipsisa64sr71kel-* \
406 | mipsr5900-* | mipsr5900el-* \
407 | mipstx39-* | mipstx39el-* \
408 | mmix-* \
409 | mt-* \
410 | msp430-* \
411 | nds32-* | nds32le-* | nds32be-* \
412 | nios-* | nios2-* | nios2eb-* | nios2el-* \
413 | none-* | np1-* | ns16k-* | ns32k-* \
414 | open8-* \
415 | orion-* \
416 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
417 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
418 | pyramid-* \
419 | rl78-* | romp-* | rs6000-* | rx-* \
420 | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
421 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
422 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
423 | sparclite-* \
424 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
425 | tahoe-* \
426 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
427 | tile*-* \
428 | tron-* \
429 | ubicom32-* \
430 | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
431 | vax-* \
432 | we32k-* \
433 | x86-* | x86_64-* | xc16x-* | xps100-* \
434 | xstormy16-* | xtensa*-* \
435 | ymp-* \
436 | z8k-* | z80-*)
437 ;;
438 # Recognize the basic CPU types without company name, with glob match.
439 xtensa*)
440 basic_machine=$basic_machine-unknown
441 ;;
442 # Recognize the various machine names and aliases which stand
443 # for a CPU type and a company and sometimes even an OS.
444 386bsd)
445 basic_machine=i386-unknown
446 os=-bsd
447 ;;
448 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
449 basic_machine=m68000-att
450 ;;
451 3b*)
452 basic_machine=we32k-att
453 ;;
454 a29khif)
455 basic_machine=a29k-amd
456 os=-udi
457 ;;
458 abacus)
459 basic_machine=abacus-unknown
460 ;;
461 adobe68k)
462 basic_machine=m68010-adobe
463 os=-scout
464 ;;
465 alliant | fx80)
466 basic_machine=fx80-alliant
467 ;;
468 altos | altos3068)
469 basic_machine=m68k-altos
470 ;;
471 am29k)
472 basic_machine=a29k-none
473 os=-bsd
474 ;;
475 amd64)
476 basic_machine=x86_64-pc
477 ;;
478 amd64-*)
479 basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
480 ;;
481 amdahl)
482 basic_machine=580-amdahl
483 os=-sysv
484 ;;
485 amiga | amiga-*)
486 basic_machine=m68k-unknown
487 ;;
488 amigaos | amigados)
489 basic_machine=m68k-unknown
490 os=-amigaos
491 ;;
492 amigaunix | amix)
493 basic_machine=m68k-unknown
494 os=-sysv4
495 ;;
496 apollo68)
497 basic_machine=m68k-apollo
498 os=-sysv
499 ;;
500 apollo68bsd)
501 basic_machine=m68k-apollo
502 os=-bsd
503 ;;
504 aros)
505 basic_machine=i386-pc
506 os=-aros
507 ;;
508 aux)
509 basic_machine=m68k-apple
510 os=-aux
511 ;;
512 balance)
513 basic_machine=ns32k-sequent
514 os=-dynix
515 ;;
516 blackfin)
517 basic_machine=bfin-unknown
518 os=-linux
519 ;;
520 blackfin-*)
521 basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
522 os=-linux
523 ;;
524 bluegene*)
525 basic_machine=powerpc-ibm
526 os=-cnk
527 ;;
528 c54x-*)
529 basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
530 ;;
531 c55x-*)
532 basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
533 ;;
534 c6x-*)
535 basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
536 ;;
537 c90)
538 basic_machine=c90-cray
539 os=-unicos
540 ;;
541 cegcc)
542 basic_machine=arm-unknown
543 os=-cegcc
544 ;;
545 convex-c1)
546 basic_machine=c1-convex
547 os=-bsd
548 ;;
549 convex-c2)
550 basic_machine=c2-convex
551 os=-bsd
552 ;;
553 convex-c32)
554 basic_machine=c32-convex
555 os=-bsd
556 ;;
557 convex-c34)
558 basic_machine=c34-convex
559 os=-bsd
560 ;;
561 convex-c38)
562 basic_machine=c38-convex
563 os=-bsd
564 ;;
565 cray | j90)
566 basic_machine=j90-cray
567 os=-unicos
568 ;;
569 craynv)
570 basic_machine=craynv-cray
571 os=-unicosmp
572 ;;
573 cr16 | cr16-*)
574 basic_machine=cr16-unknown
575 os=-elf
576 ;;
577 crds | unos)
578 basic_machine=m68k-crds
579 ;;
580 crisv32 | crisv32-* | etraxfs*)
581 basic_machine=crisv32-axis
582 ;;
583 cris | cris-* | etrax*)
584 basic_machine=cris-axis
585 ;;
586 crx)
587 basic_machine=crx-unknown
588 os=-elf
589 ;;
590 da30 | da30-*)
591 basic_machine=m68k-da30
592 ;;
593 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
594 basic_machine=mips-dec
595 ;;
596 decsystem10* | dec10*)
597 basic_machine=pdp10-dec
598 os=-tops10
599 ;;
600 decsystem20* | dec20*)
601 basic_machine=pdp10-dec
602 os=-tops20
603 ;;
604 delta | 3300 | motorola-3300 | motorola-delta \
605 | 3300-motorola | delta-motorola)
606 basic_machine=m68k-motorola
607 ;;
608 delta88)
609 basic_machine=m88k-motorola
610 os=-sysv3
611 ;;
612 dicos)
613 basic_machine=i686-pc
614 os=-dicos
615 ;;
616 djgpp)
617 basic_machine=i586-pc
618 os=-msdosdjgpp
619 ;;
620 dpx20 | dpx20-*)
621 basic_machine=rs6000-bull
622 os=-bosx
623 ;;
624 dpx2* | dpx2*-bull)
625 basic_machine=m68k-bull
626 os=-sysv3
627 ;;
628 ebmon29k)
629 basic_machine=a29k-amd
630 os=-ebmon
631 ;;
632 elxsi)
633 basic_machine=elxsi-elxsi
634 os=-bsd
635 ;;
636 encore | umax | mmax)
637 basic_machine=ns32k-encore
638 ;;
639 es1800 | OSE68k | ose68k | ose | OSE)
640 basic_machine=m68k-ericsson
641 os=-ose
642 ;;
643 fx2800)
644 basic_machine=i860-alliant
645 ;;
646 genix)
647 basic_machine=ns32k-ns
648 ;;
649 gmicro)
650 basic_machine=tron-gmicro
651 os=-sysv
652 ;;
653 go32)
654 basic_machine=i386-pc
655 os=-go32
656 ;;
657 h3050r* | hiux*)
658 basic_machine=hppa1.1-hitachi
659 os=-hiuxwe2
660 ;;
661 h8300hms)
662 basic_machine=h8300-hitachi
663 os=-hms
664 ;;
665 h8300xray)
666 basic_machine=h8300-hitachi
667 os=-xray
668 ;;
669 h8500hms)
670 basic_machine=h8500-hitachi
671 os=-hms
672 ;;
673 harris)
674 basic_machine=m88k-harris
675 os=-sysv3
676 ;;
677 hp300-*)
678 basic_machine=m68k-hp
679 ;;
680 hp300bsd)
681 basic_machine=m68k-hp
682 os=-bsd
683 ;;
684 hp300hpux)
685 basic_machine=m68k-hp
686 os=-hpux
687 ;;
688 hp3k9[0-9][0-9] | hp9[0-9][0-9])
689 basic_machine=hppa1.0-hp
690 ;;
691 hp9k2[0-9][0-9] | hp9k31[0-9])
692 basic_machine=m68000-hp
693 ;;
694 hp9k3[2-9][0-9])
695 basic_machine=m68k-hp
696 ;;
697 hp9k6[0-9][0-9] | hp6[0-9][0-9])
698 basic_machine=hppa1.0-hp
699 ;;
700 hp9k7[0-79][0-9] | hp7[0-79][0-9])
701 basic_machine=hppa1.1-hp
702 ;;
703 hp9k78[0-9] | hp78[0-9])
704 # FIXME: really hppa2.0-hp
705 basic_machine=hppa1.1-hp
706 ;;
707 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
708 # FIXME: really hppa2.0-hp
709 basic_machine=hppa1.1-hp
710 ;;
711 hp9k8[0-9][13679] | hp8[0-9][13679])
712 basic_machine=hppa1.1-hp
713 ;;
714 hp9k8[0-9][0-9] | hp8[0-9][0-9])
715 basic_machine=hppa1.0-hp
716 ;;
717 hppa-next)
718 os=-nextstep3
719 ;;
720 hppaosf)
721 basic_machine=hppa1.1-hp
722 os=-osf
723 ;;
724 hppro)
725 basic_machine=hppa1.1-hp
726 os=-proelf
727 ;;
728 i370-ibm* | ibm*)
729 basic_machine=i370-ibm
730 ;;
731 i*86v32)
732 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
733 os=-sysv32
734 ;;
735 i*86v4*)
736 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
737 os=-sysv4
738 ;;
739 i*86v)
740 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
741 os=-sysv
742 ;;
743 i*86sol2)
744 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
745 os=-solaris2
746 ;;
747 i386mach)
748 basic_machine=i386-mach
749 os=-mach
750 ;;
751 i386-vsta | vsta)
752 basic_machine=i386-unknown
753 os=-vsta
754 ;;
755 iris | iris4d)
756 basic_machine=mips-sgi
757 case $os in
758 -irix*)
759 ;;
760 *)
761 os=-irix4
762 ;;
763 esac
764 ;;
765 isi68 | isi)
766 basic_machine=m68k-isi
767 os=-sysv
768 ;;
769 m68knommu)
770 basic_machine=m68k-unknown
771 os=-linux
772 ;;
773 m68knommu-*)
774 basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
775 os=-linux
776 ;;
777 m88k-omron*)
778 basic_machine=m88k-omron
779 ;;
780 magnum | m3230)
781 basic_machine=mips-mips
782 os=-sysv
783 ;;
784 merlin)
785 basic_machine=ns32k-utek
786 os=-sysv
787 ;;
788 microblaze*)
789 basic_machine=microblaze-xilinx
790 ;;
791 mingw64)
792 basic_machine=x86_64-pc
793 os=-mingw64
794 ;;
795 mingw32)
796 basic_machine=i686-pc
797 os=-mingw32
798 ;;
799 mingw32ce)
800 basic_machine=arm-unknown
801 os=-mingw32ce
802 ;;
803 miniframe)
804 basic_machine=m68000-convergent
805 ;;
806 *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
807 basic_machine=m68k-atari
808 os=-mint
809 ;;
810 mips3*-*)
811 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
812 ;;
813 mips3*)
814 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
815 ;;
816 monitor)
817 basic_machine=m68k-rom68k
818 os=-coff
819 ;;
820 morphos)
821 basic_machine=powerpc-unknown
822 os=-morphos
823 ;;
824 msdos)
825 basic_machine=i386-pc
826 os=-msdos
827 ;;
828 ms1-*)
829 basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
830 ;;
831 msys)
832 basic_machine=i686-pc
833 os=-msys
834 ;;
835 mvs)
836 basic_machine=i370-ibm
837 os=-mvs
838 ;;
839 nacl)
840 basic_machine=le32-unknown
841 os=-nacl
842 ;;
843 ncr3000)
844 basic_machine=i486-ncr
845 os=-sysv4
846 ;;
847 netbsd386)
848 basic_machine=i386-unknown
849 os=-netbsd
850 ;;
851 netwinder)
852 basic_machine=armv4l-rebel
853 os=-linux
854 ;;
855 news | news700 | news800 | news900)
856 basic_machine=m68k-sony
857 os=-newsos
858 ;;
859 news1000)
860 basic_machine=m68030-sony
861 os=-newsos
862 ;;
863 news-3600 | risc-news)
864 basic_machine=mips-sony
865 os=-newsos
866 ;;
867 necv70)
868 basic_machine=v70-nec
869 os=-sysv
870 ;;
871 next | m*-next )
872 basic_machine=m68k-next
873 case $os in
874 -nextstep* )
875 ;;
876 -ns2*)
877 os=-nextstep2
878 ;;
879 *)
880 os=-nextstep3
881 ;;
882 esac
883 ;;
884 nh3000)
885 basic_machine=m68k-harris
886 os=-cxux
887 ;;
888 nh[45]000)
889 basic_machine=m88k-harris
890 os=-cxux
891 ;;
892 nindy960)
893 basic_machine=i960-intel
894 os=-nindy
895 ;;
896 mon960)
897 basic_machine=i960-intel
898 os=-mon960
899 ;;
900 nonstopux)
901 basic_machine=mips-compaq
902 os=-nonstopux
903 ;;
904 np1)
905 basic_machine=np1-gould
906 ;;
907 neo-tandem)
908 basic_machine=neo-tandem
909 ;;
910 nse-tandem)
911 basic_machine=nse-tandem
912 ;;
913 nsr-tandem)
914 basic_machine=nsr-tandem
915 ;;
916 op50n-* | op60c-*)
917 basic_machine=hppa1.1-oki
918 os=-proelf
919 ;;
920 openrisc | openrisc-*)
921 basic_machine=or32-unknown
922 ;;
923 os400)
924 basic_machine=powerpc-ibm
925 os=-os400
926 ;;
927 OSE68000 | ose68000)
928 basic_machine=m68000-ericsson
929 os=-ose
930 ;;
931 os68k)
932 basic_machine=m68k-none
933 os=-os68k
934 ;;
935 pa-hitachi)
936 basic_machine=hppa1.1-hitachi
937 os=-hiuxwe2
938 ;;
939 paragon)
940 basic_machine=i860-intel
941 os=-osf
942 ;;
943 parisc)
944 basic_machine=hppa-unknown
945 os=-linux
946 ;;
947 parisc-*)
948 basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
949 os=-linux
950 ;;
951 pbd)
952 basic_machine=sparc-tti
953 ;;
954 pbb)
955 basic_machine=m68k-tti
956 ;;
957 pc532 | pc532-*)
958 basic_machine=ns32k-pc532
959 ;;
960 pc98)
961 basic_machine=i386-pc
962 ;;
963 pc98-*)
964 basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
965 ;;
966 pentium | p5 | k5 | k6 | nexgen | viac3)
967 basic_machine=i586-pc
968 ;;
969 pentiumpro | p6 | 6x86 | athlon | athlon_*)
970 basic_machine=i686-pc
971 ;;
972 pentiumii | pentium2 | pentiumiii | pentium3)
973 basic_machine=i686-pc
974 ;;
975 pentium4)
976 basic_machine=i786-pc
977 ;;
978 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
979 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
980 ;;
981 pentiumpro-* | p6-* | 6x86-* | athlon-*)
982 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
983 ;;
984 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
985 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
986 ;;
987 pentium4-*)
988 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
989 ;;
990 pn)
991 basic_machine=pn-gould
992 ;;
993 power) basic_machine=power-ibm
994 ;;
995 ppc | ppcbe) basic_machine=powerpc-unknown
996 ;;
997 ppc-* | ppcbe-*)
998 basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
999 ;;
1000 ppcle | powerpclittle | ppc-le | powerpc-little)
1001 basic_machine=powerpcle-unknown
1002 ;;
1003 ppcle-* | powerpclittle-*)
1004 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
1005 ;;
1006 ppc64) basic_machine=powerpc64-unknown
1007 ;;
1008 ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
1009 ;;
1010 ppc64le | powerpc64little | ppc64-le | powerpc64-little)
1011 basic_machine=powerpc64le-unknown
1012 ;;
1013 ppc64le-* | powerpc64little-*)
1014 basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
1015 ;;
1016 ps2)
1017 basic_machine=i386-ibm
1018 ;;
1019 pw32)
1020 basic_machine=i586-unknown
1021 os=-pw32
1022 ;;
1023 rdos | rdos64)
1024 basic_machine=x86_64-pc
1025 os=-rdos
1026 ;;
1027 rdos32)
1028 basic_machine=i386-pc
1029 os=-rdos
1030 ;;
1031 rom68k)
1032 basic_machine=m68k-rom68k
1033 os=-coff
1034 ;;
1035 rm[46]00)
1036 basic_machine=mips-siemens
1037 ;;
1038 rtpc | rtpc-*)
1039 basic_machine=romp-ibm
1040 ;;
1041 s390 | s390-*)
1042 basic_machine=s390-ibm
1043 ;;
1044 s390x | s390x-*)
1045 basic_machine=s390x-ibm
1046 ;;
1047 sa29200)
1048 basic_machine=a29k-amd
1049 os=-udi
1050 ;;
1051 sb1)
1052 basic_machine=mipsisa64sb1-unknown
1053 ;;
1054 sb1el)
1055 basic_machine=mipsisa64sb1el-unknown
1056 ;;
1057 sde)
1058 basic_machine=mipsisa32-sde
1059 os=-elf
1060 ;;
1061 sei)
1062 basic_machine=mips-sei
1063 os=-seiux
1064 ;;
1065 sequent)
1066 basic_machine=i386-sequent
1067 ;;
1068 sh)
1069 basic_machine=sh-hitachi
1070 os=-hms
1071 ;;
1072 sh5el)
1073 basic_machine=sh5le-unknown
1074 ;;
1075 sh64)
1076 basic_machine=sh64-unknown
1077 ;;
1078 sparclite-wrs | simso-wrs)
1079 basic_machine=sparclite-wrs
1080 os=-vxworks
1081 ;;
1082 sps7)
1083 basic_machine=m68k-bull
1084 os=-sysv2
1085 ;;
1086 spur)
1087 basic_machine=spur-unknown
1088 ;;
1089 st2000)
1090 basic_machine=m68k-tandem
1091 ;;
1092 stratus)
1093 basic_machine=i860-stratus
1094 os=-sysv4
1095 ;;
1096 strongarm-* | thumb-*)
1097 basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
1098 ;;
1099 sun2)
1100 basic_machine=m68000-sun
1101 ;;
1102 sun2os3)
1103 basic_machine=m68000-sun
1104 os=-sunos3
1105 ;;
1106 sun2os4)
1107 basic_machine=m68000-sun
1108 os=-sunos4
1109 ;;
1110 sun3os3)
1111 basic_machine=m68k-sun
1112 os=-sunos3
1113 ;;
1114 sun3os4)
1115 basic_machine=m68k-sun
1116 os=-sunos4
1117 ;;
1118 sun4os3)
1119 basic_machine=sparc-sun
1120 os=-sunos3
1121 ;;
1122 sun4os4)
1123 basic_machine=sparc-sun
1124 os=-sunos4
1125 ;;
1126 sun4sol2)
1127 basic_machine=sparc-sun
1128 os=-solaris2
1129 ;;
1130 sun3 | sun3-*)
1131 basic_machine=m68k-sun
1132 ;;
1133 sun4)
1134 basic_machine=sparc-sun
1135 ;;
1136 sun386 | sun386i | roadrunner)
1137 basic_machine=i386-sun
1138 ;;
1139 sv1)
1140 basic_machine=sv1-cray
1141 os=-unicos
1142 ;;
1143 symmetry)
1144 basic_machine=i386-sequent
1145 os=-dynix
1146 ;;
1147 t3e)
1148 basic_machine=alphaev5-cray
1149 os=-unicos
1150 ;;
1151 t90)
1152 basic_machine=t90-cray
1153 os=-unicos
1154 ;;
1155 tile*)
1156 basic_machine=$basic_machine-unknown
1157 os=-linux-gnu
1158 ;;
1159 tx39)
1160 basic_machine=mipstx39-unknown
1161 ;;
1162 tx39el)
1163 basic_machine=mipstx39el-unknown
1164 ;;
1165 toad1)
1166 basic_machine=pdp10-xkl
1167 os=-tops20
1168 ;;
1169 tower | tower-32)
1170 basic_machine=m68k-ncr
1171 ;;
1172 tpf)
1173 basic_machine=s390x-ibm
1174 os=-tpf
1175 ;;
1176 udi29k)
1177 basic_machine=a29k-amd
1178 os=-udi
1179 ;;
1180 ultra3)
1181 basic_machine=a29k-nyu
1182 os=-sym1
1183 ;;
1184 v810 | necv810)
1185 basic_machine=v810-nec
1186 os=-none
1187 ;;
1188 vaxv)
1189 basic_machine=vax-dec
1190 os=-sysv
1191 ;;
1192 vms)
1193 basic_machine=vax-dec
1194 os=-vms
1195 ;;
1196 vpp*|vx|vx-*)
1197 basic_machine=f301-fujitsu
1198 ;;
1199 vxworks960)
1200 basic_machine=i960-wrs
1201 os=-vxworks
1202 ;;
1203 vxworks68)
1204 basic_machine=m68k-wrs
1205 os=-vxworks
1206 ;;
1207 vxworks29k)
1208 basic_machine=a29k-wrs
1209 os=-vxworks
1210 ;;
1211 w65*)
1212 basic_machine=w65-wdc
1213 os=-none
1214 ;;
1215 w89k-*)
1216 basic_machine=hppa1.1-winbond
1217 os=-proelf
1218 ;;
1219 xbox)
1220 basic_machine=i686-pc
1221 os=-mingw32
1222 ;;
1223 xps | xps100)
1224 basic_machine=xps100-honeywell
1225 ;;
1226 xscale-* | xscalee[bl]-*)
1227 basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
1228 ;;
1229 ymp)
1230 basic_machine=ymp-cray
1231 os=-unicos
1232 ;;
1233 z8k-*-coff)
1234 basic_machine=z8k-unknown
1235 os=-sim
1236 ;;
1237 z80-*-coff)
1238 basic_machine=z80-unknown
1239 os=-sim
1240 ;;
1241 none)
1242 basic_machine=none-none
1243 os=-none
1244 ;;
1245
1246 # Here we handle the default manufacturer of certain CPU types. It is in
1247 # some cases the only manufacturer, in others, it is the most popular.
1248 w89k)
1249 basic_machine=hppa1.1-winbond
1250 ;;
1251 op50n)
1252 basic_machine=hppa1.1-oki
1253 ;;
1254 op60c)
1255 basic_machine=hppa1.1-oki
1256 ;;
1257 romp)
1258 basic_machine=romp-ibm
1259 ;;
1260 mmix)
1261 basic_machine=mmix-knuth
1262 ;;
1263 rs6000)
1264 basic_machine=rs6000-ibm
1265 ;;
1266 vax)
1267 basic_machine=vax-dec
1268 ;;
1269 pdp10)
1270 # there are many clones, so DEC is not a safe bet
1271 basic_machine=pdp10-unknown
1272 ;;
1273 pdp11)
1274 basic_machine=pdp11-dec
1275 ;;
1276 we32k)
1277 basic_machine=we32k-att
1278 ;;
1279 sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
1280 basic_machine=sh-unknown
1281 ;;
1282 sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
1283 basic_machine=sparc-sun
1284 ;;
1285 cydra)
1286 basic_machine=cydra-cydrome
1287 ;;
1288 orion)
1289 basic_machine=orion-highlevel
1290 ;;
1291 orion105)
1292 basic_machine=clipper-highlevel
1293 ;;
1294 mac | mpw | mac-mpw)
1295 basic_machine=m68k-apple
1296 ;;
1297 pmac | pmac-mpw)
1298 basic_machine=powerpc-apple
1299 ;;
1300 *-unknown)
1301 # Make sure to match an already-canonicalized machine name.
1302 ;;
1303 *)
1304 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
1305 exit 1
1306 ;;
1307 esac
1308
1309 # Here we canonicalize certain aliases for manufacturers.
1310 case $basic_machine in
1311 *-digital*)
1312 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
1313 ;;
1314 *-commodore*)
1315 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
1316 ;;
1317 *)
1318 ;;
1319 esac
1320
1321 # Decode manufacturer-specific aliases for certain operating systems.
1322
1323 if [ x"$os" != x"" ]
1324 then
1325 case $os in
1326 # First match some system type aliases
1327 # that might get confused with valid system types.
1328 # -solaris* is a basic system type, with this one exception.
1329 -auroraux)
1330 os=-auroraux
1331 ;;
1332 -solaris1 | -solaris1.*)
1333 os=`echo $os | sed -e 's|solaris1|sunos4|'`
1334 ;;
1335 -solaris)
1336 os=-solaris2
1337 ;;
1338 -svr4*)
1339 os=-sysv4
1340 ;;
1341 -unixware*)
1342 os=-sysv4.2uw
1343 ;;
1344 -gnu/linux*)
1345 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1346 ;;
1347 # First accept the basic system types.
1348 # The portable systems comes first.
1349 # Each alternative MUST END IN A *, to match a version number.
1350 # -sysv* is not here because it comes later, after sysvr4.
1351 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1352 | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1353 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
1354 | -sym* | -kopensolaris* | -plan9* \
1355 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1356 | -aos* | -aros* \
1357 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1358 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1359 | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1360 | -bitrig* | -openbsd* | -solidbsd* \
1361 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1362 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1363 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1364 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1365 | -chorusos* | -chorusrdb* | -cegcc* \
1366 | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1367 | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
1368 | -linux-newlib* | -linux-musl* | -linux-uclibc* \
1369 | -uxpv* | -beos* | -mpeix* | -udk* \
1370 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1371 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1372 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1373 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1374 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1375 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1376 | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
1377 # Remember, each alternative MUST END IN *, to match a version number.
1378 ;;
1379 -qnx*)
1380 case $basic_machine in
1381 x86-* | i*86-*)
1382 ;;
1383 *)
1384 os=-nto$os
1385 ;;
1386 esac
1387 ;;
1388 -nto-qnx*)
1389 ;;
1390 -nto*)
1391 os=`echo $os | sed -e 's|nto|nto-qnx|'`
1392 ;;
1393 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1394 | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
1395 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
1396 ;;
1397 -mac*)
1398 os=`echo $os | sed -e 's|mac|macos|'`
1399 ;;
1400 -linux-dietlibc)
1401 os=-linux-dietlibc
1402 ;;
1403 -linux*)
1404 os=`echo $os | sed -e 's|linux|linux-gnu|'`
1405 ;;
1406 -sunos5*)
1407 os=`echo $os | sed -e 's|sunos5|solaris2|'`
1408 ;;
1409 -sunos6*)
1410 os=`echo $os | sed -e 's|sunos6|solaris3|'`
1411 ;;
1412 -opened*)
1413 os=-openedition
1414 ;;
1415 -os400*)
1416 os=-os400
1417 ;;
1418 -wince*)
1419 os=-wince
1420 ;;
1421 -osfrose*)
1422 os=-osfrose
1423 ;;
1424 -osf*)
1425 os=-osf
1426 ;;
1427 -utek*)
1428 os=-bsd
1429 ;;
1430 -dynix*)
1431 os=-bsd
1432 ;;
1433 -acis*)
1434 os=-aos
1435 ;;
1436 -atheos*)
1437 os=-atheos
1438 ;;
1439 -syllable*)
1440 os=-syllable
1441 ;;
1442 -386bsd)
1443 os=-bsd
1444 ;;
1445 -ctix* | -uts*)
1446 os=-sysv
1447 ;;
1448 -nova*)
1449 os=-rtmk-nova
1450 ;;
1451 -ns2 )
1452 os=-nextstep2
1453 ;;
1454 -nsk*)
1455 os=-nsk
1456 ;;
1457 # Preserve the version number of sinix5.
1458 -sinix5.*)
1459 os=`echo $os | sed -e 's|sinix|sysv|'`
1460 ;;
1461 -sinix*)
1462 os=-sysv4
1463 ;;
1464 -tpf*)
1465 os=-tpf
1466 ;;
1467 -triton*)
1468 os=-sysv3
1469 ;;
1470 -oss*)
1471 os=-sysv3
1472 ;;
1473 -svr4)
1474 os=-sysv4
1475 ;;
1476 -svr3)
1477 os=-sysv3
1478 ;;
1479 -sysvr4)
1480 os=-sysv4
1481 ;;
1482 # This must come after -sysvr4.
1483 -sysv*)
1484 ;;
1485 -ose*)
1486 os=-ose
1487 ;;
1488 -es1800*)
1489 os=-ose
1490 ;;
1491 -xenix)
1492 os=-xenix
1493 ;;
1494 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1495 os=-mint
1496 ;;
1497 -aros*)
1498 os=-aros
1499 ;;
1500 -zvmoe)
1501 os=-zvmoe
1502 ;;
1503 -dicos*)
1504 os=-dicos
1505 ;;
1506 -nacl*)
1507 ;;
1508 -none)
1509 ;;
1510 *)
1511 # Get rid of the `-' at the beginning of $os.
1512 os=`echo $os | sed 's/[^-]*-//'`
1513 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1514 exit 1
1515 ;;
1516 esac
1517 else
1518
1519 # Here we handle the default operating systems that come with various machines.
1520 # The value should be what the vendor currently ships out the door with their
1521 # machine or put another way, the most popular os provided with the machine.
1522
1523 # Note that if you're going to try to match "-MANUFACTURER" here (say,
1524 # "-sun"), then you have to tell the case statement up towards the top
1525 # that MANUFACTURER isn't an operating system. Otherwise, code above
1526 # will signal an error saying that MANUFACTURER isn't an operating
1527 # system, and we'll never get to this point.
1528
1529 case $basic_machine in
1530 score-*)
1531 os=-elf
1532 ;;
1533 spu-*)
1534 os=-elf
1535 ;;
1536 *-acorn)
1537 os=-riscix1.2
1538 ;;
1539 arm*-rebel)
1540 os=-linux
1541 ;;
1542 arm*-semi)
1543 os=-aout
1544 ;;
1545 c4x-* | tic4x-*)
1546 os=-coff
1547 ;;
1548 c8051-*)
1549 os=-elf
1550 ;;
1551 hexagon-*)
1552 os=-elf
1553 ;;
1554 tic54x-*)
1555 os=-coff
1556 ;;
1557 tic55x-*)
1558 os=-coff
1559 ;;
1560 tic6x-*)
1561 os=-coff
1562 ;;
1563 # This must come before the *-dec entry.
1564 pdp10-*)
1565 os=-tops20
1566 ;;
1567 pdp11-*)
1568 os=-none
1569 ;;
1570 *-dec | vax-*)
1571 os=-ultrix4.2
1572 ;;
1573 m68*-apollo)
1574 os=-domain
1575 ;;
1576 i386-sun)
1577 os=-sunos4.0.2
1578 ;;
1579 m68000-sun)
1580 os=-sunos3
1581 ;;
1582 m68*-cisco)
1583 os=-aout
1584 ;;
1585 mep-*)
1586 os=-elf
1587 ;;
1588 mips*-cisco)
1589 os=-elf
1590 ;;
1591 mips*-*)
1592 os=-elf
1593 ;;
1594 or1k-*)
1595 os=-elf
1596 ;;
1597 or32-*)
1598 os=-coff
1599 ;;
1600 *-tti) # must be before sparc entry or we get the wrong os.
1601 os=-sysv3
1602 ;;
1603 sparc-* | *-sun)
1604 os=-sunos4.1.1
1605 ;;
1606 *-be)
1607 os=-beos
1608 ;;
1609 *-haiku)
1610 os=-haiku
1611 ;;
1612 *-ibm)
1613 os=-aix
1614 ;;
1615 *-knuth)
1616 os=-mmixware
1617 ;;
1618 *-wec)
1619 os=-proelf
1620 ;;
1621 *-winbond)
1622 os=-proelf
1623 ;;
1624 *-oki)
1625 os=-proelf
1626 ;;
1627 *-hp)
1628 os=-hpux
1629 ;;
1630 *-hitachi)
1631 os=-hiux
1632 ;;
1633 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1634 os=-sysv
1635 ;;
1636 *-cbm)
1637 os=-amigaos
1638 ;;
1639 *-dg)
1640 os=-dgux
1641 ;;
1642 *-dolphin)
1643 os=-sysv3
1644 ;;
1645 m68k-ccur)
1646 os=-rtu
1647 ;;
1648 m88k-omron*)
1649 os=-luna
1650 ;;
1651 *-next )
1652 os=-nextstep
1653 ;;
1654 *-sequent)
1655 os=-ptx
1656 ;;
1657 *-crds)
1658 os=-unos
1659 ;;
1660 *-ns)
1661 os=-genix
1662 ;;
1663 i370-*)
1664 os=-mvs
1665 ;;
1666 *-next)
1667 os=-nextstep3
1668 ;;
1669 *-gould)
1670 os=-sysv
1671 ;;
1672 *-highlevel)
1673 os=-bsd
1674 ;;
1675 *-encore)
1676 os=-bsd
1677 ;;
1678 *-sgi)
1679 os=-irix
1680 ;;
1681 *-siemens)
1682 os=-sysv4
1683 ;;
1684 *-masscomp)
1685 os=-rtu
1686 ;;
1687 f30[01]-fujitsu | f700-fujitsu)
1688 os=-uxpv
1689 ;;
1690 *-rom68k)
1691 os=-coff
1692 ;;
1693 *-*bug)
1694 os=-coff
1695 ;;
1696 *-apple)
1697 os=-macos
1698 ;;
1699 *-atari*)
1700 os=-mint
1701 ;;
1702 *)
1703 os=-none
1704 ;;
1705 esac
1706 fi
1707
1708 # Here we handle the case where we know the os, and the CPU type, but not the
1709 # manufacturer. We pick the logical manufacturer.
1710 vendor=unknown
1711 case $basic_machine in
1712 *-unknown)
1713 case $os in
1714 -riscix*)
1715 vendor=acorn
1716 ;;
1717 -sunos*)
1718 vendor=sun
1719 ;;
1720 -cnk*|-aix*)
1721 vendor=ibm
1722 ;;
1723 -beos*)
1724 vendor=be
1725 ;;
1726 -hpux*)
1727 vendor=hp
1728 ;;
1729 -mpeix*)
1730 vendor=hp
1731 ;;
1732 -hiux*)
1733 vendor=hitachi
1734 ;;
1735 -unos*)
1736 vendor=crds
1737 ;;
1738 -dgux*)
1739 vendor=dg
1740 ;;
1741 -luna*)
1742 vendor=omron
1743 ;;
1744 -genix*)
1745 vendor=ns
1746 ;;
1747 -mvs* | -opened*)
1748 vendor=ibm
1749 ;;
1750 -os400*)
1751 vendor=ibm
1752 ;;
1753 -ptx*)
1754 vendor=sequent
1755 ;;
1756 -tpf*)
1757 vendor=ibm
1758 ;;
1759 -vxsim* | -vxworks* | -windiss*)
1760 vendor=wrs
1761 ;;
1762 -aux*)
1763 vendor=apple
1764 ;;
1765 -hms*)
1766 vendor=hitachi
1767 ;;
1768 -mpw* | -macos*)
1769 vendor=apple
1770 ;;
1771 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1772 vendor=atari
1773 ;;
1774 -vos*)
1775 vendor=stratus
1776 ;;
1777 esac
1778 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1779 ;;
1780 esac
1781
1782 echo $basic_machine$os
1783 exit
1784
1785 # Local variables:
1786 # eval: (add-hook 'write-file-hooks 'time-stamp)
1787 # time-stamp-start: "timestamp='"
1788 # time-stamp-format: "%:y-%02m-%02d"
1789 # time-stamp-end: "'"
1790 # End:
+0
-15216
configure less more
0 #! /bin/sh
1 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.69 for argyll 1.3.7.
3 #
4 #
5 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
6 #
7 #
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10 ## -------------------- ##
11 ## M4sh Initialization. ##
12 ## -------------------- ##
13
14 # Be more Bourne compatible
15 DUALCASE=1; export DUALCASE # for MKS sh
16 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
17 emulate sh
18 NULLCMD=:
19 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
20 # is contrary to our usage. Disable this feature.
21 alias -g '${1+"$@"}'='"$@"'
22 setopt NO_GLOB_SUBST
23 else
24 case `(set -o) 2>/dev/null` in #(
25 *posix*) :
26 set -o posix ;; #(
27 *) :
28 ;;
29 esac
30 fi
31
32
33 as_nl='
34 '
35 export as_nl
36 # Printing a long string crashes Solaris 7 /usr/bin/printf.
37 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
38 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
39 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
40 # Prefer a ksh shell builtin over an external printf program on Solaris,
41 # but without wasting forks for bash or zsh.
42 if test -z "$BASH_VERSION$ZSH_VERSION" \
43 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
44 as_echo='print -r --'
45 as_echo_n='print -rn --'
46 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='printf %s\n'
48 as_echo_n='printf %s'
49 else
50 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
51 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
52 as_echo_n='/usr/ucb/echo -n'
53 else
54 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
55 as_echo_n_body='eval
56 arg=$1;
57 case $arg in #(
58 *"$as_nl"*)
59 expr "X$arg" : "X\\(.*\\)$as_nl";
60 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
61 esac;
62 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
63 '
64 export as_echo_n_body
65 as_echo_n='sh -c $as_echo_n_body as_echo'
66 fi
67 export as_echo_body
68 as_echo='sh -c $as_echo_body as_echo'
69 fi
70
71 # The user is always right.
72 if test "${PATH_SEPARATOR+set}" != set; then
73 PATH_SEPARATOR=:
74 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
75 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
76 PATH_SEPARATOR=';'
77 }
78 fi
79
80
81 # IFS
82 # We need space, tab and new line, in precisely that order. Quoting is
83 # there to prevent editors from complaining about space-tab.
84 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
85 # splitting by setting IFS to empty value.)
86 IFS=" "" $as_nl"
87
88 # Find who we are. Look in the path if we contain no directory separator.
89 as_myself=
90 case $0 in #((
91 *[\\/]* ) as_myself=$0 ;;
92 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
93 for as_dir in $PATH
94 do
95 IFS=$as_save_IFS
96 test -z "$as_dir" && as_dir=.
97 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
98 done
99 IFS=$as_save_IFS
100
101 ;;
102 esac
103 # We did not find ourselves, most probably we were run as `sh COMMAND'
104 # in which case we are not to be found in the path.
105 if test "x$as_myself" = x; then
106 as_myself=$0
107 fi
108 if test ! -f "$as_myself"; then
109 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
110 exit 1
111 fi
112
113 # Unset variables that we do not need and which cause bugs (e.g. in
114 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
115 # suppresses any "Segmentation fault" message there. '((' could
116 # trigger a bug in pdksh 5.2.14.
117 for as_var in BASH_ENV ENV MAIL MAILPATH
118 do eval test x\${$as_var+set} = xset \
119 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
120 done
121 PS1='$ '
122 PS2='> '
123 PS4='+ '
124
125 # NLS nuisances.
126 LC_ALL=C
127 export LC_ALL
128 LANGUAGE=C
129 export LANGUAGE
130
131 # CDPATH.
132 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
133
134 # Use a proper internal environment variable to ensure we don't fall
135 # into an infinite loop, continuously re-executing ourselves.
136 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
137 _as_can_reexec=no; export _as_can_reexec;
138 # We cannot yet assume a decent shell, so we have to provide a
139 # neutralization value for shells without unset; and this also
140 # works around shells that cannot unset nonexistent variables.
141 # Preserve -v and -x to the replacement shell.
142 BASH_ENV=/dev/null
143 ENV=/dev/null
144 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
145 case $- in # ((((
146 *v*x* | *x*v* ) as_opts=-vx ;;
147 *v* ) as_opts=-v ;;
148 *x* ) as_opts=-x ;;
149 * ) as_opts= ;;
150 esac
151 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
152 # Admittedly, this is quite paranoid, since all the known shells bail
153 # out after a failed `exec'.
154 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
155 as_fn_exit 255
156 fi
157 # We don't want this to propagate to other subprocesses.
158 { _as_can_reexec=; unset _as_can_reexec;}
159 if test "x$CONFIG_SHELL" = x; then
160 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
161 emulate sh
162 NULLCMD=:
163 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
164 # is contrary to our usage. Disable this feature.
165 alias -g '\${1+\"\$@\"}'='\"\$@\"'
166 setopt NO_GLOB_SUBST
167 else
168 case \`(set -o) 2>/dev/null\` in #(
169 *posix*) :
170 set -o posix ;; #(
171 *) :
172 ;;
173 esac
174 fi
175 "
176 as_required="as_fn_return () { (exit \$1); }
177 as_fn_success () { as_fn_return 0; }
178 as_fn_failure () { as_fn_return 1; }
179 as_fn_ret_success () { return 0; }
180 as_fn_ret_failure () { return 1; }
181
182 exitcode=0
183 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
184 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
185 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
186 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
187 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
188
189 else
190 exitcode=1; echo positional parameters were not saved.
191 fi
192 test x\$exitcode = x0 || exit 1
193 test -x / || exit 1"
194 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
195 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
196 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
197 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
198
199 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
200 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
201 ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
202 ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
203 PATH=/empty FPATH=/empty; export PATH FPATH
204 test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
205 || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1
206 test \$(( 1 + 1 )) = 2 || exit 1"
207 if (eval "$as_required") 2>/dev/null; then :
208 as_have_required=yes
209 else
210 as_have_required=no
211 fi
212 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
213
214 else
215 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
216 as_found=false
217 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
218 do
219 IFS=$as_save_IFS
220 test -z "$as_dir" && as_dir=.
221 as_found=:
222 case $as_dir in #(
223 /*)
224 for as_base in sh bash ksh sh5; do
225 # Try only shells that exist, to save several forks.
226 as_shell=$as_dir/$as_base
227 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
228 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
229 CONFIG_SHELL=$as_shell as_have_required=yes
230 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
231 break 2
232 fi
233 fi
234 done;;
235 esac
236 as_found=false
237 done
238 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
239 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
240 CONFIG_SHELL=$SHELL as_have_required=yes
241 fi; }
242 IFS=$as_save_IFS
243
244
245 if test "x$CONFIG_SHELL" != x; then :
246 export CONFIG_SHELL
247 # We cannot yet assume a decent shell, so we have to provide a
248 # neutralization value for shells without unset; and this also
249 # works around shells that cannot unset nonexistent variables.
250 # Preserve -v and -x to the replacement shell.
251 BASH_ENV=/dev/null
252 ENV=/dev/null
253 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
254 case $- in # ((((
255 *v*x* | *x*v* ) as_opts=-vx ;;
256 *v* ) as_opts=-v ;;
257 *x* ) as_opts=-x ;;
258 * ) as_opts= ;;
259 esac
260 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
261 # Admittedly, this is quite paranoid, since all the known shells bail
262 # out after a failed `exec'.
263 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
264 exit 255
265 fi
266
267 if test x$as_have_required = xno; then :
268 $as_echo "$0: This script requires a shell more modern than all"
269 $as_echo "$0: the shells that I found on your system."
270 if test x${ZSH_VERSION+set} = xset ; then
271 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
272 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
273 else
274 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
275 $0: including any error possibly output before this
276 $0: message. Then install a modern shell, or manually run
277 $0: the script under such a shell if you do have one."
278 fi
279 exit 1
280 fi
281 fi
282 fi
283 SHELL=${CONFIG_SHELL-/bin/sh}
284 export SHELL
285 # Unset more variables known to interfere with behavior of common tools.
286 CLICOLOR_FORCE= GREP_OPTIONS=
287 unset CLICOLOR_FORCE GREP_OPTIONS
288
289 ## --------------------- ##
290 ## M4sh Shell Functions. ##
291 ## --------------------- ##
292 # as_fn_unset VAR
293 # ---------------
294 # Portably unset VAR.
295 as_fn_unset ()
296 {
297 { eval $1=; unset $1;}
298 }
299 as_unset=as_fn_unset
300
301 # as_fn_set_status STATUS
302 # -----------------------
303 # Set $? to STATUS, without forking.
304 as_fn_set_status ()
305 {
306 return $1
307 } # as_fn_set_status
308
309 # as_fn_exit STATUS
310 # -----------------
311 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
312 as_fn_exit ()
313 {
314 set +e
315 as_fn_set_status $1
316 exit $1
317 } # as_fn_exit
318
319 # as_fn_mkdir_p
320 # -------------
321 # Create "$as_dir" as a directory, including parents if necessary.
322 as_fn_mkdir_p ()
323 {
324
325 case $as_dir in #(
326 -*) as_dir=./$as_dir;;
327 esac
328 test -d "$as_dir" || eval $as_mkdir_p || {
329 as_dirs=
330 while :; do
331 case $as_dir in #(
332 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
333 *) as_qdir=$as_dir;;
334 esac
335 as_dirs="'$as_qdir' $as_dirs"
336 as_dir=`$as_dirname -- "$as_dir" ||
337 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
338 X"$as_dir" : 'X\(//\)[^/]' \| \
339 X"$as_dir" : 'X\(//\)$' \| \
340 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
341 $as_echo X"$as_dir" |
342 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)[^/].*/{
347 s//\1/
348 q
349 }
350 /^X\(\/\/\)$/{
351 s//\1/
352 q
353 }
354 /^X\(\/\).*/{
355 s//\1/
356 q
357 }
358 s/.*/./; q'`
359 test -d "$as_dir" && break
360 done
361 test -z "$as_dirs" || eval "mkdir $as_dirs"
362 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
363
364
365 } # as_fn_mkdir_p
366
367 # as_fn_executable_p FILE
368 # -----------------------
369 # Test if FILE is an executable regular file.
370 as_fn_executable_p ()
371 {
372 test -f "$1" && test -x "$1"
373 } # as_fn_executable_p
374 # as_fn_append VAR VALUE
375 # ----------------------
376 # Append the text in VALUE to the end of the definition contained in VAR. Take
377 # advantage of any shell optimizations that allow amortized linear growth over
378 # repeated appends, instead of the typical quadratic growth present in naive
379 # implementations.
380 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
381 eval 'as_fn_append ()
382 {
383 eval $1+=\$2
384 }'
385 else
386 as_fn_append ()
387 {
388 eval $1=\$$1\$2
389 }
390 fi # as_fn_append
391
392 # as_fn_arith ARG...
393 # ------------------
394 # Perform arithmetic evaluation on the ARGs, and store the result in the
395 # global $as_val. Take advantage of shells that can avoid forks. The arguments
396 # must be portable across $(()) and expr.
397 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
398 eval 'as_fn_arith ()
399 {
400 as_val=$(( $* ))
401 }'
402 else
403 as_fn_arith ()
404 {
405 as_val=`expr "$@" || test $? -eq 1`
406 }
407 fi # as_fn_arith
408
409
410 # as_fn_error STATUS ERROR [LINENO LOG_FD]
411 # ----------------------------------------
412 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
413 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
414 # script with STATUS, using 1 if that was 0.
415 as_fn_error ()
416 {
417 as_status=$1; test $as_status -eq 0 && as_status=1
418 if test "$4"; then
419 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
420 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
421 fi
422 $as_echo "$as_me: error: $2" >&2
423 as_fn_exit $as_status
424 } # as_fn_error
425
426 if expr a : '\(a\)' >/dev/null 2>&1 &&
427 test "X`expr 00001 : '.*\(...\)'`" = X001; then
428 as_expr=expr
429 else
430 as_expr=false
431 fi
432
433 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
434 as_basename=basename
435 else
436 as_basename=false
437 fi
438
439 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
440 as_dirname=dirname
441 else
442 as_dirname=false
443 fi
444
445 as_me=`$as_basename -- "$0" ||
446 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
447 X"$0" : 'X\(//\)$' \| \
448 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
449 $as_echo X/"$0" |
450 sed '/^.*\/\([^/][^/]*\)\/*$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\/\)$/{
455 s//\1/
456 q
457 }
458 /^X\/\(\/\).*/{
459 s//\1/
460 q
461 }
462 s/.*/./; q'`
463
464 # Avoid depending upon Character Ranges.
465 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
466 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
467 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
468 as_cr_digits='0123456789'
469 as_cr_alnum=$as_cr_Letters$as_cr_digits
470
471
472 as_lineno_1=$LINENO as_lineno_1a=$LINENO
473 as_lineno_2=$LINENO as_lineno_2a=$LINENO
474 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
475 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
476 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
477 sed -n '
478 p
479 /[$]LINENO/=
480 ' <$as_myself |
481 sed '
482 s/[$]LINENO.*/&-/
483 t lineno
484 b
485 :lineno
486 N
487 :loop
488 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
489 t loop
490 s/-\n.*//
491 ' >$as_me.lineno &&
492 chmod +x "$as_me.lineno" ||
493 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
494
495 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
496 # already done that, so ensure we don't try to do so again and fall
497 # in an infinite loop. This has already happened in practice.
498 _as_can_reexec=no; export _as_can_reexec
499 # Don't try to exec as it changes $[0], causing all sort of problems
500 # (the dirname of $[0] is not the place where we might find the
501 # original and so on. Autoconf is especially sensitive to this).
502 . "./$as_me.lineno"
503 # Exit status is that of the last command.
504 exit
505 }
506
507 ECHO_C= ECHO_N= ECHO_T=
508 case `echo -n x` in #(((((
509 -n*)
510 case `echo 'xy\c'` in
511 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
512 xy) ECHO_C='\c';;
513 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
514 ECHO_T=' ';;
515 esac;;
516 *)
517 ECHO_N='-n';;
518 esac
519
520 rm -f conf$$ conf$$.exe conf$$.file
521 if test -d conf$$.dir; then
522 rm -f conf$$.dir/conf$$.file
523 else
524 rm -f conf$$.dir
525 mkdir conf$$.dir 2>/dev/null
526 fi
527 if (echo >conf$$.file) 2>/dev/null; then
528 if ln -s conf$$.file conf$$ 2>/dev/null; then
529 as_ln_s='ln -s'
530 # ... but there are two gotchas:
531 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
532 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
533 # In both cases, we have to default to `cp -pR'.
534 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
535 as_ln_s='cp -pR'
536 elif ln conf$$.file conf$$ 2>/dev/null; then
537 as_ln_s=ln
538 else
539 as_ln_s='cp -pR'
540 fi
541 else
542 as_ln_s='cp -pR'
543 fi
544 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
545 rmdir conf$$.dir 2>/dev/null
546
547 if mkdir -p . 2>/dev/null; then
548 as_mkdir_p='mkdir -p "$as_dir"'
549 else
550 test -d ./-p && rmdir ./-p
551 as_mkdir_p=false
552 fi
553
554 as_test_x='test -x'
555 as_executable_p=as_fn_executable_p
556
557 # Sed expression to map a string onto a valid CPP name.
558 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
559
560 # Sed expression to map a string onto a valid variable name.
561 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
562
563 SHELL=${CONFIG_SHELL-/bin/sh}
564
565
566 test -n "$DJDIR" || exec 7<&0 </dev/null
567 exec 6>&1
568
569 # Name of the host.
570 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571 # so uname gets run too.
572 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574 #
575 # Initializations.
576 #
577 ac_default_prefix=/usr/local
578 ac_clean_files=
579 ac_config_libobj_dir=.
580 LIBOBJS=
581 cross_compiling=no
582 subdirs=
583 MFLAGS=
584 MAKEFLAGS=
585
586 # Identity of this package.
587 PACKAGE_NAME='argyll'
588 PACKAGE_TARNAME='argyll'
589 PACKAGE_VERSION='1.3.7'
590 PACKAGE_STRING='argyll 1.3.7'
591 PACKAGE_BUGREPORT=''
592 PACKAGE_URL=''
593
594 # Factoring default headers for most tests.
595 ac_includes_default="\
596 #include <stdio.h>
597 #ifdef HAVE_SYS_TYPES_H
598 # include <sys/types.h>
599 #endif
600 #ifdef HAVE_SYS_STAT_H
601 # include <sys/stat.h>
602 #endif
603 #ifdef STDC_HEADERS
604 # include <stdlib.h>
605 # include <stddef.h>
606 #else
607 # ifdef HAVE_STDLIB_H
608 # include <stdlib.h>
609 # endif
610 #endif
611 #ifdef HAVE_STRING_H
612 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613 # include <memory.h>
614 # endif
615 # include <string.h>
616 #endif
617 #ifdef HAVE_STRINGS_H
618 # include <strings.h>
619 #endif
620 #ifdef HAVE_INTTYPES_H
621 # include <inttypes.h>
622 #endif
623 #ifdef HAVE_STDINT_H
624 # include <stdint.h>
625 #endif
626 #ifdef HAVE_UNISTD_H
627 # include <unistd.h>
628 #endif"
629
630 ac_subst_vars='am__EXEEXT_FALSE
631 am__EXEEXT_TRUE
632 LTLIBOBJS
633 LIBOBJS
634 BIGENDIAN
635 OS_LINUX_FALSE
636 OS_LINUX_TRUE
637 OS_BSD
638 OS_LINUX
639 YAJL_SUBDIRS
640 YAJL_CFLAGS
641 YAJL_LIBS
642 ICC_SUBDIRS
643 ICC_CFLAGS
644 ICC_LIBS
645 TIFF_LIBS
646 X_EXTRA_LIBS
647 X_LIBS
648 X_PRE_LIBS
649 X_CFLAGS
650 XMKMF
651 CPP
652 OTOOL64
653 OTOOL
654 LIPO
655 NMEDIT
656 DSYMUTIL
657 MANIFEST_TOOL
658 RANLIB
659 ac_ct_AR
660 AR
661 DLLTOOL
662 OBJDUMP
663 LN_S
664 NM
665 ac_ct_DUMPBIN
666 DUMPBIN
667 LD
668 FGREP
669 EGREP
670 GREP
671 SED
672 host_os
673 host_vendor
674 host_cpu
675 host
676 build_os
677 build_vendor
678 build_cpu
679 build
680 LIBTOOL
681 am__fastdepCC_FALSE
682 am__fastdepCC_TRUE
683 CCDEPMODE
684 am__nodep
685 AMDEPBACKSLASH
686 AMDEP_FALSE
687 AMDEP_TRUE
688 am__quote
689 am__include
690 DEPDIR
691 OBJEXT
692 EXEEXT
693 ac_ct_CC
694 CPPFLAGS
695 LDFLAGS
696 CFLAGS
697 CC
698 AM_BACKSLASH
699 AM_DEFAULT_VERBOSITY
700 AM_DEFAULT_V
701 AM_V
702 am__untar
703 am__tar
704 AMTAR
705 am__leading_dot
706 SET_MAKE
707 AWK
708 mkdir_p
709 MKDIR_P
710 INSTALL_STRIP_PROGRAM
711 STRIP
712 install_sh
713 MAKEINFO
714 AUTOHEADER
715 AUTOMAKE
716 AUTOCONF
717 ACLOCAL
718 VERSION
719 PACKAGE
720 CYGPATH_W
721 am__isrc
722 INSTALL_DATA
723 INSTALL_SCRIPT
724 INSTALL_PROGRAM
725 target_alias
726 host_alias
727 build_alias
728 LIBS
729 ECHO_T
730 ECHO_N
731 ECHO_C
732 DEFS
733 mandir
734 localedir
735 libdir
736 psdir
737 pdfdir
738 dvidir
739 htmldir
740 infodir
741 docdir
742 oldincludedir
743 includedir
744 localstatedir
745 sharedstatedir
746 sysconfdir
747 datadir
748 datarootdir
749 libexecdir
750 sbindir
751 bindir
752 program_transform_name
753 prefix
754 exec_prefix
755 PACKAGE_URL
756 PACKAGE_BUGREPORT
757 PACKAGE_STRING
758 PACKAGE_VERSION
759 PACKAGE_TARNAME
760 PACKAGE_NAME
761 PATH_SEPARATOR
762 SHELL'
763 ac_subst_files=''
764 ac_user_opts='
765 enable_option_checking
766 enable_silent_rules
767 enable_dependency_tracking
768 enable_shared
769 enable_static
770 with_pic
771 enable_fast_install
772 with_gnu_ld
773 with_sysroot
774 enable_libtool_lock
775 with_x
776 with_system_libicc
777 with_system_libyajl
778 '
779 ac_precious_vars='build_alias
780 host_alias
781 target_alias
782 CC
783 CFLAGS
784 LDFLAGS
785 LIBS
786 CPPFLAGS
787 CPP
788 XMKMF'
789
790
791 # Initialize some variables set by options.
792 ac_init_help=
793 ac_init_version=false
794 ac_unrecognized_opts=
795 ac_unrecognized_sep=
796 # The variables have the same names as the options, with
797 # dashes changed to underlines.
798 cache_file=/dev/null
799 exec_prefix=NONE
800 no_create=
801 no_recursion=
802 prefix=NONE
803 program_prefix=NONE
804 program_suffix=NONE
805 program_transform_name=s,x,x,
806 silent=
807 site=
808 srcdir=
809 verbose=
810 x_includes=NONE
811 x_libraries=NONE
812
813 # Installation directory options.
814 # These are left unexpanded so users can "make install exec_prefix=/foo"
815 # and all the variables that are supposed to be based on exec_prefix
816 # by default will actually change.
817 # Use braces instead of parens because sh, perl, etc. also accept them.
818 # (The list follows the same order as the GNU Coding Standards.)
819 bindir='${exec_prefix}/bin'
820 sbindir='${exec_prefix}/sbin'
821 libexecdir='${exec_prefix}/libexec'
822 datarootdir='${prefix}/share'
823 datadir='${datarootdir}'
824 sysconfdir='${prefix}/etc'
825 sharedstatedir='${prefix}/com'
826 localstatedir='${prefix}/var'
827 includedir='${prefix}/include'
828 oldincludedir='/usr/include'
829 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
830 infodir='${datarootdir}/info'
831 htmldir='${docdir}'
832 dvidir='${docdir}'
833 pdfdir='${docdir}'
834 psdir='${docdir}'
835 libdir='${exec_prefix}/lib'
836 localedir='${datarootdir}/locale'
837 mandir='${datarootdir}/man'
838
839 ac_prev=
840 ac_dashdash=
841 for ac_option
842 do
843 # If the previous option needs an argument, assign it.
844 if test -n "$ac_prev"; then
845 eval $ac_prev=\$ac_option
846 ac_prev=
847 continue
848 fi
849
850 case $ac_option in
851 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
852 *=) ac_optarg= ;;
853 *) ac_optarg=yes ;;
854 esac
855
856 # Accept the important Cygnus configure options, so we can diagnose typos.
857
858 case $ac_dashdash$ac_option in
859 --)
860 ac_dashdash=yes ;;
861
862 -bindir | --bindir | --bindi | --bind | --bin | --bi)
863 ac_prev=bindir ;;
864 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
865 bindir=$ac_optarg ;;
866
867 -build | --build | --buil | --bui | --bu)
868 ac_prev=build_alias ;;
869 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
870 build_alias=$ac_optarg ;;
871
872 -cache-file | --cache-file | --cache-fil | --cache-fi \
873 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
874 ac_prev=cache_file ;;
875 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
876 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
877 cache_file=$ac_optarg ;;
878
879 --config-cache | -C)
880 cache_file=config.cache ;;
881
882 -datadir | --datadir | --datadi | --datad)
883 ac_prev=datadir ;;
884 -datadir=* | --datadir=* | --datadi=* | --datad=*)
885 datadir=$ac_optarg ;;
886
887 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
888 | --dataroo | --dataro | --datar)
889 ac_prev=datarootdir ;;
890 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
891 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
892 datarootdir=$ac_optarg ;;
893
894 -disable-* | --disable-*)
895 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
896 # Reject names that are not valid shell variable names.
897 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
898 as_fn_error $? "invalid feature name: $ac_useropt"
899 ac_useropt_orig=$ac_useropt
900 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
901 case $ac_user_opts in
902 *"
903 "enable_$ac_useropt"
904 "*) ;;
905 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
906 ac_unrecognized_sep=', ';;
907 esac
908 eval enable_$ac_useropt=no ;;
909
910 -docdir | --docdir | --docdi | --doc | --do)
911 ac_prev=docdir ;;
912 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
913 docdir=$ac_optarg ;;
914
915 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
916 ac_prev=dvidir ;;
917 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
918 dvidir=$ac_optarg ;;
919
920 -enable-* | --enable-*)
921 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
922 # Reject names that are not valid shell variable names.
923 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
924 as_fn_error $? "invalid feature name: $ac_useropt"
925 ac_useropt_orig=$ac_useropt
926 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
927 case $ac_user_opts in
928 *"
929 "enable_$ac_useropt"
930 "*) ;;
931 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
932 ac_unrecognized_sep=', ';;
933 esac
934 eval enable_$ac_useropt=\$ac_optarg ;;
935
936 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
937 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
938 | --exec | --exe | --ex)
939 ac_prev=exec_prefix ;;
940 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
941 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
942 | --exec=* | --exe=* | --ex=*)
943 exec_prefix=$ac_optarg ;;
944
945 -gas | --gas | --ga | --g)
946 # Obsolete; use --with-gas.
947 with_gas=yes ;;
948
949 -help | --help | --hel | --he | -h)
950 ac_init_help=long ;;
951 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
952 ac_init_help=recursive ;;
953 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
954 ac_init_help=short ;;
955
956 -host | --host | --hos | --ho)
957 ac_prev=host_alias ;;
958 -host=* | --host=* | --hos=* | --ho=*)
959 host_alias=$ac_optarg ;;
960
961 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
962 ac_prev=htmldir ;;
963 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
964 | --ht=*)
965 htmldir=$ac_optarg ;;
966
967 -includedir | --includedir | --includedi | --included | --include \
968 | --includ | --inclu | --incl | --inc)
969 ac_prev=includedir ;;
970 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
971 | --includ=* | --inclu=* | --incl=* | --inc=*)
972 includedir=$ac_optarg ;;
973
974 -infodir | --infodir | --infodi | --infod | --info | --inf)
975 ac_prev=infodir ;;
976 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
977 infodir=$ac_optarg ;;
978
979 -libdir | --libdir | --libdi | --libd)
980 ac_prev=libdir ;;
981 -libdir=* | --libdir=* | --libdi=* | --libd=*)
982 libdir=$ac_optarg ;;
983
984 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
985 | --libexe | --libex | --libe)
986 ac_prev=libexecdir ;;
987 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
988 | --libexe=* | --libex=* | --libe=*)
989 libexecdir=$ac_optarg ;;
990
991 -localedir | --localedir | --localedi | --localed | --locale)
992 ac_prev=localedir ;;
993 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
994 localedir=$ac_optarg ;;
995
996 -localstatedir | --localstatedir | --localstatedi | --localstated \
997 | --localstate | --localstat | --localsta | --localst | --locals)
998 ac_prev=localstatedir ;;
999 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1000 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1001 localstatedir=$ac_optarg ;;
1002
1003 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1004 ac_prev=mandir ;;
1005 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1006 mandir=$ac_optarg ;;
1007
1008 -nfp | --nfp | --nf)
1009 # Obsolete; use --without-fp.
1010 with_fp=no ;;
1011
1012 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1013 | --no-cr | --no-c | -n)
1014 no_create=yes ;;
1015
1016 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1017 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1018 no_recursion=yes ;;
1019
1020 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1021 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1022 | --oldin | --oldi | --old | --ol | --o)
1023 ac_prev=oldincludedir ;;
1024 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1025 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1026 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1027 oldincludedir=$ac_optarg ;;
1028
1029 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1030 ac_prev=prefix ;;
1031 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1032 prefix=$ac_optarg ;;
1033
1034 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1035 | --program-pre | --program-pr | --program-p)
1036 ac_prev=program_prefix ;;
1037 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1038 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1039 program_prefix=$ac_optarg ;;
1040
1041 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1042 | --program-suf | --program-su | --program-s)
1043 ac_prev=program_suffix ;;
1044 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1045 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1046 program_suffix=$ac_optarg ;;
1047
1048 -program-transform-name | --program-transform-name \
1049 | --program-transform-nam | --program-transform-na \
1050 | --program-transform-n | --program-transform- \
1051 | --program-transform | --program-transfor \
1052 | --program-transfo | --program-transf \
1053 | --program-trans | --program-tran \
1054 | --progr-tra | --program-tr | --program-t)
1055 ac_prev=program_transform_name ;;
1056 -program-transform-name=* | --program-transform-name=* \
1057 | --program-transform-nam=* | --program-transform-na=* \
1058 | --program-transform-n=* | --program-transform-=* \
1059 | --program-transform=* | --program-transfor=* \
1060 | --program-transfo=* | --program-transf=* \
1061 | --program-trans=* | --program-tran=* \
1062 | --progr-tra=* | --program-tr=* | --program-t=*)
1063 program_transform_name=$ac_optarg ;;
1064
1065 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1066 ac_prev=pdfdir ;;
1067 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1068 pdfdir=$ac_optarg ;;
1069
1070 -psdir | --psdir | --psdi | --psd | --ps)
1071 ac_prev=psdir ;;
1072 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1073 psdir=$ac_optarg ;;
1074
1075 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1076 | -silent | --silent | --silen | --sile | --sil)
1077 silent=yes ;;
1078
1079 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1080 ac_prev=sbindir ;;
1081 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1082 | --sbi=* | --sb=*)
1083 sbindir=$ac_optarg ;;
1084
1085 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1086 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1087 | --sharedst | --shareds | --shared | --share | --shar \
1088 | --sha | --sh)
1089 ac_prev=sharedstatedir ;;
1090 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1091 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1092 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1093 | --sha=* | --sh=*)
1094 sharedstatedir=$ac_optarg ;;
1095
1096 -site | --site | --sit)
1097 ac_prev=site ;;
1098 -site=* | --site=* | --sit=*)
1099 site=$ac_optarg ;;
1100
1101 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1102 ac_prev=srcdir ;;
1103 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1104 srcdir=$ac_optarg ;;
1105
1106 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1107 | --syscon | --sysco | --sysc | --sys | --sy)
1108 ac_prev=sysconfdir ;;
1109 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1110 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1111 sysconfdir=$ac_optarg ;;
1112
1113 -target | --target | --targe | --targ | --tar | --ta | --t)
1114 ac_prev=target_alias ;;
1115 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1116 target_alias=$ac_optarg ;;
1117
1118 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1119 verbose=yes ;;
1120
1121 -version | --version | --versio | --versi | --vers | -V)
1122 ac_init_version=: ;;
1123
1124 -with-* | --with-*)
1125 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1126 # Reject names that are not valid shell variable names.
1127 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1128 as_fn_error $? "invalid package name: $ac_useropt"
1129 ac_useropt_orig=$ac_useropt
1130 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1131 case $ac_user_opts in
1132 *"
1133 "with_$ac_useropt"
1134 "*) ;;
1135 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1136 ac_unrecognized_sep=', ';;
1137 esac
1138 eval with_$ac_useropt=\$ac_optarg ;;
1139
1140 -without-* | --without-*)
1141 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1142 # Reject names that are not valid shell variable names.
1143 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1144 as_fn_error $? "invalid package name: $ac_useropt"
1145 ac_useropt_orig=$ac_useropt
1146 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1147 case $ac_user_opts in
1148 *"
1149 "with_$ac_useropt"
1150 "*) ;;
1151 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1152 ac_unrecognized_sep=', ';;
1153 esac
1154 eval with_$ac_useropt=no ;;
1155
1156 --x)
1157 # Obsolete; use --with-x.
1158 with_x=yes ;;
1159
1160 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1161 | --x-incl | --x-inc | --x-in | --x-i)
1162 ac_prev=x_includes ;;
1163 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1164 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1165 x_includes=$ac_optarg ;;
1166
1167 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1168 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1169 ac_prev=x_libraries ;;
1170 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1171 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1172 x_libraries=$ac_optarg ;;
1173
1174 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1175 Try \`$0 --help' for more information"
1176 ;;
1177
1178 *=*)
1179 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1180 # Reject names that are not valid shell variable names.
1181 case $ac_envvar in #(
1182 '' | [0-9]* | *[!_$as_cr_alnum]* )
1183 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1184 esac
1185 eval $ac_envvar=\$ac_optarg
1186 export $ac_envvar ;;
1187
1188 *)
1189 # FIXME: should be removed in autoconf 3.0.
1190 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1191 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1192 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1193 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1194 ;;
1195
1196 esac
1197 done
1198
1199 if test -n "$ac_prev"; then
1200 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1201 as_fn_error $? "missing argument to $ac_option"
1202 fi
1203
1204 if test -n "$ac_unrecognized_opts"; then
1205 case $enable_option_checking in
1206 no) ;;
1207 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1208 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1209 esac
1210 fi
1211
1212 # Check all directory arguments for consistency.
1213 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1214 datadir sysconfdir sharedstatedir localstatedir includedir \
1215 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1216 libdir localedir mandir
1217 do
1218 eval ac_val=\$$ac_var
1219 # Remove trailing slashes.
1220 case $ac_val in
1221 */ )
1222 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1223 eval $ac_var=\$ac_val;;
1224 esac
1225 # Be sure to have absolute directory names.
1226 case $ac_val in
1227 [\\/$]* | ?:[\\/]* ) continue;;
1228 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1229 esac
1230 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1231 done
1232
1233 # There might be people who depend on the old broken behavior: `$host'
1234 # used to hold the argument of --host etc.
1235 # FIXME: To remove some day.
1236 build=$build_alias
1237 host=$host_alias
1238 target=$target_alias
1239
1240 # FIXME: To remove some day.
1241 if test "x$host_alias" != x; then
1242 if test "x$build_alias" = x; then
1243 cross_compiling=maybe
1244 elif test "x$build_alias" != "x$host_alias"; then
1245 cross_compiling=yes
1246 fi
1247 fi
1248
1249 ac_tool_prefix=
1250 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1251
1252 test "$silent" = yes && exec 6>/dev/null
1253
1254
1255 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1256 ac_ls_di=`ls -di .` &&
1257 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1258 as_fn_error $? "working directory cannot be determined"
1259 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1260 as_fn_error $? "pwd does not report name of working directory"
1261
1262
1263 # Find the source files, if location was not specified.
1264 if test -z "$srcdir"; then
1265 ac_srcdir_defaulted=yes
1266 # Try the directory containing this script, then the parent directory.
1267 ac_confdir=`$as_dirname -- "$as_myself" ||
1268 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1269 X"$as_myself" : 'X\(//\)[^/]' \| \
1270 X"$as_myself" : 'X\(//\)$' \| \
1271 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1272 $as_echo X"$as_myself" |
1273 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1274 s//\1/
1275 q
1276 }
1277 /^X\(\/\/\)[^/].*/{
1278 s//\1/
1279 q
1280 }
1281 /^X\(\/\/\)$/{
1282 s//\1/
1283 q
1284 }
1285 /^X\(\/\).*/{
1286 s//\1/
1287 q
1288 }
1289 s/.*/./; q'`
1290 srcdir=$ac_confdir
1291 if test ! -r "$srcdir/$ac_unique_file"; then
1292 srcdir=..
1293 fi
1294 else
1295 ac_srcdir_defaulted=no
1296 fi
1297 if test ! -r "$srcdir/$ac_unique_file"; then
1298 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1299 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1300 fi
1301 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1302 ac_abs_confdir=`(
1303 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1304 pwd)`
1305 # When building in place, set srcdir=.
1306 if test "$ac_abs_confdir" = "$ac_pwd"; then
1307 srcdir=.
1308 fi
1309 # Remove unnecessary trailing slashes from srcdir.
1310 # Double slashes in file names in object file debugging info
1311 # mess up M-x gdb in Emacs.
1312 case $srcdir in
1313 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1314 esac
1315 for ac_var in $ac_precious_vars; do
1316 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1317 eval ac_env_${ac_var}_value=\$${ac_var}
1318 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1319 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1320 done
1321
1322 #
1323 # Report the --help message.
1324 #
1325 if test "$ac_init_help" = "long"; then
1326 # Omit some internal or obsolete options to make the list less imposing.
1327 # This message is too long to be a string in the A/UX 3.1 sh.
1328 cat <<_ACEOF
1329 \`configure' configures argyll 1.3.7 to adapt to many kinds of systems.
1330
1331 Usage: $0 [OPTION]... [VAR=VALUE]...
1332
1333 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1334 VAR=VALUE. See below for descriptions of some of the useful variables.
1335
1336 Defaults for the options are specified in brackets.
1337
1338 Configuration:
1339 -h, --help display this help and exit
1340 --help=short display options specific to this package
1341 --help=recursive display the short help of all the included packages
1342 -V, --version display version information and exit
1343 -q, --quiet, --silent do not print \`checking ...' messages
1344 --cache-file=FILE cache test results in FILE [disabled]
1345 -C, --config-cache alias for \`--cache-file=config.cache'
1346 -n, --no-create do not create output files
1347 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1348
1349 Installation directories:
1350 --prefix=PREFIX install architecture-independent files in PREFIX
1351 [$ac_default_prefix]
1352 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1353 [PREFIX]
1354
1355 By default, \`make install' will install all the files in
1356 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1357 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1358 for instance \`--prefix=\$HOME'.
1359
1360 For better control, use the options below.
1361
1362 Fine tuning of the installation directories:
1363 --bindir=DIR user executables [EPREFIX/bin]
1364 --sbindir=DIR system admin executables [EPREFIX/sbin]
1365 --libexecdir=DIR program executables [EPREFIX/libexec]
1366 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1367 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1368 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1369 --libdir=DIR object code libraries [EPREFIX/lib]
1370 --includedir=DIR C header files [PREFIX/include]
1371 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1372 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1373 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1374 --infodir=DIR info documentation [DATAROOTDIR/info]
1375 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1376 --mandir=DIR man documentation [DATAROOTDIR/man]
1377 --docdir=DIR documentation root [DATAROOTDIR/doc/argyll]
1378 --htmldir=DIR html documentation [DOCDIR]
1379 --dvidir=DIR dvi documentation [DOCDIR]
1380 --pdfdir=DIR pdf documentation [DOCDIR]
1381 --psdir=DIR ps documentation [DOCDIR]
1382 _ACEOF
1383
1384 cat <<\_ACEOF
1385
1386 Program names:
1387 --program-prefix=PREFIX prepend PREFIX to installed program names
1388 --program-suffix=SUFFIX append SUFFIX to installed program names
1389 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1390
1391 X features:
1392 --x-includes=DIR X include files are in DIR
1393 --x-libraries=DIR X library files are in DIR
1394
1395 System types:
1396 --build=BUILD configure for building on BUILD [guessed]
1397 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1398 _ACEOF
1399 fi
1400
1401 if test -n "$ac_init_help"; then
1402 case $ac_init_help in
1403 short | recursive ) echo "Configuration of argyll 1.3.7:";;
1404 esac
1405 cat <<\_ACEOF
1406
1407 Optional Features:
1408 --disable-option-checking ignore unrecognized --enable/--with options
1409 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1410 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1411 --enable-silent-rules less verbose build output (undo: "make V=1")
1412 --disable-silent-rules verbose build output (undo: "make V=0")
1413 --enable-dependency-tracking
1414 do not reject slow dependency extractors
1415 --disable-dependency-tracking
1416 speeds up one-time build
1417 --enable-shared[=PKGS] build shared libraries [default=yes]
1418 --enable-static[=PKGS] build static libraries [default=yes]
1419 --enable-fast-install[=PKGS]
1420 optimize for fast installation [default=yes]
1421 --disable-libtool-lock avoid locking (might break parallel builds)
1422
1423 Optional Packages:
1424 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1425 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1426 --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
1427 both]
1428 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
1429 --with-sysroot=DIR Search for dependent libraries within DIR
1430 (or the compiler's sysroot if not specified).
1431 --with-x use the X Window System
1432 --with-system-libicc use system libicc instead of argyllcms copy
1433 --with-system-libyajl use system libyajl instead of argyllcms copy
1434
1435 Some influential environment variables:
1436 CC C compiler command
1437 CFLAGS C compiler flags
1438 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1439 nonstandard directory <lib dir>
1440 LIBS libraries to pass to the linker, e.g. -l<library>
1441 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1442 you have headers in a nonstandard directory <include dir>
1443 CPP C preprocessor
1444 XMKMF Path to xmkmf, Makefile generator for X Window System
1445
1446 Use these variables to override the choices made by `configure' or to help
1447 it to find libraries and programs with nonstandard names/locations.
1448
1449 Report bugs to the package provider.
1450 _ACEOF
1451 ac_status=$?
1452 fi
1453
1454 if test "$ac_init_help" = "recursive"; then
1455 # If there are subdirs, report their specific --help.
1456 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1457 test -d "$ac_dir" ||
1458 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1459 continue
1460 ac_builddir=.
1461
1462 case "$ac_dir" in
1463 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1464 *)
1465 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1466 # A ".." for each directory in $ac_dir_suffix.
1467 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1468 case $ac_top_builddir_sub in
1469 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1470 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1471 esac ;;
1472 esac
1473 ac_abs_top_builddir=$ac_pwd
1474 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1475 # for backward compatibility:
1476 ac_top_builddir=$ac_top_build_prefix
1477
1478 case $srcdir in
1479 .) # We are building in place.
1480 ac_srcdir=.
1481 ac_top_srcdir=$ac_top_builddir_sub
1482 ac_abs_top_srcdir=$ac_pwd ;;
1483 [\\/]* | ?:[\\/]* ) # Absolute name.
1484 ac_srcdir=$srcdir$ac_dir_suffix;
1485 ac_top_srcdir=$srcdir
1486 ac_abs_top_srcdir=$srcdir ;;
1487 *) # Relative name.
1488 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1489 ac_top_srcdir=$ac_top_build_prefix$srcdir
1490 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1491 esac
1492 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1493
1494 cd "$ac_dir" || { ac_status=$?; continue; }
1495 # Check for guested configure.
1496 if test -f "$ac_srcdir/configure.gnu"; then
1497 echo &&
1498 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1499 elif test -f "$ac_srcdir/configure"; then
1500 echo &&
1501 $SHELL "$ac_srcdir/configure" --help=recursive
1502 else
1503 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1504 fi || ac_status=$?
1505 cd "$ac_pwd" || { ac_status=$?; break; }
1506 done
1507 fi
1508
1509 test -n "$ac_init_help" && exit $ac_status
1510 if $ac_init_version; then
1511 cat <<\_ACEOF
1512 argyll configure 1.3.7
1513 generated by GNU Autoconf 2.69
1514
1515 Copyright (C) 2012 Free Software Foundation, Inc.
1516 This configure script is free software; the Free Software Foundation
1517 gives unlimited permission to copy, distribute and modify it.
1518 _ACEOF
1519 exit
1520 fi
1521
1522 ## ------------------------ ##
1523 ## Autoconf initialization. ##
1524 ## ------------------------ ##
1525
1526 # ac_fn_c_try_compile LINENO
1527 # --------------------------
1528 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1529 ac_fn_c_try_compile ()
1530 {
1531 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1532 rm -f conftest.$ac_objext
1533 if { { ac_try="$ac_compile"
1534 case "(($ac_try" in
1535 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1536 *) ac_try_echo=$ac_try;;
1537 esac
1538 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1539 $as_echo "$ac_try_echo"; } >&5
1540 (eval "$ac_compile") 2>conftest.err
1541 ac_status=$?
1542 if test -s conftest.err; then
1543 grep -v '^ *+' conftest.err >conftest.er1
1544 cat conftest.er1 >&5
1545 mv -f conftest.er1 conftest.err
1546 fi
1547 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1548 test $ac_status = 0; } && {
1549 test -z "$ac_c_werror_flag" ||
1550 test ! -s conftest.err
1551 } && test -s conftest.$ac_objext; then :
1552 ac_retval=0
1553 else
1554 $as_echo "$as_me: failed program was:" >&5
1555 sed 's/^/| /' conftest.$ac_ext >&5
1556
1557 ac_retval=1
1558 fi
1559 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1560 as_fn_set_status $ac_retval
1561
1562 } # ac_fn_c_try_compile
1563
1564 # ac_fn_c_try_link LINENO
1565 # -----------------------
1566 # Try to link conftest.$ac_ext, and return whether this succeeded.
1567 ac_fn_c_try_link ()
1568 {
1569 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1570 rm -f conftest.$ac_objext conftest$ac_exeext
1571 if { { ac_try="$ac_link"
1572 case "(($ac_try" in
1573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1574 *) ac_try_echo=$ac_try;;
1575 esac
1576 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1577 $as_echo "$ac_try_echo"; } >&5
1578 (eval "$ac_link") 2>conftest.err
1579 ac_status=$?
1580 if test -s conftest.err; then
1581 grep -v '^ *+' conftest.err >conftest.er1
1582 cat conftest.er1 >&5
1583 mv -f conftest.er1 conftest.err
1584 fi
1585 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1586 test $ac_status = 0; } && {
1587 test -z "$ac_c_werror_flag" ||
1588 test ! -s conftest.err
1589 } && test -s conftest$ac_exeext && {
1590 test "$cross_compiling" = yes ||
1591 test -x conftest$ac_exeext
1592 }; then :
1593 ac_retval=0
1594 else
1595 $as_echo "$as_me: failed program was:" >&5
1596 sed 's/^/| /' conftest.$ac_ext >&5
1597
1598 ac_retval=1
1599 fi
1600 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1601 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1602 # interfere with the next link command; also delete a directory that is
1603 # left behind by Apple's compiler. We do this before executing the actions.
1604 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1605 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1606 as_fn_set_status $ac_retval
1607
1608 } # ac_fn_c_try_link
1609
1610 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1611 # -------------------------------------------------------
1612 # Tests whether HEADER exists and can be compiled using the include files in
1613 # INCLUDES, setting the cache variable VAR accordingly.
1614 ac_fn_c_check_header_compile ()
1615 {
1616 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1618 $as_echo_n "checking for $2... " >&6; }
1619 if eval \${$3+:} false; then :
1620 $as_echo_n "(cached) " >&6
1621 else
1622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1623 /* end confdefs.h. */
1624 $4
1625 #include <$2>
1626 _ACEOF
1627 if ac_fn_c_try_compile "$LINENO"; then :
1628 eval "$3=yes"
1629 else
1630 eval "$3=no"
1631 fi
1632 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1633 fi
1634 eval ac_res=\$$3
1635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1636 $as_echo "$ac_res" >&6; }
1637 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1638
1639 } # ac_fn_c_check_header_compile
1640
1641 # ac_fn_c_try_cpp LINENO
1642 # ----------------------
1643 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1644 ac_fn_c_try_cpp ()
1645 {
1646 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1647 if { { ac_try="$ac_cpp conftest.$ac_ext"
1648 case "(($ac_try" in
1649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1650 *) ac_try_echo=$ac_try;;
1651 esac
1652 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1653 $as_echo "$ac_try_echo"; } >&5
1654 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1655 ac_status=$?
1656 if test -s conftest.err; then
1657 grep -v '^ *+' conftest.err >conftest.er1
1658 cat conftest.er1 >&5
1659 mv -f conftest.er1 conftest.err
1660 fi
1661 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1662 test $ac_status = 0; } > conftest.i && {
1663 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1664 test ! -s conftest.err
1665 }; then :
1666 ac_retval=0
1667 else
1668 $as_echo "$as_me: failed program was:" >&5
1669 sed 's/^/| /' conftest.$ac_ext >&5
1670
1671 ac_retval=1
1672 fi
1673 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1674 as_fn_set_status $ac_retval
1675
1676 } # ac_fn_c_try_cpp
1677
1678 # ac_fn_c_try_run LINENO
1679 # ----------------------
1680 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1681 # that executables *can* be run.
1682 ac_fn_c_try_run ()
1683 {
1684 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1685 if { { ac_try="$ac_link"
1686 case "(($ac_try" in
1687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1688 *) ac_try_echo=$ac_try;;
1689 esac
1690 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1691 $as_echo "$ac_try_echo"; } >&5
1692 (eval "$ac_link") 2>&5
1693 ac_status=$?
1694 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1695 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1696 { { case "(($ac_try" in
1697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1698 *) ac_try_echo=$ac_try;;
1699 esac
1700 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1701 $as_echo "$ac_try_echo"; } >&5
1702 (eval "$ac_try") 2>&5
1703 ac_status=$?
1704 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1705 test $ac_status = 0; }; }; then :
1706 ac_retval=0
1707 else
1708 $as_echo "$as_me: program exited with status $ac_status" >&5
1709 $as_echo "$as_me: failed program was:" >&5
1710 sed 's/^/| /' conftest.$ac_ext >&5
1711
1712 ac_retval=$ac_status
1713 fi
1714 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1715 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1716 as_fn_set_status $ac_retval
1717
1718 } # ac_fn_c_try_run
1719
1720 # ac_fn_c_check_func LINENO FUNC VAR
1721 # ----------------------------------
1722 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1723 ac_fn_c_check_func ()
1724 {
1725 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1727 $as_echo_n "checking for $2... " >&6; }
1728 if eval \${$3+:} false; then :
1729 $as_echo_n "(cached) " >&6
1730 else
1731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1732 /* end confdefs.h. */
1733 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1734 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1735 #define $2 innocuous_$2
1736
1737 /* System header to define __stub macros and hopefully few prototypes,
1738 which can conflict with char $2 (); below.
1739 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1740 <limits.h> exists even on freestanding compilers. */
1741
1742 #ifdef __STDC__
1743 # include <limits.h>
1744 #else
1745 # include <assert.h>
1746 #endif
1747
1748 #undef $2
1749
1750 /* Override any GCC internal prototype to avoid an error.
1751 Use char because int might match the return type of a GCC
1752 builtin and then its argument prototype would still apply. */
1753 #ifdef __cplusplus
1754 extern "C"
1755 #endif
1756 char $2 ();
1757 /* The GNU C library defines this for functions which it implements
1758 to always fail with ENOSYS. Some functions are actually named
1759 something starting with __ and the normal name is an alias. */
1760 #if defined __stub_$2 || defined __stub___$2
1761 choke me
1762 #endif
1763
1764 int
1765 main ()
1766 {
1767 return $2 ();
1768 ;
1769 return 0;
1770 }
1771 _ACEOF
1772 if ac_fn_c_try_link "$LINENO"; then :
1773 eval "$3=yes"
1774 else
1775 eval "$3=no"
1776 fi
1777 rm -f core conftest.err conftest.$ac_objext \
1778 conftest$ac_exeext conftest.$ac_ext
1779 fi
1780 eval ac_res=\$$3
1781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1782 $as_echo "$ac_res" >&6; }
1783 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1784
1785 } # ac_fn_c_check_func
1786 cat >config.log <<_ACEOF
1787 This file contains any messages produced by compilers while
1788 running configure, to aid debugging if configure makes a mistake.
1789
1790 It was created by argyll $as_me 1.3.7, which was
1791 generated by GNU Autoconf 2.69. Invocation command line was
1792
1793 $ $0 $@
1794
1795 _ACEOF
1796 exec 5>>config.log
1797 {
1798 cat <<_ASUNAME
1799 ## --------- ##
1800 ## Platform. ##
1801 ## --------- ##
1802
1803 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1804 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1805 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1806 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1807 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1808
1809 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1810 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1811
1812 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1813 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1814 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1815 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
1816 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1817 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1818 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1819
1820 _ASUNAME
1821
1822 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1823 for as_dir in $PATH
1824 do
1825 IFS=$as_save_IFS
1826 test -z "$as_dir" && as_dir=.
1827 $as_echo "PATH: $as_dir"
1828 done
1829 IFS=$as_save_IFS
1830
1831 } >&5
1832
1833 cat >&5 <<_ACEOF
1834
1835
1836 ## ----------- ##
1837 ## Core tests. ##
1838 ## ----------- ##
1839
1840 _ACEOF
1841
1842
1843 # Keep a trace of the command line.
1844 # Strip out --no-create and --no-recursion so they do not pile up.
1845 # Strip out --silent because we don't want to record it for future runs.
1846 # Also quote any args containing shell meta-characters.
1847 # Make two passes to allow for proper duplicate-argument suppression.
1848 ac_configure_args=
1849 ac_configure_args0=
1850 ac_configure_args1=
1851 ac_must_keep_next=false
1852 for ac_pass in 1 2
1853 do
1854 for ac_arg
1855 do
1856 case $ac_arg in
1857 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1858 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1859 | -silent | --silent | --silen | --sile | --sil)
1860 continue ;;
1861 *\'*)
1862 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1863 esac
1864 case $ac_pass in
1865 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
1866 2)
1867 as_fn_append ac_configure_args1 " '$ac_arg'"
1868 if test $ac_must_keep_next = true; then
1869 ac_must_keep_next=false # Got value, back to normal.
1870 else
1871 case $ac_arg in
1872 *=* | --config-cache | -C | -disable-* | --disable-* \
1873 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1874 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1875 | -with-* | --with-* | -without-* | --without-* | --x)
1876 case "$ac_configure_args0 " in
1877 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1878 esac
1879 ;;
1880 -* ) ac_must_keep_next=true ;;
1881 esac
1882 fi
1883 as_fn_append ac_configure_args " '$ac_arg'"
1884 ;;
1885 esac
1886 done
1887 done
1888 { ac_configure_args0=; unset ac_configure_args0;}
1889 { ac_configure_args1=; unset ac_configure_args1;}
1890
1891 # When interrupted or exit'd, cleanup temporary files, and complete
1892 # config.log. We remove comments because anyway the quotes in there
1893 # would cause problems or look ugly.
1894 # WARNING: Use '\'' to represent an apostrophe within the trap.
1895 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1896 trap 'exit_status=$?
1897 # Save into config.log some information that might help in debugging.
1898 {
1899 echo
1900
1901 $as_echo "## ---------------- ##
1902 ## Cache variables. ##
1903 ## ---------------- ##"
1904 echo
1905 # The following way of writing the cache mishandles newlines in values,
1906 (
1907 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1908 eval ac_val=\$$ac_var
1909 case $ac_val in #(
1910 *${as_nl}*)
1911 case $ac_var in #(
1912 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
1913 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
1914 esac
1915 case $ac_var in #(
1916 _ | IFS | as_nl) ;; #(
1917 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
1918 *) { eval $ac_var=; unset $ac_var;} ;;
1919 esac ;;
1920 esac
1921 done
1922 (set) 2>&1 |
1923 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1924 *${as_nl}ac_space=\ *)
1925 sed -n \
1926 "s/'\''/'\''\\\\'\'''\''/g;
1927 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1928 ;; #(
1929 *)
1930 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1931 ;;
1932 esac |
1933 sort
1934 )
1935 echo
1936
1937 $as_echo "## ----------------- ##
1938 ## Output variables. ##
1939 ## ----------------- ##"
1940 echo
1941 for ac_var in $ac_subst_vars
1942 do
1943 eval ac_val=\$$ac_var
1944 case $ac_val in
1945 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1946 esac
1947 $as_echo "$ac_var='\''$ac_val'\''"
1948 done | sort
1949 echo
1950
1951 if test -n "$ac_subst_files"; then
1952 $as_echo "## ------------------- ##
1953 ## File substitutions. ##
1954 ## ------------------- ##"
1955 echo
1956 for ac_var in $ac_subst_files
1957 do
1958 eval ac_val=\$$ac_var
1959 case $ac_val in
1960 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1961 esac
1962 $as_echo "$ac_var='\''$ac_val'\''"
1963 done | sort
1964 echo
1965 fi
1966
1967 if test -s confdefs.h; then
1968 $as_echo "## ----------- ##
1969 ## confdefs.h. ##
1970 ## ----------- ##"
1971 echo
1972 cat confdefs.h
1973 echo
1974 fi
1975 test "$ac_signal" != 0 &&
1976 $as_echo "$as_me: caught signal $ac_signal"
1977 $as_echo "$as_me: exit $exit_status"
1978 } >&5
1979 rm -f core *.core core.conftest.* &&
1980 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1981 exit $exit_status
1982 ' 0
1983 for ac_signal in 1 2 13 15; do
1984 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
1985 done
1986 ac_signal=0
1987
1988 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1989 rm -f -r conftest* confdefs.h
1990
1991 $as_echo "/* confdefs.h */" > confdefs.h
1992
1993 # Predefined preprocessor variables.
1994
1995 cat >>confdefs.h <<_ACEOF
1996 #define PACKAGE_NAME "$PACKAGE_NAME"
1997 _ACEOF
1998
1999 cat >>confdefs.h <<_ACEOF
2000 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2001 _ACEOF
2002
2003 cat >>confdefs.h <<_ACEOF
2004 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2005 _ACEOF
2006
2007 cat >>confdefs.h <<_ACEOF
2008 #define PACKAGE_STRING "$PACKAGE_STRING"
2009 _ACEOF
2010
2011 cat >>confdefs.h <<_ACEOF
2012 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2013 _ACEOF
2014
2015 cat >>confdefs.h <<_ACEOF
2016 #define PACKAGE_URL "$PACKAGE_URL"
2017 _ACEOF
2018
2019
2020 # Let the site file select an alternate cache file if it wants to.
2021 # Prefer an explicitly selected file to automatically selected ones.
2022 ac_site_file1=NONE
2023 ac_site_file2=NONE
2024 if test -n "$CONFIG_SITE"; then
2025 # We do not want a PATH search for config.site.
2026 case $CONFIG_SITE in #((
2027 -*) ac_site_file1=./$CONFIG_SITE;;
2028 */*) ac_site_file1=$CONFIG_SITE;;
2029 *) ac_site_file1=./$CONFIG_SITE;;
2030 esac
2031 elif test "x$prefix" != xNONE; then
2032 ac_site_file1=$prefix/share/config.site
2033 ac_site_file2=$prefix/etc/config.site
2034 else
2035 ac_site_file1=$ac_default_prefix/share/config.site
2036 ac_site_file2=$ac_default_prefix/etc/config.site
2037 fi
2038 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2039 do
2040 test "x$ac_site_file" = xNONE && continue
2041 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2042 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2043 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2044 sed 's/^/| /' "$ac_site_file" >&5
2045 . "$ac_site_file" \
2046 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2047 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2048 as_fn_error $? "failed to load site script $ac_site_file
2049 See \`config.log' for more details" "$LINENO" 5; }
2050 fi
2051 done
2052
2053 if test -r "$cache_file"; then
2054 # Some versions of bash will fail to source /dev/null (special files
2055 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2056 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2057 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2058 $as_echo "$as_me: loading cache $cache_file" >&6;}
2059 case $cache_file in
2060 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2061 *) . "./$cache_file";;
2062 esac
2063 fi
2064 else
2065 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2066 $as_echo "$as_me: creating cache $cache_file" >&6;}
2067 >$cache_file
2068 fi
2069
2070 # Check that the precious variables saved in the cache have kept the same
2071 # value.
2072 ac_cache_corrupted=false
2073 for ac_var in $ac_precious_vars; do
2074 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2075 eval ac_new_set=\$ac_env_${ac_var}_set
2076 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2077 eval ac_new_val=\$ac_env_${ac_var}_value
2078 case $ac_old_set,$ac_new_set in
2079 set,)
2080 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2081 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2082 ac_cache_corrupted=: ;;
2083 ,set)
2084 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2085 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2086 ac_cache_corrupted=: ;;
2087 ,);;
2088 *)
2089 if test "x$ac_old_val" != "x$ac_new_val"; then
2090 # differences in whitespace do not lead to failure.
2091 ac_old_val_w=`echo x $ac_old_val`
2092 ac_new_val_w=`echo x $ac_new_val`
2093 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2094 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2095 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2096 ac_cache_corrupted=:
2097 else
2098 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2099 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2100 eval $ac_var=\$ac_old_val
2101 fi
2102 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2103 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2104 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2105 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2106 fi;;
2107 esac
2108 # Pass precious variables to config.status.
2109 if test "$ac_new_set" = set; then
2110 case $ac_new_val in
2111 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2112 *) ac_arg=$ac_var=$ac_new_val ;;
2113 esac
2114 case " $ac_configure_args " in
2115 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2116 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2117 esac
2118 fi
2119 done
2120 if $ac_cache_corrupted; then
2121 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2122 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2123 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2124 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2125 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2126 fi
2127 ## -------------------- ##
2128 ## Main body of script. ##
2129 ## -------------------- ##
2130
2131 ac_ext=c
2132 ac_cpp='$CPP $CPPFLAGS'
2133 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2134 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2135 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2136
2137
2138 am__api_version='1.13'
2139
2140 ac_aux_dir=
2141 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2142 if test -f "$ac_dir/install-sh"; then
2143 ac_aux_dir=$ac_dir
2144 ac_install_sh="$ac_aux_dir/install-sh -c"
2145 break
2146 elif test -f "$ac_dir/install.sh"; then
2147 ac_aux_dir=$ac_dir
2148 ac_install_sh="$ac_aux_dir/install.sh -c"
2149 break
2150 elif test -f "$ac_dir/shtool"; then
2151 ac_aux_dir=$ac_dir
2152 ac_install_sh="$ac_aux_dir/shtool install -c"
2153 break
2154 fi
2155 done
2156 if test -z "$ac_aux_dir"; then
2157 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2158 fi
2159
2160 # These three variables are undocumented and unsupported,
2161 # and are intended to be withdrawn in a future Autoconf release.
2162 # They can cause serious problems if a builder's source tree is in a directory
2163 # whose full name contains unusual characters.
2164 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2165 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2166 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2167
2168
2169 # Find a good install program. We prefer a C program (faster),
2170 # so one script is as good as another. But avoid the broken or
2171 # incompatible versions:
2172 # SysV /etc/install, /usr/sbin/install
2173 # SunOS /usr/etc/install
2174 # IRIX /sbin/install
2175 # AIX /bin/install
2176 # AmigaOS /C/install, which installs bootblocks on floppy discs
2177 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2178 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2179 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2180 # OS/2's system install, which has a completely different semantic
2181 # ./install, which can be erroneously created by make from ./install.sh.
2182 # Reject install programs that cannot install multiple files.
2183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
2184 $as_echo_n "checking for a BSD-compatible install... " >&6; }
2185 if test -z "$INSTALL"; then
2186 if ${ac_cv_path_install+:} false; then :
2187 $as_echo_n "(cached) " >&6
2188 else
2189 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2190 for as_dir in $PATH
2191 do
2192 IFS=$as_save_IFS
2193 test -z "$as_dir" && as_dir=.
2194 # Account for people who put trailing slashes in PATH elements.
2195 case $as_dir/ in #((
2196 ./ | .// | /[cC]/* | \
2197 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
2198 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
2199 /usr/ucb/* ) ;;
2200 *)
2201 # OSF1 and SCO ODT 3.0 have their own names for install.
2202 # Don't use installbsd from OSF since it installs stuff as root
2203 # by default.
2204 for ac_prog in ginstall scoinst install; do
2205 for ac_exec_ext in '' $ac_executable_extensions; do
2206 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
2207 if test $ac_prog = install &&
2208 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2209 # AIX install. It has an incompatible calling convention.
2210 :
2211 elif test $ac_prog = install &&
2212 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2213 # program-specific install script used by HP pwplus--don't use.
2214 :
2215 else
2216 rm -rf conftest.one conftest.two conftest.dir
2217 echo one > conftest.one
2218 echo two > conftest.two
2219 mkdir conftest.dir
2220 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
2221 test -s conftest.one && test -s conftest.two &&
2222 test -s conftest.dir/conftest.one &&
2223 test -s conftest.dir/conftest.two
2224 then
2225 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
2226 break 3
2227 fi
2228 fi
2229 fi
2230 done
2231 done
2232 ;;
2233 esac
2234
2235 done
2236 IFS=$as_save_IFS
2237
2238 rm -rf conftest.one conftest.two conftest.dir
2239
2240 fi
2241 if test "${ac_cv_path_install+set}" = set; then
2242 INSTALL=$ac_cv_path_install
2243 else
2244 # As a last resort, use the slow shell script. Don't cache a
2245 # value for INSTALL within a source directory, because that will
2246 # break other packages using the cache if that directory is
2247 # removed, or if the value is a relative name.
2248 INSTALL=$ac_install_sh
2249 fi
2250 fi
2251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
2252 $as_echo "$INSTALL" >&6; }
2253
2254 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2255 # It thinks the first close brace ends the variable substitution.
2256 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2257
2258 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2259
2260 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2261
2262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
2263 $as_echo_n "checking whether build environment is sane... " >&6; }
2264 # Reject unsafe characters in $srcdir or the absolute working directory
2265 # name. Accept space and tab only in the latter.
2266 am_lf='
2267 '
2268 case `pwd` in
2269 *[\\\"\#\$\&\'\`$am_lf]*)
2270 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
2271 esac
2272 case $srcdir in
2273 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
2274 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
2275 esac
2276
2277 # Do 'set' in a subshell so we don't clobber the current shell's
2278 # arguments. Must try -L first in case configure is actually a
2279 # symlink; some systems play weird games with the mod time of symlinks
2280 # (eg FreeBSD returns the mod time of the symlink's containing
2281 # directory).
2282 if (
2283 am_has_slept=no
2284 for am_try in 1 2; do
2285 echo "timestamp, slept: $am_has_slept" > conftest.file
2286 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
2287 if test "$*" = "X"; then
2288 # -L didn't work.
2289 set X `ls -t "$srcdir/configure" conftest.file`
2290 fi
2291 if test "$*" != "X $srcdir/configure conftest.file" \
2292 && test "$*" != "X conftest.file $srcdir/configure"; then
2293
2294 # If neither matched, then we have a broken ls. This can happen
2295 # if, for instance, CONFIG_SHELL is bash and it inherits a
2296 # broken ls alias from the environment. This has actually
2297 # happened. Such a system could not be considered "sane".
2298 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
2299 alias in your environment" "$LINENO" 5
2300 fi
2301 if test "$2" = conftest.file || test $am_try -eq 2; then
2302 break
2303 fi
2304 # Just in case.
2305 sleep 1
2306 am_has_slept=yes
2307 done
2308 test "$2" = conftest.file
2309 )
2310 then
2311 # Ok.
2312 :
2313 else
2314 as_fn_error $? "newly created file is older than distributed files!
2315 Check your system clock" "$LINENO" 5
2316 fi
2317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2318 $as_echo "yes" >&6; }
2319 # If we didn't sleep, we still need to ensure time stamps of config.status and
2320 # generated files are strictly newer.
2321 am_sleep_pid=
2322 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
2323 ( sleep 1 ) &
2324 am_sleep_pid=$!
2325 fi
2326
2327 rm -f conftest.file
2328
2329 test "$program_prefix" != NONE &&
2330 program_transform_name="s&^&$program_prefix&;$program_transform_name"
2331 # Use a double $ so make ignores it.
2332 test "$program_suffix" != NONE &&
2333 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
2334 # Double any \ or $.
2335 # By default was `s,x,x', remove it if useless.
2336 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
2337 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
2338
2339 # expand $ac_aux_dir to an absolute path
2340 am_aux_dir=`cd $ac_aux_dir && pwd`
2341
2342 if test x"${MISSING+set}" != xset; then
2343 case $am_aux_dir in
2344 *\ * | *\ *)
2345 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
2346 *)
2347 MISSING="\${SHELL} $am_aux_dir/missing" ;;
2348 esac
2349 fi
2350 # Use eval to expand $SHELL
2351 if eval "$MISSING --is-lightweight"; then
2352 am_missing_run="$MISSING "
2353 else
2354 am_missing_run=
2355 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
2356 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
2357 fi
2358
2359 if test x"${install_sh}" != xset; then
2360 case $am_aux_dir in
2361 *\ * | *\ *)
2362 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
2363 *)
2364 install_sh="\${SHELL} $am_aux_dir/install-sh"
2365 esac
2366 fi
2367
2368 # Installed binaries are usually stripped using 'strip' when the user
2369 # run "make install-strip". However 'strip' might not be the right
2370 # tool to use in cross-compilation environments, therefore Automake
2371 # will honor the 'STRIP' environment variable to overrule this program.
2372 if test "$cross_compiling" != no; then
2373 if test -n "$ac_tool_prefix"; then
2374 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
2375 set dummy ${ac_tool_prefix}strip; ac_word=$2
2376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2377 $as_echo_n "checking for $ac_word... " >&6; }
2378 if ${ac_cv_prog_STRIP+:} false; then :
2379 $as_echo_n "(cached) " >&6
2380 else
2381 if test -n "$STRIP"; then
2382 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2383 else
2384 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2385 for as_dir in $PATH
2386 do
2387 IFS=$as_save_IFS
2388 test -z "$as_dir" && as_dir=.
2389 for ac_exec_ext in '' $ac_executable_extensions; do
2390 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2391 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2392 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2393 break 2
2394 fi
2395 done
2396 done
2397 IFS=$as_save_IFS
2398
2399 fi
2400 fi
2401 STRIP=$ac_cv_prog_STRIP
2402 if test -n "$STRIP"; then
2403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
2404 $as_echo "$STRIP" >&6; }
2405 else
2406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2407 $as_echo "no" >&6; }
2408 fi
2409
2410
2411 fi
2412 if test -z "$ac_cv_prog_STRIP"; then
2413 ac_ct_STRIP=$STRIP
2414 # Extract the first word of "strip", so it can be a program name with args.
2415 set dummy strip; ac_word=$2
2416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2417 $as_echo_n "checking for $ac_word... " >&6; }
2418 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
2419 $as_echo_n "(cached) " >&6
2420 else
2421 if test -n "$ac_ct_STRIP"; then
2422 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
2423 else
2424 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2425 for as_dir in $PATH
2426 do
2427 IFS=$as_save_IFS
2428 test -z "$as_dir" && as_dir=.
2429 for ac_exec_ext in '' $ac_executable_extensions; do
2430 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2431 ac_cv_prog_ac_ct_STRIP="strip"
2432 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2433 break 2
2434 fi
2435 done
2436 done
2437 IFS=$as_save_IFS
2438
2439 fi
2440 fi
2441 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
2442 if test -n "$ac_ct_STRIP"; then
2443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
2444 $as_echo "$ac_ct_STRIP" >&6; }
2445 else
2446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2447 $as_echo "no" >&6; }
2448 fi
2449
2450 if test "x$ac_ct_STRIP" = x; then
2451 STRIP=":"
2452 else
2453 case $cross_compiling:$ac_tool_warned in
2454 yes:)
2455 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2456 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2457 ac_tool_warned=yes ;;
2458 esac
2459 STRIP=$ac_ct_STRIP
2460 fi
2461 else
2462 STRIP="$ac_cv_prog_STRIP"
2463 fi
2464
2465 fi
2466 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
2467
2468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
2469 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
2470 if test -z "$MKDIR_P"; then
2471 if ${ac_cv_path_mkdir+:} false; then :
2472 $as_echo_n "(cached) " >&6
2473 else
2474 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2475 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
2476 do
2477 IFS=$as_save_IFS
2478 test -z "$as_dir" && as_dir=.
2479 for ac_prog in mkdir gmkdir; do
2480 for ac_exec_ext in '' $ac_executable_extensions; do
2481 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
2482 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
2483 'mkdir (GNU coreutils) '* | \
2484 'mkdir (coreutils) '* | \
2485 'mkdir (fileutils) '4.1*)
2486 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
2487 break 3;;
2488 esac
2489 done
2490 done
2491 done
2492 IFS=$as_save_IFS
2493
2494 fi
2495
2496 test -d ./--version && rmdir ./--version
2497 if test "${ac_cv_path_mkdir+set}" = set; then
2498 MKDIR_P="$ac_cv_path_mkdir -p"
2499 else
2500 # As a last resort, use the slow shell script. Don't cache a
2501 # value for MKDIR_P within a source directory, because that will
2502 # break other packages using the cache if that directory is
2503 # removed, or if the value is a relative name.
2504 MKDIR_P="$ac_install_sh -d"
2505 fi
2506 fi
2507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
2508 $as_echo "$MKDIR_P" >&6; }
2509
2510 for ac_prog in gawk mawk nawk awk
2511 do
2512 # Extract the first word of "$ac_prog", so it can be a program name with args.
2513 set dummy $ac_prog; ac_word=$2
2514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2515 $as_echo_n "checking for $ac_word... " >&6; }
2516 if ${ac_cv_prog_AWK+:} false; then :
2517 $as_echo_n "(cached) " >&6
2518 else
2519 if test -n "$AWK"; then
2520 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2521 else
2522 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2523 for as_dir in $PATH
2524 do
2525 IFS=$as_save_IFS
2526 test -z "$as_dir" && as_dir=.
2527 for ac_exec_ext in '' $ac_executable_extensions; do
2528 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2529 ac_cv_prog_AWK="$ac_prog"
2530 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2531 break 2
2532 fi
2533 done
2534 done
2535 IFS=$as_save_IFS
2536
2537 fi
2538 fi
2539 AWK=$ac_cv_prog_AWK
2540 if test -n "$AWK"; then
2541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
2542 $as_echo "$AWK" >&6; }
2543 else
2544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2545 $as_echo "no" >&6; }
2546 fi
2547
2548
2549 test -n "$AWK" && break
2550 done
2551
2552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
2553 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
2554 set x ${MAKE-make}
2555 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
2556 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
2557 $as_echo_n "(cached) " >&6
2558 else
2559 cat >conftest.make <<\_ACEOF
2560 SHELL = /bin/sh
2561 all:
2562 @echo '@@@%%%=$(MAKE)=@@@%%%'
2563 _ACEOF
2564 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
2565 case `${MAKE-make} -f conftest.make 2>/dev/null` in
2566 *@@@%%%=?*=@@@%%%*)
2567 eval ac_cv_prog_make_${ac_make}_set=yes;;
2568 *)
2569 eval ac_cv_prog_make_${ac_make}_set=no;;
2570 esac
2571 rm -f conftest.make
2572 fi
2573 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
2574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2575 $as_echo "yes" >&6; }
2576 SET_MAKE=
2577 else
2578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2579 $as_echo "no" >&6; }
2580 SET_MAKE="MAKE=${MAKE-make}"
2581 fi
2582
2583 rm -rf .tst 2>/dev/null
2584 mkdir .tst 2>/dev/null
2585 if test -d .tst; then
2586 am__leading_dot=.
2587 else
2588 am__leading_dot=_
2589 fi
2590 rmdir .tst 2>/dev/null
2591
2592 # Check whether --enable-silent-rules was given.
2593 if test "${enable_silent_rules+set}" = set; then :
2594 enableval=$enable_silent_rules;
2595 fi
2596
2597 case $enable_silent_rules in # (((
2598 yes) AM_DEFAULT_VERBOSITY=0;;
2599 no) AM_DEFAULT_VERBOSITY=1;;
2600 *) AM_DEFAULT_VERBOSITY=1;;
2601 esac
2602 am_make=${MAKE-make}
2603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
2604 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
2605 if ${am_cv_make_support_nested_variables+:} false; then :
2606 $as_echo_n "(cached) " >&6
2607 else
2608 if $as_echo 'TRUE=$(BAR$(V))
2609 BAR0=false
2610 BAR1=true
2611 V=1
2612 am__doit:
2613 @$(TRUE)
2614 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
2615 am_cv_make_support_nested_variables=yes
2616 else
2617 am_cv_make_support_nested_variables=no
2618 fi
2619 fi
2620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
2621 $as_echo "$am_cv_make_support_nested_variables" >&6; }
2622 if test $am_cv_make_support_nested_variables = yes; then
2623 AM_V='$(V)'
2624 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
2625 else
2626 AM_V=$AM_DEFAULT_VERBOSITY
2627 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
2628 fi
2629 AM_BACKSLASH='\'
2630
2631 if test "`cd $srcdir && pwd`" != "`pwd`"; then
2632 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
2633 # is not polluted with repeated "-I."
2634 am__isrc=' -I$(srcdir)'
2635 # test to see if srcdir already configured
2636 if test -f $srcdir/config.status; then
2637 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
2638 fi
2639 fi
2640
2641 # test whether we have cygpath
2642 if test -z "$CYGPATH_W"; then
2643 if (cygpath --version) >/dev/null 2>/dev/null; then
2644 CYGPATH_W='cygpath -w'
2645 else
2646 CYGPATH_W=echo
2647 fi
2648 fi
2649
2650
2651 # Define the identity of the package.
2652 PACKAGE='argyll'
2653 VERSION='1.3.7'
2654
2655
2656 cat >>confdefs.h <<_ACEOF
2657 #define PACKAGE "$PACKAGE"
2658 _ACEOF
2659
2660
2661 cat >>confdefs.h <<_ACEOF
2662 #define VERSION "$VERSION"
2663 _ACEOF
2664
2665 # Some tools Automake needs.
2666
2667 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
2668
2669
2670 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
2671
2672
2673 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
2674
2675
2676 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
2677
2678
2679 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
2680
2681 # For better backward compatibility. To be removed once Automake 1.9.x
2682 # dies out for good. For more background, see:
2683 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
2684 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
2685 mkdir_p='$(MKDIR_P)'
2686
2687 # We need awk for the "check" target. The system "awk" is bad on
2688 # some platforms.
2689 # Always define AMTAR for backward compatibility. Yes, it's still used
2690 # in the wild :-( We should find a proper way to deprecate it ...
2691 AMTAR='$${TAR-tar}'
2692
2693
2694 # We'll loop over all known methods to create a tar archive until one works.
2695 _am_tools='gnutar pax cpio none'
2696
2697 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
2698
2699
2700
2701
2702
2703
2704
2705 ac_ext=c
2706 ac_cpp='$CPP $CPPFLAGS'
2707 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2708 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2709 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2710 if test -n "$ac_tool_prefix"; then
2711 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2712 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2714 $as_echo_n "checking for $ac_word... " >&6; }
2715 if ${ac_cv_prog_CC+:} false; then :
2716 $as_echo_n "(cached) " >&6
2717 else
2718 if test -n "$CC"; then
2719 ac_cv_prog_CC="$CC" # Let the user override the test.
2720 else
2721 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2722 for as_dir in $PATH
2723 do
2724 IFS=$as_save_IFS
2725 test -z "$as_dir" && as_dir=.
2726 for ac_exec_ext in '' $ac_executable_extensions; do
2727 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2728 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2729 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2730 break 2
2731 fi
2732 done
2733 done
2734 IFS=$as_save_IFS
2735
2736 fi
2737 fi
2738 CC=$ac_cv_prog_CC
2739 if test -n "$CC"; then
2740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2741 $as_echo "$CC" >&6; }
2742 else
2743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2744 $as_echo "no" >&6; }
2745 fi
2746
2747
2748 fi
2749 if test -z "$ac_cv_prog_CC"; then
2750 ac_ct_CC=$CC
2751 # Extract the first word of "gcc", so it can be a program name with args.
2752 set dummy gcc; ac_word=$2
2753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2754 $as_echo_n "checking for $ac_word... " >&6; }
2755 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2756 $as_echo_n "(cached) " >&6
2757 else
2758 if test -n "$ac_ct_CC"; then
2759 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2760 else
2761 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2762 for as_dir in $PATH
2763 do
2764 IFS=$as_save_IFS
2765 test -z "$as_dir" && as_dir=.
2766 for ac_exec_ext in '' $ac_executable_extensions; do
2767 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2768 ac_cv_prog_ac_ct_CC="gcc"
2769 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2770 break 2
2771 fi
2772 done
2773 done
2774 IFS=$as_save_IFS
2775
2776 fi
2777 fi
2778 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2779 if test -n "$ac_ct_CC"; then
2780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2781 $as_echo "$ac_ct_CC" >&6; }
2782 else
2783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2784 $as_echo "no" >&6; }
2785 fi
2786
2787 if test "x$ac_ct_CC" = x; then
2788 CC=""
2789 else
2790 case $cross_compiling:$ac_tool_warned in
2791 yes:)
2792 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2793 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2794 ac_tool_warned=yes ;;
2795 esac
2796 CC=$ac_ct_CC
2797 fi
2798 else
2799 CC="$ac_cv_prog_CC"
2800 fi
2801
2802 if test -z "$CC"; then
2803 if test -n "$ac_tool_prefix"; then
2804 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2805 set dummy ${ac_tool_prefix}cc; ac_word=$2
2806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2807 $as_echo_n "checking for $ac_word... " >&6; }
2808 if ${ac_cv_prog_CC+:} false; then :
2809 $as_echo_n "(cached) " >&6
2810 else
2811 if test -n "$CC"; then
2812 ac_cv_prog_CC="$CC" # Let the user override the test.
2813 else
2814 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2815 for as_dir in $PATH
2816 do
2817 IFS=$as_save_IFS
2818 test -z "$as_dir" && as_dir=.
2819 for ac_exec_ext in '' $ac_executable_extensions; do
2820 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2821 ac_cv_prog_CC="${ac_tool_prefix}cc"
2822 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2823 break 2
2824 fi
2825 done
2826 done
2827 IFS=$as_save_IFS
2828
2829 fi
2830 fi
2831 CC=$ac_cv_prog_CC
2832 if test -n "$CC"; then
2833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2834 $as_echo "$CC" >&6; }
2835 else
2836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2837 $as_echo "no" >&6; }
2838 fi
2839
2840
2841 fi
2842 fi
2843 if test -z "$CC"; then
2844 # Extract the first word of "cc", so it can be a program name with args.
2845 set dummy cc; ac_word=$2
2846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2847 $as_echo_n "checking for $ac_word... " >&6; }
2848 if ${ac_cv_prog_CC+:} false; then :
2849 $as_echo_n "(cached) " >&6
2850 else
2851 if test -n "$CC"; then
2852 ac_cv_prog_CC="$CC" # Let the user override the test.
2853 else
2854 ac_prog_rejected=no
2855 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2856 for as_dir in $PATH
2857 do
2858 IFS=$as_save_IFS
2859 test -z "$as_dir" && as_dir=.
2860 for ac_exec_ext in '' $ac_executable_extensions; do
2861 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2862 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2863 ac_prog_rejected=yes
2864 continue
2865 fi
2866 ac_cv_prog_CC="cc"
2867 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2868 break 2
2869 fi
2870 done
2871 done
2872 IFS=$as_save_IFS
2873
2874 if test $ac_prog_rejected = yes; then
2875 # We found a bogon in the path, so make sure we never use it.
2876 set dummy $ac_cv_prog_CC
2877 shift
2878 if test $# != 0; then
2879 # We chose a different compiler from the bogus one.
2880 # However, it has the same basename, so the bogon will be chosen
2881 # first if we set CC to just the basename; use the full file name.
2882 shift
2883 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2884 fi
2885 fi
2886 fi
2887 fi
2888 CC=$ac_cv_prog_CC
2889 if test -n "$CC"; then
2890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2891 $as_echo "$CC" >&6; }
2892 else
2893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2894 $as_echo "no" >&6; }
2895 fi
2896
2897
2898 fi
2899 if test -z "$CC"; then
2900 if test -n "$ac_tool_prefix"; then
2901 for ac_prog in cl.exe
2902 do
2903 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2904 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2906 $as_echo_n "checking for $ac_word... " >&6; }
2907 if ${ac_cv_prog_CC+:} false; then :
2908 $as_echo_n "(cached) " >&6
2909 else
2910 if test -n "$CC"; then
2911 ac_cv_prog_CC="$CC" # Let the user override the test.
2912 else
2913 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2914 for as_dir in $PATH
2915 do
2916 IFS=$as_save_IFS
2917 test -z "$as_dir" && as_dir=.
2918 for ac_exec_ext in '' $ac_executable_extensions; do
2919 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2920 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2921 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2922 break 2
2923 fi
2924 done
2925 done
2926 IFS=$as_save_IFS
2927
2928 fi
2929 fi
2930 CC=$ac_cv_prog_CC
2931 if test -n "$CC"; then
2932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2933 $as_echo "$CC" >&6; }
2934 else
2935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2936 $as_echo "no" >&6; }
2937 fi
2938
2939
2940 test -n "$CC" && break
2941 done
2942 fi
2943 if test -z "$CC"; then
2944 ac_ct_CC=$CC
2945 for ac_prog in cl.exe
2946 do
2947 # Extract the first word of "$ac_prog", so it can be a program name with args.
2948 set dummy $ac_prog; ac_word=$2
2949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2950 $as_echo_n "checking for $ac_word... " >&6; }
2951 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2952 $as_echo_n "(cached) " >&6
2953 else
2954 if test -n "$ac_ct_CC"; then
2955 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2956 else
2957 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2958 for as_dir in $PATH
2959 do
2960 IFS=$as_save_IFS
2961 test -z "$as_dir" && as_dir=.
2962 for ac_exec_ext in '' $ac_executable_extensions; do
2963 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2964 ac_cv_prog_ac_ct_CC="$ac_prog"
2965 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2966 break 2
2967 fi
2968 done
2969 done
2970 IFS=$as_save_IFS
2971
2972 fi
2973 fi
2974 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2975 if test -n "$ac_ct_CC"; then
2976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2977 $as_echo "$ac_ct_CC" >&6; }
2978 else
2979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2980 $as_echo "no" >&6; }
2981 fi
2982
2983
2984 test -n "$ac_ct_CC" && break
2985 done
2986
2987 if test "x$ac_ct_CC" = x; then
2988 CC=""
2989 else
2990 case $cross_compiling:$ac_tool_warned in
2991 yes:)
2992 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2993 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2994 ac_tool_warned=yes ;;
2995 esac
2996 CC=$ac_ct_CC
2997 fi
2998 fi
2999
3000 fi
3001
3002
3003 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3004 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3005 as_fn_error $? "no acceptable C compiler found in \$PATH
3006 See \`config.log' for more details" "$LINENO" 5; }
3007
3008 # Provide some information about the compiler.
3009 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3010 set X $ac_compile
3011 ac_compiler=$2
3012 for ac_option in --version -v -V -qversion; do
3013 { { ac_try="$ac_compiler $ac_option >&5"
3014 case "(($ac_try" in
3015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3016 *) ac_try_echo=$ac_try;;
3017 esac
3018 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3019 $as_echo "$ac_try_echo"; } >&5
3020 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3021 ac_status=$?
3022 if test -s conftest.err; then
3023 sed '10a\
3024 ... rest of stderr output deleted ...
3025 10q' conftest.err >conftest.er1
3026 cat conftest.er1 >&5
3027 fi
3028 rm -f conftest.er1 conftest.err
3029 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3030 test $ac_status = 0; }
3031 done
3032
3033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3034 /* end confdefs.h. */
3035
3036 int
3037 main ()
3038 {
3039
3040 ;
3041 return 0;
3042 }
3043 _ACEOF
3044 ac_clean_files_save=$ac_clean_files
3045 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3046 # Try to create an executable without -o first, disregard a.out.
3047 # It will help us diagnose broken compilers, and finding out an intuition
3048 # of exeext.
3049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3050 $as_echo_n "checking whether the C compiler works... " >&6; }
3051 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3052
3053 # The possible output files:
3054 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3055
3056 ac_rmfiles=
3057 for ac_file in $ac_files
3058 do
3059 case $ac_file in
3060 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3061 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3062 esac
3063 done
3064 rm -f $ac_rmfiles
3065
3066 if { { ac_try="$ac_link_default"
3067 case "(($ac_try" in
3068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3069 *) ac_try_echo=$ac_try;;
3070 esac
3071 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3072 $as_echo "$ac_try_echo"; } >&5
3073 (eval "$ac_link_default") 2>&5
3074 ac_status=$?
3075 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3076 test $ac_status = 0; }; then :
3077 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3078 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3079 # in a Makefile. We should not override ac_cv_exeext if it was cached,
3080 # so that the user can short-circuit this test for compilers unknown to
3081 # Autoconf.
3082 for ac_file in $ac_files ''
3083 do
3084 test -f "$ac_file" || continue
3085 case $ac_file in
3086 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3087 ;;
3088 [ab].out )
3089 # We found the default executable, but exeext='' is most
3090 # certainly right.
3091 break;;
3092 *.* )
3093 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3094 then :; else
3095 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3096 fi
3097 # We set ac_cv_exeext here because the later test for it is not
3098 # safe: cross compilers may not add the suffix if given an `-o'
3099 # argument, so we may need to know it at that point already.
3100 # Even if this section looks crufty: it has the advantage of
3101 # actually working.
3102 break;;
3103 * )
3104 break;;
3105 esac
3106 done
3107 test "$ac_cv_exeext" = no && ac_cv_exeext=
3108
3109 else
3110 ac_file=''
3111 fi
3112 if test -z "$ac_file"; then :
3113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3114 $as_echo "no" >&6; }
3115 $as_echo "$as_me: failed program was:" >&5
3116 sed 's/^/| /' conftest.$ac_ext >&5
3117
3118 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3119 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3120 as_fn_error 77 "C compiler cannot create executables
3121 See \`config.log' for more details" "$LINENO" 5; }
3122 else
3123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3124 $as_echo "yes" >&6; }
3125 fi
3126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3127 $as_echo_n "checking for C compiler default output file name... " >&6; }
3128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3129 $as_echo "$ac_file" >&6; }
3130 ac_exeext=$ac_cv_exeext
3131
3132 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3133 ac_clean_files=$ac_clean_files_save
3134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3135 $as_echo_n "checking for suffix of executables... " >&6; }
3136 if { { ac_try="$ac_link"
3137 case "(($ac_try" in
3138 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3139 *) ac_try_echo=$ac_try;;
3140 esac
3141 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3142 $as_echo "$ac_try_echo"; } >&5
3143 (eval "$ac_link") 2>&5
3144 ac_status=$?
3145 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3146 test $ac_status = 0; }; then :
3147 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3148 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3149 # work properly (i.e., refer to `conftest.exe'), while it won't with
3150 # `rm'.
3151 for ac_file in conftest.exe conftest conftest.*; do
3152 test -f "$ac_file" || continue
3153 case $ac_file in
3154 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3155 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3156 break;;
3157 * ) break;;
3158 esac
3159 done
3160 else
3161 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3162 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3163 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3164 See \`config.log' for more details" "$LINENO" 5; }
3165 fi
3166 rm -f conftest conftest$ac_cv_exeext
3167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3168 $as_echo "$ac_cv_exeext" >&6; }
3169
3170 rm -f conftest.$ac_ext
3171 EXEEXT=$ac_cv_exeext
3172 ac_exeext=$EXEEXT
3173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3174 /* end confdefs.h. */
3175 #include <stdio.h>
3176 int
3177 main ()
3178 {
3179 FILE *f = fopen ("conftest.out", "w");
3180 return ferror (f) || fclose (f) != 0;
3181
3182 ;
3183 return 0;
3184 }
3185 _ACEOF
3186 ac_clean_files="$ac_clean_files conftest.out"
3187 # Check that the compiler produces executables we can run. If not, either
3188 # the compiler is broken, or we cross compile.
3189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3190 $as_echo_n "checking whether we are cross compiling... " >&6; }
3191 if test "$cross_compiling" != yes; then
3192 { { ac_try="$ac_link"
3193 case "(($ac_try" in
3194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3195 *) ac_try_echo=$ac_try;;
3196 esac
3197 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3198 $as_echo "$ac_try_echo"; } >&5
3199 (eval "$ac_link") 2>&5
3200 ac_status=$?
3201 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3202 test $ac_status = 0; }
3203 if { ac_try='./conftest$ac_cv_exeext'
3204 { { case "(($ac_try" in
3205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3206 *) ac_try_echo=$ac_try;;
3207 esac
3208 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3209 $as_echo "$ac_try_echo"; } >&5
3210 (eval "$ac_try") 2>&5
3211 ac_status=$?
3212 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3213 test $ac_status = 0; }; }; then
3214 cross_compiling=no
3215 else
3216 if test "$cross_compiling" = maybe; then
3217 cross_compiling=yes
3218 else
3219 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3220 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3221 as_fn_error $? "cannot run C compiled programs.
3222 If you meant to cross compile, use \`--host'.
3223 See \`config.log' for more details" "$LINENO" 5; }
3224 fi
3225 fi
3226 fi
3227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3228 $as_echo "$cross_compiling" >&6; }
3229
3230 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3231 ac_clean_files=$ac_clean_files_save
3232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3233 $as_echo_n "checking for suffix of object files... " >&6; }
3234 if ${ac_cv_objext+:} false; then :
3235 $as_echo_n "(cached) " >&6
3236 else
3237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3238 /* end confdefs.h. */
3239
3240 int
3241 main ()
3242 {
3243
3244 ;
3245 return 0;
3246 }
3247 _ACEOF
3248 rm -f conftest.o conftest.obj
3249 if { { ac_try="$ac_compile"
3250 case "(($ac_try" in
3251 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3252 *) ac_try_echo=$ac_try;;
3253 esac
3254 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3255 $as_echo "$ac_try_echo"; } >&5
3256 (eval "$ac_compile") 2>&5
3257 ac_status=$?
3258 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3259 test $ac_status = 0; }; then :
3260 for ac_file in conftest.o conftest.obj conftest.*; do
3261 test -f "$ac_file" || continue;
3262 case $ac_file in
3263 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3264 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3265 break;;
3266 esac
3267 done
3268 else
3269 $as_echo "$as_me: failed program was:" >&5
3270 sed 's/^/| /' conftest.$ac_ext >&5
3271
3272 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3273 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3274 as_fn_error $? "cannot compute suffix of object files: cannot compile
3275 See \`config.log' for more details" "$LINENO" 5; }
3276 fi
3277 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3278 fi
3279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3280 $as_echo "$ac_cv_objext" >&6; }
3281 OBJEXT=$ac_cv_objext
3282 ac_objext=$OBJEXT
3283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3284 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3285 if ${ac_cv_c_compiler_gnu+:} false; then :
3286 $as_echo_n "(cached) " >&6
3287 else
3288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3289 /* end confdefs.h. */
3290
3291 int
3292 main ()
3293 {
3294 #ifndef __GNUC__
3295 choke me
3296 #endif
3297
3298 ;
3299 return 0;
3300 }
3301 _ACEOF
3302 if ac_fn_c_try_compile "$LINENO"; then :
3303 ac_compiler_gnu=yes
3304 else
3305 ac_compiler_gnu=no
3306 fi
3307 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3308 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3309
3310 fi
3311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3312 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3313 if test $ac_compiler_gnu = yes; then
3314 GCC=yes
3315 else
3316 GCC=
3317 fi
3318 ac_test_CFLAGS=${CFLAGS+set}
3319 ac_save_CFLAGS=$CFLAGS
3320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3321 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3322 if ${ac_cv_prog_cc_g+:} false; then :
3323 $as_echo_n "(cached) " >&6
3324 else
3325 ac_save_c_werror_flag=$ac_c_werror_flag
3326 ac_c_werror_flag=yes
3327 ac_cv_prog_cc_g=no
3328 CFLAGS="-g"
3329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3330 /* end confdefs.h. */
3331
3332 int
3333 main ()
3334 {
3335
3336 ;
3337 return 0;
3338 }
3339 _ACEOF
3340 if ac_fn_c_try_compile "$LINENO"; then :
3341 ac_cv_prog_cc_g=yes
3342 else
3343 CFLAGS=""
3344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3345 /* end confdefs.h. */
3346
3347 int
3348 main ()
3349 {
3350
3351 ;
3352 return 0;
3353 }
3354 _ACEOF
3355 if ac_fn_c_try_compile "$LINENO"; then :
3356
3357 else
3358 ac_c_werror_flag=$ac_save_c_werror_flag
3359 CFLAGS="-g"
3360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3361 /* end confdefs.h. */
3362
3363 int
3364 main ()
3365 {
3366
3367 ;
3368 return 0;
3369 }
3370 _ACEOF
3371 if ac_fn_c_try_compile "$LINENO"; then :
3372 ac_cv_prog_cc_g=yes
3373 fi
3374 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3375 fi
3376 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3377 fi
3378 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3379 ac_c_werror_flag=$ac_save_c_werror_flag
3380 fi
3381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3382 $as_echo "$ac_cv_prog_cc_g" >&6; }
3383 if test "$ac_test_CFLAGS" = set; then
3384 CFLAGS=$ac_save_CFLAGS
3385 elif test $ac_cv_prog_cc_g = yes; then
3386 if test "$GCC" = yes; then
3387 CFLAGS="-g -O2"
3388 else
3389 CFLAGS="-g"
3390 fi
3391 else
3392 if test "$GCC" = yes; then
3393 CFLAGS="-O2"
3394 else
3395 CFLAGS=
3396 fi
3397 fi
3398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3399 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3400 if ${ac_cv_prog_cc_c89+:} false; then :
3401 $as_echo_n "(cached) " >&6
3402 else
3403 ac_cv_prog_cc_c89=no
3404 ac_save_CC=$CC
3405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3406 /* end confdefs.h. */
3407 #include <stdarg.h>
3408 #include <stdio.h>
3409 struct stat;
3410 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3411 struct buf { int x; };
3412 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3413 static char *e (p, i)
3414 char **p;
3415 int i;
3416 {
3417 return p[i];
3418 }
3419 static char *f (char * (*g) (char **, int), char **p, ...)
3420 {
3421 char *s;
3422 va_list v;
3423 va_start (v,p);
3424 s = g (p, va_arg (v,int));
3425 va_end (v);
3426 return s;
3427 }
3428
3429 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3430 function prototypes and stuff, but not '\xHH' hex character constants.
3431 These don't provoke an error unfortunately, instead are silently treated
3432 as 'x'. The following induces an error, until -std is added to get
3433 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3434 array size at least. It's necessary to write '\x00'==0 to get something
3435 that's true only with -std. */
3436 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3437
3438 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3439 inside strings and character constants. */
3440 #define FOO(x) 'x'
3441 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3442
3443 int test (int i, double x);
3444 struct s1 {int (*f) (int a);};
3445 struct s2 {int (*f) (double a);};
3446 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3447 int argc;
3448 char **argv;
3449 int
3450 main ()
3451 {
3452 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3453 ;
3454 return 0;
3455 }
3456 _ACEOF
3457 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3458 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3459 do
3460 CC="$ac_save_CC $ac_arg"
3461 if ac_fn_c_try_compile "$LINENO"; then :
3462 ac_cv_prog_cc_c89=$ac_arg
3463 fi
3464 rm -f core conftest.err conftest.$ac_objext
3465 test "x$ac_cv_prog_cc_c89" != "xno" && break
3466 done
3467 rm -f conftest.$ac_ext
3468 CC=$ac_save_CC
3469
3470 fi
3471 # AC_CACHE_VAL
3472 case "x$ac_cv_prog_cc_c89" in
3473 x)
3474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3475 $as_echo "none needed" >&6; } ;;
3476 xno)
3477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3478 $as_echo "unsupported" >&6; } ;;
3479 *)
3480 CC="$CC $ac_cv_prog_cc_c89"
3481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3482 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3483 esac
3484 if test "x$ac_cv_prog_cc_c89" != xno; then :
3485
3486 fi
3487
3488 ac_ext=c
3489 ac_cpp='$CPP $CPPFLAGS'
3490 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3491 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3492 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3493 DEPDIR="${am__leading_dot}deps"
3494
3495 ac_config_commands="$ac_config_commands depfiles"
3496
3497
3498 am_make=${MAKE-make}
3499 cat > confinc << 'END'
3500 am__doit:
3501 @echo this is the am__doit target
3502 .PHONY: am__doit
3503 END
3504 # If we don't find an include directive, just comment out the code.
3505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
3506 $as_echo_n "checking for style of include used by $am_make... " >&6; }
3507 am__include="#"
3508 am__quote=
3509 _am_result=none
3510 # First try GNU make style include.
3511 echo "include confinc" > confmf
3512 # Ignore all kinds of additional output from 'make'.
3513 case `$am_make -s -f confmf 2> /dev/null` in #(
3514 *the\ am__doit\ target*)
3515 am__include=include
3516 am__quote=
3517 _am_result=GNU
3518 ;;
3519 esac
3520 # Now try BSD make style include.
3521 if test "$am__include" = "#"; then
3522 echo '.include "confinc"' > confmf
3523 case `$am_make -s -f confmf 2> /dev/null` in #(
3524 *the\ am__doit\ target*)
3525 am__include=.include
3526 am__quote="\""
3527 _am_result=BSD
3528 ;;
3529 esac
3530 fi
3531
3532
3533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
3534 $as_echo "$_am_result" >&6; }
3535 rm -f confinc confmf
3536
3537 # Check whether --enable-dependency-tracking was given.
3538 if test "${enable_dependency_tracking+set}" = set; then :
3539 enableval=$enable_dependency_tracking;
3540 fi
3541
3542 if test "x$enable_dependency_tracking" != xno; then
3543 am_depcomp="$ac_aux_dir/depcomp"
3544 AMDEPBACKSLASH='\'
3545 am__nodep='_no'
3546 fi
3547 if test "x$enable_dependency_tracking" != xno; then
3548 AMDEP_TRUE=
3549 AMDEP_FALSE='#'
3550 else
3551 AMDEP_TRUE='#'
3552 AMDEP_FALSE=
3553 fi
3554
3555
3556
3557 depcc="$CC" am_compiler_list=
3558
3559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
3560 $as_echo_n "checking dependency style of $depcc... " >&6; }
3561 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
3562 $as_echo_n "(cached) " >&6
3563 else
3564 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
3565 # We make a subdir and do the tests there. Otherwise we can end up
3566 # making bogus files that we don't know about and never remove. For
3567 # instance it was reported that on HP-UX the gcc test will end up
3568 # making a dummy file named 'D' -- because '-MD' means "put the output
3569 # in D".
3570 rm -rf conftest.dir
3571 mkdir conftest.dir
3572 # Copy depcomp to subdir because otherwise we won't find it if we're
3573 # using a relative directory.
3574 cp "$am_depcomp" conftest.dir
3575 cd conftest.dir
3576 # We will build objects and dependencies in a subdirectory because
3577 # it helps to detect inapplicable dependency modes. For instance
3578 # both Tru64's cc and ICC support -MD to output dependencies as a
3579 # side effect of compilation, but ICC will put the dependencies in
3580 # the current directory while Tru64 will put them in the object
3581 # directory.
3582 mkdir sub
3583
3584 am_cv_CC_dependencies_compiler_type=none
3585 if test "$am_compiler_list" = ""; then
3586 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
3587 fi
3588 am__universal=false
3589 case " $depcc " in #(
3590 *\ -arch\ *\ -arch\ *) am__universal=true ;;
3591 esac
3592
3593 for depmode in $am_compiler_list; do
3594 # Setup a source with many dependencies, because some compilers
3595 # like to wrap large dependency lists on column 80 (with \), and
3596 # we should not choose a depcomp mode which is confused by this.
3597 #
3598 # We need to recreate these files for each test, as the compiler may
3599 # overwrite some of them when testing with obscure command lines.
3600 # This happens at least with the AIX C compiler.
3601 : > sub/conftest.c
3602 for i in 1 2 3 4 5 6; do
3603 echo '#include "conftst'$i'.h"' >> sub/conftest.c
3604 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
3605 # Solaris 10 /bin/sh.
3606 echo '/* dummy */' > sub/conftst$i.h
3607 done
3608 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
3609
3610 # We check with '-c' and '-o' for the sake of the "dashmstdout"
3611 # mode. It turns out that the SunPro C++ compiler does not properly
3612 # handle '-M -o', and we need to detect this. Also, some Intel
3613 # versions had trouble with output in subdirs.
3614 am__obj=sub/conftest.${OBJEXT-o}
3615 am__minus_obj="-o $am__obj"
3616 case $depmode in
3617 gcc)
3618 # This depmode causes a compiler race in universal mode.
3619 test "$am__universal" = false || continue
3620 ;;
3621 nosideeffect)
3622 # After this tag, mechanisms are not by side-effect, so they'll
3623 # only be used when explicitly requested.
3624 if test "x$enable_dependency_tracking" = xyes; then
3625 continue
3626 else
3627 break
3628 fi
3629 ;;
3630 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
3631 # This compiler won't grok '-c -o', but also, the minuso test has
3632 # not run yet. These depmodes are late enough in the game, and
3633 # so weak that their functioning should not be impacted.
3634 am__obj=conftest.${OBJEXT-o}
3635 am__minus_obj=
3636 ;;
3637 none) break ;;
3638 esac
3639 if depmode=$depmode \
3640 source=sub/conftest.c object=$am__obj \
3641 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
3642 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
3643 >/dev/null 2>conftest.err &&
3644 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
3645 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
3646 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
3647 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
3648 # icc doesn't choke on unknown options, it will just issue warnings
3649 # or remarks (even with -Werror). So we grep stderr for any message
3650 # that says an option was ignored or not supported.
3651 # When given -MP, icc 7.0 and 7.1 complain thusly:
3652 # icc: Command line warning: ignoring option '-M'; no argument required
3653 # The diagnosis changed in icc 8.0:
3654 # icc: Command line remark: option '-MP' not supported
3655 if (grep 'ignoring option' conftest.err ||
3656 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
3657 am_cv_CC_dependencies_compiler_type=$depmode
3658 break
3659 fi
3660 fi
3661 done
3662
3663 cd ..
3664 rm -rf conftest.dir
3665 else
3666 am_cv_CC_dependencies_compiler_type=none
3667 fi
3668
3669 fi
3670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
3671 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
3672 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
3673
3674 if
3675 test "x$enable_dependency_tracking" != xno \
3676 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
3677 am__fastdepCC_TRUE=
3678 am__fastdepCC_FALSE='#'
3679 else
3680 am__fastdepCC_TRUE='#'
3681 am__fastdepCC_FALSE=
3682 fi
3683
3684
3685 case `pwd` in
3686 *\ * | *\ *)
3687 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
3688 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
3689 esac
3690
3691
3692
3693 macro_version='2.4.2'
3694 macro_revision='1.3337'
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708 ltmain="$ac_aux_dir/ltmain.sh"
3709
3710 # Make sure we can run config.sub.
3711 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3712 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3713
3714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3715 $as_echo_n "checking build system type... " >&6; }
3716 if ${ac_cv_build+:} false; then :
3717 $as_echo_n "(cached) " >&6
3718 else
3719 ac_build_alias=$build_alias
3720 test "x$ac_build_alias" = x &&
3721 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3722 test "x$ac_build_alias" = x &&
3723 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
3724 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3725 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3726
3727 fi
3728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3729 $as_echo "$ac_cv_build" >&6; }
3730 case $ac_cv_build in
3731 *-*-*) ;;
3732 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
3733 esac
3734 build=$ac_cv_build
3735 ac_save_IFS=$IFS; IFS='-'
3736 set x $ac_cv_build
3737 shift
3738 build_cpu=$1
3739 build_vendor=$2
3740 shift; shift
3741 # Remember, the first character of IFS is used to create $*,
3742 # except with old shells:
3743 build_os=$*
3744 IFS=$ac_save_IFS
3745 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3746
3747
3748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3749 $as_echo_n "checking host system type... " >&6; }
3750 if ${ac_cv_host+:} false; then :
3751 $as_echo_n "(cached) " >&6
3752 else
3753 if test "x$host_alias" = x; then
3754 ac_cv_host=$ac_cv_build
3755 else
3756 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3757 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
3758 fi
3759
3760 fi
3761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3762 $as_echo "$ac_cv_host" >&6; }
3763 case $ac_cv_host in
3764 *-*-*) ;;
3765 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
3766 esac
3767 host=$ac_cv_host
3768 ac_save_IFS=$IFS; IFS='-'
3769 set x $ac_cv_host
3770 shift
3771 host_cpu=$1
3772 host_vendor=$2
3773 shift; shift
3774 # Remember, the first character of IFS is used to create $*,
3775 # except with old shells:
3776 host_os=$*
3777 IFS=$ac_save_IFS
3778 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3779
3780
3781 # Backslashify metacharacters that are still active within
3782 # double-quoted strings.
3783 sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
3784
3785 # Same as above, but do not quote variable references.
3786 double_quote_subst='s/\(["`\\]\)/\\\1/g'
3787
3788 # Sed substitution to delay expansion of an escaped shell variable in a
3789 # double_quote_subst'ed string.
3790 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
3791
3792 # Sed substitution to delay expansion of an escaped single quote.
3793 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
3794
3795 # Sed substitution to avoid accidental globbing in evaled expressions
3796 no_glob_subst='s/\*/\\\*/g'
3797
3798 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
3799 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
3800 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
3801
3802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
3803 $as_echo_n "checking how to print strings... " >&6; }
3804 # Test print first, because it will be a builtin if present.
3805 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
3806 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
3807 ECHO='print -r --'
3808 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
3809 ECHO='printf %s\n'
3810 else
3811 # Use this function as a fallback that always works.
3812 func_fallback_echo ()
3813 {
3814 eval 'cat <<_LTECHO_EOF
3815 $1
3816 _LTECHO_EOF'
3817 }
3818 ECHO='func_fallback_echo'
3819 fi
3820
3821 # func_echo_all arg...
3822 # Invoke $ECHO with all args, space-separated.
3823 func_echo_all ()
3824 {
3825 $ECHO ""
3826 }
3827
3828 case "$ECHO" in
3829 printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
3830 $as_echo "printf" >&6; } ;;
3831 print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
3832 $as_echo "print -r" >&6; } ;;
3833 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
3834 $as_echo "cat" >&6; } ;;
3835 esac
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
3851 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
3852 if ${ac_cv_path_SED+:} false; then :
3853 $as_echo_n "(cached) " >&6
3854 else
3855 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
3856 for ac_i in 1 2 3 4 5 6 7; do
3857 ac_script="$ac_script$as_nl$ac_script"
3858 done
3859 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
3860 { ac_script=; unset ac_script;}
3861 if test -z "$SED"; then
3862 ac_path_SED_found=false
3863 # Loop through the user's path and test for each of PROGNAME-LIST
3864 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3865 for as_dir in $PATH
3866 do
3867 IFS=$as_save_IFS
3868 test -z "$as_dir" && as_dir=.
3869 for ac_prog in sed gsed; do
3870 for ac_exec_ext in '' $ac_executable_extensions; do
3871 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
3872 as_fn_executable_p "$ac_path_SED" || continue
3873 # Check for GNU ac_path_SED and select it if it is found.
3874 # Check for GNU $ac_path_SED
3875 case `"$ac_path_SED" --version 2>&1` in
3876 *GNU*)
3877 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
3878 *)
3879 ac_count=0
3880 $as_echo_n 0123456789 >"conftest.in"
3881 while :
3882 do
3883 cat "conftest.in" "conftest.in" >"conftest.tmp"
3884 mv "conftest.tmp" "conftest.in"
3885 cp "conftest.in" "conftest.nl"
3886 $as_echo '' >> "conftest.nl"
3887 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
3888 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3889 as_fn_arith $ac_count + 1 && ac_count=$as_val
3890 if test $ac_count -gt ${ac_path_SED_max-0}; then
3891 # Best one so far, save it but keep looking for a better one
3892 ac_cv_path_SED="$ac_path_SED"
3893 ac_path_SED_max=$ac_count
3894 fi
3895 # 10*(2^10) chars as input seems more than enough
3896 test $ac_count -gt 10 && break
3897 done
3898 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3899 esac
3900
3901 $ac_path_SED_found && break 3
3902 done
3903 done
3904 done
3905 IFS=$as_save_IFS
3906 if test -z "$ac_cv_path_SED"; then
3907 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
3908 fi
3909 else
3910 ac_cv_path_SED=$SED
3911 fi
3912
3913 fi
3914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
3915 $as_echo "$ac_cv_path_SED" >&6; }
3916 SED="$ac_cv_path_SED"
3917 rm -f conftest.sed
3918
3919 test -z "$SED" && SED=sed
3920 Xsed="$SED -e 1s/^X//"
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3933 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3934 if ${ac_cv_path_GREP+:} false; then :
3935 $as_echo_n "(cached) " >&6
3936 else
3937 if test -z "$GREP"; then
3938 ac_path_GREP_found=false
3939 # Loop through the user's path and test for each of PROGNAME-LIST
3940 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3941 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3942 do
3943 IFS=$as_save_IFS
3944 test -z "$as_dir" && as_dir=.
3945 for ac_prog in grep ggrep; do
3946 for ac_exec_ext in '' $ac_executable_extensions; do
3947 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3948 as_fn_executable_p "$ac_path_GREP" || continue
3949 # Check for GNU ac_path_GREP and select it if it is found.
3950 # Check for GNU $ac_path_GREP
3951 case `"$ac_path_GREP" --version 2>&1` in
3952 *GNU*)
3953 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3954 *)
3955 ac_count=0
3956 $as_echo_n 0123456789 >"conftest.in"
3957 while :
3958 do
3959 cat "conftest.in" "conftest.in" >"conftest.tmp"
3960 mv "conftest.tmp" "conftest.in"
3961 cp "conftest.in" "conftest.nl"
3962 $as_echo 'GREP' >> "conftest.nl"
3963 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3964 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3965 as_fn_arith $ac_count + 1 && ac_count=$as_val
3966 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3967 # Best one so far, save it but keep looking for a better one
3968 ac_cv_path_GREP="$ac_path_GREP"
3969 ac_path_GREP_max=$ac_count
3970 fi
3971 # 10*(2^10) chars as input seems more than enough
3972 test $ac_count -gt 10 && break
3973 done
3974 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3975 esac
3976
3977 $ac_path_GREP_found && break 3
3978 done
3979 done
3980 done
3981 IFS=$as_save_IFS
3982 if test -z "$ac_cv_path_GREP"; then
3983 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3984 fi
3985 else
3986 ac_cv_path_GREP=$GREP
3987 fi
3988
3989 fi
3990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3991 $as_echo "$ac_cv_path_GREP" >&6; }
3992 GREP="$ac_cv_path_GREP"
3993
3994
3995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3996 $as_echo_n "checking for egrep... " >&6; }
3997 if ${ac_cv_path_EGREP+:} false; then :
3998 $as_echo_n "(cached) " >&6
3999 else
4000 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4001 then ac_cv_path_EGREP="$GREP -E"
4002 else
4003 if test -z "$EGREP"; then
4004 ac_path_EGREP_found=false
4005 # Loop through the user's path and test for each of PROGNAME-LIST
4006 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4007 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4008 do
4009 IFS=$as_save_IFS
4010 test -z "$as_dir" && as_dir=.
4011 for ac_prog in egrep; do
4012 for ac_exec_ext in '' $ac_executable_extensions; do
4013 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4014 as_fn_executable_p "$ac_path_EGREP" || continue
4015 # Check for GNU ac_path_EGREP and select it if it is found.
4016 # Check for GNU $ac_path_EGREP
4017 case `"$ac_path_EGREP" --version 2>&1` in
4018 *GNU*)
4019 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4020 *)
4021 ac_count=0
4022 $as_echo_n 0123456789 >"conftest.in"
4023 while :
4024 do
4025 cat "conftest.in" "conftest.in" >"conftest.tmp"
4026 mv "conftest.tmp" "conftest.in"
4027 cp "conftest.in" "conftest.nl"
4028 $as_echo 'EGREP' >> "conftest.nl"
4029 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4030 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4031 as_fn_arith $ac_count + 1 && ac_count=$as_val
4032 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4033 # Best one so far, save it but keep looking for a better one
4034 ac_cv_path_EGREP="$ac_path_EGREP"
4035 ac_path_EGREP_max=$ac_count
4036 fi
4037 # 10*(2^10) chars as input seems more than enough
4038 test $ac_count -gt 10 && break
4039 done
4040 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4041 esac
4042
4043 $ac_path_EGREP_found && break 3
4044 done
4045 done
4046 done
4047 IFS=$as_save_IFS
4048 if test -z "$ac_cv_path_EGREP"; then
4049 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4050 fi
4051 else
4052 ac_cv_path_EGREP=$EGREP
4053 fi
4054
4055 fi
4056 fi
4057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4058 $as_echo "$ac_cv_path_EGREP" >&6; }
4059 EGREP="$ac_cv_path_EGREP"
4060
4061
4062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
4063 $as_echo_n "checking for fgrep... " >&6; }
4064 if ${ac_cv_path_FGREP+:} false; then :
4065 $as_echo_n "(cached) " >&6
4066 else
4067 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
4068 then ac_cv_path_FGREP="$GREP -F"
4069 else
4070 if test -z "$FGREP"; then
4071 ac_path_FGREP_found=false
4072 # Loop through the user's path and test for each of PROGNAME-LIST
4073 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4074 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4075 do
4076 IFS=$as_save_IFS
4077 test -z "$as_dir" && as_dir=.
4078 for ac_prog in fgrep; do
4079 for ac_exec_ext in '' $ac_executable_extensions; do
4080 ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
4081 as_fn_executable_p "$ac_path_FGREP" || continue
4082 # Check for GNU ac_path_FGREP and select it if it is found.
4083 # Check for GNU $ac_path_FGREP
4084 case `"$ac_path_FGREP" --version 2>&1` in
4085 *GNU*)
4086 ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
4087 *)
4088 ac_count=0
4089 $as_echo_n 0123456789 >"conftest.in"
4090 while :
4091 do
4092 cat "conftest.in" "conftest.in" >"conftest.tmp"
4093 mv "conftest.tmp" "conftest.in"
4094 cp "conftest.in" "conftest.nl"
4095 $as_echo 'FGREP' >> "conftest.nl"
4096 "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
4097 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4098 as_fn_arith $ac_count + 1 && ac_count=$as_val
4099 if test $ac_count -gt ${ac_path_FGREP_max-0}; then
4100 # Best one so far, save it but keep looking for a better one
4101 ac_cv_path_FGREP="$ac_path_FGREP"
4102 ac_path_FGREP_max=$ac_count
4103 fi
4104 # 10*(2^10) chars as input seems more than enough
4105 test $ac_count -gt 10 && break
4106 done
4107 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4108 esac
4109
4110 $ac_path_FGREP_found && break 3
4111 done
4112 done
4113 done
4114 IFS=$as_save_IFS
4115 if test -z "$ac_cv_path_FGREP"; then
4116 as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4117 fi
4118 else
4119 ac_cv_path_FGREP=$FGREP
4120 fi
4121
4122 fi
4123 fi
4124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
4125 $as_echo "$ac_cv_path_FGREP" >&6; }
4126 FGREP="$ac_cv_path_FGREP"
4127
4128
4129 test -z "$GREP" && GREP=grep
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149 # Check whether --with-gnu-ld was given.
4150 if test "${with_gnu_ld+set}" = set; then :
4151 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
4152 else
4153 with_gnu_ld=no
4154 fi
4155
4156 ac_prog=ld
4157 if test "$GCC" = yes; then
4158 # Check if gcc -print-prog-name=ld gives a path.
4159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
4160 $as_echo_n "checking for ld used by $CC... " >&6; }
4161 case $host in
4162 *-*-mingw*)
4163 # gcc leaves a trailing carriage return which upsets mingw
4164 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4165 *)
4166 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4167 esac
4168 case $ac_prog in
4169 # Accept absolute paths.
4170 [\\/]* | ?:[\\/]*)
4171 re_direlt='/[^/][^/]*/\.\./'
4172 # Canonicalize the pathname of ld
4173 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
4174 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
4175 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
4176 done
4177 test -z "$LD" && LD="$ac_prog"
4178 ;;
4179 "")
4180 # If it fails, then pretend we aren't using GCC.
4181 ac_prog=ld
4182 ;;
4183 *)
4184 # If it is relative, then search for the first ld in PATH.
4185 with_gnu_ld=unknown
4186 ;;
4187 esac
4188 elif test "$with_gnu_ld" = yes; then
4189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4190 $as_echo_n "checking for GNU ld... " >&6; }
4191 else
4192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
4193 $as_echo_n "checking for non-GNU ld... " >&6; }
4194 fi
4195 if ${lt_cv_path_LD+:} false; then :
4196 $as_echo_n "(cached) " >&6
4197 else
4198 if test -z "$LD"; then
4199 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4200 for ac_dir in $PATH; do
4201 IFS="$lt_save_ifs"
4202 test -z "$ac_dir" && ac_dir=.
4203 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4204 lt_cv_path_LD="$ac_dir/$ac_prog"
4205 # Check to see if the program is GNU ld. I'd rather use --version,
4206 # but apparently some variants of GNU ld only accept -v.
4207 # Break only if it was the GNU/non-GNU ld that we prefer.
4208 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
4209 *GNU* | *'with BFD'*)
4210 test "$with_gnu_ld" != no && break
4211 ;;
4212 *)
4213 test "$with_gnu_ld" != yes && break
4214 ;;
4215 esac
4216 fi
4217 done
4218 IFS="$lt_save_ifs"
4219 else
4220 lt_cv_path_LD="$LD" # Let the user override the test with a path.
4221 fi
4222 fi
4223
4224 LD="$lt_cv_path_LD"
4225 if test -n "$LD"; then
4226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
4227 $as_echo "$LD" >&6; }
4228 else
4229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4230 $as_echo "no" >&6; }
4231 fi
4232 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
4233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
4234 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
4235 if ${lt_cv_prog_gnu_ld+:} false; then :
4236 $as_echo_n "(cached) " >&6
4237 else
4238 # I'd rather use --version here, but apparently some GNU lds only accept -v.
4239 case `$LD -v 2>&1 </dev/null` in
4240 *GNU* | *'with BFD'*)
4241 lt_cv_prog_gnu_ld=yes
4242 ;;
4243 *)
4244 lt_cv_prog_gnu_ld=no
4245 ;;
4246 esac
4247 fi
4248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
4249 $as_echo "$lt_cv_prog_gnu_ld" >&6; }
4250 with_gnu_ld=$lt_cv_prog_gnu_ld
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
4261 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
4262 if ${lt_cv_path_NM+:} false; then :
4263 $as_echo_n "(cached) " >&6
4264 else
4265 if test -n "$NM"; then
4266 # Let the user override the test.
4267 lt_cv_path_NM="$NM"
4268 else
4269 lt_nm_to_check="${ac_tool_prefix}nm"
4270 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4271 lt_nm_to_check="$lt_nm_to_check nm"
4272 fi
4273 for lt_tmp_nm in $lt_nm_to_check; do
4274 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4275 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4276 IFS="$lt_save_ifs"
4277 test -z "$ac_dir" && ac_dir=.
4278 tmp_nm="$ac_dir/$lt_tmp_nm"
4279 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4280 # Check to see if the nm accepts a BSD-compat flag.
4281 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4282 # nm: unknown option "B" ignored
4283 # Tru64's nm complains that /dev/null is an invalid object file
4284 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4285 */dev/null* | *'Invalid file or object type'*)
4286 lt_cv_path_NM="$tmp_nm -B"
4287 break
4288 ;;
4289 *)
4290 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4291 */dev/null*)
4292 lt_cv_path_NM="$tmp_nm -p"
4293 break
4294 ;;
4295 *)
4296 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4297 continue # so that we can try to find one that supports BSD flags
4298 ;;
4299 esac
4300 ;;
4301 esac
4302 fi
4303 done
4304 IFS="$lt_save_ifs"
4305 done
4306 : ${lt_cv_path_NM=no}
4307 fi
4308 fi
4309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
4310 $as_echo "$lt_cv_path_NM" >&6; }
4311 if test "$lt_cv_path_NM" != "no"; then
4312 NM="$lt_cv_path_NM"
4313 else
4314 # Didn't find any BSD compatible name lister, look for dumpbin.
4315 if test -n "$DUMPBIN"; then :
4316 # Let the user override the test.
4317 else
4318 if test -n "$ac_tool_prefix"; then
4319 for ac_prog in dumpbin "link -dump"
4320 do
4321 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4322 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4324 $as_echo_n "checking for $ac_word... " >&6; }
4325 if ${ac_cv_prog_DUMPBIN+:} false; then :
4326 $as_echo_n "(cached) " >&6
4327 else
4328 if test -n "$DUMPBIN"; then
4329 ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
4330 else
4331 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4332 for as_dir in $PATH
4333 do
4334 IFS=$as_save_IFS
4335 test -z "$as_dir" && as_dir=.
4336 for ac_exec_ext in '' $ac_executable_extensions; do
4337 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4338 ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
4339 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4340 break 2
4341 fi
4342 done
4343 done
4344 IFS=$as_save_IFS
4345
4346 fi
4347 fi
4348 DUMPBIN=$ac_cv_prog_DUMPBIN
4349 if test -n "$DUMPBIN"; then
4350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
4351 $as_echo "$DUMPBIN" >&6; }
4352 else
4353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4354 $as_echo "no" >&6; }
4355 fi
4356
4357
4358 test -n "$DUMPBIN" && break
4359 done
4360 fi
4361 if test -z "$DUMPBIN"; then
4362 ac_ct_DUMPBIN=$DUMPBIN
4363 for ac_prog in dumpbin "link -dump"
4364 do
4365 # Extract the first word of "$ac_prog", so it can be a program name with args.
4366 set dummy $ac_prog; ac_word=$2
4367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4368 $as_echo_n "checking for $ac_word... " >&6; }
4369 if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
4370 $as_echo_n "(cached) " >&6
4371 else
4372 if test -n "$ac_ct_DUMPBIN"; then
4373 ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
4374 else
4375 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4376 for as_dir in $PATH
4377 do
4378 IFS=$as_save_IFS
4379 test -z "$as_dir" && as_dir=.
4380 for ac_exec_ext in '' $ac_executable_extensions; do
4381 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4382 ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
4383 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4384 break 2
4385 fi
4386 done
4387 done
4388 IFS=$as_save_IFS
4389
4390 fi
4391 fi
4392 ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
4393 if test -n "$ac_ct_DUMPBIN"; then
4394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
4395 $as_echo "$ac_ct_DUMPBIN" >&6; }
4396 else
4397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4398 $as_echo "no" >&6; }
4399 fi
4400
4401
4402 test -n "$ac_ct_DUMPBIN" && break
4403 done
4404
4405 if test "x$ac_ct_DUMPBIN" = x; then
4406 DUMPBIN=":"
4407 else
4408 case $cross_compiling:$ac_tool_warned in
4409 yes:)
4410 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4411 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4412 ac_tool_warned=yes ;;
4413 esac
4414 DUMPBIN=$ac_ct_DUMPBIN
4415 fi
4416 fi
4417
4418 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
4419 *COFF*)
4420 DUMPBIN="$DUMPBIN -symbols"
4421 ;;
4422 *)
4423 DUMPBIN=:
4424 ;;
4425 esac
4426 fi
4427
4428 if test "$DUMPBIN" != ":"; then
4429 NM="$DUMPBIN"
4430 fi
4431 fi
4432 test -z "$NM" && NM=nm
4433
4434
4435
4436
4437
4438
4439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
4440 $as_echo_n "checking the name lister ($NM) interface... " >&6; }
4441 if ${lt_cv_nm_interface+:} false; then :
4442 $as_echo_n "(cached) " >&6
4443 else
4444 lt_cv_nm_interface="BSD nm"
4445 echo "int some_variable = 0;" > conftest.$ac_ext
4446 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
4447 (eval "$ac_compile" 2>conftest.err)
4448 cat conftest.err >&5
4449 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
4450 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4451 cat conftest.err >&5
4452 (eval echo "\"\$as_me:$LINENO: output\"" >&5)
4453 cat conftest.out >&5
4454 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4455 lt_cv_nm_interface="MS dumpbin"
4456 fi
4457 rm -f conftest*
4458 fi
4459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
4460 $as_echo "$lt_cv_nm_interface" >&6; }
4461
4462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
4463 $as_echo_n "checking whether ln -s works... " >&6; }
4464 LN_S=$as_ln_s
4465 if test "$LN_S" = "ln -s"; then
4466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4467 $as_echo "yes" >&6; }
4468 else
4469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
4470 $as_echo "no, using $LN_S" >&6; }
4471 fi
4472
4473 # find the maximum length of command line arguments
4474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
4475 $as_echo_n "checking the maximum length of command line arguments... " >&6; }
4476 if ${lt_cv_sys_max_cmd_len+:} false; then :
4477 $as_echo_n "(cached) " >&6
4478 else
4479 i=0
4480 teststring="ABCD"
4481
4482 case $build_os in
4483 msdosdjgpp*)
4484 # On DJGPP, this test can blow up pretty badly due to problems in libc
4485 # (any single argument exceeding 2000 bytes causes a buffer overrun
4486 # during glob expansion). Even if it were fixed, the result of this
4487 # check would be larger than it should be.
4488 lt_cv_sys_max_cmd_len=12288; # 12K is about right
4489 ;;
4490
4491 gnu*)
4492 # Under GNU Hurd, this test is not required because there is
4493 # no limit to the length of command line arguments.
4494 # Libtool will interpret -1 as no limit whatsoever
4495 lt_cv_sys_max_cmd_len=-1;
4496 ;;
4497
4498 cygwin* | mingw* | cegcc*)
4499 # On Win9x/ME, this test blows up -- it succeeds, but takes
4500 # about 5 minutes as the teststring grows exponentially.
4501 # Worse, since 9x/ME are not pre-emptively multitasking,
4502 # you end up with a "frozen" computer, even though with patience
4503 # the test eventually succeeds (with a max line length of 256k).
4504 # Instead, let's just punt: use the minimum linelength reported by
4505 # all of the supported platforms: 8192 (on NT/2K/XP).
4506 lt_cv_sys_max_cmd_len=8192;
4507 ;;
4508
4509 mint*)
4510 # On MiNT this can take a long time and run out of memory.
4511 lt_cv_sys_max_cmd_len=8192;
4512 ;;
4513
4514 amigaos*)
4515 # On AmigaOS with pdksh, this test takes hours, literally.
4516 # So we just punt and use a minimum line length of 8192.
4517 lt_cv_sys_max_cmd_len=8192;
4518 ;;
4519
4520 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
4521 # This has been around since 386BSD, at least. Likely further.
4522 if test -x /sbin/sysctl; then
4523 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
4524 elif test -x /usr/sbin/sysctl; then
4525 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
4526 else
4527 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
4528 fi
4529 # And add a safety zone
4530 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
4531 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
4532 ;;
4533
4534 interix*)
4535 # We know the value 262144 and hardcode it with a safety zone (like BSD)
4536 lt_cv_sys_max_cmd_len=196608
4537 ;;
4538
4539 os2*)
4540 # The test takes a long time on OS/2.
4541 lt_cv_sys_max_cmd_len=8192
4542 ;;
4543
4544 osf*)
4545 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
4546 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
4547 # nice to cause kernel panics so lets avoid the loop below.
4548 # First set a reasonable default.
4549 lt_cv_sys_max_cmd_len=16384
4550 #
4551 if test -x /sbin/sysconfig; then
4552 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
4553 *1*) lt_cv_sys_max_cmd_len=-1 ;;
4554 esac
4555 fi
4556 ;;
4557 sco3.2v5*)
4558 lt_cv_sys_max_cmd_len=102400
4559 ;;
4560 sysv5* | sco5v6* | sysv4.2uw2*)
4561 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
4562 if test -n "$kargmax"; then
4563 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
4564 else
4565 lt_cv_sys_max_cmd_len=32768
4566 fi
4567 ;;
4568 *)
4569 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
4570 if test -n "$lt_cv_sys_max_cmd_len" && \
4571 test undefined != "$lt_cv_sys_max_cmd_len"; then
4572 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
4573 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
4574 else
4575 # Make teststring a little bigger before we do anything with it.
4576 # a 1K string should be a reasonable start.
4577 for i in 1 2 3 4 5 6 7 8 ; do
4578 teststring=$teststring$teststring
4579 done
4580 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
4581 # If test is not a shell built-in, we'll probably end up computing a
4582 # maximum length that is only half of the actual maximum length, but
4583 # we can't tell.
4584 while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
4585 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
4586 test $i != 17 # 1/2 MB should be enough
4587 do
4588 i=`expr $i + 1`
4589 teststring=$teststring$teststring
4590 done
4591 # Only check the string length outside the loop.
4592 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
4593 teststring=
4594 # Add a significant safety factor because C++ compilers can tack on
4595 # massive amounts of additional arguments before passing them to the
4596 # linker. It appears as though 1/2 is a usable value.
4597 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
4598 fi
4599 ;;
4600 esac
4601
4602 fi
4603
4604 if test -n $lt_cv_sys_max_cmd_len ; then
4605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
4606 $as_echo "$lt_cv_sys_max_cmd_len" >&6; }
4607 else
4608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
4609 $as_echo "none" >&6; }
4610 fi
4611 max_cmd_len=$lt_cv_sys_max_cmd_len
4612
4613
4614
4615
4616
4617
4618 : ${CP="cp -f"}
4619 : ${MV="mv -f"}
4620 : ${RM="rm -f"}
4621
4622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
4623 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
4624 # Try some XSI features
4625 xsi_shell=no
4626 ( _lt_dummy="a/b/c"
4627 test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
4628 = c,a/b,b/c, \
4629 && eval 'test $(( 1 + 1 )) -eq 2 \
4630 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
4631 && xsi_shell=yes
4632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
4633 $as_echo "$xsi_shell" >&6; }
4634
4635
4636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
4637 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
4638 lt_shell_append=no
4639 ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
4640 >/dev/null 2>&1 \
4641 && lt_shell_append=yes
4642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
4643 $as_echo "$lt_shell_append" >&6; }
4644
4645
4646 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
4647 lt_unset=unset
4648 else
4649 lt_unset=false
4650 fi
4651
4652
4653
4654
4655
4656 # test EBCDIC or ASCII
4657 case `echo X|tr X '\101'` in
4658 A) # ASCII based system
4659 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
4660 lt_SP2NL='tr \040 \012'
4661 lt_NL2SP='tr \015\012 \040\040'
4662 ;;
4663 *) # EBCDIC based system
4664 lt_SP2NL='tr \100 \n'
4665 lt_NL2SP='tr \r\n \100\100'
4666 ;;
4667 esac
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
4678 $as_echo_n "checking how to convert $build file names to $host format... " >&6; }
4679 if ${lt_cv_to_host_file_cmd+:} false; then :
4680 $as_echo_n "(cached) " >&6
4681 else
4682 case $host in
4683 *-*-mingw* )
4684 case $build in
4685 *-*-mingw* ) # actually msys
4686 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
4687 ;;
4688 *-*-cygwin* )
4689 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
4690 ;;
4691 * ) # otherwise, assume *nix
4692 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
4693 ;;
4694 esac
4695 ;;
4696 *-*-cygwin* )
4697 case $build in
4698 *-*-mingw* ) # actually msys
4699 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
4700 ;;
4701 *-*-cygwin* )
4702 lt_cv_to_host_file_cmd=func_convert_file_noop
4703 ;;
4704 * ) # otherwise, assume *nix
4705 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
4706 ;;
4707 esac
4708 ;;
4709 * ) # unhandled hosts (and "normal" native builds)
4710 lt_cv_to_host_file_cmd=func_convert_file_noop
4711 ;;
4712 esac
4713
4714 fi
4715
4716 to_host_file_cmd=$lt_cv_to_host_file_cmd
4717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
4718 $as_echo "$lt_cv_to_host_file_cmd" >&6; }
4719
4720
4721
4722
4723
4724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
4725 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
4726 if ${lt_cv_to_tool_file_cmd+:} false; then :
4727 $as_echo_n "(cached) " >&6
4728 else
4729 #assume ordinary cross tools, or native build.
4730 lt_cv_to_tool_file_cmd=func_convert_file_noop
4731 case $host in
4732 *-*-mingw* )
4733 case $build in
4734 *-*-mingw* ) # actually msys
4735 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
4736 ;;
4737 esac
4738 ;;
4739 esac
4740
4741 fi
4742
4743 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
4744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
4745 $as_echo "$lt_cv_to_tool_file_cmd" >&6; }
4746
4747
4748
4749
4750
4751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
4752 $as_echo_n "checking for $LD option to reload object files... " >&6; }
4753 if ${lt_cv_ld_reload_flag+:} false; then :
4754 $as_echo_n "(cached) " >&6
4755 else
4756 lt_cv_ld_reload_flag='-r'
4757 fi
4758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
4759 $as_echo "$lt_cv_ld_reload_flag" >&6; }
4760 reload_flag=$lt_cv_ld_reload_flag
4761 case $reload_flag in
4762 "" | " "*) ;;
4763 *) reload_flag=" $reload_flag" ;;
4764 esac
4765 reload_cmds='$LD$reload_flag -o $output$reload_objs'
4766 case $host_os in
4767 cygwin* | mingw* | pw32* | cegcc*)
4768 if test "$GCC" != yes; then
4769 reload_cmds=false
4770 fi
4771 ;;
4772 darwin*)
4773 if test "$GCC" = yes; then
4774 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
4775 else
4776 reload_cmds='$LD$reload_flag -o $output$reload_objs'
4777 fi
4778 ;;
4779 esac
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789 if test -n "$ac_tool_prefix"; then
4790 # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4791 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4793 $as_echo_n "checking for $ac_word... " >&6; }
4794 if ${ac_cv_prog_OBJDUMP+:} false; then :
4795 $as_echo_n "(cached) " >&6
4796 else
4797 if test -n "$OBJDUMP"; then
4798 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4799 else
4800 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4801 for as_dir in $PATH
4802 do
4803 IFS=$as_save_IFS
4804 test -z "$as_dir" && as_dir=.
4805 for ac_exec_ext in '' $ac_executable_extensions; do
4806 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4807 ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4808 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4809 break 2
4810 fi
4811 done
4812 done
4813 IFS=$as_save_IFS
4814
4815 fi
4816 fi
4817 OBJDUMP=$ac_cv_prog_OBJDUMP
4818 if test -n "$OBJDUMP"; then
4819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
4820 $as_echo "$OBJDUMP" >&6; }
4821 else
4822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4823 $as_echo "no" >&6; }
4824 fi
4825
4826
4827 fi
4828 if test -z "$ac_cv_prog_OBJDUMP"; then
4829 ac_ct_OBJDUMP=$OBJDUMP
4830 # Extract the first word of "objdump", so it can be a program name with args.
4831 set dummy objdump; ac_word=$2
4832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4833 $as_echo_n "checking for $ac_word... " >&6; }
4834 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
4835 $as_echo_n "(cached) " >&6
4836 else
4837 if test -n "$ac_ct_OBJDUMP"; then
4838 ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
4839 else
4840 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4841 for as_dir in $PATH
4842 do
4843 IFS=$as_save_IFS
4844 test -z "$as_dir" && as_dir=.
4845 for ac_exec_ext in '' $ac_executable_extensions; do
4846 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4847 ac_cv_prog_ac_ct_OBJDUMP="objdump"
4848 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4849 break 2
4850 fi
4851 done
4852 done
4853 IFS=$as_save_IFS
4854
4855 fi
4856 fi
4857 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
4858 if test -n "$ac_ct_OBJDUMP"; then
4859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
4860 $as_echo "$ac_ct_OBJDUMP" >&6; }
4861 else
4862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4863 $as_echo "no" >&6; }
4864 fi
4865
4866 if test "x$ac_ct_OBJDUMP" = x; then
4867 OBJDUMP="false"
4868 else
4869 case $cross_compiling:$ac_tool_warned in
4870 yes:)
4871 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4872 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4873 ac_tool_warned=yes ;;
4874 esac
4875 OBJDUMP=$ac_ct_OBJDUMP
4876 fi
4877 else
4878 OBJDUMP="$ac_cv_prog_OBJDUMP"
4879 fi
4880
4881 test -z "$OBJDUMP" && OBJDUMP=objdump
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
4892 $as_echo_n "checking how to recognize dependent libraries... " >&6; }
4893 if ${lt_cv_deplibs_check_method+:} false; then :
4894 $as_echo_n "(cached) " >&6
4895 else
4896 lt_cv_file_magic_cmd='$MAGIC_CMD'
4897 lt_cv_file_magic_test_file=
4898 lt_cv_deplibs_check_method='unknown'
4899 # Need to set the preceding variable on all platforms that support
4900 # interlibrary dependencies.
4901 # 'none' -- dependencies not supported.
4902 # `unknown' -- same as none, but documents that we really don't know.
4903 # 'pass_all' -- all dependencies passed with no checks.
4904 # 'test_compile' -- check by making test program.
4905 # 'file_magic [[regex]]' -- check by looking for files in library path
4906 # which responds to the $file_magic_cmd with a given extended regex.
4907 # If you have `file' or equivalent on your system and you're not sure
4908 # whether `pass_all' will *always* work, you probably want this one.
4909
4910 case $host_os in
4911 aix[4-9]*)
4912 lt_cv_deplibs_check_method=pass_all
4913 ;;
4914
4915 beos*)
4916 lt_cv_deplibs_check_method=pass_all
4917 ;;
4918
4919 bsdi[45]*)
4920 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
4921 lt_cv_file_magic_cmd='/usr/bin/file -L'
4922 lt_cv_file_magic_test_file=/shlib/libc.so
4923 ;;
4924
4925 cygwin*)
4926 # func_win32_libid is a shell function defined in ltmain.sh
4927 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4928 lt_cv_file_magic_cmd='func_win32_libid'
4929 ;;
4930
4931 mingw* | pw32*)
4932 # Base MSYS/MinGW do not provide the 'file' command needed by
4933 # func_win32_libid shell function, so use a weaker test based on 'objdump',
4934 # unless we find 'file', for example because we are cross-compiling.
4935 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
4936 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
4937 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4938 lt_cv_file_magic_cmd='func_win32_libid'
4939 else
4940 # Keep this pattern in sync with the one in func_win32_libid.
4941 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
4942 lt_cv_file_magic_cmd='$OBJDUMP -f'
4943 fi
4944 ;;
4945
4946 cegcc*)
4947 # use the weaker test based on 'objdump'. See mingw*.
4948 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
4949 lt_cv_file_magic_cmd='$OBJDUMP -f'
4950 ;;
4951
4952 darwin* | rhapsody*)
4953 lt_cv_deplibs_check_method=pass_all
4954 ;;
4955
4956 freebsd* | dragonfly*)
4957 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4958 case $host_cpu in
4959 i*86 )
4960 # Not sure whether the presence of OpenBSD here was a mistake.
4961 # Let's accept both of them until this is cleared up.
4962 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
4963 lt_cv_file_magic_cmd=/usr/bin/file
4964 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4965 ;;
4966 esac
4967 else
4968 lt_cv_deplibs_check_method=pass_all
4969 fi
4970 ;;
4971
4972 haiku*)
4973 lt_cv_deplibs_check_method=pass_all
4974 ;;
4975
4976 hpux10.20* | hpux11*)
4977 lt_cv_file_magic_cmd=/usr/bin/file
4978 case $host_cpu in
4979 ia64*)
4980 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
4981 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
4982 ;;
4983 hppa*64*)
4984 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'
4985 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
4986 ;;
4987 *)
4988 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
4989 lt_cv_file_magic_test_file=/usr/lib/libc.sl
4990 ;;
4991 esac
4992 ;;
4993
4994 interix[3-9]*)
4995 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
4996 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
4997 ;;
4998
4999 irix5* | irix6* | nonstopux*)
5000 case $LD in
5001 *-32|*"-32 ") libmagic=32-bit;;
5002 *-n32|*"-n32 ") libmagic=N32;;
5003 *-64|*"-64 ") libmagic=64-bit;;
5004 *) libmagic=never-match;;
5005 esac
5006 lt_cv_deplibs_check_method=pass_all
5007 ;;
5008
5009 # This must be glibc/ELF.
5010 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
5011 lt_cv_deplibs_check_method=pass_all
5012 ;;
5013
5014 netbsd* | netbsdelf*-gnu)
5015 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
5016 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
5017 else
5018 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
5019 fi
5020 ;;
5021
5022 newos6*)
5023 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
5024 lt_cv_file_magic_cmd=/usr/bin/file
5025 lt_cv_file_magic_test_file=/usr/lib/libnls.so
5026 ;;
5027
5028 *nto* | *qnx*)
5029 lt_cv_deplibs_check_method=pass_all
5030 ;;
5031
5032 openbsd*)
5033 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5034 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
5035 else
5036 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
5037 fi
5038 ;;
5039
5040 osf3* | osf4* | osf5*)
5041 lt_cv_deplibs_check_method=pass_all
5042 ;;
5043
5044 rdos*)
5045 lt_cv_deplibs_check_method=pass_all
5046 ;;
5047
5048 solaris*)
5049 lt_cv_deplibs_check_method=pass_all
5050 ;;
5051
5052 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
5053 lt_cv_deplibs_check_method=pass_all
5054 ;;
5055
5056 sysv4 | sysv4.3*)
5057 case $host_vendor in
5058 motorola)
5059 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]'
5060 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
5061 ;;
5062 ncr)
5063 lt_cv_deplibs_check_method=pass_all
5064 ;;
5065 sequent)
5066 lt_cv_file_magic_cmd='/bin/file'
5067 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
5068 ;;
5069 sni)
5070 lt_cv_file_magic_cmd='/bin/file'
5071 lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
5072 lt_cv_file_magic_test_file=/lib/libc.so
5073 ;;
5074 siemens)
5075 lt_cv_deplibs_check_method=pass_all
5076 ;;
5077 pc)
5078 lt_cv_deplibs_check_method=pass_all
5079 ;;
5080 esac
5081 ;;
5082
5083 tpf*)
5084 lt_cv_deplibs_check_method=pass_all
5085 ;;
5086 esac
5087
5088 fi
5089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
5090 $as_echo "$lt_cv_deplibs_check_method" >&6; }
5091
5092 file_magic_glob=
5093 want_nocaseglob=no
5094 if test "$build" = "$host"; then
5095 case $host_os in
5096 mingw* | pw32*)
5097 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
5098 want_nocaseglob=yes
5099 else
5100 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
5101 fi
5102 ;;
5103 esac
5104 fi
5105
5106 file_magic_cmd=$lt_cv_file_magic_cmd
5107 deplibs_check_method=$lt_cv_deplibs_check_method
5108 test -z "$deplibs_check_method" && deplibs_check_method=unknown
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131 if test -n "$ac_tool_prefix"; then
5132 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
5133 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
5134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5135 $as_echo_n "checking for $ac_word... " >&6; }
5136 if ${ac_cv_prog_DLLTOOL+:} false; then :
5137 $as_echo_n "(cached) " >&6
5138 else
5139 if test -n "$DLLTOOL"; then
5140 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
5141 else
5142 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5143 for as_dir in $PATH
5144 do
5145 IFS=$as_save_IFS
5146 test -z "$as_dir" && as_dir=.
5147 for ac_exec_ext in '' $ac_executable_extensions; do
5148 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5149 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
5150 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5151 break 2
5152 fi
5153 done
5154 done
5155 IFS=$as_save_IFS
5156
5157 fi
5158 fi
5159 DLLTOOL=$ac_cv_prog_DLLTOOL
5160 if test -n "$DLLTOOL"; then
5161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
5162 $as_echo "$DLLTOOL" >&6; }
5163 else
5164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5165 $as_echo "no" >&6; }
5166 fi
5167
5168
5169 fi
5170 if test -z "$ac_cv_prog_DLLTOOL"; then
5171 ac_ct_DLLTOOL=$DLLTOOL
5172 # Extract the first word of "dlltool", so it can be a program name with args.
5173 set dummy dlltool; ac_word=$2
5174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5175 $as_echo_n "checking for $ac_word... " >&6; }
5176 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
5177 $as_echo_n "(cached) " >&6
5178 else
5179 if test -n "$ac_ct_DLLTOOL"; then
5180 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
5181 else
5182 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5183 for as_dir in $PATH
5184 do
5185 IFS=$as_save_IFS
5186 test -z "$as_dir" && as_dir=.
5187 for ac_exec_ext in '' $ac_executable_extensions; do
5188 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5189 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
5190 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5191 break 2
5192 fi
5193 done
5194 done
5195 IFS=$as_save_IFS
5196
5197 fi
5198 fi
5199 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
5200 if test -n "$ac_ct_DLLTOOL"; then
5201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
5202 $as_echo "$ac_ct_DLLTOOL" >&6; }
5203 else
5204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5205 $as_echo "no" >&6; }
5206 fi
5207
5208 if test "x$ac_ct_DLLTOOL" = x; then
5209 DLLTOOL="false"
5210 else
5211 case $cross_compiling:$ac_tool_warned in
5212 yes:)
5213 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5214 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5215 ac_tool_warned=yes ;;
5216 esac
5217 DLLTOOL=$ac_ct_DLLTOOL
5218 fi
5219 else
5220 DLLTOOL="$ac_cv_prog_DLLTOOL"
5221 fi
5222
5223 test -z "$DLLTOOL" && DLLTOOL=dlltool
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
5235 $as_echo_n "checking how to associate runtime and link libraries... " >&6; }
5236 if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
5237 $as_echo_n "(cached) " >&6
5238 else
5239 lt_cv_sharedlib_from_linklib_cmd='unknown'
5240
5241 case $host_os in
5242 cygwin* | mingw* | pw32* | cegcc*)
5243 # two different shell functions defined in ltmain.sh
5244 # decide which to use based on capabilities of $DLLTOOL
5245 case `$DLLTOOL --help 2>&1` in
5246 *--identify-strict*)
5247 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
5248 ;;
5249 *)
5250 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
5251 ;;
5252 esac
5253 ;;
5254 *)
5255 # fallback: assume linklib IS sharedlib
5256 lt_cv_sharedlib_from_linklib_cmd="$ECHO"
5257 ;;
5258 esac
5259
5260 fi
5261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
5262 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
5263 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
5264 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
5265
5266
5267
5268
5269
5270
5271
5272
5273 if test -n "$ac_tool_prefix"; then
5274 for ac_prog in ar
5275 do
5276 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5277 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5279 $as_echo_n "checking for $ac_word... " >&6; }
5280 if ${ac_cv_prog_AR+:} false; then :
5281 $as_echo_n "(cached) " >&6
5282 else
5283 if test -n "$AR"; then
5284 ac_cv_prog_AR="$AR" # Let the user override the test.
5285 else
5286 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5287 for as_dir in $PATH
5288 do
5289 IFS=$as_save_IFS
5290 test -z "$as_dir" && as_dir=.
5291 for ac_exec_ext in '' $ac_executable_extensions; do
5292 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5293 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
5294 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5295 break 2
5296 fi
5297 done
5298 done
5299 IFS=$as_save_IFS
5300
5301 fi
5302 fi
5303 AR=$ac_cv_prog_AR
5304 if test -n "$AR"; then
5305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5306 $as_echo "$AR" >&6; }
5307 else
5308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5309 $as_echo "no" >&6; }
5310 fi
5311
5312
5313 test -n "$AR" && break
5314 done
5315 fi
5316 if test -z "$AR"; then
5317 ac_ct_AR=$AR
5318 for ac_prog in ar
5319 do
5320 # Extract the first word of "$ac_prog", so it can be a program name with args.
5321 set dummy $ac_prog; ac_word=$2
5322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5323 $as_echo_n "checking for $ac_word... " >&6; }
5324 if ${ac_cv_prog_ac_ct_AR+:} false; then :
5325 $as_echo_n "(cached) " >&6
5326 else
5327 if test -n "$ac_ct_AR"; then
5328 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5329 else
5330 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5331 for as_dir in $PATH
5332 do
5333 IFS=$as_save_IFS
5334 test -z "$as_dir" && as_dir=.
5335 for ac_exec_ext in '' $ac_executable_extensions; do
5336 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5337 ac_cv_prog_ac_ct_AR="$ac_prog"
5338 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5339 break 2
5340 fi
5341 done
5342 done
5343 IFS=$as_save_IFS
5344
5345 fi
5346 fi
5347 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5348 if test -n "$ac_ct_AR"; then
5349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5350 $as_echo "$ac_ct_AR" >&6; }
5351 else
5352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5353 $as_echo "no" >&6; }
5354 fi
5355
5356
5357 test -n "$ac_ct_AR" && break
5358 done
5359
5360 if test "x$ac_ct_AR" = x; then
5361 AR="false"
5362 else
5363 case $cross_compiling:$ac_tool_warned in
5364 yes:)
5365 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5366 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5367 ac_tool_warned=yes ;;
5368 esac
5369 AR=$ac_ct_AR
5370 fi
5371 fi
5372
5373 : ${AR=ar}
5374 : ${AR_FLAGS=cru}
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
5387 $as_echo_n "checking for archiver @FILE support... " >&6; }
5388 if ${lt_cv_ar_at_file+:} false; then :
5389 $as_echo_n "(cached) " >&6
5390 else
5391 lt_cv_ar_at_file=no
5392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5393 /* end confdefs.h. */
5394
5395 int
5396 main ()
5397 {
5398
5399 ;
5400 return 0;
5401 }
5402 _ACEOF
5403 if ac_fn_c_try_compile "$LINENO"; then :
5404 echo conftest.$ac_objext > conftest.lst
5405 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
5406 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
5407 (eval $lt_ar_try) 2>&5
5408 ac_status=$?
5409 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5410 test $ac_status = 0; }
5411 if test "$ac_status" -eq 0; then
5412 # Ensure the archiver fails upon bogus file names.
5413 rm -f conftest.$ac_objext libconftest.a
5414 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
5415 (eval $lt_ar_try) 2>&5
5416 ac_status=$?
5417 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5418 test $ac_status = 0; }
5419 if test "$ac_status" -ne 0; then
5420 lt_cv_ar_at_file=@
5421 fi
5422 fi
5423 rm -f conftest.* libconftest.a
5424
5425 fi
5426 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5427
5428 fi
5429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
5430 $as_echo "$lt_cv_ar_at_file" >&6; }
5431
5432 if test "x$lt_cv_ar_at_file" = xno; then
5433 archiver_list_spec=
5434 else
5435 archiver_list_spec=$lt_cv_ar_at_file
5436 fi
5437
5438
5439
5440
5441
5442
5443
5444 if test -n "$ac_tool_prefix"; then
5445 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
5446 set dummy ${ac_tool_prefix}strip; ac_word=$2
5447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5448 $as_echo_n "checking for $ac_word... " >&6; }
5449 if ${ac_cv_prog_STRIP+:} false; then :
5450 $as_echo_n "(cached) " >&6
5451 else
5452 if test -n "$STRIP"; then
5453 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
5454 else
5455 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5456 for as_dir in $PATH
5457 do
5458 IFS=$as_save_IFS
5459 test -z "$as_dir" && as_dir=.
5460 for ac_exec_ext in '' $ac_executable_extensions; do
5461 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5462 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
5463 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5464 break 2
5465 fi
5466 done
5467 done
5468 IFS=$as_save_IFS
5469
5470 fi
5471 fi
5472 STRIP=$ac_cv_prog_STRIP
5473 if test -n "$STRIP"; then
5474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
5475 $as_echo "$STRIP" >&6; }
5476 else
5477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5478 $as_echo "no" >&6; }
5479 fi
5480
5481
5482 fi
5483 if test -z "$ac_cv_prog_STRIP"; then
5484 ac_ct_STRIP=$STRIP
5485 # Extract the first word of "strip", so it can be a program name with args.
5486 set dummy strip; ac_word=$2
5487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5488 $as_echo_n "checking for $ac_word... " >&6; }
5489 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
5490 $as_echo_n "(cached) " >&6
5491 else
5492 if test -n "$ac_ct_STRIP"; then
5493 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
5494 else
5495 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5496 for as_dir in $PATH
5497 do
5498 IFS=$as_save_IFS
5499 test -z "$as_dir" && as_dir=.
5500 for ac_exec_ext in '' $ac_executable_extensions; do
5501 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5502 ac_cv_prog_ac_ct_STRIP="strip"
5503 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5504 break 2
5505 fi
5506 done
5507 done
5508 IFS=$as_save_IFS
5509
5510 fi
5511 fi
5512 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5513 if test -n "$ac_ct_STRIP"; then
5514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
5515 $as_echo "$ac_ct_STRIP" >&6; }
5516 else
5517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5518 $as_echo "no" >&6; }
5519 fi
5520
5521 if test "x$ac_ct_STRIP" = x; then
5522 STRIP=":"
5523 else
5524 case $cross_compiling:$ac_tool_warned in
5525 yes:)
5526 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5527 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5528 ac_tool_warned=yes ;;
5529 esac
5530 STRIP=$ac_ct_STRIP
5531 fi
5532 else
5533 STRIP="$ac_cv_prog_STRIP"
5534 fi
5535
5536 test -z "$STRIP" && STRIP=:
5537
5538
5539
5540
5541
5542
5543 if test -n "$ac_tool_prefix"; then
5544 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5545 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5547 $as_echo_n "checking for $ac_word... " >&6; }
5548 if ${ac_cv_prog_RANLIB+:} false; then :
5549 $as_echo_n "(cached) " >&6
5550 else
5551 if test -n "$RANLIB"; then
5552 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5553 else
5554 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5555 for as_dir in $PATH
5556 do
5557 IFS=$as_save_IFS
5558 test -z "$as_dir" && as_dir=.
5559 for ac_exec_ext in '' $ac_executable_extensions; do
5560 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5561 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5562 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5563 break 2
5564 fi
5565 done
5566 done
5567 IFS=$as_save_IFS
5568
5569 fi
5570 fi
5571 RANLIB=$ac_cv_prog_RANLIB
5572 if test -n "$RANLIB"; then
5573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5574 $as_echo "$RANLIB" >&6; }
5575 else
5576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5577 $as_echo "no" >&6; }
5578 fi
5579
5580
5581 fi
5582 if test -z "$ac_cv_prog_RANLIB"; then
5583 ac_ct_RANLIB=$RANLIB
5584 # Extract the first word of "ranlib", so it can be a program name with args.
5585 set dummy ranlib; ac_word=$2
5586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5587 $as_echo_n "checking for $ac_word... " >&6; }
5588 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
5589 $as_echo_n "(cached) " >&6
5590 else
5591 if test -n "$ac_ct_RANLIB"; then
5592 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5593 else
5594 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5595 for as_dir in $PATH
5596 do
5597 IFS=$as_save_IFS
5598 test -z "$as_dir" && as_dir=.
5599 for ac_exec_ext in '' $ac_executable_extensions; do
5600 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5601 ac_cv_prog_ac_ct_RANLIB="ranlib"
5602 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5603 break 2
5604 fi
5605 done
5606 done
5607 IFS=$as_save_IFS
5608
5609 fi
5610 fi
5611 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5612 if test -n "$ac_ct_RANLIB"; then
5613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5614 $as_echo "$ac_ct_RANLIB" >&6; }
5615 else
5616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5617 $as_echo "no" >&6; }
5618 fi
5619
5620 if test "x$ac_ct_RANLIB" = x; then
5621 RANLIB=":"
5622 else
5623 case $cross_compiling:$ac_tool_warned in
5624 yes:)
5625 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5626 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5627 ac_tool_warned=yes ;;
5628 esac
5629 RANLIB=$ac_ct_RANLIB
5630 fi
5631 else
5632 RANLIB="$ac_cv_prog_RANLIB"
5633 fi
5634
5635 test -z "$RANLIB" && RANLIB=:
5636
5637
5638
5639
5640
5641
5642 # Determine commands to create old-style static archives.
5643 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
5644 old_postinstall_cmds='chmod 644 $oldlib'
5645 old_postuninstall_cmds=
5646
5647 if test -n "$RANLIB"; then
5648 case $host_os in
5649 openbsd*)
5650 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
5651 ;;
5652 *)
5653 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
5654 ;;
5655 esac
5656 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
5657 fi
5658
5659 case $host_os in
5660 darwin*)
5661 lock_old_archive_extraction=yes ;;
5662 *)
5663 lock_old_archive_extraction=no ;;
5664 esac
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704 # If no C compiler was specified, use CC.
5705 LTCC=${LTCC-"$CC"}
5706
5707 # If no C compiler flags were specified, use CFLAGS.
5708 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
5709
5710 # Allow CC to be a program name with arguments.
5711 compiler=$CC
5712
5713
5714 # Check for command to grab the raw symbol name followed by C symbol from nm.
5715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
5716 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
5717 if ${lt_cv_sys_global_symbol_pipe+:} false; then :
5718 $as_echo_n "(cached) " >&6
5719 else
5720
5721 # These are sane defaults that work on at least a few old systems.
5722 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
5723
5724 # Character class describing NM global symbol codes.
5725 symcode='[BCDEGRST]'
5726
5727 # Regexp to match symbols that can be accessed directly from C.
5728 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
5729
5730 # Define system-specific variables.
5731 case $host_os in
5732 aix*)
5733 symcode='[BCDT]'
5734 ;;
5735 cygwin* | mingw* | pw32* | cegcc*)
5736 symcode='[ABCDGISTW]'
5737 ;;
5738 hpux*)
5739 if test "$host_cpu" = ia64; then
5740 symcode='[ABCDEGRST]'
5741 fi
5742 ;;
5743 irix* | nonstopux*)
5744 symcode='[BCDEGRST]'
5745 ;;
5746 osf*)
5747 symcode='[BCDEGQRST]'
5748 ;;
5749 solaris*)
5750 symcode='[BDRT]'
5751 ;;
5752 sco3.2v5*)
5753 symcode='[DT]'
5754 ;;
5755 sysv4.2uw2*)
5756 symcode='[DT]'
5757 ;;
5758 sysv5* | sco5v6* | unixware* | OpenUNIX*)
5759 symcode='[ABDT]'
5760 ;;
5761 sysv4)
5762 symcode='[DFNSTU]'
5763 ;;
5764 esac
5765
5766 # If we're using GNU nm, then use its standard symbol codes.
5767 case `$NM -V 2>&1` in
5768 *GNU* | *'with BFD'*)
5769 symcode='[ABCDGIRSTW]' ;;
5770 esac
5771
5772 # Transform an extracted symbol line into a proper C declaration.
5773 # Some systems (esp. on ia64) link data and code symbols differently,
5774 # so use this general approach.
5775 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5776
5777 # Transform an extracted symbol line into symbol name and symbol address
5778 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
5779 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
5780
5781 # Handle CRLF in mingw tool chain
5782 opt_cr=
5783 case $build_os in
5784 mingw*)
5785 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5786 ;;
5787 esac
5788
5789 # Try without a prefix underscore, then with it.
5790 for ac_symprfx in "" "_"; do
5791
5792 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5793 symxfrm="\\1 $ac_symprfx\\2 \\2"
5794
5795 # Write the raw and C identifiers.
5796 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
5797 # Fake it for dumpbin and say T for any non-static function
5798 # and D for any global variable.
5799 # Also find C++ and __fastcall symbols from MSVC++,
5800 # which start with @ or ?.
5801 lt_cv_sys_global_symbol_pipe="$AWK '"\
5802 " {last_section=section; section=\$ 3};"\
5803 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
5804 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
5805 " \$ 0!~/External *\|/{next};"\
5806 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
5807 " {if(hide[section]) next};"\
5808 " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
5809 " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
5810 " s[1]~/^[@?]/{print s[1], s[1]; next};"\
5811 " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
5812 " ' prfx=^$ac_symprfx"
5813 else
5814 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
5815 fi
5816 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
5817
5818 # Check to see that the pipe works correctly.
5819 pipe_works=no
5820
5821 rm -f conftest*
5822 cat > conftest.$ac_ext <<_LT_EOF
5823 #ifdef __cplusplus
5824 extern "C" {
5825 #endif
5826 char nm_test_var;
5827 void nm_test_func(void);
5828 void nm_test_func(void){}
5829 #ifdef __cplusplus
5830 }
5831 #endif
5832 int main(){nm_test_var='a';nm_test_func();return(0);}
5833 _LT_EOF
5834
5835 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
5836 (eval $ac_compile) 2>&5
5837 ac_status=$?
5838 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5839 test $ac_status = 0; }; then
5840 # Now try to grab the symbols.
5841 nlist=conftest.nm
5842 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
5843 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
5844 ac_status=$?
5845 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5846 test $ac_status = 0; } && test -s "$nlist"; then
5847 # Try sorting and uniquifying the output.
5848 if sort "$nlist" | uniq > "$nlist"T; then
5849 mv -f "$nlist"T "$nlist"
5850 else
5851 rm -f "$nlist"T
5852 fi
5853
5854 # Make sure that we snagged all the symbols we need.
5855 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
5856 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
5857 cat <<_LT_EOF > conftest.$ac_ext
5858 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
5859 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
5860 /* DATA imports from DLLs on WIN32 con't be const, because runtime
5861 relocations are performed -- see ld's documentation on pseudo-relocs. */
5862 # define LT_DLSYM_CONST
5863 #elif defined(__osf__)
5864 /* This system does not cope well with relocations in const data. */
5865 # define LT_DLSYM_CONST
5866 #else
5867 # define LT_DLSYM_CONST const
5868 #endif
5869
5870 #ifdef __cplusplus
5871 extern "C" {
5872 #endif
5873
5874 _LT_EOF
5875 # Now generate the symbol file.
5876 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
5877
5878 cat <<_LT_EOF >> conftest.$ac_ext
5879
5880 /* The mapping between symbol names and symbols. */
5881 LT_DLSYM_CONST struct {
5882 const char *name;
5883 void *address;
5884 }
5885 lt__PROGRAM__LTX_preloaded_symbols[] =
5886 {
5887 { "@PROGRAM@", (void *) 0 },
5888 _LT_EOF
5889 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
5890 cat <<\_LT_EOF >> conftest.$ac_ext
5891 {0, (void *) 0}
5892 };
5893
5894 /* This works around a problem in FreeBSD linker */
5895 #ifdef FREEBSD_WORKAROUND
5896 static const void *lt_preloaded_setup() {
5897 return lt__PROGRAM__LTX_preloaded_symbols;
5898 }
5899 #endif
5900
5901 #ifdef __cplusplus
5902 }
5903 #endif
5904 _LT_EOF
5905 # Now try linking the two files.
5906 mv conftest.$ac_objext conftstm.$ac_objext
5907 lt_globsym_save_LIBS=$LIBS
5908 lt_globsym_save_CFLAGS=$CFLAGS
5909 LIBS="conftstm.$ac_objext"
5910 CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
5911 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
5912 (eval $ac_link) 2>&5
5913 ac_status=$?
5914 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5915 test $ac_status = 0; } && test -s conftest${ac_exeext}; then
5916 pipe_works=yes
5917 fi
5918 LIBS=$lt_globsym_save_LIBS
5919 CFLAGS=$lt_globsym_save_CFLAGS
5920 else
5921 echo "cannot find nm_test_func in $nlist" >&5
5922 fi
5923 else
5924 echo "cannot find nm_test_var in $nlist" >&5
5925 fi
5926 else
5927 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
5928 fi
5929 else
5930 echo "$progname: failed program was:" >&5
5931 cat conftest.$ac_ext >&5
5932 fi
5933 rm -rf conftest* conftst*
5934
5935 # Do not use the global_symbol_pipe unless it works.
5936 if test "$pipe_works" = yes; then
5937 break
5938 else
5939 lt_cv_sys_global_symbol_pipe=
5940 fi
5941 done
5942
5943 fi
5944
5945 if test -z "$lt_cv_sys_global_symbol_pipe"; then
5946 lt_cv_sys_global_symbol_to_cdecl=
5947 fi
5948 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5950 $as_echo "failed" >&6; }
5951 else
5952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
5953 $as_echo "ok" >&6; }
5954 fi
5955
5956 # Response file support.
5957 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
5958 nm_file_list_spec='@'
5959 elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
5960 nm_file_list_spec='@'
5961 fi
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
5990 $as_echo_n "checking for sysroot... " >&6; }
5991
5992 # Check whether --with-sysroot was given.
5993 if test "${with_sysroot+set}" = set; then :
5994 withval=$with_sysroot;
5995 else
5996 with_sysroot=no
5997 fi
5998
5999
6000 lt_sysroot=
6001 case ${with_sysroot} in #(
6002 yes)
6003 if test "$GCC" = yes; then
6004 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
6005 fi
6006 ;; #(
6007 /*)
6008 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
6009 ;; #(
6010 no|'')
6011 ;; #(
6012 *)
6013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5
6014 $as_echo "${with_sysroot}" >&6; }
6015 as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
6016 ;;
6017 esac
6018
6019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
6020 $as_echo "${lt_sysroot:-no}" >&6; }
6021
6022
6023
6024
6025
6026 # Check whether --enable-libtool-lock was given.
6027 if test "${enable_libtool_lock+set}" = set; then :
6028 enableval=$enable_libtool_lock;
6029 fi
6030
6031 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
6032
6033 # Some flags need to be propagated to the compiler or linker for good
6034 # libtool support.
6035 case $host in
6036 ia64-*-hpux*)
6037 # Find out which ABI we are using.
6038 echo 'int i;' > conftest.$ac_ext
6039 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6040 (eval $ac_compile) 2>&5
6041 ac_status=$?
6042 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6043 test $ac_status = 0; }; then
6044 case `/usr/bin/file conftest.$ac_objext` in
6045 *ELF-32*)
6046 HPUX_IA64_MODE="32"
6047 ;;
6048 *ELF-64*)
6049 HPUX_IA64_MODE="64"
6050 ;;
6051 esac
6052 fi
6053 rm -rf conftest*
6054 ;;
6055 *-*-irix6*)
6056 # Find out which ABI we are using.
6057 echo '#line '$LINENO' "configure"' > conftest.$ac_ext
6058 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6059 (eval $ac_compile) 2>&5
6060 ac_status=$?
6061 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6062 test $ac_status = 0; }; then
6063 if test "$lt_cv_prog_gnu_ld" = yes; then
6064 case `/usr/bin/file conftest.$ac_objext` in
6065 *32-bit*)
6066 LD="${LD-ld} -melf32bsmip"
6067 ;;
6068 *N32*)
6069 LD="${LD-ld} -melf32bmipn32"
6070 ;;
6071 *64-bit*)
6072 LD="${LD-ld} -melf64bmip"
6073 ;;
6074 esac
6075 else
6076 case `/usr/bin/file conftest.$ac_objext` in
6077 *32-bit*)
6078 LD="${LD-ld} -32"
6079 ;;
6080 *N32*)
6081 LD="${LD-ld} -n32"
6082 ;;
6083 *64-bit*)
6084 LD="${LD-ld} -64"
6085 ;;
6086 esac
6087 fi
6088 fi
6089 rm -rf conftest*
6090 ;;
6091
6092 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
6093 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
6094 # Find out which ABI we are using.
6095 echo 'int i;' > conftest.$ac_ext
6096 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6097 (eval $ac_compile) 2>&5
6098 ac_status=$?
6099 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6100 test $ac_status = 0; }; then
6101 case `/usr/bin/file conftest.o` in
6102 *32-bit*)
6103 case $host in
6104 x86_64-*kfreebsd*-gnu)
6105 LD="${LD-ld} -m elf_i386_fbsd"
6106 ;;
6107 x86_64-*linux*)
6108 case `/usr/bin/file conftest.o` in
6109 *x86-64*)
6110 LD="${LD-ld} -m elf32_x86_64"
6111 ;;
6112 *)
6113 LD="${LD-ld} -m elf_i386"
6114 ;;
6115 esac
6116 ;;
6117 ppc64-*linux*|powerpc64-*linux*)
6118 LD="${LD-ld} -m elf32ppclinux"
6119 ;;
6120 s390x-*linux*)
6121 LD="${LD-ld} -m elf_s390"
6122 ;;
6123 sparc64-*linux*)
6124 LD="${LD-ld} -m elf32_sparc"
6125 ;;
6126 esac
6127 ;;
6128 *64-bit*)
6129 case $host in
6130 x86_64-*kfreebsd*-gnu)
6131 LD="${LD-ld} -m elf_x86_64_fbsd"
6132 ;;
6133 x86_64-*linux*)
6134 LD="${LD-ld} -m elf_x86_64"
6135 ;;
6136 ppc*-*linux*|powerpc*-*linux*)
6137 LD="${LD-ld} -m elf64ppc"
6138 ;;
6139 s390*-*linux*|s390*-*tpf*)
6140 LD="${LD-ld} -m elf64_s390"
6141 ;;
6142 sparc*-*linux*)
6143 LD="${LD-ld} -m elf64_sparc"
6144 ;;
6145 esac
6146 ;;
6147 esac
6148 fi
6149 rm -rf conftest*
6150 ;;
6151
6152 *-*-sco3.2v5*)
6153 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
6154 SAVE_CFLAGS="$CFLAGS"
6155 CFLAGS="$CFLAGS -belf"
6156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
6157 $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
6158 if ${lt_cv_cc_needs_belf+:} false; then :
6159 $as_echo_n "(cached) " >&6
6160 else
6161 ac_ext=c
6162 ac_cpp='$CPP $CPPFLAGS'
6163 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6164 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6165 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6166
6167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6168 /* end confdefs.h. */
6169
6170 int
6171 main ()
6172 {
6173
6174 ;
6175 return 0;
6176 }
6177 _ACEOF
6178 if ac_fn_c_try_link "$LINENO"; then :
6179 lt_cv_cc_needs_belf=yes
6180 else
6181 lt_cv_cc_needs_belf=no
6182 fi
6183 rm -f core conftest.err conftest.$ac_objext \
6184 conftest$ac_exeext conftest.$ac_ext
6185 ac_ext=c
6186 ac_cpp='$CPP $CPPFLAGS'
6187 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6188 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6189 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6190
6191 fi
6192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
6193 $as_echo "$lt_cv_cc_needs_belf" >&6; }
6194 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
6195 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
6196 CFLAGS="$SAVE_CFLAGS"
6197 fi
6198 ;;
6199 *-*solaris*)
6200 # Find out which ABI we are using.
6201 echo 'int i;' > conftest.$ac_ext
6202 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6203 (eval $ac_compile) 2>&5
6204 ac_status=$?
6205 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6206 test $ac_status = 0; }; then
6207 case `/usr/bin/file conftest.o` in
6208 *64-bit*)
6209 case $lt_cv_prog_gnu_ld in
6210 yes*)
6211 case $host in
6212 i?86-*-solaris*)
6213 LD="${LD-ld} -m elf_x86_64"
6214 ;;
6215 sparc*-*-solaris*)
6216 LD="${LD-ld} -m elf64_sparc"
6217 ;;
6218 esac
6219 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
6220 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
6221 LD="${LD-ld}_sol2"
6222 fi
6223 ;;
6224 *)
6225 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
6226 LD="${LD-ld} -64"
6227 fi
6228 ;;
6229 esac
6230 ;;
6231 esac
6232 fi
6233 rm -rf conftest*
6234 ;;
6235 esac
6236
6237 need_locks="$enable_libtool_lock"
6238
6239 if test -n "$ac_tool_prefix"; then
6240 # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
6241 set dummy ${ac_tool_prefix}mt; ac_word=$2
6242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6243 $as_echo_n "checking for $ac_word... " >&6; }
6244 if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
6245 $as_echo_n "(cached) " >&6
6246 else
6247 if test -n "$MANIFEST_TOOL"; then
6248 ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
6249 else
6250 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6251 for as_dir in $PATH
6252 do
6253 IFS=$as_save_IFS
6254 test -z "$as_dir" && as_dir=.
6255 for ac_exec_ext in '' $ac_executable_extensions; do
6256 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6257 ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
6258 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6259 break 2
6260 fi
6261 done
6262 done
6263 IFS=$as_save_IFS
6264
6265 fi
6266 fi
6267 MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
6268 if test -n "$MANIFEST_TOOL"; then
6269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
6270 $as_echo "$MANIFEST_TOOL" >&6; }
6271 else
6272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6273 $as_echo "no" >&6; }
6274 fi
6275
6276
6277 fi
6278 if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
6279 ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
6280 # Extract the first word of "mt", so it can be a program name with args.
6281 set dummy mt; ac_word=$2
6282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6283 $as_echo_n "checking for $ac_word... " >&6; }
6284 if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
6285 $as_echo_n "(cached) " >&6
6286 else
6287 if test -n "$ac_ct_MANIFEST_TOOL"; then
6288 ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
6289 else
6290 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6291 for as_dir in $PATH
6292 do
6293 IFS=$as_save_IFS
6294 test -z "$as_dir" && as_dir=.
6295 for ac_exec_ext in '' $ac_executable_extensions; do
6296 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6297 ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
6298 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6299 break 2
6300 fi
6301 done
6302 done
6303 IFS=$as_save_IFS
6304
6305 fi
6306 fi
6307 ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
6308 if test -n "$ac_ct_MANIFEST_TOOL"; then
6309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
6310 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
6311 else
6312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6313 $as_echo "no" >&6; }
6314 fi
6315
6316 if test "x$ac_ct_MANIFEST_TOOL" = x; then
6317 MANIFEST_TOOL=":"
6318 else
6319 case $cross_compiling:$ac_tool_warned in
6320 yes:)
6321 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6322 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6323 ac_tool_warned=yes ;;
6324 esac
6325 MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
6326 fi
6327 else
6328 MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
6329 fi
6330
6331 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
6332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
6333 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
6334 if ${lt_cv_path_mainfest_tool+:} false; then :
6335 $as_echo_n "(cached) " >&6
6336 else
6337 lt_cv_path_mainfest_tool=no
6338 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
6339 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
6340 cat conftest.err >&5
6341 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
6342 lt_cv_path_mainfest_tool=yes
6343 fi
6344 rm -f conftest*
6345 fi
6346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
6347 $as_echo "$lt_cv_path_mainfest_tool" >&6; }
6348 if test "x$lt_cv_path_mainfest_tool" != xyes; then
6349 MANIFEST_TOOL=:
6350 fi
6351
6352
6353
6354
6355
6356
6357 case $host_os in
6358 rhapsody* | darwin*)
6359 if test -n "$ac_tool_prefix"; then
6360 # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
6361 set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
6362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6363 $as_echo_n "checking for $ac_word... " >&6; }
6364 if ${ac_cv_prog_DSYMUTIL+:} false; then :
6365 $as_echo_n "(cached) " >&6
6366 else
6367 if test -n "$DSYMUTIL"; then
6368 ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
6369 else
6370 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6371 for as_dir in $PATH
6372 do
6373 IFS=$as_save_IFS
6374 test -z "$as_dir" && as_dir=.
6375 for ac_exec_ext in '' $ac_executable_extensions; do
6376 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6377 ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
6378 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6379 break 2
6380 fi
6381 done
6382 done
6383 IFS=$as_save_IFS
6384
6385 fi
6386 fi
6387 DSYMUTIL=$ac_cv_prog_DSYMUTIL
6388 if test -n "$DSYMUTIL"; then
6389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
6390 $as_echo "$DSYMUTIL" >&6; }
6391 else
6392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6393 $as_echo "no" >&6; }
6394 fi
6395
6396
6397 fi
6398 if test -z "$ac_cv_prog_DSYMUTIL"; then
6399 ac_ct_DSYMUTIL=$DSYMUTIL
6400 # Extract the first word of "dsymutil", so it can be a program name with args.
6401 set dummy dsymutil; ac_word=$2
6402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6403 $as_echo_n "checking for $ac_word... " >&6; }
6404 if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
6405 $as_echo_n "(cached) " >&6
6406 else
6407 if test -n "$ac_ct_DSYMUTIL"; then
6408 ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
6409 else
6410 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6411 for as_dir in $PATH
6412 do
6413 IFS=$as_save_IFS
6414 test -z "$as_dir" && as_dir=.
6415 for ac_exec_ext in '' $ac_executable_extensions; do
6416 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6417 ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
6418 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6419 break 2
6420 fi
6421 done
6422 done
6423 IFS=$as_save_IFS
6424
6425 fi
6426 fi
6427 ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
6428 if test -n "$ac_ct_DSYMUTIL"; then
6429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
6430 $as_echo "$ac_ct_DSYMUTIL" >&6; }
6431 else
6432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6433 $as_echo "no" >&6; }
6434 fi
6435
6436 if test "x$ac_ct_DSYMUTIL" = x; then
6437 DSYMUTIL=":"
6438 else
6439 case $cross_compiling:$ac_tool_warned in
6440 yes:)
6441 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6442 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6443 ac_tool_warned=yes ;;
6444 esac
6445 DSYMUTIL=$ac_ct_DSYMUTIL
6446 fi
6447 else
6448 DSYMUTIL="$ac_cv_prog_DSYMUTIL"
6449 fi
6450
6451 if test -n "$ac_tool_prefix"; then
6452 # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
6453 set dummy ${ac_tool_prefix}nmedit; ac_word=$2
6454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6455 $as_echo_n "checking for $ac_word... " >&6; }
6456 if ${ac_cv_prog_NMEDIT+:} false; then :
6457 $as_echo_n "(cached) " >&6
6458 else
6459 if test -n "$NMEDIT"; then
6460 ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
6461 else
6462 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6463 for as_dir in $PATH
6464 do
6465 IFS=$as_save_IFS
6466 test -z "$as_dir" && as_dir=.
6467 for ac_exec_ext in '' $ac_executable_extensions; do
6468 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6469 ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
6470 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6471 break 2
6472 fi
6473 done
6474 done
6475 IFS=$as_save_IFS
6476
6477 fi
6478 fi
6479 NMEDIT=$ac_cv_prog_NMEDIT
6480 if test -n "$NMEDIT"; then
6481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
6482 $as_echo "$NMEDIT" >&6; }
6483 else
6484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6485 $as_echo "no" >&6; }
6486 fi
6487
6488
6489 fi
6490 if test -z "$ac_cv_prog_NMEDIT"; then
6491 ac_ct_NMEDIT=$NMEDIT
6492 # Extract the first word of "nmedit", so it can be a program name with args.
6493 set dummy nmedit; ac_word=$2
6494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6495 $as_echo_n "checking for $ac_word... " >&6; }
6496 if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
6497 $as_echo_n "(cached) " >&6
6498 else
6499 if test -n "$ac_ct_NMEDIT"; then
6500 ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
6501 else
6502 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6503 for as_dir in $PATH
6504 do
6505 IFS=$as_save_IFS
6506 test -z "$as_dir" && as_dir=.
6507 for ac_exec_ext in '' $ac_executable_extensions; do
6508 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6509 ac_cv_prog_ac_ct_NMEDIT="nmedit"
6510 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6511 break 2
6512 fi
6513 done
6514 done
6515 IFS=$as_save_IFS
6516
6517 fi
6518 fi
6519 ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
6520 if test -n "$ac_ct_NMEDIT"; then
6521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
6522 $as_echo "$ac_ct_NMEDIT" >&6; }
6523 else
6524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6525 $as_echo "no" >&6; }
6526 fi
6527
6528 if test "x$ac_ct_NMEDIT" = x; then
6529 NMEDIT=":"
6530 else
6531 case $cross_compiling:$ac_tool_warned in
6532 yes:)
6533 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6534 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6535 ac_tool_warned=yes ;;
6536 esac
6537 NMEDIT=$ac_ct_NMEDIT
6538 fi
6539 else
6540 NMEDIT="$ac_cv_prog_NMEDIT"
6541 fi
6542
6543 if test -n "$ac_tool_prefix"; then
6544 # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
6545 set dummy ${ac_tool_prefix}lipo; ac_word=$2
6546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6547 $as_echo_n "checking for $ac_word... " >&6; }
6548 if ${ac_cv_prog_LIPO+:} false; then :
6549 $as_echo_n "(cached) " >&6
6550 else
6551 if test -n "$LIPO"; then
6552 ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
6553 else
6554 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6555 for as_dir in $PATH
6556 do
6557 IFS=$as_save_IFS
6558 test -z "$as_dir" && as_dir=.
6559 for ac_exec_ext in '' $ac_executable_extensions; do
6560 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6561 ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
6562 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6563 break 2
6564 fi
6565 done
6566 done
6567 IFS=$as_save_IFS
6568
6569 fi
6570 fi
6571 LIPO=$ac_cv_prog_LIPO
6572 if test -n "$LIPO"; then
6573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
6574 $as_echo "$LIPO" >&6; }
6575 else
6576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6577 $as_echo "no" >&6; }
6578 fi
6579
6580
6581 fi
6582 if test -z "$ac_cv_prog_LIPO"; then
6583 ac_ct_LIPO=$LIPO
6584 # Extract the first word of "lipo", so it can be a program name with args.
6585 set dummy lipo; ac_word=$2
6586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6587 $as_echo_n "checking for $ac_word... " >&6; }
6588 if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
6589 $as_echo_n "(cached) " >&6
6590 else
6591 if test -n "$ac_ct_LIPO"; then
6592 ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
6593 else
6594 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6595 for as_dir in $PATH
6596 do
6597 IFS=$as_save_IFS
6598 test -z "$as_dir" && as_dir=.
6599 for ac_exec_ext in '' $ac_executable_extensions; do
6600 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6601 ac_cv_prog_ac_ct_LIPO="lipo"
6602 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6603 break 2
6604 fi
6605 done
6606 done
6607 IFS=$as_save_IFS
6608
6609 fi
6610 fi
6611 ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
6612 if test -n "$ac_ct_LIPO"; then
6613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
6614 $as_echo "$ac_ct_LIPO" >&6; }
6615 else
6616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6617 $as_echo "no" >&6; }
6618 fi
6619
6620 if test "x$ac_ct_LIPO" = x; then
6621 LIPO=":"
6622 else
6623 case $cross_compiling:$ac_tool_warned in
6624 yes:)
6625 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6626 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6627 ac_tool_warned=yes ;;
6628 esac
6629 LIPO=$ac_ct_LIPO
6630 fi
6631 else
6632 LIPO="$ac_cv_prog_LIPO"
6633 fi
6634
6635 if test -n "$ac_tool_prefix"; then
6636 # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
6637 set dummy ${ac_tool_prefix}otool; ac_word=$2
6638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6639 $as_echo_n "checking for $ac_word... " >&6; }
6640 if ${ac_cv_prog_OTOOL+:} false; then :
6641 $as_echo_n "(cached) " >&6
6642 else
6643 if test -n "$OTOOL"; then
6644 ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
6645 else
6646 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6647 for as_dir in $PATH
6648 do
6649 IFS=$as_save_IFS
6650 test -z "$as_dir" && as_dir=.
6651 for ac_exec_ext in '' $ac_executable_extensions; do
6652 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6653 ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
6654 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6655 break 2
6656 fi
6657 done
6658 done
6659 IFS=$as_save_IFS
6660
6661 fi
6662 fi
6663 OTOOL=$ac_cv_prog_OTOOL
6664 if test -n "$OTOOL"; then
6665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
6666 $as_echo "$OTOOL" >&6; }
6667 else
6668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6669 $as_echo "no" >&6; }
6670 fi
6671
6672
6673 fi
6674 if test -z "$ac_cv_prog_OTOOL"; then
6675 ac_ct_OTOOL=$OTOOL
6676 # Extract the first word of "otool", so it can be a program name with args.
6677 set dummy otool; ac_word=$2
6678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6679 $as_echo_n "checking for $ac_word... " >&6; }
6680 if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
6681 $as_echo_n "(cached) " >&6
6682 else
6683 if test -n "$ac_ct_OTOOL"; then
6684 ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
6685 else
6686 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6687 for as_dir in $PATH
6688 do
6689 IFS=$as_save_IFS
6690 test -z "$as_dir" && as_dir=.
6691 for ac_exec_ext in '' $ac_executable_extensions; do
6692 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6693 ac_cv_prog_ac_ct_OTOOL="otool"
6694 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6695 break 2
6696 fi
6697 done
6698 done
6699 IFS=$as_save_IFS
6700
6701 fi
6702 fi
6703 ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
6704 if test -n "$ac_ct_OTOOL"; then
6705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
6706 $as_echo "$ac_ct_OTOOL" >&6; }
6707 else
6708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6709 $as_echo "no" >&6; }
6710 fi
6711
6712 if test "x$ac_ct_OTOOL" = x; then
6713 OTOOL=":"
6714 else
6715 case $cross_compiling:$ac_tool_warned in
6716 yes:)
6717 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6718 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6719 ac_tool_warned=yes ;;
6720 esac
6721 OTOOL=$ac_ct_OTOOL
6722 fi
6723 else
6724 OTOOL="$ac_cv_prog_OTOOL"
6725 fi
6726
6727 if test -n "$ac_tool_prefix"; then
6728 # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
6729 set dummy ${ac_tool_prefix}otool64; ac_word=$2
6730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6731 $as_echo_n "checking for $ac_word... " >&6; }
6732 if ${ac_cv_prog_OTOOL64+:} false; then :
6733 $as_echo_n "(cached) " >&6
6734 else
6735 if test -n "$OTOOL64"; then
6736 ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
6737 else
6738 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6739 for as_dir in $PATH
6740 do
6741 IFS=$as_save_IFS
6742 test -z "$as_dir" && as_dir=.
6743 for ac_exec_ext in '' $ac_executable_extensions; do
6744 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6745 ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
6746 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6747 break 2
6748 fi
6749 done
6750 done
6751 IFS=$as_save_IFS
6752
6753 fi
6754 fi
6755 OTOOL64=$ac_cv_prog_OTOOL64
6756 if test -n "$OTOOL64"; then
6757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
6758 $as_echo "$OTOOL64" >&6; }
6759 else
6760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6761 $as_echo "no" >&6; }
6762 fi
6763
6764
6765 fi
6766 if test -z "$ac_cv_prog_OTOOL64"; then
6767 ac_ct_OTOOL64=$OTOOL64
6768 # Extract the first word of "otool64", so it can be a program name with args.
6769 set dummy otool64; ac_word=$2
6770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6771 $as_echo_n "checking for $ac_word... " >&6; }
6772 if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
6773 $as_echo_n "(cached) " >&6
6774 else
6775 if test -n "$ac_ct_OTOOL64"; then
6776 ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
6777 else
6778 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6779 for as_dir in $PATH
6780 do
6781 IFS=$as_save_IFS
6782 test -z "$as_dir" && as_dir=.
6783 for ac_exec_ext in '' $ac_executable_extensions; do
6784 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6785 ac_cv_prog_ac_ct_OTOOL64="otool64"
6786 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6787 break 2
6788 fi
6789 done
6790 done
6791 IFS=$as_save_IFS
6792
6793 fi
6794 fi
6795 ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
6796 if test -n "$ac_ct_OTOOL64"; then
6797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
6798 $as_echo "$ac_ct_OTOOL64" >&6; }
6799 else
6800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6801 $as_echo "no" >&6; }
6802 fi
6803
6804 if test "x$ac_ct_OTOOL64" = x; then
6805 OTOOL64=":"
6806 else
6807 case $cross_compiling:$ac_tool_warned in
6808 yes:)
6809 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6810 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6811 ac_tool_warned=yes ;;
6812 esac
6813 OTOOL64=$ac_ct_OTOOL64
6814 fi
6815 else
6816 OTOOL64="$ac_cv_prog_OTOOL64"
6817 fi
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
6846 $as_echo_n "checking for -single_module linker flag... " >&6; }
6847 if ${lt_cv_apple_cc_single_mod+:} false; then :
6848 $as_echo_n "(cached) " >&6
6849 else
6850 lt_cv_apple_cc_single_mod=no
6851 if test -z "${LT_MULTI_MODULE}"; then
6852 # By default we will add the -single_module flag. You can override
6853 # by either setting the environment variable LT_MULTI_MODULE
6854 # non-empty at configure time, or by adding -multi_module to the
6855 # link flags.
6856 rm -rf libconftest.dylib*
6857 echo "int foo(void){return 1;}" > conftest.c
6858 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
6859 -dynamiclib -Wl,-single_module conftest.c" >&5
6860 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
6861 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
6862 _lt_result=$?
6863 # If there is a non-empty error log, and "single_module"
6864 # appears in it, assume the flag caused a linker warning
6865 if test -s conftest.err && $GREP single_module conftest.err; then
6866 cat conftest.err >&5
6867 # Otherwise, if the output was created with a 0 exit code from
6868 # the compiler, it worked.
6869 elif test -f libconftest.dylib && test $_lt_result -eq 0; then
6870 lt_cv_apple_cc_single_mod=yes
6871 else
6872 cat conftest.err >&5
6873 fi
6874 rm -rf libconftest.dylib*
6875 rm -f conftest.*
6876 fi
6877 fi
6878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
6879 $as_echo "$lt_cv_apple_cc_single_mod" >&6; }
6880
6881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
6882 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
6883 if ${lt_cv_ld_exported_symbols_list+:} false; then :
6884 $as_echo_n "(cached) " >&6
6885 else
6886 lt_cv_ld_exported_symbols_list=no
6887 save_LDFLAGS=$LDFLAGS
6888 echo "_main" > conftest.sym
6889 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
6890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6891 /* end confdefs.h. */
6892
6893 int
6894 main ()
6895 {
6896
6897 ;
6898 return 0;
6899 }
6900 _ACEOF
6901 if ac_fn_c_try_link "$LINENO"; then :
6902 lt_cv_ld_exported_symbols_list=yes
6903 else
6904 lt_cv_ld_exported_symbols_list=no
6905 fi
6906 rm -f core conftest.err conftest.$ac_objext \
6907 conftest$ac_exeext conftest.$ac_ext
6908 LDFLAGS="$save_LDFLAGS"
6909
6910 fi
6911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
6912 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
6913
6914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
6915 $as_echo_n "checking for -force_load linker flag... " >&6; }
6916 if ${lt_cv_ld_force_load+:} false; then :
6917 $as_echo_n "(cached) " >&6
6918 else
6919 lt_cv_ld_force_load=no
6920 cat > conftest.c << _LT_EOF
6921 int forced_loaded() { return 2;}
6922 _LT_EOF
6923 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
6924 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
6925 echo "$AR cru libconftest.a conftest.o" >&5
6926 $AR cru libconftest.a conftest.o 2>&5
6927 echo "$RANLIB libconftest.a" >&5
6928 $RANLIB libconftest.a 2>&5
6929 cat > conftest.c << _LT_EOF
6930 int main() { return 0;}
6931 _LT_EOF
6932 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
6933 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
6934 _lt_result=$?
6935 if test -s conftest.err && $GREP force_load conftest.err; then
6936 cat conftest.err >&5
6937 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
6938 lt_cv_ld_force_load=yes
6939 else
6940 cat conftest.err >&5
6941 fi
6942 rm -f conftest.err libconftest.a conftest conftest.c
6943 rm -rf conftest.dSYM
6944
6945 fi
6946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
6947 $as_echo "$lt_cv_ld_force_load" >&6; }
6948 case $host_os in
6949 rhapsody* | darwin1.[012])
6950 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
6951 darwin1.*)
6952 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
6953 darwin*) # darwin 5.x on
6954 # if running on 10.5 or later, the deployment target defaults
6955 # to the OS version, if on x86, and 10.4, the deployment
6956 # target defaults to 10.4. Don't you love it?
6957 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
6958 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
6959 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
6960 10.[012]*)
6961 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
6962 10.*)
6963 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
6964 esac
6965 ;;
6966 esac
6967 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
6968 _lt_dar_single_mod='$single_module'
6969 fi
6970 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
6971 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
6972 else
6973 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
6974 fi
6975 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
6976 _lt_dsymutil='~$DSYMUTIL $lib || :'
6977 else
6978 _lt_dsymutil=
6979 fi
6980 ;;
6981 esac
6982
6983 ac_ext=c
6984 ac_cpp='$CPP $CPPFLAGS'
6985 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6986 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6987 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
6989 $as_echo_n "checking how to run the C preprocessor... " >&6; }
6990 # On Suns, sometimes $CPP names a directory.
6991 if test -n "$CPP" && test -d "$CPP"; then
6992 CPP=
6993 fi
6994 if test -z "$CPP"; then
6995 if ${ac_cv_prog_CPP+:} false; then :
6996 $as_echo_n "(cached) " >&6
6997 else
6998 # Double quotes because CPP needs to be expanded
6999 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7000 do
7001 ac_preproc_ok=false
7002 for ac_c_preproc_warn_flag in '' yes
7003 do
7004 # Use a header file that comes with gcc, so configuring glibc
7005 # with a fresh cross-compiler works.
7006 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7007 # <limits.h> exists even on freestanding compilers.
7008 # On the NeXT, cc -E runs the code through the compiler's parser,
7009 # not just through cpp. "Syntax error" is here to catch this case.
7010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7011 /* end confdefs.h. */
7012 #ifdef __STDC__
7013 # include <limits.h>
7014 #else
7015 # include <assert.h>
7016 #endif
7017 Syntax error
7018 _ACEOF
7019 if ac_fn_c_try_cpp "$LINENO"; then :
7020
7021 else
7022 # Broken: fails on valid input.
7023 continue
7024 fi
7025 rm -f conftest.err conftest.i conftest.$ac_ext
7026
7027 # OK, works on sane cases. Now check whether nonexistent headers
7028 # can be detected and how.
7029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7030 /* end confdefs.h. */
7031 #include <ac_nonexistent.h>
7032 _ACEOF
7033 if ac_fn_c_try_cpp "$LINENO"; then :
7034 # Broken: success on invalid input.
7035 continue
7036 else
7037 # Passes both tests.
7038 ac_preproc_ok=:
7039 break
7040 fi
7041 rm -f conftest.err conftest.i conftest.$ac_ext
7042
7043 done
7044 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7045 rm -f conftest.i conftest.err conftest.$ac_ext
7046 if $ac_preproc_ok; then :
7047 break
7048 fi
7049
7050 done
7051 ac_cv_prog_CPP=$CPP
7052
7053 fi
7054 CPP=$ac_cv_prog_CPP
7055 else
7056 ac_cv_prog_CPP=$CPP
7057 fi
7058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7059 $as_echo "$CPP" >&6; }
7060 ac_preproc_ok=false
7061 for ac_c_preproc_warn_flag in '' yes
7062 do
7063 # Use a header file that comes with gcc, so configuring glibc
7064 # with a fresh cross-compiler works.
7065 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7066 # <limits.h> exists even on freestanding compilers.
7067 # On the NeXT, cc -E runs the code through the compiler's parser,
7068 # not just through cpp. "Syntax error" is here to catch this case.
7069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7070 /* end confdefs.h. */
7071 #ifdef __STDC__
7072 # include <limits.h>
7073 #else
7074 # include <assert.h>
7075 #endif
7076 Syntax error
7077 _ACEOF
7078 if ac_fn_c_try_cpp "$LINENO"; then :
7079
7080 else
7081 # Broken: fails on valid input.
7082 continue
7083 fi
7084 rm -f conftest.err conftest.i conftest.$ac_ext
7085
7086 # OK, works on sane cases. Now check whether nonexistent headers
7087 # can be detected and how.
7088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7089 /* end confdefs.h. */
7090 #include <ac_nonexistent.h>
7091 _ACEOF
7092 if ac_fn_c_try_cpp "$LINENO"; then :
7093 # Broken: success on invalid input.
7094 continue
7095 else
7096 # Passes both tests.
7097 ac_preproc_ok=:
7098 break
7099 fi
7100 rm -f conftest.err conftest.i conftest.$ac_ext
7101
7102 done
7103 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7104 rm -f conftest.i conftest.err conftest.$ac_ext
7105 if $ac_preproc_ok; then :
7106
7107 else
7108 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7109 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7110 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
7111 See \`config.log' for more details" "$LINENO" 5; }
7112 fi
7113
7114 ac_ext=c
7115 ac_cpp='$CPP $CPPFLAGS'
7116 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7117 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7118 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7119
7120
7121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7122 $as_echo_n "checking for ANSI C header files... " >&6; }
7123 if ${ac_cv_header_stdc+:} false; then :
7124 $as_echo_n "(cached) " >&6
7125 else
7126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7127 /* end confdefs.h. */
7128 #include <stdlib.h>
7129 #include <stdarg.h>
7130 #include <string.h>
7131 #include <float.h>
7132
7133 int
7134 main ()
7135 {
7136
7137 ;
7138 return 0;
7139 }
7140 _ACEOF
7141 if ac_fn_c_try_compile "$LINENO"; then :
7142 ac_cv_header_stdc=yes
7143 else
7144 ac_cv_header_stdc=no
7145 fi
7146 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7147
7148 if test $ac_cv_header_stdc = yes; then
7149 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7151 /* end confdefs.h. */
7152 #include <string.h>
7153
7154 _ACEOF
7155 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7156 $EGREP "memchr" >/dev/null 2>&1; then :
7157
7158 else
7159 ac_cv_header_stdc=no
7160 fi
7161 rm -f conftest*
7162
7163 fi
7164
7165 if test $ac_cv_header_stdc = yes; then
7166 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7168 /* end confdefs.h. */
7169 #include <stdlib.h>
7170
7171 _ACEOF
7172 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7173 $EGREP "free" >/dev/null 2>&1; then :
7174
7175 else
7176 ac_cv_header_stdc=no
7177 fi
7178 rm -f conftest*
7179
7180 fi
7181
7182 if test $ac_cv_header_stdc = yes; then
7183 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7184 if test "$cross_compiling" = yes; then :
7185 :
7186 else
7187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7188 /* end confdefs.h. */
7189 #include <ctype.h>
7190 #include <stdlib.h>
7191 #if ((' ' & 0x0FF) == 0x020)
7192 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7193 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7194 #else
7195 # define ISLOWER(c) \
7196 (('a' <= (c) && (c) <= 'i') \
7197 || ('j' <= (c) && (c) <= 'r') \
7198 || ('s' <= (c) && (c) <= 'z'))
7199 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7200 #endif
7201
7202 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7203 int
7204 main ()
7205 {
7206 int i;
7207 for (i = 0; i < 256; i++)
7208 if (XOR (islower (i), ISLOWER (i))
7209 || toupper (i) != TOUPPER (i))
7210 return 2;
7211 return 0;
7212 }
7213 _ACEOF
7214 if ac_fn_c_try_run "$LINENO"; then :
7215
7216 else
7217 ac_cv_header_stdc=no
7218 fi
7219 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7220 conftest.$ac_objext conftest.beam conftest.$ac_ext
7221 fi
7222
7223 fi
7224 fi
7225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7226 $as_echo "$ac_cv_header_stdc" >&6; }
7227 if test $ac_cv_header_stdc = yes; then
7228
7229 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
7230
7231 fi
7232
7233 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
7234 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
7235 inttypes.h stdint.h unistd.h
7236 do :
7237 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7238 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7239 "
7240 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7241 cat >>confdefs.h <<_ACEOF
7242 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7243 _ACEOF
7244
7245 fi
7246
7247 done
7248
7249
7250 for ac_header in dlfcn.h
7251 do :
7252 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
7253 "
7254 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
7255 cat >>confdefs.h <<_ACEOF
7256 #define HAVE_DLFCN_H 1
7257 _ACEOF
7258
7259 fi
7260
7261 done
7262
7263
7264
7265
7266
7267 # Set options
7268
7269
7270
7271 enable_dlopen=no
7272
7273
7274 enable_win32_dll=no
7275
7276
7277 # Check whether --enable-shared was given.
7278 if test "${enable_shared+set}" = set; then :
7279 enableval=$enable_shared; p=${PACKAGE-default}
7280 case $enableval in
7281 yes) enable_shared=yes ;;
7282 no) enable_shared=no ;;
7283 *)
7284 enable_shared=no
7285 # Look at the argument we got. We use all the common list separators.
7286 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7287 for pkg in $enableval; do
7288 IFS="$lt_save_ifs"
7289 if test "X$pkg" = "X$p"; then
7290 enable_shared=yes
7291 fi
7292 done
7293 IFS="$lt_save_ifs"
7294 ;;
7295 esac
7296 else
7297 enable_shared=yes
7298 fi
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308 # Check whether --enable-static was given.
7309 if test "${enable_static+set}" = set; then :
7310 enableval=$enable_static; p=${PACKAGE-default}
7311 case $enableval in
7312 yes) enable_static=yes ;;
7313 no) enable_static=no ;;
7314 *)
7315 enable_static=no
7316 # Look at the argument we got. We use all the common list separators.
7317 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7318 for pkg in $enableval; do
7319 IFS="$lt_save_ifs"
7320 if test "X$pkg" = "X$p"; then
7321 enable_static=yes
7322 fi
7323 done
7324 IFS="$lt_save_ifs"
7325 ;;
7326 esac
7327 else
7328 enable_static=yes
7329 fi
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340 # Check whether --with-pic was given.
7341 if test "${with_pic+set}" = set; then :
7342 withval=$with_pic; lt_p=${PACKAGE-default}
7343 case $withval in
7344 yes|no) pic_mode=$withval ;;
7345 *)
7346 pic_mode=default
7347 # Look at the argument we got. We use all the common list separators.
7348 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7349 for lt_pkg in $withval; do
7350 IFS="$lt_save_ifs"
7351 if test "X$lt_pkg" = "X$lt_p"; then
7352 pic_mode=yes
7353 fi
7354 done
7355 IFS="$lt_save_ifs"
7356 ;;
7357 esac
7358 else
7359 pic_mode=default
7360 fi
7361
7362
7363 test -z "$pic_mode" && pic_mode=default
7364
7365
7366
7367
7368
7369
7370
7371 # Check whether --enable-fast-install was given.
7372 if test "${enable_fast_install+set}" = set; then :
7373 enableval=$enable_fast_install; p=${PACKAGE-default}
7374 case $enableval in
7375 yes) enable_fast_install=yes ;;
7376 no) enable_fast_install=no ;;
7377 *)
7378 enable_fast_install=no
7379 # Look at the argument we got. We use all the common list separators.
7380 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7381 for pkg in $enableval; do
7382 IFS="$lt_save_ifs"
7383 if test "X$pkg" = "X$p"; then
7384 enable_fast_install=yes
7385 fi
7386 done
7387 IFS="$lt_save_ifs"
7388 ;;
7389 esac
7390 else
7391 enable_fast_install=yes
7392 fi
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404 # This can be used to rebuild libtool when needed
7405 LIBTOOL_DEPS="$ltmain"
7406
7407 # Always use our own libtool.
7408 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439 test -z "$LN_S" && LN_S="ln -s"
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454 if test -n "${ZSH_VERSION+set}" ; then
7455 setopt NO_GLOB_SUBST
7456 fi
7457
7458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
7459 $as_echo_n "checking for objdir... " >&6; }
7460 if ${lt_cv_objdir+:} false; then :
7461 $as_echo_n "(cached) " >&6
7462 else
7463 rm -f .libs 2>/dev/null
7464 mkdir .libs 2>/dev/null
7465 if test -d .libs; then
7466 lt_cv_objdir=.libs
7467 else
7468 # MS-DOS does not allow filenames that begin with a dot.
7469 lt_cv_objdir=_libs
7470 fi
7471 rmdir .libs 2>/dev/null
7472 fi
7473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
7474 $as_echo "$lt_cv_objdir" >&6; }
7475 objdir=$lt_cv_objdir
7476
7477
7478
7479
7480
7481 cat >>confdefs.h <<_ACEOF
7482 #define LT_OBJDIR "$lt_cv_objdir/"
7483 _ACEOF
7484
7485
7486
7487
7488 case $host_os in
7489 aix3*)
7490 # AIX sometimes has problems with the GCC collect2 program. For some
7491 # reason, if we set the COLLECT_NAMES environment variable, the problems
7492 # vanish in a puff of smoke.
7493 if test "X${COLLECT_NAMES+set}" != Xset; then
7494 COLLECT_NAMES=
7495 export COLLECT_NAMES
7496 fi
7497 ;;
7498 esac
7499
7500 # Global variables:
7501 ofile=libtool
7502 can_build_shared=yes
7503
7504 # All known linkers require a `.a' archive for static linking (except MSVC,
7505 # which needs '.lib').
7506 libext=a
7507
7508 with_gnu_ld="$lt_cv_prog_gnu_ld"
7509
7510 old_CC="$CC"
7511 old_CFLAGS="$CFLAGS"
7512
7513 # Set sane defaults for various variables
7514 test -z "$CC" && CC=cc
7515 test -z "$LTCC" && LTCC=$CC
7516 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
7517 test -z "$LD" && LD=ld
7518 test -z "$ac_objext" && ac_objext=o
7519
7520 for cc_temp in $compiler""; do
7521 case $cc_temp in
7522 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
7523 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
7524 \-*) ;;
7525 *) break;;
7526 esac
7527 done
7528 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
7529
7530
7531 # Only perform the check for file, if the check method requires it
7532 test -z "$MAGIC_CMD" && MAGIC_CMD=file
7533 case $deplibs_check_method in
7534 file_magic*)
7535 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
7536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
7537 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
7538 if ${lt_cv_path_MAGIC_CMD+:} false; then :
7539 $as_echo_n "(cached) " >&6
7540 else
7541 case $MAGIC_CMD in
7542 [\\/*] | ?:[\\/]*)
7543 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
7544 ;;
7545 *)
7546 lt_save_MAGIC_CMD="$MAGIC_CMD"
7547 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7548 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
7549 for ac_dir in $ac_dummy; do
7550 IFS="$lt_save_ifs"
7551 test -z "$ac_dir" && ac_dir=.
7552 if test -f $ac_dir/${ac_tool_prefix}file; then
7553 lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
7554 if test -n "$file_magic_test_file"; then
7555 case $deplibs_check_method in
7556 "file_magic "*)
7557 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
7558 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7559 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
7560 $EGREP "$file_magic_regex" > /dev/null; then
7561 :
7562 else
7563 cat <<_LT_EOF 1>&2
7564
7565 *** Warning: the command libtool uses to detect shared libraries,
7566 *** $file_magic_cmd, produces output that libtool cannot recognize.
7567 *** The result is that libtool may fail to recognize shared libraries
7568 *** as such. This will affect the creation of libtool libraries that
7569 *** depend on shared libraries, but programs linked with such libtool
7570 *** libraries will work regardless of this problem. Nevertheless, you
7571 *** may want to report the problem to your system manager and/or to
7572 *** bug-libtool@gnu.org
7573
7574 _LT_EOF
7575 fi ;;
7576 esac
7577 fi
7578 break
7579 fi
7580 done
7581 IFS="$lt_save_ifs"
7582 MAGIC_CMD="$lt_save_MAGIC_CMD"
7583 ;;
7584 esac
7585 fi
7586
7587 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7588 if test -n "$MAGIC_CMD"; then
7589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
7590 $as_echo "$MAGIC_CMD" >&6; }
7591 else
7592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7593 $as_echo "no" >&6; }
7594 fi
7595
7596
7597
7598
7599
7600 if test -z "$lt_cv_path_MAGIC_CMD"; then
7601 if test -n "$ac_tool_prefix"; then
7602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
7603 $as_echo_n "checking for file... " >&6; }
7604 if ${lt_cv_path_MAGIC_CMD+:} false; then :
7605 $as_echo_n "(cached) " >&6
7606 else
7607 case $MAGIC_CMD in
7608 [\\/*] | ?:[\\/]*)
7609 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
7610 ;;
7611 *)
7612 lt_save_MAGIC_CMD="$MAGIC_CMD"
7613 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7614 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
7615 for ac_dir in $ac_dummy; do
7616 IFS="$lt_save_ifs"
7617 test -z "$ac_dir" && ac_dir=.
7618 if test -f $ac_dir/file; then
7619 lt_cv_path_MAGIC_CMD="$ac_dir/file"
7620 if test -n "$file_magic_test_file"; then
7621 case $deplibs_check_method in
7622 "file_magic "*)
7623 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
7624 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7625 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
7626 $EGREP "$file_magic_regex" > /dev/null; then
7627 :
7628 else
7629 cat <<_LT_EOF 1>&2
7630
7631 *** Warning: the command libtool uses to detect shared libraries,
7632 *** $file_magic_cmd, produces output that libtool cannot recognize.
7633 *** The result is that libtool may fail to recognize shared libraries
7634 *** as such. This will affect the creation of libtool libraries that
7635 *** depend on shared libraries, but programs linked with such libtool
7636 *** libraries will work regardless of this problem. Nevertheless, you
7637 *** may want to report the problem to your system manager and/or to
7638 *** bug-libtool@gnu.org
7639
7640 _LT_EOF
7641 fi ;;
7642 esac
7643 fi
7644 break
7645 fi
7646 done
7647 IFS="$lt_save_ifs"
7648 MAGIC_CMD="$lt_save_MAGIC_CMD"
7649 ;;
7650 esac
7651 fi
7652
7653 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7654 if test -n "$MAGIC_CMD"; then
7655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
7656 $as_echo "$MAGIC_CMD" >&6; }
7657 else
7658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7659 $as_echo "no" >&6; }
7660 fi
7661
7662
7663 else
7664 MAGIC_CMD=:
7665 fi
7666 fi
7667
7668 fi
7669 ;;
7670 esac
7671
7672 # Use C for the default configuration in the libtool script
7673
7674 lt_save_CC="$CC"
7675 ac_ext=c
7676 ac_cpp='$CPP $CPPFLAGS'
7677 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7678 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7679 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7680
7681
7682 # Source file extension for C test sources.
7683 ac_ext=c
7684
7685 # Object file extension for compiled C test sources.
7686 objext=o
7687 objext=$objext
7688
7689 # Code to be used in simple compile tests
7690 lt_simple_compile_test_code="int some_variable = 0;"
7691
7692 # Code to be used in simple link tests
7693 lt_simple_link_test_code='int main(){return(0);}'
7694
7695
7696
7697
7698
7699
7700
7701 # If no C compiler was specified, use CC.
7702 LTCC=${LTCC-"$CC"}
7703
7704 # If no C compiler flags were specified, use CFLAGS.
7705 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
7706
7707 # Allow CC to be a program name with arguments.
7708 compiler=$CC
7709
7710 # Save the default compiler, since it gets overwritten when the other
7711 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
7712 compiler_DEFAULT=$CC
7713
7714 # save warnings/boilerplate of simple test code
7715 ac_outfile=conftest.$ac_objext
7716 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
7717 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
7718 _lt_compiler_boilerplate=`cat conftest.err`
7719 $RM conftest*
7720
7721 ac_outfile=conftest.$ac_objext
7722 echo "$lt_simple_link_test_code" >conftest.$ac_ext
7723 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
7724 _lt_linker_boilerplate=`cat conftest.err`
7725 $RM -r conftest*
7726
7727
7728 ## CAVEAT EMPTOR:
7729 ## There is no encapsulation within the following macros, do not change
7730 ## the running order or otherwise move them around unless you know exactly
7731 ## what you are doing...
7732 if test -n "$compiler"; then
7733
7734 lt_prog_compiler_no_builtin_flag=
7735
7736 if test "$GCC" = yes; then
7737 case $cc_basename in
7738 nvcc*)
7739 lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
7740 *)
7741 lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
7742 esac
7743
7744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
7745 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
7746 if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
7747 $as_echo_n "(cached) " >&6
7748 else
7749 lt_cv_prog_compiler_rtti_exceptions=no
7750 ac_outfile=conftest.$ac_objext
7751 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
7752 lt_compiler_flag="-fno-rtti -fno-exceptions"
7753 # Insert the option either (1) after the last *FLAGS variable, or
7754 # (2) before a word containing "conftest.", or (3) at the end.
7755 # Note that $ac_compile itself does not contain backslashes and begins
7756 # with a dollar sign (not a hyphen), so the echo should work correctly.
7757 # The option is referenced via a variable to avoid confusing sed.
7758 lt_compile=`echo "$ac_compile" | $SED \
7759 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7760 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7761 -e 's:$: $lt_compiler_flag:'`
7762 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
7763 (eval "$lt_compile" 2>conftest.err)
7764 ac_status=$?
7765 cat conftest.err >&5
7766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7767 if (exit $ac_status) && test -s "$ac_outfile"; then
7768 # The compiler can only warn and ignore the option if not recognized
7769 # So say no if there are warnings other than the usual output.
7770 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
7771 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
7772 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
7773 lt_cv_prog_compiler_rtti_exceptions=yes
7774 fi
7775 fi
7776 $RM conftest*
7777
7778 fi
7779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
7780 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
7781
7782 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
7783 lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
7784 else
7785 :
7786 fi
7787
7788 fi
7789
7790
7791
7792
7793
7794
7795 lt_prog_compiler_wl=
7796 lt_prog_compiler_pic=
7797 lt_prog_compiler_static=
7798
7799
7800 if test "$GCC" = yes; then
7801 lt_prog_compiler_wl='-Wl,'
7802 lt_prog_compiler_static='-static'
7803
7804 case $host_os in
7805 aix*)
7806 # All AIX code is PIC.
7807 if test "$host_cpu" = ia64; then
7808 # AIX 5 now supports IA64 processor
7809 lt_prog_compiler_static='-Bstatic'
7810 fi
7811 ;;
7812
7813 amigaos*)
7814 case $host_cpu in
7815 powerpc)
7816 # see comment about AmigaOS4 .so support
7817 lt_prog_compiler_pic='-fPIC'
7818 ;;
7819 m68k)
7820 # FIXME: we need at least 68020 code to build shared libraries, but
7821 # adding the `-m68020' flag to GCC prevents building anything better,
7822 # like `-m68040'.
7823 lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
7824 ;;
7825 esac
7826 ;;
7827
7828 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
7829 # PIC is the default for these OSes.
7830 ;;
7831
7832 mingw* | cygwin* | pw32* | os2* | cegcc*)
7833 # This hack is so that the source file can tell whether it is being
7834 # built for inclusion in a dll (and should export symbols for example).
7835 # Although the cygwin gcc ignores -fPIC, still need this for old-style
7836 # (--disable-auto-import) libraries
7837 lt_prog_compiler_pic='-DDLL_EXPORT'
7838 ;;
7839
7840 darwin* | rhapsody*)
7841 # PIC is the default on this platform
7842 # Common symbols not allowed in MH_DYLIB files
7843 lt_prog_compiler_pic='-fno-common'
7844 ;;
7845
7846 haiku*)
7847 # PIC is the default for Haiku.
7848 # The "-static" flag exists, but is broken.
7849 lt_prog_compiler_static=
7850 ;;
7851
7852 hpux*)
7853 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
7854 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
7855 # sets the default TLS model and affects inlining.
7856 case $host_cpu in
7857 hppa*64*)
7858 # +Z the default
7859 ;;
7860 *)
7861 lt_prog_compiler_pic='-fPIC'
7862 ;;
7863 esac
7864 ;;
7865
7866 interix[3-9]*)
7867 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
7868 # Instead, we relocate shared libraries at runtime.
7869 ;;
7870
7871 msdosdjgpp*)
7872 # Just because we use GCC doesn't mean we suddenly get shared libraries
7873 # on systems that don't support them.
7874 lt_prog_compiler_can_build_shared=no
7875 enable_shared=no
7876 ;;
7877
7878 *nto* | *qnx*)
7879 # QNX uses GNU C++, but need to define -shared option too, otherwise
7880 # it will coredump.
7881 lt_prog_compiler_pic='-fPIC -shared'
7882 ;;
7883
7884 sysv4*MP*)
7885 if test -d /usr/nec; then
7886 lt_prog_compiler_pic=-Kconform_pic
7887 fi
7888 ;;
7889
7890 *)
7891 lt_prog_compiler_pic='-fPIC'
7892 ;;
7893 esac
7894
7895 case $cc_basename in
7896 nvcc*) # Cuda Compiler Driver 2.2
7897 lt_prog_compiler_wl='-Xlinker '
7898 if test -n "$lt_prog_compiler_pic"; then
7899 lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
7900 fi
7901 ;;
7902 esac
7903 else
7904 # PORTME Check for flag to pass linker flags through the system compiler.
7905 case $host_os in
7906 aix*)
7907 lt_prog_compiler_wl='-Wl,'
7908 if test "$host_cpu" = ia64; then
7909 # AIX 5 now supports IA64 processor
7910 lt_prog_compiler_static='-Bstatic'
7911 else
7912 lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
7913 fi
7914 ;;
7915
7916 mingw* | cygwin* | pw32* | os2* | cegcc*)
7917 # This hack is so that the source file can tell whether it is being
7918 # built for inclusion in a dll (and should export symbols for example).
7919 lt_prog_compiler_pic='-DDLL_EXPORT'
7920 ;;
7921
7922 hpux9* | hpux10* | hpux11*)
7923 lt_prog_compiler_wl='-Wl,'
7924 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
7925 # not for PA HP-UX.
7926 case $host_cpu in
7927 hppa*64*|ia64*)
7928 # +Z the default
7929 ;;
7930 *)
7931 lt_prog_compiler_pic='+Z'
7932 ;;
7933 esac
7934 # Is there a better lt_prog_compiler_static that works with the bundled CC?
7935 lt_prog_compiler_static='${wl}-a ${wl}archive'
7936 ;;
7937
7938 irix5* | irix6* | nonstopux*)
7939 lt_prog_compiler_wl='-Wl,'
7940 # PIC (with -KPIC) is the default.
7941 lt_prog_compiler_static='-non_shared'
7942 ;;
7943
7944 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
7945 case $cc_basename in
7946 # old Intel for x86_64 which still supported -KPIC.
7947 ecc*)
7948 lt_prog_compiler_wl='-Wl,'
7949 lt_prog_compiler_pic='-KPIC'
7950 lt_prog_compiler_static='-static'
7951 ;;
7952 # icc used to be incompatible with GCC.
7953 # ICC 10 doesn't accept -KPIC any more.
7954 icc* | ifort*)
7955 lt_prog_compiler_wl='-Wl,'
7956 lt_prog_compiler_pic='-fPIC'
7957 lt_prog_compiler_static='-static'
7958 ;;
7959 # Lahey Fortran 8.1.
7960 lf95*)
7961 lt_prog_compiler_wl='-Wl,'
7962 lt_prog_compiler_pic='--shared'
7963 lt_prog_compiler_static='--static'
7964 ;;
7965 nagfor*)
7966 # NAG Fortran compiler
7967 lt_prog_compiler_wl='-Wl,-Wl,,'
7968 lt_prog_compiler_pic='-PIC'
7969 lt_prog_compiler_static='-Bstatic'
7970 ;;
7971 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
7972 # Portland Group compilers (*not* the Pentium gcc compiler,
7973 # which looks to be a dead project)
7974 lt_prog_compiler_wl='-Wl,'
7975 lt_prog_compiler_pic='-fpic'
7976 lt_prog_compiler_static='-Bstatic'
7977 ;;
7978 ccc*)
7979 lt_prog_compiler_wl='-Wl,'
7980 # All Alpha code is PIC.
7981 lt_prog_compiler_static='-non_shared'
7982 ;;
7983 xl* | bgxl* | bgf* | mpixl*)
7984 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
7985 lt_prog_compiler_wl='-Wl,'
7986 lt_prog_compiler_pic='-qpic'
7987 lt_prog_compiler_static='-qstaticlink'
7988 ;;
7989 *)
7990 case `$CC -V 2>&1 | sed 5q` in
7991 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
7992 # Sun Fortran 8.3 passes all unrecognized flags to the linker
7993 lt_prog_compiler_pic='-KPIC'
7994 lt_prog_compiler_static='-Bstatic'
7995 lt_prog_compiler_wl=''
7996 ;;
7997 *Sun\ F* | *Sun*Fortran*)
7998 lt_prog_compiler_pic='-KPIC'
7999 lt_prog_compiler_static='-Bstatic'
8000 lt_prog_compiler_wl='-Qoption ld '
8001 ;;
8002 *Sun\ C*)
8003 # Sun C 5.9
8004 lt_prog_compiler_pic='-KPIC'
8005 lt_prog_compiler_static='-Bstatic'
8006 lt_prog_compiler_wl='-Wl,'
8007 ;;
8008 *Intel*\ [CF]*Compiler*)
8009 lt_prog_compiler_wl='-Wl,'
8010 lt_prog_compiler_pic='-fPIC'
8011 lt_prog_compiler_static='-static'
8012 ;;
8013 *Portland\ Group*)
8014 lt_prog_compiler_wl='-Wl,'
8015 lt_prog_compiler_pic='-fpic'
8016 lt_prog_compiler_static='-Bstatic'
8017 ;;
8018 esac
8019 ;;
8020 esac
8021 ;;
8022
8023 newsos6)
8024 lt_prog_compiler_pic='-KPIC'
8025 lt_prog_compiler_static='-Bstatic'
8026 ;;
8027
8028 *nto* | *qnx*)
8029 # QNX uses GNU C++, but need to define -shared option too, otherwise
8030 # it will coredump.
8031 lt_prog_compiler_pic='-fPIC -shared'
8032 ;;
8033
8034 osf3* | osf4* | osf5*)
8035 lt_prog_compiler_wl='-Wl,'
8036 # All OSF/1 code is PIC.
8037 lt_prog_compiler_static='-non_shared'
8038 ;;
8039
8040 rdos*)
8041 lt_prog_compiler_static='-non_shared'
8042 ;;
8043
8044 solaris*)
8045 lt_prog_compiler_pic='-KPIC'
8046 lt_prog_compiler_static='-Bstatic'
8047 case $cc_basename in
8048 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
8049 lt_prog_compiler_wl='-Qoption ld ';;
8050 *)
8051 lt_prog_compiler_wl='-Wl,';;
8052 esac
8053 ;;
8054
8055 sunos4*)
8056 lt_prog_compiler_wl='-Qoption ld '
8057 lt_prog_compiler_pic='-PIC'
8058 lt_prog_compiler_static='-Bstatic'
8059 ;;
8060
8061 sysv4 | sysv4.2uw2* | sysv4.3*)
8062 lt_prog_compiler_wl='-Wl,'
8063 lt_prog_compiler_pic='-KPIC'
8064 lt_prog_compiler_static='-Bstatic'
8065 ;;
8066
8067 sysv4*MP*)
8068 if test -d /usr/nec ;then
8069 lt_prog_compiler_pic='-Kconform_pic'
8070 lt_prog_compiler_static='-Bstatic'
8071 fi
8072 ;;
8073
8074 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
8075 lt_prog_compiler_wl='-Wl,'
8076 lt_prog_compiler_pic='-KPIC'
8077 lt_prog_compiler_static='-Bstatic'
8078 ;;
8079
8080 unicos*)
8081 lt_prog_compiler_wl='-Wl,'
8082 lt_prog_compiler_can_build_shared=no
8083 ;;
8084
8085 uts4*)
8086 lt_prog_compiler_pic='-pic'
8087 lt_prog_compiler_static='-Bstatic'
8088 ;;
8089
8090 *)
8091 lt_prog_compiler_can_build_shared=no
8092 ;;
8093 esac
8094 fi
8095
8096 case $host_os in
8097 # For platforms which do not support PIC, -DPIC is meaningless:
8098 *djgpp*)
8099 lt_prog_compiler_pic=
8100 ;;
8101 *)
8102 lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
8103 ;;
8104 esac
8105
8106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
8107 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
8108 if ${lt_cv_prog_compiler_pic+:} false; then :
8109 $as_echo_n "(cached) " >&6
8110 else
8111 lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
8112 fi
8113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
8114 $as_echo "$lt_cv_prog_compiler_pic" >&6; }
8115 lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
8116
8117 #
8118 # Check to make sure the PIC flag actually works.
8119 #
8120 if test -n "$lt_prog_compiler_pic"; then
8121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
8122 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
8123 if ${lt_cv_prog_compiler_pic_works+:} false; then :
8124 $as_echo_n "(cached) " >&6
8125 else
8126 lt_cv_prog_compiler_pic_works=no
8127 ac_outfile=conftest.$ac_objext
8128 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
8129 lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
8130 # Insert the option either (1) after the last *FLAGS variable, or
8131 # (2) before a word containing "conftest.", or (3) at the end.
8132 # Note that $ac_compile itself does not contain backslashes and begins
8133 # with a dollar sign (not a hyphen), so the echo should work correctly.
8134 # The option is referenced via a variable to avoid confusing sed.
8135 lt_compile=`echo "$ac_compile" | $SED \
8136 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8137 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8138 -e 's:$: $lt_compiler_flag:'`
8139 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
8140 (eval "$lt_compile" 2>conftest.err)
8141 ac_status=$?
8142 cat conftest.err >&5
8143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8144 if (exit $ac_status) && test -s "$ac_outfile"; then
8145 # The compiler can only warn and ignore the option if not recognized
8146 # So say no if there are warnings other than the usual output.
8147 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
8148 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
8149 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
8150 lt_cv_prog_compiler_pic_works=yes
8151 fi
8152 fi
8153 $RM conftest*
8154
8155 fi
8156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
8157 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
8158
8159 if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
8160 case $lt_prog_compiler_pic in
8161 "" | " "*) ;;
8162 *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
8163 esac
8164 else
8165 lt_prog_compiler_pic=
8166 lt_prog_compiler_can_build_shared=no
8167 fi
8168
8169 fi
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181 #
8182 # Check to make sure the static flag actually works.
8183 #
8184 wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
8185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
8186 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
8187 if ${lt_cv_prog_compiler_static_works+:} false; then :
8188 $as_echo_n "(cached) " >&6
8189 else
8190 lt_cv_prog_compiler_static_works=no
8191 save_LDFLAGS="$LDFLAGS"
8192 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
8193 echo "$lt_simple_link_test_code" > conftest.$ac_ext
8194 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
8195 # The linker can only warn and ignore the option if not recognized
8196 # So say no if there are warnings
8197 if test -s conftest.err; then
8198 # Append any errors to the config.log.
8199 cat conftest.err 1>&5
8200 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
8201 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
8202 if diff conftest.exp conftest.er2 >/dev/null; then
8203 lt_cv_prog_compiler_static_works=yes
8204 fi
8205 else
8206 lt_cv_prog_compiler_static_works=yes
8207 fi
8208 fi
8209 $RM -r conftest*
8210 LDFLAGS="$save_LDFLAGS"
8211
8212 fi
8213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
8214 $as_echo "$lt_cv_prog_compiler_static_works" >&6; }
8215
8216 if test x"$lt_cv_prog_compiler_static_works" = xyes; then
8217 :
8218 else
8219 lt_prog_compiler_static=
8220 fi
8221
8222
8223
8224
8225
8226
8227
8228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
8229 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
8230 if ${lt_cv_prog_compiler_c_o+:} false; then :
8231 $as_echo_n "(cached) " >&6
8232 else
8233 lt_cv_prog_compiler_c_o=no
8234 $RM -r conftest 2>/dev/null
8235 mkdir conftest
8236 cd conftest
8237 mkdir out
8238 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
8239
8240 lt_compiler_flag="-o out/conftest2.$ac_objext"
8241 # Insert the option either (1) after the last *FLAGS variable, or
8242 # (2) before a word containing "conftest.", or (3) at the end.
8243 # Note that $ac_compile itself does not contain backslashes and begins
8244 # with a dollar sign (not a hyphen), so the echo should work correctly.
8245 lt_compile=`echo "$ac_compile" | $SED \
8246 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8247 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8248 -e 's:$: $lt_compiler_flag:'`
8249 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
8250 (eval "$lt_compile" 2>out/conftest.err)
8251 ac_status=$?
8252 cat out/conftest.err >&5
8253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8254 if (exit $ac_status) && test -s out/conftest2.$ac_objext
8255 then
8256 # The compiler can only warn and ignore the option if not recognized
8257 # So say no if there are warnings
8258 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
8259 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
8260 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
8261 lt_cv_prog_compiler_c_o=yes
8262 fi
8263 fi
8264 chmod u+w . 2>&5
8265 $RM conftest*
8266 # SGI C++ compiler will create directory out/ii_files/ for
8267 # template instantiation
8268 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
8269 $RM out/* && rmdir out
8270 cd ..
8271 $RM -r conftest
8272 $RM conftest*
8273
8274 fi
8275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
8276 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
8277
8278
8279
8280
8281
8282
8283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
8284 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
8285 if ${lt_cv_prog_compiler_c_o+:} false; then :
8286 $as_echo_n "(cached) " >&6
8287 else
8288 lt_cv_prog_compiler_c_o=no
8289 $RM -r conftest 2>/dev/null
8290 mkdir conftest
8291 cd conftest
8292 mkdir out
8293 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
8294
8295 lt_compiler_flag="-o out/conftest2.$ac_objext"
8296 # Insert the option either (1) after the last *FLAGS variable, or
8297 # (2) before a word containing "conftest.", or (3) at the end.
8298 # Note that $ac_compile itself does not contain backslashes and begins
8299 # with a dollar sign (not a hyphen), so the echo should work correctly.
8300 lt_compile=`echo "$ac_compile" | $SED \
8301 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8302 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8303 -e 's:$: $lt_compiler_flag:'`
8304 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
8305 (eval "$lt_compile" 2>out/conftest.err)
8306 ac_status=$?
8307 cat out/conftest.err >&5
8308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8309 if (exit $ac_status) && test -s out/conftest2.$ac_objext
8310 then
8311 # The compiler can only warn and ignore the option if not recognized
8312 # So say no if there are warnings
8313 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
8314 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
8315 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
8316 lt_cv_prog_compiler_c_o=yes
8317 fi
8318 fi
8319 chmod u+w . 2>&5
8320 $RM conftest*
8321 # SGI C++ compiler will create directory out/ii_files/ for
8322 # template instantiation
8323 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
8324 $RM out/* && rmdir out
8325 cd ..
8326 $RM -r conftest
8327 $RM conftest*
8328
8329 fi
8330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
8331 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
8332
8333
8334
8335
8336 hard_links="nottested"
8337 if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
8338 # do not overwrite the value of need_locks provided by the user
8339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
8340 $as_echo_n "checking if we can lock with hard links... " >&6; }
8341 hard_links=yes
8342 $RM conftest*
8343 ln conftest.a conftest.b 2>/dev/null && hard_links=no
8344 touch conftest.a
8345 ln conftest.a conftest.b 2>&5 || hard_links=no
8346 ln conftest.a conftest.b 2>/dev/null && hard_links=no
8347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
8348 $as_echo "$hard_links" >&6; }
8349 if test "$hard_links" = no; then
8350 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
8351 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
8352 need_locks=warn
8353 fi
8354 else
8355 need_locks=no
8356 fi
8357
8358
8359
8360
8361
8362
8363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
8364 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
8365
8366 runpath_var=
8367 allow_undefined_flag=
8368 always_export_symbols=no
8369 archive_cmds=
8370 archive_expsym_cmds=
8371 compiler_needs_object=no
8372 enable_shared_with_static_runtimes=no
8373 export_dynamic_flag_spec=
8374 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
8375 hardcode_automatic=no
8376 hardcode_direct=no
8377 hardcode_direct_absolute=no
8378 hardcode_libdir_flag_spec=
8379 hardcode_libdir_separator=
8380 hardcode_minus_L=no
8381 hardcode_shlibpath_var=unsupported
8382 inherit_rpath=no
8383 link_all_deplibs=unknown
8384 module_cmds=
8385 module_expsym_cmds=
8386 old_archive_from_new_cmds=
8387 old_archive_from_expsyms_cmds=
8388 thread_safe_flag_spec=
8389 whole_archive_flag_spec=
8390 # include_expsyms should be a list of space-separated symbols to be *always*
8391 # included in the symbol list
8392 include_expsyms=
8393 # exclude_expsyms can be an extended regexp of symbols to exclude
8394 # it will be wrapped by ` (' and `)$', so one must not match beginning or
8395 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
8396 # as well as any symbol that contains `d'.
8397 exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
8398 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
8399 # platforms (ab)use it in PIC code, but their linkers get confused if
8400 # the symbol is explicitly referenced. Since portable code cannot
8401 # rely on this symbol name, it's probably fine to never include it in
8402 # preloaded symbol tables.
8403 # Exclude shared library initialization/finalization symbols.
8404 extract_expsyms_cmds=
8405
8406 case $host_os in
8407 cygwin* | mingw* | pw32* | cegcc*)
8408 # FIXME: the MSVC++ port hasn't been tested in a loooong time
8409 # When not using gcc, we currently assume that we are using
8410 # Microsoft Visual C++.
8411 if test "$GCC" != yes; then
8412 with_gnu_ld=no
8413 fi
8414 ;;
8415 interix*)
8416 # we just hope/assume this is gcc and not c89 (= MSVC++)
8417 with_gnu_ld=yes
8418 ;;
8419 openbsd*)
8420 with_gnu_ld=no
8421 ;;
8422 linux* | k*bsd*-gnu | gnu*)
8423 link_all_deplibs=no
8424 ;;
8425 esac
8426
8427 ld_shlibs=yes
8428
8429 # On some targets, GNU ld is compatible enough with the native linker
8430 # that we're better off using the native interface for both.
8431 lt_use_gnu_ld_interface=no
8432 if test "$with_gnu_ld" = yes; then
8433 case $host_os in
8434 aix*)
8435 # The AIX port of GNU ld has always aspired to compatibility
8436 # with the native linker. However, as the warning in the GNU ld
8437 # block says, versions before 2.19.5* couldn't really create working
8438 # shared libraries, regardless of the interface used.
8439 case `$LD -v 2>&1` in
8440 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
8441 *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
8442 *\ \(GNU\ Binutils\)\ [3-9]*) ;;
8443 *)
8444 lt_use_gnu_ld_interface=yes
8445 ;;
8446 esac
8447 ;;
8448 *)
8449 lt_use_gnu_ld_interface=yes
8450 ;;
8451 esac
8452 fi
8453
8454 if test "$lt_use_gnu_ld_interface" = yes; then
8455 # If archive_cmds runs LD, not CC, wlarc should be empty
8456 wlarc='${wl}'
8457
8458 # Set some defaults for GNU ld with shared library support. These
8459 # are reset later if shared libraries are not supported. Putting them
8460 # here allows them to be overridden if necessary.
8461 runpath_var=LD_RUN_PATH
8462 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8463 export_dynamic_flag_spec='${wl}--export-dynamic'
8464 # ancient GNU ld didn't support --whole-archive et. al.
8465 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
8466 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8467 else
8468 whole_archive_flag_spec=
8469 fi
8470 supports_anon_versioning=no
8471 case `$LD -v 2>&1` in
8472 *GNU\ gold*) supports_anon_versioning=yes ;;
8473 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
8474 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
8475 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
8476 *\ 2.11.*) ;; # other 2.11 versions
8477 *) supports_anon_versioning=yes ;;
8478 esac
8479
8480 # See if GNU ld supports shared libraries.
8481 case $host_os in
8482 aix[3-9]*)
8483 # On AIX/PPC, the GNU linker is very broken
8484 if test "$host_cpu" != ia64; then
8485 ld_shlibs=no
8486 cat <<_LT_EOF 1>&2
8487
8488 *** Warning: the GNU linker, at least up to release 2.19, is reported
8489 *** to be unable to reliably create shared libraries on AIX.
8490 *** Therefore, libtool is disabling shared libraries support. If you
8491 *** really care for shared libraries, you may want to install binutils
8492 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
8493 *** You will then need to restart the configuration process.
8494
8495 _LT_EOF
8496 fi
8497 ;;
8498
8499 amigaos*)
8500 case $host_cpu in
8501 powerpc)
8502 # see comment about AmigaOS4 .so support
8503 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8504 archive_expsym_cmds=''
8505 ;;
8506 m68k)
8507 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)'
8508 hardcode_libdir_flag_spec='-L$libdir'
8509 hardcode_minus_L=yes
8510 ;;
8511 esac
8512 ;;
8513
8514 beos*)
8515 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
8516 allow_undefined_flag=unsupported
8517 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
8518 # support --undefined. This deserves some investigation. FIXME
8519 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8520 else
8521 ld_shlibs=no
8522 fi
8523 ;;
8524
8525 cygwin* | mingw* | pw32* | cegcc*)
8526 # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
8527 # as there is no search path for DLLs.
8528 hardcode_libdir_flag_spec='-L$libdir'
8529 export_dynamic_flag_spec='${wl}--export-all-symbols'
8530 allow_undefined_flag=unsupported
8531 always_export_symbols=no
8532 enable_shared_with_static_runtimes=yes
8533 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
8534 exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
8535
8536 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
8537 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
8538 # If the export-symbols file already is a .def file (1st line
8539 # is EXPORTS), use it as is; otherwise, prepend...
8540 archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
8541 cp $export_symbols $output_objdir/$soname.def;
8542 else
8543 echo EXPORTS > $output_objdir/$soname.def;
8544 cat $export_symbols >> $output_objdir/$soname.def;
8545 fi~
8546 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
8547 else
8548 ld_shlibs=no
8549 fi
8550 ;;
8551
8552 haiku*)
8553 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8554 link_all_deplibs=yes
8555 ;;
8556
8557 interix[3-9]*)
8558 hardcode_direct=no
8559 hardcode_shlibpath_var=no
8560 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
8561 export_dynamic_flag_spec='${wl}-E'
8562 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
8563 # Instead, shared libraries are loaded at an image base (0x10000000 by
8564 # default) and relocated if they conflict, which is a slow very memory
8565 # consuming and fragmenting process. To avoid this, we pick a random,
8566 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
8567 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
8568 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
8569 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'
8570 ;;
8571
8572 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
8573 tmp_diet=no
8574 if test "$host_os" = linux-dietlibc; then
8575 case $cc_basename in
8576 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
8577 esac
8578 fi
8579 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
8580 && test "$tmp_diet" = no
8581 then
8582 tmp_addflag=' $pic_flag'
8583 tmp_sharedflag='-shared'
8584 case $cc_basename,$host_cpu in
8585 pgcc*) # Portland Group C compiler
8586 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
8587 tmp_addflag=' $pic_flag'
8588 ;;
8589 pgf77* | pgf90* | pgf95* | pgfortran*)
8590 # Portland Group f77 and f90 compilers
8591 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
8592 tmp_addflag=' $pic_flag -Mnomain' ;;
8593 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
8594 tmp_addflag=' -i_dynamic' ;;
8595 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
8596 tmp_addflag=' -i_dynamic -nofor_main' ;;
8597 ifc* | ifort*) # Intel Fortran compiler
8598 tmp_addflag=' -nofor_main' ;;
8599 lf95*) # Lahey Fortran 8.1
8600 whole_archive_flag_spec=
8601 tmp_sharedflag='--shared' ;;
8602 xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
8603 tmp_sharedflag='-qmkshrobj'
8604 tmp_addflag= ;;
8605 nvcc*) # Cuda Compiler Driver 2.2
8606 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
8607 compiler_needs_object=yes
8608 ;;
8609 esac
8610 case `$CC -V 2>&1 | sed 5q` in
8611 *Sun\ C*) # Sun C 5.9
8612 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
8613 compiler_needs_object=yes
8614 tmp_sharedflag='-G' ;;
8615 *Sun\ F*) # Sun Fortran 8.3
8616 tmp_sharedflag='-G' ;;
8617 esac
8618 archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8619
8620 if test "x$supports_anon_versioning" = xyes; then
8621 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
8622 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
8623 echo "local: *; };" >> $output_objdir/$libname.ver~
8624 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
8625 fi
8626
8627 case $cc_basename in
8628 xlf* | bgf* | bgxlf* | mpixlf*)
8629 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
8630 whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
8631 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8632 archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
8633 if test "x$supports_anon_versioning" = xyes; then
8634 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
8635 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
8636 echo "local: *; };" >> $output_objdir/$libname.ver~
8637 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
8638 fi
8639 ;;
8640 esac
8641 else
8642 ld_shlibs=no
8643 fi
8644 ;;
8645
8646 netbsd* | netbsdelf*-gnu)
8647 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
8648 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
8649 wlarc=
8650 else
8651 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8652 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8653 fi
8654 ;;
8655
8656 solaris*)
8657 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
8658 ld_shlibs=no
8659 cat <<_LT_EOF 1>&2
8660
8661 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
8662 *** create shared libraries on Solaris systems. Therefore, libtool
8663 *** is disabling shared libraries support. We urge you to upgrade GNU
8664 *** binutils to release 2.9.1 or newer. Another option is to modify
8665 *** your PATH or compiler configuration so that the native linker is
8666 *** used, and then restart.
8667
8668 _LT_EOF
8669 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
8670 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8671 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8672 else
8673 ld_shlibs=no
8674 fi
8675 ;;
8676
8677 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
8678 case `$LD -v 2>&1` in
8679 *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
8680 ld_shlibs=no
8681 cat <<_LT_EOF 1>&2
8682
8683 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
8684 *** reliably create shared libraries on SCO systems. Therefore, libtool
8685 *** is disabling shared libraries support. We urge you to upgrade GNU
8686 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
8687 *** your PATH or compiler configuration so that the native linker is
8688 *** used, and then restart.
8689
8690 _LT_EOF
8691 ;;
8692 *)
8693 # For security reasons, it is highly recommended that you always
8694 # use absolute paths for naming shared libraries, and exclude the
8695 # DT_RUNPATH tag from executables and libraries. But doing so
8696 # requires that you compile everything twice, which is a pain.
8697 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
8698 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8699 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8700 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8701 else
8702 ld_shlibs=no
8703 fi
8704 ;;
8705 esac
8706 ;;
8707
8708 sunos4*)
8709 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8710 wlarc=
8711 hardcode_direct=yes
8712 hardcode_shlibpath_var=no
8713 ;;
8714
8715 *)
8716 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
8717 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8718 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8719 else
8720 ld_shlibs=no
8721 fi
8722 ;;
8723 esac
8724
8725 if test "$ld_shlibs" = no; then
8726 runpath_var=
8727 hardcode_libdir_flag_spec=
8728 export_dynamic_flag_spec=
8729 whole_archive_flag_spec=
8730 fi
8731 else
8732 # PORTME fill in a description of your system's linker (not GNU ld)
8733 case $host_os in
8734 aix3*)
8735 allow_undefined_flag=unsupported
8736 always_export_symbols=yes
8737 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'
8738 # Note: this linker hardcodes the directories in LIBPATH if there
8739 # are no directories specified by -L.
8740 hardcode_minus_L=yes
8741 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
8742 # Neither direct hardcoding nor static linking is supported with a
8743 # broken collect2.
8744 hardcode_direct=unsupported
8745 fi
8746 ;;
8747
8748 aix[4-9]*)
8749 if test "$host_cpu" = ia64; then
8750 # On IA64, the linker does run time linking by default, so we don't
8751 # have to do anything special.
8752 aix_use_runtimelinking=no
8753 exp_sym_flag='-Bexport'
8754 no_entry_flag=""
8755 else
8756 # If we're using GNU nm, then we don't want the "-C" option.
8757 # -C means demangle to AIX nm, but means don't demangle with GNU nm
8758 # Also, AIX nm treats weak defined symbols like other global
8759 # defined symbols, whereas GNU nm marks them as "W".
8760 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
8761 export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
8762 else
8763 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'
8764 fi
8765 aix_use_runtimelinking=no
8766
8767 # Test if we are trying to use run time linking or normal
8768 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
8769 # need to do runtime linking.
8770 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
8771 for ld_flag in $LDFLAGS; do
8772 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
8773 aix_use_runtimelinking=yes
8774 break
8775 fi
8776 done
8777 ;;
8778 esac
8779
8780 exp_sym_flag='-bexport'
8781 no_entry_flag='-bnoentry'
8782 fi
8783
8784 # When large executables or shared objects are built, AIX ld can
8785 # have problems creating the table of contents. If linking a library
8786 # or program results in "error TOC overflow" add -mminimal-toc to
8787 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
8788 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
8789
8790 archive_cmds=''
8791 hardcode_direct=yes
8792 hardcode_direct_absolute=yes
8793 hardcode_libdir_separator=':'
8794 link_all_deplibs=yes
8795 file_list_spec='${wl}-f,'
8796
8797 if test "$GCC" = yes; then
8798 case $host_os in aix4.[012]|aix4.[012].*)
8799 # We only want to do this on AIX 4.2 and lower, the check
8800 # below for broken collect2 doesn't work under 4.3+
8801 collect2name=`${CC} -print-prog-name=collect2`
8802 if test -f "$collect2name" &&
8803 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
8804 then
8805 # We have reworked collect2
8806 :
8807 else
8808 # We have old collect2
8809 hardcode_direct=unsupported
8810 # It fails to find uninstalled libraries when the uninstalled
8811 # path is not listed in the libpath. Setting hardcode_minus_L
8812 # to unsupported forces relinking
8813 hardcode_minus_L=yes
8814 hardcode_libdir_flag_spec='-L$libdir'
8815 hardcode_libdir_separator=
8816 fi
8817 ;;
8818 esac
8819 shared_flag='-shared'
8820 if test "$aix_use_runtimelinking" = yes; then
8821 shared_flag="$shared_flag "'${wl}-G'
8822 fi
8823 link_all_deplibs=no
8824 else
8825 # not using gcc
8826 if test "$host_cpu" = ia64; then
8827 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8828 # chokes on -Wl,-G. The following line is correct:
8829 shared_flag='-G'
8830 else
8831 if test "$aix_use_runtimelinking" = yes; then
8832 shared_flag='${wl}-G'
8833 else
8834 shared_flag='${wl}-bM:SRE'
8835 fi
8836 fi
8837 fi
8838
8839 export_dynamic_flag_spec='${wl}-bexpall'
8840 # It seems that -bexpall does not export symbols beginning with
8841 # underscore (_), so it is better to generate a list of symbols to export.
8842 always_export_symbols=yes
8843 if test "$aix_use_runtimelinking" = yes; then
8844 # Warning - without using the other runtime loading flags (-brtl),
8845 # -berok will link without error, but may produce a broken library.
8846 allow_undefined_flag='-berok'
8847 # Determine the default libpath from the value encoded in an
8848 # empty executable.
8849 if test "${lt_cv_aix_libpath+set}" = set; then
8850 aix_libpath=$lt_cv_aix_libpath
8851 else
8852 if ${lt_cv_aix_libpath_+:} false; then :
8853 $as_echo_n "(cached) " >&6
8854 else
8855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8856 /* end confdefs.h. */
8857
8858 int
8859 main ()
8860 {
8861
8862 ;
8863 return 0;
8864 }
8865 _ACEOF
8866 if ac_fn_c_try_link "$LINENO"; then :
8867
8868 lt_aix_libpath_sed='
8869 /Import File Strings/,/^$/ {
8870 /^0/ {
8871 s/^0 *\([^ ]*\) *$/\1/
8872 p
8873 }
8874 }'
8875 lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8876 # Check for a 64-bit object if we didn't find anything.
8877 if test -z "$lt_cv_aix_libpath_"; then
8878 lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8879 fi
8880 fi
8881 rm -f core conftest.err conftest.$ac_objext \
8882 conftest$ac_exeext conftest.$ac_ext
8883 if test -z "$lt_cv_aix_libpath_"; then
8884 lt_cv_aix_libpath_="/usr/lib:/lib"
8885 fi
8886
8887 fi
8888
8889 aix_libpath=$lt_cv_aix_libpath_
8890 fi
8891
8892 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
8893 archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
8894 else
8895 if test "$host_cpu" = ia64; then
8896 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
8897 allow_undefined_flag="-z nodefs"
8898 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"
8899 else
8900 # Determine the default libpath from the value encoded in an
8901 # empty executable.
8902 if test "${lt_cv_aix_libpath+set}" = set; then
8903 aix_libpath=$lt_cv_aix_libpath
8904 else
8905 if ${lt_cv_aix_libpath_+:} false; then :
8906 $as_echo_n "(cached) " >&6
8907 else
8908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8909 /* end confdefs.h. */
8910
8911 int
8912 main ()
8913 {
8914
8915 ;
8916 return 0;
8917 }
8918 _ACEOF
8919 if ac_fn_c_try_link "$LINENO"; then :
8920
8921 lt_aix_libpath_sed='
8922 /Import File Strings/,/^$/ {
8923 /^0/ {
8924 s/^0 *\([^ ]*\) *$/\1/
8925 p
8926 }
8927 }'
8928 lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8929 # Check for a 64-bit object if we didn't find anything.
8930 if test -z "$lt_cv_aix_libpath_"; then
8931 lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8932 fi
8933 fi
8934 rm -f core conftest.err conftest.$ac_objext \
8935 conftest$ac_exeext conftest.$ac_ext
8936 if test -z "$lt_cv_aix_libpath_"; then
8937 lt_cv_aix_libpath_="/usr/lib:/lib"
8938 fi
8939
8940 fi
8941
8942 aix_libpath=$lt_cv_aix_libpath_
8943 fi
8944
8945 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
8946 # Warning - without using the other run time loading flags,
8947 # -berok will link without error, but may produce a broken library.
8948 no_undefined_flag=' ${wl}-bernotok'
8949 allow_undefined_flag=' ${wl}-berok'
8950 if test "$with_gnu_ld" = yes; then
8951 # We only use this code for GNU lds that support --whole-archive.
8952 whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
8953 else
8954 # Exported symbols can be pulled into shared objects from archives
8955 whole_archive_flag_spec='$convenience'
8956 fi
8957 archive_cmds_need_lc=yes
8958 # This is similar to how AIX traditionally builds its shared libraries.
8959 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'
8960 fi
8961 fi
8962 ;;
8963
8964 amigaos*)
8965 case $host_cpu in
8966 powerpc)
8967 # see comment about AmigaOS4 .so support
8968 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8969 archive_expsym_cmds=''
8970 ;;
8971 m68k)
8972 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)'
8973 hardcode_libdir_flag_spec='-L$libdir'
8974 hardcode_minus_L=yes
8975 ;;
8976 esac
8977 ;;
8978
8979 bsdi[45]*)
8980 export_dynamic_flag_spec=-rdynamic
8981 ;;
8982
8983 cygwin* | mingw* | pw32* | cegcc*)
8984 # When not using gcc, we currently assume that we are using
8985 # Microsoft Visual C++.
8986 # hardcode_libdir_flag_spec is actually meaningless, as there is
8987 # no search path for DLLs.
8988 case $cc_basename in
8989 cl*)
8990 # Native MSVC
8991 hardcode_libdir_flag_spec=' '
8992 allow_undefined_flag=unsupported
8993 always_export_symbols=yes
8994 file_list_spec='@'
8995 # Tell ltmain to make .lib files, not .a files.
8996 libext=lib
8997 # Tell ltmain to make .dll files, not .so files.
8998 shrext_cmds=".dll"
8999 # FIXME: Setting linknames here is a bad hack.
9000 archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
9001 archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
9002 sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
9003 else
9004 sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
9005 fi~
9006 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
9007 linknames='
9008 # The linker will not automatically build a static lib if we build a DLL.
9009 # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
9010 enable_shared_with_static_runtimes=yes
9011 exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
9012 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
9013 # Don't use ranlib
9014 old_postinstall_cmds='chmod 644 $oldlib'
9015 postlink_cmds='lt_outputfile="@OUTPUT@"~
9016 lt_tool_outputfile="@TOOL_OUTPUT@"~
9017 case $lt_outputfile in
9018 *.exe|*.EXE) ;;
9019 *)
9020 lt_outputfile="$lt_outputfile.exe"
9021 lt_tool_outputfile="$lt_tool_outputfile.exe"
9022 ;;
9023 esac~
9024 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
9025 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
9026 $RM "$lt_outputfile.manifest";
9027 fi'
9028 ;;
9029 *)
9030 # Assume MSVC wrapper
9031 hardcode_libdir_flag_spec=' '
9032 allow_undefined_flag=unsupported
9033 # Tell ltmain to make .lib files, not .a files.
9034 libext=lib
9035 # Tell ltmain to make .dll files, not .so files.
9036 shrext_cmds=".dll"
9037 # FIXME: Setting linknames here is a bad hack.
9038 archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
9039 # The linker will automatically build a .lib file if we build a DLL.
9040 old_archive_from_new_cmds='true'
9041 # FIXME: Should let the user specify the lib program.
9042 old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
9043 enable_shared_with_static_runtimes=yes
9044 ;;
9045 esac
9046 ;;
9047
9048 darwin* | rhapsody*)
9049
9050
9051 archive_cmds_need_lc=no
9052 hardcode_direct=no
9053 hardcode_automatic=yes
9054 hardcode_shlibpath_var=unsupported
9055 if test "$lt_cv_ld_force_load" = "yes"; then
9056 whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
9057
9058 else
9059 whole_archive_flag_spec=''
9060 fi
9061 link_all_deplibs=yes
9062 allow_undefined_flag="$_lt_dar_allow_undefined"
9063 case $cc_basename in
9064 ifort*) _lt_dar_can_shared=yes ;;
9065 *) _lt_dar_can_shared=$GCC ;;
9066 esac
9067 if test "$_lt_dar_can_shared" = "yes"; then
9068 output_verbose_link_cmd=func_echo_all
9069 archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
9070 module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
9071 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}"
9072 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}"
9073
9074 else
9075 ld_shlibs=no
9076 fi
9077
9078 ;;
9079
9080 dgux*)
9081 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9082 hardcode_libdir_flag_spec='-L$libdir'
9083 hardcode_shlibpath_var=no
9084 ;;
9085
9086 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
9087 # support. Future versions do this automatically, but an explicit c++rt0.o
9088 # does not break anything, and helps significantly (at the cost of a little
9089 # extra space).
9090 freebsd2.2*)
9091 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
9092 hardcode_libdir_flag_spec='-R$libdir'
9093 hardcode_direct=yes
9094 hardcode_shlibpath_var=no
9095 ;;
9096
9097 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
9098 freebsd2.*)
9099 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9100 hardcode_direct=yes
9101 hardcode_minus_L=yes
9102 hardcode_shlibpath_var=no
9103 ;;
9104
9105 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
9106 freebsd* | dragonfly*)
9107 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9108 hardcode_libdir_flag_spec='-R$libdir'
9109 hardcode_direct=yes
9110 hardcode_shlibpath_var=no
9111 ;;
9112
9113 hpux9*)
9114 if test "$GCC" = yes; then
9115 archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
9116 else
9117 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'
9118 fi
9119 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
9120 hardcode_libdir_separator=:
9121 hardcode_direct=yes
9122
9123 # hardcode_minus_L: Not really in the search PATH,
9124 # but as the default location of the library.
9125 hardcode_minus_L=yes
9126 export_dynamic_flag_spec='${wl}-E'
9127 ;;
9128
9129 hpux10*)
9130 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
9131 archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
9132 else
9133 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
9134 fi
9135 if test "$with_gnu_ld" = no; then
9136 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
9137 hardcode_libdir_separator=:
9138 hardcode_direct=yes
9139 hardcode_direct_absolute=yes
9140 export_dynamic_flag_spec='${wl}-E'
9141 # hardcode_minus_L: Not really in the search PATH,
9142 # but as the default location of the library.
9143 hardcode_minus_L=yes
9144 fi
9145 ;;
9146
9147 hpux11*)
9148 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
9149 case $host_cpu in
9150 hppa*64*)
9151 archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9152 ;;
9153 ia64*)
9154 archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
9155 ;;
9156 *)
9157 archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
9158 ;;
9159 esac
9160 else
9161 case $host_cpu in
9162 hppa*64*)
9163 archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9164 ;;
9165 ia64*)
9166 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
9167 ;;
9168 *)
9169
9170 # Older versions of the 11.00 compiler do not understand -b yet
9171 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
9172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
9173 $as_echo_n "checking if $CC understands -b... " >&6; }
9174 if ${lt_cv_prog_compiler__b+:} false; then :
9175 $as_echo_n "(cached) " >&6
9176 else
9177 lt_cv_prog_compiler__b=no
9178 save_LDFLAGS="$LDFLAGS"
9179 LDFLAGS="$LDFLAGS -b"
9180 echo "$lt_simple_link_test_code" > conftest.$ac_ext
9181 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
9182 # The linker can only warn and ignore the option if not recognized
9183 # So say no if there are warnings
9184 if test -s conftest.err; then
9185 # Append any errors to the config.log.
9186 cat conftest.err 1>&5
9187 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
9188 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
9189 if diff conftest.exp conftest.er2 >/dev/null; then
9190 lt_cv_prog_compiler__b=yes
9191 fi
9192 else
9193 lt_cv_prog_compiler__b=yes
9194 fi
9195 fi
9196 $RM -r conftest*
9197 LDFLAGS="$save_LDFLAGS"
9198
9199 fi
9200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
9201 $as_echo "$lt_cv_prog_compiler__b" >&6; }
9202
9203 if test x"$lt_cv_prog_compiler__b" = xyes; then
9204 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
9205 else
9206 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
9207 fi
9208
9209 ;;
9210 esac
9211 fi
9212 if test "$with_gnu_ld" = no; then
9213 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
9214 hardcode_libdir_separator=:
9215
9216 case $host_cpu in
9217 hppa*64*|ia64*)
9218 hardcode_direct=no
9219 hardcode_shlibpath_var=no
9220 ;;
9221 *)
9222 hardcode_direct=yes
9223 hardcode_direct_absolute=yes
9224 export_dynamic_flag_spec='${wl}-E'
9225
9226 # hardcode_minus_L: Not really in the search PATH,
9227 # but as the default location of the library.
9228 hardcode_minus_L=yes
9229 ;;
9230 esac
9231 fi
9232 ;;
9233
9234 irix5* | irix6* | nonstopux*)
9235 if test "$GCC" = yes; then
9236 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
9237 # Try to use the -exported_symbol ld option, if it does not
9238 # work, assume that -exports_file does not work either and
9239 # implicitly export all symbols.
9240 # This should be the same for all languages, so no per-tag cache variable.
9241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
9242 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
9243 if ${lt_cv_irix_exported_symbol+:} false; then :
9244 $as_echo_n "(cached) " >&6
9245 else
9246 save_LDFLAGS="$LDFLAGS"
9247 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
9248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9249 /* end confdefs.h. */
9250 int foo (void) { return 0; }
9251 _ACEOF
9252 if ac_fn_c_try_link "$LINENO"; then :
9253 lt_cv_irix_exported_symbol=yes
9254 else
9255 lt_cv_irix_exported_symbol=no
9256 fi
9257 rm -f core conftest.err conftest.$ac_objext \
9258 conftest$ac_exeext conftest.$ac_ext
9259 LDFLAGS="$save_LDFLAGS"
9260 fi
9261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
9262 $as_echo "$lt_cv_irix_exported_symbol" >&6; }
9263 if test "$lt_cv_irix_exported_symbol" = yes; then
9264 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
9265 fi
9266 else
9267 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
9268 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
9269 fi
9270 archive_cmds_need_lc='no'
9271 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9272 hardcode_libdir_separator=:
9273 inherit_rpath=yes
9274 link_all_deplibs=yes
9275 ;;
9276
9277 netbsd* | netbsdelf*-gnu)
9278 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
9279 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
9280 else
9281 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
9282 fi
9283 hardcode_libdir_flag_spec='-R$libdir'
9284 hardcode_direct=yes
9285 hardcode_shlibpath_var=no
9286 ;;
9287
9288 newsos6)
9289 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9290 hardcode_direct=yes
9291 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9292 hardcode_libdir_separator=:
9293 hardcode_shlibpath_var=no
9294 ;;
9295
9296 *nto* | *qnx*)
9297 ;;
9298
9299 openbsd*)
9300 if test -f /usr/libexec/ld.so; then
9301 hardcode_direct=yes
9302 hardcode_shlibpath_var=no
9303 hardcode_direct_absolute=yes
9304 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
9305 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9306 archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
9307 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
9308 export_dynamic_flag_spec='${wl}-E'
9309 else
9310 case $host_os in
9311 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
9312 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9313 hardcode_libdir_flag_spec='-R$libdir'
9314 ;;
9315 *)
9316 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9317 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
9318 ;;
9319 esac
9320 fi
9321 else
9322 ld_shlibs=no
9323 fi
9324 ;;
9325
9326 os2*)
9327 hardcode_libdir_flag_spec='-L$libdir'
9328 hardcode_minus_L=yes
9329 allow_undefined_flag=unsupported
9330 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'
9331 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
9332 ;;
9333
9334 osf3*)
9335 if test "$GCC" = yes; then
9336 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
9337 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
9338 else
9339 allow_undefined_flag=' -expect_unresolved \*'
9340 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
9341 fi
9342 archive_cmds_need_lc='no'
9343 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9344 hardcode_libdir_separator=:
9345 ;;
9346
9347 osf4* | osf5*) # as osf3* with the addition of -msym flag
9348 if test "$GCC" = yes; then
9349 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
9350 archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
9351 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9352 else
9353 allow_undefined_flag=' -expect_unresolved \*'
9354 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
9355 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~
9356 $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
9357
9358 # Both c and cxx compiler support -rpath directly
9359 hardcode_libdir_flag_spec='-rpath $libdir'
9360 fi
9361 archive_cmds_need_lc='no'
9362 hardcode_libdir_separator=:
9363 ;;
9364
9365 solaris*)
9366 no_undefined_flag=' -z defs'
9367 if test "$GCC" = yes; then
9368 wlarc='${wl}'
9369 archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9370 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
9371 $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
9372 else
9373 case `$CC -V 2>&1` in
9374 *"Compilers 5.0"*)
9375 wlarc=''
9376 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
9377 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
9378 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
9379 ;;
9380 *)
9381 wlarc='${wl}'
9382 archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
9383 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
9384 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
9385 ;;
9386 esac
9387 fi
9388 hardcode_libdir_flag_spec='-R$libdir'
9389 hardcode_shlibpath_var=no
9390 case $host_os in
9391 solaris2.[0-5] | solaris2.[0-5].*) ;;
9392 *)
9393 # The compiler driver will combine and reorder linker options,
9394 # but understands `-z linker_flag'. GCC discards it without `$wl',
9395 # but is careful enough not to reorder.
9396 # Supported since Solaris 2.6 (maybe 2.5.1?)
9397 if test "$GCC" = yes; then
9398 whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
9399 else
9400 whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
9401 fi
9402 ;;
9403 esac
9404 link_all_deplibs=yes
9405 ;;
9406
9407 sunos4*)
9408 if test "x$host_vendor" = xsequent; then
9409 # Use $CC to link under sequent, because it throws in some extra .o
9410 # files that make .init and .fini sections work.
9411 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
9412 else
9413 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
9414 fi
9415 hardcode_libdir_flag_spec='-L$libdir'
9416 hardcode_direct=yes
9417 hardcode_minus_L=yes
9418 hardcode_shlibpath_var=no
9419 ;;
9420
9421 sysv4)
9422 case $host_vendor in
9423 sni)
9424 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9425 hardcode_direct=yes # is this really true???
9426 ;;
9427 siemens)
9428 ## LD is ld it makes a PLAMLIB
9429 ## CC just makes a GrossModule.
9430 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
9431 reload_cmds='$CC -r -o $output$reload_objs'
9432 hardcode_direct=no
9433 ;;
9434 motorola)
9435 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9436 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
9437 ;;
9438 esac
9439 runpath_var='LD_RUN_PATH'
9440 hardcode_shlibpath_var=no
9441 ;;
9442
9443 sysv4.3*)
9444 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9445 hardcode_shlibpath_var=no
9446 export_dynamic_flag_spec='-Bexport'
9447 ;;
9448
9449 sysv4*MP*)
9450 if test -d /usr/nec; then
9451 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9452 hardcode_shlibpath_var=no
9453 runpath_var=LD_RUN_PATH
9454 hardcode_runpath_var=yes
9455 ld_shlibs=yes
9456 fi
9457 ;;
9458
9459 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
9460 no_undefined_flag='${wl}-z,text'
9461 archive_cmds_need_lc=no
9462 hardcode_shlibpath_var=no
9463 runpath_var='LD_RUN_PATH'
9464
9465 if test "$GCC" = yes; then
9466 archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9467 archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9468 else
9469 archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9470 archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9471 fi
9472 ;;
9473
9474 sysv5* | sco3.2v5* | sco5v6*)
9475 # Note: We can NOT use -z defs as we might desire, because we do not
9476 # link with -lc, and that would cause any symbols used from libc to
9477 # always be unresolved, which means just about no library would
9478 # ever link correctly. If we're not using GNU ld we use -z text
9479 # though, which does catch some bad symbols but isn't as heavy-handed
9480 # as -z defs.
9481 no_undefined_flag='${wl}-z,text'
9482 allow_undefined_flag='${wl}-z,nodefs'
9483 archive_cmds_need_lc=no
9484 hardcode_shlibpath_var=no
9485 hardcode_libdir_flag_spec='${wl}-R,$libdir'
9486 hardcode_libdir_separator=':'
9487 link_all_deplibs=yes
9488 export_dynamic_flag_spec='${wl}-Bexport'
9489 runpath_var='LD_RUN_PATH'
9490
9491 if test "$GCC" = yes; then
9492 archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9493 archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9494 else
9495 archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9496 archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9497 fi
9498 ;;
9499
9500 uts4*)
9501 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9502 hardcode_libdir_flag_spec='-L$libdir'
9503 hardcode_shlibpath_var=no
9504 ;;
9505
9506 *)
9507 ld_shlibs=no
9508 ;;
9509 esac
9510
9511 if test x$host_vendor = xsni; then
9512 case $host in
9513 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
9514 export_dynamic_flag_spec='${wl}-Blargedynsym'
9515 ;;
9516 esac
9517 fi
9518 fi
9519
9520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
9521 $as_echo "$ld_shlibs" >&6; }
9522 test "$ld_shlibs" = no && can_build_shared=no
9523
9524 with_gnu_ld=$with_gnu_ld
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540 #
9541 # Do we need to explicitly link libc?
9542 #
9543 case "x$archive_cmds_need_lc" in
9544 x|xyes)
9545 # Assume -lc should be added
9546 archive_cmds_need_lc=yes
9547
9548 if test "$enable_shared" = yes && test "$GCC" = yes; then
9549 case $archive_cmds in
9550 *'~'*)
9551 # FIXME: we may have to deal with multi-command sequences.
9552 ;;
9553 '$CC '*)
9554 # Test whether the compiler implicitly links with -lc since on some
9555 # systems, -lgcc has to come before -lc. If gcc already passes -lc
9556 # to ld, don't add -lc before -lgcc.
9557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
9558 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
9559 if ${lt_cv_archive_cmds_need_lc+:} false; then :
9560 $as_echo_n "(cached) " >&6
9561 else
9562 $RM conftest*
9563 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
9564
9565 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9566 (eval $ac_compile) 2>&5
9567 ac_status=$?
9568 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9569 test $ac_status = 0; } 2>conftest.err; then
9570 soname=conftest
9571 lib=conftest
9572 libobjs=conftest.$ac_objext
9573 deplibs=
9574 wl=$lt_prog_compiler_wl
9575 pic_flag=$lt_prog_compiler_pic
9576 compiler_flags=-v
9577 linker_flags=-v
9578 verstring=
9579 output_objdir=.
9580 libname=conftest
9581 lt_save_allow_undefined_flag=$allow_undefined_flag
9582 allow_undefined_flag=
9583 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
9584 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
9585 ac_status=$?
9586 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9587 test $ac_status = 0; }
9588 then
9589 lt_cv_archive_cmds_need_lc=no
9590 else
9591 lt_cv_archive_cmds_need_lc=yes
9592 fi
9593 allow_undefined_flag=$lt_save_allow_undefined_flag
9594 else
9595 cat conftest.err 1>&5
9596 fi
9597 $RM conftest*
9598
9599 fi
9600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
9601 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
9602 archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
9603 ;;
9604 esac
9605 fi
9606 ;;
9607 esac
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
9761 $as_echo_n "checking dynamic linker characteristics... " >&6; }
9762
9763 if test "$GCC" = yes; then
9764 case $host_os in
9765 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
9766 *) lt_awk_arg="/^libraries:/" ;;
9767 esac
9768 case $host_os in
9769 mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;;
9770 *) lt_sed_strip_eq="s,=/,/,g" ;;
9771 esac
9772 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
9773 case $lt_search_path_spec in
9774 *\;*)
9775 # if the path contains ";" then we assume it to be the separator
9776 # otherwise default to the standard path separator (i.e. ":") - it is
9777 # assumed that no part of a normal pathname contains ";" but that should
9778 # okay in the real world where ";" in dirpaths is itself problematic.
9779 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
9780 ;;
9781 *)
9782 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
9783 ;;
9784 esac
9785 # Ok, now we have the path, separated by spaces, we can step through it
9786 # and add multilib dir if necessary.
9787 lt_tmp_lt_search_path_spec=
9788 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
9789 for lt_sys_path in $lt_search_path_spec; do
9790 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
9791 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
9792 else
9793 test -d "$lt_sys_path" && \
9794 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
9795 fi
9796 done
9797 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
9798 BEGIN {RS=" "; FS="/|\n";} {
9799 lt_foo="";
9800 lt_count=0;
9801 for (lt_i = NF; lt_i > 0; lt_i--) {
9802 if ($lt_i != "" && $lt_i != ".") {
9803 if ($lt_i == "..") {
9804 lt_count++;
9805 } else {
9806 if (lt_count == 0) {
9807 lt_foo="/" $lt_i lt_foo;
9808 } else {
9809 lt_count--;
9810 }
9811 }
9812 }
9813 }
9814 if (lt_foo != "") { lt_freq[lt_foo]++; }
9815 if (lt_freq[lt_foo] == 1) { print lt_foo; }
9816 }'`
9817 # AWK program above erroneously prepends '/' to C:/dos/paths
9818 # for these hosts.
9819 case $host_os in
9820 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
9821 $SED 's,/\([A-Za-z]:\),\1,g'` ;;
9822 esac
9823 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
9824 else
9825 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
9826 fi
9827 library_names_spec=
9828 libname_spec='lib$name'
9829 soname_spec=
9830 shrext_cmds=".so"
9831 postinstall_cmds=
9832 postuninstall_cmds=
9833 finish_cmds=
9834 finish_eval=
9835 shlibpath_var=
9836 shlibpath_overrides_runpath=unknown
9837 version_type=none
9838 dynamic_linker="$host_os ld.so"
9839 sys_lib_dlsearch_path_spec="/lib /usr/lib"
9840 need_lib_prefix=unknown
9841 hardcode_into_libs=no
9842
9843 # when you set need_version to no, make sure it does not cause -set_version
9844 # flags to be left without arguments
9845 need_version=unknown
9846
9847 case $host_os in
9848 aix3*)
9849 version_type=linux # correct to gnu/linux during the next big refactor
9850 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
9851 shlibpath_var=LIBPATH
9852
9853 # AIX 3 has no versioning support, so we append a major version to the name.
9854 soname_spec='${libname}${release}${shared_ext}$major'
9855 ;;
9856
9857 aix[4-9]*)
9858 version_type=linux # correct to gnu/linux during the next big refactor
9859 need_lib_prefix=no
9860 need_version=no
9861 hardcode_into_libs=yes
9862 if test "$host_cpu" = ia64; then
9863 # AIX 5 supports IA64
9864 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
9865 shlibpath_var=LD_LIBRARY_PATH
9866 else
9867 # With GCC up to 2.95.x, collect2 would create an import file
9868 # for dependence libraries. The import file would start with
9869 # the line `#! .'. This would cause the generated library to
9870 # depend on `.', always an invalid library. This was fixed in
9871 # development snapshots of GCC prior to 3.0.
9872 case $host_os in
9873 aix4 | aix4.[01] | aix4.[01].*)
9874 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
9875 echo ' yes '
9876 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
9877 :
9878 else
9879 can_build_shared=no
9880 fi
9881 ;;
9882 esac
9883 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
9884 # soname into executable. Probably we can add versioning support to
9885 # collect2, so additional links can be useful in future.
9886 if test "$aix_use_runtimelinking" = yes; then
9887 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
9888 # instead of lib<name>.a to let people know that these are not
9889 # typical AIX shared libraries.
9890 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9891 else
9892 # We preserve .a as extension for shared libraries through AIX4.2
9893 # and later when we are not doing run time linking.
9894 library_names_spec='${libname}${release}.a $libname.a'
9895 soname_spec='${libname}${release}${shared_ext}$major'
9896 fi
9897 shlibpath_var=LIBPATH
9898 fi
9899 ;;
9900
9901 amigaos*)
9902 case $host_cpu in
9903 powerpc)
9904 # Since July 2007 AmigaOS4 officially supports .so libraries.
9905 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
9906 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9907 ;;
9908 m68k)
9909 library_names_spec='$libname.ixlibrary $libname.a'
9910 # Create ${libname}_ixlibrary.a entries in /sys/libs.
9911 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
9912 ;;
9913 esac
9914 ;;
9915
9916 beos*)
9917 library_names_spec='${libname}${shared_ext}'
9918 dynamic_linker="$host_os ld.so"
9919 shlibpath_var=LIBRARY_PATH
9920 ;;
9921
9922 bsdi[45]*)
9923 version_type=linux # correct to gnu/linux during the next big refactor
9924 need_version=no
9925 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9926 soname_spec='${libname}${release}${shared_ext}$major'
9927 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
9928 shlibpath_var=LD_LIBRARY_PATH
9929 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
9930 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
9931 # the default ld.so.conf also contains /usr/contrib/lib and
9932 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
9933 # libtool to hard-code these into programs
9934 ;;
9935
9936 cygwin* | mingw* | pw32* | cegcc*)
9937 version_type=windows
9938 shrext_cmds=".dll"
9939 need_version=no
9940 need_lib_prefix=no
9941
9942 case $GCC,$cc_basename in
9943 yes,*)
9944 # gcc
9945 library_names_spec='$libname.dll.a'
9946 # DLL is installed to $(libdir)/../bin by postinstall_cmds
9947 postinstall_cmds='base_file=`basename \${file}`~
9948 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
9949 dldir=$destdir/`dirname \$dlpath`~
9950 test -d \$dldir || mkdir -p \$dldir~
9951 $install_prog $dir/$dlname \$dldir/$dlname~
9952 chmod a+x \$dldir/$dlname~
9953 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
9954 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
9955 fi'
9956 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
9957 dlpath=$dir/\$dldll~
9958 $RM \$dlpath'
9959 shlibpath_overrides_runpath=yes
9960
9961 case $host_os in
9962 cygwin*)
9963 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
9964 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9965
9966 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
9967 ;;
9968 mingw* | cegcc*)
9969 # MinGW DLLs use traditional 'lib' prefix
9970 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9971 ;;
9972 pw32*)
9973 # pw32 DLLs use 'pw' prefix rather than 'lib'
9974 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9975 ;;
9976 esac
9977 dynamic_linker='Win32 ld.exe'
9978 ;;
9979
9980 *,cl*)
9981 # Native MSVC
9982 libname_spec='$name'
9983 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9984 library_names_spec='${libname}.dll.lib'
9985
9986 case $build_os in
9987 mingw*)
9988 sys_lib_search_path_spec=
9989 lt_save_ifs=$IFS
9990 IFS=';'
9991 for lt_path in $LIB
9992 do
9993 IFS=$lt_save_ifs
9994 # Let DOS variable expansion print the short 8.3 style file name.
9995 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
9996 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
9997 done
9998 IFS=$lt_save_ifs
9999 # Convert to MSYS style.
10000 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
10001 ;;
10002 cygwin*)
10003 # Convert to unix form, then to dos form, then back to unix form
10004 # but this time dos style (no spaces!) so that the unix form looks
10005 # like /cygdrive/c/PROGRA~1:/cygdr...
10006 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
10007 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
10008 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
10009 ;;
10010 *)
10011 sys_lib_search_path_spec="$LIB"
10012 if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
10013 # It is most probably a Windows format PATH.
10014 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
10015 else
10016 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
10017 fi
10018 # FIXME: find the short name or the path components, as spaces are
10019 # common. (e.g. "Program Files" -> "PROGRA~1")
10020 ;;
10021 esac
10022
10023 # DLL is installed to $(libdir)/../bin by postinstall_cmds
10024 postinstall_cmds='base_file=`basename \${file}`~
10025 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
10026 dldir=$destdir/`dirname \$dlpath`~
10027 test -d \$dldir || mkdir -p \$dldir~
10028 $install_prog $dir/$dlname \$dldir/$dlname'
10029 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
10030 dlpath=$dir/\$dldll~
10031 $RM \$dlpath'
10032 shlibpath_overrides_runpath=yes
10033 dynamic_linker='Win32 link.exe'
10034 ;;
10035
10036 *)
10037 # Assume MSVC wrapper
10038 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
10039 dynamic_linker='Win32 ld.exe'
10040 ;;
10041 esac
10042 # FIXME: first we should search . and the directory the executable is in
10043 shlibpath_var=PATH
10044 ;;
10045
10046 darwin* | rhapsody*)
10047 dynamic_linker="$host_os dyld"
10048 version_type=darwin
10049 need_lib_prefix=no
10050 need_version=no
10051 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
10052 soname_spec='${libname}${release}${major}$shared_ext'
10053 shlibpath_overrides_runpath=yes
10054 shlibpath_var=DYLD_LIBRARY_PATH
10055 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
10056
10057 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
10058 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
10059 ;;
10060
10061 dgux*)
10062 version_type=linux # correct to gnu/linux during the next big refactor
10063 need_lib_prefix=no
10064 need_version=no
10065 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
10066 soname_spec='${libname}${release}${shared_ext}$major'
10067 shlibpath_var=LD_LIBRARY_PATH
10068 ;;
10069
10070 freebsd* | dragonfly*)
10071 # DragonFly does not have aout. When/if they implement a new
10072 # versioning mechanism, adjust this.
10073 if test -x /usr/bin/objformat; then
10074 objformat=`/usr/bin/objformat`
10075 else
10076 case $host_os in
10077 freebsd[23].*) objformat=aout ;;
10078 *) objformat=elf ;;
10079 esac
10080 fi
10081 version_type=freebsd-$objformat
10082 case $version_type in
10083 freebsd-elf*)
10084 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
10085 need_version=no
10086 need_lib_prefix=no
10087 ;;
10088 freebsd-*)
10089 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
10090 need_version=yes
10091 ;;
10092 esac
10093 shlibpath_var=LD_LIBRARY_PATH
10094 case $host_os in
10095 freebsd2.*)
10096 shlibpath_overrides_runpath=yes
10097 ;;
10098 freebsd3.[01]* | freebsdelf3.[01]*)
10099 shlibpath_overrides_runpath=yes
10100 hardcode_into_libs=yes
10101 ;;
10102 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
10103 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
10104 shlibpath_overrides_runpath=no
10105 hardcode_into_libs=yes
10106 ;;
10107 *) # from 4.6 on, and DragonFly
10108 shlibpath_overrides_runpath=yes
10109 hardcode_into_libs=yes
10110 ;;
10111 esac
10112 ;;
10113
10114 haiku*)
10115 version_type=linux # correct to gnu/linux during the next big refactor
10116 need_lib_prefix=no
10117 need_version=no
10118 dynamic_linker="$host_os runtime_loader"
10119 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
10120 soname_spec='${libname}${release}${shared_ext}$major'
10121 shlibpath_var=LIBRARY_PATH
10122 shlibpath_overrides_runpath=yes
10123 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
10124 hardcode_into_libs=yes
10125 ;;
10126
10127 hpux9* | hpux10* | hpux11*)
10128 # Give a soname corresponding to the major version so that dld.sl refuses to
10129 # link against other versions.
10130 version_type=sunos
10131 need_lib_prefix=no
10132 need_version=no
10133 case $host_cpu in
10134 ia64*)
10135 shrext_cmds='.so'
10136 hardcode_into_libs=yes
10137 dynamic_linker="$host_os dld.so"
10138 shlibpath_var=LD_LIBRARY_PATH
10139 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
10140 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10141 soname_spec='${libname}${release}${shared_ext}$major'
10142 if test "X$HPUX_IA64_MODE" = X32; then
10143 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
10144 else
10145 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
10146 fi
10147 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
10148 ;;
10149 hppa*64*)
10150 shrext_cmds='.sl'
10151 hardcode_into_libs=yes
10152 dynamic_linker="$host_os dld.sl"
10153 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
10154 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
10155 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10156 soname_spec='${libname}${release}${shared_ext}$major'
10157 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
10158 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
10159 ;;
10160 *)
10161 shrext_cmds='.sl'
10162 dynamic_linker="$host_os dld.sl"
10163 shlibpath_var=SHLIB_PATH
10164 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
10165 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10166 soname_spec='${libname}${release}${shared_ext}$major'
10167 ;;
10168 esac
10169 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
10170 postinstall_cmds='chmod 555 $lib'
10171 # or fails outright, so override atomically:
10172 install_override_mode=555
10173 ;;
10174
10175 interix[3-9]*)
10176 version_type=linux # correct to gnu/linux during the next big refactor
10177 need_lib_prefix=no
10178 need_version=no
10179 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
10180 soname_spec='${libname}${release}${shared_ext}$major'
10181 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
10182 shlibpath_var=LD_LIBRARY_PATH
10183 shlibpath_overrides_runpath=no
10184 hardcode_into_libs=yes
10185 ;;
10186
10187 irix5* | irix6* | nonstopux*)
10188 case $host_os in
10189 nonstopux*) version_type=nonstopux ;;
10190 *)
10191 if test "$lt_cv_prog_gnu_ld" = yes; then
10192 version_type=linux # correct to gnu/linux during the next big refactor
10193 else
10194 version_type=irix
10195 fi ;;
10196 esac
10197 need_lib_prefix=no
10198 need_version=no
10199 soname_spec='${libname}${release}${shared_ext}$major'
10200 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
10201 case $host_os in
10202 irix5* | nonstopux*)
10203 libsuff= shlibsuff=
10204 ;;
10205 *)
10206 case $LD in # libtool.m4 will add one of these switches to LD
10207 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
10208 libsuff= shlibsuff= libmagic=32-bit;;
10209 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
10210 libsuff=32 shlibsuff=N32 libmagic=N32;;
10211 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
10212 libsuff=64 shlibsuff=64 libmagic=64-bit;;
10213 *) libsuff= shlibsuff= libmagic=never-match;;
10214 esac
10215 ;;
10216 esac
10217 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
10218 shlibpath_overrides_runpath=no
10219 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
10220 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
10221 hardcode_into_libs=yes
10222 ;;
10223
10224 # No shared lib support for Linux oldld, aout, or coff.
10225 linux*oldld* | linux*aout* | linux*coff*)
10226 dynamic_linker=no
10227 ;;
10228
10229 # This must be glibc/ELF.
10230 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
10231 version_type=linux # correct to gnu/linux during the next big refactor
10232 need_lib_prefix=no
10233 need_version=no
10234 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10235 soname_spec='${libname}${release}${shared_ext}$major'
10236 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
10237 shlibpath_var=LD_LIBRARY_PATH
10238 shlibpath_overrides_runpath=no
10239
10240 # Some binutils ld are patched to set DT_RUNPATH
10241 if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
10242 $as_echo_n "(cached) " >&6
10243 else
10244 lt_cv_shlibpath_overrides_runpath=no
10245 save_LDFLAGS=$LDFLAGS
10246 save_libdir=$libdir
10247 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
10248 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
10249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10250 /* end confdefs.h. */
10251
10252 int
10253 main ()
10254 {
10255
10256 ;
10257 return 0;
10258 }
10259 _ACEOF
10260 if ac_fn_c_try_link "$LINENO"; then :
10261 if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
10262 lt_cv_shlibpath_overrides_runpath=yes
10263 fi
10264 fi
10265 rm -f core conftest.err conftest.$ac_objext \
10266 conftest$ac_exeext conftest.$ac_ext
10267 LDFLAGS=$save_LDFLAGS
10268 libdir=$save_libdir
10269
10270 fi
10271
10272 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
10273
10274 # This implies no fast_install, which is unacceptable.
10275 # Some rework will be needed to allow for fast_install
10276 # before this can be enabled.
10277 hardcode_into_libs=yes
10278
10279 # Append ld.so.conf contents to the search path
10280 if test -f /etc/ld.so.conf; then
10281 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
10282 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
10283 fi
10284
10285 # We used to test for /lib/ld.so.1 and disable shared libraries on
10286 # powerpc, because MkLinux only supported shared libraries with the
10287 # GNU dynamic linker. Since this was broken with cross compilers,
10288 # most powerpc-linux boxes support dynamic linking these days and
10289 # people can always --disable-shared, the test was removed, and we
10290 # assume the GNU/Linux dynamic linker is in use.
10291 dynamic_linker='GNU/Linux ld.so'
10292 ;;
10293
10294 netbsdelf*-gnu)
10295 version_type=linux
10296 need_lib_prefix=no
10297 need_version=no
10298 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
10299 soname_spec='${libname}${release}${shared_ext}$major'
10300 shlibpath_var=LD_LIBRARY_PATH
10301 shlibpath_overrides_runpath=no
10302 hardcode_into_libs=yes
10303 dynamic_linker='NetBSD ld.elf_so'
10304 ;;
10305
10306 netbsd*)
10307 version_type=sunos
10308 need_lib_prefix=no
10309 need_version=no
10310 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
10311 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
10312 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
10313 dynamic_linker='NetBSD (a.out) ld.so'
10314 else
10315 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
10316 soname_spec='${libname}${release}${shared_ext}$major'
10317 dynamic_linker='NetBSD ld.elf_so'
10318 fi
10319 shlibpath_var=LD_LIBRARY_PATH
10320 shlibpath_overrides_runpath=yes
10321 hardcode_into_libs=yes
10322 ;;
10323
10324 newsos6)
10325 version_type=linux # correct to gnu/linux during the next big refactor
10326 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10327 shlibpath_var=LD_LIBRARY_PATH
10328 shlibpath_overrides_runpath=yes
10329 ;;
10330
10331 *nto* | *qnx*)
10332 version_type=qnx
10333 need_lib_prefix=no
10334 need_version=no
10335 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10336 soname_spec='${libname}${release}${shared_ext}$major'
10337 shlibpath_var=LD_LIBRARY_PATH
10338 shlibpath_overrides_runpath=no
10339 hardcode_into_libs=yes
10340 dynamic_linker='ldqnx.so'
10341 ;;
10342
10343 openbsd*)
10344 version_type=sunos
10345 sys_lib_dlsearch_path_spec="/usr/lib"
10346 need_lib_prefix=no
10347 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
10348 case $host_os in
10349 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
10350 *) need_version=no ;;
10351 esac
10352 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
10353 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
10354 shlibpath_var=LD_LIBRARY_PATH
10355 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
10356 case $host_os in
10357 openbsd2.[89] | openbsd2.[89].*)
10358 shlibpath_overrides_runpath=no
10359 ;;
10360 *)
10361 shlibpath_overrides_runpath=yes
10362 ;;
10363 esac
10364 else
10365 shlibpath_overrides_runpath=yes
10366 fi
10367 ;;
10368
10369 os2*)
10370 libname_spec='$name'
10371 shrext_cmds=".dll"
10372 need_lib_prefix=no
10373 library_names_spec='$libname${shared_ext} $libname.a'
10374 dynamic_linker='OS/2 ld.exe'
10375 shlibpath_var=LIBPATH
10376 ;;
10377
10378 osf3* | osf4* | osf5*)
10379 version_type=osf
10380 need_lib_prefix=no
10381 need_version=no
10382 soname_spec='${libname}${release}${shared_ext}$major'
10383 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10384 shlibpath_var=LD_LIBRARY_PATH
10385 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
10386 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
10387 ;;
10388
10389 rdos*)
10390 dynamic_linker=no
10391 ;;
10392
10393 solaris*)
10394 version_type=linux # correct to gnu/linux during the next big refactor
10395 need_lib_prefix=no
10396 need_version=no
10397 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10398 soname_spec='${libname}${release}${shared_ext}$major'
10399 shlibpath_var=LD_LIBRARY_PATH
10400 shlibpath_overrides_runpath=yes
10401 hardcode_into_libs=yes
10402 # ldd complains unless libraries are executable
10403 postinstall_cmds='chmod +x $lib'
10404 ;;
10405
10406 sunos4*)
10407 version_type=sunos
10408 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
10409 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
10410 shlibpath_var=LD_LIBRARY_PATH
10411 shlibpath_overrides_runpath=yes
10412 if test "$with_gnu_ld" = yes; then
10413 need_lib_prefix=no
10414 fi
10415 need_version=yes
10416 ;;
10417
10418 sysv4 | sysv4.3*)
10419 version_type=linux # correct to gnu/linux during the next big refactor
10420 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10421 soname_spec='${libname}${release}${shared_ext}$major'
10422 shlibpath_var=LD_LIBRARY_PATH
10423 case $host_vendor in
10424 sni)
10425 shlibpath_overrides_runpath=no
10426 need_lib_prefix=no
10427 runpath_var=LD_RUN_PATH
10428 ;;
10429 siemens)
10430 need_lib_prefix=no
10431 ;;
10432 motorola)
10433 need_lib_prefix=no
10434 need_version=no
10435 shlibpath_overrides_runpath=no
10436 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
10437 ;;
10438 esac
10439 ;;
10440
10441 sysv4*MP*)
10442 if test -d /usr/nec ;then
10443 version_type=linux # correct to gnu/linux during the next big refactor
10444 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
10445 soname_spec='$libname${shared_ext}.$major'
10446 shlibpath_var=LD_LIBRARY_PATH
10447 fi
10448 ;;
10449
10450 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
10451 version_type=freebsd-elf
10452 need_lib_prefix=no
10453 need_version=no
10454 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
10455 soname_spec='${libname}${release}${shared_ext}$major'
10456 shlibpath_var=LD_LIBRARY_PATH
10457 shlibpath_overrides_runpath=yes
10458 hardcode_into_libs=yes
10459 if test "$with_gnu_ld" = yes; then
10460 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
10461 else
10462 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
10463 case $host_os in
10464 sco3.2v5*)
10465 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
10466 ;;
10467 esac
10468 fi
10469 sys_lib_dlsearch_path_spec='/usr/lib'
10470 ;;
10471
10472 tpf*)
10473 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
10474 version_type=linux # correct to gnu/linux during the next big refactor
10475 need_lib_prefix=no
10476 need_version=no
10477 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10478 shlibpath_var=LD_LIBRARY_PATH
10479 shlibpath_overrides_runpath=no
10480 hardcode_into_libs=yes
10481 ;;
10482
10483 uts4*)
10484 version_type=linux # correct to gnu/linux during the next big refactor
10485 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10486 soname_spec='${libname}${release}${shared_ext}$major'
10487 shlibpath_var=LD_LIBRARY_PATH
10488 ;;
10489
10490 *)
10491 dynamic_linker=no
10492 ;;
10493 esac
10494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
10495 $as_echo "$dynamic_linker" >&6; }
10496 test "$dynamic_linker" = no && can_build_shared=no
10497
10498 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
10499 if test "$GCC" = yes; then
10500 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
10501 fi
10502
10503 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
10504 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
10505 fi
10506 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
10507 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
10508 fi
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
10602 $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
10603 hardcode_action=
10604 if test -n "$hardcode_libdir_flag_spec" ||
10605 test -n "$runpath_var" ||
10606 test "X$hardcode_automatic" = "Xyes" ; then
10607
10608 # We can hardcode non-existent directories.
10609 if test "$hardcode_direct" != no &&
10610 # If the only mechanism to avoid hardcoding is shlibpath_var, we
10611 # have to relink, otherwise we might link with an installed library
10612 # when we should be linking with a yet-to-be-installed one
10613 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
10614 test "$hardcode_minus_L" != no; then
10615 # Linking always hardcodes the temporary library directory.
10616 hardcode_action=relink
10617 else
10618 # We can link without hardcoding, and we can hardcode nonexisting dirs.
10619 hardcode_action=immediate
10620 fi
10621 else
10622 # We cannot hardcode anything, or else we can only hardcode existing
10623 # directories.
10624 hardcode_action=unsupported
10625 fi
10626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
10627 $as_echo "$hardcode_action" >&6; }
10628
10629 if test "$hardcode_action" = relink ||
10630 test "$inherit_rpath" = yes; then
10631 # Fast installation is not supported
10632 enable_fast_install=no
10633 elif test "$shlibpath_overrides_runpath" = yes ||
10634 test "$enable_shared" = no; then
10635 # Fast installation is not necessary
10636 enable_fast_install=needless
10637 fi
10638
10639
10640
10641
10642
10643
10644 if test "x$enable_dlopen" != xyes; then
10645 enable_dlopen=unknown
10646 enable_dlopen_self=unknown
10647 enable_dlopen_self_static=unknown
10648 else
10649 lt_cv_dlopen=no
10650 lt_cv_dlopen_libs=
10651
10652 case $host_os in
10653 beos*)
10654 lt_cv_dlopen="load_add_on"
10655 lt_cv_dlopen_libs=
10656 lt_cv_dlopen_self=yes
10657 ;;
10658
10659 mingw* | pw32* | cegcc*)
10660 lt_cv_dlopen="LoadLibrary"
10661 lt_cv_dlopen_libs=
10662 ;;
10663
10664 cygwin*)
10665 lt_cv_dlopen="dlopen"
10666 lt_cv_dlopen_libs=
10667 ;;
10668
10669 darwin*)
10670 # if libdl is installed we need to link against it
10671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
10672 $as_echo_n "checking for dlopen in -ldl... " >&6; }
10673 if ${ac_cv_lib_dl_dlopen+:} false; then :
10674 $as_echo_n "(cached) " >&6
10675 else
10676 ac_check_lib_save_LIBS=$LIBS
10677 LIBS="-ldl $LIBS"
10678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10679 /* end confdefs.h. */
10680
10681 /* Override any GCC internal prototype to avoid an error.
10682 Use char because int might match the return type of a GCC
10683 builtin and then its argument prototype would still apply. */
10684 #ifdef __cplusplus
10685 extern "C"
10686 #endif
10687 char dlopen ();
10688 int
10689 main ()
10690 {
10691 return dlopen ();
10692 ;
10693 return 0;
10694 }
10695 _ACEOF
10696 if ac_fn_c_try_link "$LINENO"; then :
10697 ac_cv_lib_dl_dlopen=yes
10698 else
10699 ac_cv_lib_dl_dlopen=no
10700 fi
10701 rm -f core conftest.err conftest.$ac_objext \
10702 conftest$ac_exeext conftest.$ac_ext
10703 LIBS=$ac_check_lib_save_LIBS
10704 fi
10705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
10706 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
10707 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
10708 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
10709 else
10710
10711 lt_cv_dlopen="dyld"
10712 lt_cv_dlopen_libs=
10713 lt_cv_dlopen_self=yes
10714
10715 fi
10716
10717 ;;
10718
10719 *)
10720 ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
10721 if test "x$ac_cv_func_shl_load" = xyes; then :
10722 lt_cv_dlopen="shl_load"
10723 else
10724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
10725 $as_echo_n "checking for shl_load in -ldld... " >&6; }
10726 if ${ac_cv_lib_dld_shl_load+:} false; then :
10727 $as_echo_n "(cached) " >&6
10728 else
10729 ac_check_lib_save_LIBS=$LIBS
10730 LIBS="-ldld $LIBS"
10731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10732 /* end confdefs.h. */
10733
10734 /* Override any GCC internal prototype to avoid an error.
10735 Use char because int might match the return type of a GCC
10736 builtin and then its argument prototype would still apply. */
10737 #ifdef __cplusplus
10738 extern "C"
10739 #endif
10740 char shl_load ();
10741 int
10742 main ()
10743 {
10744 return shl_load ();
10745 ;
10746 return 0;
10747 }
10748 _ACEOF
10749 if ac_fn_c_try_link "$LINENO"; then :
10750 ac_cv_lib_dld_shl_load=yes
10751 else
10752 ac_cv_lib_dld_shl_load=no
10753 fi
10754 rm -f core conftest.err conftest.$ac_objext \
10755 conftest$ac_exeext conftest.$ac_ext
10756 LIBS=$ac_check_lib_save_LIBS
10757 fi
10758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
10759 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
10760 if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
10761 lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
10762 else
10763 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
10764 if test "x$ac_cv_func_dlopen" = xyes; then :
10765 lt_cv_dlopen="dlopen"
10766 else
10767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
10768 $as_echo_n "checking for dlopen in -ldl... " >&6; }
10769 if ${ac_cv_lib_dl_dlopen+:} false; then :
10770 $as_echo_n "(cached) " >&6
10771 else
10772 ac_check_lib_save_LIBS=$LIBS
10773 LIBS="-ldl $LIBS"
10774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10775 /* end confdefs.h. */
10776
10777 /* Override any GCC internal prototype to avoid an error.
10778 Use char because int might match the return type of a GCC
10779 builtin and then its argument prototype would still apply. */
10780 #ifdef __cplusplus
10781 extern "C"
10782 #endif
10783 char dlopen ();
10784 int
10785 main ()
10786 {
10787 return dlopen ();
10788 ;
10789 return 0;
10790 }
10791 _ACEOF
10792 if ac_fn_c_try_link "$LINENO"; then :
10793 ac_cv_lib_dl_dlopen=yes
10794 else
10795 ac_cv_lib_dl_dlopen=no
10796 fi
10797 rm -f core conftest.err conftest.$ac_objext \
10798 conftest$ac_exeext conftest.$ac_ext
10799 LIBS=$ac_check_lib_save_LIBS
10800 fi
10801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
10802 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
10803 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
10804 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
10805 else
10806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
10807 $as_echo_n "checking for dlopen in -lsvld... " >&6; }
10808 if ${ac_cv_lib_svld_dlopen+:} false; then :
10809 $as_echo_n "(cached) " >&6
10810 else
10811 ac_check_lib_save_LIBS=$LIBS
10812 LIBS="-lsvld $LIBS"
10813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10814 /* end confdefs.h. */
10815
10816 /* Override any GCC internal prototype to avoid an error.
10817 Use char because int might match the return type of a GCC
10818 builtin and then its argument prototype would still apply. */
10819 #ifdef __cplusplus
10820 extern "C"
10821 #endif
10822 char dlopen ();
10823 int
10824 main ()
10825 {
10826 return dlopen ();
10827 ;
10828 return 0;
10829 }
10830 _ACEOF
10831 if ac_fn_c_try_link "$LINENO"; then :
10832 ac_cv_lib_svld_dlopen=yes
10833 else
10834 ac_cv_lib_svld_dlopen=no
10835 fi
10836 rm -f core conftest.err conftest.$ac_objext \
10837 conftest$ac_exeext conftest.$ac_ext
10838 LIBS=$ac_check_lib_save_LIBS
10839 fi
10840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
10841 $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
10842 if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
10843 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
10844 else
10845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
10846 $as_echo_n "checking for dld_link in -ldld... " >&6; }
10847 if ${ac_cv_lib_dld_dld_link+:} false; then :
10848 $as_echo_n "(cached) " >&6
10849 else
10850 ac_check_lib_save_LIBS=$LIBS
10851 LIBS="-ldld $LIBS"
10852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10853 /* end confdefs.h. */
10854
10855 /* Override any GCC internal prototype to avoid an error.
10856 Use char because int might match the return type of a GCC
10857 builtin and then its argument prototype would still apply. */
10858 #ifdef __cplusplus
10859 extern "C"
10860 #endif
10861 char dld_link ();
10862 int
10863 main ()
10864 {
10865 return dld_link ();
10866 ;
10867 return 0;
10868 }
10869 _ACEOF
10870 if ac_fn_c_try_link "$LINENO"; then :
10871 ac_cv_lib_dld_dld_link=yes
10872 else
10873 ac_cv_lib_dld_dld_link=no
10874 fi
10875 rm -f core conftest.err conftest.$ac_objext \
10876 conftest$ac_exeext conftest.$ac_ext
10877 LIBS=$ac_check_lib_save_LIBS
10878 fi
10879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
10880 $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
10881 if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
10882 lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
10883 fi
10884
10885
10886 fi
10887
10888
10889 fi
10890
10891
10892 fi
10893
10894
10895 fi
10896
10897
10898 fi
10899
10900 ;;
10901 esac
10902
10903 if test "x$lt_cv_dlopen" != xno; then
10904 enable_dlopen=yes
10905 else
10906 enable_dlopen=no
10907 fi
10908
10909 case $lt_cv_dlopen in
10910 dlopen)
10911 save_CPPFLAGS="$CPPFLAGS"
10912 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
10913
10914 save_LDFLAGS="$LDFLAGS"
10915 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
10916
10917 save_LIBS="$LIBS"
10918 LIBS="$lt_cv_dlopen_libs $LIBS"
10919
10920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
10921 $as_echo_n "checking whether a program can dlopen itself... " >&6; }
10922 if ${lt_cv_dlopen_self+:} false; then :
10923 $as_echo_n "(cached) " >&6
10924 else
10925 if test "$cross_compiling" = yes; then :
10926 lt_cv_dlopen_self=cross
10927 else
10928 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10929 lt_status=$lt_dlunknown
10930 cat > conftest.$ac_ext <<_LT_EOF
10931 #line $LINENO "configure"
10932 #include "confdefs.h"
10933
10934 #if HAVE_DLFCN_H
10935 #include <dlfcn.h>
10936 #endif
10937
10938 #include <stdio.h>
10939
10940 #ifdef RTLD_GLOBAL
10941 # define LT_DLGLOBAL RTLD_GLOBAL
10942 #else
10943 # ifdef DL_GLOBAL
10944 # define LT_DLGLOBAL DL_GLOBAL
10945 # else
10946 # define LT_DLGLOBAL 0
10947 # endif
10948 #endif
10949
10950 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
10951 find out it does not work in some platform. */
10952 #ifndef LT_DLLAZY_OR_NOW
10953 # ifdef RTLD_LAZY
10954 # define LT_DLLAZY_OR_NOW RTLD_LAZY
10955 # else
10956 # ifdef DL_LAZY
10957 # define LT_DLLAZY_OR_NOW DL_LAZY
10958 # else
10959 # ifdef RTLD_NOW
10960 # define LT_DLLAZY_OR_NOW RTLD_NOW
10961 # else
10962 # ifdef DL_NOW
10963 # define LT_DLLAZY_OR_NOW DL_NOW
10964 # else
10965 # define LT_DLLAZY_OR_NOW 0
10966 # endif
10967 # endif
10968 # endif
10969 # endif
10970 #endif
10971
10972 /* When -fvisbility=hidden is used, assume the code has been annotated
10973 correspondingly for the symbols needed. */
10974 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
10975 int fnord () __attribute__((visibility("default")));
10976 #endif
10977
10978 int fnord () { return 42; }
10979 int main ()
10980 {
10981 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
10982 int status = $lt_dlunknown;
10983
10984 if (self)
10985 {
10986 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
10987 else
10988 {
10989 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
10990 else puts (dlerror ());
10991 }
10992 /* dlclose (self); */
10993 }
10994 else
10995 puts (dlerror ());
10996
10997 return status;
10998 }
10999 _LT_EOF
11000 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
11001 (eval $ac_link) 2>&5
11002 ac_status=$?
11003 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11004 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
11005 (./conftest; exit; ) >&5 2>/dev/null
11006 lt_status=$?
11007 case x$lt_status in
11008 x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
11009 x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
11010 x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
11011 esac
11012 else :
11013 # compilation failed
11014 lt_cv_dlopen_self=no
11015 fi
11016 fi
11017 rm -fr conftest*
11018
11019
11020 fi
11021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
11022 $as_echo "$lt_cv_dlopen_self" >&6; }
11023
11024 if test "x$lt_cv_dlopen_self" = xyes; then
11025 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
11026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
11027 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
11028 if ${lt_cv_dlopen_self_static+:} false; then :
11029 $as_echo_n "(cached) " >&6
11030 else
11031 if test "$cross_compiling" = yes; then :
11032 lt_cv_dlopen_self_static=cross
11033 else
11034 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
11035 lt_status=$lt_dlunknown
11036 cat > conftest.$ac_ext <<_LT_EOF
11037 #line $LINENO "configure"
11038 #include "confdefs.h"
11039
11040 #if HAVE_DLFCN_H
11041 #include <dlfcn.h>
11042 #endif
11043
11044 #include <stdio.h>
11045
11046 #ifdef RTLD_GLOBAL
11047 # define LT_DLGLOBAL RTLD_GLOBAL
11048 #else
11049 # ifdef DL_GLOBAL
11050 # define LT_DLGLOBAL DL_GLOBAL
11051 # else
11052 # define LT_DLGLOBAL 0
11053 # endif
11054 #endif
11055
11056 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
11057 find out it does not work in some platform. */
11058 #ifndef LT_DLLAZY_OR_NOW
11059 # ifdef RTLD_LAZY
11060 # define LT_DLLAZY_OR_NOW RTLD_LAZY
11061 # else
11062 # ifdef DL_LAZY
11063 # define LT_DLLAZY_OR_NOW DL_LAZY
11064 # else
11065 # ifdef RTLD_NOW
11066 # define LT_DLLAZY_OR_NOW RTLD_NOW
11067 # else
11068 # ifdef DL_NOW
11069 # define LT_DLLAZY_OR_NOW DL_NOW
11070 # else
11071 # define LT_DLLAZY_OR_NOW 0
11072 # endif
11073 # endif
11074 # endif
11075 # endif
11076 #endif
11077
11078 /* When -fvisbility=hidden is used, assume the code has been annotated
11079 correspondingly for the symbols needed. */
11080 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
11081 int fnord () __attribute__((visibility("default")));
11082 #endif
11083
11084 int fnord () { return 42; }
11085 int main ()
11086 {
11087 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
11088 int status = $lt_dlunknown;
11089
11090 if (self)
11091 {
11092 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
11093 else
11094 {
11095 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
11096 else puts (dlerror ());
11097 }
11098 /* dlclose (self); */
11099 }
11100 else
11101 puts (dlerror ());
11102
11103 return status;
11104 }
11105 _LT_EOF
11106 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
11107 (eval $ac_link) 2>&5
11108 ac_status=$?
11109 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11110 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
11111 (./conftest; exit; ) >&5 2>/dev/null
11112 lt_status=$?
11113 case x$lt_status in
11114 x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
11115 x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
11116 x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
11117 esac
11118 else :
11119 # compilation failed
11120 lt_cv_dlopen_self_static=no
11121 fi
11122 fi
11123 rm -fr conftest*
11124
11125
11126 fi
11127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
11128 $as_echo "$lt_cv_dlopen_self_static" >&6; }
11129 fi
11130
11131 CPPFLAGS="$save_CPPFLAGS"
11132 LDFLAGS="$save_LDFLAGS"
11133 LIBS="$save_LIBS"
11134 ;;
11135 esac
11136
11137 case $lt_cv_dlopen_self in
11138 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
11139 *) enable_dlopen_self=unknown ;;
11140 esac
11141
11142 case $lt_cv_dlopen_self_static in
11143 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
11144 *) enable_dlopen_self_static=unknown ;;
11145 esac
11146 fi
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164 striplib=
11165 old_striplib=
11166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
11167 $as_echo_n "checking whether stripping libraries is possible... " >&6; }
11168 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
11169 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
11170 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
11171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11172 $as_echo "yes" >&6; }
11173 else
11174 # FIXME - insert some real tests, host_os isn't really good enough
11175 case $host_os in
11176 darwin*)
11177 if test -n "$STRIP" ; then
11178 striplib="$STRIP -x"
11179 old_striplib="$STRIP -S"
11180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11181 $as_echo "yes" >&6; }
11182 else
11183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11184 $as_echo "no" >&6; }
11185 fi
11186 ;;
11187 *)
11188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11189 $as_echo "no" >&6; }
11190 ;;
11191 esac
11192 fi
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205 # Report which library types will actually be built
11206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
11207 $as_echo_n "checking if libtool supports shared libraries... " >&6; }
11208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
11209 $as_echo "$can_build_shared" >&6; }
11210
11211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
11212 $as_echo_n "checking whether to build shared libraries... " >&6; }
11213 test "$can_build_shared" = "no" && enable_shared=no
11214
11215 # On AIX, shared libraries and static libraries use the same namespace, and
11216 # are all built from PIC.
11217 case $host_os in
11218 aix3*)
11219 test "$enable_shared" = yes && enable_static=no
11220 if test -n "$RANLIB"; then
11221 archive_cmds="$archive_cmds~\$RANLIB \$lib"
11222 postinstall_cmds='$RANLIB $lib'
11223 fi
11224 ;;
11225
11226 aix[4-9]*)
11227 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
11228 test "$enable_shared" = yes && enable_static=no
11229 fi
11230 ;;
11231 esac
11232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
11233 $as_echo "$enable_shared" >&6; }
11234
11235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
11236 $as_echo_n "checking whether to build static libraries... " >&6; }
11237 # Make sure either enable_shared or enable_static is yes.
11238 test "$enable_shared" = yes || enable_static=yes
11239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
11240 $as_echo "$enable_static" >&6; }
11241
11242
11243
11244
11245 fi
11246 ac_ext=c
11247 ac_cpp='$CPP $CPPFLAGS'
11248 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11249 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11250 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11251
11252 CC="$lt_save_CC"
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268 ac_config_commands="$ac_config_commands libtool"
11269
11270
11271
11272
11273 # Only expand once:
11274
11275
11276
11277
11278
11279
11280
11281
11282 ac_config_headers="$ac_config_headers config.h"
11283
11284
11285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
11286 $as_echo_n "checking for X... " >&6; }
11287
11288
11289 # Check whether --with-x was given.
11290 if test "${with_x+set}" = set; then :
11291 withval=$with_x;
11292 fi
11293
11294 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
11295 if test "x$with_x" = xno; then
11296 # The user explicitly disabled X.
11297 have_x=disabled
11298 else
11299 case $x_includes,$x_libraries in #(
11300 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
11301 *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
11302 $as_echo_n "(cached) " >&6
11303 else
11304 # One or both of the vars are not set, and there is no cached value.
11305 ac_x_includes=no ac_x_libraries=no
11306 rm -f -r conftest.dir
11307 if mkdir conftest.dir; then
11308 cd conftest.dir
11309 cat >Imakefile <<'_ACEOF'
11310 incroot:
11311 @echo incroot='${INCROOT}'
11312 usrlibdir:
11313 @echo usrlibdir='${USRLIBDIR}'
11314 libdir:
11315 @echo libdir='${LIBDIR}'
11316 _ACEOF
11317 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
11318 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
11319 for ac_var in incroot usrlibdir libdir; do
11320 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
11321 done
11322 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
11323 for ac_extension in a so sl dylib la dll; do
11324 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
11325 test -f "$ac_im_libdir/libX11.$ac_extension"; then
11326 ac_im_usrlibdir=$ac_im_libdir; break
11327 fi
11328 done
11329 # Screen out bogus values from the imake configuration. They are
11330 # bogus both because they are the default anyway, and because
11331 # using them would break gcc on systems where it needs fixed includes.
11332 case $ac_im_incroot in
11333 /usr/include) ac_x_includes= ;;
11334 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
11335 esac
11336 case $ac_im_usrlibdir in
11337 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
11338 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
11339 esac
11340 fi
11341 cd ..
11342 rm -f -r conftest.dir
11343 fi
11344
11345 # Standard set of common directories for X headers.
11346 # Check X11 before X11Rn because it is often a symlink to the current release.
11347 ac_x_header_dirs='
11348 /usr/X11/include
11349 /usr/X11R7/include
11350 /usr/X11R6/include
11351 /usr/X11R5/include
11352 /usr/X11R4/include
11353
11354 /usr/include/X11
11355 /usr/include/X11R7
11356 /usr/include/X11R6
11357 /usr/include/X11R5
11358 /usr/include/X11R4
11359
11360 /usr/local/X11/include
11361 /usr/local/X11R7/include
11362 /usr/local/X11R6/include
11363 /usr/local/X11R5/include
11364 /usr/local/X11R4/include
11365
11366 /usr/local/include/X11
11367 /usr/local/include/X11R7
11368 /usr/local/include/X11R6
11369 /usr/local/include/X11R5
11370 /usr/local/include/X11R4
11371
11372 /usr/X386/include
11373 /usr/x386/include
11374 /usr/XFree86/include/X11
11375
11376 /usr/include
11377 /usr/local/include
11378 /usr/unsupported/include
11379 /usr/athena/include
11380 /usr/local/x11r5/include
11381 /usr/lpp/Xamples/include
11382
11383 /usr/openwin/include
11384 /usr/openwin/share/include'
11385
11386 if test "$ac_x_includes" = no; then
11387 # Guess where to find include files, by looking for Xlib.h.
11388 # First, try using that file with no special directory specified.
11389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11390 /* end confdefs.h. */
11391 #include <X11/Xlib.h>
11392 _ACEOF
11393 if ac_fn_c_try_cpp "$LINENO"; then :
11394 # We can compile using X headers with no special include directory.
11395 ac_x_includes=
11396 else
11397 for ac_dir in $ac_x_header_dirs; do
11398 if test -r "$ac_dir/X11/Xlib.h"; then
11399 ac_x_includes=$ac_dir
11400 break
11401 fi
11402 done
11403 fi
11404 rm -f conftest.err conftest.i conftest.$ac_ext
11405 fi # $ac_x_includes = no
11406
11407 if test "$ac_x_libraries" = no; then
11408 # Check for the libraries.
11409 # See if we find them without any special options.
11410 # Don't add to $LIBS permanently.
11411 ac_save_LIBS=$LIBS
11412 LIBS="-lX11 $LIBS"
11413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11414 /* end confdefs.h. */
11415 #include <X11/Xlib.h>
11416 int
11417 main ()
11418 {
11419 XrmInitialize ()
11420 ;
11421 return 0;
11422 }
11423 _ACEOF
11424 if ac_fn_c_try_link "$LINENO"; then :
11425 LIBS=$ac_save_LIBS
11426 # We can link X programs with no special library path.
11427 ac_x_libraries=
11428 else
11429 LIBS=$ac_save_LIBS
11430 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
11431 do
11432 # Don't even attempt the hair of trying to link an X program!
11433 for ac_extension in a so sl dylib la dll; do
11434 if test -r "$ac_dir/libX11.$ac_extension"; then
11435 ac_x_libraries=$ac_dir
11436 break 2
11437 fi
11438 done
11439 done
11440 fi
11441 rm -f core conftest.err conftest.$ac_objext \
11442 conftest$ac_exeext conftest.$ac_ext
11443 fi # $ac_x_libraries = no
11444
11445 case $ac_x_includes,$ac_x_libraries in #(
11446 no,* | *,no | *\'*)
11447 # Didn't find X, or a directory has "'" in its name.
11448 ac_cv_have_x="have_x=no";; #(
11449 *)
11450 # Record where we found X for the cache.
11451 ac_cv_have_x="have_x=yes\
11452 ac_x_includes='$ac_x_includes'\
11453 ac_x_libraries='$ac_x_libraries'"
11454 esac
11455 fi
11456 ;; #(
11457 *) have_x=yes;;
11458 esac
11459 eval "$ac_cv_have_x"
11460 fi # $with_x != no
11461
11462 if test "$have_x" != yes; then
11463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
11464 $as_echo "$have_x" >&6; }
11465 no_x=yes
11466 else
11467 # If each of the values was on the command line, it overrides each guess.
11468 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
11469 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
11470 # Update the cache value to reflect the command line values.
11471 ac_cv_have_x="have_x=yes\
11472 ac_x_includes='$x_includes'\
11473 ac_x_libraries='$x_libraries'"
11474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
11475 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
11476 fi
11477
11478 if test "$no_x" = yes; then
11479 # Not all programs may use this symbol, but it does not hurt to define it.
11480
11481 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
11482
11483 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
11484 else
11485 if test -n "$x_includes"; then
11486 X_CFLAGS="$X_CFLAGS -I$x_includes"
11487 fi
11488
11489 # It would also be nice to do this for all -L options, not just this one.
11490 if test -n "$x_libraries"; then
11491 X_LIBS="$X_LIBS -L$x_libraries"
11492 # For Solaris; some versions of Sun CC require a space after -R and
11493 # others require no space. Words are not sufficient . . . .
11494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
11495 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
11496 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
11497 ac_xsave_c_werror_flag=$ac_c_werror_flag
11498 ac_c_werror_flag=yes
11499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11500 /* end confdefs.h. */
11501
11502 int
11503 main ()
11504 {
11505
11506 ;
11507 return 0;
11508 }
11509 _ACEOF
11510 if ac_fn_c_try_link "$LINENO"; then :
11511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11512 $as_echo "no" >&6; }
11513 X_LIBS="$X_LIBS -R$x_libraries"
11514 else
11515 LIBS="$ac_xsave_LIBS -R $x_libraries"
11516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11517 /* end confdefs.h. */
11518
11519 int
11520 main ()
11521 {
11522
11523 ;
11524 return 0;
11525 }
11526 _ACEOF
11527 if ac_fn_c_try_link "$LINENO"; then :
11528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11529 $as_echo "yes" >&6; }
11530 X_LIBS="$X_LIBS -R $x_libraries"
11531 else
11532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
11533 $as_echo "neither works" >&6; }
11534 fi
11535 rm -f core conftest.err conftest.$ac_objext \
11536 conftest$ac_exeext conftest.$ac_ext
11537 fi
11538 rm -f core conftest.err conftest.$ac_objext \
11539 conftest$ac_exeext conftest.$ac_ext
11540 ac_c_werror_flag=$ac_xsave_c_werror_flag
11541 LIBS=$ac_xsave_LIBS
11542 fi
11543
11544 # Check for system-dependent libraries X programs must link with.
11545 # Do this before checking for the system-independent R6 libraries
11546 # (-lICE), since we may need -lsocket or whatever for X linking.
11547
11548 if test "$ISC" = yes; then
11549 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
11550 else
11551 # Martyn Johnson says this is needed for Ultrix, if the X
11552 # libraries were built with DECnet support. And Karl Berry says
11553 # the Alpha needs dnet_stub (dnet does not exist).
11554 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
11555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11556 /* end confdefs.h. */
11557
11558 /* Override any GCC internal prototype to avoid an error.
11559 Use char because int might match the return type of a GCC
11560 builtin and then its argument prototype would still apply. */
11561 #ifdef __cplusplus
11562 extern "C"
11563 #endif
11564 char XOpenDisplay ();
11565 int
11566 main ()
11567 {
11568 return XOpenDisplay ();
11569 ;
11570 return 0;
11571 }
11572 _ACEOF
11573 if ac_fn_c_try_link "$LINENO"; then :
11574
11575 else
11576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
11577 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
11578 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
11579 $as_echo_n "(cached) " >&6
11580 else
11581 ac_check_lib_save_LIBS=$LIBS
11582 LIBS="-ldnet $LIBS"
11583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11584 /* end confdefs.h. */
11585
11586 /* Override any GCC internal prototype to avoid an error.
11587 Use char because int might match the return type of a GCC
11588 builtin and then its argument prototype would still apply. */
11589 #ifdef __cplusplus
11590 extern "C"
11591 #endif
11592 char dnet_ntoa ();
11593 int
11594 main ()
11595 {
11596 return dnet_ntoa ();
11597 ;
11598 return 0;
11599 }
11600 _ACEOF
11601 if ac_fn_c_try_link "$LINENO"; then :
11602 ac_cv_lib_dnet_dnet_ntoa=yes
11603 else
11604 ac_cv_lib_dnet_dnet_ntoa=no
11605 fi
11606 rm -f core conftest.err conftest.$ac_objext \
11607 conftest$ac_exeext conftest.$ac_ext
11608 LIBS=$ac_check_lib_save_LIBS
11609 fi
11610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
11611 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
11612 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
11613 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
11614 fi
11615
11616 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
11617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
11618 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
11619 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
11620 $as_echo_n "(cached) " >&6
11621 else
11622 ac_check_lib_save_LIBS=$LIBS
11623 LIBS="-ldnet_stub $LIBS"
11624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11625 /* end confdefs.h. */
11626
11627 /* Override any GCC internal prototype to avoid an error.
11628 Use char because int might match the return type of a GCC
11629 builtin and then its argument prototype would still apply. */
11630 #ifdef __cplusplus
11631 extern "C"
11632 #endif
11633 char dnet_ntoa ();
11634 int
11635 main ()
11636 {
11637 return dnet_ntoa ();
11638 ;
11639 return 0;
11640 }
11641 _ACEOF
11642 if ac_fn_c_try_link "$LINENO"; then :
11643 ac_cv_lib_dnet_stub_dnet_ntoa=yes
11644 else
11645 ac_cv_lib_dnet_stub_dnet_ntoa=no
11646 fi
11647 rm -f core conftest.err conftest.$ac_objext \
11648 conftest$ac_exeext conftest.$ac_ext
11649 LIBS=$ac_check_lib_save_LIBS
11650 fi
11651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
11652 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
11653 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
11654 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
11655 fi
11656
11657 fi
11658 fi
11659 rm -f core conftest.err conftest.$ac_objext \
11660 conftest$ac_exeext conftest.$ac_ext
11661 LIBS="$ac_xsave_LIBS"
11662
11663 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
11664 # to get the SysV transport functions.
11665 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
11666 # needs -lnsl.
11667 # The nsl library prevents programs from opening the X display
11668 # on Irix 5.2, according to T.E. Dickey.
11669 # The functions gethostbyname, getservbyname, and inet_addr are
11670 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
11671 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
11672 if test "x$ac_cv_func_gethostbyname" = xyes; then :
11673
11674 fi
11675
11676 if test $ac_cv_func_gethostbyname = no; then
11677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
11678 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
11679 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
11680 $as_echo_n "(cached) " >&6
11681 else
11682 ac_check_lib_save_LIBS=$LIBS
11683 LIBS="-lnsl $LIBS"
11684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11685 /* end confdefs.h. */
11686
11687 /* Override any GCC internal prototype to avoid an error.
11688 Use char because int might match the return type of a GCC
11689 builtin and then its argument prototype would still apply. */
11690 #ifdef __cplusplus
11691 extern "C"
11692 #endif
11693 char gethostbyname ();
11694 int
11695 main ()
11696 {
11697 return gethostbyname ();
11698 ;
11699 return 0;
11700 }
11701 _ACEOF
11702 if ac_fn_c_try_link "$LINENO"; then :
11703 ac_cv_lib_nsl_gethostbyname=yes
11704 else
11705 ac_cv_lib_nsl_gethostbyname=no
11706 fi
11707 rm -f core conftest.err conftest.$ac_objext \
11708 conftest$ac_exeext conftest.$ac_ext
11709 LIBS=$ac_check_lib_save_LIBS
11710 fi
11711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
11712 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
11713 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
11714 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
11715 fi
11716
11717 if test $ac_cv_lib_nsl_gethostbyname = no; then
11718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
11719 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
11720 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
11721 $as_echo_n "(cached) " >&6
11722 else
11723 ac_check_lib_save_LIBS=$LIBS
11724 LIBS="-lbsd $LIBS"
11725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11726 /* end confdefs.h. */
11727
11728 /* Override any GCC internal prototype to avoid an error.
11729 Use char because int might match the return type of a GCC
11730 builtin and then its argument prototype would still apply. */
11731 #ifdef __cplusplus
11732 extern "C"
11733 #endif
11734 char gethostbyname ();
11735 int
11736 main ()
11737 {
11738 return gethostbyname ();
11739 ;
11740 return 0;
11741 }
11742 _ACEOF
11743 if ac_fn_c_try_link "$LINENO"; then :
11744 ac_cv_lib_bsd_gethostbyname=yes
11745 else
11746 ac_cv_lib_bsd_gethostbyname=no
11747 fi
11748 rm -f core conftest.err conftest.$ac_objext \
11749 conftest$ac_exeext conftest.$ac_ext
11750 LIBS=$ac_check_lib_save_LIBS
11751 fi
11752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
11753 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
11754 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
11755 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
11756 fi
11757
11758 fi
11759 fi
11760
11761 # lieder@skyler.mavd.honeywell.com says without -lsocket,
11762 # socket/setsockopt and other routines are undefined under SCO ODT
11763 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
11764 # on later versions), says Simon Leinen: it contains gethostby*
11765 # variants that don't use the name server (or something). -lsocket
11766 # must be given before -lnsl if both are needed. We assume that
11767 # if connect needs -lnsl, so does gethostbyname.
11768 ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
11769 if test "x$ac_cv_func_connect" = xyes; then :
11770
11771 fi
11772
11773 if test $ac_cv_func_connect = no; then
11774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
11775 $as_echo_n "checking for connect in -lsocket... " >&6; }
11776 if ${ac_cv_lib_socket_connect+:} false; then :
11777 $as_echo_n "(cached) " >&6
11778 else
11779 ac_check_lib_save_LIBS=$LIBS
11780 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
11781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11782 /* end confdefs.h. */
11783
11784 /* Override any GCC internal prototype to avoid an error.
11785 Use char because int might match the return type of a GCC
11786 builtin and then its argument prototype would still apply. */
11787 #ifdef __cplusplus
11788 extern "C"
11789 #endif
11790 char connect ();
11791 int
11792 main ()
11793 {
11794 return connect ();
11795 ;
11796 return 0;
11797 }
11798 _ACEOF
11799 if ac_fn_c_try_link "$LINENO"; then :
11800 ac_cv_lib_socket_connect=yes
11801 else
11802 ac_cv_lib_socket_connect=no
11803 fi
11804 rm -f core conftest.err conftest.$ac_objext \
11805 conftest$ac_exeext conftest.$ac_ext
11806 LIBS=$ac_check_lib_save_LIBS
11807 fi
11808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
11809 $as_echo "$ac_cv_lib_socket_connect" >&6; }
11810 if test "x$ac_cv_lib_socket_connect" = xyes; then :
11811 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
11812 fi
11813
11814 fi
11815
11816 # Guillermo Gomez says -lposix is necessary on A/UX.
11817 ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove"
11818 if test "x$ac_cv_func_remove" = xyes; then :
11819
11820 fi
11821
11822 if test $ac_cv_func_remove = no; then
11823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
11824 $as_echo_n "checking for remove in -lposix... " >&6; }
11825 if ${ac_cv_lib_posix_remove+:} false; then :
11826 $as_echo_n "(cached) " >&6
11827 else
11828 ac_check_lib_save_LIBS=$LIBS
11829 LIBS="-lposix $LIBS"
11830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11831 /* end confdefs.h. */
11832
11833 /* Override any GCC internal prototype to avoid an error.
11834 Use char because int might match the return type of a GCC
11835 builtin and then its argument prototype would still apply. */
11836 #ifdef __cplusplus
11837 extern "C"
11838 #endif
11839 char remove ();
11840 int
11841 main ()
11842 {
11843 return remove ();
11844 ;
11845 return 0;
11846 }
11847 _ACEOF
11848 if ac_fn_c_try_link "$LINENO"; then :
11849 ac_cv_lib_posix_remove=yes
11850 else
11851 ac_cv_lib_posix_remove=no
11852 fi
11853 rm -f core conftest.err conftest.$ac_objext \
11854 conftest$ac_exeext conftest.$ac_ext
11855 LIBS=$ac_check_lib_save_LIBS
11856 fi
11857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
11858 $as_echo "$ac_cv_lib_posix_remove" >&6; }
11859 if test "x$ac_cv_lib_posix_remove" = xyes; then :
11860 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
11861 fi
11862
11863 fi
11864
11865 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
11866 ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
11867 if test "x$ac_cv_func_shmat" = xyes; then :
11868
11869 fi
11870
11871 if test $ac_cv_func_shmat = no; then
11872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
11873 $as_echo_n "checking for shmat in -lipc... " >&6; }
11874 if ${ac_cv_lib_ipc_shmat+:} false; then :
11875 $as_echo_n "(cached) " >&6
11876 else
11877 ac_check_lib_save_LIBS=$LIBS
11878 LIBS="-lipc $LIBS"
11879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11880 /* end confdefs.h. */
11881
11882 /* Override any GCC internal prototype to avoid an error.
11883 Use char because int might match the return type of a GCC
11884 builtin and then its argument prototype would still apply. */
11885 #ifdef __cplusplus
11886 extern "C"
11887 #endif
11888 char shmat ();
11889 int
11890 main ()
11891 {
11892 return shmat ();
11893 ;
11894 return 0;
11895 }
11896 _ACEOF
11897 if ac_fn_c_try_link "$LINENO"; then :
11898 ac_cv_lib_ipc_shmat=yes
11899 else
11900 ac_cv_lib_ipc_shmat=no
11901 fi
11902 rm -f core conftest.err conftest.$ac_objext \
11903 conftest$ac_exeext conftest.$ac_ext
11904 LIBS=$ac_check_lib_save_LIBS
11905 fi
11906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
11907 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
11908 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
11909 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
11910 fi
11911
11912 fi
11913 fi
11914
11915 # Check for libraries that X11R6 Xt/Xaw programs need.
11916 ac_save_LDFLAGS=$LDFLAGS
11917 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
11918 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
11919 # check for ICE first), but we must link in the order -lSM -lICE or
11920 # we get undefined symbols. So assume we have SM if we have ICE.
11921 # These have to be linked with before -lX11, unlike the other
11922 # libraries we check for below, so use a different variable.
11923 # John Interrante, Karl Berry
11924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
11925 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
11926 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
11927 $as_echo_n "(cached) " >&6
11928 else
11929 ac_check_lib_save_LIBS=$LIBS
11930 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
11931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11932 /* end confdefs.h. */
11933
11934 /* Override any GCC internal prototype to avoid an error.
11935 Use char because int might match the return type of a GCC
11936 builtin and then its argument prototype would still apply. */
11937 #ifdef __cplusplus
11938 extern "C"
11939 #endif
11940 char IceConnectionNumber ();
11941 int
11942 main ()
11943 {
11944 return IceConnectionNumber ();
11945 ;
11946 return 0;
11947 }
11948 _ACEOF
11949 if ac_fn_c_try_link "$LINENO"; then :
11950 ac_cv_lib_ICE_IceConnectionNumber=yes
11951 else
11952 ac_cv_lib_ICE_IceConnectionNumber=no
11953 fi
11954 rm -f core conftest.err conftest.$ac_objext \
11955 conftest$ac_exeext conftest.$ac_ext
11956 LIBS=$ac_check_lib_save_LIBS
11957 fi
11958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
11959 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
11960 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
11961 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
11962 fi
11963
11964 LDFLAGS=$ac_save_LDFLAGS
11965
11966 fi
11967
11968
11969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5
11970 $as_echo_n "checking for sqrt in -lm... " >&6; }
11971 if ${ac_cv_lib_m_sqrt+:} false; then :
11972 $as_echo_n "(cached) " >&6
11973 else
11974 ac_check_lib_save_LIBS=$LIBS
11975 LIBS="-lm $LIBS"
11976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11977 /* end confdefs.h. */
11978
11979 /* Override any GCC internal prototype to avoid an error.
11980 Use char because int might match the return type of a GCC
11981 builtin and then its argument prototype would still apply. */
11982 #ifdef __cplusplus
11983 extern "C"
11984 #endif
11985 char sqrt ();
11986 int
11987 main ()
11988 {
11989 return sqrt ();
11990 ;
11991 return 0;
11992 }
11993 _ACEOF
11994 if ac_fn_c_try_link "$LINENO"; then :
11995 ac_cv_lib_m_sqrt=yes
11996 else
11997 ac_cv_lib_m_sqrt=no
11998 fi
11999 rm -f core conftest.err conftest.$ac_objext \
12000 conftest$ac_exeext conftest.$ac_ext
12001 LIBS=$ac_check_lib_save_LIBS
12002 fi
12003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5
12004 $as_echo "$ac_cv_lib_m_sqrt" >&6; }
12005 if test "x$ac_cv_lib_m_sqrt" = xyes; then :
12006 cat >>confdefs.h <<_ACEOF
12007 #define HAVE_LIBM 1
12008 _ACEOF
12009
12010 LIBS="-lm $LIBS"
12011
12012 fi
12013
12014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
12015 $as_echo_n "checking for pthread_create in -lpthread... " >&6; }
12016 if ${ac_cv_lib_pthread_pthread_create+:} false; then :
12017 $as_echo_n "(cached) " >&6
12018 else
12019 ac_check_lib_save_LIBS=$LIBS
12020 LIBS="-lpthread $LIBS"
12021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12022 /* end confdefs.h. */
12023
12024 /* Override any GCC internal prototype to avoid an error.
12025 Use char because int might match the return type of a GCC
12026 builtin and then its argument prototype would still apply. */
12027 #ifdef __cplusplus
12028 extern "C"
12029 #endif
12030 char pthread_create ();
12031 int
12032 main ()
12033 {
12034 return pthread_create ();
12035 ;
12036 return 0;
12037 }
12038 _ACEOF
12039 if ac_fn_c_try_link "$LINENO"; then :
12040 ac_cv_lib_pthread_pthread_create=yes
12041 else
12042 ac_cv_lib_pthread_pthread_create=no
12043 fi
12044 rm -f core conftest.err conftest.$ac_objext \
12045 conftest$ac_exeext conftest.$ac_ext
12046 LIBS=$ac_check_lib_save_LIBS
12047 fi
12048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
12049 $as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
12050 if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then :
12051 cat >>confdefs.h <<_ACEOF
12052 #define HAVE_LIBPTHREAD 1
12053 _ACEOF
12054
12055 LIBS="-lpthread $LIBS"
12056
12057 fi
12058
12059
12060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFOpen in -ltiff" >&5
12061 $as_echo_n "checking for TIFFOpen in -ltiff... " >&6; }
12062 if ${ac_cv_lib_tiff_TIFFOpen+:} false; then :
12063 $as_echo_n "(cached) " >&6
12064 else
12065 ac_check_lib_save_LIBS=$LIBS
12066 LIBS="-ltiff -lm $LIBS"
12067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12068 /* end confdefs.h. */
12069
12070 /* Override any GCC internal prototype to avoid an error.
12071 Use char because int might match the return type of a GCC
12072 builtin and then its argument prototype would still apply. */
12073 #ifdef __cplusplus
12074 extern "C"
12075 #endif
12076 char TIFFOpen ();
12077 int
12078 main ()
12079 {
12080 return TIFFOpen ();
12081 ;
12082 return 0;
12083 }
12084 _ACEOF
12085 if ac_fn_c_try_link "$LINENO"; then :
12086 ac_cv_lib_tiff_TIFFOpen=yes
12087 else
12088 ac_cv_lib_tiff_TIFFOpen=no
12089 fi
12090 rm -f core conftest.err conftest.$ac_objext \
12091 conftest$ac_exeext conftest.$ac_ext
12092 LIBS=$ac_check_lib_save_LIBS
12093 fi
12094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFOpen" >&5
12095 $as_echo "$ac_cv_lib_tiff_TIFFOpen" >&6; }
12096 if test "x$ac_cv_lib_tiff_TIFFOpen" = xyes; then :
12097 TIFF_LIBS="-ltiff"
12098 fi
12099
12100
12101
12102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12103 $as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12104 if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12105 $as_echo_n "(cached) " >&6
12106 else
12107 ac_check_lib_save_LIBS=$LIBS
12108 LIBS="-lrt $LIBS"
12109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12110 /* end confdefs.h. */
12111
12112 /* Override any GCC internal prototype to avoid an error.
12113 Use char because int might match the return type of a GCC
12114 builtin and then its argument prototype would still apply. */
12115 #ifdef __cplusplus
12116 extern "C"
12117 #endif
12118 char clock_gettime ();
12119 int
12120 main ()
12121 {
12122 return clock_gettime ();
12123 ;
12124 return 0;
12125 }
12126 _ACEOF
12127 if ac_fn_c_try_link "$LINENO"; then :
12128 ac_cv_lib_rt_clock_gettime=yes
12129 else
12130 ac_cv_lib_rt_clock_gettime=no
12131 fi
12132 rm -f core conftest.err conftest.$ac_objext \
12133 conftest$ac_exeext conftest.$ac_ext
12134 LIBS=$ac_check_lib_save_LIBS
12135 fi
12136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12137 $as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12138 if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12139 cat >>confdefs.h <<_ACEOF
12140 #define HAVE_LIBRT 1
12141 _ACEOF
12142
12143 LIBS="-lrt $LIBS"
12144
12145 fi
12146
12147
12148
12149 # Check whether --with-system-libicc was given.
12150 if test "${with_system_libicc+set}" = set; then :
12151 withval=$with_system_libicc; system_libicc=$withval
12152 else
12153 system_libicc=no
12154 fi
12155
12156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use system libicc or not" >&5
12157 $as_echo_n "checking whether to use system libicc or not... " >&6; }
12158 if test x$system_libicc = xno ; then
12159 HAVE_ICC=false
12160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12161 $as_echo "no" >&6; }
12162 else
12163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12164 $as_echo "yes" >&6; }
12165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for new_icmFileStd_name in -licc" >&5
12166 $as_echo_n "checking for new_icmFileStd_name in -licc... " >&6; }
12167 if ${ac_cv_lib_icc_new_icmFileStd_name+:} false; then :
12168 $as_echo_n "(cached) " >&6
12169 else
12170 ac_check_lib_save_LIBS=$LIBS
12171 LIBS="-licc -lm $LIBS"
12172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12173 /* end confdefs.h. */
12174
12175 /* Override any GCC internal prototype to avoid an error.
12176 Use char because int might match the return type of a GCC
12177 builtin and then its argument prototype would still apply. */
12178 #ifdef __cplusplus
12179 extern "C"
12180 #endif
12181 char new_icmFileStd_name ();
12182 int
12183 main ()
12184 {
12185 return new_icmFileStd_name ();
12186 ;
12187 return 0;
12188 }
12189 _ACEOF
12190 if ac_fn_c_try_link "$LINENO"; then :
12191 ac_cv_lib_icc_new_icmFileStd_name=yes
12192 else
12193 ac_cv_lib_icc_new_icmFileStd_name=no
12194 fi
12195 rm -f core conftest.err conftest.$ac_objext \
12196 conftest$ac_exeext conftest.$ac_ext
12197 LIBS=$ac_check_lib_save_LIBS
12198 fi
12199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_icc_new_icmFileStd_name" >&5
12200 $as_echo "$ac_cv_lib_icc_new_icmFileStd_name" >&6; }
12201 if test "x$ac_cv_lib_icc_new_icmFileStd_name" = xyes; then :
12202 HAVE_ICC="true"
12203 fi
12204
12205 if test "$HAVE_ICC" != "true" ; then
12206 as_fn_error $? "system libicc missing or not compatible with argyllcms" "$LINENO" 5
12207 fi
12208 fi
12209 if test "$HAVE_ICC" = "true" ; then
12210 ICC_LIBS="-licc"
12211 else
12212 ICC_LIBS='$(top_srcdir)/icc/libicc.la'
12213 ICC_CFLAGS='-I$(top_srcdir)/icc'
12214 ICC_SUBDIRS='icc'
12215 fi
12216
12217
12218
12219
12220
12221 # Check whether --with-system-libyajl was given.
12222 if test "${with_system_libyajl+set}" = set; then :
12223 withval=$with_system_libyajl; system_libyajl=$withval
12224 else
12225 system_libyajl=no
12226 fi
12227
12228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use system libyajl or not" >&5
12229 $as_echo_n "checking whether to use system libyajl or not... " >&6; }
12230 if test x$system_libyajl = xno ; then
12231 HAVE_YAJL=false
12232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12233 $as_echo "no" >&6; }
12234 else
12235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12236 $as_echo "yes" >&6; }
12237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for yajl_gen_c_comment in -lyajl" >&5
12238 $as_echo_n "checking for yajl_gen_c_comment in -lyajl... " >&6; }
12239 if ${ac_cv_lib_yajl_yajl_gen_c_comment+:} false; then :
12240 $as_echo_n "(cached) " >&6
12241 else
12242 ac_check_lib_save_LIBS=$LIBS
12243 LIBS="-lyajl -lm $LIBS"
12244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12245 /* end confdefs.h. */
12246
12247 /* Override any GCC internal prototype to avoid an error.
12248 Use char because int might match the return type of a GCC
12249 builtin and then its argument prototype would still apply. */
12250 #ifdef __cplusplus
12251 extern "C"
12252 #endif
12253 char yajl_gen_c_comment ();
12254 int
12255 main ()
12256 {
12257 return yajl_gen_c_comment ();
12258 ;
12259 return 0;
12260 }
12261 _ACEOF
12262 if ac_fn_c_try_link "$LINENO"; then :
12263 ac_cv_lib_yajl_yajl_gen_c_comment=yes
12264 else
12265 ac_cv_lib_yajl_yajl_gen_c_comment=no
12266 fi
12267 rm -f core conftest.err conftest.$ac_objext \
12268 conftest$ac_exeext conftest.$ac_ext
12269 LIBS=$ac_check_lib_save_LIBS
12270 fi
12271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_yajl_yajl_gen_c_comment" >&5
12272 $as_echo "$ac_cv_lib_yajl_yajl_gen_c_comment" >&6; }
12273 if test "x$ac_cv_lib_yajl_yajl_gen_c_comment" = xyes; then :
12274 HAVE_YAJL="true"
12275 fi
12276
12277 if test "$HAVE_YAJL" != "true" ; then
12278 as_fn_error $? "system libyajl missing or not compatible with argyllcms" "$LINENO" 5
12279 fi
12280 fi
12281 if test "$HAVE_YAJL" = "true" ; then
12282 YAJL_LIBS="-lyajl"
12283 else
12284 YAJL_LIBS='$(top_srcdir)/jcnf/yajl/libyajl.la'
12285 YAJL_CFLAGS='-I$(top_srcdir)/jcnf/yajl'
12286 YAJL_SUBDIRS='yajl'
12287 fi
12288
12289
12290
12291
12292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XOpenDisplay in -lX11" >&5
12293 $as_echo_n "checking for XOpenDisplay in -lX11... " >&6; }
12294 if ${ac_cv_lib_X11_XOpenDisplay+:} false; then :
12295 $as_echo_n "(cached) " >&6
12296 else
12297 ac_check_lib_save_LIBS=$LIBS
12298 LIBS="-lX11 $LIBS"
12299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12300 /* end confdefs.h. */
12301
12302 /* Override any GCC internal prototype to avoid an error.
12303 Use char because int might match the return type of a GCC
12304 builtin and then its argument prototype would still apply. */
12305 #ifdef __cplusplus
12306 extern "C"
12307 #endif
12308 char XOpenDisplay ();
12309 int
12310 main ()
12311 {
12312 return XOpenDisplay ();
12313 ;
12314 return 0;
12315 }
12316 _ACEOF
12317 if ac_fn_c_try_link "$LINENO"; then :
12318 ac_cv_lib_X11_XOpenDisplay=yes
12319 else
12320 ac_cv_lib_X11_XOpenDisplay=no
12321 fi
12322 rm -f core conftest.err conftest.$ac_objext \
12323 conftest$ac_exeext conftest.$ac_ext
12324 LIBS=$ac_check_lib_save_LIBS
12325 fi
12326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_X11_XOpenDisplay" >&5
12327 $as_echo "$ac_cv_lib_X11_XOpenDisplay" >&6; }
12328 if test "x$ac_cv_lib_X11_XOpenDisplay" = xyes; then :
12329 X_LIBS="$X_LIBS -lX11"
12330 fi
12331
12332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XextFindDisplay in -lXext" >&5
12333 $as_echo_n "checking for XextFindDisplay in -lXext... " >&6; }
12334 if ${ac_cv_lib_Xext_XextFindDisplay+:} false; then :
12335 $as_echo_n "(cached) " >&6
12336 else
12337 ac_check_lib_save_LIBS=$LIBS
12338 LIBS="-lXext -lX11 $LIBS"
12339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12340 /* end confdefs.h. */
12341
12342 /* Override any GCC internal prototype to avoid an error.
12343 Use char because int might match the return type of a GCC
12344 builtin and then its argument prototype would still apply. */
12345 #ifdef __cplusplus
12346 extern "C"
12347 #endif
12348 char XextFindDisplay ();
12349 int
12350 main ()
12351 {
12352 return XextFindDisplay ();
12353 ;
12354 return 0;
12355 }
12356 _ACEOF
12357 if ac_fn_c_try_link "$LINENO"; then :
12358 ac_cv_lib_Xext_XextFindDisplay=yes
12359 else
12360 ac_cv_lib_Xext_XextFindDisplay=no
12361 fi
12362 rm -f core conftest.err conftest.$ac_objext \
12363 conftest$ac_exeext conftest.$ac_ext
12364 LIBS=$ac_check_lib_save_LIBS
12365 fi
12366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XextFindDisplay" >&5
12367 $as_echo "$ac_cv_lib_Xext_XextFindDisplay" >&6; }
12368 if test "x$ac_cv_lib_Xext_XextFindDisplay" = xyes; then :
12369 X_LIBS="$X_LIBS -lXext"
12370 fi
12371
12372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XScreenSaverSuspend in -lXss" >&5
12373 $as_echo_n "checking for XScreenSaverSuspend in -lXss... " >&6; }
12374 if ${ac_cv_lib_Xss_XScreenSaverSuspend+:} false; then :
12375 $as_echo_n "(cached) " >&6
12376 else
12377 ac_check_lib_save_LIBS=$LIBS
12378 LIBS="-lXss -lXext -lX11 $LIBS"
12379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12380 /* end confdefs.h. */
12381
12382 /* Override any GCC internal prototype to avoid an error.
12383 Use char because int might match the return type of a GCC
12384 builtin and then its argument prototype would still apply. */
12385 #ifdef __cplusplus
12386 extern "C"
12387 #endif
12388 char XScreenSaverSuspend ();
12389 int
12390 main ()
12391 {
12392 return XScreenSaverSuspend ();
12393 ;
12394 return 0;
12395 }
12396 _ACEOF
12397 if ac_fn_c_try_link "$LINENO"; then :
12398 ac_cv_lib_Xss_XScreenSaverSuspend=yes
12399 else
12400 ac_cv_lib_Xss_XScreenSaverSuspend=no
12401 fi
12402 rm -f core conftest.err conftest.$ac_objext \
12403 conftest$ac_exeext conftest.$ac_ext
12404 LIBS=$ac_check_lib_save_LIBS
12405 fi
12406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xss_XScreenSaverSuspend" >&5
12407 $as_echo "$ac_cv_lib_Xss_XScreenSaverSuspend" >&6; }
12408 if test "x$ac_cv_lib_Xss_XScreenSaverSuspend" = xyes; then :
12409 X_LIBS="$X_LIBS -lXss"
12410 fi
12411
12412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRRootToScreen in -lXrandr" >&5
12413 $as_echo_n "checking for XRRRootToScreen in -lXrandr... " >&6; }
12414 if ${ac_cv_lib_Xrandr_XRRRootToScreen+:} false; then :
12415 $as_echo_n "(cached) " >&6
12416 else
12417 ac_check_lib_save_LIBS=$LIBS
12418 LIBS="-lXrandr -LXext -lX11 $LIBS"
12419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12420 /* end confdefs.h. */
12421
12422 /* Override any GCC internal prototype to avoid an error.
12423 Use char because int might match the return type of a GCC
12424 builtin and then its argument prototype would still apply. */
12425 #ifdef __cplusplus
12426 extern "C"
12427 #endif
12428 char XRRRootToScreen ();
12429 int
12430 main ()
12431 {
12432 return XRRRootToScreen ();
12433 ;
12434 return 0;
12435 }
12436 _ACEOF
12437 if ac_fn_c_try_link "$LINENO"; then :
12438 ac_cv_lib_Xrandr_XRRRootToScreen=yes
12439 else
12440 ac_cv_lib_Xrandr_XRRRootToScreen=no
12441 fi
12442 rm -f core conftest.err conftest.$ac_objext \
12443 conftest$ac_exeext conftest.$ac_ext
12444 LIBS=$ac_check_lib_save_LIBS
12445 fi
12446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrandr_XRRRootToScreen" >&5
12447 $as_echo "$ac_cv_lib_Xrandr_XRRRootToScreen" >&6; }
12448 if test "x$ac_cv_lib_Xrandr_XRRRootToScreen" = xyes; then :
12449 X_LIBS="$X_LIBS -lXrandr"
12450 fi
12451
12452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XineramaQueryScreens in -lXinerama" >&5
12453 $as_echo_n "checking for XineramaQueryScreens in -lXinerama... " >&6; }
12454 if ${ac_cv_lib_Xinerama_XineramaQueryScreens+:} false; then :
12455 $as_echo_n "(cached) " >&6
12456 else
12457 ac_check_lib_save_LIBS=$LIBS
12458 LIBS="-lXinerama -LXext -lX11 $LIBS"
12459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12460 /* end confdefs.h. */
12461
12462 /* Override any GCC internal prototype to avoid an error.
12463 Use char because int might match the return type of a GCC
12464 builtin and then its argument prototype would still apply. */
12465 #ifdef __cplusplus
12466 extern "C"
12467 #endif
12468 char XineramaQueryScreens ();
12469 int
12470 main ()
12471 {
12472 return XineramaQueryScreens ();
12473 ;
12474 return 0;
12475 }
12476 _ACEOF
12477 if ac_fn_c_try_link "$LINENO"; then :
12478 ac_cv_lib_Xinerama_XineramaQueryScreens=yes
12479 else
12480 ac_cv_lib_Xinerama_XineramaQueryScreens=no
12481 fi
12482 rm -f core conftest.err conftest.$ac_objext \
12483 conftest$ac_exeext conftest.$ac_ext
12484 LIBS=$ac_check_lib_save_LIBS
12485 fi
12486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xinerama_XineramaQueryScreens" >&5
12487 $as_echo "$ac_cv_lib_Xinerama_XineramaQueryScreens" >&6; }
12488 if test "x$ac_cv_lib_Xinerama_XineramaQueryScreens" = xyes; then :
12489 X_LIBS="$X_LIBS -lXinerama"
12490 fi
12491
12492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XF86VidModeGetGamma in -lXxf86vm" >&5
12493 $as_echo_n "checking for XF86VidModeGetGamma in -lXxf86vm... " >&6; }
12494 if ${ac_cv_lib_Xxf86vm_XF86VidModeGetGamma+:} false; then :
12495 $as_echo_n "(cached) " >&6
12496 else
12497 ac_check_lib_save_LIBS=$LIBS
12498 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
12499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12500 /* end confdefs.h. */
12501
12502 /* Override any GCC internal prototype to avoid an error.
12503 Use char because int might match the return type of a GCC
12504 builtin and then its argument prototype would still apply. */
12505 #ifdef __cplusplus
12506 extern "C"
12507 #endif
12508 char XF86VidModeGetGamma ();
12509 int
12510 main ()
12511 {
12512 return XF86VidModeGetGamma ();
12513 ;
12514 return 0;
12515 }
12516 _ACEOF
12517 if ac_fn_c_try_link "$LINENO"; then :
12518 ac_cv_lib_Xxf86vm_XF86VidModeGetGamma=yes
12519 else
12520 ac_cv_lib_Xxf86vm_XF86VidModeGetGamma=no
12521 fi
12522 rm -f core conftest.err conftest.$ac_objext \
12523 conftest$ac_exeext conftest.$ac_ext
12524 LIBS=$ac_check_lib_save_LIBS
12525 fi
12526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xxf86vm_XF86VidModeGetGamma" >&5
12527 $as_echo "$ac_cv_lib_Xxf86vm_XF86VidModeGetGamma" >&6; }
12528 if test "x$ac_cv_lib_Xxf86vm_XF86VidModeGetGamma" = xyes; then :
12529 X_LIBS="$X_LIBS -lXxf86vm"
12530 fi
12531
12532
12533
12534
12535
12536 case $host in
12537 *-linux*)
12538 OS_LINUX=1
12539 OS_BSD=0
12540
12541 $as_echo "#define OS_LINUX 1" >>confdefs.h
12542
12543 if true; then
12544 OS_LINUX_TRUE=
12545 OS_LINUX_FALSE='#'
12546 else
12547 OS_LINUX_TRUE='#'
12548 OS_LINUX_FALSE=
12549 fi
12550
12551 ;;
12552 *-freebsd*|*-kfreebsd*-gnu|*-openbsd*|*-netbsd*)
12553 OS_LINUX=0
12554 OS_BSD=1
12555
12556 $as_echo "#define OS_LINUX 0" >>confdefs.h
12557
12558 if false; then
12559 OS_LINUX_TRUE=
12560 OS_LINUX_FALSE='#'
12561 else
12562 OS_LINUX_TRUE='#'
12563 OS_LINUX_FALSE=
12564 fi
12565
12566 ;;
12567 *)
12568 OS_LINUX=0
12569 OS_BSD=0
12570
12571 $as_echo "#define OS_LINUX 0" >>confdefs.h
12572
12573 if false; then
12574 OS_LINUX_TRUE=
12575 OS_LINUX_FALSE='#'
12576 else
12577 OS_LINUX_TRUE='#'
12578 OS_LINUX_FALSE=
12579 fi
12580
12581 ;;
12582 esac
12583
12584 $as_echo "#define API_EXPORTED /**/" >>confdefs.h
12585
12586
12587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12588 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12589 if ${ac_cv_c_bigendian+:} false; then :
12590 $as_echo_n "(cached) " >&6
12591 else
12592 ac_cv_c_bigendian=unknown
12593 # See if we're dealing with a universal compiler.
12594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12595 /* end confdefs.h. */
12596 #ifndef __APPLE_CC__
12597 not a universal capable compiler
12598 #endif
12599 typedef int dummy;
12600
12601 _ACEOF
12602 if ac_fn_c_try_compile "$LINENO"; then :
12603
12604 # Check for potential -arch flags. It is not universal unless
12605 # there are at least two -arch flags with different values.
12606 ac_arch=
12607 ac_prev=
12608 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12609 if test -n "$ac_prev"; then
12610 case $ac_word in
12611 i?86 | x86_64 | ppc | ppc64)
12612 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12613 ac_arch=$ac_word
12614 else
12615 ac_cv_c_bigendian=universal
12616 break
12617 fi
12618 ;;
12619 esac
12620 ac_prev=
12621 elif test "x$ac_word" = "x-arch"; then
12622 ac_prev=arch
12623 fi
12624 done
12625 fi
12626 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12627 if test $ac_cv_c_bigendian = unknown; then
12628 # See if sys/param.h defines the BYTE_ORDER macro.
12629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12630 /* end confdefs.h. */
12631 #include <sys/types.h>
12632 #include <sys/param.h>
12633
12634 int
12635 main ()
12636 {
12637 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12638 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12639 && LITTLE_ENDIAN)
12640 bogus endian macros
12641 #endif
12642
12643 ;
12644 return 0;
12645 }
12646 _ACEOF
12647 if ac_fn_c_try_compile "$LINENO"; then :
12648 # It does; now see whether it defined to BIG_ENDIAN or not.
12649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12650 /* end confdefs.h. */
12651 #include <sys/types.h>
12652 #include <sys/param.h>
12653
12654 int
12655 main ()
12656 {
12657 #if BYTE_ORDER != BIG_ENDIAN
12658 not big endian
12659 #endif
12660
12661 ;
12662 return 0;
12663 }
12664 _ACEOF
12665 if ac_fn_c_try_compile "$LINENO"; then :
12666 ac_cv_c_bigendian=yes
12667 else
12668 ac_cv_c_bigendian=no
12669 fi
12670 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12671 fi
12672 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12673 fi
12674 if test $ac_cv_c_bigendian = unknown; then
12675 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12677 /* end confdefs.h. */
12678 #include <limits.h>
12679
12680 int
12681 main ()
12682 {
12683 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12684 bogus endian macros
12685 #endif
12686
12687 ;
12688 return 0;
12689 }
12690 _ACEOF
12691 if ac_fn_c_try_compile "$LINENO"; then :
12692 # It does; now see whether it defined to _BIG_ENDIAN or not.
12693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12694 /* end confdefs.h. */
12695 #include <limits.h>
12696
12697 int
12698 main ()
12699 {
12700 #ifndef _BIG_ENDIAN
12701 not big endian
12702 #endif
12703
12704 ;
12705 return 0;
12706 }
12707 _ACEOF
12708 if ac_fn_c_try_compile "$LINENO"; then :
12709 ac_cv_c_bigendian=yes
12710 else
12711 ac_cv_c_bigendian=no
12712 fi
12713 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12714 fi
12715 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12716 fi
12717 if test $ac_cv_c_bigendian = unknown; then
12718 # Compile a test program.
12719 if test "$cross_compiling" = yes; then :
12720 # Try to guess by grepping values from an object file.
12721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12722 /* end confdefs.h. */
12723 short int ascii_mm[] =
12724 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12725 short int ascii_ii[] =
12726 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12727 int use_ascii (int i) {
12728 return ascii_mm[i] + ascii_ii[i];
12729 }
12730 short int ebcdic_ii[] =
12731 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12732 short int ebcdic_mm[] =
12733 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12734 int use_ebcdic (int i) {
12735 return ebcdic_mm[i] + ebcdic_ii[i];
12736 }
12737 extern int foo;
12738
12739 int
12740 main ()
12741 {
12742 return use_ascii (foo) == use_ebcdic (foo);
12743 ;
12744 return 0;
12745 }
12746 _ACEOF
12747 if ac_fn_c_try_compile "$LINENO"; then :
12748 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12749 ac_cv_c_bigendian=yes
12750 fi
12751 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12752 if test "$ac_cv_c_bigendian" = unknown; then
12753 ac_cv_c_bigendian=no
12754 else
12755 # finding both strings is unlikely to happen, but who knows?
12756 ac_cv_c_bigendian=unknown
12757 fi
12758 fi
12759 fi
12760 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12761 else
12762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12763 /* end confdefs.h. */
12764 $ac_includes_default
12765 int
12766 main ()
12767 {
12768
12769 /* Are we little or big endian? From Harbison&Steele. */
12770 union
12771 {
12772 long int l;
12773 char c[sizeof (long int)];
12774 } u;
12775 u.l = 1;
12776 return u.c[sizeof (long int) - 1] == 1;
12777
12778 ;
12779 return 0;
12780 }
12781 _ACEOF
12782 if ac_fn_c_try_run "$LINENO"; then :
12783 ac_cv_c_bigendian=no
12784 else
12785 ac_cv_c_bigendian=yes
12786 fi
12787 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12788 conftest.$ac_objext conftest.beam conftest.$ac_ext
12789 fi
12790
12791 fi
12792 fi
12793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12794 $as_echo "$ac_cv_c_bigendian" >&6; }
12795 case $ac_cv_c_bigendian in #(
12796 yes)
12797 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12798 ;; #(
12799 no)
12800 ;; #(
12801 universal)
12802
12803 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12804
12805 ;; #(
12806 *)
12807 as_fn_error $? "unknown endianness
12808 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12809 esac
12810
12811 if test "$ac_cv_c_bigendian" = "yes"; then
12812 BIGENDIAN="1"
12813 else
12814 BIGENDIAN="0"
12815 fi
12816
12817
12818 ac_config_files="$ac_config_files Makefile h/Makefile doc/Makefile ref/Makefile numlib/Makefile cgats/Makefile plot/Makefile rspl/Makefile icc/Makefile gamut/Makefile xicc/Makefile link/Makefile spectro/Makefile profile/Makefile tweak/Makefile scanin/Makefile render/Makefile target/Makefile imdi/Makefile jcnf/Makefile jcnf/yajl/Makefile ucmm/Makefile"
12819
12820
12821 cat >confcache <<\_ACEOF
12822 # This file is a shell script that caches the results of configure
12823 # tests run on this system so they can be shared between configure
12824 # scripts and configure runs, see configure's option --config-cache.
12825 # It is not useful on other systems. If it contains results you don't
12826 # want to keep, you may remove or edit it.
12827 #
12828 # config.status only pays attention to the cache file if you give it
12829 # the --recheck option to rerun configure.
12830 #
12831 # `ac_cv_env_foo' variables (set or unset) will be overridden when
12832 # loading this file, other *unset* `ac_cv_foo' will be assigned the
12833 # following values.
12834
12835 _ACEOF
12836
12837 # The following way of writing the cache mishandles newlines in values,
12838 # but we know of no workaround that is simple, portable, and efficient.
12839 # So, we kill variables containing newlines.
12840 # Ultrix sh set writes to stderr and can't be redirected directly,
12841 # and sets the high bit in the cache file unless we assign to the vars.
12842 (
12843 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
12844 eval ac_val=\$$ac_var
12845 case $ac_val in #(
12846 *${as_nl}*)
12847 case $ac_var in #(
12848 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
12849 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
12850 esac
12851 case $ac_var in #(
12852 _ | IFS | as_nl) ;; #(
12853 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
12854 *) { eval $ac_var=; unset $ac_var;} ;;
12855 esac ;;
12856 esac
12857 done
12858
12859 (set) 2>&1 |
12860 case $as_nl`(ac_space=' '; set) 2>&1` in #(
12861 *${as_nl}ac_space=\ *)
12862 # `set' does not quote correctly, so add quotes: double-quote
12863 # substitution turns \\\\ into \\, and sed turns \\ into \.
12864 sed -n \
12865 "s/'/'\\\\''/g;
12866 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
12867 ;; #(
12868 *)
12869 # `set' quotes correctly as required by POSIX, so do not add quotes.
12870 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
12871 ;;
12872 esac |
12873 sort
12874 ) |
12875 sed '
12876 /^ac_cv_env_/b end
12877 t clear
12878 :clear
12879 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
12880 t end
12881 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
12882 :end' >>confcache
12883 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
12884 if test -w "$cache_file"; then
12885 if test "x$cache_file" != "x/dev/null"; then
12886 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
12887 $as_echo "$as_me: updating cache $cache_file" >&6;}
12888 if test ! -f "$cache_file" || test -h "$cache_file"; then
12889 cat confcache >"$cache_file"
12890 else
12891 case $cache_file in #(
12892 */* | ?:*)
12893 mv -f confcache "$cache_file"$$ &&
12894 mv -f "$cache_file"$$ "$cache_file" ;; #(
12895 *)
12896 mv -f confcache "$cache_file" ;;
12897 esac
12898 fi
12899 fi
12900 else
12901 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
12902 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
12903 fi
12904 fi
12905 rm -f confcache
12906
12907 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12908 # Let make expand exec_prefix.
12909 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12910
12911 DEFS=-DHAVE_CONFIG_H
12912
12913 ac_libobjs=
12914 ac_ltlibobjs=
12915 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
12916 # 1. Remove the extension, and $U if already installed.
12917 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
12918 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
12919 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
12920 # will be set to the directory where LIBOBJS objects are built.
12921 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
12922 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
12923 done
12924 LIBOBJS=$ac_libobjs
12925
12926 LTLIBOBJS=$ac_ltlibobjs
12927
12928
12929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
12930 $as_echo_n "checking that generated files are newer than configure... " >&6; }
12931 if test -n "$am_sleep_pid"; then
12932 # Hide warnings about reused PIDs.
12933 wait $am_sleep_pid 2>/dev/null
12934 fi
12935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
12936 $as_echo "done" >&6; }
12937 if test -n "$EXEEXT"; then
12938 am__EXEEXT_TRUE=
12939 am__EXEEXT_FALSE='#'
12940 else
12941 am__EXEEXT_TRUE='#'
12942 am__EXEEXT_FALSE=
12943 fi
12944
12945 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
12946 as_fn_error $? "conditional \"AMDEP\" was never defined.
12947 Usually this means the macro was only invoked conditionally." "$LINENO" 5
12948 fi
12949 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
12950 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
12951 Usually this means the macro was only invoked conditionally." "$LINENO" 5
12952 fi
12953 if test -z "${OS_LINUX_TRUE}" && test -z "${OS_LINUX_FALSE}"; then
12954 as_fn_error $? "conditional \"OS_LINUX\" was never defined.
12955 Usually this means the macro was only invoked conditionally." "$LINENO" 5
12956 fi
12957 if test -z "${OS_LINUX_TRUE}" && test -z "${OS_LINUX_FALSE}"; then
12958 as_fn_error $? "conditional \"OS_LINUX\" was never defined.
12959 Usually this means the macro was only invoked conditionally." "$LINENO" 5
12960 fi
12961 if test -z "${OS_LINUX_TRUE}" && test -z "${OS_LINUX_FALSE}"; then
12962 as_fn_error $? "conditional \"OS_LINUX\" was never defined.
12963 Usually this means the macro was only invoked conditionally." "$LINENO" 5
12964 fi
12965
12966
12967 : "${CONFIG_STATUS=./config.status}"
12968 ac_write_fail=0
12969 ac_clean_files_save=$ac_clean_files
12970 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
12971 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
12972 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
12973 as_write_fail=0
12974 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
12975 #! $SHELL
12976 # Generated by $as_me.
12977 # Run this file to recreate the current configuration.
12978 # Compiler output produced by configure, useful for debugging
12979 # configure, is in config.log if it exists.
12980
12981 debug=false
12982 ac_cs_recheck=false
12983 ac_cs_silent=false
12984
12985 SHELL=\${CONFIG_SHELL-$SHELL}
12986 export SHELL
12987 _ASEOF
12988 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
12989 ## -------------------- ##
12990 ## M4sh Initialization. ##
12991 ## -------------------- ##
12992
12993 # Be more Bourne compatible
12994 DUALCASE=1; export DUALCASE # for MKS sh
12995 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
12996 emulate sh
12997 NULLCMD=:
12998 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
12999 # is contrary to our usage. Disable this feature.
13000 alias -g '${1+"$@"}'='"$@"'
13001 setopt NO_GLOB_SUBST
13002 else
13003 case `(set -o) 2>/dev/null` in #(
13004 *posix*) :
13005 set -o posix ;; #(
13006 *) :
13007 ;;
13008 esac
13009 fi
13010
13011
13012 as_nl='
13013 '
13014 export as_nl
13015 # Printing a long string crashes Solaris 7 /usr/bin/printf.
13016 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13017 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13018 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13019 # Prefer a ksh shell builtin over an external printf program on Solaris,
13020 # but without wasting forks for bash or zsh.
13021 if test -z "$BASH_VERSION$ZSH_VERSION" \
13022 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13023 as_echo='print -r --'
13024 as_echo_n='print -rn --'
13025 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13026 as_echo='printf %s\n'
13027 as_echo_n='printf %s'
13028 else
13029 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13030 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13031 as_echo_n='/usr/ucb/echo -n'
13032 else
13033 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13034 as_echo_n_body='eval
13035 arg=$1;
13036 case $arg in #(
13037 *"$as_nl"*)
13038 expr "X$arg" : "X\\(.*\\)$as_nl";
13039 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13040 esac;
13041 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13042 '
13043 export as_echo_n_body
13044 as_echo_n='sh -c $as_echo_n_body as_echo'
13045 fi
13046 export as_echo_body
13047 as_echo='sh -c $as_echo_body as_echo'
13048 fi
13049
13050 # The user is always right.
13051 if test "${PATH_SEPARATOR+set}" != set; then
13052 PATH_SEPARATOR=:
13053 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13054 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
13055 PATH_SEPARATOR=';'
13056 }
13057 fi
13058
13059
13060 # IFS
13061 # We need space, tab and new line, in precisely that order. Quoting is
13062 # there to prevent editors from complaining about space-tab.
13063 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
13064 # splitting by setting IFS to empty value.)
13065 IFS=" "" $as_nl"
13066
13067 # Find who we are. Look in the path if we contain no directory separator.
13068 as_myself=
13069 case $0 in #((
13070 *[\\/]* ) as_myself=$0 ;;
13071 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13072 for as_dir in $PATH
13073 do
13074 IFS=$as_save_IFS
13075 test -z "$as_dir" && as_dir=.
13076 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
13077 done
13078 IFS=$as_save_IFS
13079
13080 ;;
13081 esac
13082 # We did not find ourselves, most probably we were run as `sh COMMAND'
13083 # in which case we are not to be found in the path.
13084 if test "x$as_myself" = x; then
13085 as_myself=$0
13086 fi
13087 if test ! -f "$as_myself"; then
13088 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
13089 exit 1
13090 fi
13091
13092 # Unset variables that we do not need and which cause bugs (e.g. in
13093 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
13094 # suppresses any "Segmentation fault" message there. '((' could
13095 # trigger a bug in pdksh 5.2.14.
13096 for as_var in BASH_ENV ENV MAIL MAILPATH
13097 do eval test x\${$as_var+set} = xset \
13098 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
13099 done
13100 PS1='$ '
13101 PS2='> '
13102 PS4='+ '
13103
13104 # NLS nuisances.
13105 LC_ALL=C
13106 export LC_ALL
13107 LANGUAGE=C
13108 export LANGUAGE
13109
13110 # CDPATH.
13111 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
13112
13113
13114 # as_fn_error STATUS ERROR [LINENO LOG_FD]
13115 # ----------------------------------------
13116 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
13117 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
13118 # script with STATUS, using 1 if that was 0.
13119 as_fn_error ()
13120 {
13121 as_status=$1; test $as_status -eq 0 && as_status=1
13122 if test "$4"; then
13123 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
13124 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
13125 fi
13126 $as_echo "$as_me: error: $2" >&2
13127 as_fn_exit $as_status
13128 } # as_fn_error
13129
13130
13131 # as_fn_set_status STATUS
13132 # -----------------------
13133 # Set $? to STATUS, without forking.
13134 as_fn_set_status ()
13135 {
13136 return $1
13137 } # as_fn_set_status
13138
13139 # as_fn_exit STATUS
13140 # -----------------
13141 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
13142 as_fn_exit ()
13143 {
13144 set +e
13145 as_fn_set_status $1
13146 exit $1
13147 } # as_fn_exit
13148
13149 # as_fn_unset VAR
13150 # ---------------
13151 # Portably unset VAR.
13152 as_fn_unset ()
13153 {
13154 { eval $1=; unset $1;}
13155 }
13156 as_unset=as_fn_unset
13157 # as_fn_append VAR VALUE
13158 # ----------------------
13159 # Append the text in VALUE to the end of the definition contained in VAR. Take
13160 # advantage of any shell optimizations that allow amortized linear growth over
13161 # repeated appends, instead of the typical quadratic growth present in naive
13162 # implementations.
13163 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
13164 eval 'as_fn_append ()
13165 {
13166 eval $1+=\$2
13167 }'
13168 else
13169 as_fn_append ()
13170 {
13171 eval $1=\$$1\$2
13172 }
13173 fi # as_fn_append
13174
13175 # as_fn_arith ARG...
13176 # ------------------
13177 # Perform arithmetic evaluation on the ARGs, and store the result in the
13178 # global $as_val. Take advantage of shells that can avoid forks. The arguments
13179 # must be portable across $(()) and expr.
13180 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
13181 eval 'as_fn_arith ()
13182 {
13183 as_val=$(( $* ))
13184 }'
13185 else
13186 as_fn_arith ()
13187 {
13188 as_val=`expr "$@" || test $? -eq 1`
13189 }
13190 fi # as_fn_arith
13191
13192
13193 if expr a : '\(a\)' >/dev/null 2>&1 &&
13194 test "X`expr 00001 : '.*\(...\)'`" = X001; then
13195 as_expr=expr
13196 else
13197 as_expr=false
13198 fi
13199
13200 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
13201 as_basename=basename
13202 else
13203 as_basename=false
13204 fi
13205
13206 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
13207 as_dirname=dirname
13208 else
13209 as_dirname=false
13210 fi
13211
13212 as_me=`$as_basename -- "$0" ||
13213 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
13214 X"$0" : 'X\(//\)$' \| \
13215 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
13216 $as_echo X/"$0" |
13217 sed '/^.*\/\([^/][^/]*\)\/*$/{
13218 s//\1/
13219 q
13220 }
13221 /^X\/\(\/\/\)$/{
13222 s//\1/
13223 q
13224 }
13225 /^X\/\(\/\).*/{
13226 s//\1/
13227 q
13228 }
13229 s/.*/./; q'`
13230
13231 # Avoid depending upon Character Ranges.
13232 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13233 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13234 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
13235 as_cr_digits='0123456789'
13236 as_cr_alnum=$as_cr_Letters$as_cr_digits
13237
13238 ECHO_C= ECHO_N= ECHO_T=
13239 case `echo -n x` in #(((((
13240 -n*)
13241 case `echo 'xy\c'` in
13242 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
13243 xy) ECHO_C='\c';;
13244 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
13245 ECHO_T=' ';;
13246 esac;;
13247 *)
13248 ECHO_N='-n';;
13249 esac
13250
13251 rm -f conf$$ conf$$.exe conf$$.file
13252 if test -d conf$$.dir; then
13253 rm -f conf$$.dir/conf$$.file
13254 else
13255 rm -f conf$$.dir
13256 mkdir conf$$.dir 2>/dev/null
13257 fi
13258 if (echo >conf$$.file) 2>/dev/null; then
13259 if ln -s conf$$.file conf$$ 2>/dev/null; then
13260 as_ln_s='ln -s'
13261 # ... but there are two gotchas:
13262 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
13263 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
13264 # In both cases, we have to default to `cp -pR'.
13265 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
13266 as_ln_s='cp -pR'
13267 elif ln conf$$.file conf$$ 2>/dev/null; then
13268 as_ln_s=ln
13269 else
13270 as_ln_s='cp -pR'
13271 fi
13272 else
13273 as_ln_s='cp -pR'
13274 fi
13275 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
13276 rmdir conf$$.dir 2>/dev/null
13277
13278
13279 # as_fn_mkdir_p
13280 # -------------
13281 # Create "$as_dir" as a directory, including parents if necessary.
13282 as_fn_mkdir_p ()
13283 {
13284
13285 case $as_dir in #(
13286 -*) as_dir=./$as_dir;;
13287 esac
13288 test -d "$as_dir" || eval $as_mkdir_p || {
13289 as_dirs=
13290 while :; do
13291 case $as_dir in #(
13292 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
13293 *) as_qdir=$as_dir;;
13294 esac
13295 as_dirs="'$as_qdir' $as_dirs"
13296 as_dir=`$as_dirname -- "$as_dir" ||
13297 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13298 X"$as_dir" : 'X\(//\)[^/]' \| \
13299 X"$as_dir" : 'X\(//\)$' \| \
13300 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
13301 $as_echo X"$as_dir" |
13302 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
13303 s//\1/
13304 q
13305 }
13306 /^X\(\/\/\)[^/].*/{
13307 s//\1/
13308 q
13309 }
13310 /^X\(\/\/\)$/{
13311 s//\1/
13312 q
13313 }
13314 /^X\(\/\).*/{
13315 s//\1/
13316 q
13317 }
13318 s/.*/./; q'`
13319 test -d "$as_dir" && break
13320 done
13321 test -z "$as_dirs" || eval "mkdir $as_dirs"
13322 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
13323
13324
13325 } # as_fn_mkdir_p
13326 if mkdir -p . 2>/dev/null; then
13327 as_mkdir_p='mkdir -p "$as_dir"'
13328 else
13329 test -d ./-p && rmdir ./-p
13330 as_mkdir_p=false
13331 fi
13332
13333
13334 # as_fn_executable_p FILE
13335 # -----------------------
13336 # Test if FILE is an executable regular file.
13337 as_fn_executable_p ()
13338 {
13339 test -f "$1" && test -x "$1"
13340 } # as_fn_executable_p
13341 as_test_x='test -x'
13342 as_executable_p=as_fn_executable_p
13343
13344 # Sed expression to map a string onto a valid CPP name.
13345 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
13346
13347 # Sed expression to map a string onto a valid variable name.
13348 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
13349
13350
13351 exec 6>&1
13352 ## ----------------------------------- ##
13353 ## Main body of $CONFIG_STATUS script. ##
13354 ## ----------------------------------- ##
13355 _ASEOF
13356 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
13357
13358 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13359 # Save the log message, to keep $0 and so on meaningful, and to
13360 # report actual input values of CONFIG_FILES etc. instead of their
13361 # values after options handling.
13362 ac_log="
13363 This file was extended by argyll $as_me 1.3.7, which was
13364 generated by GNU Autoconf 2.69. Invocation command line was
13365
13366 CONFIG_FILES = $CONFIG_FILES
13367 CONFIG_HEADERS = $CONFIG_HEADERS
13368 CONFIG_LINKS = $CONFIG_LINKS
13369 CONFIG_COMMANDS = $CONFIG_COMMANDS
13370 $ $0 $@
13371
13372 on `(hostname || uname -n) 2>/dev/null | sed 1q`
13373 "
13374
13375 _ACEOF
13376
13377 case $ac_config_files in *"
13378 "*) set x $ac_config_files; shift; ac_config_files=$*;;
13379 esac
13380
13381 case $ac_config_headers in *"
13382 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
13383 esac
13384
13385
13386 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13387 # Files that config.status was made for.
13388 config_files="$ac_config_files"
13389 config_headers="$ac_config_headers"
13390 config_commands="$ac_config_commands"
13391
13392 _ACEOF
13393
13394 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13395 ac_cs_usage="\
13396 \`$as_me' instantiates files and other configuration actions
13397 from templates according to the current configuration. Unless the files
13398 and actions are specified as TAGs, all are instantiated by default.
13399
13400 Usage: $0 [OPTION]... [TAG]...
13401
13402 -h, --help print this help, then exit
13403 -V, --version print version number and configuration settings, then exit
13404 --config print configuration, then exit
13405 -q, --quiet, --silent
13406 do not print progress messages
13407 -d, --debug don't remove temporary files
13408 --recheck update $as_me by reconfiguring in the same conditions
13409 --file=FILE[:TEMPLATE]
13410 instantiate the configuration file FILE
13411 --header=FILE[:TEMPLATE]
13412 instantiate the configuration header FILE
13413
13414 Configuration files:
13415 $config_files
13416
13417 Configuration headers:
13418 $config_headers
13419
13420 Configuration commands:
13421 $config_commands
13422
13423 Report bugs to the package provider."
13424
13425 _ACEOF
13426 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13427 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
13428 ac_cs_version="\\
13429 argyll config.status 1.3.7
13430 configured by $0, generated by GNU Autoconf 2.69,
13431 with options \\"\$ac_cs_config\\"
13432
13433 Copyright (C) 2012 Free Software Foundation, Inc.
13434 This config.status script is free software; the Free Software Foundation
13435 gives unlimited permission to copy, distribute and modify it."
13436
13437 ac_pwd='$ac_pwd'
13438 srcdir='$srcdir'
13439 INSTALL='$INSTALL'
13440 MKDIR_P='$MKDIR_P'
13441 AWK='$AWK'
13442 test -n "\$AWK" || AWK=awk
13443 _ACEOF
13444
13445 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13446 # The default lists apply if the user does not specify any file.
13447 ac_need_defaults=:
13448 while test $# != 0
13449 do
13450 case $1 in
13451 --*=?*)
13452 ac_option=`expr "X$1" : 'X\([^=]*\)='`
13453 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
13454 ac_shift=:
13455 ;;
13456 --*=)
13457 ac_option=`expr "X$1" : 'X\([^=]*\)='`
13458 ac_optarg=
13459 ac_shift=:
13460 ;;
13461 *)
13462 ac_option=$1
13463 ac_optarg=$2
13464 ac_shift=shift
13465 ;;
13466 esac
13467
13468 case $ac_option in
13469 # Handling of the options.
13470 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
13471 ac_cs_recheck=: ;;
13472 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
13473 $as_echo "$ac_cs_version"; exit ;;
13474 --config | --confi | --conf | --con | --co | --c )
13475 $as_echo "$ac_cs_config"; exit ;;
13476 --debug | --debu | --deb | --de | --d | -d )
13477 debug=: ;;
13478 --file | --fil | --fi | --f )
13479 $ac_shift
13480 case $ac_optarg in
13481 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
13482 '') as_fn_error $? "missing file argument" ;;
13483 esac
13484 as_fn_append CONFIG_FILES " '$ac_optarg'"
13485 ac_need_defaults=false;;
13486 --header | --heade | --head | --hea )
13487 $ac_shift
13488 case $ac_optarg in
13489 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
13490 esac
13491 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
13492 ac_need_defaults=false;;
13493 --he | --h)
13494 # Conflict between --help and --header
13495 as_fn_error $? "ambiguous option: \`$1'
13496 Try \`$0 --help' for more information.";;
13497 --help | --hel | -h )
13498 $as_echo "$ac_cs_usage"; exit ;;
13499 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
13500 | -silent | --silent | --silen | --sile | --sil | --si | --s)
13501 ac_cs_silent=: ;;
13502
13503 # This is an error.
13504 -*) as_fn_error $? "unrecognized option: \`$1'
13505 Try \`$0 --help' for more information." ;;
13506
13507 *) as_fn_append ac_config_targets " $1"
13508 ac_need_defaults=false ;;
13509
13510 esac
13511 shift
13512 done
13513
13514 ac_configure_extra_args=
13515
13516 if $ac_cs_silent; then
13517 exec 6>/dev/null
13518 ac_configure_extra_args="$ac_configure_extra_args --silent"
13519 fi
13520
13521 _ACEOF
13522 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13523 if \$ac_cs_recheck; then
13524 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
13525 shift
13526 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
13527 CONFIG_SHELL='$SHELL'
13528 export CONFIG_SHELL
13529 exec "\$@"
13530 fi
13531
13532 _ACEOF
13533 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13534 exec 5>>config.log
13535 {
13536 echo
13537 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
13538 ## Running $as_me. ##
13539 _ASBOX
13540 $as_echo "$ac_log"
13541 } >&5
13542
13543 _ACEOF
13544 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13545 #
13546 # INIT-COMMANDS
13547 #
13548 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
13549
13550
13551 # The HP-UX ksh and POSIX shell print the target directory to stdout
13552 # if CDPATH is set.
13553 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
13554
13555 sed_quote_subst='$sed_quote_subst'
13556 double_quote_subst='$double_quote_subst'
13557 delay_variable_subst='$delay_variable_subst'
13558 macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
13559 macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
13560 enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
13561 enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
13562 pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
13563 enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
13564 SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
13565 ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
13566 PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
13567 host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
13568 host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
13569 host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
13570 build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
13571 build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
13572 build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
13573 SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
13574 Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
13575 GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
13576 EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
13577 FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
13578 LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
13579 NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
13580 LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
13581 max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
13582 ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
13583 exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
13584 lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
13585 lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
13586 lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
13587 lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
13588 lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
13589 reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
13590 reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
13591 OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
13592 deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
13593 file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
13594 file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
13595 want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
13596 DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
13597 sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
13598 AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
13599 AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
13600 archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
13601 STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
13602 RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
13603 old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
13604 old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
13605 old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
13606 lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
13607 CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
13608 CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
13609 compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
13610 GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
13611 lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
13612 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
13613 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
13614 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
13615 nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
13616 lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
13617 objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
13618 MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
13619 lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
13620 lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
13621 lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
13622 lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
13623 lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
13624 need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
13625 MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
13626 DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
13627 NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
13628 LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
13629 OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
13630 OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
13631 libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
13632 shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
13633 extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
13634 archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
13635 enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
13636 export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
13637 whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
13638 compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
13639 old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
13640 old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
13641 archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
13642 archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
13643 module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
13644 module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
13645 with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
13646 allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
13647 no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
13648 hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
13649 hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
13650 hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
13651 hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
13652 hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
13653 hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
13654 hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
13655 inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
13656 link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
13657 always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
13658 export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
13659 exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
13660 include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
13661 prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
13662 postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
13663 file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
13664 variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
13665 need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
13666 need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
13667 version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
13668 runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
13669 shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
13670 shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
13671 libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
13672 library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
13673 soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
13674 install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
13675 postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
13676 postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
13677 finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
13678 finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
13679 hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
13680 sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
13681 sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`'
13682 hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
13683 enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
13684 enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
13685 enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
13686 old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
13687 striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
13688
13689 LTCC='$LTCC'
13690 LTCFLAGS='$LTCFLAGS'
13691 compiler='$compiler_DEFAULT'
13692
13693 # A function that is used when there is no print builtin or printf.
13694 func_fallback_echo ()
13695 {
13696 eval 'cat <<_LTECHO_EOF
13697 \$1
13698 _LTECHO_EOF'
13699 }
13700
13701 # Quote evaled strings.
13702 for var in SHELL \
13703 ECHO \
13704 PATH_SEPARATOR \
13705 SED \
13706 GREP \
13707 EGREP \
13708 FGREP \
13709 LD \
13710 NM \
13711 LN_S \
13712 lt_SP2NL \
13713 lt_NL2SP \
13714 reload_flag \
13715 OBJDUMP \
13716 deplibs_check_method \
13717 file_magic_cmd \
13718 file_magic_glob \
13719 want_nocaseglob \
13720 DLLTOOL \
13721 sharedlib_from_linklib_cmd \
13722 AR \
13723 AR_FLAGS \
13724 archiver_list_spec \
13725 STRIP \
13726 RANLIB \
13727 CC \
13728 CFLAGS \
13729 compiler \
13730 lt_cv_sys_global_symbol_pipe \
13731 lt_cv_sys_global_symbol_to_cdecl \
13732 lt_cv_sys_global_symbol_to_c_name_address \
13733 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
13734 nm_file_list_spec \
13735 lt_prog_compiler_no_builtin_flag \
13736 lt_prog_compiler_pic \
13737 lt_prog_compiler_wl \
13738 lt_prog_compiler_static \
13739 lt_cv_prog_compiler_c_o \
13740 need_locks \
13741 MANIFEST_TOOL \
13742 DSYMUTIL \
13743 NMEDIT \
13744 LIPO \
13745 OTOOL \
13746 OTOOL64 \
13747 shrext_cmds \
13748 export_dynamic_flag_spec \
13749 whole_archive_flag_spec \
13750 compiler_needs_object \
13751 with_gnu_ld \
13752 allow_undefined_flag \
13753 no_undefined_flag \
13754 hardcode_libdir_flag_spec \
13755 hardcode_libdir_separator \
13756 exclude_expsyms \
13757 include_expsyms \
13758 file_list_spec \
13759 variables_saved_for_relink \
13760 libname_spec \
13761 library_names_spec \
13762 soname_spec \
13763 install_override_mode \
13764 finish_eval \
13765 old_striplib \
13766 striplib; do
13767 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
13768 *[\\\\\\\`\\"\\\$]*)
13769 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
13770 ;;
13771 *)
13772 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
13773 ;;
13774 esac
13775 done
13776
13777 # Double-quote double-evaled strings.
13778 for var in reload_cmds \
13779 old_postinstall_cmds \
13780 old_postuninstall_cmds \
13781 old_archive_cmds \
13782 extract_expsyms_cmds \
13783 old_archive_from_new_cmds \
13784 old_archive_from_expsyms_cmds \
13785 archive_cmds \
13786 archive_expsym_cmds \
13787 module_cmds \
13788 module_expsym_cmds \
13789 export_symbols_cmds \
13790 prelink_cmds \
13791 postlink_cmds \
13792 postinstall_cmds \
13793 postuninstall_cmds \
13794 finish_cmds \
13795 sys_lib_search_path_spec \
13796 sys_lib_dlsearch_path_spec; do
13797 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
13798 *[\\\\\\\`\\"\\\$]*)
13799 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
13800 ;;
13801 *)
13802 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
13803 ;;
13804 esac
13805 done
13806
13807 ac_aux_dir='$ac_aux_dir'
13808 xsi_shell='$xsi_shell'
13809 lt_shell_append='$lt_shell_append'
13810
13811 # See if we are running on zsh, and set the options which allow our
13812 # commands through without removal of \ escapes INIT.
13813 if test -n "\${ZSH_VERSION+set}" ; then
13814 setopt NO_GLOB_SUBST
13815 fi
13816
13817
13818 PACKAGE='$PACKAGE'
13819 VERSION='$VERSION'
13820 TIMESTAMP='$TIMESTAMP'
13821 RM='$RM'
13822 ofile='$ofile'
13823
13824
13825
13826
13827 _ACEOF
13828
13829 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13830
13831 # Handling of arguments.
13832 for ac_config_target in $ac_config_targets
13833 do
13834 case $ac_config_target in
13835 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
13836 "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
13837 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
13838 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
13839 "h/Makefile") CONFIG_FILES="$CONFIG_FILES h/Makefile" ;;
13840 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
13841 "ref/Makefile") CONFIG_FILES="$CONFIG_FILES ref/Makefile" ;;
13842 "numlib/Makefile") CONFIG_FILES="$CONFIG_FILES numlib/Makefile" ;;
13843 "cgats/Makefile") CONFIG_FILES="$CONFIG_FILES cgats/Makefile" ;;
13844 "plot/Makefile") CONFIG_FILES="$CONFIG_FILES plot/Makefile" ;;
13845 "rspl/Makefile") CONFIG_FILES="$CONFIG_FILES rspl/Makefile" ;;
13846 "icc/Makefile") CONFIG_FILES="$CONFIG_FILES icc/Makefile" ;;
13847 "gamut/Makefile") CONFIG_FILES="$CONFIG_FILES gamut/Makefile" ;;
13848 "xicc/Makefile") CONFIG_FILES="$CONFIG_FILES xicc/Makefile" ;;
13849 "link/Makefile") CONFIG_FILES="$CONFIG_FILES link/Makefile" ;;
13850 "spectro/Makefile") CONFIG_FILES="$CONFIG_FILES spectro/Makefile" ;;
13851 "profile/Makefile") CONFIG_FILES="$CONFIG_FILES profile/Makefile" ;;
13852 "tweak/Makefile") CONFIG_FILES="$CONFIG_FILES tweak/Makefile" ;;
13853 "scanin/Makefile") CONFIG_FILES="$CONFIG_FILES scanin/Makefile" ;;
13854 "render/Makefile") CONFIG_FILES="$CONFIG_FILES render/Makefile" ;;
13855 "target/Makefile") CONFIG_FILES="$CONFIG_FILES target/Makefile" ;;
13856 "imdi/Makefile") CONFIG_FILES="$CONFIG_FILES imdi/Makefile" ;;
13857 "jcnf/Makefile") CONFIG_FILES="$CONFIG_FILES jcnf/Makefile" ;;
13858 "jcnf/yajl/Makefile") CONFIG_FILES="$CONFIG_FILES jcnf/yajl/Makefile" ;;
13859 "ucmm/Makefile") CONFIG_FILES="$CONFIG_FILES ucmm/Makefile" ;;
13860
13861 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
13862 esac
13863 done
13864
13865
13866 # If the user did not use the arguments to specify the items to instantiate,
13867 # then the envvar interface is used. Set only those that are not.
13868 # We use the long form for the default assignment because of an extremely
13869 # bizarre bug on SunOS 4.1.3.
13870 if $ac_need_defaults; then
13871 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
13872 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
13873 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
13874 fi
13875
13876 # Have a temporary directory for convenience. Make it in the build tree
13877 # simply because there is no reason against having it here, and in addition,
13878 # creating and moving files from /tmp can sometimes cause problems.
13879 # Hook for its removal unless debugging.
13880 # Note that there is a small window in which the directory will not be cleaned:
13881 # after its creation but before its name has been assigned to `$tmp'.
13882 $debug ||
13883 {
13884 tmp= ac_tmp=
13885 trap 'exit_status=$?
13886 : "${ac_tmp:=$tmp}"
13887 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
13888 ' 0
13889 trap 'as_fn_exit 1' 1 2 13 15
13890 }
13891 # Create a (secure) tmp directory for tmp files.
13892
13893 {
13894 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
13895 test -d "$tmp"
13896 } ||
13897 {
13898 tmp=./conf$$-$RANDOM
13899 (umask 077 && mkdir "$tmp")
13900 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
13901 ac_tmp=$tmp
13902
13903 # Set up the scripts for CONFIG_FILES section.
13904 # No need to generate them if there are no CONFIG_FILES.
13905 # This happens for instance with `./config.status config.h'.
13906 if test -n "$CONFIG_FILES"; then
13907
13908
13909 ac_cr=`echo X | tr X '\015'`
13910 # On cygwin, bash can eat \r inside `` if the user requested igncr.
13911 # But we know of no other shell where ac_cr would be empty at this
13912 # point, so we can use a bashism as a fallback.
13913 if test "x$ac_cr" = x; then
13914 eval ac_cr=\$\'\\r\'
13915 fi
13916 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
13917 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
13918 ac_cs_awk_cr='\\r'
13919 else
13920 ac_cs_awk_cr=$ac_cr
13921 fi
13922
13923 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
13924 _ACEOF
13925
13926
13927 {
13928 echo "cat >conf$$subs.awk <<_ACEOF" &&
13929 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
13930 echo "_ACEOF"
13931 } >conf$$subs.sh ||
13932 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
13933 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
13934 ac_delim='%!_!# '
13935 for ac_last_try in false false false false false :; do
13936 . ./conf$$subs.sh ||
13937 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
13938
13939 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
13940 if test $ac_delim_n = $ac_delim_num; then
13941 break
13942 elif $ac_last_try; then
13943 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
13944 else
13945 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
13946 fi
13947 done
13948 rm -f conf$$subs.sh
13949
13950 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13951 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
13952 _ACEOF
13953 sed -n '
13954 h
13955 s/^/S["/; s/!.*/"]=/
13956 p
13957 g
13958 s/^[^!]*!//
13959 :repl
13960 t repl
13961 s/'"$ac_delim"'$//
13962 t delim
13963 :nl
13964 h
13965 s/\(.\{148\}\)..*/\1/
13966 t more1
13967 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
13968 p
13969 n
13970 b repl
13971 :more1
13972 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
13973 p
13974 g
13975 s/.\{148\}//
13976 t nl
13977 :delim
13978 h
13979 s/\(.\{148\}\)..*/\1/
13980 t more2
13981 s/["\\]/\\&/g; s/^/"/; s/$/"/
13982 p
13983 b
13984 :more2
13985 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
13986 p
13987 g
13988 s/.\{148\}//
13989 t delim
13990 ' <conf$$subs.awk | sed '
13991 /^[^""]/{
13992 N
13993 s/\n//
13994 }
13995 ' >>$CONFIG_STATUS || ac_write_fail=1
13996 rm -f conf$$subs.awk
13997 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13998 _ACAWK
13999 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
14000 for (key in S) S_is_set[key] = 1
14001 FS = ""
14002
14003 }
14004 {
14005 line = $ 0
14006 nfields = split(line, field, "@")
14007 substed = 0
14008 len = length(field[1])
14009 for (i = 2; i < nfields; i++) {
14010 key = field[i]
14011 keylen = length(key)
14012 if (S_is_set[key]) {
14013 value = S[key]
14014 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14015 len += length(value) + length(field[++i])
14016 substed = 1
14017 } else
14018 len += 1 + keylen
14019 }
14020
14021 print line
14022 }
14023
14024 _ACAWK
14025 _ACEOF
14026 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14027 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14028 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14029 else
14030 cat
14031 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
14032 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
14033 _ACEOF
14034
14035 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14036 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
14037 # trailing colons and then remove the whole line if VPATH becomes empty
14038 # (actually we leave an empty line to preserve line numbers).
14039 if test "x$srcdir" = x.; then
14040 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14041 h
14042 s///
14043 s/^/:/
14044 s/[ ]*$/:/
14045 s/:\$(srcdir):/:/g
14046 s/:\${srcdir}:/:/g
14047 s/:@srcdir@:/:/g
14048 s/^:*//
14049 s/:*$//
14050 x
14051 s/\(=[ ]*\).*/\1/
14052 G
14053 s/\n//
14054 s/^[^=]*=[ ]*$//
14055 }'
14056 fi
14057
14058 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14059 fi # test -n "$CONFIG_FILES"
14060
14061 # Set up the scripts for CONFIG_HEADERS section.
14062 # No need to generate them if there are no CONFIG_HEADERS.
14063 # This happens for instance with `./config.status Makefile'.
14064 if test -n "$CONFIG_HEADERS"; then
14065 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
14066 BEGIN {
14067 _ACEOF
14068
14069 # Transform confdefs.h into an awk script `defines.awk', embedded as
14070 # here-document in config.status, that substitutes the proper values into
14071 # config.h.in to produce config.h.
14072
14073 # Create a delimiter string that does not exist in confdefs.h, to ease
14074 # handling of long lines.
14075 ac_delim='%!_!# '
14076 for ac_last_try in false false :; do
14077 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
14078 if test -z "$ac_tt"; then
14079 break
14080 elif $ac_last_try; then
14081 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
14082 else
14083 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14084 fi
14085 done
14086
14087 # For the awk script, D is an array of macro values keyed by name,
14088 # likewise P contains macro parameters if any. Preserve backslash
14089 # newline sequences.
14090
14091 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14092 sed -n '
14093 s/.\{148\}/&'"$ac_delim"'/g
14094 t rset
14095 :rset
14096 s/^[ ]*#[ ]*define[ ][ ]*/ /
14097 t def
14098 d
14099 :def
14100 s/\\$//
14101 t bsnl
14102 s/["\\]/\\&/g
14103 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14104 D["\1"]=" \3"/p
14105 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14106 d
14107 :bsnl
14108 s/["\\]/\\&/g
14109 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14110 D["\1"]=" \3\\\\\\n"\\/p
14111 t cont
14112 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14113 t cont
14114 d
14115 :cont
14116 n
14117 s/.\{148\}/&'"$ac_delim"'/g
14118 t clear
14119 :clear
14120 s/\\$//
14121 t bsnlc
14122 s/["\\]/\\&/g; s/^/"/; s/$/"/p
14123 d
14124 :bsnlc
14125 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14126 b cont
14127 ' <confdefs.h | sed '
14128 s/'"$ac_delim"'/"\\\
14129 "/g' >>$CONFIG_STATUS || ac_write_fail=1
14130
14131 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14132 for (key in D) D_is_set[key] = 1
14133 FS = ""
14134 }
14135 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14136 line = \$ 0
14137 split(line, arg, " ")
14138 if (arg[1] == "#") {
14139 defundef = arg[2]
14140 mac1 = arg[3]
14141 } else {
14142 defundef = substr(arg[1], 2)
14143 mac1 = arg[2]
14144 }
14145 split(mac1, mac2, "(") #)
14146 macro = mac2[1]
14147 prefix = substr(line, 1, index(line, defundef) - 1)
14148 if (D_is_set[macro]) {
14149 # Preserve the white space surrounding the "#".
14150 print prefix "define", macro P[macro] D[macro]
14151 next
14152 } else {
14153 # Replace #undef with comments. This is necessary, for example,
14154 # in the case of _POSIX_SOURCE, which is predefined and required
14155 # on some systems where configure will not decide to define it.
14156 if (defundef == "undef") {
14157 print "/*", prefix defundef, macro, "*/"
14158 next
14159 }
14160 }
14161 }
14162 { print }
14163 _ACAWK
14164 _ACEOF
14165 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14166 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
14167 fi # test -n "$CONFIG_HEADERS"
14168
14169
14170 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
14171 shift
14172 for ac_tag
14173 do
14174 case $ac_tag in
14175 :[FHLC]) ac_mode=$ac_tag; continue;;
14176 esac
14177 case $ac_mode$ac_tag in
14178 :[FHL]*:*);;
14179 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
14180 :[FH]-) ac_tag=-:-;;
14181 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14182 esac
14183 ac_save_IFS=$IFS
14184 IFS=:
14185 set x $ac_tag
14186 IFS=$ac_save_IFS
14187 shift
14188 ac_file=$1
14189 shift
14190
14191 case $ac_mode in
14192 :L) ac_source=$1;;
14193 :[FH])
14194 ac_file_inputs=
14195 for ac_f
14196 do
14197 case $ac_f in
14198 -) ac_f="$ac_tmp/stdin";;
14199 *) # Look for the file first in the build tree, then in the source tree
14200 # (if the path is not absolute). The absolute path cannot be DOS-style,
14201 # because $ac_f cannot contain `:'.
14202 test -f "$ac_f" ||
14203 case $ac_f in
14204 [\\/$]*) false;;
14205 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14206 esac ||
14207 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
14208 esac
14209 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14210 as_fn_append ac_file_inputs " '$ac_f'"
14211 done
14212
14213 # Let's still pretend it is `configure' which instantiates (i.e., don't
14214 # use $as_me), people would be surprised to read:
14215 # /* config.h. Generated by config.status. */
14216 configure_input='Generated from '`
14217 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14218 `' by configure.'
14219 if test x"$ac_file" != x-; then
14220 configure_input="$ac_file. $configure_input"
14221 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14222 $as_echo "$as_me: creating $ac_file" >&6;}
14223 fi
14224 # Neutralize special characters interpreted by sed in replacement strings.
14225 case $configure_input in #(
14226 *\&* | *\|* | *\\* )
14227 ac_sed_conf_input=`$as_echo "$configure_input" |
14228 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14229 *) ac_sed_conf_input=$configure_input;;
14230 esac
14231
14232 case $ac_tag in
14233 *:-:* | *:-) cat >"$ac_tmp/stdin" \
14234 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
14235 esac
14236 ;;
14237 esac
14238
14239 ac_dir=`$as_dirname -- "$ac_file" ||
14240 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14241 X"$ac_file" : 'X\(//\)[^/]' \| \
14242 X"$ac_file" : 'X\(//\)$' \| \
14243 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
14244 $as_echo X"$ac_file" |
14245 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14246 s//\1/
14247 q
14248 }
14249 /^X\(\/\/\)[^/].*/{
14250 s//\1/
14251 q
14252 }
14253 /^X\(\/\/\)$/{
14254 s//\1/
14255 q
14256 }
14257 /^X\(\/\).*/{
14258 s//\1/
14259 q
14260 }
14261 s/.*/./; q'`
14262 as_dir="$ac_dir"; as_fn_mkdir_p
14263 ac_builddir=.
14264
14265 case "$ac_dir" in
14266 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14267 *)
14268 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
14269 # A ".." for each directory in $ac_dir_suffix.
14270 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
14271 case $ac_top_builddir_sub in
14272 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14273 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14274 esac ;;
14275 esac
14276 ac_abs_top_builddir=$ac_pwd
14277 ac_abs_builddir=$ac_pwd$ac_dir_suffix
14278 # for backward compatibility:
14279 ac_top_builddir=$ac_top_build_prefix
14280
14281 case $srcdir in
14282 .) # We are building in place.
14283 ac_srcdir=.
14284 ac_top_srcdir=$ac_top_builddir_sub
14285 ac_abs_top_srcdir=$ac_pwd ;;
14286 [\\/]* | ?:[\\/]* ) # Absolute name.
14287 ac_srcdir=$srcdir$ac_dir_suffix;
14288 ac_top_srcdir=$srcdir
14289 ac_abs_top_srcdir=$srcdir ;;
14290 *) # Relative name.
14291 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14292 ac_top_srcdir=$ac_top_build_prefix$srcdir
14293 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
14294 esac
14295 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
14296
14297
14298 case $ac_mode in
14299 :F)
14300 #
14301 # CONFIG_FILE
14302 #
14303
14304 case $INSTALL in
14305 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
14306 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
14307 esac
14308 ac_MKDIR_P=$MKDIR_P
14309 case $MKDIR_P in
14310 [\\/$]* | ?:[\\/]* ) ;;
14311 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
14312 esac
14313 _ACEOF
14314
14315 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14316 # If the template does not know about datarootdir, expand it.
14317 # FIXME: This hack should be removed a few years after 2.60.
14318 ac_datarootdir_hack=; ac_datarootdir_seen=
14319 ac_sed_dataroot='
14320 /datarootdir/ {
14321 p
14322 q
14323 }
14324 /@datadir@/p
14325 /@docdir@/p
14326 /@infodir@/p
14327 /@localedir@/p
14328 /@mandir@/p'
14329 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
14330 *datarootdir*) ac_datarootdir_seen=yes;;
14331 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
14332 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14333 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
14334 _ACEOF
14335 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14336 ac_datarootdir_hack='
14337 s&@datadir@&$datadir&g
14338 s&@docdir@&$docdir&g
14339 s&@infodir@&$infodir&g
14340 s&@localedir@&$localedir&g
14341 s&@mandir@&$mandir&g
14342 s&\\\${datarootdir}&$datarootdir&g' ;;
14343 esac
14344 _ACEOF
14345
14346 # Neutralize VPATH when `$srcdir' = `.'.
14347 # Shell code in configure.ac might set extrasub.
14348 # FIXME: do we really want to maintain this feature?
14349 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14350 ac_sed_extra="$ac_vpsub
14351 $extrasub
14352 _ACEOF
14353 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14354 :t
14355 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
14356 s|@configure_input@|$ac_sed_conf_input|;t t
14357 s&@top_builddir@&$ac_top_builddir_sub&;t t
14358 s&@top_build_prefix@&$ac_top_build_prefix&;t t
14359 s&@srcdir@&$ac_srcdir&;t t
14360 s&@abs_srcdir@&$ac_abs_srcdir&;t t
14361 s&@top_srcdir@&$ac_top_srcdir&;t t
14362 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
14363 s&@builddir@&$ac_builddir&;t t
14364 s&@abs_builddir@&$ac_abs_builddir&;t t
14365 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
14366 s&@INSTALL@&$ac_INSTALL&;t t
14367 s&@MKDIR_P@&$ac_MKDIR_P&;t t
14368 $ac_datarootdir_hack
14369 "
14370 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
14371 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
14372
14373 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
14374 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
14375 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
14376 "$ac_tmp/out"`; test -z "$ac_out"; } &&
14377 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
14378 which seems to be undefined. Please make sure it is defined" >&5
14379 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
14380 which seems to be undefined. Please make sure it is defined" >&2;}
14381
14382 rm -f "$ac_tmp/stdin"
14383 case $ac_file in
14384 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
14385 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
14386 esac \
14387 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
14388 ;;
14389 :H)
14390 #
14391 # CONFIG_HEADER
14392 #
14393 if test x"$ac_file" != x-; then
14394 {
14395 $as_echo "/* $configure_input */" \
14396 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
14397 } >"$ac_tmp/config.h" \
14398 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
14399 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
14400 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
14401 $as_echo "$as_me: $ac_file is unchanged" >&6;}
14402 else
14403 rm -f "$ac_file"
14404 mv "$ac_tmp/config.h" "$ac_file" \
14405 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
14406 fi
14407 else
14408 $as_echo "/* $configure_input */" \
14409 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
14410 || as_fn_error $? "could not create -" "$LINENO" 5
14411 fi
14412 # Compute "$ac_file"'s index in $config_headers.
14413 _am_arg="$ac_file"
14414 _am_stamp_count=1
14415 for _am_header in $config_headers :; do
14416 case $_am_header in
14417 $_am_arg | $_am_arg:* )
14418 break ;;
14419 * )
14420 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
14421 esac
14422 done
14423 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
14424 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14425 X"$_am_arg" : 'X\(//\)[^/]' \| \
14426 X"$_am_arg" : 'X\(//\)$' \| \
14427 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
14428 $as_echo X"$_am_arg" |
14429 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14430 s//\1/
14431 q
14432 }
14433 /^X\(\/\/\)[^/].*/{
14434 s//\1/
14435 q
14436 }
14437 /^X\(\/\/\)$/{
14438 s//\1/
14439 q
14440 }
14441 /^X\(\/\).*/{
14442 s//\1/
14443 q
14444 }
14445 s/.*/./; q'`/stamp-h$_am_stamp_count
14446 ;;
14447
14448 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
14449 $as_echo "$as_me: executing $ac_file commands" >&6;}
14450 ;;
14451 esac
14452
14453
14454 case $ac_file$ac_mode in
14455 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
14456 # Older Autoconf quotes --file arguments for eval, but not when files
14457 # are listed without --file. Let's play safe and only enable the eval
14458 # if we detect the quoting.
14459 case $CONFIG_FILES in
14460 *\'*) eval set x "$CONFIG_FILES" ;;
14461 *) set x $CONFIG_FILES ;;
14462 esac
14463 shift
14464 for mf
14465 do
14466 # Strip MF so we end up with the name of the file.
14467 mf=`echo "$mf" | sed -e 's/:.*$//'`
14468 # Check whether this is an Automake generated Makefile or not.
14469 # We used to match only the files named 'Makefile.in', but
14470 # some people rename them; so instead we look at the file content.
14471 # Grep'ing the first line is not enough: some people post-process
14472 # each Makefile.in and add a new line on top of each file to say so.
14473 # Grep'ing the whole file is not good either: AIX grep has a line
14474 # limit of 2048, but all sed's we know have understand at least 4000.
14475 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
14476 dirpart=`$as_dirname -- "$mf" ||
14477 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14478 X"$mf" : 'X\(//\)[^/]' \| \
14479 X"$mf" : 'X\(//\)$' \| \
14480 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
14481 $as_echo X"$mf" |
14482 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14483 s//\1/
14484 q
14485 }
14486 /^X\(\/\/\)[^/].*/{
14487 s//\1/
14488 q
14489 }
14490 /^X\(\/\/\)$/{
14491 s//\1/
14492 q
14493 }
14494 /^X\(\/\).*/{
14495 s//\1/
14496 q
14497 }
14498 s/.*/./; q'`
14499 else
14500 continue
14501 fi
14502 # Extract the definition of DEPDIR, am__include, and am__quote
14503 # from the Makefile without running 'make'.
14504 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
14505 test -z "$DEPDIR" && continue
14506 am__include=`sed -n 's/^am__include = //p' < "$mf"`
14507 test -z "$am__include" && continue
14508 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
14509 # Find all dependency output files, they are included files with
14510 # $(DEPDIR) in their names. We invoke sed twice because it is the
14511 # simplest approach to changing $(DEPDIR) to its actual value in the
14512 # expansion.
14513 for file in `sed -n "
14514 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
14515 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
14516 # Make sure the directory exists.
14517 test -f "$dirpart/$file" && continue
14518 fdir=`$as_dirname -- "$file" ||
14519 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14520 X"$file" : 'X\(//\)[^/]' \| \
14521 X"$file" : 'X\(//\)$' \| \
14522 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
14523 $as_echo X"$file" |
14524 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14525 s//\1/
14526 q
14527 }
14528 /^X\(\/\/\)[^/].*/{
14529 s//\1/
14530 q
14531 }
14532 /^X\(\/\/\)$/{
14533 s//\1/
14534 q
14535 }
14536 /^X\(\/\).*/{
14537 s//\1/
14538 q
14539 }
14540 s/.*/./; q'`
14541 as_dir=$dirpart/$fdir; as_fn_mkdir_p
14542 # echo "creating $dirpart/$file"
14543 echo '# dummy' > "$dirpart/$file"
14544 done
14545 done
14546 }
14547 ;;
14548 "libtool":C)
14549
14550 # See if we are running on zsh, and set the options which allow our
14551 # commands through without removal of \ escapes.
14552 if test -n "${ZSH_VERSION+set}" ; then
14553 setopt NO_GLOB_SUBST
14554 fi
14555
14556 cfgfile="${ofile}T"
14557 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
14558 $RM "$cfgfile"
14559
14560 cat <<_LT_EOF >> "$cfgfile"
14561 #! $SHELL
14562
14563 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
14564 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
14565 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
14566 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
14567 #
14568 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
14569 # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
14570 # Foundation, Inc.
14571 # Written by Gordon Matzigkeit, 1996
14572 #
14573 # This file is part of GNU Libtool.
14574 #
14575 # GNU Libtool is free software; you can redistribute it and/or
14576 # modify it under the terms of the GNU General Public License as
14577 # published by the Free Software Foundation; either version 2 of
14578 # the License, or (at your option) any later version.
14579 #
14580 # As a special exception to the GNU General Public License,
14581 # if you distribute this file as part of a program or library that
14582 # is built using GNU Libtool, you may include this file under the
14583 # same distribution terms that you use for the rest of that program.
14584 #
14585 # GNU Libtool is distributed in the hope that it will be useful,
14586 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14587 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14588 # GNU General Public License for more details.
14589 #
14590 # You should have received a copy of the GNU General Public License
14591 # along with GNU Libtool; see the file COPYING. If not, a copy
14592 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
14593 # obtained by writing to the Free Software Foundation, Inc.,
14594 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
14595
14596
14597 # The names of the tagged configurations supported by this script.
14598 available_tags=""
14599
14600 # ### BEGIN LIBTOOL CONFIG
14601
14602 # Which release of libtool.m4 was used?
14603 macro_version=$macro_version
14604 macro_revision=$macro_revision
14605
14606 # Whether or not to build shared libraries.
14607 build_libtool_libs=$enable_shared
14608
14609 # Whether or not to build static libraries.
14610 build_old_libs=$enable_static
14611
14612 # What type of objects to build.
14613 pic_mode=$pic_mode
14614
14615 # Whether or not to optimize for fast installation.
14616 fast_install=$enable_fast_install
14617
14618 # Shell to use when invoking shell scripts.
14619 SHELL=$lt_SHELL
14620
14621 # An echo program that protects backslashes.
14622 ECHO=$lt_ECHO
14623
14624 # The PATH separator for the build system.
14625 PATH_SEPARATOR=$lt_PATH_SEPARATOR
14626
14627 # The host system.
14628 host_alias=$host_alias
14629 host=$host
14630 host_os=$host_os
14631
14632 # The build system.
14633 build_alias=$build_alias
14634 build=$build
14635 build_os=$build_os
14636
14637 # A sed program that does not truncate output.
14638 SED=$lt_SED
14639
14640 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
14641 Xsed="\$SED -e 1s/^X//"
14642
14643 # A grep program that handles long lines.
14644 GREP=$lt_GREP
14645
14646 # An ERE matcher.
14647 EGREP=$lt_EGREP
14648
14649 # A literal string matcher.
14650 FGREP=$lt_FGREP
14651
14652 # A BSD- or MS-compatible name lister.
14653 NM=$lt_NM
14654
14655 # Whether we need soft or hard links.
14656 LN_S=$lt_LN_S
14657
14658 # What is the maximum length of a command?
14659 max_cmd_len=$max_cmd_len
14660
14661 # Object file suffix (normally "o").
14662 objext=$ac_objext
14663
14664 # Executable file suffix (normally "").
14665 exeext=$exeext
14666
14667 # whether the shell understands "unset".
14668 lt_unset=$lt_unset
14669
14670 # turn spaces into newlines.
14671 SP2NL=$lt_lt_SP2NL
14672
14673 # turn newlines into spaces.
14674 NL2SP=$lt_lt_NL2SP
14675
14676 # convert \$build file names to \$host format.
14677 to_host_file_cmd=$lt_cv_to_host_file_cmd
14678
14679 # convert \$build files to toolchain format.
14680 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
14681
14682 # An object symbol dumper.
14683 OBJDUMP=$lt_OBJDUMP
14684
14685 # Method to check whether dependent libraries are shared objects.
14686 deplibs_check_method=$lt_deplibs_check_method
14687
14688 # Command to use when deplibs_check_method = "file_magic".
14689 file_magic_cmd=$lt_file_magic_cmd
14690
14691 # How to find potential files when deplibs_check_method = "file_magic".
14692 file_magic_glob=$lt_file_magic_glob
14693
14694 # Find potential files using nocaseglob when deplibs_check_method = "file_magic".
14695 want_nocaseglob=$lt_want_nocaseglob
14696
14697 # DLL creation program.
14698 DLLTOOL=$lt_DLLTOOL
14699
14700 # Command to associate shared and link libraries.
14701 sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
14702
14703 # The archiver.
14704 AR=$lt_AR
14705
14706 # Flags to create an archive.
14707 AR_FLAGS=$lt_AR_FLAGS
14708
14709 # How to feed a file listing to the archiver.
14710 archiver_list_spec=$lt_archiver_list_spec
14711
14712 # A symbol stripping program.
14713 STRIP=$lt_STRIP
14714
14715 # Commands used to install an old-style archive.
14716 RANLIB=$lt_RANLIB
14717 old_postinstall_cmds=$lt_old_postinstall_cmds
14718 old_postuninstall_cmds=$lt_old_postuninstall_cmds
14719
14720 # Whether to use a lock for old archive extraction.
14721 lock_old_archive_extraction=$lock_old_archive_extraction
14722
14723 # A C compiler.
14724 LTCC=$lt_CC
14725
14726 # LTCC compiler flags.
14727 LTCFLAGS=$lt_CFLAGS
14728
14729 # Take the output of nm and produce a listing of raw symbols and C names.
14730 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
14731
14732 # Transform the output of nm in a proper C declaration.
14733 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
14734
14735 # Transform the output of nm in a C name address pair.
14736 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
14737
14738 # Transform the output of nm in a C name address pair when lib prefix is needed.
14739 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
14740
14741 # Specify filename containing input files for \$NM.
14742 nm_file_list_spec=$lt_nm_file_list_spec
14743
14744 # The root where to search for dependent libraries,and in which our libraries should be installed.
14745 lt_sysroot=$lt_sysroot
14746
14747 # The name of the directory that contains temporary libtool files.
14748 objdir=$objdir
14749
14750 # Used to examine libraries when file_magic_cmd begins with "file".
14751 MAGIC_CMD=$MAGIC_CMD
14752
14753 # Must we lock files when doing compilation?
14754 need_locks=$lt_need_locks
14755
14756 # Manifest tool.
14757 MANIFEST_TOOL=$lt_MANIFEST_TOOL
14758
14759 # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
14760 DSYMUTIL=$lt_DSYMUTIL
14761
14762 # Tool to change global to local symbols on Mac OS X.
14763 NMEDIT=$lt_NMEDIT
14764
14765 # Tool to manipulate fat objects and archives on Mac OS X.
14766 LIPO=$lt_LIPO
14767
14768 # ldd/readelf like tool for Mach-O binaries on Mac OS X.
14769 OTOOL=$lt_OTOOL
14770
14771 # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
14772 OTOOL64=$lt_OTOOL64
14773
14774 # Old archive suffix (normally "a").
14775 libext=$libext
14776
14777 # Shared library suffix (normally ".so").
14778 shrext_cmds=$lt_shrext_cmds
14779
14780 # The commands to extract the exported symbol list from a shared archive.
14781 extract_expsyms_cmds=$lt_extract_expsyms_cmds
14782
14783 # Variables whose values should be saved in libtool wrapper scripts and
14784 # restored at link time.
14785 variables_saved_for_relink=$lt_variables_saved_for_relink
14786
14787 # Do we need the "lib" prefix for modules?
14788 need_lib_prefix=$need_lib_prefix
14789
14790 # Do we need a version for libraries?
14791 need_version=$need_version
14792
14793 # Library versioning type.
14794 version_type=$version_type
14795
14796 # Shared library runtime path variable.
14797 runpath_var=$runpath_var
14798
14799 # Shared library path variable.
14800 shlibpath_var=$shlibpath_var
14801
14802 # Is shlibpath searched before the hard-coded library search path?
14803 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
14804
14805 # Format of library name prefix.
14806 libname_spec=$lt_libname_spec
14807
14808 # List of archive names. First name is the real one, the rest are links.
14809 # The last name is the one that the linker finds with -lNAME
14810 library_names_spec=$lt_library_names_spec
14811
14812 # The coded name of the library, if different from the real name.
14813 soname_spec=$lt_soname_spec
14814
14815 # Permission mode override for installation of shared libraries.
14816 install_override_mode=$lt_install_override_mode
14817
14818 # Command to use after installation of a shared archive.
14819 postinstall_cmds=$lt_postinstall_cmds
14820
14821 # Command to use after uninstallation of a shared archive.
14822 postuninstall_cmds=$lt_postuninstall_cmds
14823
14824 # Commands used to finish a libtool library installation in a directory.
14825 finish_cmds=$lt_finish_cmds
14826
14827 # As "finish_cmds", except a single script fragment to be evaled but
14828 # not shown.
14829 finish_eval=$lt_finish_eval
14830
14831 # Whether we should hardcode library paths into libraries.
14832 hardcode_into_libs=$hardcode_into_libs
14833
14834 # Compile-time system search path for libraries.
14835 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
14836
14837 # Run-time system search path for libraries.
14838 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
14839
14840 # Whether dlopen is supported.
14841 dlopen_support=$enable_dlopen
14842
14843 # Whether dlopen of programs is supported.
14844 dlopen_self=$enable_dlopen_self
14845
14846 # Whether dlopen of statically linked programs is supported.
14847 dlopen_self_static=$enable_dlopen_self_static
14848
14849 # Commands to strip libraries.
14850 old_striplib=$lt_old_striplib
14851 striplib=$lt_striplib
14852
14853
14854 # The linker used to build libraries.
14855 LD=$lt_LD
14856
14857 # How to create reloadable object files.
14858 reload_flag=$lt_reload_flag
14859 reload_cmds=$lt_reload_cmds
14860
14861 # Commands used to build an old-style archive.
14862 old_archive_cmds=$lt_old_archive_cmds
14863
14864 # A language specific compiler.
14865 CC=$lt_compiler
14866
14867 # Is the compiler the GNU compiler?
14868 with_gcc=$GCC
14869
14870 # Compiler flag to turn off builtin functions.
14871 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
14872
14873 # Additional compiler flags for building library objects.
14874 pic_flag=$lt_lt_prog_compiler_pic
14875
14876 # How to pass a linker flag through the compiler.
14877 wl=$lt_lt_prog_compiler_wl
14878
14879 # Compiler flag to prevent dynamic linking.
14880 link_static_flag=$lt_lt_prog_compiler_static
14881
14882 # Does compiler simultaneously support -c and -o options?
14883 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
14884
14885 # Whether or not to add -lc for building shared libraries.
14886 build_libtool_need_lc=$archive_cmds_need_lc
14887
14888 # Whether or not to disallow shared libs when runtime libs are static.
14889 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
14890
14891 # Compiler flag to allow reflexive dlopens.
14892 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
14893
14894 # Compiler flag to generate shared objects directly from archives.
14895 whole_archive_flag_spec=$lt_whole_archive_flag_spec
14896
14897 # Whether the compiler copes with passing no objects directly.
14898 compiler_needs_object=$lt_compiler_needs_object
14899
14900 # Create an old-style archive from a shared archive.
14901 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
14902
14903 # Create a temporary old-style archive to link instead of a shared archive.
14904 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
14905
14906 # Commands used to build a shared archive.
14907 archive_cmds=$lt_archive_cmds
14908 archive_expsym_cmds=$lt_archive_expsym_cmds
14909
14910 # Commands used to build a loadable module if different from building
14911 # a shared archive.
14912 module_cmds=$lt_module_cmds
14913 module_expsym_cmds=$lt_module_expsym_cmds
14914
14915 # Whether we are building with GNU ld or not.
14916 with_gnu_ld=$lt_with_gnu_ld
14917
14918 # Flag that allows shared libraries with undefined symbols to be built.
14919 allow_undefined_flag=$lt_allow_undefined_flag
14920
14921 # Flag that enforces no undefined symbols.
14922 no_undefined_flag=$lt_no_undefined_flag
14923
14924 # Flag to hardcode \$libdir into a binary during linking.
14925 # This must work even if \$libdir does not exist
14926 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
14927
14928 # Whether we need a single "-rpath" flag with a separated argument.
14929 hardcode_libdir_separator=$lt_hardcode_libdir_separator
14930
14931 # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
14932 # DIR into the resulting binary.
14933 hardcode_direct=$hardcode_direct
14934
14935 # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
14936 # DIR into the resulting binary and the resulting library dependency is
14937 # "absolute",i.e impossible to change by setting \${shlibpath_var} if the
14938 # library is relocated.
14939 hardcode_direct_absolute=$hardcode_direct_absolute
14940
14941 # Set to "yes" if using the -LDIR flag during linking hardcodes DIR
14942 # into the resulting binary.
14943 hardcode_minus_L=$hardcode_minus_L
14944
14945 # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
14946 # into the resulting binary.
14947 hardcode_shlibpath_var=$hardcode_shlibpath_var
14948
14949 # Set to "yes" if building a shared library automatically hardcodes DIR
14950 # into the library and all subsequent libraries and executables linked
14951 # against it.
14952 hardcode_automatic=$hardcode_automatic
14953
14954 # Set to yes if linker adds runtime paths of dependent libraries
14955 # to runtime path list.
14956 inherit_rpath=$inherit_rpath
14957
14958 # Whether libtool must link a program against all its dependency libraries.
14959 link_all_deplibs=$link_all_deplibs
14960
14961 # Set to "yes" if exported symbols are required.
14962 always_export_symbols=$always_export_symbols
14963
14964 # The commands to list exported symbols.
14965 export_symbols_cmds=$lt_export_symbols_cmds
14966
14967 # Symbols that should not be listed in the preloaded symbols.
14968 exclude_expsyms=$lt_exclude_expsyms
14969
14970 # Symbols that must always be exported.
14971 include_expsyms=$lt_include_expsyms
14972
14973 # Commands necessary for linking programs (against libraries) with templates.
14974 prelink_cmds=$lt_prelink_cmds
14975
14976 # Commands necessary for finishing linking programs.
14977 postlink_cmds=$lt_postlink_cmds
14978
14979 # Specify filename containing input files.
14980 file_list_spec=$lt_file_list_spec
14981
14982 # How to hardcode a shared library path into an executable.
14983 hardcode_action=$hardcode_action
14984
14985 # ### END LIBTOOL CONFIG
14986
14987 _LT_EOF
14988
14989 case $host_os in
14990 aix3*)
14991 cat <<\_LT_EOF >> "$cfgfile"
14992 # AIX sometimes has problems with the GCC collect2 program. For some
14993 # reason, if we set the COLLECT_NAMES environment variable, the problems
14994 # vanish in a puff of smoke.
14995 if test "X${COLLECT_NAMES+set}" != Xset; then
14996 COLLECT_NAMES=
14997 export COLLECT_NAMES
14998 fi
14999 _LT_EOF
15000 ;;
15001 esac
15002
15003
15004 ltmain="$ac_aux_dir/ltmain.sh"
15005
15006
15007 # We use sed instead of cat because bash on DJGPP gets confused if
15008 # if finds mixed CR/LF and LF-only lines. Since sed operates in
15009 # text mode, it properly converts lines to CR/LF. This bash problem
15010 # is reportedly fixed, but why not run on old versions too?
15011 sed '$q' "$ltmain" >> "$cfgfile" \
15012 || (rm -f "$cfgfile"; exit 1)
15013
15014 if test x"$xsi_shell" = xyes; then
15015 sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
15016 func_dirname ()\
15017 {\
15018 \ case ${1} in\
15019 \ */*) func_dirname_result="${1%/*}${2}" ;;\
15020 \ * ) func_dirname_result="${3}" ;;\
15021 \ esac\
15022 } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
15023 && mv -f "$cfgfile.tmp" "$cfgfile" \
15024 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
15025 test 0 -eq $? || _lt_function_replace_fail=:
15026
15027
15028 sed -e '/^func_basename ()$/,/^} # func_basename /c\
15029 func_basename ()\
15030 {\
15031 \ func_basename_result="${1##*/}"\
15032 } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
15033 && mv -f "$cfgfile.tmp" "$cfgfile" \
15034 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
15035 test 0 -eq $? || _lt_function_replace_fail=:
15036
15037
15038 sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
15039 func_dirname_and_basename ()\
15040 {\
15041 \ case ${1} in\
15042 \ */*) func_dirname_result="${1%/*}${2}" ;;\
15043 \ * ) func_dirname_result="${3}" ;;\
15044 \ esac\
15045 \ func_basename_result="${1##*/}"\
15046 } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
15047 && mv -f "$cfgfile.tmp" "$cfgfile" \
15048 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
15049 test 0 -eq $? || _lt_function_replace_fail=:
15050
15051
15052 sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
15053 func_stripname ()\
15054 {\
15055 \ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
15056 \ # positional parameters, so assign one to ordinary parameter first.\
15057 \ func_stripname_result=${3}\
15058 \ func_stripname_result=${func_stripname_result#"${1}"}\
15059 \ func_stripname_result=${func_stripname_result%"${2}"}\
15060 } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
15061 && mv -f "$cfgfile.tmp" "$cfgfile" \
15062 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
15063 test 0 -eq $? || _lt_function_replace_fail=:
15064
15065
15066 sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
15067 func_split_long_opt ()\
15068 {\
15069 \ func_split_long_opt_name=${1%%=*}\
15070 \ func_split_long_opt_arg=${1#*=}\
15071 } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
15072 && mv -f "$cfgfile.tmp" "$cfgfile" \
15073 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
15074 test 0 -eq $? || _lt_function_replace_fail=:
15075
15076
15077 sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
15078 func_split_short_opt ()\
15079 {\
15080 \ func_split_short_opt_arg=${1#??}\
15081 \ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
15082 } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
15083 && mv -f "$cfgfile.tmp" "$cfgfile" \
15084 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
15085 test 0 -eq $? || _lt_function_replace_fail=:
15086
15087
15088 sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
15089 func_lo2o ()\
15090 {\
15091 \ case ${1} in\
15092 \ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
15093 \ *) func_lo2o_result=${1} ;;\
15094 \ esac\
15095 } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
15096 && mv -f "$cfgfile.tmp" "$cfgfile" \
15097 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
15098 test 0 -eq $? || _lt_function_replace_fail=:
15099
15100
15101 sed -e '/^func_xform ()$/,/^} # func_xform /c\
15102 func_xform ()\
15103 {\
15104 func_xform_result=${1%.*}.lo\
15105 } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
15106 && mv -f "$cfgfile.tmp" "$cfgfile" \
15107 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
15108 test 0 -eq $? || _lt_function_replace_fail=:
15109
15110
15111 sed -e '/^func_arith ()$/,/^} # func_arith /c\
15112 func_arith ()\
15113 {\
15114 func_arith_result=$(( $* ))\
15115 } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
15116 && mv -f "$cfgfile.tmp" "$cfgfile" \
15117 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
15118 test 0 -eq $? || _lt_function_replace_fail=:
15119
15120
15121 sed -e '/^func_len ()$/,/^} # func_len /c\
15122 func_len ()\
15123 {\
15124 func_len_result=${#1}\
15125 } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
15126 && mv -f "$cfgfile.tmp" "$cfgfile" \
15127 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
15128 test 0 -eq $? || _lt_function_replace_fail=:
15129
15130 fi
15131
15132 if test x"$lt_shell_append" = xyes; then
15133 sed -e '/^func_append ()$/,/^} # func_append /c\
15134 func_append ()\
15135 {\
15136 eval "${1}+=\\${2}"\
15137 } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
15138 && mv -f "$cfgfile.tmp" "$cfgfile" \
15139 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
15140 test 0 -eq $? || _lt_function_replace_fail=:
15141
15142
15143 sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
15144 func_append_quoted ()\
15145 {\
15146 \ func_quote_for_eval "${2}"\
15147 \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
15148 } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
15149 && mv -f "$cfgfile.tmp" "$cfgfile" \
15150 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
15151 test 0 -eq $? || _lt_function_replace_fail=:
15152
15153
15154 # Save a `func_append' function call where possible by direct use of '+='
15155 sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
15156 && mv -f "$cfgfile.tmp" "$cfgfile" \
15157 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
15158 test 0 -eq $? || _lt_function_replace_fail=:
15159 else
15160 # Save a `func_append' function call even when '+=' is not available
15161 sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
15162 && mv -f "$cfgfile.tmp" "$cfgfile" \
15163 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
15164 test 0 -eq $? || _lt_function_replace_fail=:
15165 fi
15166
15167 if test x"$_lt_function_replace_fail" = x":"; then
15168 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
15169 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
15170 fi
15171
15172
15173 mv -f "$cfgfile" "$ofile" ||
15174 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
15175 chmod +x "$ofile"
15176
15177 ;;
15178
15179 esac
15180 done # for ac_tag
15181
15182
15183 as_fn_exit 0
15184 _ACEOF
15185 ac_clean_files=$ac_clean_files_save
15186
15187 test $ac_write_fail = 0 ||
15188 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
15189
15190
15191 # configure is writing to config.log, and then calls config.status.
15192 # config.status does its own redirection, appending to config.log.
15193 # Unfortunately, on DOS this fails, as config.log is still kept open
15194 # by configure, so config.status won't be able to write to it; its
15195 # output is simply discarded. So we exec the FD to /dev/null,
15196 # effectively closing config.log, so it can be properly (re)opened and
15197 # appended to by config.status. When coming back to configure, we
15198 # need to make the FD available again.
15199 if test "$no_create" != yes; then
15200 ac_cs_success=:
15201 ac_config_status_args=
15202 test "$silent" = yes &&
15203 ac_config_status_args="$ac_config_status_args --quiet"
15204 exec 5>/dev/null
15205 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
15206 exec 5>>config.log
15207 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15208 # would make configure fail if this is the last instruction.
15209 $ac_cs_success || as_fn_exit 1
15210 fi
15211 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15212 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15213 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
15214 fi
15215
+0
-133
configure.ac less more
0 AC_INIT([argyll], [1.3.7])
1 AM_INIT_AUTOMAKE([1.9 foreign])
2
3 AC_PROG_CC
4 LT_INIT
5 AC_PROG_INSTALL
6
7 AM_PROG_LIBTOOL
8 AC_PROG_LIBTOOL
9
10 AC_CONFIG_MACRO_DIR([m4])
11 AM_CONFIG_HEADER([config.h])
12
13 AC_PATH_XTRA
14
15 AC_CHECK_LIB(m, sqrt)
16 AC_CHECK_LIB(pthread, pthread_create)
17
18 AC_CHECK_LIB(tiff, TIFFOpen, TIFF_LIBS="-ltiff", , -lm)
19 AC_SUBST([TIFF_LIBS])
20
21 AC_CHECK_LIB(rt, clock_gettime)
22
23 AC_ARG_WITH(system-libicc, [ --with-system-libicc use system libicc instead of argyllcms copy],system_libicc=$withval,system_libicc=no)
24 AC_MSG_CHECKING([whether to use system libicc or not])
25 if test x$system_libicc = xno ; then
26 HAVE_ICC=false
27 AC_MSG_RESULT(no)
28 else
29 AC_MSG_RESULT(yes)
30 AC_CHECK_LIB(icc, new_icmFileStd_name, HAVE_ICC="true", , -lm)
31 if test "$HAVE_ICC" != "true" ; then
32 AC_MSG_ERROR([system libicc missing or not compatible with argyllcms])
33 fi
34 fi
35 if test "$HAVE_ICC" = "true" ; then
36 ICC_LIBS="-licc"
37 else
38 ICC_LIBS='$(top_srcdir)/icc/libicc.la'
39 ICC_CFLAGS='-I$(top_srcdir)/icc'
40 ICC_SUBDIRS='icc'
41 fi
42 AC_SUBST([ICC_LIBS])
43 AC_SUBST([ICC_CFLAGS])
44 AC_SUBST([ICC_SUBDIRS])
45
46 AC_ARG_WITH(system-libyajl, [ --with-system-libyajl use system libyajl instead of argyllcms copy],system_libyajl=$withval,system_libyajl=no)
47 AC_MSG_CHECKING([whether to use system libyajl or not])
48 if test x$system_libyajl = xno ; then
49 HAVE_YAJL=false
50 AC_MSG_RESULT(no)
51 else
52 AC_MSG_RESULT(yes)
53 AC_CHECK_LIB(yajl, yajl_gen_c_comment, HAVE_YAJL="true", , -lm)
54 if test "$HAVE_YAJL" != "true" ; then
55 AC_MSG_ERROR([system libyajl missing or not compatible with argyllcms])
56 fi
57 fi
58 if test "$HAVE_YAJL" = "true" ; then
59 YAJL_LIBS="-lyajl"
60 else
61 YAJL_LIBS='$(top_srcdir)/jcnf/yajl/libyajl.la'
62 YAJL_CFLAGS='-I$(top_srcdir)/jcnf/yajl'
63 YAJL_SUBDIRS='yajl'
64 fi
65 AC_SUBST([YAJL_LIBS])
66 AC_SUBST([YAJL_CFLAGS])
67 AC_SUBST([YAJL_SUBDIRS])
68
69 AC_CHECK_LIB(X11, XOpenDisplay, X_LIBS="$X_LIBS -lX11")
70 AC_CHECK_LIB(Xext, XextFindDisplay, X_LIBS="$X_LIBS -lXext",,-lX11)
71 AC_CHECK_LIB(Xss, XScreenSaverSuspend, X_LIBS="$X_LIBS -lXss",,-lXext -lX11)
72 AC_CHECK_LIB(Xrandr, XRRRootToScreen, X_LIBS="$X_LIBS -lXrandr",,-LXext -lX11)
73 AC_CHECK_LIB(Xinerama, XineramaQueryScreens, X_LIBS="$X_LIBS -lXinerama",,-LXext -lX11)
74 AC_CHECK_LIB(Xxf86vm, XF86VidModeGetGamma, X_LIBS="$X_LIBS -lXxf86vm",,-lXext -lX11)
75 AC_SUBST([X_LIBS])
76
77 AC_SUBST(OS_LINUX)
78 AC_SUBST(OS_BSD)
79 case $host in
80 *-linux*)
81 OS_LINUX=1
82 OS_BSD=0
83 AC_DEFINE([OS_LINUX],[1],[Linux kernel])
84 AM_CONDITIONAL([OS_LINUX],[true])
85 ;;
86 *-freebsd*|*-kfreebsd*-gnu|*-openbsd*|*-netbsd*)
87 OS_LINUX=0
88 OS_BSD=1
89 AC_DEFINE([OS_LINUX],[0],[Linux kernel])
90 AM_CONDITIONAL([OS_LINUX],[false])
91 ;;
92 *)
93 OS_LINUX=0
94 OS_BSD=0
95 AC_DEFINE([OS_LINUX],[0],[Linux kernel])
96 AM_CONDITIONAL([OS_LINUX],[false])
97 ;;
98 esac
99 AC_DEFINE([API_EXPORTED],[],[Default visibility])
100
101 AC_C_BIGENDIAN
102 if test "$ac_cv_c_bigendian" = "yes"; then
103 BIGENDIAN="1"
104 else
105 BIGENDIAN="0"
106 fi
107 AC_SUBST(BIGENDIAN)
108
109 AC_CONFIG_FILES([Makefile
110 h/Makefile
111 doc/Makefile
112 ref/Makefile
113 numlib/Makefile
114 cgats/Makefile
115 plot/Makefile
116 rspl/Makefile
117 icc/Makefile
118 gamut/Makefile
119 xicc/Makefile
120 link/Makefile
121 spectro/Makefile
122 profile/Makefile
123 tweak/Makefile
124 scanin/Makefile
125 render/Makefile
126 target/Makefile
127 imdi/Makefile
128 jcnf/Makefile
129 jcnf/yajl/Makefile
130 ucmm/Makefile])
131
132 AC_OUTPUT
+0
-8
debian/README.Debian less more
0 Notes for argyll as packaged in Debian:
1 ---------------------------------------
2
3 * Four binaries with a very generic name (average, refine, targen and
4 verify) have been renamed to argyll-* in order to prevent naming
5 collisions.
6
7 -- Roland Mas <lolando@debian.org>, Thu, 19 Feb 2009 20:34:17 +0100
+0
-36
debian/README.Spyder2 less more
0 Note for users of the ColorVision Spyder2:
1 ------------------------------------------
2
3 The Spyder2 device doesn't work "out of the box" because it needs
4 firmware to be loaded into it. That firmware is proprietary and
5 cannot be distributed within Debian, but Argyll provides a tool to
6 extract that firmware from the driver CD provided with the device.
7
8 If you're only using your Spyder2 on one computer, then all you need
9 to do is run the "spyd2en -S l" utility (as root) while the driver CD
10 is mounted. spyd2en looks for the CD in a few typical mount points
11 (/media/ColorVision, /mnt/cdrom, /media/cdrom, /cdrom). If your CD is
12 mounted somewhere else, just add the location of the "setup.exe" file,
13 for instance "spyd2en -S l /mnt/tmp/setup/setup.exe". In both cases,
14 the firmware will be extracted and stored into
15 /usr/share/color/spyd2PLD.bin, where the other utilities will be able
16 to look for it when needed. You're done!
17
18 If you use the Spyder2 on several computers, and don't want to carry
19 the CD and perform the same operation on all, you might like to
20 generate a Debian package containing the firmware on one computer, and
21 install that package on the others. A source package is provided in
22 /usr/share/doc/argyll/examples/spyder2.tar.gz. Here's the procedure
23 for the first computer:
24
25 - first, extract the firmware with spyd2en (as above);
26 - then, apt-get install debhelper fakeroot build-essential;
27 - uncompress the spyder2.tar.gz archive somewhere;
28 you'll get a argyll-firmware-spyder2 directory;
29 - in that directory, run "fakeroot debian/rules binary clean";
30 - you should get a .deb in the parent directory.
31
32 You can then copy that .deb file to other computers and install it
33 with "dpkg -i argyll-firmware-spyder2_1.1_all.deb". You're done!
34
35 -- Roland Mas <lolando@debian.org>, Thu, 05 Aug 2010 15:44:23 +0200
+0
-59
debian/applycal.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH APPLY "1" "August 2013" "Apply device calibration to an ICC profile, Version 1.5.1" "User Commands"
2 .SH NAME
3 Apply \- Apply device calibration to an ICC profile.
4 .SH DESCRIPTION
5 Apply device calibration to an ICC profile, Version 1.5.1
6 Author: Graeme W. Gill, licensed under the AGPL Version 3
7 .IP
8 Diagnostic: Too few arguments
9 .PP
10 usage: applycal [\-options] [calfile.cal] inprof.icc [outprof.icc]
11 .TP
12 \fB\-v\fR
13 Verbose mode
14 .TP
15 \fB\-a\fR
16 Apply or re\-apply calibration (default)
17 .TP
18 \fB\-u\fR
19 Remove calibration
20 .TP
21 \fB\-c\fR
22 Check calibration
23 .TP
24 calfile.cal
25 Calibration file to apply
26 .TP
27 inprof.icc
28 ICC profile to read
29 .TP
30 outprof.icc
31 modified ICC profile to write
32 .PP
33 Author: Graeme W. Gill, licensed under the AGPL Version 3
34 .IP
35 Diagnostic: Too few arguments
36 .PP
37 usage: applycal [\-options] [calfile.cal] inprof.icc [outprof.icc]
38 .TP
39 \fB\-v\fR
40 Verbose mode
41 .TP
42 \fB\-a\fR
43 Apply or re\-apply calibration (default)
44 .TP
45 \fB\-u\fR
46 Remove calibration
47 .TP
48 \fB\-c\fR
49 Check calibration
50 .TP
51 calfile.cal
52 Calibration file to apply
53 .TP
54 inprof.icc
55 ICC profile to read
56 .TP
57 outprof.icc
58 modified ICC profile to write
+0
-1
debian/argyll.examples less more
0 firmware-package-builder/spyder2.tar.gz
+0
-50
debian/argyll.install less more
0 usb/55-Argyll.rules lib/udev/rules.d/
1 usb/Argyll.usermap etc/hotplug/usb
2 usr/bin/applycal
3 usr/bin/average
4 usr/bin/cb2ti3
5 usr/bin/cctiff
6 usr/bin/ccttest
7 usr/bin/ccxxmake
8 usr/bin/chartread
9 usr/bin/collink
10 usr/bin/colprof
11 usr/bin/dispcal
12 usr/bin/dispread
13 usr/bin/dispwin
14 usr/bin/extracticc
15 usr/bin/extractttag
16 usr/bin/fakeCMY
17 usr/bin/fakeread
18 usr/bin/greytiff
19 usr/bin/iccgamut
20 usr/bin/illumread
21 usr/bin/invprofcheck
22 usr/bin/kodak2ti3
23 usr/bin/mppcheck
24 usr/bin/mpplu
25 usr/bin/mppprof
26 usr/bin/pathplot
27 usr/bin/printcal
28 usr/bin/printtarg
29 usr/bin/profcheck
30 usr/bin/refine
31 usr/bin/revfix
32 usr/bin/scanin
33 usr/bin/simpprof
34 usr/bin/spec2cie
35 usr/bin/specplot
36 usr/bin/splitti3
37 usr/bin/spotread
38 usr/bin/synthcal
39 usr/bin/synthread
40 usr/bin/targen
41 usr/bin/tiffgamut
42 usr/bin/txt2ti3
43 usr/bin/verify
44 usr/bin/viewgam
45 usr/bin/xicclu
46 usr/lib/*/argyll/*
47 usr/share/color/argyll/ref/*
48 usr/share/doc/argyll/*
49 usr/bin/oeminst
+0
-45
debian/argyll.manpages less more
0 debian/applycal.1
1 debian/average.1
2 debian/cb2ti3.1
3 debian/cctiff.1
4 debian/ccttest.1
5 debian/ccxxmake.1
6 debian/chartread.1
7 debian/collink.1
8 debian/colprof.1
9 debian/dispcal.1
10 debian/dispread.1
11 debian/dispwin.1
12 debian/extracticc.1
13 debian/extractttag.1
14 debian/fakeCMY.1
15 debian/fakeread.1
16 debian/greytiff.1
17 debian/iccgamut.1
18 debian/illumread.1
19 debian/invprofcheck.1
20 debian/kodak2ti3.1
21 debian/mppcheck.1
22 debian/mpplu.1
23 debian/mppprof.1
24 debian/oeminst.1
25 debian/pathplot.1
26 debian/printcal.1
27 debian/printtarg.1
28 debian/profcheck.1
29 debian/refine.1
30 debian/revfix.1
31 debian/scanin.1
32 debian/simpprof.1
33 debian/spec2cie.1
34 debian/specplot.1
35 debian/splitti3.1
36 debian/spotread.1
37 debian/synthcal.1
38 debian/synthread.1
39 debian/targen.1
40 debian/tiffgamut.1
41 debian/txt2ti3.1
42 debian/verify.1
43 debian/viewgam.1
44 debian/xicclu.1
+0
-35
debian/argyll.postrm less more
0 #! /bin/sh
1 # postrm script for argyll
2 #
3 # see: dh_installdeb(1)
4
5 set -e
6
7 # summary of how this script can be called:
8 # * <postrm> `remove'
9 # * <postrm> `purge'
10 # * <old-postrm> `upgrade' <new-version>
11 # * <new-postrm> `failed-upgrade' <old-version>
12 # * <new-postrm> `abort-install'
13 # * <new-postrm> `abort-install' <old-version>
14 # * <new-postrm> `abort-upgrade' <old-version>
15 # * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
16 # for details, see /usr/share/doc/packaging-manual/
17
18 case "$1" in
19 purge)
20 rm -rf /var/lib/argyll
21 ;;
22 remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
23 ;;
24
25 *)
26 echo "postrm called with unknown argument \`$1'" >&2
27 exit 0
28
29 esac
30
31 # dh_installdeb will replace this with shell code automatically
32 # generated by other debhelper scripts.
33
34 #DEBHELPER#
+0
-57
debian/argyll.preinst less more
0 #!/bin/sh
1 # preinst script for #PACKAGE#
2 #
3 # see: dh_installdeb(1)
4
5 set -e
6
7 # summary of how this script can be called:
8 # * <new-preinst> `install'
9 # * <new-preinst> `install' <old-version>
10 # * <new-preinst> `upgrade' <old-version>
11 # * <old-preinst> `abort-upgrade' <new-version>
12 # for details, see http://www.debian.org/doc/debian-policy/ or
13 # the debian-policy package
14
15 # Remove a no-longer used conffile
16 rm_conffile() {
17 local PKGNAME="$1"
18 local CONFFILE="$2"
19
20 [ -e "$CONFFILE" ] || return 0
21
22 local md5sum="$(md5sum $CONFFILE | sed -e 's/ .*//')"
23 local old_md5sum="$(dpkg-query -W -f='${Conffiles}' $PKGNAME | \
24 sed -n -e "\' $CONFFILE ' { s/ obsolete$//; s/.* //; p }")"
25 if [ "$md5sum" != "$old_md5sum" ]; then
26 echo "Obsolete conffile $CONFFILE has been modified by you."
27 echo "Saving as $CONFFILE.dpkg-bak ..."
28 mv -f "$CONFFILE" "$CONFFILE".dpkg-bak
29 else
30 echo "Removing obsolete conffile $CONFFILE ..."
31 rm -f "$CONFFILE"
32 fi
33 }
34
35 case "$1" in
36 install|upgrade)
37 if dpkg --compare-versions "$2" le "1.1.0-3"; then
38 rm_conffile argyll "/etc/udev/permissions.d/10-Argyll.permissions"
39 rm_conffile argyll "/etc/udev/rules.d/45-Argyll.rules"
40 rm_conffile argyll "/etc/udev/rules.d/55-Argyll.rules"
41 fi
42 ;;
43 abort-upgrade)
44 ;;
45 *)
46 echo "preinst called with unknown argument \`$1'" >&2
47 exit 1
48 ;;
49 esac
50
51 # dh_installdeb will replace this with shell code automatically
52 # generated by other debhelper scripts.
53
54 #DEBHELPER#
55
56 exit 0
+0
-52
debian/average.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH AVERAGE "1" "August 2013" "Average or merge values in .ti3 like files, Version 1.5.1" "User Commands"
2 .SH NAME
3 Average \- Average or merge values in .ti3 like files.
4 .SH DESCRIPTION
5 Average or merge values in .ti3 like files, Version 1.5.1
6 .IP
7 Diagnostic: Too few arguments (1, minimum is 2)
8 .PP
9 Author: Graeme W. Gill, licensed under the AGPL Version 3
10 usage: average [\-options] input1.ti3 input2.ti3 ... output.ti3
11 .TP
12 \fB\-v\fR
13 Verbose
14 .TP
15 \fB\-m\fR
16 Merge rather than average
17 .TP
18 input1.ti3
19 First input file
20 .TP
21 input2.ti3
22 Second input file
23 .TP
24 \&...
25 etc.
26 .TP
27 output.ti3
28 Resulting averaged or merged output file
29 .IP
30 Diagnostic: Too few arguments (1, minimum is 2)
31 .PP
32 Author: Graeme W. Gill, licensed under the AGPL Version 3
33 usage: average [\-options] input1.ti3 input2.ti3 ... output.ti3
34 .TP
35 \fB\-v\fR
36 Verbose
37 .TP
38 \fB\-m\fR
39 Merge rather than average
40 .TP
41 input1.ti3
42 First input file
43 .TP
44 input2.ti3
45 Second input file
46 .TP
47 \&...
48 etc.
49 .TP
50 output.ti3
51 Resulting averaged or merged output file
+0
-35
debian/cb2ti3.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH CONVERT "1" "August 2013" "Convert Colorblind raw device profile data to Argyll data, Version 1.5.1" "User Commands"
2 .SH NAME
3 Convert \- Convert Colorblind raw device profile data to Argyll data.
4 .SH DESCRIPTION
5 Convert Colorblind raw device profile data to Argyll data, Version 1.5.1
6 Author: Graeme W. Gill, licensed under the AGPL Version 3
7 usage: cb2ti3 [\-v] [\-l limit] infile outfile
8 .TP
9 \fB\-v\fR
10 Verbose mode
11 .TP
12 \fB\-l\fR limit
13 Set inklimit in .ti3 file
14 .TP
15 infile
16 Base name for input.CMY and input.nCIE file
17 .TP
18 outfile
19 Base name for output.ti3 file
20 .PP
21 Author: Graeme W. Gill, licensed under the AGPL Version 3
22 usage: cb2ti3 [\-v] [\-l limit] infile outfile
23 .TP
24 \fB\-v\fR
25 Verbose mode
26 .TP
27 \fB\-l\fR limit
28 Set inklimit in .ti3 file
29 .TP
30 infile
31 Base name for input.CMY and input.nCIE file
32 .TP
33 outfile
34 Base name for output.ti3 file
+0
-145
debian/cctiff.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH COLOR "1" "August 2013" "Color Correct a TIFF or JPEG file using any sequence of ICC profiles or Calibrations, V1.5.1" "User Commands"
2 .SH NAME
3 Color \- Color Correct a TIFF file using any sequence of ICC profiles or Calibrations.
4 .SH DESCRIPTION
5 Color Correct a TIFF or JPEG file using any sequence of ICC profiles or Calibrations, V1.5.1
6 Author: Graeme W. Gill, licensed under the AGPL Version 3
7 .IP
8 Diagnostic: Unknown flag '\-'
9 .PP
10 usage: cctiff [\-options] { [\-i intent] profile.icc | calbrtn.cal ...} infile.tif/jpg outfile.tif/jpg
11 .TP
12 \fB\-v\fR
13 Verbose.
14 .TP
15 \fB\-c\fR
16 Combine linearisation curves into one transform.
17 .TP
18 \fB\-p\fR
19 Use slow precise correction.
20 .TP
21 \fB\-k\fR
22 Check fast result against precise, and report.
23 .TP
24 \fB\-r\fR n
25 Override the default CLUT resolution
26 .TP
27 \fB\-t\fR n
28 Choose output encoding from 1..n
29 .TP
30 \fB\-f\fR [T|J]
31 Set output format to Tiff or Jpeg (Default is same as input)
32 .TP
33 \fB\-q\fR quality
34 Set JPEG quality 1..100 (Default 80)
35 .TP
36 \fB\-a\fR
37 Read and Write planes > 4 as alpha planes
38 .TP
39 \fB\-I\fR
40 Ignore any file or profile colorspace mismatches
41 .TP
42 \fB\-D\fR
43 Don't append or set the output TIFF or JPEG description
44 .TP
45 \fB\-e\fR profile.[icc | tiff | jpg]
46 Optionally embed a profile in the destination TIFF or JPEG file.
47 .IP
48 Then for each profile in sequence:
49 .TP
50 \fB\-i\fR intent
51 p = perceptual, r = relative colorimetric,
52 s = saturation, a = absolute colorimetric
53 .TP
54 \fB\-o\fR order
55 n = normal (priority: lut > matrix > monochrome)
56 r = reverse (priority: monochrome > matrix > lut)
57 .TP
58 profile.[icc | tiff]
59 Device, Link or Abstract profile
60 .IP
61 ( May be embedded profile in TIFF/JPEG file)
62 .IP
63 or each calibration file in sequence:
64 .TP
65 \fB\-d\fR dir
66 f = forward cal. (default), b = backwards cal.
67 .TP
68 calbrtn.cal
69 Device calibration file.
70 .TP
71 infile.tif/jpg
72 Input TIFF/JPEG file in appropriate color space
73 .IP
74 outfile.tif/jpg Output TIFF/JPEG file
75 .PP
76 Author: Graeme W. Gill, licensed under the AGPL Version 3
77 .IP
78 Diagnostic: Unknown flag '\-'
79 .PP
80 usage: cctiff [\-options] { [\-i intent] profile.icc | calbrtn.cal ...} infile.tif/jpg outfile.tif/jpg
81 .TP
82 \fB\-v\fR
83 Verbose.
84 .TP
85 \fB\-c\fR
86 Combine linearisation curves into one transform.
87 .TP
88 \fB\-p\fR
89 Use slow precise correction.
90 .TP
91 \fB\-k\fR
92 Check fast result against precise, and report.
93 .TP
94 \fB\-r\fR n
95 Override the default CLUT resolution
96 .TP
97 \fB\-t\fR n
98 Choose output encoding from 1..n
99 .TP
100 \fB\-f\fR [T|J]
101 Set output format to Tiff or Jpeg (Default is same as input)
102 .TP
103 \fB\-q\fR quality
104 Set JPEG quality 1..100 (Default 80)
105 .TP
106 \fB\-a\fR
107 Read and Write planes > 4 as alpha planes
108 .TP
109 \fB\-I\fR
110 Ignore any file or profile colorspace mismatches
111 .TP
112 \fB\-D\fR
113 Don't append or set the output TIFF or JPEG description
114 .TP
115 \fB\-e\fR profile.[icc | tiff | jpg]
116 Optionally embed a profile in the destination TIFF or JPEG file.
117 .IP
118 Then for each profile in sequence:
119 .TP
120 \fB\-i\fR intent
121 p = perceptual, r = relative colorimetric,
122 s = saturation, a = absolute colorimetric
123 .TP
124 \fB\-o\fR order
125 n = normal (priority: lut > matrix > monochrome)
126 r = reverse (priority: monochrome > matrix > lut)
127 .TP
128 profile.[icc | tiff]
129 Device, Link or Abstract profile
130 .IP
131 ( May be embedded profile in TIFF/JPEG file)
132 .IP
133 or each calibration file in sequence:
134 .TP
135 \fB\-d\fR dir
136 f = forward cal. (default), b = backwards cal.
137 .TP
138 calbrtn.cal
139 Device calibration file.
140 .TP
141 infile.tif/jpg
142 Input TIFF/JPEG file in appropriate color space
143 .IP
144 outfile.tif/jpg Output TIFF/JPEG file
+0
-19
debian/ccttest.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH PLOT "1" "August 2013" "Plot spectrum and calculate CCT and VCT" "User Commands"
2 .SH NAME
3 Plot \- Plot spectrum and calculate CCT and VCT.
4 .SH DESCRIPTION
5 Plot spectrum and calculate CCT and VCT
6 Author: Graeme W. Gill
7 usage: ccttest [infile.sp]
8 .TP
9 [infile.sp]
10 spectrum to plot
11 default is all built in illuminants
12 .PP
13 Author: Graeme W. Gill
14 usage: ccttest [infile.sp]
15 .TP
16 [infile.sp]
17 spectrum to plot
18 default is all built in illuminants
+0
-171
debian/ccxxmake.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH CREATE "1" "August 2013" "Create CCMX or CCSS, Version 1.5.1" "User Commands"
2 .SH NAME
3 Create \- Create CCMX or CCSS.
4 .SH DESCRIPTION
5 Create CCMX or CCSS, Version 1.5.1
6 Author: Graeme W. Gill, licensed under the AGPL Version 3
7 Diagnostic: Flag '\-\-' not recognised
8 usage: ccmxmake [\-options] output.ccmx
9 .TP
10 \fB\-v\fR
11 Verbose mode
12 .TP
13 \fB\-S\fR
14 Create CCSS rather than CCMX
15 .HP
16 \fB\-f\fR file1.ti3[,file2.ti3] Create from one or two .ti3 files rather than measure.
17 .TP
18 \fB\-display\fR displayname
19 Choose X11 display name
20 .TP
21 \fB\-d\fR n[,m]
22 Choose the display n from the following list (default 1)
23 Optionally choose different display m for VideoLUT access
24 .IP
25 1 name = ':0.0'
26 1 = 'Screen 1, Output VBOX0 at 0, 0, width 1605, height 1079'
27 .TP
28 \fB\-dweb[\fR:port]
29 Display via a web server at port (default 8080)
30 .TP
31 \fB\-p\fR
32 Use telephoto mode (ie. for a projector) (if available)
33 .TP
34 \fB\-P\fR ho,vo,ss[,vs]
35 Position test window and scale it
36 ho,vi: 0.0 = left/top, 0.5 = center, 1.0 = right/bottom etc.
37 ss: 0.5 = half, 1.0 = normal, 2.0 = double etc.
38 .TP
39 \fB\-F\fR
40 Fill whole screen with black background
41 .TP
42 \fB\-n\fR
43 Don't set override redirect on test window
44 .TP
45 \fB\-N\fR
46 Disable initial calibration of instrument if possible
47 .TP
48 \fB\-H\fR
49 Use high resolution spectrum mode (if available)
50 .TP
51 \fB\-C\fR "command"
52 Invoke shell "command" each time a color is set
53 .TP
54 \fB\-o\fR observ
55 Choose CIE Observer for CCMX spectrometer data:
56 1931_2 (def), 1964_10, S&B 1955_2, shaw, J&V 1978_2
57 .TP
58 \fB\-s\fR steps
59 Override default patch sequence combination steps (default 1)
60 .TP
61 \fB\-W\fR n|h|x
62 Override serial port flow control: n = none, h = HW, x = Xon/Xoff
63 .TP
64 \fB\-D\fR [level]
65 Print debug diagnostics to stderr
66 .TP
67 \fB\-E\fR desciption
68 Override the default overall description
69 .TP
70 \fB\-I\fR displayname
71 Set display make and model description
72 .TP
73 \fB\-T\fR displaytech
74 Set display technology description (ie. CRT, LCD etc.)
75 .TP
76 \fB\-U\fR c
77 Set UI selection character(s)
78 .TP
79 \fB\-Y\fR r|n
80 Set or override refresh/non\-refresh display type
81 .TP
82 \fB\-Y\fR A
83 Use non\-adaptive integration time mode (if available).
84 .IP
85 correction.ccmx | calibration.ccss
86 .IP
87 File to save result to
88 .PP
89 Author: Graeme W. Gill, licensed under the AGPL Version 3
90 Diagnostic: Flag '\-\-' not recognised
91 usage: ccmxmake [\-options] output.ccmx
92 .TP
93 \fB\-v\fR
94 Verbose mode
95 .TP
96 \fB\-S\fR
97 Create CCSS rather than CCMX
98 .HP
99 \fB\-f\fR file1.ti3[,file2.ti3] Create from one or two .ti3 files rather than measure.
100 .TP
101 \fB\-display\fR displayname
102 Choose X11 display name
103 .TP
104 \fB\-d\fR n[,m]
105 Choose the display n from the following list (default 1)
106 Optionally choose different display m for VideoLUT access
107 .IP
108 1 name = ':0.0'
109 1 = 'Screen 1, Output VBOX0 at 0, 0, width 1605, height 1079'
110 .TP
111 \fB\-dweb[\fR:port]
112 Display via a web server at port (default 8080)
113 .TP
114 \fB\-p\fR
115 Use telephoto mode (ie. for a projector) (if available)
116 .TP
117 \fB\-P\fR ho,vo,ss[,vs]
118 Position test window and scale it
119 ho,vi: 0.0 = left/top, 0.5 = center, 1.0 = right/bottom etc.
120 ss: 0.5 = half, 1.0 = normal, 2.0 = double etc.
121 .TP
122 \fB\-F\fR
123 Fill whole screen with black background
124 .TP
125 \fB\-n\fR
126 Don't set override redirect on test window
127 .TP
128 \fB\-N\fR
129 Disable initial calibration of instrument if possible
130 .TP
131 \fB\-H\fR
132 Use high resolution spectrum mode (if available)
133 .TP
134 \fB\-C\fR "command"
135 Invoke shell "command" each time a color is set
136 .TP
137 \fB\-o\fR observ
138 Choose CIE Observer for CCMX spectrometer data:
139 1931_2 (def), 1964_10, S&B 1955_2, shaw, J&V 1978_2
140 .TP
141 \fB\-s\fR steps
142 Override default patch sequence combination steps (default 1)
143 .TP
144 \fB\-W\fR n|h|x
145 Override serial port flow control: n = none, h = HW, x = Xon/Xoff
146 .TP
147 \fB\-D\fR [level]
148 Print debug diagnostics to stderr
149 .TP
150 \fB\-E\fR desciption
151 Override the default overall description
152 .TP
153 \fB\-I\fR displayname
154 Set display make and model description
155 .TP
156 \fB\-T\fR displaytech
157 Set display technology description (ie. CRT, LCD etc.)
158 .TP
159 \fB\-U\fR c
160 Set UI selection character(s)
161 .TP
162 \fB\-Y\fR r|n
163 Set or override refresh/non\-refresh display type
164 .TP
165 \fB\-Y\fR A
166 Use non\-adaptive integration time mode (if available).
167 .IP
168 correction.ccmx | calibration.ccss
169 .IP
170 File to save result to
+0
-506
debian/changelog less more
0 argyll (1.5.1-8) unstable; urgency=medium
1
2 * QA upload.
3 * Add a symbols file for libicc2 and libimdi0.
4
5 -- Iain Lane <laney@debian.org> Mon, 09 Jun 2014 12:52:11 +0100
6
7 argyll (1.5.1-7) unstable; urgency=medium
8
9 * QA upload.
10 * debian/control: Bump udev recommended version to >= 196
11
12 -- Laurent Bigonville <bigon@debian.org> Sun, 04 May 2014 22:30:57 +0200
13
14 argyll (1.5.1-6) unstable; urgency=medium
15
16 * QA upload.
17 * debian/patches/03_usb-db.diff: Use hwdb builtin, instead of the obsolete
18 usb-db in the udev rules.
19 * debian/patches/06_fix_udev_rule.patch: Fix udev rules to actually work;
20 ENV{ACL_MANAGE} has stopped working ages ago, and with logind it's now the
21 "uaccess" tag. Dropping also consolekit from Recommends. (Closes: #746974)
22 * debian/rules: Add libpam-systemd as a recommends to be sure we have a
23 session registered, this is needed for the permissions on the devices.
24 * debian/control: Build-depend on libtiff-dev rather than libtiff4-dev.
25 (Closes: #733126)
26 * debian/control: Drop Uploaders as the package has been orphaned
27 * debian/control: Bump Standards-Version to 3.9.5 (no further changes)
28
29 -- Laurent Bigonville <bigon@debian.org> Sun, 04 May 2014 21:36:24 +0200
30
31 argyll (1.5.1-5) unstable; urgency=low
32
33 * Package orphaned. I don't intent to support the work of an agressive
34 upstream author more longer and realy good luck for the next maintainer.
35
36 -- Christian Marillat <marillat@debian.org> Mon, 19 Aug 2013 14:18:29 +0200
37
38 argyll (1.5.1-4) unstable; urgency=low
39
40 * Revert previous yajl patch this break argyll.
41 * Regenerate all manpages.
42 * Add colord and gir1.2-colordgtk-1.0 in Suggests.
43 * Don't package .a and .la files.
44
45 -- Christian Marillat <marillat@debian.org> Mon, 12 Aug 2013 15:51:54 +0200
46
47 argyll (1.5.1-3) unstable; urgency=low
48
49 * Uptade patch 01_autotools-support with patch from bug report to link
50 argyll against external yajl also add an one line patch called
51 05_external-yajl (Closes: #544223)
52
53 -- Christian Marillat <marillat@debian.org> Fri, 02 Aug 2013 08:10:38 +0200
54
55 argyll (1.5.1-2) unstable; urgency=low
56
57 * Package iccdump.1 and icclu.1 only in icc-utils package
58 (Closes: #717990, # 717993).
59
60 -- Christian Marillat <marillat@debian.org> Sat, 27 Jul 2013 21:43:59 +0200
61
62 argyll (1.5.1-1) unstable; urgency=low
63
64 * New upstream release.
65 * Removed 03_kfreebsd patch.
66 * Refresh 01_autotools-support patch (CLoses: 713545)
67 * New patch 03_usb-db to add support for newer udev (Closes: 717504)
68
69 -- Christian Marillat <marillat@debian.org> Fri, 26 Jul 2013 16:25:19 +0200
70
71 argyll (1.4.0-8) unstable; urgency=low
72
73 * Add a Breaks field and update the version in the Replaces field for the
74 icc-utils package (Closes: #694287)
75
76 -- Christian Marillat <marillat@debian.org> Sun, 25 Nov 2012 09:59:35 +0100
77
78 argyll (1.4.0-7) unstable; urgency=high
79
80 * New patch 04_CVE-2012-4405.diff to fix CVE-2012-4405 issue
81 (Closes: #687275)
82
83 -- Christian Marillat <marillat@debian.org> Tue, 11 Sep 2012 13:45:12 +0200
84
85 argyll (1.4.0-6) unstable; urgency=low
86
87 * Use dh_autoreconf (Closes: #678909)
88
89 -- Christian Marillat <marillat@debian.org> Mon, 25 Jun 2012 07:52:56 +0200
90
91 argyll (1.4.0-5) unstable; urgency=low
92
93 * Refresh 01_autotools-support patch (Closes: #678750).
94
95 -- Christian Marillat <marillat@debian.org> Mon, 25 Jun 2012 00:01:31 +0200
96
97 argyll (1.4.0-4) unstable; urgency=low
98
99 * Should Build-Depends on libusb-dev (Closes: #670329).
100
101 -- Christian Marillat <marillat@debian.org> Wed, 25 Apr 2012 07:46:07 +0200
102
103 argyll (1.4.0-3) unstable; urgency=low
104
105 * Fix kfreebsd build. Thanks to Robert Millan for the patch.
106 (Closes: #595951 #630208).
107
108 -- Christian Marillat <marillat@debian.org> Tue, 24 Apr 2012 07:49:03 +0200
109
110 argyll (1.4.0-2) unstable; urgency=low
111
112 * Move binaries from libicc2 package to a new icc-utils package (Closes:
113 #670003).
114
115 -- Christian Marillat <marillat@debian.org> Sun, 22 Apr 2012 16:07:43 +0200
116
117 argyll (1.4.0-1) unstable; urgency=low
118
119 * New upstream release.
120
121 -- Christian Marillat <marillat@debian.org> Sat, 21 Apr 2012 15:53:50 +0200
122
123 argyll (1.3.7-1.1) unstable; urgency=low
124
125 * Use DEB_LDFLAGS_MAINT_APPEND to add more LDFLAGS (Closes: #667924)
126
127 -- Christian Marillat <marillat@debian.org> Mon, 09 Apr 2012 10:45:56 +0200
128
129 argyll (1.3.7-1) unstable; urgency=low
130
131 * New upstream release.
132 * Try to fix the build (Thanks to Dmitry Nezhevenko) (Closes: #665055).
133 * Move to debhelper 9 for multi-arch and hardened flags.
134
135 -- Christian Marillat <marillat@debian.org> Tue, 03 Apr 2012 08:46:37 +0200
136
137 argyll (1.3.6-3) unstable; urgency=low
138
139 * Call dh_quilt_unpatch after MAKE distclean.
140 * Rework Makefile test to be sure we don't call upstream Makefile with
141 missing distclean target.
142
143 -- Christian Marillat <marillat@debian.org> Tue, 20 Mar 2012 14:44:40 +0100
144
145 argyll (1.3.6-2) unstable; urgency=low
146
147 * debian/rules Fix clean target.
148
149 -- Christian Marillat <marillat@debian.org> Mon, 19 Mar 2012 16:50:40 +0100
150
151 argyll (1.3.6-1) unstable; urgency=low
152
153 * New upstream release.
154 * Removed 03_add-ColorHug_sensor_driver patch, but beware the support for
155 ColorHug is experimental.
156
157 -- Christian Marillat <marillat@debian.org> Mon, 19 Mar 2012 10:55:20 +0100
158
159 argyll (1.3.5-7) unstable; urgency=low
160
161 * Really fix previous bug.
162 * Use debhelper 9.
163
164 -- Christian Marillat <marillat@debian.org> Tue, 13 Mar 2012 08:41:01 +0100
165
166 argyll (1.3.5-6) unstable; urgency=low
167
168 * Fix another bug in ColorHugColorHug (Closes: #661643)
169
170 -- Christian Marillat <marillat@debian.org> Sun, 11 Mar 2012 16:59:06 +0100
171
172 argyll (1.3.5-5) unstable; urgency=low
173
174 * Fix two bugs in ColorHugColorHug patch (Closes: #657582).
175
176 -- Christian Marillat <marillat@debian.org> Sat, 28 Jan 2012 01:42:30 +0100
177
178 argyll (1.3.5-4) unstable; urgency=low
179
180 * New patch 03_add-ColorHug_sensor_driver to add support for the ColorHug
181 sensor (Closes: #655888)
182
183 -- Christian Marillat <marillat@debian.org> Tue, 17 Jan 2012 18:22:51 +0100
184
185 argyll (1.3.5-3) unstable; urgency=low
186
187 * debian/rules Enable make distclean (Closes: #649728).
188
189 -- Christian Marillat <marillat@debian.org> Wed, 23 Nov 2011 15:17:42 +0100
190
191 argyll (1.3.5-2) unstable; urgency=low
192
193 * Don't package icclu and iccdump binaries in argyll, files already in
194 libicc2 package.
195
196 -- Christian Marillat <marillat@debian.org> Mon, 21 Nov 2011 08:25:40 +0100
197
198 argyll (1.3.5-1) unstable; urgency=low
199
200 [ Christian Marillat ]
201 * New maintainer (Closes: #622620) Thanks, Roland!
202 * Use dh-autoreconf.
203
204 [ Dmitry Nezhevenko ]
205 * New upstream release (Closes: #647093).
206 * Switch to dpkg-source 3.0 (quilt) format.
207 * Merge debian changes from 1.3.0 (experimental) and 1.1.1 (unstable).
208 * Unsplit libicc2, built from the same source package again (since
209 upstream only ships it as part of Argyll anyway). Actually was already
210 done in experimental (Closes: #636801).
211 * Use kfreebsd-any instead of kfreebsd-(i386|amd64) to match kFreeBSD
212 (Closes: #634688).
213 * Provide dedicated libimdi0/libimdi-dev libraries (Closes: #611139).
214 * Add argyll-dbg package with debug symbols.
215
216 -- Christian Marillat <marillat@debian.org> Sun, 13 Nov 2011 15:30:42 +0100
217
218 argyll (1.3.0-3) experimental; urgency=low
219
220 * Minor future-proofing in debian/rules.
221 * Also removed redundant shipping of the firmware-package-builder
222 tarball, thanks to Pascal de Bruijn for noticing.
223
224 -- Roland Mas <lolando@debian.org> Fri, 17 Sep 2010 11:05:22 +0200
225
226 argyll (1.3.0-2) experimental; urgency=low
227
228 * Fixed packaging bugs introduced when un-splitting the source package.
229
230 -- Roland Mas <lolando@debian.org> Tue, 14 Sep 2010 11:29:27 +0200
231
232 argyll (1.3.0-1) experimental; urgency=low
233
234 * New upstream release.
235
236 -- Roland Mas <lolando@debian.org> Wed, 08 Sep 2010 15:16:29 +0200
237
238 argyll (1.2.1-1) experimental; urgency=low
239
240 * New upstream bugfix release.
241 * Please welcome Xavier Oswald as uploader.
242
243 -- Roland Mas <lolando@debian.org> Sun, 05 Sep 2010 15:50:41 +0200
244
245 argyll (1.2.0-0) UNRELEASED; urgency=low
246
247 * New upstream release.
248 * Unsplit libicc2, built from the same source package again (since
249 upstream only ships it as part of Argyll anyway).
250 * Bumped Standards-Version to 3.9.1 (no changes).
251 * argyll-firmware-spyder2: Moved firmware to /usr/share/color, which is
252 freedesktop.org-compliant and (more to the point) where Argyll 1.2.0
253 looks for it.
254
255 -- Roland Mas <lolando@debian.org> Thu, 05 Aug 2010 15:33:20 +0200
256
257 argyll (1.1.1-2) unstable; urgency=medium
258
259 * QA upload.
260 * Add ../libargyll.la to LDADD (Closes: #615692).
261 * Don't ship .la files (Closes: #621142).
262
263 -- Luk Claes <luk@debian.org> Sat, 11 Jun 2011 11:18:43 +0200
264
265 argyll (1.1.1-1) unstable; urgency=low
266
267 * New upstream release.
268 * Switched dependency on policykit-1 to a more correct recommendation on
269 consolekit + recent udev.
270 * Updated copyright file (doc is now GFDL-1.3).
271 * Bumped Standards-Version to 3.8.4 (no changes required).
272
273 -- Roland Mas <lolando@debian.org> Wed, 24 Feb 2010 21:26:55 +0100
274
275 argyll (1.1.0-5) unstable; urgency=low
276
277 * Bumped version build-dependency on libicc-dev to prevent segmentation
278 fault.
279
280 -- Roland Mas <lolando@debian.org> Mon, 25 Jan 2010 19:06:07 +0100
281
282 argyll (1.1.0-4) unstable; urgency=low
283
284 * Adapted packaging to new udev rules, now compatible with PolicyKit-1
285 (closes: #529411). This should fix device file permissions problems,
286 too (closes: #549406). And also the "deprecated udev function"
287 warning (closes: #564269).
288 * Removed conffiles no longer shipped by the package.
289
290 -- Roland Mas <lolando@debian.org> Mon, 25 Jan 2010 13:47:59 +0100
291
292 argyll (1.1.0-3) unstable; urgency=low
293
294 * Only depend on udev for Linux systems.
295
296 -- Roland Mas <lolando@debian.org> Mon, 25 Jan 2010 11:42:54 +0100
297
298 argyll (1.1.0-2) unstable; urgency=low
299
300 * Fix build on FreeBSD, patch from Petr Salinger
301 <Petr.Salinger@seznam.cz> (closes: #566768).
302
303 -- Roland Mas <lolando@debian.org> Mon, 25 Jan 2010 10:29:33 +0100
304
305 argyll (1.1.0-1) unstable; urgency=low
306
307 * New upstream release, including a patch obtained from upstream just
308 after the actual release.
309 * Also, stop using the system's libusb, which causes known problems with
310 Argyll. Now using Argyll's patched copy (privately, since the patches
311 cause problems with other software).
312
313 -- Roland Mas <lolando@debian.org> Sun, 24 Jan 2010 23:34:18 +0100
314
315 argyll (1.1.0~rc4-1) unstable; urgency=low
316
317 * New upstream pre-release.
318 * Ship all doc files with a wildcard rule, rather than a fixed (and
319 outdated) set.
320
321 -- Roland Mas <lolando@debian.org> Wed, 06 Jan 2010 10:33:54 +0100
322
323 argyll (1.1.0~rc3-1) unstable; urgency=low
324
325 * New upstream pre-release.
326 * Moved udev rules file to /lib/udev/rules.d.
327
328 -- Roland Mas <lolando@debian.org> Tue, 05 Jan 2010 14:49:38 +0100
329
330 argyll (1.1.0~rc2-1) unstable; urgency=low
331
332 * New upstream pre-release.
333 * Updated location of Bazaar branches in control file.
334 * The Debian-specific branch now feeds from the "midstream" branch
335 rather than the "upstream-releases" branch, to ease collaboration with
336 other distributions. This shouldn't make any difference on the
337 package contents.
338
339 -- Roland Mas <lolando@debian.org> Thu, 10 Dec 2009 17:26:04 +0100
340
341 argyll (1.1.0~rc1+dfsg-1) unstable; urgency=low
342
343 * Removed non-free IETF RFC/I-D from source package, thanks to Simon
344 Josefsson (closes: #555377).
345
346 -- Roland Mas <lolando@debian.org> Sat, 14 Nov 2009 20:23:53 +0100
347
348 argyll (1.1.0~rc1-3) unstable; urgency=low
349
350 * Added Build-Depends: libusbhid-dev for kFreeBSD architectures.
351
352 -- Roland Mas <lolando@debian.org> Mon, 09 Nov 2009 13:34:54 +0100
353
354 argyll (1.1.0~rc1-2) unstable; urgency=low
355
356 * Fixed build on GNU/kFreeBSD ports.
357 * Applied patch from upstream that fixes an infinite loop if Xrandr is
358 enabled.
359
360 -- Roland Mas <lolando@debian.org> Mon, 09 Nov 2009 11:46:57 +0100
361
362 argyll (1.1.0~rc1-1) unstable; urgency=low
363
364 * New upstream pre-release.
365 * Updated debian/copyright (upstream switched to Affero GPLv3).
366 * Bumped versioned build-dependency on debhelper.
367 * Bumped standards version to 3.8.3 (no changes needed).
368
369 -- Roland Mas <lolando@debian.org> Sun, 08 Nov 2009 22:19:45 +0100
370
371 argyll (1.0.4-1) unstable; urgency=low
372
373 * New upstream release.
374
375 -- Roland Mas <lolando@debian.org> Fri, 03 Jul 2009 14:14:11 +0200
376
377 argyll (1.0.3+dfsg1-3) unstable; urgency=low
378
379 * libicc is now a separate source+binary package, so argyll now links
380 against it.
381 * Since that new libicc is a proper new upstream snapshot, the problems
382 introduced with the local patches should be fixed (closes: #524478).
383
384 -- Roland Mas <lolando@debian.org> Tue, 02 Jun 2009 11:26:01 +0200
385
386 argyll (1.0.3+dfsg1-2) unstable; urgency=low
387
388 * Adapted debian/watch file to match version mangling.
389 * Updated autotools build system to dynamically link against the
390 internal libraries and provide a libicc.so for dynamic linking.
391 * Also ship the corresponding header files.
392 * Not splitting libicc into its own binary package just yet though, I
393 want to get more testing of the dynamic linking first.
394
395 -- Roland Mas <lolando@debian.org> Thu, 14 May 2009 16:49:44 +0200
396
397 argyll (1.0.3+dfsg1-1) unstable; urgency=low
398
399 * argyll-firmware-spyder2 is now generated as section non-free/graphics
400 rather than just graphics.
401 * Removed non-free RFC from source package (closes: #524972).
402
403 -- Roland Mas <lolando@debian.org> Tue, 28 Apr 2009 11:47:38 +0200
404
405 argyll (1.0.3-5) unstable; urgency=low
406
407 * Documented web interface for the Bazaar repository.
408 * Added source package for the Spyder2 firmware.
409
410 -- Roland Mas <lolando@debian.org> Fri, 17 Apr 2009 23:34:40 +0200
411
412 argyll (1.0.3-4) unstable; urgency=low
413
414 * Actually create /var/lib/argyll so spyd2en can store its firmware in
415 it... also remove it on purge.
416 * Also look for the Spyder2 firmware in /lib/firmware.
417 * Shortened debian/rules quite a bit thanks to Debhelper 7.
418 * Fixed build rules so testsuite passes.
419 * Bumped standards-version to 3.8.1 (no changes).
420
421 -- Roland Mas <lolando@debian.org> Thu, 16 Apr 2009 11:25:26 +0200
422
423 argyll (1.0.3-3) unstable; urgency=low
424
425 * Another patch for icclib, this time from Jan Lieskovsky, fixing some
426 more vulnerabilities described in CVE-2009-0792 (closes: #523472).
427
428 -- Roland Mas <lolando@debian.org> Fri, 10 Apr 2009 17:53:55 +0200
429
430 argyll (1.0.3-2) unstable; urgency=low
431
432 * Patched embedded copy of icclib to fix integer overflow and denial of
433 service vulnerabilities as described in CVE-2009-0583 and
434 CVE-2009-0584. Patch provided by Moritz Muehlenhoff and the Debian
435 security team (closes: #522448).
436
437 -- Roland Mas <lolando@debian.org> Fri, 03 Apr 2009 22:43:14 +0200
438
439 argyll (1.0.3-1) unstable; urgency=low
440
441 * New upstream release.
442 * Adopted package from Christian Marillat's Debian-Multimedia
443 repository (closes: #498396). Thanks, Christian!
444 * Stopped removing some files in clean target.
445 * Switched build-system to autotools.
446 * Link to system libusb rather than locally-shipped one.
447 * Fixed watch file.
448 * Moved Spyder2 firmware to /var/lib/argyll.
449 * Added detailed debian/copyright file.
450 * Use dh_prep instead of dh_clean -k.
451 * Rename /usr/bin/foo to /usr/bin/argyll-foo, for foo in
452 {average,refine,targen,verify}, to avoid having binaries with too
453 generic names. Documented in README.Debian.
454
455 -- Roland Mas <lolando@debian.org> Thu, 19 Feb 2009 20:34:48 +0100
456
457 argyll (1.0.0-0.0) unstable; urgency=low
458
459 * New upstream release.
460 * Added configuration files for udev, hal and policykit.
461
462 -- Christian Marillat <marillat@debian.org> Fri, 18 Jul 2008 08:51:45 +0200
463
464 argyll (0.60-0.1) unstable; urgency=low
465
466 * Need to Build-depends on libxinerama-dev instead of x11proto-xinerama-dev.
467
468 -- Christian Marillat <marillat@debian.org> Fri, 21 Jul 2006 06:25:46 +0200
469
470 argyll (0.60-0.0) unstable; urgency=low
471
472 * New upstream release.
473
474 -- Christian Marillat <marillat@debian.org> Thu, 20 Jul 2006 10:56:43 +0200
475
476 argyll (0.53.1-0.2) unstable; urgency=low
477
478 * Apply a patch from Guido to fix build under ppc.
479
480 -- Christian Marillat <marillat@debian.org> Tue, 23 May 2006 14:40:45 +0200
481
482 argyll (0.53.1-0.1) unstable; urgency=low
483
484 * Add libxxf86vm-dev and x11proto-xf86vidmode-dev in build-Depends.
485
486 -- Christian Marillat <marillat@debian.org> Fri, 12 May 2006 16:27:46 +0200
487
488 argyll (0.53.1-0.0) unstable; urgency=low
489
490 * New upstream release.
491
492 -- Christian Marillat <marillat@debian.org> Thu, 9 Feb 2006 13:56:03 +0100
493
494 argyll (0.53-0.1) unstable; urgency=low
495
496 * Rename icclink in icclink-argyll.
497 * Rename sprof in sprof-argyll.
498
499 -- Christian Marillat <marillat@debian.org> Wed, 8 Feb 2006 11:42:15 +0100
500
501 argyll (0.53-0.0) unstable; urgency=low
502
503 * Initial release.
504
505 -- Christian Marillat <marillat@debian.org> Sun, 5 Feb 2006 22:08:11 +0100
+0
-185
debian/chartread.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH READ "1" "August 2013" "Read Target Test Chart, Version 1.5.1" "User Commands"
2 .SH NAME
3 Read \- Read Target Test Chart.
4 .SH DESCRIPTION
5 Read Target Test Chart, Version 1.5.1
6 Author: Graeme W. Gill, licensed under the AGPL Version 3
7 usage: chartread [\-options] outfile
8 .TP
9 \fB\-v\fR
10 Verbose mode
11 .TP
12 \fB\-c\fR listno
13 Set communication port from the following list (default 1)
14 .IP
15 ** No ports found **
16 .TP
17 \fB\-t\fR
18 Use transmission measurement mode
19 .TP
20 \fB\-d\fR
21 Use display measurement mode (white Y relative results)
22 .TP
23 \fB\-e\fR
24 Emissive for transparency on a light box
25 .TP
26 \fB\-p\fR
27 Measure patch by patch rather than strip
28 .TP
29 \fB\-x\fR [lx]
30 Take external values, either L*a*b* (\fB\-xl\fR) or XYZ (\fB\-xx\fR).
31 .TP
32 \fB\-n\fR
33 Don't save spectral information (default saves spectral)
34 .TP
35 \fB\-l\fR
36 Save CIE as D50 L*a*b* rather than XYZ
37 .TP
38 \fB\-L\fR
39 Save CIE as D50 L*a*b* as well as XYZ
40 .TP
41 \fB\-r\fR
42 Resume reading partly read chart
43 .TP
44 \fB\-I\fR file.cal
45 Override calibration info from .ti2 in resulting .ti3
46 .TP
47 \fB\-F\fR filter
48 Set filter configuration (if aplicable):
49 .TP
50 n
51 None
52 .TP
53 p
54 Polarising filter
55 .TP
56 6
57 D65
58 .TP
59 u
60 U.V. Cut
61 .TP
62 \fB\-N\fR
63 Disable initial calibration of instrument if possible
64 .TP
65 \fB\-B\fR
66 Disable auto bi\-directional strip recognition
67 .TP
68 \fB\-H\fR
69 Use high resolution spectrum mode (if available)
70 .TP
71 \fB\-X\fR file.ccmx
72 Apply Colorimeter Correction Matrix
73 .TP
74 \fB\-X\fR file.ccss
75 Use Colorimeter Calibration Spectral Samples for calibration
76 .TP
77 \fB\-Q\fR observ
78 Choose CIE Observer for CCSS instrument:
79 1931_2 (def), 1964_10, S&B 1955_2, shaw, J&V 1978_2
80 .TP
81 \fB\-T\fR ratio
82 Modify strip patch consistency tolerance by ratio
83 .TP
84 \fB\-S\fR
85 Suppress wrong strip & unexpected value warnings
86 .TP
87 \fB\-W\fR n|h|x
88 Override serial port flow control: n = none, h = HW, x = Xon/Xoff
89 .TP
90 \fB\-D\fR [level]
91 Print debug diagnostics to stderr
92 .TP
93 outfile
94 Base name for input[ti2]/output[ti3] file
95 .PP
96 Author: Graeme W. Gill, licensed under the AGPL Version 3
97 usage: chartread [\-options] outfile
98 .TP
99 \fB\-v\fR
100 Verbose mode
101 .TP
102 \fB\-c\fR listno
103 Set communication port from the following list (default 1)
104 .IP
105 ** No ports found **
106 .TP
107 \fB\-t\fR
108 Use transmission measurement mode
109 .TP
110 \fB\-d\fR
111 Use display measurement mode (white Y relative results)
112 .TP
113 \fB\-e\fR
114 Emissive for transparency on a light box
115 .TP
116 \fB\-p\fR
117 Measure patch by patch rather than strip
118 .TP
119 \fB\-x\fR [lx]
120 Take external values, either L*a*b* (\fB\-xl\fR) or XYZ (\fB\-xx\fR).
121 .TP
122 \fB\-n\fR
123 Don't save spectral information (default saves spectral)
124 .TP
125 \fB\-l\fR
126 Save CIE as D50 L*a*b* rather than XYZ
127 .TP
128 \fB\-L\fR
129 Save CIE as D50 L*a*b* as well as XYZ
130 .TP
131 \fB\-r\fR
132 Resume reading partly read chart
133 .TP
134 \fB\-I\fR file.cal
135 Override calibration info from .ti2 in resulting .ti3
136 .TP
137 \fB\-F\fR filter
138 Set filter configuration (if aplicable):
139 .TP
140 n
141 None
142 .TP
143 p
144 Polarising filter
145 .TP
146 6
147 D65
148 .TP
149 u
150 U.V. Cut
151 .TP
152 \fB\-N\fR
153 Disable initial calibration of instrument if possible
154 .TP
155 \fB\-B\fR
156 Disable auto bi\-directional strip recognition
157 .TP
158 \fB\-H\fR
159 Use high resolution spectrum mode (if available)
160 .TP
161 \fB\-X\fR file.ccmx
162 Apply Colorimeter Correction Matrix
163 .TP
164 \fB\-X\fR file.ccss
165 Use Colorimeter Calibration Spectral Samples for calibration
166 .TP
167 \fB\-Q\fR observ
168 Choose CIE Observer for CCSS instrument:
169 1931_2 (def), 1964_10, S&B 1955_2, shaw, J&V 1978_2
170 .TP
171 \fB\-T\fR ratio
172 Modify strip patch consistency tolerance by ratio
173 .TP
174 \fB\-S\fR
175 Suppress wrong strip & unexpected value warnings
176 .TP
177 \fB\-W\fR n|h|x
178 Override serial port flow control: n = none, h = HW, x = Xon/Xoff
179 .TP
180 \fB\-D\fR [level]
181 Print debug diagnostics to stderr
182 .TP
183 outfile
184 Base name for input[ti2]/output[ti3] file
+0
-355
debian/collink.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH LINK "1" "August 2013" "Link ICC profiles, Version 1.5.1" "User Commands"
2 .SH NAME
3 Link \- Link ICC profiles.
4 .SH DESCRIPTION
5 Link ICC profiles, Version 1.5.1
6 Author: Graeme W. Gill, licensed under the AGPL Version 3
7 .IP
8 Diagnostic: Too few arguments, got 1 expect at least 3
9 .PP
10 usage: collink [options] srcprofile dstprofile linkedprofile
11 .TP
12 \fB\-v\fR
13 Verbose
14 .HP
15 \fB\-A\fR manufacturer Manufacturer description string
16 .TP
17 \fB\-M\fR model
18 Model description string
19 .TP
20 \fB\-D\fR description
21 Profile Description string (Default "inoutfile")
22 .TP
23 \fB\-C\fR copyright
24 Copyright string
25 .TP
26 \fB\-V\fR
27 Verify existing profile, rather than link
28 .TP
29 \fB\-q\fR lmhu
30 Quality \- Low, Medium (def), High, Ultra
31 .TP
32 \fB\-r\fR res
33 Override clut res. set by \fB\-q\fR
34 .TP
35 \fB\-n\fR
36 Don't preserve device linearization curves in result
37 .TP
38 \fB\-f\fR
39 Special :\- Force neutral colors to be K only output
40 .TP
41 \fB\-fk\fR
42 Special :\- Force K only neutral colors to be K only output
43 .TP
44 \fB\-F\fR
45 Special :\- Force all colors to be K only output
46 .TP
47 \fB\-fcmy\fR
48 Special :\- Force 100% C,M or Y only to stay pure
49 .TP
50 \fB\-p\fR absprof
51 Include abstract profile in link
52 .TP
53 \fB\-s\fR
54 Simple Mode (default)
55 .TP
56 \fB\-g\fR [src.gam]
57 Gamut Mapping Mode [optional source image gamut]
58 .TP
59 \fB\-G\fR [src.gam]
60 Gamut Mapping Mode using inverse outprofile A2B
61 .IP
62 Simple Mode Options:
63 \fB\-i\fR in_intent p = perceptual, r = relative colorimetric,
64 .IP
65 s = saturation, a = absolute colorimetric
66 .TP
67 \fB\-o\fR out_intent
68 p = perceptual, r = relative colorimetric,
69 s = saturation, a = absolute colorimetric
70 .TP
71 Gamut Mapping
72 Mode Options:
73 .TP
74 \fB\-i\fR intent
75 set linking intent from the following choice:
76 .IP
77 a \- Absolute Colorimetric (in Jab) [ICC Absolute Colorimetric]
78 .IP
79 aw \- Absolute Colorimetric (in Jab) with scaling to fit white point
80 aa \- Absolute Appearance
81 .IP
82 r \- White Point Matched Appearance [ICC Relative Colorimetric]
83 .IP
84 la \- Luminance axis matched Appearance
85 .IP
86 p \- Perceptual (Preferred) (Default) [ICC Perceptual]
87 .IP
88 pa \- Perceptual Apperance
89 ms \- Saturation
90 .IP
91 s \- Enhanced Saturation [ICC Saturation]
92 .IP
93 al \- Absolute Colorimetric (Lab)
94 rl \- White Point Matched Appearance (Lab)
95 .TP
96 \fB\-w\fR [J,a,b]
97 Use forced whitepoint hack [optional target point]
98 .TP
99 \fB\-c\fR viewcond
100 set source viewing conditions for CIECAM02,
101 either an enumerated choice, or a parameter
102 .TP
103 \fB\-d\fR viewcond
104 set destination viewing conditions for CIECAM02,
105 either an enumerated choice, or parameter:value changes
106 .IP
107 pp \- Practical Reflection Print (ISO\-3664 P2)
108 pe \- Print evaluation environment (CIE 116\-1995)
109 pc \- Critical print evaluation environment (ISO\-3664 P1)
110 mt \- Monitor in typical work environment
111 mb \- Bright monitor in bright work environment
112 md \- Monitor in darkened work environment
113 jm \- Projector in dim environment
114 jd \- Projector in dark environment
115 .IP
116 pcd \- Photo CD \- original scene outdoors
117 .IP
118 ob \- Original scene \- Bright Outdoors
119 cx \- Cut Sheet Transparencies on a viewing box
120 .TP
121 s:surround
122 n = auto, a = average, m = dim, d = dark,
123 c = transparency (default average)
124 .TP
125 w:X:Y:Z
126 Adapted white point as XYZ (default media white)
127 .TP
128 w:x:y
129 Adapted white point as x, y
130 .TP
131 a:adaptation
132 Adaptation luminance in cd.m^2 (default 50.0)
133 .TP
134 b:background
135 Background % of image luminance (default 20)
136 .TP
137 l:scenewhite
138 Scene white in cd.m^2 if surround = auto (default 250)
139 .TP
140 f:flare
141 Flare light % of image luminance (default 1)
142 .TP
143 f:X:Y:Z
144 Flare color as XYZ (default media white)
145 .TP
146 f:x:y
147 Flare color as x, y
148 .TP
149 \fB\-t\fR tlimit
150 set source total ink limit, 0 \- 400% (estimate by default)
151 .TP
152 \fB\-T\fR klimit
153 set source black ink limit, 0 \- 100% (estimate by default)
154 .IP
155 Inverse outprofile A2B Options:
156 \fB\-k\fR tezhxr CMYK Black generation
157 .IP
158 t = transfer K from source to destination, e = retain K of destination B2A table
159 z = zero K, h = 0.5 K, x = maximum K, r = ramp K (default)
160 .HP
161 \fB\-k\fR p stle stpo enpo enle shape
162 .IP
163 p = black target generation curve parameters
164 .HP
165 \fB\-k\fR q stle0 stpo0 enpo0 enle0 shape0 stle2 stpo2 enpo2 enle2 shape2
166 .IP
167 q = transfer source K to dual curve limits
168 .TP
169 \fB\-K\fR parameters
170 Same as \fB\-k\fR, but target is K locus rather than K value itself
171 .TP
172 \fB\-l\fR tlimit
173 set destination total ink limit, 0 \- 400% (estimate by default)
174 .TP
175 \fB\-L\fR klimit
176 set destination black ink limit, 0 \- 100% (estimate by default)
177 .TP
178 \fB\-P\fR
179 Create gamut gammap.wrl diagostic
180 .PP
181 Author: Graeme W. Gill, licensed under the AGPL Version 3
182 .IP
183 Diagnostic: Too few arguments, got 1 expect at least 3
184 .PP
185 usage: collink [options] srcprofile dstprofile linkedprofile
186 .TP
187 \fB\-v\fR
188 Verbose
189 .HP
190 \fB\-A\fR manufacturer Manufacturer description string
191 .TP
192 \fB\-M\fR model
193 Model description string
194 .TP
195 \fB\-D\fR description
196 Profile Description string (Default "inoutfile")
197 .TP
198 \fB\-C\fR copyright
199 Copyright string
200 .TP
201 \fB\-V\fR
202 Verify existing profile, rather than link
203 .TP
204 \fB\-q\fR lmhu
205 Quality \- Low, Medium (def), High, Ultra
206 .TP
207 \fB\-r\fR res
208 Override clut res. set by \fB\-q\fR
209 .TP
210 \fB\-n\fR
211 Don't preserve device linearization curves in result
212 .TP
213 \fB\-f\fR
214 Special :\- Force neutral colors to be K only output
215 .TP
216 \fB\-fk\fR
217 Special :\- Force K only neutral colors to be K only output
218 .TP
219 \fB\-F\fR
220 Special :\- Force all colors to be K only output
221 .TP
222 \fB\-fcmy\fR
223 Special :\- Force 100% C,M or Y only to stay pure
224 .TP
225 \fB\-p\fR absprof
226 Include abstract profile in link
227 .TP
228 \fB\-s\fR
229 Simple Mode (default)
230 .TP
231 \fB\-g\fR [src.gam]
232 Gamut Mapping Mode [optional source image gamut]
233 .TP
234 \fB\-G\fR [src.gam]
235 Gamut Mapping Mode using inverse outprofile A2B
236 .IP
237 Simple Mode Options:
238 \fB\-i\fR in_intent p = perceptual, r = relative colorimetric,
239 .IP
240 s = saturation, a = absolute colorimetric
241 .TP
242 \fB\-o\fR out_intent
243 p = perceptual, r = relative colorimetric,
244 s = saturation, a = absolute colorimetric
245 .TP
246 Gamut Mapping
247 Mode Options:
248 .TP
249 \fB\-i\fR intent
250 set linking intent from the following choice:
251 .IP
252 a \- Absolute Colorimetric (in Jab) [ICC Absolute Colorimetric]
253 .IP
254 aw \- Absolute Colorimetric (in Jab) with scaling to fit white point
255 aa \- Absolute Appearance
256 .IP
257 r \- White Point Matched Appearance [ICC Relative Colorimetric]
258 .IP
259 la \- Luminance axis matched Appearance
260 .IP
261 p \- Perceptual (Preferred) (Default) [ICC Perceptual]
262 .IP
263 pa \- Perceptual Apperance
264 ms \- Saturation
265 .IP
266 s \- Enhanced Saturation [ICC Saturation]
267 .IP
268 al \- Absolute Colorimetric (Lab)
269 rl \- White Point Matched Appearance (Lab)
270 .TP
271 \fB\-w\fR [J,a,b]
272 Use forced whitepoint hack [optional target point]
273 .TP
274 \fB\-c\fR viewcond
275 set source viewing conditions for CIECAM02,
276 either an enumerated choice, or a parameter
277 .TP
278 \fB\-d\fR viewcond
279 set destination viewing conditions for CIECAM02,
280 either an enumerated choice, or parameter:value changes
281 .IP
282 pp \- Practical Reflection Print (ISO\-3664 P2)
283 pe \- Print evaluation environment (CIE 116\-1995)
284 pc \- Critical print evaluation environment (ISO\-3664 P1)
285 mt \- Monitor in typical work environment
286 mb \- Bright monitor in bright work environment
287 md \- Monitor in darkened work environment
288 jm \- Projector in dim environment
289 jd \- Projector in dark environment
290 .IP
291 pcd \- Photo CD \- original scene outdoors
292 .IP
293 ob \- Original scene \- Bright Outdoors
294 cx \- Cut Sheet Transparencies on a viewing box
295 .TP
296 s:surround
297 n = auto, a = average, m = dim, d = dark,
298 c = transparency (default average)
299 .TP
300 w:X:Y:Z
301 Adapted white point as XYZ (default media white)
302 .TP
303 w:x:y
304 Adapted white point as x, y
305 .TP
306 a:adaptation
307 Adaptation luminance in cd.m^2 (default 50.0)
308 .TP
309 b:background
310 Background % of image luminance (default 20)
311 .TP
312 l:scenewhite
313 Scene white in cd.m^2 if surround = auto (default 250)
314 .TP
315 f:flare
316 Flare light % of image luminance (default 1)
317 .TP
318 f:X:Y:Z
319 Flare color as XYZ (default media white)
320 .TP
321 f:x:y
322 Flare color as x, y
323 .TP
324 \fB\-t\fR tlimit
325 set source total ink limit, 0 \- 400% (estimate by default)
326 .TP
327 \fB\-T\fR klimit
328 set source black ink limit, 0 \- 100% (estimate by default)
329 .IP
330 Inverse outprofile A2B Options:
331 \fB\-k\fR tezhxr CMYK Black generation
332 .IP
333 t = transfer K from source to destination, e = retain K of destination B2A table
334 z = zero K, h = 0.5 K, x = maximum K, r = ramp K (default)
335 .HP
336 \fB\-k\fR p stle stpo enpo enle shape
337 .IP
338 p = black target generation curve parameters
339 .HP
340 \fB\-k\fR q stle0 stpo0 enpo0 enle0 shape0 stle2 stpo2 enpo2 enle2 shape2
341 .IP
342 q = transfer source K to dual curve limits
343 .TP
344 \fB\-K\fR parameters
345 Same as \fB\-k\fR, but target is K locus rather than K value itself
346 .TP
347 \fB\-l\fR tlimit
348 set destination total ink limit, 0 \- 400% (estimate by default)
349 .TP
350 \fB\-L\fR klimit
351 set destination black ink limit, 0 \- 100% (estimate by default)
352 .TP
353 \fB\-P\fR
354 Create gamut gammap.wrl diagostic
+0
-369
debian/colprof.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH CREATE "1" "August 2013" "Create ICC profile, Version 1.5.1" "User Commands"
2 .SH NAME
3 Create \- Create ICC profile.
4 .SH DESCRIPTION
5 Create ICC profile, Version 1.5.1
6 Author: Graeme W. Gill, licensed under the AGPL Version 3
7 .IP
8 Diagnostic: Unknown flag '\-'
9 .PP
10 usage: debian/tmp/usr/bin/colprof [\-options] inoutfile
11 .TP
12 \fB\-v\fR
13 Verbose mode
14 .HP
15 \fB\-A\fR manufacturer Manufacturer description string
16 .TP
17 \fB\-M\fR model
18 Model description string
19 .TP
20 \fB\-D\fR description
21 Profile Description string (Default "inoutfile")
22 .TP
23 \fB\-C\fR copyright
24 Copyright string
25 .TP
26 \fB\-Z\fR tmnb
27 Attributes: Transparency, Matte, Negative, BlackAndWhite
28 .TP
29 \fB\-Z\fR prsa
30 Default intent: Perceptual, Rel. Colorimetric, Saturation, Abs. Colorimetric
31 .TP
32 \fB\-q\fR lmhu
33 Quality \- Low, Medium (def), High, Ultra
34 .TP
35 \fB\-b\fR [lmhun]
36 Low quality B2A table \- or specific B2A quality or none for input device
37 .TP
38 \fB\-y\fR
39 Verify A2B profile
40 .TP
41 \fB\-ni\fR
42 Don't create input (Device) shaper curves
43 .TP
44 \fB\-np\fR
45 Don't create input (Device) grid position curves
46 .TP
47 \fB\-no\fR
48 Don't create output (PCS) shaper curves
49 .TP
50 \fB\-nc\fR
51 Don't put the input .ti3 data in the profile
52 .TP
53 \fB\-k\fR zhxr
54 Black value target: z = zero K,
55 h = 0.5 K, x = max K, r = ramp K (def.)
56 .HP
57 \fB\-k\fR p stle stpo enpo enle shape
58 .IP
59 stle: K level at White 0.0 \- 1.0
60 stpo: start point of transition Wh 0.0 \- Bk 1.0
61 enpo: End point of transition Wh 0.0 \- Bk 1.0
62 enle: K level at Black 0.0 \- 1.0
63 shape: 1.0 = straight, 0.0\-1.0 concave, 1.0\-2.0 convex
64 .TP
65 \fB\-K\fR parameters
66 Same as \fB\-k\fR, but target is K locus rather than K value itself
67 .TP
68 \fB\-l\fR tlimit
69 override total ink limit, 0 \- 400% (default from .ti3)
70 .TP
71 \fB\-L\fR klimit
72 override black ink limit, 0 \- 100% (default from .ti3)
73 .TP
74 \fB\-a\fR lxXgsmGS
75 Algorithm type override
76 l = Lab cLUT (def.), x = XYZ cLUT, X = display XYZ cLUT + matrix
77 g = gamma+matrix, s = shaper+matrix, m = matrix only,
78 G = single gamma+matrix, S = single shaper+matrix
79 .TP
80 \fB\-u\fR
81 If input profile, auto scale WP to allow extrapolation
82 .TP
83 \fB\-uc\fR
84 If input profile, clip cLUT values above WP
85 .TP
86 \fB\-U\fR scale
87 If input profile, scale media white point by scale
88 .TP
89 \fB\-R\fR
90 Restrict white <= 1.0, black and primaries to be +ve
91 .TP
92 \fB\-f\fR [illum]
93 Use Fluorescent Whitening Agent compensation [opt. simulated inst. illum.:
94 .IP
95 M0, M1, M2, A, C, D50 (def.), D50M2, D65, F5, F8, F10 or file.sp]
96 .TP
97 \fB\-i\fR illum
98 Choose illuminant for computation of CIE XYZ from spectral data & FWA:
99 .IP
100 A, C, D50 (def.), D50M2, D65, F5, F8, F10 or file.sp
101 .TP
102 \fB\-o\fR observ
103 Choose CIE Observer for spectral data:
104 .IP
105 1931_2 (def), 1964_10, S&B 1955_2, shaw, J&V 1978_2
106 .TP
107 \fB\-r\fR avgdev
108 Average deviation of device+instrument readings as a percentage (default 0.50%)
109 .TP
110 \fB\-s\fR src.icc
111 Apply gamut mapping to output profile perceptual B2A table for given source space
112 .TP
113 \fB\-S\fR src.icc
114 Apply gamut mapping to output profile perceptual and saturation B2A table
115 .TP
116 \fB\-nP\fR
117 Use colormetric source gamut to make output profile perceptual table
118 .TP
119 \fB\-nS\fR
120 Use colormetric source gamut to make output profile saturation table
121 .TP
122 \fB\-g\fR src.gam
123 Use source image gamut as well for output profile gamut mapping
124 .TP
125 \fB\-p\fR absprof,...
126 Incorporate abstract profile(s) into output tables
127 .TP
128 \fB\-t\fR intent
129 Override gamut mapping intent for output profile perceptual table:
130 .TP
131 \fB\-T\fR intent
132 Override gamut mapping intent for output profile saturation table:
133 .IP
134 a \- Absolute Colorimetric (in Jab) [ICC Absolute Colorimetric]
135 .IP
136 aw \- Absolute Colorimetric (in Jab) with scaling to fit white point
137 aa \- Absolute Appearance
138 .IP
139 r \- White Point Matched Appearance [ICC Relative Colorimetric]
140 .IP
141 la \- Luminance axis matched Appearance
142 .IP
143 p \- Perceptual (Preferred) (Default) [ICC Perceptual]
144 .IP
145 pa \- Perceptual Apperance
146 ms \- Saturation
147 .IP
148 s \- Enhanced Saturation [ICC Saturation]
149 .IP
150 al \- Absolute Colorimetric (Lab)
151 rl \- White Point Matched Appearance (Lab)
152 .TP
153 \fB\-c\fR viewcond
154 set input viewing conditions for output profile CIECAM02 gamut mapping,
155 .IP
156 either an enumerated choice, or a parameter
157 .TP
158 \fB\-d\fR viewcond
159 set output viewing conditions for output profile CIECAM02 gamut mapping
160 .IP
161 either an enumerated choice, or a parameter
162 Also sets out of gamut clipping CAM space.
163 either an enumerated choice, or a series of parameters:value changes
164 .IP
165 pp \- Practical Reflection Print (ISO\-3664 P2)
166 pe \- Print evaluation environment (CIE 116\-1995)
167 pc \- Critical print evaluation environment (ISO\-3664 P1)
168 mt \- Monitor in typical work environment
169 mb \- Bright monitor in bright work environment
170 md \- Monitor in darkened work environment
171 jm \- Projector in dim environment
172 jd \- Projector in dark environment
173 .IP
174 pcd \- Photo CD \- original scene outdoors
175 .IP
176 ob \- Original scene \- Bright Outdoors
177 cx \- Cut Sheet Transparencies on a viewing box
178 .TP
179 \fB\-P\fR
180 Create gamut gammap_p.wrl and gammap_s.wrl diagostics
181 .TP
182 \fB\-O\fR outputfile
183 Override the default output filename.
184 .TP
185 inoutfile
186 Base name for input.ti3/output.icc file
187 .PP
188 Author: Graeme W. Gill, licensed under the AGPL Version 3
189 .IP
190 Diagnostic: Unknown flag '\-'
191 .PP
192 usage: debian/tmp/usr/bin/colprof [\-options] inoutfile
193 .TP
194 \fB\-v\fR
195 Verbose mode
196 .HP
197 \fB\-A\fR manufacturer Manufacturer description string
198 .TP
199 \fB\-M\fR model
200 Model description string
201 .TP
202 \fB\-D\fR description
203 Profile Description string (Default "inoutfile")
204 .TP
205 \fB\-C\fR copyright
206 Copyright string
207 .TP
208 \fB\-Z\fR tmnb
209 Attributes: Transparency, Matte, Negative, BlackAndWhite
210 .TP
211 \fB\-Z\fR prsa
212 Default intent: Perceptual, Rel. Colorimetric, Saturation, Abs. Colorimetric
213 .TP
214 \fB\-q\fR lmhu
215 Quality \- Low, Medium (def), High, Ultra
216 .TP
217 \fB\-b\fR [lmhun]
218 Low quality B2A table \- or specific B2A quality or none for input device
219 .TP
220 \fB\-y\fR
221 Verify A2B profile
222 .TP
223 \fB\-ni\fR
224 Don't create input (Device) shaper curves
225 .TP
226 \fB\-np\fR
227 Don't create input (Device) grid position curves
228 .TP
229 \fB\-no\fR
230 Don't create output (PCS) shaper curves
231 .TP
232 \fB\-nc\fR
233 Don't put the input .ti3 data in the profile
234 .TP
235 \fB\-k\fR zhxr
236 Black value target: z = zero K,
237 h = 0.5 K, x = max K, r = ramp K (def.)
238 .HP
239 \fB\-k\fR p stle stpo enpo enle shape
240 .IP
241 stle: K level at White 0.0 \- 1.0
242 stpo: start point of transition Wh 0.0 \- Bk 1.0
243 enpo: End point of transition Wh 0.0 \- Bk 1.0
244 enle: K level at Black 0.0 \- 1.0
245 shape: 1.0 = straight, 0.0\-1.0 concave, 1.0\-2.0 convex
246 .TP
247 \fB\-K\fR parameters
248 Same as \fB\-k\fR, but target is K locus rather than K value itself
249 .TP
250 \fB\-l\fR tlimit
251 override total ink limit, 0 \- 400% (default from .ti3)
252 .TP
253 \fB\-L\fR klimit
254 override black ink limit, 0 \- 100% (default from .ti3)
255 .TP
256 \fB\-a\fR lxXgsmGS
257 Algorithm type override
258 l = Lab cLUT (def.), x = XYZ cLUT, X = display XYZ cLUT + matrix
259 g = gamma+matrix, s = shaper+matrix, m = matrix only,
260 G = single gamma+matrix, S = single shaper+matrix
261 .TP
262 \fB\-u\fR
263 If input profile, auto scale WP to allow extrapolation
264 .TP
265 \fB\-uc\fR
266 If input profile, clip cLUT values above WP
267 .TP
268 \fB\-U\fR scale
269 If input profile, scale media white point by scale
270 .TP
271 \fB\-R\fR
272 Restrict white <= 1.0, black and primaries to be +ve
273 .TP
274 \fB\-f\fR [illum]
275 Use Fluorescent Whitening Agent compensation [opt. simulated inst. illum.:
276 .IP
277 M0, M1, M2, A, C, D50 (def.), D50M2, D65, F5, F8, F10 or file.sp]
278 .TP
279 \fB\-i\fR illum
280 Choose illuminant for computation of CIE XYZ from spectral data & FWA:
281 .IP
282 A, C, D50 (def.), D50M2, D65, F5, F8, F10 or file.sp
283 .TP
284 \fB\-o\fR observ
285 Choose CIE Observer for spectral data:
286 .IP
287 1931_2 (def), 1964_10, S&B 1955_2, shaw, J&V 1978_2
288 .TP
289 \fB\-r\fR avgdev
290 Average deviation of device+instrument readings as a percentage (default 0.50%)
291 .TP
292 \fB\-s\fR src.icc
293 Apply gamut mapping to output profile perceptual B2A table for given source space
294 .TP
295 \fB\-S\fR src.icc
296 Apply gamut mapping to output profile perceptual and saturation B2A table
297 .TP
298 \fB\-nP\fR
299 Use colormetric source gamut to make output profile perceptual table
300 .TP
301 \fB\-nS\fR
302 Use colormetric source gamut to make output profile saturation table
303 .TP
304 \fB\-g\fR src.gam
305 Use source image gamut as well for output profile gamut mapping
306 .TP
307 \fB\-p\fR absprof,...
308 Incorporate abstract profile(s) into output tables
309 .TP
310 \fB\-t\fR intent
311 Override gamut mapping intent for output profile perceptual table:
312 .TP
313 \fB\-T\fR intent
314 Override gamut mapping intent for output profile saturation table:
315 .IP
316 a \- Absolute Colorimetric (in Jab) [ICC Absolute Colorimetric]
317 .IP
318 aw \- Absolute Colorimetric (in Jab) with scaling to fit white point
319 aa \- Absolute Appearance
320 .IP
321 r \- White Point Matched Appearance [ICC Relative Colorimetric]
322 .IP
323 la \- Luminance axis matched Appearance
324 .IP
325 p \- Perceptual (Preferred) (Default) [ICC Perceptual]
326 .IP
327 pa \- Perceptual Apperance
328 ms \- Saturation
329 .IP
330 s \- Enhanced Saturation [ICC Saturation]
331 .IP
332 al \- Absolute Colorimetric (Lab)
333 rl \- White Point Matched Appearance (Lab)
334 .TP
335 \fB\-c\fR viewcond
336 set input viewing conditions for output profile CIECAM02 gamut mapping,
337 .IP
338 either an enumerated choice, or a parameter
339 .TP
340 \fB\-d\fR viewcond
341 set output viewing conditions for output profile CIECAM02 gamut mapping
342 .IP
343 either an enumerated choice, or a parameter
344 Also sets out of gamut clipping CAM space.
345 either an enumerated choice, or a series of parameters:value changes
346 .IP
347 pp \- Practical Reflection Print (ISO\-3664 P2)
348 pe \- Print evaluation environment (CIE 116\-1995)
349 pc \- Critical print evaluation environment (ISO\-3664 P1)
350 mt \- Monitor in typical work environment
351 mb \- Bright monitor in bright work environment
352 md \- Monitor in darkened work environment
353 jm \- Projector in dim environment
354 jd \- Projector in dark environment
355 .IP
356 pcd \- Photo CD \- original scene outdoors
357 .IP
358 ob \- Original scene \- Bright Outdoors
359 cx \- Cut Sheet Transparencies on a viewing box
360 .TP
361 \fB\-P\fR
362 Create gamut gammap_p.wrl and gammap_s.wrl diagostics
363 .TP
364 \fB\-O\fR outputfile
365 Override the default output filename.
366 .TP
367 inoutfile
368 Base name for input.ti3/output.icc file
+0
-1
debian/compat less more
0 9
+0
-114
debian/control less more
0 Source: argyll
1 Section: graphics
2 Priority: optional
3 Maintainer: Debian QA Group <packages@qa.debian.org>
4 Homepage: http://www.argyllcms.com/
5 Standards-Version: 3.9.5
6 Build-Depends: debhelper (>= 9), libtiff-dev, libx11-dev, libxxf86vm-dev,
7 x11proto-xf86vidmode-dev, libxinerama-dev, libxrandr-dev, x11proto-scrnsaver-dev,
8 libxss-dev, libusbhid-dev [kfreebsd-any], autoconf, automake | automaken, libtool,
9 quilt, libjpeg-dev, libusb-dev, dh-autoreconf
10
11 Package: argyll
12 Architecture: any
13 Depends: ${misc:Depends}, ${shlibs:Depends}
14 Replaces: argyll-bin
15 Recommends: libpam-systemd [linux-any], udev (>= 196) [linux-any]
16 Suggests: colord, gir1.2-colordgtk-1.0
17 Conflicts: argyll-bin
18 Description: Color Management System, calibrator and profiler
19 Argyll is an experimental, open source, ICC compatible color management
20 system. It supports accurate ICC profile creation for scanners, CMYK
21 printers, film recorders and calibration and profiling of displays.
22 Spectral sample data is supported, allowing a selection of illuminants
23 observer types, and paper fluorescent whitener additive compensation.
24 Profiles can also incorporate source specific gamut mappings for perceptual
25 and saturation intents. Gamut mapping and profile linking uses the CIECAM02
26 appearance model, a unique gamut mapping algorithm, and a wide selection of
27 rendering intents. It also includes code for the fastest portable 8 bit
28 raster color conversion engine available anywhere, as well as support for
29 fast, fully accurate 16 bit conversion. Device color gamuts can also be
30 viewed and compared using a VRML viewer.
31
32 Package: argyll-dbg
33 Section: debug
34 Architecture: any
35 Priority: extra
36 Depends: argyll (= ${binary:Version}), ${misc:Depends}
37 Description: debugging symbols for argyll
38 Argyll is an experimental, open source, ICC compatible color management
39 system. It supports accurate ICC profile creation for scanners, CMYK
40 printers, film recorders and calibration and profiling of displays.
41 .
42 This package contains the debugging symbols for argyll, libicc and libimdi
43 libraries
44
45 Package: icc-utils
46 Section: graphics
47 Architecture: any
48 Depends: ${shlibs:Depends}, ${misc:Depends}
49 Breaks: libicc2 (<< 2.12+argyll1.4.0-2)
50 Replaces: libicc2 (<< 2.12+argyll1.4.0-2)
51 Description: ICC profile I/O library
52 The icclib is a set of routines which implement the reading and
53 writing of color profile files that conform to the International
54 Color Consortium (ICC) Profile Format Specification, Version 3.4.
55 .
56 This package contains two utilities :
57 .
58 * iccdump : dump an ICC file in human readable form.
59 * icclu : translate colors through an ICC profile.
60
61 Package: libicc-dev
62 Section: libdevel
63 Architecture: any
64 Multi-Arch: same
65 Depends: libicc2 (= ${binary:Version}), ${misc:Depends}
66 Conflicts: argyll (<< 1.0.3+dfsg1-3)
67 Description: Development files for the ICC profile I/O library
68 The icclib is a set of routines which implement the reading and
69 writing of color profile files that conform to the International
70 Color Consortium (ICC) Profile Format Specification, Version 3.4.
71 .
72 This package is needed to compile programs against libicc2, as
73 it only includes the header files and static libraries (optionally)
74 needed for compiling.
75
76 Package: libicc2
77 Section: libs
78 Architecture: any
79 Multi-Arch: same
80 Pre-Depends: ${misc:Pre-Depends}
81 Depends: ${shlibs:Depends}, ${misc:Depends}
82 Replaces: argyll
83 Description: ICC profile I/O library
84 The icclib is a set of routines which implement the reading and
85 writing of color profile files that conform to the International
86 Color Consortium (ICC) Profile Format Specification, Version 3.4.
87
88 Package: libimdi-dev
89 Section: libdevel
90 Architecture: any
91 Multi-Arch: same
92 Depends: libimdi0 (= ${binary:Version}), ${misc:Depends}
93 Conflicts: argyll (<< 1.3.0-3)
94 Description: Development files for the IMDI library
95 The Interger Multi-Dimensional Interpolation routines provides a flexible
96 and high performance system for applying color transforms to typical raster
97 pixel data.
98 .
99 This package is needed to compile programs against libimdi0, as
100 it only includes the header files and static libraries (optionally)
101 needed for compiling.
102
103 Package: libimdi0
104 Section: libs
105 Architecture: any
106 Multi-Arch: same
107 Pre-Depends: ${misc:Pre-Depends}
108 Depends: ${shlibs:Depends}, ${misc:Depends}
109 Conflicts: argyll (<< 1.3.0-3)
110 Description: Integer Multi-Dimensional Interpolation routines (IMDI) library
111 The Interger Multi-Dimensional Interpolation routines provides a flexible
112 and high performance system for applying color transforms to typical raster
113 pixel data.
+0
-823
debian/copyright less more
0 Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=59
1 Name: ArgyllCMS
2 Maintainer: Graeme W. Gill <Graeme@argyllcms.com>
3 Source: http://www.argyllcms.com/
4
5 Files: *
6 Copyright: Copyright 1995-2010, Graeme W. Gill <Graeme@argyllcms.com>
7 License: AGPL-3
8 GNU AFFERO GENERAL PUBLIC LICENSE
9 Version 3, 19 November 2007
10
11 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
12 Everyone is permitted to copy and distribute verbatim copies
13 of this license document, but changing it is not allowed.
14
15 Preamble
16
17 The GNU Affero General Public License is a free, copyleft license for
18 software and other kinds of works, specifically designed to ensure
19 cooperation with the community in the case of network server software.
20
21 The licenses for most software and other practical works are designed
22 to take away your freedom to share and change the works. By contrast,
23 our General Public Licenses are intended to guarantee your freedom to
24 share and change all versions of a program--to make sure it remains free
25 software for all its users.
26
27 When we speak of free software, we are referring to freedom, not
28 price. Our General Public Licenses are designed to make sure that you
29 have the freedom to distribute copies of free software (and charge for
30 them if you wish), that you receive source code or can get it if you
31 want it, that you can change the software or use pieces of it in new
32 free programs, and that you know you can do these things.
33
34 Developers that use our General Public Licenses protect your rights
35 with two steps: (1) assert copyright on the software, and (2) offer
36 you this License which gives you legal permission to copy, distribute
37 and/or modify the software.
38
39 A secondary benefit of defending all users' freedom is that
40 improvements made in alternate versions of the program, if they
41 receive widespread use, become available for other developers to
42 incorporate. Many developers of free software are heartened and
43 encouraged by the resulting cooperation. However, in the case of
44 software used on network servers, this result may fail to come about.
45 The GNU General Public License permits making a modified version and
46 letting the public access it on a server without ever releasing its
47 source code to the public.
48
49 The GNU Affero General Public License is designed specifically to
50 ensure that, in such cases, the modified source code becomes available
51 to the community. It requires the operator of a network server to
52 provide the source code of the modified version running there to the
53 users of that server. Therefore, public use of a modified version, on
54 a publicly accessible server, gives the public access to the source
55 code of the modified version.
56
57 An older license, called the Affero General Public License and
58 published by Affero, was designed to accomplish similar goals. This is
59 a different license, not a version of the Affero GPL, but Affero has
60 released a new version of the Affero GPL which permits relicensing under
61 this license.
62
63 The precise terms and conditions for copying, distribution and
64 modification follow.
65
66 TERMS AND CONDITIONS
67
68 0. Definitions.
69
70 "This License" refers to version 3 of the GNU Affero General Public License.
71
72 "Copyright" also means copyright-like laws that apply to other kinds of
73 works, such as semiconductor masks.
74
75 "The Program" refers to any copyrightable work licensed under this
76 License. Each licensee is addressed as "you". "Licensees" and
77 "recipients" may be individuals or organizations.
78
79 To "modify" a work means to copy from or adapt all or part of the work
80 in a fashion requiring copyright permission, other than the making of an
81 exact copy. The resulting work is called a "modified version" of the
82 earlier work or a work "based on" the earlier work.
83
84 A "covered work" means either the unmodified Program or a work based
85 on the Program.
86
87 To "propagate" a work means to do anything with it that, without
88 permission, would make you directly or secondarily liable for
89 infringement under applicable copyright law, except executing it on a
90 computer or modifying a private copy. Propagation includes copying,
91 distribution (with or without modification), making available to the
92 public, and in some countries other activities as well.
93
94 To "convey" a work means any kind of propagation that enables other
95 parties to make or receive copies. Mere interaction with a user through
96 a computer network, with no transfer of a copy, is not conveying.
97
98 An interactive user interface displays "Appropriate Legal Notices"
99 to the extent that it includes a convenient and prominently visible
100 feature that (1) displays an appropriate copyright notice, and (2)
101 tells the user that there is no warranty for the work (except to the
102 extent that warranties are provided), that licensees may convey the
103 work under this License, and how to view a copy of this License. If
104 the interface presents a list of user commands or options, such as a
105 menu, a prominent item in the list meets this criterion.
106
107 1. Source Code.
108
109 The "source code" for a work means the preferred form of the work
110 for making modifications to it. "Object code" means any non-source
111 form of a work.
112
113 A "Standard Interface" means an interface that either is an official
114 standard defined by a recognized standards body, or, in the case of
115 interfaces specified for a particular programming language, one that
116 is widely used among developers working in that language.
117
118 The "System Libraries" of an executable work include anything, other
119 than the work as a whole, that (a) is included in the normal form of
120 packaging a Major Component, but which is not part of that Major
121 Component, and (b) serves only to enable use of the work with that
122 Major Component, or to implement a Standard Interface for which an
123 implementation is available to the public in source code form. A
124 "Major Component", in this context, means a major essential component
125 (kernel, window system, and so on) of the specific operating system
126 (if any) on which the executable work runs, or a compiler used to
127 produce the work, or an object code interpreter used to run it.
128
129 The "Corresponding Source" for a work in object code form means all
130 the source code needed to generate, install, and (for an executable
131 work) run the object code and to modify the work, including scripts to
132 control those activities. However, it does not include the work's
133 System Libraries, or general-purpose tools or generally available free
134 programs which are used unmodified in performing those activities but
135 which are not part of the work. For example, Corresponding Source
136 includes interface definition files associated with source files for
137 the work, and the source code for shared libraries and dynamically
138 linked subprograms that the work is specifically designed to require,
139 such as by intimate data communication or control flow between those
140 subprograms and other parts of the work.
141
142 The Corresponding Source need not include anything that users
143 can regenerate automatically from other parts of the Corresponding
144 Source.
145
146 The Corresponding Source for a work in source code form is that
147 same work.
148
149 2. Basic Permissions.
150
151 All rights granted under this License are granted for the term of
152 copyright on the Program, and are irrevocable provided the stated
153 conditions are met. This License explicitly affirms your unlimited
154 permission to run the unmodified Program. The output from running a
155 covered work is covered by this License only if the output, given its
156 content, constitutes a covered work. This License acknowledges your
157 rights of fair use or other equivalent, as provided by copyright law.
158
159 You may make, run and propagate covered works that you do not
160 convey, without conditions so long as your license otherwise remains
161 in force. You may convey covered works to others for the sole purpose
162 of having them make modifications exclusively for you, or provide you
163 with facilities for running those works, provided that you comply with
164 the terms of this License in conveying all material for which you do
165 not control copyright. Those thus making or running the covered works
166 for you must do so exclusively on your behalf, under your direction
167 and control, on terms that prohibit them from making any copies of
168 your copyrighted material outside their relationship with you.
169
170 Conveying under any other circumstances is permitted solely under
171 the conditions stated below. Sublicensing is not allowed; section 10
172 makes it unnecessary.
173
174 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
175
176 No covered work shall be deemed part of an effective technological
177 measure under any applicable law fulfilling obligations under article
178 11 of the WIPO copyright treaty adopted on 20 December 1996, or
179 similar laws prohibiting or restricting circumvention of such
180 measures.
181
182 When you convey a covered work, you waive any legal power to forbid
183 circumvention of technological measures to the extent such circumvention
184 is effected by exercising rights under this License with respect to
185 the covered work, and you disclaim any intention to limit operation or
186 modification of the work as a means of enforcing, against the work's
187 users, your or third parties' legal rights to forbid circumvention of
188 technological measures.
189
190 4. Conveying Verbatim Copies.
191
192 You may convey verbatim copies of the Program's source code as you
193 receive it, in any medium, provided that you conspicuously and
194 appropriately publish on each copy an appropriate copyright notice;
195 keep intact all notices stating that this License and any
196 non-permissive terms added in accord with section 7 apply to the code;
197 keep intact all notices of the absence of any warranty; and give all
198 recipients a copy of this License along with the Program.
199
200 You may charge any price or no price for each copy that you convey,
201 and you may offer support or warranty protection for a fee.
202
203 5. Conveying Modified Source Versions.
204
205 You may convey a work based on the Program, or the modifications to
206 produce it from the Program, in the form of source code under the
207 terms of section 4, provided that you also meet all of these conditions:
208
209 a) The work must carry prominent notices stating that you modified
210 it, and giving a relevant date.
211
212 b) The work must carry prominent notices stating that it is
213 released under this License and any conditions added under section
214 7. This requirement modifies the requirement in section 4 to
215 "keep intact all notices".
216
217 c) You must license the entire work, as a whole, under this
218 License to anyone who comes into possession of a copy. This
219 License will therefore apply, along with any applicable section 7
220 additional terms, to the whole of the work, and all its parts,
221 regardless of how they are packaged. This License gives no
222 permission to license the work in any other way, but it does not
223 invalidate such permission if you have separately received it.
224
225 d) If the work has interactive user interfaces, each must display
226 Appropriate Legal Notices; however, if the Program has interactive
227 interfaces that do not display Appropriate Legal Notices, your
228 work need not make them do so.
229
230 A compilation of a covered work with other separate and independent
231 works, which are not by their nature extensions of the covered work,
232 and which are not combined with it such as to form a larger program,
233 in or on a volume of a storage or distribution medium, is called an
234 "aggregate" if the compilation and its resulting copyright are not
235 used to limit the access or legal rights of the compilation's users
236 beyond what the individual works permit. Inclusion of a covered work
237 in an aggregate does not cause this License to apply to the other
238 parts of the aggregate.
239
240 6. Conveying Non-Source Forms.
241
242 You may convey a covered work in object code form under the terms
243 of sections 4 and 5, provided that you also convey the
244 machine-readable Corresponding Source under the terms of this License,
245 in one of these ways:
246
247 a) Convey the object code in, or embodied in, a physical product
248 (including a physical distribution medium), accompanied by the
249 Corresponding Source fixed on a durable physical medium
250 customarily used for software interchange.
251
252 b) Convey the object code in, or embodied in, a physical product
253 (including a physical distribution medium), accompanied by a
254 written offer, valid for at least three years and valid for as
255 long as you offer spare parts or customer support for that product
256 model, to give anyone who possesses the object code either (1) a
257 copy of the Corresponding Source for all the software in the
258 product that is covered by this License, on a durable physical
259 medium customarily used for software interchange, for a price no
260 more than your reasonable cost of physically performing this
261 conveying of source, or (2) access to copy the
262 Corresponding Source from a network server at no charge.
263
264 c) Convey individual copies of the object code with a copy of the
265 written offer to provide the Corresponding Source. This
266 alternative is allowed only occasionally and noncommercially, and
267 only if you received the object code with such an offer, in accord
268 with subsection 6b.
269
270 d) Convey the object code by offering access from a designated
271 place (gratis or for a charge), and offer equivalent access to the
272 Corresponding Source in the same way through the same place at no
273 further charge. You need not require recipients to copy the
274 Corresponding Source along with the object code. If the place to
275 copy the object code is a network server, the Corresponding Source
276 may be on a different server (operated by you or a third party)
277 that supports equivalent copying facilities, provided you maintain
278 clear directions next to the object code saying where to find the
279 Corresponding Source. Regardless of what server hosts the
280 Corresponding Source, you remain obligated to ensure that it is
281 available for as long as needed to satisfy these requirements.
282
283 e) Convey the object code using peer-to-peer transmission, provided
284 you inform other peers where the object code and Corresponding
285 Source of the work are being offered to the general public at no
286 charge under subsection 6d.
287
288 A separable portion of the object code, whose source code is excluded
289 from the Corresponding Source as a System Library, need not be
290 included in conveying the object code work.
291
292 A "User Product" is either (1) a "consumer product", which means any
293 tangible personal property which is normally used for personal, family,
294 or household purposes, or (2) anything designed or sold for incorporation
295 into a dwelling. In determining whether a product is a consumer product,
296 doubtful cases shall be resolved in favor of coverage. For a particular
297 product received by a particular user, "normally used" refers to a
298 typical or common use of that class of product, regardless of the status
299 of the particular user or of the way in which the particular user
300 actually uses, or expects or is expected to use, the product. A product
301 is a consumer product regardless of whether the product has substantial
302 commercial, industrial or non-consumer uses, unless such uses represent
303 the only significant mode of use of the product.
304
305 "Installation Information" for a User Product means any methods,
306 procedures, authorization keys, or other information required to install
307 and execute modified versions of a covered work in that User Product from
308 a modified version of its Corresponding Source. The information must
309 suffice to ensure that the continued functioning of the modified object
310 code is in no case prevented or interfered with solely because
311 modification has been made.
312
313 If you convey an object code work under this section in, or with, or
314 specifically for use in, a User Product, and the conveying occurs as
315 part of a transaction in which the right of possession and use of the
316 User Product is transferred to the recipient in perpetuity or for a
317 fixed term (regardless of how the transaction is characterized), the
318 Corresponding Source conveyed under this section must be accompanied
319 by the Installation Information. But this requirement does not apply
320 if neither you nor any third party retains the ability to install
321 modified object code on the User Product (for example, the work has
322 been installed in ROM).
323
324 The requirement to provide Installation Information does not include a
325 requirement to continue to provide support service, warranty, or updates
326 for a work that has been modified or installed by the recipient, or for
327 the User Product in which it has been modified or installed. Access to a
328 network may be denied when the modification itself materially and
329 adversely affects the operation of the network or violates the rules and
330 protocols for communication across the network.
331
332 Corresponding Source conveyed, and Installation Information provided,
333 in accord with this section must be in a format that is publicly
334 documented (and with an implementation available to the public in
335 source code form), and must require no special password or key for
336 unpacking, reading or copying.
337
338 7. Additional Terms.
339
340 "Additional permissions" are terms that supplement the terms of this
341 License by making exceptions from one or more of its conditions.
342 Additional permissions that are applicable to the entire Program shall
343 be treated as though they were included in this License, to the extent
344 that they are valid under applicable law. If additional permissions
345 apply only to part of the Program, that part may be used separately
346 under those permissions, but the entire Program remains governed by
347 this License without regard to the additional permissions.
348
349 When you convey a copy of a covered work, you may at your option
350 remove any additional permissions from that copy, or from any part of
351 it. (Additional permissions may be written to require their own
352 removal in certain cases when you modify the work.) You may place
353 additional permissions on material, added by you to a covered work,
354 for which you have or can give appropriate copyright permission.
355
356 Notwithstanding any other provision of this License, for material you
357 add to a covered work, you may (if authorized by the copyright holders of
358 that material) supplement the terms of this License with terms:
359
360 a) Disclaiming warranty or limiting liability differently from the
361 terms of sections 15 and 16 of this License; or
362
363 b) Requiring preservation of specified reasonable legal notices or
364 author attributions in that material or in the Appropriate Legal
365 Notices displayed by works containing it; or
366
367 c) Prohibiting misrepresentation of the origin of that material, or
368 requiring that modified versions of such material be marked in
369 reasonable ways as different from the original version; or
370
371 d) Limiting the use for publicity purposes of names of licensors or
372 authors of the material; or
373
374 e) Declining to grant rights under trademark law for use of some
375 trade names, trademarks, or service marks; or
376
377 f) Requiring indemnification of licensors and authors of that
378 material by anyone who conveys the material (or modified versions of
379 it) with contractual assumptions of liability to the recipient, for
380 any liability that these contractual assumptions directly impose on
381 those licensors and authors.
382
383 All other non-permissive additional terms are considered "further
384 restrictions" within the meaning of section 10. If the Program as you
385 received it, or any part of it, contains a notice stating that it is
386 governed by this License along with a term that is a further
387 restriction, you may remove that term. If a license document contains
388 a further restriction but permits relicensing or conveying under this
389 License, you may add to a covered work material governed by the terms
390 of that license document, provided that the further restriction does
391 not survive such relicensing or conveying.
392
393 If you add terms to a covered work in accord with this section, you
394 must place, in the relevant source files, a statement of the
395 additional terms that apply to those files, or a notice indicating
396 where to find the applicable terms.
397
398 Additional terms, permissive or non-permissive, may be stated in the
399 form of a separately written license, or stated as exceptions;
400 the above requirements apply either way.
401
402 8. Termination.
403
404 You may not propagate or modify a covered work except as expressly
405 provided under this License. Any attempt otherwise to propagate or
406 modify it is void, and will automatically terminate your rights under
407 this License (including any patent licenses granted under the third
408 paragraph of section 11).
409
410 However, if you cease all violation of this License, then your
411 license from a particular copyright holder is reinstated (a)
412 provisionally, unless and until the copyright holder explicitly and
413 finally terminates your license, and (b) permanently, if the copyright
414 holder fails to notify you of the violation by some reasonable means
415 prior to 60 days after the cessation.
416
417 Moreover, your license from a particular copyright holder is
418 reinstated permanently if the copyright holder notifies you of the
419 violation by some reasonable means, this is the first time you have
420 received notice of violation of this License (for any work) from that
421 copyright holder, and you cure the violation prior to 30 days after
422 your receipt of the notice.
423
424 Termination of your rights under this section does not terminate the
425 licenses of parties who have received copies or rights from you under
426 this License. If your rights have been terminated and not permanently
427 reinstated, you do not qualify to receive new licenses for the same
428 material under section 10.
429
430 9. Acceptance Not Required for Having Copies.
431
432 You are not required to accept this License in order to receive or
433 run a copy of the Program. Ancillary propagation of a covered work
434 occurring solely as a consequence of using peer-to-peer transmission
435 to receive a copy likewise does not require acceptance. However,
436 nothing other than this License grants you permission to propagate or
437 modify any covered work. These actions infringe copyright if you do
438 not accept this License. Therefore, by modifying or propagating a
439 covered work, you indicate your acceptance of this License to do so.
440
441 10. Automatic Licensing of Downstream Recipients.
442
443 Each time you convey a covered work, the recipient automatically
444 receives a license from the original licensors, to run, modify and
445 propagate that work, subject to this License. You are not responsible
446 for enforcing compliance by third parties with this License.
447
448 An "entity transaction" is a transaction transferring control of an
449 organization, or substantially all assets of one, or subdividing an
450 organization, or merging organizations. If propagation of a covered
451 work results from an entity transaction, each party to that
452 transaction who receives a copy of the work also receives whatever
453 licenses to the work the party's predecessor in interest had or could
454 give under the previous paragraph, plus a right to possession of the
455 Corresponding Source of the work from the predecessor in interest, if
456 the predecessor has it or can get it with reasonable efforts.
457
458 You may not impose any further restrictions on the exercise of the
459 rights granted or affirmed under this License. For example, you may
460 not impose a license fee, royalty, or other charge for exercise of
461 rights granted under this License, and you may not initiate litigation
462 (including a cross-claim or counterclaim in a lawsuit) alleging that
463 any patent claim is infringed by making, using, selling, offering for
464 sale, or importing the Program or any portion of it.
465
466 11. Patents.
467
468 A "contributor" is a copyright holder who authorizes use under this
469 License of the Program or a work on which the Program is based. The
470 work thus licensed is called the contributor's "contributor version".
471
472 A contributor's "essential patent claims" are all patent claims
473 owned or controlled by the contributor, whether already acquired or
474 hereafter acquired, that would be infringed by some manner, permitted
475 by this License, of making, using, or selling its contributor version,
476 but do not include claims that would be infringed only as a
477 consequence of further modification of the contributor version. For
478 purposes of this definition, "control" includes the right to grant
479 patent sublicenses in a manner consistent with the requirements of
480 this License.
481
482 Each contributor grants you a non-exclusive, worldwide, royalty-free
483 patent license under the contributor's essential patent claims, to
484 make, use, sell, offer for sale, import and otherwise run, modify and
485 propagate the contents of its contributor version.
486
487 In the following three paragraphs, a "patent license" is any express
488 agreement or commitment, however denominated, not to enforce a patent
489 (such as an express permission to practice a patent or covenant not to
490 sue for patent infringement). To "grant" such a patent license to a
491 party means to make such an agreement or commitment not to enforce a
492 patent against the party.
493
494 If you convey a covered work, knowingly relying on a patent license,
495 and the Corresponding Source of the work is not available for anyone
496 to copy, free of charge and under the terms of this License, through a
497 publicly available network server or other readily accessible means,
498 then you must either (1) cause the Corresponding Source to be so
499 available, or (2) arrange to deprive yourself of the benefit of the
500 patent license for this particular work, or (3) arrange, in a manner
501 consistent with the requirements of this License, to extend the patent
502 license to downstream recipients. "Knowingly relying" means you have
503 actual knowledge that, but for the patent license, your conveying the
504 covered work in a country, or your recipient's use of the covered work
505 in a country, would infringe one or more identifiable patents in that
506 country that you have reason to believe are valid.
507
508 If, pursuant to or in connection with a single transaction or
509 arrangement, you convey, or propagate by procuring conveyance of, a
510 covered work, and grant a patent license to some of the parties
511 receiving the covered work authorizing them to use, propagate, modify
512 or convey a specific copy of the covered work, then the patent license
513 you grant is automatically extended to all recipients of the covered
514 work and works based on it.
515
516 A patent license is "discriminatory" if it does not include within
517 the scope of its coverage, prohibits the exercise of, or is
518 conditioned on the non-exercise of one or more of the rights that are
519 specifically granted under this License. You may not convey a covered
520 work if you are a party to an arrangement with a third party that is
521 in the business of distributing software, under which you make payment
522 to the third party based on the extent of your activity of conveying
523 the work, and under which the third party grants, to any of the
524 parties who would receive the covered work from you, a discriminatory
525 patent license (a) in connection with copies of the covered work
526 conveyed by you (or copies made from those copies), or (b) primarily
527 for and in connection with specific products or compilations that
528 contain the covered work, unless you entered into that arrangement,
529 or that patent license was granted, prior to 28 March 2007.
530
531 Nothing in this License shall be construed as excluding or limiting
532 any implied license or other defenses to infringement that may
533 otherwise be available to you under applicable patent law.
534
535 12. No Surrender of Others' Freedom.
536
537 If conditions are imposed on you (whether by court order, agreement or
538 otherwise) that contradict the conditions of this License, they do not
539 excuse you from the conditions of this License. If you cannot convey a
540 covered work so as to satisfy simultaneously your obligations under this
541 License and any other pertinent obligations, then as a consequence you may
542 not convey it at all. For example, if you agree to terms that obligate you
543 to collect a royalty for further conveying from those to whom you convey
544 the Program, the only way you could satisfy both those terms and this
545 License would be to refrain entirely from conveying the Program.
546
547 13. Remote Network Interaction; Use with the GNU General Public License.
548
549 Notwithstanding any other provision of this License, if you modify the
550 Program, your modified version must prominently offer all users
551 interacting with it remotely through a computer network (if your version
552 supports such interaction) an opportunity to receive the Corresponding
553 Source of your version by providing access to the Corresponding Source
554 from a network server at no charge, through some standard or customary
555 means of facilitating copying of software. This Corresponding Source
556 shall include the Corresponding Source for any work covered by version 3
557 of the GNU General Public License that is incorporated pursuant to the
558 following paragraph.
559
560 Notwithstanding any other provision of this License, you have
561 permission to link or combine any covered work with a work licensed
562 under version 3 of the GNU General Public License into a single
563 combined work, and to convey the resulting work. The terms of this
564 License will continue to apply to the part which is the covered work,
565 but the work with which it is combined will remain governed by version
566 3 of the GNU General Public License.
567
568 14. Revised Versions of this License.
569
570 The Free Software Foundation may publish revised and/or new versions of
571 the GNU Affero General Public License from time to time. Such new versions
572 will be similar in spirit to the present version, but may differ in detail to
573 address new problems or concerns.
574
575 Each version is given a distinguishing version number. If the
576 Program specifies that a certain numbered version of the GNU Affero General
577 Public License "or any later version" applies to it, you have the
578 option of following the terms and conditions either of that numbered
579 version or of any later version published by the Free Software
580 Foundation. If the Program does not specify a version number of the
581 GNU Affero General Public License, you may choose any version ever published
582 by the Free Software Foundation.
583
584 If the Program specifies that a proxy can decide which future
585 versions of the GNU Affero General Public License can be used, that proxy's
586 public statement of acceptance of a version permanently authorizes you
587 to choose that version for the Program.
588
589 Later license versions may give you additional or different
590 permissions. However, no additional obligations are imposed on any
591 author or copyright holder as a result of your choosing to follow a
592 later version.
593
594 15. Disclaimer of Warranty.
595
596 THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
597 APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
598 HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
599 OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
600 THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
601 PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
602 IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
603 ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
604
605 16. Limitation of Liability.
606
607 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
608 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
609 THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
610 GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
611 USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
612 DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
613 PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
614 EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
615 SUCH DAMAGES.
616
617 17. Interpretation of Sections 15 and 16.
618
619 If the disclaimer of warranty and limitation of liability provided
620 above cannot be given local legal effect according to their terms,
621 reviewing courts shall apply local law that most closely approximates
622 an absolute waiver of all civil liability in connection with the
623 Program, unless a warranty or assumption of liability accompanies a
624 copy of the Program in return for a fee.
625
626 END OF TERMS AND CONDITIONS
627
628 How to Apply These Terms to Your New Programs
629
630 If you develop a new program, and you want it to be of the greatest
631 possible use to the public, the best way to achieve this is to make it
632 free software which everyone can redistribute and change under these terms.
633
634 To do so, attach the following notices to the program. It is safest
635 to attach them to the start of each source file to most effectively
636 state the exclusion of warranty; and each file should have at least
637 the "copyright" line and a pointer to where the full notice is found.
638
639 <one line to give the program's name and a brief idea of what it does.>
640 Copyright (C) <year> <name of author>
641
642 This program is free software: you can redistribute it and/or modify
643 it under the terms of the GNU Affero General Public License as published by
644 the Free Software Foundation, either version 3 of the License, or
645 (at your option) any later version.
646
647 This program is distributed in the hope that it will be useful,
648 but WITHOUT ANY WARRANTY; without even the implied warranty of
649 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
650 GNU Affero General Public License for more details.
651
652 You should have received a copy of the GNU Affero General Public License
653 along with this program. If not, see <http://www.gnu.org/licenses/>.
654
655 Also add information on how to contact you by electronic and paper mail.
656
657 If your software can interact with users remotely through a computer
658 network, you should also make sure that it provides a way for users to
659 get its source. For example, if your program is a web application, its
660 interface could display a "Source" link that leads users to an archive
661 of the code. There are many ways you could offer source, and different
662 solutions will be better for different programs; see section 13 for the
663 specific requirements.
664
665 You should also get your employer (if you work as a programmer) or school,
666 if any, to sign a "copyright disclaimer" for the program, if necessary.
667 For more information on this, and how to apply and follow the GNU AGPL, see
668 <http://www.gnu.org/licenses/>.
669
670
671 Files: icc/*, cgats/*, jcnf/*, ucmm/*
672 Copyright: Copyright 1995-2011, Graeme W. Gill
673 License: MIT/X11
674 Permission is hereby granted, free of charge, to any person obtaining a copy
675 of this software and associated documentation files (the "Software"), to deal
676 in the Software without restriction, including without limitation the rights
677 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
678 copies of the Software, and to permit persons to whom the Software is
679 furnished to do so, subject to the following conditions:
680
681 The above copyright notice and this permission notice shall be included in
682 all copies or substantial portions of the Software.
683
684 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
685 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
686 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
687 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
688 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
689 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
690 THE SOFTWARE.
691
692 Files: jcnf/yajl/*
693 Copyright: Copyright 2007, Lloyd Hilaiel
694 License: BSD-3
695
696 Files: libusb/*
697 Copyright: Copyright 2000-2003, Johannes Erdfelt <johannes@erdfelt.com>
698 Copyright: Copyright 2003, Brad Hards <bradh@frogmouth.net>
699 Copyright: Copyright Thomas Sailer <sailer@ife.ee.ethz.ch>
700 License: GPL-2+
701
702 Files: libusb/usb.h.in
703 Copyright: Copyright 2000-2003, Johannes Erdfelt <johannes@erdfelt.com>
704 License: GPL-2+ | BSD-3
705
706 Files: libusbw/*
707 Copyright: Copyright 2000-2004, Johannes Erdfelt <johannes@erdfelt.com>
708 Copyright: Copyright 2002-2005, Stephan Meyer <ste_meyer@web.de>
709 Copyright: Copyright Thomas Sailer <sailer@ife.ee.ethz.ch>
710 License: GPL-2 and LGPL-2
711 The library (DLL) is distributed under the terms of the GNU Lesser
712 General Public License (LGPL).
713
714 All other components (drivers, services, installer) are distributed
715 under the terms of the GNU General Public License (GPL).
716
717 Files: libusb1/msvc/*
718 Copyright: Copyright 2006, Alexander Chemeris
719 License: BSD-2
720
721 Files: libusb1/*
722 Copyright: Copyright 2001, Johannes Erdfelt <johannes@erdfelt.com>
723 Copyright: Copyright 2007-2009, Daniel Drake <dsd@gentoo.org>
724 Copyright: Copyright 2008-2009, Nathan Hjelm <hjelmn@users.sourceforge.net>
725 Copyright: Copyright 2009-2010, Pete Batard <pbatard@gmail.com>
726 Copyright: Copyright 2010, Michael Plante <michael.plante@gmail.com>
727 License: LGPL-2+
728
729 Files: libusb1/os/driver/*
730 Copyright: Copyright 2002-2005, Stephan Meyer <ste_meyer@web.de>
731 License: GPL-2+
732
733 Files: spectro/*
734 Copyright: Copyright 1996-2011, Graeme W. Gill
735 License: GPL-2+
736
737 Files:
738 spectro/dispcal.c
739 spectro/dispsup.c
740 spectro/dispsup.h
741 spectro/dispwin.c
742 spectro/dispwin.h
743 spectro/average.c
744 spectro/synthcal.c
745 spectro/synthread.c
746 spectro/ccxxmake.c
747 spectro/fakeread.c
748 spectro/License.txt
749 spectro/chartread.c
750 spectro/dispread.c
751 spectro/illumread.c
752 Copyright: Copyright 1996-2007, Graeme W. Gill
753 License: AGPL-3
754
755 Files: h/sort.h
756 Copyright: Copyright 1996-2010, Graeme W. Gill
757 License: GPL-2+
758
759 Files: tiff/*
760 Copyright: Copyright 1988-1997, Sam Leffler
761 Copyright: Copyright 1991-1997, Silicon Graphics, Inc.
762 License: MIT/X11
763 Permission to use, copy, modify, distribute, and sell this software and
764 its documentation for any purpose is hereby granted without fee, provided
765 that (i) the above copyright notices and this permission notice appear in
766 all copies of the software and related documentation, and (ii) the names of
767 Sam Leffler and Silicon Graphics may not be used in any advertising or
768 publicity relating to the software without the specific, prior written
769 permission of Sam Leffler and Silicon Graphics.
770
771 THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
772 EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
773 WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
774
775 IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
776 ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
777 OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
778 WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
779 LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
780 OF THIS SOFTWARE.
781
782 Files: tiff/contrib/addtiffo/*
783 Copyright: Copyright 1999, Frank Warmerdam
784 License: MIT/X11
785 Same as above.
786
787 Files: tiff/contrib/dbs/*
788 Copyright: Copyright 1990, Digital Equipment Corporation
789 License: MIT/X11
790 Same as above.
791
792 Files: tiff/contrib/mfs/*
793 Copyright: Copyright 1996 BancTec AB
794 Copyright: Copyright 1996 Mike Johnson
795 License: MIT/X11
796 Same as above.
797
798 Files: tiff/contrib/ras/*
799 Copyright: Copyright 1990, Sun Microsystems, Inc.
800 License: MIT/X11
801 Same as above.
802
803 Files: xicc/xspect.c
804 Copyright: Copyright 2000-2006, Graeme W. Gill
805 License: GPL-2+
806
807 Files: doc/*
808 Copyright: Copyright 1995-2010, Graeme W. Gill <Graeme@argyllcms.com>
809 License: GFDL-1.3
810
811 Files: numlib/numsup.*
812 Copyright: Copyright 1997-2010, Graeme W. Gill
813 License: GPL-2+
814
815 Files: rspl/rspl1.*
816 Copyright: 1996-2010, Graeme W. Gill
817 License: GPL-2+
818
819 Files: debian/*
820 Copyright: Copyright 2006-2008, Christian Marillat <marillat@debian.org>
821 Copyright: Copyright 2008-2010, Roland Mas <lolando@debian.org>
822 License: GPL-3+
+0
-289
debian/dispcal.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH CALIBRATE "1" "August 2013" "Calibrate a Display, Version 1.5.1" "User Commands"
2 .SH NAME
3 Calibrate \- Calibrate a Display.
4 .SH DESCRIPTION
5 Calibrate a Display, Version 1.5.1
6 Author: Graeme W. Gill, licensed under the AGPL Version 3
7 Diagnostic: Usage requested
8 usage: dispcal [options] outfile
9 .TP
10 \fB\-v\fR [n]
11 Verbose mode
12 .HP
13 \fB\-display\fR displayname Choose X11 display name
14 .TP
15 \fB\-d\fR n[,m]
16 Choose the display n from the following list (default 1)
17 Optionally choose different display m for VideoLUT access
18 .IP
19 1 = 'Screen 1, Output VBOX0 at 0, 0, width 1605, height 1079'
20 .TP
21 \fB\-dweb[\fR:port]
22 Display via a web server at port (default 8080)
23 .TP
24 \fB\-c\fR listno
25 Set communication port from the following list (default 1)
26 .IP
27 ** No ports found **
28 .TP
29 \fB\-r\fR
30 Report on the calibrated display then exit
31 .TP
32 \fB\-R\fR
33 Report on the uncalibrated display then exit
34 .TP
35 \fB\-m\fR
36 Skip adjustment of the monitor controls
37 .TP
38 \fB\-o\fR [profile.icc]
39 Create fast matrix/shaper profile [different filename to outfile.icc]
40 .TP
41 \fB\-O\fR "description"
42 Fast ICC Profile Description string (Default "outfile")
43 .TP
44 \fB\-u\fR
45 Update previous calibration and (if \fB\-o\fR used) ICC profile VideoLUTs
46 .TP
47 \fB\-q\fR [vlmh]
48 Quality \- Very Low, Low, Medium (def), High
49 .TP
50 \fB\-p\fR
51 Use telephoto mode (ie. for a projector) (if available)
52 .TP
53 \fB\-t\fR [temp]
54 White Daylight locus target, optional target temperaturee in deg. K (deflt.)
55 .TP
56 \fB\-T\fR [temp]
57 White Black Body locus target, optional target temperaturee in deg. K
58 .TP
59 \fB\-w\fR x,y
60 Set the target white point as chromaticity coordinates
61 .TP
62 \fB\-b\fR bright
63 Set the target white brightness in cd/m^2
64 .TP
65 \fB\-g\fR gamma
66 Set the target response curve advertised gamma (Def. 2.4)
67 Use "\-gl" for L*a*b* curve
68 Use "\-gs" for sRGB curve
69 Use "\-g709" for REC 709 curve (should use \fB\-a\fR as well!)
70 Use "\-g240" for SMPTE 240M curve (should use \fB\-a\fR as well!)
71 Use "\-G2.4 \fB\-f0\fR" for BT.1886
72 .TP
73 \fB\-G\fR gamma
74 Set the target response curve actual technical gamma
75 .TP
76 \fB\-f\fR [degree]
77 Amount of black level accounted for with output offset (default all output offset)
78 .TP
79 \fB\-a\fR ambient
80 Use viewing condition adjustment for ambient in Lux
81 .TP
82 \fB\-k\fR factor
83 Amount to correct black hue, 0 = none, 1 = full, Default = Automatic
84 .TP
85 \fB\-A\fR rate
86 Rate of blending from neutral to black point. Default 4.0
87 .TP
88 \fB\-B\fR blkbright
89 Set the target black brightness in cd/m^2
90 .TP
91 \fB\-e\fR [n]
92 Run n verify passes on final curves
93 .TP
94 \fB\-E\fR
95 Run only verify pass on installed calibration curves
96 .TP
97 \fB\-P\fR ho,vo,ss[,vs]
98 Position test window and scale it
99 ho,vi: 0.0 = left/top, 0.5 = center, 1.0 = right/bottom etc.
100 ss: 0.5 = half, 1.0 = normal, 2.0 = double etc.
101 .TP
102 \fB\-F\fR
103 Fill whole screen with black background
104 .TP
105 \fB\-n\fR
106 Don't set override redirect on test window
107 .TP
108 \fB\-J\fR
109 Run instrument calibration first (used rarely)
110 .TP
111 \fB\-N\fR
112 Disable initial calibration of instrument if possible
113 .TP
114 \fB\-H\fR
115 Use high resolution spectrum mode (if available)
116 .TP
117 \fB\-X\fR file.ccmx
118 Apply Colorimeter Correction Matrix
119 .TP
120 \fB\-X\fR file.ccss
121 Use Colorimeter Calibration Spectral Samples for calibration
122 .TP
123 \fB\-Q\fR observ
124 Choose CIE Observer for spectrometer or CCSS colorimeter data:
125 1931_2 (def), 1964_10, S&B 1955_2, shaw, J&V 1978_2, 1964_10c
126 .TP
127 \fB\-I\fR b|w
128 Drift compensation, Black: \fB\-Ib\fR, White: \fB\-Iw\fR, Both: \fB\-Ibw\fR
129 .TP
130 \fB\-Y\fR A
131 Use non\-adaptive integration time mode (if available).
132 .TP
133 \fB\-C\fR "command"
134 Invoke shell "command" each time a color is set
135 .TP
136 \fB\-M\fR "command"
137 Invoke shell "command" each time a color is measured
138 .TP
139 \fB\-W\fR n|h|x
140 Override serial port flow control: n = none, h = HW, x = Xon/Xoff
141 .TP
142 \fB\-D\fR [level]
143 Print debug diagnostics to stderr
144 .TP
145 inoutfile
146 Base name for created or updated .cal and .icc output files
147 .PP
148 Author: Graeme W. Gill, licensed under the AGPL Version 3
149 Diagnostic: Usage requested
150 usage: dispcal [options] outfile
151 .TP
152 \fB\-v\fR [n]
153 Verbose mode
154 .HP
155 \fB\-display\fR displayname Choose X11 display name
156 .TP
157 \fB\-d\fR n[,m]
158 Choose the display n from the following list (default 1)
159 Optionally choose different display m for VideoLUT access
160 .IP
161 1 = 'Screen 1, Output VBOX0 at 0, 0, width 1605, height 1079'
162 .TP
163 \fB\-dweb[\fR:port]
164 Display via a web server at port (default 8080)
165 .TP
166 \fB\-c\fR listno
167 Set communication port from the following list (default 1)
168 .IP
169 ** No ports found **
170 .TP
171 \fB\-r\fR
172 Report on the calibrated display then exit
173 .TP
174 \fB\-R\fR
175 Report on the uncalibrated display then exit
176 .TP
177 \fB\-m\fR
178 Skip adjustment of the monitor controls
179 .TP
180 \fB\-o\fR [profile.icc]
181 Create fast matrix/shaper profile [different filename to outfile.icc]
182 .TP
183 \fB\-O\fR "description"
184 Fast ICC Profile Description string (Default "outfile")
185 .TP
186 \fB\-u\fR
187 Update previous calibration and (if \fB\-o\fR used) ICC profile VideoLUTs
188 .TP
189 \fB\-q\fR [vlmh]
190 Quality \- Very Low, Low, Medium (def), High
191 .TP
192 \fB\-p\fR
193 Use telephoto mode (ie. for a projector) (if available)
194 .TP
195 \fB\-t\fR [temp]
196 White Daylight locus target, optional target temperaturee in deg. K (deflt.)
197 .TP
198 \fB\-T\fR [temp]
199 White Black Body locus target, optional target temperaturee in deg. K
200 .TP
201 \fB\-w\fR x,y
202 Set the target white point as chromaticity coordinates
203 .TP
204 \fB\-b\fR bright
205 Set the target white brightness in cd/m^2
206 .TP
207 \fB\-g\fR gamma
208 Set the target response curve advertised gamma (Def. 2.4)
209 Use "\-gl" for L*a*b* curve
210 Use "\-gs" for sRGB curve
211 Use "\-g709" for REC 709 curve (should use \fB\-a\fR as well!)
212 Use "\-g240" for SMPTE 240M curve (should use \fB\-a\fR as well!)
213 Use "\-G2.4 \fB\-f0\fR" for BT.1886
214 .TP
215 \fB\-G\fR gamma
216 Set the target response curve actual technical gamma
217 .TP
218 \fB\-f\fR [degree]
219 Amount of black level accounted for with output offset (default all output offset)
220 .TP
221 \fB\-a\fR ambient
222 Use viewing condition adjustment for ambient in Lux
223 .TP
224 \fB\-k\fR factor
225 Amount to correct black hue, 0 = none, 1 = full, Default = Automatic
226 .TP
227 \fB\-A\fR rate
228 Rate of blending from neutral to black point. Default 4.0
229 .TP
230 \fB\-B\fR blkbright
231 Set the target black brightness in cd/m^2
232 .TP
233 \fB\-e\fR [n]
234 Run n verify passes on final curves
235 .TP
236 \fB\-E\fR
237 Run only verify pass on installed calibration curves
238 .TP
239 \fB\-P\fR ho,vo,ss[,vs]
240 Position test window and scale it
241 ho,vi: 0.0 = left/top, 0.5 = center, 1.0 = right/bottom etc.
242 ss: 0.5 = half, 1.0 = normal, 2.0 = double etc.
243 .TP
244 \fB\-F\fR
245 Fill whole screen with black background
246 .TP
247 \fB\-n\fR
248 Don't set override redirect on test window
249 .TP
250 \fB\-J\fR
251 Run instrument calibration first (used rarely)
252 .TP
253 \fB\-N\fR
254 Disable initial calibration of instrument if possible
255 .TP
256 \fB\-H\fR
257 Use high resolution spectrum mode (if available)
258 .TP
259 \fB\-X\fR file.ccmx
260 Apply Colorimeter Correction Matrix
261 .TP
262 \fB\-X\fR file.ccss
263 Use Colorimeter Calibration Spectral Samples for calibration
264 .TP
265 \fB\-Q\fR observ
266 Choose CIE Observer for spectrometer or CCSS colorimeter data:
267 1931_2 (def), 1964_10, S&B 1955_2, shaw, J&V 1978_2, 1964_10c
268 .TP
269 \fB\-I\fR b|w
270 Drift compensation, Black: \fB\-Ib\fR, White: \fB\-Iw\fR, Both: \fB\-Ibw\fR
271 .TP
272 \fB\-Y\fR A
273 Use non\-adaptive integration time mode (if available).
274 .TP
275 \fB\-C\fR "command"
276 Invoke shell "command" each time a color is set
277 .TP
278 \fB\-M\fR "command"
279 Invoke shell "command" each time a color is measured
280 .TP
281 \fB\-W\fR n|h|x
282 Override serial port flow control: n = none, h = HW, x = Xon/Xoff
283 .TP
284 \fB\-D\fR [level]
285 Print debug diagnostics to stderr
286 .TP
287 inoutfile
288 Base name for created or updated .cal and .icc output files
+0
-183
debian/dispread.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH READ "1" "August 2013" "Read a Display, Version 1.5.1" "User Commands"
2 .SH NAME
3 Read \- Read a Display.
4 .SH DESCRIPTION
5 Read a Display, Version 1.5.1
6 Author: Graeme W. Gill, licensed under the AGPL Version 3
7 Diagnostic: Usage requested
8 usage: dispread [options] outfile
9 .TP
10 \fB\-v\fR
11 Verbose mode
12 .HP
13 \fB\-display\fR displayname Choose X11 display name
14 .TP
15 \fB\-d\fR n[,m]
16 Choose the display n from the following list (default 1)
17 Optionally choose different display m for VideoLUT access
18 .IP
19 1 = 'Screen 1, Output VBOX0 at 0, 0, width 1605, height 1079'
20 .TP
21 \fB\-dweb[\fR:port]
22 Display via a web server at port (default 8080)
23 .TP
24 \fB\-c\fR listno
25 Set communication port from the following list (default 1)
26 .IP
27 ** No ports found **
28 .TP
29 \fB\-p\fR
30 Use telephoto mode (ie. for a projector) (if available)
31 .TP
32 \fB\-k\fR file.cal
33 Load calibration file into display while reading
34 .TP
35 \fB\-K\fR file.cal
36 Apply calibration file to test values while reading
37 .TP
38 \fB\-s\fR
39 Save spectral information (default don't save)
40 .TP
41 \fB\-P\fR ho,vo,ss[,vs]
42 Position test window and scale it
43 ho,vi: 0.0 = left/top, 0.5 = center, 1.0 = right/bottom etc.
44 ss: 0.5 = half, 1.0 = normal, 2.0 = double etc.
45 .TP
46 \fB\-F\fR
47 Fill whole screen with black background
48 .TP
49 \fB\-n\fR
50 Don't set override redirect on test window
51 .TP
52 \fB\-J\fR
53 Run instrument calibration first (used rarely)
54 .TP
55 \fB\-N\fR
56 Disable initial calibration of instrument if possible
57 .TP
58 \fB\-H\fR
59 Use high resolution spectrum mode (if available)
60 .TP
61 \fB\-w\fR
62 Disable normalisation of white to Y = 100
63 .TP
64 \fB\-X\fR file.ccmx
65 Apply Colorimeter Correction Matrix
66 .TP
67 \fB\-X\fR file.ccss
68 Use Colorimeter Calibration Spectral Samples for calibration
69 .TP
70 \fB\-Q\fR observ
71 Choose CIE Observer for spectrometer or CCSS colorimeter data:
72 1931_2 (def), 1964_10, S&B 1955_2, shaw, J&V 1978_2, 1964_10c
73 .TP
74 \fB\-I\fR b|w
75 Drift compensation, Black: \fB\-Ib\fR, White: \fB\-Iw\fR, Both: \fB\-Ibw\fR
76 .TP
77 \fB\-Y\fR A
78 Use non\-adaptive integration time mode (if available).
79 .TP
80 \fB\-C\fR "command"
81 Invoke shell "command" each time a color is set
82 .TP
83 \fB\-M\fR "command"
84 Invoke shell "command" each time a color is measured
85 .TP
86 \fB\-W\fR n|h|x
87 Override serial port flow control: n = none, h = HW, x = Xon/Xoff
88 .TP
89 \fB\-D\fR [level]
90 Print debug diagnostics to stderr
91 .TP
92 outfile
93 Base name for input[ti1]/output[ti3] file
94 .PP
95 Author: Graeme W. Gill, licensed under the AGPL Version 3
96 Diagnostic: Usage requested
97 usage: dispread [options] outfile
98 .TP
99 \fB\-v\fR
100 Verbose mode
101 .HP
102 \fB\-display\fR displayname Choose X11 display name
103 .TP
104 \fB\-d\fR n[,m]
105 Choose the display n from the following list (default 1)
106 Optionally choose different display m for VideoLUT access
107 .IP
108 1 = 'Screen 1, Output VBOX0 at 0, 0, width 1605, height 1079'
109 .TP
110 \fB\-dweb[\fR:port]
111 Display via a web server at port (default 8080)
112 .TP
113 \fB\-c\fR listno
114 Set communication port from the following list (default 1)
115 .IP
116 ** No ports found **
117 .TP
118 \fB\-p\fR
119 Use telephoto mode (ie. for a projector) (if available)
120 .TP
121 \fB\-k\fR file.cal
122 Load calibration file into display while reading
123 .TP
124 \fB\-K\fR file.cal
125 Apply calibration file to test values while reading
126 .TP
127 \fB\-s\fR
128 Save spectral information (default don't save)
129 .TP
130 \fB\-P\fR ho,vo,ss[,vs]
131 Position test window and scale it
132 ho,vi: 0.0 = left/top, 0.5 = center, 1.0 = right/bottom etc.
133 ss: 0.5 = half, 1.0 = normal, 2.0 = double etc.
134 .TP
135 \fB\-F\fR
136 Fill whole screen with black background
137 .TP
138 \fB\-n\fR
139 Don't set override redirect on test window
140 .TP
141 \fB\-J\fR
142 Run instrument calibration first (used rarely)
143 .TP
144 \fB\-N\fR
145 Disable initial calibration of instrument if possible
146 .TP
147 \fB\-H\fR
148 Use high resolution spectrum mode (if available)
149 .TP
150 \fB\-w\fR
151 Disable normalisation of white to Y = 100
152 .TP
153 \fB\-X\fR file.ccmx
154 Apply Colorimeter Correction Matrix
155 .TP
156 \fB\-X\fR file.ccss
157 Use Colorimeter Calibration Spectral Samples for calibration
158 .TP
159 \fB\-Q\fR observ
160 Choose CIE Observer for spectrometer or CCSS colorimeter data:
161 1931_2 (def), 1964_10, S&B 1955_2, shaw, J&V 1978_2, 1964_10c
162 .TP
163 \fB\-I\fR b|w
164 Drift compensation, Black: \fB\-Ib\fR, White: \fB\-Iw\fR, Both: \fB\-Ibw\fR
165 .TP
166 \fB\-Y\fR A
167 Use non\-adaptive integration time mode (if available).
168 .TP
169 \fB\-C\fR "command"
170 Invoke shell "command" each time a color is set
171 .TP
172 \fB\-M\fR "command"
173 Invoke shell "command" each time a color is measured
174 .TP
175 \fB\-W\fR n|h|x
176 Override serial port flow control: n = none, h = HW, x = Xon/Xoff
177 .TP
178 \fB\-D\fR [level]
179 Print debug diagnostics to stderr
180 .TP
181 outfile
182 Base name for input[ti1]/output[ti3] file
+0
-151
debian/dispwin.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH TEST "1" "August 2013" "Test display patch window, Set Video LUTs, Install profiles, Version 1.5.1" "User Commands"
2 .SH NAME
3 Test \- Test display patch window, Set Video LUTs, Install profiles.
4 .SH DESCRIPTION
5 Test display patch window, Set Video LUTs, Install profiles, Version 1.5.1
6 Author: Graeme W. Gill, licensed under the AGPL Version 3
7 Diagnostic: Unknown flag '\-\-help'
8 usage: dispwin [options] [calfile]
9 .TP
10 \fB\-v\fR
11 Verbose mode
12 .HP
13 \fB\-display\fR displayname Choose X11 display name
14 .TP
15 \fB\-d\fR n[,m]
16 Choose the display n from the following list (default 1)
17 Optionally choose different display m for Video LUT access
18 .IP
19 1 = 'Screen 1, Output VBOX0 at 0, 0, width 1605, height 1079'
20 .TP
21 \fB\-dweb[\fR:port]
22 Display via a web server at port (default 8080)
23 .TP
24 \fB\-P\fR ho,vo,ss[,vs]
25 Position test window and scale it
26 .TP
27 \fB\-F\fR
28 Fill whole screen with black background
29 .TP
30 \fB\-i\fR
31 Run forever with random values
32 .TP
33 \fB\-G\fR filename
34 Display RGB colors from CGATS file
35 .TP
36 \fB\-m\fR
37 Manually cycle through values
38 .TP
39 \fB\-f\fR
40 Test grey ramp fade
41 .TP
42 \fB\-r\fR
43 Test just Video LUT loading & Beeps
44 .TP
45 \fB\-n\fR
46 Test native output (rather than through Video LUT)
47 .TP
48 \fB\-s\fR filename
49 Save the currently loaded Video LUT to 'filename'
50 .TP
51 \fB\-c\fR
52 Load a linear display calibration
53 .TP
54 \fB\-V\fR
55 Verify that calfile/profile cal. is currently loaded in LUT
56 .TP
57 \fB\-I\fR
58 Install profile for display and use it's calibration
59 .TP
60 \fB\-U\fR
61 Un\-install profile for display
62 .TP
63 \fB\-S\fR d
64 Specify the install/uninstall scope for OS X [nlu] or X11/Vista [lu]
65 d is one of: n = network, l = local system, u = user (default)
66 .TP
67 \fB\-L\fR
68 Load installed profiles cal. into Video LUT
69 .TP
70 \fB\-E\fR
71 Run in daemon loader mode for given X11 server
72 .TP
73 \fB\-D\fR [level]
74 Print debug diagnostics to stderr
75 .TP
76 calfile
77 Load calibration (.cal or .icc) into Video LUT
78 .PP
79 Author: Graeme W. Gill, licensed under the AGPL Version 3
80 Diagnostic: Unknown flag '\-\-version'
81 usage: dispwin [options] [calfile]
82 .TP
83 \fB\-v\fR
84 Verbose mode
85 .HP
86 \fB\-display\fR displayname Choose X11 display name
87 .TP
88 \fB\-d\fR n[,m]
89 Choose the display n from the following list (default 1)
90 Optionally choose different display m for Video LUT access
91 .IP
92 1 = 'Screen 1, Output VBOX0 at 0, 0, width 1605, height 1079'
93 .TP
94 \fB\-dweb[\fR:port]
95 Display via a web server at port (default 8080)
96 .TP
97 \fB\-P\fR ho,vo,ss[,vs]
98 Position test window and scale it
99 .TP
100 \fB\-F\fR
101 Fill whole screen with black background
102 .TP
103 \fB\-i\fR
104 Run forever with random values
105 .TP
106 \fB\-G\fR filename
107 Display RGB colors from CGATS file
108 .TP
109 \fB\-m\fR
110 Manually cycle through values
111 .TP
112 \fB\-f\fR
113 Test grey ramp fade
114 .TP
115 \fB\-r\fR
116 Test just Video LUT loading & Beeps
117 .TP
118 \fB\-n\fR
119 Test native output (rather than through Video LUT)
120 .TP
121 \fB\-s\fR filename
122 Save the currently loaded Video LUT to 'filename'
123 .TP
124 \fB\-c\fR
125 Load a linear display calibration
126 .TP
127 \fB\-V\fR
128 Verify that calfile/profile cal. is currently loaded in LUT
129 .TP
130 \fB\-I\fR
131 Install profile for display and use it's calibration
132 .TP
133 \fB\-U\fR
134 Un\-install profile for display
135 .TP
136 \fB\-S\fR d
137 Specify the install/uninstall scope for OS X [nlu] or X11/Vista [lu]
138 d is one of: n = network, l = local system, u = user (default)
139 .TP
140 \fB\-L\fR
141 Load installed profiles cal. into Video LUT
142 .TP
143 \fB\-E\fR
144 Run in daemon loader mode for given X11 server
145 .TP
146 \fB\-D\fR [level]
147 Print debug diagnostics to stderr
148 .TP
149 calfile
150 Load calibration (.cal or .icc) into Video LUT
+0
-19
debian/extracticc.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH EXTRACT "1" "August 2013" "Extract an ICC profile from a TIFF or JPEG file, Version 1.5.1" "User Commands"
2 .SH NAME
3 Extract \- Extract an ICC profile from a TIFF file.
4 .SH DESCRIPTION
5 Extract an ICC profile from a TIFF or JPEG file, Version 1.5.1
6 Author: Graeme W. Gill, licensed under the AGPL Version 3
7 Diagnostic: Too few parameters
8 usage: extracticc [\-v] infile.tif/jpg outfile.icc
9 .TP
10 \fB\-v\fR
11 Verbose
12 .PP
13 Author: Graeme W. Gill, licensed under the AGPL Version 3
14 Diagnostic: Too few parameters
15 usage: extracticc [\-v] infile.tif/jpg outfile.icc
16 .TP
17 \fB\-v\fR
18 Verbose
+0
-31
debian/extractttag.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH EXTRACT "1" "August 2013" "Extract a text tag from an ICC profile, Version 1.5.1" "User Commands"
2 .SH NAME
3 Extract \- Extract a text tag from an ICC profile.
4 .SH DESCRIPTION
5 Extract a text tag from an ICC profile, Version 1.5.1
6 Author: Graeme W. Gill, licensed under the AGPL Version 3
7 Diagnostic: Too few parameters
8 usage: extractttag [\-v] infile.icc outfile
9 .TP
10 \fB\-v\fR
11 Verbose
12 .TP
13 \fB\-t\fR tag
14 Extract this tag rather than default 'targ'
15 .TP
16 \fB\-c\fR
17 Extract calibration file from 'targ' tag
18 .PP
19 Author: Graeme W. Gill, licensed under the AGPL Version 3
20 Diagnostic: Too few parameters
21 usage: extractttag [\-v] infile.icc outfile
22 .TP
23 \fB\-v\fR
24 Verbose
25 .TP
26 \fB\-t\fR tag
27 Extract this tag rather than default 'targ'
28 .TP
29 \fB\-c\fR
30 Extract calibration file from 'targ' tag
+0
-37
debian/fakeCMY.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH CREATE "1" "August 2013" "Create a fake CMY data file from a CMYK profile, Version 1.5.1" "User Commands"
2 .SH NAME
3 Create \- Create a fake CMY data file from a CMYK profile.
4 .SH DESCRIPTION
5 Create a fake CMY data file from a CMYK profile, Version 1.5.1
6 Author: Graeme W. Gill, licensed under the AGPL Version 3
7 usage: fakeCMY [option] profile.icm fake.ti3
8 Diagnostic: Unknown flag
9 .TP
10 \fB\-v\fR
11 verbose
12 .TP
13 \fB\-r\fR res
14 set surface point resolution (default 3)
15 .TP
16 \fB\-l\fR tlimit
17 set total ink limit, 0 \- 400% (estimate by default)
18 .TP
19 \fB\-L\fR klimit
20 set black ink limit, 0 \- 100% (estimate by default)
21 .PP
22 Author: Graeme W. Gill, licensed under the AGPL Version 3
23 usage: fakeCMY [option] profile.icm fake.ti3
24 Diagnostic: Unknown flag
25 .TP
26 \fB\-v\fR
27 verbose
28 .TP
29 \fB\-r\fR res
30 set surface point resolution (default 3)
31 .TP
32 \fB\-l\fR tlimit
33 set total ink limit, 0 \- 400% (estimate by default)
34 .TP
35 \fB\-L\fR klimit
36 set black ink limit, 0 \- 100% (estimate by default)
+0
-107
debian/fakeread.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH FAKE "1" "August 2013" "Fake test chart reader - lookup values in ICC/MPP profile, Version 1.5.1" "User Commands"
2 .SH NAME
3 Fake \- Fake test chart reader - lookup values in ICC/MPP profile.
4 .SH DESCRIPTION
5 Fake test chart reader \- lookup values in ICC/MPP profile, Version 1.5.1
6 Author: Graeme W. Gill, licensed under the AGPL Version 3
7 .IP
8 Diagnostic: Too few arguments
9 .PP
10 usage: fakeread [\-v] [\-s] [separation.icm] profile.[icc|mpp|ti3] outfile
11 .TP
12 \fB\-v\fR
13 Verbose mode
14 .TP
15 \fB\-s\fR
16 Lookup MPP spectral values
17 .TP
18 \fB\-p\fR
19 Use separation profile
20 .TP
21 \fB\-l\fR
22 Output Lab rather than XYZ
23 .TP
24 \fB\-k\fR file.cal
25 Apply calibration (after sep.) and include in .ti3
26 .TP
27 \fB\-i\fR file.cal
28 Include calibration in .ti3 (but don't apply it)
29 .TP
30 \fB\-r\fR level
31 Add average random deviation of <level>% to input device values (after sep. & cal.)
32 .TP
33 \fB\-0\fR pow
34 Apply power to input device chanel 0\-9 (after sep. cal. & rand)
35 .TP
36 \fB\-R\fR level
37 Add average random deviation of <level>% to output PCS values
38 .TP
39 \fB\-u\fR
40 Make random deviations have uniform distributions rather than normal
41 .TP
42 \fB\-S\fR seed
43 Set random seed
44 .TP
45 \fB\-b\fR L,a,b
46 Scale black point to target Lab value
47 .TP
48 \fB\-I\fR intent
49 r = relative colorimetric, a = absolute (default)
50 .TP
51 [separation.icc]
52 Device link separation profile
53 .IP
54 profile.[icc|mpp|ti3] ICC, MPP profile or TI3 to use
55 outfile Base name for input[ti1]/output[ti3] file
56 .PP
57 Author: Graeme W. Gill, licensed under the AGPL Version 3
58 .IP
59 Diagnostic: Too few arguments
60 .PP
61 usage: fakeread [\-v] [\-s] [separation.icm] profile.[icc|mpp|ti3] outfile
62 .TP
63 \fB\-v\fR
64 Verbose mode
65 .TP
66 \fB\-s\fR
67 Lookup MPP spectral values
68 .TP
69 \fB\-p\fR
70 Use separation profile
71 .TP
72 \fB\-l\fR
73 Output Lab rather than XYZ
74 .TP
75 \fB\-k\fR file.cal
76 Apply calibration (after sep.) and include in .ti3
77 .TP
78 \fB\-i\fR file.cal
79 Include calibration in .ti3 (but don't apply it)
80 .TP
81 \fB\-r\fR level
82 Add average random deviation of <level>% to input device values (after sep. & cal.)
83 .TP
84 \fB\-0\fR pow
85 Apply power to input device chanel 0\-9 (after sep. cal. & rand)
86 .TP
87 \fB\-R\fR level
88 Add average random deviation of <level>% to output PCS values
89 .TP
90 \fB\-u\fR
91 Make random deviations have uniform distributions rather than normal
92 .TP
93 \fB\-S\fR seed
94 Set random seed
95 .TP
96 \fB\-b\fR L,a,b
97 Scale black point to target Lab value
98 .TP
99 \fB\-I\fR intent
100 r = relative colorimetric, a = absolute (default)
101 .TP
102 [separation.icc]
103 Device link separation profile
104 .IP
105 profile.[icc|mpp|ti3] ICC, MPP profile or TI3 to use
106 outfile Base name for input[ti1]/output[ti3] file
+0
-29
debian/greytiff.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH CONVERT "1" "August 2013" "Convert a TIFF file to monochrome using an ICC device profile, V1.5.1" "User Commands"
2 .SH NAME
3 Convert \- Convert a TIFF file to monochrome using an ICC device profile.
4 .SH DESCRIPTION
5 Convert a TIFF file to monochrome using an ICC device profile, V1.5.1
6 Author: Graeme W. Gill, licensed under the AGPL Version 3
7 usage: greytiff [\-v level] profile.icm infile.tif outfile.tif
8 .TP
9 \fB\-v\fR
10 Verbose
11 .TP
12 \fB\-p\fR
13 Use slow precise correction
14 .TP
15 \fB\-j\fR
16 Use CIECAM02
17 .PP
18 Author: Graeme W. Gill, licensed under the AGPL Version 3
19 usage: greytiff [\-v level] profile.icm infile.tif outfile.tif
20 .TP
21 \fB\-v\fR
22 Verbose
23 .TP
24 \fB\-p\fR
25 Use slow precise correction
26 .TP
27 \fB\-j\fR
28 Use CIECAM02
+0
-2
debian/icc-utils.install less more
0 usr/bin/icclu
1 usr/bin/iccdump
+0
-2
debian/icc-utils.manpages less more
0 debian/iccdump.1
1 debian/icclu.1
+0
-35
debian/iccdump.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH DUMP "1" "August 2013" "Dump an ICC file in human readable form, V2.16" "User Commands"
2 .SH NAME
3 Dump \- Dump an ICC file in human readable form.
4 .SH DESCRIPTION
5 Dump an ICC file in human readable form, V2.16
6 Author: Graeme W. Gill
7 usage: iccdump [\-v level] [\-t tagname] [\-s] infile
8 .TP
9 \fB\-v\fR level
10 Verbose level 1\-3 (default 2)
11 .TP
12 \fB\-t\fR tag
13 Dump this tag only (can be used multiple times)
14 .TP
15 \fB\-s\fR
16 Search for embedded profile
17 .TP
18 \fB\-i\fR
19 Check V4 ID value
20 .PP
21 Author: Graeme W. Gill
22 usage: iccdump [\-v level] [\-t tagname] [\-s] infile
23 .TP
24 \fB\-v\fR level
25 Verbose level 1\-3 (default 2)
26 .TP
27 \fB\-t\fR tag
28 Dump this tag only (can be used multiple times)
29 .TP
30 \fB\-s\fR
31 Search for embedded profile
32 .TP
33 \fB\-i\fR
34 Check V4 ID value
+0
-181
debian/iccgamut.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH CREATE "1" "August 2013" "Create Lab/Jab gamut plot Version 1.5.1" "User Commands"
2 .SH NAME
3 Create \- Create Lab/Jab gamut plot.
4 .SH DESCRIPTION
5 Create Lab/Jab gamut plot Version 1.5.1
6 Author: Graeme W. Gill, licensed under the AGPL Version 3
7 usage: iccgamut [options] profile
8 Diagnostic: Unknown flag
9 .TP
10 \fB\-v\fR
11 Verbose
12 .TP
13 \fB\-d\fR sres
14 Surface resolution details 1.0 \- 50.0
15 .TP
16 \fB\-w\fR
17 emit VRML .wrl file as well as CGATS .gam file
18 .TP
19 \fB\-n\fR
20 Don't add VRML axes or white/black point
21 .TP
22 \fB\-k\fR
23 Add VRML markers for prim. & sec. "cusp" points
24 .TP
25 \fB\-f\fR function
26 f = forward*, b = backwards
27 .TP
28 \fB\-i\fR intent
29 p = perceptual, r = relative colorimetric,
30 s = saturation, a = absolute (default), d = profile default
31 .TP
32 \fB\-p\fR oride
33 l = Lab_PCS (default), j = CIECAM02 Appearance Jab
34 .TP
35 \fB\-o\fR order
36 n = normal (priority: lut > matrix > monochrome)
37 r = reverse (priority: monochrome > matrix > lut)
38 .TP
39 \fB\-l\fR tlimit
40 set total ink limit, 0 \- 400% (estimate by default)
41 .TP
42 \fB\-L\fR klimit
43 set black ink limit, 0 \- 100% (estimate by default)
44 .TP
45 \fB\-c\fR viewcond
46 set viewing conditions for CIECAM02,
47 either an enumerated choice, or a series of parameter:value changes
48 .IP
49 pp \- Practical Reflection Print (ISO\-3664 P2)
50 pe \- Print evaluation environment (CIE 116\-1995)
51 pc \- Critical print evaluation environment (ISO\-3664 P1)
52 mt \- Monitor in typical work environment
53 mb \- Bright monitor in bright work environment
54 md \- Monitor in darkened work environment
55 jm \- Projector in dim environment
56 jd \- Projector in dark environment
57 .IP
58 pcd \- Photo CD \- original scene outdoors
59 .IP
60 ob \- Original scene \- Bright Outdoors
61 cx \- Cut Sheet Transparencies on a viewing box
62 .TP
63 s:surround
64 n = auto, a = average, m = dim, d = dark,
65 c = transparency (default average)
66 .TP
67 w:X:Y:Z
68 Adapted white point as XYZ (default media white)
69 .TP
70 w:x:y
71 Adapted white point as x, y
72 .TP
73 a:adaptation
74 Adaptation luminance in cd.m^2 (default 50.0)
75 .TP
76 b:background
77 Background % of image luminance (default 20)
78 .TP
79 l:scenewhite
80 Scene white in cd.m^2 if surround = auto (default 250)
81 .TP
82 f:flare
83 Flare light % of image luminance (default 1)
84 .TP
85 f:X:Y:Z
86 Flare color as XYZ (default media white)
87 .TP
88 f:x:y
89 Flare color as x, y
90 .TP
91 \fB\-s\fR
92 Create special cube surface topology plot
93 .PP
94 Author: Graeme W. Gill, licensed under the AGPL Version 3
95 usage: iccgamut [options] profile
96 Diagnostic: Unknown flag
97 .TP
98 \fB\-v\fR
99 Verbose
100 .TP
101 \fB\-d\fR sres
102 Surface resolution details 1.0 \- 50.0
103 .TP
104 \fB\-w\fR
105 emit VRML .wrl file as well as CGATS .gam file
106 .TP
107 \fB\-n\fR
108 Don't add VRML axes or white/black point
109 .TP
110 \fB\-k\fR
111 Add VRML markers for prim. & sec. "cusp" points
112 .TP
113 \fB\-f\fR function
114 f = forward*, b = backwards
115 .TP
116 \fB\-i\fR intent
117 p = perceptual, r = relative colorimetric,
118 s = saturation, a = absolute (default), d = profile default
119 .TP
120 \fB\-p\fR oride
121 l = Lab_PCS (default), j = CIECAM02 Appearance Jab
122 .TP
123 \fB\-o\fR order
124 n = normal (priority: lut > matrix > monochrome)
125 r = reverse (priority: monochrome > matrix > lut)
126 .TP
127 \fB\-l\fR tlimit
128 set total ink limit, 0 \- 400% (estimate by default)
129 .TP
130 \fB\-L\fR klimit
131 set black ink limit, 0 \- 100% (estimate by default)
132 .TP
133 \fB\-c\fR viewcond
134 set viewing conditions for CIECAM02,
135 either an enumerated choice, or a series of parameter:value changes
136 .IP
137 pp \- Practical Reflection Print (ISO\-3664 P2)
138 pe \- Print evaluation environment (CIE 116\-1995)
139 pc \- Critical print evaluation environment (ISO\-3664 P1)
140 mt \- Monitor in typical work environment
141 mb \- Bright monitor in bright work environment
142 md \- Monitor in darkened work environment
143 jm \- Projector in dim environment
144 jd \- Projector in dark environment
145 .IP
146 pcd \- Photo CD \- original scene outdoors
147 .IP
148 ob \- Original scene \- Bright Outdoors
149 cx \- Cut Sheet Transparencies on a viewing box
150 .TP
151 s:surround
152 n = auto, a = average, m = dim, d = dark,
153 c = transparency (default average)
154 .TP
155 w:X:Y:Z
156 Adapted white point as XYZ (default media white)
157 .TP
158 w:x:y
159 Adapted white point as x, y
160 .TP
161 a:adaptation
162 Adaptation luminance in cd.m^2 (default 50.0)
163 .TP
164 b:background
165 Background % of image luminance (default 20)
166 .TP
167 l:scenewhite
168 Scene white in cd.m^2 if surround = auto (default 250)
169 .TP
170 f:flare
171 Flare light % of image luminance (default 1)
172 .TP
173 f:X:Y:Z
174 Flare color as XYZ (default media white)
175 .TP
176 f:x:y
177 Flare color as x, y
178 .TP
179 \fB\-s\fR
180 Create special cube surface topology plot
+0
-61
debian/icclu.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH TRANSLATE "1" "August 2013" "Translate colors through an ICC profile, V2.16" "User Commands"
2 .SH NAME
3 Translate \- Translate colors through an ICC profile.
4 .SH DESCRIPTION
5 Translate colors through an ICC profile, V2.16
6 Author: Graeme W. Gill
7 usage: icclu [\-v level] [\-f func] [\-i intent] [\-o order] profile
8 .TP
9 \fB\-v\fR level
10 Verbosity level 0 \- 2 (default = 1)
11 .TP
12 \fB\-f\fR function
13 f = forward, b = backwards, g = gamut, p = preview
14 .TP
15 \fB\-i\fR intent
16 p = perceptual, r = relative colorimetric,
17 s = saturation, a = absolute
18 .TP
19 \fB\-p\fR oride
20 x = XYZ_PCS, l = Lab_PCS, y = Yxy,
21 .TP
22 \fB\-o\fR order
23 n = normal (priority: lut > matrix > monochrome)
24 r = reverse (priority: monochrome > matrix > lut)
25 .TP
26 \fB\-s\fR scale
27 Scale device range 0.0 \- scale rather than 0.0 \- 1.0
28 .IP
29 The colors to be translated should be fed into standard input,
30 one input color per line, white space separated.
31 A line starting with a # will be ignored.
32 A line not starting with a number will terminate the program.
33 .PP
34 Author: Graeme W. Gill
35 usage: icclu [\-v level] [\-f func] [\-i intent] [\-o order] profile
36 .TP
37 \fB\-v\fR level
38 Verbosity level 0 \- 2 (default = 1)
39 .TP
40 \fB\-f\fR function
41 f = forward, b = backwards, g = gamut, p = preview
42 .TP
43 \fB\-i\fR intent
44 p = perceptual, r = relative colorimetric,
45 s = saturation, a = absolute
46 .TP
47 \fB\-p\fR oride
48 x = XYZ_PCS, l = Lab_PCS, y = Yxy,
49 .TP
50 \fB\-o\fR order
51 n = normal (priority: lut > matrix > monochrome)
52 r = reverse (priority: monochrome > matrix > lut)
53 .TP
54 \fB\-s\fR scale
55 Scale device range 0.0 \- scale rather than 0.0 \- 1.0
56 .IP
57 The colors to be translated should be fed into standard input,
58 one input color per line, white space separated.
59 A line starting with a # will be ignored.
60 A line not starting with a number will terminate the program.
+0
-63
debian/illumread.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH MEASURE "1" "August 2013" "Measure an illuminant, Version 1.5.1" "User Commands"
2 .SH NAME
3 Measure \- Measure an illuminant.
4 .SH DESCRIPTION
5 Measure an illuminant, Version 1.5.1
6 Author: Graeme W. Gill, licensed under the AGPL Version 3
7 usage: illumread [\-options] output.sp
8 .TP
9 \fB\-v\fR
10 Verbose mode
11 .TP
12 \fB\-S\fR
13 Plot spectrum for each reading
14 .TP
15 \fB\-c\fR listno
16 Choose instrument from the following list (default 1)
17 .IP
18 ** No ports found **
19 .TP
20 \fB\-N\fR
21 Disable initial calibration of instrument if possible
22 .TP
23 \fB\-H\fR
24 Use high resolution spectrum mode (if available)
25 .TP
26 \fB\-W\fR n|h|x
27 Override serial port flow control: n = none, h = HW, x = Xon/Xoff
28 .TP
29 \fB\-D\fR [level]
30 Print debug diagnostics to stderr
31 .TP
32 illuminant.sp
33 File to save measurement to
34 .PP
35 Author: Graeme W. Gill, licensed under the AGPL Version 3
36 usage: illumread [\-options] output.sp
37 .TP
38 \fB\-v\fR
39 Verbose mode
40 .TP
41 \fB\-S\fR
42 Plot spectrum for each reading
43 .TP
44 \fB\-c\fR listno
45 Choose instrument from the following list (default 1)
46 .IP
47 ** No ports found **
48 .TP
49 \fB\-N\fR
50 Disable initial calibration of instrument if possible
51 .TP
52 \fB\-H\fR
53 Use high resolution spectrum mode (if available)
54 .TP
55 \fB\-W\fR n|h|x
56 Override serial port flow control: n = none, h = HW, x = Xon/Xoff
57 .TP
58 \fB\-D\fR [level]
59 Print debug diagnostics to stderr
60 .TP
61 illuminant.sp
62 File to save measurement to
+0
-83
debian/invprofcheck.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH CHECK "1" "August 2013" "Check fwd to bwd relative transfer of an ICC file, Version 1.5.1" "User Commands"
2 .SH NAME
3 Check \- Check fwd to bwd relative transfer of an ICC file.
4 .SH DESCRIPTION
5 Check fwd to bwd relative transfer of an ICC file, Version 1.5.1
6 Author: Graeme W. Gill
7 usage: invprofcheck [\-] profile.icm
8 .TP
9 \fB\-v\fR [level]
10 verbosity level (default 1), 2 to print each DE
11 .TP
12 \fB\-l\fR limit
13 set total ink limit (estimate by default)
14 .TP
15 \fB\-L\fR klimit
16 set black channel ink limit (estimate by default)
17 .TP
18 \fB\-h\fR
19 high res test (27)
20 .TP
21 \fB\-u\fR
22 Ultra high res test (61)
23 .TP
24 \fB\-R\fR res
25 Specific grid resolution
26 .TP
27 \fB\-c\fR
28 Show CIE94 delta E values
29 .TP
30 \fB\-k\fR
31 Show CIEDE2000 delta E values
32 .TP
33 \fB\-w\fR
34 create VRML visualisation (profile.wrl)
35 .TP
36 \fB\-x\fR
37 Use VRML axes
38 .TP
39 \fB\-e\fR
40 Color vectors acording to delta E
41 .TP
42 profile.icm
43 Profile to check
44 .PP
45 Author: Graeme W. Gill
46 usage: invprofcheck [\-] profile.icm
47 .TP
48 \fB\-v\fR [level]
49 verbosity level (default 1), 2 to print each DE
50 .TP
51 \fB\-l\fR limit
52 set total ink limit (estimate by default)
53 .TP
54 \fB\-L\fR klimit
55 set black channel ink limit (estimate by default)
56 .TP
57 \fB\-h\fR
58 high res test (27)
59 .TP
60 \fB\-u\fR
61 Ultra high res test (61)
62 .TP
63 \fB\-R\fR res
64 Specific grid resolution
65 .TP
66 \fB\-c\fR
67 Show CIE94 delta E values
68 .TP
69 \fB\-k\fR
70 Show CIEDE2000 delta E values
71 .TP
72 \fB\-w\fR
73 create VRML visualisation (profile.wrl)
74 .TP
75 \fB\-x\fR
76 Use VRML axes
77 .TP
78 \fB\-e\fR
79 Color vectors acording to delta E
80 .TP
81 profile.icm
82 Profile to check
+0
-41
debian/kodak2ti3.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH CONVERT "1" "August 2013" "Convert Kodak raw printer profile data to Argyll print data, Version 1.5.1" "User Commands"
2 .SH NAME
3 Convert \- Convert Kodak raw printer profile data to Argyll print data.
4 .SH DESCRIPTION
5 Convert Kodak raw printer profile data to Argyll print data, Version 1.5.1
6 Author: Graeme W. Gill, licensed under the AGPL Version 3
7 usage: kodak2ti3 [\-v] [\-l limit] infile outfile
8 .TP
9 \fB\-v\fR
10 Verbose mode
11 .TP
12 \fB\-l\fR limit
13 set ink limit, 0 \- 400%
14 .TP
15 \fB\-r\fR filename
16 Use an alternate 928 patch reference file
17 .TP
18 infile
19 Base name for input.pat file
20 .TP
21 outfile
22 Base name for output.ti3 file
23 .PP
24 Author: Graeme W. Gill, licensed under the AGPL Version 3
25 usage: kodak2ti3 [\-v] [\-l limit] infile outfile
26 .TP
27 \fB\-v\fR
28 Verbose mode
29 .TP
30 \fB\-l\fR limit
31 set ink limit, 0 \- 400%
32 .TP
33 \fB\-r\fR filename
34 Use an alternate 928 patch reference file
35 .TP
36 infile
37 Base name for input.pat file
38 .TP
39 outfile
40 Base name for output.ti3 file
+0
-4
debian/libicc-dev.install less more
0 usr/include/icc.h
1 usr/include/iccV42.h
2 usr/lib/*/libicc.a
3 usr/lib/*/libicc.so
+0
-1
debian/libicc2.install less more
0 usr/lib/*/libicc*.so.*
+0
-103
debian/libicc2.symbols less more
0 libicc.so.2 libicc2 #MINVER#
1 icc_new_icmLuLut@Base 1.5.1
2 icm1960UCS21964WUV@Base 1.5.1
3 icm1960UCS2XYZ@Base 1.5.1
4 icm1964WUV2XYZ@Base 1.5.1
5 icm1976UCS2XYZ@Base 1.5.1
6 icm2str@Base 1.5.1
7 icmAdd3@Base 1.5.1
8 icmAdd3x3@Base 1.5.1
9 icmBlack@Base 1.5.1
10 icmBlend3@Base 1.5.1
11 icmCIE2K@Base 1.5.1
12 icmCIE2Ksq@Base 1.5.1
13 icmCIE94@Base 1.5.1
14 icmCIE94sq@Base 1.5.1
15 icmCSSig2chanNames@Base 1.5.1
16 icmCSSig2nchan@Base 1.5.1
17 icmChromAdaptMatrix@Base 1.5.1
18 icmClamp3@Base 1.5.1
19 icmClipLab@Base 1.5.1
20 icmClipXYZ@Base 1.5.1
21 icmCpy3x3@Base 1.5.1
22 icmCpy3x4@Base 1.5.1
23 icmCross3@Base 1.5.1
24 icmD50@Base 1.5.1
25 icmD50_100@Base 1.5.1
26 icmD50_100_ary3@Base 1.5.1
27 icmD50_ary3@Base 1.5.1
28 icmD65@Base 1.5.1
29 icmD65_100@Base 1.5.1
30 icmD65_100_ary3@Base 1.5.1
31 icmD65_ary3@Base 1.5.1
32 icmDet3x3@Base 1.5.1
33 icmDot3@Base 1.5.1
34 icmInverse3x3@Base 1.5.1
35 icmL2Y@Base 1.5.1
36 icmLCh2Lab@Base 1.5.1
37 icmLab2LCh@Base 1.5.1
38 icmLab2XYZ@Base 1.5.1
39 icmLabDE@Base 1.5.1
40 icmLabDEsq@Base 1.5.1
41 icmLineLineClosest@Base 1.5.1
42 icmLuv2XYZ@Base 1.5.1
43 icmMul3By3x4@Base 1.5.1
44 icmMul3x3@Base 1.5.1
45 icmMul3x3_2@Base 1.5.1
46 icmMulBy2x2@Base 1.5.1
47 icmMulBy3x3@Base 1.5.1
48 icmNorm33@Base 1.5.1
49 icmNorm33sq@Base 1.5.1
50 icmNorm3@Base 1.5.1
51 icmNorm3sq@Base 1.5.1
52 icmNormalize33@Base 1.5.1
53 icmNormalize3@Base 1.5.1
54 icmPLab@Base 1.5.1
55 icmPdv@Base 1.5.1
56 icmPfv@Base 1.5.1
57 icmPiv@Base 1.5.1
58 icmPlaneDist3@Base 1.5.1
59 icmPlaneEqn3@Base 1.5.1
60 icmRGBprim2matrix@Base 1.5.1
61 icmRotMat@Base 1.5.1
62 icmScale33@Base 1.5.1
63 icmScale3@Base 1.5.1
64 icmScale3x3@Base 1.5.1
65 icmSetMultiLutTables@Base 1.5.1
66 icmSetUnity3x3@Base 1.5.1
67 icmSub3@Base 1.5.1
68 icmTensMul3@Base 1.5.1
69 icmTranspose3x3@Base 1.5.1
70 icmVecPlaneIsect@Base 1.5.1
71 icmVecRotMat@Base 1.5.1
72 icmXYZ21960UCS@Base 1.5.1
73 icmXYZ21964WUV@Base 1.5.1
74 icmXYZ21976UCS@Base 1.5.1
75 icmXYZ2Lab@Base 1.5.1
76 icmXYZ2Luv@Base 1.5.1
77 icmXYZ2Yxy@Base 1.5.1
78 icmXYZCIE2K@Base 1.5.1
79 icmXYZCIE94@Base 1.5.1
80 icmXYZLabDE@Base 1.5.1
81 icmY2L@Base 1.5.1
82 icmYxy2XYZ@Base 1.5.1
83 new_icc@Base 1.5.1
84 new_icc_a@Base 1.5.1
85 new_icmAllocStd@Base 1.5.1
86 new_icmFileMD5_a@Base 1.5.1
87 new_icmFileMem@Base 1.5.1
88 new_icmFileMem_a@Base 1.5.1
89 new_icmFileMem_ad@Base 1.5.1
90 new_icmFileMem_d@Base 1.5.1
91 new_icmFileStd_fp@Base 1.5.1
92 new_icmFileStd_fp_a@Base 1.5.1
93 new_icmFileStd_name@Base 1.5.1
94 new_icmFileStd_name_a@Base 1.5.1
95 new_icmMD5@Base 1.5.1
96 psh_inc@Base 1.5.1
97 psh_init@Base 1.5.1
98 psh_reset@Base 1.5.1
99 read_Primitive@Base 1.5.1
100 str2tag@Base 1.5.1
101 tag2str@Base 1.5.1
102 write_Primitive@Base 1.5.1
+0
-8
debian/libimdi-dev.install less more
0 usr/include/imdi_arch.h
1 usr/include/imdi_gen.h
2 usr/include/imdi.h
3 usr/include/imdi_tab.h
4 usr/include/imdi_utl.h
5 usr/include/refi.h
6 usr/lib/*/libimdi.a
7 usr/lib/*/libimdi.so
+0
-1
debian/libimdi0.install less more
0 usr/lib/*/libimdi*.so.*
+0
-16
debian/libimdi0.symbols less more
0 libimdi.so.0 libimdi0 #MINVER#
1 (regex)"^imdi_k\d+@Base$" 1.5.1
2 (regex)"^imdi_k\d+_gentab@Base$" 1.5.1
3 imdi_tab@Base 1.5.1
4 imdi_tab_free@Base 1.5.1
5 in_adj@Base 1.5.1
6 ktable@Base 1.5.1
7 new_imdi@Base 1.5.1
8 no_kfuncs@Base 1.5.1
9 write_default@Base 1.5.1
10 write_entry@Base 1.5.1
11 write_uchar@Base 1.5.1
12 write_uint@Base 1.5.1
13 write_ulong@Base 1.5.1
14 write_ulonglong@Base 1.5.1
15 write_ushort@Base 1.5.1
+0
-51
debian/mppcheck.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH CHECK "1" "August 2013" "Check Model Printer Profile, Version 1.5.1" "User Commands"
2 .SH NAME
3 Check \- Check Model Printer Profile.
4 .SH DESCRIPTION
5 Check Model Printer Profile, Version 1.5.1
6 Author: Graeme W. Gill, licensed under the AGPL Version 3
7 usage: debian/tmp/usr/bin/mppcheck [\-v] [\-c] [\-s] [\-y] values.ti3 profile.mpp
8 .TP
9 \fB\-v\fR
10 Verbose mode
11 .TP
12 \fB\-c\fR
13 Show CIE94 delta E values
14 .TP
15 \fB\-k\fR
16 Show CIEDE2000 delta E values
17 .TP
18 \fB\-s\fR
19 Check spectral model too
20 .TP
21 \fB\-y\fR
22 Detail each value
23 .TP
24 values.ti3
25 Test values to check against
26 .IP
27 profile.mpp Profile to check
28 .PP
29 Author: Graeme W. Gill, licensed under the AGPL Version 3
30 usage: debian/tmp/usr/bin/mppcheck [\-v] [\-c] [\-s] [\-y] values.ti3 profile.mpp
31 .TP
32 \fB\-v\fR
33 Verbose mode
34 .TP
35 \fB\-c\fR
36 Show CIE94 delta E values
37 .TP
38 \fB\-k\fR
39 Show CIEDE2000 delta E values
40 .TP
41 \fB\-s\fR
42 Check spectral model too
43 .TP
44 \fB\-y\fR
45 Detail each value
46 .TP
47 values.ti3
48 Test values to check against
49 .IP
50 profile.mpp Profile to check
+0
-107
debian/mpplu.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH TRANSLATE "1" "August 2013" "Translate colors through an MPP profile, V1.00" "User Commands"
2 .SH NAME
3 Translate \- Translate colors through an MPP profile.
4 .SH DESCRIPTION
5 Translate colors through an MPP profile, V1.00
6 Author: Graeme W. Gill
7 usage: mpplu [\-v] [\-f func] [\-i intent] [\-o order] profile
8 .TP
9 \fB\-v\fR
10 Verbose
11 .TP
12 \fB\-f\fR function
13 f = forward, b = backwards
14 .TP
15 \fB\-p\fR oride
16 x = XYZ_PCS, l = Lab_PCS, y = Yxy, s = spectral,
17 .TP
18 \fB\-l\fR limit
19 override default ink limit, 1 \- N00%
20 .TP
21 \fB\-i\fR illum
22 Choose illuminant for print/transparency spectral data:
23 A, C, D50 (def.), D50M2, D65, F5, F8, F10 or file.sp
24 .TP
25 \fB\-o\fR observ
26 Choose CIE Observer for spectral data:
27 1931_2 (def), 1964_10, S&B 1955_2, shaw, J&V 1978_2
28 .TP
29 \fB\-u\fR
30 Use Fluorescent Whitening Agent compensation
31 .TP
32 \fB\-g\fR
33 Create gamut output
34 .TP
35 \fB\-w\fR
36 Create gamut VRML as well
37 .TP
38 \fB\-n\fR
39 Don't add VRML axes
40 .TP
41 \fB\-a\fR n
42 Gamut transparency level
43 .TP
44 \fB\-d\fR n
45 Gamut surface detail level
46 .TP
47 \fB\-t\fR num
48 Invoke debugging test code "num" 1..n
49 1 \- check partial derivative for device input
50 2 \- create overlap diagnostic VRML gamut surface
51 .IP
52 The colors to be translated should be fed into stdin,
53 one input color per line, white space separated.
54 A line starting with a # will be ignored.
55 A line not starting with a number will terminate the program.
56 .PP
57 Author: Graeme W. Gill
58 usage: mpplu [\-v] [\-f func] [\-i intent] [\-o order] profile
59 .TP
60 \fB\-v\fR
61 Verbose
62 .TP
63 \fB\-f\fR function
64 f = forward, b = backwards
65 .TP
66 \fB\-p\fR oride
67 x = XYZ_PCS, l = Lab_PCS, y = Yxy, s = spectral,
68 .TP
69 \fB\-l\fR limit
70 override default ink limit, 1 \- N00%
71 .TP
72 \fB\-i\fR illum
73 Choose illuminant for print/transparency spectral data:
74 A, C, D50 (def.), D50M2, D65, F5, F8, F10 or file.sp
75 .TP
76 \fB\-o\fR observ
77 Choose CIE Observer for spectral data:
78 1931_2 (def), 1964_10, S&B 1955_2, shaw, J&V 1978_2
79 .TP
80 \fB\-u\fR
81 Use Fluorescent Whitening Agent compensation
82 .TP
83 \fB\-g\fR
84 Create gamut output
85 .TP
86 \fB\-w\fR
87 Create gamut VRML as well
88 .TP
89 \fB\-n\fR
90 Don't add VRML axes
91 .TP
92 \fB\-a\fR n
93 Gamut transparency level
94 .TP
95 \fB\-d\fR n
96 Gamut surface detail level
97 .TP
98 \fB\-t\fR num
99 Invoke debugging test code "num" 1..n
100 1 \- check partial derivative for device input
101 2 \- create overlap diagnostic VRML gamut surface
102 .IP
103 The colors to be translated should be fed into stdin,
104 one input color per line, white space separated.
105 A line starting with a # will be ignored.
106 A line not starting with a number will terminate the program.
+0
-53
debian/mppprof.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH CREATE "1" "August 2013" "Create Model Printer Profile, Version 1.5.1" "User Commands"
2 .SH NAME
3 Create \- Create Model Printer Profile.
4 .SH DESCRIPTION
5 Create Model Printer Profile, Version 1.5.1
6 Author: Graeme W. Gill, licensed under the AGPL Version 3
7 usage: debian/tmp/usr/bin/mppprof [options] outfile
8 .HP
9 \fB\-v\fR [level] Verbose mode
10 .HP
11 \fB\-q\fR [lmhus] Quality \- Low, Medium (def), High, Ultra, Simple
12 .TP
13 \fB\-l\fR limit
14 override default ink limit, 1 \- n00%
15 .TP
16 \fB\-s\fR
17 Generate spectral model too
18 .TP
19 \fB\-m\fR
20 Generate ink mixing model
21 .HP
22 \fB\-y\fR [level] Verify profile, 2 = read/write verify
23 .TP
24 \fB\-L\fR
25 Output Lab values
26 .TP
27 outfile
28 Base name for input.ti3/output.mpp file
29 .PP
30 Author: Graeme W. Gill, licensed under the AGPL Version 3
31 usage: debian/tmp/usr/bin/mppprof [options] outfile
32 .HP
33 \fB\-v\fR [level] Verbose mode
34 .HP
35 \fB\-q\fR [lmhus] Quality \- Low, Medium (def), High, Ultra, Simple
36 .TP
37 \fB\-l\fR limit
38 override default ink limit, 1 \- n00%
39 .TP
40 \fB\-s\fR
41 Generate spectral model too
42 .TP
43 \fB\-m\fR
44 Generate ink mixing model
45 .HP
46 \fB\-y\fR [level] Verify profile, 2 = read/write verify
47 .TP
48 \fB\-L\fR
49 Output Lab values
50 .TP
51 outfile
52 Base name for input.ti3/output.mpp file
+0
-49
debian/oeminst.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH INSTALL "1" "August 2013" "Install OEM data files, Version 1.5.1" "User Commands"
2 .SH NAME
3 Install \- List information about the FILEs.
4 .SH DESCRIPTION
5 Install OEM data files, Version 1.5.1
6 Author: Graeme W. Gill, licensed under the GPL Version 2 or later
7 usage: oeminst [\-options] [infile(s)]
8 .TP
9 \fB\-v\fR
10 Verbose
11 .TP
12 \fB\-n\fR
13 Don't install, show where files would be installed
14 .TP
15 \fB\-c\fR
16 Don't install, save files to current directory
17 .TP
18 \fB\-S\fR d
19 Specify the install scope u = user (def.), l = local system]
20 .TP
21 infile
22 setup.exe CD install file(s) or .dll(s) containing install files
23 .TP
24 infile.[edr|ccss|ccmx]
25 EDR file(s) to translate and install or CCSS or CCMX files to install
26 If no file is provided, oeminst will look for the install CD.
27 .PP
28 Author: Graeme W. Gill, licensed under the GPL Version 2 or later
29 usage: oeminst [\-options] [infile(s)]
30 .TP
31 \fB\-v\fR
32 Verbose
33 .TP
34 \fB\-n\fR
35 Don't install, show where files would be installed
36 .TP
37 \fB\-c\fR
38 Don't install, save files to current directory
39 .TP
40 \fB\-S\fR d
41 Specify the install scope u = user (def.), l = local system]
42 .TP
43 infile
44 setup.exe CD install file(s) or .dll(s) containing install files
45 .TP
46 infile.[edr|ccss|ccmx]
47 EDR file(s) to translate and install or CCSS or CCMX files to install
48 If no file is provided, oeminst will look for the install CD.
+0
-31463
debian/patches/01_autotools-support.diff less more
0 --- /dev/null
1 +++ b/Makefile.shared
2 @@ -0,0 +1,15 @@
3 +# Common CFLAGS for Argyll components
4 +
5 +AM_CFLAGS = -D_GNU_SOURCE -DUNIX -DENABLE_USB -DENABLE_SERIAL -I$(top_srcdir)/cgats \
6 + -I$(top_srcdir)/gamut -I$(top_srcdir)/h -I$(top_srcdir)/jcnf \
7 + -I$(top_srcdir)/libusb1/libusb -I$(top_srcdir)/numlib \
8 + -I$(top_srcdir)/plot -I$(top_srcdir)/profile -I$(top_srcdir)/render \
9 + -I$(top_srcdir)/rspl -I$(top_srcdir)/spectro -I$(top_srcdir)/target \
10 + -I$(top_srcdir)/ucmm -I$(top_srcdir)/xicc $(TIFF_CFLAGS) $(ICC_CFLAGS) \
11 + $(YAJL_CFLAGS) -L$(top_srcdir)/spectro
12 +
13 +# Build libs in other dirs when required
14 +../%.la:
15 + $(MAKE) -C $(@D) $(@F)
16 +./%.la:
17 + $(MAKE) -C $(@D) $(@F)
18 --- /dev/null
19 +++ b/config.h.in
20 @@ -0,0 +1,95 @@
21 +/* config.h.in. Generated from configure.ac by autoheader. */
22 +
23 +/* Define if building universal (internal helper macro) */
24 +#undef AC_APPLE_UNIVERSAL_BUILD
25 +
26 +/* Default visibility */
27 +#undef API_EXPORTED
28 +
29 +/* Define to 1 if you have the <dlfcn.h> header file. */
30 +#undef HAVE_DLFCN_H
31 +
32 +/* Define to 1 if you have the <inttypes.h> header file. */
33 +#undef HAVE_INTTYPES_H
34 +
35 +/* Define to 1 if you have the `m' library (-lm). */
36 +#undef HAVE_LIBM
37 +
38 +/* Define to 1 if you have the `pthread' library (-lpthread). */
39 +#undef HAVE_LIBPTHREAD
40 +
41 +/* Define to 1 if you have the `rt' library (-lrt). */
42 +#undef HAVE_LIBRT
43 +
44 +/* Define to 1 if you have the <memory.h> header file. */
45 +#undef HAVE_MEMORY_H
46 +
47 +/* Define to 1 if you have the <stdint.h> header file. */
48 +#undef HAVE_STDINT_H
49 +
50 +/* Define to 1 if you have the <stdlib.h> header file. */
51 +#undef HAVE_STDLIB_H
52 +
53 +/* Define to 1 if you have the <strings.h> header file. */
54 +#undef HAVE_STRINGS_H
55 +
56 +/* Define to 1 if you have the <string.h> header file. */
57 +#undef HAVE_STRING_H
58 +
59 +/* Define to 1 if you have the <sys/stat.h> header file. */
60 +#undef HAVE_SYS_STAT_H
61 +
62 +/* Define to 1 if you have the <sys/types.h> header file. */
63 +#undef HAVE_SYS_TYPES_H
64 +
65 +/* Define to 1 if you have the <unistd.h> header file. */
66 +#undef HAVE_UNISTD_H
67 +
68 +/* Define to the sub-directory in which libtool stores uninstalled libraries.
69 + */
70 +#undef LT_OBJDIR
71 +
72 +/* Linux kernel */
73 +#undef OS_LINUX
74 +
75 +/* Name of package */
76 +#undef PACKAGE
77 +
78 +/* Define to the address where bug reports for this package should be sent. */
79 +#undef PACKAGE_BUGREPORT
80 +
81 +/* Define to the full name of this package. */
82 +#undef PACKAGE_NAME
83 +
84 +/* Define to the full name and version of this package. */
85 +#undef PACKAGE_STRING
86 +
87 +/* Define to the one symbol short name of this package. */
88 +#undef PACKAGE_TARNAME
89 +
90 +/* Define to the home page for this package. */
91 +#undef PACKAGE_URL
92 +
93 +/* Define to the version of this package. */
94 +#undef PACKAGE_VERSION
95 +
96 +/* Define to 1 if you have the ANSI C header files. */
97 +#undef STDC_HEADERS
98 +
99 +/* Version number of package */
100 +#undef VERSION
101 +
102 +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
103 + significant byte first (like Motorola and SPARC, unlike Intel). */
104 +#if defined AC_APPLE_UNIVERSAL_BUILD
105 +# if defined __BIG_ENDIAN__
106 +# define WORDS_BIGENDIAN 1
107 +# endif
108 +#else
109 +# ifndef WORDS_BIGENDIAN
110 +# undef WORDS_BIGENDIAN
111 +# endif
112 +#endif
113 +
114 +/* Define to 1 if the X Window System is missing or not being used. */
115 +#undef X_DISPLAY_MISSING
116 --- /dev/null
117 +++ b/Makefile.am
118 @@ -0,0 +1,23 @@
119 +include $(top_srcdir)/Makefile.shared
120 +
121 +ACLOCAL_AMFLAGS = -I m4
122 +
123 +privatelib_LTLIBRARIES = libargyll.la
124 +privatelibdir = $(pkglibdir)
125 +
126 +libargyll_la_SOURCES = xicc/xicc.c xicc/xicc.h xicc/xcam.c xicc/xcam.h \
127 + gamut/gamut.c gamut/gamut.h xicc/xfit.c xicc/xfit.h \
128 + xicc/cam97s3.c xicc/cam97s3.h xicc/cam02.c xicc/cam02.h \
129 + xicc/moncurve.c xicc/moncurve.h xicc/xspect.c xicc/xspect.h \
130 + xicc/xcal.c xicc/xcal.h xicc/xcolorants.h xicc/xcolorants.c xicc/ccmx.c
131 +libargyll_la_LIBADD = ./rspl/librspl.la $(ICC_LIBS) \
132 + ./numlib/libargyllnum.la ./cgats/libcgats.la
133 +
134 +SUBDIRS = h doc ref numlib cgats $(ICC_SUBDIRS) plot rspl jcnf ucmm render . gamut \
135 + spectro xicc target link tweak profile scanin imdi
136 +
137 +#SUBDIRS = h doc ref numlib cgats $(ICC_SUBDIRS) plot rspl jcnf ucmm render . gamut \
138 +# spectro xicc target link tweak profile scanin imdi
139 +
140 +
141 +EXTRA_DIST = Readme.txt ttbd.txt log.txt
142 --- /dev/null
143 +++ b/configure.ac
144 @@ -0,0 +1,133 @@
145 +AC_INIT([argyll], [1.3.7])
146 +AM_INIT_AUTOMAKE([1.9 foreign])
147 +
148 +AC_PROG_CC
149 +LT_INIT
150 +AC_PROG_INSTALL
151 +
152 +AM_PROG_LIBTOOL
153 +AC_PROG_LIBTOOL
154 +
155 +AC_CONFIG_MACRO_DIR([m4])
156 +AM_CONFIG_HEADER([config.h])
157 +
158 +AC_PATH_XTRA
159 +
160 +AC_CHECK_LIB(m, sqrt)
161 +AC_CHECK_LIB(pthread, pthread_create)
162 +
163 +AC_CHECK_LIB(tiff, TIFFOpen, TIFF_LIBS="-ltiff", , -lm)
164 +AC_SUBST([TIFF_LIBS])
165 +
166 +AC_CHECK_LIB(rt, clock_gettime)
167 +
168 +AC_ARG_WITH(system-libicc, [ --with-system-libicc use system libicc instead of argyllcms copy],system_libicc=$withval,system_libicc=no)
169 +AC_MSG_CHECKING([whether to use system libicc or not])
170 +if test x$system_libicc = xno ; then
171 + HAVE_ICC=false
172 + AC_MSG_RESULT(no)
173 +else
174 + AC_MSG_RESULT(yes)
175 + AC_CHECK_LIB(icc, new_icmFileStd_name, HAVE_ICC="true", , -lm)
176 + if test "$HAVE_ICC" != "true" ; then
177 + AC_MSG_ERROR([system libicc missing or not compatible with argyllcms])
178 + fi
179 +fi
180 +if test "$HAVE_ICC" = "true" ; then
181 + ICC_LIBS="-licc"
182 +else
183 + ICC_LIBS='$(top_srcdir)/icc/libicc.la'
184 + ICC_CFLAGS='-I$(top_srcdir)/icc'
185 + ICC_SUBDIRS='icc'
186 +fi
187 +AC_SUBST([ICC_LIBS])
188 +AC_SUBST([ICC_CFLAGS])
189 +AC_SUBST([ICC_SUBDIRS])
190 +
191 +AC_ARG_WITH(system-libyajl, [ --with-system-libyajl use system libyajl instead of argyllcms copy],system_libyajl=$withval,system_libyajl=no)
192 +AC_MSG_CHECKING([whether to use system libyajl or not])
193 +if test x$system_libyajl = xno ; then
194 + HAVE_YAJL=false
195 + AC_MSG_RESULT(no)
196 +else
197 + AC_MSG_RESULT(yes)
198 + AC_CHECK_LIB(yajl, yajl_gen_c_comment, HAVE_YAJL="true", , -lm)
199 + if test "$HAVE_YAJL" != "true" ; then
200 + AC_MSG_ERROR([system libyajl missing or not compatible with argyllcms])
201 + fi
202 +fi
203 +if test "$HAVE_YAJL" = "true" ; then
204 + YAJL_LIBS="-lyajl"
205 +else
206 + YAJL_LIBS='$(top_srcdir)/jcnf/yajl/libyajl.la'
207 + YAJL_CFLAGS='-I$(top_srcdir)/jcnf/yajl'
208 + YAJL_SUBDIRS='yajl'
209 +fi
210 +AC_SUBST([YAJL_LIBS])
211 +AC_SUBST([YAJL_CFLAGS])
212 +AC_SUBST([YAJL_SUBDIRS])
213 +
214 +AC_CHECK_LIB(X11, XOpenDisplay, X_LIBS="$X_LIBS -lX11")
215 +AC_CHECK_LIB(Xext, XextFindDisplay, X_LIBS="$X_LIBS -lXext",,-lX11)
216 +AC_CHECK_LIB(Xss, XScreenSaverSuspend, X_LIBS="$X_LIBS -lXss",,-lXext -lX11)
217 +AC_CHECK_LIB(Xrandr, XRRRootToScreen, X_LIBS="$X_LIBS -lXrandr",,-LXext -lX11)
218 +AC_CHECK_LIB(Xinerama, XineramaQueryScreens, X_LIBS="$X_LIBS -lXinerama",,-LXext -lX11)
219 +AC_CHECK_LIB(Xxf86vm, XF86VidModeGetGamma, X_LIBS="$X_LIBS -lXxf86vm",,-lXext -lX11)
220 +AC_SUBST([X_LIBS])
221 +
222 +AC_SUBST(OS_LINUX)
223 +AC_SUBST(OS_BSD)
224 +case $host in
225 + *-linux*)
226 + OS_LINUX=1
227 + OS_BSD=0
228 + AC_DEFINE([OS_LINUX],[1],[Linux kernel])
229 + AM_CONDITIONAL([OS_LINUX],[true])
230 + ;;
231 + *-freebsd*|*-kfreebsd*-gnu|*-openbsd*|*-netbsd*)
232 + OS_LINUX=0
233 + OS_BSD=1
234 + AC_DEFINE([OS_LINUX],[0],[Linux kernel])
235 + AM_CONDITIONAL([OS_LINUX],[false])
236 + ;;
237 + *)
238 + OS_LINUX=0
239 + OS_BSD=0
240 + AC_DEFINE([OS_LINUX],[0],[Linux kernel])
241 + AM_CONDITIONAL([OS_LINUX],[false])
242 + ;;
243 +esac
244 +AC_DEFINE([API_EXPORTED],[],[Default visibility])
245 +
246 +AC_C_BIGENDIAN
247 +if test "$ac_cv_c_bigendian" = "yes"; then
248 + BIGENDIAN="1"
249 +else
250 + BIGENDIAN="0"
251 +fi
252 +AC_SUBST(BIGENDIAN)
253 +
254 +AC_CONFIG_FILES([Makefile
255 + h/Makefile
256 + doc/Makefile
257 + ref/Makefile
258 + numlib/Makefile
259 + cgats/Makefile
260 + plot/Makefile
261 + rspl/Makefile
262 + icc/Makefile
263 + gamut/Makefile
264 + xicc/Makefile
265 + link/Makefile
266 + spectro/Makefile
267 + profile/Makefile
268 + tweak/Makefile
269 + scanin/Makefile
270 + render/Makefile
271 + target/Makefile
272 + imdi/Makefile
273 + jcnf/Makefile
274 + jcnf/yajl/Makefile
275 + ucmm/Makefile])
276 +
277 +AC_OUTPUT
278 --- /dev/null
279 +++ b/tweak/Makefile.am
280 @@ -0,0 +1,11 @@
281 +include $(top_srcdir)/Makefile.shared
282 +
283 +LDADD = ../spectro/libinsttypes.la ../gamut/libgamut.la \
284 + ../gamut/libgammap.la ../plot/libvrml.la ../xicc/libxutils.la \
285 + ../xicc/libxicc.la ../rspl/librspl.la ../gamut/libgamut.la \
286 + ../gamut/libgammap.la $(ICC_LIBS) ../cgats/libcgats.la \
287 + ../numlib/libargyllnum.la $(TIFF_LIBS)
288 +
289 +bin_PROGRAMS = refine
290 +
291 +EXTRA_DIST = License.txt Readme.txt
292 --- /dev/null
293 +++ b/rspl/Makefile.am
294 @@ -0,0 +1,15 @@
295 +include $(top_srcdir)/Makefile.shared
296 +
297 +privatelib_LTLIBRARIES = librspl.la
298 +privatelibdir = $(pkglibdir)
299 +
300 +librspl_la_SOURCES = rspl.h rspl_imp.h mlbs.h rspl.c scat.c rev.c \
301 + rev.h gam.c spline.c opt.c
302 +librspl_la_LIBADD = ../numlib/libargyllnum.la ../plot/libvrml.la
303 +
304 +LDADD = ./librspl.la ../numlib/libargyllnum.la ../plot/libplot.la \
305 + ../plot/libvrml.la $(X_LIBS) $(TIFF_LIBS) $(ICC_LIBS)
306 +
307 +check_PROGRAMS = revbench c1 c1df t2d t2ddf t3d t3ddf tnd trnd
308 +
309 +EXTRA_DIST = License.txt Readme.txt
310 --- /dev/null
311 +++ b/plot/Makefile.am
312 @@ -0,0 +1,12 @@
313 +include $(top_srcdir)/Makefile.shared
314 +
315 +privatelib_LTLIBRARIES = libplot.la libvrml.la
316 +privatelibdir = $(pkglibdir)
317 +
318 +libplot_la_SOURCES = plot.h plot.c
319 +libplot_la_LIBADD = $(X_LIBS)
320 +
321 +libvrml_la_SOURCES = vrml.h vrml.c
322 +libvrml_la_LIBADD = $(ICC_LIBS) ../numlib/libargyllnum.la
323 +
324 +EXTRA_DIST = License.txt Readme.txt
325 --- /dev/null
326 +++ b/doc/Makefile.am
327 @@ -0,0 +1,6 @@
328 +docdir = $(datadir)/doc/argyll
329 +
330 +doc_DATA = $(wildcard *.txt) $(wildcard *.html) $(wildcard *.jpg) \
331 + $(wildcard *.gif)
332 +
333 +EXTRA_DIST = $(doc_DATA)
334 --- /dev/null
335 +++ b/numlib/Makefile.am
336 @@ -0,0 +1,15 @@
337 +include $(top_srcdir)/Makefile.shared
338 +
339 +privatelib_LTLIBRARIES = libargyllnum.la
340 +privatelibdir = $(pkglibdir)
341 +
342 +libargyllnum_la_SOURCES = numlib.h numsup.c numsup.h dnsq.c dnsq.h \
343 + powell.c powell.h dhsx.c dhsx.h ludecomp.c ludecomp.h svd.c \
344 + svd.h zbrent.c zbrent.h rand.c rand.h sobol.c sobol.h aatree.c
345 +
346 +LDADD = ./libargyllnum.la
347 +
348 +check_PROGRAMS = dnsqtest tpowell tdhsx LUtest svdtest zbrenttest \
349 + soboltest
350 +
351 +EXTRA_DIST = License.txt Readme.txt
352 --- /dev/null
353 +++ b/spectro/Makefile.am
354 @@ -0,0 +1,53 @@
355 +include $(top_srcdir)/Makefile.shared
356 +
357 +privatelib_LTLIBRARIES = libinsttypes.la libconv.la libinst.la libinstapp.la libdisp.la
358 +privatelibdir = $(pkglibdir)
359 +
360 +libinsttypes_la_SOURCES = insttypes.h insttypes.c insttypeinst.h
361 +libinsttypes_la_LIBADD = ../libargyll.la
362 +
363 +libinst_la_SOURCES = inst.h inst.c insttypes.c dtp20.c dtp20.h dtp22.c \
364 + dtp22.h dtp41.c dtp41.h dtp51.c dtp51.h dtp92.c dtp92.h \
365 + i1disp.c i1disp.h i1pro.c i1pro.h i1pro_imp.c i1pro_imp.h \
366 + munki.c munki_imp.c ss.c ss.h ss_imp.c ss_imp.h hcfr.c hcfr.h \
367 + spyd2.c spyd2.h spyd2setup.h spyd2PLD.h huey.c huey.h \
368 + usbio.c hidio.c pollem.c pollem.h icoms.h conv.h usbio.h \
369 + hidio.h i1d3.h i1d3.c colorhug.c colorhug.h icoms.c \
370 + oemarch.h oemarch.c iusb.h vinflate.c inflate.c
371 +libinst_la_LIBADD = $(ICC_LIBS) ../numlib/libargyllnum.la \
372 + ../libargyll.la ../rspl/librspl.la libconv.la
373 +
374 +libinst_la_LDFLAGS = $(shell libusb-config --libs)
375 +
376 +libdisp_la_SOURCES = dispsup.c dispwin.c dispwin.h dispsup.h webwin.c webwin.h mongoose.c mongoose.h
377 +libdisp_la_LIBADD = $(X_LIBS) ../ucmm/libucmm.la $(ICC_LIBS) -ldl \
378 + ../numlib/libargyllnum.la libconv.la libinst.la libinstapp.la \
379 + ../libargyll.la
380 +
381 +libconv_la_SOURCES = conv.c pollem.c xdg_bds.h xdg_bds.c aglob.c ../xicc/ccss.c
382 +libconv_la_LIBADD = ../libargyll.la ../numlib/libargyllnum.la \
383 + ../cgats/libcgats.la
384 +
385 +libinstapp_la_SOURCES = instappsup.c instappsup.h
386 +libinstapp_la_LIBADD = libinst.la ../libargyll.la ../numlib/libargyllnum.la \
387 + libconv.la
388 +
389 +LDADD = ./libinsttypes.la ./libinstapp.la ./libdisp.la ./libinst.la \
390 + ./libconv.la ../ucmm/libucmm.la ../jcnf/libjcnf.la $(YAJL_LIBS) \
391 + ../xicc/libxicc.la $(ICC_LIBS) ../cgats/libcgats.la \
392 + ../rspl/librspl.la ../gamut/libgamut.la ../target/libtarget.la \
393 + ../plot/libplot.la ../numlib/libargyllnum.la $(X_LIBS) \
394 + ../libargyll.la
395 +
396 +bin_PROGRAMS = dispwin synthcal dispread dispcal fakeread synthread \
397 + chartread spotread illumread ccxxmake spec2cie average oeminst
398 +
399 +dispwin_CFLAGS = $(AM_CFLAGS) -DSTANDALONE_TEST
400 +
401 +synthcal_DEPENDENCIES = ../gamut/libgammap.la ../target/libtarget.la
402 +
403 +refdir = $(datadir)/color/argyll/ref
404 +
405 +ref_DATA = ccxx.ti1 SOtele.sp $(wildcard *.cal)
406 +
407 +EXTRA_DIST = Readme.txt
408 --- /dev/null
409 +++ b/ref/Makefile.am
410 @@ -0,0 +1,7 @@
411 +refdir = $(datadir)/color/argyll/ref
412 +
413 +ref_DATA = $(wildcard *.cal) $(wildcard *.cht) $(wildcard *.cie) \
414 + $(wildcard *.icm) $(wildcard *.sp) $(wildcard *.ti1) \
415 + $(wildcard *.ti2)
416 +
417 +EXTRA_DIST = $(ref_DATA)
418 --- /dev/null
419 +++ b/link/Makefile.am
420 @@ -0,0 +1,11 @@
421 +include $(top_srcdir)/Makefile.shared
422 +
423 +LDADD = ../spectro/libinsttypes.la ../xicc/libxicc.la \
424 + ../xicc/libxutils.la ../gamut/libgamut.la \
425 + ../gamut/libgammap.la ../plot/libplot.la ../plot/libvrml.la \
426 + ../rspl/librspl.la $(ICC_LIBS) ../cgats/libcgats.la \
427 + ../numlib/libargyllnum.la ../libargyll.la $(X_LIBS) $(TIFF_LIBS)
428 +
429 +bin_PROGRAMS = collink pathplot
430 +
431 +EXTRA_DIST = License.txt Readme.txt
432 --- /dev/null
433 +++ b/imdi/Makefile.am
434 @@ -0,0 +1,40 @@
435 +include $(top_srcdir)/Makefile.shared
436 +
437 +lib_LTLIBRARIES = libimdi.la
438 +
439 +LIBIMDI_VERSION=0.0
440 +
441 +libimdi_la_SOURCES = imdi.c imdi_tab.c imdi_arch.h imdi_gen.h imdi.h \
442 + imdi_tab.h imdi_utl.h refi.h imdi_k.h
443 +libimdi_la_LDFLAGS = -version $(shell echo $(LIBIMDI_VERSION) | tr . :):0
444 +
445 +include_HEADERS = imdi_arch.h imdi_gen.h imdi.h imdi_tab.h \
446 + imdi_utl.h refi.h
447 +
448 +bin_PROGRAMS = cctiff greytiff
449 +
450 +BINLDADD = ./libimdi.la ../spectro/libinsttypes.la ../plot/libvrml.la \
451 + ../xicc/libxicc.la ../xicc/libxutils.la ../gamut/libgamut.la \
452 + ../gamut/libgammap.la ../rspl/librspl.la $(ICC_LIBS) \
453 + ../cgats/libcgats.la ../numlib/libargyllnum.la ../libargyll.la \
454 + $(TIFF_LIBS) -ljpeg
455 +
456 +cctiff_LDADD = $(BINLDADD)
457 +greytiff_LDADD = $(BINLDADD)
458 +
459 +check_PROGRAMS = ctest
460 +
461 +ctest_SOURCES = ctest.c cgen.c
462 +
463 +noinst_PROGRAMS = imdi_make
464 +
465 +imdi_make_SOURCES = imdi_make.c imdi_gen.c cgen.c
466 +##imdi_make_CFLAGS = $(CFLAGS) -O
467 +
468 +BUILT_SOURCES = imdi_k.h
469 +
470 +imdi.c: imdi_k.h
471 +imdi_k.h: imdi_make
472 + ./imdi_make
473 +
474 +EXTRA_DIST = License.txt Readme.txt
475 --- /dev/null
476 +++ b/scanin/Makefile.am
477 @@ -0,0 +1,19 @@
478 +include $(top_srcdir)/Makefile.shared
479 +
480 +privatelib_LTLIBRARIES = libscanrd.la
481 +privatelibdir = $(pkglibdir)
482 +
483 +libscanrd_la_SOURCES = scanrd.h scanrd_.h scanrd.c
484 +libscanrd_la_LIBADD = ../rspl/librspl.la ../numlib/libargyllnum.la
485 +
486 +LDADD = ./libscanrd.la ../numlib/libargyllnum.la $(ICC_LIBS) \
487 + ../cgats/libcgats.la ../xicc/libxicc.la $(TIFF_LIBS) \
488 + ../libargyll.la
489 +
490 +bin_PROGRAMS = scanin
491 +
492 +refdir = $(datadir)/color/argyll/ref
493 +
494 +ref_DATA = $(wildcard *.cht) $(wildcard *.cie) $(wildcard *.ti2)
495 +
496 +EXTRA_DIST = $(ref_DATA) License.txt Readme.txt
497 --- /dev/null
498 +++ b/cgats/Makefile.am
499 @@ -0,0 +1,9 @@
500 +include $(top_srcdir)/Makefile.shared
501 +
502 +privatelib_LTLIBRARIES = libcgats.la
503 +privatelibdir = $(pkglibdir)
504 +
505 +libcgats_la_SOURCES = pars.c pars.h cgats.c cgats.h parsstd.c \
506 + cgatsstd.c
507 +
508 +EXTRA_DIST = License.txt Readme.txt
509 --- /dev/null
510 +++ b/render/Makefile.am
511 @@ -0,0 +1,13 @@
512 +include $(top_srcdir)/Makefile.shared
513 +
514 +privatelib_LTLIBRARIES = librender.la
515 +privatelibdir = $(pkglibdir)
516 +
517 +librender_la_SOURCES = render.h render.c thscreen.h thscreen.c
518 +librender_la_LIBADD = $(TIFF_LIBS) ../numlib/libargyllnum.la
519 +
520 +LDADD = ./librender.la ../numlib/libargyllnum.la $(TIFF_LIBS)
521 +
522 +check_PROGRAMS = timage
523 +
524 +EXTRA_DIST = License.txt Readme.txt
525 --- /dev/null
526 +++ b/jcnf/Makefile.am
527 @@ -0,0 +1,15 @@
528 +include $(top_srcdir)/Makefile.shared
529 +
530 +SUBDIRS = $(YAJL_SUBDIRS)
531 +
532 +privatelib_LTLIBRARIES = libjcnf.la
533 +privatelibdir = $(pkglibdir)
534 +
535 +libjcnf_la_SOURCES = jcnf.h jcnf.c
536 +libjcnf_la_LIBADD = $(YAJL_LIBS)
537 +
538 +LDADD = ./libjcnf.la $(YAJL_LIBS)
539 +
540 +check_PROGRAMS = test
541 +
542 +EXTRA_DIST = Readme.txt
543 --- /dev/null
544 +++ b/jcnf/yajl/Makefile.am
545 @@ -0,0 +1,13 @@
546 +include $(top_srcdir)/Makefile.shared
547 +
548 +privatelib_LTLIBRARIES = libyajl.la
549 +privatelibdir = $(pkglibdir)
550 +
551 +libyajl_la_SOURCES = yajl_common.h yajl_gen.h yajl_parse.h yajl.c \
552 + yajl_alloc.c yajl_alloc.h yajl_buf.c yajl_buf.h yajl_encode.c \
553 + yajl_encode.h yajl_gen.c yajl_lex.c yajl_lex.h yajl_parser.c \
554 + yajl_parser.h
555 +
556 +LDADD = ./libyajl.la
557 +
558 +check_PROGRAMS = yajl_test json_verify
559 --- /dev/null
560 +++ b/h/Makefile.am
561 @@ -0,0 +1,3 @@
562 +EXTRA_DIST = Readme.txt copyright.h config.h sort.h llist.h xlist.h \
563 + counters.h
564 +
565 --- /dev/null
566 +++ b/icc/Makefile.am
567 @@ -0,0 +1,22 @@
568 +include $(top_srcdir)/Makefile.shared
569 +
570 +LIBICC_VERSION=2.12
571 +
572 +lib_LTLIBRARIES = libicc.la
573 +
574 +libicc_la_SOURCES = icc.h iccV42.h icc.c iccstd.c
575 +libicc_la_LDFLAGS = -version-number $(shell echo $(LIBICC_VERSION) | tr . :):0
576 +
577 +include_HEADERS = icc.h iccV42.h
578 +
579 +LDADD = libicc.la
580 +
581 +bin_PROGRAMS = iccdump icclu
582 +
583 +check_PROGRAMS = icctest iccrw lutest
584 +
585 +refdir = $(datadir)/color/argyll/ref
586 +
587 +ref_DATA = $(wildcard *.icm)
588 +
589 +EXTRA_DIST = License.txt Readme.txt
590 --- /dev/null
591 +++ b/ucmm/Makefile.am
592 @@ -0,0 +1,9 @@
593 +include $(top_srcdir)/Makefile.shared
594 +
595 +privatelib_LTLIBRARIES = libucmm.la
596 +privatelibdir = $(pkglibdir)
597 +
598 +libucmm_la_SOURCES = ucmm.h ucmm.c
599 +libucmm_la_LIBADD = $(ICC_LIBS) ../jcnf/libjcnf.la ../spectro/libconv.la
600 +
601 +LDADD = libucmm.la
602 --- /dev/null
603 +++ b/xicc/Makefile.am
604 @@ -0,0 +1,28 @@
605 +include $(top_srcdir)/Makefile.shared
606 +
607 +privatelib_LTLIBRARIES = libxicc.la libxutils.la
608 +privatelibdir = $(pkglibdir)
609 +
610 +libxicc_la_SOURCES = xicc.c xlutfix.c xspect.c xcolorants.c \
611 + xutils.c iccjpeg.c xdevlin.c xcam.c cam97s3.c cam02.c mpp.c \
612 + ccmx.c ccss.c xfit.c xdgb.c moncurve.c xcal.c
613 +libxicc_la_LIBADD = $(ICC_LIBS) ../gamut/libgamut.la \
614 + ../numlib/libargyllnum.la ../spectro/libinsttypes.la \
615 + ../cgats/libcgats.la ../rspl/librspl.la ../libargyll.la -ljpeg $(TIFF_LIBS)
616 +
617 +libxutils_la_SOURCES = xutils.h xutils.c iccjpeg.c iccjpeg.h
618 +libxutils_la_LIBADD = $(TIFF_LIBS) $(ICC_LIBS) -ljpeg
619 +
620 +LDADD = ./libxicc.la ./libxutils.la ../rspl/librspl.la \
621 + ../numlib/libargyllnum.la ../gamut/libgamut.la \
622 + ../gamut/libgammap.la ../spectro/libinsttypes.la $(ICC_LIBS) \
623 + ../cgats/libcgats.la ../plot/libvrml.la ../plot/libplot.la \
624 + $(TIFF_LIBS) $(X_LIBS) ../libargyll.la -ljpeg
625 +
626 +bin_PROGRAMS = fakeCMY iccgamut mpplu revfix tiffgamut xicclu \
627 + extracticc extractttag specplot ccttest
628 +
629 +fakeCMY_DEPENDENCIES = ../spectro/libinsttypes.la \
630 + ../gamut/libgammap.la ../target/libtarget.la
631 +
632 +EXTRA_DIST = xmono.c xmatrix.c xlut.c
633 --- /dev/null
634 +++ b/target/Makefile.am
635 @@ -0,0 +1,28 @@
636 +include $(top_srcdir)/Makefile.shared
637 +
638 +CPPFLAGS+=-D_FORTIFY_SOURCE=2
639 +
640 +privatelib_LTLIBRARIES = libtarget.la
641 +privatelibdir = $(pkglibdir)
642 +
643 +libtarget_la_SOURCES = alphix.c alphix.h randix.c randix.h
644 +
645 +LDADD = ./libtarget.la ../rspl/librspl.la ../plot/libvrml.la \
646 + $(ICC_LIBS) ../render/librender.la ../cgats/libcgats.la \
647 + ../xicc/libxicc.la ../gamut/libgamut.la \
648 + ../spectro/libinsttypes.la ../spectro/libconv.la \
649 + ../numlib/libargyllnum.la ../libargyll.la $(TIFF_LIBS)
650 +
651 +bin_PROGRAMS = targen printtarg
652 +
653 +targen_DEPENDENCIES = ../spectro/libinsttypes.la
654 +targen_SOURCES = targen.c targen.h ofps.c ofps.h ifarp.c ifarp.h \
655 + simplat.c simplat.h simdlat.c simdlat.h prand.c prand.h
656 +
657 +printtarg_SOURCES = printtarg.c
658 +
659 +refdir = $(datadir)/color/argyll/ref
660 +
661 +ref_DATA = $(wildcard *.ti2)
662 +
663 +EXTRA_DIST = License.txt Readme.txt
664 --- /dev/null
665 +++ b/profile/Makefile.am
666 @@ -0,0 +1,27 @@
667 +include $(top_srcdir)/Makefile.shared
668 +
669 +privatelib_LTLIBRARIES = libprof.la
670 +privatelibdir = $(pkglibdir)
671 +
672 +libprof_la_SOURCES = prof.h profin.c profout.c
673 +libprof_la_LIBADD = ../gamut/libgammap.la $(ICC_LIBS) \
674 + ../gamut/libgamut.la ../xicc/libxicc.la \
675 + ../numlib/libargyllnum.la ../spectro/libinsttypes.la \
676 + ../xicc/libxutils.la ../libargyll.la
677 +
678 +LDADD = ./libprof.la ../xicc/libxutils.la ../spectro/libinst.la \
679 + ../xicc/libxicc.la ../spectro/libinsttypes.la \
680 + ../gamut/libgamut.la ../gamut/libgammap.la ../plot/libvrml.la \
681 + ../plot/libplot.la ../rspl/librspl.la \
682 + ../numlib/libargyllnum.la $(ICC_LIBS) ../cgats/libcgats.la \
683 + ../libargyll.la $(TIFF_LIBS) ../spectro/libconv.la
684 +
685 +bin_PROGRAMS = simpprof kodak2ti3 cb2ti3 txt2ti3 splitti3 \
686 + profcheck invprofcheck mppprof mppcheck verify colprof printcal \
687 + applycal
688 +
689 +refdir = $(datadir)/color/argyll/ref
690 +
691 +ref_DATA = $(wildcard *.sp)
692 +
693 +EXTRA_DIST = License.txt Readme.txt
694 --- /dev/null
695 +++ b/gamut/Makefile.am
696 @@ -0,0 +1,27 @@
697 +include $(top_srcdir)/Makefile.shared
698 +
699 +privatelib_LTLIBRARIES = libgamut.la libgammap.la
700 +privatelibdir = $(pkglibdir)
701 +
702 +libgamut_la_SOURCES = gamut.h gamut.c
703 +libgamut_la_LIBADD = ../cgats/libcgats.la $(ICC_LIBS) \
704 + ../numlib/libargyllnum.la
705 +
706 +libgammap_la_SOURCES = gammap.h gammap.c nearsmth.c nearsmth.h
707 +libgammap_la_LIBADD = ./libgamut.la $(ICC_LIBS) \
708 + ../numlib/libargyllnum.la ../plot/libvrml.la \
709 + ../rspl/librspl.la ../libargyll.la ../cgats/libcgats.la
710 +
711 +LDADD = ./libgamut.la ./libgammap.la $(ICC_LIBS) ../cgats/libcgats.la \
712 + ../rspl/librspl.la ../plot/libvrml.la ../xicc/libxicc.la \
713 + ../spectro/libinsttypes.la ../numlib/libargyllnum.la
714 +
715 +bin_PROGRAMS = viewgam
716 +
717 +check_PROGRAMS = smthtest GenRMGam GenVisGam maptest surftest fakegam
718 +
719 +refdir = $(datadir)/color/argyll/ref
720 +
721 +##ref_DATA = RefMediumGamut.gam
722 +
723 +EXTRA_DIST = License.txt Readme.txt
724 --- /dev/null
725 +++ b/imdi/imdi_k.h
726 @@ -0,0 +1,910 @@
727 +/* Integer Multi-Dimensional Interpolation */
728 +/* Declarations for all the generated kernel functions */
729 +/* This file is generated by imdi_make */
730 +
731 +/* Copyright 2000 - 2007 Graeme W. Gill */
732 +/* All rights reserved. */
733 +/* This material is licensed under the GNU AFFERO GENERAL PUBLIC LICENSE Version 3 :- */
734 +/* see the License.txt file for licensing details.*/
735 +
736 +#include "imdi_k.c" /* All the kernel code */
737 +
738 +struct {
739 + void (*interp)(imdi *s, void **outp, int ostride, void **inp, int istride, unsigned int npix);
740 + void (*gentab)(genspec *g, tabspec *t);
741 +} ktable[891] = {
742 + { imdi_k1, imdi_k1_gentab },
743 + { imdi_k2, imdi_k2_gentab },
744 + { imdi_k3, imdi_k3_gentab },
745 + { imdi_k4, imdi_k4_gentab },
746 + { imdi_k5, imdi_k5_gentab },
747 + { imdi_k6, imdi_k6_gentab },
748 + { imdi_k7, imdi_k7_gentab },
749 + { imdi_k8, imdi_k8_gentab },
750 + { imdi_k9, imdi_k9_gentab },
751 + { imdi_k10, imdi_k10_gentab },
752 + { imdi_k11, imdi_k11_gentab },
753 + { imdi_k12, imdi_k12_gentab },
754 + { imdi_k13, imdi_k13_gentab },
755 + { imdi_k14, imdi_k14_gentab },
756 + { imdi_k15, imdi_k15_gentab },
757 + { imdi_k16, imdi_k16_gentab },
758 + { imdi_k17, imdi_k17_gentab },
759 + { imdi_k18, imdi_k18_gentab },
760 + { imdi_k19, imdi_k19_gentab },
761 + { imdi_k20, imdi_k20_gentab },
762 + { imdi_k21, imdi_k21_gentab },
763 + { imdi_k22, imdi_k22_gentab },
764 + { imdi_k23, imdi_k23_gentab },
765 + { imdi_k24, imdi_k24_gentab },
766 + { imdi_k25, imdi_k25_gentab },
767 + { imdi_k26, imdi_k26_gentab },
768 + { imdi_k27, imdi_k27_gentab },
769 + { imdi_k28, imdi_k28_gentab },
770 + { imdi_k29, imdi_k29_gentab },
771 + { imdi_k30, imdi_k30_gentab },
772 + { imdi_k31, imdi_k31_gentab },
773 + { imdi_k32, imdi_k32_gentab },
774 + { imdi_k33, imdi_k33_gentab },
775 + { imdi_k34, imdi_k34_gentab },
776 + { imdi_k35, imdi_k35_gentab },
777 + { imdi_k36, imdi_k36_gentab },
778 + { imdi_k37, imdi_k37_gentab },
779 + { imdi_k38, imdi_k38_gentab },
780 + { imdi_k39, imdi_k39_gentab },
781 + { imdi_k40, imdi_k40_gentab },
782 + { imdi_k41, imdi_k41_gentab },
783 + { imdi_k42, imdi_k42_gentab },
784 + { imdi_k43, imdi_k43_gentab },
785 + { imdi_k44, imdi_k44_gentab },
786 + { imdi_k45, imdi_k45_gentab },
787 + { imdi_k46, imdi_k46_gentab },
788 + { imdi_k47, imdi_k47_gentab },
789 + { imdi_k48, imdi_k48_gentab },
790 + { imdi_k49, imdi_k49_gentab },
791 + { imdi_k50, imdi_k50_gentab },
792 + { imdi_k51, imdi_k51_gentab },
793 + { imdi_k52, imdi_k52_gentab },
794 + { imdi_k53, imdi_k53_gentab },
795 + { imdi_k54, imdi_k54_gentab },
796 + { imdi_k55, imdi_k55_gentab },
797 + { imdi_k56, imdi_k56_gentab },
798 + { imdi_k57, imdi_k57_gentab },
799 + { imdi_k58, imdi_k58_gentab },
800 + { imdi_k59, imdi_k59_gentab },
801 + { imdi_k60, imdi_k60_gentab },
802 + { imdi_k61, imdi_k61_gentab },
803 + { imdi_k62, imdi_k62_gentab },
804 + { imdi_k63, imdi_k63_gentab },
805 + { imdi_k64, imdi_k64_gentab },
806 + { imdi_k65, imdi_k65_gentab },
807 + { imdi_k66, imdi_k66_gentab },
808 + { imdi_k67, imdi_k67_gentab },
809 + { imdi_k68, imdi_k68_gentab },
810 + { imdi_k69, imdi_k69_gentab },
811 + { imdi_k70, imdi_k70_gentab },
812 + { imdi_k71, imdi_k71_gentab },
813 + { imdi_k72, imdi_k72_gentab },
814 + { imdi_k73, imdi_k73_gentab },
815 + { imdi_k74, imdi_k74_gentab },
816 + { imdi_k75, imdi_k75_gentab },
817 + { imdi_k76, imdi_k76_gentab },
818 + { imdi_k77, imdi_k77_gentab },
819 + { imdi_k78, imdi_k78_gentab },
820 + { imdi_k79, imdi_k79_gentab },
821 + { imdi_k80, imdi_k80_gentab },
822 + { imdi_k81, imdi_k81_gentab },
823 + { imdi_k82, imdi_k82_gentab },
824 + { imdi_k83, imdi_k83_gentab },
825 + { imdi_k84, imdi_k84_gentab },
826 + { imdi_k85, imdi_k85_gentab },
827 + { imdi_k86, imdi_k86_gentab },
828 + { imdi_k87, imdi_k87_gentab },
829 + { imdi_k88, imdi_k88_gentab },
830 + { imdi_k89, imdi_k89_gentab },
831 + { imdi_k90, imdi_k90_gentab },
832 + { imdi_k91, imdi_k91_gentab },
833 + { imdi_k92, imdi_k92_gentab },
834 + { imdi_k93, imdi_k93_gentab },
835 + { imdi_k94, imdi_k94_gentab },
836 + { imdi_k95, imdi_k95_gentab },
837 + { imdi_k96, imdi_k96_gentab },
838 + { imdi_k97, imdi_k97_gentab },
839 + { imdi_k98, imdi_k98_gentab },
840 + { imdi_k99, imdi_k99_gentab },
841 + { imdi_k100, imdi_k100_gentab },
842 + { imdi_k101, imdi_k101_gentab },
843 + { imdi_k102, imdi_k102_gentab },
844 + { imdi_k103, imdi_k103_gentab },
845 + { imdi_k104, imdi_k104_gentab },
846 + { imdi_k105, imdi_k105_gentab },
847 + { imdi_k106, imdi_k106_gentab },
848 + { imdi_k107, imdi_k107_gentab },
849 + { imdi_k108, imdi_k108_gentab },
850 + { imdi_k109, imdi_k109_gentab },
851 + { imdi_k110, imdi_k110_gentab },
852 + { imdi_k111, imdi_k111_gentab },
853 + { imdi_k112, imdi_k112_gentab },
854 + { imdi_k113, imdi_k113_gentab },
855 + { imdi_k114, imdi_k114_gentab },
856 + { imdi_k115, imdi_k115_gentab },
857 + { imdi_k116, imdi_k116_gentab },
858 + { imdi_k117, imdi_k117_gentab },
859 + { imdi_k118, imdi_k118_gentab },
860 + { imdi_k119, imdi_k119_gentab },
861 + { imdi_k120, imdi_k120_gentab },
862 + { imdi_k121, imdi_k121_gentab },
863 + { imdi_k122, imdi_k122_gentab },
864 + { imdi_k123, imdi_k123_gentab },
865 + { imdi_k124, imdi_k124_gentab },
866 + { imdi_k125, imdi_k125_gentab },
867 + { imdi_k126, imdi_k126_gentab },
868 + { imdi_k127, imdi_k127_gentab },
869 + { imdi_k128, imdi_k128_gentab },
870 + { imdi_k129, imdi_k129_gentab },
871 + { imdi_k130, imdi_k130_gentab },
872 + { imdi_k131, imdi_k131_gentab },
873 + { imdi_k132, imdi_k132_gentab },
874 + { imdi_k133, imdi_k133_gentab },
875 + { imdi_k134, imdi_k134_gentab },
876 + { imdi_k135, imdi_k135_gentab },
877 + { imdi_k136, imdi_k136_gentab },
878 + { imdi_k137, imdi_k137_gentab },
879 + { imdi_k138, imdi_k138_gentab },
880 + { imdi_k139, imdi_k139_gentab },
881 + { imdi_k140, imdi_k140_gentab },
882 + { imdi_k141, imdi_k141_gentab },
883 + { imdi_k142, imdi_k142_gentab },
884 + { imdi_k143, imdi_k143_gentab },
885 + { imdi_k144, imdi_k144_gentab },
886 + { imdi_k145, imdi_k145_gentab },
887 + { imdi_k146, imdi_k146_gentab },
888 + { imdi_k147, imdi_k147_gentab },
889 + { imdi_k148, imdi_k148_gentab },
890 + { imdi_k149, imdi_k149_gentab },
891 + { imdi_k150, imdi_k150_gentab },
892 + { imdi_k151, imdi_k151_gentab },
893 + { imdi_k152, imdi_k152_gentab },
894 + { imdi_k153, imdi_k153_gentab },
895 + { imdi_k154, imdi_k154_gentab },
896 + { imdi_k155, imdi_k155_gentab },
897 + { imdi_k156, imdi_k156_gentab },
898 + { imdi_k157, imdi_k157_gentab },
899 + { imdi_k158, imdi_k158_gentab },
900 + { imdi_k159, imdi_k159_gentab },
901 + { imdi_k160, imdi_k160_gentab },
902 + { imdi_k161, imdi_k161_gentab },
903 + { imdi_k162, imdi_k162_gentab },
904 + { imdi_k163, imdi_k163_gentab },
905 + { imdi_k164, imdi_k164_gentab },
906 + { imdi_k165, imdi_k165_gentab },
907 + { imdi_k166, imdi_k166_gentab },
908 + { imdi_k167, imdi_k167_gentab },
909 + { imdi_k168, imdi_k168_gentab },
910 + { imdi_k169, imdi_k169_gentab },
911 + { imdi_k170, imdi_k170_gentab },
912 + { imdi_k171, imdi_k171_gentab },
913 + { imdi_k172, imdi_k172_gentab },
914 + { imdi_k173, imdi_k173_gentab },
915 + { imdi_k174, imdi_k174_gentab },
916 + { imdi_k175, imdi_k175_gentab },
917 + { imdi_k176, imdi_k176_gentab },
918 + { imdi_k177, imdi_k177_gentab },
919 + { imdi_k178, imdi_k178_gentab },
920 + { imdi_k179, imdi_k179_gentab },
921 + { imdi_k180, imdi_k180_gentab },
922 + { imdi_k181, imdi_k181_gentab },
923 + { imdi_k182, imdi_k182_gentab },
924 + { imdi_k183, imdi_k183_gentab },
925 + { imdi_k184, imdi_k184_gentab },
926 + { imdi_k185, imdi_k185_gentab },
927 + { imdi_k186, imdi_k186_gentab },
928 + { imdi_k187, imdi_k187_gentab },
929 + { imdi_k188, imdi_k188_gentab },
930 + { imdi_k189, imdi_k189_gentab },
931 + { imdi_k190, imdi_k190_gentab },
932 + { imdi_k191, imdi_k191_gentab },
933 + { imdi_k192, imdi_k192_gentab },
934 + { imdi_k193, imdi_k193_gentab },
935 + { imdi_k194, imdi_k194_gentab },
936 + { imdi_k195, imdi_k195_gentab },
937 + { imdi_k196, imdi_k196_gentab },
938 + { imdi_k197, imdi_k197_gentab },
939 + { imdi_k198, imdi_k198_gentab },
940 + { imdi_k199, imdi_k199_gentab },
941 + { imdi_k200, imdi_k200_gentab },
942 + { imdi_k201, imdi_k201_gentab },
943 + { imdi_k202, imdi_k202_gentab },
944 + { imdi_k203, imdi_k203_gentab },
945 + { imdi_k204, imdi_k204_gentab },
946 + { imdi_k205, imdi_k205_gentab },
947 + { imdi_k206, imdi_k206_gentab },
948 + { imdi_k207, imdi_k207_gentab },
949 + { imdi_k208, imdi_k208_gentab },
950 + { imdi_k209, imdi_k209_gentab },
951 + { imdi_k210, imdi_k210_gentab },
952 + { imdi_k211, imdi_k211_gentab },
953 + { imdi_k212, imdi_k212_gentab },
954 + { imdi_k213, imdi_k213_gentab },
955 + { imdi_k214, imdi_k214_gentab },
956 + { imdi_k215, imdi_k215_gentab },
957 + { imdi_k216, imdi_k216_gentab },
958 + { imdi_k217, imdi_k217_gentab },
959 + { imdi_k218, imdi_k218_gentab },
960 + { imdi_k219, imdi_k219_gentab },
961 + { imdi_k220, imdi_k220_gentab },
962 + { imdi_k221, imdi_k221_gentab },
963 + { imdi_k222, imdi_k222_gentab },
964 + { imdi_k223, imdi_k223_gentab },
965 + { imdi_k224, imdi_k224_gentab },
966 + { imdi_k225, imdi_k225_gentab },
967 + { imdi_k226, imdi_k226_gentab },
968 + { imdi_k227, imdi_k227_gentab },
969 + { imdi_k228, imdi_k228_gentab },
970 + { imdi_k229, imdi_k229_gentab },
971 + { imdi_k230, imdi_k230_gentab },
972 + { imdi_k231, imdi_k231_gentab },
973 + { imdi_k232, imdi_k232_gentab },
974 + { imdi_k233, imdi_k233_gentab },
975 + { imdi_k234, imdi_k234_gentab },
976 + { imdi_k235, imdi_k235_gentab },
977 + { imdi_k236, imdi_k236_gentab },
978 + { imdi_k237, imdi_k237_gentab },
979 + { imdi_k238, imdi_k238_gentab },
980 + { imdi_k239, imdi_k239_gentab },
981 + { imdi_k240, imdi_k240_gentab },
982 + { imdi_k241, imdi_k241_gentab },
983 + { imdi_k242, imdi_k242_gentab },
984 + { imdi_k243, imdi_k243_gentab },
985 + { imdi_k244, imdi_k244_gentab },
986 + { imdi_k245, imdi_k245_gentab },
987 + { imdi_k246, imdi_k246_gentab },
988 + { imdi_k247, imdi_k247_gentab },
989 + { imdi_k248, imdi_k248_gentab },
990 + { imdi_k249, imdi_k249_gentab },
991 + { imdi_k250, imdi_k250_gentab },
992 + { imdi_k251, imdi_k251_gentab },
993 + { imdi_k252, imdi_k252_gentab },
994 + { imdi_k253, imdi_k253_gentab },
995 + { imdi_k254, imdi_k254_gentab },
996 + { imdi_k255, imdi_k255_gentab },
997 + { imdi_k256, imdi_k256_gentab },
998 + { imdi_k257, imdi_k257_gentab },
999 + { imdi_k258, imdi_k258_gentab },
1000 + { imdi_k259, imdi_k259_gentab },
1001 + { imdi_k260, imdi_k260_gentab },
1002 + { imdi_k261, imdi_k261_gentab },
1003 + { imdi_k262, imdi_k262_gentab },
1004 + { imdi_k263, imdi_k263_gentab },
1005 + { imdi_k264, imdi_k264_gentab },
1006 + { imdi_k265, imdi_k265_gentab },
1007 + { imdi_k266, imdi_k266_gentab },
1008 + { imdi_k267, imdi_k267_gentab },
1009 + { imdi_k268, imdi_k268_gentab },
1010 + { imdi_k269, imdi_k269_gentab },
1011 + { imdi_k270, imdi_k270_gentab },
1012 + { imdi_k271, imdi_k271_gentab },
1013 + { imdi_k272, imdi_k272_gentab },
1014 + { imdi_k273, imdi_k273_gentab },
1015 + { imdi_k274, imdi_k274_gentab },
1016 + { imdi_k275, imdi_k275_gentab },
1017 + { imdi_k276, imdi_k276_gentab },
1018 + { imdi_k277, imdi_k277_gentab },
1019 + { imdi_k278, imdi_k278_gentab },
1020 + { imdi_k279, imdi_k279_gentab },
1021 + { imdi_k280, imdi_k280_gentab },
1022 + { imdi_k281, imdi_k281_gentab },
1023 + { imdi_k282, imdi_k282_gentab },
1024 + { imdi_k283, imdi_k283_gentab },
1025 + { imdi_k284, imdi_k284_gentab },
1026 + { imdi_k285, imdi_k285_gentab },
1027 + { imdi_k286, imdi_k286_gentab },
1028 + { imdi_k287, imdi_k287_gentab },
1029 + { imdi_k288, imdi_k288_gentab },
1030 + { imdi_k289, imdi_k289_gentab },
1031 + { imdi_k290, imdi_k290_gentab },
1032 + { imdi_k291, imdi_k291_gentab },
1033 + { imdi_k292, imdi_k292_gentab },
1034 + { imdi_k293, imdi_k293_gentab },
1035 + { imdi_k294, imdi_k294_gentab },
1036 + { imdi_k295, imdi_k295_gentab },
1037 + { imdi_k296, imdi_k296_gentab },
1038 + { imdi_k297, imdi_k297_gentab },
1039 + { imdi_k298, imdi_k298_gentab },
1040 + { imdi_k299, imdi_k299_gentab },
1041 + { imdi_k300, imdi_k300_gentab },
1042 + { imdi_k301, imdi_k301_gentab },
1043 + { imdi_k302, imdi_k302_gentab },
1044 + { imdi_k303, imdi_k303_gentab },
1045 + { imdi_k304, imdi_k304_gentab },
1046 + { imdi_k305, imdi_k305_gentab },
1047 + { imdi_k306, imdi_k306_gentab },
1048 + { imdi_k307, imdi_k307_gentab },
1049 + { imdi_k308, imdi_k308_gentab },
1050 + { imdi_k309, imdi_k309_gentab },
1051 + { imdi_k310, imdi_k310_gentab },
1052 + { imdi_k311, imdi_k311_gentab },
1053 + { imdi_k312, imdi_k312_gentab },
1054 + { imdi_k313, imdi_k313_gentab },
1055 + { imdi_k314, imdi_k314_gentab },
1056 + { imdi_k315, imdi_k315_gentab },
1057 + { imdi_k316, imdi_k316_gentab },
1058 + { imdi_k317, imdi_k317_gentab },
1059 + { imdi_k318, imdi_k318_gentab },
1060 + { imdi_k319, imdi_k319_gentab },
1061 + { imdi_k320, imdi_k320_gentab },
1062 + { imdi_k321, imdi_k321_gentab },
1063 + { imdi_k322, imdi_k322_gentab },
1064 + { imdi_k323, imdi_k323_gentab },
1065 + { imdi_k324, imdi_k324_gentab },
1066 + { imdi_k325, imdi_k325_gentab },
1067 + { imdi_k326, imdi_k326_gentab },
1068 + { imdi_k327, imdi_k327_gentab },
1069 + { imdi_k328, imdi_k328_gentab },
1070 + { imdi_k329, imdi_k329_gentab },
1071 + { imdi_k330, imdi_k330_gentab },
1072 + { imdi_k331, imdi_k331_gentab },
1073 + { imdi_k332, imdi_k332_gentab },
1074 + { imdi_k333, imdi_k333_gentab },
1075 + { imdi_k334, imdi_k334_gentab },
1076 + { imdi_k335, imdi_k335_gentab },
1077 + { imdi_k336, imdi_k336_gentab },
1078 + { imdi_k337, imdi_k337_gentab },
1079 + { imdi_k338, imdi_k338_gentab },
1080 + { imdi_k339, imdi_k339_gentab },
1081 + { imdi_k340, imdi_k340_gentab },
1082 + { imdi_k341, imdi_k341_gentab },
1083 + { imdi_k342, imdi_k342_gentab },
1084 + { imdi_k343, imdi_k343_gentab },
1085 + { imdi_k344, imdi_k344_gentab },
1086 + { imdi_k345, imdi_k345_gentab },
1087 + { imdi_k346, imdi_k346_gentab },
1088 + { imdi_k347, imdi_k347_gentab },
1089 + { imdi_k348, imdi_k348_gentab },
1090 + { imdi_k349, imdi_k349_gentab },
1091 + { imdi_k350, imdi_k350_gentab },
1092 + { imdi_k351, imdi_k351_gentab },
1093 + { imdi_k352, imdi_k352_gentab },
1094 + { imdi_k353, imdi_k353_gentab },
1095 + { imdi_k354, imdi_k354_gentab },
1096 + { imdi_k355, imdi_k355_gentab },
1097 + { imdi_k356, imdi_k356_gentab },
1098 + { imdi_k357, imdi_k357_gentab },
1099 + { imdi_k358, imdi_k358_gentab },
1100 + { imdi_k359, imdi_k359_gentab },
1101 + { imdi_k360, imdi_k360_gentab },
1102 + { imdi_k361, imdi_k361_gentab },
1103 + { imdi_k362, imdi_k362_gentab },
1104 + { imdi_k363, imdi_k363_gentab },
1105 + { imdi_k364, imdi_k364_gentab },
1106 + { imdi_k365, imdi_k365_gentab },
1107 + { imdi_k366, imdi_k366_gentab },
1108 + { imdi_k367, imdi_k367_gentab },
1109 + { imdi_k368, imdi_k368_gentab },
1110 + { imdi_k369, imdi_k369_gentab },
1111 + { imdi_k370, imdi_k370_gentab },
1112 + { imdi_k371, imdi_k371_gentab },
1113 + { imdi_k372, imdi_k372_gentab },
1114 + { imdi_k373, imdi_k373_gentab },
1115 + { imdi_k374, imdi_k374_gentab },
1116 + { imdi_k375, imdi_k375_gentab },
1117 + { imdi_k376, imdi_k376_gentab },
1118 + { imdi_k377, imdi_k377_gentab },
1119 + { imdi_k378, imdi_k378_gentab },
1120 + { imdi_k379, imdi_k379_gentab },
1121 + { imdi_k380, imdi_k380_gentab },
1122 + { imdi_k381, imdi_k381_gentab },
1123 + { imdi_k382, imdi_k382_gentab },
1124 + { imdi_k383, imdi_k383_gentab },
1125 + { imdi_k384, imdi_k384_gentab },
1126 + { imdi_k385, imdi_k385_gentab },
1127 + { imdi_k386, imdi_k386_gentab },
1128 + { imdi_k387, imdi_k387_gentab },
1129 + { imdi_k388, imdi_k388_gentab },
1130 + { imdi_k389, imdi_k389_gentab },
1131 + { imdi_k390, imdi_k390_gentab },
1132 + { imdi_k391, imdi_k391_gentab },
1133 + { imdi_k392, imdi_k392_gentab },
1134 + { imdi_k393, imdi_k393_gentab },
1135 + { imdi_k394, imdi_k394_gentab },
1136 + { imdi_k395, imdi_k395_gentab },
1137 + { imdi_k396, imdi_k396_gentab },
1138 + { imdi_k397, imdi_k397_gentab },
1139 + { imdi_k398, imdi_k398_gentab },
1140 + { imdi_k399, imdi_k399_gentab },
1141 + { imdi_k400, imdi_k400_gentab },
1142 + { imdi_k401, imdi_k401_gentab },
1143 + { imdi_k402, imdi_k402_gentab },
1144 + { imdi_k403, imdi_k403_gentab },
1145 + { imdi_k404, imdi_k404_gentab },
1146 + { imdi_k405, imdi_k405_gentab },
1147 + { imdi_k406, imdi_k406_gentab },
1148 + { imdi_k407, imdi_k407_gentab },
1149 + { imdi_k408, imdi_k408_gentab },
1150 + { imdi_k409, imdi_k409_gentab },
1151 + { imdi_k410, imdi_k410_gentab },
1152 + { imdi_k411, imdi_k411_gentab },
1153 + { imdi_k412, imdi_k412_gentab },
1154 + { imdi_k413, imdi_k413_gentab },
1155 + { imdi_k414, imdi_k414_gentab },
1156 + { imdi_k415, imdi_k415_gentab },
1157 + { imdi_k416, imdi_k416_gentab },
1158 + { imdi_k417, imdi_k417_gentab },
1159 + { imdi_k418, imdi_k418_gentab },
1160 + { imdi_k419, imdi_k419_gentab },
1161 + { imdi_k420, imdi_k420_gentab },
1162 + { imdi_k421, imdi_k421_gentab },
1163 + { imdi_k422, imdi_k422_gentab },
1164 + { imdi_k423, imdi_k423_gentab },
1165 + { imdi_k424, imdi_k424_gentab },
1166 + { imdi_k425, imdi_k425_gentab },
1167 + { imdi_k426, imdi_k426_gentab },
1168 + { imdi_k427, imdi_k427_gentab },
1169 + { imdi_k428, imdi_k428_gentab },
1170 + { imdi_k429, imdi_k429_gentab },
1171 + { imdi_k430, imdi_k430_gentab },
1172 + { imdi_k431, imdi_k431_gentab },
1173 + { imdi_k432, imdi_k432_gentab },
1174 + { imdi_k433, imdi_k433_gentab },
1175 + { imdi_k434, imdi_k434_gentab },
1176 + { imdi_k435, imdi_k435_gentab },
1177 + { imdi_k436, imdi_k436_gentab },
1178 + { imdi_k437, imdi_k437_gentab },
1179 + { imdi_k438, imdi_k438_gentab },
1180 + { imdi_k439, imdi_k439_gentab },
1181 + { imdi_k440, imdi_k440_gentab },
1182 + { imdi_k441, imdi_k441_gentab },
1183 + { imdi_k442, imdi_k442_gentab },
1184 + { imdi_k443, imdi_k443_gentab },
1185 + { imdi_k444, imdi_k444_gentab },
1186 + { imdi_k445, imdi_k445_gentab },
1187 + { imdi_k446, imdi_k446_gentab },
1188 + { imdi_k447, imdi_k447_gentab },
1189 + { imdi_k448, imdi_k448_gentab },
1190 + { imdi_k449, imdi_k449_gentab },
1191 + { imdi_k450, imdi_k450_gentab },
1192 + { imdi_k451, imdi_k451_gentab },
1193 + { imdi_k452, imdi_k452_gentab },
1194 + { imdi_k453, imdi_k453_gentab },
1195 + { imdi_k454, imdi_k454_gentab },
1196 + { imdi_k455, imdi_k455_gentab },
1197 + { imdi_k456, imdi_k456_gentab },
1198 + { imdi_k457, imdi_k457_gentab },
1199 + { imdi_k458, imdi_k458_gentab },
1200 + { imdi_k459, imdi_k459_gentab },
1201 + { imdi_k460, imdi_k460_gentab },
1202 + { imdi_k461, imdi_k461_gentab },
1203 + { imdi_k462, imdi_k462_gentab },
1204 + { imdi_k463, imdi_k463_gentab },
1205 + { imdi_k464, imdi_k464_gentab },
1206 + { imdi_k465, imdi_k465_gentab },
1207 + { imdi_k466, imdi_k466_gentab },
1208 + { imdi_k467, imdi_k467_gentab },
1209 + { imdi_k468, imdi_k468_gentab },
1210 + { imdi_k469, imdi_k469_gentab },
1211 + { imdi_k470, imdi_k470_gentab },
1212 + { imdi_k471, imdi_k471_gentab },
1213 + { imdi_k472, imdi_k472_gentab },
1214 + { imdi_k473, imdi_k473_gentab },
1215 + { imdi_k474, imdi_k474_gentab },
1216 + { imdi_k475, imdi_k475_gentab },
1217 + { imdi_k476, imdi_k476_gentab },
1218 + { imdi_k477, imdi_k477_gentab },
1219 + { imdi_k478, imdi_k478_gentab },
1220 + { imdi_k479, imdi_k479_gentab },
1221 + { imdi_k480, imdi_k480_gentab },
1222 + { imdi_k481, imdi_k481_gentab },
1223 + { imdi_k482, imdi_k482_gentab },
1224 + { imdi_k483, imdi_k483_gentab },
1225 + { imdi_k484, imdi_k484_gentab },
1226 + { imdi_k485, imdi_k485_gentab },
1227 + { imdi_k486, imdi_k486_gentab },
1228 + { imdi_k487, imdi_k487_gentab },
1229 + { imdi_k488, imdi_k488_gentab },
1230 + { imdi_k489, imdi_k489_gentab },
1231 + { imdi_k490, imdi_k490_gentab },
1232 + { imdi_k491, imdi_k491_gentab },
1233 + { imdi_k492, imdi_k492_gentab },
1234 + { imdi_k493, imdi_k493_gentab },
1235 + { imdi_k494, imdi_k494_gentab },
1236 + { imdi_k495, imdi_k495_gentab },
1237 + { imdi_k496, imdi_k496_gentab },
1238 + { imdi_k497, imdi_k497_gentab },
1239 + { imdi_k498, imdi_k498_gentab },
1240 + { imdi_k499, imdi_k499_gentab },
1241 + { imdi_k500, imdi_k500_gentab },
1242 + { imdi_k501, imdi_k501_gentab },
1243 + { imdi_k502, imdi_k502_gentab },
1244 + { imdi_k503, imdi_k503_gentab },
1245 + { imdi_k504, imdi_k504_gentab },
1246 + { imdi_k505, imdi_k505_gentab },
1247 + { imdi_k506, imdi_k506_gentab },
1248 + { imdi_k507, imdi_k507_gentab },
1249 + { imdi_k508, imdi_k508_gentab },
1250 + { imdi_k509, imdi_k509_gentab },
1251 + { imdi_k510, imdi_k510_gentab },
1252 + { imdi_k511, imdi_k511_gentab },
1253 + { imdi_k512, imdi_k512_gentab },
1254 + { imdi_k513, imdi_k513_gentab },
1255 + { imdi_k514, imdi_k514_gentab },
1256 + { imdi_k515, imdi_k515_gentab },
1257 + { imdi_k516, imdi_k516_gentab },
1258 + { imdi_k517, imdi_k517_gentab },
1259 + { imdi_k518, imdi_k518_gentab },
1260 + { imdi_k519, imdi_k519_gentab },
1261 + { imdi_k520, imdi_k520_gentab },
1262 + { imdi_k521, imdi_k521_gentab },
1263 + { imdi_k522, imdi_k522_gentab },
1264 + { imdi_k523, imdi_k523_gentab },
1265 + { imdi_k524, imdi_k524_gentab },
1266 + { imdi_k525, imdi_k525_gentab },
1267 + { imdi_k526, imdi_k526_gentab },
1268 + { imdi_k527, imdi_k527_gentab },
1269 + { imdi_k528, imdi_k528_gentab },
1270 + { imdi_k529, imdi_k529_gentab },
1271 + { imdi_k530, imdi_k530_gentab },
1272 + { imdi_k531, imdi_k531_gentab },
1273 + { imdi_k532, imdi_k532_gentab },
1274 + { imdi_k533, imdi_k533_gentab },
1275 + { imdi_k534, imdi_k534_gentab },
1276 + { imdi_k535, imdi_k535_gentab },
1277 + { imdi_k536, imdi_k536_gentab },
1278 + { imdi_k537, imdi_k537_gentab },
1279 + { imdi_k538, imdi_k538_gentab },
1280 + { imdi_k539, imdi_k539_gentab },
1281 + { imdi_k540, imdi_k540_gentab },
1282 + { imdi_k541, imdi_k541_gentab },
1283 + { imdi_k542, imdi_k542_gentab },
1284 + { imdi_k543, imdi_k543_gentab },
1285 + { imdi_k544, imdi_k544_gentab },
1286 + { imdi_k545, imdi_k545_gentab },
1287 + { imdi_k546, imdi_k546_gentab },
1288 + { imdi_k547, imdi_k547_gentab },
1289 + { imdi_k548, imdi_k548_gentab },
1290 + { imdi_k549, imdi_k549_gentab },
1291 + { imdi_k550, imdi_k550_gentab },
1292 + { imdi_k551, imdi_k551_gentab },
1293 + { imdi_k552, imdi_k552_gentab },
1294 + { imdi_k553, imdi_k553_gentab },
1295 + { imdi_k554, imdi_k554_gentab },
1296 + { imdi_k555, imdi_k555_gentab },
1297 + { imdi_k556, imdi_k556_gentab },
1298 + { imdi_k557, imdi_k557_gentab },
1299 + { imdi_k558, imdi_k558_gentab },
1300 + { imdi_k559, imdi_k559_gentab },
1301 + { imdi_k560, imdi_k560_gentab },
1302 + { imdi_k561, imdi_k561_gentab },
1303 + { imdi_k562, imdi_k562_gentab },
1304 + { imdi_k563, imdi_k563_gentab },
1305 + { imdi_k564, imdi_k564_gentab },
1306 + { imdi_k565, imdi_k565_gentab },
1307 + { imdi_k566, imdi_k566_gentab },
1308 + { imdi_k567, imdi_k567_gentab },
1309 + { imdi_k568, imdi_k568_gentab },
1310 + { imdi_k569, imdi_k569_gentab },
1311 + { imdi_k570, imdi_k570_gentab },
1312 + { imdi_k571, imdi_k571_gentab },
1313 + { imdi_k572, imdi_k572_gentab },
1314 + { imdi_k573, imdi_k573_gentab },
1315 + { imdi_k574, imdi_k574_gentab },
1316 + { imdi_k575, imdi_k575_gentab },
1317 + { imdi_k576, imdi_k576_gentab },
1318 + { imdi_k577, imdi_k577_gentab },
1319 + { imdi_k578, imdi_k578_gentab },
1320 + { imdi_k579, imdi_k579_gentab },
1321 + { imdi_k580, imdi_k580_gentab },
1322 + { imdi_k581, imdi_k581_gentab },
1323 + { imdi_k582, imdi_k582_gentab },
1324 + { imdi_k583, imdi_k583_gentab },
1325 + { imdi_k584, imdi_k584_gentab },
1326 + { imdi_k585, imdi_k585_gentab },
1327 + { imdi_k586, imdi_k586_gentab },
1328 + { imdi_k587, imdi_k587_gentab },
1329 + { imdi_k588, imdi_k588_gentab },
1330 + { imdi_k589, imdi_k589_gentab },
1331 + { imdi_k590, imdi_k590_gentab },
1332 + { imdi_k591, imdi_k591_gentab },
1333 + { imdi_k592, imdi_k592_gentab },
1334 + { imdi_k593, imdi_k593_gentab },
1335 + { imdi_k594, imdi_k594_gentab },
1336 + { imdi_k595, imdi_k595_gentab },
1337 + { imdi_k596, imdi_k596_gentab },
1338 + { imdi_k597, imdi_k597_gentab },
1339 + { imdi_k598, imdi_k598_gentab },
1340 + { imdi_k599, imdi_k599_gentab },
1341 + { imdi_k600, imdi_k600_gentab },
1342 + { imdi_k601, imdi_k601_gentab },
1343 + { imdi_k602, imdi_k602_gentab },
1344 + { imdi_k603, imdi_k603_gentab },
1345 + { imdi_k604, imdi_k604_gentab },
1346 + { imdi_k605, imdi_k605_gentab },
1347 + { imdi_k606, imdi_k606_gentab },
1348 + { imdi_k607, imdi_k607_gentab },
1349 + { imdi_k608, imdi_k608_gentab },
1350 + { imdi_k609, imdi_k609_gentab },
1351 + { imdi_k610, imdi_k610_gentab },
1352 + { imdi_k611, imdi_k611_gentab },
1353 + { imdi_k612, imdi_k612_gentab },
1354 + { imdi_k613, imdi_k613_gentab },
1355 + { imdi_k614, imdi_k614_gentab },
1356 + { imdi_k615, imdi_k615_gentab },
1357 + { imdi_k616, imdi_k616_gentab },
1358 + { imdi_k617, imdi_k617_gentab },
1359 + { imdi_k618, imdi_k618_gentab },
1360 + { imdi_k619, imdi_k619_gentab },
1361 + { imdi_k620, imdi_k620_gentab },
1362 + { imdi_k621, imdi_k621_gentab },
1363 + { imdi_k622, imdi_k622_gentab },
1364 + { imdi_k623, imdi_k623_gentab },
1365 + { imdi_k624, imdi_k624_gentab },
1366 + { imdi_k625, imdi_k625_gentab },
1367 + { imdi_k626, imdi_k626_gentab },
1368 + { imdi_k627, imdi_k627_gentab },
1369 + { imdi_k628, imdi_k628_gentab },
1370 + { imdi_k629, imdi_k629_gentab },
1371 + { imdi_k630, imdi_k630_gentab },
1372 + { imdi_k631, imdi_k631_gentab },
1373 + { imdi_k632, imdi_k632_gentab },
1374 + { imdi_k633, imdi_k633_gentab },
1375 + { imdi_k634, imdi_k634_gentab },
1376 + { imdi_k635, imdi_k635_gentab },
1377 + { imdi_k636, imdi_k636_gentab },
1378 + { imdi_k637, imdi_k637_gentab },
1379 + { imdi_k638, imdi_k638_gentab },
1380 + { imdi_k639, imdi_k639_gentab },
1381 + { imdi_k640, imdi_k640_gentab },
1382 + { imdi_k641, imdi_k641_gentab },
1383 + { imdi_k642, imdi_k642_gentab },
1384 + { imdi_k643, imdi_k643_gentab },
1385 + { imdi_k644, imdi_k644_gentab },
1386 + { imdi_k645, imdi_k645_gentab },
1387 + { imdi_k646, imdi_k646_gentab },
1388 + { imdi_k647, imdi_k647_gentab },
1389 + { imdi_k648, imdi_k648_gentab },
1390 + { imdi_k649, imdi_k649_gentab },
1391 + { imdi_k650, imdi_k650_gentab },
1392 + { imdi_k651, imdi_k651_gentab },
1393 + { imdi_k652, imdi_k652_gentab },
1394 + { imdi_k653, imdi_k653_gentab },
1395 + { imdi_k654, imdi_k654_gentab },
1396 + { imdi_k655, imdi_k655_gentab },
1397 + { imdi_k656, imdi_k656_gentab },
1398 + { imdi_k657, imdi_k657_gentab },
1399 + { imdi_k658, imdi_k658_gentab },
1400 + { imdi_k659, imdi_k659_gentab },
1401 + { imdi_k660, imdi_k660_gentab },
1402 + { imdi_k661, imdi_k661_gentab },
1403 + { imdi_k662, imdi_k662_gentab },
1404 + { imdi_k663, imdi_k663_gentab },
1405 + { imdi_k664, imdi_k664_gentab },
1406 + { imdi_k665, imdi_k665_gentab },
1407 + { imdi_k666, imdi_k666_gentab },
1408 + { imdi_k667, imdi_k667_gentab },
1409 + { imdi_k668, imdi_k668_gentab },
1410 + { imdi_k669, imdi_k669_gentab },
1411 + { imdi_k670, imdi_k670_gentab },
1412 + { imdi_k671, imdi_k671_gentab },
1413 + { imdi_k672, imdi_k672_gentab },
1414 + { imdi_k673, imdi_k673_gentab },
1415 + { imdi_k674, imdi_k674_gentab },
1416 + { imdi_k675, imdi_k675_gentab },
1417 + { imdi_k676, imdi_k676_gentab },
1418 + { imdi_k677, imdi_k677_gentab },
1419 + { imdi_k678, imdi_k678_gentab },
1420 + { imdi_k679, imdi_k679_gentab },
1421 + { imdi_k680, imdi_k680_gentab },
1422 + { imdi_k681, imdi_k681_gentab },
1423 + { imdi_k682, imdi_k682_gentab },
1424 + { imdi_k683, imdi_k683_gentab },
1425 + { imdi_k684, imdi_k684_gentab },
1426 + { imdi_k685, imdi_k685_gentab },
1427 + { imdi_k686, imdi_k686_gentab },
1428 + { imdi_k687, imdi_k687_gentab },
1429 + { imdi_k688, imdi_k688_gentab },
1430 + { imdi_k689, imdi_k689_gentab },
1431 + { imdi_k690, imdi_k690_gentab },
1432 + { imdi_k691, imdi_k691_gentab },
1433 + { imdi_k692, imdi_k692_gentab },
1434 + { imdi_k693, imdi_k693_gentab },
1435 + { imdi_k694, imdi_k694_gentab },
1436 + { imdi_k695, imdi_k695_gentab },
1437 + { imdi_k696, imdi_k696_gentab },
1438 + { imdi_k697, imdi_k697_gentab },
1439 + { imdi_k698, imdi_k698_gentab },
1440 + { imdi_k699, imdi_k699_gentab },
1441 + { imdi_k700, imdi_k700_gentab },
1442 + { imdi_k701, imdi_k701_gentab },
1443 + { imdi_k702, imdi_k702_gentab },
1444 + { imdi_k703, imdi_k703_gentab },
1445 + { imdi_k704, imdi_k704_gentab },
1446 + { imdi_k705, imdi_k705_gentab },
1447 + { imdi_k706, imdi_k706_gentab },
1448 + { imdi_k707, imdi_k707_gentab },
1449 + { imdi_k708, imdi_k708_gentab },
1450 + { imdi_k709, imdi_k709_gentab },
1451 + { imdi_k710, imdi_k710_gentab },
1452 + { imdi_k711, imdi_k711_gentab },
1453 + { imdi_k712, imdi_k712_gentab },
1454 + { imdi_k713, imdi_k713_gentab },
1455 + { imdi_k714, imdi_k714_gentab },
1456 + { imdi_k715, imdi_k715_gentab },
1457 + { imdi_k716, imdi_k716_gentab },
1458 + { imdi_k717, imdi_k717_gentab },
1459 + { imdi_k718, imdi_k718_gentab },
1460 + { imdi_k719, imdi_k719_gentab },
1461 + { imdi_k720, imdi_k720_gentab },
1462 + { imdi_k721, imdi_k721_gentab },
1463 + { imdi_k722, imdi_k722_gentab },
1464 + { imdi_k723, imdi_k723_gentab },
1465 + { imdi_k724, imdi_k724_gentab },
1466 + { imdi_k725, imdi_k725_gentab },
1467 + { imdi_k726, imdi_k726_gentab },
1468 + { imdi_k727, imdi_k727_gentab },
1469 + { imdi_k728, imdi_k728_gentab },
1470 + { imdi_k729, imdi_k729_gentab },
1471 + { imdi_k730, imdi_k730_gentab },
1472 + { imdi_k731, imdi_k731_gentab },
1473 + { imdi_k732, imdi_k732_gentab },
1474 + { imdi_k733, imdi_k733_gentab },
1475 + { imdi_k734, imdi_k734_gentab },
1476 + { imdi_k735, imdi_k735_gentab },
1477 + { imdi_k736, imdi_k736_gentab },
1478 + { imdi_k737, imdi_k737_gentab },
1479 + { imdi_k738, imdi_k738_gentab },
1480 + { imdi_k739, imdi_k739_gentab },
1481 + { imdi_k740, imdi_k740_gentab },
1482 + { imdi_k741, imdi_k741_gentab },
1483 + { imdi_k742, imdi_k742_gentab },
1484 + { imdi_k743, imdi_k743_gentab },
1485 + { imdi_k744, imdi_k744_gentab },
1486 + { imdi_k745, imdi_k745_gentab },
1487 + { imdi_k746, imdi_k746_gentab },
1488 + { imdi_k747, imdi_k747_gentab },
1489 + { imdi_k748, imdi_k748_gentab },
1490 + { imdi_k749, imdi_k749_gentab },
1491 + { imdi_k750, imdi_k750_gentab },
1492 + { imdi_k751, imdi_k751_gentab },
1493 + { imdi_k752, imdi_k752_gentab },
1494 + { imdi_k753, imdi_k753_gentab },
1495 + { imdi_k754, imdi_k754_gentab },
1496 + { imdi_k755, imdi_k755_gentab },
1497 + { imdi_k756, imdi_k756_gentab },
1498 + { imdi_k757, imdi_k757_gentab },
1499 + { imdi_k758, imdi_k758_gentab },
1500 + { imdi_k759, imdi_k759_gentab },
1501 + { imdi_k760, imdi_k760_gentab },
1502 + { imdi_k761, imdi_k761_gentab },
1503 + { imdi_k762, imdi_k762_gentab },
1504 + { imdi_k763, imdi_k763_gentab },
1505 + { imdi_k764, imdi_k764_gentab },
1506 + { imdi_k765, imdi_k765_gentab },
1507 + { imdi_k766, imdi_k766_gentab },
1508 + { imdi_k767, imdi_k767_gentab },
1509 + { imdi_k768, imdi_k768_gentab },
1510 + { imdi_k769, imdi_k769_gentab },
1511 + { imdi_k770, imdi_k770_gentab },
1512 + { imdi_k771, imdi_k771_gentab },
1513 + { imdi_k772, imdi_k772_gentab },
1514 + { imdi_k773, imdi_k773_gentab },
1515 + { imdi_k774, imdi_k774_gentab },
1516 + { imdi_k775, imdi_k775_gentab },
1517 + { imdi_k776, imdi_k776_gentab },
1518 + { imdi_k777, imdi_k777_gentab },
1519 + { imdi_k778, imdi_k778_gentab },
1520 + { imdi_k779, imdi_k779_gentab },
1521 + { imdi_k780, imdi_k780_gentab },
1522 + { imdi_k781, imdi_k781_gentab },
1523 + { imdi_k782, imdi_k782_gentab },
1524 + { imdi_k783, imdi_k783_gentab },
1525 + { imdi_k784, imdi_k784_gentab },
1526 + { imdi_k785, imdi_k785_gentab },
1527 + { imdi_k786, imdi_k786_gentab },
1528 + { imdi_k787, imdi_k787_gentab },
1529 + { imdi_k788, imdi_k788_gentab },
1530 + { imdi_k789, imdi_k789_gentab },
1531 + { imdi_k790, imdi_k790_gentab },
1532 + { imdi_k791, imdi_k791_gentab },
1533 + { imdi_k792, imdi_k792_gentab },
1534 + { imdi_k793, imdi_k793_gentab },
1535 + { imdi_k794, imdi_k794_gentab },
1536 + { imdi_k795, imdi_k795_gentab },
1537 + { imdi_k796, imdi_k796_gentab },
1538 + { imdi_k797, imdi_k797_gentab },
1539 + { imdi_k798, imdi_k798_gentab },
1540 + { imdi_k799, imdi_k799_gentab },
1541 + { imdi_k800, imdi_k800_gentab },
1542 + { imdi_k801, imdi_k801_gentab },
1543 + { imdi_k802, imdi_k802_gentab },
1544 + { imdi_k803, imdi_k803_gentab },
1545 + { imdi_k804, imdi_k804_gentab },
1546 + { imdi_k805, imdi_k805_gentab },
1547 + { imdi_k806, imdi_k806_gentab },
1548 + { imdi_k807, imdi_k807_gentab },
1549 + { imdi_k808, imdi_k808_gentab },
1550 + { imdi_k809, imdi_k809_gentab },
1551 + { imdi_k810, imdi_k810_gentab },
1552 + { imdi_k811, imdi_k811_gentab },
1553 + { imdi_k812, imdi_k812_gentab },
1554 + { imdi_k813, imdi_k813_gentab },
1555 + { imdi_k814, imdi_k814_gentab },
1556 + { imdi_k815, imdi_k815_gentab },
1557 + { imdi_k816, imdi_k816_gentab },
1558 + { imdi_k817, imdi_k817_gentab },
1559 + { imdi_k818, imdi_k818_gentab },
1560 + { imdi_k819, imdi_k819_gentab },
1561 + { imdi_k820, imdi_k820_gentab },
1562 + { imdi_k821, imdi_k821_gentab },
1563 + { imdi_k822, imdi_k822_gentab },
1564 + { imdi_k823, imdi_k823_gentab },
1565 + { imdi_k824, imdi_k824_gentab },
1566 + { imdi_k825, imdi_k825_gentab },
1567 + { imdi_k826, imdi_k826_gentab },
1568 + { imdi_k827, imdi_k827_gentab },
1569 + { imdi_k828, imdi_k828_gentab },
1570 + { imdi_k829, imdi_k829_gentab },
1571 + { imdi_k830, imdi_k830_gentab },
1572 + { imdi_k831, imdi_k831_gentab },
1573 + { imdi_k832, imdi_k832_gentab },
1574 + { imdi_k833, imdi_k833_gentab },
1575 + { imdi_k834, imdi_k834_gentab },
1576 + { imdi_k835, imdi_k835_gentab },
1577 + { imdi_k836, imdi_k836_gentab },
1578 + { imdi_k837, imdi_k837_gentab },
1579 + { imdi_k838, imdi_k838_gentab },
1580 + { imdi_k839, imdi_k839_gentab },
1581 + { imdi_k840, imdi_k840_gentab },
1582 + { imdi_k841, imdi_k841_gentab },
1583 + { imdi_k842, imdi_k842_gentab },
1584 + { imdi_k843, imdi_k843_gentab },
1585 + { imdi_k844, imdi_k844_gentab },
1586 + { imdi_k845, imdi_k845_gentab },
1587 + { imdi_k846, imdi_k846_gentab },
1588 + { imdi_k847, imdi_k847_gentab },
1589 + { imdi_k848, imdi_k848_gentab },
1590 + { imdi_k849, imdi_k849_gentab },
1591 + { imdi_k850, imdi_k850_gentab },
1592 + { imdi_k851, imdi_k851_gentab },
1593 + { imdi_k852, imdi_k852_gentab },
1594 + { imdi_k853, imdi_k853_gentab },
1595 + { imdi_k854, imdi_k854_gentab },
1596 + { imdi_k855, imdi_k855_gentab },
1597 + { imdi_k856, imdi_k856_gentab },
1598 + { imdi_k857, imdi_k857_gentab },
1599 + { imdi_k858, imdi_k858_gentab },
1600 + { imdi_k859, imdi_k859_gentab },
1601 + { imdi_k860, imdi_k860_gentab },
1602 + { imdi_k861, imdi_k861_gentab },
1603 + { imdi_k862, imdi_k862_gentab },
1604 + { imdi_k863, imdi_k863_gentab },
1605 + { imdi_k864, imdi_k864_gentab },
1606 + { imdi_k865, imdi_k865_gentab },
1607 + { imdi_k866, imdi_k866_gentab },
1608 + { imdi_k867, imdi_k867_gentab },
1609 + { imdi_k868, imdi_k868_gentab },
1610 + { imdi_k869, imdi_k869_gentab },
1611 + { imdi_k870, imdi_k870_gentab },
1612 + { imdi_k871, imdi_k871_gentab },
1613 + { imdi_k872, imdi_k872_gentab },
1614 + { imdi_k873, imdi_k873_gentab },
1615 + { imdi_k874, imdi_k874_gentab },
1616 + { imdi_k875, imdi_k875_gentab },
1617 + { imdi_k876, imdi_k876_gentab },
1618 + { imdi_k877, imdi_k877_gentab },
1619 + { imdi_k878, imdi_k878_gentab },
1620 + { imdi_k879, imdi_k879_gentab },
1621 + { imdi_k880, imdi_k880_gentab },
1622 + { imdi_k881, imdi_k881_gentab },
1623 + { imdi_k882, imdi_k882_gentab },
1624 + { imdi_k883, imdi_k883_gentab },
1625 + { imdi_k884, imdi_k884_gentab },
1626 + { imdi_k885, imdi_k885_gentab },
1627 + { imdi_k886, imdi_k886_gentab },
1628 + { imdi_k887, imdi_k887_gentab },
1629 + { imdi_k888, imdi_k888_gentab },
1630 + { imdi_k889, imdi_k889_gentab },
1631 + { imdi_k890, imdi_k890_gentab },
1632 + { imdi_k891, imdi_k891_gentab }
1633 +};
1634 +
1635 +int no_kfuncs = 891;
1636 +
1637 --- /dev/null
1638 +++ b/configure
1639 @@ -0,0 +1,15216 @@
1640 +#! /bin/sh
1641 +# Guess values for system-dependent variables and create Makefiles.
1642 +# Generated by GNU Autoconf 2.69 for argyll 1.3.7.
1643 +#
1644 +#
1645 +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
1646 +#
1647 +#
1648 +# This configure script is free software; the Free Software Foundation
1649 +# gives unlimited permission to copy, distribute and modify it.
1650 +## -------------------- ##
1651 +## M4sh Initialization. ##
1652 +## -------------------- ##
1653 +
1654 +# Be more Bourne compatible
1655 +DUALCASE=1; export DUALCASE # for MKS sh
1656 +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
1657 + emulate sh
1658 + NULLCMD=:
1659 + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
1660 + # is contrary to our usage. Disable this feature.
1661 + alias -g '${1+"$@"}'='"$@"'
1662 + setopt NO_GLOB_SUBST
1663 +else
1664 + case `(set -o) 2>/dev/null` in #(
1665 + *posix*) :
1666 + set -o posix ;; #(
1667 + *) :
1668 + ;;
1669 +esac
1670 +fi
1671 +
1672 +
1673 +as_nl='
1674 +'
1675 +export as_nl
1676 +# Printing a long string crashes Solaris 7 /usr/bin/printf.
1677 +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1678 +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
1679 +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
1680 +# Prefer a ksh shell builtin over an external printf program on Solaris,
1681 +# but without wasting forks for bash or zsh.
1682 +if test -z "$BASH_VERSION$ZSH_VERSION" \
1683 + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
1684 + as_echo='print -r --'
1685 + as_echo_n='print -rn --'
1686 +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
1687 + as_echo='printf %s\n'
1688 + as_echo_n='printf %s'
1689 +else
1690 + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
1691 + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
1692 + as_echo_n='/usr/ucb/echo -n'
1693 + else
1694 + as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
1695 + as_echo_n_body='eval
1696 + arg=$1;
1697 + case $arg in #(
1698 + *"$as_nl"*)
1699 + expr "X$arg" : "X\\(.*\\)$as_nl";
1700 + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
1701 + esac;
1702 + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
1703 + '
1704 + export as_echo_n_body
1705 + as_echo_n='sh -c $as_echo_n_body as_echo'
1706 + fi
1707 + export as_echo_body
1708 + as_echo='sh -c $as_echo_body as_echo'
1709 +fi
1710 +
1711 +# The user is always right.
1712 +if test "${PATH_SEPARATOR+set}" != set; then
1713 + PATH_SEPARATOR=:
1714 + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
1715 + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
1716 + PATH_SEPARATOR=';'
1717 + }
1718 +fi
1719 +
1720 +
1721 +# IFS
1722 +# We need space, tab and new line, in precisely that order. Quoting is
1723 +# there to prevent editors from complaining about space-tab.
1724 +# (If _AS_PATH_WALK were called with IFS unset, it would disable word
1725 +# splitting by setting IFS to empty value.)
1726 +IFS=" "" $as_nl"
1727 +
1728 +# Find who we are. Look in the path if we contain no directory separator.
1729 +as_myself=
1730 +case $0 in #((
1731 + *[\\/]* ) as_myself=$0 ;;
1732 + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1733 +for as_dir in $PATH
1734 +do
1735 + IFS=$as_save_IFS
1736 + test -z "$as_dir" && as_dir=.
1737 + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
1738 + done
1739 +IFS=$as_save_IFS
1740 +
1741 + ;;
1742 +esac
1743 +# We did not find ourselves, most probably we were run as `sh COMMAND'
1744 +# in which case we are not to be found in the path.
1745 +if test "x$as_myself" = x; then
1746 + as_myself=$0
1747 +fi
1748 +if test ! -f "$as_myself"; then
1749 + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
1750 + exit 1
1751 +fi
1752 +
1753 +# Unset variables that we do not need and which cause bugs (e.g. in
1754 +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
1755 +# suppresses any "Segmentation fault" message there. '((' could
1756 +# trigger a bug in pdksh 5.2.14.
1757 +for as_var in BASH_ENV ENV MAIL MAILPATH
1758 +do eval test x\${$as_var+set} = xset \
1759 + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
1760 +done
1761 +PS1='$ '
1762 +PS2='> '
1763 +PS4='+ '
1764 +
1765 +# NLS nuisances.
1766 +LC_ALL=C
1767 +export LC_ALL
1768 +LANGUAGE=C
1769 +export LANGUAGE
1770 +
1771 +# CDPATH.
1772 +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1773 +
1774 +# Use a proper internal environment variable to ensure we don't fall
1775 + # into an infinite loop, continuously re-executing ourselves.
1776 + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
1777 + _as_can_reexec=no; export _as_can_reexec;
1778 + # We cannot yet assume a decent shell, so we have to provide a
1779 +# neutralization value for shells without unset; and this also
1780 +# works around shells that cannot unset nonexistent variables.
1781 +# Preserve -v and -x to the replacement shell.
1782 +BASH_ENV=/dev/null
1783 +ENV=/dev/null
1784 +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
1785 +case $- in # ((((
1786 + *v*x* | *x*v* ) as_opts=-vx ;;
1787 + *v* ) as_opts=-v ;;
1788 + *x* ) as_opts=-x ;;
1789 + * ) as_opts= ;;
1790 +esac
1791 +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
1792 +# Admittedly, this is quite paranoid, since all the known shells bail
1793 +# out after a failed `exec'.
1794 +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
1795 +as_fn_exit 255
1796 + fi
1797 + # We don't want this to propagate to other subprocesses.
1798 + { _as_can_reexec=; unset _as_can_reexec;}
1799 +if test "x$CONFIG_SHELL" = x; then
1800 + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
1801 + emulate sh
1802 + NULLCMD=:
1803 + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
1804 + # is contrary to our usage. Disable this feature.
1805 + alias -g '\${1+\"\$@\"}'='\"\$@\"'
1806 + setopt NO_GLOB_SUBST
1807 +else
1808 + case \`(set -o) 2>/dev/null\` in #(
1809 + *posix*) :
1810 + set -o posix ;; #(
1811 + *) :
1812 + ;;
1813 +esac
1814 +fi
1815 +"
1816 + as_required="as_fn_return () { (exit \$1); }
1817 +as_fn_success () { as_fn_return 0; }
1818 +as_fn_failure () { as_fn_return 1; }
1819 +as_fn_ret_success () { return 0; }
1820 +as_fn_ret_failure () { return 1; }
1821 +
1822 +exitcode=0
1823 +as_fn_success || { exitcode=1; echo as_fn_success failed.; }
1824 +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
1825 +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
1826 +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
1827 +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
1828 +
1829 +else
1830 + exitcode=1; echo positional parameters were not saved.
1831 +fi
1832 +test x\$exitcode = x0 || exit 1
1833 +test -x / || exit 1"
1834 + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
1835 + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
1836 + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
1837 + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
1838 +
1839 + test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
1840 + ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1841 + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
1842 + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
1843 + PATH=/empty FPATH=/empty; export PATH FPATH
1844 + test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
1845 + || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1
1846 +test \$(( 1 + 1 )) = 2 || exit 1"
1847 + if (eval "$as_required") 2>/dev/null; then :
1848 + as_have_required=yes
1849 +else
1850 + as_have_required=no
1851 +fi
1852 + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
1853 +
1854 +else
1855 + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1856 +as_found=false
1857 +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
1858 +do
1859 + IFS=$as_save_IFS
1860 + test -z "$as_dir" && as_dir=.
1861 + as_found=:
1862 + case $as_dir in #(
1863 + /*)
1864 + for as_base in sh bash ksh sh5; do
1865 + # Try only shells that exist, to save several forks.
1866 + as_shell=$as_dir/$as_base
1867 + if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
1868 + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
1869 + CONFIG_SHELL=$as_shell as_have_required=yes
1870 + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
1871 + break 2
1872 +fi
1873 +fi
1874 + done;;
1875 + esac
1876 + as_found=false
1877 +done
1878 +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
1879 + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
1880 + CONFIG_SHELL=$SHELL as_have_required=yes
1881 +fi; }
1882 +IFS=$as_save_IFS
1883 +
1884 +
1885 + if test "x$CONFIG_SHELL" != x; then :
1886 + export CONFIG_SHELL
1887 + # We cannot yet assume a decent shell, so we have to provide a
1888 +# neutralization value for shells without unset; and this also
1889 +# works around shells that cannot unset nonexistent variables.
1890 +# Preserve -v and -x to the replacement shell.
1891 +BASH_ENV=/dev/null
1892 +ENV=/dev/null
1893 +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
1894 +case $- in # ((((
1895 + *v*x* | *x*v* ) as_opts=-vx ;;
1896 + *v* ) as_opts=-v ;;
1897 + *x* ) as_opts=-x ;;
1898 + * ) as_opts= ;;
1899 +esac
1900 +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
1901 +# Admittedly, this is quite paranoid, since all the known shells bail
1902 +# out after a failed `exec'.
1903 +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
1904 +exit 255
1905 +fi
1906 +
1907 + if test x$as_have_required = xno; then :
1908 + $as_echo "$0: This script requires a shell more modern than all"
1909 + $as_echo "$0: the shells that I found on your system."
1910 + if test x${ZSH_VERSION+set} = xset ; then
1911 + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
1912 + $as_echo "$0: be upgraded to zsh 4.3.4 or later."
1913 + else
1914 + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
1915 +$0: including any error possibly output before this
1916 +$0: message. Then install a modern shell, or manually run
1917 +$0: the script under such a shell if you do have one."
1918 + fi
1919 + exit 1
1920 +fi
1921 +fi
1922 +fi
1923 +SHELL=${CONFIG_SHELL-/bin/sh}
1924 +export SHELL
1925 +# Unset more variables known to interfere with behavior of common tools.
1926 +CLICOLOR_FORCE= GREP_OPTIONS=
1927 +unset CLICOLOR_FORCE GREP_OPTIONS
1928 +
1929 +## --------------------- ##
1930 +## M4sh Shell Functions. ##
1931 +## --------------------- ##
1932 +# as_fn_unset VAR
1933 +# ---------------
1934 +# Portably unset VAR.
1935 +as_fn_unset ()
1936 +{
1937 + { eval $1=; unset $1;}
1938 +}
1939 +as_unset=as_fn_unset
1940 +
1941 +# as_fn_set_status STATUS
1942 +# -----------------------
1943 +# Set $? to STATUS, without forking.
1944 +as_fn_set_status ()
1945 +{
1946 + return $1
1947 +} # as_fn_set_status
1948 +
1949 +# as_fn_exit STATUS
1950 +# -----------------
1951 +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
1952 +as_fn_exit ()
1953 +{
1954 + set +e
1955 + as_fn_set_status $1
1956 + exit $1
1957 +} # as_fn_exit
1958 +
1959 +# as_fn_mkdir_p
1960 +# -------------
1961 +# Create "$as_dir" as a directory, including parents if necessary.
1962 +as_fn_mkdir_p ()
1963 +{
1964 +
1965 + case $as_dir in #(
1966 + -*) as_dir=./$as_dir;;
1967 + esac
1968 + test -d "$as_dir" || eval $as_mkdir_p || {
1969 + as_dirs=
1970 + while :; do
1971 + case $as_dir in #(
1972 + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
1973 + *) as_qdir=$as_dir;;
1974 + esac
1975 + as_dirs="'$as_qdir' $as_dirs"
1976 + as_dir=`$as_dirname -- "$as_dir" ||
1977 +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1978 + X"$as_dir" : 'X\(//\)[^/]' \| \
1979 + X"$as_dir" : 'X\(//\)$' \| \
1980 + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
1981 +$as_echo X"$as_dir" |
1982 + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1983 + s//\1/
1984 + q
1985 + }
1986 + /^X\(\/\/\)[^/].*/{
1987 + s//\1/
1988 + q
1989 + }
1990 + /^X\(\/\/\)$/{
1991 + s//\1/
1992 + q
1993 + }
1994 + /^X\(\/\).*/{
1995 + s//\1/
1996 + q
1997 + }
1998 + s/.*/./; q'`
1999 + test -d "$as_dir" && break
2000 + done
2001 + test -z "$as_dirs" || eval "mkdir $as_dirs"
2002 + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
2003 +
2004 +
2005 +} # as_fn_mkdir_p
2006 +
2007 +# as_fn_executable_p FILE
2008 +# -----------------------
2009 +# Test if FILE is an executable regular file.
2010 +as_fn_executable_p ()
2011 +{
2012 + test -f "$1" && test -x "$1"
2013 +} # as_fn_executable_p
2014 +# as_fn_append VAR VALUE
2015 +# ----------------------
2016 +# Append the text in VALUE to the end of the definition contained in VAR. Take
2017 +# advantage of any shell optimizations that allow amortized linear growth over
2018 +# repeated appends, instead of the typical quadratic growth present in naive
2019 +# implementations.
2020 +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
2021 + eval 'as_fn_append ()
2022 + {
2023 + eval $1+=\$2
2024 + }'
2025 +else
2026 + as_fn_append ()
2027 + {
2028 + eval $1=\$$1\$2
2029 + }
2030 +fi # as_fn_append
2031 +
2032 +# as_fn_arith ARG...
2033 +# ------------------
2034 +# Perform arithmetic evaluation on the ARGs, and store the result in the
2035 +# global $as_val. Take advantage of shells that can avoid forks. The arguments
2036 +# must be portable across $(()) and expr.
2037 +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
2038 + eval 'as_fn_arith ()
2039 + {
2040 + as_val=$(( $* ))
2041 + }'
2042 +else
2043 + as_fn_arith ()
2044 + {
2045 + as_val=`expr "$@" || test $? -eq 1`
2046 + }
2047 +fi # as_fn_arith
2048 +
2049 +
2050 +# as_fn_error STATUS ERROR [LINENO LOG_FD]
2051 +# ----------------------------------------
2052 +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
2053 +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
2054 +# script with STATUS, using 1 if that was 0.
2055 +as_fn_error ()
2056 +{
2057 + as_status=$1; test $as_status -eq 0 && as_status=1
2058 + if test "$4"; then
2059 + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2060 + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
2061 + fi
2062 + $as_echo "$as_me: error: $2" >&2
2063 + as_fn_exit $as_status
2064 +} # as_fn_error
2065 +
2066 +if expr a : '\(a\)' >/dev/null 2>&1 &&
2067 + test "X`expr 00001 : '.*\(...\)'`" = X001; then
2068 + as_expr=expr
2069 +else
2070 + as_expr=false
2071 +fi
2072 +
2073 +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
2074 + as_basename=basename
2075 +else
2076 + as_basename=false
2077 +fi
2078 +
2079 +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
2080 + as_dirname=dirname
2081 +else
2082 + as_dirname=false
2083 +fi
2084 +
2085 +as_me=`$as_basename -- "$0" ||
2086 +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
2087 + X"$0" : 'X\(//\)$' \| \
2088 + X"$0" : 'X\(/\)' \| . 2>/dev/null ||
2089 +$as_echo X/"$0" |
2090 + sed '/^.*\/\([^/][^/]*\)\/*$/{
2091 + s//\1/
2092 + q
2093 + }
2094 + /^X\/\(\/\/\)$/{
2095 + s//\1/
2096 + q
2097 + }
2098 + /^X\/\(\/\).*/{
2099 + s//\1/
2100 + q
2101 + }
2102 + s/.*/./; q'`
2103 +
2104 +# Avoid depending upon Character Ranges.
2105 +as_cr_letters='abcdefghijklmnopqrstuvwxyz'
2106 +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
2107 +as_cr_Letters=$as_cr_letters$as_cr_LETTERS
2108 +as_cr_digits='0123456789'
2109 +as_cr_alnum=$as_cr_Letters$as_cr_digits
2110 +
2111 +
2112 + as_lineno_1=$LINENO as_lineno_1a=$LINENO
2113 + as_lineno_2=$LINENO as_lineno_2a=$LINENO
2114 + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
2115 + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
2116 + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
2117 + sed -n '
2118 + p
2119 + /[$]LINENO/=
2120 + ' <$as_myself |
2121 + sed '
2122 + s/[$]LINENO.*/&-/
2123 + t lineno
2124 + b
2125 + :lineno
2126 + N
2127 + :loop
2128 + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
2129 + t loop
2130 + s/-\n.*//
2131 + ' >$as_me.lineno &&
2132 + chmod +x "$as_me.lineno" ||
2133 + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
2134 +
2135 + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
2136 + # already done that, so ensure we don't try to do so again and fall
2137 + # in an infinite loop. This has already happened in practice.
2138 + _as_can_reexec=no; export _as_can_reexec
2139 + # Don't try to exec as it changes $[0], causing all sort of problems
2140 + # (the dirname of $[0] is not the place where we might find the
2141 + # original and so on. Autoconf is especially sensitive to this).
2142 + . "./$as_me.lineno"
2143 + # Exit status is that of the last command.
2144 + exit
2145 +}
2146 +
2147 +ECHO_C= ECHO_N= ECHO_T=
2148 +case `echo -n x` in #(((((
2149 +-n*)
2150 + case `echo 'xy\c'` in
2151 + *c*) ECHO_T=' ';; # ECHO_T is single tab character.
2152 + xy) ECHO_C='\c';;
2153 + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
2154 + ECHO_T=' ';;
2155 + esac;;
2156 +*)
2157 + ECHO_N='-n';;
2158 +esac
2159 +
2160 +rm -f conf$$ conf$$.exe conf$$.file
2161 +if test -d conf$$.dir; then
2162 + rm -f conf$$.dir/conf$$.file
2163 +else
2164 + rm -f conf$$.dir
2165 + mkdir conf$$.dir 2>/dev/null
2166 +fi
2167 +if (echo >conf$$.file) 2>/dev/null; then
2168 + if ln -s conf$$.file conf$$ 2>/dev/null; then
2169 + as_ln_s='ln -s'
2170 + # ... but there are two gotchas:
2171 + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
2172 + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
2173 + # In both cases, we have to default to `cp -pR'.
2174 + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
2175 + as_ln_s='cp -pR'
2176 + elif ln conf$$.file conf$$ 2>/dev/null; then
2177 + as_ln_s=ln
2178 + else
2179 + as_ln_s='cp -pR'
2180 + fi
2181 +else
2182 + as_ln_s='cp -pR'
2183 +fi
2184 +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
2185 +rmdir conf$$.dir 2>/dev/null
2186 +
2187 +if mkdir -p . 2>/dev/null; then
2188 + as_mkdir_p='mkdir -p "$as_dir"'
2189 +else
2190 + test -d ./-p && rmdir ./-p
2191 + as_mkdir_p=false
2192 +fi
2193 +
2194 +as_test_x='test -x'
2195 +as_executable_p=as_fn_executable_p
2196 +
2197 +# Sed expression to map a string onto a valid CPP name.
2198 +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
2199 +
2200 +# Sed expression to map a string onto a valid variable name.
2201 +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
2202 +
2203 +SHELL=${CONFIG_SHELL-/bin/sh}
2204 +
2205 +
2206 +test -n "$DJDIR" || exec 7<&0 </dev/null
2207 +exec 6>&1
2208 +
2209 +# Name of the host.
2210 +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
2211 +# so uname gets run too.
2212 +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
2213 +
2214 +#
2215 +# Initializations.
2216 +#
2217 +ac_default_prefix=/usr/local
2218 +ac_clean_files=
2219 +ac_config_libobj_dir=.
2220 +LIBOBJS=
2221 +cross_compiling=no
2222 +subdirs=
2223 +MFLAGS=
2224 +MAKEFLAGS=
2225 +
2226 +# Identity of this package.
2227 +PACKAGE_NAME='argyll'
2228 +PACKAGE_TARNAME='argyll'
2229 +PACKAGE_VERSION='1.3.7'
2230 +PACKAGE_STRING='argyll 1.3.7'
2231 +PACKAGE_BUGREPORT=''
2232 +PACKAGE_URL=''
2233 +
2234 +# Factoring default headers for most tests.
2235 +ac_includes_default="\
2236 +#include <stdio.h>
2237 +#ifdef HAVE_SYS_TYPES_H
2238 +# include <sys/types.h>
2239 +#endif
2240 +#ifdef HAVE_SYS_STAT_H
2241 +# include <sys/stat.h>
2242 +#endif
2243 +#ifdef STDC_HEADERS
2244 +# include <stdlib.h>
2245 +# include <stddef.h>
2246 +#else
2247 +# ifdef HAVE_STDLIB_H
2248 +# include <stdlib.h>
2249 +# endif
2250 +#endif
2251 +#ifdef HAVE_STRING_H
2252 +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
2253 +# include <memory.h>
2254 +# endif
2255 +# include <string.h>
2256 +#endif
2257 +#ifdef HAVE_STRINGS_H
2258 +# include <strings.h>
2259 +#endif
2260 +#ifdef HAVE_INTTYPES_H
2261 +# include <inttypes.h>
2262 +#endif
2263 +#ifdef HAVE_STDINT_H
2264 +# include <stdint.h>
2265 +#endif
2266 +#ifdef HAVE_UNISTD_H
2267 +# include <unistd.h>
2268 +#endif"
2269 +
2270 +ac_subst_vars='am__EXEEXT_FALSE
2271 +am__EXEEXT_TRUE
2272 +LTLIBOBJS
2273 +LIBOBJS
2274 +BIGENDIAN
2275 +OS_LINUX_FALSE
2276 +OS_LINUX_TRUE
2277 +OS_BSD
2278 +OS_LINUX
2279 +YAJL_SUBDIRS
2280 +YAJL_CFLAGS
2281 +YAJL_LIBS
2282 +ICC_SUBDIRS
2283 +ICC_CFLAGS
2284 +ICC_LIBS
2285 +TIFF_LIBS
2286 +X_EXTRA_LIBS
2287 +X_LIBS
2288 +X_PRE_LIBS
2289 +X_CFLAGS
2290 +XMKMF
2291 +CPP
2292 +OTOOL64
2293 +OTOOL
2294 +LIPO
2295 +NMEDIT
2296 +DSYMUTIL
2297 +MANIFEST_TOOL
2298 +RANLIB
2299 +ac_ct_AR
2300 +AR
2301 +DLLTOOL
2302 +OBJDUMP
2303 +LN_S
2304 +NM
2305 +ac_ct_DUMPBIN
2306 +DUMPBIN
2307 +LD
2308 +FGREP
2309 +EGREP
2310 +GREP
2311 +SED
2312 +host_os
2313 +host_vendor
2314 +host_cpu
2315 +host
2316 +build_os
2317 +build_vendor
2318 +build_cpu
2319 +build
2320 +LIBTOOL
2321 +am__fastdepCC_FALSE
2322 +am__fastdepCC_TRUE
2323 +CCDEPMODE
2324 +am__nodep
2325 +AMDEPBACKSLASH
2326 +AMDEP_FALSE
2327 +AMDEP_TRUE
2328 +am__quote
2329 +am__include
2330 +DEPDIR
2331 +OBJEXT
2332 +EXEEXT
2333 +ac_ct_CC
2334 +CPPFLAGS
2335 +LDFLAGS
2336 +CFLAGS
2337 +CC
2338 +AM_BACKSLASH
2339 +AM_DEFAULT_VERBOSITY
2340 +AM_DEFAULT_V
2341 +AM_V
2342 +am__untar
2343 +am__tar
2344 +AMTAR
2345 +am__leading_dot
2346 +SET_MAKE
2347 +AWK
2348 +mkdir_p
2349 +MKDIR_P
2350 +INSTALL_STRIP_PROGRAM
2351 +STRIP
2352 +install_sh
2353 +MAKEINFO
2354 +AUTOHEADER
2355 +AUTOMAKE
2356 +AUTOCONF
2357 +ACLOCAL
2358 +VERSION
2359 +PACKAGE
2360 +CYGPATH_W
2361 +am__isrc
2362 +INSTALL_DATA
2363 +INSTALL_SCRIPT
2364 +INSTALL_PROGRAM
2365 +target_alias
2366 +host_alias
2367 +build_alias
2368 +LIBS
2369 +ECHO_T
2370 +ECHO_N
2371 +ECHO_C
2372 +DEFS
2373 +mandir
2374 +localedir
2375 +libdir
2376 +psdir
2377 +pdfdir
2378 +dvidir
2379 +htmldir
2380 +infodir
2381 +docdir
2382 +oldincludedir
2383 +includedir
2384 +localstatedir
2385 +sharedstatedir
2386 +sysconfdir
2387 +datadir
2388 +datarootdir
2389 +libexecdir
2390 +sbindir
2391 +bindir
2392 +program_transform_name
2393 +prefix
2394 +exec_prefix
2395 +PACKAGE_URL
2396 +PACKAGE_BUGREPORT
2397 +PACKAGE_STRING
2398 +PACKAGE_VERSION
2399 +PACKAGE_TARNAME
2400 +PACKAGE_NAME
2401 +PATH_SEPARATOR
2402 +SHELL'
2403 +ac_subst_files=''
2404 +ac_user_opts='
2405 +enable_option_checking
2406 +enable_silent_rules
2407 +enable_dependency_tracking
2408 +enable_shared
2409 +enable_static
2410 +with_pic
2411 +enable_fast_install
2412 +with_gnu_ld
2413 +with_sysroot
2414 +enable_libtool_lock
2415 +with_x
2416 +with_system_libicc
2417 +with_system_libyajl
2418 +'
2419 + ac_precious_vars='build_alias
2420 +host_alias
2421 +target_alias
2422 +CC
2423 +CFLAGS
2424 +LDFLAGS
2425 +LIBS
2426 +CPPFLAGS
2427 +CPP
2428 +XMKMF'
2429 +
2430 +
2431 +# Initialize some variables set by options.
2432 +ac_init_help=
2433 +ac_init_version=false
2434 +ac_unrecognized_opts=
2435 +ac_unrecognized_sep=
2436 +# The variables have the same names as the options, with
2437 +# dashes changed to underlines.
2438 +cache_file=/dev/null
2439 +exec_prefix=NONE
2440 +no_create=
2441 +no_recursion=
2442 +prefix=NONE
2443 +program_prefix=NONE
2444 +program_suffix=NONE
2445 +program_transform_name=s,x,x,
2446 +silent=
2447 +site=
2448 +srcdir=
2449 +verbose=
2450 +x_includes=NONE
2451 +x_libraries=NONE
2452 +
2453 +# Installation directory options.
2454 +# These are left unexpanded so users can "make install exec_prefix=/foo"
2455 +# and all the variables that are supposed to be based on exec_prefix
2456 +# by default will actually change.
2457 +# Use braces instead of parens because sh, perl, etc. also accept them.
2458 +# (The list follows the same order as the GNU Coding Standards.)
2459 +bindir='${exec_prefix}/bin'
2460 +sbindir='${exec_prefix}/sbin'
2461 +libexecdir='${exec_prefix}/libexec'
2462 +datarootdir='${prefix}/share'
2463 +datadir='${datarootdir}'
2464 +sysconfdir='${prefix}/etc'
2465 +sharedstatedir='${prefix}/com'
2466 +localstatedir='${prefix}/var'
2467 +includedir='${prefix}/include'
2468 +oldincludedir='/usr/include'
2469 +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
2470 +infodir='${datarootdir}/info'
2471 +htmldir='${docdir}'
2472 +dvidir='${docdir}'
2473 +pdfdir='${docdir}'
2474 +psdir='${docdir}'
2475 +libdir='${exec_prefix}/lib'
2476 +localedir='${datarootdir}/locale'
2477 +mandir='${datarootdir}/man'
2478 +
2479 +ac_prev=
2480 +ac_dashdash=
2481 +for ac_option
2482 +do
2483 + # If the previous option needs an argument, assign it.
2484 + if test -n "$ac_prev"; then
2485 + eval $ac_prev=\$ac_option
2486 + ac_prev=
2487 + continue
2488 + fi
2489 +
2490 + case $ac_option in
2491 + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
2492 + *=) ac_optarg= ;;
2493 + *) ac_optarg=yes ;;
2494 + esac
2495 +
2496 + # Accept the important Cygnus configure options, so we can diagnose typos.
2497 +
2498 + case $ac_dashdash$ac_option in
2499 + --)
2500 + ac_dashdash=yes ;;
2501 +
2502 + -bindir | --bindir | --bindi | --bind | --bin | --bi)
2503 + ac_prev=bindir ;;
2504 + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
2505 + bindir=$ac_optarg ;;
2506 +
2507 + -build | --build | --buil | --bui | --bu)
2508 + ac_prev=build_alias ;;
2509 + -build=* | --build=* | --buil=* | --bui=* | --bu=*)
2510 + build_alias=$ac_optarg ;;
2511 +
2512 + -cache-file | --cache-file | --cache-fil | --cache-fi \
2513 + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
2514 + ac_prev=cache_file ;;
2515 + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
2516 + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
2517 + cache_file=$ac_optarg ;;
2518 +
2519 + --config-cache | -C)
2520 + cache_file=config.cache ;;
2521 +
2522 + -datadir | --datadir | --datadi | --datad)
2523 + ac_prev=datadir ;;
2524 + -datadir=* | --datadir=* | --datadi=* | --datad=*)
2525 + datadir=$ac_optarg ;;
2526 +
2527 + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
2528 + | --dataroo | --dataro | --datar)
2529 + ac_prev=datarootdir ;;
2530 + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
2531 + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
2532 + datarootdir=$ac_optarg ;;
2533 +
2534 + -disable-* | --disable-*)
2535 + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
2536 + # Reject names that are not valid shell variable names.
2537 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2538 + as_fn_error $? "invalid feature name: $ac_useropt"
2539 + ac_useropt_orig=$ac_useropt
2540 + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2541 + case $ac_user_opts in
2542 + *"
2543 +"enable_$ac_useropt"
2544 +"*) ;;
2545 + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
2546 + ac_unrecognized_sep=', ';;
2547 + esac
2548 + eval enable_$ac_useropt=no ;;
2549 +
2550 + -docdir | --docdir | --docdi | --doc | --do)
2551 + ac_prev=docdir ;;
2552 + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
2553 + docdir=$ac_optarg ;;
2554 +
2555 + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
2556 + ac_prev=dvidir ;;
2557 + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
2558 + dvidir=$ac_optarg ;;
2559 +
2560 + -enable-* | --enable-*)
2561 + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
2562 + # Reject names that are not valid shell variable names.
2563 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2564 + as_fn_error $? "invalid feature name: $ac_useropt"
2565 + ac_useropt_orig=$ac_useropt
2566 + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2567 + case $ac_user_opts in
2568 + *"
2569 +"enable_$ac_useropt"
2570 +"*) ;;
2571 + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
2572 + ac_unrecognized_sep=', ';;
2573 + esac
2574 + eval enable_$ac_useropt=\$ac_optarg ;;
2575 +
2576 + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
2577 + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
2578 + | --exec | --exe | --ex)
2579 + ac_prev=exec_prefix ;;
2580 + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
2581 + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
2582 + | --exec=* | --exe=* | --ex=*)
2583 + exec_prefix=$ac_optarg ;;
2584 +
2585 + -gas | --gas | --ga | --g)
2586 + # Obsolete; use --with-gas.
2587 + with_gas=yes ;;
2588 +
2589 + -help | --help | --hel | --he | -h)
2590 + ac_init_help=long ;;
2591 + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
2592 + ac_init_help=recursive ;;
2593 + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
2594 + ac_init_help=short ;;
2595 +
2596 + -host | --host | --hos | --ho)
2597 + ac_prev=host_alias ;;
2598 + -host=* | --host=* | --hos=* | --ho=*)
2599 + host_alias=$ac_optarg ;;
2600 +
2601 + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
2602 + ac_prev=htmldir ;;
2603 + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
2604 + | --ht=*)
2605 + htmldir=$ac_optarg ;;
2606 +
2607 + -includedir | --includedir | --includedi | --included | --include \
2608 + | --includ | --inclu | --incl | --inc)
2609 + ac_prev=includedir ;;
2610 + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
2611 + | --includ=* | --inclu=* | --incl=* | --inc=*)
2612 + includedir=$ac_optarg ;;
2613 +
2614 + -infodir | --infodir | --infodi | --infod | --info | --inf)
2615 + ac_prev=infodir ;;
2616 + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
2617 + infodir=$ac_optarg ;;
2618 +
2619 + -libdir | --libdir | --libdi | --libd)
2620 + ac_prev=libdir ;;
2621 + -libdir=* | --libdir=* | --libdi=* | --libd=*)
2622 + libdir=$ac_optarg ;;
2623 +
2624 + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
2625 + | --libexe | --libex | --libe)
2626 + ac_prev=libexecdir ;;
2627 + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
2628 + | --libexe=* | --libex=* | --libe=*)
2629 + libexecdir=$ac_optarg ;;
2630 +
2631 + -localedir | --localedir | --localedi | --localed | --locale)
2632 + ac_prev=localedir ;;
2633 + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
2634 + localedir=$ac_optarg ;;
2635 +
2636 + -localstatedir | --localstatedir | --localstatedi | --localstated \
2637 + | --localstate | --localstat | --localsta | --localst | --locals)
2638 + ac_prev=localstatedir ;;
2639 + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
2640 + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
2641 + localstatedir=$ac_optarg ;;
2642 +
2643 + -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
2644 + ac_prev=mandir ;;
2645 + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
2646 + mandir=$ac_optarg ;;
2647 +
2648 + -nfp | --nfp | --nf)
2649 + # Obsolete; use --without-fp.
2650 + with_fp=no ;;
2651 +
2652 + -no-create | --no-create | --no-creat | --no-crea | --no-cre \
2653 + | --no-cr | --no-c | -n)
2654 + no_create=yes ;;
2655 +
2656 + -no-recursion | --no-recursion | --no-recursio | --no-recursi \
2657 + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
2658 + no_recursion=yes ;;
2659 +
2660 + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
2661 + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
2662 + | --oldin | --oldi | --old | --ol | --o)
2663 + ac_prev=oldincludedir ;;
2664 + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
2665 + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
2666 + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
2667 + oldincludedir=$ac_optarg ;;
2668 +
2669 + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
2670 + ac_prev=prefix ;;
2671 + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
2672 + prefix=$ac_optarg ;;
2673 +
2674 + -program-prefix | --program-prefix | --program-prefi | --program-pref \
2675 + | --program-pre | --program-pr | --program-p)
2676 + ac_prev=program_prefix ;;
2677 + -program-prefix=* | --program-prefix=* | --program-prefi=* \
2678 + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
2679 + program_prefix=$ac_optarg ;;
2680 +
2681 + -program-suffix | --program-suffix | --program-suffi | --program-suff \
2682 + | --program-suf | --program-su | --program-s)
2683 + ac_prev=program_suffix ;;
2684 + -program-suffix=* | --program-suffix=* | --program-suffi=* \
2685 + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
2686 + program_suffix=$ac_optarg ;;
2687 +
2688 + -program-transform-name | --program-transform-name \
2689 + | --program-transform-nam | --program-transform-na \
2690 + | --program-transform-n | --program-transform- \
2691 + | --program-transform | --program-transfor \
2692 + | --program-transfo | --program-transf \
2693 + | --program-trans | --program-tran \
2694 + | --progr-tra | --program-tr | --program-t)
2695 + ac_prev=program_transform_name ;;
2696 + -program-transform-name=* | --program-transform-name=* \
2697 + | --program-transform-nam=* | --program-transform-na=* \
2698 + | --program-transform-n=* | --program-transform-=* \
2699 + | --program-transform=* | --program-transfor=* \
2700 + | --program-transfo=* | --program-transf=* \
2701 + | --program-trans=* | --program-tran=* \
2702 + | --progr-tra=* | --program-tr=* | --program-t=*)
2703 + program_transform_name=$ac_optarg ;;
2704 +
2705 + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
2706 + ac_prev=pdfdir ;;
2707 + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
2708 + pdfdir=$ac_optarg ;;
2709 +
2710 + -psdir | --psdir | --psdi | --psd | --ps)
2711 + ac_prev=psdir ;;
2712 + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
2713 + psdir=$ac_optarg ;;
2714 +
2715 + -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2716 + | -silent | --silent | --silen | --sile | --sil)
2717 + silent=yes ;;
2718 +
2719 + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
2720 + ac_prev=sbindir ;;
2721 + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
2722 + | --sbi=* | --sb=*)
2723 + sbindir=$ac_optarg ;;
2724 +
2725 + -sharedstatedir | --sharedstatedir | --sharedstatedi \
2726 + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
2727 + | --sharedst | --shareds | --shared | --share | --shar \
2728 + | --sha | --sh)
2729 + ac_prev=sharedstatedir ;;
2730 + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
2731 + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
2732 + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
2733 + | --sha=* | --sh=*)
2734 + sharedstatedir=$ac_optarg ;;
2735 +
2736 + -site | --site | --sit)
2737 + ac_prev=site ;;
2738 + -site=* | --site=* | --sit=*)
2739 + site=$ac_optarg ;;
2740 +
2741 + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2742 + ac_prev=srcdir ;;
2743 + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2744 + srcdir=$ac_optarg ;;
2745 +
2746 + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2747 + | --syscon | --sysco | --sysc | --sys | --sy)
2748 + ac_prev=sysconfdir ;;
2749 + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2750 + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2751 + sysconfdir=$ac_optarg ;;
2752 +
2753 + -target | --target | --targe | --targ | --tar | --ta | --t)
2754 + ac_prev=target_alias ;;
2755 + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2756 + target_alias=$ac_optarg ;;
2757 +
2758 + -v | -verbose | --verbose | --verbos | --verbo | --verb)
2759 + verbose=yes ;;
2760 +
2761 + -version | --version | --versio | --versi | --vers | -V)
2762 + ac_init_version=: ;;
2763 +
2764 + -with-* | --with-*)
2765 + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2766 + # Reject names that are not valid shell variable names.
2767 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2768 + as_fn_error $? "invalid package name: $ac_useropt"
2769 + ac_useropt_orig=$ac_useropt
2770 + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2771 + case $ac_user_opts in
2772 + *"
2773 +"with_$ac_useropt"
2774 +"*) ;;
2775 + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2776 + ac_unrecognized_sep=', ';;
2777 + esac
2778 + eval with_$ac_useropt=\$ac_optarg ;;
2779 +
2780 + -without-* | --without-*)
2781 + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2782 + # Reject names that are not valid shell variable names.
2783 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2784 + as_fn_error $? "invalid package name: $ac_useropt"
2785 + ac_useropt_orig=$ac_useropt
2786 + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2787 + case $ac_user_opts in
2788 + *"
2789 +"with_$ac_useropt"
2790 +"*) ;;
2791 + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2792 + ac_unrecognized_sep=', ';;
2793 + esac
2794 + eval with_$ac_useropt=no ;;
2795 +
2796 + --x)
2797 + # Obsolete; use --with-x.
2798 + with_x=yes ;;
2799 +
2800 + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2801 + | --x-incl | --x-inc | --x-in | --x-i)
2802 + ac_prev=x_includes ;;
2803 + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2804 + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2805 + x_includes=$ac_optarg ;;
2806 +
2807 + -x-libraries | --x-libraries | --x-librarie | --x-librari \
2808 + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2809 + ac_prev=x_libraries ;;
2810 + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2811 + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2812 + x_libraries=$ac_optarg ;;
2813 +
2814 + -*) as_fn_error $? "unrecognized option: \`$ac_option'
2815 +Try \`$0 --help' for more information"
2816 + ;;
2817 +
2818 + *=*)
2819 + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2820 + # Reject names that are not valid shell variable names.
2821 + case $ac_envvar in #(
2822 + '' | [0-9]* | *[!_$as_cr_alnum]* )
2823 + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
2824 + esac
2825 + eval $ac_envvar=\$ac_optarg
2826 + export $ac_envvar ;;
2827 +
2828 + *)
2829 + # FIXME: should be removed in autoconf 3.0.
2830 + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
2831 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2832 + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
2833 + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
2834 + ;;
2835 +
2836 + esac
2837 +done
2838 +
2839 +if test -n "$ac_prev"; then
2840 + ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2841 + as_fn_error $? "missing argument to $ac_option"
2842 +fi
2843 +
2844 +if test -n "$ac_unrecognized_opts"; then
2845 + case $enable_option_checking in
2846 + no) ;;
2847 + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2848 + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2849 + esac
2850 +fi
2851 +
2852 +# Check all directory arguments for consistency.
2853 +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
2854 + datadir sysconfdir sharedstatedir localstatedir includedir \
2855 + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2856 + libdir localedir mandir
2857 +do
2858 + eval ac_val=\$$ac_var
2859 + # Remove trailing slashes.
2860 + case $ac_val in
2861 + */ )
2862 + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2863 + eval $ac_var=\$ac_val;;
2864 + esac
2865 + # Be sure to have absolute directory names.
2866 + case $ac_val in
2867 + [\\/$]* | ?:[\\/]* ) continue;;
2868 + NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2869 + esac
2870 + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2871 +done
2872 +
2873 +# There might be people who depend on the old broken behavior: `$host'
2874 +# used to hold the argument of --host etc.
2875 +# FIXME: To remove some day.
2876 +build=$build_alias
2877 +host=$host_alias
2878 +target=$target_alias
2879 +
2880 +# FIXME: To remove some day.
2881 +if test "x$host_alias" != x; then
2882 + if test "x$build_alias" = x; then
2883 + cross_compiling=maybe
2884 + elif test "x$build_alias" != "x$host_alias"; then
2885 + cross_compiling=yes
2886 + fi
2887 +fi
2888 +
2889 +ac_tool_prefix=
2890 +test -n "$host_alias" && ac_tool_prefix=$host_alias-
2891 +
2892 +test "$silent" = yes && exec 6>/dev/null
2893 +
2894 +
2895 +ac_pwd=`pwd` && test -n "$ac_pwd" &&
2896 +ac_ls_di=`ls -di .` &&
2897 +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2898 + as_fn_error $? "working directory cannot be determined"
2899 +test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2900 + as_fn_error $? "pwd does not report name of working directory"
2901 +
2902 +
2903 +# Find the source files, if location was not specified.
2904 +if test -z "$srcdir"; then
2905 + ac_srcdir_defaulted=yes
2906 + # Try the directory containing this script, then the parent directory.
2907 + ac_confdir=`$as_dirname -- "$as_myself" ||
2908 +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2909 + X"$as_myself" : 'X\(//\)[^/]' \| \
2910 + X"$as_myself" : 'X\(//\)$' \| \
2911 + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2912 +$as_echo X"$as_myself" |
2913 + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2914 + s//\1/
2915 + q
2916 + }
2917 + /^X\(\/\/\)[^/].*/{
2918 + s//\1/
2919 + q
2920 + }
2921 + /^X\(\/\/\)$/{
2922 + s//\1/
2923 + q
2924 + }
2925 + /^X\(\/\).*/{
2926 + s//\1/
2927 + q
2928 + }
2929 + s/.*/./; q'`
2930 + srcdir=$ac_confdir
2931 + if test ! -r "$srcdir/$ac_unique_file"; then
2932 + srcdir=..
2933 + fi
2934 +else
2935 + ac_srcdir_defaulted=no
2936 +fi
2937 +if test ! -r "$srcdir/$ac_unique_file"; then
2938 + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2939 + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2940 +fi
2941 +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2942 +ac_abs_confdir=`(
2943 + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2944 + pwd)`
2945 +# When building in place, set srcdir=.
2946 +if test "$ac_abs_confdir" = "$ac_pwd"; then
2947 + srcdir=.
2948 +fi
2949 +# Remove unnecessary trailing slashes from srcdir.
2950 +# Double slashes in file names in object file debugging info
2951 +# mess up M-x gdb in Emacs.
2952 +case $srcdir in
2953 +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2954 +esac
2955 +for ac_var in $ac_precious_vars; do
2956 + eval ac_env_${ac_var}_set=\${${ac_var}+set}
2957 + eval ac_env_${ac_var}_value=\$${ac_var}
2958 + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2959 + eval ac_cv_env_${ac_var}_value=\$${ac_var}
2960 +done
2961 +
2962 +#
2963 +# Report the --help message.
2964 +#
2965 +if test "$ac_init_help" = "long"; then
2966 + # Omit some internal or obsolete options to make the list less imposing.
2967 + # This message is too long to be a string in the A/UX 3.1 sh.
2968 + cat <<_ACEOF
2969 +\`configure' configures argyll 1.3.7 to adapt to many kinds of systems.
2970 +
2971 +Usage: $0 [OPTION]... [VAR=VALUE]...
2972 +
2973 +To assign environment variables (e.g., CC, CFLAGS...), specify them as
2974 +VAR=VALUE. See below for descriptions of some of the useful variables.
2975 +
2976 +Defaults for the options are specified in brackets.
2977 +
2978 +Configuration:
2979 + -h, --help display this help and exit
2980 + --help=short display options specific to this package
2981 + --help=recursive display the short help of all the included packages
2982 + -V, --version display version information and exit
2983 + -q, --quiet, --silent do not print \`checking ...' messages
2984 + --cache-file=FILE cache test results in FILE [disabled]
2985 + -C, --config-cache alias for \`--cache-file=config.cache'
2986 + -n, --no-create do not create output files
2987 + --srcdir=DIR find the sources in DIR [configure dir or \`..']
2988 +
2989 +Installation directories:
2990 + --prefix=PREFIX install architecture-independent files in PREFIX
2991 + [$ac_default_prefix]
2992 + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2993 + [PREFIX]
2994 +
2995 +By default, \`make install' will install all the files in
2996 +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2997 +an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2998 +for instance \`--prefix=\$HOME'.
2999 +
3000 +For better control, use the options below.
3001 +
3002 +Fine tuning of the installation directories:
3003 + --bindir=DIR user executables [EPREFIX/bin]
3004 + --sbindir=DIR system admin executables [EPREFIX/sbin]
3005 + --libexecdir=DIR program executables [EPREFIX/libexec]
3006 + --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
3007 + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
3008 + --localstatedir=DIR modifiable single-machine data [PREFIX/var]
3009 + --libdir=DIR object code libraries [EPREFIX/lib]
3010 + --includedir=DIR C header files [PREFIX/include]
3011 + --oldincludedir=DIR C header files for non-gcc [/usr/include]
3012 + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
3013 + --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
3014 + --infodir=DIR info documentation [DATAROOTDIR/info]
3015 + --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
3016 + --mandir=DIR man documentation [DATAROOTDIR/man]
3017 + --docdir=DIR documentation root [DATAROOTDIR/doc/argyll]
3018 + --htmldir=DIR html documentation [DOCDIR]
3019 + --dvidir=DIR dvi documentation [DOCDIR]
3020 + --pdfdir=DIR pdf documentation [DOCDIR]
3021 + --psdir=DIR ps documentation [DOCDIR]
3022 +_ACEOF
3023 +
3024 + cat <<\_ACEOF
3025 +
3026 +Program names:
3027 + --program-prefix=PREFIX prepend PREFIX to installed program names
3028 + --program-suffix=SUFFIX append SUFFIX to installed program names
3029 + --program-transform-name=PROGRAM run sed PROGRAM on installed program names
3030 +
3031 +X features:
3032 + --x-includes=DIR X include files are in DIR
3033 + --x-libraries=DIR X library files are in DIR
3034 +
3035 +System types:
3036 + --build=BUILD configure for building on BUILD [guessed]
3037 + --host=HOST cross-compile to build programs to run on HOST [BUILD]
3038 +_ACEOF
3039 +fi
3040 +
3041 +if test -n "$ac_init_help"; then
3042 + case $ac_init_help in
3043 + short | recursive ) echo "Configuration of argyll 1.3.7:";;
3044 + esac
3045 + cat <<\_ACEOF
3046 +
3047 +Optional Features:
3048 + --disable-option-checking ignore unrecognized --enable/--with options
3049 + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
3050 + --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
3051 + --enable-silent-rules less verbose build output (undo: "make V=1")
3052 + --disable-silent-rules verbose build output (undo: "make V=0")
3053 + --enable-dependency-tracking
3054 + do not reject slow dependency extractors
3055 + --disable-dependency-tracking
3056 + speeds up one-time build
3057 + --enable-shared[=PKGS] build shared libraries [default=yes]
3058 + --enable-static[=PKGS] build static libraries [default=yes]
3059 + --enable-fast-install[=PKGS]
3060 + optimize for fast installation [default=yes]
3061 + --disable-libtool-lock avoid locking (might break parallel builds)
3062 +
3063 +Optional Packages:
3064 + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
3065 + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
3066 + --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
3067 + both]
3068 + --with-gnu-ld assume the C compiler uses GNU ld [default=no]
3069 + --with-sysroot=DIR Search for dependent libraries within DIR
3070 + (or the compiler's sysroot if not specified).
3071 + --with-x use the X Window System
3072 + --with-system-libicc use system libicc instead of argyllcms copy
3073 + --with-system-libyajl use system libyajl instead of argyllcms copy
3074 +
3075 +Some influential environment variables:
3076 + CC C compiler command
3077 + CFLAGS C compiler flags
3078 + LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
3079 + nonstandard directory <lib dir>
3080 + LIBS libraries to pass to the linker, e.g. -l<library>
3081 + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
3082 + you have headers in a nonstandard directory <include dir>
3083 + CPP C preprocessor
3084 + XMKMF Path to xmkmf, Makefile generator for X Window System
3085 +
3086 +Use these variables to override the choices made by `configure' or to help
3087 +it to find libraries and programs with nonstandard names/locations.
3088 +
3089 +Report bugs to the package provider.
3090 +_ACEOF
3091 +ac_status=$?
3092 +fi
3093 +
3094 +if test "$ac_init_help" = "recursive"; then
3095 + # If there are subdirs, report their specific --help.
3096 + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
3097 + test -d "$ac_dir" ||
3098 + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
3099 + continue
3100 + ac_builddir=.
3101 +
3102 +case "$ac_dir" in
3103 +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
3104 +*)
3105 + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
3106 + # A ".." for each directory in $ac_dir_suffix.
3107 + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
3108 + case $ac_top_builddir_sub in
3109 + "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
3110 + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
3111 + esac ;;
3112 +esac
3113 +ac_abs_top_builddir=$ac_pwd
3114 +ac_abs_builddir=$ac_pwd$ac_dir_suffix
3115 +# for backward compatibility:
3116 +ac_top_builddir=$ac_top_build_prefix
3117 +
3118 +case $srcdir in
3119 + .) # We are building in place.
3120 + ac_srcdir=.
3121 + ac_top_srcdir=$ac_top_builddir_sub
3122 + ac_abs_top_srcdir=$ac_pwd ;;
3123 + [\\/]* | ?:[\\/]* ) # Absolute name.
3124 + ac_srcdir=$srcdir$ac_dir_suffix;
3125 + ac_top_srcdir=$srcdir
3126 + ac_abs_top_srcdir=$srcdir ;;
3127 + *) # Relative name.
3128 + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
3129 + ac_top_srcdir=$ac_top_build_prefix$srcdir
3130 + ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
3131 +esac
3132 +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
3133 +
3134 + cd "$ac_dir" || { ac_status=$?; continue; }
3135 + # Check for guested configure.
3136 + if test -f "$ac_srcdir/configure.gnu"; then
3137 + echo &&
3138 + $SHELL "$ac_srcdir/configure.gnu" --help=recursive
3139 + elif test -f "$ac_srcdir/configure"; then
3140 + echo &&
3141 + $SHELL "$ac_srcdir/configure" --help=recursive
3142 + else
3143 + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
3144 + fi || ac_status=$?
3145 + cd "$ac_pwd" || { ac_status=$?; break; }
3146 + done
3147 +fi
3148 +
3149 +test -n "$ac_init_help" && exit $ac_status
3150 +if $ac_init_version; then
3151 + cat <<\_ACEOF
3152 +argyll configure 1.3.7
3153 +generated by GNU Autoconf 2.69
3154 +
3155 +Copyright (C) 2012 Free Software Foundation, Inc.
3156 +This configure script is free software; the Free Software Foundation
3157 +gives unlimited permission to copy, distribute and modify it.
3158 +_ACEOF
3159 + exit
3160 +fi
3161 +
3162 +## ------------------------ ##
3163 +## Autoconf initialization. ##
3164 +## ------------------------ ##
3165 +
3166 +# ac_fn_c_try_compile LINENO
3167 +# --------------------------
3168 +# Try to compile conftest.$ac_ext, and return whether this succeeded.
3169 +ac_fn_c_try_compile ()
3170 +{
3171 + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3172 + rm -f conftest.$ac_objext
3173 + if { { ac_try="$ac_compile"
3174 +case "(($ac_try" in
3175 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3176 + *) ac_try_echo=$ac_try;;
3177 +esac
3178 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3179 +$as_echo "$ac_try_echo"; } >&5
3180 + (eval "$ac_compile") 2>conftest.err
3181 + ac_status=$?
3182 + if test -s conftest.err; then
3183 + grep -v '^ *+' conftest.err >conftest.er1
3184 + cat conftest.er1 >&5
3185 + mv -f conftest.er1 conftest.err
3186 + fi
3187 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3188 + test $ac_status = 0; } && {
3189 + test -z "$ac_c_werror_flag" ||
3190 + test ! -s conftest.err
3191 + } && test -s conftest.$ac_objext; then :
3192 + ac_retval=0
3193 +else
3194 + $as_echo "$as_me: failed program was:" >&5
3195 +sed 's/^/| /' conftest.$ac_ext >&5
3196 +
3197 + ac_retval=1
3198 +fi
3199 + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3200 + as_fn_set_status $ac_retval
3201 +
3202 +} # ac_fn_c_try_compile
3203 +
3204 +# ac_fn_c_try_link LINENO
3205 +# -----------------------
3206 +# Try to link conftest.$ac_ext, and return whether this succeeded.
3207 +ac_fn_c_try_link ()
3208 +{
3209 + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3210 + rm -f conftest.$ac_objext conftest$ac_exeext
3211 + if { { ac_try="$ac_link"
3212 +case "(($ac_try" in
3213 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3214 + *) ac_try_echo=$ac_try;;
3215 +esac
3216 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3217 +$as_echo "$ac_try_echo"; } >&5
3218 + (eval "$ac_link") 2>conftest.err
3219 + ac_status=$?
3220 + if test -s conftest.err; then
3221 + grep -v '^ *+' conftest.err >conftest.er1
3222 + cat conftest.er1 >&5
3223 + mv -f conftest.er1 conftest.err
3224 + fi
3225 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3226 + test $ac_status = 0; } && {
3227 + test -z "$ac_c_werror_flag" ||
3228 + test ! -s conftest.err
3229 + } && test -s conftest$ac_exeext && {
3230 + test "$cross_compiling" = yes ||
3231 + test -x conftest$ac_exeext
3232 + }; then :
3233 + ac_retval=0
3234 +else
3235 + $as_echo "$as_me: failed program was:" >&5
3236 +sed 's/^/| /' conftest.$ac_ext >&5
3237 +
3238 + ac_retval=1
3239 +fi
3240 + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
3241 + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
3242 + # interfere with the next link command; also delete a directory that is
3243 + # left behind by Apple's compiler. We do this before executing the actions.
3244 + rm -rf conftest.dSYM conftest_ipa8_conftest.oo
3245 + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3246 + as_fn_set_status $ac_retval
3247 +
3248 +} # ac_fn_c_try_link
3249 +
3250 +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3251 +# -------------------------------------------------------
3252 +# Tests whether HEADER exists and can be compiled using the include files in
3253 +# INCLUDES, setting the cache variable VAR accordingly.
3254 +ac_fn_c_check_header_compile ()
3255 +{
3256 + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3257 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3258 +$as_echo_n "checking for $2... " >&6; }
3259 +if eval \${$3+:} false; then :
3260 + $as_echo_n "(cached) " >&6
3261 +else
3262 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3263 +/* end confdefs.h. */
3264 +$4
3265 +#include <$2>
3266 +_ACEOF
3267 +if ac_fn_c_try_compile "$LINENO"; then :
3268 + eval "$3=yes"
3269 +else
3270 + eval "$3=no"
3271 +fi
3272 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3273 +fi
3274 +eval ac_res=\$$3
3275 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3276 +$as_echo "$ac_res" >&6; }
3277 + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3278 +
3279 +} # ac_fn_c_check_header_compile
3280 +
3281 +# ac_fn_c_try_cpp LINENO
3282 +# ----------------------
3283 +# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
3284 +ac_fn_c_try_cpp ()
3285 +{
3286 + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3287 + if { { ac_try="$ac_cpp conftest.$ac_ext"
3288 +case "(($ac_try" in
3289 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3290 + *) ac_try_echo=$ac_try;;
3291 +esac
3292 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3293 +$as_echo "$ac_try_echo"; } >&5
3294 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
3295 + ac_status=$?
3296 + if test -s conftest.err; then
3297 + grep -v '^ *+' conftest.err >conftest.er1
3298 + cat conftest.er1 >&5
3299 + mv -f conftest.er1 conftest.err
3300 + fi
3301 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3302 + test $ac_status = 0; } > conftest.i && {
3303 + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3304 + test ! -s conftest.err
3305 + }; then :
3306 + ac_retval=0
3307 +else
3308 + $as_echo "$as_me: failed program was:" >&5
3309 +sed 's/^/| /' conftest.$ac_ext >&5
3310 +
3311 + ac_retval=1
3312 +fi
3313 + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3314 + as_fn_set_status $ac_retval
3315 +
3316 +} # ac_fn_c_try_cpp
3317 +
3318 +# ac_fn_c_try_run LINENO
3319 +# ----------------------
3320 +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
3321 +# that executables *can* be run.
3322 +ac_fn_c_try_run ()
3323 +{
3324 + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3325 + if { { ac_try="$ac_link"
3326 +case "(($ac_try" in
3327 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3328 + *) ac_try_echo=$ac_try;;
3329 +esac
3330 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3331 +$as_echo "$ac_try_echo"; } >&5
3332 + (eval "$ac_link") 2>&5
3333 + ac_status=$?
3334 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3335 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
3336 + { { case "(($ac_try" in
3337 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3338 + *) ac_try_echo=$ac_try;;
3339 +esac
3340 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3341 +$as_echo "$ac_try_echo"; } >&5
3342 + (eval "$ac_try") 2>&5
3343 + ac_status=$?
3344 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3345 + test $ac_status = 0; }; }; then :
3346 + ac_retval=0
3347 +else
3348 + $as_echo "$as_me: program exited with status $ac_status" >&5
3349 + $as_echo "$as_me: failed program was:" >&5
3350 +sed 's/^/| /' conftest.$ac_ext >&5
3351 +
3352 + ac_retval=$ac_status
3353 +fi
3354 + rm -rf conftest.dSYM conftest_ipa8_conftest.oo
3355 + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3356 + as_fn_set_status $ac_retval
3357 +
3358 +} # ac_fn_c_try_run
3359 +
3360 +# ac_fn_c_check_func LINENO FUNC VAR
3361 +# ----------------------------------
3362 +# Tests whether FUNC exists, setting the cache variable VAR accordingly
3363 +ac_fn_c_check_func ()
3364 +{
3365 + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3366 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3367 +$as_echo_n "checking for $2... " >&6; }
3368 +if eval \${$3+:} false; then :
3369 + $as_echo_n "(cached) " >&6
3370 +else
3371 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3372 +/* end confdefs.h. */
3373 +/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3374 + For example, HP-UX 11i <limits.h> declares gettimeofday. */
3375 +#define $2 innocuous_$2
3376 +
3377 +/* System header to define __stub macros and hopefully few prototypes,
3378 + which can conflict with char $2 (); below.
3379 + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3380 + <limits.h> exists even on freestanding compilers. */
3381 +
3382 +#ifdef __STDC__
3383 +# include <limits.h>
3384 +#else
3385 +# include <assert.h>
3386 +#endif
3387 +
3388 +#undef $2
3389 +
3390 +/* Override any GCC internal prototype to avoid an error.
3391 + Use char because int might match the return type of a GCC
3392 + builtin and then its argument prototype would still apply. */
3393 +#ifdef __cplusplus
3394 +extern "C"
3395 +#endif
3396 +char $2 ();
3397 +/* The GNU C library defines this for functions which it implements
3398 + to always fail with ENOSYS. Some functions are actually named
3399 + something starting with __ and the normal name is an alias. */
3400 +#if defined __stub_$2 || defined __stub___$2
3401 +choke me
3402 +#endif
3403 +
3404 +int
3405 +main ()
3406 +{
3407 +return $2 ();
3408 + ;
3409 + return 0;
3410 +}
3411 +_ACEOF
3412 +if ac_fn_c_try_link "$LINENO"; then :
3413 + eval "$3=yes"
3414 +else
3415 + eval "$3=no"
3416 +fi
3417 +rm -f core conftest.err conftest.$ac_objext \
3418 + conftest$ac_exeext conftest.$ac_ext
3419 +fi
3420 +eval ac_res=\$$3
3421 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3422 +$as_echo "$ac_res" >&6; }
3423 + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3424 +
3425 +} # ac_fn_c_check_func
3426 +cat >config.log <<_ACEOF
3427 +This file contains any messages produced by compilers while
3428 +running configure, to aid debugging if configure makes a mistake.
3429 +
3430 +It was created by argyll $as_me 1.3.7, which was
3431 +generated by GNU Autoconf 2.69. Invocation command line was
3432 +
3433 + $ $0 $@
3434 +
3435 +_ACEOF
3436 +exec 5>>config.log
3437 +{
3438 +cat <<_ASUNAME
3439 +## --------- ##
3440 +## Platform. ##
3441 +## --------- ##
3442 +
3443 +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3444 +uname -m = `(uname -m) 2>/dev/null || echo unknown`
3445 +uname -r = `(uname -r) 2>/dev/null || echo unknown`
3446 +uname -s = `(uname -s) 2>/dev/null || echo unknown`
3447 +uname -v = `(uname -v) 2>/dev/null || echo unknown`
3448 +
3449 +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3450 +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3451 +
3452 +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3453 +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3454 +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3455 +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3456 +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3457 +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3458 +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3459 +
3460 +_ASUNAME
3461 +
3462 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3463 +for as_dir in $PATH
3464 +do
3465 + IFS=$as_save_IFS
3466 + test -z "$as_dir" && as_dir=.
3467 + $as_echo "PATH: $as_dir"
3468 + done
3469 +IFS=$as_save_IFS
3470 +
3471 +} >&5
3472 +
3473 +cat >&5 <<_ACEOF
3474 +
3475 +
3476 +## ----------- ##
3477 +## Core tests. ##
3478 +## ----------- ##
3479 +
3480 +_ACEOF
3481 +
3482 +
3483 +# Keep a trace of the command line.
3484 +# Strip out --no-create and --no-recursion so they do not pile up.
3485 +# Strip out --silent because we don't want to record it for future runs.
3486 +# Also quote any args containing shell meta-characters.
3487 +# Make two passes to allow for proper duplicate-argument suppression.
3488 +ac_configure_args=
3489 +ac_configure_args0=
3490 +ac_configure_args1=
3491 +ac_must_keep_next=false
3492 +for ac_pass in 1 2
3493 +do
3494 + for ac_arg
3495 + do
3496 + case $ac_arg in
3497 + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3498 + -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3499 + | -silent | --silent | --silen | --sile | --sil)
3500 + continue ;;
3501 + *\'*)
3502 + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3503 + esac
3504 + case $ac_pass in
3505 + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3506 + 2)
3507 + as_fn_append ac_configure_args1 " '$ac_arg'"
3508 + if test $ac_must_keep_next = true; then
3509 + ac_must_keep_next=false # Got value, back to normal.
3510 + else
3511 + case $ac_arg in
3512 + *=* | --config-cache | -C | -disable-* | --disable-* \
3513 + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3514 + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3515 + | -with-* | --with-* | -without-* | --without-* | --x)
3516 + case "$ac_configure_args0 " in
3517 + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3518 + esac
3519 + ;;
3520 + -* ) ac_must_keep_next=true ;;
3521 + esac
3522 + fi
3523 + as_fn_append ac_configure_args " '$ac_arg'"
3524 + ;;
3525 + esac
3526 + done
3527 +done
3528 +{ ac_configure_args0=; unset ac_configure_args0;}
3529 +{ ac_configure_args1=; unset ac_configure_args1;}
3530 +
3531 +# When interrupted or exit'd, cleanup temporary files, and complete
3532 +# config.log. We remove comments because anyway the quotes in there
3533 +# would cause problems or look ugly.
3534 +# WARNING: Use '\'' to represent an apostrophe within the trap.
3535 +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3536 +trap 'exit_status=$?
3537 + # Save into config.log some information that might help in debugging.
3538 + {
3539 + echo
3540 +
3541 + $as_echo "## ---------------- ##
3542 +## Cache variables. ##
3543 +## ---------------- ##"
3544 + echo
3545 + # The following way of writing the cache mishandles newlines in values,
3546 +(
3547 + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3548 + eval ac_val=\$$ac_var
3549 + case $ac_val in #(
3550 + *${as_nl}*)
3551 + case $ac_var in #(
3552 + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3553 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3554 + esac
3555 + case $ac_var in #(
3556 + _ | IFS | as_nl) ;; #(
3557 + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3558 + *) { eval $ac_var=; unset $ac_var;} ;;
3559 + esac ;;
3560 + esac
3561 + done
3562 + (set) 2>&1 |
3563 + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3564 + *${as_nl}ac_space=\ *)
3565 + sed -n \
3566 + "s/'\''/'\''\\\\'\'''\''/g;
3567 + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3568 + ;; #(
3569 + *)
3570 + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3571 + ;;
3572 + esac |
3573 + sort
3574 +)
3575 + echo
3576 +
3577 + $as_echo "## ----------------- ##
3578 +## Output variables. ##
3579 +## ----------------- ##"
3580 + echo
3581 + for ac_var in $ac_subst_vars
3582 + do
3583 + eval ac_val=\$$ac_var
3584 + case $ac_val in
3585 + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3586 + esac
3587 + $as_echo "$ac_var='\''$ac_val'\''"
3588 + done | sort
3589 + echo
3590 +
3591 + if test -n "$ac_subst_files"; then
3592 + $as_echo "## ------------------- ##
3593 +## File substitutions. ##
3594 +## ------------------- ##"
3595 + echo
3596 + for ac_var in $ac_subst_files
3597 + do
3598 + eval ac_val=\$$ac_var
3599 + case $ac_val in
3600 + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3601 + esac
3602 + $as_echo "$ac_var='\''$ac_val'\''"
3603 + done | sort
3604 + echo
3605 + fi
3606 +
3607 + if test -s confdefs.h; then
3608 + $as_echo "## ----------- ##
3609 +## confdefs.h. ##
3610 +## ----------- ##"
3611 + echo
3612 + cat confdefs.h
3613 + echo
3614 + fi
3615 + test "$ac_signal" != 0 &&
3616 + $as_echo "$as_me: caught signal $ac_signal"
3617 + $as_echo "$as_me: exit $exit_status"
3618 + } >&5
3619 + rm -f core *.core core.conftest.* &&
3620 + rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3621 + exit $exit_status
3622 +' 0
3623 +for ac_signal in 1 2 13 15; do
3624 + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3625 +done
3626 +ac_signal=0
3627 +
3628 +# confdefs.h avoids OS command line length limits that DEFS can exceed.
3629 +rm -f -r conftest* confdefs.h
3630 +
3631 +$as_echo "/* confdefs.h */" > confdefs.h
3632 +
3633 +# Predefined preprocessor variables.
3634 +
3635 +cat >>confdefs.h <<_ACEOF
3636 +#define PACKAGE_NAME "$PACKAGE_NAME"
3637 +_ACEOF
3638 +
3639 +cat >>confdefs.h <<_ACEOF
3640 +#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3641 +_ACEOF
3642 +
3643 +cat >>confdefs.h <<_ACEOF
3644 +#define PACKAGE_VERSION "$PACKAGE_VERSION"
3645 +_ACEOF
3646 +
3647 +cat >>confdefs.h <<_ACEOF
3648 +#define PACKAGE_STRING "$PACKAGE_STRING"
3649 +_ACEOF
3650 +
3651 +cat >>confdefs.h <<_ACEOF
3652 +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3653 +_ACEOF
3654 +
3655 +cat >>confdefs.h <<_ACEOF
3656 +#define PACKAGE_URL "$PACKAGE_URL"
3657 +_ACEOF
3658 +
3659 +
3660 +# Let the site file select an alternate cache file if it wants to.
3661 +# Prefer an explicitly selected file to automatically selected ones.
3662 +ac_site_file1=NONE
3663 +ac_site_file2=NONE
3664 +if test -n "$CONFIG_SITE"; then
3665 + # We do not want a PATH search for config.site.
3666 + case $CONFIG_SITE in #((
3667 + -*) ac_site_file1=./$CONFIG_SITE;;
3668 + */*) ac_site_file1=$CONFIG_SITE;;
3669 + *) ac_site_file1=./$CONFIG_SITE;;
3670 + esac
3671 +elif test "x$prefix" != xNONE; then
3672 + ac_site_file1=$prefix/share/config.site
3673 + ac_site_file2=$prefix/etc/config.site
3674 +else
3675 + ac_site_file1=$ac_default_prefix/share/config.site
3676 + ac_site_file2=$ac_default_prefix/etc/config.site
3677 +fi
3678 +for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3679 +do
3680 + test "x$ac_site_file" = xNONE && continue
3681 + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3682 + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3683 +$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3684 + sed 's/^/| /' "$ac_site_file" >&5
3685 + . "$ac_site_file" \
3686 + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3687 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3688 +as_fn_error $? "failed to load site script $ac_site_file
3689 +See \`config.log' for more details" "$LINENO" 5; }
3690 + fi
3691 +done
3692 +
3693 +if test -r "$cache_file"; then
3694 + # Some versions of bash will fail to source /dev/null (special files
3695 + # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3696 + if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3697 + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3698 +$as_echo "$as_me: loading cache $cache_file" >&6;}
3699 + case $cache_file in
3700 + [\\/]* | ?:[\\/]* ) . "$cache_file";;
3701 + *) . "./$cache_file";;
3702 + esac
3703 + fi
3704 +else
3705 + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3706 +$as_echo "$as_me: creating cache $cache_file" >&6;}
3707 + >$cache_file
3708 +fi
3709 +
3710 +# Check that the precious variables saved in the cache have kept the same
3711 +# value.
3712 +ac_cache_corrupted=false
3713 +for ac_var in $ac_precious_vars; do
3714 + eval ac_old_set=\$ac_cv_env_${ac_var}_set
3715 + eval ac_new_set=\$ac_env_${ac_var}_set
3716 + eval ac_old_val=\$ac_cv_env_${ac_var}_value
3717 + eval ac_new_val=\$ac_env_${ac_var}_value
3718 + case $ac_old_set,$ac_new_set in
3719 + set,)
3720 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3721 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3722 + ac_cache_corrupted=: ;;
3723 + ,set)
3724 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3725 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3726 + ac_cache_corrupted=: ;;
3727 + ,);;
3728 + *)
3729 + if test "x$ac_old_val" != "x$ac_new_val"; then
3730 + # differences in whitespace do not lead to failure.
3731 + ac_old_val_w=`echo x $ac_old_val`
3732 + ac_new_val_w=`echo x $ac_new_val`
3733 + if test "$ac_old_val_w" != "$ac_new_val_w"; then
3734 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3735 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3736 + ac_cache_corrupted=:
3737 + else
3738 + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3739 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3740 + eval $ac_var=\$ac_old_val
3741 + fi
3742 + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3743 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3744 + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3745 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3746 + fi;;
3747 + esac
3748 + # Pass precious variables to config.status.
3749 + if test "$ac_new_set" = set; then
3750 + case $ac_new_val in
3751 + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3752 + *) ac_arg=$ac_var=$ac_new_val ;;
3753 + esac
3754 + case " $ac_configure_args " in
3755 + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3756 + *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3757 + esac
3758 + fi
3759 +done
3760 +if $ac_cache_corrupted; then
3761 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3762 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3763 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3764 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3765 + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3766 +fi
3767 +## -------------------- ##
3768 +## Main body of script. ##
3769 +## -------------------- ##
3770 +
3771 +ac_ext=c
3772 +ac_cpp='$CPP $CPPFLAGS'
3773 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3774 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3775 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
3776 +
3777 +
3778 +am__api_version='1.13'
3779 +
3780 +ac_aux_dir=
3781 +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3782 + if test -f "$ac_dir/install-sh"; then
3783 + ac_aux_dir=$ac_dir
3784 + ac_install_sh="$ac_aux_dir/install-sh -c"
3785 + break
3786 + elif test -f "$ac_dir/install.sh"; then
3787 + ac_aux_dir=$ac_dir
3788 + ac_install_sh="$ac_aux_dir/install.sh -c"
3789 + break
3790 + elif test -f "$ac_dir/shtool"; then
3791 + ac_aux_dir=$ac_dir
3792 + ac_install_sh="$ac_aux_dir/shtool install -c"
3793 + break
3794 + fi
3795 +done
3796 +if test -z "$ac_aux_dir"; then
3797 + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
3798 +fi
3799 +
3800 +# These three variables are undocumented and unsupported,
3801 +# and are intended to be withdrawn in a future Autoconf release.
3802 +# They can cause serious problems if a builder's source tree is in a directory
3803 +# whose full name contains unusual characters.
3804 +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3805 +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3806 +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3807 +
3808 +
3809 +# Find a good install program. We prefer a C program (faster),
3810 +# so one script is as good as another. But avoid the broken or
3811 +# incompatible versions:
3812 +# SysV /etc/install, /usr/sbin/install
3813 +# SunOS /usr/etc/install
3814 +# IRIX /sbin/install
3815 +# AIX /bin/install
3816 +# AmigaOS /C/install, which installs bootblocks on floppy discs
3817 +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3818 +# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3819 +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3820 +# OS/2's system install, which has a completely different semantic
3821 +# ./install, which can be erroneously created by make from ./install.sh.
3822 +# Reject install programs that cannot install multiple files.
3823 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3824 +$as_echo_n "checking for a BSD-compatible install... " >&6; }
3825 +if test -z "$INSTALL"; then
3826 +if ${ac_cv_path_install+:} false; then :
3827 + $as_echo_n "(cached) " >&6
3828 +else
3829 + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3830 +for as_dir in $PATH
3831 +do
3832 + IFS=$as_save_IFS
3833 + test -z "$as_dir" && as_dir=.
3834 + # Account for people who put trailing slashes in PATH elements.
3835 +case $as_dir/ in #((
3836 + ./ | .// | /[cC]/* | \
3837 + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3838 + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3839 + /usr/ucb/* ) ;;
3840 + *)
3841 + # OSF1 and SCO ODT 3.0 have their own names for install.
3842 + # Don't use installbsd from OSF since it installs stuff as root
3843 + # by default.
3844 + for ac_prog in ginstall scoinst install; do
3845 + for ac_exec_ext in '' $ac_executable_extensions; do
3846 + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3847 + if test $ac_prog = install &&
3848 + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3849 + # AIX install. It has an incompatible calling convention.
3850 + :
3851 + elif test $ac_prog = install &&
3852 + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3853 + # program-specific install script used by HP pwplus--don't use.
3854 + :
3855 + else
3856 + rm -rf conftest.one conftest.two conftest.dir
3857 + echo one > conftest.one
3858 + echo two > conftest.two
3859 + mkdir conftest.dir
3860 + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3861 + test -s conftest.one && test -s conftest.two &&
3862 + test -s conftest.dir/conftest.one &&
3863 + test -s conftest.dir/conftest.two
3864 + then
3865 + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3866 + break 3
3867 + fi
3868 + fi
3869 + fi
3870 + done
3871 + done
3872 + ;;
3873 +esac
3874 +
3875 + done
3876 +IFS=$as_save_IFS
3877 +
3878 +rm -rf conftest.one conftest.two conftest.dir
3879 +
3880 +fi
3881 + if test "${ac_cv_path_install+set}" = set; then
3882 + INSTALL=$ac_cv_path_install
3883 + else
3884 + # As a last resort, use the slow shell script. Don't cache a
3885 + # value for INSTALL within a source directory, because that will
3886 + # break other packages using the cache if that directory is
3887 + # removed, or if the value is a relative name.
3888 + INSTALL=$ac_install_sh
3889 + fi
3890 +fi
3891 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3892 +$as_echo "$INSTALL" >&6; }
3893 +
3894 +# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3895 +# It thinks the first close brace ends the variable substitution.
3896 +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3897 +
3898 +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3899 +
3900 +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3901 +
3902 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3903 +$as_echo_n "checking whether build environment is sane... " >&6; }
3904 +# Reject unsafe characters in $srcdir or the absolute working directory
3905 +# name. Accept space and tab only in the latter.
3906 +am_lf='
3907 +'
3908 +case `pwd` in
3909 + *[\\\"\#\$\&\'\`$am_lf]*)
3910 + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
3911 +esac
3912 +case $srcdir in
3913 + *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
3914 + as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
3915 +esac
3916 +
3917 +# Do 'set' in a subshell so we don't clobber the current shell's
3918 +# arguments. Must try -L first in case configure is actually a
3919 +# symlink; some systems play weird games with the mod time of symlinks
3920 +# (eg FreeBSD returns the mod time of the symlink's containing
3921 +# directory).
3922 +if (
3923 + am_has_slept=no
3924 + for am_try in 1 2; do
3925 + echo "timestamp, slept: $am_has_slept" > conftest.file
3926 + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3927 + if test "$*" = "X"; then
3928 + # -L didn't work.
3929 + set X `ls -t "$srcdir/configure" conftest.file`
3930 + fi
3931 + if test "$*" != "X $srcdir/configure conftest.file" \
3932 + && test "$*" != "X conftest.file $srcdir/configure"; then
3933 +
3934 + # If neither matched, then we have a broken ls. This can happen
3935 + # if, for instance, CONFIG_SHELL is bash and it inherits a
3936 + # broken ls alias from the environment. This has actually
3937 + # happened. Such a system could not be considered "sane".
3938 + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
3939 + alias in your environment" "$LINENO" 5
3940 + fi
3941 + if test "$2" = conftest.file || test $am_try -eq 2; then
3942 + break
3943 + fi
3944 + # Just in case.
3945 + sleep 1
3946 + am_has_slept=yes
3947 + done
3948 + test "$2" = conftest.file
3949 + )
3950 +then
3951 + # Ok.
3952 + :
3953 +else
3954 + as_fn_error $? "newly created file is older than distributed files!
3955 +Check your system clock" "$LINENO" 5
3956 +fi
3957 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3958 +$as_echo "yes" >&6; }
3959 +# If we didn't sleep, we still need to ensure time stamps of config.status and
3960 +# generated files are strictly newer.
3961 +am_sleep_pid=
3962 +if grep 'slept: no' conftest.file >/dev/null 2>&1; then
3963 + ( sleep 1 ) &
3964 + am_sleep_pid=$!
3965 +fi
3966 +
3967 +rm -f conftest.file
3968 +
3969 +test "$program_prefix" != NONE &&
3970 + program_transform_name="s&^&$program_prefix&;$program_transform_name"
3971 +# Use a double $ so make ignores it.
3972 +test "$program_suffix" != NONE &&
3973 + program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3974 +# Double any \ or $.
3975 +# By default was `s,x,x', remove it if useless.
3976 +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3977 +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
3978 +
3979 +# expand $ac_aux_dir to an absolute path
3980 +am_aux_dir=`cd $ac_aux_dir && pwd`
3981 +
3982 +if test x"${MISSING+set}" != xset; then
3983 + case $am_aux_dir in
3984 + *\ * | *\ *)
3985 + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3986 + *)
3987 + MISSING="\${SHELL} $am_aux_dir/missing" ;;
3988 + esac
3989 +fi
3990 +# Use eval to expand $SHELL
3991 +if eval "$MISSING --is-lightweight"; then
3992 + am_missing_run="$MISSING "
3993 +else
3994 + am_missing_run=
3995 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
3996 +$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
3997 +fi
3998 +
3999 +if test x"${install_sh}" != xset; then
4000 + case $am_aux_dir in
4001 + *\ * | *\ *)
4002 + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4003 + *)
4004 + install_sh="\${SHELL} $am_aux_dir/install-sh"
4005 + esac
4006 +fi
4007 +
4008 +# Installed binaries are usually stripped using 'strip' when the user
4009 +# run "make install-strip". However 'strip' might not be the right
4010 +# tool to use in cross-compilation environments, therefore Automake
4011 +# will honor the 'STRIP' environment variable to overrule this program.
4012 +if test "$cross_compiling" != no; then
4013 + if test -n "$ac_tool_prefix"; then
4014 + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4015 +set dummy ${ac_tool_prefix}strip; ac_word=$2
4016 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4017 +$as_echo_n "checking for $ac_word... " >&6; }
4018 +if ${ac_cv_prog_STRIP+:} false; then :
4019 + $as_echo_n "(cached) " >&6
4020 +else
4021 + if test -n "$STRIP"; then
4022 + ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4023 +else
4024 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4025 +for as_dir in $PATH
4026 +do
4027 + IFS=$as_save_IFS
4028 + test -z "$as_dir" && as_dir=.
4029 + for ac_exec_ext in '' $ac_executable_extensions; do
4030 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4031 + ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4032 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4033 + break 2
4034 + fi
4035 +done
4036 + done
4037 +IFS=$as_save_IFS
4038 +
4039 +fi
4040 +fi
4041 +STRIP=$ac_cv_prog_STRIP
4042 +if test -n "$STRIP"; then
4043 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4044 +$as_echo "$STRIP" >&6; }
4045 +else
4046 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4047 +$as_echo "no" >&6; }
4048 +fi
4049 +
4050 +
4051 +fi
4052 +if test -z "$ac_cv_prog_STRIP"; then
4053 + ac_ct_STRIP=$STRIP
4054 + # Extract the first word of "strip", so it can be a program name with args.
4055 +set dummy strip; ac_word=$2
4056 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4057 +$as_echo_n "checking for $ac_word... " >&6; }
4058 +if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
4059 + $as_echo_n "(cached) " >&6
4060 +else
4061 + if test -n "$ac_ct_STRIP"; then
4062 + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4063 +else
4064 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4065 +for as_dir in $PATH
4066 +do
4067 + IFS=$as_save_IFS
4068 + test -z "$as_dir" && as_dir=.
4069 + for ac_exec_ext in '' $ac_executable_extensions; do
4070 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4071 + ac_cv_prog_ac_ct_STRIP="strip"
4072 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4073 + break 2
4074 + fi
4075 +done
4076 + done
4077 +IFS=$as_save_IFS
4078 +
4079 +fi
4080 +fi
4081 +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4082 +if test -n "$ac_ct_STRIP"; then
4083 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4084 +$as_echo "$ac_ct_STRIP" >&6; }
4085 +else
4086 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4087 +$as_echo "no" >&6; }
4088 +fi
4089 +
4090 + if test "x$ac_ct_STRIP" = x; then
4091 + STRIP=":"
4092 + else
4093 + case $cross_compiling:$ac_tool_warned in
4094 +yes:)
4095 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4096 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4097 +ac_tool_warned=yes ;;
4098 +esac
4099 + STRIP=$ac_ct_STRIP
4100 + fi
4101 +else
4102 + STRIP="$ac_cv_prog_STRIP"
4103 +fi
4104 +
4105 +fi
4106 +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4107 +
4108 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
4109 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
4110 +if test -z "$MKDIR_P"; then
4111 + if ${ac_cv_path_mkdir+:} false; then :
4112 + $as_echo_n "(cached) " >&6
4113 +else
4114 + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4115 +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
4116 +do
4117 + IFS=$as_save_IFS
4118 + test -z "$as_dir" && as_dir=.
4119 + for ac_prog in mkdir gmkdir; do
4120 + for ac_exec_ext in '' $ac_executable_extensions; do
4121 + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
4122 + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
4123 + 'mkdir (GNU coreutils) '* | \
4124 + 'mkdir (coreutils) '* | \
4125 + 'mkdir (fileutils) '4.1*)
4126 + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
4127 + break 3;;
4128 + esac
4129 + done
4130 + done
4131 + done
4132 +IFS=$as_save_IFS
4133 +
4134 +fi
4135 +
4136 + test -d ./--version && rmdir ./--version
4137 + if test "${ac_cv_path_mkdir+set}" = set; then
4138 + MKDIR_P="$ac_cv_path_mkdir -p"
4139 + else
4140 + # As a last resort, use the slow shell script. Don't cache a
4141 + # value for MKDIR_P within a source directory, because that will
4142 + # break other packages using the cache if that directory is
4143 + # removed, or if the value is a relative name.
4144 + MKDIR_P="$ac_install_sh -d"
4145 + fi
4146 +fi
4147 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
4148 +$as_echo "$MKDIR_P" >&6; }
4149 +
4150 +for ac_prog in gawk mawk nawk awk
4151 +do
4152 + # Extract the first word of "$ac_prog", so it can be a program name with args.
4153 +set dummy $ac_prog; ac_word=$2
4154 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4155 +$as_echo_n "checking for $ac_word... " >&6; }
4156 +if ${ac_cv_prog_AWK+:} false; then :
4157 + $as_echo_n "(cached) " >&6
4158 +else
4159 + if test -n "$AWK"; then
4160 + ac_cv_prog_AWK="$AWK" # Let the user override the test.
4161 +else
4162 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4163 +for as_dir in $PATH
4164 +do
4165 + IFS=$as_save_IFS
4166 + test -z "$as_dir" && as_dir=.
4167 + for ac_exec_ext in '' $ac_executable_extensions; do
4168 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4169 + ac_cv_prog_AWK="$ac_prog"
4170 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4171 + break 2
4172 + fi
4173 +done
4174 + done
4175 +IFS=$as_save_IFS
4176 +
4177 +fi
4178 +fi
4179 +AWK=$ac_cv_prog_AWK
4180 +if test -n "$AWK"; then
4181 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4182 +$as_echo "$AWK" >&6; }
4183 +else
4184 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4185 +$as_echo "no" >&6; }
4186 +fi
4187 +
4188 +
4189 + test -n "$AWK" && break
4190 +done
4191 +
4192 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4193 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4194 +set x ${MAKE-make}
4195 +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4196 +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
4197 + $as_echo_n "(cached) " >&6
4198 +else
4199 + cat >conftest.make <<\_ACEOF
4200 +SHELL = /bin/sh
4201 +all:
4202 + @echo '@@@%%%=$(MAKE)=@@@%%%'
4203 +_ACEOF
4204 +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
4205 +case `${MAKE-make} -f conftest.make 2>/dev/null` in
4206 + *@@@%%%=?*=@@@%%%*)
4207 + eval ac_cv_prog_make_${ac_make}_set=yes;;
4208 + *)
4209 + eval ac_cv_prog_make_${ac_make}_set=no;;
4210 +esac
4211 +rm -f conftest.make
4212 +fi
4213 +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4214 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4215 +$as_echo "yes" >&6; }
4216 + SET_MAKE=
4217 +else
4218 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4219 +$as_echo "no" >&6; }
4220 + SET_MAKE="MAKE=${MAKE-make}"
4221 +fi
4222 +
4223 +rm -rf .tst 2>/dev/null
4224 +mkdir .tst 2>/dev/null
4225 +if test -d .tst; then
4226 + am__leading_dot=.
4227 +else
4228 + am__leading_dot=_
4229 +fi
4230 +rmdir .tst 2>/dev/null
4231 +
4232 +# Check whether --enable-silent-rules was given.
4233 +if test "${enable_silent_rules+set}" = set; then :
4234 + enableval=$enable_silent_rules;
4235 +fi
4236 +
4237 +case $enable_silent_rules in # (((
4238 + yes) AM_DEFAULT_VERBOSITY=0;;
4239 + no) AM_DEFAULT_VERBOSITY=1;;
4240 + *) AM_DEFAULT_VERBOSITY=1;;
4241 +esac
4242 +am_make=${MAKE-make}
4243 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4244 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
4245 +if ${am_cv_make_support_nested_variables+:} false; then :
4246 + $as_echo_n "(cached) " >&6
4247 +else
4248 + if $as_echo 'TRUE=$(BAR$(V))
4249 +BAR0=false
4250 +BAR1=true
4251 +V=1
4252 +am__doit:
4253 + @$(TRUE)
4254 +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4255 + am_cv_make_support_nested_variables=yes
4256 +else
4257 + am_cv_make_support_nested_variables=no
4258 +fi
4259 +fi
4260 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4261 +$as_echo "$am_cv_make_support_nested_variables" >&6; }
4262 +if test $am_cv_make_support_nested_variables = yes; then
4263 + AM_V='$(V)'
4264 + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4265 +else
4266 + AM_V=$AM_DEFAULT_VERBOSITY
4267 + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4268 +fi
4269 +AM_BACKSLASH='\'
4270 +
4271 +if test "`cd $srcdir && pwd`" != "`pwd`"; then
4272 + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
4273 + # is not polluted with repeated "-I."
4274 + am__isrc=' -I$(srcdir)'
4275 + # test to see if srcdir already configured
4276 + if test -f $srcdir/config.status; then
4277 + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
4278 + fi
4279 +fi
4280 +
4281 +# test whether we have cygpath
4282 +if test -z "$CYGPATH_W"; then
4283 + if (cygpath --version) >/dev/null 2>/dev/null; then
4284 + CYGPATH_W='cygpath -w'
4285 + else
4286 + CYGPATH_W=echo
4287 + fi
4288 +fi
4289 +
4290 +
4291 +# Define the identity of the package.
4292 + PACKAGE='argyll'
4293 + VERSION='1.3.7'
4294 +
4295 +
4296 +cat >>confdefs.h <<_ACEOF
4297 +#define PACKAGE "$PACKAGE"
4298 +_ACEOF
4299 +
4300 +
4301 +cat >>confdefs.h <<_ACEOF
4302 +#define VERSION "$VERSION"
4303 +_ACEOF
4304 +
4305 +# Some tools Automake needs.
4306 +
4307 +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
4308 +
4309 +
4310 +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
4311 +
4312 +
4313 +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
4314 +
4315 +
4316 +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
4317 +
4318 +
4319 +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
4320 +
4321 +# For better backward compatibility. To be removed once Automake 1.9.x
4322 +# dies out for good. For more background, see:
4323 +# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
4324 +# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
4325 +mkdir_p='$(MKDIR_P)'
4326 +
4327 +# We need awk for the "check" target. The system "awk" is bad on
4328 +# some platforms.
4329 +# Always define AMTAR for backward compatibility. Yes, it's still used
4330 +# in the wild :-( We should find a proper way to deprecate it ...
4331 +AMTAR='$${TAR-tar}'
4332 +
4333 +
4334 +# We'll loop over all known methods to create a tar archive until one works.
4335 +_am_tools='gnutar pax cpio none'
4336 +
4337 +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
4338 +
4339 +
4340 +
4341 +
4342 +
4343 +
4344 +
4345 +ac_ext=c
4346 +ac_cpp='$CPP $CPPFLAGS'
4347 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4348 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4349 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
4350 +if test -n "$ac_tool_prefix"; then
4351 + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4352 +set dummy ${ac_tool_prefix}gcc; ac_word=$2
4353 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4354 +$as_echo_n "checking for $ac_word... " >&6; }
4355 +if ${ac_cv_prog_CC+:} false; then :
4356 + $as_echo_n "(cached) " >&6
4357 +else
4358 + if test -n "$CC"; then
4359 + ac_cv_prog_CC="$CC" # Let the user override the test.
4360 +else
4361 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4362 +for as_dir in $PATH
4363 +do
4364 + IFS=$as_save_IFS
4365 + test -z "$as_dir" && as_dir=.
4366 + for ac_exec_ext in '' $ac_executable_extensions; do
4367 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4368 + ac_cv_prog_CC="${ac_tool_prefix}gcc"
4369 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4370 + break 2
4371 + fi
4372 +done
4373 + done
4374 +IFS=$as_save_IFS
4375 +
4376 +fi
4377 +fi
4378 +CC=$ac_cv_prog_CC
4379 +if test -n "$CC"; then
4380 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4381 +$as_echo "$CC" >&6; }
4382 +else
4383 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4384 +$as_echo "no" >&6; }
4385 +fi
4386 +
4387 +
4388 +fi
4389 +if test -z "$ac_cv_prog_CC"; then
4390 + ac_ct_CC=$CC
4391 + # Extract the first word of "gcc", so it can be a program name with args.
4392 +set dummy gcc; ac_word=$2
4393 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4394 +$as_echo_n "checking for $ac_word... " >&6; }
4395 +if ${ac_cv_prog_ac_ct_CC+:} false; then :
4396 + $as_echo_n "(cached) " >&6
4397 +else
4398 + if test -n "$ac_ct_CC"; then
4399 + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4400 +else
4401 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4402 +for as_dir in $PATH
4403 +do
4404 + IFS=$as_save_IFS
4405 + test -z "$as_dir" && as_dir=.
4406 + for ac_exec_ext in '' $ac_executable_extensions; do
4407 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4408 + ac_cv_prog_ac_ct_CC="gcc"
4409 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4410 + break 2
4411 + fi
4412 +done
4413 + done
4414 +IFS=$as_save_IFS
4415 +
4416 +fi
4417 +fi
4418 +ac_ct_CC=$ac_cv_prog_ac_ct_CC
4419 +if test -n "$ac_ct_CC"; then
4420 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4421 +$as_echo "$ac_ct_CC" >&6; }
4422 +else
4423 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4424 +$as_echo "no" >&6; }
4425 +fi
4426 +
4427 + if test "x$ac_ct_CC" = x; then
4428 + CC=""
4429 + else
4430 + case $cross_compiling:$ac_tool_warned in
4431 +yes:)
4432 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4433 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4434 +ac_tool_warned=yes ;;
4435 +esac
4436 + CC=$ac_ct_CC
4437 + fi
4438 +else
4439 + CC="$ac_cv_prog_CC"
4440 +fi
4441 +
4442 +if test -z "$CC"; then
4443 + if test -n "$ac_tool_prefix"; then
4444 + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4445 +set dummy ${ac_tool_prefix}cc; ac_word=$2
4446 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4447 +$as_echo_n "checking for $ac_word... " >&6; }
4448 +if ${ac_cv_prog_CC+:} false; then :
4449 + $as_echo_n "(cached) " >&6
4450 +else
4451 + if test -n "$CC"; then
4452 + ac_cv_prog_CC="$CC" # Let the user override the test.
4453 +else
4454 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4455 +for as_dir in $PATH
4456 +do
4457 + IFS=$as_save_IFS
4458 + test -z "$as_dir" && as_dir=.
4459 + for ac_exec_ext in '' $ac_executable_extensions; do
4460 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4461 + ac_cv_prog_CC="${ac_tool_prefix}cc"
4462 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4463 + break 2
4464 + fi
4465 +done
4466 + done
4467 +IFS=$as_save_IFS
4468 +
4469 +fi
4470 +fi
4471 +CC=$ac_cv_prog_CC
4472 +if test -n "$CC"; then
4473 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4474 +$as_echo "$CC" >&6; }
4475 +else
4476 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4477 +$as_echo "no" >&6; }
4478 +fi
4479 +
4480 +
4481 + fi
4482 +fi
4483 +if test -z "$CC"; then
4484 + # Extract the first word of "cc", so it can be a program name with args.
4485 +set dummy cc; ac_word=$2
4486 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4487 +$as_echo_n "checking for $ac_word... " >&6; }
4488 +if ${ac_cv_prog_CC+:} false; then :
4489 + $as_echo_n "(cached) " >&6
4490 +else
4491 + if test -n "$CC"; then
4492 + ac_cv_prog_CC="$CC" # Let the user override the test.
4493 +else
4494 + ac_prog_rejected=no
4495 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4496 +for as_dir in $PATH
4497 +do
4498 + IFS=$as_save_IFS
4499 + test -z "$as_dir" && as_dir=.
4500 + for ac_exec_ext in '' $ac_executable_extensions; do
4501 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4502 + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4503 + ac_prog_rejected=yes
4504 + continue
4505 + fi
4506 + ac_cv_prog_CC="cc"
4507 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4508 + break 2
4509 + fi
4510 +done
4511 + done
4512 +IFS=$as_save_IFS
4513 +
4514 +if test $ac_prog_rejected = yes; then
4515 + # We found a bogon in the path, so make sure we never use it.
4516 + set dummy $ac_cv_prog_CC
4517 + shift
4518 + if test $# != 0; then
4519 + # We chose a different compiler from the bogus one.
4520 + # However, it has the same basename, so the bogon will be chosen
4521 + # first if we set CC to just the basename; use the full file name.
4522 + shift
4523 + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4524 + fi
4525 +fi
4526 +fi
4527 +fi
4528 +CC=$ac_cv_prog_CC
4529 +if test -n "$CC"; then
4530 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4531 +$as_echo "$CC" >&6; }
4532 +else
4533 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4534 +$as_echo "no" >&6; }
4535 +fi
4536 +
4537 +
4538 +fi
4539 +if test -z "$CC"; then
4540 + if test -n "$ac_tool_prefix"; then
4541 + for ac_prog in cl.exe
4542 + do
4543 + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4544 +set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4545 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4546 +$as_echo_n "checking for $ac_word... " >&6; }
4547 +if ${ac_cv_prog_CC+:} false; then :
4548 + $as_echo_n "(cached) " >&6
4549 +else
4550 + if test -n "$CC"; then
4551 + ac_cv_prog_CC="$CC" # Let the user override the test.
4552 +else
4553 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4554 +for as_dir in $PATH
4555 +do
4556 + IFS=$as_save_IFS
4557 + test -z "$as_dir" && as_dir=.
4558 + for ac_exec_ext in '' $ac_executable_extensions; do
4559 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4560 + ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4561 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4562 + break 2
4563 + fi
4564 +done
4565 + done
4566 +IFS=$as_save_IFS
4567 +
4568 +fi
4569 +fi
4570 +CC=$ac_cv_prog_CC
4571 +if test -n "$CC"; then
4572 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4573 +$as_echo "$CC" >&6; }
4574 +else
4575 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4576 +$as_echo "no" >&6; }
4577 +fi
4578 +
4579 +
4580 + test -n "$CC" && break
4581 + done
4582 +fi
4583 +if test -z "$CC"; then
4584 + ac_ct_CC=$CC
4585 + for ac_prog in cl.exe
4586 +do
4587 + # Extract the first word of "$ac_prog", so it can be a program name with args.
4588 +set dummy $ac_prog; ac_word=$2
4589 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4590 +$as_echo_n "checking for $ac_word... " >&6; }
4591 +if ${ac_cv_prog_ac_ct_CC+:} false; then :
4592 + $as_echo_n "(cached) " >&6
4593 +else
4594 + if test -n "$ac_ct_CC"; then
4595 + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4596 +else
4597 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4598 +for as_dir in $PATH
4599 +do
4600 + IFS=$as_save_IFS
4601 + test -z "$as_dir" && as_dir=.
4602 + for ac_exec_ext in '' $ac_executable_extensions; do
4603 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4604 + ac_cv_prog_ac_ct_CC="$ac_prog"
4605 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4606 + break 2
4607 + fi
4608 +done
4609 + done
4610 +IFS=$as_save_IFS
4611 +
4612 +fi
4613 +fi
4614 +ac_ct_CC=$ac_cv_prog_ac_ct_CC
4615 +if test -n "$ac_ct_CC"; then
4616 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4617 +$as_echo "$ac_ct_CC" >&6; }
4618 +else
4619 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4620 +$as_echo "no" >&6; }
4621 +fi
4622 +
4623 +
4624 + test -n "$ac_ct_CC" && break
4625 +done
4626 +
4627 + if test "x$ac_ct_CC" = x; then
4628 + CC=""
4629 + else
4630 + case $cross_compiling:$ac_tool_warned in
4631 +yes:)
4632 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4633 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4634 +ac_tool_warned=yes ;;
4635 +esac
4636 + CC=$ac_ct_CC
4637 + fi
4638 +fi
4639 +
4640 +fi
4641 +
4642 +
4643 +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4644 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4645 +as_fn_error $? "no acceptable C compiler found in \$PATH
4646 +See \`config.log' for more details" "$LINENO" 5; }
4647 +
4648 +# Provide some information about the compiler.
4649 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4650 +set X $ac_compile
4651 +ac_compiler=$2
4652 +for ac_option in --version -v -V -qversion; do
4653 + { { ac_try="$ac_compiler $ac_option >&5"
4654 +case "(($ac_try" in
4655 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4656 + *) ac_try_echo=$ac_try;;
4657 +esac
4658 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4659 +$as_echo "$ac_try_echo"; } >&5
4660 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4661 + ac_status=$?
4662 + if test -s conftest.err; then
4663 + sed '10a\
4664 +... rest of stderr output deleted ...
4665 + 10q' conftest.err >conftest.er1
4666 + cat conftest.er1 >&5
4667 + fi
4668 + rm -f conftest.er1 conftest.err
4669 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4670 + test $ac_status = 0; }
4671 +done
4672 +
4673 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4674 +/* end confdefs.h. */
4675 +
4676 +int
4677 +main ()
4678 +{
4679 +
4680 + ;
4681 + return 0;
4682 +}
4683 +_ACEOF
4684 +ac_clean_files_save=$ac_clean_files
4685 +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4686 +# Try to create an executable without -o first, disregard a.out.
4687 +# It will help us diagnose broken compilers, and finding out an intuition
4688 +# of exeext.
4689 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4690 +$as_echo_n "checking whether the C compiler works... " >&6; }
4691 +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4692 +
4693 +# The possible output files:
4694 +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4695 +
4696 +ac_rmfiles=
4697 +for ac_file in $ac_files
4698 +do
4699 + case $ac_file in
4700 + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4701 + * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4702 + esac
4703 +done
4704 +rm -f $ac_rmfiles
4705 +
4706 +if { { ac_try="$ac_link_default"
4707 +case "(($ac_try" in
4708 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4709 + *) ac_try_echo=$ac_try;;
4710 +esac
4711 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4712 +$as_echo "$ac_try_echo"; } >&5
4713 + (eval "$ac_link_default") 2>&5
4714 + ac_status=$?
4715 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4716 + test $ac_status = 0; }; then :
4717 + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4718 +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4719 +# in a Makefile. We should not override ac_cv_exeext if it was cached,
4720 +# so that the user can short-circuit this test for compilers unknown to
4721 +# Autoconf.
4722 +for ac_file in $ac_files ''
4723 +do
4724 + test -f "$ac_file" || continue
4725 + case $ac_file in
4726 + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4727 + ;;
4728 + [ab].out )
4729 + # We found the default executable, but exeext='' is most
4730 + # certainly right.
4731 + break;;
4732 + *.* )
4733 + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4734 + then :; else
4735 + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4736 + fi
4737 + # We set ac_cv_exeext here because the later test for it is not
4738 + # safe: cross compilers may not add the suffix if given an `-o'
4739 + # argument, so we may need to know it at that point already.
4740 + # Even if this section looks crufty: it has the advantage of
4741 + # actually working.
4742 + break;;
4743 + * )
4744 + break;;
4745 + esac
4746 +done
4747 +test "$ac_cv_exeext" = no && ac_cv_exeext=
4748 +
4749 +else
4750 + ac_file=''
4751 +fi
4752 +if test -z "$ac_file"; then :
4753 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4754 +$as_echo "no" >&6; }
4755 +$as_echo "$as_me: failed program was:" >&5
4756 +sed 's/^/| /' conftest.$ac_ext >&5
4757 +
4758 +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4759 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4760 +as_fn_error 77 "C compiler cannot create executables
4761 +See \`config.log' for more details" "$LINENO" 5; }
4762 +else
4763 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4764 +$as_echo "yes" >&6; }
4765 +fi
4766 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4767 +$as_echo_n "checking for C compiler default output file name... " >&6; }
4768 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4769 +$as_echo "$ac_file" >&6; }
4770 +ac_exeext=$ac_cv_exeext
4771 +
4772 +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4773 +ac_clean_files=$ac_clean_files_save
4774 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4775 +$as_echo_n "checking for suffix of executables... " >&6; }
4776 +if { { ac_try="$ac_link"
4777 +case "(($ac_try" in
4778 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4779 + *) ac_try_echo=$ac_try;;
4780 +esac
4781 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4782 +$as_echo "$ac_try_echo"; } >&5
4783 + (eval "$ac_link") 2>&5
4784 + ac_status=$?
4785 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4786 + test $ac_status = 0; }; then :
4787 + # If both `conftest.exe' and `conftest' are `present' (well, observable)
4788 +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4789 +# work properly (i.e., refer to `conftest.exe'), while it won't with
4790 +# `rm'.
4791 +for ac_file in conftest.exe conftest conftest.*; do
4792 + test -f "$ac_file" || continue
4793 + case $ac_file in
4794 + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4795 + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4796 + break;;
4797 + * ) break;;
4798 + esac
4799 +done
4800 +else
4801 + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4802 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4803 +as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4804 +See \`config.log' for more details" "$LINENO" 5; }
4805 +fi
4806 +rm -f conftest conftest$ac_cv_exeext
4807 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4808 +$as_echo "$ac_cv_exeext" >&6; }
4809 +
4810 +rm -f conftest.$ac_ext
4811 +EXEEXT=$ac_cv_exeext
4812 +ac_exeext=$EXEEXT
4813 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4814 +/* end confdefs.h. */
4815 +#include <stdio.h>
4816 +int
4817 +main ()
4818 +{
4819 +FILE *f = fopen ("conftest.out", "w");
4820 + return ferror (f) || fclose (f) != 0;
4821 +
4822 + ;
4823 + return 0;
4824 +}
4825 +_ACEOF
4826 +ac_clean_files="$ac_clean_files conftest.out"
4827 +# Check that the compiler produces executables we can run. If not, either
4828 +# the compiler is broken, or we cross compile.
4829 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4830 +$as_echo_n "checking whether we are cross compiling... " >&6; }
4831 +if test "$cross_compiling" != yes; then
4832 + { { ac_try="$ac_link"
4833 +case "(($ac_try" in
4834 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4835 + *) ac_try_echo=$ac_try;;
4836 +esac
4837 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4838 +$as_echo "$ac_try_echo"; } >&5
4839 + (eval "$ac_link") 2>&5
4840 + ac_status=$?
4841 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4842 + test $ac_status = 0; }
4843 + if { ac_try='./conftest$ac_cv_exeext'
4844 + { { case "(($ac_try" in
4845 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4846 + *) ac_try_echo=$ac_try;;
4847 +esac
4848 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4849 +$as_echo "$ac_try_echo"; } >&5
4850 + (eval "$ac_try") 2>&5
4851 + ac_status=$?
4852 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4853 + test $ac_status = 0; }; }; then
4854 + cross_compiling=no
4855 + else
4856 + if test "$cross_compiling" = maybe; then
4857 + cross_compiling=yes
4858 + else
4859 + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4860 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4861 +as_fn_error $? "cannot run C compiled programs.
4862 +If you meant to cross compile, use \`--host'.
4863 +See \`config.log' for more details" "$LINENO" 5; }
4864 + fi
4865 + fi
4866 +fi
4867 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4868 +$as_echo "$cross_compiling" >&6; }
4869 +
4870 +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4871 +ac_clean_files=$ac_clean_files_save
4872 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4873 +$as_echo_n "checking for suffix of object files... " >&6; }
4874 +if ${ac_cv_objext+:} false; then :
4875 + $as_echo_n "(cached) " >&6
4876 +else
4877 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4878 +/* end confdefs.h. */
4879 +
4880 +int
4881 +main ()
4882 +{
4883 +
4884 + ;
4885 + return 0;
4886 +}
4887 +_ACEOF
4888 +rm -f conftest.o conftest.obj
4889 +if { { ac_try="$ac_compile"
4890 +case "(($ac_try" in
4891 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4892 + *) ac_try_echo=$ac_try;;
4893 +esac
4894 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4895 +$as_echo "$ac_try_echo"; } >&5
4896 + (eval "$ac_compile") 2>&5
4897 + ac_status=$?
4898 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4899 + test $ac_status = 0; }; then :
4900 + for ac_file in conftest.o conftest.obj conftest.*; do
4901 + test -f "$ac_file" || continue;
4902 + case $ac_file in
4903 + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4904 + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4905 + break;;
4906 + esac
4907 +done
4908 +else
4909 + $as_echo "$as_me: failed program was:" >&5
4910 +sed 's/^/| /' conftest.$ac_ext >&5
4911 +
4912 +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4913 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4914 +as_fn_error $? "cannot compute suffix of object files: cannot compile
4915 +See \`config.log' for more details" "$LINENO" 5; }
4916 +fi
4917 +rm -f conftest.$ac_cv_objext conftest.$ac_ext
4918 +fi
4919 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4920 +$as_echo "$ac_cv_objext" >&6; }
4921 +OBJEXT=$ac_cv_objext
4922 +ac_objext=$OBJEXT
4923 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4924 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4925 +if ${ac_cv_c_compiler_gnu+:} false; then :
4926 + $as_echo_n "(cached) " >&6
4927 +else
4928 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4929 +/* end confdefs.h. */
4930 +
4931 +int
4932 +main ()
4933 +{
4934 +#ifndef __GNUC__
4935 + choke me
4936 +#endif
4937 +
4938 + ;
4939 + return 0;
4940 +}
4941 +_ACEOF
4942 +if ac_fn_c_try_compile "$LINENO"; then :
4943 + ac_compiler_gnu=yes
4944 +else
4945 + ac_compiler_gnu=no
4946 +fi
4947 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4948 +ac_cv_c_compiler_gnu=$ac_compiler_gnu
4949 +
4950 +fi
4951 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4952 +$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4953 +if test $ac_compiler_gnu = yes; then
4954 + GCC=yes
4955 +else
4956 + GCC=
4957 +fi
4958 +ac_test_CFLAGS=${CFLAGS+set}
4959 +ac_save_CFLAGS=$CFLAGS
4960 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4961 +$as_echo_n "checking whether $CC accepts -g... " >&6; }
4962 +if ${ac_cv_prog_cc_g+:} false; then :
4963 + $as_echo_n "(cached) " >&6
4964 +else
4965 + ac_save_c_werror_flag=$ac_c_werror_flag
4966 + ac_c_werror_flag=yes
4967 + ac_cv_prog_cc_g=no
4968 + CFLAGS="-g"
4969 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4970 +/* end confdefs.h. */
4971 +
4972 +int
4973 +main ()
4974 +{
4975 +
4976 + ;
4977 + return 0;
4978 +}
4979 +_ACEOF
4980 +if ac_fn_c_try_compile "$LINENO"; then :
4981 + ac_cv_prog_cc_g=yes
4982 +else
4983 + CFLAGS=""
4984 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4985 +/* end confdefs.h. */
4986 +
4987 +int
4988 +main ()
4989 +{
4990 +
4991 + ;
4992 + return 0;
4993 +}
4994 +_ACEOF
4995 +if ac_fn_c_try_compile "$LINENO"; then :
4996 +
4997 +else
4998 + ac_c_werror_flag=$ac_save_c_werror_flag
4999 + CFLAGS="-g"
5000 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5001 +/* end confdefs.h. */
5002 +
5003 +int
5004 +main ()
5005 +{
5006 +
5007 + ;
5008 + return 0;
5009 +}
5010 +_ACEOF
5011 +if ac_fn_c_try_compile "$LINENO"; then :
5012 + ac_cv_prog_cc_g=yes
5013 +fi
5014 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5015 +fi
5016 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5017 +fi
5018 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5019 + ac_c_werror_flag=$ac_save_c_werror_flag
5020 +fi
5021 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5022 +$as_echo "$ac_cv_prog_cc_g" >&6; }
5023 +if test "$ac_test_CFLAGS" = set; then
5024 + CFLAGS=$ac_save_CFLAGS
5025 +elif test $ac_cv_prog_cc_g = yes; then
5026 + if test "$GCC" = yes; then
5027 + CFLAGS="-g -O2"
5028 + else
5029 + CFLAGS="-g"
5030 + fi
5031 +else
5032 + if test "$GCC" = yes; then
5033 + CFLAGS="-O2"
5034 + else
5035 + CFLAGS=
5036 + fi
5037 +fi
5038 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5039 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5040 +if ${ac_cv_prog_cc_c89+:} false; then :
5041 + $as_echo_n "(cached) " >&6
5042 +else
5043 + ac_cv_prog_cc_c89=no
5044 +ac_save_CC=$CC
5045 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5046 +/* end confdefs.h. */
5047 +#include <stdarg.h>
5048 +#include <stdio.h>
5049 +struct stat;
5050 +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5051 +struct buf { int x; };
5052 +FILE * (*rcsopen) (struct buf *, struct stat *, int);
5053 +static char *e (p, i)
5054 + char **p;
5055 + int i;
5056 +{
5057 + return p[i];
5058 +}
5059 +static char *f (char * (*g) (char **, int), char **p, ...)
5060 +{
5061 + char *s;
5062 + va_list v;
5063 + va_start (v,p);
5064 + s = g (p, va_arg (v,int));
5065 + va_end (v);
5066 + return s;
5067 +}
5068 +
5069 +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5070 + function prototypes and stuff, but not '\xHH' hex character constants.
5071 + These don't provoke an error unfortunately, instead are silently treated
5072 + as 'x'. The following induces an error, until -std is added to get
5073 + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5074 + array size at least. It's necessary to write '\x00'==0 to get something
5075 + that's true only with -std. */
5076 +int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5077 +
5078 +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5079 + inside strings and character constants. */
5080 +#define FOO(x) 'x'
5081 +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5082 +
5083 +int test (int i, double x);
5084 +struct s1 {int (*f) (int a);};
5085 +struct s2 {int (*f) (double a);};
5086 +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5087 +int argc;
5088 +char **argv;
5089 +int
5090 +main ()
5091 +{
5092 +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5093 + ;
5094 + return 0;
5095 +}
5096 +_ACEOF
5097 +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5098 + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5099 +do
5100 + CC="$ac_save_CC $ac_arg"
5101 + if ac_fn_c_try_compile "$LINENO"; then :
5102 + ac_cv_prog_cc_c89=$ac_arg
5103 +fi
5104 +rm -f core conftest.err conftest.$ac_objext
5105 + test "x$ac_cv_prog_cc_c89" != "xno" && break
5106 +done
5107 +rm -f conftest.$ac_ext
5108 +CC=$ac_save_CC
5109 +
5110 +fi
5111 +# AC_CACHE_VAL
5112 +case "x$ac_cv_prog_cc_c89" in
5113 + x)
5114 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5115 +$as_echo "none needed" >&6; } ;;
5116 + xno)
5117 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5118 +$as_echo "unsupported" >&6; } ;;
5119 + *)
5120 + CC="$CC $ac_cv_prog_cc_c89"
5121 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5122 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5123 +esac
5124 +if test "x$ac_cv_prog_cc_c89" != xno; then :
5125 +
5126 +fi
5127 +
5128 +ac_ext=c
5129 +ac_cpp='$CPP $CPPFLAGS'
5130 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5131 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5132 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
5133 +DEPDIR="${am__leading_dot}deps"
5134 +
5135 +ac_config_commands="$ac_config_commands depfiles"
5136 +
5137 +
5138 +am_make=${MAKE-make}
5139 +cat > confinc << 'END'
5140 +am__doit:
5141 + @echo this is the am__doit target
5142 +.PHONY: am__doit
5143 +END
5144 +# If we don't find an include directive, just comment out the code.
5145 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
5146 +$as_echo_n "checking for style of include used by $am_make... " >&6; }
5147 +am__include="#"
5148 +am__quote=
5149 +_am_result=none
5150 +# First try GNU make style include.
5151 +echo "include confinc" > confmf
5152 +# Ignore all kinds of additional output from 'make'.
5153 +case `$am_make -s -f confmf 2> /dev/null` in #(
5154 +*the\ am__doit\ target*)
5155 + am__include=include
5156 + am__quote=
5157 + _am_result=GNU
5158 + ;;
5159 +esac
5160 +# Now try BSD make style include.
5161 +if test "$am__include" = "#"; then
5162 + echo '.include "confinc"' > confmf
5163 + case `$am_make -s -f confmf 2> /dev/null` in #(
5164 + *the\ am__doit\ target*)
5165 + am__include=.include
5166 + am__quote="\""
5167 + _am_result=BSD
5168 + ;;
5169 + esac
5170 +fi
5171 +
5172 +
5173 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
5174 +$as_echo "$_am_result" >&6; }
5175 +rm -f confinc confmf
5176 +
5177 +# Check whether --enable-dependency-tracking was given.
5178 +if test "${enable_dependency_tracking+set}" = set; then :
5179 + enableval=$enable_dependency_tracking;
5180 +fi
5181 +
5182 +if test "x$enable_dependency_tracking" != xno; then
5183 + am_depcomp="$ac_aux_dir/depcomp"
5184 + AMDEPBACKSLASH='\'
5185 + am__nodep='_no'
5186 +fi
5187 + if test "x$enable_dependency_tracking" != xno; then
5188 + AMDEP_TRUE=
5189 + AMDEP_FALSE='#'
5190 +else
5191 + AMDEP_TRUE='#'
5192 + AMDEP_FALSE=
5193 +fi
5194 +
5195 +
5196 +
5197 +depcc="$CC" am_compiler_list=
5198 +
5199 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5200 +$as_echo_n "checking dependency style of $depcc... " >&6; }
5201 +if ${am_cv_CC_dependencies_compiler_type+:} false; then :
5202 + $as_echo_n "(cached) " >&6
5203 +else
5204 + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5205 + # We make a subdir and do the tests there. Otherwise we can end up
5206 + # making bogus files that we don't know about and never remove. For
5207 + # instance it was reported that on HP-UX the gcc test will end up
5208 + # making a dummy file named 'D' -- because '-MD' means "put the output
5209 + # in D".
5210 + rm -rf conftest.dir
5211 + mkdir conftest.dir
5212 + # Copy depcomp to subdir because otherwise we won't find it if we're
5213 + # using a relative directory.
5214 + cp "$am_depcomp" conftest.dir
5215 + cd conftest.dir
5216 + # We will build objects and dependencies in a subdirectory because
5217 + # it helps to detect inapplicable dependency modes. For instance
5218 + # both Tru64's cc and ICC support -MD to output dependencies as a
5219 + # side effect of compilation, but ICC will put the dependencies in
5220 + # the current directory while Tru64 will put them in the object
5221 + # directory.
5222 + mkdir sub
5223 +
5224 + am_cv_CC_dependencies_compiler_type=none
5225 + if test "$am_compiler_list" = ""; then
5226 + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5227 + fi
5228 + am__universal=false
5229 + case " $depcc " in #(
5230 + *\ -arch\ *\ -arch\ *) am__universal=true ;;
5231 + esac
5232 +
5233 + for depmode in $am_compiler_list; do
5234 + # Setup a source with many dependencies, because some compilers
5235 + # like to wrap large dependency lists on column 80 (with \), and
5236 + # we should not choose a depcomp mode which is confused by this.
5237 + #
5238 + # We need to recreate these files for each test, as the compiler may
5239 + # overwrite some of them when testing with obscure command lines.
5240 + # This happens at least with the AIX C compiler.
5241 + : > sub/conftest.c
5242 + for i in 1 2 3 4 5 6; do
5243 + echo '#include "conftst'$i'.h"' >> sub/conftest.c
5244 + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
5245 + # Solaris 10 /bin/sh.
5246 + echo '/* dummy */' > sub/conftst$i.h
5247 + done
5248 + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5249 +
5250 + # We check with '-c' and '-o' for the sake of the "dashmstdout"
5251 + # mode. It turns out that the SunPro C++ compiler does not properly
5252 + # handle '-M -o', and we need to detect this. Also, some Intel
5253 + # versions had trouble with output in subdirs.
5254 + am__obj=sub/conftest.${OBJEXT-o}
5255 + am__minus_obj="-o $am__obj"
5256 + case $depmode in
5257 + gcc)
5258 + # This depmode causes a compiler race in universal mode.
5259 + test "$am__universal" = false || continue
5260 + ;;
5261 + nosideeffect)
5262 + # After this tag, mechanisms are not by side-effect, so they'll
5263 + # only be used when explicitly requested.
5264 + if test "x$enable_dependency_tracking" = xyes; then
5265 + continue
5266 + else
5267 + break
5268 + fi
5269 + ;;
5270 + msvc7 | msvc7msys | msvisualcpp | msvcmsys)
5271 + # This compiler won't grok '-c -o', but also, the minuso test has
5272 + # not run yet. These depmodes are late enough in the game, and
5273 + # so weak that their functioning should not be impacted.
5274 + am__obj=conftest.${OBJEXT-o}
5275 + am__minus_obj=
5276 + ;;
5277 + none) break ;;
5278 + esac
5279 + if depmode=$depmode \
5280 + source=sub/conftest.c object=$am__obj \
5281 + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5282 + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5283 + >/dev/null 2>conftest.err &&
5284 + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5285 + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5286 + grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5287 + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5288 + # icc doesn't choke on unknown options, it will just issue warnings
5289 + # or remarks (even with -Werror). So we grep stderr for any message
5290 + # that says an option was ignored or not supported.
5291 + # When given -MP, icc 7.0 and 7.1 complain thusly:
5292 + # icc: Command line warning: ignoring option '-M'; no argument required
5293 + # The diagnosis changed in icc 8.0:
5294 + # icc: Command line remark: option '-MP' not supported
5295 + if (grep 'ignoring option' conftest.err ||
5296 + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5297 + am_cv_CC_dependencies_compiler_type=$depmode
5298 + break
5299 + fi
5300 + fi
5301 + done
5302 +
5303 + cd ..
5304 + rm -rf conftest.dir
5305 +else
5306 + am_cv_CC_dependencies_compiler_type=none
5307 +fi
5308 +
5309 +fi
5310 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5311 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
5312 +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5313 +
5314 + if
5315 + test "x$enable_dependency_tracking" != xno \
5316 + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5317 + am__fastdepCC_TRUE=
5318 + am__fastdepCC_FALSE='#'
5319 +else
5320 + am__fastdepCC_TRUE='#'
5321 + am__fastdepCC_FALSE=
5322 +fi
5323 +
5324 +
5325 +case `pwd` in
5326 + *\ * | *\ *)
5327 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
5328 +$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
5329 +esac
5330 +
5331 +
5332 +
5333 +macro_version='2.4.2'
5334 +macro_revision='1.3337'
5335 +
5336 +
5337 +
5338 +
5339 +
5340 +
5341 +
5342 +
5343 +
5344 +
5345 +
5346 +
5347 +
5348 +ltmain="$ac_aux_dir/ltmain.sh"
5349 +
5350 +# Make sure we can run config.sub.
5351 +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
5352 + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
5353 +
5354 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
5355 +$as_echo_n "checking build system type... " >&6; }
5356 +if ${ac_cv_build+:} false; then :
5357 + $as_echo_n "(cached) " >&6
5358 +else
5359 + ac_build_alias=$build_alias
5360 +test "x$ac_build_alias" = x &&
5361 + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
5362 +test "x$ac_build_alias" = x &&
5363 + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
5364 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
5365 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
5366 +
5367 +fi
5368 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
5369 +$as_echo "$ac_cv_build" >&6; }
5370 +case $ac_cv_build in
5371 +*-*-*) ;;
5372 +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
5373 +esac
5374 +build=$ac_cv_build
5375 +ac_save_IFS=$IFS; IFS='-'
5376 +set x $ac_cv_build
5377 +shift
5378 +build_cpu=$1
5379 +build_vendor=$2
5380 +shift; shift
5381 +# Remember, the first character of IFS is used to create $*,
5382 +# except with old shells:
5383 +build_os=$*
5384 +IFS=$ac_save_IFS
5385 +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
5386 +
5387 +
5388 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
5389 +$as_echo_n "checking host system type... " >&6; }
5390 +if ${ac_cv_host+:} false; then :
5391 + $as_echo_n "(cached) " >&6
5392 +else
5393 + if test "x$host_alias" = x; then
5394 + ac_cv_host=$ac_cv_build
5395 +else
5396 + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
5397 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
5398 +fi
5399 +
5400 +fi
5401 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
5402 +$as_echo "$ac_cv_host" >&6; }
5403 +case $ac_cv_host in
5404 +*-*-*) ;;
5405 +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
5406 +esac
5407 +host=$ac_cv_host
5408 +ac_save_IFS=$IFS; IFS='-'
5409 +set x $ac_cv_host
5410 +shift
5411 +host_cpu=$1
5412 +host_vendor=$2
5413 +shift; shift
5414 +# Remember, the first character of IFS is used to create $*,
5415 +# except with old shells:
5416 +host_os=$*
5417 +IFS=$ac_save_IFS
5418 +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
5419 +
5420 +
5421 +# Backslashify metacharacters that are still active within
5422 +# double-quoted strings.
5423 +sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
5424 +
5425 +# Same as above, but do not quote variable references.
5426 +double_quote_subst='s/\(["`\\]\)/\\\1/g'
5427 +
5428 +# Sed substitution to delay expansion of an escaped shell variable in a
5429 +# double_quote_subst'ed string.
5430 +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
5431 +
5432 +# Sed substitution to delay expansion of an escaped single quote.
5433 +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
5434 +
5435 +# Sed substitution to avoid accidental globbing in evaled expressions
5436 +no_glob_subst='s/\*/\\\*/g'
5437 +
5438 +ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
5439 +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
5440 +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
5441 +
5442 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
5443 +$as_echo_n "checking how to print strings... " >&6; }
5444 +# Test print first, because it will be a builtin if present.
5445 +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
5446 + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
5447 + ECHO='print -r --'
5448 +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
5449 + ECHO='printf %s\n'
5450 +else
5451 + # Use this function as a fallback that always works.
5452 + func_fallback_echo ()
5453 + {
5454 + eval 'cat <<_LTECHO_EOF
5455 +$1
5456 +_LTECHO_EOF'
5457 + }
5458 + ECHO='func_fallback_echo'
5459 +fi
5460 +
5461 +# func_echo_all arg...
5462 +# Invoke $ECHO with all args, space-separated.
5463 +func_echo_all ()
5464 +{
5465 + $ECHO ""
5466 +}
5467 +
5468 +case "$ECHO" in
5469 + printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
5470 +$as_echo "printf" >&6; } ;;
5471 + print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
5472 +$as_echo "print -r" >&6; } ;;
5473 + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
5474 +$as_echo "cat" >&6; } ;;
5475 +esac
5476 +
5477 +
5478 +
5479 +
5480 +
5481 +
5482 +
5483 +
5484 +
5485 +
5486 +
5487 +
5488 +
5489 +
5490 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
5491 +$as_echo_n "checking for a sed that does not truncate output... " >&6; }
5492 +if ${ac_cv_path_SED+:} false; then :
5493 + $as_echo_n "(cached) " >&6
5494 +else
5495 + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
5496 + for ac_i in 1 2 3 4 5 6 7; do
5497 + ac_script="$ac_script$as_nl$ac_script"
5498 + done
5499 + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
5500 + { ac_script=; unset ac_script;}
5501 + if test -z "$SED"; then
5502 + ac_path_SED_found=false
5503 + # Loop through the user's path and test for each of PROGNAME-LIST
5504 + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5505 +for as_dir in $PATH
5506 +do
5507 + IFS=$as_save_IFS
5508 + test -z "$as_dir" && as_dir=.
5509 + for ac_prog in sed gsed; do
5510 + for ac_exec_ext in '' $ac_executable_extensions; do
5511 + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
5512 + as_fn_executable_p "$ac_path_SED" || continue
5513 +# Check for GNU ac_path_SED and select it if it is found.
5514 + # Check for GNU $ac_path_SED
5515 +case `"$ac_path_SED" --version 2>&1` in
5516 +*GNU*)
5517 + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
5518 +*)
5519 + ac_count=0
5520 + $as_echo_n 0123456789 >"conftest.in"
5521 + while :
5522 + do
5523 + cat "conftest.in" "conftest.in" >"conftest.tmp"
5524 + mv "conftest.tmp" "conftest.in"
5525 + cp "conftest.in" "conftest.nl"
5526 + $as_echo '' >> "conftest.nl"
5527 + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
5528 + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5529 + as_fn_arith $ac_count + 1 && ac_count=$as_val
5530 + if test $ac_count -gt ${ac_path_SED_max-0}; then
5531 + # Best one so far, save it but keep looking for a better one
5532 + ac_cv_path_SED="$ac_path_SED"
5533 + ac_path_SED_max=$ac_count
5534 + fi
5535 + # 10*(2^10) chars as input seems more than enough
5536 + test $ac_count -gt 10 && break
5537 + done
5538 + rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5539 +esac
5540 +
5541 + $ac_path_SED_found && break 3
5542 + done
5543 + done
5544 + done
5545 +IFS=$as_save_IFS
5546 + if test -z "$ac_cv_path_SED"; then
5547 + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
5548 + fi
5549 +else
5550 + ac_cv_path_SED=$SED
5551 +fi
5552 +
5553 +fi
5554 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
5555 +$as_echo "$ac_cv_path_SED" >&6; }
5556 + SED="$ac_cv_path_SED"
5557 + rm -f conftest.sed
5558 +
5559 +test -z "$SED" && SED=sed
5560 +Xsed="$SED -e 1s/^X//"
5561 +
5562 +
5563 +
5564 +
5565 +
5566 +
5567 +
5568 +
5569 +
5570 +
5571 +
5572 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5573 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5574 +if ${ac_cv_path_GREP+:} false; then :
5575 + $as_echo_n "(cached) " >&6
5576 +else
5577 + if test -z "$GREP"; then
5578 + ac_path_GREP_found=false
5579 + # Loop through the user's path and test for each of PROGNAME-LIST
5580 + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5581 +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5582 +do
5583 + IFS=$as_save_IFS
5584 + test -z "$as_dir" && as_dir=.
5585 + for ac_prog in grep ggrep; do
5586 + for ac_exec_ext in '' $ac_executable_extensions; do
5587 + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5588 + as_fn_executable_p "$ac_path_GREP" || continue
5589 +# Check for GNU ac_path_GREP and select it if it is found.
5590 + # Check for GNU $ac_path_GREP
5591 +case `"$ac_path_GREP" --version 2>&1` in
5592 +*GNU*)
5593 + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5594 +*)
5595 + ac_count=0
5596 + $as_echo_n 0123456789 >"conftest.in"
5597 + while :
5598 + do
5599 + cat "conftest.in" "conftest.in" >"conftest.tmp"
5600 + mv "conftest.tmp" "conftest.in"
5601 + cp "conftest.in" "conftest.nl"
5602 + $as_echo 'GREP' >> "conftest.nl"
5603 + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5604 + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5605 + as_fn_arith $ac_count + 1 && ac_count=$as_val
5606 + if test $ac_count -gt ${ac_path_GREP_max-0}; then
5607 + # Best one so far, save it but keep looking for a better one
5608 + ac_cv_path_GREP="$ac_path_GREP"
5609 + ac_path_GREP_max=$ac_count
5610 + fi
5611 + # 10*(2^10) chars as input seems more than enough
5612 + test $ac_count -gt 10 && break
5613 + done
5614 + rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5615 +esac
5616 +
5617 + $ac_path_GREP_found && break 3
5618 + done
5619 + done
5620 + done
5621 +IFS=$as_save_IFS
5622 + if test -z "$ac_cv_path_GREP"; then
5623 + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5624 + fi
5625 +else
5626 + ac_cv_path_GREP=$GREP
5627 +fi
5628 +
5629 +fi
5630 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5631 +$as_echo "$ac_cv_path_GREP" >&6; }
5632 + GREP="$ac_cv_path_GREP"
5633 +
5634 +
5635 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5636 +$as_echo_n "checking for egrep... " >&6; }
5637 +if ${ac_cv_path_EGREP+:} false; then :
5638 + $as_echo_n "(cached) " >&6
5639 +else
5640 + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5641 + then ac_cv_path_EGREP="$GREP -E"
5642 + else
5643 + if test -z "$EGREP"; then
5644 + ac_path_EGREP_found=false
5645 + # Loop through the user's path and test for each of PROGNAME-LIST
5646 + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5647 +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5648 +do
5649 + IFS=$as_save_IFS
5650 + test -z "$as_dir" && as_dir=.
5651 + for ac_prog in egrep; do
5652 + for ac_exec_ext in '' $ac_executable_extensions; do
5653 + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5654 + as_fn_executable_p "$ac_path_EGREP" || continue
5655 +# Check for GNU ac_path_EGREP and select it if it is found.
5656 + # Check for GNU $ac_path_EGREP
5657 +case `"$ac_path_EGREP" --version 2>&1` in
5658 +*GNU*)
5659 + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5660 +*)
5661 + ac_count=0
5662 + $as_echo_n 0123456789 >"conftest.in"
5663 + while :
5664 + do
5665 + cat "conftest.in" "conftest.in" >"conftest.tmp"
5666 + mv "conftest.tmp" "conftest.in"
5667 + cp "conftest.in" "conftest.nl"
5668 + $as_echo 'EGREP' >> "conftest.nl"
5669 + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5670 + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5671 + as_fn_arith $ac_count + 1 && ac_count=$as_val
5672 + if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5673 + # Best one so far, save it but keep looking for a better one
5674 + ac_cv_path_EGREP="$ac_path_EGREP"
5675 + ac_path_EGREP_max=$ac_count
5676 + fi
5677 + # 10*(2^10) chars as input seems more than enough
5678 + test $ac_count -gt 10 && break
5679 + done
5680 + rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5681 +esac
5682 +
5683 + $ac_path_EGREP_found && break 3
5684 + done
5685 + done
5686 + done
5687 +IFS=$as_save_IFS
5688 + if test -z "$ac_cv_path_EGREP"; then
5689 + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5690 + fi
5691 +else
5692 + ac_cv_path_EGREP=$EGREP
5693 +fi
5694 +
5695 + fi
5696 +fi
5697 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5698 +$as_echo "$ac_cv_path_EGREP" >&6; }
5699 + EGREP="$ac_cv_path_EGREP"
5700 +
5701 +
5702 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
5703 +$as_echo_n "checking for fgrep... " >&6; }
5704 +if ${ac_cv_path_FGREP+:} false; then :
5705 + $as_echo_n "(cached) " >&6
5706 +else
5707 + if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
5708 + then ac_cv_path_FGREP="$GREP -F"
5709 + else
5710 + if test -z "$FGREP"; then
5711 + ac_path_FGREP_found=false
5712 + # Loop through the user's path and test for each of PROGNAME-LIST
5713 + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5714 +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5715 +do
5716 + IFS=$as_save_IFS
5717 + test -z "$as_dir" && as_dir=.
5718 + for ac_prog in fgrep; do
5719 + for ac_exec_ext in '' $ac_executable_extensions; do
5720 + ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
5721 + as_fn_executable_p "$ac_path_FGREP" || continue
5722 +# Check for GNU ac_path_FGREP and select it if it is found.
5723 + # Check for GNU $ac_path_FGREP
5724 +case `"$ac_path_FGREP" --version 2>&1` in
5725 +*GNU*)
5726 + ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
5727 +*)
5728 + ac_count=0
5729 + $as_echo_n 0123456789 >"conftest.in"
5730 + while :
5731 + do
5732 + cat "conftest.in" "conftest.in" >"conftest.tmp"
5733 + mv "conftest.tmp" "conftest.in"
5734 + cp "conftest.in" "conftest.nl"
5735 + $as_echo 'FGREP' >> "conftest.nl"
5736 + "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
5737 + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5738 + as_fn_arith $ac_count + 1 && ac_count=$as_val
5739 + if test $ac_count -gt ${ac_path_FGREP_max-0}; then
5740 + # Best one so far, save it but keep looking for a better one
5741 + ac_cv_path_FGREP="$ac_path_FGREP"
5742 + ac_path_FGREP_max=$ac_count
5743 + fi
5744 + # 10*(2^10) chars as input seems more than enough
5745 + test $ac_count -gt 10 && break
5746 + done
5747 + rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5748 +esac
5749 +
5750 + $ac_path_FGREP_found && break 3
5751 + done
5752 + done
5753 + done
5754 +IFS=$as_save_IFS
5755 + if test -z "$ac_cv_path_FGREP"; then
5756 + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5757 + fi
5758 +else
5759 + ac_cv_path_FGREP=$FGREP
5760 +fi
5761 +
5762 + fi
5763 +fi
5764 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
5765 +$as_echo "$ac_cv_path_FGREP" >&6; }
5766 + FGREP="$ac_cv_path_FGREP"
5767 +
5768 +
5769 +test -z "$GREP" && GREP=grep
5770 +
5771 +
5772 +
5773 +
5774 +
5775 +
5776 +
5777 +
5778 +
5779 +
5780 +
5781 +
5782 +
5783 +
5784 +
5785 +
5786 +
5787 +
5788 +
5789 +# Check whether --with-gnu-ld was given.
5790 +if test "${with_gnu_ld+set}" = set; then :
5791 + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
5792 +else
5793 + with_gnu_ld=no
5794 +fi
5795 +
5796 +ac_prog=ld
5797 +if test "$GCC" = yes; then
5798 + # Check if gcc -print-prog-name=ld gives a path.
5799 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
5800 +$as_echo_n "checking for ld used by $CC... " >&6; }
5801 + case $host in
5802 + *-*-mingw*)
5803 + # gcc leaves a trailing carriage return which upsets mingw
5804 + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
5805 + *)
5806 + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
5807 + esac
5808 + case $ac_prog in
5809 + # Accept absolute paths.
5810 + [\\/]* | ?:[\\/]*)
5811 + re_direlt='/[^/][^/]*/\.\./'
5812 + # Canonicalize the pathname of ld
5813 + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
5814 + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
5815 + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
5816 + done
5817 + test -z "$LD" && LD="$ac_prog"
5818 + ;;
5819 + "")
5820 + # If it fails, then pretend we aren't using GCC.
5821 + ac_prog=ld
5822 + ;;
5823 + *)
5824 + # If it is relative, then search for the first ld in PATH.
5825 + with_gnu_ld=unknown
5826 + ;;
5827 + esac
5828 +elif test "$with_gnu_ld" = yes; then
5829 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5830 +$as_echo_n "checking for GNU ld... " >&6; }
5831 +else
5832 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
5833 +$as_echo_n "checking for non-GNU ld... " >&6; }
5834 +fi
5835 +if ${lt_cv_path_LD+:} false; then :
5836 + $as_echo_n "(cached) " >&6
5837 +else
5838 + if test -z "$LD"; then
5839 + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5840 + for ac_dir in $PATH; do
5841 + IFS="$lt_save_ifs"
5842 + test -z "$ac_dir" && ac_dir=.
5843 + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
5844 + lt_cv_path_LD="$ac_dir/$ac_prog"
5845 + # Check to see if the program is GNU ld. I'd rather use --version,
5846 + # but apparently some variants of GNU ld only accept -v.
5847 + # Break only if it was the GNU/non-GNU ld that we prefer.
5848 + case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
5849 + *GNU* | *'with BFD'*)
5850 + test "$with_gnu_ld" != no && break
5851 + ;;
5852 + *)
5853 + test "$with_gnu_ld" != yes && break
5854 + ;;
5855 + esac
5856 + fi
5857 + done
5858 + IFS="$lt_save_ifs"
5859 +else
5860 + lt_cv_path_LD="$LD" # Let the user override the test with a path.
5861 +fi
5862 +fi
5863 +
5864 +LD="$lt_cv_path_LD"
5865 +if test -n "$LD"; then
5866 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
5867 +$as_echo "$LD" >&6; }
5868 +else
5869 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5870 +$as_echo "no" >&6; }
5871 +fi
5872 +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
5873 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
5874 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
5875 +if ${lt_cv_prog_gnu_ld+:} false; then :
5876 + $as_echo_n "(cached) " >&6
5877 +else
5878 + # I'd rather use --version here, but apparently some GNU lds only accept -v.
5879 +case `$LD -v 2>&1 </dev/null` in
5880 +*GNU* | *'with BFD'*)
5881 + lt_cv_prog_gnu_ld=yes
5882 + ;;
5883 +*)
5884 + lt_cv_prog_gnu_ld=no
5885 + ;;
5886 +esac
5887 +fi
5888 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
5889 +$as_echo "$lt_cv_prog_gnu_ld" >&6; }
5890 +with_gnu_ld=$lt_cv_prog_gnu_ld
5891 +
5892 +
5893 +
5894 +
5895 +
5896 +
5897 +
5898 +
5899 +
5900 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
5901 +$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
5902 +if ${lt_cv_path_NM+:} false; then :
5903 + $as_echo_n "(cached) " >&6
5904 +else
5905 + if test -n "$NM"; then
5906 + # Let the user override the test.
5907 + lt_cv_path_NM="$NM"
5908 +else
5909 + lt_nm_to_check="${ac_tool_prefix}nm"
5910 + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
5911 + lt_nm_to_check="$lt_nm_to_check nm"
5912 + fi
5913 + for lt_tmp_nm in $lt_nm_to_check; do
5914 + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5915 + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
5916 + IFS="$lt_save_ifs"
5917 + test -z "$ac_dir" && ac_dir=.
5918 + tmp_nm="$ac_dir/$lt_tmp_nm"
5919 + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
5920 + # Check to see if the nm accepts a BSD-compat flag.
5921 + # Adding the `sed 1q' prevents false positives on HP-UX, which says:
5922 + # nm: unknown option "B" ignored
5923 + # Tru64's nm complains that /dev/null is an invalid object file
5924 + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
5925 + */dev/null* | *'Invalid file or object type'*)
5926 + lt_cv_path_NM="$tmp_nm -B"
5927 + break
5928 + ;;
5929 + *)
5930 + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
5931 + */dev/null*)
5932 + lt_cv_path_NM="$tmp_nm -p"
5933 + break
5934 + ;;
5935 + *)
5936 + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
5937 + continue # so that we can try to find one that supports BSD flags
5938 + ;;
5939 + esac
5940 + ;;
5941 + esac
5942 + fi
5943 + done
5944 + IFS="$lt_save_ifs"
5945 + done
5946 + : ${lt_cv_path_NM=no}
5947 +fi
5948 +fi
5949 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
5950 +$as_echo "$lt_cv_path_NM" >&6; }
5951 +if test "$lt_cv_path_NM" != "no"; then
5952 + NM="$lt_cv_path_NM"
5953 +else
5954 + # Didn't find any BSD compatible name lister, look for dumpbin.
5955 + if test -n "$DUMPBIN"; then :
5956 + # Let the user override the test.
5957 + else
5958 + if test -n "$ac_tool_prefix"; then
5959 + for ac_prog in dumpbin "link -dump"
5960 + do
5961 + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5962 +set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5963 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5964 +$as_echo_n "checking for $ac_word... " >&6; }
5965 +if ${ac_cv_prog_DUMPBIN+:} false; then :
5966 + $as_echo_n "(cached) " >&6
5967 +else
5968 + if test -n "$DUMPBIN"; then
5969 + ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
5970 +else
5971 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5972 +for as_dir in $PATH
5973 +do
5974 + IFS=$as_save_IFS
5975 + test -z "$as_dir" && as_dir=.
5976 + for ac_exec_ext in '' $ac_executable_extensions; do
5977 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5978 + ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
5979 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5980 + break 2
5981 + fi
5982 +done
5983 + done
5984 +IFS=$as_save_IFS
5985 +
5986 +fi
5987 +fi
5988 +DUMPBIN=$ac_cv_prog_DUMPBIN
5989 +if test -n "$DUMPBIN"; then
5990 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
5991 +$as_echo "$DUMPBIN" >&6; }
5992 +else
5993 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5994 +$as_echo "no" >&6; }
5995 +fi
5996 +
5997 +
5998 + test -n "$DUMPBIN" && break
5999 + done
6000 +fi
6001 +if test -z "$DUMPBIN"; then
6002 + ac_ct_DUMPBIN=$DUMPBIN
6003 + for ac_prog in dumpbin "link -dump"
6004 +do
6005 + # Extract the first word of "$ac_prog", so it can be a program name with args.
6006 +set dummy $ac_prog; ac_word=$2
6007 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6008 +$as_echo_n "checking for $ac_word... " >&6; }
6009 +if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
6010 + $as_echo_n "(cached) " >&6
6011 +else
6012 + if test -n "$ac_ct_DUMPBIN"; then
6013 + ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
6014 +else
6015 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6016 +for as_dir in $PATH
6017 +do
6018 + IFS=$as_save_IFS
6019 + test -z "$as_dir" && as_dir=.
6020 + for ac_exec_ext in '' $ac_executable_extensions; do
6021 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6022 + ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
6023 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6024 + break 2
6025 + fi
6026 +done
6027 + done
6028 +IFS=$as_save_IFS
6029 +
6030 +fi
6031 +fi
6032 +ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
6033 +if test -n "$ac_ct_DUMPBIN"; then
6034 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
6035 +$as_echo "$ac_ct_DUMPBIN" >&6; }
6036 +else
6037 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6038 +$as_echo "no" >&6; }
6039 +fi
6040 +
6041 +
6042 + test -n "$ac_ct_DUMPBIN" && break
6043 +done
6044 +
6045 + if test "x$ac_ct_DUMPBIN" = x; then
6046 + DUMPBIN=":"
6047 + else
6048 + case $cross_compiling:$ac_tool_warned in
6049 +yes:)
6050 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6051 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6052 +ac_tool_warned=yes ;;
6053 +esac
6054 + DUMPBIN=$ac_ct_DUMPBIN
6055 + fi
6056 +fi
6057 +
6058 + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
6059 + *COFF*)
6060 + DUMPBIN="$DUMPBIN -symbols"
6061 + ;;
6062 + *)
6063 + DUMPBIN=:
6064 + ;;
6065 + esac
6066 + fi
6067 +
6068 + if test "$DUMPBIN" != ":"; then
6069 + NM="$DUMPBIN"
6070 + fi
6071 +fi
6072 +test -z "$NM" && NM=nm
6073 +
6074 +
6075 +
6076 +
6077 +
6078 +
6079 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
6080 +$as_echo_n "checking the name lister ($NM) interface... " >&6; }
6081 +if ${lt_cv_nm_interface+:} false; then :
6082 + $as_echo_n "(cached) " >&6
6083 +else
6084 + lt_cv_nm_interface="BSD nm"
6085 + echo "int some_variable = 0;" > conftest.$ac_ext
6086 + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
6087 + (eval "$ac_compile" 2>conftest.err)
6088 + cat conftest.err >&5
6089 + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
6090 + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
6091 + cat conftest.err >&5
6092 + (eval echo "\"\$as_me:$LINENO: output\"" >&5)
6093 + cat conftest.out >&5
6094 + if $GREP 'External.*some_variable' conftest.out > /dev/null; then
6095 + lt_cv_nm_interface="MS dumpbin"
6096 + fi
6097 + rm -f conftest*
6098 +fi
6099 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
6100 +$as_echo "$lt_cv_nm_interface" >&6; }
6101 +
6102 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
6103 +$as_echo_n "checking whether ln -s works... " >&6; }
6104 +LN_S=$as_ln_s
6105 +if test "$LN_S" = "ln -s"; then
6106 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6107 +$as_echo "yes" >&6; }
6108 +else
6109 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
6110 +$as_echo "no, using $LN_S" >&6; }
6111 +fi
6112 +
6113 +# find the maximum length of command line arguments
6114 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
6115 +$as_echo_n "checking the maximum length of command line arguments... " >&6; }
6116 +if ${lt_cv_sys_max_cmd_len+:} false; then :
6117 + $as_echo_n "(cached) " >&6
6118 +else
6119 + i=0
6120 + teststring="ABCD"
6121 +
6122 + case $build_os in
6123 + msdosdjgpp*)
6124 + # On DJGPP, this test can blow up pretty badly due to problems in libc
6125 + # (any single argument exceeding 2000 bytes causes a buffer overrun
6126 + # during glob expansion). Even if it were fixed, the result of this
6127 + # check would be larger than it should be.
6128 + lt_cv_sys_max_cmd_len=12288; # 12K is about right
6129 + ;;
6130 +
6131 + gnu*)
6132 + # Under GNU Hurd, this test is not required because there is
6133 + # no limit to the length of command line arguments.
6134 + # Libtool will interpret -1 as no limit whatsoever
6135 + lt_cv_sys_max_cmd_len=-1;
6136 + ;;
6137 +
6138 + cygwin* | mingw* | cegcc*)
6139 + # On Win9x/ME, this test blows up -- it succeeds, but takes
6140 + # about 5 minutes as the teststring grows exponentially.
6141 + # Worse, since 9x/ME are not pre-emptively multitasking,
6142 + # you end up with a "frozen" computer, even though with patience
6143 + # the test eventually succeeds (with a max line length of 256k).
6144 + # Instead, let's just punt: use the minimum linelength reported by
6145 + # all of the supported platforms: 8192 (on NT/2K/XP).
6146 + lt_cv_sys_max_cmd_len=8192;
6147 + ;;
6148 +
6149 + mint*)
6150 + # On MiNT this can take a long time and run out of memory.
6151 + lt_cv_sys_max_cmd_len=8192;
6152 + ;;
6153 +
6154 + amigaos*)
6155 + # On AmigaOS with pdksh, this test takes hours, literally.
6156 + # So we just punt and use a minimum line length of 8192.
6157 + lt_cv_sys_max_cmd_len=8192;
6158 + ;;
6159 +
6160 + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
6161 + # This has been around since 386BSD, at least. Likely further.
6162 + if test -x /sbin/sysctl; then
6163 + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
6164 + elif test -x /usr/sbin/sysctl; then
6165 + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
6166 + else
6167 + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
6168 + fi
6169 + # And add a safety zone
6170 + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
6171 + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
6172 + ;;
6173 +
6174 + interix*)
6175 + # We know the value 262144 and hardcode it with a safety zone (like BSD)
6176 + lt_cv_sys_max_cmd_len=196608
6177 + ;;
6178 +
6179 + os2*)
6180 + # The test takes a long time on OS/2.
6181 + lt_cv_sys_max_cmd_len=8192
6182 + ;;
6183 +
6184 + osf*)
6185 + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
6186 + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
6187 + # nice to cause kernel panics so lets avoid the loop below.
6188 + # First set a reasonable default.
6189 + lt_cv_sys_max_cmd_len=16384
6190 + #
6191 + if test -x /sbin/sysconfig; then
6192 + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
6193 + *1*) lt_cv_sys_max_cmd_len=-1 ;;
6194 + esac
6195 + fi
6196 + ;;
6197 + sco3.2v5*)
6198 + lt_cv_sys_max_cmd_len=102400
6199 + ;;
6200 + sysv5* | sco5v6* | sysv4.2uw2*)
6201 + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
6202 + if test -n "$kargmax"; then
6203 + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
6204 + else
6205 + lt_cv_sys_max_cmd_len=32768
6206 + fi
6207 + ;;
6208 + *)
6209 + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
6210 + if test -n "$lt_cv_sys_max_cmd_len" && \
6211 + test undefined != "$lt_cv_sys_max_cmd_len"; then
6212 + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
6213 + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
6214 + else
6215 + # Make teststring a little bigger before we do anything with it.
6216 + # a 1K string should be a reasonable start.
6217 + for i in 1 2 3 4 5 6 7 8 ; do
6218 + teststring=$teststring$teststring
6219 + done
6220 + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
6221 + # If test is not a shell built-in, we'll probably end up computing a
6222 + # maximum length that is only half of the actual maximum length, but
6223 + # we can't tell.
6224 + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
6225 + = "X$teststring$teststring"; } >/dev/null 2>&1 &&
6226 + test $i != 17 # 1/2 MB should be enough
6227 + do
6228 + i=`expr $i + 1`
6229 + teststring=$teststring$teststring
6230 + done
6231 + # Only check the string length outside the loop.
6232 + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
6233 + teststring=
6234 + # Add a significant safety factor because C++ compilers can tack on
6235 + # massive amounts of additional arguments before passing them to the
6236 + # linker. It appears as though 1/2 is a usable value.
6237 + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
6238 + fi
6239 + ;;
6240 + esac
6241 +
6242 +fi
6243 +
6244 +if test -n $lt_cv_sys_max_cmd_len ; then
6245 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
6246 +$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
6247 +else
6248 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
6249 +$as_echo "none" >&6; }
6250 +fi
6251 +max_cmd_len=$lt_cv_sys_max_cmd_len
6252 +
6253 +
6254 +
6255 +
6256 +
6257 +
6258 +: ${CP="cp -f"}
6259 +: ${MV="mv -f"}
6260 +: ${RM="rm -f"}
6261 +
6262 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
6263 +$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
6264 +# Try some XSI features
6265 +xsi_shell=no
6266 +( _lt_dummy="a/b/c"
6267 + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
6268 + = c,a/b,b/c, \
6269 + && eval 'test $(( 1 + 1 )) -eq 2 \
6270 + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
6271 + && xsi_shell=yes
6272 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
6273 +$as_echo "$xsi_shell" >&6; }
6274 +
6275 +
6276 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
6277 +$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
6278 +lt_shell_append=no
6279 +( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
6280 + >/dev/null 2>&1 \
6281 + && lt_shell_append=yes
6282 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
6283 +$as_echo "$lt_shell_append" >&6; }
6284 +
6285 +
6286 +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
6287 + lt_unset=unset
6288 +else
6289 + lt_unset=false
6290 +fi
6291 +
6292 +
6293 +
6294 +
6295 +
6296 +# test EBCDIC or ASCII
6297 +case `echo X|tr X '\101'` in
6298 + A) # ASCII based system
6299 + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
6300 + lt_SP2NL='tr \040 \012'
6301 + lt_NL2SP='tr \015\012 \040\040'
6302 + ;;
6303 + *) # EBCDIC based system
6304 + lt_SP2NL='tr \100 \n'
6305 + lt_NL2SP='tr \r\n \100\100'
6306 + ;;
6307 +esac
6308 +
6309 +
6310 +
6311 +
6312 +
6313 +
6314 +
6315 +
6316 +
6317 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
6318 +$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
6319 +if ${lt_cv_to_host_file_cmd+:} false; then :
6320 + $as_echo_n "(cached) " >&6
6321 +else
6322 + case $host in
6323 + *-*-mingw* )
6324 + case $build in
6325 + *-*-mingw* ) # actually msys
6326 + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
6327 + ;;
6328 + *-*-cygwin* )
6329 + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
6330 + ;;
6331 + * ) # otherwise, assume *nix
6332 + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
6333 + ;;
6334 + esac
6335 + ;;
6336 + *-*-cygwin* )
6337 + case $build in
6338 + *-*-mingw* ) # actually msys
6339 + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
6340 + ;;
6341 + *-*-cygwin* )
6342 + lt_cv_to_host_file_cmd=func_convert_file_noop
6343 + ;;
6344 + * ) # otherwise, assume *nix
6345 + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
6346 + ;;
6347 + esac
6348 + ;;
6349 + * ) # unhandled hosts (and "normal" native builds)
6350 + lt_cv_to_host_file_cmd=func_convert_file_noop
6351 + ;;
6352 +esac
6353 +
6354 +fi
6355 +
6356 +to_host_file_cmd=$lt_cv_to_host_file_cmd
6357 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
6358 +$as_echo "$lt_cv_to_host_file_cmd" >&6; }
6359 +
6360 +
6361 +
6362 +
6363 +
6364 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
6365 +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
6366 +if ${lt_cv_to_tool_file_cmd+:} false; then :
6367 + $as_echo_n "(cached) " >&6
6368 +else
6369 + #assume ordinary cross tools, or native build.
6370 +lt_cv_to_tool_file_cmd=func_convert_file_noop
6371 +case $host in
6372 + *-*-mingw* )
6373 + case $build in
6374 + *-*-mingw* ) # actually msys
6375 + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
6376 + ;;
6377 + esac
6378 + ;;
6379 +esac
6380 +
6381 +fi
6382 +
6383 +to_tool_file_cmd=$lt_cv_to_tool_file_cmd
6384 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
6385 +$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
6386 +
6387 +
6388 +
6389 +
6390 +
6391 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
6392 +$as_echo_n "checking for $LD option to reload object files... " >&6; }
6393 +if ${lt_cv_ld_reload_flag+:} false; then :
6394 + $as_echo_n "(cached) " >&6
6395 +else
6396 + lt_cv_ld_reload_flag='-r'
6397 +fi
6398 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
6399 +$as_echo "$lt_cv_ld_reload_flag" >&6; }
6400 +reload_flag=$lt_cv_ld_reload_flag
6401 +case $reload_flag in
6402 +"" | " "*) ;;
6403 +*) reload_flag=" $reload_flag" ;;
6404 +esac
6405 +reload_cmds='$LD$reload_flag -o $output$reload_objs'
6406 +case $host_os in
6407 + cygwin* | mingw* | pw32* | cegcc*)
6408 + if test "$GCC" != yes; then
6409 + reload_cmds=false
6410 + fi
6411 + ;;
6412 + darwin*)
6413 + if test "$GCC" = yes; then
6414 + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
6415 + else
6416 + reload_cmds='$LD$reload_flag -o $output$reload_objs'
6417 + fi
6418 + ;;
6419 +esac
6420 +
6421 +
6422 +
6423 +
6424 +
6425 +
6426 +
6427 +
6428 +
6429 +if test -n "$ac_tool_prefix"; then
6430 + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
6431 +set dummy ${ac_tool_prefix}objdump; ac_word=$2
6432 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6433 +$as_echo_n "checking for $ac_word... " >&6; }
6434 +if ${ac_cv_prog_OBJDUMP+:} false; then :
6435 + $as_echo_n "(cached) " >&6
6436 +else
6437 + if test -n "$OBJDUMP"; then
6438 + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
6439 +else
6440 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6441 +for as_dir in $PATH
6442 +do
6443 + IFS=$as_save_IFS
6444 + test -z "$as_dir" && as_dir=.
6445 + for ac_exec_ext in '' $ac_executable_extensions; do
6446 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6447 + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
6448 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6449 + break 2
6450 + fi
6451 +done
6452 + done
6453 +IFS=$as_save_IFS
6454 +
6455 +fi
6456 +fi
6457 +OBJDUMP=$ac_cv_prog_OBJDUMP
6458 +if test -n "$OBJDUMP"; then
6459 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
6460 +$as_echo "$OBJDUMP" >&6; }
6461 +else
6462 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6463 +$as_echo "no" >&6; }
6464 +fi
6465 +
6466 +
6467 +fi
6468 +if test -z "$ac_cv_prog_OBJDUMP"; then
6469 + ac_ct_OBJDUMP=$OBJDUMP
6470 + # Extract the first word of "objdump", so it can be a program name with args.
6471 +set dummy objdump; ac_word=$2
6472 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6473 +$as_echo_n "checking for $ac_word... " >&6; }
6474 +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
6475 + $as_echo_n "(cached) " >&6
6476 +else
6477 + if test -n "$ac_ct_OBJDUMP"; then
6478 + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
6479 +else
6480 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6481 +for as_dir in $PATH
6482 +do
6483 + IFS=$as_save_IFS
6484 + test -z "$as_dir" && as_dir=.
6485 + for ac_exec_ext in '' $ac_executable_extensions; do
6486 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6487 + ac_cv_prog_ac_ct_OBJDUMP="objdump"
6488 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6489 + break 2
6490 + fi
6491 +done
6492 + done
6493 +IFS=$as_save_IFS
6494 +
6495 +fi
6496 +fi
6497 +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
6498 +if test -n "$ac_ct_OBJDUMP"; then
6499 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
6500 +$as_echo "$ac_ct_OBJDUMP" >&6; }
6501 +else
6502 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6503 +$as_echo "no" >&6; }
6504 +fi
6505 +
6506 + if test "x$ac_ct_OBJDUMP" = x; then
6507 + OBJDUMP="false"
6508 + else
6509 + case $cross_compiling:$ac_tool_warned in
6510 +yes:)
6511 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6512 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6513 +ac_tool_warned=yes ;;
6514 +esac
6515 + OBJDUMP=$ac_ct_OBJDUMP
6516 + fi
6517 +else
6518 + OBJDUMP="$ac_cv_prog_OBJDUMP"
6519 +fi
6520 +
6521 +test -z "$OBJDUMP" && OBJDUMP=objdump
6522 +
6523 +
6524 +
6525 +
6526 +
6527 +
6528 +
6529 +
6530 +
6531 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
6532 +$as_echo_n "checking how to recognize dependent libraries... " >&6; }
6533 +if ${lt_cv_deplibs_check_method+:} false; then :
6534 + $as_echo_n "(cached) " >&6
6535 +else
6536 + lt_cv_file_magic_cmd='$MAGIC_CMD'
6537 +lt_cv_file_magic_test_file=
6538 +lt_cv_deplibs_check_method='unknown'
6539 +# Need to set the preceding variable on all platforms that support
6540 +# interlibrary dependencies.
6541 +# 'none' -- dependencies not supported.
6542 +# `unknown' -- same as none, but documents that we really don't know.
6543 +# 'pass_all' -- all dependencies passed with no checks.
6544 +# 'test_compile' -- check by making test program.
6545 +# 'file_magic [[regex]]' -- check by looking for files in library path
6546 +# which responds to the $file_magic_cmd with a given extended regex.
6547 +# If you have `file' or equivalent on your system and you're not sure
6548 +# whether `pass_all' will *always* work, you probably want this one.
6549 +
6550 +case $host_os in
6551 +aix[4-9]*)
6552 + lt_cv_deplibs_check_method=pass_all
6553 + ;;
6554 +
6555 +beos*)
6556 + lt_cv_deplibs_check_method=pass_all
6557 + ;;
6558 +
6559 +bsdi[45]*)
6560 + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
6561 + lt_cv_file_magic_cmd='/usr/bin/file -L'
6562 + lt_cv_file_magic_test_file=/shlib/libc.so
6563 + ;;
6564 +
6565 +cygwin*)
6566 + # func_win32_libid is a shell function defined in ltmain.sh
6567 + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
6568 + lt_cv_file_magic_cmd='func_win32_libid'
6569 + ;;
6570 +
6571 +mingw* | pw32*)
6572 + # Base MSYS/MinGW do not provide the 'file' command needed by
6573 + # func_win32_libid shell function, so use a weaker test based on 'objdump',
6574 + # unless we find 'file', for example because we are cross-compiling.
6575 + # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
6576 + if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
6577 + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
6578 + lt_cv_file_magic_cmd='func_win32_libid'
6579 + else
6580 + # Keep this pattern in sync with the one in func_win32_libid.
6581 + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
6582 + lt_cv_file_magic_cmd='$OBJDUMP -f'
6583 + fi
6584 + ;;
6585 +
6586 +cegcc*)
6587 + # use the weaker test based on 'objdump'. See mingw*.
6588 + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
6589 + lt_cv_file_magic_cmd='$OBJDUMP -f'
6590 + ;;
6591 +
6592 +darwin* | rhapsody*)
6593 + lt_cv_deplibs_check_method=pass_all
6594 + ;;
6595 +
6596 +freebsd* | dragonfly*)
6597 + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
6598 + case $host_cpu in
6599 + i*86 )
6600 + # Not sure whether the presence of OpenBSD here was a mistake.
6601 + # Let's accept both of them until this is cleared up.
6602 + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
6603 + lt_cv_file_magic_cmd=/usr/bin/file
6604 + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
6605 + ;;
6606 + esac
6607 + else
6608 + lt_cv_deplibs_check_method=pass_all
6609 + fi
6610 + ;;
6611 +
6612 +haiku*)
6613 + lt_cv_deplibs_check_method=pass_all
6614 + ;;
6615 +
6616 +hpux10.20* | hpux11*)
6617 + lt_cv_file_magic_cmd=/usr/bin/file
6618 + case $host_cpu in
6619 + ia64*)
6620 + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
6621 + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
6622 + ;;
6623 + hppa*64*)
6624 + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'
6625 + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
6626 + ;;
6627 + *)
6628 + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
6629 + lt_cv_file_magic_test_file=/usr/lib/libc.sl
6630 + ;;
6631 + esac
6632 + ;;
6633 +
6634 +interix[3-9]*)
6635 + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
6636 + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
6637 + ;;
6638 +
6639 +irix5* | irix6* | nonstopux*)
6640 + case $LD in
6641 + *-32|*"-32 ") libmagic=32-bit;;
6642 + *-n32|*"-n32 ") libmagic=N32;;
6643 + *-64|*"-64 ") libmagic=64-bit;;
6644 + *) libmagic=never-match;;
6645 + esac
6646 + lt_cv_deplibs_check_method=pass_all
6647 + ;;
6648 +
6649 +# This must be glibc/ELF.
6650 +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
6651 + lt_cv_deplibs_check_method=pass_all
6652 + ;;
6653 +
6654 +netbsd* | netbsdelf*-gnu)
6655 + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
6656 + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
6657 + else
6658 + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
6659 + fi
6660 + ;;
6661 +
6662 +newos6*)
6663 + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
6664 + lt_cv_file_magic_cmd=/usr/bin/file
6665 + lt_cv_file_magic_test_file=/usr/lib/libnls.so
6666 + ;;
6667 +
6668 +*nto* | *qnx*)
6669 + lt_cv_deplibs_check_method=pass_all
6670 + ;;
6671 +
6672 +openbsd*)
6673 + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6674 + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
6675 + else
6676 + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
6677 + fi
6678 + ;;
6679 +
6680 +osf3* | osf4* | osf5*)
6681 + lt_cv_deplibs_check_method=pass_all
6682 + ;;
6683 +
6684 +rdos*)
6685 + lt_cv_deplibs_check_method=pass_all
6686 + ;;
6687 +
6688 +solaris*)
6689 + lt_cv_deplibs_check_method=pass_all
6690 + ;;
6691 +
6692 +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
6693 + lt_cv_deplibs_check_method=pass_all
6694 + ;;
6695 +
6696 +sysv4 | sysv4.3*)
6697 + case $host_vendor in
6698 + motorola)
6699 + 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]'
6700 + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
6701 + ;;
6702 + ncr)
6703 + lt_cv_deplibs_check_method=pass_all
6704 + ;;
6705 + sequent)
6706 + lt_cv_file_magic_cmd='/bin/file'
6707 + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
6708 + ;;
6709 + sni)
6710 + lt_cv_file_magic_cmd='/bin/file'
6711 + lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
6712 + lt_cv_file_magic_test_file=/lib/libc.so
6713 + ;;
6714 + siemens)
6715 + lt_cv_deplibs_check_method=pass_all
6716 + ;;
6717 + pc)
6718 + lt_cv_deplibs_check_method=pass_all
6719 + ;;
6720 + esac
6721 + ;;
6722 +
6723 +tpf*)
6724 + lt_cv_deplibs_check_method=pass_all
6725 + ;;
6726 +esac
6727 +
6728 +fi
6729 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
6730 +$as_echo "$lt_cv_deplibs_check_method" >&6; }
6731 +
6732 +file_magic_glob=
6733 +want_nocaseglob=no
6734 +if test "$build" = "$host"; then
6735 + case $host_os in
6736 + mingw* | pw32*)
6737 + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
6738 + want_nocaseglob=yes
6739 + else
6740 + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
6741 + fi
6742 + ;;
6743 + esac
6744 +fi
6745 +
6746 +file_magic_cmd=$lt_cv_file_magic_cmd
6747 +deplibs_check_method=$lt_cv_deplibs_check_method
6748 +test -z "$deplibs_check_method" && deplibs_check_method=unknown
6749 +
6750 +
6751 +
6752 +
6753 +
6754 +
6755 +
6756 +
6757 +
6758 +
6759 +
6760 +
6761 +
6762 +
6763 +
6764 +
6765 +
6766 +
6767 +
6768 +
6769 +
6770 +
6771 +if test -n "$ac_tool_prefix"; then
6772 + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6773 +set dummy ${ac_tool_prefix}dlltool; ac_word=$2
6774 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6775 +$as_echo_n "checking for $ac_word... " >&6; }
6776 +if ${ac_cv_prog_DLLTOOL+:} false; then :
6777 + $as_echo_n "(cached) " >&6
6778 +else
6779 + if test -n "$DLLTOOL"; then
6780 + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6781 +else
6782 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6783 +for as_dir in $PATH
6784 +do
6785 + IFS=$as_save_IFS
6786 + test -z "$as_dir" && as_dir=.
6787 + for ac_exec_ext in '' $ac_executable_extensions; do
6788 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6789 + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
6790 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6791 + break 2
6792 + fi
6793 +done
6794 + done
6795 +IFS=$as_save_IFS
6796 +
6797 +fi
6798 +fi
6799 +DLLTOOL=$ac_cv_prog_DLLTOOL
6800 +if test -n "$DLLTOOL"; then
6801 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
6802 +$as_echo "$DLLTOOL" >&6; }
6803 +else
6804 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6805 +$as_echo "no" >&6; }
6806 +fi
6807 +
6808 +
6809 +fi
6810 +if test -z "$ac_cv_prog_DLLTOOL"; then
6811 + ac_ct_DLLTOOL=$DLLTOOL
6812 + # Extract the first word of "dlltool", so it can be a program name with args.
6813 +set dummy dlltool; ac_word=$2
6814 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6815 +$as_echo_n "checking for $ac_word... " >&6; }
6816 +if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
6817 + $as_echo_n "(cached) " >&6
6818 +else
6819 + if test -n "$ac_ct_DLLTOOL"; then
6820 + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6821 +else
6822 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6823 +for as_dir in $PATH
6824 +do
6825 + IFS=$as_save_IFS
6826 + test -z "$as_dir" && as_dir=.
6827 + for ac_exec_ext in '' $ac_executable_extensions; do
6828 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6829 + ac_cv_prog_ac_ct_DLLTOOL="dlltool"
6830 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6831 + break 2
6832 + fi
6833 +done
6834 + done
6835 +IFS=$as_save_IFS
6836 +
6837 +fi
6838 +fi
6839 +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6840 +if test -n "$ac_ct_DLLTOOL"; then
6841 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6842 +$as_echo "$ac_ct_DLLTOOL" >&6; }
6843 +else
6844 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6845 +$as_echo "no" >&6; }
6846 +fi
6847 +
6848 + if test "x$ac_ct_DLLTOOL" = x; then
6849 + DLLTOOL="false"
6850 + else
6851 + case $cross_compiling:$ac_tool_warned in
6852 +yes:)
6853 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6854 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6855 +ac_tool_warned=yes ;;
6856 +esac
6857 + DLLTOOL=$ac_ct_DLLTOOL
6858 + fi
6859 +else
6860 + DLLTOOL="$ac_cv_prog_DLLTOOL"
6861 +fi
6862 +
6863 +test -z "$DLLTOOL" && DLLTOOL=dlltool
6864 +
6865 +
6866 +
6867 +
6868 +
6869 +
6870 +
6871 +
6872 +
6873 +
6874 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
6875 +$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
6876 +if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
6877 + $as_echo_n "(cached) " >&6
6878 +else
6879 + lt_cv_sharedlib_from_linklib_cmd='unknown'
6880 +
6881 +case $host_os in
6882 +cygwin* | mingw* | pw32* | cegcc*)
6883 + # two different shell functions defined in ltmain.sh
6884 + # decide which to use based on capabilities of $DLLTOOL
6885 + case `$DLLTOOL --help 2>&1` in
6886 + *--identify-strict*)
6887 + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
6888 + ;;
6889 + *)
6890 + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
6891 + ;;
6892 + esac
6893 + ;;
6894 +*)
6895 + # fallback: assume linklib IS sharedlib
6896 + lt_cv_sharedlib_from_linklib_cmd="$ECHO"
6897 + ;;
6898 +esac
6899 +
6900 +fi
6901 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
6902 +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
6903 +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
6904 +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
6905 +
6906 +
6907 +
6908 +
6909 +
6910 +
6911 +
6912 +
6913 +if test -n "$ac_tool_prefix"; then
6914 + for ac_prog in ar
6915 + do
6916 + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6917 +set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6918 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6919 +$as_echo_n "checking for $ac_word... " >&6; }
6920 +if ${ac_cv_prog_AR+:} false; then :
6921 + $as_echo_n "(cached) " >&6
6922 +else
6923 + if test -n "$AR"; then
6924 + ac_cv_prog_AR="$AR" # Let the user override the test.
6925 +else
6926 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6927 +for as_dir in $PATH
6928 +do
6929 + IFS=$as_save_IFS
6930 + test -z "$as_dir" && as_dir=.
6931 + for ac_exec_ext in '' $ac_executable_extensions; do
6932 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6933 + ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
6934 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6935 + break 2
6936 + fi
6937 +done
6938 + done
6939 +IFS=$as_save_IFS
6940 +
6941 +fi
6942 +fi
6943 +AR=$ac_cv_prog_AR
6944 +if test -n "$AR"; then
6945 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6946 +$as_echo "$AR" >&6; }
6947 +else
6948 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6949 +$as_echo "no" >&6; }
6950 +fi
6951 +
6952 +
6953 + test -n "$AR" && break
6954 + done
6955 +fi
6956 +if test -z "$AR"; then
6957 + ac_ct_AR=$AR
6958 + for ac_prog in ar
6959 +do
6960 + # Extract the first word of "$ac_prog", so it can be a program name with args.
6961 +set dummy $ac_prog; ac_word=$2
6962 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6963 +$as_echo_n "checking for $ac_word... " >&6; }
6964 +if ${ac_cv_prog_ac_ct_AR+:} false; then :
6965 + $as_echo_n "(cached) " >&6
6966 +else
6967 + if test -n "$ac_ct_AR"; then
6968 + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6969 +else
6970 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6971 +for as_dir in $PATH
6972 +do
6973 + IFS=$as_save_IFS
6974 + test -z "$as_dir" && as_dir=.
6975 + for ac_exec_ext in '' $ac_executable_extensions; do
6976 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6977 + ac_cv_prog_ac_ct_AR="$ac_prog"
6978 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6979 + break 2
6980 + fi
6981 +done
6982 + done
6983 +IFS=$as_save_IFS
6984 +
6985 +fi
6986 +fi
6987 +ac_ct_AR=$ac_cv_prog_ac_ct_AR
6988 +if test -n "$ac_ct_AR"; then
6989 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6990 +$as_echo "$ac_ct_AR" >&6; }
6991 +else
6992 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6993 +$as_echo "no" >&6; }
6994 +fi
6995 +
6996 +
6997 + test -n "$ac_ct_AR" && break
6998 +done
6999 +
7000 + if test "x$ac_ct_AR" = x; then
7001 + AR="false"
7002 + else
7003 + case $cross_compiling:$ac_tool_warned in
7004 +yes:)
7005 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7006 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7007 +ac_tool_warned=yes ;;
7008 +esac
7009 + AR=$ac_ct_AR
7010 + fi
7011 +fi
7012 +
7013 +: ${AR=ar}
7014 +: ${AR_FLAGS=cru}
7015 +
7016 +
7017 +
7018 +
7019 +
7020 +
7021 +
7022 +
7023 +
7024 +
7025 +
7026 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
7027 +$as_echo_n "checking for archiver @FILE support... " >&6; }
7028 +if ${lt_cv_ar_at_file+:} false; then :
7029 + $as_echo_n "(cached) " >&6
7030 +else
7031 + lt_cv_ar_at_file=no
7032 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7033 +/* end confdefs.h. */
7034 +
7035 +int
7036 +main ()
7037 +{
7038 +
7039 + ;
7040 + return 0;
7041 +}
7042 +_ACEOF
7043 +if ac_fn_c_try_compile "$LINENO"; then :
7044 + echo conftest.$ac_objext > conftest.lst
7045 + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
7046 + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
7047 + (eval $lt_ar_try) 2>&5
7048 + ac_status=$?
7049 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7050 + test $ac_status = 0; }
7051 + if test "$ac_status" -eq 0; then
7052 + # Ensure the archiver fails upon bogus file names.
7053 + rm -f conftest.$ac_objext libconftest.a
7054 + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
7055 + (eval $lt_ar_try) 2>&5
7056 + ac_status=$?
7057 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7058 + test $ac_status = 0; }
7059 + if test "$ac_status" -ne 0; then
7060 + lt_cv_ar_at_file=@
7061 + fi
7062 + fi
7063 + rm -f conftest.* libconftest.a
7064 +
7065 +fi
7066 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7067 +
7068 +fi
7069 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
7070 +$as_echo "$lt_cv_ar_at_file" >&6; }
7071 +
7072 +if test "x$lt_cv_ar_at_file" = xno; then
7073 + archiver_list_spec=
7074 +else
7075 + archiver_list_spec=$lt_cv_ar_at_file
7076 +fi
7077 +
7078 +
7079 +
7080 +
7081 +
7082 +
7083 +
7084 +if test -n "$ac_tool_prefix"; then
7085 + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
7086 +set dummy ${ac_tool_prefix}strip; ac_word=$2
7087 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7088 +$as_echo_n "checking for $ac_word... " >&6; }
7089 +if ${ac_cv_prog_STRIP+:} false; then :
7090 + $as_echo_n "(cached) " >&6
7091 +else
7092 + if test -n "$STRIP"; then
7093 + ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
7094 +else
7095 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7096 +for as_dir in $PATH
7097 +do
7098 + IFS=$as_save_IFS
7099 + test -z "$as_dir" && as_dir=.
7100 + for ac_exec_ext in '' $ac_executable_extensions; do
7101 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7102 + ac_cv_prog_STRIP="${ac_tool_prefix}strip"
7103 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7104 + break 2
7105 + fi
7106 +done
7107 + done
7108 +IFS=$as_save_IFS
7109 +
7110 +fi
7111 +fi
7112 +STRIP=$ac_cv_prog_STRIP
7113 +if test -n "$STRIP"; then
7114 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
7115 +$as_echo "$STRIP" >&6; }
7116 +else
7117 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7118 +$as_echo "no" >&6; }
7119 +fi
7120 +
7121 +
7122 +fi
7123 +if test -z "$ac_cv_prog_STRIP"; then
7124 + ac_ct_STRIP=$STRIP
7125 + # Extract the first word of "strip", so it can be a program name with args.
7126 +set dummy strip; ac_word=$2
7127 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7128 +$as_echo_n "checking for $ac_word... " >&6; }
7129 +if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
7130 + $as_echo_n "(cached) " >&6
7131 +else
7132 + if test -n "$ac_ct_STRIP"; then
7133 + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
7134 +else
7135 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7136 +for as_dir in $PATH
7137 +do
7138 + IFS=$as_save_IFS
7139 + test -z "$as_dir" && as_dir=.
7140 + for ac_exec_ext in '' $ac_executable_extensions; do
7141 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7142 + ac_cv_prog_ac_ct_STRIP="strip"
7143 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7144 + break 2
7145 + fi
7146 +done
7147 + done
7148 +IFS=$as_save_IFS
7149 +
7150 +fi
7151 +fi
7152 +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
7153 +if test -n "$ac_ct_STRIP"; then
7154 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
7155 +$as_echo "$ac_ct_STRIP" >&6; }
7156 +else
7157 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7158 +$as_echo "no" >&6; }
7159 +fi
7160 +
7161 + if test "x$ac_ct_STRIP" = x; then
7162 + STRIP=":"
7163 + else
7164 + case $cross_compiling:$ac_tool_warned in
7165 +yes:)
7166 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7167 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7168 +ac_tool_warned=yes ;;
7169 +esac
7170 + STRIP=$ac_ct_STRIP
7171 + fi
7172 +else
7173 + STRIP="$ac_cv_prog_STRIP"
7174 +fi
7175 +
7176 +test -z "$STRIP" && STRIP=:
7177 +
7178 +
7179 +
7180 +
7181 +
7182 +
7183 +if test -n "$ac_tool_prefix"; then
7184 + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7185 +set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7186 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7187 +$as_echo_n "checking for $ac_word... " >&6; }
7188 +if ${ac_cv_prog_RANLIB+:} false; then :
7189 + $as_echo_n "(cached) " >&6
7190 +else
7191 + if test -n "$RANLIB"; then
7192 + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7193 +else
7194 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7195 +for as_dir in $PATH
7196 +do
7197 + IFS=$as_save_IFS
7198 + test -z "$as_dir" && as_dir=.
7199 + for ac_exec_ext in '' $ac_executable_extensions; do
7200 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7201 + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7202 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7203 + break 2
7204 + fi
7205 +done
7206 + done
7207 +IFS=$as_save_IFS
7208 +
7209 +fi
7210 +fi
7211 +RANLIB=$ac_cv_prog_RANLIB
7212 +if test -n "$RANLIB"; then
7213 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7214 +$as_echo "$RANLIB" >&6; }
7215 +else
7216 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7217 +$as_echo "no" >&6; }
7218 +fi
7219 +
7220 +
7221 +fi
7222 +if test -z "$ac_cv_prog_RANLIB"; then
7223 + ac_ct_RANLIB=$RANLIB
7224 + # Extract the first word of "ranlib", so it can be a program name with args.
7225 +set dummy ranlib; ac_word=$2
7226 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7227 +$as_echo_n "checking for $ac_word... " >&6; }
7228 +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
7229 + $as_echo_n "(cached) " >&6
7230 +else
7231 + if test -n "$ac_ct_RANLIB"; then
7232 + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7233 +else
7234 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7235 +for as_dir in $PATH
7236 +do
7237 + IFS=$as_save_IFS
7238 + test -z "$as_dir" && as_dir=.
7239 + for ac_exec_ext in '' $ac_executable_extensions; do
7240 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7241 + ac_cv_prog_ac_ct_RANLIB="ranlib"
7242 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7243 + break 2
7244 + fi
7245 +done
7246 + done
7247 +IFS=$as_save_IFS
7248 +
7249 +fi
7250 +fi
7251 +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7252 +if test -n "$ac_ct_RANLIB"; then
7253 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7254 +$as_echo "$ac_ct_RANLIB" >&6; }
7255 +else
7256 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7257 +$as_echo "no" >&6; }
7258 +fi
7259 +
7260 + if test "x$ac_ct_RANLIB" = x; then
7261 + RANLIB=":"
7262 + else
7263 + case $cross_compiling:$ac_tool_warned in
7264 +yes:)
7265 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7266 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7267 +ac_tool_warned=yes ;;
7268 +esac
7269 + RANLIB=$ac_ct_RANLIB
7270 + fi
7271 +else
7272 + RANLIB="$ac_cv_prog_RANLIB"
7273 +fi
7274 +
7275 +test -z "$RANLIB" && RANLIB=:
7276 +
7277 +
7278 +
7279 +
7280 +
7281 +
7282 +# Determine commands to create old-style static archives.
7283 +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
7284 +old_postinstall_cmds='chmod 644 $oldlib'
7285 +old_postuninstall_cmds=
7286 +
7287 +if test -n "$RANLIB"; then
7288 + case $host_os in
7289 + openbsd*)
7290 + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
7291 + ;;
7292 + *)
7293 + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
7294 + ;;
7295 + esac
7296 + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
7297 +fi
7298 +
7299 +case $host_os in
7300 + darwin*)
7301 + lock_old_archive_extraction=yes ;;
7302 + *)
7303 + lock_old_archive_extraction=no ;;
7304 +esac
7305 +
7306 +
7307 +
7308 +
7309 +
7310 +
7311 +
7312 +
7313 +
7314 +
7315 +
7316 +
7317 +
7318 +
7319 +
7320 +
7321 +
7322 +
7323 +
7324 +
7325 +
7326 +
7327 +
7328 +
7329 +
7330 +
7331 +
7332 +
7333 +
7334 +
7335 +
7336 +
7337 +
7338 +
7339 +
7340 +
7341 +
7342 +
7343 +
7344 +# If no C compiler was specified, use CC.
7345 +LTCC=${LTCC-"$CC"}
7346 +
7347 +# If no C compiler flags were specified, use CFLAGS.
7348 +LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
7349 +
7350 +# Allow CC to be a program name with arguments.
7351 +compiler=$CC
7352 +
7353 +
7354 +# Check for command to grab the raw symbol name followed by C symbol from nm.
7355 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
7356 +$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
7357 +if ${lt_cv_sys_global_symbol_pipe+:} false; then :
7358 + $as_echo_n "(cached) " >&6
7359 +else
7360 +
7361 +# These are sane defaults that work on at least a few old systems.
7362 +# [They come from Ultrix. What could be older than Ultrix?!! ;)]
7363 +
7364 +# Character class describing NM global symbol codes.
7365 +symcode='[BCDEGRST]'
7366 +
7367 +# Regexp to match symbols that can be accessed directly from C.
7368 +sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
7369 +
7370 +# Define system-specific variables.
7371 +case $host_os in
7372 +aix*)
7373 + symcode='[BCDT]'
7374 + ;;
7375 +cygwin* | mingw* | pw32* | cegcc*)
7376 + symcode='[ABCDGISTW]'
7377 + ;;
7378 +hpux*)
7379 + if test "$host_cpu" = ia64; then
7380 + symcode='[ABCDEGRST]'
7381 + fi
7382 + ;;
7383 +irix* | nonstopux*)
7384 + symcode='[BCDEGRST]'
7385 + ;;
7386 +osf*)
7387 + symcode='[BCDEGQRST]'
7388 + ;;
7389 +solaris*)
7390 + symcode='[BDRT]'
7391 + ;;
7392 +sco3.2v5*)
7393 + symcode='[DT]'
7394 + ;;
7395 +sysv4.2uw2*)
7396 + symcode='[DT]'
7397 + ;;
7398 +sysv5* | sco5v6* | unixware* | OpenUNIX*)
7399 + symcode='[ABDT]'
7400 + ;;
7401 +sysv4)
7402 + symcode='[DFNSTU]'
7403 + ;;
7404 +esac
7405 +
7406 +# If we're using GNU nm, then use its standard symbol codes.
7407 +case `$NM -V 2>&1` in
7408 +*GNU* | *'with BFD'*)
7409 + symcode='[ABCDGIRSTW]' ;;
7410 +esac
7411 +
7412 +# Transform an extracted symbol line into a proper C declaration.
7413 +# Some systems (esp. on ia64) link data and code symbols differently,
7414 +# so use this general approach.
7415 +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
7416 +
7417 +# Transform an extracted symbol line into symbol name and symbol address
7418 +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
7419 +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
7420 +
7421 +# Handle CRLF in mingw tool chain
7422 +opt_cr=
7423 +case $build_os in
7424 +mingw*)
7425 + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
7426 + ;;
7427 +esac
7428 +
7429 +# Try without a prefix underscore, then with it.
7430 +for ac_symprfx in "" "_"; do
7431 +
7432 + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
7433 + symxfrm="\\1 $ac_symprfx\\2 \\2"
7434 +
7435 + # Write the raw and C identifiers.
7436 + if test "$lt_cv_nm_interface" = "MS dumpbin"; then
7437 + # Fake it for dumpbin and say T for any non-static function
7438 + # and D for any global variable.
7439 + # Also find C++ and __fastcall symbols from MSVC++,
7440 + # which start with @ or ?.
7441 + lt_cv_sys_global_symbol_pipe="$AWK '"\
7442 +" {last_section=section; section=\$ 3};"\
7443 +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
7444 +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
7445 +" \$ 0!~/External *\|/{next};"\
7446 +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
7447 +" {if(hide[section]) next};"\
7448 +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
7449 +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
7450 +" s[1]~/^[@?]/{print s[1], s[1]; next};"\
7451 +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
7452 +" ' prfx=^$ac_symprfx"
7453 + else
7454 + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
7455 + fi
7456 + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
7457 +
7458 + # Check to see that the pipe works correctly.
7459 + pipe_works=no
7460 +
7461 + rm -f conftest*
7462 + cat > conftest.$ac_ext <<_LT_EOF
7463 +#ifdef __cplusplus
7464 +extern "C" {
7465 +#endif
7466 +char nm_test_var;
7467 +void nm_test_func(void);
7468 +void nm_test_func(void){}
7469 +#ifdef __cplusplus
7470 +}
7471 +#endif
7472 +int main(){nm_test_var='a';nm_test_func();return(0);}
7473 +_LT_EOF
7474 +
7475 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7476 + (eval $ac_compile) 2>&5
7477 + ac_status=$?
7478 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7479 + test $ac_status = 0; }; then
7480 + # Now try to grab the symbols.
7481 + nlist=conftest.nm
7482 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
7483 + (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
7484 + ac_status=$?
7485 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7486 + test $ac_status = 0; } && test -s "$nlist"; then
7487 + # Try sorting and uniquifying the output.
7488 + if sort "$nlist" | uniq > "$nlist"T; then
7489 + mv -f "$nlist"T "$nlist"
7490 + else
7491 + rm -f "$nlist"T
7492 + fi
7493 +
7494 + # Make sure that we snagged all the symbols we need.
7495 + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
7496 + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
7497 + cat <<_LT_EOF > conftest.$ac_ext
7498 +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
7499 +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
7500 +/* DATA imports from DLLs on WIN32 con't be const, because runtime
7501 + relocations are performed -- see ld's documentation on pseudo-relocs. */
7502 +# define LT_DLSYM_CONST
7503 +#elif defined(__osf__)
7504 +/* This system does not cope well with relocations in const data. */
7505 +# define LT_DLSYM_CONST
7506 +#else
7507 +# define LT_DLSYM_CONST const
7508 +#endif
7509 +
7510 +#ifdef __cplusplus
7511 +extern "C" {
7512 +#endif
7513 +
7514 +_LT_EOF
7515 + # Now generate the symbol file.
7516 + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
7517 +
7518 + cat <<_LT_EOF >> conftest.$ac_ext
7519 +
7520 +/* The mapping between symbol names and symbols. */
7521 +LT_DLSYM_CONST struct {
7522 + const char *name;
7523 + void *address;
7524 +}
7525 +lt__PROGRAM__LTX_preloaded_symbols[] =
7526 +{
7527 + { "@PROGRAM@", (void *) 0 },
7528 +_LT_EOF
7529 + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
7530 + cat <<\_LT_EOF >> conftest.$ac_ext
7531 + {0, (void *) 0}
7532 +};
7533 +
7534 +/* This works around a problem in FreeBSD linker */
7535 +#ifdef FREEBSD_WORKAROUND
7536 +static const void *lt_preloaded_setup() {
7537 + return lt__PROGRAM__LTX_preloaded_symbols;
7538 +}
7539 +#endif
7540 +
7541 +#ifdef __cplusplus
7542 +}
7543 +#endif
7544 +_LT_EOF
7545 + # Now try linking the two files.
7546 + mv conftest.$ac_objext conftstm.$ac_objext
7547 + lt_globsym_save_LIBS=$LIBS
7548 + lt_globsym_save_CFLAGS=$CFLAGS
7549 + LIBS="conftstm.$ac_objext"
7550 + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
7551 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
7552 + (eval $ac_link) 2>&5
7553 + ac_status=$?
7554 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7555 + test $ac_status = 0; } && test -s conftest${ac_exeext}; then
7556 + pipe_works=yes
7557 + fi
7558 + LIBS=$lt_globsym_save_LIBS
7559 + CFLAGS=$lt_globsym_save_CFLAGS
7560 + else
7561 + echo "cannot find nm_test_func in $nlist" >&5
7562 + fi
7563 + else
7564 + echo "cannot find nm_test_var in $nlist" >&5
7565 + fi
7566 + else
7567 + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
7568 + fi
7569 + else
7570 + echo "$progname: failed program was:" >&5
7571 + cat conftest.$ac_ext >&5
7572 + fi
7573 + rm -rf conftest* conftst*
7574 +
7575 + # Do not use the global_symbol_pipe unless it works.
7576 + if test "$pipe_works" = yes; then
7577 + break
7578 + else
7579 + lt_cv_sys_global_symbol_pipe=
7580 + fi
7581 +done
7582 +
7583 +fi
7584 +
7585 +if test -z "$lt_cv_sys_global_symbol_pipe"; then
7586 + lt_cv_sys_global_symbol_to_cdecl=
7587 +fi
7588 +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
7589 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
7590 +$as_echo "failed" >&6; }
7591 +else
7592 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
7593 +$as_echo "ok" >&6; }
7594 +fi
7595 +
7596 +# Response file support.
7597 +if test "$lt_cv_nm_interface" = "MS dumpbin"; then
7598 + nm_file_list_spec='@'
7599 +elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
7600 + nm_file_list_spec='@'
7601 +fi
7602 +
7603 +
7604 +
7605 +
7606 +
7607 +
7608 +
7609 +
7610 +
7611 +
7612 +
7613 +
7614 +
7615 +
7616 +
7617 +
7618 +
7619 +
7620 +
7621 +
7622 +
7623 +
7624 +
7625 +
7626 +
7627 +
7628 +
7629 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
7630 +$as_echo_n "checking for sysroot... " >&6; }
7631 +
7632 +# Check whether --with-sysroot was given.
7633 +if test "${with_sysroot+set}" = set; then :
7634 + withval=$with_sysroot;
7635 +else
7636 + with_sysroot=no
7637 +fi
7638 +
7639 +
7640 +lt_sysroot=
7641 +case ${with_sysroot} in #(
7642 + yes)
7643 + if test "$GCC" = yes; then
7644 + lt_sysroot=`$CC --print-sysroot 2>/dev/null`
7645 + fi
7646 + ;; #(
7647 + /*)
7648 + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
7649 + ;; #(
7650 + no|'')
7651 + ;; #(
7652 + *)
7653 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5
7654 +$as_echo "${with_sysroot}" >&6; }
7655 + as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
7656 + ;;
7657 +esac
7658 +
7659 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
7660 +$as_echo "${lt_sysroot:-no}" >&6; }
7661 +
7662 +
7663 +
7664 +
7665 +
7666 +# Check whether --enable-libtool-lock was given.
7667 +if test "${enable_libtool_lock+set}" = set; then :
7668 + enableval=$enable_libtool_lock;
7669 +fi
7670 +
7671 +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
7672 +
7673 +# Some flags need to be propagated to the compiler or linker for good
7674 +# libtool support.
7675 +case $host in
7676 +ia64-*-hpux*)
7677 + # Find out which ABI we are using.
7678 + echo 'int i;' > conftest.$ac_ext
7679 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7680 + (eval $ac_compile) 2>&5
7681 + ac_status=$?
7682 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7683 + test $ac_status = 0; }; then
7684 + case `/usr/bin/file conftest.$ac_objext` in
7685 + *ELF-32*)
7686 + HPUX_IA64_MODE="32"
7687 + ;;
7688 + *ELF-64*)
7689 + HPUX_IA64_MODE="64"
7690 + ;;
7691 + esac
7692 + fi
7693 + rm -rf conftest*
7694 + ;;
7695 +*-*-irix6*)
7696 + # Find out which ABI we are using.
7697 + echo '#line '$LINENO' "configure"' > conftest.$ac_ext
7698 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7699 + (eval $ac_compile) 2>&5
7700 + ac_status=$?
7701 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7702 + test $ac_status = 0; }; then
7703 + if test "$lt_cv_prog_gnu_ld" = yes; then
7704 + case `/usr/bin/file conftest.$ac_objext` in
7705 + *32-bit*)
7706 + LD="${LD-ld} -melf32bsmip"
7707 + ;;
7708 + *N32*)
7709 + LD="${LD-ld} -melf32bmipn32"
7710 + ;;
7711 + *64-bit*)
7712 + LD="${LD-ld} -melf64bmip"
7713 + ;;
7714 + esac
7715 + else
7716 + case `/usr/bin/file conftest.$ac_objext` in
7717 + *32-bit*)
7718 + LD="${LD-ld} -32"
7719 + ;;
7720 + *N32*)
7721 + LD="${LD-ld} -n32"
7722 + ;;
7723 + *64-bit*)
7724 + LD="${LD-ld} -64"
7725 + ;;
7726 + esac
7727 + fi
7728 + fi
7729 + rm -rf conftest*
7730 + ;;
7731 +
7732 +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
7733 +s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
7734 + # Find out which ABI we are using.
7735 + echo 'int i;' > conftest.$ac_ext
7736 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7737 + (eval $ac_compile) 2>&5
7738 + ac_status=$?
7739 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7740 + test $ac_status = 0; }; then
7741 + case `/usr/bin/file conftest.o` in
7742 + *32-bit*)
7743 + case $host in
7744 + x86_64-*kfreebsd*-gnu)
7745 + LD="${LD-ld} -m elf_i386_fbsd"
7746 + ;;
7747 + x86_64-*linux*)
7748 + case `/usr/bin/file conftest.o` in
7749 + *x86-64*)
7750 + LD="${LD-ld} -m elf32_x86_64"
7751 + ;;
7752 + *)
7753 + LD="${LD-ld} -m elf_i386"
7754 + ;;
7755 + esac
7756 + ;;
7757 + ppc64-*linux*|powerpc64-*linux*)
7758 + LD="${LD-ld} -m elf32ppclinux"
7759 + ;;
7760 + s390x-*linux*)
7761 + LD="${LD-ld} -m elf_s390"
7762 + ;;
7763 + sparc64-*linux*)
7764 + LD="${LD-ld} -m elf32_sparc"
7765 + ;;
7766 + esac
7767 + ;;
7768 + *64-bit*)
7769 + case $host in
7770 + x86_64-*kfreebsd*-gnu)
7771 + LD="${LD-ld} -m elf_x86_64_fbsd"
7772 + ;;
7773 + x86_64-*linux*)
7774 + LD="${LD-ld} -m elf_x86_64"
7775 + ;;
7776 + ppc*-*linux*|powerpc*-*linux*)
7777 + LD="${LD-ld} -m elf64ppc"
7778 + ;;
7779 + s390*-*linux*|s390*-*tpf*)
7780 + LD="${LD-ld} -m elf64_s390"
7781 + ;;
7782 + sparc*-*linux*)
7783 + LD="${LD-ld} -m elf64_sparc"
7784 + ;;
7785 + esac
7786 + ;;
7787 + esac
7788 + fi
7789 + rm -rf conftest*
7790 + ;;
7791 +
7792 +*-*-sco3.2v5*)
7793 + # On SCO OpenServer 5, we need -belf to get full-featured binaries.
7794 + SAVE_CFLAGS="$CFLAGS"
7795 + CFLAGS="$CFLAGS -belf"
7796 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
7797 +$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
7798 +if ${lt_cv_cc_needs_belf+:} false; then :
7799 + $as_echo_n "(cached) " >&6
7800 +else
7801 + ac_ext=c
7802 +ac_cpp='$CPP $CPPFLAGS'
7803 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7804 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7805 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
7806 +
7807 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7808 +/* end confdefs.h. */
7809 +
7810 +int
7811 +main ()
7812 +{
7813 +
7814 + ;
7815 + return 0;
7816 +}
7817 +_ACEOF
7818 +if ac_fn_c_try_link "$LINENO"; then :
7819 + lt_cv_cc_needs_belf=yes
7820 +else
7821 + lt_cv_cc_needs_belf=no
7822 +fi
7823 +rm -f core conftest.err conftest.$ac_objext \
7824 + conftest$ac_exeext conftest.$ac_ext
7825 + ac_ext=c
7826 +ac_cpp='$CPP $CPPFLAGS'
7827 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7828 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7829 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
7830 +
7831 +fi
7832 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
7833 +$as_echo "$lt_cv_cc_needs_belf" >&6; }
7834 + if test x"$lt_cv_cc_needs_belf" != x"yes"; then
7835 + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
7836 + CFLAGS="$SAVE_CFLAGS"
7837 + fi
7838 + ;;
7839 +*-*solaris*)
7840 + # Find out which ABI we are using.
7841 + echo 'int i;' > conftest.$ac_ext
7842 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7843 + (eval $ac_compile) 2>&5
7844 + ac_status=$?
7845 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7846 + test $ac_status = 0; }; then
7847 + case `/usr/bin/file conftest.o` in
7848 + *64-bit*)
7849 + case $lt_cv_prog_gnu_ld in
7850 + yes*)
7851 + case $host in
7852 + i?86-*-solaris*)
7853 + LD="${LD-ld} -m elf_x86_64"
7854 + ;;
7855 + sparc*-*-solaris*)
7856 + LD="${LD-ld} -m elf64_sparc"
7857 + ;;
7858 + esac
7859 + # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
7860 + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
7861 + LD="${LD-ld}_sol2"
7862 + fi
7863 + ;;
7864 + *)
7865 + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
7866 + LD="${LD-ld} -64"
7867 + fi
7868 + ;;
7869 + esac
7870 + ;;
7871 + esac
7872 + fi
7873 + rm -rf conftest*
7874 + ;;
7875 +esac
7876 +
7877 +need_locks="$enable_libtool_lock"
7878 +
7879 +if test -n "$ac_tool_prefix"; then
7880 + # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
7881 +set dummy ${ac_tool_prefix}mt; ac_word=$2
7882 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7883 +$as_echo_n "checking for $ac_word... " >&6; }
7884 +if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
7885 + $as_echo_n "(cached) " >&6
7886 +else
7887 + if test -n "$MANIFEST_TOOL"; then
7888 + ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
7889 +else
7890 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7891 +for as_dir in $PATH
7892 +do
7893 + IFS=$as_save_IFS
7894 + test -z "$as_dir" && as_dir=.
7895 + for ac_exec_ext in '' $ac_executable_extensions; do
7896 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7897 + ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
7898 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7899 + break 2
7900 + fi
7901 +done
7902 + done
7903 +IFS=$as_save_IFS
7904 +
7905 +fi
7906 +fi
7907 +MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
7908 +if test -n "$MANIFEST_TOOL"; then
7909 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
7910 +$as_echo "$MANIFEST_TOOL" >&6; }
7911 +else
7912 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7913 +$as_echo "no" >&6; }
7914 +fi
7915 +
7916 +
7917 +fi
7918 +if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
7919 + ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
7920 + # Extract the first word of "mt", so it can be a program name with args.
7921 +set dummy mt; ac_word=$2
7922 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7923 +$as_echo_n "checking for $ac_word... " >&6; }
7924 +if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
7925 + $as_echo_n "(cached) " >&6
7926 +else
7927 + if test -n "$ac_ct_MANIFEST_TOOL"; then
7928 + ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
7929 +else
7930 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7931 +for as_dir in $PATH
7932 +do
7933 + IFS=$as_save_IFS
7934 + test -z "$as_dir" && as_dir=.
7935 + for ac_exec_ext in '' $ac_executable_extensions; do
7936 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7937 + ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
7938 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7939 + break 2
7940 + fi
7941 +done
7942 + done
7943 +IFS=$as_save_IFS
7944 +
7945 +fi
7946 +fi
7947 +ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
7948 +if test -n "$ac_ct_MANIFEST_TOOL"; then
7949 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
7950 +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
7951 +else
7952 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7953 +$as_echo "no" >&6; }
7954 +fi
7955 +
7956 + if test "x$ac_ct_MANIFEST_TOOL" = x; then
7957 + MANIFEST_TOOL=":"
7958 + else
7959 + case $cross_compiling:$ac_tool_warned in
7960 +yes:)
7961 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7962 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7963 +ac_tool_warned=yes ;;
7964 +esac
7965 + MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
7966 + fi
7967 +else
7968 + MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
7969 +fi
7970 +
7971 +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
7972 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
7973 +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
7974 +if ${lt_cv_path_mainfest_tool+:} false; then :
7975 + $as_echo_n "(cached) " >&6
7976 +else
7977 + lt_cv_path_mainfest_tool=no
7978 + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
7979 + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
7980 + cat conftest.err >&5
7981 + if $GREP 'Manifest Tool' conftest.out > /dev/null; then
7982 + lt_cv_path_mainfest_tool=yes
7983 + fi
7984 + rm -f conftest*
7985 +fi
7986 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
7987 +$as_echo "$lt_cv_path_mainfest_tool" >&6; }
7988 +if test "x$lt_cv_path_mainfest_tool" != xyes; then
7989 + MANIFEST_TOOL=:
7990 +fi
7991 +
7992 +
7993 +
7994 +
7995 +
7996 +
7997 + case $host_os in
7998 + rhapsody* | darwin*)
7999 + if test -n "$ac_tool_prefix"; then
8000 + # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
8001 +set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
8002 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8003 +$as_echo_n "checking for $ac_word... " >&6; }
8004 +if ${ac_cv_prog_DSYMUTIL+:} false; then :
8005 + $as_echo_n "(cached) " >&6
8006 +else
8007 + if test -n "$DSYMUTIL"; then
8008 + ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
8009 +else
8010 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8011 +for as_dir in $PATH
8012 +do
8013 + IFS=$as_save_IFS
8014 + test -z "$as_dir" && as_dir=.
8015 + for ac_exec_ext in '' $ac_executable_extensions; do
8016 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8017 + ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
8018 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8019 + break 2
8020 + fi
8021 +done
8022 + done
8023 +IFS=$as_save_IFS
8024 +
8025 +fi
8026 +fi
8027 +DSYMUTIL=$ac_cv_prog_DSYMUTIL
8028 +if test -n "$DSYMUTIL"; then
8029 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
8030 +$as_echo "$DSYMUTIL" >&6; }
8031 +else
8032 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8033 +$as_echo "no" >&6; }
8034 +fi
8035 +
8036 +
8037 +fi
8038 +if test -z "$ac_cv_prog_DSYMUTIL"; then
8039 + ac_ct_DSYMUTIL=$DSYMUTIL
8040 + # Extract the first word of "dsymutil", so it can be a program name with args.
8041 +set dummy dsymutil; ac_word=$2
8042 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8043 +$as_echo_n "checking for $ac_word... " >&6; }
8044 +if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
8045 + $as_echo_n "(cached) " >&6
8046 +else
8047 + if test -n "$ac_ct_DSYMUTIL"; then
8048 + ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
8049 +else
8050 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8051 +for as_dir in $PATH
8052 +do
8053 + IFS=$as_save_IFS
8054 + test -z "$as_dir" && as_dir=.
8055 + for ac_exec_ext in '' $ac_executable_extensions; do
8056 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8057 + ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
8058 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8059 + break 2
8060 + fi
8061 +done
8062 + done
8063 +IFS=$as_save_IFS
8064 +
8065 +fi
8066 +fi
8067 +ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
8068 +if test -n "$ac_ct_DSYMUTIL"; then
8069 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
8070 +$as_echo "$ac_ct_DSYMUTIL" >&6; }
8071 +else
8072 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8073 +$as_echo "no" >&6; }
8074 +fi
8075 +
8076 + if test "x$ac_ct_DSYMUTIL" = x; then
8077 + DSYMUTIL=":"
8078 + else
8079 + case $cross_compiling:$ac_tool_warned in
8080 +yes:)
8081 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8082 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8083 +ac_tool_warned=yes ;;
8084 +esac
8085 + DSYMUTIL=$ac_ct_DSYMUTIL
8086 + fi
8087 +else
8088 + DSYMUTIL="$ac_cv_prog_DSYMUTIL"
8089 +fi
8090 +
8091 + if test -n "$ac_tool_prefix"; then
8092 + # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
8093 +set dummy ${ac_tool_prefix}nmedit; ac_word=$2
8094 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8095 +$as_echo_n "checking for $ac_word... " >&6; }
8096 +if ${ac_cv_prog_NMEDIT+:} false; then :
8097 + $as_echo_n "(cached) " >&6
8098 +else
8099 + if test -n "$NMEDIT"; then
8100 + ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
8101 +else
8102 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8103 +for as_dir in $PATH
8104 +do
8105 + IFS=$as_save_IFS
8106 + test -z "$as_dir" && as_dir=.
8107 + for ac_exec_ext in '' $ac_executable_extensions; do
8108 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8109 + ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
8110 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8111 + break 2
8112 + fi
8113 +done
8114 + done
8115 +IFS=$as_save_IFS
8116 +
8117 +fi
8118 +fi
8119 +NMEDIT=$ac_cv_prog_NMEDIT
8120 +if test -n "$NMEDIT"; then
8121 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
8122 +$as_echo "$NMEDIT" >&6; }
8123 +else
8124 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8125 +$as_echo "no" >&6; }
8126 +fi
8127 +
8128 +
8129 +fi
8130 +if test -z "$ac_cv_prog_NMEDIT"; then
8131 + ac_ct_NMEDIT=$NMEDIT
8132 + # Extract the first word of "nmedit", so it can be a program name with args.
8133 +set dummy nmedit; ac_word=$2
8134 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8135 +$as_echo_n "checking for $ac_word... " >&6; }
8136 +if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
8137 + $as_echo_n "(cached) " >&6
8138 +else
8139 + if test -n "$ac_ct_NMEDIT"; then
8140 + ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
8141 +else
8142 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8143 +for as_dir in $PATH
8144 +do
8145 + IFS=$as_save_IFS
8146 + test -z "$as_dir" && as_dir=.
8147 + for ac_exec_ext in '' $ac_executable_extensions; do
8148 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8149 + ac_cv_prog_ac_ct_NMEDIT="nmedit"
8150 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8151 + break 2
8152 + fi
8153 +done
8154 + done
8155 +IFS=$as_save_IFS
8156 +
8157 +fi
8158 +fi
8159 +ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
8160 +if test -n "$ac_ct_NMEDIT"; then
8161 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
8162 +$as_echo "$ac_ct_NMEDIT" >&6; }
8163 +else
8164 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8165 +$as_echo "no" >&6; }
8166 +fi
8167 +
8168 + if test "x$ac_ct_NMEDIT" = x; then
8169 + NMEDIT=":"
8170 + else
8171 + case $cross_compiling:$ac_tool_warned in
8172 +yes:)
8173 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8174 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8175 +ac_tool_warned=yes ;;
8176 +esac
8177 + NMEDIT=$ac_ct_NMEDIT
8178 + fi
8179 +else
8180 + NMEDIT="$ac_cv_prog_NMEDIT"
8181 +fi
8182 +
8183 + if test -n "$ac_tool_prefix"; then
8184 + # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
8185 +set dummy ${ac_tool_prefix}lipo; ac_word=$2
8186 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8187 +$as_echo_n "checking for $ac_word... " >&6; }
8188 +if ${ac_cv_prog_LIPO+:} false; then :
8189 + $as_echo_n "(cached) " >&6
8190 +else
8191 + if test -n "$LIPO"; then
8192 + ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
8193 +else
8194 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8195 +for as_dir in $PATH
8196 +do
8197 + IFS=$as_save_IFS
8198 + test -z "$as_dir" && as_dir=.
8199 + for ac_exec_ext in '' $ac_executable_extensions; do
8200 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8201 + ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
8202 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8203 + break 2
8204 + fi
8205 +done
8206 + done
8207 +IFS=$as_save_IFS
8208 +
8209 +fi
8210 +fi
8211 +LIPO=$ac_cv_prog_LIPO
8212 +if test -n "$LIPO"; then
8213 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
8214 +$as_echo "$LIPO" >&6; }
8215 +else
8216 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8217 +$as_echo "no" >&6; }
8218 +fi
8219 +
8220 +
8221 +fi
8222 +if test -z "$ac_cv_prog_LIPO"; then
8223 + ac_ct_LIPO=$LIPO
8224 + # Extract the first word of "lipo", so it can be a program name with args.
8225 +set dummy lipo; ac_word=$2
8226 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8227 +$as_echo_n "checking for $ac_word... " >&6; }
8228 +if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
8229 + $as_echo_n "(cached) " >&6
8230 +else
8231 + if test -n "$ac_ct_LIPO"; then
8232 + ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
8233 +else
8234 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8235 +for as_dir in $PATH
8236 +do
8237 + IFS=$as_save_IFS
8238 + test -z "$as_dir" && as_dir=.
8239 + for ac_exec_ext in '' $ac_executable_extensions; do
8240 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8241 + ac_cv_prog_ac_ct_LIPO="lipo"
8242 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8243 + break 2
8244 + fi
8245 +done
8246 + done
8247 +IFS=$as_save_IFS
8248 +
8249 +fi
8250 +fi
8251 +ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
8252 +if test -n "$ac_ct_LIPO"; then
8253 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
8254 +$as_echo "$ac_ct_LIPO" >&6; }
8255 +else
8256 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8257 +$as_echo "no" >&6; }
8258 +fi
8259 +
8260 + if test "x$ac_ct_LIPO" = x; then
8261 + LIPO=":"
8262 + else
8263 + case $cross_compiling:$ac_tool_warned in
8264 +yes:)
8265 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8266 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8267 +ac_tool_warned=yes ;;
8268 +esac
8269 + LIPO=$ac_ct_LIPO
8270 + fi
8271 +else
8272 + LIPO="$ac_cv_prog_LIPO"
8273 +fi
8274 +
8275 + if test -n "$ac_tool_prefix"; then
8276 + # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
8277 +set dummy ${ac_tool_prefix}otool; ac_word=$2
8278 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8279 +$as_echo_n "checking for $ac_word... " >&6; }
8280 +if ${ac_cv_prog_OTOOL+:} false; then :
8281 + $as_echo_n "(cached) " >&6
8282 +else
8283 + if test -n "$OTOOL"; then
8284 + ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
8285 +else
8286 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8287 +for as_dir in $PATH
8288 +do
8289 + IFS=$as_save_IFS
8290 + test -z "$as_dir" && as_dir=.
8291 + for ac_exec_ext in '' $ac_executable_extensions; do
8292 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8293 + ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
8294 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8295 + break 2
8296 + fi
8297 +done
8298 + done
8299 +IFS=$as_save_IFS
8300 +
8301 +fi
8302 +fi
8303 +OTOOL=$ac_cv_prog_OTOOL
8304 +if test -n "$OTOOL"; then
8305 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
8306 +$as_echo "$OTOOL" >&6; }
8307 +else
8308 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8309 +$as_echo "no" >&6; }
8310 +fi
8311 +
8312 +
8313 +fi
8314 +if test -z "$ac_cv_prog_OTOOL"; then
8315 + ac_ct_OTOOL=$OTOOL
8316 + # Extract the first word of "otool", so it can be a program name with args.
8317 +set dummy otool; ac_word=$2
8318 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8319 +$as_echo_n "checking for $ac_word... " >&6; }
8320 +if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
8321 + $as_echo_n "(cached) " >&6
8322 +else
8323 + if test -n "$ac_ct_OTOOL"; then
8324 + ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
8325 +else
8326 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8327 +for as_dir in $PATH
8328 +do
8329 + IFS=$as_save_IFS
8330 + test -z "$as_dir" && as_dir=.
8331 + for ac_exec_ext in '' $ac_executable_extensions; do
8332 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8333 + ac_cv_prog_ac_ct_OTOOL="otool"
8334 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8335 + break 2
8336 + fi
8337 +done
8338 + done
8339 +IFS=$as_save_IFS
8340 +
8341 +fi
8342 +fi
8343 +ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
8344 +if test -n "$ac_ct_OTOOL"; then
8345 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
8346 +$as_echo "$ac_ct_OTOOL" >&6; }
8347 +else
8348 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8349 +$as_echo "no" >&6; }
8350 +fi
8351 +
8352 + if test "x$ac_ct_OTOOL" = x; then
8353 + OTOOL=":"
8354 + else
8355 + case $cross_compiling:$ac_tool_warned in
8356 +yes:)
8357 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8358 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8359 +ac_tool_warned=yes ;;
8360 +esac
8361 + OTOOL=$ac_ct_OTOOL
8362 + fi
8363 +else
8364 + OTOOL="$ac_cv_prog_OTOOL"
8365 +fi
8366 +
8367 + if test -n "$ac_tool_prefix"; then
8368 + # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
8369 +set dummy ${ac_tool_prefix}otool64; ac_word=$2
8370 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8371 +$as_echo_n "checking for $ac_word... " >&6; }
8372 +if ${ac_cv_prog_OTOOL64+:} false; then :
8373 + $as_echo_n "(cached) " >&6
8374 +else
8375 + if test -n "$OTOOL64"; then
8376 + ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
8377 +else
8378 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8379 +for as_dir in $PATH
8380 +do
8381 + IFS=$as_save_IFS
8382 + test -z "$as_dir" && as_dir=.
8383 + for ac_exec_ext in '' $ac_executable_extensions; do
8384 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8385 + ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
8386 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8387 + break 2
8388 + fi
8389 +done
8390 + done
8391 +IFS=$as_save_IFS
8392 +
8393 +fi
8394 +fi
8395 +OTOOL64=$ac_cv_prog_OTOOL64
8396 +if test -n "$OTOOL64"; then
8397 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
8398 +$as_echo "$OTOOL64" >&6; }
8399 +else
8400 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8401 +$as_echo "no" >&6; }
8402 +fi
8403 +
8404 +
8405 +fi
8406 +if test -z "$ac_cv_prog_OTOOL64"; then
8407 + ac_ct_OTOOL64=$OTOOL64
8408 + # Extract the first word of "otool64", so it can be a program name with args.
8409 +set dummy otool64; ac_word=$2
8410 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8411 +$as_echo_n "checking for $ac_word... " >&6; }
8412 +if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
8413 + $as_echo_n "(cached) " >&6
8414 +else
8415 + if test -n "$ac_ct_OTOOL64"; then
8416 + ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
8417 +else
8418 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8419 +for as_dir in $PATH
8420 +do
8421 + IFS=$as_save_IFS
8422 + test -z "$as_dir" && as_dir=.
8423 + for ac_exec_ext in '' $ac_executable_extensions; do
8424 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8425 + ac_cv_prog_ac_ct_OTOOL64="otool64"
8426 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8427 + break 2
8428 + fi
8429 +done
8430 + done
8431 +IFS=$as_save_IFS
8432 +
8433 +fi
8434 +fi
8435 +ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
8436 +if test -n "$ac_ct_OTOOL64"; then
8437 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
8438 +$as_echo "$ac_ct_OTOOL64" >&6; }
8439 +else
8440 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8441 +$as_echo "no" >&6; }
8442 +fi
8443 +
8444 + if test "x$ac_ct_OTOOL64" = x; then
8445 + OTOOL64=":"
8446 + else
8447 + case $cross_compiling:$ac_tool_warned in
8448 +yes:)
8449 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8450 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8451 +ac_tool_warned=yes ;;
8452 +esac
8453 + OTOOL64=$ac_ct_OTOOL64
8454 + fi
8455 +else
8456 + OTOOL64="$ac_cv_prog_OTOOL64"
8457 +fi
8458 +
8459 +
8460 +
8461 +
8462 +
8463 +
8464 +
8465 +
8466 +
8467 +
8468 +
8469 +
8470 +
8471 +
8472 +
8473 +
8474 +
8475 +
8476 +
8477 +
8478 +
8479 +
8480 +
8481 +
8482 +
8483 +
8484 +
8485 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
8486 +$as_echo_n "checking for -single_module linker flag... " >&6; }
8487 +if ${lt_cv_apple_cc_single_mod+:} false; then :
8488 + $as_echo_n "(cached) " >&6
8489 +else
8490 + lt_cv_apple_cc_single_mod=no
8491 + if test -z "${LT_MULTI_MODULE}"; then
8492 + # By default we will add the -single_module flag. You can override
8493 + # by either setting the environment variable LT_MULTI_MODULE
8494 + # non-empty at configure time, or by adding -multi_module to the
8495 + # link flags.
8496 + rm -rf libconftest.dylib*
8497 + echo "int foo(void){return 1;}" > conftest.c
8498 + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
8499 +-dynamiclib -Wl,-single_module conftest.c" >&5
8500 + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
8501 + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
8502 + _lt_result=$?
8503 + # If there is a non-empty error log, and "single_module"
8504 + # appears in it, assume the flag caused a linker warning
8505 + if test -s conftest.err && $GREP single_module conftest.err; then
8506 + cat conftest.err >&5
8507 + # Otherwise, if the output was created with a 0 exit code from
8508 + # the compiler, it worked.
8509 + elif test -f libconftest.dylib && test $_lt_result -eq 0; then
8510 + lt_cv_apple_cc_single_mod=yes
8511 + else
8512 + cat conftest.err >&5
8513 + fi
8514 + rm -rf libconftest.dylib*
8515 + rm -f conftest.*
8516 + fi
8517 +fi
8518 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
8519 +$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
8520 +
8521 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
8522 +$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
8523 +if ${lt_cv_ld_exported_symbols_list+:} false; then :
8524 + $as_echo_n "(cached) " >&6
8525 +else
8526 + lt_cv_ld_exported_symbols_list=no
8527 + save_LDFLAGS=$LDFLAGS
8528 + echo "_main" > conftest.sym
8529 + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
8530 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8531 +/* end confdefs.h. */
8532 +
8533 +int
8534 +main ()
8535 +{
8536 +
8537 + ;
8538 + return 0;
8539 +}
8540 +_ACEOF
8541 +if ac_fn_c_try_link "$LINENO"; then :
8542 + lt_cv_ld_exported_symbols_list=yes
8543 +else
8544 + lt_cv_ld_exported_symbols_list=no
8545 +fi
8546 +rm -f core conftest.err conftest.$ac_objext \
8547 + conftest$ac_exeext conftest.$ac_ext
8548 + LDFLAGS="$save_LDFLAGS"
8549 +
8550 +fi
8551 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
8552 +$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
8553 +
8554 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
8555 +$as_echo_n "checking for -force_load linker flag... " >&6; }
8556 +if ${lt_cv_ld_force_load+:} false; then :
8557 + $as_echo_n "(cached) " >&6
8558 +else
8559 + lt_cv_ld_force_load=no
8560 + cat > conftest.c << _LT_EOF
8561 +int forced_loaded() { return 2;}
8562 +_LT_EOF
8563 + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
8564 + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
8565 + echo "$AR cru libconftest.a conftest.o" >&5
8566 + $AR cru libconftest.a conftest.o 2>&5
8567 + echo "$RANLIB libconftest.a" >&5
8568 + $RANLIB libconftest.a 2>&5
8569 + cat > conftest.c << _LT_EOF
8570 +int main() { return 0;}
8571 +_LT_EOF
8572 + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
8573 + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
8574 + _lt_result=$?
8575 + if test -s conftest.err && $GREP force_load conftest.err; then
8576 + cat conftest.err >&5
8577 + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
8578 + lt_cv_ld_force_load=yes
8579 + else
8580 + cat conftest.err >&5
8581 + fi
8582 + rm -f conftest.err libconftest.a conftest conftest.c
8583 + rm -rf conftest.dSYM
8584 +
8585 +fi
8586 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
8587 +$as_echo "$lt_cv_ld_force_load" >&6; }
8588 + case $host_os in
8589 + rhapsody* | darwin1.[012])
8590 + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
8591 + darwin1.*)
8592 + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
8593 + darwin*) # darwin 5.x on
8594 + # if running on 10.5 or later, the deployment target defaults
8595 + # to the OS version, if on x86, and 10.4, the deployment
8596 + # target defaults to 10.4. Don't you love it?
8597 + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
8598 + 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
8599 + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
8600 + 10.[012]*)
8601 + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
8602 + 10.*)
8603 + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
8604 + esac
8605 + ;;
8606 + esac
8607 + if test "$lt_cv_apple_cc_single_mod" = "yes"; then
8608 + _lt_dar_single_mod='$single_module'
8609 + fi
8610 + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
8611 + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
8612 + else
8613 + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
8614 + fi
8615 + if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
8616 + _lt_dsymutil='~$DSYMUTIL $lib || :'
8617 + else
8618 + _lt_dsymutil=
8619 + fi
8620 + ;;
8621 + esac
8622 +
8623 +ac_ext=c
8624 +ac_cpp='$CPP $CPPFLAGS'
8625 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8626 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8627 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
8628 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
8629 +$as_echo_n "checking how to run the C preprocessor... " >&6; }
8630 +# On Suns, sometimes $CPP names a directory.
8631 +if test -n "$CPP" && test -d "$CPP"; then
8632 + CPP=
8633 +fi
8634 +if test -z "$CPP"; then
8635 + if ${ac_cv_prog_CPP+:} false; then :
8636 + $as_echo_n "(cached) " >&6
8637 +else
8638 + # Double quotes because CPP needs to be expanded
8639 + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
8640 + do
8641 + ac_preproc_ok=false
8642 +for ac_c_preproc_warn_flag in '' yes
8643 +do
8644 + # Use a header file that comes with gcc, so configuring glibc
8645 + # with a fresh cross-compiler works.
8646 + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8647 + # <limits.h> exists even on freestanding compilers.
8648 + # On the NeXT, cc -E runs the code through the compiler's parser,
8649 + # not just through cpp. "Syntax error" is here to catch this case.
8650 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8651 +/* end confdefs.h. */
8652 +#ifdef __STDC__
8653 +# include <limits.h>
8654 +#else
8655 +# include <assert.h>
8656 +#endif
8657 + Syntax error
8658 +_ACEOF
8659 +if ac_fn_c_try_cpp "$LINENO"; then :
8660 +
8661 +else
8662 + # Broken: fails on valid input.
8663 +continue
8664 +fi
8665 +rm -f conftest.err conftest.i conftest.$ac_ext
8666 +
8667 + # OK, works on sane cases. Now check whether nonexistent headers
8668 + # can be detected and how.
8669 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8670 +/* end confdefs.h. */
8671 +#include <ac_nonexistent.h>
8672 +_ACEOF
8673 +if ac_fn_c_try_cpp "$LINENO"; then :
8674 + # Broken: success on invalid input.
8675 +continue
8676 +else
8677 + # Passes both tests.
8678 +ac_preproc_ok=:
8679 +break
8680 +fi
8681 +rm -f conftest.err conftest.i conftest.$ac_ext
8682 +
8683 +done
8684 +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
8685 +rm -f conftest.i conftest.err conftest.$ac_ext
8686 +if $ac_preproc_ok; then :
8687 + break
8688 +fi
8689 +
8690 + done
8691 + ac_cv_prog_CPP=$CPP
8692 +
8693 +fi
8694 + CPP=$ac_cv_prog_CPP
8695 +else
8696 + ac_cv_prog_CPP=$CPP
8697 +fi
8698 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
8699 +$as_echo "$CPP" >&6; }
8700 +ac_preproc_ok=false
8701 +for ac_c_preproc_warn_flag in '' yes
8702 +do
8703 + # Use a header file that comes with gcc, so configuring glibc
8704 + # with a fresh cross-compiler works.
8705 + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8706 + # <limits.h> exists even on freestanding compilers.
8707 + # On the NeXT, cc -E runs the code through the compiler's parser,
8708 + # not just through cpp. "Syntax error" is here to catch this case.
8709 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8710 +/* end confdefs.h. */
8711 +#ifdef __STDC__
8712 +# include <limits.h>
8713 +#else
8714 +# include <assert.h>
8715 +#endif
8716 + Syntax error
8717 +_ACEOF
8718 +if ac_fn_c_try_cpp "$LINENO"; then :
8719 +
8720 +else
8721 + # Broken: fails on valid input.
8722 +continue
8723 +fi
8724 +rm -f conftest.err conftest.i conftest.$ac_ext
8725 +
8726 + # OK, works on sane cases. Now check whether nonexistent headers
8727 + # can be detected and how.
8728 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8729 +/* end confdefs.h. */
8730 +#include <ac_nonexistent.h>
8731 +_ACEOF
8732 +if ac_fn_c_try_cpp "$LINENO"; then :
8733 + # Broken: success on invalid input.
8734 +continue
8735 +else
8736 + # Passes both tests.
8737 +ac_preproc_ok=:
8738 +break
8739 +fi
8740 +rm -f conftest.err conftest.i conftest.$ac_ext
8741 +
8742 +done
8743 +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
8744 +rm -f conftest.i conftest.err conftest.$ac_ext
8745 +if $ac_preproc_ok; then :
8746 +
8747 +else
8748 + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8749 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8750 +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
8751 +See \`config.log' for more details" "$LINENO" 5; }
8752 +fi
8753 +
8754 +ac_ext=c
8755 +ac_cpp='$CPP $CPPFLAGS'
8756 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8757 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8758 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
8759 +
8760 +
8761 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
8762 +$as_echo_n "checking for ANSI C header files... " >&6; }
8763 +if ${ac_cv_header_stdc+:} false; then :
8764 + $as_echo_n "(cached) " >&6
8765 +else
8766 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8767 +/* end confdefs.h. */
8768 +#include <stdlib.h>
8769 +#include <stdarg.h>
8770 +#include <string.h>
8771 +#include <float.h>
8772 +
8773 +int
8774 +main ()
8775 +{
8776 +
8777 + ;
8778 + return 0;
8779 +}
8780 +_ACEOF
8781 +if ac_fn_c_try_compile "$LINENO"; then :
8782 + ac_cv_header_stdc=yes
8783 +else
8784 + ac_cv_header_stdc=no
8785 +fi
8786 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8787 +
8788 +if test $ac_cv_header_stdc = yes; then
8789 + # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8790 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8791 +/* end confdefs.h. */
8792 +#include <string.h>
8793 +
8794 +_ACEOF
8795 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8796 + $EGREP "memchr" >/dev/null 2>&1; then :
8797 +
8798 +else
8799 + ac_cv_header_stdc=no
8800 +fi
8801 +rm -f conftest*
8802 +
8803 +fi
8804 +
8805 +if test $ac_cv_header_stdc = yes; then
8806 + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8807 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8808 +/* end confdefs.h. */
8809 +#include <stdlib.h>
8810 +
8811 +_ACEOF
8812 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8813 + $EGREP "free" >/dev/null 2>&1; then :
8814 +
8815 +else
8816 + ac_cv_header_stdc=no
8817 +fi
8818 +rm -f conftest*
8819 +
8820 +fi
8821 +
8822 +if test $ac_cv_header_stdc = yes; then
8823 + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8824 + if test "$cross_compiling" = yes; then :
8825 + :
8826 +else
8827 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8828 +/* end confdefs.h. */
8829 +#include <ctype.h>
8830 +#include <stdlib.h>
8831 +#if ((' ' & 0x0FF) == 0x020)
8832 +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8833 +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8834 +#else
8835 +# define ISLOWER(c) \
8836 + (('a' <= (c) && (c) <= 'i') \
8837 + || ('j' <= (c) && (c) <= 'r') \
8838 + || ('s' <= (c) && (c) <= 'z'))
8839 +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8840 +#endif
8841 +
8842 +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8843 +int
8844 +main ()
8845 +{
8846 + int i;
8847 + for (i = 0; i < 256; i++)
8848 + if (XOR (islower (i), ISLOWER (i))
8849 + || toupper (i) != TOUPPER (i))
8850 + return 2;
8851 + return 0;
8852 +}
8853 +_ACEOF
8854 +if ac_fn_c_try_run "$LINENO"; then :
8855 +
8856 +else
8857 + ac_cv_header_stdc=no
8858 +fi
8859 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8860 + conftest.$ac_objext conftest.beam conftest.$ac_ext
8861 +fi
8862 +
8863 +fi
8864 +fi
8865 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
8866 +$as_echo "$ac_cv_header_stdc" >&6; }
8867 +if test $ac_cv_header_stdc = yes; then
8868 +
8869 +$as_echo "#define STDC_HEADERS 1" >>confdefs.h
8870 +
8871 +fi
8872 +
8873 +# On IRIX 5.3, sys/types and inttypes.h are conflicting.
8874 +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
8875 + inttypes.h stdint.h unistd.h
8876 +do :
8877 + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8878 +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
8879 +"
8880 +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8881 + cat >>confdefs.h <<_ACEOF
8882 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8883 +_ACEOF
8884 +
8885 +fi
8886 +
8887 +done
8888 +
8889 +
8890 +for ac_header in dlfcn.h
8891 +do :
8892 + ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
8893 +"
8894 +if test "x$ac_cv_header_dlfcn_h" = xyes; then :
8895 + cat >>confdefs.h <<_ACEOF
8896 +#define HAVE_DLFCN_H 1
8897 +_ACEOF
8898 +
8899 +fi
8900 +
8901 +done
8902 +
8903 +
8904 +
8905 +
8906 +
8907 +# Set options
8908 +
8909 +
8910 +
8911 + enable_dlopen=no
8912 +
8913 +
8914 + enable_win32_dll=no
8915 +
8916 +
8917 + # Check whether --enable-shared was given.
8918 +if test "${enable_shared+set}" = set; then :
8919 + enableval=$enable_shared; p=${PACKAGE-default}
8920 + case $enableval in
8921 + yes) enable_shared=yes ;;
8922 + no) enable_shared=no ;;
8923 + *)
8924 + enable_shared=no
8925 + # Look at the argument we got. We use all the common list separators.
8926 + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8927 + for pkg in $enableval; do
8928 + IFS="$lt_save_ifs"
8929 + if test "X$pkg" = "X$p"; then
8930 + enable_shared=yes
8931 + fi
8932 + done
8933 + IFS="$lt_save_ifs"
8934 + ;;
8935 + esac
8936 +else
8937 + enable_shared=yes
8938 +fi
8939 +
8940 +
8941 +
8942 +
8943 +
8944 +
8945 +
8946 +
8947 +
8948 + # Check whether --enable-static was given.
8949 +if test "${enable_static+set}" = set; then :
8950 + enableval=$enable_static; p=${PACKAGE-default}
8951 + case $enableval in
8952 + yes) enable_static=yes ;;
8953 + no) enable_static=no ;;
8954 + *)
8955 + enable_static=no
8956 + # Look at the argument we got. We use all the common list separators.
8957 + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8958 + for pkg in $enableval; do
8959 + IFS="$lt_save_ifs"
8960 + if test "X$pkg" = "X$p"; then
8961 + enable_static=yes
8962 + fi
8963 + done
8964 + IFS="$lt_save_ifs"
8965 + ;;
8966 + esac
8967 +else
8968 + enable_static=yes
8969 +fi
8970 +
8971 +
8972 +
8973 +
8974 +
8975 +
8976 +
8977 +
8978 +
8979 +
8980 +# Check whether --with-pic was given.
8981 +if test "${with_pic+set}" = set; then :
8982 + withval=$with_pic; lt_p=${PACKAGE-default}
8983 + case $withval in
8984 + yes|no) pic_mode=$withval ;;
8985 + *)
8986 + pic_mode=default
8987 + # Look at the argument we got. We use all the common list separators.
8988 + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8989 + for lt_pkg in $withval; do
8990 + IFS="$lt_save_ifs"
8991 + if test "X$lt_pkg" = "X$lt_p"; then
8992 + pic_mode=yes
8993 + fi
8994 + done
8995 + IFS="$lt_save_ifs"
8996 + ;;
8997 + esac
8998 +else
8999 + pic_mode=default
9000 +fi
9001 +
9002 +
9003 +test -z "$pic_mode" && pic_mode=default
9004 +
9005 +
9006 +
9007 +
9008 +
9009 +
9010 +
9011 + # Check whether --enable-fast-install was given.
9012 +if test "${enable_fast_install+set}" = set; then :
9013 + enableval=$enable_fast_install; p=${PACKAGE-default}
9014 + case $enableval in
9015 + yes) enable_fast_install=yes ;;
9016 + no) enable_fast_install=no ;;
9017 + *)
9018 + enable_fast_install=no
9019 + # Look at the argument we got. We use all the common list separators.
9020 + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9021 + for pkg in $enableval; do
9022 + IFS="$lt_save_ifs"
9023 + if test "X$pkg" = "X$p"; then
9024 + enable_fast_install=yes
9025 + fi
9026 + done
9027 + IFS="$lt_save_ifs"
9028 + ;;
9029 + esac
9030 +else
9031 + enable_fast_install=yes
9032 +fi
9033 +
9034 +
9035 +
9036 +
9037 +
9038 +
9039 +
9040 +
9041 +
9042 +
9043 +
9044 +# This can be used to rebuild libtool when needed
9045 +LIBTOOL_DEPS="$ltmain"
9046 +
9047 +# Always use our own libtool.
9048 +LIBTOOL='$(SHELL) $(top_builddir)/libtool'
9049 +
9050 +
9051 +
9052 +
9053 +
9054 +
9055 +
9056 +
9057 +
9058 +
9059 +
9060 +
9061 +
9062 +
9063 +
9064 +
9065 +
9066 +
9067 +
9068 +
9069 +
9070 +
9071 +
9072 +
9073 +
9074 +
9075 +
9076 +
9077 +
9078 +
9079 +test -z "$LN_S" && LN_S="ln -s"
9080 +
9081 +
9082 +
9083 +
9084 +
9085 +
9086 +
9087 +
9088 +
9089 +
9090 +
9091 +
9092 +
9093 +
9094 +if test -n "${ZSH_VERSION+set}" ; then
9095 + setopt NO_GLOB_SUBST
9096 +fi
9097 +
9098 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
9099 +$as_echo_n "checking for objdir... " >&6; }
9100 +if ${lt_cv_objdir+:} false; then :
9101 + $as_echo_n "(cached) " >&6
9102 +else
9103 + rm -f .libs 2>/dev/null
9104 +mkdir .libs 2>/dev/null
9105 +if test -d .libs; then
9106 + lt_cv_objdir=.libs
9107 +else
9108 + # MS-DOS does not allow filenames that begin with a dot.
9109 + lt_cv_objdir=_libs
9110 +fi
9111 +rmdir .libs 2>/dev/null
9112 +fi
9113 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
9114 +$as_echo "$lt_cv_objdir" >&6; }
9115 +objdir=$lt_cv_objdir
9116 +
9117 +
9118 +
9119 +
9120 +
9121 +cat >>confdefs.h <<_ACEOF
9122 +#define LT_OBJDIR "$lt_cv_objdir/"
9123 +_ACEOF
9124 +
9125 +
9126 +
9127 +
9128 +case $host_os in
9129 +aix3*)
9130 + # AIX sometimes has problems with the GCC collect2 program. For some
9131 + # reason, if we set the COLLECT_NAMES environment variable, the problems
9132 + # vanish in a puff of smoke.
9133 + if test "X${COLLECT_NAMES+set}" != Xset; then
9134 + COLLECT_NAMES=
9135 + export COLLECT_NAMES
9136 + fi
9137 + ;;
9138 +esac
9139 +
9140 +# Global variables:
9141 +ofile=libtool
9142 +can_build_shared=yes
9143 +
9144 +# All known linkers require a `.a' archive for static linking (except MSVC,
9145 +# which needs '.lib').
9146 +libext=a
9147 +
9148 +with_gnu_ld="$lt_cv_prog_gnu_ld"
9149 +
9150 +old_CC="$CC"
9151 +old_CFLAGS="$CFLAGS"
9152 +
9153 +# Set sane defaults for various variables
9154 +test -z "$CC" && CC=cc
9155 +test -z "$LTCC" && LTCC=$CC
9156 +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
9157 +test -z "$LD" && LD=ld
9158 +test -z "$ac_objext" && ac_objext=o
9159 +
9160 +for cc_temp in $compiler""; do
9161 + case $cc_temp in
9162 + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
9163 + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
9164 + \-*) ;;
9165 + *) break;;
9166 + esac
9167 +done
9168 +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
9169 +
9170 +
9171 +# Only perform the check for file, if the check method requires it
9172 +test -z "$MAGIC_CMD" && MAGIC_CMD=file
9173 +case $deplibs_check_method in
9174 +file_magic*)
9175 + if test "$file_magic_cmd" = '$MAGIC_CMD'; then
9176 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
9177 +$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
9178 +if ${lt_cv_path_MAGIC_CMD+:} false; then :
9179 + $as_echo_n "(cached) " >&6
9180 +else
9181 + case $MAGIC_CMD in
9182 +[\\/*] | ?:[\\/]*)
9183 + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
9184 + ;;
9185 +*)
9186 + lt_save_MAGIC_CMD="$MAGIC_CMD"
9187 + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
9188 + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
9189 + for ac_dir in $ac_dummy; do
9190 + IFS="$lt_save_ifs"
9191 + test -z "$ac_dir" && ac_dir=.
9192 + if test -f $ac_dir/${ac_tool_prefix}file; then
9193 + lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
9194 + if test -n "$file_magic_test_file"; then
9195 + case $deplibs_check_method in
9196 + "file_magic "*)
9197 + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
9198 + MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
9199 + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
9200 + $EGREP "$file_magic_regex" > /dev/null; then
9201 + :
9202 + else
9203 + cat <<_LT_EOF 1>&2
9204 +
9205 +*** Warning: the command libtool uses to detect shared libraries,
9206 +*** $file_magic_cmd, produces output that libtool cannot recognize.
9207 +*** The result is that libtool may fail to recognize shared libraries
9208 +*** as such. This will affect the creation of libtool libraries that
9209 +*** depend on shared libraries, but programs linked with such libtool
9210 +*** libraries will work regardless of this problem. Nevertheless, you
9211 +*** may want to report the problem to your system manager and/or to
9212 +*** bug-libtool@gnu.org
9213 +
9214 +_LT_EOF
9215 + fi ;;
9216 + esac
9217 + fi
9218 + break
9219 + fi
9220 + done
9221 + IFS="$lt_save_ifs"
9222 + MAGIC_CMD="$lt_save_MAGIC_CMD"
9223 + ;;
9224 +esac
9225 +fi
9226 +
9227 +MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
9228 +if test -n "$MAGIC_CMD"; then
9229 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
9230 +$as_echo "$MAGIC_CMD" >&6; }
9231 +else
9232 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9233 +$as_echo "no" >&6; }
9234 +fi
9235 +
9236 +
9237 +
9238 +
9239 +
9240 +if test -z "$lt_cv_path_MAGIC_CMD"; then
9241 + if test -n "$ac_tool_prefix"; then
9242 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
9243 +$as_echo_n "checking for file... " >&6; }
9244 +if ${lt_cv_path_MAGIC_CMD+:} false; then :
9245 + $as_echo_n "(cached) " >&6
9246 +else
9247 + case $MAGIC_CMD in
9248 +[\\/*] | ?:[\\/]*)
9249 + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
9250 + ;;
9251 +*)
9252 + lt_save_MAGIC_CMD="$MAGIC_CMD"
9253 + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
9254 + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
9255 + for ac_dir in $ac_dummy; do
9256 + IFS="$lt_save_ifs"
9257 + test -z "$ac_dir" && ac_dir=.
9258 + if test -f $ac_dir/file; then
9259 + lt_cv_path_MAGIC_CMD="$ac_dir/file"
9260 + if test -n "$file_magic_test_file"; then
9261 + case $deplibs_check_method in
9262 + "file_magic "*)
9263 + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
9264 + MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
9265 + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
9266 + $EGREP "$file_magic_regex" > /dev/null; then
9267 + :
9268 + else
9269 + cat <<_LT_EOF 1>&2
9270 +
9271 +*** Warning: the command libtool uses to detect shared libraries,
9272 +*** $file_magic_cmd, produces output that libtool cannot recognize.
9273 +*** The result is that libtool may fail to recognize shared libraries
9274 +*** as such. This will affect the creation of libtool libraries that
9275 +*** depend on shared libraries, but programs linked with such libtool
9276 +*** libraries will work regardless of this problem. Nevertheless, you
9277 +*** may want to report the problem to your system manager and/or to
9278 +*** bug-libtool@gnu.org
9279 +
9280 +_LT_EOF
9281 + fi ;;
9282 + esac
9283 + fi
9284 + break
9285 + fi
9286 + done
9287 + IFS="$lt_save_ifs"
9288 + MAGIC_CMD="$lt_save_MAGIC_CMD"
9289 + ;;
9290 +esac
9291 +fi
9292 +
9293 +MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
9294 +if test -n "$MAGIC_CMD"; then
9295 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
9296 +$as_echo "$MAGIC_CMD" >&6; }
9297 +else
9298 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9299 +$as_echo "no" >&6; }
9300 +fi
9301 +
9302 +
9303 + else
9304 + MAGIC_CMD=:
9305 + fi
9306 +fi
9307 +
9308 + fi
9309 + ;;
9310 +esac
9311 +
9312 +# Use C for the default configuration in the libtool script
9313 +
9314 +lt_save_CC="$CC"
9315 +ac_ext=c
9316 +ac_cpp='$CPP $CPPFLAGS'
9317 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9318 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9319 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
9320 +
9321 +
9322 +# Source file extension for C test sources.
9323 +ac_ext=c
9324 +
9325 +# Object file extension for compiled C test sources.
9326 +objext=o
9327 +objext=$objext
9328 +
9329 +# Code to be used in simple compile tests
9330 +lt_simple_compile_test_code="int some_variable = 0;"
9331 +
9332 +# Code to be used in simple link tests
9333 +lt_simple_link_test_code='int main(){return(0);}'
9334 +
9335 +
9336 +
9337 +
9338 +
9339 +
9340 +
9341 +# If no C compiler was specified, use CC.
9342 +LTCC=${LTCC-"$CC"}
9343 +
9344 +# If no C compiler flags were specified, use CFLAGS.
9345 +LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
9346 +
9347 +# Allow CC to be a program name with arguments.
9348 +compiler=$CC
9349 +
9350 +# Save the default compiler, since it gets overwritten when the other
9351 +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
9352 +compiler_DEFAULT=$CC
9353 +
9354 +# save warnings/boilerplate of simple test code
9355 +ac_outfile=conftest.$ac_objext
9356 +echo "$lt_simple_compile_test_code" >conftest.$ac_ext
9357 +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
9358 +_lt_compiler_boilerplate=`cat conftest.err`
9359 +$RM conftest*
9360 +
9361 +ac_outfile=conftest.$ac_objext
9362 +echo "$lt_simple_link_test_code" >conftest.$ac_ext
9363 +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
9364 +_lt_linker_boilerplate=`cat conftest.err`
9365 +$RM -r conftest*
9366 +
9367 +
9368 +## CAVEAT EMPTOR:
9369 +## There is no encapsulation within the following macros, do not change
9370 +## the running order or otherwise move them around unless you know exactly
9371 +## what you are doing...
9372 +if test -n "$compiler"; then
9373 +
9374 +lt_prog_compiler_no_builtin_flag=
9375 +
9376 +if test "$GCC" = yes; then
9377 + case $cc_basename in
9378 + nvcc*)
9379 + lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
9380 + *)
9381 + lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
9382 + esac
9383 +
9384 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
9385 +$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
9386 +if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
9387 + $as_echo_n "(cached) " >&6
9388 +else
9389 + lt_cv_prog_compiler_rtti_exceptions=no
9390 + ac_outfile=conftest.$ac_objext
9391 + echo "$lt_simple_compile_test_code" > conftest.$ac_ext
9392 + lt_compiler_flag="-fno-rtti -fno-exceptions"
9393 + # Insert the option either (1) after the last *FLAGS variable, or
9394 + # (2) before a word containing "conftest.", or (3) at the end.
9395 + # Note that $ac_compile itself does not contain backslashes and begins
9396 + # with a dollar sign (not a hyphen), so the echo should work correctly.
9397 + # The option is referenced via a variable to avoid confusing sed.
9398 + lt_compile=`echo "$ac_compile" | $SED \
9399 + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
9400 + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
9401 + -e 's:$: $lt_compiler_flag:'`
9402 + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
9403 + (eval "$lt_compile" 2>conftest.err)
9404 + ac_status=$?
9405 + cat conftest.err >&5
9406 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
9407 + if (exit $ac_status) && test -s "$ac_outfile"; then
9408 + # The compiler can only warn and ignore the option if not recognized
9409 + # So say no if there are warnings other than the usual output.
9410 + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
9411 + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
9412 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
9413 + lt_cv_prog_compiler_rtti_exceptions=yes
9414 + fi
9415 + fi
9416 + $RM conftest*
9417 +
9418 +fi
9419 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
9420 +$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
9421 +
9422 +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
9423 + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
9424 +else
9425 + :
9426 +fi
9427 +
9428 +fi
9429 +
9430 +
9431 +
9432 +
9433 +
9434 +
9435 + lt_prog_compiler_wl=
9436 +lt_prog_compiler_pic=
9437 +lt_prog_compiler_static=
9438 +
9439 +
9440 + if test "$GCC" = yes; then
9441 + lt_prog_compiler_wl='-Wl,'
9442 + lt_prog_compiler_static='-static'
9443 +
9444 + case $host_os in
9445 + aix*)
9446 + # All AIX code is PIC.
9447 + if test "$host_cpu" = ia64; then
9448 + # AIX 5 now supports IA64 processor
9449 + lt_prog_compiler_static='-Bstatic'
9450 + fi
9451 + ;;
9452 +
9453 + amigaos*)
9454 + case $host_cpu in
9455 + powerpc)
9456 + # see comment about AmigaOS4 .so support
9457 + lt_prog_compiler_pic='-fPIC'
9458 + ;;
9459 + m68k)
9460 + # FIXME: we need at least 68020 code to build shared libraries, but
9461 + # adding the `-m68020' flag to GCC prevents building anything better,
9462 + # like `-m68040'.
9463 + lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
9464 + ;;
9465 + esac
9466 + ;;
9467 +
9468 + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
9469 + # PIC is the default for these OSes.
9470 + ;;
9471 +
9472 + mingw* | cygwin* | pw32* | os2* | cegcc*)
9473 + # This hack is so that the source file can tell whether it is being
9474 + # built for inclusion in a dll (and should export symbols for example).
9475 + # Although the cygwin gcc ignores -fPIC, still need this for old-style
9476 + # (--disable-auto-import) libraries
9477 + lt_prog_compiler_pic='-DDLL_EXPORT'
9478 + ;;
9479 +
9480 + darwin* | rhapsody*)
9481 + # PIC is the default on this platform
9482 + # Common symbols not allowed in MH_DYLIB files
9483 + lt_prog_compiler_pic='-fno-common'
9484 + ;;
9485 +
9486 + haiku*)
9487 + # PIC is the default for Haiku.
9488 + # The "-static" flag exists, but is broken.
9489 + lt_prog_compiler_static=
9490 + ;;
9491 +
9492 + hpux*)
9493 + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
9494 + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
9495 + # sets the default TLS model and affects inlining.
9496 + case $host_cpu in
9497 + hppa*64*)
9498 + # +Z the default
9499 + ;;
9500 + *)
9501 + lt_prog_compiler_pic='-fPIC'
9502 + ;;
9503 + esac
9504 + ;;
9505 +
9506 + interix[3-9]*)
9507 + # Interix 3.x gcc -fpic/-fPIC options generate broken code.
9508 + # Instead, we relocate shared libraries at runtime.
9509 + ;;
9510 +
9511 + msdosdjgpp*)
9512 + # Just because we use GCC doesn't mean we suddenly get shared libraries
9513 + # on systems that don't support them.
9514 + lt_prog_compiler_can_build_shared=no
9515 + enable_shared=no
9516 + ;;
9517 +
9518 + *nto* | *qnx*)
9519 + # QNX uses GNU C++, but need to define -shared option too, otherwise
9520 + # it will coredump.
9521 + lt_prog_compiler_pic='-fPIC -shared'
9522 + ;;
9523 +
9524 + sysv4*MP*)
9525 + if test -d /usr/nec; then
9526 + lt_prog_compiler_pic=-Kconform_pic
9527 + fi
9528 + ;;
9529 +
9530 + *)
9531 + lt_prog_compiler_pic='-fPIC'
9532 + ;;
9533 + esac
9534 +
9535 + case $cc_basename in
9536 + nvcc*) # Cuda Compiler Driver 2.2
9537 + lt_prog_compiler_wl='-Xlinker '
9538 + if test -n "$lt_prog_compiler_pic"; then
9539 + lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
9540 + fi
9541 + ;;
9542 + esac
9543 + else
9544 + # PORTME Check for flag to pass linker flags through the system compiler.
9545 + case $host_os in
9546 + aix*)
9547 + lt_prog_compiler_wl='-Wl,'
9548 + if test "$host_cpu" = ia64; then
9549 + # AIX 5 now supports IA64 processor
9550 + lt_prog_compiler_static='-Bstatic'
9551 + else
9552 + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
9553 + fi
9554 + ;;
9555 +
9556 + mingw* | cygwin* | pw32* | os2* | cegcc*)
9557 + # This hack is so that the source file can tell whether it is being
9558 + # built for inclusion in a dll (and should export symbols for example).
9559 + lt_prog_compiler_pic='-DDLL_EXPORT'
9560 + ;;
9561 +
9562 + hpux9* | hpux10* | hpux11*)
9563 + lt_prog_compiler_wl='-Wl,'
9564 + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
9565 + # not for PA HP-UX.
9566 + case $host_cpu in
9567 + hppa*64*|ia64*)
9568 + # +Z the default
9569 + ;;
9570 + *)
9571 + lt_prog_compiler_pic='+Z'
9572 + ;;
9573 + esac
9574 + # Is there a better lt_prog_compiler_static that works with the bundled CC?
9575 + lt_prog_compiler_static='${wl}-a ${wl}archive'
9576 + ;;
9577 +
9578 + irix5* | irix6* | nonstopux*)
9579 + lt_prog_compiler_wl='-Wl,'
9580 + # PIC (with -KPIC) is the default.
9581 + lt_prog_compiler_static='-non_shared'
9582 + ;;
9583 +
9584 + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
9585 + case $cc_basename in
9586 + # old Intel for x86_64 which still supported -KPIC.
9587 + ecc*)
9588 + lt_prog_compiler_wl='-Wl,'
9589 + lt_prog_compiler_pic='-KPIC'
9590 + lt_prog_compiler_static='-static'
9591 + ;;
9592 + # icc used to be incompatible with GCC.
9593 + # ICC 10 doesn't accept -KPIC any more.
9594 + icc* | ifort*)
9595 + lt_prog_compiler_wl='-Wl,'
9596 + lt_prog_compiler_pic='-fPIC'
9597 + lt_prog_compiler_static='-static'
9598 + ;;
9599 + # Lahey Fortran 8.1.
9600 + lf95*)
9601 + lt_prog_compiler_wl='-Wl,'
9602 + lt_prog_compiler_pic='--shared'
9603 + lt_prog_compiler_static='--static'
9604 + ;;
9605 + nagfor*)
9606 + # NAG Fortran compiler
9607 + lt_prog_compiler_wl='-Wl,-Wl,,'
9608 + lt_prog_compiler_pic='-PIC'
9609 + lt_prog_compiler_static='-Bstatic'
9610 + ;;
9611 + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
9612 + # Portland Group compilers (*not* the Pentium gcc compiler,
9613 + # which looks to be a dead project)
9614 + lt_prog_compiler_wl='-Wl,'
9615 + lt_prog_compiler_pic='-fpic'
9616 + lt_prog_compiler_static='-Bstatic'
9617 + ;;
9618 + ccc*)
9619 + lt_prog_compiler_wl='-Wl,'
9620 + # All Alpha code is PIC.
9621 + lt_prog_compiler_static='-non_shared'
9622 + ;;
9623 + xl* | bgxl* | bgf* | mpixl*)
9624 + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
9625 + lt_prog_compiler_wl='-Wl,'
9626 + lt_prog_compiler_pic='-qpic'
9627 + lt_prog_compiler_static='-qstaticlink'
9628 + ;;
9629 + *)
9630 + case `$CC -V 2>&1 | sed 5q` in
9631 + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
9632 + # Sun Fortran 8.3 passes all unrecognized flags to the linker
9633 + lt_prog_compiler_pic='-KPIC'
9634 + lt_prog_compiler_static='-Bstatic'
9635 + lt_prog_compiler_wl=''
9636 + ;;
9637 + *Sun\ F* | *Sun*Fortran*)
9638 + lt_prog_compiler_pic='-KPIC'
9639 + lt_prog_compiler_static='-Bstatic'
9640 + lt_prog_compiler_wl='-Qoption ld '
9641 + ;;
9642 + *Sun\ C*)
9643 + # Sun C 5.9
9644 + lt_prog_compiler_pic='-KPIC'
9645 + lt_prog_compiler_static='-Bstatic'
9646 + lt_prog_compiler_wl='-Wl,'
9647 + ;;
9648 + *Intel*\ [CF]*Compiler*)
9649 + lt_prog_compiler_wl='-Wl,'
9650 + lt_prog_compiler_pic='-fPIC'
9651 + lt_prog_compiler_static='-static'
9652 + ;;
9653 + *Portland\ Group*)
9654 + lt_prog_compiler_wl='-Wl,'
9655 + lt_prog_compiler_pic='-fpic'
9656 + lt_prog_compiler_static='-Bstatic'
9657 + ;;
9658 + esac
9659 + ;;
9660 + esac
9661 + ;;
9662 +
9663 + newsos6)
9664 + lt_prog_compiler_pic='-KPIC'
9665 + lt_prog_compiler_static='-Bstatic'
9666 + ;;
9667 +
9668 + *nto* | *qnx*)
9669 + # QNX uses GNU C++, but need to define -shared option too, otherwise
9670 + # it will coredump.
9671 + lt_prog_compiler_pic='-fPIC -shared'
9672 + ;;
9673 +
9674 + osf3* | osf4* | osf5*)
9675 + lt_prog_compiler_wl='-Wl,'
9676 + # All OSF/1 code is PIC.
9677 + lt_prog_compiler_static='-non_shared'
9678 + ;;
9679 +
9680 + rdos*)
9681 + lt_prog_compiler_static='-non_shared'
9682 + ;;
9683 +
9684 + solaris*)
9685 + lt_prog_compiler_pic='-KPIC'
9686 + lt_prog_compiler_static='-Bstatic'
9687 + case $cc_basename in
9688 + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
9689 + lt_prog_compiler_wl='-Qoption ld ';;
9690 + *)
9691 + lt_prog_compiler_wl='-Wl,';;
9692 + esac
9693 + ;;
9694 +
9695 + sunos4*)
9696 + lt_prog_compiler_wl='-Qoption ld '
9697 + lt_prog_compiler_pic='-PIC'
9698 + lt_prog_compiler_static='-Bstatic'
9699 + ;;
9700 +
9701 + sysv4 | sysv4.2uw2* | sysv4.3*)
9702 + lt_prog_compiler_wl='-Wl,'
9703 + lt_prog_compiler_pic='-KPIC'
9704 + lt_prog_compiler_static='-Bstatic'
9705 + ;;
9706 +
9707 + sysv4*MP*)
9708 + if test -d /usr/nec ;then
9709 + lt_prog_compiler_pic='-Kconform_pic'
9710 + lt_prog_compiler_static='-Bstatic'
9711 + fi
9712 + ;;
9713 +
9714 + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
9715 + lt_prog_compiler_wl='-Wl,'
9716 + lt_prog_compiler_pic='-KPIC'
9717 + lt_prog_compiler_static='-Bstatic'
9718 + ;;
9719 +
9720 + unicos*)
9721 + lt_prog_compiler_wl='-Wl,'
9722 + lt_prog_compiler_can_build_shared=no
9723 + ;;
9724 +
9725 + uts4*)
9726 + lt_prog_compiler_pic='-pic'
9727 + lt_prog_compiler_static='-Bstatic'
9728 + ;;
9729 +
9730 + *)
9731 + lt_prog_compiler_can_build_shared=no
9732 + ;;
9733 + esac
9734 + fi
9735 +
9736 +case $host_os in
9737 + # For platforms which do not support PIC, -DPIC is meaningless:
9738 + *djgpp*)
9739 + lt_prog_compiler_pic=
9740 + ;;
9741 + *)
9742 + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
9743 + ;;
9744 +esac
9745 +
9746 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
9747 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
9748 +if ${lt_cv_prog_compiler_pic+:} false; then :
9749 + $as_echo_n "(cached) " >&6
9750 +else
9751 + lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
9752 +fi
9753 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
9754 +$as_echo "$lt_cv_prog_compiler_pic" >&6; }
9755 +lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
9756 +
9757 +#
9758 +# Check to make sure the PIC flag actually works.
9759 +#
9760 +if test -n "$lt_prog_compiler_pic"; then
9761 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
9762 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
9763 +if ${lt_cv_prog_compiler_pic_works+:} false; then :
9764 + $as_echo_n "(cached) " >&6
9765 +else
9766 + lt_cv_prog_compiler_pic_works=no
9767 + ac_outfile=conftest.$ac_objext
9768 + echo "$lt_simple_compile_test_code" > conftest.$ac_ext
9769 + lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
9770 + # Insert the option either (1) after the last *FLAGS variable, or
9771 + # (2) before a word containing "conftest.", or (3) at the end.
9772 + # Note that $ac_compile itself does not contain backslashes and begins
9773 + # with a dollar sign (not a hyphen), so the echo should work correctly.
9774 + # The option is referenced via a variable to avoid confusing sed.
9775 + lt_compile=`echo "$ac_compile" | $SED \
9776 + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
9777 + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
9778 + -e 's:$: $lt_compiler_flag:'`
9779 + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
9780 + (eval "$lt_compile" 2>conftest.err)
9781 + ac_status=$?
9782 + cat conftest.err >&5
9783 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
9784 + if (exit $ac_status) && test -s "$ac_outfile"; then
9785 + # The compiler can only warn and ignore the option if not recognized
9786 + # So say no if there are warnings other than the usual output.
9787 + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
9788 + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
9789 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
9790 + lt_cv_prog_compiler_pic_works=yes
9791 + fi
9792 + fi
9793 + $RM conftest*
9794 +
9795 +fi
9796 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
9797 +$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
9798 +
9799 +if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
9800 + case $lt_prog_compiler_pic in
9801 + "" | " "*) ;;
9802 + *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
9803 + esac
9804 +else
9805 + lt_prog_compiler_pic=
9806 + lt_prog_compiler_can_build_shared=no
9807 +fi
9808 +
9809 +fi
9810 +
9811 +
9812 +
9813 +
9814 +
9815 +
9816 +
9817 +
9818 +
9819 +
9820 +
9821 +#
9822 +# Check to make sure the static flag actually works.
9823 +#
9824 +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
9825 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
9826 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
9827 +if ${lt_cv_prog_compiler_static_works+:} false; then :
9828 + $as_echo_n "(cached) " >&6
9829 +else
9830 + lt_cv_prog_compiler_static_works=no
9831 + save_LDFLAGS="$LDFLAGS"
9832 + LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
9833 + echo "$lt_simple_link_test_code" > conftest.$ac_ext
9834 + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
9835 + # The linker can only warn and ignore the option if not recognized
9836 + # So say no if there are warnings
9837 + if test -s conftest.err; then
9838 + # Append any errors to the config.log.
9839 + cat conftest.err 1>&5
9840 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
9841 + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
9842 + if diff conftest.exp conftest.er2 >/dev/null; then
9843 + lt_cv_prog_compiler_static_works=yes
9844 + fi
9845 + else
9846 + lt_cv_prog_compiler_static_works=yes
9847 + fi
9848 + fi
9849 + $RM -r conftest*
9850 + LDFLAGS="$save_LDFLAGS"
9851 +
9852 +fi
9853 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
9854 +$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
9855 +
9856 +if test x"$lt_cv_prog_compiler_static_works" = xyes; then
9857 + :
9858 +else
9859 + lt_prog_compiler_static=
9860 +fi
9861 +
9862 +
9863 +
9864 +
9865 +
9866 +
9867 +
9868 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
9869 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
9870 +if ${lt_cv_prog_compiler_c_o+:} false; then :
9871 + $as_echo_n "(cached) " >&6
9872 +else
9873 + lt_cv_prog_compiler_c_o=no
9874 + $RM -r conftest 2>/dev/null
9875 + mkdir conftest
9876 + cd conftest
9877 + mkdir out
9878 + echo "$lt_simple_compile_test_code" > conftest.$ac_ext
9879 +
9880 + lt_compiler_flag="-o out/conftest2.$ac_objext"
9881 + # Insert the option either (1) after the last *FLAGS variable, or
9882 + # (2) before a word containing "conftest.", or (3) at the end.
9883 + # Note that $ac_compile itself does not contain backslashes and begins
9884 + # with a dollar sign (not a hyphen), so the echo should work correctly.
9885 + lt_compile=`echo "$ac_compile" | $SED \
9886 + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
9887 + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
9888 + -e 's:$: $lt_compiler_flag:'`
9889 + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
9890 + (eval "$lt_compile" 2>out/conftest.err)
9891 + ac_status=$?
9892 + cat out/conftest.err >&5
9893 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
9894 + if (exit $ac_status) && test -s out/conftest2.$ac_objext
9895 + then
9896 + # The compiler can only warn and ignore the option if not recognized
9897 + # So say no if there are warnings
9898 + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
9899 + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
9900 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
9901 + lt_cv_prog_compiler_c_o=yes
9902 + fi
9903 + fi
9904 + chmod u+w . 2>&5
9905 + $RM conftest*
9906 + # SGI C++ compiler will create directory out/ii_files/ for
9907 + # template instantiation
9908 + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
9909 + $RM out/* && rmdir out
9910 + cd ..
9911 + $RM -r conftest
9912 + $RM conftest*
9913 +
9914 +fi
9915 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
9916 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
9917 +
9918 +
9919 +
9920 +
9921 +
9922 +
9923 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
9924 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
9925 +if ${lt_cv_prog_compiler_c_o+:} false; then :
9926 + $as_echo_n "(cached) " >&6
9927 +else
9928 + lt_cv_prog_compiler_c_o=no
9929 + $RM -r conftest 2>/dev/null
9930 + mkdir conftest
9931 + cd conftest
9932 + mkdir out
9933 + echo "$lt_simple_compile_test_code" > conftest.$ac_ext
9934 +
9935 + lt_compiler_flag="-o out/conftest2.$ac_objext"
9936 + # Insert the option either (1) after the last *FLAGS variable, or
9937 + # (2) before a word containing "conftest.", or (3) at the end.
9938 + # Note that $ac_compile itself does not contain backslashes and begins
9939 + # with a dollar sign (not a hyphen), so the echo should work correctly.
9940 + lt_compile=`echo "$ac_compile" | $SED \
9941 + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
9942 + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
9943 + -e 's:$: $lt_compiler_flag:'`
9944 + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
9945 + (eval "$lt_compile" 2>out/conftest.err)
9946 + ac_status=$?
9947 + cat out/conftest.err >&5
9948 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
9949 + if (exit $ac_status) && test -s out/conftest2.$ac_objext
9950 + then
9951 + # The compiler can only warn and ignore the option if not recognized
9952 + # So say no if there are warnings
9953 + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
9954 + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
9955 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
9956 + lt_cv_prog_compiler_c_o=yes
9957 + fi
9958 + fi
9959 + chmod u+w . 2>&5
9960 + $RM conftest*
9961 + # SGI C++ compiler will create directory out/ii_files/ for
9962 + # template instantiation
9963 + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
9964 + $RM out/* && rmdir out
9965 + cd ..
9966 + $RM -r conftest
9967 + $RM conftest*
9968 +
9969 +fi
9970 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
9971 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
9972 +
9973 +
9974 +
9975 +
9976 +hard_links="nottested"
9977 +if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
9978 + # do not overwrite the value of need_locks provided by the user
9979 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
9980 +$as_echo_n "checking if we can lock with hard links... " >&6; }
9981 + hard_links=yes
9982 + $RM conftest*
9983 + ln conftest.a conftest.b 2>/dev/null && hard_links=no
9984 + touch conftest.a
9985 + ln conftest.a conftest.b 2>&5 || hard_links=no
9986 + ln conftest.a conftest.b 2>/dev/null && hard_links=no
9987 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
9988 +$as_echo "$hard_links" >&6; }
9989 + if test "$hard_links" = no; then
9990 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
9991 +$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
9992 + need_locks=warn
9993 + fi
9994 +else
9995 + need_locks=no
9996 +fi
9997 +
9998 +
9999 +
10000 +
10001 +
10002 +
10003 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
10004 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
10005 +
10006 + runpath_var=
10007 + allow_undefined_flag=
10008 + always_export_symbols=no
10009 + archive_cmds=
10010 + archive_expsym_cmds=
10011 + compiler_needs_object=no
10012 + enable_shared_with_static_runtimes=no
10013 + export_dynamic_flag_spec=
10014 + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
10015 + hardcode_automatic=no
10016 + hardcode_direct=no
10017 + hardcode_direct_absolute=no
10018 + hardcode_libdir_flag_spec=
10019 + hardcode_libdir_separator=
10020 + hardcode_minus_L=no
10021 + hardcode_shlibpath_var=unsupported
10022 + inherit_rpath=no
10023 + link_all_deplibs=unknown
10024 + module_cmds=
10025 + module_expsym_cmds=
10026 + old_archive_from_new_cmds=
10027 + old_archive_from_expsyms_cmds=
10028 + thread_safe_flag_spec=
10029 + whole_archive_flag_spec=
10030 + # include_expsyms should be a list of space-separated symbols to be *always*
10031 + # included in the symbol list
10032 + include_expsyms=
10033 + # exclude_expsyms can be an extended regexp of symbols to exclude
10034 + # it will be wrapped by ` (' and `)$', so one must not match beginning or
10035 + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
10036 + # as well as any symbol that contains `d'.
10037 + exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
10038 + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
10039 + # platforms (ab)use it in PIC code, but their linkers get confused if
10040 + # the symbol is explicitly referenced. Since portable code cannot
10041 + # rely on this symbol name, it's probably fine to never include it in
10042 + # preloaded symbol tables.
10043 + # Exclude shared library initialization/finalization symbols.
10044 + extract_expsyms_cmds=
10045 +
10046 + case $host_os in
10047 + cygwin* | mingw* | pw32* | cegcc*)
10048 + # FIXME: the MSVC++ port hasn't been tested in a loooong time
10049 + # When not using gcc, we currently assume that we are using
10050 + # Microsoft Visual C++.
10051 + if test "$GCC" != yes; then
10052 + with_gnu_ld=no
10053 + fi
10054 + ;;
10055 + interix*)
10056 + # we just hope/assume this is gcc and not c89 (= MSVC++)
10057 + with_gnu_ld=yes
10058 + ;;
10059 + openbsd*)
10060 + with_gnu_ld=no
10061 + ;;
10062 + linux* | k*bsd*-gnu | gnu*)
10063 + link_all_deplibs=no
10064 + ;;
10065 + esac
10066 +
10067 + ld_shlibs=yes
10068 +
10069 + # On some targets, GNU ld is compatible enough with the native linker
10070 + # that we're better off using the native interface for both.
10071 + lt_use_gnu_ld_interface=no
10072 + if test "$with_gnu_ld" = yes; then
10073 + case $host_os in
10074 + aix*)
10075 + # The AIX port of GNU ld has always aspired to compatibility
10076 + # with the native linker. However, as the warning in the GNU ld
10077 + # block says, versions before 2.19.5* couldn't really create working
10078 + # shared libraries, regardless of the interface used.
10079 + case `$LD -v 2>&1` in
10080 + *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
10081 + *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
10082 + *\ \(GNU\ Binutils\)\ [3-9]*) ;;
10083 + *)
10084 + lt_use_gnu_ld_interface=yes
10085 + ;;
10086 + esac
10087 + ;;
10088 + *)
10089 + lt_use_gnu_ld_interface=yes
10090 + ;;
10091 + esac
10092 + fi
10093 +
10094 + if test "$lt_use_gnu_ld_interface" = yes; then
10095 + # If archive_cmds runs LD, not CC, wlarc should be empty
10096 + wlarc='${wl}'
10097 +
10098 + # Set some defaults for GNU ld with shared library support. These
10099 + # are reset later if shared libraries are not supported. Putting them
10100 + # here allows them to be overridden if necessary.
10101 + runpath_var=LD_RUN_PATH
10102 + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
10103 + export_dynamic_flag_spec='${wl}--export-dynamic'
10104 + # ancient GNU ld didn't support --whole-archive et. al.
10105 + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
10106 + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
10107 + else
10108 + whole_archive_flag_spec=
10109 + fi
10110 + supports_anon_versioning=no
10111 + case `$LD -v 2>&1` in
10112 + *GNU\ gold*) supports_anon_versioning=yes ;;
10113 + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
10114 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
10115 + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
10116 + *\ 2.11.*) ;; # other 2.11 versions
10117 + *) supports_anon_versioning=yes ;;
10118 + esac
10119 +
10120 + # See if GNU ld supports shared libraries.
10121 + case $host_os in
10122 + aix[3-9]*)
10123 + # On AIX/PPC, the GNU linker is very broken
10124 + if test "$host_cpu" != ia64; then
10125 + ld_shlibs=no
10126 + cat <<_LT_EOF 1>&2
10127 +
10128 +*** Warning: the GNU linker, at least up to release 2.19, is reported
10129 +*** to be unable to reliably create shared libraries on AIX.
10130 +*** Therefore, libtool is disabling shared libraries support. If you
10131 +*** really care for shared libraries, you may want to install binutils
10132 +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
10133 +*** You will then need to restart the configuration process.
10134 +
10135 +_LT_EOF
10136 + fi
10137 + ;;
10138 +
10139 + amigaos*)
10140 + case $host_cpu in
10141 + powerpc)
10142 + # see comment about AmigaOS4 .so support
10143 + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10144 + archive_expsym_cmds=''
10145 + ;;
10146 + m68k)
10147 + 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)'
10148 + hardcode_libdir_flag_spec='-L$libdir'
10149 + hardcode_minus_L=yes
10150 + ;;
10151 + esac
10152 + ;;
10153 +
10154 + beos*)
10155 + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
10156 + allow_undefined_flag=unsupported
10157 + # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
10158 + # support --undefined. This deserves some investigation. FIXME
10159 + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10160 + else
10161 + ld_shlibs=no
10162 + fi
10163 + ;;
10164 +
10165 + cygwin* | mingw* | pw32* | cegcc*)
10166 + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
10167 + # as there is no search path for DLLs.
10168 + hardcode_libdir_flag_spec='-L$libdir'
10169 + export_dynamic_flag_spec='${wl}--export-all-symbols'
10170 + allow_undefined_flag=unsupported
10171 + always_export_symbols=no
10172 + enable_shared_with_static_runtimes=yes
10173 + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
10174 + exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
10175 +
10176 + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
10177 + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
10178 + # If the export-symbols file already is a .def file (1st line
10179 + # is EXPORTS), use it as is; otherwise, prepend...
10180 + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
10181 + cp $export_symbols $output_objdir/$soname.def;
10182 + else
10183 + echo EXPORTS > $output_objdir/$soname.def;
10184 + cat $export_symbols >> $output_objdir/$soname.def;
10185 + fi~
10186 + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
10187 + else
10188 + ld_shlibs=no
10189 + fi
10190 + ;;
10191 +
10192 + haiku*)
10193 + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10194 + link_all_deplibs=yes
10195 + ;;
10196 +
10197 + interix[3-9]*)
10198 + hardcode_direct=no
10199 + hardcode_shlibpath_var=no
10200 + hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
10201 + export_dynamic_flag_spec='${wl}-E'
10202 + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
10203 + # Instead, shared libraries are loaded at an image base (0x10000000 by
10204 + # default) and relocated if they conflict, which is a slow very memory
10205 + # consuming and fragmenting process. To avoid this, we pick a random,
10206 + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
10207 + # time. Moving up from 0x10000000 also allows more sbrk(2) space.
10208 + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
10209 + 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'
10210 + ;;
10211 +
10212 + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
10213 + tmp_diet=no
10214 + if test "$host_os" = linux-dietlibc; then
10215 + case $cc_basename in
10216 + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
10217 + esac
10218 + fi
10219 + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
10220 + && test "$tmp_diet" = no
10221 + then
10222 + tmp_addflag=' $pic_flag'
10223 + tmp_sharedflag='-shared'
10224 + case $cc_basename,$host_cpu in
10225 + pgcc*) # Portland Group C compiler
10226 + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
10227 + tmp_addflag=' $pic_flag'
10228 + ;;
10229 + pgf77* | pgf90* | pgf95* | pgfortran*)
10230 + # Portland Group f77 and f90 compilers
10231 + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
10232 + tmp_addflag=' $pic_flag -Mnomain' ;;
10233 + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
10234 + tmp_addflag=' -i_dynamic' ;;
10235 + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
10236 + tmp_addflag=' -i_dynamic -nofor_main' ;;
10237 + ifc* | ifort*) # Intel Fortran compiler
10238 + tmp_addflag=' -nofor_main' ;;
10239 + lf95*) # Lahey Fortran 8.1
10240 + whole_archive_flag_spec=
10241 + tmp_sharedflag='--shared' ;;
10242 + xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
10243 + tmp_sharedflag='-qmkshrobj'
10244 + tmp_addflag= ;;
10245 + nvcc*) # Cuda Compiler Driver 2.2
10246 + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
10247 + compiler_needs_object=yes
10248 + ;;
10249 + esac
10250 + case `$CC -V 2>&1 | sed 5q` in
10251 + *Sun\ C*) # Sun C 5.9
10252 + whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
10253 + compiler_needs_object=yes
10254 + tmp_sharedflag='-G' ;;
10255 + *Sun\ F*) # Sun Fortran 8.3
10256 + tmp_sharedflag='-G' ;;
10257 + esac
10258 + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10259 +
10260 + if test "x$supports_anon_versioning" = xyes; then
10261 + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
10262 + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
10263 + echo "local: *; };" >> $output_objdir/$libname.ver~
10264 + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
10265 + fi
10266 +
10267 + case $cc_basename in
10268 + xlf* | bgf* | bgxlf* | mpixlf*)
10269 + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
10270 + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
10271 + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
10272 + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
10273 + if test "x$supports_anon_versioning" = xyes; then
10274 + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
10275 + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
10276 + echo "local: *; };" >> $output_objdir/$libname.ver~
10277 + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
10278 + fi
10279 + ;;
10280 + esac
10281 + else
10282 + ld_shlibs=no
10283 + fi
10284 + ;;
10285 +
10286 + netbsd* | netbsdelf*-gnu)
10287 + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
10288 + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
10289 + wlarc=
10290 + else
10291 + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10292 + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
10293 + fi
10294 + ;;
10295 +
10296 + solaris*)
10297 + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
10298 + ld_shlibs=no
10299 + cat <<_LT_EOF 1>&2
10300 +
10301 +*** Warning: The releases 2.8.* of the GNU linker cannot reliably
10302 +*** create shared libraries on Solaris systems. Therefore, libtool
10303 +*** is disabling shared libraries support. We urge you to upgrade GNU
10304 +*** binutils to release 2.9.1 or newer. Another option is to modify
10305 +*** your PATH or compiler configuration so that the native linker is
10306 +*** used, and then restart.
10307 +
10308 +_LT_EOF
10309 + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
10310 + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10311 + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
10312 + else
10313 + ld_shlibs=no
10314 + fi
10315 + ;;
10316 +
10317 + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
10318 + case `$LD -v 2>&1` in
10319 + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
10320 + ld_shlibs=no
10321 + cat <<_LT_EOF 1>&2
10322 +
10323 +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
10324 +*** reliably create shared libraries on SCO systems. Therefore, libtool
10325 +*** is disabling shared libraries support. We urge you to upgrade GNU
10326 +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
10327 +*** your PATH or compiler configuration so that the native linker is
10328 +*** used, and then restart.
10329 +
10330 +_LT_EOF
10331 + ;;
10332 + *)
10333 + # For security reasons, it is highly recommended that you always
10334 + # use absolute paths for naming shared libraries, and exclude the
10335 + # DT_RUNPATH tag from executables and libraries. But doing so
10336 + # requires that you compile everything twice, which is a pain.
10337 + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
10338 + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
10339 + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10340 + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
10341 + else
10342 + ld_shlibs=no
10343 + fi
10344 + ;;
10345 + esac
10346 + ;;
10347 +
10348 + sunos4*)
10349 + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10350 + wlarc=
10351 + hardcode_direct=yes
10352 + hardcode_shlibpath_var=no
10353 + ;;
10354 +
10355 + *)
10356 + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
10357 + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10358 + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
10359 + else
10360 + ld_shlibs=no
10361 + fi
10362 + ;;
10363 + esac
10364 +
10365 + if test "$ld_shlibs" = no; then
10366 + runpath_var=
10367 + hardcode_libdir_flag_spec=
10368 + export_dynamic_flag_spec=
10369 + whole_archive_flag_spec=
10370 + fi
10371 + else
10372 + # PORTME fill in a description of your system's linker (not GNU ld)
10373 + case $host_os in
10374 + aix3*)
10375 + allow_undefined_flag=unsupported
10376 + always_export_symbols=yes
10377 + 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'
10378 + # Note: this linker hardcodes the directories in LIBPATH if there
10379 + # are no directories specified by -L.
10380 + hardcode_minus_L=yes
10381 + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
10382 + # Neither direct hardcoding nor static linking is supported with a
10383 + # broken collect2.
10384 + hardcode_direct=unsupported
10385 + fi
10386 + ;;
10387 +
10388 + aix[4-9]*)
10389 + if test "$host_cpu" = ia64; then
10390 + # On IA64, the linker does run time linking by default, so we don't
10391 + # have to do anything special.
10392 + aix_use_runtimelinking=no
10393 + exp_sym_flag='-Bexport'
10394 + no_entry_flag=""
10395 + else
10396 + # If we're using GNU nm, then we don't want the "-C" option.
10397 + # -C means demangle to AIX nm, but means don't demangle with GNU nm
10398 + # Also, AIX nm treats weak defined symbols like other global
10399 + # defined symbols, whereas GNU nm marks them as "W".
10400 + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
10401 + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
10402 + else
10403 + 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'
10404 + fi
10405 + aix_use_runtimelinking=no
10406 +
10407 + # Test if we are trying to use run time linking or normal
10408 + # AIX style linking. If -brtl is somewhere in LDFLAGS, we
10409 + # need to do runtime linking.
10410 + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
10411 + for ld_flag in $LDFLAGS; do
10412 + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
10413 + aix_use_runtimelinking=yes
10414 + break
10415 + fi
10416 + done
10417 + ;;
10418 + esac
10419 +
10420 + exp_sym_flag='-bexport'
10421 + no_entry_flag='-bnoentry'
10422 + fi
10423 +
10424 + # When large executables or shared objects are built, AIX ld can
10425 + # have problems creating the table of contents. If linking a library
10426 + # or program results in "error TOC overflow" add -mminimal-toc to
10427 + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
10428 + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
10429 +
10430 + archive_cmds=''
10431 + hardcode_direct=yes
10432 + hardcode_direct_absolute=yes
10433 + hardcode_libdir_separator=':'
10434 + link_all_deplibs=yes
10435 + file_list_spec='${wl}-f,'
10436 +
10437 + if test "$GCC" = yes; then
10438 + case $host_os in aix4.[012]|aix4.[012].*)
10439 + # We only want to do this on AIX 4.2 and lower, the check
10440 + # below for broken collect2 doesn't work under 4.3+
10441 + collect2name=`${CC} -print-prog-name=collect2`
10442 + if test -f "$collect2name" &&
10443 + strings "$collect2name" | $GREP resolve_lib_name >/dev/null
10444 + then
10445 + # We have reworked collect2
10446 + :
10447 + else
10448 + # We have old collect2
10449 + hardcode_direct=unsupported
10450 + # It fails to find uninstalled libraries when the uninstalled
10451 + # path is not listed in the libpath. Setting hardcode_minus_L
10452 + # to unsupported forces relinking
10453 + hardcode_minus_L=yes
10454 + hardcode_libdir_flag_spec='-L$libdir'
10455 + hardcode_libdir_separator=
10456 + fi
10457 + ;;
10458 + esac
10459 + shared_flag='-shared'
10460 + if test "$aix_use_runtimelinking" = yes; then
10461 + shared_flag="$shared_flag "'${wl}-G'
10462 + fi
10463 + link_all_deplibs=no
10464 + else
10465 + # not using gcc
10466 + if test "$host_cpu" = ia64; then
10467 + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
10468 + # chokes on -Wl,-G. The following line is correct:
10469 + shared_flag='-G'
10470 + else
10471 + if test "$aix_use_runtimelinking" = yes; then
10472 + shared_flag='${wl}-G'
10473 + else
10474 + shared_flag='${wl}-bM:SRE'
10475 + fi
10476 + fi
10477 + fi
10478 +
10479 + export_dynamic_flag_spec='${wl}-bexpall'
10480 + # It seems that -bexpall does not export symbols beginning with
10481 + # underscore (_), so it is better to generate a list of symbols to export.
10482 + always_export_symbols=yes
10483 + if test "$aix_use_runtimelinking" = yes; then
10484 + # Warning - without using the other runtime loading flags (-brtl),
10485 + # -berok will link without error, but may produce a broken library.
10486 + allow_undefined_flag='-berok'
10487 + # Determine the default libpath from the value encoded in an
10488 + # empty executable.
10489 + if test "${lt_cv_aix_libpath+set}" = set; then
10490 + aix_libpath=$lt_cv_aix_libpath
10491 +else
10492 + if ${lt_cv_aix_libpath_+:} false; then :
10493 + $as_echo_n "(cached) " >&6
10494 +else
10495 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10496 +/* end confdefs.h. */
10497 +
10498 +int
10499 +main ()
10500 +{
10501 +
10502 + ;
10503 + return 0;
10504 +}
10505 +_ACEOF
10506 +if ac_fn_c_try_link "$LINENO"; then :
10507 +
10508 + lt_aix_libpath_sed='
10509 + /Import File Strings/,/^$/ {
10510 + /^0/ {
10511 + s/^0 *\([^ ]*\) *$/\1/
10512 + p
10513 + }
10514 + }'
10515 + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
10516 + # Check for a 64-bit object if we didn't find anything.
10517 + if test -z "$lt_cv_aix_libpath_"; then
10518 + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
10519 + fi
10520 +fi
10521 +rm -f core conftest.err conftest.$ac_objext \
10522 + conftest$ac_exeext conftest.$ac_ext
10523 + if test -z "$lt_cv_aix_libpath_"; then
10524 + lt_cv_aix_libpath_="/usr/lib:/lib"
10525 + fi
10526 +
10527 +fi
10528 +
10529 + aix_libpath=$lt_cv_aix_libpath_
10530 +fi
10531 +
10532 + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
10533 + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
10534 + else
10535 + if test "$host_cpu" = ia64; then
10536 + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
10537 + allow_undefined_flag="-z nodefs"
10538 + 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"
10539 + else
10540 + # Determine the default libpath from the value encoded in an
10541 + # empty executable.
10542 + if test "${lt_cv_aix_libpath+set}" = set; then
10543 + aix_libpath=$lt_cv_aix_libpath
10544 +else
10545 + if ${lt_cv_aix_libpath_+:} false; then :
10546 + $as_echo_n "(cached) " >&6
10547 +else
10548 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10549 +/* end confdefs.h. */
10550 +
10551 +int
10552 +main ()
10553 +{
10554 +
10555 + ;
10556 + return 0;
10557 +}
10558 +_ACEOF
10559 +if ac_fn_c_try_link "$LINENO"; then :
10560 +
10561 + lt_aix_libpath_sed='
10562 + /Import File Strings/,/^$/ {
10563 + /^0/ {
10564 + s/^0 *\([^ ]*\) *$/\1/
10565 + p
10566 + }
10567 + }'
10568 + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
10569 + # Check for a 64-bit object if we didn't find anything.
10570 + if test -z "$lt_cv_aix_libpath_"; then
10571 + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
10572 + fi
10573 +fi
10574 +rm -f core conftest.err conftest.$ac_objext \
10575 + conftest$ac_exeext conftest.$ac_ext
10576 + if test -z "$lt_cv_aix_libpath_"; then
10577 + lt_cv_aix_libpath_="/usr/lib:/lib"
10578 + fi
10579 +
10580 +fi
10581 +
10582 + aix_libpath=$lt_cv_aix_libpath_
10583 +fi
10584 +
10585 + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
10586 + # Warning - without using the other run time loading flags,
10587 + # -berok will link without error, but may produce a broken library.
10588 + no_undefined_flag=' ${wl}-bernotok'
10589 + allow_undefined_flag=' ${wl}-berok'
10590 + if test "$with_gnu_ld" = yes; then
10591 + # We only use this code for GNU lds that support --whole-archive.
10592 + whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
10593 + else
10594 + # Exported symbols can be pulled into shared objects from archives
10595 + whole_archive_flag_spec='$convenience'
10596 + fi
10597 + archive_cmds_need_lc=yes
10598 + # This is similar to how AIX traditionally builds its shared libraries.
10599 + 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'
10600 + fi
10601 + fi
10602 + ;;
10603 +
10604 + amigaos*)
10605 + case $host_cpu in
10606 + powerpc)
10607 + # see comment about AmigaOS4 .so support
10608 + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10609 + archive_expsym_cmds=''
10610 + ;;
10611 + m68k)
10612 + 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)'
10613 + hardcode_libdir_flag_spec='-L$libdir'
10614 + hardcode_minus_L=yes
10615 + ;;
10616 + esac
10617 + ;;
10618 +
10619 + bsdi[45]*)
10620 + export_dynamic_flag_spec=-rdynamic
10621 + ;;
10622 +
10623 + cygwin* | mingw* | pw32* | cegcc*)
10624 + # When not using gcc, we currently assume that we are using
10625 + # Microsoft Visual C++.
10626 + # hardcode_libdir_flag_spec is actually meaningless, as there is
10627 + # no search path for DLLs.
10628 + case $cc_basename in
10629 + cl*)
10630 + # Native MSVC
10631 + hardcode_libdir_flag_spec=' '
10632 + allow_undefined_flag=unsupported
10633 + always_export_symbols=yes
10634 + file_list_spec='@'
10635 + # Tell ltmain to make .lib files, not .a files.
10636 + libext=lib
10637 + # Tell ltmain to make .dll files, not .so files.
10638 + shrext_cmds=".dll"
10639 + # FIXME: Setting linknames here is a bad hack.
10640 + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
10641 + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
10642 + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
10643 + else
10644 + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
10645 + fi~
10646 + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
10647 + linknames='
10648 + # The linker will not automatically build a static lib if we build a DLL.
10649 + # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
10650 + enable_shared_with_static_runtimes=yes
10651 + exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
10652 + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
10653 + # Don't use ranlib
10654 + old_postinstall_cmds='chmod 644 $oldlib'
10655 + postlink_cmds='lt_outputfile="@OUTPUT@"~
10656 + lt_tool_outputfile="@TOOL_OUTPUT@"~
10657 + case $lt_outputfile in
10658 + *.exe|*.EXE) ;;
10659 + *)
10660 + lt_outputfile="$lt_outputfile.exe"
10661 + lt_tool_outputfile="$lt_tool_outputfile.exe"
10662 + ;;
10663 + esac~
10664 + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
10665 + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
10666 + $RM "$lt_outputfile.manifest";
10667 + fi'
10668 + ;;
10669 + *)
10670 + # Assume MSVC wrapper
10671 + hardcode_libdir_flag_spec=' '
10672 + allow_undefined_flag=unsupported
10673 + # Tell ltmain to make .lib files, not .a files.
10674 + libext=lib
10675 + # Tell ltmain to make .dll files, not .so files.
10676 + shrext_cmds=".dll"
10677 + # FIXME: Setting linknames here is a bad hack.
10678 + archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
10679 + # The linker will automatically build a .lib file if we build a DLL.
10680 + old_archive_from_new_cmds='true'
10681 + # FIXME: Should let the user specify the lib program.
10682 + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
10683 + enable_shared_with_static_runtimes=yes
10684 + ;;
10685 + esac
10686 + ;;
10687 +
10688 + darwin* | rhapsody*)
10689 +
10690 +
10691 + archive_cmds_need_lc=no
10692 + hardcode_direct=no
10693 + hardcode_automatic=yes
10694 + hardcode_shlibpath_var=unsupported
10695 + if test "$lt_cv_ld_force_load" = "yes"; then
10696 + whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
10697 +
10698 + else
10699 + whole_archive_flag_spec=''
10700 + fi
10701 + link_all_deplibs=yes
10702 + allow_undefined_flag="$_lt_dar_allow_undefined"
10703 + case $cc_basename in
10704 + ifort*) _lt_dar_can_shared=yes ;;
10705 + *) _lt_dar_can_shared=$GCC ;;
10706 + esac
10707 + if test "$_lt_dar_can_shared" = "yes"; then
10708 + output_verbose_link_cmd=func_echo_all
10709 + archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
10710 + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
10711 + 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}"
10712 + 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}"
10713 +
10714 + else
10715 + ld_shlibs=no
10716 + fi
10717 +
10718 + ;;
10719 +
10720 + dgux*)
10721 + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10722 + hardcode_libdir_flag_spec='-L$libdir'
10723 + hardcode_shlibpath_var=no
10724 + ;;
10725 +
10726 + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
10727 + # support. Future versions do this automatically, but an explicit c++rt0.o
10728 + # does not break anything, and helps significantly (at the cost of a little
10729 + # extra space).
10730 + freebsd2.2*)
10731 + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
10732 + hardcode_libdir_flag_spec='-R$libdir'
10733 + hardcode_direct=yes
10734 + hardcode_shlibpath_var=no
10735 + ;;
10736 +
10737 + # Unfortunately, older versions of FreeBSD 2 do not have this feature.
10738 + freebsd2.*)
10739 + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10740 + hardcode_direct=yes
10741 + hardcode_minus_L=yes
10742 + hardcode_shlibpath_var=no
10743 + ;;
10744 +
10745 + # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
10746 + freebsd* | dragonfly*)
10747 + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
10748 + hardcode_libdir_flag_spec='-R$libdir'
10749 + hardcode_direct=yes
10750 + hardcode_shlibpath_var=no
10751 + ;;
10752 +
10753 + hpux9*)
10754 + if test "$GCC" = yes; then
10755 + archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
10756 + else
10757 + 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'
10758 + fi
10759 + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
10760 + hardcode_libdir_separator=:
10761 + hardcode_direct=yes
10762 +
10763 + # hardcode_minus_L: Not really in the search PATH,
10764 + # but as the default location of the library.
10765 + hardcode_minus_L=yes
10766 + export_dynamic_flag_spec='${wl}-E'
10767 + ;;
10768 +
10769 + hpux10*)
10770 + if test "$GCC" = yes && test "$with_gnu_ld" = no; then
10771 + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
10772 + else
10773 + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
10774 + fi
10775 + if test "$with_gnu_ld" = no; then
10776 + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
10777 + hardcode_libdir_separator=:
10778 + hardcode_direct=yes
10779 + hardcode_direct_absolute=yes
10780 + export_dynamic_flag_spec='${wl}-E'
10781 + # hardcode_minus_L: Not really in the search PATH,
10782 + # but as the default location of the library.
10783 + hardcode_minus_L=yes
10784 + fi
10785 + ;;
10786 +
10787 + hpux11*)
10788 + if test "$GCC" = yes && test "$with_gnu_ld" = no; then
10789 + case $host_cpu in
10790 + hppa*64*)
10791 + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
10792 + ;;
10793 + ia64*)
10794 + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
10795 + ;;
10796 + *)
10797 + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
10798 + ;;
10799 + esac
10800 + else
10801 + case $host_cpu in
10802 + hppa*64*)
10803 + archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
10804 + ;;
10805 + ia64*)
10806 + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
10807 + ;;
10808 + *)
10809 +
10810 + # Older versions of the 11.00 compiler do not understand -b yet
10811 + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
10812 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
10813 +$as_echo_n "checking if $CC understands -b... " >&6; }
10814 +if ${lt_cv_prog_compiler__b+:} false; then :
10815 + $as_echo_n "(cached) " >&6
10816 +else
10817 + lt_cv_prog_compiler__b=no
10818 + save_LDFLAGS="$LDFLAGS"
10819 + LDFLAGS="$LDFLAGS -b"
10820 + echo "$lt_simple_link_test_code" > conftest.$ac_ext
10821 + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
10822 + # The linker can only warn and ignore the option if not recognized
10823 + # So say no if there are warnings
10824 + if test -s conftest.err; then
10825 + # Append any errors to the config.log.
10826 + cat conftest.err 1>&5
10827 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
10828 + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
10829 + if diff conftest.exp conftest.er2 >/dev/null; then
10830 + lt_cv_prog_compiler__b=yes
10831 + fi
10832 + else
10833 + lt_cv_prog_compiler__b=yes
10834 + fi
10835 + fi
10836 + $RM -r conftest*
10837 + LDFLAGS="$save_LDFLAGS"
10838 +
10839 +fi
10840 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
10841 +$as_echo "$lt_cv_prog_compiler__b" >&6; }
10842 +
10843 +if test x"$lt_cv_prog_compiler__b" = xyes; then
10844 + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
10845 +else
10846 + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
10847 +fi
10848 +
10849 + ;;
10850 + esac
10851 + fi
10852 + if test "$with_gnu_ld" = no; then
10853 + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
10854 + hardcode_libdir_separator=:
10855 +
10856 + case $host_cpu in
10857 + hppa*64*|ia64*)
10858 + hardcode_direct=no
10859 + hardcode_shlibpath_var=no
10860 + ;;
10861 + *)
10862 + hardcode_direct=yes
10863 + hardcode_direct_absolute=yes
10864 + export_dynamic_flag_spec='${wl}-E'
10865 +
10866 + # hardcode_minus_L: Not really in the search PATH,
10867 + # but as the default location of the library.
10868 + hardcode_minus_L=yes
10869 + ;;
10870 + esac
10871 + fi
10872 + ;;
10873 +
10874 + irix5* | irix6* | nonstopux*)
10875 + if test "$GCC" = yes; then
10876 + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
10877 + # Try to use the -exported_symbol ld option, if it does not
10878 + # work, assume that -exports_file does not work either and
10879 + # implicitly export all symbols.
10880 + # This should be the same for all languages, so no per-tag cache variable.
10881 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
10882 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
10883 +if ${lt_cv_irix_exported_symbol+:} false; then :
10884 + $as_echo_n "(cached) " >&6
10885 +else
10886 + save_LDFLAGS="$LDFLAGS"
10887 + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
10888 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10889 +/* end confdefs.h. */
10890 +int foo (void) { return 0; }
10891 +_ACEOF
10892 +if ac_fn_c_try_link "$LINENO"; then :
10893 + lt_cv_irix_exported_symbol=yes
10894 +else
10895 + lt_cv_irix_exported_symbol=no
10896 +fi
10897 +rm -f core conftest.err conftest.$ac_objext \
10898 + conftest$ac_exeext conftest.$ac_ext
10899 + LDFLAGS="$save_LDFLAGS"
10900 +fi
10901 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
10902 +$as_echo "$lt_cv_irix_exported_symbol" >&6; }
10903 + if test "$lt_cv_irix_exported_symbol" = yes; then
10904 + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
10905 + fi
10906 + else
10907 + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
10908 + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
10909 + fi
10910 + archive_cmds_need_lc='no'
10911 + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
10912 + hardcode_libdir_separator=:
10913 + inherit_rpath=yes
10914 + link_all_deplibs=yes
10915 + ;;
10916 +
10917 + netbsd* | netbsdelf*-gnu)
10918 + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
10919 + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
10920 + else
10921 + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
10922 + fi
10923 + hardcode_libdir_flag_spec='-R$libdir'
10924 + hardcode_direct=yes
10925 + hardcode_shlibpath_var=no
10926 + ;;
10927 +
10928 + newsos6)
10929 + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10930 + hardcode_direct=yes
10931 + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
10932 + hardcode_libdir_separator=:
10933 + hardcode_shlibpath_var=no
10934 + ;;
10935 +
10936 + *nto* | *qnx*)
10937 + ;;
10938 +
10939 + openbsd*)
10940 + if test -f /usr/libexec/ld.so; then
10941 + hardcode_direct=yes
10942 + hardcode_shlibpath_var=no
10943 + hardcode_direct_absolute=yes
10944 + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
10945 + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
10946 + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
10947 + hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
10948 + export_dynamic_flag_spec='${wl}-E'
10949 + else
10950 + case $host_os in
10951 + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
10952 + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10953 + hardcode_libdir_flag_spec='-R$libdir'
10954 + ;;
10955 + *)
10956 + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
10957 + hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
10958 + ;;
10959 + esac
10960 + fi
10961 + else
10962 + ld_shlibs=no
10963 + fi
10964 + ;;
10965 +
10966 + os2*)
10967 + hardcode_libdir_flag_spec='-L$libdir'
10968 + hardcode_minus_L=yes
10969 + allow_undefined_flag=unsupported
10970 + 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'
10971 + old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
10972 + ;;
10973 +
10974 + osf3*)
10975 + if test "$GCC" = yes; then
10976 + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
10977 + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
10978 + else
10979 + allow_undefined_flag=' -expect_unresolved \*'
10980 + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
10981 + fi
10982 + archive_cmds_need_lc='no'
10983 + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
10984 + hardcode_libdir_separator=:
10985 + ;;
10986 +
10987 + osf4* | osf5*) # as osf3* with the addition of -msym flag
10988 + if test "$GCC" = yes; then
10989 + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
10990 + archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
10991 + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
10992 + else
10993 + allow_undefined_flag=' -expect_unresolved \*'
10994 + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
10995 + 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~
10996 + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
10997 +
10998 + # Both c and cxx compiler support -rpath directly
10999 + hardcode_libdir_flag_spec='-rpath $libdir'
11000 + fi
11001 + archive_cmds_need_lc='no'
11002 + hardcode_libdir_separator=:
11003 + ;;
11004 +
11005 + solaris*)
11006 + no_undefined_flag=' -z defs'
11007 + if test "$GCC" = yes; then
11008 + wlarc='${wl}'
11009 + archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
11010 + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
11011 + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
11012 + else
11013 + case `$CC -V 2>&1` in
11014 + *"Compilers 5.0"*)
11015 + wlarc=''
11016 + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
11017 + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
11018 + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
11019 + ;;
11020 + *)
11021 + wlarc='${wl}'
11022 + archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
11023 + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
11024 + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
11025 + ;;
11026 + esac
11027 + fi
11028 + hardcode_libdir_flag_spec='-R$libdir'
11029 + hardcode_shlibpath_var=no
11030 + case $host_os in
11031 + solaris2.[0-5] | solaris2.[0-5].*) ;;
11032 + *)
11033 + # The compiler driver will combine and reorder linker options,
11034 + # but understands `-z linker_flag'. GCC discards it without `$wl',
11035 + # but is careful enough not to reorder.
11036 + # Supported since Solaris 2.6 (maybe 2.5.1?)
11037 + if test "$GCC" = yes; then
11038 + whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
11039 + else
11040 + whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
11041 + fi
11042 + ;;
11043 + esac
11044 + link_all_deplibs=yes
11045 + ;;
11046 +
11047 + sunos4*)
11048 + if test "x$host_vendor" = xsequent; then
11049 + # Use $CC to link under sequent, because it throws in some extra .o
11050 + # files that make .init and .fini sections work.
11051 + archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
11052 + else
11053 + archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
11054 + fi
11055 + hardcode_libdir_flag_spec='-L$libdir'
11056 + hardcode_direct=yes
11057 + hardcode_minus_L=yes
11058 + hardcode_shlibpath_var=no
11059 + ;;
11060 +
11061 + sysv4)
11062 + case $host_vendor in
11063 + sni)
11064 + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11065 + hardcode_direct=yes # is this really true???
11066 + ;;
11067 + siemens)
11068 + ## LD is ld it makes a PLAMLIB
11069 + ## CC just makes a GrossModule.
11070 + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
11071 + reload_cmds='$CC -r -o $output$reload_objs'
11072 + hardcode_direct=no
11073 + ;;
11074 + motorola)
11075 + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11076 + hardcode_direct=no #Motorola manual says yes, but my tests say they lie
11077 + ;;
11078 + esac
11079 + runpath_var='LD_RUN_PATH'
11080 + hardcode_shlibpath_var=no
11081 + ;;
11082 +
11083 + sysv4.3*)
11084 + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11085 + hardcode_shlibpath_var=no
11086 + export_dynamic_flag_spec='-Bexport'
11087 + ;;
11088 +
11089 + sysv4*MP*)
11090 + if test -d /usr/nec; then
11091 + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11092 + hardcode_shlibpath_var=no
11093 + runpath_var=LD_RUN_PATH
11094 + hardcode_runpath_var=yes
11095 + ld_shlibs=yes
11096 + fi
11097 + ;;
11098 +
11099 + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
11100 + no_undefined_flag='${wl}-z,text'
11101 + archive_cmds_need_lc=no
11102 + hardcode_shlibpath_var=no
11103 + runpath_var='LD_RUN_PATH'
11104 +
11105 + if test "$GCC" = yes; then
11106 + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11107 + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11108 + else
11109 + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11110 + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11111 + fi
11112 + ;;
11113 +
11114 + sysv5* | sco3.2v5* | sco5v6*)
11115 + # Note: We can NOT use -z defs as we might desire, because we do not
11116 + # link with -lc, and that would cause any symbols used from libc to
11117 + # always be unresolved, which means just about no library would
11118 + # ever link correctly. If we're not using GNU ld we use -z text
11119 + # though, which does catch some bad symbols but isn't as heavy-handed
11120 + # as -z defs.
11121 + no_undefined_flag='${wl}-z,text'
11122 + allow_undefined_flag='${wl}-z,nodefs'
11123 + archive_cmds_need_lc=no
11124 + hardcode_shlibpath_var=no
11125 + hardcode_libdir_flag_spec='${wl}-R,$libdir'
11126 + hardcode_libdir_separator=':'
11127 + link_all_deplibs=yes
11128 + export_dynamic_flag_spec='${wl}-Bexport'
11129 + runpath_var='LD_RUN_PATH'
11130 +
11131 + if test "$GCC" = yes; then
11132 + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11133 + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11134 + else
11135 + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11136 + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11137 + fi
11138 + ;;
11139 +
11140 + uts4*)
11141 + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11142 + hardcode_libdir_flag_spec='-L$libdir'
11143 + hardcode_shlibpath_var=no
11144 + ;;
11145 +
11146 + *)
11147 + ld_shlibs=no
11148 + ;;
11149 + esac
11150 +
11151 + if test x$host_vendor = xsni; then
11152 + case $host in
11153 + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
11154 + export_dynamic_flag_spec='${wl}-Blargedynsym'
11155 + ;;
11156 + esac
11157 + fi
11158 + fi
11159 +
11160 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
11161 +$as_echo "$ld_shlibs" >&6; }
11162 +test "$ld_shlibs" = no && can_build_shared=no
11163 +
11164 +with_gnu_ld=$with_gnu_ld
11165 +
11166 +
11167 +
11168 +
11169 +
11170 +
11171 +
11172 +
11173 +
11174 +
11175 +
11176 +
11177 +
11178 +
11179 +
11180 +#
11181 +# Do we need to explicitly link libc?
11182 +#
11183 +case "x$archive_cmds_need_lc" in
11184 +x|xyes)
11185 + # Assume -lc should be added
11186 + archive_cmds_need_lc=yes
11187 +
11188 + if test "$enable_shared" = yes && test "$GCC" = yes; then
11189 + case $archive_cmds in
11190 + *'~'*)
11191 + # FIXME: we may have to deal with multi-command sequences.
11192 + ;;
11193 + '$CC '*)
11194 + # Test whether the compiler implicitly links with -lc since on some
11195 + # systems, -lgcc has to come before -lc. If gcc already passes -lc
11196 + # to ld, don't add -lc before -lgcc.
11197 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
11198 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
11199 +if ${lt_cv_archive_cmds_need_lc+:} false; then :
11200 + $as_echo_n "(cached) " >&6
11201 +else
11202 + $RM conftest*
11203 + echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11204 +
11205 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
11206 + (eval $ac_compile) 2>&5
11207 + ac_status=$?
11208 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11209 + test $ac_status = 0; } 2>conftest.err; then
11210 + soname=conftest
11211 + lib=conftest
11212 + libobjs=conftest.$ac_objext
11213 + deplibs=
11214 + wl=$lt_prog_compiler_wl
11215 + pic_flag=$lt_prog_compiler_pic
11216 + compiler_flags=-v
11217 + linker_flags=-v
11218 + verstring=
11219 + output_objdir=.
11220 + libname=conftest
11221 + lt_save_allow_undefined_flag=$allow_undefined_flag
11222 + allow_undefined_flag=
11223 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
11224 + (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
11225 + ac_status=$?
11226 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11227 + test $ac_status = 0; }
11228 + then
11229 + lt_cv_archive_cmds_need_lc=no
11230 + else
11231 + lt_cv_archive_cmds_need_lc=yes
11232 + fi
11233 + allow_undefined_flag=$lt_save_allow_undefined_flag
11234 + else
11235 + cat conftest.err 1>&5
11236 + fi
11237 + $RM conftest*
11238 +
11239 +fi
11240 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
11241 +$as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
11242 + archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
11243 + ;;
11244 + esac
11245 + fi
11246 + ;;
11247 +esac
11248 +
11249 +
11250 +
11251 +
11252 +
11253 +
11254 +
11255 +
11256 +
11257 +
11258 +
11259 +
11260 +
11261 +
11262 +
11263 +
11264 +
11265 +
11266 +
11267 +
11268 +
11269 +
11270 +
11271 +
11272 +
11273 +
11274 +
11275 +
11276 +
11277 +
11278 +
11279 +
11280 +
11281 +
11282 +
11283 +
11284 +
11285 +
11286 +
11287 +
11288 +
11289 +
11290 +
11291 +
11292 +
11293 +
11294 +
11295 +
11296 +
11297 +
11298 +
11299 +
11300 +
11301 +
11302 +
11303 +
11304 +
11305 +
11306 +
11307 +
11308 +
11309 +
11310 +
11311 +
11312 +
11313 +
11314 +
11315 +
11316 +
11317 +
11318 +
11319 +
11320 +
11321 +
11322 +
11323 +
11324 +
11325 +
11326 +
11327 +
11328 +
11329 +
11330 +
11331 +
11332 +
11333 +
11334 +
11335 +
11336 +
11337 +
11338 +
11339 +
11340 +
11341 +
11342 +
11343 +
11344 +
11345 +
11346 +
11347 +
11348 +
11349 +
11350 +
11351 +
11352 +
11353 +
11354 +
11355 +
11356 +
11357 +
11358 +
11359 +
11360 +
11361 +
11362 +
11363 +
11364 +
11365 +
11366 +
11367 +
11368 +
11369 +
11370 +
11371 +
11372 +
11373 +
11374 +
11375 +
11376 +
11377 +
11378 +
11379 +
11380 +
11381 +
11382 +
11383 +
11384 +
11385 +
11386 +
11387 +
11388 +
11389 +
11390 +
11391 +
11392 +
11393 +
11394 +
11395 +
11396 +
11397 +
11398 +
11399 +
11400 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
11401 +$as_echo_n "checking dynamic linker characteristics... " >&6; }
11402 +
11403 +if test "$GCC" = yes; then
11404 + case $host_os in
11405 + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
11406 + *) lt_awk_arg="/^libraries:/" ;;
11407 + esac
11408 + case $host_os in
11409 + mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;;
11410 + *) lt_sed_strip_eq="s,=/,/,g" ;;
11411 + esac
11412 + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
11413 + case $lt_search_path_spec in
11414 + *\;*)
11415 + # if the path contains ";" then we assume it to be the separator
11416 + # otherwise default to the standard path separator (i.e. ":") - it is
11417 + # assumed that no part of a normal pathname contains ";" but that should
11418 + # okay in the real world where ";" in dirpaths is itself problematic.
11419 + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
11420 + ;;
11421 + *)
11422 + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
11423 + ;;
11424 + esac
11425 + # Ok, now we have the path, separated by spaces, we can step through it
11426 + # and add multilib dir if necessary.
11427 + lt_tmp_lt_search_path_spec=
11428 + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
11429 + for lt_sys_path in $lt_search_path_spec; do
11430 + if test -d "$lt_sys_path/$lt_multi_os_dir"; then
11431 + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
11432 + else
11433 + test -d "$lt_sys_path" && \
11434 + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
11435 + fi
11436 + done
11437 + lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
11438 +BEGIN {RS=" "; FS="/|\n";} {
11439 + lt_foo="";
11440 + lt_count=0;
11441 + for (lt_i = NF; lt_i > 0; lt_i--) {
11442 + if ($lt_i != "" && $lt_i != ".") {
11443 + if ($lt_i == "..") {
11444 + lt_count++;
11445 + } else {
11446 + if (lt_count == 0) {
11447 + lt_foo="/" $lt_i lt_foo;
11448 + } else {
11449 + lt_count--;
11450 + }
11451 + }
11452 + }
11453 + }
11454 + if (lt_foo != "") { lt_freq[lt_foo]++; }
11455 + if (lt_freq[lt_foo] == 1) { print lt_foo; }
11456 +}'`
11457 + # AWK program above erroneously prepends '/' to C:/dos/paths
11458 + # for these hosts.
11459 + case $host_os in
11460 + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
11461 + $SED 's,/\([A-Za-z]:\),\1,g'` ;;
11462 + esac
11463 + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
11464 +else
11465 + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
11466 +fi
11467 +library_names_spec=
11468 +libname_spec='lib$name'
11469 +soname_spec=
11470 +shrext_cmds=".so"
11471 +postinstall_cmds=
11472 +postuninstall_cmds=
11473 +finish_cmds=
11474 +finish_eval=
11475 +shlibpath_var=
11476 +shlibpath_overrides_runpath=unknown
11477 +version_type=none
11478 +dynamic_linker="$host_os ld.so"
11479 +sys_lib_dlsearch_path_spec="/lib /usr/lib"
11480 +need_lib_prefix=unknown
11481 +hardcode_into_libs=no
11482 +
11483 +# when you set need_version to no, make sure it does not cause -set_version
11484 +# flags to be left without arguments
11485 +need_version=unknown
11486 +
11487 +case $host_os in
11488 +aix3*)
11489 + version_type=linux # correct to gnu/linux during the next big refactor
11490 + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
11491 + shlibpath_var=LIBPATH
11492 +
11493 + # AIX 3 has no versioning support, so we append a major version to the name.
11494 + soname_spec='${libname}${release}${shared_ext}$major'
11495 + ;;
11496 +
11497 +aix[4-9]*)
11498 + version_type=linux # correct to gnu/linux during the next big refactor
11499 + need_lib_prefix=no
11500 + need_version=no
11501 + hardcode_into_libs=yes
11502 + if test "$host_cpu" = ia64; then
11503 + # AIX 5 supports IA64
11504 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
11505 + shlibpath_var=LD_LIBRARY_PATH
11506 + else
11507 + # With GCC up to 2.95.x, collect2 would create an import file
11508 + # for dependence libraries. The import file would start with
11509 + # the line `#! .'. This would cause the generated library to
11510 + # depend on `.', always an invalid library. This was fixed in
11511 + # development snapshots of GCC prior to 3.0.
11512 + case $host_os in
11513 + aix4 | aix4.[01] | aix4.[01].*)
11514 + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
11515 + echo ' yes '
11516 + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
11517 + :
11518 + else
11519 + can_build_shared=no
11520 + fi
11521 + ;;
11522 + esac
11523 + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
11524 + # soname into executable. Probably we can add versioning support to
11525 + # collect2, so additional links can be useful in future.
11526 + if test "$aix_use_runtimelinking" = yes; then
11527 + # If using run time linking (on AIX 4.2 or later) use lib<name>.so
11528 + # instead of lib<name>.a to let people know that these are not
11529 + # typical AIX shared libraries.
11530 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11531 + else
11532 + # We preserve .a as extension for shared libraries through AIX4.2
11533 + # and later when we are not doing run time linking.
11534 + library_names_spec='${libname}${release}.a $libname.a'
11535 + soname_spec='${libname}${release}${shared_ext}$major'
11536 + fi
11537 + shlibpath_var=LIBPATH
11538 + fi
11539 + ;;
11540 +
11541 +amigaos*)
11542 + case $host_cpu in
11543 + powerpc)
11544 + # Since July 2007 AmigaOS4 officially supports .so libraries.
11545 + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
11546 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11547 + ;;
11548 + m68k)
11549 + library_names_spec='$libname.ixlibrary $libname.a'
11550 + # Create ${libname}_ixlibrary.a entries in /sys/libs.
11551 + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
11552 + ;;
11553 + esac
11554 + ;;
11555 +
11556 +beos*)
11557 + library_names_spec='${libname}${shared_ext}'
11558 + dynamic_linker="$host_os ld.so"
11559 + shlibpath_var=LIBRARY_PATH
11560 + ;;
11561 +
11562 +bsdi[45]*)
11563 + version_type=linux # correct to gnu/linux during the next big refactor
11564 + need_version=no
11565 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11566 + soname_spec='${libname}${release}${shared_ext}$major'
11567 + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
11568 + shlibpath_var=LD_LIBRARY_PATH
11569 + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
11570 + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
11571 + # the default ld.so.conf also contains /usr/contrib/lib and
11572 + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
11573 + # libtool to hard-code these into programs
11574 + ;;
11575 +
11576 +cygwin* | mingw* | pw32* | cegcc*)
11577 + version_type=windows
11578 + shrext_cmds=".dll"
11579 + need_version=no
11580 + need_lib_prefix=no
11581 +
11582 + case $GCC,$cc_basename in
11583 + yes,*)
11584 + # gcc
11585 + library_names_spec='$libname.dll.a'
11586 + # DLL is installed to $(libdir)/../bin by postinstall_cmds
11587 + postinstall_cmds='base_file=`basename \${file}`~
11588 + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
11589 + dldir=$destdir/`dirname \$dlpath`~
11590 + test -d \$dldir || mkdir -p \$dldir~
11591 + $install_prog $dir/$dlname \$dldir/$dlname~
11592 + chmod a+x \$dldir/$dlname~
11593 + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
11594 + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
11595 + fi'
11596 + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
11597 + dlpath=$dir/\$dldll~
11598 + $RM \$dlpath'
11599 + shlibpath_overrides_runpath=yes
11600 +
11601 + case $host_os in
11602 + cygwin*)
11603 + # Cygwin DLLs use 'cyg' prefix rather than 'lib'
11604 + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
11605 +
11606 + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
11607 + ;;
11608 + mingw* | cegcc*)
11609 + # MinGW DLLs use traditional 'lib' prefix
11610 + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
11611 + ;;
11612 + pw32*)
11613 + # pw32 DLLs use 'pw' prefix rather than 'lib'
11614 + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
11615 + ;;
11616 + esac
11617 + dynamic_linker='Win32 ld.exe'
11618 + ;;
11619 +
11620 + *,cl*)
11621 + # Native MSVC
11622 + libname_spec='$name'
11623 + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
11624 + library_names_spec='${libname}.dll.lib'
11625 +
11626 + case $build_os in
11627 + mingw*)
11628 + sys_lib_search_path_spec=
11629 + lt_save_ifs=$IFS
11630 + IFS=';'
11631 + for lt_path in $LIB
11632 + do
11633 + IFS=$lt_save_ifs
11634 + # Let DOS variable expansion print the short 8.3 style file name.
11635 + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
11636 + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
11637 + done
11638 + IFS=$lt_save_ifs
11639 + # Convert to MSYS style.
11640 + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
11641 + ;;
11642 + cygwin*)
11643 + # Convert to unix form, then to dos form, then back to unix form
11644 + # but this time dos style (no spaces!) so that the unix form looks
11645 + # like /cygdrive/c/PROGRA~1:/cygdr...
11646 + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
11647 + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
11648 + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
11649 + ;;
11650 + *)
11651 + sys_lib_search_path_spec="$LIB"
11652 + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
11653 + # It is most probably a Windows format PATH.
11654 + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
11655 + else
11656 + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
11657 + fi
11658 + # FIXME: find the short name or the path components, as spaces are
11659 + # common. (e.g. "Program Files" -> "PROGRA~1")
11660 + ;;
11661 + esac
11662 +
11663 + # DLL is installed to $(libdir)/../bin by postinstall_cmds
11664 + postinstall_cmds='base_file=`basename \${file}`~
11665 + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
11666 + dldir=$destdir/`dirname \$dlpath`~
11667 + test -d \$dldir || mkdir -p \$dldir~
11668 + $install_prog $dir/$dlname \$dldir/$dlname'
11669 + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
11670 + dlpath=$dir/\$dldll~
11671 + $RM \$dlpath'
11672 + shlibpath_overrides_runpath=yes
11673 + dynamic_linker='Win32 link.exe'
11674 + ;;
11675 +
11676 + *)
11677 + # Assume MSVC wrapper
11678 + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
11679 + dynamic_linker='Win32 ld.exe'
11680 + ;;
11681 + esac
11682 + # FIXME: first we should search . and the directory the executable is in
11683 + shlibpath_var=PATH
11684 + ;;
11685 +
11686 +darwin* | rhapsody*)
11687 + dynamic_linker="$host_os dyld"
11688 + version_type=darwin
11689 + need_lib_prefix=no
11690 + need_version=no
11691 + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
11692 + soname_spec='${libname}${release}${major}$shared_ext'
11693 + shlibpath_overrides_runpath=yes
11694 + shlibpath_var=DYLD_LIBRARY_PATH
11695 + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
11696 +
11697 + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
11698 + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
11699 + ;;
11700 +
11701 +dgux*)
11702 + version_type=linux # correct to gnu/linux during the next big refactor
11703 + need_lib_prefix=no
11704 + need_version=no
11705 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
11706 + soname_spec='${libname}${release}${shared_ext}$major'
11707 + shlibpath_var=LD_LIBRARY_PATH
11708 + ;;
11709 +
11710 +freebsd* | dragonfly*)
11711 + # DragonFly does not have aout. When/if they implement a new
11712 + # versioning mechanism, adjust this.
11713 + if test -x /usr/bin/objformat; then
11714 + objformat=`/usr/bin/objformat`
11715 + else
11716 + case $host_os in
11717 + freebsd[23].*) objformat=aout ;;
11718 + *) objformat=elf ;;
11719 + esac
11720 + fi
11721 + version_type=freebsd-$objformat
11722 + case $version_type in
11723 + freebsd-elf*)
11724 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
11725 + need_version=no
11726 + need_lib_prefix=no
11727 + ;;
11728 + freebsd-*)
11729 + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
11730 + need_version=yes
11731 + ;;
11732 + esac
11733 + shlibpath_var=LD_LIBRARY_PATH
11734 + case $host_os in
11735 + freebsd2.*)
11736 + shlibpath_overrides_runpath=yes
11737 + ;;
11738 + freebsd3.[01]* | freebsdelf3.[01]*)
11739 + shlibpath_overrides_runpath=yes
11740 + hardcode_into_libs=yes
11741 + ;;
11742 + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
11743 + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
11744 + shlibpath_overrides_runpath=no
11745 + hardcode_into_libs=yes
11746 + ;;
11747 + *) # from 4.6 on, and DragonFly
11748 + shlibpath_overrides_runpath=yes
11749 + hardcode_into_libs=yes
11750 + ;;
11751 + esac
11752 + ;;
11753 +
11754 +haiku*)
11755 + version_type=linux # correct to gnu/linux during the next big refactor
11756 + need_lib_prefix=no
11757 + need_version=no
11758 + dynamic_linker="$host_os runtime_loader"
11759 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
11760 + soname_spec='${libname}${release}${shared_ext}$major'
11761 + shlibpath_var=LIBRARY_PATH
11762 + shlibpath_overrides_runpath=yes
11763 + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
11764 + hardcode_into_libs=yes
11765 + ;;
11766 +
11767 +hpux9* | hpux10* | hpux11*)
11768 + # Give a soname corresponding to the major version so that dld.sl refuses to
11769 + # link against other versions.
11770 + version_type=sunos
11771 + need_lib_prefix=no
11772 + need_version=no
11773 + case $host_cpu in
11774 + ia64*)
11775 + shrext_cmds='.so'
11776 + hardcode_into_libs=yes
11777 + dynamic_linker="$host_os dld.so"
11778 + shlibpath_var=LD_LIBRARY_PATH
11779 + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
11780 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11781 + soname_spec='${libname}${release}${shared_ext}$major'
11782 + if test "X$HPUX_IA64_MODE" = X32; then
11783 + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
11784 + else
11785 + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
11786 + fi
11787 + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
11788 + ;;
11789 + hppa*64*)
11790 + shrext_cmds='.sl'
11791 + hardcode_into_libs=yes
11792 + dynamic_linker="$host_os dld.sl"
11793 + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
11794 + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
11795 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11796 + soname_spec='${libname}${release}${shared_ext}$major'
11797 + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
11798 + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
11799 + ;;
11800 + *)
11801 + shrext_cmds='.sl'
11802 + dynamic_linker="$host_os dld.sl"
11803 + shlibpath_var=SHLIB_PATH
11804 + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
11805 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11806 + soname_spec='${libname}${release}${shared_ext}$major'
11807 + ;;
11808 + esac
11809 + # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
11810 + postinstall_cmds='chmod 555 $lib'
11811 + # or fails outright, so override atomically:
11812 + install_override_mode=555
11813 + ;;
11814 +
11815 +interix[3-9]*)
11816 + version_type=linux # correct to gnu/linux during the next big refactor
11817 + need_lib_prefix=no
11818 + need_version=no
11819 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
11820 + soname_spec='${libname}${release}${shared_ext}$major'
11821 + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
11822 + shlibpath_var=LD_LIBRARY_PATH
11823 + shlibpath_overrides_runpath=no
11824 + hardcode_into_libs=yes
11825 + ;;
11826 +
11827 +irix5* | irix6* | nonstopux*)
11828 + case $host_os in
11829 + nonstopux*) version_type=nonstopux ;;
11830 + *)
11831 + if test "$lt_cv_prog_gnu_ld" = yes; then
11832 + version_type=linux # correct to gnu/linux during the next big refactor
11833 + else
11834 + version_type=irix
11835 + fi ;;
11836 + esac
11837 + need_lib_prefix=no
11838 + need_version=no
11839 + soname_spec='${libname}${release}${shared_ext}$major'
11840 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
11841 + case $host_os in
11842 + irix5* | nonstopux*)
11843 + libsuff= shlibsuff=
11844 + ;;
11845 + *)
11846 + case $LD in # libtool.m4 will add one of these switches to LD
11847 + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
11848 + libsuff= shlibsuff= libmagic=32-bit;;
11849 + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
11850 + libsuff=32 shlibsuff=N32 libmagic=N32;;
11851 + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
11852 + libsuff=64 shlibsuff=64 libmagic=64-bit;;
11853 + *) libsuff= shlibsuff= libmagic=never-match;;
11854 + esac
11855 + ;;
11856 + esac
11857 + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
11858 + shlibpath_overrides_runpath=no
11859 + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
11860 + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
11861 + hardcode_into_libs=yes
11862 + ;;
11863 +
11864 +# No shared lib support for Linux oldld, aout, or coff.
11865 +linux*oldld* | linux*aout* | linux*coff*)
11866 + dynamic_linker=no
11867 + ;;
11868 +
11869 +# This must be glibc/ELF.
11870 +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
11871 + version_type=linux # correct to gnu/linux during the next big refactor
11872 + need_lib_prefix=no
11873 + need_version=no
11874 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11875 + soname_spec='${libname}${release}${shared_ext}$major'
11876 + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
11877 + shlibpath_var=LD_LIBRARY_PATH
11878 + shlibpath_overrides_runpath=no
11879 +
11880 + # Some binutils ld are patched to set DT_RUNPATH
11881 + if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
11882 + $as_echo_n "(cached) " >&6
11883 +else
11884 + lt_cv_shlibpath_overrides_runpath=no
11885 + save_LDFLAGS=$LDFLAGS
11886 + save_libdir=$libdir
11887 + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
11888 + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
11889 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11890 +/* end confdefs.h. */
11891 +
11892 +int
11893 +main ()
11894 +{
11895 +
11896 + ;
11897 + return 0;
11898 +}
11899 +_ACEOF
11900 +if ac_fn_c_try_link "$LINENO"; then :
11901 + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
11902 + lt_cv_shlibpath_overrides_runpath=yes
11903 +fi
11904 +fi
11905 +rm -f core conftest.err conftest.$ac_objext \
11906 + conftest$ac_exeext conftest.$ac_ext
11907 + LDFLAGS=$save_LDFLAGS
11908 + libdir=$save_libdir
11909 +
11910 +fi
11911 +
11912 + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
11913 +
11914 + # This implies no fast_install, which is unacceptable.
11915 + # Some rework will be needed to allow for fast_install
11916 + # before this can be enabled.
11917 + hardcode_into_libs=yes
11918 +
11919 + # Append ld.so.conf contents to the search path
11920 + if test -f /etc/ld.so.conf; then
11921 + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
11922 + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
11923 + fi
11924 +
11925 + # We used to test for /lib/ld.so.1 and disable shared libraries on
11926 + # powerpc, because MkLinux only supported shared libraries with the
11927 + # GNU dynamic linker. Since this was broken with cross compilers,
11928 + # most powerpc-linux boxes support dynamic linking these days and
11929 + # people can always --disable-shared, the test was removed, and we
11930 + # assume the GNU/Linux dynamic linker is in use.
11931 + dynamic_linker='GNU/Linux ld.so'
11932 + ;;
11933 +
11934 +netbsdelf*-gnu)
11935 + version_type=linux
11936 + need_lib_prefix=no
11937 + need_version=no
11938 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
11939 + soname_spec='${libname}${release}${shared_ext}$major'
11940 + shlibpath_var=LD_LIBRARY_PATH
11941 + shlibpath_overrides_runpath=no
11942 + hardcode_into_libs=yes
11943 + dynamic_linker='NetBSD ld.elf_so'
11944 + ;;
11945 +
11946 +netbsd*)
11947 + version_type=sunos
11948 + need_lib_prefix=no
11949 + need_version=no
11950 + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
11951 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
11952 + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
11953 + dynamic_linker='NetBSD (a.out) ld.so'
11954 + else
11955 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
11956 + soname_spec='${libname}${release}${shared_ext}$major'
11957 + dynamic_linker='NetBSD ld.elf_so'
11958 + fi
11959 + shlibpath_var=LD_LIBRARY_PATH
11960 + shlibpath_overrides_runpath=yes
11961 + hardcode_into_libs=yes
11962 + ;;
11963 +
11964 +newsos6)
11965 + version_type=linux # correct to gnu/linux during the next big refactor
11966 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11967 + shlibpath_var=LD_LIBRARY_PATH
11968 + shlibpath_overrides_runpath=yes
11969 + ;;
11970 +
11971 +*nto* | *qnx*)
11972 + version_type=qnx
11973 + need_lib_prefix=no
11974 + need_version=no
11975 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11976 + soname_spec='${libname}${release}${shared_ext}$major'
11977 + shlibpath_var=LD_LIBRARY_PATH
11978 + shlibpath_overrides_runpath=no
11979 + hardcode_into_libs=yes
11980 + dynamic_linker='ldqnx.so'
11981 + ;;
11982 +
11983 +openbsd*)
11984 + version_type=sunos
11985 + sys_lib_dlsearch_path_spec="/usr/lib"
11986 + need_lib_prefix=no
11987 + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
11988 + case $host_os in
11989 + openbsd3.3 | openbsd3.3.*) need_version=yes ;;
11990 + *) need_version=no ;;
11991 + esac
11992 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
11993 + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
11994 + shlibpath_var=LD_LIBRARY_PATH
11995 + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
11996 + case $host_os in
11997 + openbsd2.[89] | openbsd2.[89].*)
11998 + shlibpath_overrides_runpath=no
11999 + ;;
12000 + *)
12001 + shlibpath_overrides_runpath=yes
12002 + ;;
12003 + esac
12004 + else
12005 + shlibpath_overrides_runpath=yes
12006 + fi
12007 + ;;
12008 +
12009 +os2*)
12010 + libname_spec='$name'
12011 + shrext_cmds=".dll"
12012 + need_lib_prefix=no
12013 + library_names_spec='$libname${shared_ext} $libname.a'
12014 + dynamic_linker='OS/2 ld.exe'
12015 + shlibpath_var=LIBPATH
12016 + ;;
12017 +
12018 +osf3* | osf4* | osf5*)
12019 + version_type=osf
12020 + need_lib_prefix=no
12021 + need_version=no
12022 + soname_spec='${libname}${release}${shared_ext}$major'
12023 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12024 + shlibpath_var=LD_LIBRARY_PATH
12025 + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
12026 + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
12027 + ;;
12028 +
12029 +rdos*)
12030 + dynamic_linker=no
12031 + ;;
12032 +
12033 +solaris*)
12034 + version_type=linux # correct to gnu/linux during the next big refactor
12035 + need_lib_prefix=no
12036 + need_version=no
12037 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12038 + soname_spec='${libname}${release}${shared_ext}$major'
12039 + shlibpath_var=LD_LIBRARY_PATH
12040 + shlibpath_overrides_runpath=yes
12041 + hardcode_into_libs=yes
12042 + # ldd complains unless libraries are executable
12043 + postinstall_cmds='chmod +x $lib'
12044 + ;;
12045 +
12046 +sunos4*)
12047 + version_type=sunos
12048 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
12049 + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
12050 + shlibpath_var=LD_LIBRARY_PATH
12051 + shlibpath_overrides_runpath=yes
12052 + if test "$with_gnu_ld" = yes; then
12053 + need_lib_prefix=no
12054 + fi
12055 + need_version=yes
12056 + ;;
12057 +
12058 +sysv4 | sysv4.3*)
12059 + version_type=linux # correct to gnu/linux during the next big refactor
12060 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12061 + soname_spec='${libname}${release}${shared_ext}$major'
12062 + shlibpath_var=LD_LIBRARY_PATH
12063 + case $host_vendor in
12064 + sni)
12065 + shlibpath_overrides_runpath=no
12066 + need_lib_prefix=no
12067 + runpath_var=LD_RUN_PATH
12068 + ;;
12069 + siemens)
12070 + need_lib_prefix=no
12071 + ;;
12072 + motorola)
12073 + need_lib_prefix=no
12074 + need_version=no
12075 + shlibpath_overrides_runpath=no
12076 + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
12077 + ;;
12078 + esac
12079 + ;;
12080 +
12081 +sysv4*MP*)
12082 + if test -d /usr/nec ;then
12083 + version_type=linux # correct to gnu/linux during the next big refactor
12084 + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
12085 + soname_spec='$libname${shared_ext}.$major'
12086 + shlibpath_var=LD_LIBRARY_PATH
12087 + fi
12088 + ;;
12089 +
12090 +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
12091 + version_type=freebsd-elf
12092 + need_lib_prefix=no
12093 + need_version=no
12094 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
12095 + soname_spec='${libname}${release}${shared_ext}$major'
12096 + shlibpath_var=LD_LIBRARY_PATH
12097 + shlibpath_overrides_runpath=yes
12098 + hardcode_into_libs=yes
12099 + if test "$with_gnu_ld" = yes; then
12100 + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
12101 + else
12102 + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
12103 + case $host_os in
12104 + sco3.2v5*)
12105 + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
12106 + ;;
12107 + esac
12108 + fi
12109 + sys_lib_dlsearch_path_spec='/usr/lib'
12110 + ;;
12111 +
12112 +tpf*)
12113 + # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
12114 + version_type=linux # correct to gnu/linux during the next big refactor
12115 + need_lib_prefix=no
12116 + need_version=no
12117 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12118 + shlibpath_var=LD_LIBRARY_PATH
12119 + shlibpath_overrides_runpath=no
12120 + hardcode_into_libs=yes
12121 + ;;
12122 +
12123 +uts4*)
12124 + version_type=linux # correct to gnu/linux during the next big refactor
12125 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12126 + soname_spec='${libname}${release}${shared_ext}$major'
12127 + shlibpath_var=LD_LIBRARY_PATH
12128 + ;;
12129 +
12130 +*)
12131 + dynamic_linker=no
12132 + ;;
12133 +esac
12134 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
12135 +$as_echo "$dynamic_linker" >&6; }
12136 +test "$dynamic_linker" = no && can_build_shared=no
12137 +
12138 +variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
12139 +if test "$GCC" = yes; then
12140 + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
12141 +fi
12142 +
12143 +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
12144 + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
12145 +fi
12146 +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
12147 + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
12148 +fi
12149 +
12150 +
12151 +
12152 +
12153 +
12154 +
12155 +
12156 +
12157 +
12158 +
12159 +
12160 +
12161 +
12162 +
12163 +
12164 +
12165 +
12166 +
12167 +
12168 +
12169 +
12170 +
12171 +
12172 +
12173 +
12174 +
12175 +
12176 +
12177 +
12178 +
12179 +
12180 +
12181 +
12182 +
12183 +
12184 +
12185 +
12186 +
12187 +
12188 +
12189 +
12190 +
12191 +
12192 +
12193 +
12194 +
12195 +
12196 +
12197 +
12198 +
12199 +
12200 +
12201 +
12202 +
12203 +
12204 +
12205 +
12206 +
12207 +
12208 +
12209 +
12210 +
12211 +
12212 +
12213 +
12214 +
12215 +
12216 +
12217 +
12218 +
12219 +
12220 +
12221 +
12222 +
12223 +
12224 +
12225 +
12226 +
12227 +
12228 +
12229 +
12230 +
12231 +
12232 +
12233 +
12234 +
12235 +
12236 +
12237 +
12238 +
12239 +
12240 +
12241 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
12242 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
12243 +hardcode_action=
12244 +if test -n "$hardcode_libdir_flag_spec" ||
12245 + test -n "$runpath_var" ||
12246 + test "X$hardcode_automatic" = "Xyes" ; then
12247 +
12248 + # We can hardcode non-existent directories.
12249 + if test "$hardcode_direct" != no &&
12250 + # If the only mechanism to avoid hardcoding is shlibpath_var, we
12251 + # have to relink, otherwise we might link with an installed library
12252 + # when we should be linking with a yet-to-be-installed one
12253 + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
12254 + test "$hardcode_minus_L" != no; then
12255 + # Linking always hardcodes the temporary library directory.
12256 + hardcode_action=relink
12257 + else
12258 + # We can link without hardcoding, and we can hardcode nonexisting dirs.
12259 + hardcode_action=immediate
12260 + fi
12261 +else
12262 + # We cannot hardcode anything, or else we can only hardcode existing
12263 + # directories.
12264 + hardcode_action=unsupported
12265 +fi
12266 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
12267 +$as_echo "$hardcode_action" >&6; }
12268 +
12269 +if test "$hardcode_action" = relink ||
12270 + test "$inherit_rpath" = yes; then
12271 + # Fast installation is not supported
12272 + enable_fast_install=no
12273 +elif test "$shlibpath_overrides_runpath" = yes ||
12274 + test "$enable_shared" = no; then
12275 + # Fast installation is not necessary
12276 + enable_fast_install=needless
12277 +fi
12278 +
12279 +
12280 +
12281 +
12282 +
12283 +
12284 + if test "x$enable_dlopen" != xyes; then
12285 + enable_dlopen=unknown
12286 + enable_dlopen_self=unknown
12287 + enable_dlopen_self_static=unknown
12288 +else
12289 + lt_cv_dlopen=no
12290 + lt_cv_dlopen_libs=
12291 +
12292 + case $host_os in
12293 + beos*)
12294 + lt_cv_dlopen="load_add_on"
12295 + lt_cv_dlopen_libs=
12296 + lt_cv_dlopen_self=yes
12297 + ;;
12298 +
12299 + mingw* | pw32* | cegcc*)
12300 + lt_cv_dlopen="LoadLibrary"
12301 + lt_cv_dlopen_libs=
12302 + ;;
12303 +
12304 + cygwin*)
12305 + lt_cv_dlopen="dlopen"
12306 + lt_cv_dlopen_libs=
12307 + ;;
12308 +
12309 + darwin*)
12310 + # if libdl is installed we need to link against it
12311 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
12312 +$as_echo_n "checking for dlopen in -ldl... " >&6; }
12313 +if ${ac_cv_lib_dl_dlopen+:} false; then :
12314 + $as_echo_n "(cached) " >&6
12315 +else
12316 + ac_check_lib_save_LIBS=$LIBS
12317 +LIBS="-ldl $LIBS"
12318 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12319 +/* end confdefs.h. */
12320 +
12321 +/* Override any GCC internal prototype to avoid an error.
12322 + Use char because int might match the return type of a GCC
12323 + builtin and then its argument prototype would still apply. */
12324 +#ifdef __cplusplus
12325 +extern "C"
12326 +#endif
12327 +char dlopen ();
12328 +int
12329 +main ()
12330 +{
12331 +return dlopen ();
12332 + ;
12333 + return 0;
12334 +}
12335 +_ACEOF
12336 +if ac_fn_c_try_link "$LINENO"; then :
12337 + ac_cv_lib_dl_dlopen=yes
12338 +else
12339 + ac_cv_lib_dl_dlopen=no
12340 +fi
12341 +rm -f core conftest.err conftest.$ac_objext \
12342 + conftest$ac_exeext conftest.$ac_ext
12343 +LIBS=$ac_check_lib_save_LIBS
12344 +fi
12345 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
12346 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
12347 +if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
12348 + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
12349 +else
12350 +
12351 + lt_cv_dlopen="dyld"
12352 + lt_cv_dlopen_libs=
12353 + lt_cv_dlopen_self=yes
12354 +
12355 +fi
12356 +
12357 + ;;
12358 +
12359 + *)
12360 + ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
12361 +if test "x$ac_cv_func_shl_load" = xyes; then :
12362 + lt_cv_dlopen="shl_load"
12363 +else
12364 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
12365 +$as_echo_n "checking for shl_load in -ldld... " >&6; }
12366 +if ${ac_cv_lib_dld_shl_load+:} false; then :
12367 + $as_echo_n "(cached) " >&6
12368 +else
12369 + ac_check_lib_save_LIBS=$LIBS
12370 +LIBS="-ldld $LIBS"
12371 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12372 +/* end confdefs.h. */
12373 +
12374 +/* Override any GCC internal prototype to avoid an error.
12375 + Use char because int might match the return type of a GCC
12376 + builtin and then its argument prototype would still apply. */
12377 +#ifdef __cplusplus
12378 +extern "C"
12379 +#endif
12380 +char shl_load ();
12381 +int
12382 +main ()
12383 +{
12384 +return shl_load ();
12385 + ;
12386 + return 0;
12387 +}
12388 +_ACEOF
12389 +if ac_fn_c_try_link "$LINENO"; then :
12390 + ac_cv_lib_dld_shl_load=yes
12391 +else
12392 + ac_cv_lib_dld_shl_load=no
12393 +fi
12394 +rm -f core conftest.err conftest.$ac_objext \
12395 + conftest$ac_exeext conftest.$ac_ext
12396 +LIBS=$ac_check_lib_save_LIBS
12397 +fi
12398 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
12399 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
12400 +if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
12401 + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
12402 +else
12403 + ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
12404 +if test "x$ac_cv_func_dlopen" = xyes; then :
12405 + lt_cv_dlopen="dlopen"
12406 +else
12407 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
12408 +$as_echo_n "checking for dlopen in -ldl... " >&6; }
12409 +if ${ac_cv_lib_dl_dlopen+:} false; then :
12410 + $as_echo_n "(cached) " >&6
12411 +else
12412 + ac_check_lib_save_LIBS=$LIBS
12413 +LIBS="-ldl $LIBS"
12414 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12415 +/* end confdefs.h. */
12416 +
12417 +/* Override any GCC internal prototype to avoid an error.
12418 + Use char because int might match the return type of a GCC
12419 + builtin and then its argument prototype would still apply. */
12420 +#ifdef __cplusplus
12421 +extern "C"
12422 +#endif
12423 +char dlopen ();
12424 +int
12425 +main ()
12426 +{
12427 +return dlopen ();
12428 + ;
12429 + return 0;
12430 +}
12431 +_ACEOF
12432 +if ac_fn_c_try_link "$LINENO"; then :
12433 + ac_cv_lib_dl_dlopen=yes
12434 +else
12435 + ac_cv_lib_dl_dlopen=no
12436 +fi
12437 +rm -f core conftest.err conftest.$ac_objext \
12438 + conftest$ac_exeext conftest.$ac_ext
12439 +LIBS=$ac_check_lib_save_LIBS
12440 +fi
12441 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
12442 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
12443 +if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
12444 + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
12445 +else
12446 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
12447 +$as_echo_n "checking for dlopen in -lsvld... " >&6; }
12448 +if ${ac_cv_lib_svld_dlopen+:} false; then :
12449 + $as_echo_n "(cached) " >&6
12450 +else
12451 + ac_check_lib_save_LIBS=$LIBS
12452 +LIBS="-lsvld $LIBS"
12453 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12454 +/* end confdefs.h. */
12455 +
12456 +/* Override any GCC internal prototype to avoid an error.
12457 + Use char because int might match the return type of a GCC
12458 + builtin and then its argument prototype would still apply. */
12459 +#ifdef __cplusplus
12460 +extern "C"
12461 +#endif
12462 +char dlopen ();
12463 +int
12464 +main ()
12465 +{
12466 +return dlopen ();
12467 + ;
12468 + return 0;
12469 +}
12470 +_ACEOF
12471 +if ac_fn_c_try_link "$LINENO"; then :
12472 + ac_cv_lib_svld_dlopen=yes
12473 +else
12474 + ac_cv_lib_svld_dlopen=no
12475 +fi
12476 +rm -f core conftest.err conftest.$ac_objext \
12477 + conftest$ac_exeext conftest.$ac_ext
12478 +LIBS=$ac_check_lib_save_LIBS
12479 +fi
12480 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
12481 +$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
12482 +if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
12483 + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
12484 +else
12485 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
12486 +$as_echo_n "checking for dld_link in -ldld... " >&6; }
12487 +if ${ac_cv_lib_dld_dld_link+:} false; then :
12488 + $as_echo_n "(cached) " >&6
12489 +else
12490 + ac_check_lib_save_LIBS=$LIBS
12491 +LIBS="-ldld $LIBS"
12492 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12493 +/* end confdefs.h. */
12494 +
12495 +/* Override any GCC internal prototype to avoid an error.
12496 + Use char because int might match the return type of a GCC
12497 + builtin and then its argument prototype would still apply. */
12498 +#ifdef __cplusplus
12499 +extern "C"
12500 +#endif
12501 +char dld_link ();
12502 +int
12503 +main ()
12504 +{
12505 +return dld_link ();
12506 + ;
12507 + return 0;
12508 +}
12509 +_ACEOF
12510 +if ac_fn_c_try_link "$LINENO"; then :
12511 + ac_cv_lib_dld_dld_link=yes
12512 +else
12513 + ac_cv_lib_dld_dld_link=no
12514 +fi
12515 +rm -f core conftest.err conftest.$ac_objext \
12516 + conftest$ac_exeext conftest.$ac_ext
12517 +LIBS=$ac_check_lib_save_LIBS
12518 +fi
12519 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
12520 +$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
12521 +if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
12522 + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
12523 +fi
12524 +
12525 +
12526 +fi
12527 +
12528 +
12529 +fi
12530 +
12531 +
12532 +fi
12533 +
12534 +
12535 +fi
12536 +
12537 +
12538 +fi
12539 +
12540 + ;;
12541 + esac
12542 +
12543 + if test "x$lt_cv_dlopen" != xno; then
12544 + enable_dlopen=yes
12545 + else
12546 + enable_dlopen=no
12547 + fi
12548 +
12549 + case $lt_cv_dlopen in
12550 + dlopen)
12551 + save_CPPFLAGS="$CPPFLAGS"
12552 + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
12553 +
12554 + save_LDFLAGS="$LDFLAGS"
12555 + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
12556 +
12557 + save_LIBS="$LIBS"
12558 + LIBS="$lt_cv_dlopen_libs $LIBS"
12559 +
12560 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
12561 +$as_echo_n "checking whether a program can dlopen itself... " >&6; }
12562 +if ${lt_cv_dlopen_self+:} false; then :
12563 + $as_echo_n "(cached) " >&6
12564 +else
12565 + if test "$cross_compiling" = yes; then :
12566 + lt_cv_dlopen_self=cross
12567 +else
12568 + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
12569 + lt_status=$lt_dlunknown
12570 + cat > conftest.$ac_ext <<_LT_EOF
12571 +#line $LINENO "configure"
12572 +#include "confdefs.h"
12573 +
12574 +#if HAVE_DLFCN_H
12575 +#include <dlfcn.h>
12576 +#endif
12577 +
12578 +#include <stdio.h>
12579 +
12580 +#ifdef RTLD_GLOBAL
12581 +# define LT_DLGLOBAL RTLD_GLOBAL
12582 +#else
12583 +# ifdef DL_GLOBAL
12584 +# define LT_DLGLOBAL DL_GLOBAL
12585 +# else
12586 +# define LT_DLGLOBAL 0
12587 +# endif
12588 +#endif
12589 +
12590 +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
12591 + find out it does not work in some platform. */
12592 +#ifndef LT_DLLAZY_OR_NOW
12593 +# ifdef RTLD_LAZY
12594 +# define LT_DLLAZY_OR_NOW RTLD_LAZY
12595 +# else
12596 +# ifdef DL_LAZY
12597 +# define LT_DLLAZY_OR_NOW DL_LAZY
12598 +# else
12599 +# ifdef RTLD_NOW
12600 +# define LT_DLLAZY_OR_NOW RTLD_NOW
12601 +# else
12602 +# ifdef DL_NOW
12603 +# define LT_DLLAZY_OR_NOW DL_NOW
12604 +# else
12605 +# define LT_DLLAZY_OR_NOW 0
12606 +# endif
12607 +# endif
12608 +# endif
12609 +# endif
12610 +#endif
12611 +
12612 +/* When -fvisbility=hidden is used, assume the code has been annotated
12613 + correspondingly for the symbols needed. */
12614 +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
12615 +int fnord () __attribute__((visibility("default")));
12616 +#endif
12617 +
12618 +int fnord () { return 42; }
12619 +int main ()
12620 +{
12621 + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
12622 + int status = $lt_dlunknown;
12623 +
12624 + if (self)
12625 + {
12626 + if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
12627 + else
12628 + {
12629 + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
12630 + else puts (dlerror ());
12631 + }
12632 + /* dlclose (self); */
12633 + }
12634 + else
12635 + puts (dlerror ());
12636 +
12637 + return status;
12638 +}
12639 +_LT_EOF
12640 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
12641 + (eval $ac_link) 2>&5
12642 + ac_status=$?
12643 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12644 + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
12645 + (./conftest; exit; ) >&5 2>/dev/null
12646 + lt_status=$?
12647 + case x$lt_status in
12648 + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
12649 + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
12650 + x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
12651 + esac
12652 + else :
12653 + # compilation failed
12654 + lt_cv_dlopen_self=no
12655 + fi
12656 +fi
12657 +rm -fr conftest*
12658 +
12659 +
12660 +fi
12661 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
12662 +$as_echo "$lt_cv_dlopen_self" >&6; }
12663 +
12664 + if test "x$lt_cv_dlopen_self" = xyes; then
12665 + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
12666 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
12667 +$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
12668 +if ${lt_cv_dlopen_self_static+:} false; then :
12669 + $as_echo_n "(cached) " >&6
12670 +else
12671 + if test "$cross_compiling" = yes; then :
12672 + lt_cv_dlopen_self_static=cross
12673 +else
12674 + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
12675 + lt_status=$lt_dlunknown
12676 + cat > conftest.$ac_ext <<_LT_EOF
12677 +#line $LINENO "configure"
12678 +#include "confdefs.h"
12679 +
12680 +#if HAVE_DLFCN_H
12681 +#include <dlfcn.h>
12682 +#endif
12683 +
12684 +#include <stdio.h>
12685 +
12686 +#ifdef RTLD_GLOBAL
12687 +# define LT_DLGLOBAL RTLD_GLOBAL
12688 +#else
12689 +# ifdef DL_GLOBAL
12690 +# define LT_DLGLOBAL DL_GLOBAL
12691 +# else
12692 +# define LT_DLGLOBAL 0
12693 +# endif
12694 +#endif
12695 +
12696 +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
12697 + find out it does not work in some platform. */
12698 +#ifndef LT_DLLAZY_OR_NOW
12699 +# ifdef RTLD_LAZY
12700 +# define LT_DLLAZY_OR_NOW RTLD_LAZY
12701 +# else
12702 +# ifdef DL_LAZY
12703 +# define LT_DLLAZY_OR_NOW DL_LAZY
12704 +# else
12705 +# ifdef RTLD_NOW
12706 +# define LT_DLLAZY_OR_NOW RTLD_NOW
12707 +# else
12708 +# ifdef DL_NOW
12709 +# define LT_DLLAZY_OR_NOW DL_NOW
12710 +# else
12711 +# define LT_DLLAZY_OR_NOW 0
12712 +# endif
12713 +# endif
12714 +# endif
12715 +# endif
12716 +#endif
12717 +
12718 +/* When -fvisbility=hidden is used, assume the code has been annotated
12719 + correspondingly for the symbols needed. */
12720 +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
12721 +int fnord () __attribute__((visibility("default")));
12722 +#endif
12723 +
12724 +int fnord () { return 42; }
12725 +int main ()
12726 +{
12727 + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
12728 + int status = $lt_dlunknown;
12729 +
12730 + if (self)
12731 + {
12732 + if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
12733 + else
12734 + {
12735 + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
12736 + else puts (dlerror ());
12737 + }
12738 + /* dlclose (self); */
12739 + }
12740 + else
12741 + puts (dlerror ());
12742 +
12743 + return status;
12744 +}
12745 +_LT_EOF
12746 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
12747 + (eval $ac_link) 2>&5
12748 + ac_status=$?
12749 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12750 + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
12751 + (./conftest; exit; ) >&5 2>/dev/null
12752 + lt_status=$?
12753 + case x$lt_status in
12754 + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
12755 + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
12756 + x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
12757 + esac
12758 + else :
12759 + # compilation failed
12760 + lt_cv_dlopen_self_static=no
12761 + fi
12762 +fi
12763 +rm -fr conftest*
12764 +
12765 +
12766 +fi
12767 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
12768 +$as_echo "$lt_cv_dlopen_self_static" >&6; }
12769 + fi
12770 +
12771 + CPPFLAGS="$save_CPPFLAGS"
12772 + LDFLAGS="$save_LDFLAGS"
12773 + LIBS="$save_LIBS"
12774 + ;;
12775 + esac
12776 +
12777 + case $lt_cv_dlopen_self in
12778 + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
12779 + *) enable_dlopen_self=unknown ;;
12780 + esac
12781 +
12782 + case $lt_cv_dlopen_self_static in
12783 + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
12784 + *) enable_dlopen_self_static=unknown ;;
12785 + esac
12786 +fi
12787 +
12788 +
12789 +
12790 +
12791 +
12792 +
12793 +
12794 +
12795 +
12796 +
12797 +
12798 +
12799 +
12800 +
12801 +
12802 +
12803 +
12804 +striplib=
12805 +old_striplib=
12806 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
12807 +$as_echo_n "checking whether stripping libraries is possible... " >&6; }
12808 +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
12809 + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
12810 + test -z "$striplib" && striplib="$STRIP --strip-unneeded"
12811 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12812 +$as_echo "yes" >&6; }
12813 +else
12814 +# FIXME - insert some real tests, host_os isn't really good enough
12815 + case $host_os in
12816 + darwin*)
12817 + if test -n "$STRIP" ; then
12818 + striplib="$STRIP -x"
12819 + old_striplib="$STRIP -S"
12820 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12821 +$as_echo "yes" >&6; }
12822 + else
12823 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12824 +$as_echo "no" >&6; }
12825 + fi
12826 + ;;
12827 + *)
12828 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12829 +$as_echo "no" >&6; }
12830 + ;;
12831 + esac
12832 +fi
12833 +
12834 +
12835 +
12836 +
12837 +
12838 +
12839 +
12840 +
12841 +
12842 +
12843 +
12844 +
12845 + # Report which library types will actually be built
12846 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
12847 +$as_echo_n "checking if libtool supports shared libraries... " >&6; }
12848 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
12849 +$as_echo "$can_build_shared" >&6; }
12850 +
12851 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
12852 +$as_echo_n "checking whether to build shared libraries... " >&6; }
12853 + test "$can_build_shared" = "no" && enable_shared=no
12854 +
12855 + # On AIX, shared libraries and static libraries use the same namespace, and
12856 + # are all built from PIC.
12857 + case $host_os in
12858 + aix3*)
12859 + test "$enable_shared" = yes && enable_static=no
12860 + if test -n "$RANLIB"; then
12861 + archive_cmds="$archive_cmds~\$RANLIB \$lib"
12862 + postinstall_cmds='$RANLIB $lib'
12863 + fi
12864 + ;;
12865 +
12866 + aix[4-9]*)
12867 + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
12868 + test "$enable_shared" = yes && enable_static=no
12869 + fi
12870 + ;;
12871 + esac
12872 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
12873 +$as_echo "$enable_shared" >&6; }
12874 +
12875 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
12876 +$as_echo_n "checking whether to build static libraries... " >&6; }
12877 + # Make sure either enable_shared or enable_static is yes.
12878 + test "$enable_shared" = yes || enable_static=yes
12879 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
12880 +$as_echo "$enable_static" >&6; }
12881 +
12882 +
12883 +
12884 +
12885 +fi
12886 +ac_ext=c
12887 +ac_cpp='$CPP $CPPFLAGS'
12888 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12889 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12890 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
12891 +
12892 +CC="$lt_save_CC"
12893 +
12894 +
12895 +
12896 +
12897 +
12898 +
12899 +
12900 +
12901 +
12902 +
12903 +
12904 +
12905 +
12906 +
12907 +
12908 + ac_config_commands="$ac_config_commands libtool"
12909 +
12910 +
12911 +
12912 +
12913 +# Only expand once:
12914 +
12915 +
12916 +
12917 +
12918 +
12919 +
12920 +
12921 +
12922 +ac_config_headers="$ac_config_headers config.h"
12923 +
12924 +
12925 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
12926 +$as_echo_n "checking for X... " >&6; }
12927 +
12928 +
12929 +# Check whether --with-x was given.
12930 +if test "${with_x+set}" = set; then :
12931 + withval=$with_x;
12932 +fi
12933 +
12934 +# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
12935 +if test "x$with_x" = xno; then
12936 + # The user explicitly disabled X.
12937 + have_x=disabled
12938 +else
12939 + case $x_includes,$x_libraries in #(
12940 + *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
12941 + *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
12942 + $as_echo_n "(cached) " >&6
12943 +else
12944 + # One or both of the vars are not set, and there is no cached value.
12945 +ac_x_includes=no ac_x_libraries=no
12946 +rm -f -r conftest.dir
12947 +if mkdir conftest.dir; then
12948 + cd conftest.dir
12949 + cat >Imakefile <<'_ACEOF'
12950 +incroot:
12951 + @echo incroot='${INCROOT}'
12952 +usrlibdir:
12953 + @echo usrlibdir='${USRLIBDIR}'
12954 +libdir:
12955 + @echo libdir='${LIBDIR}'
12956 +_ACEOF
12957 + if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
12958 + # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
12959 + for ac_var in incroot usrlibdir libdir; do
12960 + eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
12961 + done
12962 + # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
12963 + for ac_extension in a so sl dylib la dll; do
12964 + if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
12965 + test -f "$ac_im_libdir/libX11.$ac_extension"; then
12966 + ac_im_usrlibdir=$ac_im_libdir; break
12967 + fi
12968 + done
12969 + # Screen out bogus values from the imake configuration. They are
12970 + # bogus both because they are the default anyway, and because
12971 + # using them would break gcc on systems where it needs fixed includes.
12972 + case $ac_im_incroot in
12973 + /usr/include) ac_x_includes= ;;
12974 + *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
12975 + esac
12976 + case $ac_im_usrlibdir in
12977 + /usr/lib | /usr/lib64 | /lib | /lib64) ;;
12978 + *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
12979 + esac
12980 + fi
12981 + cd ..
12982 + rm -f -r conftest.dir
12983 +fi
12984 +
12985 +# Standard set of common directories for X headers.
12986 +# Check X11 before X11Rn because it is often a symlink to the current release.
12987 +ac_x_header_dirs='
12988 +/usr/X11/include
12989 +/usr/X11R7/include
12990 +/usr/X11R6/include
12991 +/usr/X11R5/include
12992 +/usr/X11R4/include
12993 +
12994 +/usr/include/X11
12995 +/usr/include/X11R7
12996 +/usr/include/X11R6
12997 +/usr/include/X11R5
12998 +/usr/include/X11R4
12999 +
13000 +/usr/local/X11/include
13001 +/usr/local/X11R7/include
13002 +/usr/local/X11R6/include
13003 +/usr/local/X11R5/include
13004 +/usr/local/X11R4/include
13005 +
13006 +/usr/local/include/X11
13007 +/usr/local/include/X11R7
13008 +/usr/local/include/X11R6
13009 +/usr/local/include/X11R5
13010 +/usr/local/include/X11R4
13011 +
13012 +/usr/X386/include
13013 +/usr/x386/include
13014 +/usr/XFree86/include/X11
13015 +
13016 +/usr/include
13017 +/usr/local/include
13018 +/usr/unsupported/include
13019 +/usr/athena/include
13020 +/usr/local/x11r5/include
13021 +/usr/lpp/Xamples/include
13022 +
13023 +/usr/openwin/include
13024 +/usr/openwin/share/include'
13025 +
13026 +if test "$ac_x_includes" = no; then
13027 + # Guess where to find include files, by looking for Xlib.h.
13028 + # First, try using that file with no special directory specified.
13029 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13030 +/* end confdefs.h. */
13031 +#include <X11/Xlib.h>
13032 +_ACEOF
13033 +if ac_fn_c_try_cpp "$LINENO"; then :
13034 + # We can compile using X headers with no special include directory.
13035 +ac_x_includes=
13036 +else
13037 + for ac_dir in $ac_x_header_dirs; do
13038 + if test -r "$ac_dir/X11/Xlib.h"; then
13039 + ac_x_includes=$ac_dir
13040 + break
13041 + fi
13042 +done
13043 +fi
13044 +rm -f conftest.err conftest.i conftest.$ac_ext
13045 +fi # $ac_x_includes = no
13046 +
13047 +if test "$ac_x_libraries" = no; then
13048 + # Check for the libraries.
13049 + # See if we find them without any special options.
13050 + # Don't add to $LIBS permanently.
13051 + ac_save_LIBS=$LIBS
13052 + LIBS="-lX11 $LIBS"
13053 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13054 +/* end confdefs.h. */
13055 +#include <X11/Xlib.h>
13056 +int
13057 +main ()
13058 +{
13059 +XrmInitialize ()
13060 + ;
13061 + return 0;
13062 +}
13063 +_ACEOF
13064 +if ac_fn_c_try_link "$LINENO"; then :
13065 + LIBS=$ac_save_LIBS
13066 +# We can link X programs with no special library path.
13067 +ac_x_libraries=
13068 +else
13069 + LIBS=$ac_save_LIBS
13070 +for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
13071 +do
13072 + # Don't even attempt the hair of trying to link an X program!
13073 + for ac_extension in a so sl dylib la dll; do
13074 + if test -r "$ac_dir/libX11.$ac_extension"; then
13075 + ac_x_libraries=$ac_dir
13076 + break 2
13077 + fi
13078 + done
13079 +done
13080 +fi
13081 +rm -f core conftest.err conftest.$ac_objext \
13082 + conftest$ac_exeext conftest.$ac_ext
13083 +fi # $ac_x_libraries = no
13084 +
13085 +case $ac_x_includes,$ac_x_libraries in #(
13086 + no,* | *,no | *\'*)
13087 + # Didn't find X, or a directory has "'" in its name.
13088 + ac_cv_have_x="have_x=no";; #(
13089 + *)
13090 + # Record where we found X for the cache.
13091 + ac_cv_have_x="have_x=yes\
13092 + ac_x_includes='$ac_x_includes'\
13093 + ac_x_libraries='$ac_x_libraries'"
13094 +esac
13095 +fi
13096 +;; #(
13097 + *) have_x=yes;;
13098 + esac
13099 + eval "$ac_cv_have_x"
13100 +fi # $with_x != no
13101 +
13102 +if test "$have_x" != yes; then
13103 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
13104 +$as_echo "$have_x" >&6; }
13105 + no_x=yes
13106 +else
13107 + # If each of the values was on the command line, it overrides each guess.
13108 + test "x$x_includes" = xNONE && x_includes=$ac_x_includes
13109 + test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
13110 + # Update the cache value to reflect the command line values.
13111 + ac_cv_have_x="have_x=yes\
13112 + ac_x_includes='$x_includes'\
13113 + ac_x_libraries='$x_libraries'"
13114 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
13115 +$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
13116 +fi
13117 +
13118 +if test "$no_x" = yes; then
13119 + # Not all programs may use this symbol, but it does not hurt to define it.
13120 +
13121 +$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
13122 +
13123 + X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
13124 +else
13125 + if test -n "$x_includes"; then
13126 + X_CFLAGS="$X_CFLAGS -I$x_includes"
13127 + fi
13128 +
13129 + # It would also be nice to do this for all -L options, not just this one.
13130 + if test -n "$x_libraries"; then
13131 + X_LIBS="$X_LIBS -L$x_libraries"
13132 + # For Solaris; some versions of Sun CC require a space after -R and
13133 + # others require no space. Words are not sufficient . . . .
13134 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
13135 +$as_echo_n "checking whether -R must be followed by a space... " >&6; }
13136 + ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
13137 + ac_xsave_c_werror_flag=$ac_c_werror_flag
13138 + ac_c_werror_flag=yes
13139 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13140 +/* end confdefs.h. */
13141 +
13142 +int
13143 +main ()
13144 +{
13145 +
13146 + ;
13147 + return 0;
13148 +}
13149 +_ACEOF
13150 +if ac_fn_c_try_link "$LINENO"; then :
13151 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13152 +$as_echo "no" >&6; }
13153 + X_LIBS="$X_LIBS -R$x_libraries"
13154 +else
13155 + LIBS="$ac_xsave_LIBS -R $x_libraries"
13156 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13157 +/* end confdefs.h. */
13158 +
13159 +int
13160 +main ()
13161 +{
13162 +
13163 + ;
13164 + return 0;
13165 +}
13166 +_ACEOF
13167 +if ac_fn_c_try_link "$LINENO"; then :
13168 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13169 +$as_echo "yes" >&6; }
13170 + X_LIBS="$X_LIBS -R $x_libraries"
13171 +else
13172 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
13173 +$as_echo "neither works" >&6; }
13174 +fi
13175 +rm -f core conftest.err conftest.$ac_objext \
13176 + conftest$ac_exeext conftest.$ac_ext
13177 +fi
13178 +rm -f core conftest.err conftest.$ac_objext \
13179 + conftest$ac_exeext conftest.$ac_ext
13180 + ac_c_werror_flag=$ac_xsave_c_werror_flag
13181 + LIBS=$ac_xsave_LIBS
13182 + fi
13183 +
13184 + # Check for system-dependent libraries X programs must link with.
13185 + # Do this before checking for the system-independent R6 libraries
13186 + # (-lICE), since we may need -lsocket or whatever for X linking.
13187 +
13188 + if test "$ISC" = yes; then
13189 + X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
13190 + else
13191 + # Martyn Johnson says this is needed for Ultrix, if the X
13192 + # libraries were built with DECnet support. And Karl Berry says
13193 + # the Alpha needs dnet_stub (dnet does not exist).
13194 + ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
13195 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13196 +/* end confdefs.h. */
13197 +
13198 +/* Override any GCC internal prototype to avoid an error.
13199 + Use char because int might match the return type of a GCC
13200 + builtin and then its argument prototype would still apply. */
13201 +#ifdef __cplusplus
13202 +extern "C"
13203 +#endif
13204 +char XOpenDisplay ();
13205 +int
13206 +main ()
13207 +{
13208 +return XOpenDisplay ();
13209 + ;
13210 + return 0;
13211 +}
13212 +_ACEOF
13213 +if ac_fn_c_try_link "$LINENO"; then :
13214 +
13215 +else
13216 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
13217 +$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
13218 +if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
13219 + $as_echo_n "(cached) " >&6
13220 +else
13221 + ac_check_lib_save_LIBS=$LIBS
13222 +LIBS="-ldnet $LIBS"
13223 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13224 +/* end confdefs.h. */
13225 +
13226 +/* Override any GCC internal prototype to avoid an error.
13227 + Use char because int might match the return type of a GCC
13228 + builtin and then its argument prototype would still apply. */
13229 +#ifdef __cplusplus
13230 +extern "C"
13231 +#endif
13232 +char dnet_ntoa ();
13233 +int
13234 +main ()
13235 +{
13236 +return dnet_ntoa ();
13237 + ;
13238 + return 0;
13239 +}
13240 +_ACEOF
13241 +if ac_fn_c_try_link "$LINENO"; then :
13242 + ac_cv_lib_dnet_dnet_ntoa=yes
13243 +else
13244 + ac_cv_lib_dnet_dnet_ntoa=no
13245 +fi
13246 +rm -f core conftest.err conftest.$ac_objext \
13247 + conftest$ac_exeext conftest.$ac_ext
13248 +LIBS=$ac_check_lib_save_LIBS
13249 +fi
13250 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
13251 +$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
13252 +if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
13253 + X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
13254 +fi
13255 +
13256 + if test $ac_cv_lib_dnet_dnet_ntoa = no; then
13257 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
13258 +$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
13259 +if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
13260 + $as_echo_n "(cached) " >&6
13261 +else
13262 + ac_check_lib_save_LIBS=$LIBS
13263 +LIBS="-ldnet_stub $LIBS"
13264 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13265 +/* end confdefs.h. */
13266 +
13267 +/* Override any GCC internal prototype to avoid an error.
13268 + Use char because int might match the return type of a GCC
13269 + builtin and then its argument prototype would still apply. */
13270 +#ifdef __cplusplus
13271 +extern "C"
13272 +#endif
13273 +char dnet_ntoa ();
13274 +int
13275 +main ()
13276 +{
13277 +return dnet_ntoa ();
13278 + ;
13279 + return 0;
13280 +}
13281 +_ACEOF
13282 +if ac_fn_c_try_link "$LINENO"; then :
13283 + ac_cv_lib_dnet_stub_dnet_ntoa=yes
13284 +else
13285 + ac_cv_lib_dnet_stub_dnet_ntoa=no
13286 +fi
13287 +rm -f core conftest.err conftest.$ac_objext \
13288 + conftest$ac_exeext conftest.$ac_ext
13289 +LIBS=$ac_check_lib_save_LIBS
13290 +fi
13291 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
13292 +$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
13293 +if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
13294 + X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
13295 +fi
13296 +
13297 + fi
13298 +fi
13299 +rm -f core conftest.err conftest.$ac_objext \
13300 + conftest$ac_exeext conftest.$ac_ext
13301 + LIBS="$ac_xsave_LIBS"
13302 +
13303 + # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
13304 + # to get the SysV transport functions.
13305 + # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
13306 + # needs -lnsl.
13307 + # The nsl library prevents programs from opening the X display
13308 + # on Irix 5.2, according to T.E. Dickey.
13309 + # The functions gethostbyname, getservbyname, and inet_addr are
13310 + # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
13311 + ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
13312 +if test "x$ac_cv_func_gethostbyname" = xyes; then :
13313 +
13314 +fi
13315 +
13316 + if test $ac_cv_func_gethostbyname = no; then
13317 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
13318 +$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
13319 +if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
13320 + $as_echo_n "(cached) " >&6
13321 +else
13322 + ac_check_lib_save_LIBS=$LIBS
13323 +LIBS="-lnsl $LIBS"
13324 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13325 +/* end confdefs.h. */
13326 +
13327 +/* Override any GCC internal prototype to avoid an error.
13328 + Use char because int might match the return type of a GCC
13329 + builtin and then its argument prototype would still apply. */
13330 +#ifdef __cplusplus
13331 +extern "C"
13332 +#endif
13333 +char gethostbyname ();
13334 +int
13335 +main ()
13336 +{
13337 +return gethostbyname ();
13338 + ;
13339 + return 0;
13340 +}
13341 +_ACEOF
13342 +if ac_fn_c_try_link "$LINENO"; then :
13343 + ac_cv_lib_nsl_gethostbyname=yes
13344 +else
13345 + ac_cv_lib_nsl_gethostbyname=no
13346 +fi
13347 +rm -f core conftest.err conftest.$ac_objext \
13348 + conftest$ac_exeext conftest.$ac_ext
13349 +LIBS=$ac_check_lib_save_LIBS
13350 +fi
13351 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
13352 +$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
13353 +if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
13354 + X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
13355 +fi
13356 +
13357 + if test $ac_cv_lib_nsl_gethostbyname = no; then
13358 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
13359 +$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
13360 +if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
13361 + $as_echo_n "(cached) " >&6
13362 +else
13363 + ac_check_lib_save_LIBS=$LIBS
13364 +LIBS="-lbsd $LIBS"
13365 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13366 +/* end confdefs.h. */
13367 +
13368 +/* Override any GCC internal prototype to avoid an error.
13369 + Use char because int might match the return type of a GCC
13370 + builtin and then its argument prototype would still apply. */
13371 +#ifdef __cplusplus
13372 +extern "C"
13373 +#endif
13374 +char gethostbyname ();
13375 +int
13376 +main ()
13377 +{
13378 +return gethostbyname ();
13379 + ;
13380 + return 0;
13381 +}
13382 +_ACEOF
13383 +if ac_fn_c_try_link "$LINENO"; then :
13384 + ac_cv_lib_bsd_gethostbyname=yes
13385 +else
13386 + ac_cv_lib_bsd_gethostbyname=no
13387 +fi
13388 +rm -f core conftest.err conftest.$ac_objext \
13389 + conftest$ac_exeext conftest.$ac_ext
13390 +LIBS=$ac_check_lib_save_LIBS
13391 +fi
13392 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
13393 +$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
13394 +if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
13395 + X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
13396 +fi
13397 +
13398 + fi
13399 + fi
13400 +
13401 + # lieder@skyler.mavd.honeywell.com says without -lsocket,
13402 + # socket/setsockopt and other routines are undefined under SCO ODT
13403 + # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
13404 + # on later versions), says Simon Leinen: it contains gethostby*
13405 + # variants that don't use the name server (or something). -lsocket
13406 + # must be given before -lnsl if both are needed. We assume that
13407 + # if connect needs -lnsl, so does gethostbyname.
13408 + ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
13409 +if test "x$ac_cv_func_connect" = xyes; then :
13410 +
13411 +fi
13412 +
13413 + if test $ac_cv_func_connect = no; then
13414 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
13415 +$as_echo_n "checking for connect in -lsocket... " >&6; }
13416 +if ${ac_cv_lib_socket_connect+:} false; then :
13417 + $as_echo_n "(cached) " >&6
13418 +else
13419 + ac_check_lib_save_LIBS=$LIBS
13420 +LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
13421 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13422 +/* end confdefs.h. */
13423 +
13424 +/* Override any GCC internal prototype to avoid an error.
13425 + Use char because int might match the return type of a GCC
13426 + builtin and then its argument prototype would still apply. */
13427 +#ifdef __cplusplus
13428 +extern "C"
13429 +#endif
13430 +char connect ();
13431 +int
13432 +main ()
13433 +{
13434 +return connect ();
13435 + ;
13436 + return 0;
13437 +}
13438 +_ACEOF
13439 +if ac_fn_c_try_link "$LINENO"; then :
13440 + ac_cv_lib_socket_connect=yes
13441 +else
13442 + ac_cv_lib_socket_connect=no
13443 +fi
13444 +rm -f core conftest.err conftest.$ac_objext \
13445 + conftest$ac_exeext conftest.$ac_ext
13446 +LIBS=$ac_check_lib_save_LIBS
13447 +fi
13448 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
13449 +$as_echo "$ac_cv_lib_socket_connect" >&6; }
13450 +if test "x$ac_cv_lib_socket_connect" = xyes; then :
13451 + X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
13452 +fi
13453 +
13454 + fi
13455 +
13456 + # Guillermo Gomez says -lposix is necessary on A/UX.
13457 + ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove"
13458 +if test "x$ac_cv_func_remove" = xyes; then :
13459 +
13460 +fi
13461 +
13462 + if test $ac_cv_func_remove = no; then
13463 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
13464 +$as_echo_n "checking for remove in -lposix... " >&6; }
13465 +if ${ac_cv_lib_posix_remove+:} false; then :
13466 + $as_echo_n "(cached) " >&6
13467 +else
13468 + ac_check_lib_save_LIBS=$LIBS
13469 +LIBS="-lposix $LIBS"
13470 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13471 +/* end confdefs.h. */
13472 +
13473 +/* Override any GCC internal prototype to avoid an error.
13474 + Use char because int might match the return type of a GCC
13475 + builtin and then its argument prototype would still apply. */
13476 +#ifdef __cplusplus
13477 +extern "C"
13478 +#endif
13479 +char remove ();
13480 +int
13481 +main ()
13482 +{
13483 +return remove ();
13484 + ;
13485 + return 0;
13486 +}
13487 +_ACEOF
13488 +if ac_fn_c_try_link "$LINENO"; then :
13489 + ac_cv_lib_posix_remove=yes
13490 +else
13491 + ac_cv_lib_posix_remove=no
13492 +fi
13493 +rm -f core conftest.err conftest.$ac_objext \
13494 + conftest$ac_exeext conftest.$ac_ext
13495 +LIBS=$ac_check_lib_save_LIBS
13496 +fi
13497 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
13498 +$as_echo "$ac_cv_lib_posix_remove" >&6; }
13499 +if test "x$ac_cv_lib_posix_remove" = xyes; then :
13500 + X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
13501 +fi
13502 +
13503 + fi
13504 +
13505 + # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
13506 + ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
13507 +if test "x$ac_cv_func_shmat" = xyes; then :
13508 +
13509 +fi
13510 +
13511 + if test $ac_cv_func_shmat = no; then
13512 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
13513 +$as_echo_n "checking for shmat in -lipc... " >&6; }
13514 +if ${ac_cv_lib_ipc_shmat+:} false; then :
13515 + $as_echo_n "(cached) " >&6
13516 +else
13517 + ac_check_lib_save_LIBS=$LIBS
13518 +LIBS="-lipc $LIBS"
13519 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13520 +/* end confdefs.h. */
13521 +
13522 +/* Override any GCC internal prototype to avoid an error.
13523 + Use char because int might match the return type of a GCC
13524 + builtin and then its argument prototype would still apply. */
13525 +#ifdef __cplusplus
13526 +extern "C"
13527 +#endif
13528 +char shmat ();
13529 +int
13530 +main ()
13531 +{
13532 +return shmat ();
13533 + ;
13534 + return 0;
13535 +}
13536 +_ACEOF
13537 +if ac_fn_c_try_link "$LINENO"; then :
13538 + ac_cv_lib_ipc_shmat=yes
13539 +else
13540 + ac_cv_lib_ipc_shmat=no
13541 +fi
13542 +rm -f core conftest.err conftest.$ac_objext \
13543 + conftest$ac_exeext conftest.$ac_ext
13544 +LIBS=$ac_check_lib_save_LIBS
13545 +fi
13546 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
13547 +$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
13548 +if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
13549 + X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
13550 +fi
13551 +
13552 + fi
13553 + fi
13554 +
13555 + # Check for libraries that X11R6 Xt/Xaw programs need.
13556 + ac_save_LDFLAGS=$LDFLAGS
13557 + test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
13558 + # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
13559 + # check for ICE first), but we must link in the order -lSM -lICE or
13560 + # we get undefined symbols. So assume we have SM if we have ICE.
13561 + # These have to be linked with before -lX11, unlike the other
13562 + # libraries we check for below, so use a different variable.
13563 + # John Interrante, Karl Berry
13564 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
13565 +$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
13566 +if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
13567 + $as_echo_n "(cached) " >&6
13568 +else
13569 + ac_check_lib_save_LIBS=$LIBS
13570 +LIBS="-lICE $X_EXTRA_LIBS $LIBS"
13571 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13572 +/* end confdefs.h. */
13573 +
13574 +/* Override any GCC internal prototype to avoid an error.
13575 + Use char because int might match the return type of a GCC
13576 + builtin and then its argument prototype would still apply. */
13577 +#ifdef __cplusplus
13578 +extern "C"
13579 +#endif
13580 +char IceConnectionNumber ();
13581 +int
13582 +main ()
13583 +{
13584 +return IceConnectionNumber ();
13585 + ;
13586 + return 0;
13587 +}
13588 +_ACEOF
13589 +if ac_fn_c_try_link "$LINENO"; then :
13590 + ac_cv_lib_ICE_IceConnectionNumber=yes
13591 +else
13592 + ac_cv_lib_ICE_IceConnectionNumber=no
13593 +fi
13594 +rm -f core conftest.err conftest.$ac_objext \
13595 + conftest$ac_exeext conftest.$ac_ext
13596 +LIBS=$ac_check_lib_save_LIBS
13597 +fi
13598 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
13599 +$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
13600 +if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
13601 + X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
13602 +fi
13603 +
13604 + LDFLAGS=$ac_save_LDFLAGS
13605 +
13606 +fi
13607 +
13608 +
13609 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5
13610 +$as_echo_n "checking for sqrt in -lm... " >&6; }
13611 +if ${ac_cv_lib_m_sqrt+:} false; then :
13612 + $as_echo_n "(cached) " >&6
13613 +else
13614 + ac_check_lib_save_LIBS=$LIBS
13615 +LIBS="-lm $LIBS"
13616 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13617 +/* end confdefs.h. */
13618 +
13619 +/* Override any GCC internal prototype to avoid an error.
13620 + Use char because int might match the return type of a GCC
13621 + builtin and then its argument prototype would still apply. */
13622 +#ifdef __cplusplus
13623 +extern "C"
13624 +#endif
13625 +char sqrt ();
13626 +int
13627 +main ()
13628 +{
13629 +return sqrt ();
13630 + ;
13631 + return 0;
13632 +}
13633 +_ACEOF
13634 +if ac_fn_c_try_link "$LINENO"; then :
13635 + ac_cv_lib_m_sqrt=yes
13636 +else
13637 + ac_cv_lib_m_sqrt=no
13638 +fi
13639 +rm -f core conftest.err conftest.$ac_objext \
13640 + conftest$ac_exeext conftest.$ac_ext
13641 +LIBS=$ac_check_lib_save_LIBS
13642 +fi
13643 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5
13644 +$as_echo "$ac_cv_lib_m_sqrt" >&6; }
13645 +if test "x$ac_cv_lib_m_sqrt" = xyes; then :
13646 + cat >>confdefs.h <<_ACEOF
13647 +#define HAVE_LIBM 1
13648 +_ACEOF
13649 +
13650 + LIBS="-lm $LIBS"
13651 +
13652 +fi
13653 +
13654 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
13655 +$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
13656 +if ${ac_cv_lib_pthread_pthread_create+:} false; then :
13657 + $as_echo_n "(cached) " >&6
13658 +else
13659 + ac_check_lib_save_LIBS=$LIBS
13660 +LIBS="-lpthread $LIBS"
13661 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13662 +/* end confdefs.h. */
13663 +
13664 +/* Override any GCC internal prototype to avoid an error.
13665 + Use char because int might match the return type of a GCC
13666 + builtin and then its argument prototype would still apply. */
13667 +#ifdef __cplusplus
13668 +extern "C"
13669 +#endif
13670 +char pthread_create ();
13671 +int
13672 +main ()
13673 +{
13674 +return pthread_create ();
13675 + ;
13676 + return 0;
13677 +}
13678 +_ACEOF
13679 +if ac_fn_c_try_link "$LINENO"; then :
13680 + ac_cv_lib_pthread_pthread_create=yes
13681 +else
13682 + ac_cv_lib_pthread_pthread_create=no
13683 +fi
13684 +rm -f core conftest.err conftest.$ac_objext \
13685 + conftest$ac_exeext conftest.$ac_ext
13686 +LIBS=$ac_check_lib_save_LIBS
13687 +fi
13688 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
13689 +$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
13690 +if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then :
13691 + cat >>confdefs.h <<_ACEOF
13692 +#define HAVE_LIBPTHREAD 1
13693 +_ACEOF
13694 +
13695 + LIBS="-lpthread $LIBS"
13696 +
13697 +fi
13698 +
13699 +
13700 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFOpen in -ltiff" >&5
13701 +$as_echo_n "checking for TIFFOpen in -ltiff... " >&6; }
13702 +if ${ac_cv_lib_tiff_TIFFOpen+:} false; then :
13703 + $as_echo_n "(cached) " >&6
13704 +else
13705 + ac_check_lib_save_LIBS=$LIBS
13706 +LIBS="-ltiff -lm $LIBS"
13707 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13708 +/* end confdefs.h. */
13709 +
13710 +/* Override any GCC internal prototype to avoid an error.
13711 + Use char because int might match the return type of a GCC
13712 + builtin and then its argument prototype would still apply. */
13713 +#ifdef __cplusplus
13714 +extern "C"
13715 +#endif
13716 +char TIFFOpen ();
13717 +int
13718 +main ()
13719 +{
13720 +return TIFFOpen ();
13721 + ;
13722 + return 0;
13723 +}
13724 +_ACEOF
13725 +if ac_fn_c_try_link "$LINENO"; then :
13726 + ac_cv_lib_tiff_TIFFOpen=yes
13727 +else
13728 + ac_cv_lib_tiff_TIFFOpen=no
13729 +fi
13730 +rm -f core conftest.err conftest.$ac_objext \
13731 + conftest$ac_exeext conftest.$ac_ext
13732 +LIBS=$ac_check_lib_save_LIBS
13733 +fi
13734 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFOpen" >&5
13735 +$as_echo "$ac_cv_lib_tiff_TIFFOpen" >&6; }
13736 +if test "x$ac_cv_lib_tiff_TIFFOpen" = xyes; then :
13737 + TIFF_LIBS="-ltiff"
13738 +fi
13739 +
13740 +
13741 +
13742 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
13743 +$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
13744 +if ${ac_cv_lib_rt_clock_gettime+:} false; then :
13745 + $as_echo_n "(cached) " >&6
13746 +else
13747 + ac_check_lib_save_LIBS=$LIBS
13748 +LIBS="-lrt $LIBS"
13749 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13750 +/* end confdefs.h. */
13751 +
13752 +/* Override any GCC internal prototype to avoid an error.
13753 + Use char because int might match the return type of a GCC
13754 + builtin and then its argument prototype would still apply. */
13755 +#ifdef __cplusplus
13756 +extern "C"
13757 +#endif
13758 +char clock_gettime ();
13759 +int
13760 +main ()
13761 +{
13762 +return clock_gettime ();
13763 + ;
13764 + return 0;
13765 +}
13766 +_ACEOF
13767 +if ac_fn_c_try_link "$LINENO"; then :
13768 + ac_cv_lib_rt_clock_gettime=yes
13769 +else
13770 + ac_cv_lib_rt_clock_gettime=no
13771 +fi
13772 +rm -f core conftest.err conftest.$ac_objext \
13773 + conftest$ac_exeext conftest.$ac_ext
13774 +LIBS=$ac_check_lib_save_LIBS
13775 +fi
13776 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
13777 +$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
13778 +if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
13779 + cat >>confdefs.h <<_ACEOF
13780 +#define HAVE_LIBRT 1
13781 +_ACEOF
13782 +
13783 + LIBS="-lrt $LIBS"
13784 +
13785 +fi
13786 +
13787 +
13788 +
13789 +# Check whether --with-system-libicc was given.
13790 +if test "${with_system_libicc+set}" = set; then :
13791 + withval=$with_system_libicc; system_libicc=$withval
13792 +else
13793 + system_libicc=no
13794 +fi
13795 +
13796 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use system libicc or not" >&5
13797 +$as_echo_n "checking whether to use system libicc or not... " >&6; }
13798 +if test x$system_libicc = xno ; then
13799 + HAVE_ICC=false
13800 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13801 +$as_echo "no" >&6; }
13802 +else
13803 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13804 +$as_echo "yes" >&6; }
13805 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for new_icmFileStd_name in -licc" >&5
13806 +$as_echo_n "checking for new_icmFileStd_name in -licc... " >&6; }
13807 +if ${ac_cv_lib_icc_new_icmFileStd_name+:} false; then :
13808 + $as_echo_n "(cached) " >&6
13809 +else
13810 + ac_check_lib_save_LIBS=$LIBS
13811 +LIBS="-licc -lm $LIBS"
13812 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13813 +/* end confdefs.h. */
13814 +
13815 +/* Override any GCC internal prototype to avoid an error.
13816 + Use char because int might match the return type of a GCC
13817 + builtin and then its argument prototype would still apply. */
13818 +#ifdef __cplusplus
13819 +extern "C"
13820 +#endif
13821 +char new_icmFileStd_name ();
13822 +int
13823 +main ()
13824 +{
13825 +return new_icmFileStd_name ();
13826 + ;
13827 + return 0;
13828 +}
13829 +_ACEOF
13830 +if ac_fn_c_try_link "$LINENO"; then :
13831 + ac_cv_lib_icc_new_icmFileStd_name=yes
13832 +else
13833 + ac_cv_lib_icc_new_icmFileStd_name=no
13834 +fi
13835 +rm -f core conftest.err conftest.$ac_objext \
13836 + conftest$ac_exeext conftest.$ac_ext
13837 +LIBS=$ac_check_lib_save_LIBS
13838 +fi
13839 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_icc_new_icmFileStd_name" >&5
13840 +$as_echo "$ac_cv_lib_icc_new_icmFileStd_name" >&6; }
13841 +if test "x$ac_cv_lib_icc_new_icmFileStd_name" = xyes; then :
13842 + HAVE_ICC="true"
13843 +fi
13844 +
13845 + if test "$HAVE_ICC" != "true" ; then
13846 + as_fn_error $? "system libicc missing or not compatible with argyllcms" "$LINENO" 5
13847 + fi
13848 +fi
13849 +if test "$HAVE_ICC" = "true" ; then
13850 + ICC_LIBS="-licc"
13851 +else
13852 + ICC_LIBS='$(top_srcdir)/icc/libicc.la'
13853 + ICC_CFLAGS='-I$(top_srcdir)/icc'
13854 + ICC_SUBDIRS='icc'
13855 +fi
13856 +
13857 +
13858 +
13859 +
13860 +
13861 +# Check whether --with-system-libyajl was given.
13862 +if test "${with_system_libyajl+set}" = set; then :
13863 + withval=$with_system_libyajl; system_libyajl=$withval
13864 +else
13865 + system_libyajl=no
13866 +fi
13867 +
13868 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use system libyajl or not" >&5
13869 +$as_echo_n "checking whether to use system libyajl or not... " >&6; }
13870 +if test x$system_libyajl = xno ; then
13871 + HAVE_YAJL=false
13872 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13873 +$as_echo "no" >&6; }
13874 +else
13875 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13876 +$as_echo "yes" >&6; }
13877 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for yajl_gen_c_comment in -lyajl" >&5
13878 +$as_echo_n "checking for yajl_gen_c_comment in -lyajl... " >&6; }
13879 +if ${ac_cv_lib_yajl_yajl_gen_c_comment+:} false; then :
13880 + $as_echo_n "(cached) " >&6
13881 +else
13882 + ac_check_lib_save_LIBS=$LIBS
13883 +LIBS="-lyajl -lm $LIBS"
13884 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13885 +/* end confdefs.h. */
13886 +
13887 +/* Override any GCC internal prototype to avoid an error.
13888 + Use char because int might match the return type of a GCC
13889 + builtin and then its argument prototype would still apply. */
13890 +#ifdef __cplusplus
13891 +extern "C"
13892 +#endif
13893 +char yajl_gen_c_comment ();
13894 +int
13895 +main ()
13896 +{
13897 +return yajl_gen_c_comment ();
13898 + ;
13899 + return 0;
13900 +}
13901 +_ACEOF
13902 +if ac_fn_c_try_link "$LINENO"; then :
13903 + ac_cv_lib_yajl_yajl_gen_c_comment=yes
13904 +else
13905 + ac_cv_lib_yajl_yajl_gen_c_comment=no
13906 +fi
13907 +rm -f core conftest.err conftest.$ac_objext \
13908 + conftest$ac_exeext conftest.$ac_ext
13909 +LIBS=$ac_check_lib_save_LIBS
13910 +fi
13911 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_yajl_yajl_gen_c_comment" >&5
13912 +$as_echo "$ac_cv_lib_yajl_yajl_gen_c_comment" >&6; }
13913 +if test "x$ac_cv_lib_yajl_yajl_gen_c_comment" = xyes; then :
13914 + HAVE_YAJL="true"
13915 +fi
13916 +
13917 + if test "$HAVE_YAJL" != "true" ; then
13918 + as_fn_error $? "system libyajl missing or not compatible with argyllcms" "$LINENO" 5
13919 + fi
13920 +fi
13921 +if test "$HAVE_YAJL" = "true" ; then
13922 + YAJL_LIBS="-lyajl"
13923 +else
13924 + YAJL_LIBS='$(top_srcdir)/jcnf/yajl/libyajl.la'
13925 + YAJL_CFLAGS='-I$(top_srcdir)/jcnf/yajl'
13926 + YAJL_SUBDIRS='yajl'
13927 +fi
13928 +
13929 +
13930 +
13931 +
13932 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XOpenDisplay in -lX11" >&5
13933 +$as_echo_n "checking for XOpenDisplay in -lX11... " >&6; }
13934 +if ${ac_cv_lib_X11_XOpenDisplay+:} false; then :
13935 + $as_echo_n "(cached) " >&6
13936 +else
13937 + ac_check_lib_save_LIBS=$LIBS
13938 +LIBS="-lX11 $LIBS"
13939 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13940 +/* end confdefs.h. */
13941 +
13942 +/* Override any GCC internal prototype to avoid an error.
13943 + Use char because int might match the return type of a GCC
13944 + builtin and then its argument prototype would still apply. */
13945 +#ifdef __cplusplus
13946 +extern "C"
13947 +#endif
13948 +char XOpenDisplay ();
13949 +int
13950 +main ()
13951 +{
13952 +return XOpenDisplay ();
13953 + ;
13954 + return 0;
13955 +}
13956 +_ACEOF
13957 +if ac_fn_c_try_link "$LINENO"; then :
13958 + ac_cv_lib_X11_XOpenDisplay=yes
13959 +else
13960 + ac_cv_lib_X11_XOpenDisplay=no
13961 +fi
13962 +rm -f core conftest.err conftest.$ac_objext \
13963 + conftest$ac_exeext conftest.$ac_ext
13964 +LIBS=$ac_check_lib_save_LIBS
13965 +fi
13966 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_X11_XOpenDisplay" >&5
13967 +$as_echo "$ac_cv_lib_X11_XOpenDisplay" >&6; }
13968 +if test "x$ac_cv_lib_X11_XOpenDisplay" = xyes; then :
13969 + X_LIBS="$X_LIBS -lX11"
13970 +fi
13971 +
13972 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XextFindDisplay in -lXext" >&5
13973 +$as_echo_n "checking for XextFindDisplay in -lXext... " >&6; }
13974 +if ${ac_cv_lib_Xext_XextFindDisplay+:} false; then :
13975 + $as_echo_n "(cached) " >&6
13976 +else
13977 + ac_check_lib_save_LIBS=$LIBS
13978 +LIBS="-lXext -lX11 $LIBS"
13979 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13980 +/* end confdefs.h. */
13981 +
13982 +/* Override any GCC internal prototype to avoid an error.
13983 + Use char because int might match the return type of a GCC
13984 + builtin and then its argument prototype would still apply. */
13985 +#ifdef __cplusplus
13986 +extern "C"
13987 +#endif
13988 +char XextFindDisplay ();
13989 +int
13990 +main ()
13991 +{
13992 +return XextFindDisplay ();
13993 + ;
13994 + return 0;
13995 +}
13996 +_ACEOF
13997 +if ac_fn_c_try_link "$LINENO"; then :
13998 + ac_cv_lib_Xext_XextFindDisplay=yes
13999 +else
14000 + ac_cv_lib_Xext_XextFindDisplay=no
14001 +fi
14002 +rm -f core conftest.err conftest.$ac_objext \
14003 + conftest$ac_exeext conftest.$ac_ext
14004 +LIBS=$ac_check_lib_save_LIBS
14005 +fi
14006 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XextFindDisplay" >&5
14007 +$as_echo "$ac_cv_lib_Xext_XextFindDisplay" >&6; }
14008 +if test "x$ac_cv_lib_Xext_XextFindDisplay" = xyes; then :
14009 + X_LIBS="$X_LIBS -lXext"
14010 +fi
14011 +
14012 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XScreenSaverSuspend in -lXss" >&5
14013 +$as_echo_n "checking for XScreenSaverSuspend in -lXss... " >&6; }
14014 +if ${ac_cv_lib_Xss_XScreenSaverSuspend+:} false; then :
14015 + $as_echo_n "(cached) " >&6
14016 +else
14017 + ac_check_lib_save_LIBS=$LIBS
14018 +LIBS="-lXss -lXext -lX11 $LIBS"
14019 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14020 +/* end confdefs.h. */
14021 +
14022 +/* Override any GCC internal prototype to avoid an error.
14023 + Use char because int might match the return type of a GCC
14024 + builtin and then its argument prototype would still apply. */
14025 +#ifdef __cplusplus
14026 +extern "C"
14027 +#endif
14028 +char XScreenSaverSuspend ();
14029 +int
14030 +main ()
14031 +{
14032 +return XScreenSaverSuspend ();
14033 + ;
14034 + return 0;
14035 +}
14036 +_ACEOF
14037 +if ac_fn_c_try_link "$LINENO"; then :
14038 + ac_cv_lib_Xss_XScreenSaverSuspend=yes
14039 +else
14040 + ac_cv_lib_Xss_XScreenSaverSuspend=no
14041 +fi
14042 +rm -f core conftest.err conftest.$ac_objext \
14043 + conftest$ac_exeext conftest.$ac_ext
14044 +LIBS=$ac_check_lib_save_LIBS
14045 +fi
14046 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xss_XScreenSaverSuspend" >&5
14047 +$as_echo "$ac_cv_lib_Xss_XScreenSaverSuspend" >&6; }
14048 +if test "x$ac_cv_lib_Xss_XScreenSaverSuspend" = xyes; then :
14049 + X_LIBS="$X_LIBS -lXss"
14050 +fi
14051 +
14052 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRRootToScreen in -lXrandr" >&5
14053 +$as_echo_n "checking for XRRRootToScreen in -lXrandr... " >&6; }
14054 +if ${ac_cv_lib_Xrandr_XRRRootToScreen+:} false; then :
14055 + $as_echo_n "(cached) " >&6
14056 +else
14057 + ac_check_lib_save_LIBS=$LIBS
14058 +LIBS="-lXrandr -LXext -lX11 $LIBS"
14059 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14060 +/* end confdefs.h. */
14061 +
14062 +/* Override any GCC internal prototype to avoid an error.
14063 + Use char because int might match the return type of a GCC
14064 + builtin and then its argument prototype would still apply. */
14065 +#ifdef __cplusplus
14066 +extern "C"
14067 +#endif
14068 +char XRRRootToScreen ();
14069 +int
14070 +main ()
14071 +{
14072 +return XRRRootToScreen ();
14073 + ;
14074 + return 0;
14075 +}
14076 +_ACEOF
14077 +if ac_fn_c_try_link "$LINENO"; then :
14078 + ac_cv_lib_Xrandr_XRRRootToScreen=yes
14079 +else
14080 + ac_cv_lib_Xrandr_XRRRootToScreen=no
14081 +fi
14082 +rm -f core conftest.err conftest.$ac_objext \
14083 + conftest$ac_exeext conftest.$ac_ext
14084 +LIBS=$ac_check_lib_save_LIBS
14085 +fi
14086 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrandr_XRRRootToScreen" >&5
14087 +$as_echo "$ac_cv_lib_Xrandr_XRRRootToScreen" >&6; }
14088 +if test "x$ac_cv_lib_Xrandr_XRRRootToScreen" = xyes; then :
14089 + X_LIBS="$X_LIBS -lXrandr"
14090 +fi
14091 +
14092 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XineramaQueryScreens in -lXinerama" >&5
14093 +$as_echo_n "checking for XineramaQueryScreens in -lXinerama... " >&6; }
14094 +if ${ac_cv_lib_Xinerama_XineramaQueryScreens+:} false; then :
14095 + $as_echo_n "(cached) " >&6
14096 +else
14097 + ac_check_lib_save_LIBS=$LIBS
14098 +LIBS="-lXinerama -LXext -lX11 $LIBS"
14099 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14100 +/* end confdefs.h. */
14101 +
14102 +/* Override any GCC internal prototype to avoid an error.
14103 + Use char because int might match the return type of a GCC
14104 + builtin and then its argument prototype would still apply. */
14105 +#ifdef __cplusplus
14106 +extern "C"
14107 +#endif
14108 +char XineramaQueryScreens ();
14109 +int
14110 +main ()
14111 +{
14112 +return XineramaQueryScreens ();
14113 + ;
14114 + return 0;
14115 +}
14116 +_ACEOF
14117 +if ac_fn_c_try_link "$LINENO"; then :
14118 + ac_cv_lib_Xinerama_XineramaQueryScreens=yes
14119 +else
14120 + ac_cv_lib_Xinerama_XineramaQueryScreens=no
14121 +fi
14122 +rm -f core conftest.err conftest.$ac_objext \
14123 + conftest$ac_exeext conftest.$ac_ext
14124 +LIBS=$ac_check_lib_save_LIBS
14125 +fi
14126 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xinerama_XineramaQueryScreens" >&5
14127 +$as_echo "$ac_cv_lib_Xinerama_XineramaQueryScreens" >&6; }
14128 +if test "x$ac_cv_lib_Xinerama_XineramaQueryScreens" = xyes; then :
14129 + X_LIBS="$X_LIBS -lXinerama"
14130 +fi
14131 +
14132 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XF86VidModeGetGamma in -lXxf86vm" >&5
14133 +$as_echo_n "checking for XF86VidModeGetGamma in -lXxf86vm... " >&6; }
14134 +if ${ac_cv_lib_Xxf86vm_XF86VidModeGetGamma+:} false; then :
14135 + $as_echo_n "(cached) " >&6
14136 +else
14137 + ac_check_lib_save_LIBS=$LIBS
14138 +LIBS="-lXxf86vm -lXext -lX11 $LIBS"
14139 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14140 +/* end confdefs.h. */
14141 +
14142 +/* Override any GCC internal prototype to avoid an error.
14143 + Use char because int might match the return type of a GCC
14144 + builtin and then its argument prototype would still apply. */
14145 +#ifdef __cplusplus
14146 +extern "C"
14147 +#endif
14148 +char XF86VidModeGetGamma ();
14149 +int
14150 +main ()
14151 +{
14152 +return XF86VidModeGetGamma ();
14153 + ;
14154 + return 0;
14155 +}
14156 +_ACEOF
14157 +if ac_fn_c_try_link "$LINENO"; then :
14158 + ac_cv_lib_Xxf86vm_XF86VidModeGetGamma=yes
14159 +else
14160 + ac_cv_lib_Xxf86vm_XF86VidModeGetGamma=no
14161 +fi
14162 +rm -f core conftest.err conftest.$ac_objext \
14163 + conftest$ac_exeext conftest.$ac_ext
14164 +LIBS=$ac_check_lib_save_LIBS
14165 +fi
14166 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xxf86vm_XF86VidModeGetGamma" >&5
14167 +$as_echo "$ac_cv_lib_Xxf86vm_XF86VidModeGetGamma" >&6; }
14168 +if test "x$ac_cv_lib_Xxf86vm_XF86VidModeGetGamma" = xyes; then :
14169 + X_LIBS="$X_LIBS -lXxf86vm"
14170 +fi
14171 +
14172 +
14173 +
14174 +
14175 +
14176 +case $host in
14177 + *-linux*)
14178 + OS_LINUX=1
14179 + OS_BSD=0
14180 +
14181 +$as_echo "#define OS_LINUX 1" >>confdefs.h
14182 +
14183 + if true; then
14184 + OS_LINUX_TRUE=
14185 + OS_LINUX_FALSE='#'
14186 +else
14187 + OS_LINUX_TRUE='#'
14188 + OS_LINUX_FALSE=
14189 +fi
14190 +
14191 + ;;
14192 + *-freebsd*|*-kfreebsd*-gnu|*-openbsd*|*-netbsd*)
14193 + OS_LINUX=0
14194 + OS_BSD=1
14195 +
14196 +$as_echo "#define OS_LINUX 0" >>confdefs.h
14197 +
14198 + if false; then
14199 + OS_LINUX_TRUE=
14200 + OS_LINUX_FALSE='#'
14201 +else
14202 + OS_LINUX_TRUE='#'
14203 + OS_LINUX_FALSE=
14204 +fi
14205 +
14206 + ;;
14207 + *)
14208 + OS_LINUX=0
14209 + OS_BSD=0
14210 +
14211 +$as_echo "#define OS_LINUX 0" >>confdefs.h
14212 +
14213 + if false; then
14214 + OS_LINUX_TRUE=
14215 + OS_LINUX_FALSE='#'
14216 +else
14217 + OS_LINUX_TRUE='#'
14218 + OS_LINUX_FALSE=
14219 +fi
14220 +
14221 + ;;
14222 +esac
14223 +
14224 +$as_echo "#define API_EXPORTED /**/" >>confdefs.h
14225 +
14226 +
14227 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14228 +$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
14229 +if ${ac_cv_c_bigendian+:} false; then :
14230 + $as_echo_n "(cached) " >&6
14231 +else
14232 + ac_cv_c_bigendian=unknown
14233 + # See if we're dealing with a universal compiler.
14234 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14235 +/* end confdefs.h. */
14236 +#ifndef __APPLE_CC__
14237 + not a universal capable compiler
14238 + #endif
14239 + typedef int dummy;
14240 +
14241 +_ACEOF
14242 +if ac_fn_c_try_compile "$LINENO"; then :
14243 +
14244 + # Check for potential -arch flags. It is not universal unless
14245 + # there are at least two -arch flags with different values.
14246 + ac_arch=
14247 + ac_prev=
14248 + for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14249 + if test -n "$ac_prev"; then
14250 + case $ac_word in
14251 + i?86 | x86_64 | ppc | ppc64)
14252 + if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14253 + ac_arch=$ac_word
14254 + else
14255 + ac_cv_c_bigendian=universal
14256 + break
14257 + fi
14258 + ;;
14259 + esac
14260 + ac_prev=
14261 + elif test "x$ac_word" = "x-arch"; then
14262 + ac_prev=arch
14263 + fi
14264 + done
14265 +fi
14266 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14267 + if test $ac_cv_c_bigendian = unknown; then
14268 + # See if sys/param.h defines the BYTE_ORDER macro.
14269 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14270 +/* end confdefs.h. */
14271 +#include <sys/types.h>
14272 + #include <sys/param.h>
14273 +
14274 +int
14275 +main ()
14276 +{
14277 +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14278 + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14279 + && LITTLE_ENDIAN)
14280 + bogus endian macros
14281 + #endif
14282 +
14283 + ;
14284 + return 0;
14285 +}
14286 +_ACEOF
14287 +if ac_fn_c_try_compile "$LINENO"; then :
14288 + # It does; now see whether it defined to BIG_ENDIAN or not.
14289 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14290 +/* end confdefs.h. */
14291 +#include <sys/types.h>
14292 + #include <sys/param.h>
14293 +
14294 +int
14295 +main ()
14296 +{
14297 +#if BYTE_ORDER != BIG_ENDIAN
14298 + not big endian
14299 + #endif
14300 +
14301 + ;
14302 + return 0;
14303 +}
14304 +_ACEOF
14305 +if ac_fn_c_try_compile "$LINENO"; then :
14306 + ac_cv_c_bigendian=yes
14307 +else
14308 + ac_cv_c_bigendian=no
14309 +fi
14310 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14311 +fi
14312 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14313 + fi
14314 + if test $ac_cv_c_bigendian = unknown; then
14315 + # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14316 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14317 +/* end confdefs.h. */
14318 +#include <limits.h>
14319 +
14320 +int
14321 +main ()
14322 +{
14323 +#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14324 + bogus endian macros
14325 + #endif
14326 +
14327 + ;
14328 + return 0;
14329 +}
14330 +_ACEOF
14331 +if ac_fn_c_try_compile "$LINENO"; then :
14332 + # It does; now see whether it defined to _BIG_ENDIAN or not.
14333 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14334 +/* end confdefs.h. */
14335 +#include <limits.h>
14336 +
14337 +int
14338 +main ()
14339 +{
14340 +#ifndef _BIG_ENDIAN
14341 + not big endian
14342 + #endif
14343 +
14344 + ;
14345 + return 0;
14346 +}
14347 +_ACEOF
14348 +if ac_fn_c_try_compile "$LINENO"; then :
14349 + ac_cv_c_bigendian=yes
14350 +else
14351 + ac_cv_c_bigendian=no
14352 +fi
14353 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14354 +fi
14355 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14356 + fi
14357 + if test $ac_cv_c_bigendian = unknown; then
14358 + # Compile a test program.
14359 + if test "$cross_compiling" = yes; then :
14360 + # Try to guess by grepping values from an object file.
14361 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14362 +/* end confdefs.h. */
14363 +short int ascii_mm[] =
14364 + { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14365 + short int ascii_ii[] =
14366 + { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14367 + int use_ascii (int i) {
14368 + return ascii_mm[i] + ascii_ii[i];
14369 + }
14370 + short int ebcdic_ii[] =
14371 + { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14372 + short int ebcdic_mm[] =
14373 + { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14374 + int use_ebcdic (int i) {
14375 + return ebcdic_mm[i] + ebcdic_ii[i];
14376 + }
14377 + extern int foo;
14378 +
14379 +int
14380 +main ()
14381 +{
14382 +return use_ascii (foo) == use_ebcdic (foo);
14383 + ;
14384 + return 0;
14385 +}
14386 +_ACEOF
14387 +if ac_fn_c_try_compile "$LINENO"; then :
14388 + if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14389 + ac_cv_c_bigendian=yes
14390 + fi
14391 + if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14392 + if test "$ac_cv_c_bigendian" = unknown; then
14393 + ac_cv_c_bigendian=no
14394 + else
14395 + # finding both strings is unlikely to happen, but who knows?
14396 + ac_cv_c_bigendian=unknown
14397 + fi
14398 + fi
14399 +fi
14400 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14401 +else
14402 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14403 +/* end confdefs.h. */
14404 +$ac_includes_default
14405 +int
14406 +main ()
14407 +{
14408 +
14409 + /* Are we little or big endian? From Harbison&Steele. */
14410 + union
14411 + {
14412 + long int l;
14413 + char c[sizeof (long int)];
14414 + } u;
14415 + u.l = 1;
14416 + return u.c[sizeof (long int) - 1] == 1;
14417 +
14418 + ;
14419 + return 0;
14420 +}
14421 +_ACEOF
14422 +if ac_fn_c_try_run "$LINENO"; then :
14423 + ac_cv_c_bigendian=no
14424 +else
14425 + ac_cv_c_bigendian=yes
14426 +fi
14427 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14428 + conftest.$ac_objext conftest.beam conftest.$ac_ext
14429 +fi
14430 +
14431 + fi
14432 +fi
14433 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14434 +$as_echo "$ac_cv_c_bigendian" >&6; }
14435 + case $ac_cv_c_bigendian in #(
14436 + yes)
14437 + $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14438 +;; #(
14439 + no)
14440 + ;; #(
14441 + universal)
14442 +
14443 +$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
14444 +
14445 + ;; #(
14446 + *)
14447 + as_fn_error $? "unknown endianness
14448 + presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
14449 + esac
14450 +
14451 +if test "$ac_cv_c_bigendian" = "yes"; then
14452 + BIGENDIAN="1"
14453 +else
14454 + BIGENDIAN="0"
14455 +fi
14456 +
14457 +
14458 +ac_config_files="$ac_config_files Makefile h/Makefile doc/Makefile ref/Makefile numlib/Makefile cgats/Makefile plot/Makefile rspl/Makefile icc/Makefile gamut/Makefile xicc/Makefile link/Makefile spectro/Makefile profile/Makefile tweak/Makefile scanin/Makefile render/Makefile target/Makefile imdi/Makefile jcnf/Makefile jcnf/yajl/Makefile ucmm/Makefile"
14459 +
14460 +
14461 +cat >confcache <<\_ACEOF
14462 +# This file is a shell script that caches the results of configure
14463 +# tests run on this system so they can be shared between configure
14464 +# scripts and configure runs, see configure's option --config-cache.
14465 +# It is not useful on other systems. If it contains results you don't
14466 +# want to keep, you may remove or edit it.
14467 +#
14468 +# config.status only pays attention to the cache file if you give it
14469 +# the --recheck option to rerun configure.
14470 +#
14471 +# `ac_cv_env_foo' variables (set or unset) will be overridden when
14472 +# loading this file, other *unset* `ac_cv_foo' will be assigned the
14473 +# following values.
14474 +
14475 +_ACEOF
14476 +
14477 +# The following way of writing the cache mishandles newlines in values,
14478 +# but we know of no workaround that is simple, portable, and efficient.
14479 +# So, we kill variables containing newlines.
14480 +# Ultrix sh set writes to stderr and can't be redirected directly,
14481 +# and sets the high bit in the cache file unless we assign to the vars.
14482 +(
14483 + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14484 + eval ac_val=\$$ac_var
14485 + case $ac_val in #(
14486 + *${as_nl}*)
14487 + case $ac_var in #(
14488 + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14489 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
14490 + esac
14491 + case $ac_var in #(
14492 + _ | IFS | as_nl) ;; #(
14493 + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14494 + *) { eval $ac_var=; unset $ac_var;} ;;
14495 + esac ;;
14496 + esac
14497 + done
14498 +
14499 + (set) 2>&1 |
14500 + case $as_nl`(ac_space=' '; set) 2>&1` in #(
14501 + *${as_nl}ac_space=\ *)
14502 + # `set' does not quote correctly, so add quotes: double-quote
14503 + # substitution turns \\\\ into \\, and sed turns \\ into \.
14504 + sed -n \
14505 + "s/'/'\\\\''/g;
14506 + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
14507 + ;; #(
14508 + *)
14509 + # `set' quotes correctly as required by POSIX, so do not add quotes.
14510 + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
14511 + ;;
14512 + esac |
14513 + sort
14514 +) |
14515 + sed '
14516 + /^ac_cv_env_/b end
14517 + t clear
14518 + :clear
14519 + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14520 + t end
14521 + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14522 + :end' >>confcache
14523 +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14524 + if test -w "$cache_file"; then
14525 + if test "x$cache_file" != "x/dev/null"; then
14526 + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14527 +$as_echo "$as_me: updating cache $cache_file" >&6;}
14528 + if test ! -f "$cache_file" || test -h "$cache_file"; then
14529 + cat confcache >"$cache_file"
14530 + else
14531 + case $cache_file in #(
14532 + */* | ?:*)
14533 + mv -f confcache "$cache_file"$$ &&
14534 + mv -f "$cache_file"$$ "$cache_file" ;; #(
14535 + *)
14536 + mv -f confcache "$cache_file" ;;
14537 + esac
14538 + fi
14539 + fi
14540 + else
14541 + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14542 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
14543 + fi
14544 +fi
14545 +rm -f confcache
14546 +
14547 +test "x$prefix" = xNONE && prefix=$ac_default_prefix
14548 +# Let make expand exec_prefix.
14549 +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14550 +
14551 +DEFS=-DHAVE_CONFIG_H
14552 +
14553 +ac_libobjs=
14554 +ac_ltlibobjs=
14555 +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14556 + # 1. Remove the extension, and $U if already installed.
14557 + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
14558 + ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
14559 + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14560 + # will be set to the directory where LIBOBJS objects are built.
14561 + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14562 + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
14563 +done
14564 +LIBOBJS=$ac_libobjs
14565 +
14566 +LTLIBOBJS=$ac_ltlibobjs
14567 +
14568 +
14569 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
14570 +$as_echo_n "checking that generated files are newer than configure... " >&6; }
14571 + if test -n "$am_sleep_pid"; then
14572 + # Hide warnings about reused PIDs.
14573 + wait $am_sleep_pid 2>/dev/null
14574 + fi
14575 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14576 +$as_echo "done" >&6; }
14577 + if test -n "$EXEEXT"; then
14578 + am__EXEEXT_TRUE=
14579 + am__EXEEXT_FALSE='#'
14580 +else
14581 + am__EXEEXT_TRUE='#'
14582 + am__EXEEXT_FALSE=
14583 +fi
14584 +
14585 +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
14586 + as_fn_error $? "conditional \"AMDEP\" was never defined.
14587 +Usually this means the macro was only invoked conditionally." "$LINENO" 5
14588 +fi
14589 +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
14590 + as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
14591 +Usually this means the macro was only invoked conditionally." "$LINENO" 5
14592 +fi
14593 +if test -z "${OS_LINUX_TRUE}" && test -z "${OS_LINUX_FALSE}"; then
14594 + as_fn_error $? "conditional \"OS_LINUX\" was never defined.
14595 +Usually this means the macro was only invoked conditionally." "$LINENO" 5
14596 +fi
14597 +if test -z "${OS_LINUX_TRUE}" && test -z "${OS_LINUX_FALSE}"; then
14598 + as_fn_error $? "conditional \"OS_LINUX\" was never defined.
14599 +Usually this means the macro was only invoked conditionally." "$LINENO" 5
14600 +fi
14601 +if test -z "${OS_LINUX_TRUE}" && test -z "${OS_LINUX_FALSE}"; then
14602 + as_fn_error $? "conditional \"OS_LINUX\" was never defined.
14603 +Usually this means the macro was only invoked conditionally." "$LINENO" 5
14604 +fi
14605 +
14606 +
14607 +: "${CONFIG_STATUS=./config.status}"
14608 +ac_write_fail=0
14609 +ac_clean_files_save=$ac_clean_files
14610 +ac_clean_files="$ac_clean_files $CONFIG_STATUS"
14611 +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14612 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14613 +as_write_fail=0
14614 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
14615 +#! $SHELL
14616 +# Generated by $as_me.
14617 +# Run this file to recreate the current configuration.
14618 +# Compiler output produced by configure, useful for debugging
14619 +# configure, is in config.log if it exists.
14620 +
14621 +debug=false
14622 +ac_cs_recheck=false
14623 +ac_cs_silent=false
14624 +
14625 +SHELL=\${CONFIG_SHELL-$SHELL}
14626 +export SHELL
14627 +_ASEOF
14628 +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14629 +## -------------------- ##
14630 +## M4sh Initialization. ##
14631 +## -------------------- ##
14632 +
14633 +# Be more Bourne compatible
14634 +DUALCASE=1; export DUALCASE # for MKS sh
14635 +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
14636 + emulate sh
14637 + NULLCMD=:
14638 + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
14639 + # is contrary to our usage. Disable this feature.
14640 + alias -g '${1+"$@"}'='"$@"'
14641 + setopt NO_GLOB_SUBST
14642 +else
14643 + case `(set -o) 2>/dev/null` in #(
14644 + *posix*) :
14645 + set -o posix ;; #(
14646 + *) :
14647 + ;;
14648 +esac
14649 +fi
14650 +
14651 +
14652 +as_nl='
14653 +'
14654 +export as_nl
14655 +# Printing a long string crashes Solaris 7 /usr/bin/printf.
14656 +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14657 +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14658 +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14659 +# Prefer a ksh shell builtin over an external printf program on Solaris,
14660 +# but without wasting forks for bash or zsh.
14661 +if test -z "$BASH_VERSION$ZSH_VERSION" \
14662 + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14663 + as_echo='print -r --'
14664 + as_echo_n='print -rn --'
14665 +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14666 + as_echo='printf %s\n'
14667 + as_echo_n='printf %s'
14668 +else
14669 + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14670 + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14671 + as_echo_n='/usr/ucb/echo -n'
14672 + else
14673 + as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14674 + as_echo_n_body='eval
14675 + arg=$1;
14676 + case $arg in #(
14677 + *"$as_nl"*)
14678 + expr "X$arg" : "X\\(.*\\)$as_nl";
14679 + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14680 + esac;
14681 + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14682 + '
14683 + export as_echo_n_body
14684 + as_echo_n='sh -c $as_echo_n_body as_echo'
14685 + fi
14686 + export as_echo_body
14687 + as_echo='sh -c $as_echo_body as_echo'
14688 +fi
14689 +
14690 +# The user is always right.
14691 +if test "${PATH_SEPARATOR+set}" != set; then
14692 + PATH_SEPARATOR=:
14693 + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14694 + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14695 + PATH_SEPARATOR=';'
14696 + }
14697 +fi
14698 +
14699 +
14700 +# IFS
14701 +# We need space, tab and new line, in precisely that order. Quoting is
14702 +# there to prevent editors from complaining about space-tab.
14703 +# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14704 +# splitting by setting IFS to empty value.)
14705 +IFS=" "" $as_nl"
14706 +
14707 +# Find who we are. Look in the path if we contain no directory separator.
14708 +as_myself=
14709 +case $0 in #((
14710 + *[\\/]* ) as_myself=$0 ;;
14711 + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14712 +for as_dir in $PATH
14713 +do
14714 + IFS=$as_save_IFS
14715 + test -z "$as_dir" && as_dir=.
14716 + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14717 + done
14718 +IFS=$as_save_IFS
14719 +
14720 + ;;
14721 +esac
14722 +# We did not find ourselves, most probably we were run as `sh COMMAND'
14723 +# in which case we are not to be found in the path.
14724 +if test "x$as_myself" = x; then
14725 + as_myself=$0
14726 +fi
14727 +if test ! -f "$as_myself"; then
14728 + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14729 + exit 1
14730 +fi
14731 +
14732 +# Unset variables that we do not need and which cause bugs (e.g. in
14733 +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14734 +# suppresses any "Segmentation fault" message there. '((' could
14735 +# trigger a bug in pdksh 5.2.14.
14736 +for as_var in BASH_ENV ENV MAIL MAILPATH
14737 +do eval test x\${$as_var+set} = xset \
14738 + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
14739 +done
14740 +PS1='$ '
14741 +PS2='> '
14742 +PS4='+ '
14743 +
14744 +# NLS nuisances.
14745 +LC_ALL=C
14746 +export LC_ALL
14747 +LANGUAGE=C
14748 +export LANGUAGE
14749 +
14750 +# CDPATH.
14751 +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14752 +
14753 +
14754 +# as_fn_error STATUS ERROR [LINENO LOG_FD]
14755 +# ----------------------------------------
14756 +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14757 +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
14758 +# script with STATUS, using 1 if that was 0.
14759 +as_fn_error ()
14760 +{
14761 + as_status=$1; test $as_status -eq 0 && as_status=1
14762 + if test "$4"; then
14763 + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14764 + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
14765 + fi
14766 + $as_echo "$as_me: error: $2" >&2
14767 + as_fn_exit $as_status
14768 +} # as_fn_error
14769 +
14770 +
14771 +# as_fn_set_status STATUS
14772 +# -----------------------
14773 +# Set $? to STATUS, without forking.
14774 +as_fn_set_status ()
14775 +{
14776 + return $1
14777 +} # as_fn_set_status
14778 +
14779 +# as_fn_exit STATUS
14780 +# -----------------
14781 +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14782 +as_fn_exit ()
14783 +{
14784 + set +e
14785 + as_fn_set_status $1
14786 + exit $1
14787 +} # as_fn_exit
14788 +
14789 +# as_fn_unset VAR
14790 +# ---------------
14791 +# Portably unset VAR.
14792 +as_fn_unset ()
14793 +{
14794 + { eval $1=; unset $1;}
14795 +}
14796 +as_unset=as_fn_unset
14797 +# as_fn_append VAR VALUE
14798 +# ----------------------
14799 +# Append the text in VALUE to the end of the definition contained in VAR. Take
14800 +# advantage of any shell optimizations that allow amortized linear growth over
14801 +# repeated appends, instead of the typical quadratic growth present in naive
14802 +# implementations.
14803 +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14804 + eval 'as_fn_append ()
14805 + {
14806 + eval $1+=\$2
14807 + }'
14808 +else
14809 + as_fn_append ()
14810 + {
14811 + eval $1=\$$1\$2
14812 + }
14813 +fi # as_fn_append
14814 +
14815 +# as_fn_arith ARG...
14816 +# ------------------
14817 +# Perform arithmetic evaluation on the ARGs, and store the result in the
14818 +# global $as_val. Take advantage of shells that can avoid forks. The arguments
14819 +# must be portable across $(()) and expr.
14820 +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14821 + eval 'as_fn_arith ()
14822 + {
14823 + as_val=$(( $* ))
14824 + }'
14825 +else
14826 + as_fn_arith ()
14827 + {
14828 + as_val=`expr "$@" || test $? -eq 1`
14829 + }
14830 +fi # as_fn_arith
14831 +
14832 +
14833 +if expr a : '\(a\)' >/dev/null 2>&1 &&
14834 + test "X`expr 00001 : '.*\(...\)'`" = X001; then
14835 + as_expr=expr
14836 +else
14837 + as_expr=false
14838 +fi
14839 +
14840 +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14841 + as_basename=basename
14842 +else
14843 + as_basename=false
14844 +fi
14845 +
14846 +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14847 + as_dirname=dirname
14848 +else
14849 + as_dirname=false
14850 +fi
14851 +
14852 +as_me=`$as_basename -- "$0" ||
14853 +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14854 + X"$0" : 'X\(//\)$' \| \
14855 + X"$0" : 'X\(/\)' \| . 2>/dev/null ||
14856 +$as_echo X/"$0" |
14857 + sed '/^.*\/\([^/][^/]*\)\/*$/{
14858 + s//\1/
14859 + q
14860 + }
14861 + /^X\/\(\/\/\)$/{
14862 + s//\1/
14863 + q
14864 + }
14865 + /^X\/\(\/\).*/{
14866 + s//\1/
14867 + q
14868 + }
14869 + s/.*/./; q'`
14870 +
14871 +# Avoid depending upon Character Ranges.
14872 +as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14873 +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14874 +as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14875 +as_cr_digits='0123456789'
14876 +as_cr_alnum=$as_cr_Letters$as_cr_digits
14877 +
14878 +ECHO_C= ECHO_N= ECHO_T=
14879 +case `echo -n x` in #(((((
14880 +-n*)
14881 + case `echo 'xy\c'` in
14882 + *c*) ECHO_T=' ';; # ECHO_T is single tab character.
14883 + xy) ECHO_C='\c';;
14884 + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14885 + ECHO_T=' ';;
14886 + esac;;
14887 +*)
14888 + ECHO_N='-n';;
14889 +esac
14890 +
14891 +rm -f conf$$ conf$$.exe conf$$.file
14892 +if test -d conf$$.dir; then
14893 + rm -f conf$$.dir/conf$$.file
14894 +else
14895 + rm -f conf$$.dir
14896 + mkdir conf$$.dir 2>/dev/null
14897 +fi
14898 +if (echo >conf$$.file) 2>/dev/null; then
14899 + if ln -s conf$$.file conf$$ 2>/dev/null; then
14900 + as_ln_s='ln -s'
14901 + # ... but there are two gotchas:
14902 + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14903 + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14904 + # In both cases, we have to default to `cp -pR'.
14905 + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14906 + as_ln_s='cp -pR'
14907 + elif ln conf$$.file conf$$ 2>/dev/null; then
14908 + as_ln_s=ln
14909 + else
14910 + as_ln_s='cp -pR'
14911 + fi
14912 +else
14913 + as_ln_s='cp -pR'
14914 +fi
14915 +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14916 +rmdir conf$$.dir 2>/dev/null
14917 +
14918 +
14919 +# as_fn_mkdir_p
14920 +# -------------
14921 +# Create "$as_dir" as a directory, including parents if necessary.
14922 +as_fn_mkdir_p ()
14923 +{
14924 +
14925 + case $as_dir in #(
14926 + -*) as_dir=./$as_dir;;
14927 + esac
14928 + test -d "$as_dir" || eval $as_mkdir_p || {
14929 + as_dirs=
14930 + while :; do
14931 + case $as_dir in #(
14932 + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14933 + *) as_qdir=$as_dir;;
14934 + esac
14935 + as_dirs="'$as_qdir' $as_dirs"
14936 + as_dir=`$as_dirname -- "$as_dir" ||
14937 +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14938 + X"$as_dir" : 'X\(//\)[^/]' \| \
14939 + X"$as_dir" : 'X\(//\)$' \| \
14940 + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14941 +$as_echo X"$as_dir" |
14942 + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14943 + s//\1/
14944 + q
14945 + }
14946 + /^X\(\/\/\)[^/].*/{
14947 + s//\1/
14948 + q
14949 + }
14950 + /^X\(\/\/\)$/{
14951 + s//\1/
14952 + q
14953 + }
14954 + /^X\(\/\).*/{
14955 + s//\1/
14956 + q
14957 + }
14958 + s/.*/./; q'`
14959 + test -d "$as_dir" && break
14960 + done
14961 + test -z "$as_dirs" || eval "mkdir $as_dirs"
14962 + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
14963 +
14964 +
14965 +} # as_fn_mkdir_p
14966 +if mkdir -p . 2>/dev/null; then
14967 + as_mkdir_p='mkdir -p "$as_dir"'
14968 +else
14969 + test -d ./-p && rmdir ./-p
14970 + as_mkdir_p=false
14971 +fi
14972 +
14973 +
14974 +# as_fn_executable_p FILE
14975 +# -----------------------
14976 +# Test if FILE is an executable regular file.
14977 +as_fn_executable_p ()
14978 +{
14979 + test -f "$1" && test -x "$1"
14980 +} # as_fn_executable_p
14981 +as_test_x='test -x'
14982 +as_executable_p=as_fn_executable_p
14983 +
14984 +# Sed expression to map a string onto a valid CPP name.
14985 +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
14986 +
14987 +# Sed expression to map a string onto a valid variable name.
14988 +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
14989 +
14990 +
14991 +exec 6>&1
14992 +## ----------------------------------- ##
14993 +## Main body of $CONFIG_STATUS script. ##
14994 +## ----------------------------------- ##
14995 +_ASEOF
14996 +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
14997 +
14998 +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14999 +# Save the log message, to keep $0 and so on meaningful, and to
15000 +# report actual input values of CONFIG_FILES etc. instead of their
15001 +# values after options handling.
15002 +ac_log="
15003 +This file was extended by argyll $as_me 1.3.7, which was
15004 +generated by GNU Autoconf 2.69. Invocation command line was
15005 +
15006 + CONFIG_FILES = $CONFIG_FILES
15007 + CONFIG_HEADERS = $CONFIG_HEADERS
15008 + CONFIG_LINKS = $CONFIG_LINKS
15009 + CONFIG_COMMANDS = $CONFIG_COMMANDS
15010 + $ $0 $@
15011 +
15012 +on `(hostname || uname -n) 2>/dev/null | sed 1q`
15013 +"
15014 +
15015 +_ACEOF
15016 +
15017 +case $ac_config_files in *"
15018 +"*) set x $ac_config_files; shift; ac_config_files=$*;;
15019 +esac
15020 +
15021 +case $ac_config_headers in *"
15022 +"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15023 +esac
15024 +
15025 +
15026 +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15027 +# Files that config.status was made for.
15028 +config_files="$ac_config_files"
15029 +config_headers="$ac_config_headers"
15030 +config_commands="$ac_config_commands"
15031 +
15032 +_ACEOF
15033 +
15034 +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15035 +ac_cs_usage="\
15036 +\`$as_me' instantiates files and other configuration actions
15037 +from templates according to the current configuration. Unless the files
15038 +and actions are specified as TAGs, all are instantiated by default.
15039 +
15040 +Usage: $0 [OPTION]... [TAG]...
15041 +
15042 + -h, --help print this help, then exit
15043 + -V, --version print version number and configuration settings, then exit
15044 + --config print configuration, then exit
15045 + -q, --quiet, --silent
15046 + do not print progress messages
15047 + -d, --debug don't remove temporary files
15048 + --recheck update $as_me by reconfiguring in the same conditions
15049 + --file=FILE[:TEMPLATE]
15050 + instantiate the configuration file FILE
15051 + --header=FILE[:TEMPLATE]
15052 + instantiate the configuration header FILE
15053 +
15054 +Configuration files:
15055 +$config_files
15056 +
15057 +Configuration headers:
15058 +$config_headers
15059 +
15060 +Configuration commands:
15061 +$config_commands
15062 +
15063 +Report bugs to the package provider."
15064 +
15065 +_ACEOF
15066 +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15067 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
15068 +ac_cs_version="\\
15069 +argyll config.status 1.3.7
15070 +configured by $0, generated by GNU Autoconf 2.69,
15071 + with options \\"\$ac_cs_config\\"
15072 +
15073 +Copyright (C) 2012 Free Software Foundation, Inc.
15074 +This config.status script is free software; the Free Software Foundation
15075 +gives unlimited permission to copy, distribute and modify it."
15076 +
15077 +ac_pwd='$ac_pwd'
15078 +srcdir='$srcdir'
15079 +INSTALL='$INSTALL'
15080 +MKDIR_P='$MKDIR_P'
15081 +AWK='$AWK'
15082 +test -n "\$AWK" || AWK=awk
15083 +_ACEOF
15084 +
15085 +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15086 +# The default lists apply if the user does not specify any file.
15087 +ac_need_defaults=:
15088 +while test $# != 0
15089 +do
15090 + case $1 in
15091 + --*=?*)
15092 + ac_option=`expr "X$1" : 'X\([^=]*\)='`
15093 + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
15094 + ac_shift=:
15095 + ;;
15096 + --*=)
15097 + ac_option=`expr "X$1" : 'X\([^=]*\)='`
15098 + ac_optarg=
15099 + ac_shift=:
15100 + ;;
15101 + *)
15102 + ac_option=$1
15103 + ac_optarg=$2
15104 + ac_shift=shift
15105 + ;;
15106 + esac
15107 +
15108 + case $ac_option in
15109 + # Handling of the options.
15110 + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15111 + ac_cs_recheck=: ;;
15112 + --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
15113 + $as_echo "$ac_cs_version"; exit ;;
15114 + --config | --confi | --conf | --con | --co | --c )
15115 + $as_echo "$ac_cs_config"; exit ;;
15116 + --debug | --debu | --deb | --de | --d | -d )
15117 + debug=: ;;
15118 + --file | --fil | --fi | --f )
15119 + $ac_shift
15120 + case $ac_optarg in
15121 + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15122 + '') as_fn_error $? "missing file argument" ;;
15123 + esac
15124 + as_fn_append CONFIG_FILES " '$ac_optarg'"
15125 + ac_need_defaults=false;;
15126 + --header | --heade | --head | --hea )
15127 + $ac_shift
15128 + case $ac_optarg in
15129 + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15130 + esac
15131 + as_fn_append CONFIG_HEADERS " '$ac_optarg'"
15132 + ac_need_defaults=false;;
15133 + --he | --h)
15134 + # Conflict between --help and --header
15135 + as_fn_error $? "ambiguous option: \`$1'
15136 +Try \`$0 --help' for more information.";;
15137 + --help | --hel | -h )
15138 + $as_echo "$ac_cs_usage"; exit ;;
15139 + -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15140 + | -silent | --silent | --silen | --sile | --sil | --si | --s)
15141 + ac_cs_silent=: ;;
15142 +
15143 + # This is an error.
15144 + -*) as_fn_error $? "unrecognized option: \`$1'
15145 +Try \`$0 --help' for more information." ;;
15146 +
15147 + *) as_fn_append ac_config_targets " $1"
15148 + ac_need_defaults=false ;;
15149 +
15150 + esac
15151 + shift
15152 +done
15153 +
15154 +ac_configure_extra_args=
15155 +
15156 +if $ac_cs_silent; then
15157 + exec 6>/dev/null
15158 + ac_configure_extra_args="$ac_configure_extra_args --silent"
15159 +fi
15160 +
15161 +_ACEOF
15162 +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15163 +if \$ac_cs_recheck; then
15164 + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
15165 + shift
15166 + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15167 + CONFIG_SHELL='$SHELL'
15168 + export CONFIG_SHELL
15169 + exec "\$@"
15170 +fi
15171 +
15172 +_ACEOF
15173 +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15174 +exec 5>>config.log
15175 +{
15176 + echo
15177 + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15178 +## Running $as_me. ##
15179 +_ASBOX
15180 + $as_echo "$ac_log"
15181 +} >&5
15182 +
15183 +_ACEOF
15184 +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15185 +#
15186 +# INIT-COMMANDS
15187 +#
15188 +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
15189 +
15190 +
15191 +# The HP-UX ksh and POSIX shell print the target directory to stdout
15192 +# if CDPATH is set.
15193 +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15194 +
15195 +sed_quote_subst='$sed_quote_subst'
15196 +double_quote_subst='$double_quote_subst'
15197 +delay_variable_subst='$delay_variable_subst'
15198 +macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
15199 +macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
15200 +enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
15201 +enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
15202 +pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
15203 +enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
15204 +SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
15205 +ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
15206 +PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
15207 +host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
15208 +host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
15209 +host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
15210 +build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
15211 +build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
15212 +build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
15213 +SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
15214 +Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
15215 +GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
15216 +EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
15217 +FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
15218 +LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
15219 +NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
15220 +LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
15221 +max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
15222 +ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
15223 +exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
15224 +lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
15225 +lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
15226 +lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
15227 +lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
15228 +lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
15229 +reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
15230 +reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
15231 +OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
15232 +deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
15233 +file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
15234 +file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
15235 +want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
15236 +DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
15237 +sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
15238 +AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
15239 +AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
15240 +archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
15241 +STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
15242 +RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
15243 +old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
15244 +old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
15245 +old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
15246 +lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
15247 +CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
15248 +CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
15249 +compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
15250 +GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
15251 +lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
15252 +lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
15253 +lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
15254 +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
15255 +nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
15256 +lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
15257 +objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
15258 +MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
15259 +lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
15260 +lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
15261 +lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
15262 +lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
15263 +lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
15264 +need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
15265 +MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
15266 +DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
15267 +NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
15268 +LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
15269 +OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
15270 +OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
15271 +libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
15272 +shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
15273 +extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
15274 +archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
15275 +enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
15276 +export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
15277 +whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
15278 +compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
15279 +old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
15280 +old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
15281 +archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
15282 +archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
15283 +module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
15284 +module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
15285 +with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
15286 +allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
15287 +no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
15288 +hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
15289 +hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
15290 +hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
15291 +hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
15292 +hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
15293 +hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
15294 +hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
15295 +inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
15296 +link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
15297 +always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
15298 +export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
15299 +exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
15300 +include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
15301 +prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
15302 +postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
15303 +file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
15304 +variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
15305 +need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
15306 +need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
15307 +version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
15308 +runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
15309 +shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
15310 +shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
15311 +libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
15312 +library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
15313 +soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
15314 +install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
15315 +postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
15316 +postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
15317 +finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
15318 +finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
15319 +hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
15320 +sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
15321 +sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`'
15322 +hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
15323 +enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
15324 +enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
15325 +enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
15326 +old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
15327 +striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
15328 +
15329 +LTCC='$LTCC'
15330 +LTCFLAGS='$LTCFLAGS'
15331 +compiler='$compiler_DEFAULT'
15332 +
15333 +# A function that is used when there is no print builtin or printf.
15334 +func_fallback_echo ()
15335 +{
15336 + eval 'cat <<_LTECHO_EOF
15337 +\$1
15338 +_LTECHO_EOF'
15339 +}
15340 +
15341 +# Quote evaled strings.
15342 +for var in SHELL \
15343 +ECHO \
15344 +PATH_SEPARATOR \
15345 +SED \
15346 +GREP \
15347 +EGREP \
15348 +FGREP \
15349 +LD \
15350 +NM \
15351 +LN_S \
15352 +lt_SP2NL \
15353 +lt_NL2SP \
15354 +reload_flag \
15355 +OBJDUMP \
15356 +deplibs_check_method \
15357 +file_magic_cmd \
15358 +file_magic_glob \
15359 +want_nocaseglob \
15360 +DLLTOOL \
15361 +sharedlib_from_linklib_cmd \
15362 +AR \
15363 +AR_FLAGS \
15364 +archiver_list_spec \
15365 +STRIP \
15366 +RANLIB \
15367 +CC \
15368 +CFLAGS \
15369 +compiler \
15370 +lt_cv_sys_global_symbol_pipe \
15371 +lt_cv_sys_global_symbol_to_cdecl \
15372 +lt_cv_sys_global_symbol_to_c_name_address \
15373 +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
15374 +nm_file_list_spec \
15375 +lt_prog_compiler_no_builtin_flag \
15376 +lt_prog_compiler_pic \
15377 +lt_prog_compiler_wl \
15378 +lt_prog_compiler_static \
15379 +lt_cv_prog_compiler_c_o \
15380 +need_locks \
15381 +MANIFEST_TOOL \
15382 +DSYMUTIL \
15383 +NMEDIT \
15384 +LIPO \
15385 +OTOOL \
15386 +OTOOL64 \
15387 +shrext_cmds \
15388 +export_dynamic_flag_spec \
15389 +whole_archive_flag_spec \
15390 +compiler_needs_object \
15391 +with_gnu_ld \
15392 +allow_undefined_flag \
15393 +no_undefined_flag \
15394 +hardcode_libdir_flag_spec \
15395 +hardcode_libdir_separator \
15396 +exclude_expsyms \
15397 +include_expsyms \
15398 +file_list_spec \
15399 +variables_saved_for_relink \
15400 +libname_spec \
15401 +library_names_spec \
15402 +soname_spec \
15403 +install_override_mode \
15404 +finish_eval \
15405 +old_striplib \
15406 +striplib; do
15407 + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
15408 + *[\\\\\\\`\\"\\\$]*)
15409 + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
15410 + ;;
15411 + *)
15412 + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
15413 + ;;
15414 + esac
15415 +done
15416 +
15417 +# Double-quote double-evaled strings.
15418 +for var in reload_cmds \
15419 +old_postinstall_cmds \
15420 +old_postuninstall_cmds \
15421 +old_archive_cmds \
15422 +extract_expsyms_cmds \
15423 +old_archive_from_new_cmds \
15424 +old_archive_from_expsyms_cmds \
15425 +archive_cmds \
15426 +archive_expsym_cmds \
15427 +module_cmds \
15428 +module_expsym_cmds \
15429 +export_symbols_cmds \
15430 +prelink_cmds \
15431 +postlink_cmds \
15432 +postinstall_cmds \
15433 +postuninstall_cmds \
15434 +finish_cmds \
15435 +sys_lib_search_path_spec \
15436 +sys_lib_dlsearch_path_spec; do
15437 + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
15438 + *[\\\\\\\`\\"\\\$]*)
15439 + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
15440 + ;;
15441 + *)
15442 + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
15443 + ;;
15444 + esac
15445 +done
15446 +
15447 +ac_aux_dir='$ac_aux_dir'
15448 +xsi_shell='$xsi_shell'
15449 +lt_shell_append='$lt_shell_append'
15450 +
15451 +# See if we are running on zsh, and set the options which allow our
15452 +# commands through without removal of \ escapes INIT.
15453 +if test -n "\${ZSH_VERSION+set}" ; then
15454 + setopt NO_GLOB_SUBST
15455 +fi
15456 +
15457 +
15458 + PACKAGE='$PACKAGE'
15459 + VERSION='$VERSION'
15460 + TIMESTAMP='$TIMESTAMP'
15461 + RM='$RM'
15462 + ofile='$ofile'
15463 +
15464 +
15465 +
15466 +
15467 +_ACEOF
15468 +
15469 +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15470 +
15471 +# Handling of arguments.
15472 +for ac_config_target in $ac_config_targets
15473 +do
15474 + case $ac_config_target in
15475 + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
15476 + "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
15477 + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
15478 + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
15479 + "h/Makefile") CONFIG_FILES="$CONFIG_FILES h/Makefile" ;;
15480 + "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
15481 + "ref/Makefile") CONFIG_FILES="$CONFIG_FILES ref/Makefile" ;;
15482 + "numlib/Makefile") CONFIG_FILES="$CONFIG_FILES numlib/Makefile" ;;
15483 + "cgats/Makefile") CONFIG_FILES="$CONFIG_FILES cgats/Makefile" ;;
15484 + "plot/Makefile") CONFIG_FILES="$CONFIG_FILES plot/Makefile" ;;
15485 + "rspl/Makefile") CONFIG_FILES="$CONFIG_FILES rspl/Makefile" ;;
15486 + "icc/Makefile") CONFIG_FILES="$CONFIG_FILES icc/Makefile" ;;
15487 + "gamut/Makefile") CONFIG_FILES="$CONFIG_FILES gamut/Makefile" ;;
15488 + "xicc/Makefile") CONFIG_FILES="$CONFIG_FILES xicc/Makefile" ;;
15489 + "link/Makefile") CONFIG_FILES="$CONFIG_FILES link/Makefile" ;;
15490 + "spectro/Makefile") CONFIG_FILES="$CONFIG_FILES spectro/Makefile" ;;
15491 + "profile/Makefile") CONFIG_FILES="$CONFIG_FILES profile/Makefile" ;;
15492 + "tweak/Makefile") CONFIG_FILES="$CONFIG_FILES tweak/Makefile" ;;
15493 + "scanin/Makefile") CONFIG_FILES="$CONFIG_FILES scanin/Makefile" ;;
15494 + "render/Makefile") CONFIG_FILES="$CONFIG_FILES render/Makefile" ;;
15495 + "target/Makefile") CONFIG_FILES="$CONFIG_FILES target/Makefile" ;;
15496 + "imdi/Makefile") CONFIG_FILES="$CONFIG_FILES imdi/Makefile" ;;
15497 + "jcnf/Makefile") CONFIG_FILES="$CONFIG_FILES jcnf/Makefile" ;;
15498 + "jcnf/yajl/Makefile") CONFIG_FILES="$CONFIG_FILES jcnf/yajl/Makefile" ;;
15499 + "ucmm/Makefile") CONFIG_FILES="$CONFIG_FILES ucmm/Makefile" ;;
15500 +
15501 + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
15502 + esac
15503 +done
15504 +
15505 +
15506 +# If the user did not use the arguments to specify the items to instantiate,
15507 +# then the envvar interface is used. Set only those that are not.
15508 +# We use the long form for the default assignment because of an extremely
15509 +# bizarre bug on SunOS 4.1.3.
15510 +if $ac_need_defaults; then
15511 + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15512 + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15513 + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15514 +fi
15515 +
15516 +# Have a temporary directory for convenience. Make it in the build tree
15517 +# simply because there is no reason against having it here, and in addition,
15518 +# creating and moving files from /tmp can sometimes cause problems.
15519 +# Hook for its removal unless debugging.
15520 +# Note that there is a small window in which the directory will not be cleaned:
15521 +# after its creation but before its name has been assigned to `$tmp'.
15522 +$debug ||
15523 +{
15524 + tmp= ac_tmp=
15525 + trap 'exit_status=$?
15526 + : "${ac_tmp:=$tmp}"
15527 + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
15528 +' 0
15529 + trap 'as_fn_exit 1' 1 2 13 15
15530 +}
15531 +# Create a (secure) tmp directory for tmp files.
15532 +
15533 +{
15534 + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
15535 + test -d "$tmp"
15536 +} ||
15537 +{
15538 + tmp=./conf$$-$RANDOM
15539 + (umask 077 && mkdir "$tmp")
15540 +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
15541 +ac_tmp=$tmp
15542 +
15543 +# Set up the scripts for CONFIG_FILES section.
15544 +# No need to generate them if there are no CONFIG_FILES.
15545 +# This happens for instance with `./config.status config.h'.
15546 +if test -n "$CONFIG_FILES"; then
15547 +
15548 +
15549 +ac_cr=`echo X | tr X '\015'`
15550 +# On cygwin, bash can eat \r inside `` if the user requested igncr.
15551 +# But we know of no other shell where ac_cr would be empty at this
15552 +# point, so we can use a bashism as a fallback.
15553 +if test "x$ac_cr" = x; then
15554 + eval ac_cr=\$\'\\r\'
15555 +fi
15556 +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15557 +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
15558 + ac_cs_awk_cr='\\r'
15559 +else
15560 + ac_cs_awk_cr=$ac_cr
15561 +fi
15562 +
15563 +echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
15564 +_ACEOF
15565 +
15566 +
15567 +{
15568 + echo "cat >conf$$subs.awk <<_ACEOF" &&
15569 + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15570 + echo "_ACEOF"
15571 +} >conf$$subs.sh ||
15572 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15573 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
15574 +ac_delim='%!_!# '
15575 +for ac_last_try in false false false false false :; do
15576 + . ./conf$$subs.sh ||
15577 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15578 +
15579 + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15580 + if test $ac_delim_n = $ac_delim_num; then
15581 + break
15582 + elif $ac_last_try; then
15583 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15584 + else
15585 + ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15586 + fi
15587 +done
15588 +rm -f conf$$subs.sh
15589 +
15590 +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15591 +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
15592 +_ACEOF
15593 +sed -n '
15594 +h
15595 +s/^/S["/; s/!.*/"]=/
15596 +p
15597 +g
15598 +s/^[^!]*!//
15599 +:repl
15600 +t repl
15601 +s/'"$ac_delim"'$//
15602 +t delim
15603 +:nl
15604 +h
15605 +s/\(.\{148\}\)..*/\1/
15606 +t more1
15607 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15608 +p
15609 +n
15610 +b repl
15611 +:more1
15612 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15613 +p
15614 +g
15615 +s/.\{148\}//
15616 +t nl
15617 +:delim
15618 +h
15619 +s/\(.\{148\}\)..*/\1/
15620 +t more2
15621 +s/["\\]/\\&/g; s/^/"/; s/$/"/
15622 +p
15623 +b
15624 +:more2
15625 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15626 +p
15627 +g
15628 +s/.\{148\}//
15629 +t delim
15630 +' <conf$$subs.awk | sed '
15631 +/^[^""]/{
15632 + N
15633 + s/\n//
15634 +}
15635 +' >>$CONFIG_STATUS || ac_write_fail=1
15636 +rm -f conf$$subs.awk
15637 +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15638 +_ACAWK
15639 +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
15640 + for (key in S) S_is_set[key] = 1
15641 + FS = ""
15642 +
15643 +}
15644 +{
15645 + line = $ 0
15646 + nfields = split(line, field, "@")
15647 + substed = 0
15648 + len = length(field[1])
15649 + for (i = 2; i < nfields; i++) {
15650 + key = field[i]
15651 + keylen = length(key)
15652 + if (S_is_set[key]) {
15653 + value = S[key]
15654 + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15655 + len += length(value) + length(field[++i])
15656 + substed = 1
15657 + } else
15658 + len += 1 + keylen
15659 + }
15660 +
15661 + print line
15662 +}
15663 +
15664 +_ACAWK
15665 +_ACEOF
15666 +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15667 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15668 + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15669 +else
15670 + cat
15671 +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
15672 + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
15673 +_ACEOF
15674 +
15675 +# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15676 +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
15677 +# trailing colons and then remove the whole line if VPATH becomes empty
15678 +# (actually we leave an empty line to preserve line numbers).
15679 +if test "x$srcdir" = x.; then
15680 + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15681 +h
15682 +s///
15683 +s/^/:/
15684 +s/[ ]*$/:/
15685 +s/:\$(srcdir):/:/g
15686 +s/:\${srcdir}:/:/g
15687 +s/:@srcdir@:/:/g
15688 +s/^:*//
15689 +s/:*$//
15690 +x
15691 +s/\(=[ ]*\).*/\1/
15692 +G
15693 +s/\n//
15694 +s/^[^=]*=[ ]*$//
15695 +}'
15696 +fi
15697 +
15698 +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15699 +fi # test -n "$CONFIG_FILES"
15700 +
15701 +# Set up the scripts for CONFIG_HEADERS section.
15702 +# No need to generate them if there are no CONFIG_HEADERS.
15703 +# This happens for instance with `./config.status Makefile'.
15704 +if test -n "$CONFIG_HEADERS"; then
15705 +cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
15706 +BEGIN {
15707 +_ACEOF
15708 +
15709 +# Transform confdefs.h into an awk script `defines.awk', embedded as
15710 +# here-document in config.status, that substitutes the proper values into
15711 +# config.h.in to produce config.h.
15712 +
15713 +# Create a delimiter string that does not exist in confdefs.h, to ease
15714 +# handling of long lines.
15715 +ac_delim='%!_!# '
15716 +for ac_last_try in false false :; do
15717 + ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15718 + if test -z "$ac_tt"; then
15719 + break
15720 + elif $ac_last_try; then
15721 + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
15722 + else
15723 + ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15724 + fi
15725 +done
15726 +
15727 +# For the awk script, D is an array of macro values keyed by name,
15728 +# likewise P contains macro parameters if any. Preserve backslash
15729 +# newline sequences.
15730 +
15731 +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15732 +sed -n '
15733 +s/.\{148\}/&'"$ac_delim"'/g
15734 +t rset
15735 +:rset
15736 +s/^[ ]*#[ ]*define[ ][ ]*/ /
15737 +t def
15738 +d
15739 +:def
15740 +s/\\$//
15741 +t bsnl
15742 +s/["\\]/\\&/g
15743 +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15744 +D["\1"]=" \3"/p
15745 +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15746 +d
15747 +:bsnl
15748 +s/["\\]/\\&/g
15749 +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15750 +D["\1"]=" \3\\\\\\n"\\/p
15751 +t cont
15752 +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15753 +t cont
15754 +d
15755 +:cont
15756 +n
15757 +s/.\{148\}/&'"$ac_delim"'/g
15758 +t clear
15759 +:clear
15760 +s/\\$//
15761 +t bsnlc
15762 +s/["\\]/\\&/g; s/^/"/; s/$/"/p
15763 +d
15764 +:bsnlc
15765 +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15766 +b cont
15767 +' <confdefs.h | sed '
15768 +s/'"$ac_delim"'/"\\\
15769 +"/g' >>$CONFIG_STATUS || ac_write_fail=1
15770 +
15771 +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15772 + for (key in D) D_is_set[key] = 1
15773 + FS = ""
15774 +}
15775 +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15776 + line = \$ 0
15777 + split(line, arg, " ")
15778 + if (arg[1] == "#") {
15779 + defundef = arg[2]
15780 + mac1 = arg[3]
15781 + } else {
15782 + defundef = substr(arg[1], 2)
15783 + mac1 = arg[2]
15784 + }
15785 + split(mac1, mac2, "(") #)
15786 + macro = mac2[1]
15787 + prefix = substr(line, 1, index(line, defundef) - 1)
15788 + if (D_is_set[macro]) {
15789 + # Preserve the white space surrounding the "#".
15790 + print prefix "define", macro P[macro] D[macro]
15791 + next
15792 + } else {
15793 + # Replace #undef with comments. This is necessary, for example,
15794 + # in the case of _POSIX_SOURCE, which is predefined and required
15795 + # on some systems where configure will not decide to define it.
15796 + if (defundef == "undef") {
15797 + print "/*", prefix defundef, macro, "*/"
15798 + next
15799 + }
15800 + }
15801 +}
15802 +{ print }
15803 +_ACAWK
15804 +_ACEOF
15805 +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15806 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
15807 +fi # test -n "$CONFIG_HEADERS"
15808 +
15809 +
15810 +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
15811 +shift
15812 +for ac_tag
15813 +do
15814 + case $ac_tag in
15815 + :[FHLC]) ac_mode=$ac_tag; continue;;
15816 + esac
15817 + case $ac_mode$ac_tag in
15818 + :[FHL]*:*);;
15819 + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
15820 + :[FH]-) ac_tag=-:-;;
15821 + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15822 + esac
15823 + ac_save_IFS=$IFS
15824 + IFS=:
15825 + set x $ac_tag
15826 + IFS=$ac_save_IFS
15827 + shift
15828 + ac_file=$1
15829 + shift
15830 +
15831 + case $ac_mode in
15832 + :L) ac_source=$1;;
15833 + :[FH])
15834 + ac_file_inputs=
15835 + for ac_f
15836 + do
15837 + case $ac_f in
15838 + -) ac_f="$ac_tmp/stdin";;
15839 + *) # Look for the file first in the build tree, then in the source tree
15840 + # (if the path is not absolute). The absolute path cannot be DOS-style,
15841 + # because $ac_f cannot contain `:'.
15842 + test -f "$ac_f" ||
15843 + case $ac_f in
15844 + [\\/$]*) false;;
15845 + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15846 + esac ||
15847 + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
15848 + esac
15849 + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15850 + as_fn_append ac_file_inputs " '$ac_f'"
15851 + done
15852 +
15853 + # Let's still pretend it is `configure' which instantiates (i.e., don't
15854 + # use $as_me), people would be surprised to read:
15855 + # /* config.h. Generated by config.status. */
15856 + configure_input='Generated from '`
15857 + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15858 + `' by configure.'
15859 + if test x"$ac_file" != x-; then
15860 + configure_input="$ac_file. $configure_input"
15861 + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15862 +$as_echo "$as_me: creating $ac_file" >&6;}
15863 + fi
15864 + # Neutralize special characters interpreted by sed in replacement strings.
15865 + case $configure_input in #(
15866 + *\&* | *\|* | *\\* )
15867 + ac_sed_conf_input=`$as_echo "$configure_input" |
15868 + sed 's/[\\\\&|]/\\\\&/g'`;; #(
15869 + *) ac_sed_conf_input=$configure_input;;
15870 + esac
15871 +
15872 + case $ac_tag in
15873 + *:-:* | *:-) cat >"$ac_tmp/stdin" \
15874 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
15875 + esac
15876 + ;;
15877 + esac
15878 +
15879 + ac_dir=`$as_dirname -- "$ac_file" ||
15880 +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15881 + X"$ac_file" : 'X\(//\)[^/]' \| \
15882 + X"$ac_file" : 'X\(//\)$' \| \
15883 + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
15884 +$as_echo X"$ac_file" |
15885 + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15886 + s//\1/
15887 + q
15888 + }
15889 + /^X\(\/\/\)[^/].*/{
15890 + s//\1/
15891 + q
15892 + }
15893 + /^X\(\/\/\)$/{
15894 + s//\1/
15895 + q
15896 + }
15897 + /^X\(\/\).*/{
15898 + s//\1/
15899 + q
15900 + }
15901 + s/.*/./; q'`
15902 + as_dir="$ac_dir"; as_fn_mkdir_p
15903 + ac_builddir=.
15904 +
15905 +case "$ac_dir" in
15906 +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15907 +*)
15908 + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
15909 + # A ".." for each directory in $ac_dir_suffix.
15910 + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
15911 + case $ac_top_builddir_sub in
15912 + "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15913 + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15914 + esac ;;
15915 +esac
15916 +ac_abs_top_builddir=$ac_pwd
15917 +ac_abs_builddir=$ac_pwd$ac_dir_suffix
15918 +# for backward compatibility:
15919 +ac_top_builddir=$ac_top_build_prefix
15920 +
15921 +case $srcdir in
15922 + .) # We are building in place.
15923 + ac_srcdir=.
15924 + ac_top_srcdir=$ac_top_builddir_sub
15925 + ac_abs_top_srcdir=$ac_pwd ;;
15926 + [\\/]* | ?:[\\/]* ) # Absolute name.
15927 + ac_srcdir=$srcdir$ac_dir_suffix;
15928 + ac_top_srcdir=$srcdir
15929 + ac_abs_top_srcdir=$srcdir ;;
15930 + *) # Relative name.
15931 + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15932 + ac_top_srcdir=$ac_top_build_prefix$srcdir
15933 + ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
15934 +esac
15935 +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
15936 +
15937 +
15938 + case $ac_mode in
15939 + :F)
15940 + #
15941 + # CONFIG_FILE
15942 + #
15943 +
15944 + case $INSTALL in
15945 + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
15946 + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
15947 + esac
15948 + ac_MKDIR_P=$MKDIR_P
15949 + case $MKDIR_P in
15950 + [\\/$]* | ?:[\\/]* ) ;;
15951 + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15952 + esac
15953 +_ACEOF
15954 +
15955 +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15956 +# If the template does not know about datarootdir, expand it.
15957 +# FIXME: This hack should be removed a few years after 2.60.
15958 +ac_datarootdir_hack=; ac_datarootdir_seen=
15959 +ac_sed_dataroot='
15960 +/datarootdir/ {
15961 + p
15962 + q
15963 +}
15964 +/@datadir@/p
15965 +/@docdir@/p
15966 +/@infodir@/p
15967 +/@localedir@/p
15968 +/@mandir@/p'
15969 +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
15970 +*datarootdir*) ac_datarootdir_seen=yes;;
15971 +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
15972 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15973 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
15974 +_ACEOF
15975 +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15976 + ac_datarootdir_hack='
15977 + s&@datadir@&$datadir&g
15978 + s&@docdir@&$docdir&g
15979 + s&@infodir@&$infodir&g
15980 + s&@localedir@&$localedir&g
15981 + s&@mandir@&$mandir&g
15982 + s&\\\${datarootdir}&$datarootdir&g' ;;
15983 +esac
15984 +_ACEOF
15985 +
15986 +# Neutralize VPATH when `$srcdir' = `.'.
15987 +# Shell code in configure.ac might set extrasub.
15988 +# FIXME: do we really want to maintain this feature?
15989 +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15990 +ac_sed_extra="$ac_vpsub
15991 +$extrasub
15992 +_ACEOF
15993 +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15994 +:t
15995 +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
15996 +s|@configure_input@|$ac_sed_conf_input|;t t
15997 +s&@top_builddir@&$ac_top_builddir_sub&;t t
15998 +s&@top_build_prefix@&$ac_top_build_prefix&;t t
15999 +s&@srcdir@&$ac_srcdir&;t t
16000 +s&@abs_srcdir@&$ac_abs_srcdir&;t t
16001 +s&@top_srcdir@&$ac_top_srcdir&;t t
16002 +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16003 +s&@builddir@&$ac_builddir&;t t
16004 +s&@abs_builddir@&$ac_abs_builddir&;t t
16005 +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16006 +s&@INSTALL@&$ac_INSTALL&;t t
16007 +s&@MKDIR_P@&$ac_MKDIR_P&;t t
16008 +$ac_datarootdir_hack
16009 +"
16010 +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16011 + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16012 +
16013 +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
16014 + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16015 + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16016 + "$ac_tmp/out"`; test -z "$ac_out"; } &&
16017 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16018 +which seems to be undefined. Please make sure it is defined" >&5
16019 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16020 +which seems to be undefined. Please make sure it is defined" >&2;}
16021 +
16022 + rm -f "$ac_tmp/stdin"
16023 + case $ac_file in
16024 + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16025 + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
16026 + esac \
16027 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16028 + ;;
16029 + :H)
16030 + #
16031 + # CONFIG_HEADER
16032 + #
16033 + if test x"$ac_file" != x-; then
16034 + {
16035 + $as_echo "/* $configure_input */" \
16036 + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16037 + } >"$ac_tmp/config.h" \
16038 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16039 + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
16040 + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16041 +$as_echo "$as_me: $ac_file is unchanged" >&6;}
16042 + else
16043 + rm -f "$ac_file"
16044 + mv "$ac_tmp/config.h" "$ac_file" \
16045 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16046 + fi
16047 + else
16048 + $as_echo "/* $configure_input */" \
16049 + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
16050 + || as_fn_error $? "could not create -" "$LINENO" 5
16051 + fi
16052 +# Compute "$ac_file"'s index in $config_headers.
16053 +_am_arg="$ac_file"
16054 +_am_stamp_count=1
16055 +for _am_header in $config_headers :; do
16056 + case $_am_header in
16057 + $_am_arg | $_am_arg:* )
16058 + break ;;
16059 + * )
16060 + _am_stamp_count=`expr $_am_stamp_count + 1` ;;
16061 + esac
16062 +done
16063 +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
16064 +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16065 + X"$_am_arg" : 'X\(//\)[^/]' \| \
16066 + X"$_am_arg" : 'X\(//\)$' \| \
16067 + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
16068 +$as_echo X"$_am_arg" |
16069 + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16070 + s//\1/
16071 + q
16072 + }
16073 + /^X\(\/\/\)[^/].*/{
16074 + s//\1/
16075 + q
16076 + }
16077 + /^X\(\/\/\)$/{
16078 + s//\1/
16079 + q
16080 + }
16081 + /^X\(\/\).*/{
16082 + s//\1/
16083 + q
16084 + }
16085 + s/.*/./; q'`/stamp-h$_am_stamp_count
16086 + ;;
16087 +
16088 + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
16089 +$as_echo "$as_me: executing $ac_file commands" >&6;}
16090 + ;;
16091 + esac
16092 +
16093 +
16094 + case $ac_file$ac_mode in
16095 + "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
16096 + # Older Autoconf quotes --file arguments for eval, but not when files
16097 + # are listed without --file. Let's play safe and only enable the eval
16098 + # if we detect the quoting.
16099 + case $CONFIG_FILES in
16100 + *\'*) eval set x "$CONFIG_FILES" ;;
16101 + *) set x $CONFIG_FILES ;;
16102 + esac
16103 + shift
16104 + for mf
16105 + do
16106 + # Strip MF so we end up with the name of the file.
16107 + mf=`echo "$mf" | sed -e 's/:.*$//'`
16108 + # Check whether this is an Automake generated Makefile or not.
16109 + # We used to match only the files named 'Makefile.in', but
16110 + # some people rename them; so instead we look at the file content.
16111 + # Grep'ing the first line is not enough: some people post-process
16112 + # each Makefile.in and add a new line on top of each file to say so.
16113 + # Grep'ing the whole file is not good either: AIX grep has a line
16114 + # limit of 2048, but all sed's we know have understand at least 4000.
16115 + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
16116 + dirpart=`$as_dirname -- "$mf" ||
16117 +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16118 + X"$mf" : 'X\(//\)[^/]' \| \
16119 + X"$mf" : 'X\(//\)$' \| \
16120 + X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
16121 +$as_echo X"$mf" |
16122 + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16123 + s//\1/
16124 + q
16125 + }
16126 + /^X\(\/\/\)[^/].*/{
16127 + s//\1/
16128 + q
16129 + }
16130 + /^X\(\/\/\)$/{
16131 + s//\1/
16132 + q
16133 + }
16134 + /^X\(\/\).*/{
16135 + s//\1/
16136 + q
16137 + }
16138 + s/.*/./; q'`
16139 + else
16140 + continue
16141 + fi
16142 + # Extract the definition of DEPDIR, am__include, and am__quote
16143 + # from the Makefile without running 'make'.
16144 + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
16145 + test -z "$DEPDIR" && continue
16146 + am__include=`sed -n 's/^am__include = //p' < "$mf"`
16147 + test -z "$am__include" && continue
16148 + am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
16149 + # Find all dependency output files, they are included files with
16150 + # $(DEPDIR) in their names. We invoke sed twice because it is the
16151 + # simplest approach to changing $(DEPDIR) to its actual value in the
16152 + # expansion.
16153 + for file in `sed -n "
16154 + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
16155 + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
16156 + # Make sure the directory exists.
16157 + test -f "$dirpart/$file" && continue
16158 + fdir=`$as_dirname -- "$file" ||
16159 +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16160 + X"$file" : 'X\(//\)[^/]' \| \
16161 + X"$file" : 'X\(//\)$' \| \
16162 + X"$file" : 'X\(/\)' \| . 2>/dev/null ||
16163 +$as_echo X"$file" |
16164 + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16165 + s//\1/
16166 + q
16167 + }
16168 + /^X\(\/\/\)[^/].*/{
16169 + s//\1/
16170 + q
16171 + }
16172 + /^X\(\/\/\)$/{
16173 + s//\1/
16174 + q
16175 + }
16176 + /^X\(\/\).*/{
16177 + s//\1/
16178 + q
16179 + }
16180 + s/.*/./; q'`
16181 + as_dir=$dirpart/$fdir; as_fn_mkdir_p
16182 + # echo "creating $dirpart/$file"
16183 + echo '# dummy' > "$dirpart/$file"
16184 + done
16185 + done
16186 +}
16187 + ;;
16188 + "libtool":C)
16189 +
16190 + # See if we are running on zsh, and set the options which allow our
16191 + # commands through without removal of \ escapes.
16192 + if test -n "${ZSH_VERSION+set}" ; then
16193 + setopt NO_GLOB_SUBST
16194 + fi
16195 +
16196 + cfgfile="${ofile}T"
16197 + trap "$RM \"$cfgfile\"; exit 1" 1 2 15
16198 + $RM "$cfgfile"
16199 +
16200 + cat <<_LT_EOF >> "$cfgfile"
16201 +#! $SHELL
16202 +
16203 +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
16204 +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
16205 +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16206 +# NOTE: Changes made to this file will be lost: look at ltmain.sh.
16207 +#
16208 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
16209 +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
16210 +# Foundation, Inc.
16211 +# Written by Gordon Matzigkeit, 1996
16212 +#
16213 +# This file is part of GNU Libtool.
16214 +#
16215 +# GNU Libtool is free software; you can redistribute it and/or
16216 +# modify it under the terms of the GNU General Public License as
16217 +# published by the Free Software Foundation; either version 2 of
16218 +# the License, or (at your option) any later version.
16219 +#
16220 +# As a special exception to the GNU General Public License,
16221 +# if you distribute this file as part of a program or library that
16222 +# is built using GNU Libtool, you may include this file under the
16223 +# same distribution terms that you use for the rest of that program.
16224 +#
16225 +# GNU Libtool is distributed in the hope that it will be useful,
16226 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
16227 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16228 +# GNU General Public License for more details.
16229 +#
16230 +# You should have received a copy of the GNU General Public License
16231 +# along with GNU Libtool; see the file COPYING. If not, a copy
16232 +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
16233 +# obtained by writing to the Free Software Foundation, Inc.,
16234 +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16235 +
16236 +
16237 +# The names of the tagged configurations supported by this script.
16238 +available_tags=""
16239 +
16240 +# ### BEGIN LIBTOOL CONFIG
16241 +
16242 +# Which release of libtool.m4 was used?
16243 +macro_version=$macro_version
16244 +macro_revision=$macro_revision
16245 +
16246 +# Whether or not to build shared libraries.
16247 +build_libtool_libs=$enable_shared
16248 +
16249 +# Whether or not to build static libraries.
16250 +build_old_libs=$enable_static
16251 +
16252 +# What type of objects to build.
16253 +pic_mode=$pic_mode
16254 +
16255 +# Whether or not to optimize for fast installation.
16256 +fast_install=$enable_fast_install
16257 +
16258 +# Shell to use when invoking shell scripts.
16259 +SHELL=$lt_SHELL
16260 +
16261 +# An echo program that protects backslashes.
16262 +ECHO=$lt_ECHO
16263 +
16264 +# The PATH separator for the build system.
16265 +PATH_SEPARATOR=$lt_PATH_SEPARATOR
16266 +
16267 +# The host system.
16268 +host_alias=$host_alias
16269 +host=$host
16270 +host_os=$host_os
16271 +
16272 +# The build system.
16273 +build_alias=$build_alias
16274 +build=$build
16275 +build_os=$build_os
16276 +
16277 +# A sed program that does not truncate output.
16278 +SED=$lt_SED
16279 +
16280 +# Sed that helps us avoid accidentally triggering echo(1) options like -n.
16281 +Xsed="\$SED -e 1s/^X//"
16282 +
16283 +# A grep program that handles long lines.
16284 +GREP=$lt_GREP
16285 +
16286 +# An ERE matcher.
16287 +EGREP=$lt_EGREP
16288 +
16289 +# A literal string matcher.
16290 +FGREP=$lt_FGREP
16291 +
16292 +# A BSD- or MS-compatible name lister.
16293 +NM=$lt_NM
16294 +
16295 +# Whether we need soft or hard links.
16296 +LN_S=$lt_LN_S
16297 +
16298 +# What is the maximum length of a command?
16299 +max_cmd_len=$max_cmd_len
16300 +
16301 +# Object file suffix (normally "o").
16302 +objext=$ac_objext
16303 +
16304 +# Executable file suffix (normally "").
16305 +exeext=$exeext
16306 +
16307 +# whether the shell understands "unset".
16308 +lt_unset=$lt_unset
16309 +
16310 +# turn spaces into newlines.
16311 +SP2NL=$lt_lt_SP2NL
16312 +
16313 +# turn newlines into spaces.
16314 +NL2SP=$lt_lt_NL2SP
16315 +
16316 +# convert \$build file names to \$host format.
16317 +to_host_file_cmd=$lt_cv_to_host_file_cmd
16318 +
16319 +# convert \$build files to toolchain format.
16320 +to_tool_file_cmd=$lt_cv_to_tool_file_cmd
16321 +
16322 +# An object symbol dumper.
16323 +OBJDUMP=$lt_OBJDUMP
16324 +
16325 +# Method to check whether dependent libraries are shared objects.
16326 +deplibs_check_method=$lt_deplibs_check_method
16327 +
16328 +# Command to use when deplibs_check_method = "file_magic".
16329 +file_magic_cmd=$lt_file_magic_cmd
16330 +
16331 +# How to find potential files when deplibs_check_method = "file_magic".
16332 +file_magic_glob=$lt_file_magic_glob
16333 +
16334 +# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
16335 +want_nocaseglob=$lt_want_nocaseglob
16336 +
16337 +# DLL creation program.
16338 +DLLTOOL=$lt_DLLTOOL
16339 +
16340 +# Command to associate shared and link libraries.
16341 +sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
16342 +
16343 +# The archiver.
16344 +AR=$lt_AR
16345 +
16346 +# Flags to create an archive.
16347 +AR_FLAGS=$lt_AR_FLAGS
16348 +
16349 +# How to feed a file listing to the archiver.
16350 +archiver_list_spec=$lt_archiver_list_spec
16351 +
16352 +# A symbol stripping program.
16353 +STRIP=$lt_STRIP
16354 +
16355 +# Commands used to install an old-style archive.
16356 +RANLIB=$lt_RANLIB
16357 +old_postinstall_cmds=$lt_old_postinstall_cmds
16358 +old_postuninstall_cmds=$lt_old_postuninstall_cmds
16359 +
16360 +# Whether to use a lock for old archive extraction.
16361 +lock_old_archive_extraction=$lock_old_archive_extraction
16362 +
16363 +# A C compiler.
16364 +LTCC=$lt_CC
16365 +
16366 +# LTCC compiler flags.
16367 +LTCFLAGS=$lt_CFLAGS
16368 +
16369 +# Take the output of nm and produce a listing of raw symbols and C names.
16370 +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
16371 +
16372 +# Transform the output of nm in a proper C declaration.
16373 +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
16374 +
16375 +# Transform the output of nm in a C name address pair.
16376 +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
16377 +
16378 +# Transform the output of nm in a C name address pair when lib prefix is needed.
16379 +global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
16380 +
16381 +# Specify filename containing input files for \$NM.
16382 +nm_file_list_spec=$lt_nm_file_list_spec
16383 +
16384 +# The root where to search for dependent libraries,and in which our libraries should be installed.
16385 +lt_sysroot=$lt_sysroot
16386 +
16387 +# The name of the directory that contains temporary libtool files.
16388 +objdir=$objdir
16389 +
16390 +# Used to examine libraries when file_magic_cmd begins with "file".
16391 +MAGIC_CMD=$MAGIC_CMD
16392 +
16393 +# Must we lock files when doing compilation?
16394 +need_locks=$lt_need_locks
16395 +
16396 +# Manifest tool.
16397 +MANIFEST_TOOL=$lt_MANIFEST_TOOL
16398 +
16399 +# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
16400 +DSYMUTIL=$lt_DSYMUTIL
16401 +
16402 +# Tool to change global to local symbols on Mac OS X.
16403 +NMEDIT=$lt_NMEDIT
16404 +
16405 +# Tool to manipulate fat objects and archives on Mac OS X.
16406 +LIPO=$lt_LIPO
16407 +
16408 +# ldd/readelf like tool for Mach-O binaries on Mac OS X.
16409 +OTOOL=$lt_OTOOL
16410 +
16411 +# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
16412 +OTOOL64=$lt_OTOOL64
16413 +
16414 +# Old archive suffix (normally "a").
16415 +libext=$libext
16416 +
16417 +# Shared library suffix (normally ".so").
16418 +shrext_cmds=$lt_shrext_cmds
16419 +
16420 +# The commands to extract the exported symbol list from a shared archive.
16421 +extract_expsyms_cmds=$lt_extract_expsyms_cmds
16422 +
16423 +# Variables whose values should be saved in libtool wrapper scripts and
16424 +# restored at link time.
16425 +variables_saved_for_relink=$lt_variables_saved_for_relink
16426 +
16427 +# Do we need the "lib" prefix for modules?
16428 +need_lib_prefix=$need_lib_prefix
16429 +
16430 +# Do we need a version for libraries?
16431 +need_version=$need_version
16432 +
16433 +# Library versioning type.
16434 +version_type=$version_type
16435 +
16436 +# Shared library runtime path variable.
16437 +runpath_var=$runpath_var
16438 +
16439 +# Shared library path variable.
16440 +shlibpath_var=$shlibpath_var
16441 +
16442 +# Is shlibpath searched before the hard-coded library search path?
16443 +shlibpath_overrides_runpath=$shlibpath_overrides_runpath
16444 +
16445 +# Format of library name prefix.
16446 +libname_spec=$lt_libname_spec
16447 +
16448 +# List of archive names. First name is the real one, the rest are links.
16449 +# The last name is the one that the linker finds with -lNAME
16450 +library_names_spec=$lt_library_names_spec
16451 +
16452 +# The coded name of the library, if different from the real name.
16453 +soname_spec=$lt_soname_spec
16454 +
16455 +# Permission mode override for installation of shared libraries.
16456 +install_override_mode=$lt_install_override_mode
16457 +
16458 +# Command to use after installation of a shared archive.
16459 +postinstall_cmds=$lt_postinstall_cmds
16460 +
16461 +# Command to use after uninstallation of a shared archive.
16462 +postuninstall_cmds=$lt_postuninstall_cmds
16463 +
16464 +# Commands used to finish a libtool library installation in a directory.
16465 +finish_cmds=$lt_finish_cmds
16466 +
16467 +# As "finish_cmds", except a single script fragment to be evaled but
16468 +# not shown.
16469 +finish_eval=$lt_finish_eval
16470 +
16471 +# Whether we should hardcode library paths into libraries.
16472 +hardcode_into_libs=$hardcode_into_libs
16473 +
16474 +# Compile-time system search path for libraries.
16475 +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
16476 +
16477 +# Run-time system search path for libraries.
16478 +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
16479 +
16480 +# Whether dlopen is supported.
16481 +dlopen_support=$enable_dlopen
16482 +
16483 +# Whether dlopen of programs is supported.
16484 +dlopen_self=$enable_dlopen_self
16485 +
16486 +# Whether dlopen of statically linked programs is supported.
16487 +dlopen_self_static=$enable_dlopen_self_static
16488 +
16489 +# Commands to strip libraries.
16490 +old_striplib=$lt_old_striplib
16491 +striplib=$lt_striplib
16492 +
16493 +
16494 +# The linker used to build libraries.
16495 +LD=$lt_LD
16496 +
16497 +# How to create reloadable object files.
16498 +reload_flag=$lt_reload_flag
16499 +reload_cmds=$lt_reload_cmds
16500 +
16501 +# Commands used to build an old-style archive.
16502 +old_archive_cmds=$lt_old_archive_cmds
16503 +
16504 +# A language specific compiler.
16505 +CC=$lt_compiler
16506 +
16507 +# Is the compiler the GNU compiler?
16508 +with_gcc=$GCC
16509 +
16510 +# Compiler flag to turn off builtin functions.
16511 +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
16512 +
16513 +# Additional compiler flags for building library objects.
16514 +pic_flag=$lt_lt_prog_compiler_pic
16515 +
16516 +# How to pass a linker flag through the compiler.
16517 +wl=$lt_lt_prog_compiler_wl
16518 +
16519 +# Compiler flag to prevent dynamic linking.
16520 +link_static_flag=$lt_lt_prog_compiler_static
16521 +
16522 +# Does compiler simultaneously support -c and -o options?
16523 +compiler_c_o=$lt_lt_cv_prog_compiler_c_o
16524 +
16525 +# Whether or not to add -lc for building shared libraries.
16526 +build_libtool_need_lc=$archive_cmds_need_lc
16527 +
16528 +# Whether or not to disallow shared libs when runtime libs are static.
16529 +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
16530 +
16531 +# Compiler flag to allow reflexive dlopens.
16532 +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
16533 +
16534 +# Compiler flag to generate shared objects directly from archives.
16535 +whole_archive_flag_spec=$lt_whole_archive_flag_spec
16536 +
16537 +# Whether the compiler copes with passing no objects directly.
16538 +compiler_needs_object=$lt_compiler_needs_object
16539 +
16540 +# Create an old-style archive from a shared archive.
16541 +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
16542 +
16543 +# Create a temporary old-style archive to link instead of a shared archive.
16544 +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
16545 +
16546 +# Commands used to build a shared archive.
16547 +archive_cmds=$lt_archive_cmds
16548 +archive_expsym_cmds=$lt_archive_expsym_cmds
16549 +
16550 +# Commands used to build a loadable module if different from building
16551 +# a shared archive.
16552 +module_cmds=$lt_module_cmds
16553 +module_expsym_cmds=$lt_module_expsym_cmds
16554 +
16555 +# Whether we are building with GNU ld or not.
16556 +with_gnu_ld=$lt_with_gnu_ld
16557 +
16558 +# Flag that allows shared libraries with undefined symbols to be built.
16559 +allow_undefined_flag=$lt_allow_undefined_flag
16560 +
16561 +# Flag that enforces no undefined symbols.
16562 +no_undefined_flag=$lt_no_undefined_flag
16563 +
16564 +# Flag to hardcode \$libdir into a binary during linking.
16565 +# This must work even if \$libdir does not exist
16566 +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
16567 +
16568 +# Whether we need a single "-rpath" flag with a separated argument.
16569 +hardcode_libdir_separator=$lt_hardcode_libdir_separator
16570 +
16571 +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
16572 +# DIR into the resulting binary.
16573 +hardcode_direct=$hardcode_direct
16574 +
16575 +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
16576 +# DIR into the resulting binary and the resulting library dependency is
16577 +# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
16578 +# library is relocated.
16579 +hardcode_direct_absolute=$hardcode_direct_absolute
16580 +
16581 +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
16582 +# into the resulting binary.
16583 +hardcode_minus_L=$hardcode_minus_L
16584 +
16585 +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
16586 +# into the resulting binary.
16587 +hardcode_shlibpath_var=$hardcode_shlibpath_var
16588 +
16589 +# Set to "yes" if building a shared library automatically hardcodes DIR
16590 +# into the library and all subsequent libraries and executables linked
16591 +# against it.
16592 +hardcode_automatic=$hardcode_automatic
16593 +
16594 +# Set to yes if linker adds runtime paths of dependent libraries
16595 +# to runtime path list.
16596 +inherit_rpath=$inherit_rpath
16597 +
16598 +# Whether libtool must link a program against all its dependency libraries.
16599 +link_all_deplibs=$link_all_deplibs
16600 +
16601 +# Set to "yes" if exported symbols are required.
16602 +always_export_symbols=$always_export_symbols
16603 +
16604 +# The commands to list exported symbols.
16605 +export_symbols_cmds=$lt_export_symbols_cmds
16606 +
16607 +# Symbols that should not be listed in the preloaded symbols.
16608 +exclude_expsyms=$lt_exclude_expsyms
16609 +
16610 +# Symbols that must always be exported.
16611 +include_expsyms=$lt_include_expsyms
16612 +
16613 +# Commands necessary for linking programs (against libraries) with templates.
16614 +prelink_cmds=$lt_prelink_cmds
16615 +
16616 +# Commands necessary for finishing linking programs.
16617 +postlink_cmds=$lt_postlink_cmds
16618 +
16619 +# Specify filename containing input files.
16620 +file_list_spec=$lt_file_list_spec
16621 +
16622 +# How to hardcode a shared library path into an executable.
16623 +hardcode_action=$hardcode_action
16624 +
16625 +# ### END LIBTOOL CONFIG
16626 +
16627 +_LT_EOF
16628 +
16629 + case $host_os in
16630 + aix3*)
16631 + cat <<\_LT_EOF >> "$cfgfile"
16632 +# AIX sometimes has problems with the GCC collect2 program. For some
16633 +# reason, if we set the COLLECT_NAMES environment variable, the problems
16634 +# vanish in a puff of smoke.
16635 +if test "X${COLLECT_NAMES+set}" != Xset; then
16636 + COLLECT_NAMES=
16637 + export COLLECT_NAMES
16638 +fi
16639 +_LT_EOF
16640 + ;;
16641 + esac
16642 +
16643 +
16644 +ltmain="$ac_aux_dir/ltmain.sh"
16645 +
16646 +
16647 + # We use sed instead of cat because bash on DJGPP gets confused if
16648 + # if finds mixed CR/LF and LF-only lines. Since sed operates in
16649 + # text mode, it properly converts lines to CR/LF. This bash problem
16650 + # is reportedly fixed, but why not run on old versions too?
16651 + sed '$q' "$ltmain" >> "$cfgfile" \
16652 + || (rm -f "$cfgfile"; exit 1)
16653 +
16654 + if test x"$xsi_shell" = xyes; then
16655 + sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
16656 +func_dirname ()\
16657 +{\
16658 +\ case ${1} in\
16659 +\ */*) func_dirname_result="${1%/*}${2}" ;;\
16660 +\ * ) func_dirname_result="${3}" ;;\
16661 +\ esac\
16662 +} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
16663 + && mv -f "$cfgfile.tmp" "$cfgfile" \
16664 + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
16665 +test 0 -eq $? || _lt_function_replace_fail=:
16666 +
16667 +
16668 + sed -e '/^func_basename ()$/,/^} # func_basename /c\
16669 +func_basename ()\
16670 +{\
16671 +\ func_basename_result="${1##*/}"\
16672 +} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
16673 + && mv -f "$cfgfile.tmp" "$cfgfile" \
16674 + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
16675 +test 0 -eq $? || _lt_function_replace_fail=:
16676 +
16677 +
16678 + sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
16679 +func_dirname_and_basename ()\
16680 +{\
16681 +\ case ${1} in\
16682 +\ */*) func_dirname_result="${1%/*}${2}" ;;\
16683 +\ * ) func_dirname_result="${3}" ;;\
16684 +\ esac\
16685 +\ func_basename_result="${1##*/}"\
16686 +} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
16687 + && mv -f "$cfgfile.tmp" "$cfgfile" \
16688 + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
16689 +test 0 -eq $? || _lt_function_replace_fail=:
16690 +
16691 +
16692 + sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
16693 +func_stripname ()\
16694 +{\
16695 +\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
16696 +\ # positional parameters, so assign one to ordinary parameter first.\
16697 +\ func_stripname_result=${3}\
16698 +\ func_stripname_result=${func_stripname_result#"${1}"}\
16699 +\ func_stripname_result=${func_stripname_result%"${2}"}\
16700 +} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
16701 + && mv -f "$cfgfile.tmp" "$cfgfile" \
16702 + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
16703 +test 0 -eq $? || _lt_function_replace_fail=:
16704 +
16705 +
16706 + sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
16707 +func_split_long_opt ()\
16708 +{\
16709 +\ func_split_long_opt_name=${1%%=*}\
16710 +\ func_split_long_opt_arg=${1#*=}\
16711 +} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
16712 + && mv -f "$cfgfile.tmp" "$cfgfile" \
16713 + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
16714 +test 0 -eq $? || _lt_function_replace_fail=:
16715 +
16716 +
16717 + sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
16718 +func_split_short_opt ()\
16719 +{\
16720 +\ func_split_short_opt_arg=${1#??}\
16721 +\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
16722 +} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
16723 + && mv -f "$cfgfile.tmp" "$cfgfile" \
16724 + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
16725 +test 0 -eq $? || _lt_function_replace_fail=:
16726 +
16727 +
16728 + sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
16729 +func_lo2o ()\
16730 +{\
16731 +\ case ${1} in\
16732 +\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
16733 +\ *) func_lo2o_result=${1} ;;\
16734 +\ esac\
16735 +} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
16736 + && mv -f "$cfgfile.tmp" "$cfgfile" \
16737 + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
16738 +test 0 -eq $? || _lt_function_replace_fail=:
16739 +
16740 +
16741 + sed -e '/^func_xform ()$/,/^} # func_xform /c\
16742 +func_xform ()\
16743 +{\
16744 + func_xform_result=${1%.*}.lo\
16745 +} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
16746 + && mv -f "$cfgfile.tmp" "$cfgfile" \
16747 + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
16748 +test 0 -eq $? || _lt_function_replace_fail=:
16749 +
16750 +
16751 + sed -e '/^func_arith ()$/,/^} # func_arith /c\
16752 +func_arith ()\
16753 +{\
16754 + func_arith_result=$(( $* ))\
16755 +} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
16756 + && mv -f "$cfgfile.tmp" "$cfgfile" \
16757 + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
16758 +test 0 -eq $? || _lt_function_replace_fail=:
16759 +
16760 +
16761 + sed -e '/^func_len ()$/,/^} # func_len /c\
16762 +func_len ()\
16763 +{\
16764 + func_len_result=${#1}\
16765 +} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
16766 + && mv -f "$cfgfile.tmp" "$cfgfile" \
16767 + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
16768 +test 0 -eq $? || _lt_function_replace_fail=:
16769 +
16770 +fi
16771 +
16772 +if test x"$lt_shell_append" = xyes; then
16773 + sed -e '/^func_append ()$/,/^} # func_append /c\
16774 +func_append ()\
16775 +{\
16776 + eval "${1}+=\\${2}"\
16777 +} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
16778 + && mv -f "$cfgfile.tmp" "$cfgfile" \
16779 + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
16780 +test 0 -eq $? || _lt_function_replace_fail=:
16781 +
16782 +
16783 + sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
16784 +func_append_quoted ()\
16785 +{\
16786 +\ func_quote_for_eval "${2}"\
16787 +\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
16788 +} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
16789 + && mv -f "$cfgfile.tmp" "$cfgfile" \
16790 + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
16791 +test 0 -eq $? || _lt_function_replace_fail=:
16792 +
16793 +
16794 + # Save a `func_append' function call where possible by direct use of '+='
16795 + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
16796 + && mv -f "$cfgfile.tmp" "$cfgfile" \
16797 + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
16798 + test 0 -eq $? || _lt_function_replace_fail=:
16799 +else
16800 + # Save a `func_append' function call even when '+=' is not available
16801 + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
16802 + && mv -f "$cfgfile.tmp" "$cfgfile" \
16803 + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
16804 + test 0 -eq $? || _lt_function_replace_fail=:
16805 +fi
16806 +
16807 +if test x"$_lt_function_replace_fail" = x":"; then
16808 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
16809 +$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
16810 +fi
16811 +
16812 +
16813 + mv -f "$cfgfile" "$ofile" ||
16814 + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
16815 + chmod +x "$ofile"
16816 +
16817 + ;;
16818 +
16819 + esac
16820 +done # for ac_tag
16821 +
16822 +
16823 +as_fn_exit 0
16824 +_ACEOF
16825 +ac_clean_files=$ac_clean_files_save
16826 +
16827 +test $ac_write_fail = 0 ||
16828 + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
16829 +
16830 +
16831 +# configure is writing to config.log, and then calls config.status.
16832 +# config.status does its own redirection, appending to config.log.
16833 +# Unfortunately, on DOS this fails, as config.log is still kept open
16834 +# by configure, so config.status won't be able to write to it; its
16835 +# output is simply discarded. So we exec the FD to /dev/null,
16836 +# effectively closing config.log, so it can be properly (re)opened and
16837 +# appended to by config.status. When coming back to configure, we
16838 +# need to make the FD available again.
16839 +if test "$no_create" != yes; then
16840 + ac_cs_success=:
16841 + ac_config_status_args=
16842 + test "$silent" = yes &&
16843 + ac_config_status_args="$ac_config_status_args --quiet"
16844 + exec 5>/dev/null
16845 + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
16846 + exec 5>>config.log
16847 + # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16848 + # would make configure fail if this is the last instruction.
16849 + $ac_cs_success || as_fn_exit 1
16850 +fi
16851 +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16852 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16853 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
16854 +fi
16855 +
16856 --- /dev/null
16857 +++ b/config.sub
16858 @@ -0,0 +1,1791 @@
16859 +#! /bin/sh
16860 +# Configuration validation subroutine script.
16861 +# Copyright 1992-2013 Free Software Foundation, Inc.
16862 +
16863 +timestamp='2013-08-10'
16864 +
16865 +# This file is free software; you can redistribute it and/or modify it
16866 +# under the terms of the GNU General Public License as published by
16867 +# the Free Software Foundation; either version 3 of the License, or
16868 +# (at your option) any later version.
16869 +#
16870 +# This program is distributed in the hope that it will be useful, but
16871 +# WITHOUT ANY WARRANTY; without even the implied warranty of
16872 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16873 +# General Public License for more details.
16874 +#
16875 +# You should have received a copy of the GNU General Public License
16876 +# along with this program; if not, see <http://www.gnu.org/licenses/>.
16877 +#
16878 +# As a special exception to the GNU General Public License, if you
16879 +# distribute this file as part of a program that contains a
16880 +# configuration script generated by Autoconf, you may include it under
16881 +# the same distribution terms that you use for the rest of that
16882 +# program. This Exception is an additional permission under section 7
16883 +# of the GNU General Public License, version 3 ("GPLv3").
16884 +
16885 +
16886 +# Please send patches with a ChangeLog entry to config-patches@gnu.org.
16887 +#
16888 +# Configuration subroutine to validate and canonicalize a configuration type.
16889 +# Supply the specified configuration type as an argument.
16890 +# If it is invalid, we print an error message on stderr and exit with code 1.
16891 +# Otherwise, we print the canonical config type on stdout and succeed.
16892 +
16893 +# You can get the latest version of this script from:
16894 +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
16895 +
16896 +# This file is supposed to be the same for all GNU packages
16897 +# and recognize all the CPU types, system types and aliases
16898 +# that are meaningful with *any* GNU software.
16899 +# Each package is responsible for reporting which valid configurations
16900 +# it does not support. The user should be able to distinguish
16901 +# a failure to support a valid configuration from a meaningless
16902 +# configuration.
16903 +
16904 +# The goal of this file is to map all the various variations of a given
16905 +# machine specification into a single specification in the form:
16906 +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
16907 +# or in some cases, the newer four-part form:
16908 +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
16909 +# It is wrong to echo any other type of specification.
16910 +
16911 +me=`echo "$0" | sed -e 's,.*/,,'`
16912 +
16913 +usage="\
16914 +Usage: $0 [OPTION] CPU-MFR-OPSYS
16915 + $0 [OPTION] ALIAS
16916 +
16917 +Canonicalize a configuration name.
16918 +
16919 +Operation modes:
16920 + -h, --help print this help, then exit
16921 + -t, --time-stamp print date of last modification, then exit
16922 + -v, --version print version number, then exit
16923 +
16924 +Report bugs and patches to <config-patches@gnu.org>."
16925 +
16926 +version="\
16927 +GNU config.sub ($timestamp)
16928 +
16929 +Copyright 1992-2013 Free Software Foundation, Inc.
16930 +
16931 +This is free software; see the source for copying conditions. There is NO
16932 +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
16933 +
16934 +help="
16935 +Try \`$me --help' for more information."
16936 +
16937 +# Parse command line
16938 +while test $# -gt 0 ; do
16939 + case $1 in
16940 + --time-stamp | --time* | -t )
16941 + echo "$timestamp" ; exit ;;
16942 + --version | -v )
16943 + echo "$version" ; exit ;;
16944 + --help | --h* | -h )
16945 + echo "$usage"; exit ;;
16946 + -- ) # Stop option processing
16947 + shift; break ;;
16948 + - ) # Use stdin as input.
16949 + break ;;
16950 + -* )
16951 + echo "$me: invalid option $1$help"
16952 + exit 1 ;;
16953 +
16954 + *local*)
16955 + # First pass through any local machine types.
16956 + echo $1
16957 + exit ;;
16958 +
16959 + * )
16960 + break ;;
16961 + esac
16962 +done
16963 +
16964 +case $# in
16965 + 0) echo "$me: missing argument$help" >&2
16966 + exit 1;;
16967 + 1) ;;
16968 + *) echo "$me: too many arguments$help" >&2
16969 + exit 1;;
16970 +esac
16971 +
16972 +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
16973 +# Here we must recognize all the valid KERNEL-OS combinations.
16974 +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
16975 +case $maybe_os in
16976 + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
16977 + linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
16978 + knetbsd*-gnu* | netbsd*-gnu* | \
16979 + kopensolaris*-gnu* | \
16980 + storm-chaos* | os2-emx* | rtmk-nova*)
16981 + os=-$maybe_os
16982 + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
16983 + ;;
16984 + android-linux)
16985 + os=-linux-android
16986 + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
16987 + ;;
16988 + *)
16989 + basic_machine=`echo $1 | sed 's/-[^-]*$//'`
16990 + if [ $basic_machine != $1 ]
16991 + then os=`echo $1 | sed 's/.*-/-/'`
16992 + else os=; fi
16993 + ;;
16994 +esac
16995 +
16996 +### Let's recognize common machines as not being operating systems so
16997 +### that things like config.sub decstation-3100 work. We also
16998 +### recognize some manufacturers as not being operating systems, so we
16999 +### can provide default operating systems below.
17000 +case $os in
17001 + -sun*os*)
17002 + # Prevent following clause from handling this invalid input.
17003 + ;;
17004 + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
17005 + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
17006 + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
17007 + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
17008 + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
17009 + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
17010 + -apple | -axis | -knuth | -cray | -microblaze*)
17011 + os=
17012 + basic_machine=$1
17013 + ;;
17014 + -bluegene*)
17015 + os=-cnk
17016 + ;;
17017 + -sim | -cisco | -oki | -wec | -winbond)
17018 + os=
17019 + basic_machine=$1
17020 + ;;
17021 + -scout)
17022 + ;;
17023 + -wrs)
17024 + os=-vxworks
17025 + basic_machine=$1
17026 + ;;
17027 + -chorusos*)
17028 + os=-chorusos
17029 + basic_machine=$1
17030 + ;;
17031 + -chorusrdb)
17032 + os=-chorusrdb
17033 + basic_machine=$1
17034 + ;;
17035 + -hiux*)
17036 + os=-hiuxwe2
17037 + ;;
17038 + -sco6)
17039 + os=-sco5v6
17040 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
17041 + ;;
17042 + -sco5)
17043 + os=-sco3.2v5
17044 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
17045 + ;;
17046 + -sco4)
17047 + os=-sco3.2v4
17048 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
17049 + ;;
17050 + -sco3.2.[4-9]*)
17051 + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
17052 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
17053 + ;;
17054 + -sco3.2v[4-9]*)
17055 + # Don't forget version if it is 3.2v4 or newer.
17056 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
17057 + ;;
17058 + -sco5v6*)
17059 + # Don't forget version if it is 3.2v4 or newer.
17060 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
17061 + ;;
17062 + -sco*)
17063 + os=-sco3.2v2
17064 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
17065 + ;;
17066 + -udk*)
17067 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
17068 + ;;
17069 + -isc)
17070 + os=-isc2.2
17071 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
17072 + ;;
17073 + -clix*)
17074 + basic_machine=clipper-intergraph
17075 + ;;
17076 + -isc*)
17077 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
17078 + ;;
17079 + -lynx*178)
17080 + os=-lynxos178
17081 + ;;
17082 + -lynx*5)
17083 + os=-lynxos5
17084 + ;;
17085 + -lynx*)
17086 + os=-lynxos
17087 + ;;
17088 + -ptx*)
17089 + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
17090 + ;;
17091 + -windowsnt*)
17092 + os=`echo $os | sed -e 's/windowsnt/winnt/'`
17093 + ;;
17094 + -psos*)
17095 + os=-psos
17096 + ;;
17097 + -mint | -mint[0-9]*)
17098 + basic_machine=m68k-atari
17099 + os=-mint
17100 + ;;
17101 +esac
17102 +
17103 +# Decode aliases for certain CPU-COMPANY combinations.
17104 +case $basic_machine in
17105 + # Recognize the basic CPU types without company name.
17106 + # Some are omitted here because they have special meanings below.
17107 + 1750a | 580 \
17108 + | a29k \
17109 + | aarch64 | aarch64_be \
17110 + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
17111 + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
17112 + | am33_2.0 \
17113 + | arc | arceb \
17114 + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
17115 + | avr | avr32 \
17116 + | be32 | be64 \
17117 + | bfin \
17118 + | c4x | c8051 | clipper \
17119 + | d10v | d30v | dlx | dsp16xx \
17120 + | epiphany \
17121 + | fido | fr30 | frv \
17122 + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
17123 + | hexagon \
17124 + | i370 | i860 | i960 | ia64 \
17125 + | ip2k | iq2000 \
17126 + | le32 | le64 \
17127 + | lm32 \
17128 + | m32c | m32r | m32rle | m68000 | m68k | m88k \
17129 + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
17130 + | mips | mipsbe | mipseb | mipsel | mipsle \
17131 + | mips16 \
17132 + | mips64 | mips64el \
17133 + | mips64octeon | mips64octeonel \
17134 + | mips64orion | mips64orionel \
17135 + | mips64r5900 | mips64r5900el \
17136 + | mips64vr | mips64vrel \
17137 + | mips64vr4100 | mips64vr4100el \
17138 + | mips64vr4300 | mips64vr4300el \
17139 + | mips64vr5000 | mips64vr5000el \
17140 + | mips64vr5900 | mips64vr5900el \
17141 + | mipsisa32 | mipsisa32el \
17142 + | mipsisa32r2 | mipsisa32r2el \
17143 + | mipsisa64 | mipsisa64el \
17144 + | mipsisa64r2 | mipsisa64r2el \
17145 + | mipsisa64sb1 | mipsisa64sb1el \
17146 + | mipsisa64sr71k | mipsisa64sr71kel \
17147 + | mipsr5900 | mipsr5900el \
17148 + | mipstx39 | mipstx39el \
17149 + | mn10200 | mn10300 \
17150 + | moxie \
17151 + | mt \
17152 + | msp430 \
17153 + | nds32 | nds32le | nds32be \
17154 + | nios | nios2 | nios2eb | nios2el \
17155 + | ns16k | ns32k \
17156 + | open8 \
17157 + | or1k | or32 \
17158 + | pdp10 | pdp11 | pj | pjl \
17159 + | powerpc | powerpc64 | powerpc64le | powerpcle \
17160 + | pyramid \
17161 + | rl78 | rx \
17162 + | score \
17163 + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
17164 + | sh64 | sh64le \
17165 + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
17166 + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
17167 + | spu \
17168 + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
17169 + | ubicom32 \
17170 + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
17171 + | we32k \
17172 + | x86 | xc16x | xstormy16 | xtensa \
17173 + | z8k | z80)
17174 + basic_machine=$basic_machine-unknown
17175 + ;;
17176 + c54x)
17177 + basic_machine=tic54x-unknown
17178 + ;;
17179 + c55x)
17180 + basic_machine=tic55x-unknown
17181 + ;;
17182 + c6x)
17183 + basic_machine=tic6x-unknown
17184 + ;;
17185 + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
17186 + basic_machine=$basic_machine-unknown
17187 + os=-none
17188 + ;;
17189 + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
17190 + ;;
17191 + ms1)
17192 + basic_machine=mt-unknown
17193 + ;;
17194 +
17195 + strongarm | thumb | xscale)
17196 + basic_machine=arm-unknown
17197 + ;;
17198 + xgate)
17199 + basic_machine=$basic_machine-unknown
17200 + os=-none
17201 + ;;
17202 + xscaleeb)
17203 + basic_machine=armeb-unknown
17204 + ;;
17205 +
17206 + xscaleel)
17207 + basic_machine=armel-unknown
17208 + ;;
17209 +
17210 + # We use `pc' rather than `unknown'
17211 + # because (1) that's what they normally are, and
17212 + # (2) the word "unknown" tends to confuse beginning users.
17213 + i*86 | x86_64)
17214 + basic_machine=$basic_machine-pc
17215 + ;;
17216 + # Object if more than one company name word.
17217 + *-*-*)
17218 + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
17219 + exit 1
17220 + ;;
17221 + # Recognize the basic CPU types with company name.
17222 + 580-* \
17223 + | a29k-* \
17224 + | aarch64-* | aarch64_be-* \
17225 + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
17226 + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
17227 + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
17228 + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
17229 + | avr-* | avr32-* \
17230 + | be32-* | be64-* \
17231 + | bfin-* | bs2000-* \
17232 + | c[123]* | c30-* | [cjt]90-* | c4x-* \
17233 + | c8051-* | clipper-* | craynv-* | cydra-* \
17234 + | d10v-* | d30v-* | dlx-* \
17235 + | elxsi-* \
17236 + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
17237 + | h8300-* | h8500-* \
17238 + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
17239 + | hexagon-* \
17240 + | i*86-* | i860-* | i960-* | ia64-* \
17241 + | ip2k-* | iq2000-* \
17242 + | le32-* | le64-* \
17243 + | lm32-* \
17244 + | m32c-* | m32r-* | m32rle-* \
17245 + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
17246 + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
17247 + | microblaze-* | microblazeel-* \
17248 + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
17249 + | mips16-* \
17250 + | mips64-* | mips64el-* \
17251 + | mips64octeon-* | mips64octeonel-* \
17252 + | mips64orion-* | mips64orionel-* \
17253 + | mips64r5900-* | mips64r5900el-* \
17254 + | mips64vr-* | mips64vrel-* \
17255 + | mips64vr4100-* | mips64vr4100el-* \
17256 + | mips64vr4300-* | mips64vr4300el-* \
17257 + | mips64vr5000-* | mips64vr5000el-* \
17258 + | mips64vr5900-* | mips64vr5900el-* \
17259 + | mipsisa32-* | mipsisa32el-* \
17260 + | mipsisa32r2-* | mipsisa32r2el-* \
17261 + | mipsisa64-* | mipsisa64el-* \
17262 + | mipsisa64r2-* | mipsisa64r2el-* \
17263 + | mipsisa64sb1-* | mipsisa64sb1el-* \
17264 + | mipsisa64sr71k-* | mipsisa64sr71kel-* \
17265 + | mipsr5900-* | mipsr5900el-* \
17266 + | mipstx39-* | mipstx39el-* \
17267 + | mmix-* \
17268 + | mt-* \
17269 + | msp430-* \
17270 + | nds32-* | nds32le-* | nds32be-* \
17271 + | nios-* | nios2-* | nios2eb-* | nios2el-* \
17272 + | none-* | np1-* | ns16k-* | ns32k-* \
17273 + | open8-* \
17274 + | orion-* \
17275 + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
17276 + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
17277 + | pyramid-* \
17278 + | rl78-* | romp-* | rs6000-* | rx-* \
17279 + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
17280 + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
17281 + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
17282 + | sparclite-* \
17283 + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
17284 + | tahoe-* \
17285 + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
17286 + | tile*-* \
17287 + | tron-* \
17288 + | ubicom32-* \
17289 + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
17290 + | vax-* \
17291 + | we32k-* \
17292 + | x86-* | x86_64-* | xc16x-* | xps100-* \
17293 + | xstormy16-* | xtensa*-* \
17294 + | ymp-* \
17295 + | z8k-* | z80-*)
17296 + ;;
17297 + # Recognize the basic CPU types without company name, with glob match.
17298 + xtensa*)
17299 + basic_machine=$basic_machine-unknown
17300 + ;;
17301 + # Recognize the various machine names and aliases which stand
17302 + # for a CPU type and a company and sometimes even an OS.
17303 + 386bsd)
17304 + basic_machine=i386-unknown
17305 + os=-bsd
17306 + ;;
17307 + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
17308 + basic_machine=m68000-att
17309 + ;;
17310 + 3b*)
17311 + basic_machine=we32k-att
17312 + ;;
17313 + a29khif)
17314 + basic_machine=a29k-amd
17315 + os=-udi
17316 + ;;
17317 + abacus)
17318 + basic_machine=abacus-unknown
17319 + ;;
17320 + adobe68k)
17321 + basic_machine=m68010-adobe
17322 + os=-scout
17323 + ;;
17324 + alliant | fx80)
17325 + basic_machine=fx80-alliant
17326 + ;;
17327 + altos | altos3068)
17328 + basic_machine=m68k-altos
17329 + ;;
17330 + am29k)
17331 + basic_machine=a29k-none
17332 + os=-bsd
17333 + ;;
17334 + amd64)
17335 + basic_machine=x86_64-pc
17336 + ;;
17337 + amd64-*)
17338 + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
17339 + ;;
17340 + amdahl)
17341 + basic_machine=580-amdahl
17342 + os=-sysv
17343 + ;;
17344 + amiga | amiga-*)
17345 + basic_machine=m68k-unknown
17346 + ;;
17347 + amigaos | amigados)
17348 + basic_machine=m68k-unknown
17349 + os=-amigaos
17350 + ;;
17351 + amigaunix | amix)
17352 + basic_machine=m68k-unknown
17353 + os=-sysv4
17354 + ;;
17355 + apollo68)
17356 + basic_machine=m68k-apollo
17357 + os=-sysv
17358 + ;;
17359 + apollo68bsd)
17360 + basic_machine=m68k-apollo
17361 + os=-bsd
17362 + ;;
17363 + aros)
17364 + basic_machine=i386-pc
17365 + os=-aros
17366 + ;;
17367 + aux)
17368 + basic_machine=m68k-apple
17369 + os=-aux
17370 + ;;
17371 + balance)
17372 + basic_machine=ns32k-sequent
17373 + os=-dynix
17374 + ;;
17375 + blackfin)
17376 + basic_machine=bfin-unknown
17377 + os=-linux
17378 + ;;
17379 + blackfin-*)
17380 + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
17381 + os=-linux
17382 + ;;
17383 + bluegene*)
17384 + basic_machine=powerpc-ibm
17385 + os=-cnk
17386 + ;;
17387 + c54x-*)
17388 + basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
17389 + ;;
17390 + c55x-*)
17391 + basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
17392 + ;;
17393 + c6x-*)
17394 + basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
17395 + ;;
17396 + c90)
17397 + basic_machine=c90-cray
17398 + os=-unicos
17399 + ;;
17400 + cegcc)
17401 + basic_machine=arm-unknown
17402 + os=-cegcc
17403 + ;;
17404 + convex-c1)
17405 + basic_machine=c1-convex
17406 + os=-bsd
17407 + ;;
17408 + convex-c2)
17409 + basic_machine=c2-convex
17410 + os=-bsd
17411 + ;;
17412 + convex-c32)
17413 + basic_machine=c32-convex
17414 + os=-bsd
17415 + ;;
17416 + convex-c34)
17417 + basic_machine=c34-convex
17418 + os=-bsd
17419 + ;;
17420 + convex-c38)
17421 + basic_machine=c38-convex
17422 + os=-bsd
17423 + ;;
17424 + cray | j90)
17425 + basic_machine=j90-cray
17426 + os=-unicos
17427 + ;;
17428 + craynv)
17429 + basic_machine=craynv-cray
17430 + os=-unicosmp
17431 + ;;
17432 + cr16 | cr16-*)
17433 + basic_machine=cr16-unknown
17434 + os=-elf
17435 + ;;
17436 + crds | unos)
17437 + basic_machine=m68k-crds
17438 + ;;
17439 + crisv32 | crisv32-* | etraxfs*)
17440 + basic_machine=crisv32-axis
17441 + ;;
17442 + cris | cris-* | etrax*)
17443 + basic_machine=cris-axis
17444 + ;;
17445 + crx)
17446 + basic_machine=crx-unknown
17447 + os=-elf
17448 + ;;
17449 + da30 | da30-*)
17450 + basic_machine=m68k-da30
17451 + ;;
17452 + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
17453 + basic_machine=mips-dec
17454 + ;;
17455 + decsystem10* | dec10*)
17456 + basic_machine=pdp10-dec
17457 + os=-tops10
17458 + ;;
17459 + decsystem20* | dec20*)
17460 + basic_machine=pdp10-dec
17461 + os=-tops20
17462 + ;;
17463 + delta | 3300 | motorola-3300 | motorola-delta \
17464 + | 3300-motorola | delta-motorola)
17465 + basic_machine=m68k-motorola
17466 + ;;
17467 + delta88)
17468 + basic_machine=m88k-motorola
17469 + os=-sysv3
17470 + ;;
17471 + dicos)
17472 + basic_machine=i686-pc
17473 + os=-dicos
17474 + ;;
17475 + djgpp)
17476 + basic_machine=i586-pc
17477 + os=-msdosdjgpp
17478 + ;;
17479 + dpx20 | dpx20-*)
17480 + basic_machine=rs6000-bull
17481 + os=-bosx
17482 + ;;
17483 + dpx2* | dpx2*-bull)
17484 + basic_machine=m68k-bull
17485 + os=-sysv3
17486 + ;;
17487 + ebmon29k)
17488 + basic_machine=a29k-amd
17489 + os=-ebmon
17490 + ;;
17491 + elxsi)
17492 + basic_machine=elxsi-elxsi
17493 + os=-bsd
17494 + ;;
17495 + encore | umax | mmax)
17496 + basic_machine=ns32k-encore
17497 + ;;
17498 + es1800 | OSE68k | ose68k | ose | OSE)
17499 + basic_machine=m68k-ericsson
17500 + os=-ose
17501 + ;;
17502 + fx2800)
17503 + basic_machine=i860-alliant
17504 + ;;
17505 + genix)
17506 + basic_machine=ns32k-ns
17507 + ;;
17508 + gmicro)
17509 + basic_machine=tron-gmicro
17510 + os=-sysv
17511 + ;;
17512 + go32)
17513 + basic_machine=i386-pc
17514 + os=-go32
17515 + ;;
17516 + h3050r* | hiux*)
17517 + basic_machine=hppa1.1-hitachi
17518 + os=-hiuxwe2
17519 + ;;
17520 + h8300hms)
17521 + basic_machine=h8300-hitachi
17522 + os=-hms
17523 + ;;
17524 + h8300xray)
17525 + basic_machine=h8300-hitachi
17526 + os=-xray
17527 + ;;
17528 + h8500hms)
17529 + basic_machine=h8500-hitachi
17530 + os=-hms
17531 + ;;
17532 + harris)
17533 + basic_machine=m88k-harris
17534 + os=-sysv3
17535 + ;;
17536 + hp300-*)
17537 + basic_machine=m68k-hp
17538 + ;;
17539 + hp300bsd)
17540 + basic_machine=m68k-hp
17541 + os=-bsd
17542 + ;;
17543 + hp300hpux)
17544 + basic_machine=m68k-hp
17545 + os=-hpux
17546 + ;;
17547 + hp3k9[0-9][0-9] | hp9[0-9][0-9])
17548 + basic_machine=hppa1.0-hp
17549 + ;;
17550 + hp9k2[0-9][0-9] | hp9k31[0-9])
17551 + basic_machine=m68000-hp
17552 + ;;
17553 + hp9k3[2-9][0-9])
17554 + basic_machine=m68k-hp
17555 + ;;
17556 + hp9k6[0-9][0-9] | hp6[0-9][0-9])
17557 + basic_machine=hppa1.0-hp
17558 + ;;
17559 + hp9k7[0-79][0-9] | hp7[0-79][0-9])
17560 + basic_machine=hppa1.1-hp
17561 + ;;
17562 + hp9k78[0-9] | hp78[0-9])
17563 + # FIXME: really hppa2.0-hp
17564 + basic_machine=hppa1.1-hp
17565 + ;;
17566 + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
17567 + # FIXME: really hppa2.0-hp
17568 + basic_machine=hppa1.1-hp
17569 + ;;
17570 + hp9k8[0-9][13679] | hp8[0-9][13679])
17571 + basic_machine=hppa1.1-hp
17572 + ;;
17573 + hp9k8[0-9][0-9] | hp8[0-9][0-9])
17574 + basic_machine=hppa1.0-hp
17575 + ;;
17576 + hppa-next)
17577 + os=-nextstep3
17578 + ;;
17579 + hppaosf)
17580 + basic_machine=hppa1.1-hp
17581 + os=-osf
17582 + ;;
17583 + hppro)
17584 + basic_machine=hppa1.1-hp
17585 + os=-proelf
17586 + ;;
17587 + i370-ibm* | ibm*)
17588 + basic_machine=i370-ibm
17589 + ;;
17590 + i*86v32)
17591 + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
17592 + os=-sysv32
17593 + ;;
17594 + i*86v4*)
17595 + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
17596 + os=-sysv4
17597 + ;;
17598 + i*86v)
17599 + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
17600 + os=-sysv
17601 + ;;
17602 + i*86sol2)
17603 + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
17604 + os=-solaris2
17605 + ;;
17606 + i386mach)
17607 + basic_machine=i386-mach
17608 + os=-mach
17609 + ;;
17610 + i386-vsta | vsta)
17611 + basic_machine=i386-unknown
17612 + os=-vsta
17613 + ;;
17614 + iris | iris4d)
17615 + basic_machine=mips-sgi
17616 + case $os in
17617 + -irix*)
17618 + ;;
17619 + *)
17620 + os=-irix4
17621 + ;;
17622 + esac
17623 + ;;
17624 + isi68 | isi)
17625 + basic_machine=m68k-isi
17626 + os=-sysv
17627 + ;;
17628 + m68knommu)
17629 + basic_machine=m68k-unknown
17630 + os=-linux
17631 + ;;
17632 + m68knommu-*)
17633 + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
17634 + os=-linux
17635 + ;;
17636 + m88k-omron*)
17637 + basic_machine=m88k-omron
17638 + ;;
17639 + magnum | m3230)
17640 + basic_machine=mips-mips
17641 + os=-sysv
17642 + ;;
17643 + merlin)
17644 + basic_machine=ns32k-utek
17645 + os=-sysv
17646 + ;;
17647 + microblaze*)
17648 + basic_machine=microblaze-xilinx
17649 + ;;
17650 + mingw64)
17651 + basic_machine=x86_64-pc
17652 + os=-mingw64
17653 + ;;
17654 + mingw32)
17655 + basic_machine=i686-pc
17656 + os=-mingw32
17657 + ;;
17658 + mingw32ce)
17659 + basic_machine=arm-unknown
17660 + os=-mingw32ce
17661 + ;;
17662 + miniframe)
17663 + basic_machine=m68000-convergent
17664 + ;;
17665 + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
17666 + basic_machine=m68k-atari
17667 + os=-mint
17668 + ;;
17669 + mips3*-*)
17670 + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
17671 + ;;
17672 + mips3*)
17673 + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
17674 + ;;
17675 + monitor)
17676 + basic_machine=m68k-rom68k
17677 + os=-coff
17678 + ;;
17679 + morphos)
17680 + basic_machine=powerpc-unknown
17681 + os=-morphos
17682 + ;;
17683 + msdos)
17684 + basic_machine=i386-pc
17685 + os=-msdos
17686 + ;;
17687 + ms1-*)
17688 + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
17689 + ;;
17690 + msys)
17691 + basic_machine=i686-pc
17692 + os=-msys
17693 + ;;
17694 + mvs)
17695 + basic_machine=i370-ibm
17696 + os=-mvs
17697 + ;;
17698 + nacl)
17699 + basic_machine=le32-unknown
17700 + os=-nacl
17701 + ;;
17702 + ncr3000)
17703 + basic_machine=i486-ncr
17704 + os=-sysv4
17705 + ;;
17706 + netbsd386)
17707 + basic_machine=i386-unknown
17708 + os=-netbsd
17709 + ;;
17710 + netwinder)
17711 + basic_machine=armv4l-rebel
17712 + os=-linux
17713 + ;;
17714 + news | news700 | news800 | news900)
17715 + basic_machine=m68k-sony
17716 + os=-newsos
17717 + ;;
17718 + news1000)
17719 + basic_machine=m68030-sony
17720 + os=-newsos
17721 + ;;
17722 + news-3600 | risc-news)
17723 + basic_machine=mips-sony
17724 + os=-newsos
17725 + ;;
17726 + necv70)
17727 + basic_machine=v70-nec
17728 + os=-sysv
17729 + ;;
17730 + next | m*-next )
17731 + basic_machine=m68k-next
17732 + case $os in
17733 + -nextstep* )
17734 + ;;
17735 + -ns2*)
17736 + os=-nextstep2
17737 + ;;
17738 + *)
17739 + os=-nextstep3
17740 + ;;
17741 + esac
17742 + ;;
17743 + nh3000)
17744 + basic_machine=m68k-harris
17745 + os=-cxux
17746 + ;;
17747 + nh[45]000)
17748 + basic_machine=m88k-harris
17749 + os=-cxux
17750 + ;;
17751 + nindy960)
17752 + basic_machine=i960-intel
17753 + os=-nindy
17754 + ;;
17755 + mon960)
17756 + basic_machine=i960-intel
17757 + os=-mon960
17758 + ;;
17759 + nonstopux)
17760 + basic_machine=mips-compaq
17761 + os=-nonstopux
17762 + ;;
17763 + np1)
17764 + basic_machine=np1-gould
17765 + ;;
17766 + neo-tandem)
17767 + basic_machine=neo-tandem
17768 + ;;
17769 + nse-tandem)
17770 + basic_machine=nse-tandem
17771 + ;;
17772 + nsr-tandem)
17773 + basic_machine=nsr-tandem
17774 + ;;
17775 + op50n-* | op60c-*)
17776 + basic_machine=hppa1.1-oki
17777 + os=-proelf
17778 + ;;
17779 + openrisc | openrisc-*)
17780 + basic_machine=or32-unknown
17781 + ;;
17782 + os400)
17783 + basic_machine=powerpc-ibm
17784 + os=-os400
17785 + ;;
17786 + OSE68000 | ose68000)
17787 + basic_machine=m68000-ericsson
17788 + os=-ose
17789 + ;;
17790 + os68k)
17791 + basic_machine=m68k-none
17792 + os=-os68k
17793 + ;;
17794 + pa-hitachi)
17795 + basic_machine=hppa1.1-hitachi
17796 + os=-hiuxwe2
17797 + ;;
17798 + paragon)
17799 + basic_machine=i860-intel
17800 + os=-osf
17801 + ;;
17802 + parisc)
17803 + basic_machine=hppa-unknown
17804 + os=-linux
17805 + ;;
17806 + parisc-*)
17807 + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
17808 + os=-linux
17809 + ;;
17810 + pbd)
17811 + basic_machine=sparc-tti
17812 + ;;
17813 + pbb)
17814 + basic_machine=m68k-tti
17815 + ;;
17816 + pc532 | pc532-*)
17817 + basic_machine=ns32k-pc532
17818 + ;;
17819 + pc98)
17820 + basic_machine=i386-pc
17821 + ;;
17822 + pc98-*)
17823 + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
17824 + ;;
17825 + pentium | p5 | k5 | k6 | nexgen | viac3)
17826 + basic_machine=i586-pc
17827 + ;;
17828 + pentiumpro | p6 | 6x86 | athlon | athlon_*)
17829 + basic_machine=i686-pc
17830 + ;;
17831 + pentiumii | pentium2 | pentiumiii | pentium3)
17832 + basic_machine=i686-pc
17833 + ;;
17834 + pentium4)
17835 + basic_machine=i786-pc
17836 + ;;
17837 + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
17838 + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
17839 + ;;
17840 + pentiumpro-* | p6-* | 6x86-* | athlon-*)
17841 + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
17842 + ;;
17843 + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
17844 + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
17845 + ;;
17846 + pentium4-*)
17847 + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
17848 + ;;
17849 + pn)
17850 + basic_machine=pn-gould
17851 + ;;
17852 + power) basic_machine=power-ibm
17853 + ;;
17854 + ppc | ppcbe) basic_machine=powerpc-unknown
17855 + ;;
17856 + ppc-* | ppcbe-*)
17857 + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
17858 + ;;
17859 + ppcle | powerpclittle | ppc-le | powerpc-little)
17860 + basic_machine=powerpcle-unknown
17861 + ;;
17862 + ppcle-* | powerpclittle-*)
17863 + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
17864 + ;;
17865 + ppc64) basic_machine=powerpc64-unknown
17866 + ;;
17867 + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
17868 + ;;
17869 + ppc64le | powerpc64little | ppc64-le | powerpc64-little)
17870 + basic_machine=powerpc64le-unknown
17871 + ;;
17872 + ppc64le-* | powerpc64little-*)
17873 + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
17874 + ;;
17875 + ps2)
17876 + basic_machine=i386-ibm
17877 + ;;
17878 + pw32)
17879 + basic_machine=i586-unknown
17880 + os=-pw32
17881 + ;;
17882 + rdos | rdos64)
17883 + basic_machine=x86_64-pc
17884 + os=-rdos
17885 + ;;
17886 + rdos32)
17887 + basic_machine=i386-pc
17888 + os=-rdos
17889 + ;;
17890 + rom68k)
17891 + basic_machine=m68k-rom68k
17892 + os=-coff
17893 + ;;
17894 + rm[46]00)
17895 + basic_machine=mips-siemens
17896 + ;;
17897 + rtpc | rtpc-*)
17898 + basic_machine=romp-ibm
17899 + ;;
17900 + s390 | s390-*)
17901 + basic_machine=s390-ibm
17902 + ;;
17903 + s390x | s390x-*)
17904 + basic_machine=s390x-ibm
17905 + ;;
17906 + sa29200)
17907 + basic_machine=a29k-amd
17908 + os=-udi
17909 + ;;
17910 + sb1)
17911 + basic_machine=mipsisa64sb1-unknown
17912 + ;;
17913 + sb1el)
17914 + basic_machine=mipsisa64sb1el-unknown
17915 + ;;
17916 + sde)
17917 + basic_machine=mipsisa32-sde
17918 + os=-elf
17919 + ;;
17920 + sei)
17921 + basic_machine=mips-sei
17922 + os=-seiux
17923 + ;;
17924 + sequent)
17925 + basic_machine=i386-sequent
17926 + ;;
17927 + sh)
17928 + basic_machine=sh-hitachi
17929 + os=-hms
17930 + ;;
17931 + sh5el)
17932 + basic_machine=sh5le-unknown
17933 + ;;
17934 + sh64)
17935 + basic_machine=sh64-unknown
17936 + ;;
17937 + sparclite-wrs | simso-wrs)
17938 + basic_machine=sparclite-wrs
17939 + os=-vxworks
17940 + ;;
17941 + sps7)
17942 + basic_machine=m68k-bull
17943 + os=-sysv2
17944 + ;;
17945 + spur)
17946 + basic_machine=spur-unknown
17947 + ;;
17948 + st2000)
17949 + basic_machine=m68k-tandem
17950 + ;;
17951 + stratus)
17952 + basic_machine=i860-stratus
17953 + os=-sysv4
17954 + ;;
17955 + strongarm-* | thumb-*)
17956 + basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
17957 + ;;
17958 + sun2)
17959 + basic_machine=m68000-sun
17960 + ;;
17961 + sun2os3)
17962 + basic_machine=m68000-sun
17963 + os=-sunos3
17964 + ;;
17965 + sun2os4)
17966 + basic_machine=m68000-sun
17967 + os=-sunos4
17968 + ;;
17969 + sun3os3)
17970 + basic_machine=m68k-sun
17971 + os=-sunos3
17972 + ;;
17973 + sun3os4)
17974 + basic_machine=m68k-sun
17975 + os=-sunos4
17976 + ;;
17977 + sun4os3)
17978 + basic_machine=sparc-sun
17979 + os=-sunos3
17980 + ;;
17981 + sun4os4)
17982 + basic_machine=sparc-sun
17983 + os=-sunos4
17984 + ;;
17985 + sun4sol2)
17986 + basic_machine=sparc-sun
17987 + os=-solaris2
17988 + ;;
17989 + sun3 | sun3-*)
17990 + basic_machine=m68k-sun
17991 + ;;
17992 + sun4)
17993 + basic_machine=sparc-sun
17994 + ;;
17995 + sun386 | sun386i | roadrunner)
17996 + basic_machine=i386-sun
17997 + ;;
17998 + sv1)
17999 + basic_machine=sv1-cray
18000 + os=-unicos
18001 + ;;
18002 + symmetry)
18003 + basic_machine=i386-sequent
18004 + os=-dynix
18005 + ;;
18006 + t3e)
18007 + basic_machine=alphaev5-cray
18008 + os=-unicos
18009 + ;;
18010 + t90)
18011 + basic_machine=t90-cray
18012 + os=-unicos
18013 + ;;
18014 + tile*)
18015 + basic_machine=$basic_machine-unknown
18016 + os=-linux-gnu
18017 + ;;
18018 + tx39)
18019 + basic_machine=mipstx39-unknown
18020 + ;;
18021 + tx39el)
18022 + basic_machine=mipstx39el-unknown
18023 + ;;
18024 + toad1)
18025 + basic_machine=pdp10-xkl
18026 + os=-tops20
18027 + ;;
18028 + tower | tower-32)
18029 + basic_machine=m68k-ncr
18030 + ;;
18031 + tpf)
18032 + basic_machine=s390x-ibm
18033 + os=-tpf
18034 + ;;
18035 + udi29k)
18036 + basic_machine=a29k-amd
18037 + os=-udi
18038 + ;;
18039 + ultra3)
18040 + basic_machine=a29k-nyu
18041 + os=-sym1
18042 + ;;
18043 + v810 | necv810)
18044 + basic_machine=v810-nec
18045 + os=-none
18046 + ;;
18047 + vaxv)
18048 + basic_machine=vax-dec
18049 + os=-sysv
18050 + ;;
18051 + vms)
18052 + basic_machine=vax-dec
18053 + os=-vms
18054 + ;;
18055 + vpp*|vx|vx-*)
18056 + basic_machine=f301-fujitsu
18057 + ;;
18058 + vxworks960)
18059 + basic_machine=i960-wrs
18060 + os=-vxworks
18061 + ;;
18062 + vxworks68)
18063 + basic_machine=m68k-wrs
18064 + os=-vxworks
18065 + ;;
18066 + vxworks29k)
18067 + basic_machine=a29k-wrs
18068 + os=-vxworks
18069 + ;;
18070 + w65*)
18071 + basic_machine=w65-wdc
18072 + os=-none
18073 + ;;
18074 + w89k-*)
18075 + basic_machine=hppa1.1-winbond
18076 + os=-proelf
18077 + ;;
18078 + xbox)
18079 + basic_machine=i686-pc
18080 + os=-mingw32
18081 + ;;
18082 + xps | xps100)
18083 + basic_machine=xps100-honeywell
18084 + ;;
18085 + xscale-* | xscalee[bl]-*)
18086 + basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
18087 + ;;
18088 + ymp)
18089 + basic_machine=ymp-cray
18090 + os=-unicos
18091 + ;;
18092 + z8k-*-coff)
18093 + basic_machine=z8k-unknown
18094 + os=-sim
18095 + ;;
18096 + z80-*-coff)
18097 + basic_machine=z80-unknown
18098 + os=-sim
18099 + ;;
18100 + none)
18101 + basic_machine=none-none
18102 + os=-none
18103 + ;;
18104 +
18105 +# Here we handle the default manufacturer of certain CPU types. It is in
18106 +# some cases the only manufacturer, in others, it is the most popular.
18107 + w89k)
18108 + basic_machine=hppa1.1-winbond
18109 + ;;
18110 + op50n)
18111 + basic_machine=hppa1.1-oki
18112 + ;;
18113 + op60c)
18114 + basic_machine=hppa1.1-oki
18115 + ;;
18116 + romp)
18117 + basic_machine=romp-ibm
18118 + ;;
18119 + mmix)
18120 + basic_machine=mmix-knuth
18121 + ;;
18122 + rs6000)
18123 + basic_machine=rs6000-ibm
18124 + ;;
18125 + vax)
18126 + basic_machine=vax-dec
18127 + ;;
18128 + pdp10)
18129 + # there are many clones, so DEC is not a safe bet
18130 + basic_machine=pdp10-unknown
18131 + ;;
18132 + pdp11)
18133 + basic_machine=pdp11-dec
18134 + ;;
18135 + we32k)
18136 + basic_machine=we32k-att
18137 + ;;
18138 + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
18139 + basic_machine=sh-unknown
18140 + ;;
18141 + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
18142 + basic_machine=sparc-sun
18143 + ;;
18144 + cydra)
18145 + basic_machine=cydra-cydrome
18146 + ;;
18147 + orion)
18148 + basic_machine=orion-highlevel
18149 + ;;
18150 + orion105)
18151 + basic_machine=clipper-highlevel
18152 + ;;
18153 + mac | mpw | mac-mpw)
18154 + basic_machine=m68k-apple
18155 + ;;
18156 + pmac | pmac-mpw)
18157 + basic_machine=powerpc-apple
18158 + ;;
18159 + *-unknown)
18160 + # Make sure to match an already-canonicalized machine name.
18161 + ;;
18162 + *)
18163 + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
18164 + exit 1
18165 + ;;
18166 +esac
18167 +
18168 +# Here we canonicalize certain aliases for manufacturers.
18169 +case $basic_machine in
18170 + *-digital*)
18171 + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
18172 + ;;
18173 + *-commodore*)
18174 + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
18175 + ;;
18176 + *)
18177 + ;;
18178 +esac
18179 +
18180 +# Decode manufacturer-specific aliases for certain operating systems.
18181 +
18182 +if [ x"$os" != x"" ]
18183 +then
18184 +case $os in
18185 + # First match some system type aliases
18186 + # that might get confused with valid system types.
18187 + # -solaris* is a basic system type, with this one exception.
18188 + -auroraux)
18189 + os=-auroraux
18190 + ;;
18191 + -solaris1 | -solaris1.*)
18192 + os=`echo $os | sed -e 's|solaris1|sunos4|'`
18193 + ;;
18194 + -solaris)
18195 + os=-solaris2
18196 + ;;
18197 + -svr4*)
18198 + os=-sysv4
18199 + ;;
18200 + -unixware*)
18201 + os=-sysv4.2uw
18202 + ;;
18203 + -gnu/linux*)
18204 + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
18205 + ;;
18206 + # First accept the basic system types.
18207 + # The portable systems comes first.
18208 + # Each alternative MUST END IN A *, to match a version number.
18209 + # -sysv* is not here because it comes later, after sysvr4.
18210 + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
18211 + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
18212 + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
18213 + | -sym* | -kopensolaris* | -plan9* \
18214 + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
18215 + | -aos* | -aros* \
18216 + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
18217 + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
18218 + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
18219 + | -bitrig* | -openbsd* | -solidbsd* \
18220 + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
18221 + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
18222 + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
18223 + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
18224 + | -chorusos* | -chorusrdb* | -cegcc* \
18225 + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
18226 + | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
18227 + | -linux-newlib* | -linux-musl* | -linux-uclibc* \
18228 + | -uxpv* | -beos* | -mpeix* | -udk* \
18229 + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
18230 + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
18231 + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
18232 + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
18233 + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
18234 + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
18235 + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
18236 + # Remember, each alternative MUST END IN *, to match a version number.
18237 + ;;
18238 + -qnx*)
18239 + case $basic_machine in
18240 + x86-* | i*86-*)
18241 + ;;
18242 + *)
18243 + os=-nto$os
18244 + ;;
18245 + esac
18246 + ;;
18247 + -nto-qnx*)
18248 + ;;
18249 + -nto*)
18250 + os=`echo $os | sed -e 's|nto|nto-qnx|'`
18251 + ;;
18252 + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
18253 + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
18254 + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
18255 + ;;
18256 + -mac*)
18257 + os=`echo $os | sed -e 's|mac|macos|'`
18258 + ;;
18259 + -linux-dietlibc)
18260 + os=-linux-dietlibc
18261 + ;;
18262 + -linux*)
18263 + os=`echo $os | sed -e 's|linux|linux-gnu|'`
18264 + ;;
18265 + -sunos5*)
18266 + os=`echo $os | sed -e 's|sunos5|solaris2|'`
18267 + ;;
18268 + -sunos6*)
18269 + os=`echo $os | sed -e 's|sunos6|solaris3|'`
18270 + ;;
18271 + -opened*)
18272 + os=-openedition
18273 + ;;
18274 + -os400*)
18275 + os=-os400
18276 + ;;
18277 + -wince*)
18278 + os=-wince
18279 + ;;
18280 + -osfrose*)
18281 + os=-osfrose
18282 + ;;
18283 + -osf*)
18284 + os=-osf
18285 + ;;
18286 + -utek*)
18287 + os=-bsd
18288 + ;;
18289 + -dynix*)
18290 + os=-bsd
18291 + ;;
18292 + -acis*)
18293 + os=-aos
18294 + ;;
18295 + -atheos*)
18296 + os=-atheos
18297 + ;;
18298 + -syllable*)
18299 + os=-syllable
18300 + ;;
18301 + -386bsd)
18302 + os=-bsd
18303 + ;;
18304 + -ctix* | -uts*)
18305 + os=-sysv
18306 + ;;
18307 + -nova*)
18308 + os=-rtmk-nova
18309 + ;;
18310 + -ns2 )
18311 + os=-nextstep2
18312 + ;;
18313 + -nsk*)
18314 + os=-nsk
18315 + ;;
18316 + # Preserve the version number of sinix5.
18317 + -sinix5.*)
18318 + os=`echo $os | sed -e 's|sinix|sysv|'`
18319 + ;;
18320 + -sinix*)
18321 + os=-sysv4
18322 + ;;
18323 + -tpf*)
18324 + os=-tpf
18325 + ;;
18326 + -triton*)
18327 + os=-sysv3
18328 + ;;
18329 + -oss*)
18330 + os=-sysv3
18331 + ;;
18332 + -svr4)
18333 + os=-sysv4
18334 + ;;
18335 + -svr3)
18336 + os=-sysv3
18337 + ;;
18338 + -sysvr4)
18339 + os=-sysv4
18340 + ;;
18341 + # This must come after -sysvr4.
18342 + -sysv*)
18343 + ;;
18344 + -ose*)
18345 + os=-ose
18346 + ;;
18347 + -es1800*)
18348 + os=-ose
18349 + ;;
18350 + -xenix)
18351 + os=-xenix
18352 + ;;
18353 + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
18354 + os=-mint
18355 + ;;
18356 + -aros*)
18357 + os=-aros
18358 + ;;
18359 + -zvmoe)
18360 + os=-zvmoe
18361 + ;;
18362 + -dicos*)
18363 + os=-dicos
18364 + ;;
18365 + -nacl*)
18366 + ;;
18367 + -none)
18368 + ;;
18369 + *)
18370 + # Get rid of the `-' at the beginning of $os.
18371 + os=`echo $os | sed 's/[^-]*-//'`
18372 + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
18373 + exit 1
18374 + ;;
18375 +esac
18376 +else
18377 +
18378 +# Here we handle the default operating systems that come with various machines.
18379 +# The value should be what the vendor currently ships out the door with their
18380 +# machine or put another way, the most popular os provided with the machine.
18381 +
18382 +# Note that if you're going to try to match "-MANUFACTURER" here (say,
18383 +# "-sun"), then you have to tell the case statement up towards the top
18384 +# that MANUFACTURER isn't an operating system. Otherwise, code above
18385 +# will signal an error saying that MANUFACTURER isn't an operating
18386 +# system, and we'll never get to this point.
18387 +
18388 +case $basic_machine in
18389 + score-*)
18390 + os=-elf
18391 + ;;
18392 + spu-*)
18393 + os=-elf
18394 + ;;
18395 + *-acorn)
18396 + os=-riscix1.2
18397 + ;;
18398 + arm*-rebel)
18399 + os=-linux
18400 + ;;
18401 + arm*-semi)
18402 + os=-aout
18403 + ;;
18404 + c4x-* | tic4x-*)
18405 + os=-coff
18406 + ;;
18407 + c8051-*)
18408 + os=-elf
18409 + ;;
18410 + hexagon-*)
18411 + os=-elf
18412 + ;;
18413 + tic54x-*)
18414 + os=-coff
18415 + ;;
18416 + tic55x-*)
18417 + os=-coff
18418 + ;;
18419 + tic6x-*)
18420 + os=-coff
18421 + ;;
18422 + # This must come before the *-dec entry.
18423 + pdp10-*)
18424 + os=-tops20
18425 + ;;
18426 + pdp11-*)
18427 + os=-none
18428 + ;;
18429 + *-dec | vax-*)
18430 + os=-ultrix4.2
18431 + ;;
18432 + m68*-apollo)
18433 + os=-domain
18434 + ;;
18435 + i386-sun)
18436 + os=-sunos4.0.2
18437 + ;;
18438 + m68000-sun)
18439 + os=-sunos3
18440 + ;;
18441 + m68*-cisco)
18442 + os=-aout
18443 + ;;
18444 + mep-*)
18445 + os=-elf
18446 + ;;
18447 + mips*-cisco)
18448 + os=-elf
18449 + ;;
18450 + mips*-*)
18451 + os=-elf
18452 + ;;
18453 + or1k-*)
18454 + os=-elf
18455 + ;;
18456 + or32-*)
18457 + os=-coff
18458 + ;;
18459 + *-tti) # must be before sparc entry or we get the wrong os.
18460 + os=-sysv3
18461 + ;;
18462 + sparc-* | *-sun)
18463 + os=-sunos4.1.1
18464 + ;;
18465 + *-be)
18466 + os=-beos
18467 + ;;
18468 + *-haiku)
18469 + os=-haiku
18470 + ;;
18471 + *-ibm)
18472 + os=-aix
18473 + ;;
18474 + *-knuth)
18475 + os=-mmixware
18476 + ;;
18477 + *-wec)
18478 + os=-proelf
18479 + ;;
18480 + *-winbond)
18481 + os=-proelf
18482 + ;;
18483 + *-oki)
18484 + os=-proelf
18485 + ;;
18486 + *-hp)
18487 + os=-hpux
18488 + ;;
18489 + *-hitachi)
18490 + os=-hiux
18491 + ;;
18492 + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
18493 + os=-sysv
18494 + ;;
18495 + *-cbm)
18496 + os=-amigaos
18497 + ;;
18498 + *-dg)
18499 + os=-dgux
18500 + ;;
18501 + *-dolphin)
18502 + os=-sysv3
18503 + ;;
18504 + m68k-ccur)
18505 + os=-rtu
18506 + ;;
18507 + m88k-omron*)
18508 + os=-luna
18509 + ;;
18510 + *-next )
18511 + os=-nextstep
18512 + ;;
18513 + *-sequent)
18514 + os=-ptx
18515 + ;;
18516 + *-crds)
18517 + os=-unos
18518 + ;;
18519 + *-ns)
18520 + os=-genix
18521 + ;;
18522 + i370-*)
18523 + os=-mvs
18524 + ;;
18525 + *-next)
18526 + os=-nextstep3
18527 + ;;
18528 + *-gould)
18529 + os=-sysv
18530 + ;;
18531 + *-highlevel)
18532 + os=-bsd
18533 + ;;
18534 + *-encore)
18535 + os=-bsd
18536 + ;;
18537 + *-sgi)
18538 + os=-irix
18539 + ;;
18540 + *-siemens)
18541 + os=-sysv4
18542 + ;;
18543 + *-masscomp)
18544 + os=-rtu
18545 + ;;
18546 + f30[01]-fujitsu | f700-fujitsu)
18547 + os=-uxpv
18548 + ;;
18549 + *-rom68k)
18550 + os=-coff
18551 + ;;
18552 + *-*bug)
18553 + os=-coff
18554 + ;;
18555 + *-apple)
18556 + os=-macos
18557 + ;;
18558 + *-atari*)
18559 + os=-mint
18560 + ;;
18561 + *)
18562 + os=-none
18563 + ;;
18564 +esac
18565 +fi
18566 +
18567 +# Here we handle the case where we know the os, and the CPU type, but not the
18568 +# manufacturer. We pick the logical manufacturer.
18569 +vendor=unknown
18570 +case $basic_machine in
18571 + *-unknown)
18572 + case $os in
18573 + -riscix*)
18574 + vendor=acorn
18575 + ;;
18576 + -sunos*)
18577 + vendor=sun
18578 + ;;
18579 + -cnk*|-aix*)
18580 + vendor=ibm
18581 + ;;
18582 + -beos*)
18583 + vendor=be
18584 + ;;
18585 + -hpux*)
18586 + vendor=hp
18587 + ;;
18588 + -mpeix*)
18589 + vendor=hp
18590 + ;;
18591 + -hiux*)
18592 + vendor=hitachi
18593 + ;;
18594 + -unos*)
18595 + vendor=crds
18596 + ;;
18597 + -dgux*)
18598 + vendor=dg
18599 + ;;
18600 + -luna*)
18601 + vendor=omron
18602 + ;;
18603 + -genix*)
18604 + vendor=ns
18605 + ;;
18606 + -mvs* | -opened*)
18607 + vendor=ibm
18608 + ;;
18609 + -os400*)
18610 + vendor=ibm
18611 + ;;
18612 + -ptx*)
18613 + vendor=sequent
18614 + ;;
18615 + -tpf*)
18616 + vendor=ibm
18617 + ;;
18618 + -vxsim* | -vxworks* | -windiss*)
18619 + vendor=wrs
18620 + ;;
18621 + -aux*)
18622 + vendor=apple
18623 + ;;
18624 + -hms*)
18625 + vendor=hitachi
18626 + ;;
18627 + -mpw* | -macos*)
18628 + vendor=apple
18629 + ;;
18630 + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
18631 + vendor=atari
18632 + ;;
18633 + -vos*)
18634 + vendor=stratus
18635 + ;;
18636 + esac
18637 + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
18638 + ;;
18639 +esac
18640 +
18641 +echo $basic_machine$os
18642 +exit
18643 +
18644 +# Local variables:
18645 +# eval: (add-hook 'write-file-hooks 'time-stamp)
18646 +# time-stamp-start: "timestamp='"
18647 +# time-stamp-format: "%:y-%02m-%02d"
18648 +# time-stamp-end: "'"
18649 +# End:
18650 --- /dev/null
18651 +++ b/aclocal.m4
18652 @@ -0,0 +1,1073 @@
18653 +# generated automatically by aclocal 1.13.3 -*- Autoconf -*-
18654 +
18655 +# Copyright (C) 1996-2013 Free Software Foundation, Inc.
18656 +
18657 +# This file is free software; the Free Software Foundation
18658 +# gives unlimited permission to copy and/or distribute it,
18659 +# with or without modifications, as long as this notice is preserved.
18660 +
18661 +# This program is distributed in the hope that it will be useful,
18662 +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
18663 +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
18664 +# PARTICULAR PURPOSE.
18665 +
18666 +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
18667 +m4_ifndef([AC_AUTOCONF_VERSION],
18668 + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
18669 +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
18670 +[m4_warning([this file was generated for autoconf 2.69.
18671 +You have another version of autoconf. It may work, but is not guaranteed to.
18672 +If you have problems, you may need to regenerate the build system entirely.
18673 +To do so, use the procedure documented by the package, typically 'autoreconf'.])])
18674 +
18675 +# Copyright (C) 2002-2013 Free Software Foundation, Inc.
18676 +#
18677 +# This file is free software; the Free Software Foundation
18678 +# gives unlimited permission to copy and/or distribute it,
18679 +# with or without modifications, as long as this notice is preserved.
18680 +
18681 +# AM_AUTOMAKE_VERSION(VERSION)
18682 +# ----------------------------
18683 +# Automake X.Y traces this macro to ensure aclocal.m4 has been
18684 +# generated from the m4 files accompanying Automake X.Y.
18685 +# (This private macro should not be called outside this file.)
18686 +AC_DEFUN([AM_AUTOMAKE_VERSION],
18687 +[am__api_version='1.13'
18688 +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
18689 +dnl require some minimum version. Point them to the right macro.
18690 +m4_if([$1], [1.13.3], [],
18691 + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
18692 +])
18693 +
18694 +# _AM_AUTOCONF_VERSION(VERSION)
18695 +# -----------------------------
18696 +# aclocal traces this macro to find the Autoconf version.
18697 +# This is a private macro too. Using m4_define simplifies
18698 +# the logic in aclocal, which can simply ignore this definition.
18699 +m4_define([_AM_AUTOCONF_VERSION], [])
18700 +
18701 +# AM_SET_CURRENT_AUTOMAKE_VERSION
18702 +# -------------------------------
18703 +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
18704 +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
18705 +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
18706 +[AM_AUTOMAKE_VERSION([1.13.3])dnl
18707 +m4_ifndef([AC_AUTOCONF_VERSION],
18708 + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
18709 +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
18710 +
18711 +# AM_AUX_DIR_EXPAND -*- Autoconf -*-
18712 +
18713 +# Copyright (C) 2001-2013 Free Software Foundation, Inc.
18714 +#
18715 +# This file is free software; the Free Software Foundation
18716 +# gives unlimited permission to copy and/or distribute it,
18717 +# with or without modifications, as long as this notice is preserved.
18718 +
18719 +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
18720 +# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
18721 +# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
18722 +#
18723 +# Of course, Automake must honor this variable whenever it calls a
18724 +# tool from the auxiliary directory. The problem is that $srcdir (and
18725 +# therefore $ac_aux_dir as well) can be either absolute or relative,
18726 +# depending on how configure is run. This is pretty annoying, since
18727 +# it makes $ac_aux_dir quite unusable in subdirectories: in the top
18728 +# source directory, any form will work fine, but in subdirectories a
18729 +# relative path needs to be adjusted first.
18730 +#
18731 +# $ac_aux_dir/missing
18732 +# fails when called from a subdirectory if $ac_aux_dir is relative
18733 +# $top_srcdir/$ac_aux_dir/missing
18734 +# fails if $ac_aux_dir is absolute,
18735 +# fails when called from a subdirectory in a VPATH build with
18736 +# a relative $ac_aux_dir
18737 +#
18738 +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
18739 +# are both prefixed by $srcdir. In an in-source build this is usually
18740 +# harmless because $srcdir is '.', but things will broke when you
18741 +# start a VPATH build or use an absolute $srcdir.
18742 +#
18743 +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
18744 +# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
18745 +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
18746 +# and then we would define $MISSING as
18747 +# MISSING="\${SHELL} $am_aux_dir/missing"
18748 +# This will work as long as MISSING is not called from configure, because
18749 +# unfortunately $(top_srcdir) has no meaning in configure.
18750 +# However there are other variables, like CC, which are often used in
18751 +# configure, and could therefore not use this "fixed" $ac_aux_dir.
18752 +#
18753 +# Another solution, used here, is to always expand $ac_aux_dir to an
18754 +# absolute PATH. The drawback is that using absolute paths prevent a
18755 +# configured tree to be moved without reconfiguration.
18756 +
18757 +AC_DEFUN([AM_AUX_DIR_EXPAND],
18758 +[dnl Rely on autoconf to set up CDPATH properly.
18759 +AC_PREREQ([2.50])dnl
18760 +# expand $ac_aux_dir to an absolute path
18761 +am_aux_dir=`cd $ac_aux_dir && pwd`
18762 +])
18763 +
18764 +# AM_CONDITIONAL -*- Autoconf -*-
18765 +
18766 +# Copyright (C) 1997-2013 Free Software Foundation, Inc.
18767 +#
18768 +# This file is free software; the Free Software Foundation
18769 +# gives unlimited permission to copy and/or distribute it,
18770 +# with or without modifications, as long as this notice is preserved.
18771 +
18772 +# AM_CONDITIONAL(NAME, SHELL-CONDITION)
18773 +# -------------------------------------
18774 +# Define a conditional.
18775 +AC_DEFUN([AM_CONDITIONAL],
18776 +[AC_PREREQ([2.52])dnl
18777 + m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
18778 + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
18779 +AC_SUBST([$1_TRUE])dnl
18780 +AC_SUBST([$1_FALSE])dnl
18781 +_AM_SUBST_NOTMAKE([$1_TRUE])dnl
18782 +_AM_SUBST_NOTMAKE([$1_FALSE])dnl
18783 +m4_define([_AM_COND_VALUE_$1], [$2])dnl
18784 +if $2; then
18785 + $1_TRUE=
18786 + $1_FALSE='#'
18787 +else
18788 + $1_TRUE='#'
18789 + $1_FALSE=
18790 +fi
18791 +AC_CONFIG_COMMANDS_PRE(
18792 +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
18793 + AC_MSG_ERROR([[conditional "$1" was never defined.
18794 +Usually this means the macro was only invoked conditionally.]])
18795 +fi])])
18796 +
18797 +# Copyright (C) 1999-2013 Free Software Foundation, Inc.
18798 +#
18799 +# This file is free software; the Free Software Foundation
18800 +# gives unlimited permission to copy and/or distribute it,
18801 +# with or without modifications, as long as this notice is preserved.
18802 +
18803 +
18804 +# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
18805 +# written in clear, in which case automake, when reading aclocal.m4,
18806 +# will think it sees a *use*, and therefore will trigger all it's
18807 +# C support machinery. Also note that it means that autoscan, seeing
18808 +# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
18809 +
18810 +
18811 +# _AM_DEPENDENCIES(NAME)
18812 +# ----------------------
18813 +# See how the compiler implements dependency checking.
18814 +# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
18815 +# We try a few techniques and use that to set a single cache variable.
18816 +#
18817 +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
18818 +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
18819 +# dependency, and given that the user is not expected to run this macro,
18820 +# just rely on AC_PROG_CC.
18821 +AC_DEFUN([_AM_DEPENDENCIES],
18822 +[AC_REQUIRE([AM_SET_DEPDIR])dnl
18823 +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
18824 +AC_REQUIRE([AM_MAKE_INCLUDE])dnl
18825 +AC_REQUIRE([AM_DEP_TRACK])dnl
18826 +
18827 +m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
18828 + [$1], [CXX], [depcc="$CXX" am_compiler_list=],
18829 + [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
18830 + [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
18831 + [$1], [UPC], [depcc="$UPC" am_compiler_list=],
18832 + [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
18833 + [depcc="$$1" am_compiler_list=])
18834 +
18835 +AC_CACHE_CHECK([dependency style of $depcc],
18836 + [am_cv_$1_dependencies_compiler_type],
18837 +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
18838 + # We make a subdir and do the tests there. Otherwise we can end up
18839 + # making bogus files that we don't know about and never remove. For
18840 + # instance it was reported that on HP-UX the gcc test will end up
18841 + # making a dummy file named 'D' -- because '-MD' means "put the output
18842 + # in D".
18843 + rm -rf conftest.dir
18844 + mkdir conftest.dir
18845 + # Copy depcomp to subdir because otherwise we won't find it if we're
18846 + # using a relative directory.
18847 + cp "$am_depcomp" conftest.dir
18848 + cd conftest.dir
18849 + # We will build objects and dependencies in a subdirectory because
18850 + # it helps to detect inapplicable dependency modes. For instance
18851 + # both Tru64's cc and ICC support -MD to output dependencies as a
18852 + # side effect of compilation, but ICC will put the dependencies in
18853 + # the current directory while Tru64 will put them in the object
18854 + # directory.
18855 + mkdir sub
18856 +
18857 + am_cv_$1_dependencies_compiler_type=none
18858 + if test "$am_compiler_list" = ""; then
18859 + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
18860 + fi
18861 + am__universal=false
18862 + m4_case([$1], [CC],
18863 + [case " $depcc " in #(
18864 + *\ -arch\ *\ -arch\ *) am__universal=true ;;
18865 + esac],
18866 + [CXX],
18867 + [case " $depcc " in #(
18868 + *\ -arch\ *\ -arch\ *) am__universal=true ;;
18869 + esac])
18870 +
18871 + for depmode in $am_compiler_list; do
18872 + # Setup a source with many dependencies, because some compilers
18873 + # like to wrap large dependency lists on column 80 (with \), and
18874 + # we should not choose a depcomp mode which is confused by this.
18875 + #
18876 + # We need to recreate these files for each test, as the compiler may
18877 + # overwrite some of them when testing with obscure command lines.
18878 + # This happens at least with the AIX C compiler.
18879 + : > sub/conftest.c
18880 + for i in 1 2 3 4 5 6; do
18881 + echo '#include "conftst'$i'.h"' >> sub/conftest.c
18882 + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
18883 + # Solaris 10 /bin/sh.
18884 + echo '/* dummy */' > sub/conftst$i.h
18885 + done
18886 + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
18887 +
18888 + # We check with '-c' and '-o' for the sake of the "dashmstdout"
18889 + # mode. It turns out that the SunPro C++ compiler does not properly
18890 + # handle '-M -o', and we need to detect this. Also, some Intel
18891 + # versions had trouble with output in subdirs.
18892 + am__obj=sub/conftest.${OBJEXT-o}
18893 + am__minus_obj="-o $am__obj"
18894 + case $depmode in
18895 + gcc)
18896 + # This depmode causes a compiler race in universal mode.
18897 + test "$am__universal" = false || continue
18898 + ;;
18899 + nosideeffect)
18900 + # After this tag, mechanisms are not by side-effect, so they'll
18901 + # only be used when explicitly requested.
18902 + if test "x$enable_dependency_tracking" = xyes; then
18903 + continue
18904 + else
18905 + break
18906 + fi
18907 + ;;
18908 + msvc7 | msvc7msys | msvisualcpp | msvcmsys)
18909 + # This compiler won't grok '-c -o', but also, the minuso test has
18910 + # not run yet. These depmodes are late enough in the game, and
18911 + # so weak that their functioning should not be impacted.
18912 + am__obj=conftest.${OBJEXT-o}
18913 + am__minus_obj=
18914 + ;;
18915 + none) break ;;
18916 + esac
18917 + if depmode=$depmode \
18918 + source=sub/conftest.c object=$am__obj \
18919 + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
18920 + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
18921 + >/dev/null 2>conftest.err &&
18922 + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
18923 + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
18924 + grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
18925 + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
18926 + # icc doesn't choke on unknown options, it will just issue warnings
18927 + # or remarks (even with -Werror). So we grep stderr for any message
18928 + # that says an option was ignored or not supported.
18929 + # When given -MP, icc 7.0 and 7.1 complain thusly:
18930 + # icc: Command line warning: ignoring option '-M'; no argument required
18931 + # The diagnosis changed in icc 8.0:
18932 + # icc: Command line remark: option '-MP' not supported
18933 + if (grep 'ignoring option' conftest.err ||
18934 + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
18935 + am_cv_$1_dependencies_compiler_type=$depmode
18936 + break
18937 + fi
18938 + fi
18939 + done
18940 +
18941 + cd ..
18942 + rm -rf conftest.dir
18943 +else
18944 + am_cv_$1_dependencies_compiler_type=none
18945 +fi
18946 +])
18947 +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
18948 +AM_CONDITIONAL([am__fastdep$1], [
18949 + test "x$enable_dependency_tracking" != xno \
18950 + && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
18951 +])
18952 +
18953 +
18954 +# AM_SET_DEPDIR
18955 +# -------------
18956 +# Choose a directory name for dependency files.
18957 +# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
18958 +AC_DEFUN([AM_SET_DEPDIR],
18959 +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
18960 +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
18961 +])
18962 +
18963 +
18964 +# AM_DEP_TRACK
18965 +# ------------
18966 +AC_DEFUN([AM_DEP_TRACK],
18967 +[AC_ARG_ENABLE([dependency-tracking], [dnl
18968 +AS_HELP_STRING(
18969 + [--enable-dependency-tracking],
18970 + [do not reject slow dependency extractors])
18971 +AS_HELP_STRING(
18972 + [--disable-dependency-tracking],
18973 + [speeds up one-time build])])
18974 +if test "x$enable_dependency_tracking" != xno; then
18975 + am_depcomp="$ac_aux_dir/depcomp"
18976 + AMDEPBACKSLASH='\'
18977 + am__nodep='_no'
18978 +fi
18979 +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
18980 +AC_SUBST([AMDEPBACKSLASH])dnl
18981 +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
18982 +AC_SUBST([am__nodep])dnl
18983 +_AM_SUBST_NOTMAKE([am__nodep])dnl
18984 +])
18985 +
18986 +# Generate code to set up dependency tracking. -*- Autoconf -*-
18987 +
18988 +# Copyright (C) 1999-2013 Free Software Foundation, Inc.
18989 +#
18990 +# This file is free software; the Free Software Foundation
18991 +# gives unlimited permission to copy and/or distribute it,
18992 +# with or without modifications, as long as this notice is preserved.
18993 +
18994 +
18995 +# _AM_OUTPUT_DEPENDENCY_COMMANDS
18996 +# ------------------------------
18997 +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
18998 +[{
18999 + # Older Autoconf quotes --file arguments for eval, but not when files
19000 + # are listed without --file. Let's play safe and only enable the eval
19001 + # if we detect the quoting.
19002 + case $CONFIG_FILES in
19003 + *\'*) eval set x "$CONFIG_FILES" ;;
19004 + *) set x $CONFIG_FILES ;;
19005 + esac
19006 + shift
19007 + for mf
19008 + do
19009 + # Strip MF so we end up with the name of the file.
19010 + mf=`echo "$mf" | sed -e 's/:.*$//'`
19011 + # Check whether this is an Automake generated Makefile or not.
19012 + # We used to match only the files named 'Makefile.in', but
19013 + # some people rename them; so instead we look at the file content.
19014 + # Grep'ing the first line is not enough: some people post-process
19015 + # each Makefile.in and add a new line on top of each file to say so.
19016 + # Grep'ing the whole file is not good either: AIX grep has a line
19017 + # limit of 2048, but all sed's we know have understand at least 4000.
19018 + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
19019 + dirpart=`AS_DIRNAME("$mf")`
19020 + else
19021 + continue
19022 + fi
19023 + # Extract the definition of DEPDIR, am__include, and am__quote
19024 + # from the Makefile without running 'make'.
19025 + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
19026 + test -z "$DEPDIR" && continue
19027 + am__include=`sed -n 's/^am__include = //p' < "$mf"`
19028 + test -z "$am__include" && continue
19029 + am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
19030 + # Find all dependency output files, they are included files with
19031 + # $(DEPDIR) in their names. We invoke sed twice because it is the
19032 + # simplest approach to changing $(DEPDIR) to its actual value in the
19033 + # expansion.
19034 + for file in `sed -n "
19035 + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
19036 + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
19037 + # Make sure the directory exists.
19038 + test -f "$dirpart/$file" && continue
19039 + fdir=`AS_DIRNAME(["$file"])`
19040 + AS_MKDIR_P([$dirpart/$fdir])
19041 + # echo "creating $dirpart/$file"
19042 + echo '# dummy' > "$dirpart/$file"
19043 + done
19044 + done
19045 +}
19046 +])# _AM_OUTPUT_DEPENDENCY_COMMANDS
19047 +
19048 +
19049 +# AM_OUTPUT_DEPENDENCY_COMMANDS
19050 +# -----------------------------
19051 +# This macro should only be invoked once -- use via AC_REQUIRE.
19052 +#
19053 +# This code is only required when automatic dependency tracking
19054 +# is enabled. FIXME. This creates each '.P' file that we will
19055 +# need in order to bootstrap the dependency handling code.
19056 +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
19057 +[AC_CONFIG_COMMANDS([depfiles],
19058 + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
19059 + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
19060 +])
19061 +
19062 +# Do all the work for Automake. -*- Autoconf -*-
19063 +
19064 +# Copyright (C) 1996-2013 Free Software Foundation, Inc.
19065 +#
19066 +# This file is free software; the Free Software Foundation
19067 +# gives unlimited permission to copy and/or distribute it,
19068 +# with or without modifications, as long as this notice is preserved.
19069 +
19070 +# This macro actually does too much. Some checks are only needed if
19071 +# your package does certain things. But this isn't really a big deal.
19072 +
19073 +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
19074 +# AM_INIT_AUTOMAKE([OPTIONS])
19075 +# -----------------------------------------------
19076 +# The call with PACKAGE and VERSION arguments is the old style
19077 +# call (pre autoconf-2.50), which is being phased out. PACKAGE
19078 +# and VERSION should now be passed to AC_INIT and removed from
19079 +# the call to AM_INIT_AUTOMAKE.
19080 +# We support both call styles for the transition. After
19081 +# the next Automake release, Autoconf can make the AC_INIT
19082 +# arguments mandatory, and then we can depend on a new Autoconf
19083 +# release and drop the old call support.
19084 +AC_DEFUN([AM_INIT_AUTOMAKE],
19085 +[AC_PREREQ([2.65])dnl
19086 +dnl Autoconf wants to disallow AM_ names. We explicitly allow
19087 +dnl the ones we care about.
19088 +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
19089 +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
19090 +AC_REQUIRE([AC_PROG_INSTALL])dnl
19091 +if test "`cd $srcdir && pwd`" != "`pwd`"; then
19092 + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
19093 + # is not polluted with repeated "-I."
19094 + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
19095 + # test to see if srcdir already configured
19096 + if test -f $srcdir/config.status; then
19097 + AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
19098 + fi
19099 +fi
19100 +
19101 +# test whether we have cygpath
19102 +if test -z "$CYGPATH_W"; then
19103 + if (cygpath --version) >/dev/null 2>/dev/null; then
19104 + CYGPATH_W='cygpath -w'
19105 + else
19106 + CYGPATH_W=echo
19107 + fi
19108 +fi
19109 +AC_SUBST([CYGPATH_W])
19110 +
19111 +# Define the identity of the package.
19112 +dnl Distinguish between old-style and new-style calls.
19113 +m4_ifval([$2],
19114 +[AC_DIAGNOSE([obsolete],
19115 + [$0: two- and three-arguments forms are deprecated.])
19116 +m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
19117 + AC_SUBST([PACKAGE], [$1])dnl
19118 + AC_SUBST([VERSION], [$2])],
19119 +[_AM_SET_OPTIONS([$1])dnl
19120 +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
19121 +m4_if(
19122 + m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
19123 + [ok:ok],,
19124 + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
19125 + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
19126 + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
19127 +
19128 +_AM_IF_OPTION([no-define],,
19129 +[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
19130 + AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
19131 +
19132 +# Some tools Automake needs.
19133 +AC_REQUIRE([AM_SANITY_CHECK])dnl
19134 +AC_REQUIRE([AC_ARG_PROGRAM])dnl
19135 +AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
19136 +AM_MISSING_PROG([AUTOCONF], [autoconf])
19137 +AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
19138 +AM_MISSING_PROG([AUTOHEADER], [autoheader])
19139 +AM_MISSING_PROG([MAKEINFO], [makeinfo])
19140 +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
19141 +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
19142 +AC_REQUIRE([AC_PROG_MKDIR_P])dnl
19143 +# For better backward compatibility. To be removed once Automake 1.9.x
19144 +# dies out for good. For more background, see:
19145 +# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
19146 +# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
19147 +AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
19148 +# We need awk for the "check" target. The system "awk" is bad on
19149 +# some platforms.
19150 +AC_REQUIRE([AC_PROG_AWK])dnl
19151 +AC_REQUIRE([AC_PROG_MAKE_SET])dnl
19152 +AC_REQUIRE([AM_SET_LEADING_DOT])dnl
19153 +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
19154 + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
19155 + [_AM_PROG_TAR([v7])])])
19156 +_AM_IF_OPTION([no-dependencies],,
19157 +[AC_PROVIDE_IFELSE([AC_PROG_CC],
19158 + [_AM_DEPENDENCIES([CC])],
19159 + [m4_define([AC_PROG_CC],
19160 + m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
19161 +AC_PROVIDE_IFELSE([AC_PROG_CXX],
19162 + [_AM_DEPENDENCIES([CXX])],
19163 + [m4_define([AC_PROG_CXX],
19164 + m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
19165 +AC_PROVIDE_IFELSE([AC_PROG_OBJC],
19166 + [_AM_DEPENDENCIES([OBJC])],
19167 + [m4_define([AC_PROG_OBJC],
19168 + m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
19169 +AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
19170 + [_AM_DEPENDENCIES([OBJCXX])],
19171 + [m4_define([AC_PROG_OBJCXX],
19172 + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
19173 +])
19174 +AC_REQUIRE([AM_SILENT_RULES])dnl
19175 +dnl The testsuite driver may need to know about EXEEXT, so add the
19176 +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
19177 +dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
19178 +AC_CONFIG_COMMANDS_PRE(dnl
19179 +[m4_provide_if([_AM_COMPILER_EXEEXT],
19180 + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
19181 +])
19182 +
19183 +dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
19184 +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
19185 +dnl mangled by Autoconf and run in a shell conditional statement.
19186 +m4_define([_AC_COMPILER_EXEEXT],
19187 +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
19188 +
19189 +
19190 +# When config.status generates a header, we must update the stamp-h file.
19191 +# This file resides in the same directory as the config header
19192 +# that is generated. The stamp files are numbered to have different names.
19193 +
19194 +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
19195 +# loop where config.status creates the headers, so we can generate
19196 +# our stamp files there.
19197 +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
19198 +[# Compute $1's index in $config_headers.
19199 +_am_arg=$1
19200 +_am_stamp_count=1
19201 +for _am_header in $config_headers :; do
19202 + case $_am_header in
19203 + $_am_arg | $_am_arg:* )
19204 + break ;;
19205 + * )
19206 + _am_stamp_count=`expr $_am_stamp_count + 1` ;;
19207 + esac
19208 +done
19209 +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
19210 +
19211 +# Copyright (C) 2001-2013 Free Software Foundation, Inc.
19212 +#
19213 +# This file is free software; the Free Software Foundation
19214 +# gives unlimited permission to copy and/or distribute it,
19215 +# with or without modifications, as long as this notice is preserved.
19216 +
19217 +# AM_PROG_INSTALL_SH
19218 +# ------------------
19219 +# Define $install_sh.
19220 +AC_DEFUN([AM_PROG_INSTALL_SH],
19221 +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
19222 +if test x"${install_sh}" != xset; then
19223 + case $am_aux_dir in
19224 + *\ * | *\ *)
19225 + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
19226 + *)
19227 + install_sh="\${SHELL} $am_aux_dir/install-sh"
19228 + esac
19229 +fi
19230 +AC_SUBST([install_sh])])
19231 +
19232 +# Copyright (C) 2003-2013 Free Software Foundation, Inc.
19233 +#
19234 +# This file is free software; the Free Software Foundation
19235 +# gives unlimited permission to copy and/or distribute it,
19236 +# with or without modifications, as long as this notice is preserved.
19237 +
19238 +# Check whether the underlying file-system supports filenames
19239 +# with a leading dot. For instance MS-DOS doesn't.
19240 +AC_DEFUN([AM_SET_LEADING_DOT],
19241 +[rm -rf .tst 2>/dev/null
19242 +mkdir .tst 2>/dev/null
19243 +if test -d .tst; then
19244 + am__leading_dot=.
19245 +else
19246 + am__leading_dot=_
19247 +fi
19248 +rmdir .tst 2>/dev/null
19249 +AC_SUBST([am__leading_dot])])
19250 +
19251 +# Check to see how 'make' treats includes. -*- Autoconf -*-
19252 +
19253 +# Copyright (C) 2001-2013 Free Software Foundation, Inc.
19254 +#
19255 +# This file is free software; the Free Software Foundation
19256 +# gives unlimited permission to copy and/or distribute it,
19257 +# with or without modifications, as long as this notice is preserved.
19258 +
19259 +# AM_MAKE_INCLUDE()
19260 +# -----------------
19261 +# Check to see how make treats includes.
19262 +AC_DEFUN([AM_MAKE_INCLUDE],
19263 +[am_make=${MAKE-make}
19264 +cat > confinc << 'END'
19265 +am__doit:
19266 + @echo this is the am__doit target
19267 +.PHONY: am__doit
19268 +END
19269 +# If we don't find an include directive, just comment out the code.
19270 +AC_MSG_CHECKING([for style of include used by $am_make])
19271 +am__include="#"
19272 +am__quote=
19273 +_am_result=none
19274 +# First try GNU make style include.
19275 +echo "include confinc" > confmf
19276 +# Ignore all kinds of additional output from 'make'.
19277 +case `$am_make -s -f confmf 2> /dev/null` in #(
19278 +*the\ am__doit\ target*)
19279 + am__include=include
19280 + am__quote=
19281 + _am_result=GNU
19282 + ;;
19283 +esac
19284 +# Now try BSD make style include.
19285 +if test "$am__include" = "#"; then
19286 + echo '.include "confinc"' > confmf
19287 + case `$am_make -s -f confmf 2> /dev/null` in #(
19288 + *the\ am__doit\ target*)
19289 + am__include=.include
19290 + am__quote="\""
19291 + _am_result=BSD
19292 + ;;
19293 + esac
19294 +fi
19295 +AC_SUBST([am__include])
19296 +AC_SUBST([am__quote])
19297 +AC_MSG_RESULT([$_am_result])
19298 +rm -f confinc confmf
19299 +])
19300 +
19301 +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
19302 +
19303 +# Copyright (C) 1997-2013 Free Software Foundation, Inc.
19304 +#
19305 +# This file is free software; the Free Software Foundation
19306 +# gives unlimited permission to copy and/or distribute it,
19307 +# with or without modifications, as long as this notice is preserved.
19308 +
19309 +# AM_MISSING_PROG(NAME, PROGRAM)
19310 +# ------------------------------
19311 +AC_DEFUN([AM_MISSING_PROG],
19312 +[AC_REQUIRE([AM_MISSING_HAS_RUN])
19313 +$1=${$1-"${am_missing_run}$2"}
19314 +AC_SUBST($1)])
19315 +
19316 +# AM_MISSING_HAS_RUN
19317 +# ------------------
19318 +# Define MISSING if not defined so far and test if it is modern enough.
19319 +# If it is, set am_missing_run to use it, otherwise, to nothing.
19320 +AC_DEFUN([AM_MISSING_HAS_RUN],
19321 +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
19322 +AC_REQUIRE_AUX_FILE([missing])dnl
19323 +if test x"${MISSING+set}" != xset; then
19324 + case $am_aux_dir in
19325 + *\ * | *\ *)
19326 + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
19327 + *)
19328 + MISSING="\${SHELL} $am_aux_dir/missing" ;;
19329 + esac
19330 +fi
19331 +# Use eval to expand $SHELL
19332 +if eval "$MISSING --is-lightweight"; then
19333 + am_missing_run="$MISSING "
19334 +else
19335 + am_missing_run=
19336 + AC_MSG_WARN(['missing' script is too old or missing])
19337 +fi
19338 +])
19339 +
19340 +# -*- Autoconf -*-
19341 +# Obsolete and "removed" macros, that must however still report explicit
19342 +# error messages when used, to smooth transition.
19343 +#
19344 +# Copyright (C) 1996-2013 Free Software Foundation, Inc.
19345 +#
19346 +# This file is free software; the Free Software Foundation
19347 +# gives unlimited permission to copy and/or distribute it,
19348 +# with or without modifications, as long as this notice is preserved.
19349 +
19350 +AC_DEFUN([AM_CONFIG_HEADER],
19351 +[AC_DIAGNOSE([obsolete],
19352 +['$0': this macro is obsolete.
19353 +You should use the 'AC][_CONFIG_HEADERS' macro instead.])dnl
19354 +AC_CONFIG_HEADERS($@)])
19355 +
19356 +AC_DEFUN([AM_PROG_CC_STDC],
19357 +[AC_PROG_CC
19358 +am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
19359 +AC_DIAGNOSE([obsolete],
19360 +['$0': this macro is obsolete.
19361 +You should simply use the 'AC][_PROG_CC' macro instead.
19362 +Also, your code should no longer depend upon 'am_cv_prog_cc_stdc',
19363 +but upon 'ac_cv_prog_cc_stdc'.])])
19364 +
19365 +AC_DEFUN([AM_C_PROTOTYPES],
19366 + [AC_FATAL([automatic de-ANSI-fication support has been removed])])
19367 +AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES])
19368 +
19369 +# Helper functions for option handling. -*- Autoconf -*-
19370 +
19371 +# Copyright (C) 2001-2013 Free Software Foundation, Inc.
19372 +#
19373 +# This file is free software; the Free Software Foundation
19374 +# gives unlimited permission to copy and/or distribute it,
19375 +# with or without modifications, as long as this notice is preserved.
19376 +
19377 +# _AM_MANGLE_OPTION(NAME)
19378 +# -----------------------
19379 +AC_DEFUN([_AM_MANGLE_OPTION],
19380 +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
19381 +
19382 +# _AM_SET_OPTION(NAME)
19383 +# --------------------
19384 +# Set option NAME. Presently that only means defining a flag for this option.
19385 +AC_DEFUN([_AM_SET_OPTION],
19386 +[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
19387 +
19388 +# _AM_SET_OPTIONS(OPTIONS)
19389 +# ------------------------
19390 +# OPTIONS is a space-separated list of Automake options.
19391 +AC_DEFUN([_AM_SET_OPTIONS],
19392 +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
19393 +
19394 +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
19395 +# -------------------------------------------
19396 +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
19397 +AC_DEFUN([_AM_IF_OPTION],
19398 +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
19399 +
19400 +# Check to make sure that the build environment is sane. -*- Autoconf -*-
19401 +
19402 +# Copyright (C) 1996-2013 Free Software Foundation, Inc.
19403 +#
19404 +# This file is free software; the Free Software Foundation
19405 +# gives unlimited permission to copy and/or distribute it,
19406 +# with or without modifications, as long as this notice is preserved.
19407 +
19408 +# AM_SANITY_CHECK
19409 +# ---------------
19410 +AC_DEFUN([AM_SANITY_CHECK],
19411 +[AC_MSG_CHECKING([whether build environment is sane])
19412 +# Reject unsafe characters in $srcdir or the absolute working directory
19413 +# name. Accept space and tab only in the latter.
19414 +am_lf='
19415 +'
19416 +case `pwd` in
19417 + *[[\\\"\#\$\&\'\`$am_lf]]*)
19418 + AC_MSG_ERROR([unsafe absolute working directory name]);;
19419 +esac
19420 +case $srcdir in
19421 + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
19422 + AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
19423 +esac
19424 +
19425 +# Do 'set' in a subshell so we don't clobber the current shell's
19426 +# arguments. Must try -L first in case configure is actually a
19427 +# symlink; some systems play weird games with the mod time of symlinks
19428 +# (eg FreeBSD returns the mod time of the symlink's containing
19429 +# directory).
19430 +if (
19431 + am_has_slept=no
19432 + for am_try in 1 2; do
19433 + echo "timestamp, slept: $am_has_slept" > conftest.file
19434 + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
19435 + if test "$[*]" = "X"; then
19436 + # -L didn't work.
19437 + set X `ls -t "$srcdir/configure" conftest.file`
19438 + fi
19439 + if test "$[*]" != "X $srcdir/configure conftest.file" \
19440 + && test "$[*]" != "X conftest.file $srcdir/configure"; then
19441 +
19442 + # If neither matched, then we have a broken ls. This can happen
19443 + # if, for instance, CONFIG_SHELL is bash and it inherits a
19444 + # broken ls alias from the environment. This has actually
19445 + # happened. Such a system could not be considered "sane".
19446 + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
19447 + alias in your environment])
19448 + fi
19449 + if test "$[2]" = conftest.file || test $am_try -eq 2; then
19450 + break
19451 + fi
19452 + # Just in case.
19453 + sleep 1
19454 + am_has_slept=yes
19455 + done
19456 + test "$[2]" = conftest.file
19457 + )
19458 +then
19459 + # Ok.
19460 + :
19461 +else
19462 + AC_MSG_ERROR([newly created file is older than distributed files!
19463 +Check your system clock])
19464 +fi
19465 +AC_MSG_RESULT([yes])
19466 +# If we didn't sleep, we still need to ensure time stamps of config.status and
19467 +# generated files are strictly newer.
19468 +am_sleep_pid=
19469 +if grep 'slept: no' conftest.file >/dev/null 2>&1; then
19470 + ( sleep 1 ) &
19471 + am_sleep_pid=$!
19472 +fi
19473 +AC_CONFIG_COMMANDS_PRE(
19474 + [AC_MSG_CHECKING([that generated files are newer than configure])
19475 + if test -n "$am_sleep_pid"; then
19476 + # Hide warnings about reused PIDs.
19477 + wait $am_sleep_pid 2>/dev/null
19478 + fi
19479 + AC_MSG_RESULT([done])])
19480 +rm -f conftest.file
19481 +])
19482 +
19483 +# Copyright (C) 2009-2013 Free Software Foundation, Inc.
19484 +#
19485 +# This file is free software; the Free Software Foundation
19486 +# gives unlimited permission to copy and/or distribute it,
19487 +# with or without modifications, as long as this notice is preserved.
19488 +
19489 +# AM_SILENT_RULES([DEFAULT])
19490 +# --------------------------
19491 +# Enable less verbose build rules; with the default set to DEFAULT
19492 +# ("yes" being less verbose, "no" or empty being verbose).
19493 +AC_DEFUN([AM_SILENT_RULES],
19494 +[AC_ARG_ENABLE([silent-rules], [dnl
19495 +AS_HELP_STRING(
19496 + [--enable-silent-rules],
19497 + [less verbose build output (undo: "make V=1")])
19498 +AS_HELP_STRING(
19499 + [--disable-silent-rules],
19500 + [verbose build output (undo: "make V=0")])dnl
19501 +])
19502 +case $enable_silent_rules in @%:@ (((
19503 + yes) AM_DEFAULT_VERBOSITY=0;;
19504 + no) AM_DEFAULT_VERBOSITY=1;;
19505 + *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
19506 +esac
19507 +dnl
19508 +dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
19509 +dnl do not support nested variable expansions.
19510 +dnl See automake bug#9928 and bug#10237.
19511 +am_make=${MAKE-make}
19512 +AC_CACHE_CHECK([whether $am_make supports nested variables],
19513 + [am_cv_make_support_nested_variables],
19514 + [if AS_ECHO([['TRUE=$(BAR$(V))
19515 +BAR0=false
19516 +BAR1=true
19517 +V=1
19518 +am__doit:
19519 + @$(TRUE)
19520 +.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
19521 + am_cv_make_support_nested_variables=yes
19522 +else
19523 + am_cv_make_support_nested_variables=no
19524 +fi])
19525 +if test $am_cv_make_support_nested_variables = yes; then
19526 + dnl Using '$V' instead of '$(V)' breaks IRIX make.
19527 + AM_V='$(V)'
19528 + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
19529 +else
19530 + AM_V=$AM_DEFAULT_VERBOSITY
19531 + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
19532 +fi
19533 +AC_SUBST([AM_V])dnl
19534 +AM_SUBST_NOTMAKE([AM_V])dnl
19535 +AC_SUBST([AM_DEFAULT_V])dnl
19536 +AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
19537 +AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
19538 +AM_BACKSLASH='\'
19539 +AC_SUBST([AM_BACKSLASH])dnl
19540 +_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
19541 +])
19542 +
19543 +# Copyright (C) 2001-2013 Free Software Foundation, Inc.
19544 +#
19545 +# This file is free software; the Free Software Foundation
19546 +# gives unlimited permission to copy and/or distribute it,
19547 +# with or without modifications, as long as this notice is preserved.
19548 +
19549 +# AM_PROG_INSTALL_STRIP
19550 +# ---------------------
19551 +# One issue with vendor 'install' (even GNU) is that you can't
19552 +# specify the program used to strip binaries. This is especially
19553 +# annoying in cross-compiling environments, where the build's strip
19554 +# is unlikely to handle the host's binaries.
19555 +# Fortunately install-sh will honor a STRIPPROG variable, so we
19556 +# always use install-sh in "make install-strip", and initialize
19557 +# STRIPPROG with the value of the STRIP variable (set by the user).
19558 +AC_DEFUN([AM_PROG_INSTALL_STRIP],
19559 +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
19560 +# Installed binaries are usually stripped using 'strip' when the user
19561 +# run "make install-strip". However 'strip' might not be the right
19562 +# tool to use in cross-compilation environments, therefore Automake
19563 +# will honor the 'STRIP' environment variable to overrule this program.
19564 +dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
19565 +if test "$cross_compiling" != no; then
19566 + AC_CHECK_TOOL([STRIP], [strip], :)
19567 +fi
19568 +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
19569 +AC_SUBST([INSTALL_STRIP_PROGRAM])])
19570 +
19571 +# Copyright (C) 2006-2013 Free Software Foundation, Inc.
19572 +#
19573 +# This file is free software; the Free Software Foundation
19574 +# gives unlimited permission to copy and/or distribute it,
19575 +# with or without modifications, as long as this notice is preserved.
19576 +
19577 +# _AM_SUBST_NOTMAKE(VARIABLE)
19578 +# ---------------------------
19579 +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
19580 +# This macro is traced by Automake.
19581 +AC_DEFUN([_AM_SUBST_NOTMAKE])
19582 +
19583 +# AM_SUBST_NOTMAKE(VARIABLE)
19584 +# --------------------------
19585 +# Public sister of _AM_SUBST_NOTMAKE.
19586 +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
19587 +
19588 +# Check how to create a tarball. -*- Autoconf -*-
19589 +
19590 +# Copyright (C) 2004-2013 Free Software Foundation, Inc.
19591 +#
19592 +# This file is free software; the Free Software Foundation
19593 +# gives unlimited permission to copy and/or distribute it,
19594 +# with or without modifications, as long as this notice is preserved.
19595 +
19596 +# _AM_PROG_TAR(FORMAT)
19597 +# --------------------
19598 +# Check how to create a tarball in format FORMAT.
19599 +# FORMAT should be one of 'v7', 'ustar', or 'pax'.
19600 +#
19601 +# Substitute a variable $(am__tar) that is a command
19602 +# writing to stdout a FORMAT-tarball containing the directory
19603 +# $tardir.
19604 +# tardir=directory && $(am__tar) > result.tar
19605 +#
19606 +# Substitute a variable $(am__untar) that extract such
19607 +# a tarball read from stdin.
19608 +# $(am__untar) < result.tar
19609 +#
19610 +AC_DEFUN([_AM_PROG_TAR],
19611 +[# Always define AMTAR for backward compatibility. Yes, it's still used
19612 +# in the wild :-( We should find a proper way to deprecate it ...
19613 +AC_SUBST([AMTAR], ['$${TAR-tar}'])
19614 +
19615 +# We'll loop over all known methods to create a tar archive until one works.
19616 +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
19617 +
19618 +m4_if([$1], [v7],
19619 + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
19620 +
19621 + [m4_case([$1],
19622 + [ustar],
19623 + [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
19624 + # There is notably a 21 bits limit for the UID and the GID. In fact,
19625 + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
19626 + # and bug#13588).
19627 + am_max_uid=2097151 # 2^21 - 1
19628 + am_max_gid=$am_max_uid
19629 + # The $UID and $GID variables are not portable, so we need to resort
19630 + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
19631 + # below are definitely unexpected, so allow the users to see them
19632 + # (that is, avoid stderr redirection).
19633 + am_uid=`id -u || echo unknown`
19634 + am_gid=`id -g || echo unknown`
19635 + AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
19636 + if test $am_uid -le $am_max_uid; then
19637 + AC_MSG_RESULT([yes])
19638 + else
19639 + AC_MSG_RESULT([no])
19640 + _am_tools=none
19641 + fi
19642 + AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
19643 + if test $am_gid -le $am_max_gid; then
19644 + AC_MSG_RESULT([yes])
19645 + else
19646 + AC_MSG_RESULT([no])
19647 + _am_tools=none
19648 + fi],
19649 +
19650 + [pax],
19651 + [],
19652 +
19653 + [m4_fatal([Unknown tar format])])
19654 +
19655 + AC_MSG_CHECKING([how to create a $1 tar archive])
19656 +
19657 + # Go ahead even if we have the value already cached. We do so because we
19658 + # need to set the values for the 'am__tar' and 'am__untar' variables.
19659 + _am_tools=${am_cv_prog_tar_$1-$_am_tools}
19660 +
19661 + for _am_tool in $_am_tools; do
19662 + case $_am_tool in
19663 + gnutar)
19664 + for _am_tar in tar gnutar gtar; do
19665 + AM_RUN_LOG([$_am_tar --version]) && break
19666 + done
19667 + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
19668 + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
19669 + am__untar="$_am_tar -xf -"
19670 + ;;
19671 + plaintar)
19672 + # Must skip GNU tar: if it does not support --format= it doesn't create
19673 + # ustar tarball either.
19674 + (tar --version) >/dev/null 2>&1 && continue
19675 + am__tar='tar chf - "$$tardir"'
19676 + am__tar_='tar chf - "$tardir"'
19677 + am__untar='tar xf -'
19678 + ;;
19679 + pax)
19680 + am__tar='pax -L -x $1 -w "$$tardir"'
19681 + am__tar_='pax -L -x $1 -w "$tardir"'
19682 + am__untar='pax -r'
19683 + ;;
19684 + cpio)
19685 + am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
19686 + am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
19687 + am__untar='cpio -i -H $1 -d'
19688 + ;;
19689 + none)
19690 + am__tar=false
19691 + am__tar_=false
19692 + am__untar=false
19693 + ;;
19694 + esac
19695 +
19696 + # If the value was cached, stop now. We just wanted to have am__tar
19697 + # and am__untar set.
19698 + test -n "${am_cv_prog_tar_$1}" && break
19699 +
19700 + # tar/untar a dummy directory, and stop if the command works.
19701 + rm -rf conftest.dir
19702 + mkdir conftest.dir
19703 + echo GrepMe > conftest.dir/file
19704 + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
19705 + rm -rf conftest.dir
19706 + if test -s conftest.tar; then
19707 + AM_RUN_LOG([$am__untar <conftest.tar])
19708 + AM_RUN_LOG([cat conftest.dir/file])
19709 + grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
19710 + fi
19711 + done
19712 + rm -rf conftest.dir
19713 +
19714 + AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
19715 + AC_MSG_RESULT([$am_cv_prog_tar_$1])])
19716 +
19717 +AC_SUBST([am__tar])
19718 +AC_SUBST([am__untar])
19719 +]) # _AM_PROG_TAR
19720 +
19721 +m4_include([m4/libtool.m4])
19722 +m4_include([m4/ltoptions.m4])
19723 +m4_include([m4/ltsugar.m4])
19724 +m4_include([m4/ltversion.m4])
19725 +m4_include([m4/lt~obsolete.m4])
19726 --- /dev/null
19727 +++ b/missing
19728 @@ -0,0 +1,215 @@
19729 +#! /bin/sh
19730 +# Common wrapper for a few potentially missing GNU programs.
19731 +
19732 +scriptversion=2012-06-26.16; # UTC
19733 +
19734 +# Copyright (C) 1996-2013 Free Software Foundation, Inc.
19735 +# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
19736 +
19737 +# This program is free software; you can redistribute it and/or modify
19738 +# it under the terms of the GNU General Public License as published by
19739 +# the Free Software Foundation; either version 2, or (at your option)
19740 +# any later version.
19741 +
19742 +# This program is distributed in the hope that it will be useful,
19743 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
19744 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19745 +# GNU General Public License for more details.
19746 +
19747 +# You should have received a copy of the GNU General Public License
19748 +# along with this program. If not, see <http://www.gnu.org/licenses/>.
19749 +
19750 +# As a special exception to the GNU General Public License, if you
19751 +# distribute this file as part of a program that contains a
19752 +# configuration script generated by Autoconf, you may include it under
19753 +# the same distribution terms that you use for the rest of that program.
19754 +
19755 +if test $# -eq 0; then
19756 + echo 1>&2 "Try '$0 --help' for more information"
19757 + exit 1
19758 +fi
19759 +
19760 +case $1 in
19761 +
19762 + --is-lightweight)
19763 + # Used by our autoconf macros to check whether the available missing
19764 + # script is modern enough.
19765 + exit 0
19766 + ;;
19767 +
19768 + --run)
19769 + # Back-compat with the calling convention used by older automake.
19770 + shift
19771 + ;;
19772 +
19773 + -h|--h|--he|--hel|--help)
19774 + echo "\
19775 +$0 [OPTION]... PROGRAM [ARGUMENT]...
19776 +
19777 +Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
19778 +to PROGRAM being missing or too old.
19779 +
19780 +Options:
19781 + -h, --help display this help and exit
19782 + -v, --version output version information and exit
19783 +
19784 +Supported PROGRAM values:
19785 + aclocal autoconf autoheader autom4te automake makeinfo
19786 + bison yacc flex lex help2man
19787 +
19788 +Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
19789 +'g' are ignored when checking the name.
19790 +
19791 +Send bug reports to <bug-automake@gnu.org>."
19792 + exit $?
19793 + ;;
19794 +
19795 + -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
19796 + echo "missing $scriptversion (GNU Automake)"
19797 + exit $?
19798 + ;;
19799 +
19800 + -*)
19801 + echo 1>&2 "$0: unknown '$1' option"
19802 + echo 1>&2 "Try '$0 --help' for more information"
19803 + exit 1
19804 + ;;
19805 +
19806 +esac
19807 +
19808 +# Run the given program, remember its exit status.
19809 +"$@"; st=$?
19810 +
19811 +# If it succeeded, we are done.
19812 +test $st -eq 0 && exit 0
19813 +
19814 +# Also exit now if we it failed (or wasn't found), and '--version' was
19815 +# passed; such an option is passed most likely to detect whether the
19816 +# program is present and works.
19817 +case $2 in --version|--help) exit $st;; esac
19818 +
19819 +# Exit code 63 means version mismatch. This often happens when the user
19820 +# tries to use an ancient version of a tool on a file that requires a
19821 +# minimum version.
19822 +if test $st -eq 63; then
19823 + msg="probably too old"
19824 +elif test $st -eq 127; then
19825 + # Program was missing.
19826 + msg="missing on your system"
19827 +else
19828 + # Program was found and executed, but failed. Give up.
19829 + exit $st
19830 +fi
19831 +
19832 +perl_URL=http://www.perl.org/
19833 +flex_URL=http://flex.sourceforge.net/
19834 +gnu_software_URL=http://www.gnu.org/software
19835 +
19836 +program_details ()
19837 +{
19838 + case $1 in
19839 + aclocal|automake)
19840 + echo "The '$1' program is part of the GNU Automake package:"
19841 + echo "<$gnu_software_URL/automake>"
19842 + echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
19843 + echo "<$gnu_software_URL/autoconf>"
19844 + echo "<$gnu_software_URL/m4/>"
19845 + echo "<$perl_URL>"
19846 + ;;
19847 + autoconf|autom4te|autoheader)
19848 + echo "The '$1' program is part of the GNU Autoconf package:"
19849 + echo "<$gnu_software_URL/autoconf/>"
19850 + echo "It also requires GNU m4 and Perl in order to run:"
19851 + echo "<$gnu_software_URL/m4/>"
19852 + echo "<$perl_URL>"
19853 + ;;
19854 + esac
19855 +}
19856 +
19857 +give_advice ()
19858 +{
19859 + # Normalize program name to check for.
19860 + normalized_program=`echo "$1" | sed '
19861 + s/^gnu-//; t
19862 + s/^gnu//; t
19863 + s/^g//; t'`
19864 +
19865 + printf '%s\n' "'$1' is $msg."
19866 +
19867 + configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
19868 + case $normalized_program in
19869 + autoconf*)
19870 + echo "You should only need it if you modified 'configure.ac',"
19871 + echo "or m4 files included by it."
19872 + program_details 'autoconf'
19873 + ;;
19874 + autoheader*)
19875 + echo "You should only need it if you modified 'acconfig.h' or"
19876 + echo "$configure_deps."
19877 + program_details 'autoheader'
19878 + ;;
19879 + automake*)
19880 + echo "You should only need it if you modified 'Makefile.am' or"
19881 + echo "$configure_deps."
19882 + program_details 'automake'
19883 + ;;
19884 + aclocal*)
19885 + echo "You should only need it if you modified 'acinclude.m4' or"
19886 + echo "$configure_deps."
19887 + program_details 'aclocal'
19888 + ;;
19889 + autom4te*)
19890 + echo "You might have modified some maintainer files that require"
19891 + echo "the 'automa4te' program to be rebuilt."
19892 + program_details 'autom4te'
19893 + ;;
19894 + bison*|yacc*)
19895 + echo "You should only need it if you modified a '.y' file."
19896 + echo "You may want to install the GNU Bison package:"
19897 + echo "<$gnu_software_URL/bison/>"
19898 + ;;
19899 + lex*|flex*)
19900 + echo "You should only need it if you modified a '.l' file."
19901 + echo "You may want to install the Fast Lexical Analyzer package:"
19902 + echo "<$flex_URL>"
19903 + ;;
19904 + help2man*)
19905 + echo "You should only need it if you modified a dependency" \
19906 + "of a man page."
19907 + echo "You may want to install the GNU Help2man package:"
19908 + echo "<$gnu_software_URL/help2man/>"
19909 + ;;
19910 + makeinfo*)
19911 + echo "You should only need it if you modified a '.texi' file, or"
19912 + echo "any other file indirectly affecting the aspect of the manual."
19913 + echo "You might want to install the Texinfo package:"
19914 + echo "<$gnu_software_URL/texinfo/>"
19915 + echo "The spurious makeinfo call might also be the consequence of"
19916 + echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
19917 + echo "want to install GNU make:"
19918 + echo "<$gnu_software_URL/make/>"
19919 + ;;
19920 + *)
19921 + echo "You might have modified some files without having the proper"
19922 + echo "tools for further handling them. Check the 'README' file, it"
19923 + echo "often tells you about the needed prerequisites for installing"
19924 + echo "this package. You may also peek at any GNU archive site, in"
19925 + echo "case some other package contains this missing '$1' program."
19926 + ;;
19927 + esac
19928 +}
19929 +
19930 +give_advice "$1" | sed -e '1s/^/WARNING: /' \
19931 + -e '2,$s/^/ /' >&2
19932 +
19933 +# Propagate the correct exit status (expected to be 127 for a program
19934 +# not found, 63 for a program that failed due to version mismatch).
19935 +exit $st
19936 +
19937 +# Local variables:
19938 +# eval: (add-hook 'write-file-hooks 'time-stamp)
19939 +# time-stamp-start: "scriptversion="
19940 +# time-stamp-format: "%:y-%02m-%02d.%02H"
19941 +# time-stamp-time-zone: "UTC"
19942 +# time-stamp-end: "; # UTC"
19943 +# End:
19944 --- /dev/null
19945 +++ b/depcomp
19946 @@ -0,0 +1,791 @@
19947 +#! /bin/sh
19948 +# depcomp - compile a program generating dependencies as side-effects
19949 +
19950 +scriptversion=2013-05-30.07; # UTC
19951 +
19952 +# Copyright (C) 1999-2013 Free Software Foundation, Inc.
19953 +
19954 +# This program is free software; you can redistribute it and/or modify
19955 +# it under the terms of the GNU General Public License as published by
19956 +# the Free Software Foundation; either version 2, or (at your option)
19957 +# any later version.
19958 +
19959 +# This program is distributed in the hope that it will be useful,
19960 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
19961 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19962 +# GNU General Public License for more details.
19963 +
19964 +# You should have received a copy of the GNU General Public License
19965 +# along with this program. If not, see <http://www.gnu.org/licenses/>.
19966 +
19967 +# As a special exception to the GNU General Public License, if you
19968 +# distribute this file as part of a program that contains a
19969 +# configuration script generated by Autoconf, you may include it under
19970 +# the same distribution terms that you use for the rest of that program.
19971 +
19972 +# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
19973 +
19974 +case $1 in
19975 + '')
19976 + echo "$0: No command. Try '$0 --help' for more information." 1>&2
19977 + exit 1;
19978 + ;;
19979 + -h | --h*)
19980 + cat <<\EOF
19981 +Usage: depcomp [--help] [--version] PROGRAM [ARGS]
19982 +
19983 +Run PROGRAMS ARGS to compile a file, generating dependencies
19984 +as side-effects.
19985 +
19986 +Environment variables:
19987 + depmode Dependency tracking mode.
19988 + source Source file read by 'PROGRAMS ARGS'.
19989 + object Object file output by 'PROGRAMS ARGS'.
19990 + DEPDIR directory where to store dependencies.
19991 + depfile Dependency file to output.
19992 + tmpdepfile Temporary file to use when outputting dependencies.
19993 + libtool Whether libtool is used (yes/no).
19994 +
19995 +Report bugs to <bug-automake@gnu.org>.
19996 +EOF
19997 + exit $?
19998 + ;;
19999 + -v | --v*)
20000 + echo "depcomp $scriptversion"
20001 + exit $?
20002 + ;;
20003 +esac
20004 +
20005 +# Get the directory component of the given path, and save it in the
20006 +# global variables '$dir'. Note that this directory component will
20007 +# be either empty or ending with a '/' character. This is deliberate.
20008 +set_dir_from ()
20009 +{
20010 + case $1 in
20011 + */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
20012 + *) dir=;;
20013 + esac
20014 +}
20015 +
20016 +# Get the suffix-stripped basename of the given path, and save it the
20017 +# global variable '$base'.
20018 +set_base_from ()
20019 +{
20020 + base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
20021 +}
20022 +
20023 +# If no dependency file was actually created by the compiler invocation,
20024 +# we still have to create a dummy depfile, to avoid errors with the
20025 +# Makefile "include basename.Plo" scheme.
20026 +make_dummy_depfile ()
20027 +{
20028 + echo "#dummy" > "$depfile"
20029 +}
20030 +
20031 +# Factor out some common post-processing of the generated depfile.
20032 +# Requires the auxiliary global variable '$tmpdepfile' to be set.
20033 +aix_post_process_depfile ()
20034 +{
20035 + # If the compiler actually managed to produce a dependency file,
20036 + # post-process it.
20037 + if test -f "$tmpdepfile"; then
20038 + # Each line is of the form 'foo.o: dependency.h'.
20039 + # Do two passes, one to just change these to
20040 + # $object: dependency.h
20041 + # and one to simply output
20042 + # dependency.h:
20043 + # which is needed to avoid the deleted-header problem.
20044 + { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
20045 + sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
20046 + } > "$depfile"
20047 + rm -f "$tmpdepfile"
20048 + else
20049 + make_dummy_depfile
20050 + fi
20051 +}
20052 +
20053 +# A tabulation character.
20054 +tab=' '
20055 +# A newline character.
20056 +nl='
20057 +'
20058 +# Character ranges might be problematic outside the C locale.
20059 +# These definitions help.
20060 +upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
20061 +lower=abcdefghijklmnopqrstuvwxyz
20062 +digits=0123456789
20063 +alpha=${upper}${lower}
20064 +
20065 +if test -z "$depmode" || test -z "$source" || test -z "$object"; then
20066 + echo "depcomp: Variables source, object and depmode must be set" 1>&2
20067 + exit 1
20068 +fi
20069 +
20070 +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
20071 +depfile=${depfile-`echo "$object" |
20072 + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
20073 +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
20074 +
20075 +rm -f "$tmpdepfile"
20076 +
20077 +# Avoid interferences from the environment.
20078 +gccflag= dashmflag=
20079 +
20080 +# Some modes work just like other modes, but use different flags. We
20081 +# parameterize here, but still list the modes in the big case below,
20082 +# to make depend.m4 easier to write. Note that we *cannot* use a case
20083 +# here, because this file can only contain one case statement.
20084 +if test "$depmode" = hp; then
20085 + # HP compiler uses -M and no extra arg.
20086 + gccflag=-M
20087 + depmode=gcc
20088 +fi
20089 +
20090 +if test "$depmode" = dashXmstdout; then
20091 + # This is just like dashmstdout with a different argument.
20092 + dashmflag=-xM
20093 + depmode=dashmstdout
20094 +fi
20095 +
20096 +cygpath_u="cygpath -u -f -"
20097 +if test "$depmode" = msvcmsys; then
20098 + # This is just like msvisualcpp but w/o cygpath translation.
20099 + # Just convert the backslash-escaped backslashes to single forward
20100 + # slashes to satisfy depend.m4
20101 + cygpath_u='sed s,\\\\,/,g'
20102 + depmode=msvisualcpp
20103 +fi
20104 +
20105 +if test "$depmode" = msvc7msys; then
20106 + # This is just like msvc7 but w/o cygpath translation.
20107 + # Just convert the backslash-escaped backslashes to single forward
20108 + # slashes to satisfy depend.m4
20109 + cygpath_u='sed s,\\\\,/,g'
20110 + depmode=msvc7
20111 +fi
20112 +
20113 +if test "$depmode" = xlc; then
20114 + # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
20115 + gccflag=-qmakedep=gcc,-MF
20116 + depmode=gcc
20117 +fi
20118 +
20119 +case "$depmode" in
20120 +gcc3)
20121 +## gcc 3 implements dependency tracking that does exactly what
20122 +## we want. Yay! Note: for some reason libtool 1.4 doesn't like
20123 +## it if -MD -MP comes after the -MF stuff. Hmm.
20124 +## Unfortunately, FreeBSD c89 acceptance of flags depends upon
20125 +## the command line argument order; so add the flags where they
20126 +## appear in depend2.am. Note that the slowdown incurred here
20127 +## affects only configure: in makefiles, %FASTDEP% shortcuts this.
20128 + for arg
20129 + do
20130 + case $arg in
20131 + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
20132 + *) set fnord "$@" "$arg" ;;
20133 + esac
20134 + shift # fnord
20135 + shift # $arg
20136 + done
20137 + "$@"
20138 + stat=$?
20139 + if test $stat -ne 0; then
20140 + rm -f "$tmpdepfile"
20141 + exit $stat
20142 + fi
20143 + mv "$tmpdepfile" "$depfile"
20144 + ;;
20145 +
20146 +gcc)
20147 +## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
20148 +## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
20149 +## (see the conditional assignment to $gccflag above).
20150 +## There are various ways to get dependency output from gcc. Here's
20151 +## why we pick this rather obscure method:
20152 +## - Don't want to use -MD because we'd like the dependencies to end
20153 +## up in a subdir. Having to rename by hand is ugly.
20154 +## (We might end up doing this anyway to support other compilers.)
20155 +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
20156 +## -MM, not -M (despite what the docs say). Also, it might not be
20157 +## supported by the other compilers which use the 'gcc' depmode.
20158 +## - Using -M directly means running the compiler twice (even worse
20159 +## than renaming).
20160 + if test -z "$gccflag"; then
20161 + gccflag=-MD,
20162 + fi
20163 + "$@" -Wp,"$gccflag$tmpdepfile"
20164 + stat=$?
20165 + if test $stat -ne 0; then
20166 + rm -f "$tmpdepfile"
20167 + exit $stat
20168 + fi
20169 + rm -f "$depfile"
20170 + echo "$object : \\" > "$depfile"
20171 + # The second -e expression handles DOS-style file names with drive
20172 + # letters.
20173 + sed -e 's/^[^:]*: / /' \
20174 + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
20175 +## This next piece of magic avoids the "deleted header file" problem.
20176 +## The problem is that when a header file which appears in a .P file
20177 +## is deleted, the dependency causes make to die (because there is
20178 +## typically no way to rebuild the header). We avoid this by adding
20179 +## dummy dependencies for each header file. Too bad gcc doesn't do
20180 +## this for us directly.
20181 +## Some versions of gcc put a space before the ':'. On the theory
20182 +## that the space means something, we add a space to the output as
20183 +## well. hp depmode also adds that space, but also prefixes the VPATH
20184 +## to the object. Take care to not repeat it in the output.
20185 +## Some versions of the HPUX 10.20 sed can't process this invocation
20186 +## correctly. Breaking it into two sed invocations is a workaround.
20187 + tr ' ' "$nl" < "$tmpdepfile" \
20188 + | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
20189 + | sed -e 's/$/ :/' >> "$depfile"
20190 + rm -f "$tmpdepfile"
20191 + ;;
20192 +
20193 +hp)
20194 + # This case exists only to let depend.m4 do its work. It works by
20195 + # looking at the text of this script. This case will never be run,
20196 + # since it is checked for above.
20197 + exit 1
20198 + ;;
20199 +
20200 +sgi)
20201 + if test "$libtool" = yes; then
20202 + "$@" "-Wp,-MDupdate,$tmpdepfile"
20203 + else
20204 + "$@" -MDupdate "$tmpdepfile"
20205 + fi
20206 + stat=$?
20207 + if test $stat -ne 0; then
20208 + rm -f "$tmpdepfile"
20209 + exit $stat
20210 + fi
20211 + rm -f "$depfile"
20212 +
20213 + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
20214 + echo "$object : \\" > "$depfile"
20215 + # Clip off the initial element (the dependent). Don't try to be
20216 + # clever and replace this with sed code, as IRIX sed won't handle
20217 + # lines with more than a fixed number of characters (4096 in
20218 + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
20219 + # the IRIX cc adds comments like '#:fec' to the end of the
20220 + # dependency line.
20221 + tr ' ' "$nl" < "$tmpdepfile" \
20222 + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
20223 + | tr "$nl" ' ' >> "$depfile"
20224 + echo >> "$depfile"
20225 + # The second pass generates a dummy entry for each header file.
20226 + tr ' ' "$nl" < "$tmpdepfile" \
20227 + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
20228 + >> "$depfile"
20229 + else
20230 + make_dummy_depfile
20231 + fi
20232 + rm -f "$tmpdepfile"
20233 + ;;
20234 +
20235 +xlc)
20236 + # This case exists only to let depend.m4 do its work. It works by
20237 + # looking at the text of this script. This case will never be run,
20238 + # since it is checked for above.
20239 + exit 1
20240 + ;;
20241 +
20242 +aix)
20243 + # The C for AIX Compiler uses -M and outputs the dependencies
20244 + # in a .u file. In older versions, this file always lives in the
20245 + # current directory. Also, the AIX compiler puts '$object:' at the
20246 + # start of each line; $object doesn't have directory information.
20247 + # Version 6 uses the directory in both cases.
20248 + set_dir_from "$object"
20249 + set_base_from "$object"
20250 + if test "$libtool" = yes; then
20251 + tmpdepfile1=$dir$base.u
20252 + tmpdepfile2=$base.u
20253 + tmpdepfile3=$dir.libs/$base.u
20254 + "$@" -Wc,-M
20255 + else
20256 + tmpdepfile1=$dir$base.u
20257 + tmpdepfile2=$dir$base.u
20258 + tmpdepfile3=$dir$base.u
20259 + "$@" -M
20260 + fi
20261 + stat=$?
20262 + if test $stat -ne 0; then
20263 + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
20264 + exit $stat
20265 + fi
20266 +
20267 + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
20268 + do
20269 + test -f "$tmpdepfile" && break
20270 + done
20271 + aix_post_process_depfile
20272 + ;;
20273 +
20274 +tcc)
20275 + # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
20276 + # FIXME: That version still under development at the moment of writing.
20277 + # Make that this statement remains true also for stable, released
20278 + # versions.
20279 + # It will wrap lines (doesn't matter whether long or short) with a
20280 + # trailing '\', as in:
20281 + #
20282 + # foo.o : \
20283 + # foo.c \
20284 + # foo.h \
20285 + #
20286 + # It will put a trailing '\' even on the last line, and will use leading
20287 + # spaces rather than leading tabs (at least since its commit 0394caf7
20288 + # "Emit spaces for -MD").
20289 + "$@" -MD -MF "$tmpdepfile"
20290 + stat=$?
20291 + if test $stat -ne 0; then
20292 + rm -f "$tmpdepfile"
20293 + exit $stat
20294 + fi
20295 + rm -f "$depfile"
20296 + # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
20297 + # We have to change lines of the first kind to '$object: \'.
20298 + sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
20299 + # And for each line of the second kind, we have to emit a 'dep.h:'
20300 + # dummy dependency, to avoid the deleted-header problem.
20301 + sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
20302 + rm -f "$tmpdepfile"
20303 + ;;
20304 +
20305 +## The order of this option in the case statement is important, since the
20306 +## shell code in configure will try each of these formats in the order
20307 +## listed in this file. A plain '-MD' option would be understood by many
20308 +## compilers, so we must ensure this comes after the gcc and icc options.
20309 +pgcc)
20310 + # Portland's C compiler understands '-MD'.
20311 + # Will always output deps to 'file.d' where file is the root name of the
20312 + # source file under compilation, even if file resides in a subdirectory.
20313 + # The object file name does not affect the name of the '.d' file.
20314 + # pgcc 10.2 will output
20315 + # foo.o: sub/foo.c sub/foo.h
20316 + # and will wrap long lines using '\' :
20317 + # foo.o: sub/foo.c ... \
20318 + # sub/foo.h ... \
20319 + # ...
20320 + set_dir_from "$object"
20321 + # Use the source, not the object, to determine the base name, since
20322 + # that's sadly what pgcc will do too.
20323 + set_base_from "$source"
20324 + tmpdepfile=$base.d
20325 +
20326 + # For projects that build the same source file twice into different object
20327 + # files, the pgcc approach of using the *source* file root name can cause
20328 + # problems in parallel builds. Use a locking strategy to avoid stomping on
20329 + # the same $tmpdepfile.
20330 + lockdir=$base.d-lock
20331 + trap "
20332 + echo '$0: caught signal, cleaning up...' >&2
20333 + rmdir '$lockdir'
20334 + exit 1
20335 + " 1 2 13 15
20336 + numtries=100
20337 + i=$numtries
20338 + while test $i -gt 0; do
20339 + # mkdir is a portable test-and-set.
20340 + if mkdir "$lockdir" 2>/dev/null; then
20341 + # This process acquired the lock.
20342 + "$@" -MD
20343 + stat=$?
20344 + # Release the lock.
20345 + rmdir "$lockdir"
20346 + break
20347 + else
20348 + # If the lock is being held by a different process, wait
20349 + # until the winning process is done or we timeout.
20350 + while test -d "$lockdir" && test $i -gt 0; do
20351 + sleep 1
20352 + i=`expr $i - 1`
20353 + done
20354 + fi
20355 + i=`expr $i - 1`
20356 + done
20357 + trap - 1 2 13 15
20358 + if test $i -le 0; then
20359 + echo "$0: failed to acquire lock after $numtries attempts" >&2
20360 + echo "$0: check lockdir '$lockdir'" >&2
20361 + exit 1
20362 + fi
20363 +
20364 + if test $stat -ne 0; then
20365 + rm -f "$tmpdepfile"
20366 + exit $stat
20367 + fi
20368 + rm -f "$depfile"
20369 + # Each line is of the form `foo.o: dependent.h',
20370 + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
20371 + # Do two passes, one to just change these to
20372 + # `$object: dependent.h' and one to simply `dependent.h:'.
20373 + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
20374 + # Some versions of the HPUX 10.20 sed can't process this invocation
20375 + # correctly. Breaking it into two sed invocations is a workaround.
20376 + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
20377 + | sed -e 's/$/ :/' >> "$depfile"
20378 + rm -f "$tmpdepfile"
20379 + ;;
20380 +
20381 +hp2)
20382 + # The "hp" stanza above does not work with aCC (C++) and HP's ia64
20383 + # compilers, which have integrated preprocessors. The correct option
20384 + # to use with these is +Maked; it writes dependencies to a file named
20385 + # 'foo.d', which lands next to the object file, wherever that
20386 + # happens to be.
20387 + # Much of this is similar to the tru64 case; see comments there.
20388 + set_dir_from "$object"
20389 + set_base_from "$object"
20390 + if test "$libtool" = yes; then
20391 + tmpdepfile1=$dir$base.d
20392 + tmpdepfile2=$dir.libs/$base.d
20393 + "$@" -Wc,+Maked
20394 + else
20395 + tmpdepfile1=$dir$base.d
20396 + tmpdepfile2=$dir$base.d
20397 + "$@" +Maked
20398 + fi
20399 + stat=$?
20400 + if test $stat -ne 0; then
20401 + rm -f "$tmpdepfile1" "$tmpdepfile2"
20402 + exit $stat
20403 + fi
20404 +
20405 + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
20406 + do
20407 + test -f "$tmpdepfile" && break
20408 + done
20409 + if test -f "$tmpdepfile"; then
20410 + sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
20411 + # Add 'dependent.h:' lines.
20412 + sed -ne '2,${
20413 + s/^ *//
20414 + s/ \\*$//
20415 + s/$/:/
20416 + p
20417 + }' "$tmpdepfile" >> "$depfile"
20418 + else
20419 + make_dummy_depfile
20420 + fi
20421 + rm -f "$tmpdepfile" "$tmpdepfile2"
20422 + ;;
20423 +
20424 +tru64)
20425 + # The Tru64 compiler uses -MD to generate dependencies as a side
20426 + # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
20427 + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
20428 + # dependencies in 'foo.d' instead, so we check for that too.
20429 + # Subdirectories are respected.
20430 + set_dir_from "$object"
20431 + set_base_from "$object"
20432 +
20433 + if test "$libtool" = yes; then
20434 + # Libtool generates 2 separate objects for the 2 libraries. These
20435 + # two compilations output dependencies in $dir.libs/$base.o.d and
20436 + # in $dir$base.o.d. We have to check for both files, because
20437 + # one of the two compilations can be disabled. We should prefer
20438 + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
20439 + # automatically cleaned when .libs/ is deleted, while ignoring
20440 + # the former would cause a distcleancheck panic.
20441 + tmpdepfile1=$dir$base.o.d # libtool 1.5
20442 + tmpdepfile2=$dir.libs/$base.o.d # Likewise.
20443 + tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
20444 + "$@" -Wc,-MD
20445 + else
20446 + tmpdepfile1=$dir$base.d
20447 + tmpdepfile2=$dir$base.d
20448 + tmpdepfile3=$dir$base.d
20449 + "$@" -MD
20450 + fi
20451 +
20452 + stat=$?
20453 + if test $stat -ne 0; then
20454 + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
20455 + exit $stat
20456 + fi
20457 +
20458 + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
20459 + do
20460 + test -f "$tmpdepfile" && break
20461 + done
20462 + # Same post-processing that is required for AIX mode.
20463 + aix_post_process_depfile
20464 + ;;
20465 +
20466 +msvc7)
20467 + if test "$libtool" = yes; then
20468 + showIncludes=-Wc,-showIncludes
20469 + else
20470 + showIncludes=-showIncludes
20471 + fi
20472 + "$@" $showIncludes > "$tmpdepfile"
20473 + stat=$?
20474 + grep -v '^Note: including file: ' "$tmpdepfile"
20475 + if test $stat -ne 0; then
20476 + rm -f "$tmpdepfile"
20477 + exit $stat
20478 + fi
20479 + rm -f "$depfile"
20480 + echo "$object : \\" > "$depfile"
20481 + # The first sed program below extracts the file names and escapes
20482 + # backslashes for cygpath. The second sed program outputs the file
20483 + # name when reading, but also accumulates all include files in the
20484 + # hold buffer in order to output them again at the end. This only
20485 + # works with sed implementations that can handle large buffers.
20486 + sed < "$tmpdepfile" -n '
20487 +/^Note: including file: *\(.*\)/ {
20488 + s//\1/
20489 + s/\\/\\\\/g
20490 + p
20491 +}' | $cygpath_u | sort -u | sed -n '
20492 +s/ /\\ /g
20493 +s/\(.*\)/'"$tab"'\1 \\/p
20494 +s/.\(.*\) \\/\1:/
20495 +H
20496 +$ {
20497 + s/.*/'"$tab"'/
20498 + G
20499 + p
20500 +}' >> "$depfile"
20501 + echo >> "$depfile" # make sure the fragment doesn't end with a backslash
20502 + rm -f "$tmpdepfile"
20503 + ;;
20504 +
20505 +msvc7msys)
20506 + # This case exists only to let depend.m4 do its work. It works by
20507 + # looking at the text of this script. This case will never be run,
20508 + # since it is checked for above.
20509 + exit 1
20510 + ;;
20511 +
20512 +#nosideeffect)
20513 + # This comment above is used by automake to tell side-effect
20514 + # dependency tracking mechanisms from slower ones.
20515 +
20516 +dashmstdout)
20517 + # Important note: in order to support this mode, a compiler *must*
20518 + # always write the preprocessed file to stdout, regardless of -o.
20519 + "$@" || exit $?
20520 +
20521 + # Remove the call to Libtool.
20522 + if test "$libtool" = yes; then
20523 + while test "X$1" != 'X--mode=compile'; do
20524 + shift
20525 + done
20526 + shift
20527 + fi
20528 +
20529 + # Remove '-o $object'.
20530 + IFS=" "
20531 + for arg
20532 + do
20533 + case $arg in
20534 + -o)
20535 + shift
20536 + ;;
20537 + $object)
20538 + shift
20539 + ;;
20540 + *)
20541 + set fnord "$@" "$arg"
20542 + shift # fnord
20543 + shift # $arg
20544 + ;;
20545 + esac
20546 + done
20547 +
20548 + test -z "$dashmflag" && dashmflag=-M
20549 + # Require at least two characters before searching for ':'
20550 + # in the target name. This is to cope with DOS-style filenames:
20551 + # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
20552 + "$@" $dashmflag |
20553 + sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
20554 + rm -f "$depfile"
20555 + cat < "$tmpdepfile" > "$depfile"
20556 + # Some versions of the HPUX 10.20 sed can't process this sed invocation
20557 + # correctly. Breaking it into two sed invocations is a workaround.
20558 + tr ' ' "$nl" < "$tmpdepfile" \
20559 + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
20560 + | sed -e 's/$/ :/' >> "$depfile"
20561 + rm -f "$tmpdepfile"
20562 + ;;
20563 +
20564 +dashXmstdout)
20565 + # This case only exists to satisfy depend.m4. It is never actually
20566 + # run, as this mode is specially recognized in the preamble.
20567 + exit 1
20568 + ;;
20569 +
20570 +makedepend)
20571 + "$@" || exit $?
20572 + # Remove any Libtool call
20573 + if test "$libtool" = yes; then
20574 + while test "X$1" != 'X--mode=compile'; do
20575 + shift
20576 + done
20577 + shift
20578 + fi
20579 + # X makedepend
20580 + shift
20581 + cleared=no eat=no
20582 + for arg
20583 + do
20584 + case $cleared in
20585 + no)
20586 + set ""; shift
20587 + cleared=yes ;;
20588 + esac
20589 + if test $eat = yes; then
20590 + eat=no
20591 + continue
20592 + fi
20593 + case "$arg" in
20594 + -D*|-I*)
20595 + set fnord "$@" "$arg"; shift ;;
20596 + # Strip any option that makedepend may not understand. Remove
20597 + # the object too, otherwise makedepend will parse it as a source file.
20598 + -arch)
20599 + eat=yes ;;
20600 + -*|$object)
20601 + ;;
20602 + *)
20603 + set fnord "$@" "$arg"; shift ;;
20604 + esac
20605 + done
20606 + obj_suffix=`echo "$object" | sed 's/^.*\././'`
20607 + touch "$tmpdepfile"
20608 + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
20609 + rm -f "$depfile"
20610 + # makedepend may prepend the VPATH from the source file name to the object.
20611 + # No need to regex-escape $object, excess matching of '.' is harmless.
20612 + sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
20613 + # Some versions of the HPUX 10.20 sed can't process the last invocation
20614 + # correctly. Breaking it into two sed invocations is a workaround.
20615 + sed '1,2d' "$tmpdepfile" \
20616 + | tr ' ' "$nl" \
20617 + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
20618 + | sed -e 's/$/ :/' >> "$depfile"
20619 + rm -f "$tmpdepfile" "$tmpdepfile".bak
20620 + ;;
20621 +
20622 +cpp)
20623 + # Important note: in order to support this mode, a compiler *must*
20624 + # always write the preprocessed file to stdout.
20625 + "$@" || exit $?
20626 +
20627 + # Remove the call to Libtool.
20628 + if test "$libtool" = yes; then
20629 + while test "X$1" != 'X--mode=compile'; do
20630 + shift
20631 + done
20632 + shift
20633 + fi
20634 +
20635 + # Remove '-o $object'.
20636 + IFS=" "
20637 + for arg
20638 + do
20639 + case $arg in
20640 + -o)
20641 + shift
20642 + ;;
20643 + $object)
20644 + shift
20645 + ;;
20646 + *)
20647 + set fnord "$@" "$arg"
20648 + shift # fnord
20649 + shift # $arg
20650 + ;;
20651 + esac
20652 + done
20653 +
20654 + "$@" -E \
20655 + | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
20656 + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
20657 + | sed '$ s: \\$::' > "$tmpdepfile"
20658 + rm -f "$depfile"
20659 + echo "$object : \\" > "$depfile"
20660 + cat < "$tmpdepfile" >> "$depfile"
20661 + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
20662 + rm -f "$tmpdepfile"
20663 + ;;
20664 +
20665 +msvisualcpp)
20666 + # Important note: in order to support this mode, a compiler *must*
20667 + # always write the preprocessed file to stdout.
20668 + "$@" || exit $?
20669 +
20670 + # Remove the call to Libtool.
20671 + if test "$libtool" = yes; then
20672 + while test "X$1" != 'X--mode=compile'; do
20673 + shift
20674 + done
20675 + shift
20676 + fi
20677 +
20678 + IFS=" "
20679 + for arg
20680 + do
20681 + case "$arg" in
20682 + -o)
20683 + shift
20684 + ;;
20685 + $object)
20686 + shift
20687 + ;;
20688 + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
20689 + set fnord "$@"
20690 + shift
20691 + shift
20692 + ;;
20693 + *)
20694 + set fnord "$@" "$arg"
20695 + shift
20696 + shift
20697 + ;;
20698 + esac
20699 + done
20700 + "$@" -E 2>/dev/null |
20701 + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
20702 + rm -f "$depfile"
20703 + echo "$object : \\" > "$depfile"
20704 + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
20705 + echo "$tab" >> "$depfile"
20706 + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
20707 + rm -f "$tmpdepfile"
20708 + ;;
20709 +
20710 +msvcmsys)
20711 + # This case exists only to let depend.m4 do its work. It works by
20712 + # looking at the text of this script. This case will never be run,
20713 + # since it is checked for above.
20714 + exit 1
20715 + ;;
20716 +
20717 +none)
20718 + exec "$@"
20719 + ;;
20720 +
20721 +*)
20722 + echo "Unknown depmode $depmode" 1>&2
20723 + exit 1
20724 + ;;
20725 +esac
20726 +
20727 +exit 0
20728 +
20729 +# Local Variables:
20730 +# mode: shell-script
20731 +# sh-indentation: 2
20732 +# eval: (add-hook 'write-file-hooks 'time-stamp)
20733 +# time-stamp-start: "scriptversion="
20734 +# time-stamp-format: "%:y-%02m-%02d.%02H"
20735 +# time-stamp-time-zone: "UTC"
20736 +# time-stamp-end: "; # UTC"
20737 +# End:
20738 --- /dev/null
20739 +++ b/install-sh
20740 @@ -0,0 +1,527 @@
20741 +#!/bin/sh
20742 +# install - install a program, script, or datafile
20743 +
20744 +scriptversion=2011-11-20.07; # UTC
20745 +
20746 +# This originates from X11R5 (mit/util/scripts/install.sh), which was
20747 +# later released in X11R6 (xc/config/util/install.sh) with the
20748 +# following copyright and license.
20749 +#
20750 +# Copyright (C) 1994 X Consortium
20751 +#
20752 +# Permission is hereby granted, free of charge, to any person obtaining a copy
20753 +# of this software and associated documentation files (the "Software"), to
20754 +# deal in the Software without restriction, including without limitation the
20755 +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
20756 +# sell copies of the Software, and to permit persons to whom the Software is
20757 +# furnished to do so, subject to the following conditions:
20758 +#
20759 +# The above copyright notice and this permission notice shall be included in
20760 +# all copies or substantial portions of the Software.
20761 +#
20762 +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20763 +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20764 +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20765 +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
20766 +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
20767 +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20768 +#
20769 +# Except as contained in this notice, the name of the X Consortium shall not
20770 +# be used in advertising or otherwise to promote the sale, use or other deal-
20771 +# ings in this Software without prior written authorization from the X Consor-
20772 +# tium.
20773 +#
20774 +#
20775 +# FSF changes to this file are in the public domain.
20776 +#
20777 +# Calling this script install-sh is preferred over install.sh, to prevent
20778 +# 'make' implicit rules from creating a file called install from it
20779 +# when there is no Makefile.
20780 +#
20781 +# This script is compatible with the BSD install script, but was written
20782 +# from scratch.
20783 +
20784 +nl='
20785 +'
20786 +IFS=" "" $nl"
20787 +
20788 +# set DOITPROG to echo to test this script
20789 +
20790 +# Don't use :- since 4.3BSD and earlier shells don't like it.
20791 +doit=${DOITPROG-}
20792 +if test -z "$doit"; then
20793 + doit_exec=exec
20794 +else
20795 + doit_exec=$doit
20796 +fi
20797 +
20798 +# Put in absolute file names if you don't have them in your path;
20799 +# or use environment vars.
20800 +
20801 +chgrpprog=${CHGRPPROG-chgrp}
20802 +chmodprog=${CHMODPROG-chmod}
20803 +chownprog=${CHOWNPROG-chown}
20804 +cmpprog=${CMPPROG-cmp}
20805 +cpprog=${CPPROG-cp}
20806 +mkdirprog=${MKDIRPROG-mkdir}
20807 +mvprog=${MVPROG-mv}
20808 +rmprog=${RMPROG-rm}
20809 +stripprog=${STRIPPROG-strip}
20810 +
20811 +posix_glob='?'
20812 +initialize_posix_glob='
20813 + test "$posix_glob" != "?" || {
20814 + if (set -f) 2>/dev/null; then
20815 + posix_glob=
20816 + else
20817 + posix_glob=:
20818 + fi
20819 + }
20820 +'
20821 +
20822 +posix_mkdir=
20823 +
20824 +# Desired mode of installed file.
20825 +mode=0755
20826 +
20827 +chgrpcmd=
20828 +chmodcmd=$chmodprog
20829 +chowncmd=
20830 +mvcmd=$mvprog
20831 +rmcmd="$rmprog -f"
20832 +stripcmd=
20833 +
20834 +src=
20835 +dst=
20836 +dir_arg=
20837 +dst_arg=
20838 +
20839 +copy_on_change=false
20840 +no_target_directory=
20841 +
20842 +usage="\
20843 +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
20844 + or: $0 [OPTION]... SRCFILES... DIRECTORY
20845 + or: $0 [OPTION]... -t DIRECTORY SRCFILES...
20846 + or: $0 [OPTION]... -d DIRECTORIES...
20847 +
20848 +In the 1st form, copy SRCFILE to DSTFILE.
20849 +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
20850 +In the 4th, create DIRECTORIES.
20851 +
20852 +Options:
20853 + --help display this help and exit.
20854 + --version display version info and exit.
20855 +
20856 + -c (ignored)
20857 + -C install only if different (preserve the last data modification time)
20858 + -d create directories instead of installing files.
20859 + -g GROUP $chgrpprog installed files to GROUP.
20860 + -m MODE $chmodprog installed files to MODE.
20861 + -o USER $chownprog installed files to USER.
20862 + -s $stripprog installed files.
20863 + -t DIRECTORY install into DIRECTORY.
20864 + -T report an error if DSTFILE is a directory.
20865 +
20866 +Environment variables override the default commands:
20867 + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
20868 + RMPROG STRIPPROG
20869 +"
20870 +
20871 +while test $# -ne 0; do
20872 + case $1 in
20873 + -c) ;;
20874 +
20875 + -C) copy_on_change=true;;
20876 +
20877 + -d) dir_arg=true;;
20878 +
20879 + -g) chgrpcmd="$chgrpprog $2"
20880 + shift;;
20881 +
20882 + --help) echo "$usage"; exit $?;;
20883 +
20884 + -m) mode=$2
20885 + case $mode in
20886 + *' '* | *' '* | *'
20887 +'* | *'*'* | *'?'* | *'['*)
20888 + echo "$0: invalid mode: $mode" >&2
20889 + exit 1;;
20890 + esac
20891 + shift;;
20892 +
20893 + -o) chowncmd="$chownprog $2"
20894 + shift;;
20895 +
20896 + -s) stripcmd=$stripprog;;
20897 +
20898 + -t) dst_arg=$2
20899 + # Protect names problematic for 'test' and other utilities.
20900 + case $dst_arg in
20901 + -* | [=\(\)!]) dst_arg=./$dst_arg;;
20902 + esac
20903 + shift;;
20904 +
20905 + -T) no_target_directory=true;;
20906 +
20907 + --version) echo "$0 $scriptversion"; exit $?;;
20908 +
20909 + --) shift
20910 + break;;
20911 +
20912 + -*) echo "$0: invalid option: $1" >&2
20913 + exit 1;;
20914 +
20915 + *) break;;
20916 + esac
20917 + shift
20918 +done
20919 +
20920 +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
20921 + # When -d is used, all remaining arguments are directories to create.
20922 + # When -t is used, the destination is already specified.
20923 + # Otherwise, the last argument is the destination. Remove it from $@.
20924 + for arg
20925 + do
20926 + if test -n "$dst_arg"; then
20927 + # $@ is not empty: it contains at least $arg.
20928 + set fnord "$@" "$dst_arg"
20929 + shift # fnord
20930 + fi
20931 + shift # arg
20932 + dst_arg=$arg
20933 + # Protect names problematic for 'test' and other utilities.
20934 + case $dst_arg in
20935 + -* | [=\(\)!]) dst_arg=./$dst_arg;;
20936 + esac
20937 + done
20938 +fi
20939 +
20940 +if test $# -eq 0; then
20941 + if test -z "$dir_arg"; then
20942 + echo "$0: no input file specified." >&2
20943 + exit 1
20944 + fi
20945 + # It's OK to call 'install-sh -d' without argument.
20946 + # This can happen when creating conditional directories.
20947 + exit 0
20948 +fi
20949 +
20950 +if test -z "$dir_arg"; then
20951 + do_exit='(exit $ret); exit $ret'
20952 + trap "ret=129; $do_exit" 1
20953 + trap "ret=130; $do_exit" 2
20954 + trap "ret=141; $do_exit" 13
20955 + trap "ret=143; $do_exit" 15
20956 +
20957 + # Set umask so as not to create temps with too-generous modes.
20958 + # However, 'strip' requires both read and write access to temps.
20959 + case $mode in
20960 + # Optimize common cases.
20961 + *644) cp_umask=133;;
20962 + *755) cp_umask=22;;
20963 +
20964 + *[0-7])
20965 + if test -z "$stripcmd"; then
20966 + u_plus_rw=
20967 + else
20968 + u_plus_rw='% 200'
20969 + fi
20970 + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
20971 + *)
20972 + if test -z "$stripcmd"; then
20973 + u_plus_rw=
20974 + else
20975 + u_plus_rw=,u+rw
20976 + fi
20977 + cp_umask=$mode$u_plus_rw;;
20978 + esac
20979 +fi
20980 +
20981 +for src
20982 +do
20983 + # Protect names problematic for 'test' and other utilities.
20984 + case $src in
20985 + -* | [=\(\)!]) src=./$src;;
20986 + esac
20987 +
20988 + if test -n "$dir_arg"; then
20989 + dst=$src
20990 + dstdir=$dst
20991 + test -d "$dstdir"
20992 + dstdir_status=$?
20993 + else
20994 +
20995 + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
20996 + # might cause directories to be created, which would be especially bad
20997 + # if $src (and thus $dsttmp) contains '*'.
20998 + if test ! -f "$src" && test ! -d "$src"; then
20999 + echo "$0: $src does not exist." >&2
21000 + exit 1
21001 + fi
21002 +
21003 + if test -z "$dst_arg"; then
21004 + echo "$0: no destination specified." >&2
21005 + exit 1
21006 + fi
21007 + dst=$dst_arg
21008 +
21009 + # If destination is a directory, append the input filename; won't work
21010 + # if double slashes aren't ignored.
21011 + if test -d "$dst"; then
21012 + if test -n "$no_target_directory"; then
21013 + echo "$0: $dst_arg: Is a directory" >&2
21014 + exit 1
21015 + fi
21016 + dstdir=$dst
21017 + dst=$dstdir/`basename "$src"`
21018 + dstdir_status=0
21019 + else
21020 + # Prefer dirname, but fall back on a substitute if dirname fails.
21021 + dstdir=`
21022 + (dirname "$dst") 2>/dev/null ||
21023 + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21024 + X"$dst" : 'X\(//\)[^/]' \| \
21025 + X"$dst" : 'X\(//\)$' \| \
21026 + X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
21027 + echo X"$dst" |
21028 + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21029 + s//\1/
21030 + q
21031 + }
21032 + /^X\(\/\/\)[^/].*/{
21033 + s//\1/
21034 + q
21035 + }
21036 + /^X\(\/\/\)$/{
21037 + s//\1/
21038 + q
21039 + }
21040 + /^X\(\/\).*/{
21041 + s//\1/
21042 + q
21043 + }
21044 + s/.*/./; q'
21045 + `
21046 +
21047 + test -d "$dstdir"
21048 + dstdir_status=$?
21049 + fi
21050 + fi
21051 +
21052 + obsolete_mkdir_used=false
21053 +
21054 + if test $dstdir_status != 0; then
21055 + case $posix_mkdir in
21056 + '')
21057 + # Create intermediate dirs using mode 755 as modified by the umask.
21058 + # This is like FreeBSD 'install' as of 1997-10-28.
21059 + umask=`umask`
21060 + case $stripcmd.$umask in
21061 + # Optimize common cases.
21062 + *[2367][2367]) mkdir_umask=$umask;;
21063 + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
21064 +
21065 + *[0-7])
21066 + mkdir_umask=`expr $umask + 22 \
21067 + - $umask % 100 % 40 + $umask % 20 \
21068 + - $umask % 10 % 4 + $umask % 2
21069 + `;;
21070 + *) mkdir_umask=$umask,go-w;;
21071 + esac
21072 +
21073 + # With -d, create the new directory with the user-specified mode.
21074 + # Otherwise, rely on $mkdir_umask.
21075 + if test -n "$dir_arg"; then
21076 + mkdir_mode=-m$mode
21077 + else
21078 + mkdir_mode=
21079 + fi
21080 +
21081 + posix_mkdir=false
21082 + case $umask in
21083 + *[123567][0-7][0-7])
21084 + # POSIX mkdir -p sets u+wx bits regardless of umask, which
21085 + # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
21086 + ;;
21087 + *)
21088 + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
21089 + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
21090 +
21091 + if (umask $mkdir_umask &&
21092 + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
21093 + then
21094 + if test -z "$dir_arg" || {
21095 + # Check for POSIX incompatibilities with -m.
21096 + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
21097 + # other-writable bit of parent directory when it shouldn't.
21098 + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
21099 + ls_ld_tmpdir=`ls -ld "$tmpdir"`
21100 + case $ls_ld_tmpdir in
21101 + d????-?r-*) different_mode=700;;
21102 + d????-?--*) different_mode=755;;
21103 + *) false;;
21104 + esac &&
21105 + $mkdirprog -m$different_mode -p -- "$tmpdir" && {
21106 + ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
21107 + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
21108 + }
21109 + }
21110 + then posix_mkdir=:
21111 + fi
21112 + rmdir "$tmpdir/d" "$tmpdir"
21113 + else
21114 + # Remove any dirs left behind by ancient mkdir implementations.
21115 + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
21116 + fi
21117 + trap '' 0;;
21118 + esac;;
21119 + esac
21120 +
21121 + if
21122 + $posix_mkdir && (
21123 + umask $mkdir_umask &&
21124 + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
21125 + )
21126 + then :
21127 + else
21128 +
21129 + # The umask is ridiculous, or mkdir does not conform to POSIX,
21130 + # or it failed possibly due to a race condition. Create the
21131 + # directory the slow way, step by step, checking for races as we go.
21132 +
21133 + case $dstdir in
21134 + /*) prefix='/';;
21135 + [-=\(\)!]*) prefix='./';;
21136 + *) prefix='';;
21137 + esac
21138 +
21139 + eval "$initialize_posix_glob"
21140 +
21141 + oIFS=$IFS
21142 + IFS=/
21143 + $posix_glob set -f
21144 + set fnord $dstdir
21145 + shift
21146 + $posix_glob set +f
21147 + IFS=$oIFS
21148 +
21149 + prefixes=
21150 +
21151 + for d
21152 + do
21153 + test X"$d" = X && continue
21154 +
21155 + prefix=$prefix$d
21156 + if test -d "$prefix"; then
21157 + prefixes=
21158 + else
21159 + if $posix_mkdir; then
21160 + (umask=$mkdir_umask &&
21161 + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
21162 + # Don't fail if two instances are running concurrently.
21163 + test -d "$prefix" || exit 1
21164 + else
21165 + case $prefix in
21166 + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
21167 + *) qprefix=$prefix;;
21168 + esac
21169 + prefixes="$prefixes '$qprefix'"
21170 + fi
21171 + fi
21172 + prefix=$prefix/
21173 + done
21174 +
21175 + if test -n "$prefixes"; then
21176 + # Don't fail if two instances are running concurrently.
21177 + (umask $mkdir_umask &&
21178 + eval "\$doit_exec \$mkdirprog $prefixes") ||
21179 + test -d "$dstdir" || exit 1
21180 + obsolete_mkdir_used=true
21181 + fi
21182 + fi
21183 + fi
21184 +
21185 + if test -n "$dir_arg"; then
21186 + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
21187 + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
21188 + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
21189 + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
21190 + else
21191 +
21192 + # Make a couple of temp file names in the proper directory.
21193 + dsttmp=$dstdir/_inst.$$_
21194 + rmtmp=$dstdir/_rm.$$_
21195 +
21196 + # Trap to clean up those temp files at exit.
21197 + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
21198 +
21199 + # Copy the file name to the temp name.
21200 + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
21201 +
21202 + # and set any options; do chmod last to preserve setuid bits.
21203 + #
21204 + # If any of these fail, we abort the whole thing. If we want to
21205 + # ignore errors from any of these, just make sure not to ignore
21206 + # errors from the above "$doit $cpprog $src $dsttmp" command.
21207 + #
21208 + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
21209 + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
21210 + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
21211 + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
21212 +
21213 + # If -C, don't bother to copy if it wouldn't change the file.
21214 + if $copy_on_change &&
21215 + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
21216 + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
21217 +
21218 + eval "$initialize_posix_glob" &&
21219 + $posix_glob set -f &&
21220 + set X $old && old=:$2:$4:$5:$6 &&
21221 + set X $new && new=:$2:$4:$5:$6 &&
21222 + $posix_glob set +f &&
21223 +
21224 + test "$old" = "$new" &&
21225 + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
21226 + then
21227 + rm -f "$dsttmp"
21228 + else
21229 + # Rename the file to the real destination.
21230 + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
21231 +
21232 + # The rename failed, perhaps because mv can't rename something else
21233 + # to itself, or perhaps because mv is so ancient that it does not
21234 + # support -f.
21235 + {
21236 + # Now remove or move aside any old file at destination location.
21237 + # We try this two ways since rm can't unlink itself on some
21238 + # systems and the destination file might be busy for other
21239 + # reasons. In this case, the final cleanup might fail but the new
21240 + # file should still install successfully.
21241 + {
21242 + test ! -f "$dst" ||
21243 + $doit $rmcmd -f "$dst" 2>/dev/null ||
21244 + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
21245 + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
21246 + } ||
21247 + { echo "$0: cannot unlink or rename $dst" >&2
21248 + (exit 1); exit 1
21249 + }
21250 + } &&
21251 +
21252 + # Now rename the file to the real destination.
21253 + $doit $mvcmd "$dsttmp" "$dst"
21254 + }
21255 + fi || exit 1
21256 +
21257 + trap '' 0
21258 + fi
21259 +done
21260 +
21261 +# Local variables:
21262 +# eval: (add-hook 'write-file-hooks 'time-stamp)
21263 +# time-stamp-start: "scriptversion="
21264 +# time-stamp-format: "%:y-%02m-%02d.%02H"
21265 +# time-stamp-time-zone: "UTC"
21266 +# time-stamp-end: "; # UTC"
21267 +# End:
21268 --- /dev/null
21269 +++ b/config.guess
21270 @@ -0,0 +1,1558 @@
21271 +#! /bin/sh
21272 +# Attempt to guess a canonical system name.
21273 +# Copyright 1992-2013 Free Software Foundation, Inc.
21274 +
21275 +timestamp='2013-06-10'
21276 +
21277 +# This file is free software; you can redistribute it and/or modify it
21278 +# under the terms of the GNU General Public License as published by
21279 +# the Free Software Foundation; either version 3 of the License, or
21280 +# (at your option) any later version.
21281 +#
21282 +# This program is distributed in the hope that it will be useful, but
21283 +# WITHOUT ANY WARRANTY; without even the implied warranty of
21284 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21285 +# General Public License for more details.
21286 +#
21287 +# You should have received a copy of the GNU General Public License
21288 +# along with this program; if not, see <http://www.gnu.org/licenses/>.
21289 +#
21290 +# As a special exception to the GNU General Public License, if you
21291 +# distribute this file as part of a program that contains a
21292 +# configuration script generated by Autoconf, you may include it under
21293 +# the same distribution terms that you use for the rest of that
21294 +# program. This Exception is an additional permission under section 7
21295 +# of the GNU General Public License, version 3 ("GPLv3").
21296 +#
21297 +# Originally written by Per Bothner.
21298 +#
21299 +# You can get the latest version of this script from:
21300 +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
21301 +#
21302 +# Please send patches with a ChangeLog entry to config-patches@gnu.org.
21303 +
21304 +
21305 +me=`echo "$0" | sed -e 's,.*/,,'`
21306 +
21307 +usage="\
21308 +Usage: $0 [OPTION]
21309 +
21310 +Output the configuration name of the system \`$me' is run on.
21311 +
21312 +Operation modes:
21313 + -h, --help print this help, then exit
21314 + -t, --time-stamp print date of last modification, then exit
21315 + -v, --version print version number, then exit
21316 +
21317 +Report bugs and patches to <config-patches@gnu.org>."
21318 +
21319 +version="\
21320 +GNU config.guess ($timestamp)
21321 +
21322 +Originally written by Per Bothner.
21323 +Copyright 1992-2013 Free Software Foundation, Inc.
21324 +
21325 +This is free software; see the source for copying conditions. There is NO
21326 +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
21327 +
21328 +help="
21329 +Try \`$me --help' for more information."
21330 +
21331 +# Parse command line
21332 +while test $# -gt 0 ; do
21333 + case $1 in
21334 + --time-stamp | --time* | -t )
21335 + echo "$timestamp" ; exit ;;
21336 + --version | -v )
21337 + echo "$version" ; exit ;;
21338 + --help | --h* | -h )
21339 + echo "$usage"; exit ;;
21340 + -- ) # Stop option processing
21341 + shift; break ;;
21342 + - ) # Use stdin as input.
21343 + break ;;
21344 + -* )
21345 + echo "$me: invalid option $1$help" >&2
21346 + exit 1 ;;
21347 + * )
21348 + break ;;
21349 + esac
21350 +done
21351 +
21352 +if test $# != 0; then
21353 + echo "$me: too many arguments$help" >&2
21354 + exit 1
21355 +fi
21356 +
21357 +trap 'exit 1' 1 2 15
21358 +
21359 +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
21360 +# compiler to aid in system detection is discouraged as it requires
21361 +# temporary files to be created and, as you can see below, it is a
21362 +# headache to deal with in a portable fashion.
21363 +
21364 +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
21365 +# use `HOST_CC' if defined, but it is deprecated.
21366 +
21367 +# Portable tmp directory creation inspired by the Autoconf team.
21368 +
21369 +set_cc_for_build='
21370 +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
21371 +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
21372 +: ${TMPDIR=/tmp} ;
21373 + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
21374 + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
21375 + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
21376 + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
21377 +dummy=$tmp/dummy ;
21378 +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
21379 +case $CC_FOR_BUILD,$HOST_CC,$CC in
21380 + ,,) echo "int x;" > $dummy.c ;
21381 + for c in cc gcc c89 c99 ; do
21382 + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
21383 + CC_FOR_BUILD="$c"; break ;
21384 + fi ;
21385 + done ;
21386 + if test x"$CC_FOR_BUILD" = x ; then
21387 + CC_FOR_BUILD=no_compiler_found ;
21388 + fi
21389 + ;;
21390 + ,,*) CC_FOR_BUILD=$CC ;;
21391 + ,*,*) CC_FOR_BUILD=$HOST_CC ;;
21392 +esac ; set_cc_for_build= ;'
21393 +
21394 +# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
21395 +# (ghazi@noc.rutgers.edu 1994-08-24)
21396 +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
21397 + PATH=$PATH:/.attbin ; export PATH
21398 +fi
21399 +
21400 +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
21401 +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
21402 +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
21403 +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
21404 +
21405 +case "${UNAME_SYSTEM}" in
21406 +Linux|GNU|GNU/*)
21407 + # If the system lacks a compiler, then just pick glibc.
21408 + # We could probably try harder.
21409 + LIBC=gnu
21410 +
21411 + eval $set_cc_for_build
21412 + cat <<-EOF > $dummy.c
21413 + #include <features.h>
21414 + #if defined(__UCLIBC__)
21415 + LIBC=uclibc
21416 + #elif defined(__dietlibc__)
21417 + LIBC=dietlibc
21418 + #else
21419 + LIBC=gnu
21420 + #endif
21421 + EOF
21422 + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
21423 + ;;
21424 +esac
21425 +
21426 +# Note: order is significant - the case branches are not exclusive.
21427 +
21428 +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
21429 + *:NetBSD:*:*)
21430 + # NetBSD (nbsd) targets should (where applicable) match one or
21431 + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
21432 + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
21433 + # switched to ELF, *-*-netbsd* would select the old
21434 + # object file format. This provides both forward
21435 + # compatibility and a consistent mechanism for selecting the
21436 + # object file format.
21437 + #
21438 + # Note: NetBSD doesn't particularly care about the vendor
21439 + # portion of the name. We always set it to "unknown".
21440 + sysctl="sysctl -n hw.machine_arch"
21441 + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
21442 + /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
21443 + case "${UNAME_MACHINE_ARCH}" in
21444 + armeb) machine=armeb-unknown ;;
21445 + arm*) machine=arm-unknown ;;
21446 + sh3el) machine=shl-unknown ;;
21447 + sh3eb) machine=sh-unknown ;;
21448 + sh5el) machine=sh5le-unknown ;;
21449 + *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
21450 + esac
21451 + # The Operating System including object format, if it has switched
21452 + # to ELF recently, or will in the future.
21453 + case "${UNAME_MACHINE_ARCH}" in
21454 + arm*|i386|m68k|ns32k|sh3*|sparc|vax)
21455 + eval $set_cc_for_build
21456 + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
21457 + | grep -q __ELF__
21458 + then
21459 + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
21460 + # Return netbsd for either. FIX?
21461 + os=netbsd
21462 + else
21463 + os=netbsdelf
21464 + fi
21465 + ;;
21466 + *)
21467 + os=netbsd
21468 + ;;
21469 + esac
21470 + # The OS release
21471 + # Debian GNU/NetBSD machines have a different userland, and
21472 + # thus, need a distinct triplet. However, they do not need
21473 + # kernel version information, so it can be replaced with a
21474 + # suitable tag, in the style of linux-gnu.
21475 + case "${UNAME_VERSION}" in
21476 + Debian*)
21477 + release='-gnu'
21478 + ;;
21479 + *)
21480 + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
21481 + ;;
21482 + esac
21483 + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
21484 + # contains redundant information, the shorter form:
21485 + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
21486 + echo "${machine}-${os}${release}"
21487 + exit ;;
21488 + *:Bitrig:*:*)
21489 + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
21490 + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
21491 + exit ;;
21492 + *:OpenBSD:*:*)
21493 + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
21494 + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
21495 + exit ;;
21496 + *:ekkoBSD:*:*)
21497 + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
21498 + exit ;;
21499 + *:SolidBSD:*:*)
21500 + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
21501 + exit ;;
21502 + macppc:MirBSD:*:*)
21503 + echo powerpc-unknown-mirbsd${UNAME_RELEASE}
21504 + exit ;;
21505 + *:MirBSD:*:*)
21506 + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
21507 + exit ;;
21508 + alpha:OSF1:*:*)
21509 + case $UNAME_RELEASE in
21510 + *4.0)
21511 + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
21512 + ;;
21513 + *5.*)
21514 + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
21515 + ;;
21516 + esac
21517 + # According to Compaq, /usr/sbin/psrinfo has been available on
21518 + # OSF/1 and Tru64 systems produced since 1995. I hope that
21519 + # covers most systems running today. This code pipes the CPU
21520 + # types through head -n 1, so we only detect the type of CPU 0.
21521 + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
21522 + case "$ALPHA_CPU_TYPE" in
21523 + "EV4 (21064)")
21524 + UNAME_MACHINE="alpha" ;;
21525 + "EV4.5 (21064)")
21526 + UNAME_MACHINE="alpha" ;;
21527 + "LCA4 (21066/21068)")
21528 + UNAME_MACHINE="alpha" ;;
21529 + "EV5 (21164)")
21530 + UNAME_MACHINE="alphaev5" ;;
21531 + "EV5.6 (21164A)")
21532 + UNAME_MACHINE="alphaev56" ;;
21533 + "EV5.6 (21164PC)")
21534 + UNAME_MACHINE="alphapca56" ;;
21535 + "EV5.7 (21164PC)")
21536 + UNAME_MACHINE="alphapca57" ;;
21537 + "EV6 (21264)")
21538 + UNAME_MACHINE="alphaev6" ;;
21539 + "EV6.7 (21264A)")
21540 + UNAME_MACHINE="alphaev67" ;;
21541 + "EV6.8CB (21264C)")
21542 + UNAME_MACHINE="alphaev68" ;;
21543 + "EV6.8AL (21264B)")
21544 + UNAME_MACHINE="alphaev68" ;;
21545 + "EV6.8CX (21264D)")
21546 + UNAME_MACHINE="alphaev68" ;;
21547 + "EV6.9A (21264/EV69A)")
21548 + UNAME_MACHINE="alphaev69" ;;
21549 + "EV7 (21364)")
21550 + UNAME_MACHINE="alphaev7" ;;
21551 + "EV7.9 (21364A)")
21552 + UNAME_MACHINE="alphaev79" ;;
21553 + esac
21554 + # A Pn.n version is a patched version.
21555 + # A Vn.n version is a released version.
21556 + # A Tn.n version is a released field test version.
21557 + # A Xn.n version is an unreleased experimental baselevel.
21558 + # 1.2 uses "1.2" for uname -r.
21559 + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21560 + # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
21561 + exitcode=$?
21562 + trap '' 0
21563 + exit $exitcode ;;
21564 + Alpha\ *:Windows_NT*:*)
21565 + # How do we know it's Interix rather than the generic POSIX subsystem?
21566 + # Should we change UNAME_MACHINE based on the output of uname instead
21567 + # of the specific Alpha model?
21568 + echo alpha-pc-interix
21569 + exit ;;
21570 + 21064:Windows_NT:50:3)
21571 + echo alpha-dec-winnt3.5
21572 + exit ;;
21573 + Amiga*:UNIX_System_V:4.0:*)
21574 + echo m68k-unknown-sysv4
21575 + exit ;;
21576 + *:[Aa]miga[Oo][Ss]:*:*)
21577 + echo ${UNAME_MACHINE}-unknown-amigaos
21578 + exit ;;
21579 + *:[Mm]orph[Oo][Ss]:*:*)
21580 + echo ${UNAME_MACHINE}-unknown-morphos
21581 + exit ;;
21582 + *:OS/390:*:*)
21583 + echo i370-ibm-openedition
21584 + exit ;;
21585 + *:z/VM:*:*)
21586 + echo s390-ibm-zvmoe
21587 + exit ;;
21588 + *:OS400:*:*)
21589 + echo powerpc-ibm-os400
21590 + exit ;;
21591 + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
21592 + echo arm-acorn-riscix${UNAME_RELEASE}
21593 + exit ;;
21594 + arm*:riscos:*:*|arm*:RISCOS:*:*)
21595 + echo arm-unknown-riscos
21596 + exit ;;
21597 + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
21598 + echo hppa1.1-hitachi-hiuxmpp
21599 + exit ;;
21600 + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
21601 + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
21602 + if test "`(/bin/universe) 2>/dev/null`" = att ; then
21603 + echo pyramid-pyramid-sysv3
21604 + else
21605 + echo pyramid-pyramid-bsd
21606 + fi
21607 + exit ;;
21608 + NILE*:*:*:dcosx)
21609 + echo pyramid-pyramid-svr4
21610 + exit ;;
21611 + DRS?6000:unix:4.0:6*)
21612 + echo sparc-icl-nx6
21613 + exit ;;
21614 + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
21615 + case `/usr/bin/uname -p` in
21616 + sparc) echo sparc-icl-nx7; exit ;;
21617 + esac ;;
21618 + s390x:SunOS:*:*)
21619 + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
21620 + exit ;;
21621 + sun4H:SunOS:5.*:*)
21622 + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
21623 + exit ;;
21624 + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
21625 + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
21626 + exit ;;
21627 + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
21628 + echo i386-pc-auroraux${UNAME_RELEASE}
21629 + exit ;;
21630 + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
21631 + eval $set_cc_for_build
21632 + SUN_ARCH="i386"
21633 + # If there is a compiler, see if it is configured for 64-bit objects.
21634 + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
21635 + # This test works for both compilers.
21636 + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
21637 + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
21638 + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
21639 + grep IS_64BIT_ARCH >/dev/null
21640 + then
21641 + SUN_ARCH="x86_64"
21642 + fi
21643 + fi
21644 + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
21645 + exit ;;
21646 + sun4*:SunOS:6*:*)
21647 + # According to config.sub, this is the proper way to canonicalize
21648 + # SunOS6. Hard to guess exactly what SunOS6 will be like, but
21649 + # it's likely to be more like Solaris than SunOS4.
21650 + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
21651 + exit ;;
21652 + sun4*:SunOS:*:*)
21653 + case "`/usr/bin/arch -k`" in
21654 + Series*|S4*)
21655 + UNAME_RELEASE=`uname -v`
21656 + ;;
21657 + esac
21658 + # Japanese Language versions have a version number like `4.1.3-JL'.
21659 + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
21660 + exit ;;
21661 + sun3*:SunOS:*:*)
21662 + echo m68k-sun-sunos${UNAME_RELEASE}
21663 + exit ;;
21664 + sun*:*:4.2BSD:*)
21665 + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
21666 + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
21667 + case "`/bin/arch`" in
21668 + sun3)
21669 + echo m68k-sun-sunos${UNAME_RELEASE}
21670 + ;;
21671 + sun4)
21672 + echo sparc-sun-sunos${UNAME_RELEASE}
21673 + ;;
21674 + esac
21675 + exit ;;
21676 + aushp:SunOS:*:*)
21677 + echo sparc-auspex-sunos${UNAME_RELEASE}
21678 + exit ;;
21679 + # The situation for MiNT is a little confusing. The machine name
21680 + # can be virtually everything (everything which is not
21681 + # "atarist" or "atariste" at least should have a processor
21682 + # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
21683 + # to the lowercase version "mint" (or "freemint"). Finally
21684 + # the system name "TOS" denotes a system which is actually not
21685 + # MiNT. But MiNT is downward compatible to TOS, so this should
21686 + # be no problem.
21687 + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
21688 + echo m68k-atari-mint${UNAME_RELEASE}
21689 + exit ;;
21690 + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
21691 + echo m68k-atari-mint${UNAME_RELEASE}
21692 + exit ;;
21693 + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
21694 + echo m68k-atari-mint${UNAME_RELEASE}
21695 + exit ;;
21696 + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
21697 + echo m68k-milan-mint${UNAME_RELEASE}
21698 + exit ;;
21699 + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
21700 + echo m68k-hades-mint${UNAME_RELEASE}
21701 + exit ;;
21702 + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
21703 + echo m68k-unknown-mint${UNAME_RELEASE}
21704 + exit ;;
21705 + m68k:machten:*:*)
21706 + echo m68k-apple-machten${UNAME_RELEASE}
21707 + exit ;;
21708 + powerpc:machten:*:*)
21709 + echo powerpc-apple-machten${UNAME_RELEASE}
21710 + exit ;;
21711 + RISC*:Mach:*:*)
21712 + echo mips-dec-mach_bsd4.3
21713 + exit ;;
21714 + RISC*:ULTRIX:*:*)
21715 + echo mips-dec-ultrix${UNAME_RELEASE}
21716 + exit ;;
21717 + VAX*:ULTRIX*:*:*)
21718 + echo vax-dec-ultrix${UNAME_RELEASE}
21719 + exit ;;
21720 + 2020:CLIX:*:* | 2430:CLIX:*:*)
21721 + echo clipper-intergraph-clix${UNAME_RELEASE}
21722 + exit ;;
21723 + mips:*:*:UMIPS | mips:*:*:RISCos)
21724 + eval $set_cc_for_build
21725 + sed 's/^ //' << EOF >$dummy.c
21726 +#ifdef __cplusplus
21727 +#include <stdio.h> /* for printf() prototype */
21728 + int main (int argc, char *argv[]) {
21729 +#else
21730 + int main (argc, argv) int argc; char *argv[]; {
21731 +#endif
21732 + #if defined (host_mips) && defined (MIPSEB)
21733 + #if defined (SYSTYPE_SYSV)
21734 + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
21735 + #endif
21736 + #if defined (SYSTYPE_SVR4)
21737 + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
21738 + #endif
21739 + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
21740 + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
21741 + #endif
21742 + #endif
21743 + exit (-1);
21744 + }
21745 +EOF
21746 + $CC_FOR_BUILD -o $dummy $dummy.c &&
21747 + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
21748 + SYSTEM_NAME=`$dummy $dummyarg` &&
21749 + { echo "$SYSTEM_NAME"; exit; }
21750 + echo mips-mips-riscos${UNAME_RELEASE}
21751 + exit ;;
21752 + Motorola:PowerMAX_OS:*:*)
21753 + echo powerpc-motorola-powermax
21754 + exit ;;
21755 + Motorola:*:4.3:PL8-*)
21756 + echo powerpc-harris-powermax
21757 + exit ;;
21758 + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
21759 + echo powerpc-harris-powermax
21760 + exit ;;
21761 + Night_Hawk:Power_UNIX:*:*)
21762 + echo powerpc-harris-powerunix
21763 + exit ;;
21764 + m88k:CX/UX:7*:*)
21765 + echo m88k-harris-cxux7
21766 + exit ;;
21767 + m88k:*:4*:R4*)
21768 + echo m88k-motorola-sysv4
21769 + exit ;;
21770 + m88k:*:3*:R3*)
21771 + echo m88k-motorola-sysv3
21772 + exit ;;
21773 + AViiON:dgux:*:*)
21774 + # DG/UX returns AViiON for all architectures
21775 + UNAME_PROCESSOR=`/usr/bin/uname -p`
21776 + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
21777 + then
21778 + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
21779 + [ ${TARGET_BINARY_INTERFACE}x = x ]
21780 + then
21781 + echo m88k-dg-dgux${UNAME_RELEASE}
21782 + else
21783 + echo m88k-dg-dguxbcs${UNAME_RELEASE}
21784 + fi
21785 + else
21786 + echo i586-dg-dgux${UNAME_RELEASE}
21787 + fi
21788 + exit ;;
21789 + M88*:DolphinOS:*:*) # DolphinOS (SVR3)
21790 + echo m88k-dolphin-sysv3
21791 + exit ;;
21792 + M88*:*:R3*:*)
21793 + # Delta 88k system running SVR3
21794 + echo m88k-motorola-sysv3
21795 + exit ;;
21796 + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
21797 + echo m88k-tektronix-sysv3
21798 + exit ;;
21799 + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
21800 + echo m68k-tektronix-bsd
21801 + exit ;;
21802 + *:IRIX*:*:*)
21803 + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
21804 + exit ;;
21805 + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
21806 + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
21807 + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
21808 + i*86:AIX:*:*)
21809 + echo i386-ibm-aix
21810 + exit ;;
21811 + ia64:AIX:*:*)
21812 + if [ -x /usr/bin/oslevel ] ; then
21813 + IBM_REV=`/usr/bin/oslevel`
21814 + else
21815 + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
21816 + fi
21817 + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
21818 + exit ;;
21819 + *:AIX:2:3)
21820 + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
21821 + eval $set_cc_for_build
21822 + sed 's/^ //' << EOF >$dummy.c
21823 + #include <sys/systemcfg.h>
21824 +
21825 + main()
21826 + {
21827 + if (!__power_pc())
21828 + exit(1);
21829 + puts("powerpc-ibm-aix3.2.5");
21830 + exit(0);
21831 + }
21832 +EOF
21833 + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
21834 + then
21835 + echo "$SYSTEM_NAME"
21836 + else
21837 + echo rs6000-ibm-aix3.2.5
21838 + fi
21839 + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
21840 + echo rs6000-ibm-aix3.2.4
21841 + else
21842 + echo rs6000-ibm-aix3.2
21843 + fi
21844 + exit ;;
21845 + *:AIX:*:[4567])
21846 + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
21847 + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
21848 + IBM_ARCH=rs6000
21849 + else
21850 + IBM_ARCH=powerpc
21851 + fi
21852 + if [ -x /usr/bin/oslevel ] ; then
21853 + IBM_REV=`/usr/bin/oslevel`
21854 + else
21855 + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
21856 + fi
21857 + echo ${IBM_ARCH}-ibm-aix${IBM_REV}
21858 + exit ;;
21859 + *:AIX:*:*)
21860 + echo rs6000-ibm-aix
21861 + exit ;;
21862 + ibmrt:4.4BSD:*|romp-ibm:BSD:*)
21863 + echo romp-ibm-bsd4.4
21864 + exit ;;
21865 + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
21866 + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
21867 + exit ;; # report: romp-ibm BSD 4.3
21868 + *:BOSX:*:*)
21869 + echo rs6000-bull-bosx
21870 + exit ;;
21871 + DPX/2?00:B.O.S.:*:*)
21872 + echo m68k-bull-sysv3
21873 + exit ;;
21874 + 9000/[34]??:4.3bsd:1.*:*)
21875 + echo m68k-hp-bsd
21876 + exit ;;
21877 + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
21878 + echo m68k-hp-bsd4.4
21879 + exit ;;
21880 + 9000/[34678]??:HP-UX:*:*)
21881 + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
21882 + case "${UNAME_MACHINE}" in
21883 + 9000/31? ) HP_ARCH=m68000 ;;
21884 + 9000/[34]?? ) HP_ARCH=m68k ;;
21885 + 9000/[678][0-9][0-9])
21886 + if [ -x /usr/bin/getconf ]; then
21887 + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
21888 + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
21889 + case "${sc_cpu_version}" in
21890 + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
21891 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
21892 + 532) # CPU_PA_RISC2_0
21893 + case "${sc_kernel_bits}" in
21894 + 32) HP_ARCH="hppa2.0n" ;;
21895 + 64) HP_ARCH="hppa2.0w" ;;
21896 + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
21897 + esac ;;
21898 + esac
21899 + fi
21900 + if [ "${HP_ARCH}" = "" ]; then
21901 + eval $set_cc_for_build
21902 + sed 's/^ //' << EOF >$dummy.c
21903 +
21904 + #define _HPUX_SOURCE
21905 + #include <stdlib.h>
21906 + #include <unistd.h>
21907 +
21908 + int main ()
21909 + {
21910 + #if defined(_SC_KERNEL_BITS)
21911 + long bits = sysconf(_SC_KERNEL_BITS);
21912 + #endif
21913 + long cpu = sysconf (_SC_CPU_VERSION);
21914 +
21915 + switch (cpu)
21916 + {
21917 + case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
21918 + case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
21919 + case CPU_PA_RISC2_0:
21920 + #if defined(_SC_KERNEL_BITS)
21921 + switch (bits)
21922 + {
21923 + case 64: puts ("hppa2.0w"); break;
21924 + case 32: puts ("hppa2.0n"); break;
21925 + default: puts ("hppa2.0"); break;
21926 + } break;
21927 + #else /* !defined(_SC_KERNEL_BITS) */
21928 + puts ("hppa2.0"); break;
21929 + #endif
21930 + default: puts ("hppa1.0"); break;
21931 + }
21932 + exit (0);
21933 + }
21934 +EOF
21935 + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
21936 + test -z "$HP_ARCH" && HP_ARCH=hppa
21937 + fi ;;
21938 + esac
21939 + if [ ${HP_ARCH} = "hppa2.0w" ]
21940 + then
21941 + eval $set_cc_for_build
21942 +
21943 + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
21944 + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
21945 + # generating 64-bit code. GNU and HP use different nomenclature:
21946 + #
21947 + # $ CC_FOR_BUILD=cc ./config.guess
21948 + # => hppa2.0w-hp-hpux11.23
21949 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
21950 + # => hppa64-hp-hpux11.23
21951 +
21952 + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
21953 + grep -q __LP64__
21954 + then
21955 + HP_ARCH="hppa2.0w"
21956 + else
21957 + HP_ARCH="hppa64"
21958 + fi
21959 + fi
21960 + echo ${HP_ARCH}-hp-hpux${HPUX_REV}
21961 + exit ;;
21962 + ia64:HP-UX:*:*)
21963 + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
21964 + echo ia64-hp-hpux${HPUX_REV}
21965 + exit ;;
21966 + 3050*:HI-UX:*:*)
21967 + eval $set_cc_for_build
21968 + sed 's/^ //' << EOF >$dummy.c
21969 + #include <unistd.h>
21970 + int
21971 + main ()
21972 + {
21973 + long cpu = sysconf (_SC_CPU_VERSION);
21974 + /* The order matters, because CPU_IS_HP_MC68K erroneously returns
21975 + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
21976 + results, however. */
21977 + if (CPU_IS_PA_RISC (cpu))
21978 + {
21979 + switch (cpu)
21980 + {
21981 + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
21982 + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
21983 + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
21984 + default: puts ("hppa-hitachi-hiuxwe2"); break;
21985 + }
21986 + }
21987 + else if (CPU_IS_HP_MC68K (cpu))
21988 + puts ("m68k-hitachi-hiuxwe2");
21989 + else puts ("unknown-hitachi-hiuxwe2");
21990 + exit (0);
21991 + }
21992 +EOF
21993 + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
21994 + { echo "$SYSTEM_NAME"; exit; }
21995 + echo unknown-hitachi-hiuxwe2
21996 + exit ;;
21997 + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
21998 + echo hppa1.1-hp-bsd
21999 + exit ;;
22000 + 9000/8??:4.3bsd:*:*)
22001 + echo hppa1.0-hp-bsd
22002 + exit ;;
22003 + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
22004 + echo hppa1.0-hp-mpeix
22005 + exit ;;
22006 + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
22007 + echo hppa1.1-hp-osf
22008 + exit ;;
22009 + hp8??:OSF1:*:*)
22010 + echo hppa1.0-hp-osf
22011 + exit ;;
22012 + i*86:OSF1:*:*)
22013 + if [ -x /usr/sbin/sysversion ] ; then
22014 + echo ${UNAME_MACHINE}-unknown-osf1mk
22015 + else
22016 + echo ${UNAME_MACHINE}-unknown-osf1
22017 + fi
22018 + exit ;;
22019 + parisc*:Lites*:*:*)
22020 + echo hppa1.1-hp-lites
22021 + exit ;;
22022 + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
22023 + echo c1-convex-bsd
22024 + exit ;;
22025 + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
22026 + if getsysinfo -f scalar_acc
22027 + then echo c32-convex-bsd
22028 + else echo c2-convex-bsd
22029 + fi
22030 + exit ;;
22031 + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
22032 + echo c34-convex-bsd
22033 + exit ;;
22034 + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
22035 + echo c38-convex-bsd
22036 + exit ;;
22037 + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
22038 + echo c4-convex-bsd
22039 + exit ;;
22040 + CRAY*Y-MP:*:*:*)
22041 + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
22042 + exit ;;
22043 + CRAY*[A-Z]90:*:*:*)
22044 + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
22045 + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
22046 + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
22047 + -e 's/\.[^.]*$/.X/'
22048 + exit ;;
22049 + CRAY*TS:*:*:*)
22050 + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
22051 + exit ;;
22052 + CRAY*T3E:*:*:*)
22053 + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
22054 + exit ;;
22055 + CRAY*SV1:*:*:*)
22056 + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
22057 + exit ;;
22058 + *:UNICOS/mp:*:*)
22059 + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
22060 + exit ;;
22061 + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
22062 + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22063 + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
22064 + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
22065 + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
22066 + exit ;;
22067 + 5000:UNIX_System_V:4.*:*)
22068 + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
22069 + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
22070 + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
22071 + exit ;;
22072 + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
22073 + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
22074 + exit ;;
22075 + sparc*:BSD/OS:*:*)
22076 + echo sparc-unknown-bsdi${UNAME_RELEASE}
22077 + exit ;;
22078 + *:BSD/OS:*:*)
22079 + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
22080 + exit ;;
22081 + *:FreeBSD:*:*)
22082 + UNAME_PROCESSOR=`/usr/bin/uname -p`
22083 + case ${UNAME_PROCESSOR} in
22084 + amd64)
22085 + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
22086 + *)
22087 + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
22088 + esac
22089 + exit ;;
22090 + i*:CYGWIN*:*)
22091 + echo ${UNAME_MACHINE}-pc-cygwin
22092 + exit ;;
22093 + *:MINGW64*:*)
22094 + echo ${UNAME_MACHINE}-pc-mingw64
22095 + exit ;;
22096 + *:MINGW*:*)
22097 + echo ${UNAME_MACHINE}-pc-mingw32
22098 + exit ;;
22099 + i*:MSYS*:*)
22100 + echo ${UNAME_MACHINE}-pc-msys
22101 + exit ;;
22102 + i*:windows32*:*)
22103 + # uname -m includes "-pc" on this system.
22104 + echo ${UNAME_MACHINE}-mingw32
22105 + exit ;;
22106 + i*:PW*:*)
22107 + echo ${UNAME_MACHINE}-pc-pw32
22108 + exit ;;
22109 + *:Interix*:*)
22110 + case ${UNAME_MACHINE} in
22111 + x86)
22112 + echo i586-pc-interix${UNAME_RELEASE}
22113 + exit ;;
22114 + authenticamd | genuineintel | EM64T)
22115 + echo x86_64-unknown-interix${UNAME_RELEASE}
22116 + exit ;;
22117 + IA64)
22118 + echo ia64-unknown-interix${UNAME_RELEASE}
22119 + exit ;;
22120 + esac ;;
22121 + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
22122 + echo i${UNAME_MACHINE}-pc-mks
22123 + exit ;;
22124 + 8664:Windows_NT:*)
22125 + echo x86_64-pc-mks
22126 + exit ;;
22127 + i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
22128 + # How do we know it's Interix rather than the generic POSIX subsystem?
22129 + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
22130 + # UNAME_MACHINE based on the output of uname instead of i386?
22131 + echo i586-pc-interix
22132 + exit ;;
22133 + i*:UWIN*:*)
22134 + echo ${UNAME_MACHINE}-pc-uwin
22135 + exit ;;
22136 + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
22137 + echo x86_64-unknown-cygwin
22138 + exit ;;
22139 + p*:CYGWIN*:*)
22140 + echo powerpcle-unknown-cygwin
22141 + exit ;;
22142 + prep*:SunOS:5.*:*)
22143 + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
22144 + exit ;;
22145 + *:GNU:*:*)
22146 + # the GNU system
22147 + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
22148 + exit ;;
22149 + *:GNU/*:*:*)
22150 + # other systems with GNU libc and userland
22151 + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
22152 + exit ;;
22153 + i*86:Minix:*:*)
22154 + echo ${UNAME_MACHINE}-pc-minix
22155 + exit ;;
22156 + aarch64:Linux:*:*)
22157 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
22158 + exit ;;
22159 + aarch64_be:Linux:*:*)
22160 + UNAME_MACHINE=aarch64_be
22161 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
22162 + exit ;;
22163 + alpha:Linux:*:*)
22164 + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
22165 + EV5) UNAME_MACHINE=alphaev5 ;;
22166 + EV56) UNAME_MACHINE=alphaev56 ;;
22167 + PCA56) UNAME_MACHINE=alphapca56 ;;
22168 + PCA57) UNAME_MACHINE=alphapca56 ;;
22169 + EV6) UNAME_MACHINE=alphaev6 ;;
22170 + EV67) UNAME_MACHINE=alphaev67 ;;
22171 + EV68*) UNAME_MACHINE=alphaev68 ;;
22172 + esac
22173 + objdump --private-headers /bin/sh | grep -q ld.so.1
22174 + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
22175 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
22176 + exit ;;
22177 + arc:Linux:*:* | arceb:Linux:*:*)
22178 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
22179 + exit ;;
22180 + arm*:Linux:*:*)
22181 + eval $set_cc_for_build
22182 + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
22183 + | grep -q __ARM_EABI__
22184 + then
22185 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
22186 + else
22187 + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
22188 + | grep -q __ARM_PCS_VFP
22189 + then
22190 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
22191 + else
22192 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
22193 + fi
22194 + fi
22195 + exit ;;
22196 + avr32*:Linux:*:*)
22197 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
22198 + exit ;;
22199 + cris:Linux:*:*)
22200 + echo ${UNAME_MACHINE}-axis-linux-${LIBC}
22201 + exit ;;
22202 + crisv32:Linux:*:*)
22203 + echo ${UNAME_MACHINE}-axis-linux-${LIBC}
22204 + exit ;;
22205 + frv:Linux:*:*)
22206 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
22207 + exit ;;
22208 + hexagon:Linux:*:*)
22209 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
22210 + exit ;;
22211 + i*86:Linux:*:*)
22212 + echo ${UNAME_MACHINE}-pc-linux-${LIBC}
22213 + exit ;;
22214 + ia64:Linux:*:*)
22215 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
22216 + exit ;;
22217 + m32r*:Linux:*:*)
22218 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
22219 + exit ;;
22220 + m68*:Linux:*:*)
22221 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
22222 + exit ;;
22223 + mips:Linux:*:* | mips64:Linux:*:*)
22224 + eval $set_cc_for_build
22225 + sed 's/^ //' << EOF >$dummy.c
22226 + #undef CPU
22227 + #undef ${UNAME_MACHINE}
22228 + #undef ${UNAME_MACHINE}el
22229 + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
22230 + CPU=${UNAME_MACHINE}el
22231 + #else
22232 + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
22233 + CPU=${UNAME_MACHINE}
22234 + #else
22235 + CPU=
22236 + #endif
22237 + #endif
22238 +EOF
22239 + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
22240 + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
22241 + ;;
22242 + or1k:Linux:*:*)
22243 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
22244 + exit ;;
22245 + or32:Linux:*:*)
22246 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
22247 + exit ;;
22248 + padre:Linux:*:*)
22249 + echo sparc-unknown-linux-${LIBC}
22250 + exit ;;
22251 + parisc64:Linux:*:* | hppa64:Linux:*:*)
22252 + echo hppa64-unknown-linux-${LIBC}
22253 + exit ;;
22254 + parisc:Linux:*:* | hppa:Linux:*:*)
22255 + # Look for CPU level
22256 + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
22257 + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
22258 + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
22259 + *) echo hppa-unknown-linux-${LIBC} ;;
22260 + esac
22261 + exit ;;
22262 + ppc64:Linux:*:*)
22263 + echo powerpc64-unknown-linux-${LIBC}
22264 + exit ;;
22265 + ppc:Linux:*:*)
22266 + echo powerpc-unknown-linux-${LIBC}
22267 + exit ;;
22268 + ppc64le:Linux:*:*)
22269 + echo powerpc64le-unknown-linux-${LIBC}
22270 + exit ;;
22271 + ppcle:Linux:*:*)
22272 + echo powerpcle-unknown-linux-${LIBC}
22273 + exit ;;
22274 + s390:Linux:*:* | s390x:Linux:*:*)
22275 + echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
22276 + exit ;;
22277 + sh64*:Linux:*:*)
22278 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
22279 + exit ;;
22280 + sh*:Linux:*:*)
22281 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
22282 + exit ;;
22283 + sparc:Linux:*:* | sparc64:Linux:*:*)
22284 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
22285 + exit ;;
22286 + tile*:Linux:*:*)
22287 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
22288 + exit ;;
22289 + vax:Linux:*:*)
22290 + echo ${UNAME_MACHINE}-dec-linux-${LIBC}
22291 + exit ;;
22292 + x86_64:Linux:*:*)
22293 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
22294 + exit ;;
22295 + xtensa*:Linux:*:*)
22296 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
22297 + exit ;;
22298 + i*86:DYNIX/ptx:4*:*)
22299 + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
22300 + # earlier versions are messed up and put the nodename in both
22301 + # sysname and nodename.
22302 + echo i386-sequent-sysv4
22303 + exit ;;
22304 + i*86:UNIX_SV:4.2MP:2.*)
22305 + # Unixware is an offshoot of SVR4, but it has its own version
22306 + # number series starting with 2...
22307 + # I am not positive that other SVR4 systems won't match this,
22308 + # I just have to hope. -- rms.
22309 + # Use sysv4.2uw... so that sysv4* matches it.
22310 + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
22311 + exit ;;
22312 + i*86:OS/2:*:*)
22313 + # If we were able to find `uname', then EMX Unix compatibility
22314 + # is probably installed.
22315 + echo ${UNAME_MACHINE}-pc-os2-emx
22316 + exit ;;
22317 + i*86:XTS-300:*:STOP)
22318 + echo ${UNAME_MACHINE}-unknown-stop
22319 + exit ;;
22320 + i*86:atheos:*:*)
22321 + echo ${UNAME_MACHINE}-unknown-atheos
22322 + exit ;;
22323 + i*86:syllable:*:*)
22324 + echo ${UNAME_MACHINE}-pc-syllable
22325 + exit ;;
22326 + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
22327 + echo i386-unknown-lynxos${UNAME_RELEASE}
22328 + exit ;;
22329 + i*86:*DOS:*:*)
22330 + echo ${UNAME_MACHINE}-pc-msdosdjgpp
22331 + exit ;;
22332 + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
22333 + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
22334 + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
22335 + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
22336 + else
22337 + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
22338 + fi
22339 + exit ;;
22340 + i*86:*:5:[678]*)
22341 + # UnixWare 7.x, OpenUNIX and OpenServer 6.
22342 + case `/bin/uname -X | grep "^Machine"` in
22343 + *486*) UNAME_MACHINE=i486 ;;
22344 + *Pentium) UNAME_MACHINE=i586 ;;
22345 + *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
22346 + esac
22347 + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
22348 + exit ;;
22349 + i*86:*:3.2:*)
22350 + if test -f /usr/options/cb.name; then
22351 + UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
22352 + echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
22353 + elif /bin/uname -X 2>/dev/null >/dev/null ; then
22354 + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
22355 + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
22356 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
22357 + && UNAME_MACHINE=i586
22358 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
22359 + && UNAME_MACHINE=i686
22360 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
22361 + && UNAME_MACHINE=i686
22362 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
22363 + else
22364 + echo ${UNAME_MACHINE}-pc-sysv32
22365 + fi
22366 + exit ;;
22367 + pc:*:*:*)
22368 + # Left here for compatibility:
22369 + # uname -m prints for DJGPP always 'pc', but it prints nothing about
22370 + # the processor, so we play safe by assuming i586.
22371 + # Note: whatever this is, it MUST be the same as what config.sub
22372 + # prints for the "djgpp" host, or else GDB configury will decide that
22373 + # this is a cross-build.
22374 + echo i586-pc-msdosdjgpp
22375 + exit ;;
22376 + Intel:Mach:3*:*)
22377 + echo i386-pc-mach3
22378 + exit ;;
22379 + paragon:*:*:*)
22380 + echo i860-intel-osf1
22381 + exit ;;
22382 + i860:*:4.*:*) # i860-SVR4
22383 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
22384 + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
22385 + else # Add other i860-SVR4 vendors below as they are discovered.
22386 + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
22387 + fi
22388 + exit ;;
22389 + mini*:CTIX:SYS*5:*)
22390 + # "miniframe"
22391 + echo m68010-convergent-sysv
22392 + exit ;;
22393 + mc68k:UNIX:SYSTEM5:3.51m)
22394 + echo m68k-convergent-sysv
22395 + exit ;;
22396 + M680?0:D-NIX:5.3:*)
22397 + echo m68k-diab-dnix
22398 + exit ;;
22399 + M68*:*:R3V[5678]*:*)
22400 + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
22401 + 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)
22402 + OS_REL=''
22403 + test -r /etc/.relid \
22404 + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
22405 + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
22406 + && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
22407 + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
22408 + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
22409 + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
22410 + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
22411 + && { echo i486-ncr-sysv4; exit; } ;;
22412 + NCR*:*:4.2:* | MPRAS*:*:4.2:*)
22413 + OS_REL='.3'
22414 + test -r /etc/.relid \
22415 + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
22416 + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
22417 + && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
22418 + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
22419 + && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
22420 + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
22421 + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
22422 + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
22423 + echo m68k-unknown-lynxos${UNAME_RELEASE}
22424 + exit ;;
22425 + mc68030:UNIX_System_V:4.*:*)
22426 + echo m68k-atari-sysv4
22427 + exit ;;
22428 + TSUNAMI:LynxOS:2.*:*)
22429 + echo sparc-unknown-lynxos${UNAME_RELEASE}
22430 + exit ;;
22431 + rs6000:LynxOS:2.*:*)
22432 + echo rs6000-unknown-lynxos${UNAME_RELEASE}
22433 + exit ;;
22434 + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
22435 + echo powerpc-unknown-lynxos${UNAME_RELEASE}
22436 + exit ;;
22437 + SM[BE]S:UNIX_SV:*:*)
22438 + echo mips-dde-sysv${UNAME_RELEASE}
22439 + exit ;;
22440 + RM*:ReliantUNIX-*:*:*)
22441 + echo mips-sni-sysv4
22442 + exit ;;
22443 + RM*:SINIX-*:*:*)
22444 + echo mips-sni-sysv4
22445 + exit ;;
22446 + *:SINIX-*:*:*)
22447 + if uname -p 2>/dev/null >/dev/null ; then
22448 + UNAME_MACHINE=`(uname -p) 2>/dev/null`
22449 + echo ${UNAME_MACHINE}-sni-sysv4
22450 + else
22451 + echo ns32k-sni-sysv
22452 + fi
22453 + exit ;;
22454 + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
22455 + # says <Richard.M.Bartel@ccMail.Census.GOV>
22456 + echo i586-unisys-sysv4
22457 + exit ;;
22458 + *:UNIX_System_V:4*:FTX*)
22459 + # From Gerald Hewes <hewes@openmarket.com>.
22460 + # How about differentiating between stratus architectures? -djm
22461 + echo hppa1.1-stratus-sysv4
22462 + exit ;;
22463 + *:*:*:FTX*)
22464 + # From seanf@swdc.stratus.com.
22465 + echo i860-stratus-sysv4
22466 + exit ;;
22467 + i*86:VOS:*:*)
22468 + # From Paul.Green@stratus.com.
22469 + echo ${UNAME_MACHINE}-stratus-vos
22470 + exit ;;
22471 + *:VOS:*:*)
22472 + # From Paul.Green@stratus.com.
22473 + echo hppa1.1-stratus-vos
22474 + exit ;;
22475 + mc68*:A/UX:*:*)
22476 + echo m68k-apple-aux${UNAME_RELEASE}
22477 + exit ;;
22478 + news*:NEWS-OS:6*:*)
22479 + echo mips-sony-newsos6
22480 + exit ;;
22481 + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
22482 + if [ -d /usr/nec ]; then
22483 + echo mips-nec-sysv${UNAME_RELEASE}
22484 + else
22485 + echo mips-unknown-sysv${UNAME_RELEASE}
22486 + fi
22487 + exit ;;
22488 + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
22489 + echo powerpc-be-beos
22490 + exit ;;
22491 + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
22492 + echo powerpc-apple-beos
22493 + exit ;;
22494 + BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
22495 + echo i586-pc-beos
22496 + exit ;;
22497 + BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
22498 + echo i586-pc-haiku
22499 + exit ;;
22500 + x86_64:Haiku:*:*)
22501 + echo x86_64-unknown-haiku
22502 + exit ;;
22503 + SX-4:SUPER-UX:*:*)
22504 + echo sx4-nec-superux${UNAME_RELEASE}
22505 + exit ;;
22506 + SX-5:SUPER-UX:*:*)
22507 + echo sx5-nec-superux${UNAME_RELEASE}
22508 + exit ;;
22509 + SX-6:SUPER-UX:*:*)
22510 + echo sx6-nec-superux${UNAME_RELEASE}
22511 + exit ;;
22512 + SX-7:SUPER-UX:*:*)
22513 + echo sx7-nec-superux${UNAME_RELEASE}
22514 + exit ;;
22515 + SX-8:SUPER-UX:*:*)
22516 + echo sx8-nec-superux${UNAME_RELEASE}
22517 + exit ;;
22518 + SX-8R:SUPER-UX:*:*)
22519 + echo sx8r-nec-superux${UNAME_RELEASE}
22520 + exit ;;
22521 + Power*:Rhapsody:*:*)
22522 + echo powerpc-apple-rhapsody${UNAME_RELEASE}
22523 + exit ;;
22524 + *:Rhapsody:*:*)
22525 + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
22526 + exit ;;
22527 + *:Darwin:*:*)
22528 + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
22529 + eval $set_cc_for_build
22530 + if test "$UNAME_PROCESSOR" = unknown ; then
22531 + UNAME_PROCESSOR=powerpc
22532 + fi
22533 + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
22534 + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
22535 + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
22536 + grep IS_64BIT_ARCH >/dev/null
22537 + then
22538 + case $UNAME_PROCESSOR in
22539 + i386) UNAME_PROCESSOR=x86_64 ;;
22540 + powerpc) UNAME_PROCESSOR=powerpc64 ;;
22541 + esac
22542 + fi
22543 + fi
22544 + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
22545 + exit ;;
22546 + *:procnto*:*:* | *:QNX:[0123456789]*:*)
22547 + UNAME_PROCESSOR=`uname -p`
22548 + if test "$UNAME_PROCESSOR" = "x86"; then
22549 + UNAME_PROCESSOR=i386
22550 + UNAME_MACHINE=pc
22551 + fi
22552 + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
22553 + exit ;;
22554 + *:QNX:*:4*)
22555 + echo i386-pc-qnx
22556 + exit ;;
22557 + NEO-?:NONSTOP_KERNEL:*:*)
22558 + echo neo-tandem-nsk${UNAME_RELEASE}
22559 + exit ;;
22560 + NSE-*:NONSTOP_KERNEL:*:*)
22561 + echo nse-tandem-nsk${UNAME_RELEASE}
22562 + exit ;;
22563 + NSR-?:NONSTOP_KERNEL:*:*)
22564 + echo nsr-tandem-nsk${UNAME_RELEASE}
22565 + exit ;;
22566 + *:NonStop-UX:*:*)
22567 + echo mips-compaq-nonstopux
22568 + exit ;;
22569 + BS2000:POSIX*:*:*)
22570 + echo bs2000-siemens-sysv
22571 + exit ;;
22572 + DS/*:UNIX_System_V:*:*)
22573 + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
22574 + exit ;;
22575 + *:Plan9:*:*)
22576 + # "uname -m" is not consistent, so use $cputype instead. 386
22577 + # is converted to i386 for consistency with other x86
22578 + # operating systems.
22579 + if test "$cputype" = "386"; then
22580 + UNAME_MACHINE=i386
22581 + else
22582 + UNAME_MACHINE="$cputype"
22583 + fi
22584 + echo ${UNAME_MACHINE}-unknown-plan9
22585 + exit ;;
22586 + *:TOPS-10:*:*)
22587 + echo pdp10-unknown-tops10
22588 + exit ;;
22589 + *:TENEX:*:*)
22590 + echo pdp10-unknown-tenex
22591 + exit ;;
22592 + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
22593 + echo pdp10-dec-tops20
22594 + exit ;;
22595 + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
22596 + echo pdp10-xkl-tops20
22597 + exit ;;
22598 + *:TOPS-20:*:*)
22599 + echo pdp10-unknown-tops20
22600 + exit ;;
22601 + *:ITS:*:*)
22602 + echo pdp10-unknown-its
22603 + exit ;;
22604 + SEI:*:*:SEIUX)
22605 + echo mips-sei-seiux${UNAME_RELEASE}
22606 + exit ;;
22607 + *:DragonFly:*:*)
22608 + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
22609 + exit ;;
22610 + *:*VMS:*:*)
22611 + UNAME_MACHINE=`(uname -p) 2>/dev/null`
22612 + case "${UNAME_MACHINE}" in
22613 + A*) echo alpha-dec-vms ; exit ;;
22614 + I*) echo ia64-dec-vms ; exit ;;
22615 + V*) echo vax-dec-vms ; exit ;;
22616 + esac ;;
22617 + *:XENIX:*:SysV)
22618 + echo i386-pc-xenix
22619 + exit ;;
22620 + i*86:skyos:*:*)
22621 + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
22622 + exit ;;
22623 + i*86:rdos:*:*)
22624 + echo ${UNAME_MACHINE}-pc-rdos
22625 + exit ;;
22626 + i*86:AROS:*:*)
22627 + echo ${UNAME_MACHINE}-pc-aros
22628 + exit ;;
22629 + x86_64:VMkernel:*:*)
22630 + echo ${UNAME_MACHINE}-unknown-esx
22631 + exit ;;
22632 +esac
22633 +
22634 +eval $set_cc_for_build
22635 +cat >$dummy.c <<EOF
22636 +#ifdef _SEQUENT_
22637 +# include <sys/types.h>
22638 +# include <sys/utsname.h>
22639 +#endif
22640 +main ()
22641 +{
22642 +#if defined (sony)
22643 +#if defined (MIPSEB)
22644 + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
22645 + I don't know.... */
22646 + printf ("mips-sony-bsd\n"); exit (0);
22647 +#else
22648 +#include <sys/param.h>
22649 + printf ("m68k-sony-newsos%s\n",
22650 +#ifdef NEWSOS4
22651 + "4"
22652 +#else
22653 + ""
22654 +#endif
22655 + ); exit (0);
22656 +#endif
22657 +#endif
22658 +
22659 +#if defined (__arm) && defined (__acorn) && defined (__unix)
22660 + printf ("arm-acorn-riscix\n"); exit (0);
22661 +#endif
22662 +
22663 +#if defined (hp300) && !defined (hpux)
22664 + printf ("m68k-hp-bsd\n"); exit (0);
22665 +#endif
22666 +
22667 +#if defined (NeXT)
22668 +#if !defined (__ARCHITECTURE__)
22669 +#define __ARCHITECTURE__ "m68k"
22670 +#endif
22671 + int version;
22672 + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
22673 + if (version < 4)
22674 + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
22675 + else
22676 + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
22677 + exit (0);
22678 +#endif
22679 +
22680 +#if defined (MULTIMAX) || defined (n16)
22681 +#if defined (UMAXV)
22682 + printf ("ns32k-encore-sysv\n"); exit (0);
22683 +#else
22684 +#if defined (CMU)
22685 + printf ("ns32k-encore-mach\n"); exit (0);
22686 +#else
22687 + printf ("ns32k-encore-bsd\n"); exit (0);
22688 +#endif
22689 +#endif
22690 +#endif
22691 +
22692 +#if defined (__386BSD__)
22693 + printf ("i386-pc-bsd\n"); exit (0);
22694 +#endif
22695 +
22696 +#if defined (sequent)
22697 +#if defined (i386)
22698 + printf ("i386-sequent-dynix\n"); exit (0);
22699 +#endif
22700 +#if defined (ns32000)
22701 + printf ("ns32k-sequent-dynix\n"); exit (0);
22702 +#endif
22703 +#endif
22704 +
22705 +#if defined (_SEQUENT_)
22706 + struct utsname un;
22707 +
22708 + uname(&un);
22709 +
22710 + if (strncmp(un.version, "V2", 2) == 0) {
22711 + printf ("i386-sequent-ptx2\n"); exit (0);
22712 + }
22713 + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
22714 + printf ("i386-sequent-ptx1\n"); exit (0);
22715 + }
22716 + printf ("i386-sequent-ptx\n"); exit (0);
22717 +
22718 +#endif
22719 +
22720 +#if defined (vax)
22721 +# if !defined (ultrix)
22722 +# include <sys/param.h>
22723 +# if defined (BSD)
22724 +# if BSD == 43
22725 + printf ("vax-dec-bsd4.3\n"); exit (0);
22726 +# else
22727 +# if BSD == 199006
22728 + printf ("vax-dec-bsd4.3reno\n"); exit (0);
22729 +# else
22730 + printf ("vax-dec-bsd\n"); exit (0);
22731 +# endif
22732 +# endif
22733 +# else
22734 + printf ("vax-dec-bsd\n"); exit (0);
22735 +# endif
22736 +# else
22737 + printf ("vax-dec-ultrix\n"); exit (0);
22738 +# endif
22739 +#endif
22740 +
22741 +#if defined (alliant) && defined (i860)
22742 + printf ("i860-alliant-bsd\n"); exit (0);
22743 +#endif
22744 +
22745 + exit (1);
22746 +}
22747 +EOF
22748 +
22749 +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
22750 + { echo "$SYSTEM_NAME"; exit; }
22751 +
22752 +# Apollos put the system type in the environment.
22753 +
22754 +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
22755 +
22756 +# Convex versions that predate uname can use getsysinfo(1)
22757 +
22758 +if [ -x /usr/convex/getsysinfo ]
22759 +then
22760 + case `getsysinfo -f cpu_type` in
22761 + c1*)
22762 + echo c1-convex-bsd
22763 + exit ;;
22764 + c2*)
22765 + if getsysinfo -f scalar_acc
22766 + then echo c32-convex-bsd
22767 + else echo c2-convex-bsd
22768 + fi
22769 + exit ;;
22770 + c34*)
22771 + echo c34-convex-bsd
22772 + exit ;;
22773 + c38*)
22774 + echo c38-convex-bsd
22775 + exit ;;
22776 + c4*)
22777 + echo c4-convex-bsd
22778 + exit ;;
22779 + esac
22780 +fi
22781 +
22782 +cat >&2 <<EOF
22783 +$0: unable to guess system type
22784 +
22785 +This script, last modified $timestamp, has failed to recognize
22786 +the operating system you are using. It is advised that you
22787 +download the most up to date version of the config scripts from
22788 +
22789 + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
22790 +and
22791 + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
22792 +
22793 +If the version you run ($0) is already up to date, please
22794 +send the following data and any information you think might be
22795 +pertinent to <config-patches@gnu.org> in order to provide the needed
22796 +information to handle your system.
22797 +
22798 +config.guess timestamp = $timestamp
22799 +
22800 +uname -m = `(uname -m) 2>/dev/null || echo unknown`
22801 +uname -r = `(uname -r) 2>/dev/null || echo unknown`
22802 +uname -s = `(uname -s) 2>/dev/null || echo unknown`
22803 +uname -v = `(uname -v) 2>/dev/null || echo unknown`
22804 +
22805 +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
22806 +/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
22807 +
22808 +hostinfo = `(hostinfo) 2>/dev/null`
22809 +/bin/universe = `(/bin/universe) 2>/dev/null`
22810 +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
22811 +/bin/arch = `(/bin/arch) 2>/dev/null`
22812 +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
22813 +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
22814 +
22815 +UNAME_MACHINE = ${UNAME_MACHINE}
22816 +UNAME_RELEASE = ${UNAME_RELEASE}
22817 +UNAME_SYSTEM = ${UNAME_SYSTEM}
22818 +UNAME_VERSION = ${UNAME_VERSION}
22819 +EOF
22820 +
22821 +exit 1
22822 +
22823 +# Local variables:
22824 +# eval: (add-hook 'write-file-hooks 'time-stamp)
22825 +# time-stamp-start: "timestamp='"
22826 +# time-stamp-format: "%:y-%02m-%02d"
22827 +# time-stamp-end: "'"
22828 +# End:
22829 --- /dev/null
22830 +++ b/m4/ltoptions.m4
22831 @@ -0,0 +1,384 @@
22832 +# Helper functions for option handling. -*- Autoconf -*-
22833 +#
22834 +# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
22835 +# Inc.
22836 +# Written by Gary V. Vaughan, 2004
22837 +#
22838 +# This file is free software; the Free Software Foundation gives
22839 +# unlimited permission to copy and/or distribute it, with or without
22840 +# modifications, as long as this notice is preserved.
22841 +
22842 +# serial 7 ltoptions.m4
22843 +
22844 +# This is to help aclocal find these macros, as it can't see m4_define.
22845 +AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
22846 +
22847 +
22848 +# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
22849 +# ------------------------------------------
22850 +m4_define([_LT_MANGLE_OPTION],
22851 +[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
22852 +
22853 +
22854 +# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
22855 +# ---------------------------------------
22856 +# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
22857 +# matching handler defined, dispatch to it. Other OPTION-NAMEs are
22858 +# saved as a flag.
22859 +m4_define([_LT_SET_OPTION],
22860 +[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
22861 +m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
22862 + _LT_MANGLE_DEFUN([$1], [$2]),
22863 + [m4_warning([Unknown $1 option `$2'])])[]dnl
22864 +])
22865 +
22866 +
22867 +# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
22868 +# ------------------------------------------------------------
22869 +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
22870 +m4_define([_LT_IF_OPTION],
22871 +[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
22872 +
22873 +
22874 +# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
22875 +# -------------------------------------------------------
22876 +# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
22877 +# are set.
22878 +m4_define([_LT_UNLESS_OPTIONS],
22879 +[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
22880 + [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
22881 + [m4_define([$0_found])])])[]dnl
22882 +m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
22883 +])[]dnl
22884 +])
22885 +
22886 +
22887 +# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
22888 +# ----------------------------------------
22889 +# OPTION-LIST is a space-separated list of Libtool options associated
22890 +# with MACRO-NAME. If any OPTION has a matching handler declared with
22891 +# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
22892 +# the unknown option and exit.
22893 +m4_defun([_LT_SET_OPTIONS],
22894 +[# Set options
22895 +m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
22896 + [_LT_SET_OPTION([$1], _LT_Option)])
22897 +
22898 +m4_if([$1],[LT_INIT],[
22899 + dnl
22900 + dnl Simply set some default values (i.e off) if boolean options were not
22901 + dnl specified:
22902 + _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
22903 + ])
22904 + _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
22905 + ])
22906 + dnl
22907 + dnl If no reference was made to various pairs of opposing options, then
22908 + dnl we run the default mode handler for the pair. For example, if neither
22909 + dnl `shared' nor `disable-shared' was passed, we enable building of shared
22910 + dnl archives by default:
22911 + _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
22912 + _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
22913 + _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
22914 + _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
22915 + [_LT_ENABLE_FAST_INSTALL])
22916 + ])
22917 +])# _LT_SET_OPTIONS
22918 +
22919 +
22920 +## --------------------------------- ##
22921 +## Macros to handle LT_INIT options. ##
22922 +## --------------------------------- ##
22923 +
22924 +# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
22925 +# -----------------------------------------
22926 +m4_define([_LT_MANGLE_DEFUN],
22927 +[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
22928 +
22929 +
22930 +# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
22931 +# -----------------------------------------------
22932 +m4_define([LT_OPTION_DEFINE],
22933 +[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
22934 +])# LT_OPTION_DEFINE
22935 +
22936 +
22937 +# dlopen
22938 +# ------
22939 +LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
22940 +])
22941 +
22942 +AU_DEFUN([AC_LIBTOOL_DLOPEN],
22943 +[_LT_SET_OPTION([LT_INIT], [dlopen])
22944 +AC_DIAGNOSE([obsolete],
22945 +[$0: Remove this warning and the call to _LT_SET_OPTION when you
22946 +put the `dlopen' option into LT_INIT's first parameter.])
22947 +])
22948 +
22949 +dnl aclocal-1.4 backwards compatibility:
22950 +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
22951 +
22952 +
22953 +# win32-dll
22954 +# ---------
22955 +# Declare package support for building win32 dll's.
22956 +LT_OPTION_DEFINE([LT_INIT], [win32-dll],
22957 +[enable_win32_dll=yes
22958 +
22959 +case $host in
22960 +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
22961 + AC_CHECK_TOOL(AS, as, false)
22962 + AC_CHECK_TOOL(DLLTOOL, dlltool, false)
22963 + AC_CHECK_TOOL(OBJDUMP, objdump, false)
22964 + ;;
22965 +esac
22966 +
22967 +test -z "$AS" && AS=as
22968 +_LT_DECL([], [AS], [1], [Assembler program])dnl
22969 +
22970 +test -z "$DLLTOOL" && DLLTOOL=dlltool
22971 +_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
22972 +
22973 +test -z "$OBJDUMP" && OBJDUMP=objdump
22974 +_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
22975 +])# win32-dll
22976 +
22977 +AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
22978 +[AC_REQUIRE([AC_CANONICAL_HOST])dnl
22979 +_LT_SET_OPTION([LT_INIT], [win32-dll])
22980 +AC_DIAGNOSE([obsolete],
22981 +[$0: Remove this warning and the call to _LT_SET_OPTION when you
22982 +put the `win32-dll' option into LT_INIT's first parameter.])
22983 +])
22984 +
22985 +dnl aclocal-1.4 backwards compatibility:
22986 +dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
22987 +
22988 +
22989 +# _LT_ENABLE_SHARED([DEFAULT])
22990 +# ----------------------------
22991 +# implement the --enable-shared flag, and supports the `shared' and
22992 +# `disable-shared' LT_INIT options.
22993 +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
22994 +m4_define([_LT_ENABLE_SHARED],
22995 +[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
22996 +AC_ARG_ENABLE([shared],
22997 + [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
22998 + [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
22999 + [p=${PACKAGE-default}
23000 + case $enableval in
23001 + yes) enable_shared=yes ;;
23002 + no) enable_shared=no ;;
23003 + *)
23004 + enable_shared=no
23005 + # Look at the argument we got. We use all the common list separators.
23006 + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
23007 + for pkg in $enableval; do
23008 + IFS="$lt_save_ifs"
23009 + if test "X$pkg" = "X$p"; then
23010 + enable_shared=yes
23011 + fi
23012 + done
23013 + IFS="$lt_save_ifs"
23014 + ;;
23015 + esac],
23016 + [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
23017 +
23018 + _LT_DECL([build_libtool_libs], [enable_shared], [0],
23019 + [Whether or not to build shared libraries])
23020 +])# _LT_ENABLE_SHARED
23021 +
23022 +LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
23023 +LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
23024 +
23025 +# Old names:
23026 +AC_DEFUN([AC_ENABLE_SHARED],
23027 +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
23028 +])
23029 +
23030 +AC_DEFUN([AC_DISABLE_SHARED],
23031 +[_LT_SET_OPTION([LT_INIT], [disable-shared])
23032 +])
23033 +
23034 +AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
23035 +AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
23036 +
23037 +dnl aclocal-1.4 backwards compatibility:
23038 +dnl AC_DEFUN([AM_ENABLE_SHARED], [])
23039 +dnl AC_DEFUN([AM_DISABLE_SHARED], [])
23040 +
23041 +
23042 +
23043 +# _LT_ENABLE_STATIC([DEFAULT])
23044 +# ----------------------------
23045 +# implement the --enable-static flag, and support the `static' and
23046 +# `disable-static' LT_INIT options.
23047 +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
23048 +m4_define([_LT_ENABLE_STATIC],
23049 +[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
23050 +AC_ARG_ENABLE([static],
23051 + [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
23052 + [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
23053 + [p=${PACKAGE-default}
23054 + case $enableval in
23055 + yes) enable_static=yes ;;
23056 + no) enable_static=no ;;
23057 + *)
23058 + enable_static=no
23059 + # Look at the argument we got. We use all the common list separators.
23060 + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
23061 + for pkg in $enableval; do
23062 + IFS="$lt_save_ifs"
23063 + if test "X$pkg" = "X$p"; then
23064 + enable_static=yes
23065 + fi
23066 + done
23067 + IFS="$lt_save_ifs"
23068 + ;;
23069 + esac],
23070 + [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
23071 +
23072 + _LT_DECL([build_old_libs], [enable_static], [0],
23073 + [Whether or not to build static libraries])
23074 +])# _LT_ENABLE_STATIC
23075 +
23076 +LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
23077 +LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
23078 +
23079 +# Old names:
23080 +AC_DEFUN([AC_ENABLE_STATIC],
23081 +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
23082 +])
23083 +
23084 +AC_DEFUN([AC_DISABLE_STATIC],
23085 +[_LT_SET_OPTION([LT_INIT], [disable-static])
23086 +])
23087 +
23088 +AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
23089 +AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
23090 +
23091 +dnl aclocal-1.4 backwards compatibility:
23092 +dnl AC_DEFUN([AM_ENABLE_STATIC], [])
23093 +dnl AC_DEFUN([AM_DISABLE_STATIC], [])
23094 +
23095 +
23096 +
23097 +# _LT_ENABLE_FAST_INSTALL([DEFAULT])
23098 +# ----------------------------------
23099 +# implement the --enable-fast-install flag, and support the `fast-install'
23100 +# and `disable-fast-install' LT_INIT options.
23101 +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
23102 +m4_define([_LT_ENABLE_FAST_INSTALL],
23103 +[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
23104 +AC_ARG_ENABLE([fast-install],
23105 + [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
23106 + [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
23107 + [p=${PACKAGE-default}
23108 + case $enableval in
23109 + yes) enable_fast_install=yes ;;
23110 + no) enable_fast_install=no ;;
23111 + *)
23112 + enable_fast_install=no
23113 + # Look at the argument we got. We use all the common list separators.
23114 + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
23115 + for pkg in $enableval; do
23116 + IFS="$lt_save_ifs"
23117 + if test "X$pkg" = "X$p"; then
23118 + enable_fast_install=yes
23119 + fi
23120 + done
23121 + IFS="$lt_save_ifs"
23122 + ;;
23123 + esac],
23124 + [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
23125 +
23126 +_LT_DECL([fast_install], [enable_fast_install], [0],
23127 + [Whether or not to optimize for fast installation])dnl
23128 +])# _LT_ENABLE_FAST_INSTALL
23129 +
23130 +LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
23131 +LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
23132 +
23133 +# Old names:
23134 +AU_DEFUN([AC_ENABLE_FAST_INSTALL],
23135 +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
23136 +AC_DIAGNOSE([obsolete],
23137 +[$0: Remove this warning and the call to _LT_SET_OPTION when you put
23138 +the `fast-install' option into LT_INIT's first parameter.])
23139 +])
23140 +
23141 +AU_DEFUN([AC_DISABLE_FAST_INSTALL],
23142 +[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
23143 +AC_DIAGNOSE([obsolete],
23144 +[$0: Remove this warning and the call to _LT_SET_OPTION when you put
23145 +the `disable-fast-install' option into LT_INIT's first parameter.])
23146 +])
23147 +
23148 +dnl aclocal-1.4 backwards compatibility:
23149 +dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
23150 +dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
23151 +
23152 +
23153 +# _LT_WITH_PIC([MODE])
23154 +# --------------------
23155 +# implement the --with-pic flag, and support the `pic-only' and `no-pic'
23156 +# LT_INIT options.
23157 +# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
23158 +m4_define([_LT_WITH_PIC],
23159 +[AC_ARG_WITH([pic],
23160 + [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
23161 + [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
23162 + [lt_p=${PACKAGE-default}
23163 + case $withval in
23164 + yes|no) pic_mode=$withval ;;
23165 + *)
23166 + pic_mode=default
23167 + # Look at the argument we got. We use all the common list separators.
23168 + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
23169 + for lt_pkg in $withval; do
23170 + IFS="$lt_save_ifs"
23171 + if test "X$lt_pkg" = "X$lt_p"; then
23172 + pic_mode=yes
23173 + fi
23174 + done
23175 + IFS="$lt_save_ifs"
23176 + ;;
23177 + esac],
23178 + [pic_mode=default])
23179 +
23180 +test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
23181 +
23182 +_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
23183 +])# _LT_WITH_PIC
23184 +
23185 +LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
23186 +LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
23187 +
23188 +# Old name:
23189 +AU_DEFUN([AC_LIBTOOL_PICMODE],
23190 +[_LT_SET_OPTION([LT_INIT], [pic-only])
23191 +AC_DIAGNOSE([obsolete],
23192 +[$0: Remove this warning and the call to _LT_SET_OPTION when you
23193 +put the `pic-only' option into LT_INIT's first parameter.])
23194 +])
23195 +
23196 +dnl aclocal-1.4 backwards compatibility:
23197 +dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
23198 +
23199 +## ----------------- ##
23200 +## LTDL_INIT Options ##
23201 +## ----------------- ##
23202 +
23203 +m4_define([_LTDL_MODE], [])
23204 +LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
23205 + [m4_define([_LTDL_MODE], [nonrecursive])])
23206 +LT_OPTION_DEFINE([LTDL_INIT], [recursive],
23207 + [m4_define([_LTDL_MODE], [recursive])])
23208 +LT_OPTION_DEFINE([LTDL_INIT], [subproject],
23209 + [m4_define([_LTDL_MODE], [subproject])])
23210 +
23211 +m4_define([_LTDL_TYPE], [])
23212 +LT_OPTION_DEFINE([LTDL_INIT], [installable],
23213 + [m4_define([_LTDL_TYPE], [installable])])
23214 +LT_OPTION_DEFINE([LTDL_INIT], [convenience],
23215 + [m4_define([_LTDL_TYPE], [convenience])])
23216 --- /dev/null
23217 +++ b/m4/libtool.m4
23218 @@ -0,0 +1,7991 @@
23219 +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
23220 +#
23221 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
23222 +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
23223 +# Foundation, Inc.
23224 +# Written by Gordon Matzigkeit, 1996
23225 +#
23226 +# This file is free software; the Free Software Foundation gives
23227 +# unlimited permission to copy and/or distribute it, with or without
23228 +# modifications, as long as this notice is preserved.
23229 +
23230 +m4_define([_LT_COPYING], [dnl
23231 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
23232 +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
23233 +# Foundation, Inc.
23234 +# Written by Gordon Matzigkeit, 1996
23235 +#
23236 +# This file is part of GNU Libtool.
23237 +#
23238 +# GNU Libtool is free software; you can redistribute it and/or
23239 +# modify it under the terms of the GNU General Public License as
23240 +# published by the Free Software Foundation; either version 2 of
23241 +# the License, or (at your option) any later version.
23242 +#
23243 +# As a special exception to the GNU General Public License,
23244 +# if you distribute this file as part of a program or library that
23245 +# is built using GNU Libtool, you may include this file under the
23246 +# same distribution terms that you use for the rest of that program.
23247 +#
23248 +# GNU Libtool is distributed in the hope that it will be useful,
23249 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
23250 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23251 +# GNU General Public License for more details.
23252 +#
23253 +# You should have received a copy of the GNU General Public License
23254 +# along with GNU Libtool; see the file COPYING. If not, a copy
23255 +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
23256 +# obtained by writing to the Free Software Foundation, Inc.,
23257 +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23258 +])
23259 +
23260 +# serial 57 LT_INIT
23261 +
23262 +
23263 +# LT_PREREQ(VERSION)
23264 +# ------------------
23265 +# Complain and exit if this libtool version is less that VERSION.
23266 +m4_defun([LT_PREREQ],
23267 +[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
23268 + [m4_default([$3],
23269 + [m4_fatal([Libtool version $1 or higher is required],
23270 + 63)])],
23271 + [$2])])
23272 +
23273 +
23274 +# _LT_CHECK_BUILDDIR
23275 +# ------------------
23276 +# Complain if the absolute build directory name contains unusual characters
23277 +m4_defun([_LT_CHECK_BUILDDIR],
23278 +[case `pwd` in
23279 + *\ * | *\ *)
23280 + AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
23281 +esac
23282 +])
23283 +
23284 +
23285 +# LT_INIT([OPTIONS])
23286 +# ------------------
23287 +AC_DEFUN([LT_INIT],
23288 +[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
23289 +AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
23290 +AC_BEFORE([$0], [LT_LANG])dnl
23291 +AC_BEFORE([$0], [LT_OUTPUT])dnl
23292 +AC_BEFORE([$0], [LTDL_INIT])dnl
23293 +m4_require([_LT_CHECK_BUILDDIR])dnl
23294 +
23295 +dnl Autoconf doesn't catch unexpanded LT_ macros by default:
23296 +m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
23297 +m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
23298 +dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
23299 +dnl unless we require an AC_DEFUNed macro:
23300 +AC_REQUIRE([LTOPTIONS_VERSION])dnl
23301 +AC_REQUIRE([LTSUGAR_VERSION])dnl
23302 +AC_REQUIRE([LTVERSION_VERSION])dnl
23303 +AC_REQUIRE([LTOBSOLETE_VERSION])dnl
23304 +m4_require([_LT_PROG_LTMAIN])dnl
23305 +
23306 +_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
23307 +
23308 +dnl Parse OPTIONS
23309 +_LT_SET_OPTIONS([$0], [$1])
23310 +
23311 +# This can be used to rebuild libtool when needed
23312 +LIBTOOL_DEPS="$ltmain"
23313 +
23314 +# Always use our own libtool.
23315 +LIBTOOL='$(SHELL) $(top_builddir)/libtool'
23316 +AC_SUBST(LIBTOOL)dnl
23317 +
23318 +_LT_SETUP
23319 +
23320 +# Only expand once:
23321 +m4_define([LT_INIT])
23322 +])# LT_INIT
23323 +
23324 +# Old names:
23325 +AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
23326 +AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
23327 +dnl aclocal-1.4 backwards compatibility:
23328 +dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
23329 +dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
23330 +
23331 +
23332 +# _LT_CC_BASENAME(CC)
23333 +# -------------------
23334 +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
23335 +m4_defun([_LT_CC_BASENAME],
23336 +[for cc_temp in $1""; do
23337 + case $cc_temp in
23338 + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
23339 + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
23340 + \-*) ;;
23341 + *) break;;
23342 + esac
23343 +done
23344 +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
23345 +])
23346 +
23347 +
23348 +# _LT_FILEUTILS_DEFAULTS
23349 +# ----------------------
23350 +# It is okay to use these file commands and assume they have been set
23351 +# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
23352 +m4_defun([_LT_FILEUTILS_DEFAULTS],
23353 +[: ${CP="cp -f"}
23354 +: ${MV="mv -f"}
23355 +: ${RM="rm -f"}
23356 +])# _LT_FILEUTILS_DEFAULTS
23357 +
23358 +
23359 +# _LT_SETUP
23360 +# ---------
23361 +m4_defun([_LT_SETUP],
23362 +[AC_REQUIRE([AC_CANONICAL_HOST])dnl
23363 +AC_REQUIRE([AC_CANONICAL_BUILD])dnl
23364 +AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
23365 +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
23366 +
23367 +_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
23368 +dnl
23369 +_LT_DECL([], [host_alias], [0], [The host system])dnl
23370 +_LT_DECL([], [host], [0])dnl
23371 +_LT_DECL([], [host_os], [0])dnl
23372 +dnl
23373 +_LT_DECL([], [build_alias], [0], [The build system])dnl
23374 +_LT_DECL([], [build], [0])dnl
23375 +_LT_DECL([], [build_os], [0])dnl
23376 +dnl
23377 +AC_REQUIRE([AC_PROG_CC])dnl
23378 +AC_REQUIRE([LT_PATH_LD])dnl
23379 +AC_REQUIRE([LT_PATH_NM])dnl
23380 +dnl
23381 +AC_REQUIRE([AC_PROG_LN_S])dnl
23382 +test -z "$LN_S" && LN_S="ln -s"
23383 +_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
23384 +dnl
23385 +AC_REQUIRE([LT_CMD_MAX_LEN])dnl
23386 +_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
23387 +_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
23388 +dnl
23389 +m4_require([_LT_FILEUTILS_DEFAULTS])dnl
23390 +m4_require([_LT_CHECK_SHELL_FEATURES])dnl
23391 +m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
23392 +m4_require([_LT_CMD_RELOAD])dnl
23393 +m4_require([_LT_CHECK_MAGIC_METHOD])dnl
23394 +m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
23395 +m4_require([_LT_CMD_OLD_ARCHIVE])dnl
23396 +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
23397 +m4_require([_LT_WITH_SYSROOT])dnl
23398 +
23399 +_LT_CONFIG_LIBTOOL_INIT([
23400 +# See if we are running on zsh, and set the options which allow our
23401 +# commands through without removal of \ escapes INIT.
23402 +if test -n "\${ZSH_VERSION+set}" ; then
23403 + setopt NO_GLOB_SUBST
23404 +fi
23405 +])
23406 +if test -n "${ZSH_VERSION+set}" ; then
23407 + setopt NO_GLOB_SUBST
23408 +fi
23409 +
23410 +_LT_CHECK_OBJDIR
23411 +
23412 +m4_require([_LT_TAG_COMPILER])dnl
23413 +
23414 +case $host_os in
23415 +aix3*)
23416 + # AIX sometimes has problems with the GCC collect2 program. For some
23417 + # reason, if we set the COLLECT_NAMES environment variable, the problems
23418 + # vanish in a puff of smoke.
23419 + if test "X${COLLECT_NAMES+set}" != Xset; then
23420 + COLLECT_NAMES=
23421 + export COLLECT_NAMES
23422 + fi
23423 + ;;
23424 +esac
23425 +
23426 +# Global variables:
23427 +ofile=libtool
23428 +can_build_shared=yes
23429 +
23430 +# All known linkers require a `.a' archive for static linking (except MSVC,
23431 +# which needs '.lib').
23432 +libext=a
23433 +
23434 +with_gnu_ld="$lt_cv_prog_gnu_ld"
23435 +
23436 +old_CC="$CC"
23437 +old_CFLAGS="$CFLAGS"
23438 +
23439 +# Set sane defaults for various variables
23440 +test -z "$CC" && CC=cc
23441 +test -z "$LTCC" && LTCC=$CC
23442 +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
23443 +test -z "$LD" && LD=ld
23444 +test -z "$ac_objext" && ac_objext=o
23445 +
23446 +_LT_CC_BASENAME([$compiler])
23447 +
23448 +# Only perform the check for file, if the check method requires it
23449 +test -z "$MAGIC_CMD" && MAGIC_CMD=file
23450 +case $deplibs_check_method in
23451 +file_magic*)
23452 + if test "$file_magic_cmd" = '$MAGIC_CMD'; then
23453 + _LT_PATH_MAGIC
23454 + fi
23455 + ;;
23456 +esac
23457 +
23458 +# Use C for the default configuration in the libtool script
23459 +LT_SUPPORTED_TAG([CC])
23460 +_LT_LANG_C_CONFIG
23461 +_LT_LANG_DEFAULT_CONFIG
23462 +_LT_CONFIG_COMMANDS
23463 +])# _LT_SETUP
23464 +
23465 +
23466 +# _LT_PREPARE_SED_QUOTE_VARS
23467 +# --------------------------
23468 +# Define a few sed substitution that help us do robust quoting.
23469 +m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
23470 +[# Backslashify metacharacters that are still active within
23471 +# double-quoted strings.
23472 +sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
23473 +
23474 +# Same as above, but do not quote variable references.
23475 +double_quote_subst='s/\([["`\\]]\)/\\\1/g'
23476 +
23477 +# Sed substitution to delay expansion of an escaped shell variable in a
23478 +# double_quote_subst'ed string.
23479 +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
23480 +
23481 +# Sed substitution to delay expansion of an escaped single quote.
23482 +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
23483 +
23484 +# Sed substitution to avoid accidental globbing in evaled expressions
23485 +no_glob_subst='s/\*/\\\*/g'
23486 +])
23487 +
23488 +# _LT_PROG_LTMAIN
23489 +# ---------------
23490 +# Note that this code is called both from `configure', and `config.status'
23491 +# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
23492 +# `config.status' has no value for ac_aux_dir unless we are using Automake,
23493 +# so we pass a copy along to make sure it has a sensible value anyway.
23494 +m4_defun([_LT_PROG_LTMAIN],
23495 +[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
23496 +_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
23497 +ltmain="$ac_aux_dir/ltmain.sh"
23498 +])# _LT_PROG_LTMAIN
23499 +
23500 +
23501 +## ------------------------------------- ##
23502 +## Accumulate code for creating libtool. ##
23503 +## ------------------------------------- ##
23504 +
23505 +# So that we can recreate a full libtool script including additional
23506 +# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
23507 +# in macros and then make a single call at the end using the `libtool'
23508 +# label.
23509 +
23510 +
23511 +# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
23512 +# ----------------------------------------
23513 +# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
23514 +m4_define([_LT_CONFIG_LIBTOOL_INIT],
23515 +[m4_ifval([$1],
23516 + [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
23517 + [$1
23518 +])])])
23519 +
23520 +# Initialize.
23521 +m4_define([_LT_OUTPUT_LIBTOOL_INIT])
23522 +
23523 +
23524 +# _LT_CONFIG_LIBTOOL([COMMANDS])
23525 +# ------------------------------
23526 +# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
23527 +m4_define([_LT_CONFIG_LIBTOOL],
23528 +[m4_ifval([$1],
23529 + [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
23530 + [$1
23531 +])])])
23532 +
23533 +# Initialize.
23534 +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
23535 +
23536 +
23537 +# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
23538 +# -----------------------------------------------------
23539 +m4_defun([_LT_CONFIG_SAVE_COMMANDS],
23540 +[_LT_CONFIG_LIBTOOL([$1])
23541 +_LT_CONFIG_LIBTOOL_INIT([$2])
23542 +])
23543 +
23544 +
23545 +# _LT_FORMAT_COMMENT([COMMENT])
23546 +# -----------------------------
23547 +# Add leading comment marks to the start of each line, and a trailing
23548 +# full-stop to the whole comment if one is not present already.
23549 +m4_define([_LT_FORMAT_COMMENT],
23550 +[m4_ifval([$1], [
23551 +m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
23552 + [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
23553 +)])
23554 +
23555 +
23556 +
23557 +## ------------------------ ##
23558 +## FIXME: Eliminate VARNAME ##
23559 +## ------------------------ ##
23560 +
23561 +
23562 +# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
23563 +# -------------------------------------------------------------------
23564 +# CONFIGNAME is the name given to the value in the libtool script.
23565 +# VARNAME is the (base) name used in the configure script.
23566 +# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
23567 +# VARNAME. Any other value will be used directly.
23568 +m4_define([_LT_DECL],
23569 +[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
23570 + [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
23571 + [m4_ifval([$1], [$1], [$2])])
23572 + lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
23573 + m4_ifval([$4],
23574 + [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
23575 + lt_dict_add_subkey([lt_decl_dict], [$2],
23576 + [tagged?], [m4_ifval([$5], [yes], [no])])])
23577 +])
23578 +
23579 +
23580 +# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
23581 +# --------------------------------------------------------
23582 +m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
23583 +
23584 +
23585 +# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
23586 +# ------------------------------------------------
23587 +m4_define([lt_decl_tag_varnames],
23588 +[_lt_decl_filter([tagged?], [yes], $@)])
23589 +
23590 +
23591 +# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
23592 +# ---------------------------------------------------------
23593 +m4_define([_lt_decl_filter],
23594 +[m4_case([$#],
23595 + [0], [m4_fatal([$0: too few arguments: $#])],
23596 + [1], [m4_fatal([$0: too few arguments: $#: $1])],
23597 + [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
23598 + [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
23599 + [lt_dict_filter([lt_decl_dict], $@)])[]dnl
23600 +])
23601 +
23602 +
23603 +# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
23604 +# --------------------------------------------------
23605 +m4_define([lt_decl_quote_varnames],
23606 +[_lt_decl_filter([value], [1], $@)])
23607 +
23608 +
23609 +# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
23610 +# ---------------------------------------------------
23611 +m4_define([lt_decl_dquote_varnames],
23612 +[_lt_decl_filter([value], [2], $@)])
23613 +
23614 +
23615 +# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
23616 +# ---------------------------------------------------
23617 +m4_define([lt_decl_varnames_tagged],
23618 +[m4_assert([$# <= 2])dnl
23619 +_$0(m4_quote(m4_default([$1], [[, ]])),
23620 + m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
23621 + m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
23622 +m4_define([_lt_decl_varnames_tagged],
23623 +[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
23624 +
23625 +
23626 +# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
23627 +# ------------------------------------------------
23628 +m4_define([lt_decl_all_varnames],
23629 +[_$0(m4_quote(m4_default([$1], [[, ]])),
23630 + m4_if([$2], [],
23631 + m4_quote(lt_decl_varnames),
23632 + m4_quote(m4_shift($@))))[]dnl
23633 +])
23634 +m4_define([_lt_decl_all_varnames],
23635 +[lt_join($@, lt_decl_varnames_tagged([$1],
23636 + lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
23637 +])
23638 +
23639 +
23640 +# _LT_CONFIG_STATUS_DECLARE([VARNAME])
23641 +# ------------------------------------
23642 +# Quote a variable value, and forward it to `config.status' so that its
23643 +# declaration there will have the same value as in `configure'. VARNAME
23644 +# must have a single quote delimited value for this to work.
23645 +m4_define([_LT_CONFIG_STATUS_DECLARE],
23646 +[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
23647 +
23648 +
23649 +# _LT_CONFIG_STATUS_DECLARATIONS
23650 +# ------------------------------
23651 +# We delimit libtool config variables with single quotes, so when
23652 +# we write them to config.status, we have to be sure to quote all
23653 +# embedded single quotes properly. In configure, this macro expands
23654 +# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
23655 +#
23656 +# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
23657 +m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
23658 +[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
23659 + [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
23660 +
23661 +
23662 +# _LT_LIBTOOL_TAGS
23663 +# ----------------
23664 +# Output comment and list of tags supported by the script
23665 +m4_defun([_LT_LIBTOOL_TAGS],
23666 +[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
23667 +available_tags="_LT_TAGS"dnl
23668 +])
23669 +
23670 +
23671 +# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
23672 +# -----------------------------------
23673 +# Extract the dictionary values for VARNAME (optionally with TAG) and
23674 +# expand to a commented shell variable setting:
23675 +#
23676 +# # Some comment about what VAR is for.
23677 +# visible_name=$lt_internal_name
23678 +m4_define([_LT_LIBTOOL_DECLARE],
23679 +[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
23680 + [description])))[]dnl
23681 +m4_pushdef([_libtool_name],
23682 + m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
23683 +m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
23684 + [0], [_libtool_name=[$]$1],
23685 + [1], [_libtool_name=$lt_[]$1],
23686 + [2], [_libtool_name=$lt_[]$1],
23687 + [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
23688 +m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
23689 +])
23690 +
23691 +
23692 +# _LT_LIBTOOL_CONFIG_VARS
23693 +# -----------------------
23694 +# Produce commented declarations of non-tagged libtool config variables
23695 +# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
23696 +# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
23697 +# section) are produced by _LT_LIBTOOL_TAG_VARS.
23698 +m4_defun([_LT_LIBTOOL_CONFIG_VARS],
23699 +[m4_foreach([_lt_var],
23700 + m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
23701 + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
23702 +
23703 +
23704 +# _LT_LIBTOOL_TAG_VARS(TAG)
23705 +# -------------------------
23706 +m4_define([_LT_LIBTOOL_TAG_VARS],
23707 +[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
23708 + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
23709 +
23710 +
23711 +# _LT_TAGVAR(VARNAME, [TAGNAME])
23712 +# ------------------------------
23713 +m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
23714 +
23715 +
23716 +# _LT_CONFIG_COMMANDS
23717 +# -------------------
23718 +# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
23719 +# variables for single and double quote escaping we saved from calls
23720 +# to _LT_DECL, we can put quote escaped variables declarations
23721 +# into `config.status', and then the shell code to quote escape them in
23722 +# for loops in `config.status'. Finally, any additional code accumulated
23723 +# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
23724 +m4_defun([_LT_CONFIG_COMMANDS],
23725 +[AC_PROVIDE_IFELSE([LT_OUTPUT],
23726 + dnl If the libtool generation code has been placed in $CONFIG_LT,
23727 + dnl instead of duplicating it all over again into config.status,
23728 + dnl then we will have config.status run $CONFIG_LT later, so it
23729 + dnl needs to know what name is stored there:
23730 + [AC_CONFIG_COMMANDS([libtool],
23731 + [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
23732 + dnl If the libtool generation code is destined for config.status,
23733 + dnl expand the accumulated commands and init code now:
23734 + [AC_CONFIG_COMMANDS([libtool],
23735 + [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
23736 +])#_LT_CONFIG_COMMANDS
23737 +
23738 +
23739 +# Initialize.
23740 +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
23741 +[
23742 +
23743 +# The HP-UX ksh and POSIX shell print the target directory to stdout
23744 +# if CDPATH is set.
23745 +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
23746 +
23747 +sed_quote_subst='$sed_quote_subst'
23748 +double_quote_subst='$double_quote_subst'
23749 +delay_variable_subst='$delay_variable_subst'
23750 +_LT_CONFIG_STATUS_DECLARATIONS
23751 +LTCC='$LTCC'
23752 +LTCFLAGS='$LTCFLAGS'
23753 +compiler='$compiler_DEFAULT'
23754 +
23755 +# A function that is used when there is no print builtin or printf.
23756 +func_fallback_echo ()
23757 +{
23758 + eval 'cat <<_LTECHO_EOF
23759 +\$[]1
23760 +_LTECHO_EOF'
23761 +}
23762 +
23763 +# Quote evaled strings.
23764 +for var in lt_decl_all_varnames([[ \
23765 +]], lt_decl_quote_varnames); do
23766 + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
23767 + *[[\\\\\\\`\\"\\\$]]*)
23768 + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
23769 + ;;
23770 + *)
23771 + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
23772 + ;;
23773 + esac
23774 +done
23775 +
23776 +# Double-quote double-evaled strings.
23777 +for var in lt_decl_all_varnames([[ \
23778 +]], lt_decl_dquote_varnames); do
23779 + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
23780 + *[[\\\\\\\`\\"\\\$]]*)
23781 + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
23782 + ;;
23783 + *)
23784 + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
23785 + ;;
23786 + esac
23787 +done
23788 +
23789 +_LT_OUTPUT_LIBTOOL_INIT
23790 +])
23791 +
23792 +# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
23793 +# ------------------------------------
23794 +# Generate a child script FILE with all initialization necessary to
23795 +# reuse the environment learned by the parent script, and make the
23796 +# file executable. If COMMENT is supplied, it is inserted after the
23797 +# `#!' sequence but before initialization text begins. After this
23798 +# macro, additional text can be appended to FILE to form the body of
23799 +# the child script. The macro ends with non-zero status if the
23800 +# file could not be fully written (such as if the disk is full).
23801 +m4_ifdef([AS_INIT_GENERATED],
23802 +[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
23803 +[m4_defun([_LT_GENERATED_FILE_INIT],
23804 +[m4_require([AS_PREPARE])]dnl
23805 +[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
23806 +[lt_write_fail=0
23807 +cat >$1 <<_ASEOF || lt_write_fail=1
23808 +#! $SHELL
23809 +# Generated by $as_me.
23810 +$2
23811 +SHELL=\${CONFIG_SHELL-$SHELL}
23812 +export SHELL
23813 +_ASEOF
23814 +cat >>$1 <<\_ASEOF || lt_write_fail=1
23815 +AS_SHELL_SANITIZE
23816 +_AS_PREPARE
23817 +exec AS_MESSAGE_FD>&1
23818 +_ASEOF
23819 +test $lt_write_fail = 0 && chmod +x $1[]dnl
23820 +m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
23821 +
23822 +# LT_OUTPUT
23823 +# ---------
23824 +# This macro allows early generation of the libtool script (before
23825 +# AC_OUTPUT is called), incase it is used in configure for compilation
23826 +# tests.
23827 +AC_DEFUN([LT_OUTPUT],
23828 +[: ${CONFIG_LT=./config.lt}
23829 +AC_MSG_NOTICE([creating $CONFIG_LT])
23830 +_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
23831 +[# Run this file to recreate a libtool stub with the current configuration.])
23832 +
23833 +cat >>"$CONFIG_LT" <<\_LTEOF
23834 +lt_cl_silent=false
23835 +exec AS_MESSAGE_LOG_FD>>config.log
23836 +{
23837 + echo
23838 + AS_BOX([Running $as_me.])
23839 +} >&AS_MESSAGE_LOG_FD
23840 +
23841 +lt_cl_help="\
23842 +\`$as_me' creates a local libtool stub from the current configuration,
23843 +for use in further configure time tests before the real libtool is
23844 +generated.
23845 +
23846 +Usage: $[0] [[OPTIONS]]
23847 +
23848 + -h, --help print this help, then exit
23849 + -V, --version print version number, then exit
23850 + -q, --quiet do not print progress messages
23851 + -d, --debug don't remove temporary files
23852 +
23853 +Report bugs to <bug-libtool@gnu.org>."
23854 +
23855 +lt_cl_version="\
23856 +m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
23857 +m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
23858 +configured by $[0], generated by m4_PACKAGE_STRING.
23859 +
23860 +Copyright (C) 2011 Free Software Foundation, Inc.
23861 +This config.lt script is free software; the Free Software Foundation
23862 +gives unlimited permision to copy, distribute and modify it."
23863 +
23864 +while test $[#] != 0
23865 +do
23866 + case $[1] in
23867 + --version | --v* | -V )
23868 + echo "$lt_cl_version"; exit 0 ;;
23869 + --help | --h* | -h )
23870 + echo "$lt_cl_help"; exit 0 ;;
23871 + --debug | --d* | -d )
23872 + debug=: ;;
23873 + --quiet | --q* | --silent | --s* | -q )
23874 + lt_cl_silent=: ;;
23875 +
23876 + -*) AC_MSG_ERROR([unrecognized option: $[1]
23877 +Try \`$[0] --help' for more information.]) ;;
23878 +
23879 + *) AC_MSG_ERROR([unrecognized argument: $[1]
23880 +Try \`$[0] --help' for more information.]) ;;
23881 + esac
23882 + shift
23883 +done
23884 +
23885 +if $lt_cl_silent; then
23886 + exec AS_MESSAGE_FD>/dev/null
23887 +fi
23888 +_LTEOF
23889 +
23890 +cat >>"$CONFIG_LT" <<_LTEOF
23891 +_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
23892 +_LTEOF
23893 +
23894 +cat >>"$CONFIG_LT" <<\_LTEOF
23895 +AC_MSG_NOTICE([creating $ofile])
23896 +_LT_OUTPUT_LIBTOOL_COMMANDS
23897 +AS_EXIT(0)
23898 +_LTEOF
23899 +chmod +x "$CONFIG_LT"
23900 +
23901 +# configure is writing to config.log, but config.lt does its own redirection,
23902 +# appending to config.log, which fails on DOS, as config.log is still kept
23903 +# open by configure. Here we exec the FD to /dev/null, effectively closing
23904 +# config.log, so it can be properly (re)opened and appended to by config.lt.
23905 +lt_cl_success=:
23906 +test "$silent" = yes &&
23907 + lt_config_lt_args="$lt_config_lt_args --quiet"
23908 +exec AS_MESSAGE_LOG_FD>/dev/null
23909 +$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
23910 +exec AS_MESSAGE_LOG_FD>>config.log
23911 +$lt_cl_success || AS_EXIT(1)
23912 +])# LT_OUTPUT
23913 +
23914 +
23915 +# _LT_CONFIG(TAG)
23916 +# ---------------
23917 +# If TAG is the built-in tag, create an initial libtool script with a
23918 +# default configuration from the untagged config vars. Otherwise add code
23919 +# to config.status for appending the configuration named by TAG from the
23920 +# matching tagged config vars.
23921 +m4_defun([_LT_CONFIG],
23922 +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
23923 +_LT_CONFIG_SAVE_COMMANDS([
23924 + m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
23925 + m4_if(_LT_TAG, [C], [
23926 + # See if we are running on zsh, and set the options which allow our
23927 + # commands through without removal of \ escapes.
23928 + if test -n "${ZSH_VERSION+set}" ; then
23929 + setopt NO_GLOB_SUBST
23930 + fi
23931 +
23932 + cfgfile="${ofile}T"
23933 + trap "$RM \"$cfgfile\"; exit 1" 1 2 15
23934 + $RM "$cfgfile"
23935 +
23936 + cat <<_LT_EOF >> "$cfgfile"
23937 +#! $SHELL
23938 +
23939 +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
23940 +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
23941 +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
23942 +# NOTE: Changes made to this file will be lost: look at ltmain.sh.
23943 +#
23944 +_LT_COPYING
23945 +_LT_LIBTOOL_TAGS
23946 +
23947 +# ### BEGIN LIBTOOL CONFIG
23948 +_LT_LIBTOOL_CONFIG_VARS
23949 +_LT_LIBTOOL_TAG_VARS
23950 +# ### END LIBTOOL CONFIG
23951 +
23952 +_LT_EOF
23953 +
23954 + case $host_os in
23955 + aix3*)
23956 + cat <<\_LT_EOF >> "$cfgfile"
23957 +# AIX sometimes has problems with the GCC collect2 program. For some
23958 +# reason, if we set the COLLECT_NAMES environment variable, the problems
23959 +# vanish in a puff of smoke.
23960 +if test "X${COLLECT_NAMES+set}" != Xset; then
23961 + COLLECT_NAMES=
23962 + export COLLECT_NAMES
23963 +fi
23964 +_LT_EOF
23965 + ;;
23966 + esac
23967 +
23968 + _LT_PROG_LTMAIN
23969 +
23970 + # We use sed instead of cat because bash on DJGPP gets confused if
23971 + # if finds mixed CR/LF and LF-only lines. Since sed operates in
23972 + # text mode, it properly converts lines to CR/LF. This bash problem
23973 + # is reportedly fixed, but why not run on old versions too?
23974 + sed '$q' "$ltmain" >> "$cfgfile" \
23975 + || (rm -f "$cfgfile"; exit 1)
23976 +
23977 + _LT_PROG_REPLACE_SHELLFNS
23978 +
23979 + mv -f "$cfgfile" "$ofile" ||
23980 + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
23981 + chmod +x "$ofile"
23982 +],
23983 +[cat <<_LT_EOF >> "$ofile"
23984 +
23985 +dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
23986 +dnl in a comment (ie after a #).
23987 +# ### BEGIN LIBTOOL TAG CONFIG: $1
23988 +_LT_LIBTOOL_TAG_VARS(_LT_TAG)
23989 +# ### END LIBTOOL TAG CONFIG: $1
23990 +_LT_EOF
23991 +])dnl /m4_if
23992 +],
23993 +[m4_if([$1], [], [
23994 + PACKAGE='$PACKAGE'
23995 + VERSION='$VERSION'
23996 + TIMESTAMP='$TIMESTAMP'
23997 + RM='$RM'
23998 + ofile='$ofile'], [])
23999 +])dnl /_LT_CONFIG_SAVE_COMMANDS
24000 +])# _LT_CONFIG
24001 +
24002 +
24003 +# LT_SUPPORTED_TAG(TAG)
24004 +# ---------------------
24005 +# Trace this macro to discover what tags are supported by the libtool
24006 +# --tag option, using:
24007 +# autoconf --trace 'LT_SUPPORTED_TAG:$1'
24008 +AC_DEFUN([LT_SUPPORTED_TAG], [])
24009 +
24010 +
24011 +# C support is built-in for now
24012 +m4_define([_LT_LANG_C_enabled], [])
24013 +m4_define([_LT_TAGS], [])
24014 +
24015 +
24016 +# LT_LANG(LANG)
24017 +# -------------
24018 +# Enable libtool support for the given language if not already enabled.
24019 +AC_DEFUN([LT_LANG],
24020 +[AC_BEFORE([$0], [LT_OUTPUT])dnl
24021 +m4_case([$1],
24022 + [C], [_LT_LANG(C)],
24023 + [C++], [_LT_LANG(CXX)],
24024 + [Go], [_LT_LANG(GO)],
24025 + [Java], [_LT_LANG(GCJ)],
24026 + [Fortran 77], [_LT_LANG(F77)],
24027 + [Fortran], [_LT_LANG(FC)],
24028 + [Windows Resource], [_LT_LANG(RC)],
24029 + [m4_ifdef([_LT_LANG_]$1[_CONFIG],
24030 + [_LT_LANG($1)],
24031 + [m4_fatal([$0: unsupported language: "$1"])])])dnl
24032 +])# LT_LANG
24033 +
24034 +
24035 +# _LT_LANG(LANGNAME)
24036 +# ------------------
24037 +m4_defun([_LT_LANG],
24038 +[m4_ifdef([_LT_LANG_]$1[_enabled], [],
24039 + [LT_SUPPORTED_TAG([$1])dnl
24040 + m4_append([_LT_TAGS], [$1 ])dnl
24041 + m4_define([_LT_LANG_]$1[_enabled], [])dnl
24042 + _LT_LANG_$1_CONFIG($1)])dnl
24043 +])# _LT_LANG
24044 +
24045 +
24046 +m4_ifndef([AC_PROG_GO], [
24047 +############################################################
24048 +# NOTE: This macro has been submitted for inclusion into #
24049 +# GNU Autoconf as AC_PROG_GO. When it is available in #
24050 +# a released version of Autoconf we should remove this #
24051 +# macro and use it instead. #
24052 +############################################################
24053 +m4_defun([AC_PROG_GO],
24054 +[AC_LANG_PUSH(Go)dnl
24055 +AC_ARG_VAR([GOC], [Go compiler command])dnl
24056 +AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
24057 +_AC_ARG_VAR_LDFLAGS()dnl
24058 +AC_CHECK_TOOL(GOC, gccgo)
24059 +if test -z "$GOC"; then
24060 + if test -n "$ac_tool_prefix"; then
24061 + AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
24062 + fi
24063 +fi
24064 +if test -z "$GOC"; then
24065 + AC_CHECK_PROG(GOC, gccgo, gccgo, false)
24066 +fi
24067 +])#m4_defun
24068 +])#m4_ifndef
24069 +
24070 +
24071 +# _LT_LANG_DEFAULT_CONFIG
24072 +# -----------------------
24073 +m4_defun([_LT_LANG_DEFAULT_CONFIG],
24074 +[AC_PROVIDE_IFELSE([AC_PROG_CXX],
24075 + [LT_LANG(CXX)],
24076 + [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
24077 +
24078 +AC_PROVIDE_IFELSE([AC_PROG_F77],
24079 + [LT_LANG(F77)],
24080 + [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
24081 +
24082 +AC_PROVIDE_IFELSE([AC_PROG_FC],
24083 + [LT_LANG(FC)],
24084 + [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
24085 +
24086 +dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
24087 +dnl pulling things in needlessly.
24088 +AC_PROVIDE_IFELSE([AC_PROG_GCJ],
24089 + [LT_LANG(GCJ)],
24090 + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
24091 + [LT_LANG(GCJ)],
24092 + [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
24093 + [LT_LANG(GCJ)],
24094 + [m4_ifdef([AC_PROG_GCJ],
24095 + [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
24096 + m4_ifdef([A][M_PROG_GCJ],
24097 + [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
24098 + m4_ifdef([LT_PROG_GCJ],
24099 + [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
24100 +
24101 +AC_PROVIDE_IFELSE([AC_PROG_GO],
24102 + [LT_LANG(GO)],
24103 + [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
24104 +
24105 +AC_PROVIDE_IFELSE([LT_PROG_RC],
24106 + [LT_LANG(RC)],
24107 + [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
24108 +])# _LT_LANG_DEFAULT_CONFIG
24109 +
24110 +# Obsolete macros:
24111 +AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
24112 +AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
24113 +AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
24114 +AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
24115 +AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
24116 +dnl aclocal-1.4 backwards compatibility:
24117 +dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
24118 +dnl AC_DEFUN([AC_LIBTOOL_F77], [])
24119 +dnl AC_DEFUN([AC_LIBTOOL_FC], [])
24120 +dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
24121 +dnl AC_DEFUN([AC_LIBTOOL_RC], [])
24122 +
24123 +
24124 +# _LT_TAG_COMPILER
24125 +# ----------------
24126 +m4_defun([_LT_TAG_COMPILER],
24127 +[AC_REQUIRE([AC_PROG_CC])dnl
24128 +
24129 +_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
24130 +_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
24131 +_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
24132 +_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
24133 +
24134 +# If no C compiler was specified, use CC.
24135 +LTCC=${LTCC-"$CC"}
24136 +
24137 +# If no C compiler flags were specified, use CFLAGS.
24138 +LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
24139 +
24140 +# Allow CC to be a program name with arguments.
24141 +compiler=$CC
24142 +])# _LT_TAG_COMPILER
24143 +
24144 +
24145 +# _LT_COMPILER_BOILERPLATE
24146 +# ------------------------
24147 +# Check for compiler boilerplate output or warnings with
24148 +# the simple compiler test code.
24149 +m4_defun([_LT_COMPILER_BOILERPLATE],
24150 +[m4_require([_LT_DECL_SED])dnl
24151 +ac_outfile=conftest.$ac_objext
24152 +echo "$lt_simple_compile_test_code" >conftest.$ac_ext
24153 +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
24154 +_lt_compiler_boilerplate=`cat conftest.err`
24155 +$RM conftest*
24156 +])# _LT_COMPILER_BOILERPLATE
24157 +
24158 +
24159 +# _LT_LINKER_BOILERPLATE
24160 +# ----------------------
24161 +# Check for linker boilerplate output or warnings with
24162 +# the simple link test code.
24163 +m4_defun([_LT_LINKER_BOILERPLATE],
24164 +[m4_require([_LT_DECL_SED])dnl
24165 +ac_outfile=conftest.$ac_objext
24166 +echo "$lt_simple_link_test_code" >conftest.$ac_ext
24167 +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
24168 +_lt_linker_boilerplate=`cat conftest.err`
24169 +$RM -r conftest*
24170 +])# _LT_LINKER_BOILERPLATE
24171 +
24172 +# _LT_REQUIRED_DARWIN_CHECKS
24173 +# -------------------------
24174 +m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
24175 + case $host_os in
24176 + rhapsody* | darwin*)
24177 + AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
24178 + AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
24179 + AC_CHECK_TOOL([LIPO], [lipo], [:])
24180 + AC_CHECK_TOOL([OTOOL], [otool], [:])
24181 + AC_CHECK_TOOL([OTOOL64], [otool64], [:])
24182 + _LT_DECL([], [DSYMUTIL], [1],
24183 + [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
24184 + _LT_DECL([], [NMEDIT], [1],
24185 + [Tool to change global to local symbols on Mac OS X])
24186 + _LT_DECL([], [LIPO], [1],
24187 + [Tool to manipulate fat objects and archives on Mac OS X])
24188 + _LT_DECL([], [OTOOL], [1],
24189 + [ldd/readelf like tool for Mach-O binaries on Mac OS X])
24190 + _LT_DECL([], [OTOOL64], [1],
24191 + [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
24192 +
24193 + AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
24194 + [lt_cv_apple_cc_single_mod=no
24195 + if test -z "${LT_MULTI_MODULE}"; then
24196 + # By default we will add the -single_module flag. You can override
24197 + # by either setting the environment variable LT_MULTI_MODULE
24198 + # non-empty at configure time, or by adding -multi_module to the
24199 + # link flags.
24200 + rm -rf libconftest.dylib*
24201 + echo "int foo(void){return 1;}" > conftest.c
24202 + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
24203 +-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
24204 + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
24205 + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
24206 + _lt_result=$?
24207 + # If there is a non-empty error log, and "single_module"
24208 + # appears in it, assume the flag caused a linker warning
24209 + if test -s conftest.err && $GREP single_module conftest.err; then
24210 + cat conftest.err >&AS_MESSAGE_LOG_FD
24211 + # Otherwise, if the output was created with a 0 exit code from
24212 + # the compiler, it worked.
24213 + elif test -f libconftest.dylib && test $_lt_result -eq 0; then
24214 + lt_cv_apple_cc_single_mod=yes
24215 + else
24216 + cat conftest.err >&AS_MESSAGE_LOG_FD
24217 + fi
24218 + rm -rf libconftest.dylib*
24219 + rm -f conftest.*
24220 + fi])
24221 +
24222 + AC_CACHE_CHECK([for -exported_symbols_list linker flag],
24223 + [lt_cv_ld_exported_symbols_list],
24224 + [lt_cv_ld_exported_symbols_list=no
24225 + save_LDFLAGS=$LDFLAGS
24226 + echo "_main" > conftest.sym
24227 + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
24228 + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
24229 + [lt_cv_ld_exported_symbols_list=yes],
24230 + [lt_cv_ld_exported_symbols_list=no])
24231 + LDFLAGS="$save_LDFLAGS"
24232 + ])
24233 +
24234 + AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
24235 + [lt_cv_ld_force_load=no
24236 + cat > conftest.c << _LT_EOF
24237 +int forced_loaded() { return 2;}
24238 +_LT_EOF
24239 + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
24240 + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
24241 + echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
24242 + $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
24243 + echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
24244 + $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
24245 + cat > conftest.c << _LT_EOF
24246 +int main() { return 0;}
24247 +_LT_EOF
24248 + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
24249 + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
24250 + _lt_result=$?
24251 + if test -s conftest.err && $GREP force_load conftest.err; then
24252 + cat conftest.err >&AS_MESSAGE_LOG_FD
24253 + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
24254 + lt_cv_ld_force_load=yes
24255 + else
24256 + cat conftest.err >&AS_MESSAGE_LOG_FD
24257 + fi
24258 + rm -f conftest.err libconftest.a conftest conftest.c
24259 + rm -rf conftest.dSYM
24260 + ])
24261 + case $host_os in
24262 + rhapsody* | darwin1.[[012]])
24263 + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
24264 + darwin1.*)
24265 + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
24266 + darwin*) # darwin 5.x on
24267 + # if running on 10.5 or later, the deployment target defaults
24268 + # to the OS version, if on x86, and 10.4, the deployment
24269 + # target defaults to 10.4. Don't you love it?
24270 + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
24271 + 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
24272 + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
24273 + 10.[[012]]*)
24274 + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
24275 + 10.*)
24276 + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
24277 + esac
24278 + ;;
24279 + esac
24280 + if test "$lt_cv_apple_cc_single_mod" = "yes"; then
24281 + _lt_dar_single_mod='$single_module'
24282 + fi
24283 + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
24284 + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
24285 + else
24286 + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
24287 + fi
24288 + if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
24289 + _lt_dsymutil='~$DSYMUTIL $lib || :'
24290 + else
24291 + _lt_dsymutil=
24292 + fi
24293 + ;;
24294 + esac
24295 +])
24296 +
24297 +
24298 +# _LT_DARWIN_LINKER_FEATURES([TAG])
24299 +# ---------------------------------
24300 +# Checks for linker and compiler features on darwin
24301 +m4_defun([_LT_DARWIN_LINKER_FEATURES],
24302 +[
24303 + m4_require([_LT_REQUIRED_DARWIN_CHECKS])
24304 + _LT_TAGVAR(archive_cmds_need_lc, $1)=no
24305 + _LT_TAGVAR(hardcode_direct, $1)=no
24306 + _LT_TAGVAR(hardcode_automatic, $1)=yes
24307 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
24308 + if test "$lt_cv_ld_force_load" = "yes"; then
24309 + _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
24310 + m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
24311 + [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
24312 + else
24313 + _LT_TAGVAR(whole_archive_flag_spec, $1)=''
24314 + fi
24315 + _LT_TAGVAR(link_all_deplibs, $1)=yes
24316 + _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
24317 + case $cc_basename in
24318 + ifort*) _lt_dar_can_shared=yes ;;
24319 + *) _lt_dar_can_shared=$GCC ;;
24320 + esac
24321 + if test "$_lt_dar_can_shared" = "yes"; then
24322 + output_verbose_link_cmd=func_echo_all
24323 + _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}"
24324 + _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
24325 + _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}"
24326 + _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}"
24327 + m4_if([$1], [CXX],
24328 +[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
24329 + _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}"
24330 + _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}"
24331 + fi
24332 +],[])
24333 + else
24334 + _LT_TAGVAR(ld_shlibs, $1)=no
24335 + fi
24336 +])
24337 +
24338 +# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
24339 +# ----------------------------------
24340 +# Links a minimal program and checks the executable
24341 +# for the system default hardcoded library path. In most cases,
24342 +# this is /usr/lib:/lib, but when the MPI compilers are used
24343 +# the location of the communication and MPI libs are included too.
24344 +# If we don't find anything, use the default library path according
24345 +# to the aix ld manual.
24346 +# Store the results from the different compilers for each TAGNAME.
24347 +# Allow to override them for all tags through lt_cv_aix_libpath.
24348 +m4_defun([_LT_SYS_MODULE_PATH_AIX],
24349 +[m4_require([_LT_DECL_SED])dnl
24350 +if test "${lt_cv_aix_libpath+set}" = set; then
24351 + aix_libpath=$lt_cv_aix_libpath
24352 +else
24353 + AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
24354 + [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
24355 + lt_aix_libpath_sed='[
24356 + /Import File Strings/,/^$/ {
24357 + /^0/ {
24358 + s/^0 *\([^ ]*\) *$/\1/
24359 + p
24360 + }
24361 + }]'
24362 + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
24363 + # Check for a 64-bit object if we didn't find anything.
24364 + if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
24365 + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
24366 + fi],[])
24367 + if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
24368 + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
24369 + fi
24370 + ])
24371 + aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
24372 +fi
24373 +])# _LT_SYS_MODULE_PATH_AIX
24374 +
24375 +
24376 +# _LT_SHELL_INIT(ARG)
24377 +# -------------------
24378 +m4_define([_LT_SHELL_INIT],
24379 +[m4_divert_text([M4SH-INIT], [$1
24380 +])])# _LT_SHELL_INIT
24381 +
24382 +
24383 +
24384 +# _LT_PROG_ECHO_BACKSLASH
24385 +# -----------------------
24386 +# Find how we can fake an echo command that does not interpret backslash.
24387 +# In particular, with Autoconf 2.60 or later we add some code to the start
24388 +# of the generated configure script which will find a shell with a builtin
24389 +# printf (which we can use as an echo command).
24390 +m4_defun([_LT_PROG_ECHO_BACKSLASH],
24391 +[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
24392 +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
24393 +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
24394 +
24395 +AC_MSG_CHECKING([how to print strings])
24396 +# Test print first, because it will be a builtin if present.
24397 +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
24398 + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
24399 + ECHO='print -r --'
24400 +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
24401 + ECHO='printf %s\n'
24402 +else
24403 + # Use this function as a fallback that always works.
24404 + func_fallback_echo ()
24405 + {
24406 + eval 'cat <<_LTECHO_EOF
24407 +$[]1
24408 +_LTECHO_EOF'
24409 + }
24410 + ECHO='func_fallback_echo'
24411 +fi
24412 +
24413 +# func_echo_all arg...
24414 +# Invoke $ECHO with all args, space-separated.
24415 +func_echo_all ()
24416 +{
24417 + $ECHO "$*"
24418 +}
24419 +
24420 +case "$ECHO" in
24421 + printf*) AC_MSG_RESULT([printf]) ;;
24422 + print*) AC_MSG_RESULT([print -r]) ;;
24423 + *) AC_MSG_RESULT([cat]) ;;
24424 +esac
24425 +
24426 +m4_ifdef([_AS_DETECT_SUGGESTED],
24427 +[_AS_DETECT_SUGGESTED([
24428 + test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
24429 + ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
24430 + ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
24431 + ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
24432 + PATH=/empty FPATH=/empty; export PATH FPATH
24433 + test "X`printf %s $ECHO`" = "X$ECHO" \
24434 + || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
24435 +
24436 +_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
24437 +_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
24438 +])# _LT_PROG_ECHO_BACKSLASH
24439 +
24440 +
24441 +# _LT_WITH_SYSROOT
24442 +# ----------------
24443 +AC_DEFUN([_LT_WITH_SYSROOT],
24444 +[AC_MSG_CHECKING([for sysroot])
24445 +AC_ARG_WITH([sysroot],
24446 +[ --with-sysroot[=DIR] Search for dependent libraries within DIR
24447 + (or the compiler's sysroot if not specified).],
24448 +[], [with_sysroot=no])
24449 +
24450 +dnl lt_sysroot will always be passed unquoted. We quote it here
24451 +dnl in case the user passed a directory name.
24452 +lt_sysroot=
24453 +case ${with_sysroot} in #(
24454 + yes)
24455 + if test "$GCC" = yes; then
24456 + lt_sysroot=`$CC --print-sysroot 2>/dev/null`
24457 + fi
24458 + ;; #(
24459 + /*)
24460 + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
24461 + ;; #(
24462 + no|'')
24463 + ;; #(
24464 + *)
24465 + AC_MSG_RESULT([${with_sysroot}])
24466 + AC_MSG_ERROR([The sysroot must be an absolute path.])
24467 + ;;
24468 +esac
24469 +
24470 + AC_MSG_RESULT([${lt_sysroot:-no}])
24471 +_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
24472 +[dependent libraries, and in which our libraries should be installed.])])
24473 +
24474 +# _LT_ENABLE_LOCK
24475 +# ---------------
24476 +m4_defun([_LT_ENABLE_LOCK],
24477 +[AC_ARG_ENABLE([libtool-lock],
24478 + [AS_HELP_STRING([--disable-libtool-lock],
24479 + [avoid locking (might break parallel builds)])])
24480 +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
24481 +
24482 +# Some flags need to be propagated to the compiler or linker for good
24483 +# libtool support.
24484 +case $host in
24485 +ia64-*-hpux*)
24486 + # Find out which ABI we are using.
24487 + echo 'int i;' > conftest.$ac_ext
24488 + if AC_TRY_EVAL(ac_compile); then
24489 + case `/usr/bin/file conftest.$ac_objext` in
24490 + *ELF-32*)
24491 + HPUX_IA64_MODE="32"
24492 + ;;
24493 + *ELF-64*)
24494 + HPUX_IA64_MODE="64"
24495 + ;;
24496 + esac
24497 + fi
24498 + rm -rf conftest*
24499 + ;;
24500 +*-*-irix6*)
24501 + # Find out which ABI we are using.
24502 + echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
24503 + if AC_TRY_EVAL(ac_compile); then
24504 + if test "$lt_cv_prog_gnu_ld" = yes; then
24505 + case `/usr/bin/file conftest.$ac_objext` in
24506 + *32-bit*)
24507 + LD="${LD-ld} -melf32bsmip"
24508 + ;;
24509 + *N32*)
24510 + LD="${LD-ld} -melf32bmipn32"
24511 + ;;
24512 + *64-bit*)
24513 + LD="${LD-ld} -melf64bmip"
24514 + ;;
24515 + esac
24516 + else
24517 + case `/usr/bin/file conftest.$ac_objext` in
24518 + *32-bit*)
24519 + LD="${LD-ld} -32"
24520 + ;;
24521 + *N32*)
24522 + LD="${LD-ld} -n32"
24523 + ;;
24524 + *64-bit*)
24525 + LD="${LD-ld} -64"
24526 + ;;
24527 + esac
24528 + fi
24529 + fi
24530 + rm -rf conftest*
24531 + ;;
24532 +
24533 +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
24534 +s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
24535 + # Find out which ABI we are using.
24536 + echo 'int i;' > conftest.$ac_ext
24537 + if AC_TRY_EVAL(ac_compile); then
24538 + case `/usr/bin/file conftest.o` in
24539 + *32-bit*)
24540 + case $host in
24541 + x86_64-*kfreebsd*-gnu)
24542 + LD="${LD-ld} -m elf_i386_fbsd"
24543 + ;;
24544 + x86_64-*linux*)
24545 + case `/usr/bin/file conftest.o` in
24546 + *x86-64*)
24547 + LD="${LD-ld} -m elf32_x86_64"
24548 + ;;
24549 + *)
24550 + LD="${LD-ld} -m elf_i386"
24551 + ;;
24552 + esac
24553 + ;;
24554 + ppc64-*linux*|powerpc64-*linux*)
24555 + LD="${LD-ld} -m elf32ppclinux"
24556 + ;;
24557 + s390x-*linux*)
24558 + LD="${LD-ld} -m elf_s390"
24559 + ;;
24560 + sparc64-*linux*)
24561 + LD="${LD-ld} -m elf32_sparc"
24562 + ;;
24563 + esac
24564 + ;;
24565 + *64-bit*)
24566 + case $host in
24567 + x86_64-*kfreebsd*-gnu)
24568 + LD="${LD-ld} -m elf_x86_64_fbsd"
24569 + ;;
24570 + x86_64-*linux*)
24571 + LD="${LD-ld} -m elf_x86_64"
24572 + ;;
24573 + ppc*-*linux*|powerpc*-*linux*)
24574 + LD="${LD-ld} -m elf64ppc"
24575 + ;;
24576 + s390*-*linux*|s390*-*tpf*)
24577 + LD="${LD-ld} -m elf64_s390"
24578 + ;;
24579 + sparc*-*linux*)
24580 + LD="${LD-ld} -m elf64_sparc"
24581 + ;;
24582 + esac
24583 + ;;
24584 + esac
24585 + fi
24586 + rm -rf conftest*
24587 + ;;
24588 +
24589 +*-*-sco3.2v5*)
24590 + # On SCO OpenServer 5, we need -belf to get full-featured binaries.
24591 + SAVE_CFLAGS="$CFLAGS"
24592 + CFLAGS="$CFLAGS -belf"
24593 + AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
24594 + [AC_LANG_PUSH(C)
24595 + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
24596 + AC_LANG_POP])
24597 + if test x"$lt_cv_cc_needs_belf" != x"yes"; then
24598 + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
24599 + CFLAGS="$SAVE_CFLAGS"
24600 + fi
24601 + ;;
24602 +*-*solaris*)
24603 + # Find out which ABI we are using.
24604 + echo 'int i;' > conftest.$ac_ext
24605 + if AC_TRY_EVAL(ac_compile); then
24606 + case `/usr/bin/file conftest.o` in
24607 + *64-bit*)
24608 + case $lt_cv_prog_gnu_ld in
24609 + yes*)
24610 + case $host in
24611 + i?86-*-solaris*)
24612 + LD="${LD-ld} -m elf_x86_64"
24613 + ;;
24614 + sparc*-*-solaris*)
24615 + LD="${LD-ld} -m elf64_sparc"
24616 + ;;
24617 + esac
24618 + # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
24619 + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
24620 + LD="${LD-ld}_sol2"
24621 + fi
24622 + ;;
24623 + *)
24624 + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
24625 + LD="${LD-ld} -64"
24626 + fi
24627 + ;;
24628 + esac
24629 + ;;
24630 + esac
24631 + fi
24632 + rm -rf conftest*
24633 + ;;
24634 +esac
24635 +
24636 +need_locks="$enable_libtool_lock"
24637 +])# _LT_ENABLE_LOCK
24638 +
24639 +
24640 +# _LT_PROG_AR
24641 +# -----------
24642 +m4_defun([_LT_PROG_AR],
24643 +[AC_CHECK_TOOLS(AR, [ar], false)
24644 +: ${AR=ar}
24645 +: ${AR_FLAGS=cru}
24646 +_LT_DECL([], [AR], [1], [The archiver])
24647 +_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
24648 +
24649 +AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
24650 + [lt_cv_ar_at_file=no
24651 + AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
24652 + [echo conftest.$ac_objext > conftest.lst
24653 + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
24654 + AC_TRY_EVAL([lt_ar_try])
24655 + if test "$ac_status" -eq 0; then
24656 + # Ensure the archiver fails upon bogus file names.
24657 + rm -f conftest.$ac_objext libconftest.a
24658 + AC_TRY_EVAL([lt_ar_try])
24659 + if test "$ac_status" -ne 0; then
24660 + lt_cv_ar_at_file=@
24661 + fi
24662 + fi
24663 + rm -f conftest.* libconftest.a
24664 + ])
24665 + ])
24666 +
24667 +if test "x$lt_cv_ar_at_file" = xno; then
24668 + archiver_list_spec=
24669 +else
24670 + archiver_list_spec=$lt_cv_ar_at_file
24671 +fi
24672 +_LT_DECL([], [archiver_list_spec], [1],
24673 + [How to feed a file listing to the archiver])
24674 +])# _LT_PROG_AR
24675 +
24676 +
24677 +# _LT_CMD_OLD_ARCHIVE
24678 +# -------------------
24679 +m4_defun([_LT_CMD_OLD_ARCHIVE],
24680 +[_LT_PROG_AR
24681 +
24682 +AC_CHECK_TOOL(STRIP, strip, :)
24683 +test -z "$STRIP" && STRIP=:
24684 +_LT_DECL([], [STRIP], [1], [A symbol stripping program])
24685 +
24686 +AC_CHECK_TOOL(RANLIB, ranlib, :)
24687 +test -z "$RANLIB" && RANLIB=:
24688 +_LT_DECL([], [RANLIB], [1],
24689 + [Commands used to install an old-style archive])
24690 +
24691 +# Determine commands to create old-style static archives.
24692 +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
24693 +old_postinstall_cmds='chmod 644 $oldlib'
24694 +old_postuninstall_cmds=
24695 +
24696 +if test -n "$RANLIB"; then
24697 + case $host_os in
24698 + openbsd*)
24699 + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
24700 + ;;
24701 + *)
24702 + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
24703 + ;;
24704 + esac
24705 + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
24706 +fi
24707 +
24708 +case $host_os in
24709 + darwin*)
24710 + lock_old_archive_extraction=yes ;;
24711 + *)
24712 + lock_old_archive_extraction=no ;;
24713 +esac
24714 +_LT_DECL([], [old_postinstall_cmds], [2])
24715 +_LT_DECL([], [old_postuninstall_cmds], [2])
24716 +_LT_TAGDECL([], [old_archive_cmds], [2],
24717 + [Commands used to build an old-style archive])
24718 +_LT_DECL([], [lock_old_archive_extraction], [0],
24719 + [Whether to use a lock for old archive extraction])
24720 +])# _LT_CMD_OLD_ARCHIVE
24721 +
24722 +
24723 +# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
24724 +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
24725 +# ----------------------------------------------------------------
24726 +# Check whether the given compiler option works
24727 +AC_DEFUN([_LT_COMPILER_OPTION],
24728 +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
24729 +m4_require([_LT_DECL_SED])dnl
24730 +AC_CACHE_CHECK([$1], [$2],
24731 + [$2=no
24732 + m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
24733 + echo "$lt_simple_compile_test_code" > conftest.$ac_ext
24734 + lt_compiler_flag="$3"
24735 + # Insert the option either (1) after the last *FLAGS variable, or
24736 + # (2) before a word containing "conftest.", or (3) at the end.
24737 + # Note that $ac_compile itself does not contain backslashes and begins
24738 + # with a dollar sign (not a hyphen), so the echo should work correctly.
24739 + # The option is referenced via a variable to avoid confusing sed.
24740 + lt_compile=`echo "$ac_compile" | $SED \
24741 + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
24742 + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
24743 + -e 's:$: $lt_compiler_flag:'`
24744 + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
24745 + (eval "$lt_compile" 2>conftest.err)
24746 + ac_status=$?
24747 + cat conftest.err >&AS_MESSAGE_LOG_FD
24748 + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
24749 + if (exit $ac_status) && test -s "$ac_outfile"; then
24750 + # The compiler can only warn and ignore the option if not recognized
24751 + # So say no if there are warnings other than the usual output.
24752 + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
24753 + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
24754 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
24755 + $2=yes
24756 + fi
24757 + fi
24758 + $RM conftest*
24759 +])
24760 +
24761 +if test x"[$]$2" = xyes; then
24762 + m4_if([$5], , :, [$5])
24763 +else
24764 + m4_if([$6], , :, [$6])
24765 +fi
24766 +])# _LT_COMPILER_OPTION
24767 +
24768 +# Old name:
24769 +AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
24770 +dnl aclocal-1.4 backwards compatibility:
24771 +dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
24772 +
24773 +
24774 +# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
24775 +# [ACTION-SUCCESS], [ACTION-FAILURE])
24776 +# ----------------------------------------------------
24777 +# Check whether the given linker option works
24778 +AC_DEFUN([_LT_LINKER_OPTION],
24779 +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
24780 +m4_require([_LT_DECL_SED])dnl
24781 +AC_CACHE_CHECK([$1], [$2],
24782 + [$2=no
24783 + save_LDFLAGS="$LDFLAGS"
24784 + LDFLAGS="$LDFLAGS $3"
24785 + echo "$lt_simple_link_test_code" > conftest.$ac_ext
24786 + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
24787 + # The linker can only warn and ignore the option if not recognized
24788 + # So say no if there are warnings
24789 + if test -s conftest.err; then
24790 + # Append any errors to the config.log.
24791 + cat conftest.err 1>&AS_MESSAGE_LOG_FD
24792 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
24793 + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
24794 + if diff conftest.exp conftest.er2 >/dev/null; then
24795 + $2=yes
24796 + fi
24797 + else
24798 + $2=yes
24799 + fi
24800 + fi
24801 + $RM -r conftest*
24802 + LDFLAGS="$save_LDFLAGS"
24803 +])
24804 +
24805 +if test x"[$]$2" = xyes; then
24806 + m4_if([$4], , :, [$4])
24807 +else
24808 + m4_if([$5], , :, [$5])
24809 +fi
24810 +])# _LT_LINKER_OPTION
24811 +
24812 +# Old name:
24813 +AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
24814 +dnl aclocal-1.4 backwards compatibility:
24815 +dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
24816 +
24817 +
24818 +# LT_CMD_MAX_LEN
24819 +#---------------
24820 +AC_DEFUN([LT_CMD_MAX_LEN],
24821 +[AC_REQUIRE([AC_CANONICAL_HOST])dnl
24822 +# find the maximum length of command line arguments
24823 +AC_MSG_CHECKING([the maximum length of command line arguments])
24824 +AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
24825 + i=0
24826 + teststring="ABCD"
24827 +
24828 + case $build_os in
24829 + msdosdjgpp*)
24830 + # On DJGPP, this test can blow up pretty badly due to problems in libc
24831 + # (any single argument exceeding 2000 bytes causes a buffer overrun
24832 + # during glob expansion). Even if it were fixed, the result of this
24833 + # check would be larger than it should be.
24834 + lt_cv_sys_max_cmd_len=12288; # 12K is about right
24835 + ;;
24836 +
24837 + gnu*)
24838 + # Under GNU Hurd, this test is not required because there is
24839 + # no limit to the length of command line arguments.
24840 + # Libtool will interpret -1 as no limit whatsoever
24841 + lt_cv_sys_max_cmd_len=-1;
24842 + ;;
24843 +
24844 + cygwin* | mingw* | cegcc*)
24845 + # On Win9x/ME, this test blows up -- it succeeds, but takes
24846 + # about 5 minutes as the teststring grows exponentially.
24847 + # Worse, since 9x/ME are not pre-emptively multitasking,
24848 + # you end up with a "frozen" computer, even though with patience
24849 + # the test eventually succeeds (with a max line length of 256k).
24850 + # Instead, let's just punt: use the minimum linelength reported by
24851 + # all of the supported platforms: 8192 (on NT/2K/XP).
24852 + lt_cv_sys_max_cmd_len=8192;
24853 + ;;
24854 +
24855 + mint*)
24856 + # On MiNT this can take a long time and run out of memory.
24857 + lt_cv_sys_max_cmd_len=8192;
24858 + ;;
24859 +
24860 + amigaos*)
24861 + # On AmigaOS with pdksh, this test takes hours, literally.
24862 + # So we just punt and use a minimum line length of 8192.
24863 + lt_cv_sys_max_cmd_len=8192;
24864 + ;;
24865 +
24866 + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
24867 + # This has been around since 386BSD, at least. Likely further.
24868 + if test -x /sbin/sysctl; then
24869 + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
24870 + elif test -x /usr/sbin/sysctl; then
24871 + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
24872 + else
24873 + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
24874 + fi
24875 + # And add a safety zone
24876 + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
24877 + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
24878 + ;;
24879 +
24880 + interix*)
24881 + # We know the value 262144 and hardcode it with a safety zone (like BSD)
24882 + lt_cv_sys_max_cmd_len=196608
24883 + ;;
24884 +
24885 + os2*)
24886 + # The test takes a long time on OS/2.
24887 + lt_cv_sys_max_cmd_len=8192
24888 + ;;
24889 +
24890 + osf*)
24891 + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
24892 + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
24893 + # nice to cause kernel panics so lets avoid the loop below.
24894 + # First set a reasonable default.
24895 + lt_cv_sys_max_cmd_len=16384
24896 + #
24897 + if test -x /sbin/sysconfig; then
24898 + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
24899 + *1*) lt_cv_sys_max_cmd_len=-1 ;;
24900 + esac
24901 + fi
24902 + ;;
24903 + sco3.2v5*)
24904 + lt_cv_sys_max_cmd_len=102400
24905 + ;;
24906 + sysv5* | sco5v6* | sysv4.2uw2*)
24907 + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
24908 + if test -n "$kargmax"; then
24909 + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
24910 + else
24911 + lt_cv_sys_max_cmd_len=32768
24912 + fi
24913 + ;;
24914 + *)
24915 + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
24916 + if test -n "$lt_cv_sys_max_cmd_len" && \
24917 + test undefined != "$lt_cv_sys_max_cmd_len"; then
24918 + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
24919 + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
24920 + else
24921 + # Make teststring a little bigger before we do anything with it.
24922 + # a 1K string should be a reasonable start.
24923 + for i in 1 2 3 4 5 6 7 8 ; do
24924 + teststring=$teststring$teststring
24925 + done
24926 + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
24927 + # If test is not a shell built-in, we'll probably end up computing a
24928 + # maximum length that is only half of the actual maximum length, but
24929 + # we can't tell.
24930 + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
24931 + = "X$teststring$teststring"; } >/dev/null 2>&1 &&
24932 + test $i != 17 # 1/2 MB should be enough
24933 + do
24934 + i=`expr $i + 1`
24935 + teststring=$teststring$teststring
24936 + done
24937 + # Only check the string length outside the loop.
24938 + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
24939 + teststring=
24940 + # Add a significant safety factor because C++ compilers can tack on
24941 + # massive amounts of additional arguments before passing them to the
24942 + # linker. It appears as though 1/2 is a usable value.
24943 + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
24944 + fi
24945 + ;;
24946 + esac
24947 +])
24948 +if test -n $lt_cv_sys_max_cmd_len ; then
24949 + AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
24950 +else
24951 + AC_MSG_RESULT(none)
24952 +fi
24953 +max_cmd_len=$lt_cv_sys_max_cmd_len
24954 +_LT_DECL([], [max_cmd_len], [0],
24955 + [What is the maximum length of a command?])
24956 +])# LT_CMD_MAX_LEN
24957 +
24958 +# Old name:
24959 +AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
24960 +dnl aclocal-1.4 backwards compatibility:
24961 +dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
24962 +
24963 +
24964 +# _LT_HEADER_DLFCN
24965 +# ----------------
24966 +m4_defun([_LT_HEADER_DLFCN],
24967 +[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
24968 +])# _LT_HEADER_DLFCN
24969 +
24970 +
24971 +# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
24972 +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
24973 +# ----------------------------------------------------------------
24974 +m4_defun([_LT_TRY_DLOPEN_SELF],
24975 +[m4_require([_LT_HEADER_DLFCN])dnl
24976 +if test "$cross_compiling" = yes; then :
24977 + [$4]
24978 +else
24979 + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
24980 + lt_status=$lt_dlunknown
24981 + cat > conftest.$ac_ext <<_LT_EOF
24982 +[#line $LINENO "configure"
24983 +#include "confdefs.h"
24984 +
24985 +#if HAVE_DLFCN_H
24986 +#include <dlfcn.h>
24987 +#endif
24988 +
24989 +#include <stdio.h>
24990 +
24991 +#ifdef RTLD_GLOBAL
24992 +# define LT_DLGLOBAL RTLD_GLOBAL
24993 +#else
24994 +# ifdef DL_GLOBAL
24995 +# define LT_DLGLOBAL DL_GLOBAL
24996 +# else
24997 +# define LT_DLGLOBAL 0
24998 +# endif
24999 +#endif
25000 +
25001 +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
25002 + find out it does not work in some platform. */
25003 +#ifndef LT_DLLAZY_OR_NOW
25004 +# ifdef RTLD_LAZY
25005 +# define LT_DLLAZY_OR_NOW RTLD_LAZY
25006 +# else
25007 +# ifdef DL_LAZY
25008 +# define LT_DLLAZY_OR_NOW DL_LAZY
25009 +# else
25010 +# ifdef RTLD_NOW
25011 +# define LT_DLLAZY_OR_NOW RTLD_NOW
25012 +# else
25013 +# ifdef DL_NOW
25014 +# define LT_DLLAZY_OR_NOW DL_NOW
25015 +# else
25016 +# define LT_DLLAZY_OR_NOW 0
25017 +# endif
25018 +# endif
25019 +# endif
25020 +# endif
25021 +#endif
25022 +
25023 +/* When -fvisbility=hidden is used, assume the code has been annotated
25024 + correspondingly for the symbols needed. */
25025 +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
25026 +int fnord () __attribute__((visibility("default")));
25027 +#endif
25028 +
25029 +int fnord () { return 42; }
25030 +int main ()
25031 +{
25032 + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
25033 + int status = $lt_dlunknown;
25034 +
25035 + if (self)
25036 + {
25037 + if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
25038 + else
25039 + {
25040 + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
25041 + else puts (dlerror ());
25042 + }
25043 + /* dlclose (self); */
25044 + }
25045 + else
25046 + puts (dlerror ());
25047 +
25048 + return status;
25049 +}]
25050 +_LT_EOF
25051 + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
25052 + (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
25053 + lt_status=$?
25054 + case x$lt_status in
25055 + x$lt_dlno_uscore) $1 ;;
25056 + x$lt_dlneed_uscore) $2 ;;
25057 + x$lt_dlunknown|x*) $3 ;;
25058 + esac
25059 + else :
25060 + # compilation failed
25061 + $3
25062 + fi
25063 +fi
25064 +rm -fr conftest*
25065 +])# _LT_TRY_DLOPEN_SELF
25066 +
25067 +
25068 +# LT_SYS_DLOPEN_SELF
25069 +# ------------------
25070 +AC_DEFUN([LT_SYS_DLOPEN_SELF],
25071 +[m4_require([_LT_HEADER_DLFCN])dnl
25072 +if test "x$enable_dlopen" != xyes; then
25073 + enable_dlopen=unknown
25074 + enable_dlopen_self=unknown
25075 + enable_dlopen_self_static=unknown
25076 +else
25077 + lt_cv_dlopen=no
25078 + lt_cv_dlopen_libs=
25079 +
25080 + case $host_os in
25081 + beos*)
25082 + lt_cv_dlopen="load_add_on"
25083 + lt_cv_dlopen_libs=
25084 + lt_cv_dlopen_self=yes
25085 + ;;
25086 +
25087 + mingw* | pw32* | cegcc*)
25088 + lt_cv_dlopen="LoadLibrary"
25089 + lt_cv_dlopen_libs=
25090 + ;;
25091 +
25092 + cygwin*)
25093 + lt_cv_dlopen="dlopen"
25094 + lt_cv_dlopen_libs=
25095 + ;;
25096 +
25097 + darwin*)
25098 + # if libdl is installed we need to link against it
25099 + AC_CHECK_LIB([dl], [dlopen],
25100 + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
25101 + lt_cv_dlopen="dyld"
25102 + lt_cv_dlopen_libs=
25103 + lt_cv_dlopen_self=yes
25104 + ])
25105 + ;;
25106 +
25107 + *)
25108 + AC_CHECK_FUNC([shl_load],
25109 + [lt_cv_dlopen="shl_load"],
25110 + [AC_CHECK_LIB([dld], [shl_load],
25111 + [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
25112 + [AC_CHECK_FUNC([dlopen],
25113 + [lt_cv_dlopen="dlopen"],
25114 + [AC_CHECK_LIB([dl], [dlopen],
25115 + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
25116 + [AC_CHECK_LIB([svld], [dlopen],
25117 + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
25118 + [AC_CHECK_LIB([dld], [dld_link],
25119 + [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
25120 + ])
25121 + ])
25122 + ])
25123 + ])
25124 + ])
25125 + ;;
25126 + esac
25127 +
25128 + if test "x$lt_cv_dlopen" != xno; then
25129 + enable_dlopen=yes
25130 + else
25131 + enable_dlopen=no
25132 + fi
25133 +
25134 + case $lt_cv_dlopen in
25135 + dlopen)
25136 + save_CPPFLAGS="$CPPFLAGS"
25137 + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
25138 +
25139 + save_LDFLAGS="$LDFLAGS"
25140 + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
25141 +
25142 + save_LIBS="$LIBS"
25143 + LIBS="$lt_cv_dlopen_libs $LIBS"
25144 +
25145 + AC_CACHE_CHECK([whether a program can dlopen itself],
25146 + lt_cv_dlopen_self, [dnl
25147 + _LT_TRY_DLOPEN_SELF(
25148 + lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
25149 + lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
25150 + ])
25151 +
25152 + if test "x$lt_cv_dlopen_self" = xyes; then
25153 + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
25154 + AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
25155 + lt_cv_dlopen_self_static, [dnl
25156 + _LT_TRY_DLOPEN_SELF(
25157 + lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
25158 + lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
25159 + ])
25160 + fi
25161 +
25162 + CPPFLAGS="$save_CPPFLAGS"
25163 + LDFLAGS="$save_LDFLAGS"
25164 + LIBS="$save_LIBS"
25165 + ;;
25166 + esac
25167 +
25168 + case $lt_cv_dlopen_self in
25169 + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
25170 + *) enable_dlopen_self=unknown ;;
25171 + esac
25172 +
25173 + case $lt_cv_dlopen_self_static in
25174 + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
25175 + *) enable_dlopen_self_static=unknown ;;
25176 + esac
25177 +fi
25178 +_LT_DECL([dlopen_support], [enable_dlopen], [0],
25179 + [Whether dlopen is supported])
25180 +_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
25181 + [Whether dlopen of programs is supported])
25182 +_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
25183 + [Whether dlopen of statically linked programs is supported])
25184 +])# LT_SYS_DLOPEN_SELF
25185 +
25186 +# Old name:
25187 +AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
25188 +dnl aclocal-1.4 backwards compatibility:
25189 +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
25190 +
25191 +
25192 +# _LT_COMPILER_C_O([TAGNAME])
25193 +# ---------------------------
25194 +# Check to see if options -c and -o are simultaneously supported by compiler.
25195 +# This macro does not hard code the compiler like AC_PROG_CC_C_O.
25196 +m4_defun([_LT_COMPILER_C_O],
25197 +[m4_require([_LT_DECL_SED])dnl
25198 +m4_require([_LT_FILEUTILS_DEFAULTS])dnl
25199 +m4_require([_LT_TAG_COMPILER])dnl
25200 +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
25201 + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
25202 + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
25203 + $RM -r conftest 2>/dev/null
25204 + mkdir conftest
25205 + cd conftest
25206 + mkdir out
25207 + echo "$lt_simple_compile_test_code" > conftest.$ac_ext
25208 +
25209 + lt_compiler_flag="-o out/conftest2.$ac_objext"
25210 + # Insert the option either (1) after the last *FLAGS variable, or
25211 + # (2) before a word containing "conftest.", or (3) at the end.
25212 + # Note that $ac_compile itself does not contain backslashes and begins
25213 + # with a dollar sign (not a hyphen), so the echo should work correctly.
25214 + lt_compile=`echo "$ac_compile" | $SED \
25215 + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
25216 + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
25217 + -e 's:$: $lt_compiler_flag:'`
25218 + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
25219 + (eval "$lt_compile" 2>out/conftest.err)
25220 + ac_status=$?
25221 + cat out/conftest.err >&AS_MESSAGE_LOG_FD
25222 + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
25223 + if (exit $ac_status) && test -s out/conftest2.$ac_objext
25224 + then
25225 + # The compiler can only warn and ignore the option if not recognized
25226 + # So say no if there are warnings
25227 + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
25228 + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
25229 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
25230 + _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
25231 + fi
25232 + fi
25233 + chmod u+w . 2>&AS_MESSAGE_LOG_FD
25234 + $RM conftest*
25235 + # SGI C++ compiler will create directory out/ii_files/ for
25236 + # template instantiation
25237 + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
25238 + $RM out/* && rmdir out
25239 + cd ..
25240 + $RM -r conftest
25241 + $RM conftest*
25242 +])
25243 +_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
25244 + [Does compiler simultaneously support -c and -o options?])
25245 +])# _LT_COMPILER_C_O
25246 +
25247 +
25248 +# _LT_COMPILER_FILE_LOCKS([TAGNAME])
25249 +# ----------------------------------
25250 +# Check to see if we can do hard links to lock some files if needed
25251 +m4_defun([_LT_COMPILER_FILE_LOCKS],
25252 +[m4_require([_LT_ENABLE_LOCK])dnl
25253 +m4_require([_LT_FILEUTILS_DEFAULTS])dnl
25254 +_LT_COMPILER_C_O([$1])
25255 +
25256 +hard_links="nottested"
25257 +if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
25258 + # do not overwrite the value of need_locks provided by the user
25259 + AC_MSG_CHECKING([if we can lock with hard links])
25260 + hard_links=yes
25261 + $RM conftest*
25262 + ln conftest.a conftest.b 2>/dev/null && hard_links=no
25263 + touch conftest.a
25264 + ln conftest.a conftest.b 2>&5 || hard_links=no
25265 + ln conftest.a conftest.b 2>/dev/null && hard_links=no
25266 + AC_MSG_RESULT([$hard_links])
25267 + if test "$hard_links" = no; then
25268 + AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
25269 + need_locks=warn
25270 + fi
25271 +else
25272 + need_locks=no
25273 +fi
25274 +_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
25275 +])# _LT_COMPILER_FILE_LOCKS
25276 +
25277 +
25278 +# _LT_CHECK_OBJDIR
25279 +# ----------------
25280 +m4_defun([_LT_CHECK_OBJDIR],
25281 +[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
25282 +[rm -f .libs 2>/dev/null
25283 +mkdir .libs 2>/dev/null
25284 +if test -d .libs; then
25285 + lt_cv_objdir=.libs
25286 +else
25287 + # MS-DOS does not allow filenames that begin with a dot.
25288 + lt_cv_objdir=_libs
25289 +fi
25290 +rmdir .libs 2>/dev/null])
25291 +objdir=$lt_cv_objdir
25292 +_LT_DECL([], [objdir], [0],
25293 + [The name of the directory that contains temporary libtool files])dnl
25294 +m4_pattern_allow([LT_OBJDIR])dnl
25295 +AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
25296 + [Define to the sub-directory in which libtool stores uninstalled libraries.])
25297 +])# _LT_CHECK_OBJDIR
25298 +
25299 +
25300 +# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
25301 +# --------------------------------------
25302 +# Check hardcoding attributes.
25303 +m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
25304 +[AC_MSG_CHECKING([how to hardcode library paths into programs])
25305 +_LT_TAGVAR(hardcode_action, $1)=
25306 +if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
25307 + test -n "$_LT_TAGVAR(runpath_var, $1)" ||
25308 + test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
25309 +
25310 + # We can hardcode non-existent directories.
25311 + if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
25312 + # If the only mechanism to avoid hardcoding is shlibpath_var, we
25313 + # have to relink, otherwise we might link with an installed library
25314 + # when we should be linking with a yet-to-be-installed one
25315 + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
25316 + test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
25317 + # Linking always hardcodes the temporary library directory.
25318 + _LT_TAGVAR(hardcode_action, $1)=relink
25319 + else
25320 + # We can link without hardcoding, and we can hardcode nonexisting dirs.
25321 + _LT_TAGVAR(hardcode_action, $1)=immediate
25322 + fi
25323 +else
25324 + # We cannot hardcode anything, or else we can only hardcode existing
25325 + # directories.
25326 + _LT_TAGVAR(hardcode_action, $1)=unsupported
25327 +fi
25328 +AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
25329 +
25330 +if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
25331 + test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
25332 + # Fast installation is not supported
25333 + enable_fast_install=no
25334 +elif test "$shlibpath_overrides_runpath" = yes ||
25335 + test "$enable_shared" = no; then
25336 + # Fast installation is not necessary
25337 + enable_fast_install=needless
25338 +fi
25339 +_LT_TAGDECL([], [hardcode_action], [0],
25340 + [How to hardcode a shared library path into an executable])
25341 +])# _LT_LINKER_HARDCODE_LIBPATH
25342 +
25343 +
25344 +# _LT_CMD_STRIPLIB
25345 +# ----------------
25346 +m4_defun([_LT_CMD_STRIPLIB],
25347 +[m4_require([_LT_DECL_EGREP])
25348 +striplib=
25349 +old_striplib=
25350 +AC_MSG_CHECKING([whether stripping libraries is possible])
25351 +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
25352 + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
25353 + test -z "$striplib" && striplib="$STRIP --strip-unneeded"
25354 + AC_MSG_RESULT([yes])
25355 +else
25356 +# FIXME - insert some real tests, host_os isn't really good enough
25357 + case $host_os in
25358 + darwin*)
25359 + if test -n "$STRIP" ; then
25360 + striplib="$STRIP -x"
25361 + old_striplib="$STRIP -S"
25362 + AC_MSG_RESULT([yes])
25363 + else
25364 + AC_MSG_RESULT([no])
25365 + fi
25366 + ;;
25367 + *)
25368 + AC_MSG_RESULT([no])
25369 + ;;
25370 + esac
25371 +fi
25372 +_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
25373 +_LT_DECL([], [striplib], [1])
25374 +])# _LT_CMD_STRIPLIB
25375 +
25376 +
25377 +# _LT_SYS_DYNAMIC_LINKER([TAG])
25378 +# -----------------------------
25379 +# PORTME Fill in your ld.so characteristics
25380 +m4_defun([_LT_SYS_DYNAMIC_LINKER],
25381 +[AC_REQUIRE([AC_CANONICAL_HOST])dnl
25382 +m4_require([_LT_DECL_EGREP])dnl
25383 +m4_require([_LT_FILEUTILS_DEFAULTS])dnl
25384 +m4_require([_LT_DECL_OBJDUMP])dnl
25385 +m4_require([_LT_DECL_SED])dnl
25386 +m4_require([_LT_CHECK_SHELL_FEATURES])dnl
25387 +AC_MSG_CHECKING([dynamic linker characteristics])
25388 +m4_if([$1],
25389 + [], [
25390 +if test "$GCC" = yes; then
25391 + case $host_os in
25392 + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
25393 + *) lt_awk_arg="/^libraries:/" ;;
25394 + esac
25395 + case $host_os in
25396 + mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
25397 + *) lt_sed_strip_eq="s,=/,/,g" ;;
25398 + esac
25399 + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
25400 + case $lt_search_path_spec in
25401 + *\;*)
25402 + # if the path contains ";" then we assume it to be the separator
25403 + # otherwise default to the standard path separator (i.e. ":") - it is
25404 + # assumed that no part of a normal pathname contains ";" but that should
25405 + # okay in the real world where ";" in dirpaths is itself problematic.
25406 + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
25407 + ;;
25408 + *)
25409 + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
25410 + ;;
25411 + esac
25412 + # Ok, now we have the path, separated by spaces, we can step through it
25413 + # and add multilib dir if necessary.
25414 + lt_tmp_lt_search_path_spec=
25415 + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
25416 + for lt_sys_path in $lt_search_path_spec; do
25417 + if test -d "$lt_sys_path/$lt_multi_os_dir"; then
25418 + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
25419 + else
25420 + test -d "$lt_sys_path" && \
25421 + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
25422 + fi
25423 + done
25424 + lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
25425 +BEGIN {RS=" "; FS="/|\n";} {
25426 + lt_foo="";
25427 + lt_count=0;
25428 + for (lt_i = NF; lt_i > 0; lt_i--) {
25429 + if ($lt_i != "" && $lt_i != ".") {
25430 + if ($lt_i == "..") {
25431 + lt_count++;
25432 + } else {
25433 + if (lt_count == 0) {
25434 + lt_foo="/" $lt_i lt_foo;
25435 + } else {
25436 + lt_count--;
25437 + }
25438 + }
25439 + }
25440 + }
25441 + if (lt_foo != "") { lt_freq[[lt_foo]]++; }
25442 + if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
25443 +}'`
25444 + # AWK program above erroneously prepends '/' to C:/dos/paths
25445 + # for these hosts.
25446 + case $host_os in
25447 + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
25448 + $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
25449 + esac
25450 + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
25451 +else
25452 + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
25453 +fi])
25454 +library_names_spec=
25455 +libname_spec='lib$name'
25456 +soname_spec=
25457 +shrext_cmds=".so"
25458 +postinstall_cmds=
25459 +postuninstall_cmds=
25460 +finish_cmds=
25461 +finish_eval=
25462 +shlibpath_var=
25463 +shlibpath_overrides_runpath=unknown
25464 +version_type=none
25465 +dynamic_linker="$host_os ld.so"
25466 +sys_lib_dlsearch_path_spec="/lib /usr/lib"
25467 +need_lib_prefix=unknown
25468 +hardcode_into_libs=no
25469 +
25470 +# when you set need_version to no, make sure it does not cause -set_version
25471 +# flags to be left without arguments
25472 +need_version=unknown
25473 +
25474 +case $host_os in
25475 +aix3*)
25476 + version_type=linux # correct to gnu/linux during the next big refactor
25477 + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
25478 + shlibpath_var=LIBPATH
25479 +
25480 + # AIX 3 has no versioning support, so we append a major version to the name.
25481 + soname_spec='${libname}${release}${shared_ext}$major'
25482 + ;;
25483 +
25484 +aix[[4-9]]*)
25485 + version_type=linux # correct to gnu/linux during the next big refactor
25486 + need_lib_prefix=no
25487 + need_version=no
25488 + hardcode_into_libs=yes
25489 + if test "$host_cpu" = ia64; then
25490 + # AIX 5 supports IA64
25491 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
25492 + shlibpath_var=LD_LIBRARY_PATH
25493 + else
25494 + # With GCC up to 2.95.x, collect2 would create an import file
25495 + # for dependence libraries. The import file would start with
25496 + # the line `#! .'. This would cause the generated library to
25497 + # depend on `.', always an invalid library. This was fixed in
25498 + # development snapshots of GCC prior to 3.0.
25499 + case $host_os in
25500 + aix4 | aix4.[[01]] | aix4.[[01]].*)
25501 + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
25502 + echo ' yes '
25503 + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
25504 + :
25505 + else
25506 + can_build_shared=no
25507 + fi
25508 + ;;
25509 + esac
25510 + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
25511 + # soname into executable. Probably we can add versioning support to
25512 + # collect2, so additional links can be useful in future.
25513 + if test "$aix_use_runtimelinking" = yes; then
25514 + # If using run time linking (on AIX 4.2 or later) use lib<name>.so
25515 + # instead of lib<name>.a to let people know that these are not
25516 + # typical AIX shared libraries.
25517 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
25518 + else
25519 + # We preserve .a as extension for shared libraries through AIX4.2
25520 + # and later when we are not doing run time linking.
25521 + library_names_spec='${libname}${release}.a $libname.a'
25522 + soname_spec='${libname}${release}${shared_ext}$major'
25523 + fi
25524 + shlibpath_var=LIBPATH
25525 + fi
25526 + ;;
25527 +
25528 +amigaos*)
25529 + case $host_cpu in
25530 + powerpc)
25531 + # Since July 2007 AmigaOS4 officially supports .so libraries.
25532 + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
25533 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
25534 + ;;
25535 + m68k)
25536 + library_names_spec='$libname.ixlibrary $libname.a'
25537 + # Create ${libname}_ixlibrary.a entries in /sys/libs.
25538 + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
25539 + ;;
25540 + esac
25541 + ;;
25542 +
25543 +beos*)
25544 + library_names_spec='${libname}${shared_ext}'
25545 + dynamic_linker="$host_os ld.so"
25546 + shlibpath_var=LIBRARY_PATH
25547 + ;;
25548 +
25549 +bsdi[[45]]*)
25550 + version_type=linux # correct to gnu/linux during the next big refactor
25551 + need_version=no
25552 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
25553 + soname_spec='${libname}${release}${shared_ext}$major'
25554 + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
25555 + shlibpath_var=LD_LIBRARY_PATH
25556 + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
25557 + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
25558 + # the default ld.so.conf also contains /usr/contrib/lib and
25559 + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
25560 + # libtool to hard-code these into programs
25561 + ;;
25562 +
25563 +cygwin* | mingw* | pw32* | cegcc*)
25564 + version_type=windows
25565 + shrext_cmds=".dll"
25566 + need_version=no
25567 + need_lib_prefix=no
25568 +
25569 + case $GCC,$cc_basename in
25570 + yes,*)
25571 + # gcc
25572 + library_names_spec='$libname.dll.a'
25573 + # DLL is installed to $(libdir)/../bin by postinstall_cmds
25574 + postinstall_cmds='base_file=`basename \${file}`~
25575 + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
25576 + dldir=$destdir/`dirname \$dlpath`~
25577 + test -d \$dldir || mkdir -p \$dldir~
25578 + $install_prog $dir/$dlname \$dldir/$dlname~
25579 + chmod a+x \$dldir/$dlname~
25580 + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
25581 + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
25582 + fi'
25583 + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
25584 + dlpath=$dir/\$dldll~
25585 + $RM \$dlpath'
25586 + shlibpath_overrides_runpath=yes
25587 +
25588 + case $host_os in
25589 + cygwin*)
25590 + # Cygwin DLLs use 'cyg' prefix rather than 'lib'
25591 + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
25592 +m4_if([$1], [],[
25593 + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
25594 + ;;
25595 + mingw* | cegcc*)
25596 + # MinGW DLLs use traditional 'lib' prefix
25597 + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
25598 + ;;
25599 + pw32*)
25600 + # pw32 DLLs use 'pw' prefix rather than 'lib'
25601 + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
25602 + ;;
25603 + esac
25604 + dynamic_linker='Win32 ld.exe'
25605 + ;;
25606 +
25607 + *,cl*)
25608 + # Native MSVC
25609 + libname_spec='$name'
25610 + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
25611 + library_names_spec='${libname}.dll.lib'
25612 +
25613 + case $build_os in
25614 + mingw*)
25615 + sys_lib_search_path_spec=
25616 + lt_save_ifs=$IFS
25617 + IFS=';'
25618 + for lt_path in $LIB
25619 + do
25620 + IFS=$lt_save_ifs
25621 + # Let DOS variable expansion print the short 8.3 style file name.
25622 + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
25623 + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
25624 + done
25625 + IFS=$lt_save_ifs
25626 + # Convert to MSYS style.
25627 + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
25628 + ;;
25629 + cygwin*)
25630 + # Convert to unix form, then to dos form, then back to unix form
25631 + # but this time dos style (no spaces!) so that the unix form looks
25632 + # like /cygdrive/c/PROGRA~1:/cygdr...
25633 + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
25634 + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
25635 + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
25636 + ;;
25637 + *)
25638 + sys_lib_search_path_spec="$LIB"
25639 + if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
25640 + # It is most probably a Windows format PATH.
25641 + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
25642 + else
25643 + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
25644 + fi
25645 + # FIXME: find the short name or the path components, as spaces are
25646 + # common. (e.g. "Program Files" -> "PROGRA~1")
25647 + ;;
25648 + esac
25649 +
25650 + # DLL is installed to $(libdir)/../bin by postinstall_cmds
25651 + postinstall_cmds='base_file=`basename \${file}`~
25652 + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
25653 + dldir=$destdir/`dirname \$dlpath`~
25654 + test -d \$dldir || mkdir -p \$dldir~
25655 + $install_prog $dir/$dlname \$dldir/$dlname'
25656 + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
25657 + dlpath=$dir/\$dldll~
25658 + $RM \$dlpath'
25659 + shlibpath_overrides_runpath=yes
25660 + dynamic_linker='Win32 link.exe'
25661 + ;;
25662 +
25663 + *)
25664 + # Assume MSVC wrapper
25665 + library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
25666 + dynamic_linker='Win32 ld.exe'
25667 + ;;
25668 + esac
25669 + # FIXME: first we should search . and the directory the executable is in
25670 + shlibpath_var=PATH
25671 + ;;
25672 +
25673 +darwin* | rhapsody*)
25674 + dynamic_linker="$host_os dyld"
25675 + version_type=darwin
25676 + need_lib_prefix=no
25677 + need_version=no
25678 + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
25679 + soname_spec='${libname}${release}${major}$shared_ext'
25680 + shlibpath_overrides_runpath=yes
25681 + shlibpath_var=DYLD_LIBRARY_PATH
25682 + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
25683 +m4_if([$1], [],[
25684 + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
25685 + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
25686 + ;;
25687 +
25688 +dgux*)
25689 + version_type=linux # correct to gnu/linux during the next big refactor
25690 + need_lib_prefix=no
25691 + need_version=no
25692 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
25693 + soname_spec='${libname}${release}${shared_ext}$major'
25694 + shlibpath_var=LD_LIBRARY_PATH
25695 + ;;
25696 +
25697 +freebsd* | dragonfly*)
25698 + # DragonFly does not have aout. When/if they implement a new
25699 + # versioning mechanism, adjust this.
25700 + if test -x /usr/bin/objformat; then
25701 + objformat=`/usr/bin/objformat`
25702 + else
25703 + case $host_os in
25704 + freebsd[[23]].*) objformat=aout ;;
25705 + *) objformat=elf ;;
25706 + esac
25707 + fi
25708 + version_type=freebsd-$objformat
25709 + case $version_type in
25710 + freebsd-elf*)
25711 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
25712 + need_version=no
25713 + need_lib_prefix=no
25714 + ;;
25715 + freebsd-*)
25716 + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
25717 + need_version=yes
25718 + ;;
25719 + esac
25720 + shlibpath_var=LD_LIBRARY_PATH
25721 + case $host_os in
25722 + freebsd2.*)
25723 + shlibpath_overrides_runpath=yes
25724 + ;;
25725 + freebsd3.[[01]]* | freebsdelf3.[[01]]*)
25726 + shlibpath_overrides_runpath=yes
25727 + hardcode_into_libs=yes
25728 + ;;
25729 + freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
25730 + freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
25731 + shlibpath_overrides_runpath=no
25732 + hardcode_into_libs=yes
25733 + ;;
25734 + *) # from 4.6 on, and DragonFly
25735 + shlibpath_overrides_runpath=yes
25736 + hardcode_into_libs=yes
25737 + ;;
25738 + esac
25739 + ;;
25740 +
25741 +haiku*)
25742 + version_type=linux # correct to gnu/linux during the next big refactor
25743 + need_lib_prefix=no
25744 + need_version=no
25745 + dynamic_linker="$host_os runtime_loader"
25746 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
25747 + soname_spec='${libname}${release}${shared_ext}$major'
25748 + shlibpath_var=LIBRARY_PATH
25749 + shlibpath_overrides_runpath=yes
25750 + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
25751 + hardcode_into_libs=yes
25752 + ;;
25753 +
25754 +hpux9* | hpux10* | hpux11*)
25755 + # Give a soname corresponding to the major version so that dld.sl refuses to
25756 + # link against other versions.
25757 + version_type=sunos
25758 + need_lib_prefix=no
25759 + need_version=no
25760 + case $host_cpu in
25761 + ia64*)
25762 + shrext_cmds='.so'
25763 + hardcode_into_libs=yes
25764 + dynamic_linker="$host_os dld.so"
25765 + shlibpath_var=LD_LIBRARY_PATH
25766 + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
25767 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
25768 + soname_spec='${libname}${release}${shared_ext}$major'
25769 + if test "X$HPUX_IA64_MODE" = X32; then
25770 + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
25771 + else
25772 + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
25773 + fi
25774 + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
25775 + ;;
25776 + hppa*64*)
25777 + shrext_cmds='.sl'
25778 + hardcode_into_libs=yes
25779 + dynamic_linker="$host_os dld.sl"
25780 + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
25781 + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
25782 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
25783 + soname_spec='${libname}${release}${shared_ext}$major'
25784 + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
25785 + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
25786 + ;;
25787 + *)
25788 + shrext_cmds='.sl'
25789 + dynamic_linker="$host_os dld.sl"
25790 + shlibpath_var=SHLIB_PATH
25791 + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
25792 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
25793 + soname_spec='${libname}${release}${shared_ext}$major'
25794 + ;;
25795 + esac
25796 + # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
25797 + postinstall_cmds='chmod 555 $lib'
25798 + # or fails outright, so override atomically:
25799 + install_override_mode=555
25800 + ;;
25801 +
25802 +interix[[3-9]]*)
25803 + version_type=linux # correct to gnu/linux during the next big refactor
25804 + need_lib_prefix=no
25805 + need_version=no
25806 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
25807 + soname_spec='${libname}${release}${shared_ext}$major'
25808 + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
25809 + shlibpath_var=LD_LIBRARY_PATH
25810 + shlibpath_overrides_runpath=no
25811 + hardcode_into_libs=yes
25812 + ;;
25813 +
25814 +irix5* | irix6* | nonstopux*)
25815 + case $host_os in
25816 + nonstopux*) version_type=nonstopux ;;
25817 + *)
25818 + if test "$lt_cv_prog_gnu_ld" = yes; then
25819 + version_type=linux # correct to gnu/linux during the next big refactor
25820 + else
25821 + version_type=irix
25822 + fi ;;
25823 + esac
25824 + need_lib_prefix=no
25825 + need_version=no
25826 + soname_spec='${libname}${release}${shared_ext}$major'
25827 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
25828 + case $host_os in
25829 + irix5* | nonstopux*)
25830 + libsuff= shlibsuff=
25831 + ;;
25832 + *)
25833 + case $LD in # libtool.m4 will add one of these switches to LD
25834 + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
25835 + libsuff= shlibsuff= libmagic=32-bit;;
25836 + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
25837 + libsuff=32 shlibsuff=N32 libmagic=N32;;
25838 + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
25839 + libsuff=64 shlibsuff=64 libmagic=64-bit;;
25840 + *) libsuff= shlibsuff= libmagic=never-match;;
25841 + esac
25842 + ;;
25843 + esac
25844 + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
25845 + shlibpath_overrides_runpath=no
25846 + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
25847 + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
25848 + hardcode_into_libs=yes
25849 + ;;
25850 +
25851 +# No shared lib support for Linux oldld, aout, or coff.
25852 +linux*oldld* | linux*aout* | linux*coff*)
25853 + dynamic_linker=no
25854 + ;;
25855 +
25856 +# This must be glibc/ELF.
25857 +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
25858 + version_type=linux # correct to gnu/linux during the next big refactor
25859 + need_lib_prefix=no
25860 + need_version=no
25861 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
25862 + soname_spec='${libname}${release}${shared_ext}$major'
25863 + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
25864 + shlibpath_var=LD_LIBRARY_PATH
25865 + shlibpath_overrides_runpath=no
25866 +
25867 + # Some binutils ld are patched to set DT_RUNPATH
25868 + AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
25869 + [lt_cv_shlibpath_overrides_runpath=no
25870 + save_LDFLAGS=$LDFLAGS
25871 + save_libdir=$libdir
25872 + eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
25873 + LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
25874 + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
25875 + [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
25876 + [lt_cv_shlibpath_overrides_runpath=yes])])
25877 + LDFLAGS=$save_LDFLAGS
25878 + libdir=$save_libdir
25879 + ])
25880 + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
25881 +
25882 + # This implies no fast_install, which is unacceptable.
25883 + # Some rework will be needed to allow for fast_install
25884 + # before this can be enabled.
25885 + hardcode_into_libs=yes
25886 +
25887 + # Append ld.so.conf contents to the search path
25888 + if test -f /etc/ld.so.conf; then
25889 + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
25890 + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
25891 + fi
25892 +
25893 + # We used to test for /lib/ld.so.1 and disable shared libraries on
25894 + # powerpc, because MkLinux only supported shared libraries with the
25895 + # GNU dynamic linker. Since this was broken with cross compilers,
25896 + # most powerpc-linux boxes support dynamic linking these days and
25897 + # people can always --disable-shared, the test was removed, and we
25898 + # assume the GNU/Linux dynamic linker is in use.
25899 + dynamic_linker='GNU/Linux ld.so'
25900 + ;;
25901 +
25902 +netbsdelf*-gnu)
25903 + version_type=linux
25904 + need_lib_prefix=no
25905 + need_version=no
25906 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
25907 + soname_spec='${libname}${release}${shared_ext}$major'
25908 + shlibpath_var=LD_LIBRARY_PATH
25909 + shlibpath_overrides_runpath=no
25910 + hardcode_into_libs=yes
25911 + dynamic_linker='NetBSD ld.elf_so'
25912 + ;;
25913 +
25914 +netbsd*)
25915 + version_type=sunos
25916 + need_lib_prefix=no
25917 + need_version=no
25918 + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
25919 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
25920 + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
25921 + dynamic_linker='NetBSD (a.out) ld.so'
25922 + else
25923 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
25924 + soname_spec='${libname}${release}${shared_ext}$major'
25925 + dynamic_linker='NetBSD ld.elf_so'
25926 + fi
25927 + shlibpath_var=LD_LIBRARY_PATH
25928 + shlibpath_overrides_runpath=yes
25929 + hardcode_into_libs=yes
25930 + ;;
25931 +
25932 +newsos6)
25933 + version_type=linux # correct to gnu/linux during the next big refactor
25934 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
25935 + shlibpath_var=LD_LIBRARY_PATH
25936 + shlibpath_overrides_runpath=yes
25937 + ;;
25938 +
25939 +*nto* | *qnx*)
25940 + version_type=qnx
25941 + need_lib_prefix=no
25942 + need_version=no
25943 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
25944 + soname_spec='${libname}${release}${shared_ext}$major'
25945 + shlibpath_var=LD_LIBRARY_PATH
25946 + shlibpath_overrides_runpath=no
25947 + hardcode_into_libs=yes
25948 + dynamic_linker='ldqnx.so'
25949 + ;;
25950 +
25951 +openbsd*)
25952 + version_type=sunos
25953 + sys_lib_dlsearch_path_spec="/usr/lib"
25954 + need_lib_prefix=no
25955 + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
25956 + case $host_os in
25957 + openbsd3.3 | openbsd3.3.*) need_version=yes ;;
25958 + *) need_version=no ;;
25959 + esac
25960 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
25961 + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
25962 + shlibpath_var=LD_LIBRARY_PATH
25963 + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
25964 + case $host_os in
25965 + openbsd2.[[89]] | openbsd2.[[89]].*)
25966 + shlibpath_overrides_runpath=no
25967 + ;;
25968 + *)
25969 + shlibpath_overrides_runpath=yes
25970 + ;;
25971 + esac
25972 + else
25973 + shlibpath_overrides_runpath=yes
25974 + fi
25975 + ;;
25976 +
25977 +os2*)
25978 + libname_spec='$name'
25979 + shrext_cmds=".dll"
25980 + need_lib_prefix=no
25981 + library_names_spec='$libname${shared_ext} $libname.a'
25982 + dynamic_linker='OS/2 ld.exe'
25983 + shlibpath_var=LIBPATH
25984 + ;;
25985 +
25986 +osf3* | osf4* | osf5*)
25987 + version_type=osf
25988 + need_lib_prefix=no
25989 + need_version=no
25990 + soname_spec='${libname}${release}${shared_ext}$major'
25991 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
25992 + shlibpath_var=LD_LIBRARY_PATH
25993 + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
25994 + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
25995 + ;;
25996 +
25997 +rdos*)
25998 + dynamic_linker=no
25999 + ;;
26000 +
26001 +solaris*)
26002 + version_type=linux # correct to gnu/linux during the next big refactor
26003 + need_lib_prefix=no
26004 + need_version=no
26005 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
26006 + soname_spec='${libname}${release}${shared_ext}$major'
26007 + shlibpath_var=LD_LIBRARY_PATH
26008 + shlibpath_overrides_runpath=yes
26009 + hardcode_into_libs=yes
26010 + # ldd complains unless libraries are executable
26011 + postinstall_cmds='chmod +x $lib'
26012 + ;;
26013 +
26014 +sunos4*)
26015 + version_type=sunos
26016 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
26017 + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
26018 + shlibpath_var=LD_LIBRARY_PATH
26019 + shlibpath_overrides_runpath=yes
26020 + if test "$with_gnu_ld" = yes; then
26021 + need_lib_prefix=no
26022 + fi
26023 + need_version=yes
26024 + ;;
26025 +
26026 +sysv4 | sysv4.3*)
26027 + version_type=linux # correct to gnu/linux during the next big refactor
26028 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
26029 + soname_spec='${libname}${release}${shared_ext}$major'
26030 + shlibpath_var=LD_LIBRARY_PATH
26031 + case $host_vendor in
26032 + sni)
26033 + shlibpath_overrides_runpath=no
26034 + need_lib_prefix=no
26035 + runpath_var=LD_RUN_PATH
26036 + ;;
26037 + siemens)
26038 + need_lib_prefix=no
26039 + ;;
26040 + motorola)
26041 + need_lib_prefix=no
26042 + need_version=no
26043 + shlibpath_overrides_runpath=no
26044 + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
26045 + ;;
26046 + esac
26047 + ;;
26048 +
26049 +sysv4*MP*)
26050 + if test -d /usr/nec ;then
26051 + version_type=linux # correct to gnu/linux during the next big refactor
26052 + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
26053 + soname_spec='$libname${shared_ext}.$major'
26054 + shlibpath_var=LD_LIBRARY_PATH
26055 + fi
26056 + ;;
26057 +
26058 +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
26059 + version_type=freebsd-elf
26060 + need_lib_prefix=no
26061 + need_version=no
26062 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
26063 + soname_spec='${libname}${release}${shared_ext}$major'
26064 + shlibpath_var=LD_LIBRARY_PATH
26065 + shlibpath_overrides_runpath=yes
26066 + hardcode_into_libs=yes
26067 + if test "$with_gnu_ld" = yes; then
26068 + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
26069 + else
26070 + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
26071 + case $host_os in
26072 + sco3.2v5*)
26073 + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
26074 + ;;
26075 + esac
26076 + fi
26077 + sys_lib_dlsearch_path_spec='/usr/lib'
26078 + ;;
26079 +
26080 +tpf*)
26081 + # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
26082 + version_type=linux # correct to gnu/linux during the next big refactor
26083 + need_lib_prefix=no
26084 + need_version=no
26085 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
26086 + shlibpath_var=LD_LIBRARY_PATH
26087 + shlibpath_overrides_runpath=no
26088 + hardcode_into_libs=yes
26089 + ;;
26090 +
26091 +uts4*)
26092 + version_type=linux # correct to gnu/linux during the next big refactor
26093 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
26094 + soname_spec='${libname}${release}${shared_ext}$major'
26095 + shlibpath_var=LD_LIBRARY_PATH
26096 + ;;
26097 +
26098 +*)
26099 + dynamic_linker=no
26100 + ;;
26101 +esac
26102 +AC_MSG_RESULT([$dynamic_linker])
26103 +test "$dynamic_linker" = no && can_build_shared=no
26104 +
26105 +variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
26106 +if test "$GCC" = yes; then
26107 + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
26108 +fi
26109 +
26110 +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
26111 + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
26112 +fi
26113 +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
26114 + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
26115 +fi
26116 +
26117 +_LT_DECL([], [variables_saved_for_relink], [1],
26118 + [Variables whose values should be saved in libtool wrapper scripts and
26119 + restored at link time])
26120 +_LT_DECL([], [need_lib_prefix], [0],
26121 + [Do we need the "lib" prefix for modules?])
26122 +_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
26123 +_LT_DECL([], [version_type], [0], [Library versioning type])
26124 +_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
26125 +_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
26126 +_LT_DECL([], [shlibpath_overrides_runpath], [0],
26127 + [Is shlibpath searched before the hard-coded library search path?])
26128 +_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
26129 +_LT_DECL([], [library_names_spec], [1],
26130 + [[List of archive names. First name is the real one, the rest are links.
26131 + The last name is the one that the linker finds with -lNAME]])
26132 +_LT_DECL([], [soname_spec], [1],
26133 + [[The coded name of the library, if different from the real name]])
26134 +_LT_DECL([], [install_override_mode], [1],
26135 + [Permission mode override for installation of shared libraries])
26136 +_LT_DECL([], [postinstall_cmds], [2],
26137 + [Command to use after installation of a shared archive])
26138 +_LT_DECL([], [postuninstall_cmds], [2],
26139 + [Command to use after uninstallation of a shared archive])
26140 +_LT_DECL([], [finish_cmds], [2],
26141 + [Commands used to finish a libtool library installation in a directory])
26142 +_LT_DECL([], [finish_eval], [1],
26143 + [[As "finish_cmds", except a single script fragment to be evaled but
26144 + not shown]])
26145 +_LT_DECL([], [hardcode_into_libs], [0],
26146 + [Whether we should hardcode library paths into libraries])
26147 +_LT_DECL([], [sys_lib_search_path_spec], [2],
26148 + [Compile-time system search path for libraries])
26149 +_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
26150 + [Run-time system search path for libraries])
26151 +])# _LT_SYS_DYNAMIC_LINKER
26152 +
26153 +
26154 +# _LT_PATH_TOOL_PREFIX(TOOL)
26155 +# --------------------------
26156 +# find a file program which can recognize shared library
26157 +AC_DEFUN([_LT_PATH_TOOL_PREFIX],
26158 +[m4_require([_LT_DECL_EGREP])dnl
26159 +AC_MSG_CHECKING([for $1])
26160 +AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
26161 +[case $MAGIC_CMD in
26162 +[[\\/*] | ?:[\\/]*])
26163 + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
26164 + ;;
26165 +*)
26166 + lt_save_MAGIC_CMD="$MAGIC_CMD"
26167 + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
26168 +dnl $ac_dummy forces splitting on constant user-supplied paths.
26169 +dnl POSIX.2 word splitting is done only on the output of word expansions,
26170 +dnl not every word. This closes a longstanding sh security hole.
26171 + ac_dummy="m4_if([$2], , $PATH, [$2])"
26172 + for ac_dir in $ac_dummy; do
26173 + IFS="$lt_save_ifs"
26174 + test -z "$ac_dir" && ac_dir=.
26175 + if test -f $ac_dir/$1; then
26176 + lt_cv_path_MAGIC_CMD="$ac_dir/$1"
26177 + if test -n "$file_magic_test_file"; then
26178 + case $deplibs_check_method in
26179 + "file_magic "*)
26180 + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
26181 + MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
26182 + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
26183 + $EGREP "$file_magic_regex" > /dev/null; then
26184 + :
26185 + else
26186 + cat <<_LT_EOF 1>&2
26187 +
26188 +*** Warning: the command libtool uses to detect shared libraries,
26189 +*** $file_magic_cmd, produces output that libtool cannot recognize.
26190 +*** The result is that libtool may fail to recognize shared libraries
26191 +*** as such. This will affect the creation of libtool libraries that
26192 +*** depend on shared libraries, but programs linked with such libtool
26193 +*** libraries will work regardless of this problem. Nevertheless, you
26194 +*** may want to report the problem to your system manager and/or to
26195 +*** bug-libtool@gnu.org
26196 +
26197 +_LT_EOF
26198 + fi ;;
26199 + esac
26200 + fi
26201 + break
26202 + fi
26203 + done
26204 + IFS="$lt_save_ifs"
26205 + MAGIC_CMD="$lt_save_MAGIC_CMD"
26206 + ;;
26207 +esac])
26208 +MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
26209 +if test -n "$MAGIC_CMD"; then
26210 + AC_MSG_RESULT($MAGIC_CMD)
26211 +else
26212 + AC_MSG_RESULT(no)
26213 +fi
26214 +_LT_DECL([], [MAGIC_CMD], [0],
26215 + [Used to examine libraries when file_magic_cmd begins with "file"])dnl
26216 +])# _LT_PATH_TOOL_PREFIX
26217 +
26218 +# Old name:
26219 +AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
26220 +dnl aclocal-1.4 backwards compatibility:
26221 +dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
26222 +
26223 +
26224 +# _LT_PATH_MAGIC
26225 +# --------------
26226 +# find a file program which can recognize a shared library
26227 +m4_defun([_LT_PATH_MAGIC],
26228 +[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
26229 +if test -z "$lt_cv_path_MAGIC_CMD"; then
26230 + if test -n "$ac_tool_prefix"; then
26231 + _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
26232 + else
26233 + MAGIC_CMD=:
26234 + fi
26235 +fi
26236 +])# _LT_PATH_MAGIC
26237 +
26238 +
26239 +# LT_PATH_LD
26240 +# ----------
26241 +# find the pathname to the GNU or non-GNU linker
26242 +AC_DEFUN([LT_PATH_LD],
26243 +[AC_REQUIRE([AC_PROG_CC])dnl
26244 +AC_REQUIRE([AC_CANONICAL_HOST])dnl
26245 +AC_REQUIRE([AC_CANONICAL_BUILD])dnl
26246 +m4_require([_LT_DECL_SED])dnl
26247 +m4_require([_LT_DECL_EGREP])dnl
26248 +m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
26249 +
26250 +AC_ARG_WITH([gnu-ld],
26251 + [AS_HELP_STRING([--with-gnu-ld],
26252 + [assume the C compiler uses GNU ld @<:@default=no@:>@])],
26253 + [test "$withval" = no || with_gnu_ld=yes],
26254 + [with_gnu_ld=no])dnl
26255 +
26256 +ac_prog=ld
26257 +if test "$GCC" = yes; then
26258 + # Check if gcc -print-prog-name=ld gives a path.
26259 + AC_MSG_CHECKING([for ld used by $CC])
26260 + case $host in
26261 + *-*-mingw*)
26262 + # gcc leaves a trailing carriage return which upsets mingw
26263 + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
26264 + *)
26265 + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
26266 + esac
26267 + case $ac_prog in
26268 + # Accept absolute paths.
26269 + [[\\/]]* | ?:[[\\/]]*)
26270 + re_direlt='/[[^/]][[^/]]*/\.\./'
26271 + # Canonicalize the pathname of ld
26272 + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
26273 + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
26274 + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
26275 + done
26276 + test -z "$LD" && LD="$ac_prog"
26277 + ;;
26278 + "")
26279 + # If it fails, then pretend we aren't using GCC.
26280 + ac_prog=ld
26281 + ;;
26282 + *)
26283 + # If it is relative, then search for the first ld in PATH.
26284 + with_gnu_ld=unknown
26285 + ;;
26286 + esac
26287 +elif test "$with_gnu_ld" = yes; then
26288 + AC_MSG_CHECKING([for GNU ld])
26289 +else
26290 + AC_MSG_CHECKING([for non-GNU ld])
26291 +fi
26292 +AC_CACHE_VAL(lt_cv_path_LD,
26293 +[if test -z "$LD"; then
26294 + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
26295 + for ac_dir in $PATH; do
26296 + IFS="$lt_save_ifs"
26297 + test -z "$ac_dir" && ac_dir=.
26298 + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
26299 + lt_cv_path_LD="$ac_dir/$ac_prog"
26300 + # Check to see if the program is GNU ld. I'd rather use --version,
26301 + # but apparently some variants of GNU ld only accept -v.
26302 + # Break only if it was the GNU/non-GNU ld that we prefer.
26303 + case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
26304 + *GNU* | *'with BFD'*)
26305 + test "$with_gnu_ld" != no && break
26306 + ;;
26307 + *)
26308 + test "$with_gnu_ld" != yes && break
26309 + ;;
26310 + esac
26311 + fi
26312 + done
26313 + IFS="$lt_save_ifs"
26314 +else
26315 + lt_cv_path_LD="$LD" # Let the user override the test with a path.
26316 +fi])
26317 +LD="$lt_cv_path_LD"
26318 +if test -n "$LD"; then
26319 + AC_MSG_RESULT($LD)
26320 +else
26321 + AC_MSG_RESULT(no)
26322 +fi
26323 +test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
26324 +_LT_PATH_LD_GNU
26325 +AC_SUBST([LD])
26326 +
26327 +_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
26328 +])# LT_PATH_LD
26329 +
26330 +# Old names:
26331 +AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
26332 +AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
26333 +dnl aclocal-1.4 backwards compatibility:
26334 +dnl AC_DEFUN([AM_PROG_LD], [])
26335 +dnl AC_DEFUN([AC_PROG_LD], [])
26336 +
26337 +
26338 +# _LT_PATH_LD_GNU
26339 +#- --------------
26340 +m4_defun([_LT_PATH_LD_GNU],
26341 +[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
26342 +[# I'd rather use --version here, but apparently some GNU lds only accept -v.
26343 +case `$LD -v 2>&1 </dev/null` in
26344 +*GNU* | *'with BFD'*)
26345 + lt_cv_prog_gnu_ld=yes
26346 + ;;
26347 +*)
26348 + lt_cv_prog_gnu_ld=no
26349 + ;;
26350 +esac])
26351 +with_gnu_ld=$lt_cv_prog_gnu_ld
26352 +])# _LT_PATH_LD_GNU
26353 +
26354 +
26355 +# _LT_CMD_RELOAD
26356 +# --------------
26357 +# find reload flag for linker
26358 +# -- PORTME Some linkers may need a different reload flag.
26359 +m4_defun([_LT_CMD_RELOAD],
26360 +[AC_CACHE_CHECK([for $LD option to reload object files],
26361 + lt_cv_ld_reload_flag,
26362 + [lt_cv_ld_reload_flag='-r'])
26363 +reload_flag=$lt_cv_ld_reload_flag
26364 +case $reload_flag in
26365 +"" | " "*) ;;
26366 +*) reload_flag=" $reload_flag" ;;
26367 +esac
26368 +reload_cmds='$LD$reload_flag -o $output$reload_objs'
26369 +case $host_os in
26370 + cygwin* | mingw* | pw32* | cegcc*)
26371 + if test "$GCC" != yes; then
26372 + reload_cmds=false
26373 + fi
26374 + ;;
26375 + darwin*)
26376 + if test "$GCC" = yes; then
26377 + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
26378 + else
26379 + reload_cmds='$LD$reload_flag -o $output$reload_objs'
26380 + fi
26381 + ;;
26382 +esac
26383 +_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
26384 +_LT_TAGDECL([], [reload_cmds], [2])dnl
26385 +])# _LT_CMD_RELOAD
26386 +
26387 +
26388 +# _LT_CHECK_MAGIC_METHOD
26389 +# ----------------------
26390 +# how to check for library dependencies
26391 +# -- PORTME fill in with the dynamic library characteristics
26392 +m4_defun([_LT_CHECK_MAGIC_METHOD],
26393 +[m4_require([_LT_DECL_EGREP])
26394 +m4_require([_LT_DECL_OBJDUMP])
26395 +AC_CACHE_CHECK([how to recognize dependent libraries],
26396 +lt_cv_deplibs_check_method,
26397 +[lt_cv_file_magic_cmd='$MAGIC_CMD'
26398 +lt_cv_file_magic_test_file=
26399 +lt_cv_deplibs_check_method='unknown'
26400 +# Need to set the preceding variable on all platforms that support
26401 +# interlibrary dependencies.
26402 +# 'none' -- dependencies not supported.
26403 +# `unknown' -- same as none, but documents that we really don't know.
26404 +# 'pass_all' -- all dependencies passed with no checks.
26405 +# 'test_compile' -- check by making test program.
26406 +# 'file_magic [[regex]]' -- check by looking for files in library path
26407 +# which responds to the $file_magic_cmd with a given extended regex.
26408 +# If you have `file' or equivalent on your system and you're not sure
26409 +# whether `pass_all' will *always* work, you probably want this one.
26410 +
26411 +case $host_os in
26412 +aix[[4-9]]*)
26413 + lt_cv_deplibs_check_method=pass_all
26414 + ;;
26415 +
26416 +beos*)
26417 + lt_cv_deplibs_check_method=pass_all
26418 + ;;
26419 +
26420 +bsdi[[45]]*)
26421 + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
26422 + lt_cv_file_magic_cmd='/usr/bin/file -L'
26423 + lt_cv_file_magic_test_file=/shlib/libc.so
26424 + ;;
26425 +
26426 +cygwin*)
26427 + # func_win32_libid is a shell function defined in ltmain.sh
26428 + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
26429 + lt_cv_file_magic_cmd='func_win32_libid'
26430 + ;;
26431 +
26432 +mingw* | pw32*)
26433 + # Base MSYS/MinGW do not provide the 'file' command needed by
26434 + # func_win32_libid shell function, so use a weaker test based on 'objdump',
26435 + # unless we find 'file', for example because we are cross-compiling.
26436 + # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
26437 + if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
26438 + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
26439 + lt_cv_file_magic_cmd='func_win32_libid'
26440 + else
26441 + # Keep this pattern in sync with the one in func_win32_libid.
26442 + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
26443 + lt_cv_file_magic_cmd='$OBJDUMP -f'
26444 + fi
26445 + ;;
26446 +
26447 +cegcc*)
26448 + # use the weaker test based on 'objdump'. See mingw*.
26449 + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
26450 + lt_cv_file_magic_cmd='$OBJDUMP -f'
26451 + ;;
26452 +
26453 +darwin* | rhapsody*)
26454 + lt_cv_deplibs_check_method=pass_all
26455 + ;;
26456 +
26457 +freebsd* | dragonfly*)
26458 + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
26459 + case $host_cpu in
26460 + i*86 )
26461 + # Not sure whether the presence of OpenBSD here was a mistake.
26462 + # Let's accept both of them until this is cleared up.
26463 + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
26464 + lt_cv_file_magic_cmd=/usr/bin/file
26465 + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
26466 + ;;
26467 + esac
26468 + else
26469 + lt_cv_deplibs_check_method=pass_all
26470 + fi
26471 + ;;
26472 +
26473 +haiku*)
26474 + lt_cv_deplibs_check_method=pass_all
26475 + ;;
26476 +
26477 +hpux10.20* | hpux11*)
26478 + lt_cv_file_magic_cmd=/usr/bin/file
26479 + case $host_cpu in
26480 + ia64*)
26481 + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
26482 + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
26483 + ;;
26484 + hppa*64*)
26485 + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
26486 + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
26487 + ;;
26488 + *)
26489 + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
26490 + lt_cv_file_magic_test_file=/usr/lib/libc.sl
26491 + ;;
26492 + esac
26493 + ;;
26494 +
26495 +interix[[3-9]]*)
26496 + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
26497 + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
26498 + ;;
26499 +
26500 +irix5* | irix6* | nonstopux*)
26501 + case $LD in
26502 + *-32|*"-32 ") libmagic=32-bit;;
26503 + *-n32|*"-n32 ") libmagic=N32;;
26504 + *-64|*"-64 ") libmagic=64-bit;;
26505 + *) libmagic=never-match;;
26506 + esac
26507 + lt_cv_deplibs_check_method=pass_all
26508 + ;;
26509 +
26510 +# This must be glibc/ELF.
26511 +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
26512 + lt_cv_deplibs_check_method=pass_all
26513 + ;;
26514 +
26515 +netbsd* | netbsdelf*-gnu)
26516 + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
26517 + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
26518 + else
26519 + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
26520 + fi
26521 + ;;
26522 +
26523 +newos6*)
26524 + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
26525 + lt_cv_file_magic_cmd=/usr/bin/file
26526 + lt_cv_file_magic_test_file=/usr/lib/libnls.so
26527 + ;;
26528 +
26529 +*nto* | *qnx*)
26530 + lt_cv_deplibs_check_method=pass_all
26531 + ;;
26532 +
26533 +openbsd*)
26534 + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
26535 + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
26536 + else
26537 + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
26538 + fi
26539 + ;;
26540 +
26541 +osf3* | osf4* | osf5*)
26542 + lt_cv_deplibs_check_method=pass_all
26543 + ;;
26544 +
26545 +rdos*)
26546 + lt_cv_deplibs_check_method=pass_all
26547 + ;;
26548 +
26549 +solaris*)
26550 + lt_cv_deplibs_check_method=pass_all
26551 + ;;
26552 +
26553 +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
26554 + lt_cv_deplibs_check_method=pass_all
26555 + ;;
26556 +
26557 +sysv4 | sysv4.3*)
26558 + case $host_vendor in
26559 + motorola)
26560 + 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]]'
26561 + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
26562 + ;;
26563 + ncr)
26564 + lt_cv_deplibs_check_method=pass_all
26565 + ;;
26566 + sequent)
26567 + lt_cv_file_magic_cmd='/bin/file'
26568 + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
26569 + ;;
26570 + sni)
26571 + lt_cv_file_magic_cmd='/bin/file'
26572 + lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
26573 + lt_cv_file_magic_test_file=/lib/libc.so
26574 + ;;
26575 + siemens)
26576 + lt_cv_deplibs_check_method=pass_all
26577 + ;;
26578 + pc)
26579 + lt_cv_deplibs_check_method=pass_all
26580 + ;;
26581 + esac
26582 + ;;
26583 +
26584 +tpf*)
26585 + lt_cv_deplibs_check_method=pass_all
26586 + ;;
26587 +esac
26588 +])
26589 +
26590 +file_magic_glob=
26591 +want_nocaseglob=no
26592 +if test "$build" = "$host"; then
26593 + case $host_os in
26594 + mingw* | pw32*)
26595 + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
26596 + want_nocaseglob=yes
26597 + else
26598 + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
26599 + fi
26600 + ;;
26601 + esac
26602 +fi
26603 +
26604 +file_magic_cmd=$lt_cv_file_magic_cmd
26605 +deplibs_check_method=$lt_cv_deplibs_check_method
26606 +test -z "$deplibs_check_method" && deplibs_check_method=unknown
26607 +
26608 +_LT_DECL([], [deplibs_check_method], [1],
26609 + [Method to check whether dependent libraries are shared objects])
26610 +_LT_DECL([], [file_magic_cmd], [1],
26611 + [Command to use when deplibs_check_method = "file_magic"])
26612 +_LT_DECL([], [file_magic_glob], [1],
26613 + [How to find potential files when deplibs_check_method = "file_magic"])
26614 +_LT_DECL([], [want_nocaseglob], [1],
26615 + [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
26616 +])# _LT_CHECK_MAGIC_METHOD
26617 +
26618 +
26619 +# LT_PATH_NM
26620 +# ----------
26621 +# find the pathname to a BSD- or MS-compatible name lister
26622 +AC_DEFUN([LT_PATH_NM],
26623 +[AC_REQUIRE([AC_PROG_CC])dnl
26624 +AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
26625 +[if test -n "$NM"; then
26626 + # Let the user override the test.
26627 + lt_cv_path_NM="$NM"
26628 +else
26629 + lt_nm_to_check="${ac_tool_prefix}nm"
26630 + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
26631 + lt_nm_to_check="$lt_nm_to_check nm"
26632 + fi
26633 + for lt_tmp_nm in $lt_nm_to_check; do
26634 + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
26635 + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
26636 + IFS="$lt_save_ifs"
26637 + test -z "$ac_dir" && ac_dir=.
26638 + tmp_nm="$ac_dir/$lt_tmp_nm"
26639 + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
26640 + # Check to see if the nm accepts a BSD-compat flag.
26641 + # Adding the `sed 1q' prevents false positives on HP-UX, which says:
26642 + # nm: unknown option "B" ignored
26643 + # Tru64's nm complains that /dev/null is an invalid object file
26644 + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
26645 + */dev/null* | *'Invalid file or object type'*)
26646 + lt_cv_path_NM="$tmp_nm -B"
26647 + break
26648 + ;;
26649 + *)
26650 + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
26651 + */dev/null*)
26652 + lt_cv_path_NM="$tmp_nm -p"
26653 + break
26654 + ;;
26655 + *)
26656 + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
26657 + continue # so that we can try to find one that supports BSD flags
26658 + ;;
26659 + esac
26660 + ;;
26661 + esac
26662 + fi
26663 + done
26664 + IFS="$lt_save_ifs"
26665 + done
26666 + : ${lt_cv_path_NM=no}
26667 +fi])
26668 +if test "$lt_cv_path_NM" != "no"; then
26669 + NM="$lt_cv_path_NM"
26670 +else
26671 + # Didn't find any BSD compatible name lister, look for dumpbin.
26672 + if test -n "$DUMPBIN"; then :
26673 + # Let the user override the test.
26674 + else
26675 + AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
26676 + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
26677 + *COFF*)
26678 + DUMPBIN="$DUMPBIN -symbols"
26679 + ;;
26680 + *)
26681 + DUMPBIN=:
26682 + ;;
26683 + esac
26684 + fi
26685 + AC_SUBST([DUMPBIN])
26686 + if test "$DUMPBIN" != ":"; then
26687 + NM="$DUMPBIN"
26688 + fi
26689 +fi
26690 +test -z "$NM" && NM=nm
26691 +AC_SUBST([NM])
26692 +_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
26693 +
26694 +AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
26695 + [lt_cv_nm_interface="BSD nm"
26696 + echo "int some_variable = 0;" > conftest.$ac_ext
26697 + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
26698 + (eval "$ac_compile" 2>conftest.err)
26699 + cat conftest.err >&AS_MESSAGE_LOG_FD
26700 + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
26701 + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
26702 + cat conftest.err >&AS_MESSAGE_LOG_FD
26703 + (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
26704 + cat conftest.out >&AS_MESSAGE_LOG_FD
26705 + if $GREP 'External.*some_variable' conftest.out > /dev/null; then
26706 + lt_cv_nm_interface="MS dumpbin"
26707 + fi
26708 + rm -f conftest*])
26709 +])# LT_PATH_NM
26710 +
26711 +# Old names:
26712 +AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
26713 +AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
26714 +dnl aclocal-1.4 backwards compatibility:
26715 +dnl AC_DEFUN([AM_PROG_NM], [])
26716 +dnl AC_DEFUN([AC_PROG_NM], [])
26717 +
26718 +# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
26719 +# --------------------------------
26720 +# how to determine the name of the shared library
26721 +# associated with a specific link library.
26722 +# -- PORTME fill in with the dynamic library characteristics
26723 +m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
26724 +[m4_require([_LT_DECL_EGREP])
26725 +m4_require([_LT_DECL_OBJDUMP])
26726 +m4_require([_LT_DECL_DLLTOOL])
26727 +AC_CACHE_CHECK([how to associate runtime and link libraries],
26728 +lt_cv_sharedlib_from_linklib_cmd,
26729 +[lt_cv_sharedlib_from_linklib_cmd='unknown'
26730 +
26731 +case $host_os in
26732 +cygwin* | mingw* | pw32* | cegcc*)
26733 + # two different shell functions defined in ltmain.sh
26734 + # decide which to use based on capabilities of $DLLTOOL
26735 + case `$DLLTOOL --help 2>&1` in
26736 + *--identify-strict*)
26737 + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
26738 + ;;
26739 + *)
26740 + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
26741 + ;;
26742 + esac
26743 + ;;
26744 +*)
26745 + # fallback: assume linklib IS sharedlib
26746 + lt_cv_sharedlib_from_linklib_cmd="$ECHO"
26747 + ;;
26748 +esac
26749 +])
26750 +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
26751 +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
26752 +
26753 +_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
26754 + [Command to associate shared and link libraries])
26755 +])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
26756 +
26757 +
26758 +# _LT_PATH_MANIFEST_TOOL
26759 +# ----------------------
26760 +# locate the manifest tool
26761 +m4_defun([_LT_PATH_MANIFEST_TOOL],
26762 +[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
26763 +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
26764 +AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
26765 + [lt_cv_path_mainfest_tool=no
26766 + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
26767 + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
26768 + cat conftest.err >&AS_MESSAGE_LOG_FD
26769 + if $GREP 'Manifest Tool' conftest.out > /dev/null; then
26770 + lt_cv_path_mainfest_tool=yes
26771 + fi
26772 + rm -f conftest*])
26773 +if test "x$lt_cv_path_mainfest_tool" != xyes; then
26774 + MANIFEST_TOOL=:
26775 +fi
26776 +_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
26777 +])# _LT_PATH_MANIFEST_TOOL
26778 +
26779 +
26780 +# LT_LIB_M
26781 +# --------
26782 +# check for math library
26783 +AC_DEFUN([LT_LIB_M],
26784 +[AC_REQUIRE([AC_CANONICAL_HOST])dnl
26785 +LIBM=
26786 +case $host in
26787 +*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
26788 + # These system don't have libm, or don't need it
26789 + ;;
26790 +*-ncr-sysv4.3*)
26791 + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
26792 + AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
26793 + ;;
26794 +*)
26795 + AC_CHECK_LIB(m, cos, LIBM="-lm")
26796 + ;;
26797 +esac
26798 +AC_SUBST([LIBM])
26799 +])# LT_LIB_M
26800 +
26801 +# Old name:
26802 +AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
26803 +dnl aclocal-1.4 backwards compatibility:
26804 +dnl AC_DEFUN([AC_CHECK_LIBM], [])
26805 +
26806 +
26807 +# _LT_COMPILER_NO_RTTI([TAGNAME])
26808 +# -------------------------------
26809 +m4_defun([_LT_COMPILER_NO_RTTI],
26810 +[m4_require([_LT_TAG_COMPILER])dnl
26811 +
26812 +_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
26813 +
26814 +if test "$GCC" = yes; then
26815 + case $cc_basename in
26816 + nvcc*)
26817 + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
26818 + *)
26819 + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
26820 + esac
26821 +
26822 + _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
26823 + lt_cv_prog_compiler_rtti_exceptions,
26824 + [-fno-rtti -fno-exceptions], [],
26825 + [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
26826 +fi
26827 +_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
26828 + [Compiler flag to turn off builtin functions])
26829 +])# _LT_COMPILER_NO_RTTI
26830 +
26831 +
26832 +# _LT_CMD_GLOBAL_SYMBOLS
26833 +# ----------------------
26834 +m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
26835 +[AC_REQUIRE([AC_CANONICAL_HOST])dnl
26836 +AC_REQUIRE([AC_PROG_CC])dnl
26837 +AC_REQUIRE([AC_PROG_AWK])dnl
26838 +AC_REQUIRE([LT_PATH_NM])dnl
26839 +AC_REQUIRE([LT_PATH_LD])dnl
26840 +m4_require([_LT_DECL_SED])dnl
26841 +m4_require([_LT_DECL_EGREP])dnl
26842 +m4_require([_LT_TAG_COMPILER])dnl
26843 +
26844 +# Check for command to grab the raw symbol name followed by C symbol from nm.
26845 +AC_MSG_CHECKING([command to parse $NM output from $compiler object])
26846 +AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
26847 +[
26848 +# These are sane defaults that work on at least a few old systems.
26849 +# [They come from Ultrix. What could be older than Ultrix?!! ;)]
26850 +
26851 +# Character class describing NM global symbol codes.
26852 +symcode='[[BCDEGRST]]'
26853 +
26854 +# Regexp to match symbols that can be accessed directly from C.
26855 +sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
26856 +
26857 +# Define system-specific variables.
26858 +case $host_os in
26859 +aix*)
26860 + symcode='[[BCDT]]'
26861 + ;;
26862 +cygwin* | mingw* | pw32* | cegcc*)
26863 + symcode='[[ABCDGISTW]]'
26864 + ;;
26865 +hpux*)
26866 + if test "$host_cpu" = ia64; then
26867 + symcode='[[ABCDEGRST]]'
26868 + fi
26869 + ;;
26870 +irix* | nonstopux*)
26871 + symcode='[[BCDEGRST]]'
26872 + ;;
26873 +osf*)
26874 + symcode='[[BCDEGQRST]]'
26875 + ;;
26876 +solaris*)
26877 + symcode='[[BDRT]]'
26878 + ;;
26879 +sco3.2v5*)
26880 + symcode='[[DT]]'
26881 + ;;
26882 +sysv4.2uw2*)
26883 + symcode='[[DT]]'
26884 + ;;
26885 +sysv5* | sco5v6* | unixware* | OpenUNIX*)
26886 + symcode='[[ABDT]]'
26887 + ;;
26888 +sysv4)
26889 + symcode='[[DFNSTU]]'
26890 + ;;
26891 +esac
26892 +
26893 +# If we're using GNU nm, then use its standard symbol codes.
26894 +case `$NM -V 2>&1` in
26895 +*GNU* | *'with BFD'*)
26896 + symcode='[[ABCDGIRSTW]]' ;;
26897 +esac
26898 +
26899 +# Transform an extracted symbol line into a proper C declaration.
26900 +# Some systems (esp. on ia64) link data and code symbols differently,
26901 +# so use this general approach.
26902 +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
26903 +
26904 +# Transform an extracted symbol line into symbol name and symbol address
26905 +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
26906 +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
26907 +
26908 +# Handle CRLF in mingw tool chain
26909 +opt_cr=
26910 +case $build_os in
26911 +mingw*)
26912 + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
26913 + ;;
26914 +esac
26915 +
26916 +# Try without a prefix underscore, then with it.
26917 +for ac_symprfx in "" "_"; do
26918 +
26919 + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
26920 + symxfrm="\\1 $ac_symprfx\\2 \\2"
26921 +
26922 + # Write the raw and C identifiers.
26923 + if test "$lt_cv_nm_interface" = "MS dumpbin"; then
26924 + # Fake it for dumpbin and say T for any non-static function
26925 + # and D for any global variable.
26926 + # Also find C++ and __fastcall symbols from MSVC++,
26927 + # which start with @ or ?.
26928 + lt_cv_sys_global_symbol_pipe="$AWK ['"\
26929 +" {last_section=section; section=\$ 3};"\
26930 +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
26931 +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
26932 +" \$ 0!~/External *\|/{next};"\
26933 +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
26934 +" {if(hide[section]) next};"\
26935 +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
26936 +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
26937 +" s[1]~/^[@?]/{print s[1], s[1]; next};"\
26938 +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
26939 +" ' prfx=^$ac_symprfx]"
26940 + else
26941 + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
26942 + fi
26943 + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
26944 +
26945 + # Check to see that the pipe works correctly.
26946 + pipe_works=no
26947 +
26948 + rm -f conftest*
26949 + cat > conftest.$ac_ext <<_LT_EOF
26950 +#ifdef __cplusplus
26951 +extern "C" {
26952 +#endif
26953 +char nm_test_var;
26954 +void nm_test_func(void);
26955 +void nm_test_func(void){}
26956 +#ifdef __cplusplus
26957 +}
26958 +#endif
26959 +int main(){nm_test_var='a';nm_test_func();return(0);}
26960 +_LT_EOF
26961 +
26962 + if AC_TRY_EVAL(ac_compile); then
26963 + # Now try to grab the symbols.
26964 + nlist=conftest.nm
26965 + if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
26966 + # Try sorting and uniquifying the output.
26967 + if sort "$nlist" | uniq > "$nlist"T; then
26968 + mv -f "$nlist"T "$nlist"
26969 + else
26970 + rm -f "$nlist"T
26971 + fi
26972 +
26973 + # Make sure that we snagged all the symbols we need.
26974 + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
26975 + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
26976 + cat <<_LT_EOF > conftest.$ac_ext
26977 +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
26978 +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
26979 +/* DATA imports from DLLs on WIN32 con't be const, because runtime
26980 + relocations are performed -- see ld's documentation on pseudo-relocs. */
26981 +# define LT@&t@_DLSYM_CONST
26982 +#elif defined(__osf__)
26983 +/* This system does not cope well with relocations in const data. */
26984 +# define LT@&t@_DLSYM_CONST
26985 +#else
26986 +# define LT@&t@_DLSYM_CONST const
26987 +#endif
26988 +
26989 +#ifdef __cplusplus
26990 +extern "C" {
26991 +#endif
26992 +
26993 +_LT_EOF
26994 + # Now generate the symbol file.
26995 + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
26996 +
26997 + cat <<_LT_EOF >> conftest.$ac_ext
26998 +
26999 +/* The mapping between symbol names and symbols. */
27000 +LT@&t@_DLSYM_CONST struct {
27001 + const char *name;
27002 + void *address;
27003 +}
27004 +lt__PROGRAM__LTX_preloaded_symbols[[]] =
27005 +{
27006 + { "@PROGRAM@", (void *) 0 },
27007 +_LT_EOF
27008 + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
27009 + cat <<\_LT_EOF >> conftest.$ac_ext
27010 + {0, (void *) 0}
27011 +};
27012 +
27013 +/* This works around a problem in FreeBSD linker */
27014 +#ifdef FREEBSD_WORKAROUND
27015 +static const void *lt_preloaded_setup() {
27016 + return lt__PROGRAM__LTX_preloaded_symbols;
27017 +}
27018 +#endif
27019 +
27020 +#ifdef __cplusplus
27021 +}
27022 +#endif
27023 +_LT_EOF
27024 + # Now try linking the two files.
27025 + mv conftest.$ac_objext conftstm.$ac_objext
27026 + lt_globsym_save_LIBS=$LIBS
27027 + lt_globsym_save_CFLAGS=$CFLAGS
27028 + LIBS="conftstm.$ac_objext"
27029 + CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
27030 + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
27031 + pipe_works=yes
27032 + fi
27033 + LIBS=$lt_globsym_save_LIBS
27034 + CFLAGS=$lt_globsym_save_CFLAGS
27035 + else
27036 + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
27037 + fi
27038 + else
27039 + echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
27040 + fi
27041 + else
27042 + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
27043 + fi
27044 + else
27045 + echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
27046 + cat conftest.$ac_ext >&5
27047 + fi
27048 + rm -rf conftest* conftst*
27049 +
27050 + # Do not use the global_symbol_pipe unless it works.
27051 + if test "$pipe_works" = yes; then
27052 + break
27053 + else
27054 + lt_cv_sys_global_symbol_pipe=
27055 + fi
27056 +done
27057 +])
27058 +if test -z "$lt_cv_sys_global_symbol_pipe"; then
27059 + lt_cv_sys_global_symbol_to_cdecl=
27060 +fi
27061 +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
27062 + AC_MSG_RESULT(failed)
27063 +else
27064 + AC_MSG_RESULT(ok)
27065 +fi
27066 +
27067 +# Response file support.
27068 +if test "$lt_cv_nm_interface" = "MS dumpbin"; then
27069 + nm_file_list_spec='@'
27070 +elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
27071 + nm_file_list_spec='@'
27072 +fi
27073 +
27074 +_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
27075 + [Take the output of nm and produce a listing of raw symbols and C names])
27076 +_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
27077 + [Transform the output of nm in a proper C declaration])
27078 +_LT_DECL([global_symbol_to_c_name_address],
27079 + [lt_cv_sys_global_symbol_to_c_name_address], [1],
27080 + [Transform the output of nm in a C name address pair])
27081 +_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
27082 + [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
27083 + [Transform the output of nm in a C name address pair when lib prefix is needed])
27084 +_LT_DECL([], [nm_file_list_spec], [1],
27085 + [Specify filename containing input files for $NM])
27086 +]) # _LT_CMD_GLOBAL_SYMBOLS
27087 +
27088 +
27089 +# _LT_COMPILER_PIC([TAGNAME])
27090 +# ---------------------------
27091 +m4_defun([_LT_COMPILER_PIC],
27092 +[m4_require([_LT_TAG_COMPILER])dnl
27093 +_LT_TAGVAR(lt_prog_compiler_wl, $1)=
27094 +_LT_TAGVAR(lt_prog_compiler_pic, $1)=
27095 +_LT_TAGVAR(lt_prog_compiler_static, $1)=
27096 +
27097 +m4_if([$1], [CXX], [
27098 + # C++ specific cases for pic, static, wl, etc.
27099 + if test "$GXX" = yes; then
27100 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
27101 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
27102 +
27103 + case $host_os in
27104 + aix*)
27105 + # All AIX code is PIC.
27106 + if test "$host_cpu" = ia64; then
27107 + # AIX 5 now supports IA64 processor
27108 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
27109 + fi
27110 + ;;
27111 +
27112 + amigaos*)
27113 + case $host_cpu in
27114 + powerpc)
27115 + # see comment about AmigaOS4 .so support
27116 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
27117 + ;;
27118 + m68k)
27119 + # FIXME: we need at least 68020 code to build shared libraries, but
27120 + # adding the `-m68020' flag to GCC prevents building anything better,
27121 + # like `-m68040'.
27122 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
27123 + ;;
27124 + esac
27125 + ;;
27126 +
27127 + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
27128 + # PIC is the default for these OSes.
27129 + ;;
27130 + mingw* | cygwin* | os2* | pw32* | cegcc*)
27131 + # This hack is so that the source file can tell whether it is being
27132 + # built for inclusion in a dll (and should export symbols for example).
27133 + # Although the cygwin gcc ignores -fPIC, still need this for old-style
27134 + # (--disable-auto-import) libraries
27135 + m4_if([$1], [GCJ], [],
27136 + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
27137 + ;;
27138 + darwin* | rhapsody*)
27139 + # PIC is the default on this platform
27140 + # Common symbols not allowed in MH_DYLIB files
27141 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
27142 + ;;
27143 + *djgpp*)
27144 + # DJGPP does not support shared libraries at all
27145 + _LT_TAGVAR(lt_prog_compiler_pic, $1)=
27146 + ;;
27147 + haiku*)
27148 + # PIC is the default for Haiku.
27149 + # The "-static" flag exists, but is broken.
27150 + _LT_TAGVAR(lt_prog_compiler_static, $1)=
27151 + ;;
27152 + interix[[3-9]]*)
27153 + # Interix 3.x gcc -fpic/-fPIC options generate broken code.
27154 + # Instead, we relocate shared libraries at runtime.
27155 + ;;
27156 + sysv4*MP*)
27157 + if test -d /usr/nec; then
27158 + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
27159 + fi
27160 + ;;
27161 + hpux*)
27162 + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
27163 + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
27164 + # sets the default TLS model and affects inlining.
27165 + case $host_cpu in
27166 + hppa*64*)
27167 + ;;
27168 + *)
27169 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
27170 + ;;
27171 + esac
27172 + ;;
27173 + *qnx* | *nto*)
27174 + # QNX uses GNU C++, but need to define -shared option too, otherwise
27175 + # it will coredump.
27176 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
27177 + ;;
27178 + *)
27179 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
27180 + ;;
27181 + esac
27182 + else
27183 + case $host_os in
27184 + aix[[4-9]]*)
27185 + # All AIX code is PIC.
27186 + if test "$host_cpu" = ia64; then
27187 + # AIX 5 now supports IA64 processor
27188 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
27189 + else
27190 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
27191 + fi
27192 + ;;
27193 + chorus*)
27194 + case $cc_basename in
27195 + cxch68*)
27196 + # Green Hills C++ Compiler
27197 + # _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"
27198 + ;;
27199 + esac
27200 + ;;
27201 + mingw* | cygwin* | os2* | pw32* | cegcc*)
27202 + # This hack is so that the source file can tell whether it is being
27203 + # built for inclusion in a dll (and should export symbols for example).
27204 + m4_if([$1], [GCJ], [],
27205 + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
27206 + ;;
27207 + dgux*)
27208 + case $cc_basename in
27209 + ec++*)
27210 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
27211 + ;;
27212 + ghcx*)
27213 + # Green Hills C++ Compiler
27214 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
27215 + ;;
27216 + *)
27217 + ;;
27218 + esac
27219 + ;;
27220 + freebsd* | dragonfly*)
27221 + # FreeBSD uses GNU C++
27222 + ;;
27223 + hpux9* | hpux10* | hpux11*)
27224 + case $cc_basename in
27225 + CC*)
27226 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
27227 + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
27228 + if test "$host_cpu" != ia64; then
27229 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
27230 + fi
27231 + ;;
27232 + aCC*)
27233 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
27234 + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
27235 + case $host_cpu in
27236 + hppa*64*|ia64*)
27237 + # +Z the default
27238 + ;;
27239 + *)
27240 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
27241 + ;;
27242 + esac
27243 + ;;
27244 + *)
27245 + ;;
27246 + esac
27247 + ;;
27248 + interix*)
27249 + # This is c89, which is MS Visual C++ (no shared libs)
27250 + # Anyone wants to do a port?
27251 + ;;
27252 + irix5* | irix6* | nonstopux*)
27253 + case $cc_basename in
27254 + CC*)
27255 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
27256 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
27257 + # CC pic flag -KPIC is the default.
27258 + ;;
27259 + *)
27260 + ;;
27261 + esac
27262 + ;;
27263 + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
27264 + case $cc_basename in
27265 + KCC*)
27266 + # KAI C++ Compiler
27267 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
27268 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
27269 + ;;
27270 + ecpc* )
27271 + # old Intel C++ for x86_64 which still supported -KPIC.
27272 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
27273 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
27274 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
27275 + ;;
27276 + icpc* )
27277 + # Intel C++, used to be incompatible with GCC.
27278 + # ICC 10 doesn't accept -KPIC any more.
27279 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
27280 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
27281 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
27282 + ;;
27283 + pgCC* | pgcpp*)
27284 + # Portland Group C++ compiler
27285 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
27286 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
27287 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
27288 + ;;
27289 + cxx*)
27290 + # Compaq C++
27291 + # Make sure the PIC flag is empty. It appears that all Alpha
27292 + # Linux and Compaq Tru64 Unix objects are PIC.
27293 + _LT_TAGVAR(lt_prog_compiler_pic, $1)=
27294 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
27295 + ;;
27296 + xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
27297 + # IBM XL 8.0, 9.0 on PPC and BlueGene
27298 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
27299 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
27300 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
27301 + ;;
27302 + *)
27303 + case `$CC -V 2>&1 | sed 5q` in
27304 + *Sun\ C*)
27305 + # Sun C++ 5.9
27306 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
27307 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
27308 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
27309 + ;;
27310 + esac
27311 + ;;
27312 + esac
27313 + ;;
27314 + lynxos*)
27315 + ;;
27316 + m88k*)
27317 + ;;
27318 + mvs*)
27319 + case $cc_basename in
27320 + cxx*)
27321 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
27322 + ;;
27323 + *)
27324 + ;;
27325 + esac
27326 + ;;
27327 + netbsd* | netbsdelf*-gnu)
27328 + ;;
27329 + *qnx* | *nto*)
27330 + # QNX uses GNU C++, but need to define -shared option too, otherwise
27331 + # it will coredump.
27332 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
27333 + ;;
27334 + osf3* | osf4* | osf5*)
27335 + case $cc_basename in
27336 + KCC*)
27337 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
27338 + ;;
27339 + RCC*)
27340 + # Rational C++ 2.4.1
27341 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
27342 + ;;
27343 + cxx*)
27344 + # Digital/Compaq C++
27345 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
27346 + # Make sure the PIC flag is empty. It appears that all Alpha
27347 + # Linux and Compaq Tru64 Unix objects are PIC.
27348 + _LT_TAGVAR(lt_prog_compiler_pic, $1)=
27349 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
27350 + ;;
27351 + *)
27352 + ;;
27353 + esac
27354 + ;;
27355 + psos*)
27356 + ;;
27357 + solaris*)
27358 + case $cc_basename in
27359 + CC* | sunCC*)
27360 + # Sun C++ 4.2, 5.x and Centerline C++
27361 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
27362 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
27363 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
27364 + ;;
27365 + gcx*)
27366 + # Green Hills C++ Compiler
27367 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
27368 + ;;
27369 + *)
27370 + ;;
27371 + esac
27372 + ;;
27373 + sunos4*)
27374 + case $cc_basename in
27375 + CC*)
27376 + # Sun C++ 4.x
27377 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
27378 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
27379 + ;;
27380 + lcc*)
27381 + # Lucid
27382 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
27383 + ;;
27384 + *)
27385 + ;;
27386 + esac
27387 + ;;
27388 + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
27389 + case $cc_basename in
27390 + CC*)
27391 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
27392 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
27393 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
27394 + ;;
27395 + esac
27396 + ;;
27397 + tandem*)
27398 + case $cc_basename in
27399 + NCC*)
27400 + # NonStop-UX NCC 3.20
27401 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
27402 + ;;
27403 + *)
27404 + ;;
27405 + esac
27406 + ;;
27407 + vxworks*)
27408 + ;;
27409 + *)
27410 + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
27411 + ;;
27412 + esac
27413 + fi
27414 +],
27415 +[
27416 + if test "$GCC" = yes; then
27417 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
27418 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
27419 +
27420 + case $host_os in
27421 + aix*)
27422 + # All AIX code is PIC.
27423 + if test "$host_cpu" = ia64; then
27424 + # AIX 5 now supports IA64 processor
27425 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
27426 + fi
27427 + ;;
27428 +
27429 + amigaos*)
27430 + case $host_cpu in
27431 + powerpc)
27432 + # see comment about AmigaOS4 .so support
27433 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
27434 + ;;
27435 + m68k)
27436 + # FIXME: we need at least 68020 code to build shared libraries, but
27437 + # adding the `-m68020' flag to GCC prevents building anything better,
27438 + # like `-m68040'.
27439 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
27440 + ;;
27441 + esac
27442 + ;;
27443 +
27444 + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
27445 + # PIC is the default for these OSes.
27446 + ;;
27447 +
27448 + mingw* | cygwin* | pw32* | os2* | cegcc*)
27449 + # This hack is so that the source file can tell whether it is being
27450 + # built for inclusion in a dll (and should export symbols for example).
27451 + # Although the cygwin gcc ignores -fPIC, still need this for old-style
27452 + # (--disable-auto-import) libraries
27453 + m4_if([$1], [GCJ], [],
27454 + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
27455 + ;;
27456 +
27457 + darwin* | rhapsody*)
27458 + # PIC is the default on this platform
27459 + # Common symbols not allowed in MH_DYLIB files
27460 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
27461 + ;;
27462 +
27463 + haiku*)
27464 + # PIC is the default for Haiku.
27465 + # The "-static" flag exists, but is broken.
27466 + _LT_TAGVAR(lt_prog_compiler_static, $1)=
27467 + ;;
27468 +
27469 + hpux*)
27470 + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
27471 + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
27472 + # sets the default TLS model and affects inlining.
27473 + case $host_cpu in
27474 + hppa*64*)
27475 + # +Z the default
27476 + ;;
27477 + *)
27478 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
27479 + ;;
27480 + esac
27481 + ;;
27482 +
27483 + interix[[3-9]]*)
27484 + # Interix 3.x gcc -fpic/-fPIC options generate broken code.
27485 + # Instead, we relocate shared libraries at runtime.
27486 + ;;
27487 +
27488 + msdosdjgpp*)
27489 + # Just because we use GCC doesn't mean we suddenly get shared libraries
27490 + # on systems that don't support them.
27491 + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
27492 + enable_shared=no
27493 + ;;
27494 +
27495 + *nto* | *qnx*)
27496 + # QNX uses GNU C++, but need to define -shared option too, otherwise
27497 + # it will coredump.
27498 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
27499 + ;;
27500 +
27501 + sysv4*MP*)
27502 + if test -d /usr/nec; then
27503 + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
27504 + fi
27505 + ;;
27506 +
27507 + *)
27508 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
27509 + ;;
27510 + esac
27511 +
27512 + case $cc_basename in
27513 + nvcc*) # Cuda Compiler Driver 2.2
27514 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
27515 + if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
27516 + _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
27517 + fi
27518 + ;;
27519 + esac
27520 + else
27521 + # PORTME Check for flag to pass linker flags through the system compiler.
27522 + case $host_os in
27523 + aix*)
27524 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
27525 + if test "$host_cpu" = ia64; then
27526 + # AIX 5 now supports IA64 processor
27527 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
27528 + else
27529 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
27530 + fi
27531 + ;;
27532 +
27533 + mingw* | cygwin* | pw32* | os2* | cegcc*)
27534 + # This hack is so that the source file can tell whether it is being
27535 + # built for inclusion in a dll (and should export symbols for example).
27536 + m4_if([$1], [GCJ], [],
27537 + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
27538 + ;;
27539 +
27540 + hpux9* | hpux10* | hpux11*)
27541 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
27542 + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
27543 + # not for PA HP-UX.
27544 + case $host_cpu in
27545 + hppa*64*|ia64*)
27546 + # +Z the default
27547 + ;;
27548 + *)
27549 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
27550 + ;;
27551 + esac
27552 + # Is there a better lt_prog_compiler_static that works with the bundled CC?
27553 + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
27554 + ;;
27555 +
27556 + irix5* | irix6* | nonstopux*)
27557 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
27558 + # PIC (with -KPIC) is the default.
27559 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
27560 + ;;
27561 +
27562 + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
27563 + case $cc_basename in
27564 + # old Intel for x86_64 which still supported -KPIC.
27565 + ecc*)
27566 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
27567 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
27568 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
27569 + ;;
27570 + # icc used to be incompatible with GCC.
27571 + # ICC 10 doesn't accept -KPIC any more.
27572 + icc* | ifort*)
27573 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
27574 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
27575 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
27576 + ;;
27577 + # Lahey Fortran 8.1.
27578 + lf95*)
27579 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
27580 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
27581 + _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
27582 + ;;
27583 + nagfor*)
27584 + # NAG Fortran compiler
27585 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
27586 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
27587 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
27588 + ;;
27589 + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
27590 + # Portland Group compilers (*not* the Pentium gcc compiler,
27591 + # which looks to be a dead project)
27592 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
27593 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
27594 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
27595 + ;;
27596 + ccc*)
27597 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
27598 + # All Alpha code is PIC.
27599 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
27600 + ;;
27601 + xl* | bgxl* | bgf* | mpixl*)
27602 + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
27603 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
27604 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
27605 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
27606 + ;;
27607 + *)
27608 + case `$CC -V 2>&1 | sed 5q` in
27609 + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
27610 + # Sun Fortran 8.3 passes all unrecognized flags to the linker
27611 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
27612 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
27613 + _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
27614 + ;;
27615 + *Sun\ F* | *Sun*Fortran*)
27616 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
27617 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
27618 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
27619 + ;;
27620 + *Sun\ C*)
27621 + # Sun C 5.9
27622 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
27623 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
27624 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
27625 + ;;
27626 + *Intel*\ [[CF]]*Compiler*)
27627 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
27628 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
27629 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
27630 + ;;
27631 + *Portland\ Group*)
27632 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
27633 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
27634 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
27635 + ;;
27636 + esac
27637 + ;;
27638 + esac
27639 + ;;
27640 +
27641 + newsos6)
27642 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
27643 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
27644 + ;;
27645 +
27646 + *nto* | *qnx*)
27647 + # QNX uses GNU C++, but need to define -shared option too, otherwise
27648 + # it will coredump.
27649 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
27650 + ;;
27651 +
27652 + osf3* | osf4* | osf5*)
27653 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
27654 + # All OSF/1 code is PIC.
27655 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
27656 + ;;
27657 +
27658 + rdos*)
27659 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
27660 + ;;
27661 +
27662 + solaris*)
27663 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
27664 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
27665 + case $cc_basename in
27666 + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
27667 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
27668 + *)
27669 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
27670 + esac
27671 + ;;
27672 +
27673 + sunos4*)
27674 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
27675 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
27676 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
27677 + ;;
27678 +
27679 + sysv4 | sysv4.2uw2* | sysv4.3*)
27680 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
27681 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
27682 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
27683 + ;;
27684 +
27685 + sysv4*MP*)
27686 + if test -d /usr/nec ;then
27687 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
27688 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
27689 + fi
27690 + ;;
27691 +
27692 + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
27693 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
27694 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
27695 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
27696 + ;;
27697 +
27698 + unicos*)
27699 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
27700 + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
27701 + ;;
27702 +
27703 + uts4*)
27704 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
27705 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
27706 + ;;
27707 +
27708 + *)
27709 + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
27710 + ;;
27711 + esac
27712 + fi
27713 +])
27714 +case $host_os in
27715 + # For platforms which do not support PIC, -DPIC is meaningless:
27716 + *djgpp*)
27717 + _LT_TAGVAR(lt_prog_compiler_pic, $1)=
27718 + ;;
27719 + *)
27720 + _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
27721 + ;;
27722 +esac
27723 +
27724 +AC_CACHE_CHECK([for $compiler option to produce PIC],
27725 + [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
27726 + [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
27727 +_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
27728 +
27729 +#
27730 +# Check to make sure the PIC flag actually works.
27731 +#
27732 +if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
27733 + _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
27734 + [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
27735 + [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
27736 + [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
27737 + "" | " "*) ;;
27738 + *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
27739 + esac],
27740 + [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
27741 + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
27742 +fi
27743 +_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
27744 + [Additional compiler flags for building library objects])
27745 +
27746 +_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
27747 + [How to pass a linker flag through the compiler])
27748 +#
27749 +# Check to make sure the static flag actually works.
27750 +#
27751 +wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
27752 +_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
27753 + _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
27754 + $lt_tmp_static_flag,
27755 + [],
27756 + [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
27757 +_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
27758 + [Compiler flag to prevent dynamic linking])
27759 +])# _LT_COMPILER_PIC
27760 +
27761 +
27762 +# _LT_LINKER_SHLIBS([TAGNAME])
27763 +# ----------------------------
27764 +# See if the linker supports building shared libraries.
27765 +m4_defun([_LT_LINKER_SHLIBS],
27766 +[AC_REQUIRE([LT_PATH_LD])dnl
27767 +AC_REQUIRE([LT_PATH_NM])dnl
27768 +m4_require([_LT_PATH_MANIFEST_TOOL])dnl
27769 +m4_require([_LT_FILEUTILS_DEFAULTS])dnl
27770 +m4_require([_LT_DECL_EGREP])dnl
27771 +m4_require([_LT_DECL_SED])dnl
27772 +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
27773 +m4_require([_LT_TAG_COMPILER])dnl
27774 +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
27775 +m4_if([$1], [CXX], [
27776 + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
27777 + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
27778 + case $host_os in
27779 + aix[[4-9]]*)
27780 + # If we're using GNU nm, then we don't want the "-C" option.
27781 + # -C means demangle to AIX nm, but means don't demangle with GNU nm
27782 + # Also, AIX nm treats weak defined symbols like other global defined
27783 + # symbols, whereas GNU nm marks them as "W".
27784 + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
27785 + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
27786 + else
27787 + _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'
27788 + fi
27789 + ;;
27790 + pw32*)
27791 + _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
27792 + ;;
27793 + cygwin* | mingw* | cegcc*)
27794 + case $cc_basename in
27795 + cl*)
27796 + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
27797 + ;;
27798 + *)
27799 + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
27800 + _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
27801 + ;;
27802 + esac
27803 + ;;
27804 + linux* | k*bsd*-gnu | gnu*)
27805 + _LT_TAGVAR(link_all_deplibs, $1)=no
27806 + ;;
27807 + *)
27808 + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
27809 + ;;
27810 + esac
27811 +], [
27812 + runpath_var=
27813 + _LT_TAGVAR(allow_undefined_flag, $1)=
27814 + _LT_TAGVAR(always_export_symbols, $1)=no
27815 + _LT_TAGVAR(archive_cmds, $1)=
27816 + _LT_TAGVAR(archive_expsym_cmds, $1)=
27817 + _LT_TAGVAR(compiler_needs_object, $1)=no
27818 + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
27819 + _LT_TAGVAR(export_dynamic_flag_spec, $1)=
27820 + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
27821 + _LT_TAGVAR(hardcode_automatic, $1)=no
27822 + _LT_TAGVAR(hardcode_direct, $1)=no
27823 + _LT_TAGVAR(hardcode_direct_absolute, $1)=no
27824 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
27825 + _LT_TAGVAR(hardcode_libdir_separator, $1)=
27826 + _LT_TAGVAR(hardcode_minus_L, $1)=no
27827 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
27828 + _LT_TAGVAR(inherit_rpath, $1)=no
27829 + _LT_TAGVAR(link_all_deplibs, $1)=unknown
27830 + _LT_TAGVAR(module_cmds, $1)=
27831 + _LT_TAGVAR(module_expsym_cmds, $1)=
27832 + _LT_TAGVAR(old_archive_from_new_cmds, $1)=
27833 + _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
27834 + _LT_TAGVAR(thread_safe_flag_spec, $1)=
27835 + _LT_TAGVAR(whole_archive_flag_spec, $1)=
27836 + # include_expsyms should be a list of space-separated symbols to be *always*
27837 + # included in the symbol list
27838 + _LT_TAGVAR(include_expsyms, $1)=
27839 + # exclude_expsyms can be an extended regexp of symbols to exclude
27840 + # it will be wrapped by ` (' and `)$', so one must not match beginning or
27841 + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
27842 + # as well as any symbol that contains `d'.
27843 + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
27844 + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
27845 + # platforms (ab)use it in PIC code, but their linkers get confused if
27846 + # the symbol is explicitly referenced. Since portable code cannot
27847 + # rely on this symbol name, it's probably fine to never include it in
27848 + # preloaded symbol tables.
27849 + # Exclude shared library initialization/finalization symbols.
27850 +dnl Note also adjust exclude_expsyms for C++ above.
27851 + extract_expsyms_cmds=
27852 +
27853 + case $host_os in
27854 + cygwin* | mingw* | pw32* | cegcc*)
27855 + # FIXME: the MSVC++ port hasn't been tested in a loooong time
27856 + # When not using gcc, we currently assume that we are using
27857 + # Microsoft Visual C++.
27858 + if test "$GCC" != yes; then
27859 + with_gnu_ld=no
27860 + fi
27861 + ;;
27862 + interix*)
27863 + # we just hope/assume this is gcc and not c89 (= MSVC++)
27864 + with_gnu_ld=yes
27865 + ;;
27866 + openbsd*)
27867 + with_gnu_ld=no
27868 + ;;
27869 + linux* | k*bsd*-gnu | gnu*)
27870 + _LT_TAGVAR(link_all_deplibs, $1)=no
27871 + ;;
27872 + esac
27873 +
27874 + _LT_TAGVAR(ld_shlibs, $1)=yes
27875 +
27876 + # On some targets, GNU ld is compatible enough with the native linker
27877 + # that we're better off using the native interface for both.
27878 + lt_use_gnu_ld_interface=no
27879 + if test "$with_gnu_ld" = yes; then
27880 + case $host_os in
27881 + aix*)
27882 + # The AIX port of GNU ld has always aspired to compatibility
27883 + # with the native linker. However, as the warning in the GNU ld
27884 + # block says, versions before 2.19.5* couldn't really create working
27885 + # shared libraries, regardless of the interface used.
27886 + case `$LD -v 2>&1` in
27887 + *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
27888 + *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
27889 + *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
27890 + *)
27891 + lt_use_gnu_ld_interface=yes
27892 + ;;
27893 + esac
27894 + ;;
27895 + *)
27896 + lt_use_gnu_ld_interface=yes
27897 + ;;
27898 + esac
27899 + fi
27900 +
27901 + if test "$lt_use_gnu_ld_interface" = yes; then
27902 + # If archive_cmds runs LD, not CC, wlarc should be empty
27903 + wlarc='${wl}'
27904 +
27905 + # Set some defaults for GNU ld with shared library support. These
27906 + # are reset later if shared libraries are not supported. Putting them
27907 + # here allows them to be overridden if necessary.
27908 + runpath_var=LD_RUN_PATH
27909 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
27910 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
27911 + # ancient GNU ld didn't support --whole-archive et. al.
27912 + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
27913 + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
27914 + else
27915 + _LT_TAGVAR(whole_archive_flag_spec, $1)=
27916 + fi
27917 + supports_anon_versioning=no
27918 + case `$LD -v 2>&1` in
27919 + *GNU\ gold*) supports_anon_versioning=yes ;;
27920 + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
27921 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
27922 + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
27923 + *\ 2.11.*) ;; # other 2.11 versions
27924 + *) supports_anon_versioning=yes ;;
27925 + esac
27926 +
27927 + # See if GNU ld supports shared libraries.
27928 + case $host_os in
27929 + aix[[3-9]]*)
27930 + # On AIX/PPC, the GNU linker is very broken
27931 + if test "$host_cpu" != ia64; then
27932 + _LT_TAGVAR(ld_shlibs, $1)=no
27933 + cat <<_LT_EOF 1>&2
27934 +
27935 +*** Warning: the GNU linker, at least up to release 2.19, is reported
27936 +*** to be unable to reliably create shared libraries on AIX.
27937 +*** Therefore, libtool is disabling shared libraries support. If you
27938 +*** really care for shared libraries, you may want to install binutils
27939 +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
27940 +*** You will then need to restart the configuration process.
27941 +
27942 +_LT_EOF
27943 + fi
27944 + ;;
27945 +
27946 + amigaos*)
27947 + case $host_cpu in
27948 + powerpc)
27949 + # see comment about AmigaOS4 .so support
27950 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
27951 + _LT_TAGVAR(archive_expsym_cmds, $1)=''
27952 + ;;
27953 + m68k)
27954 + _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)'
27955 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
27956 + _LT_TAGVAR(hardcode_minus_L, $1)=yes
27957 + ;;
27958 + esac
27959 + ;;
27960 +
27961 + beos*)
27962 + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
27963 + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
27964 + # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
27965 + # support --undefined. This deserves some investigation. FIXME
27966 + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
27967 + else
27968 + _LT_TAGVAR(ld_shlibs, $1)=no
27969 + fi
27970 + ;;
27971 +
27972 + cygwin* | mingw* | pw32* | cegcc*)
27973 + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
27974 + # as there is no search path for DLLs.
27975 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
27976 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
27977 + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
27978 + _LT_TAGVAR(always_export_symbols, $1)=no
27979 + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
27980 + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
27981 + _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
27982 +
27983 + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
27984 + _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'
27985 + # If the export-symbols file already is a .def file (1st line
27986 + # is EXPORTS), use it as is; otherwise, prepend...
27987 + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
27988 + cp $export_symbols $output_objdir/$soname.def;
27989 + else
27990 + echo EXPORTS > $output_objdir/$soname.def;
27991 + cat $export_symbols >> $output_objdir/$soname.def;
27992 + fi~
27993 + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
27994 + else
27995 + _LT_TAGVAR(ld_shlibs, $1)=no
27996 + fi
27997 + ;;
27998 +
27999 + haiku*)
28000 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
28001 + _LT_TAGVAR(link_all_deplibs, $1)=yes
28002 + ;;
28003 +
28004 + interix[[3-9]]*)
28005 + _LT_TAGVAR(hardcode_direct, $1)=no
28006 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
28007 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
28008 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
28009 + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
28010 + # Instead, shared libraries are loaded at an image base (0x10000000 by
28011 + # default) and relocated if they conflict, which is a slow very memory
28012 + # consuming and fragmenting process. To avoid this, we pick a random,
28013 + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
28014 + # time. Moving up from 0x10000000 also allows more sbrk(2) space.
28015 + _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'
28016 + _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'
28017 + ;;
28018 +
28019 + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
28020 + tmp_diet=no
28021 + if test "$host_os" = linux-dietlibc; then
28022 + case $cc_basename in
28023 + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
28024 + esac
28025 + fi
28026 + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
28027 + && test "$tmp_diet" = no
28028 + then
28029 + tmp_addflag=' $pic_flag'
28030 + tmp_sharedflag='-shared'
28031 + case $cc_basename,$host_cpu in
28032 + pgcc*) # Portland Group C compiler
28033 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
28034 + tmp_addflag=' $pic_flag'
28035 + ;;
28036 + pgf77* | pgf90* | pgf95* | pgfortran*)
28037 + # Portland Group f77 and f90 compilers
28038 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
28039 + tmp_addflag=' $pic_flag -Mnomain' ;;
28040 + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
28041 + tmp_addflag=' -i_dynamic' ;;
28042 + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
28043 + tmp_addflag=' -i_dynamic -nofor_main' ;;
28044 + ifc* | ifort*) # Intel Fortran compiler
28045 + tmp_addflag=' -nofor_main' ;;
28046 + lf95*) # Lahey Fortran 8.1
28047 + _LT_TAGVAR(whole_archive_flag_spec, $1)=
28048 + tmp_sharedflag='--shared' ;;
28049 + xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
28050 + tmp_sharedflag='-qmkshrobj'
28051 + tmp_addflag= ;;
28052 + nvcc*) # Cuda Compiler Driver 2.2
28053 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
28054 + _LT_TAGVAR(compiler_needs_object, $1)=yes
28055 + ;;
28056 + esac
28057 + case `$CC -V 2>&1 | sed 5q` in
28058 + *Sun\ C*) # Sun C 5.9
28059 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
28060 + _LT_TAGVAR(compiler_needs_object, $1)=yes
28061 + tmp_sharedflag='-G' ;;
28062 + *Sun\ F*) # Sun Fortran 8.3
28063 + tmp_sharedflag='-G' ;;
28064 + esac
28065 + _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
28066 +
28067 + if test "x$supports_anon_versioning" = xyes; then
28068 + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
28069 + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
28070 + echo "local: *; };" >> $output_objdir/$libname.ver~
28071 + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
28072 + fi
28073 +
28074 + case $cc_basename in
28075 + xlf* | bgf* | bgxlf* | mpixlf*)
28076 + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
28077 + _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
28078 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
28079 + _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
28080 + if test "x$supports_anon_versioning" = xyes; then
28081 + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
28082 + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
28083 + echo "local: *; };" >> $output_objdir/$libname.ver~
28084 + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
28085 + fi
28086 + ;;
28087 + esac
28088 + else
28089 + _LT_TAGVAR(ld_shlibs, $1)=no
28090 + fi
28091 + ;;
28092 +
28093 + netbsd* | netbsdelf*-gnu)
28094 + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
28095 + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
28096 + wlarc=
28097 + else
28098 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
28099 + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
28100 + fi
28101 + ;;
28102 +
28103 + solaris*)
28104 + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
28105 + _LT_TAGVAR(ld_shlibs, $1)=no
28106 + cat <<_LT_EOF 1>&2
28107 +
28108 +*** Warning: The releases 2.8.* of the GNU linker cannot reliably
28109 +*** create shared libraries on Solaris systems. Therefore, libtool
28110 +*** is disabling shared libraries support. We urge you to upgrade GNU
28111 +*** binutils to release 2.9.1 or newer. Another option is to modify
28112 +*** your PATH or compiler configuration so that the native linker is
28113 +*** used, and then restart.
28114 +
28115 +_LT_EOF
28116 + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
28117 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
28118 + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
28119 + else
28120 + _LT_TAGVAR(ld_shlibs, $1)=no
28121 + fi
28122 + ;;
28123 +
28124 + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
28125 + case `$LD -v 2>&1` in
28126 + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
28127 + _LT_TAGVAR(ld_shlibs, $1)=no
28128 + cat <<_LT_EOF 1>&2
28129 +
28130 +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
28131 +*** reliably create shared libraries on SCO systems. Therefore, libtool
28132 +*** is disabling shared libraries support. We urge you to upgrade GNU
28133 +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
28134 +*** your PATH or compiler configuration so that the native linker is
28135 +*** used, and then restart.
28136 +
28137 +_LT_EOF
28138 + ;;
28139 + *)
28140 + # For security reasons, it is highly recommended that you always
28141 + # use absolute paths for naming shared libraries, and exclude the
28142 + # DT_RUNPATH tag from executables and libraries. But doing so
28143 + # requires that you compile everything twice, which is a pain.
28144 + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
28145 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
28146 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
28147 + _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'
28148 + else
28149 + _LT_TAGVAR(ld_shlibs, $1)=no
28150 + fi
28151 + ;;
28152 + esac
28153 + ;;
28154 +
28155 + sunos4*)
28156 + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
28157 + wlarc=
28158 + _LT_TAGVAR(hardcode_direct, $1)=yes
28159 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
28160 + ;;
28161 +
28162 + *)
28163 + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
28164 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
28165 + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
28166 + else
28167 + _LT_TAGVAR(ld_shlibs, $1)=no
28168 + fi
28169 + ;;
28170 + esac
28171 +
28172 + if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
28173 + runpath_var=
28174 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
28175 + _LT_TAGVAR(export_dynamic_flag_spec, $1)=
28176 + _LT_TAGVAR(whole_archive_flag_spec, $1)=
28177 + fi
28178 + else
28179 + # PORTME fill in a description of your system's linker (not GNU ld)
28180 + case $host_os in
28181 + aix3*)
28182 + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
28183 + _LT_TAGVAR(always_export_symbols, $1)=yes
28184 + _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'
28185 + # Note: this linker hardcodes the directories in LIBPATH if there
28186 + # are no directories specified by -L.
28187 + _LT_TAGVAR(hardcode_minus_L, $1)=yes
28188 + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
28189 + # Neither direct hardcoding nor static linking is supported with a
28190 + # broken collect2.
28191 + _LT_TAGVAR(hardcode_direct, $1)=unsupported
28192 + fi
28193 + ;;
28194 +
28195 + aix[[4-9]]*)
28196 + if test "$host_cpu" = ia64; then
28197 + # On IA64, the linker does run time linking by default, so we don't
28198 + # have to do anything special.
28199 + aix_use_runtimelinking=no
28200 + exp_sym_flag='-Bexport'
28201 + no_entry_flag=""
28202 + else
28203 + # If we're using GNU nm, then we don't want the "-C" option.
28204 + # -C means demangle to AIX nm, but means don't demangle with GNU nm
28205 + # Also, AIX nm treats weak defined symbols like other global
28206 + # defined symbols, whereas GNU nm marks them as "W".
28207 + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
28208 + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
28209 + else
28210 + _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'
28211 + fi
28212 + aix_use_runtimelinking=no
28213 +
28214 + # Test if we are trying to use run time linking or normal
28215 + # AIX style linking. If -brtl is somewhere in LDFLAGS, we
28216 + # need to do runtime linking.
28217 + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
28218 + for ld_flag in $LDFLAGS; do
28219 + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
28220 + aix_use_runtimelinking=yes
28221 + break
28222 + fi
28223 + done
28224 + ;;
28225 + esac
28226 +
28227 + exp_sym_flag='-bexport'
28228 + no_entry_flag='-bnoentry'
28229 + fi
28230 +
28231 + # When large executables or shared objects are built, AIX ld can
28232 + # have problems creating the table of contents. If linking a library
28233 + # or program results in "error TOC overflow" add -mminimal-toc to
28234 + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
28235 + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
28236 +
28237 + _LT_TAGVAR(archive_cmds, $1)=''
28238 + _LT_TAGVAR(hardcode_direct, $1)=yes
28239 + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
28240 + _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
28241 + _LT_TAGVAR(link_all_deplibs, $1)=yes
28242 + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
28243 +
28244 + if test "$GCC" = yes; then
28245 + case $host_os in aix4.[[012]]|aix4.[[012]].*)
28246 + # We only want to do this on AIX 4.2 and lower, the check
28247 + # below for broken collect2 doesn't work under 4.3+
28248 + collect2name=`${CC} -print-prog-name=collect2`
28249 + if test -f "$collect2name" &&
28250 + strings "$collect2name" | $GREP resolve_lib_name >/dev/null
28251 + then
28252 + # We have reworked collect2
28253 + :
28254 + else
28255 + # We have old collect2
28256 + _LT_TAGVAR(hardcode_direct, $1)=unsupported
28257 + # It fails to find uninstalled libraries when the uninstalled
28258 + # path is not listed in the libpath. Setting hardcode_minus_L
28259 + # to unsupported forces relinking
28260 + _LT_TAGVAR(hardcode_minus_L, $1)=yes
28261 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
28262 + _LT_TAGVAR(hardcode_libdir_separator, $1)=
28263 + fi
28264 + ;;
28265 + esac
28266 + shared_flag='-shared'
28267 + if test "$aix_use_runtimelinking" = yes; then
28268 + shared_flag="$shared_flag "'${wl}-G'
28269 + fi
28270 + _LT_TAGVAR(link_all_deplibs, $1)=no
28271 + else
28272 + # not using gcc
28273 + if test "$host_cpu" = ia64; then
28274 + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
28275 + # chokes on -Wl,-G. The following line is correct:
28276 + shared_flag='-G'
28277 + else
28278 + if test "$aix_use_runtimelinking" = yes; then
28279 + shared_flag='${wl}-G'
28280 + else
28281 + shared_flag='${wl}-bM:SRE'
28282 + fi
28283 + fi
28284 + fi
28285 +
28286 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
28287 + # It seems that -bexpall does not export symbols beginning with
28288 + # underscore (_), so it is better to generate a list of symbols to export.
28289 + _LT_TAGVAR(always_export_symbols, $1)=yes
28290 + if test "$aix_use_runtimelinking" = yes; then
28291 + # Warning - without using the other runtime loading flags (-brtl),
28292 + # -berok will link without error, but may produce a broken library.
28293 + _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
28294 + # Determine the default libpath from the value encoded in an
28295 + # empty executable.
28296 + _LT_SYS_MODULE_PATH_AIX([$1])
28297 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
28298 + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
28299 + else
28300 + if test "$host_cpu" = ia64; then
28301 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
28302 + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
28303 + _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"
28304 + else
28305 + # Determine the default libpath from the value encoded in an
28306 + # empty executable.
28307 + _LT_SYS_MODULE_PATH_AIX([$1])
28308 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
28309 + # Warning - without using the other run time loading flags,
28310 + # -berok will link without error, but may produce a broken library.
28311 + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
28312 + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
28313 + if test "$with_gnu_ld" = yes; then
28314 + # We only use this code for GNU lds that support --whole-archive.
28315 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
28316 + else
28317 + # Exported symbols can be pulled into shared objects from archives
28318 + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
28319 + fi
28320 + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
28321 + # This is similar to how AIX traditionally builds its shared libraries.
28322 + _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'
28323 + fi
28324 + fi
28325 + ;;
28326 +
28327 + amigaos*)
28328 + case $host_cpu in
28329 + powerpc)
28330 + # see comment about AmigaOS4 .so support
28331 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
28332 + _LT_TAGVAR(archive_expsym_cmds, $1)=''
28333 + ;;
28334 + m68k)
28335 + _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)'
28336 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
28337 + _LT_TAGVAR(hardcode_minus_L, $1)=yes
28338 + ;;
28339 + esac
28340 + ;;
28341 +
28342 + bsdi[[45]]*)
28343 + _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
28344 + ;;
28345 +
28346 + cygwin* | mingw* | pw32* | cegcc*)
28347 + # When not using gcc, we currently assume that we are using
28348 + # Microsoft Visual C++.
28349 + # hardcode_libdir_flag_spec is actually meaningless, as there is
28350 + # no search path for DLLs.
28351 + case $cc_basename in
28352 + cl*)
28353 + # Native MSVC
28354 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
28355 + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
28356 + _LT_TAGVAR(always_export_symbols, $1)=yes
28357 + _LT_TAGVAR(file_list_spec, $1)='@'
28358 + # Tell ltmain to make .lib files, not .a files.
28359 + libext=lib
28360 + # Tell ltmain to make .dll files, not .so files.
28361 + shrext_cmds=".dll"
28362 + # FIXME: Setting linknames here is a bad hack.
28363 + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
28364 + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
28365 + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
28366 + else
28367 + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
28368 + fi~
28369 + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
28370 + linknames='
28371 + # The linker will not automatically build a static lib if we build a DLL.
28372 + # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
28373 + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
28374 + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
28375 + _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'
28376 + # Don't use ranlib
28377 + _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
28378 + _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
28379 + lt_tool_outputfile="@TOOL_OUTPUT@"~
28380 + case $lt_outputfile in
28381 + *.exe|*.EXE) ;;
28382 + *)
28383 + lt_outputfile="$lt_outputfile.exe"
28384 + lt_tool_outputfile="$lt_tool_outputfile.exe"
28385 + ;;
28386 + esac~
28387 + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
28388 + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
28389 + $RM "$lt_outputfile.manifest";
28390 + fi'
28391 + ;;
28392 + *)
28393 + # Assume MSVC wrapper
28394 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
28395 + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
28396 + # Tell ltmain to make .lib files, not .a files.
28397 + libext=lib
28398 + # Tell ltmain to make .dll files, not .so files.
28399 + shrext_cmds=".dll"
28400 + # FIXME: Setting linknames here is a bad hack.
28401 + _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
28402 + # The linker will automatically build a .lib file if we build a DLL.
28403 + _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
28404 + # FIXME: Should let the user specify the lib program.
28405 + _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
28406 + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
28407 + ;;
28408 + esac
28409 + ;;
28410 +
28411 + darwin* | rhapsody*)
28412 + _LT_DARWIN_LINKER_FEATURES($1)
28413 + ;;
28414 +
28415 + dgux*)
28416 + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
28417 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
28418 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
28419 + ;;
28420 +
28421 + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
28422 + # support. Future versions do this automatically, but an explicit c++rt0.o
28423 + # does not break anything, and helps significantly (at the cost of a little
28424 + # extra space).
28425 + freebsd2.2*)
28426 + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
28427 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
28428 + _LT_TAGVAR(hardcode_direct, $1)=yes
28429 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
28430 + ;;
28431 +
28432 + # Unfortunately, older versions of FreeBSD 2 do not have this feature.
28433 + freebsd2.*)
28434 + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
28435 + _LT_TAGVAR(hardcode_direct, $1)=yes
28436 + _LT_TAGVAR(hardcode_minus_L, $1)=yes
28437 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
28438 + ;;
28439 +
28440 + # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
28441 + freebsd* | dragonfly*)
28442 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
28443 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
28444 + _LT_TAGVAR(hardcode_direct, $1)=yes
28445 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
28446 + ;;
28447 +
28448 + hpux9*)
28449 + if test "$GCC" = yes; then
28450 + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
28451 + else
28452 + _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'
28453 + fi
28454 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
28455 + _LT_TAGVAR(hardcode_libdir_separator, $1)=:
28456 + _LT_TAGVAR(hardcode_direct, $1)=yes
28457 +
28458 + # hardcode_minus_L: Not really in the search PATH,
28459 + # but as the default location of the library.
28460 + _LT_TAGVAR(hardcode_minus_L, $1)=yes
28461 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
28462 + ;;
28463 +
28464 + hpux10*)
28465 + if test "$GCC" = yes && test "$with_gnu_ld" = no; then
28466 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
28467 + else
28468 + _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
28469 + fi
28470 + if test "$with_gnu_ld" = no; then
28471 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
28472 + _LT_TAGVAR(hardcode_libdir_separator, $1)=:
28473 + _LT_TAGVAR(hardcode_direct, $1)=yes
28474 + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
28475 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
28476 + # hardcode_minus_L: Not really in the search PATH,
28477 + # but as the default location of the library.
28478 + _LT_TAGVAR(hardcode_minus_L, $1)=yes
28479 + fi
28480 + ;;
28481 +
28482 + hpux11*)
28483 + if test "$GCC" = yes && test "$with_gnu_ld" = no; then
28484 + case $host_cpu in
28485 + hppa*64*)
28486 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
28487 + ;;
28488 + ia64*)
28489 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
28490 + ;;
28491 + *)
28492 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
28493 + ;;
28494 + esac
28495 + else
28496 + case $host_cpu in
28497 + hppa*64*)
28498 + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
28499 + ;;
28500 + ia64*)
28501 + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
28502 + ;;
28503 + *)
28504 + m4_if($1, [], [
28505 + # Older versions of the 11.00 compiler do not understand -b yet
28506 + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
28507 + _LT_LINKER_OPTION([if $CC understands -b],
28508 + _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
28509 + [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
28510 + [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
28511 + [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
28512 + ;;
28513 + esac
28514 + fi
28515 + if test "$with_gnu_ld" = no; then
28516 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
28517 + _LT_TAGVAR(hardcode_libdir_separator, $1)=:
28518 +
28519 + case $host_cpu in
28520 + hppa*64*|ia64*)
28521 + _LT_TAGVAR(hardcode_direct, $1)=no
28522 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
28523 + ;;
28524 + *)
28525 + _LT_TAGVAR(hardcode_direct, $1)=yes
28526 + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
28527 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
28528 +
28529 + # hardcode_minus_L: Not really in the search PATH,
28530 + # but as the default location of the library.
28531 + _LT_TAGVAR(hardcode_minus_L, $1)=yes
28532 + ;;
28533 + esac
28534 + fi
28535 + ;;
28536 +
28537 + irix5* | irix6* | nonstopux*)
28538 + if test "$GCC" = yes; then
28539 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
28540 + # Try to use the -exported_symbol ld option, if it does not
28541 + # work, assume that -exports_file does not work either and
28542 + # implicitly export all symbols.
28543 + # This should be the same for all languages, so no per-tag cache variable.
28544 + AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
28545 + [lt_cv_irix_exported_symbol],
28546 + [save_LDFLAGS="$LDFLAGS"
28547 + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
28548 + AC_LINK_IFELSE(
28549 + [AC_LANG_SOURCE(
28550 + [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
28551 + [C++], [[int foo (void) { return 0; }]],
28552 + [Fortran 77], [[
28553 + subroutine foo
28554 + end]],
28555 + [Fortran], [[
28556 + subroutine foo
28557 + end]])])],
28558 + [lt_cv_irix_exported_symbol=yes],
28559 + [lt_cv_irix_exported_symbol=no])
28560 + LDFLAGS="$save_LDFLAGS"])
28561 + if test "$lt_cv_irix_exported_symbol" = yes; then
28562 + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
28563 + fi
28564 + else
28565 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
28566 + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
28567 + fi
28568 + _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
28569 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
28570 + _LT_TAGVAR(hardcode_libdir_separator, $1)=:
28571 + _LT_TAGVAR(inherit_rpath, $1)=yes
28572 + _LT_TAGVAR(link_all_deplibs, $1)=yes
28573 + ;;
28574 +
28575 + netbsd* | netbsdelf*-gnu)
28576 + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
28577 + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
28578 + else
28579 + _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
28580 + fi
28581 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
28582 + _LT_TAGVAR(hardcode_direct, $1)=yes
28583 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
28584 + ;;
28585 +
28586 + newsos6)
28587 + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
28588 + _LT_TAGVAR(hardcode_direct, $1)=yes
28589 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
28590 + _LT_TAGVAR(hardcode_libdir_separator, $1)=:
28591 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
28592 + ;;
28593 +
28594 + *nto* | *qnx*)
28595 + ;;
28596 +
28597 + openbsd*)
28598 + if test -f /usr/libexec/ld.so; then
28599 + _LT_TAGVAR(hardcode_direct, $1)=yes
28600 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
28601 + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
28602 + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
28603 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
28604 + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
28605 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
28606 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
28607 + else
28608 + case $host_os in
28609 + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
28610 + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
28611 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
28612 + ;;
28613 + *)
28614 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
28615 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
28616 + ;;
28617 + esac
28618 + fi
28619 + else
28620 + _LT_TAGVAR(ld_shlibs, $1)=no
28621 + fi
28622 + ;;
28623 +
28624 + os2*)
28625 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
28626 + _LT_TAGVAR(hardcode_minus_L, $1)=yes
28627 + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
28628 + _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'
28629 + _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
28630 + ;;
28631 +
28632 + osf3*)
28633 + if test "$GCC" = yes; then
28634 + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
28635 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
28636 + else
28637 + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
28638 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
28639 + fi
28640 + _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
28641 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
28642 + _LT_TAGVAR(hardcode_libdir_separator, $1)=:
28643 + ;;
28644 +
28645 + osf4* | osf5*) # as osf3* with the addition of -msym flag
28646 + if test "$GCC" = yes; then
28647 + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
28648 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
28649 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
28650 + else
28651 + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
28652 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
28653 + _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~
28654 + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
28655 +
28656 + # Both c and cxx compiler support -rpath directly
28657 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
28658 + fi
28659 + _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
28660 + _LT_TAGVAR(hardcode_libdir_separator, $1)=:
28661 + ;;
28662 +
28663 + solaris*)
28664 + _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
28665 + if test "$GCC" = yes; then
28666 + wlarc='${wl}'
28667 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
28668 + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
28669 + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
28670 + else
28671 + case `$CC -V 2>&1` in
28672 + *"Compilers 5.0"*)
28673 + wlarc=''
28674 + _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
28675 + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
28676 + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
28677 + ;;
28678 + *)
28679 + wlarc='${wl}'
28680 + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
28681 + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
28682 + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
28683 + ;;
28684 + esac
28685 + fi
28686 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
28687 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
28688 + case $host_os in
28689 + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
28690 + *)
28691 + # The compiler driver will combine and reorder linker options,
28692 + # but understands `-z linker_flag'. GCC discards it without `$wl',
28693 + # but is careful enough not to reorder.
28694 + # Supported since Solaris 2.6 (maybe 2.5.1?)
28695 + if test "$GCC" = yes; then
28696 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
28697 + else
28698 + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
28699 + fi
28700 + ;;
28701 + esac
28702 + _LT_TAGVAR(link_all_deplibs, $1)=yes
28703 + ;;
28704 +
28705 + sunos4*)
28706 + if test "x$host_vendor" = xsequent; then
28707 + # Use $CC to link under sequent, because it throws in some extra .o
28708 + # files that make .init and .fini sections work.
28709 + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
28710 + else
28711 + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
28712 + fi
28713 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
28714 + _LT_TAGVAR(hardcode_direct, $1)=yes
28715 + _LT_TAGVAR(hardcode_minus_L, $1)=yes
28716 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
28717 + ;;
28718 +
28719 + sysv4)
28720 + case $host_vendor in
28721 + sni)
28722 + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
28723 + _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
28724 + ;;
28725 + siemens)
28726 + ## LD is ld it makes a PLAMLIB
28727 + ## CC just makes a GrossModule.
28728 + _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
28729 + _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
28730 + _LT_TAGVAR(hardcode_direct, $1)=no
28731 + ;;
28732 + motorola)
28733 + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
28734 + _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
28735 + ;;
28736 + esac
28737 + runpath_var='LD_RUN_PATH'
28738 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
28739 + ;;
28740 +
28741 + sysv4.3*)
28742 + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
28743 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
28744 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
28745 + ;;
28746 +
28747 + sysv4*MP*)
28748 + if test -d /usr/nec; then
28749 + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
28750 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
28751 + runpath_var=LD_RUN_PATH
28752 + hardcode_runpath_var=yes
28753 + _LT_TAGVAR(ld_shlibs, $1)=yes
28754 + fi
28755 + ;;
28756 +
28757 + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
28758 + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
28759 + _LT_TAGVAR(archive_cmds_need_lc, $1)=no
28760 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
28761 + runpath_var='LD_RUN_PATH'
28762 +
28763 + if test "$GCC" = yes; then
28764 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
28765 + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
28766 + else
28767 + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
28768 + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
28769 + fi
28770 + ;;
28771 +
28772 + sysv5* | sco3.2v5* | sco5v6*)
28773 + # Note: We can NOT use -z defs as we might desire, because we do not
28774 + # link with -lc, and that would cause any symbols used from libc to
28775 + # always be unresolved, which means just about no library would
28776 + # ever link correctly. If we're not using GNU ld we use -z text
28777 + # though, which does catch some bad symbols but isn't as heavy-handed
28778 + # as -z defs.
28779 + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
28780 + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
28781 + _LT_TAGVAR(archive_cmds_need_lc, $1)=no
28782 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
28783 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
28784 + _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
28785 + _LT_TAGVAR(link_all_deplibs, $1)=yes
28786 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
28787 + runpath_var='LD_RUN_PATH'
28788 +
28789 + if test "$GCC" = yes; then
28790 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
28791 + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
28792 + else
28793 + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
28794 + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
28795 + fi
28796 + ;;
28797 +
28798 + uts4*)
28799 + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
28800 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
28801 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
28802 + ;;
28803 +
28804 + *)
28805 + _LT_TAGVAR(ld_shlibs, $1)=no
28806 + ;;
28807 + esac
28808 +
28809 + if test x$host_vendor = xsni; then
28810 + case $host in
28811 + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
28812 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
28813 + ;;
28814 + esac
28815 + fi
28816 + fi
28817 +])
28818 +AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
28819 +test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
28820 +
28821 +_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
28822 +
28823 +_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
28824 +_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
28825 +_LT_DECL([], [extract_expsyms_cmds], [2],
28826 + [The commands to extract the exported symbol list from a shared archive])
28827 +
28828 +#
28829 +# Do we need to explicitly link libc?
28830 +#
28831 +case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
28832 +x|xyes)
28833 + # Assume -lc should be added
28834 + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
28835 +
28836 + if test "$enable_shared" = yes && test "$GCC" = yes; then
28837 + case $_LT_TAGVAR(archive_cmds, $1) in
28838 + *'~'*)
28839 + # FIXME: we may have to deal with multi-command sequences.
28840 + ;;
28841 + '$CC '*)
28842 + # Test whether the compiler implicitly links with -lc since on some
28843 + # systems, -lgcc has to come before -lc. If gcc already passes -lc
28844 + # to ld, don't add -lc before -lgcc.
28845 + AC_CACHE_CHECK([whether -lc should be explicitly linked in],
28846 + [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
28847 + [$RM conftest*
28848 + echo "$lt_simple_compile_test_code" > conftest.$ac_ext
28849 +
28850 + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
28851 + soname=conftest
28852 + lib=conftest
28853 + libobjs=conftest.$ac_objext
28854 + deplibs=
28855 + wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
28856 + pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
28857 + compiler_flags=-v
28858 + linker_flags=-v
28859 + verstring=
28860 + output_objdir=.
28861 + libname=conftest
28862 + lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
28863 + _LT_TAGVAR(allow_undefined_flag, $1)=
28864 + if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
28865 + then
28866 + lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
28867 + else
28868 + lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
28869 + fi
28870 + _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
28871 + else
28872 + cat conftest.err 1>&5
28873 + fi
28874 + $RM conftest*
28875 + ])
28876 + _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
28877 + ;;
28878 + esac
28879 + fi
28880 + ;;
28881 +esac
28882 +
28883 +_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
28884 + [Whether or not to add -lc for building shared libraries])
28885 +_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
28886 + [enable_shared_with_static_runtimes], [0],
28887 + [Whether or not to disallow shared libs when runtime libs are static])
28888 +_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
28889 + [Compiler flag to allow reflexive dlopens])
28890 +_LT_TAGDECL([], [whole_archive_flag_spec], [1],
28891 + [Compiler flag to generate shared objects directly from archives])
28892 +_LT_TAGDECL([], [compiler_needs_object], [1],
28893 + [Whether the compiler copes with passing no objects directly])
28894 +_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
28895 + [Create an old-style archive from a shared archive])
28896 +_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
28897 + [Create a temporary old-style archive to link instead of a shared archive])
28898 +_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
28899 +_LT_TAGDECL([], [archive_expsym_cmds], [2])
28900 +_LT_TAGDECL([], [module_cmds], [2],
28901 + [Commands used to build a loadable module if different from building
28902 + a shared archive.])
28903 +_LT_TAGDECL([], [module_expsym_cmds], [2])
28904 +_LT_TAGDECL([], [with_gnu_ld], [1],
28905 + [Whether we are building with GNU ld or not])
28906 +_LT_TAGDECL([], [allow_undefined_flag], [1],
28907 + [Flag that allows shared libraries with undefined symbols to be built])
28908 +_LT_TAGDECL([], [no_undefined_flag], [1],
28909 + [Flag that enforces no undefined symbols])
28910 +_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
28911 + [Flag to hardcode $libdir into a binary during linking.
28912 + This must work even if $libdir does not exist])
28913 +_LT_TAGDECL([], [hardcode_libdir_separator], [1],
28914 + [Whether we need a single "-rpath" flag with a separated argument])
28915 +_LT_TAGDECL([], [hardcode_direct], [0],
28916 + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
28917 + DIR into the resulting binary])
28918 +_LT_TAGDECL([], [hardcode_direct_absolute], [0],
28919 + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
28920 + DIR into the resulting binary and the resulting library dependency is
28921 + "absolute", i.e impossible to change by setting ${shlibpath_var} if the
28922 + library is relocated])
28923 +_LT_TAGDECL([], [hardcode_minus_L], [0],
28924 + [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
28925 + into the resulting binary])
28926 +_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
28927 + [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
28928 + into the resulting binary])
28929 +_LT_TAGDECL([], [hardcode_automatic], [0],
28930 + [Set to "yes" if building a shared library automatically hardcodes DIR
28931 + into the library and all subsequent libraries and executables linked
28932 + against it])
28933 +_LT_TAGDECL([], [inherit_rpath], [0],
28934 + [Set to yes if linker adds runtime paths of dependent libraries
28935 + to runtime path list])
28936 +_LT_TAGDECL([], [link_all_deplibs], [0],
28937 + [Whether libtool must link a program against all its dependency libraries])
28938 +_LT_TAGDECL([], [always_export_symbols], [0],
28939 + [Set to "yes" if exported symbols are required])
28940 +_LT_TAGDECL([], [export_symbols_cmds], [2],
28941 + [The commands to list exported symbols])
28942 +_LT_TAGDECL([], [exclude_expsyms], [1],
28943 + [Symbols that should not be listed in the preloaded symbols])
28944 +_LT_TAGDECL([], [include_expsyms], [1],
28945 + [Symbols that must always be exported])
28946 +_LT_TAGDECL([], [prelink_cmds], [2],
28947 + [Commands necessary for linking programs (against libraries) with templates])
28948 +_LT_TAGDECL([], [postlink_cmds], [2],
28949 + [Commands necessary for finishing linking programs])
28950 +_LT_TAGDECL([], [file_list_spec], [1],
28951 + [Specify filename containing input files])
28952 +dnl FIXME: Not yet implemented
28953 +dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
28954 +dnl [Compiler flag to generate thread safe objects])
28955 +])# _LT_LINKER_SHLIBS
28956 +
28957 +
28958 +# _LT_LANG_C_CONFIG([TAG])
28959 +# ------------------------
28960 +# Ensure that the configuration variables for a C compiler are suitably
28961 +# defined. These variables are subsequently used by _LT_CONFIG to write
28962 +# the compiler configuration to `libtool'.
28963 +m4_defun([_LT_LANG_C_CONFIG],
28964 +[m4_require([_LT_DECL_EGREP])dnl
28965 +lt_save_CC="$CC"
28966 +AC_LANG_PUSH(C)
28967 +
28968 +# Source file extension for C test sources.
28969 +ac_ext=c
28970 +
28971 +# Object file extension for compiled C test sources.
28972 +objext=o
28973 +_LT_TAGVAR(objext, $1)=$objext
28974 +
28975 +# Code to be used in simple compile tests
28976 +lt_simple_compile_test_code="int some_variable = 0;"
28977 +
28978 +# Code to be used in simple link tests
28979 +lt_simple_link_test_code='int main(){return(0);}'
28980 +
28981 +_LT_TAG_COMPILER
28982 +# Save the default compiler, since it gets overwritten when the other
28983 +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
28984 +compiler_DEFAULT=$CC
28985 +
28986 +# save warnings/boilerplate of simple test code
28987 +_LT_COMPILER_BOILERPLATE
28988 +_LT_LINKER_BOILERPLATE
28989 +
28990 +## CAVEAT EMPTOR:
28991 +## There is no encapsulation within the following macros, do not change
28992 +## the running order or otherwise move them around unless you know exactly
28993 +## what you are doing...
28994 +if test -n "$compiler"; then
28995 + _LT_COMPILER_NO_RTTI($1)
28996 + _LT_COMPILER_PIC($1)
28997 + _LT_COMPILER_C_O($1)
28998 + _LT_COMPILER_FILE_LOCKS($1)
28999 + _LT_LINKER_SHLIBS($1)
29000 + _LT_SYS_DYNAMIC_LINKER($1)
29001 + _LT_LINKER_HARDCODE_LIBPATH($1)
29002 + LT_SYS_DLOPEN_SELF
29003 + _LT_CMD_STRIPLIB
29004 +
29005 + # Report which library types will actually be built
29006 + AC_MSG_CHECKING([if libtool supports shared libraries])
29007 + AC_MSG_RESULT([$can_build_shared])
29008 +
29009 + AC_MSG_CHECKING([whether to build shared libraries])
29010 + test "$can_build_shared" = "no" && enable_shared=no
29011 +
29012 + # On AIX, shared libraries and static libraries use the same namespace, and
29013 + # are all built from PIC.
29014 + case $host_os in
29015 + aix3*)
29016 + test "$enable_shared" = yes && enable_static=no
29017 + if test -n "$RANLIB"; then
29018 + archive_cmds="$archive_cmds~\$RANLIB \$lib"
29019 + postinstall_cmds='$RANLIB $lib'
29020 + fi
29021 + ;;
29022 +
29023 + aix[[4-9]]*)
29024 + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
29025 + test "$enable_shared" = yes && enable_static=no
29026 + fi
29027 + ;;
29028 + esac
29029 + AC_MSG_RESULT([$enable_shared])
29030 +
29031 + AC_MSG_CHECKING([whether to build static libraries])
29032 + # Make sure either enable_shared or enable_static is yes.
29033 + test "$enable_shared" = yes || enable_static=yes
29034 + AC_MSG_RESULT([$enable_static])
29035 +
29036 + _LT_CONFIG($1)
29037 +fi
29038 +AC_LANG_POP
29039 +CC="$lt_save_CC"
29040 +])# _LT_LANG_C_CONFIG
29041 +
29042 +
29043 +# _LT_LANG_CXX_CONFIG([TAG])
29044 +# --------------------------
29045 +# Ensure that the configuration variables for a C++ compiler are suitably
29046 +# defined. These variables are subsequently used by _LT_CONFIG to write
29047 +# the compiler configuration to `libtool'.
29048 +m4_defun([_LT_LANG_CXX_CONFIG],
29049 +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
29050 +m4_require([_LT_DECL_EGREP])dnl
29051 +m4_require([_LT_PATH_MANIFEST_TOOL])dnl
29052 +if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
29053 + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
29054 + (test "X$CXX" != "Xg++"))) ; then
29055 + AC_PROG_CXXCPP
29056 +else
29057 + _lt_caught_CXX_error=yes
29058 +fi
29059 +
29060 +AC_LANG_PUSH(C++)
29061 +_LT_TAGVAR(archive_cmds_need_lc, $1)=no
29062 +_LT_TAGVAR(allow_undefined_flag, $1)=
29063 +_LT_TAGVAR(always_export_symbols, $1)=no
29064 +_LT_TAGVAR(archive_expsym_cmds, $1)=
29065 +_LT_TAGVAR(compiler_needs_object, $1)=no
29066 +_LT_TAGVAR(export_dynamic_flag_spec, $1)=
29067 +_LT_TAGVAR(hardcode_direct, $1)=no
29068 +_LT_TAGVAR(hardcode_direct_absolute, $1)=no
29069 +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
29070 +_LT_TAGVAR(hardcode_libdir_separator, $1)=
29071 +_LT_TAGVAR(hardcode_minus_L, $1)=no
29072 +_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
29073 +_LT_TAGVAR(hardcode_automatic, $1)=no
29074 +_LT_TAGVAR(inherit_rpath, $1)=no
29075 +_LT_TAGVAR(module_cmds, $1)=
29076 +_LT_TAGVAR(module_expsym_cmds, $1)=
29077 +_LT_TAGVAR(link_all_deplibs, $1)=unknown
29078 +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
29079 +_LT_TAGVAR(reload_flag, $1)=$reload_flag
29080 +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
29081 +_LT_TAGVAR(no_undefined_flag, $1)=
29082 +_LT_TAGVAR(whole_archive_flag_spec, $1)=
29083 +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
29084 +
29085 +# Source file extension for C++ test sources.
29086 +ac_ext=cpp
29087 +
29088 +# Object file extension for compiled C++ test sources.
29089 +objext=o
29090 +_LT_TAGVAR(objext, $1)=$objext
29091 +
29092 +# No sense in running all these tests if we already determined that
29093 +# the CXX compiler isn't working. Some variables (like enable_shared)
29094 +# are currently assumed to apply to all compilers on this platform,
29095 +# and will be corrupted by setting them based on a non-working compiler.
29096 +if test "$_lt_caught_CXX_error" != yes; then
29097 + # Code to be used in simple compile tests
29098 + lt_simple_compile_test_code="int some_variable = 0;"
29099 +
29100 + # Code to be used in simple link tests
29101 + lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
29102 +
29103 + # ltmain only uses $CC for tagged configurations so make sure $CC is set.
29104 + _LT_TAG_COMPILER
29105 +
29106 + # save warnings/boilerplate of simple test code
29107 + _LT_COMPILER_BOILERPLATE
29108 + _LT_LINKER_BOILERPLATE
29109 +
29110 + # Allow CC to be a program name with arguments.
29111 + lt_save_CC=$CC
29112 + lt_save_CFLAGS=$CFLAGS
29113 + lt_save_LD=$LD
29114 + lt_save_GCC=$GCC
29115 + GCC=$GXX
29116 + lt_save_with_gnu_ld=$with_gnu_ld
29117 + lt_save_path_LD=$lt_cv_path_LD
29118 + if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
29119 + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
29120 + else
29121 + $as_unset lt_cv_prog_gnu_ld
29122 + fi
29123 + if test -n "${lt_cv_path_LDCXX+set}"; then
29124 + lt_cv_path_LD=$lt_cv_path_LDCXX
29125 + else
29126 + $as_unset lt_cv_path_LD
29127 + fi
29128 + test -z "${LDCXX+set}" || LD=$LDCXX
29129 + CC=${CXX-"c++"}
29130 + CFLAGS=$CXXFLAGS
29131 + compiler=$CC
29132 + _LT_TAGVAR(compiler, $1)=$CC
29133 + _LT_CC_BASENAME([$compiler])
29134 +
29135 + if test -n "$compiler"; then
29136 + # We don't want -fno-exception when compiling C++ code, so set the
29137 + # no_builtin_flag separately
29138 + if test "$GXX" = yes; then
29139 + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
29140 + else
29141 + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
29142 + fi
29143 +
29144 + if test "$GXX" = yes; then
29145 + # Set up default GNU C++ configuration
29146 +
29147 + LT_PATH_LD
29148 +
29149 + # Check if GNU C++ uses GNU ld as the underlying linker, since the
29150 + # archiving commands below assume that GNU ld is being used.
29151 + if test "$with_gnu_ld" = yes; then
29152 + _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
29153 + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
29154 +
29155 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
29156 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
29157 +
29158 + # If archive_cmds runs LD, not CC, wlarc should be empty
29159 + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
29160 + # investigate it a little bit more. (MM)
29161 + wlarc='${wl}'
29162 +
29163 + # ancient GNU ld didn't support --whole-archive et. al.
29164 + if eval "`$CC -print-prog-name=ld` --help 2>&1" |
29165 + $GREP 'no-whole-archive' > /dev/null; then
29166 + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
29167 + else
29168 + _LT_TAGVAR(whole_archive_flag_spec, $1)=
29169 + fi
29170 + else
29171 + with_gnu_ld=no
29172 + wlarc=
29173 +
29174 + # A generic and very simple default shared library creation
29175 + # command for GNU C++ for the case where it uses the native
29176 + # linker, instead of GNU ld. If possible, this setting should
29177 + # overridden to take advantage of the native linker features on
29178 + # the platform it is being used on.
29179 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
29180 + fi
29181 +
29182 + # Commands to make compiler produce verbose output that lists
29183 + # what "hidden" libraries, object files and flags are used when
29184 + # linking a shared library.
29185 + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
29186 +
29187 + else
29188 + GXX=no
29189 + with_gnu_ld=no
29190 + wlarc=
29191 + fi
29192 +
29193 + # PORTME: fill in a description of your system's C++ link characteristics
29194 + AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
29195 + _LT_TAGVAR(ld_shlibs, $1)=yes
29196 + case $host_os in
29197 + aix3*)
29198 + # FIXME: insert proper C++ library support
29199 + _LT_TAGVAR(ld_shlibs, $1)=no
29200 + ;;
29201 + aix[[4-9]]*)
29202 + if test "$host_cpu" = ia64; then
29203 + # On IA64, the linker does run time linking by default, so we don't
29204 + # have to do anything special.
29205 + aix_use_runtimelinking=no
29206 + exp_sym_flag='-Bexport'
29207 + no_entry_flag=""
29208 + else
29209 + aix_use_runtimelinking=no
29210 +
29211 + # Test if we are trying to use run time linking or normal
29212 + # AIX style linking. If -brtl is somewhere in LDFLAGS, we
29213 + # need to do runtime linking.
29214 + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
29215 + for ld_flag in $LDFLAGS; do
29216 + case $ld_flag in
29217 + *-brtl*)
29218 + aix_use_runtimelinking=yes
29219 + break
29220 + ;;
29221 + esac
29222 + done
29223 + ;;
29224 + esac
29225 +
29226 + exp_sym_flag='-bexport'
29227 + no_entry_flag='-bnoentry'
29228 + fi
29229 +
29230 + # When large executables or shared objects are built, AIX ld can
29231 + # have problems creating the table of contents. If linking a library
29232 + # or program results in "error TOC overflow" add -mminimal-toc to
29233 + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
29234 + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
29235 +
29236 + _LT_TAGVAR(archive_cmds, $1)=''
29237 + _LT_TAGVAR(hardcode_direct, $1)=yes
29238 + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
29239 + _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
29240 + _LT_TAGVAR(link_all_deplibs, $1)=yes
29241 + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
29242 +
29243 + if test "$GXX" = yes; then
29244 + case $host_os in aix4.[[012]]|aix4.[[012]].*)
29245 + # We only want to do this on AIX 4.2 and lower, the check
29246 + # below for broken collect2 doesn't work under 4.3+
29247 + collect2name=`${CC} -print-prog-name=collect2`
29248 + if test -f "$collect2name" &&
29249 + strings "$collect2name" | $GREP resolve_lib_name >/dev/null
29250 + then
29251 + # We have reworked collect2
29252 + :
29253 + else
29254 + # We have old collect2
29255 + _LT_TAGVAR(hardcode_direct, $1)=unsupported
29256 + # It fails to find uninstalled libraries when the uninstalled
29257 + # path is not listed in the libpath. Setting hardcode_minus_L
29258 + # to unsupported forces relinking
29259 + _LT_TAGVAR(hardcode_minus_L, $1)=yes
29260 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
29261 + _LT_TAGVAR(hardcode_libdir_separator, $1)=
29262 + fi
29263 + esac
29264 + shared_flag='-shared'
29265 + if test "$aix_use_runtimelinking" = yes; then
29266 + shared_flag="$shared_flag "'${wl}-G'
29267 + fi
29268 + else
29269 + # not using gcc
29270 + if test "$host_cpu" = ia64; then
29271 + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
29272 + # chokes on -Wl,-G. The following line is correct:
29273 + shared_flag='-G'
29274 + else
29275 + if test "$aix_use_runtimelinking" = yes; then
29276 + shared_flag='${wl}-G'
29277 + else
29278 + shared_flag='${wl}-bM:SRE'
29279 + fi
29280 + fi
29281 + fi
29282 +
29283 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
29284 + # It seems that -bexpall does not export symbols beginning with
29285 + # underscore (_), so it is better to generate a list of symbols to
29286 + # export.
29287 + _LT_TAGVAR(always_export_symbols, $1)=yes
29288 + if test "$aix_use_runtimelinking" = yes; then
29289 + # Warning - without using the other runtime loading flags (-brtl),
29290 + # -berok will link without error, but may produce a broken library.
29291 + _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
29292 + # Determine the default libpath from the value encoded in an empty
29293 + # executable.
29294 + _LT_SYS_MODULE_PATH_AIX([$1])
29295 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
29296 +
29297 + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
29298 + else
29299 + if test "$host_cpu" = ia64; then
29300 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
29301 + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
29302 + _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"
29303 + else
29304 + # Determine the default libpath from the value encoded in an
29305 + # empty executable.
29306 + _LT_SYS_MODULE_PATH_AIX([$1])
29307 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
29308 + # Warning - without using the other run time loading flags,
29309 + # -berok will link without error, but may produce a broken library.
29310 + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
29311 + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
29312 + if test "$with_gnu_ld" = yes; then
29313 + # We only use this code for GNU lds that support --whole-archive.
29314 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
29315 + else
29316 + # Exported symbols can be pulled into shared objects from archives
29317 + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
29318 + fi
29319 + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
29320 + # This is similar to how AIX traditionally builds its shared
29321 + # libraries.
29322 + _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'
29323 + fi
29324 + fi
29325 + ;;
29326 +
29327 + beos*)
29328 + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
29329 + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
29330 + # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
29331 + # support --undefined. This deserves some investigation. FIXME
29332 + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
29333 + else
29334 + _LT_TAGVAR(ld_shlibs, $1)=no
29335 + fi
29336 + ;;
29337 +
29338 + chorus*)
29339 + case $cc_basename in
29340 + *)
29341 + # FIXME: insert proper C++ library support
29342 + _LT_TAGVAR(ld_shlibs, $1)=no
29343 + ;;
29344 + esac
29345 + ;;
29346 +
29347 + cygwin* | mingw* | pw32* | cegcc*)
29348 + case $GXX,$cc_basename in
29349 + ,cl* | no,cl*)
29350 + # Native MSVC
29351 + # hardcode_libdir_flag_spec is actually meaningless, as there is
29352 + # no search path for DLLs.
29353 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
29354 + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
29355 + _LT_TAGVAR(always_export_symbols, $1)=yes
29356 + _LT_TAGVAR(file_list_spec, $1)='@'
29357 + # Tell ltmain to make .lib files, not .a files.
29358 + libext=lib
29359 + # Tell ltmain to make .dll files, not .so files.
29360 + shrext_cmds=".dll"
29361 + # FIXME: Setting linknames here is a bad hack.
29362 + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
29363 + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
29364 + $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
29365 + else
29366 + $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
29367 + fi~
29368 + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
29369 + linknames='
29370 + # The linker will not automatically build a static lib if we build a DLL.
29371 + # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
29372 + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
29373 + # Don't use ranlib
29374 + _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
29375 + _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
29376 + lt_tool_outputfile="@TOOL_OUTPUT@"~
29377 + case $lt_outputfile in
29378 + *.exe|*.EXE) ;;
29379 + *)
29380 + lt_outputfile="$lt_outputfile.exe"
29381 + lt_tool_outputfile="$lt_tool_outputfile.exe"
29382 + ;;
29383 + esac~
29384 + func_to_tool_file "$lt_outputfile"~
29385 + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
29386 + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
29387 + $RM "$lt_outputfile.manifest";
29388 + fi'
29389 + ;;
29390 + *)
29391 + # g++
29392 + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
29393 + # as there is no search path for DLLs.
29394 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
29395 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
29396 + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
29397 + _LT_TAGVAR(always_export_symbols, $1)=no
29398 + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
29399 +
29400 + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
29401 + _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'
29402 + # If the export-symbols file already is a .def file (1st line
29403 + # is EXPORTS), use it as is; otherwise, prepend...
29404 + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
29405 + cp $export_symbols $output_objdir/$soname.def;
29406 + else
29407 + echo EXPORTS > $output_objdir/$soname.def;
29408 + cat $export_symbols >> $output_objdir/$soname.def;
29409 + fi~
29410 + $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'
29411 + else
29412 + _LT_TAGVAR(ld_shlibs, $1)=no
29413 + fi
29414 + ;;
29415 + esac
29416 + ;;
29417 + darwin* | rhapsody*)
29418 + _LT_DARWIN_LINKER_FEATURES($1)
29419 + ;;
29420 +
29421 + dgux*)
29422 + case $cc_basename in
29423 + ec++*)
29424 + # FIXME: insert proper C++ library support
29425 + _LT_TAGVAR(ld_shlibs, $1)=no
29426 + ;;
29427 + ghcx*)
29428 + # Green Hills C++ Compiler
29429 + # FIXME: insert proper C++ library support
29430 + _LT_TAGVAR(ld_shlibs, $1)=no
29431 + ;;
29432 + *)
29433 + # FIXME: insert proper C++ library support
29434 + _LT_TAGVAR(ld_shlibs, $1)=no
29435 + ;;
29436 + esac
29437 + ;;
29438 +
29439 + freebsd2.*)
29440 + # C++ shared libraries reported to be fairly broken before
29441 + # switch to ELF
29442 + _LT_TAGVAR(ld_shlibs, $1)=no
29443 + ;;
29444 +
29445 + freebsd-elf*)
29446 + _LT_TAGVAR(archive_cmds_need_lc, $1)=no
29447 + ;;
29448 +
29449 + freebsd* | dragonfly*)
29450 + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
29451 + # conventions
29452 + _LT_TAGVAR(ld_shlibs, $1)=yes
29453 + ;;
29454 +
29455 + haiku*)
29456 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
29457 + _LT_TAGVAR(link_all_deplibs, $1)=yes
29458 + ;;
29459 +
29460 + hpux9*)
29461 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
29462 + _LT_TAGVAR(hardcode_libdir_separator, $1)=:
29463 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
29464 + _LT_TAGVAR(hardcode_direct, $1)=yes
29465 + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
29466 + # but as the default
29467 + # location of the library.
29468 +
29469 + case $cc_basename in
29470 + CC*)
29471 + # FIXME: insert proper C++ library support
29472 + _LT_TAGVAR(ld_shlibs, $1)=no
29473 + ;;
29474 + aCC*)
29475 + _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'
29476 + # Commands to make compiler produce verbose output that lists
29477 + # what "hidden" libraries, object files and flags are used when
29478 + # linking a shared library.
29479 + #
29480 + # There doesn't appear to be a way to prevent this compiler from
29481 + # explicitly linking system object files so we need to strip them
29482 + # from the output so that they don't get included in the library
29483 + # dependencies.
29484 + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
29485 + ;;
29486 + *)
29487 + if test "$GXX" = yes; then
29488 + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
29489 + else
29490 + # FIXME: insert proper C++ library support
29491 + _LT_TAGVAR(ld_shlibs, $1)=no
29492 + fi
29493 + ;;
29494 + esac
29495 + ;;
29496 +
29497 + hpux10*|hpux11*)
29498 + if test $with_gnu_ld = no; then
29499 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
29500 + _LT_TAGVAR(hardcode_libdir_separator, $1)=:
29501 +
29502 + case $host_cpu in
29503 + hppa*64*|ia64*)
29504 + ;;
29505 + *)
29506 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
29507 + ;;
29508 + esac
29509 + fi
29510 + case $host_cpu in
29511 + hppa*64*|ia64*)
29512 + _LT_TAGVAR(hardcode_direct, $1)=no
29513 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
29514 + ;;
29515 + *)
29516 + _LT_TAGVAR(hardcode_direct, $1)=yes
29517 + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
29518 + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
29519 + # but as the default
29520 + # location of the library.
29521 + ;;
29522 + esac
29523 +
29524 + case $cc_basename in
29525 + CC*)
29526 + # FIXME: insert proper C++ library support
29527 + _LT_TAGVAR(ld_shlibs, $1)=no
29528 + ;;
29529 + aCC*)
29530 + case $host_cpu in
29531 + hppa*64*)
29532 + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
29533 + ;;
29534 + ia64*)
29535 + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
29536 + ;;
29537 + *)
29538 + _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'
29539 + ;;
29540 + esac
29541 + # Commands to make compiler produce verbose output that lists
29542 + # what "hidden" libraries, object files and flags are used when
29543 + # linking a shared library.
29544 + #
29545 + # There doesn't appear to be a way to prevent this compiler from
29546 + # explicitly linking system object files so we need to strip them
29547 + # from the output so that they don't get included in the library
29548 + # dependencies.
29549 + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
29550 + ;;
29551 + *)
29552 + if test "$GXX" = yes; then
29553 + if test $with_gnu_ld = no; then
29554 + case $host_cpu in
29555 + hppa*64*)
29556 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
29557 + ;;
29558 + ia64*)
29559 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
29560 + ;;
29561 + *)
29562 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
29563 + ;;
29564 + esac
29565 + fi
29566 + else
29567 + # FIXME: insert proper C++ library support
29568 + _LT_TAGVAR(ld_shlibs, $1)=no
29569 + fi
29570 + ;;
29571 + esac
29572 + ;;
29573 +
29574 + interix[[3-9]]*)
29575 + _LT_TAGVAR(hardcode_direct, $1)=no
29576 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
29577 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
29578 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
29579 + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
29580 + # Instead, shared libraries are loaded at an image base (0x10000000 by
29581 + # default) and relocated if they conflict, which is a slow very memory
29582 + # consuming and fragmenting process. To avoid this, we pick a random,
29583 + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
29584 + # time. Moving up from 0x10000000 also allows more sbrk(2) space.
29585 + _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'
29586 + _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'
29587 + ;;
29588 + irix5* | irix6*)
29589 + case $cc_basename in
29590 + CC*)
29591 + # SGI C++
29592 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
29593 +
29594 + # Archives containing C++ object files must be created using
29595 + # "CC -ar", where "CC" is the IRIX C++ compiler. This is
29596 + # necessary to make sure instantiated templates are included
29597 + # in the archive.
29598 + _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
29599 + ;;
29600 + *)
29601 + if test "$GXX" = yes; then
29602 + if test "$with_gnu_ld" = no; then
29603 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
29604 + else
29605 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
29606 + fi
29607 + fi
29608 + _LT_TAGVAR(link_all_deplibs, $1)=yes
29609 + ;;
29610 + esac
29611 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
29612 + _LT_TAGVAR(hardcode_libdir_separator, $1)=:
29613 + _LT_TAGVAR(inherit_rpath, $1)=yes
29614 + ;;
29615 +
29616 + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
29617 + case $cc_basename in
29618 + KCC*)
29619 + # Kuck and Associates, Inc. (KAI) C++ Compiler
29620 +
29621 + # KCC will only create a shared library if the output file
29622 + # ends with ".so" (or ".sl" for HP-UX), so rename the library
29623 + # to its proper name (with version) after linking.
29624 + _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'
29625 + _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'
29626 + # Commands to make compiler produce verbose output that lists
29627 + # what "hidden" libraries, object files and flags are used when
29628 + # linking a shared library.
29629 + #
29630 + # There doesn't appear to be a way to prevent this compiler from
29631 + # explicitly linking system object files so we need to strip them
29632 + # from the output so that they don't get included in the library
29633 + # dependencies.
29634 + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
29635 +
29636 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
29637 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
29638 +
29639 + # Archives containing C++ object files must be created using
29640 + # "CC -Bstatic", where "CC" is the KAI C++ compiler.
29641 + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
29642 + ;;
29643 + icpc* | ecpc* )
29644 + # Intel C++
29645 + with_gnu_ld=yes
29646 + # version 8.0 and above of icpc choke on multiply defined symbols
29647 + # if we add $predep_objects and $postdep_objects, however 7.1 and
29648 + # earlier do not add the objects themselves.
29649 + case `$CC -V 2>&1` in
29650 + *"Version 7."*)
29651 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
29652 + _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'
29653 + ;;
29654 + *) # Version 8.0 or newer
29655 + tmp_idyn=
29656 + case $host_cpu in
29657 + ia64*) tmp_idyn=' -i_dynamic';;
29658 + esac
29659 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
29660 + _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'
29661 + ;;
29662 + esac
29663 + _LT_TAGVAR(archive_cmds_need_lc, $1)=no
29664 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
29665 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
29666 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
29667 + ;;
29668 + pgCC* | pgcpp*)
29669 + # Portland Group C++ compiler
29670 + case `$CC -V` in
29671 + *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
29672 + _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
29673 + rm -rf $tpldir~
29674 + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
29675 + compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
29676 + _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
29677 + rm -rf $tpldir~
29678 + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
29679 + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
29680 + $RANLIB $oldlib'
29681 + _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
29682 + rm -rf $tpldir~
29683 + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
29684 + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
29685 + _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
29686 + rm -rf $tpldir~
29687 + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
29688 + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
29689 + ;;
29690 + *) # Version 6 and above use weak symbols
29691 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
29692 + _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'
29693 + ;;
29694 + esac
29695 +
29696 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
29697 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
29698 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
29699 + ;;
29700 + cxx*)
29701 + # Compaq C++
29702 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
29703 + _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'
29704 +
29705 + runpath_var=LD_RUN_PATH
29706 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
29707 + _LT_TAGVAR(hardcode_libdir_separator, $1)=:
29708 +
29709 + # Commands to make compiler produce verbose output that lists
29710 + # what "hidden" libraries, object files and flags are used when
29711 + # linking a shared library.
29712 + #
29713 + # There doesn't appear to be a way to prevent this compiler from
29714 + # explicitly linking system object files so we need to strip them
29715 + # from the output so that they don't get included in the library
29716 + # dependencies.
29717 + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
29718 + ;;
29719 + xl* | mpixl* | bgxl*)
29720 + # IBM XL 8.0 on PPC, with GNU ld
29721 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
29722 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
29723 + _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
29724 + if test "x$supports_anon_versioning" = xyes; then
29725 + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
29726 + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
29727 + echo "local: *; };" >> $output_objdir/$libname.ver~
29728 + $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
29729 + fi
29730 + ;;
29731 + *)
29732 + case `$CC -V 2>&1 | sed 5q` in
29733 + *Sun\ C*)
29734 + # Sun C++ 5.9
29735 + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
29736 + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
29737 + _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'
29738 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
29739 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
29740 + _LT_TAGVAR(compiler_needs_object, $1)=yes
29741 +
29742 + # Not sure whether something based on
29743 + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
29744 + # would be better.
29745 + output_verbose_link_cmd='func_echo_all'
29746 +
29747 + # Archives containing C++ object files must be created using
29748 + # "CC -xar", where "CC" is the Sun C++ compiler. This is
29749 + # necessary to make sure instantiated templates are included
29750 + # in the archive.
29751 + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
29752 + ;;
29753 + esac
29754 + ;;
29755 + esac
29756 + ;;
29757 +
29758 + lynxos*)
29759 + # FIXME: insert proper C++ library support
29760 + _LT_TAGVAR(ld_shlibs, $1)=no
29761 + ;;
29762 +
29763 + m88k*)
29764 + # FIXME: insert proper C++ library support
29765 + _LT_TAGVAR(ld_shlibs, $1)=no
29766 + ;;
29767 +
29768 + mvs*)
29769 + case $cc_basename in
29770 + cxx*)
29771 + # FIXME: insert proper C++ library support
29772 + _LT_TAGVAR(ld_shlibs, $1)=no
29773 + ;;
29774 + *)
29775 + # FIXME: insert proper C++ library support
29776 + _LT_TAGVAR(ld_shlibs, $1)=no
29777 + ;;
29778 + esac
29779 + ;;
29780 +
29781 + netbsd*)
29782 + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
29783 + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
29784 + wlarc=
29785 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
29786 + _LT_TAGVAR(hardcode_direct, $1)=yes
29787 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
29788 + fi
29789 + # Workaround some broken pre-1.5 toolchains
29790 + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
29791 + ;;
29792 +
29793 + *nto* | *qnx*)
29794 + _LT_TAGVAR(ld_shlibs, $1)=yes
29795 + ;;
29796 +
29797 + openbsd2*)
29798 + # C++ shared libraries are fairly broken
29799 + _LT_TAGVAR(ld_shlibs, $1)=no
29800 + ;;
29801 +
29802 + openbsd*)
29803 + if test -f /usr/libexec/ld.so; then
29804 + _LT_TAGVAR(hardcode_direct, $1)=yes
29805 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
29806 + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
29807 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
29808 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
29809 + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
29810 + _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'
29811 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
29812 + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
29813 + fi
29814 + output_verbose_link_cmd=func_echo_all
29815 + else
29816 + _LT_TAGVAR(ld_shlibs, $1)=no
29817 + fi
29818 + ;;
29819 +
29820 + osf3* | osf4* | osf5*)
29821 + case $cc_basename in
29822 + KCC*)
29823 + # Kuck and Associates, Inc. (KAI) C++ Compiler
29824 +
29825 + # KCC will only create a shared library if the output file
29826 + # ends with ".so" (or ".sl" for HP-UX), so rename the library
29827 + # to its proper name (with version) after linking.
29828 + _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'
29829 +
29830 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
29831 + _LT_TAGVAR(hardcode_libdir_separator, $1)=:
29832 +
29833 + # Archives containing C++ object files must be created using
29834 + # the KAI C++ compiler.
29835 + case $host in
29836 + osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
29837 + *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
29838 + esac
29839 + ;;
29840 + RCC*)
29841 + # Rational C++ 2.4.1
29842 + # FIXME: insert proper C++ library support
29843 + _LT_TAGVAR(ld_shlibs, $1)=no
29844 + ;;
29845 + cxx*)
29846 + case $host in
29847 + osf3*)
29848 + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
29849 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
29850 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
29851 + ;;
29852 + *)
29853 + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
29854 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
29855 + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
29856 + echo "-hidden">> $lib.exp~
29857 + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
29858 + $RM $lib.exp'
29859 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
29860 + ;;
29861 + esac
29862 +
29863 + _LT_TAGVAR(hardcode_libdir_separator, $1)=:
29864 +
29865 + # Commands to make compiler produce verbose output that lists
29866 + # what "hidden" libraries, object files and flags are used when
29867 + # linking a shared library.
29868 + #
29869 + # There doesn't appear to be a way to prevent this compiler from
29870 + # explicitly linking system object files so we need to strip them
29871 + # from the output so that they don't get included in the library
29872 + # dependencies.
29873 + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
29874 + ;;
29875 + *)
29876 + if test "$GXX" = yes && test "$with_gnu_ld" = no; then
29877 + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
29878 + case $host in
29879 + osf3*)
29880 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
29881 + ;;
29882 + *)
29883 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
29884 + ;;
29885 + esac
29886 +
29887 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
29888 + _LT_TAGVAR(hardcode_libdir_separator, $1)=:
29889 +
29890 + # Commands to make compiler produce verbose output that lists
29891 + # what "hidden" libraries, object files and flags are used when
29892 + # linking a shared library.
29893 + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
29894 +
29895 + else
29896 + # FIXME: insert proper C++ library support
29897 + _LT_TAGVAR(ld_shlibs, $1)=no
29898 + fi
29899 + ;;
29900 + esac
29901 + ;;
29902 +
29903 + psos*)
29904 + # FIXME: insert proper C++ library support
29905 + _LT_TAGVAR(ld_shlibs, $1)=no
29906 + ;;
29907 +
29908 + sunos4*)
29909 + case $cc_basename in
29910 + CC*)
29911 + # Sun C++ 4.x
29912 + # FIXME: insert proper C++ library support
29913 + _LT_TAGVAR(ld_shlibs, $1)=no
29914 + ;;
29915 + lcc*)
29916 + # Lucid
29917 + # FIXME: insert proper C++ library support
29918 + _LT_TAGVAR(ld_shlibs, $1)=no
29919 + ;;
29920 + *)
29921 + # FIXME: insert proper C++ library support
29922 + _LT_TAGVAR(ld_shlibs, $1)=no
29923 + ;;
29924 + esac
29925 + ;;
29926 +
29927 + solaris*)
29928 + case $cc_basename in
29929 + CC* | sunCC*)
29930 + # Sun C++ 4.2, 5.x and Centerline C++
29931 + _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
29932 + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
29933 + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
29934 + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
29935 + $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'
29936 +
29937 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
29938 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
29939 + case $host_os in
29940 + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
29941 + *)
29942 + # The compiler driver will combine and reorder linker options,
29943 + # but understands `-z linker_flag'.
29944 + # Supported since Solaris 2.6 (maybe 2.5.1?)
29945 + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
29946 + ;;
29947 + esac
29948 + _LT_TAGVAR(link_all_deplibs, $1)=yes
29949 +
29950 + output_verbose_link_cmd='func_echo_all'
29951 +
29952 + # Archives containing C++ object files must be created using
29953 + # "CC -xar", where "CC" is the Sun C++ compiler. This is
29954 + # necessary to make sure instantiated templates are included
29955 + # in the archive.
29956 + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
29957 + ;;
29958 + gcx*)
29959 + # Green Hills C++ Compiler
29960 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
29961 +
29962 + # The C++ compiler must be used to create the archive.
29963 + _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
29964 + ;;
29965 + *)
29966 + # GNU C++ compiler with Solaris linker
29967 + if test "$GXX" = yes && test "$with_gnu_ld" = no; then
29968 + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
29969 + if $CC --version | $GREP -v '^2\.7' > /dev/null; then
29970 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
29971 + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
29972 + $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
29973 +
29974 + # Commands to make compiler produce verbose output that lists
29975 + # what "hidden" libraries, object files and flags are used when
29976 + # linking a shared library.
29977 + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
29978 + else
29979 + # g++ 2.7 appears to require `-G' NOT `-shared' on this
29980 + # platform.
29981 + _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
29982 + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
29983 + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
29984 +
29985 + # Commands to make compiler produce verbose output that lists
29986 + # what "hidden" libraries, object files and flags are used when
29987 + # linking a shared library.
29988 + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
29989 + fi
29990 +
29991 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
29992 + case $host_os in
29993 + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
29994 + *)
29995 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
29996 + ;;
29997 + esac
29998 + fi
29999 + ;;
30000 + esac
30001 + ;;
30002 +
30003 + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
30004 + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
30005 + _LT_TAGVAR(archive_cmds_need_lc, $1)=no
30006 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
30007 + runpath_var='LD_RUN_PATH'
30008 +
30009 + case $cc_basename in
30010 + CC*)
30011 + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
30012 + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
30013 + ;;
30014 + *)
30015 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
30016 + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
30017 + ;;
30018 + esac
30019 + ;;
30020 +
30021 + sysv5* | sco3.2v5* | sco5v6*)
30022 + # Note: We can NOT use -z defs as we might desire, because we do not
30023 + # link with -lc, and that would cause any symbols used from libc to
30024 + # always be unresolved, which means just about no library would
30025 + # ever link correctly. If we're not using GNU ld we use -z text
30026 + # though, which does catch some bad symbols but isn't as heavy-handed
30027 + # as -z defs.
30028 + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
30029 + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
30030 + _LT_TAGVAR(archive_cmds_need_lc, $1)=no
30031 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
30032 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
30033 + _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
30034 + _LT_TAGVAR(link_all_deplibs, $1)=yes
30035 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
30036 + runpath_var='LD_RUN_PATH'
30037 +
30038 + case $cc_basename in
30039 + CC*)
30040 + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
30041 + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
30042 + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
30043 + '"$_LT_TAGVAR(old_archive_cmds, $1)"
30044 + _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
30045 + '"$_LT_TAGVAR(reload_cmds, $1)"
30046 + ;;
30047 + *)
30048 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
30049 + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
30050 + ;;
30051 + esac
30052 + ;;
30053 +
30054 + tandem*)
30055 + case $cc_basename in
30056 + NCC*)
30057 + # NonStop-UX NCC 3.20
30058 + # FIXME: insert proper C++ library support
30059 + _LT_TAGVAR(ld_shlibs, $1)=no
30060 + ;;
30061 + *)
30062 + # FIXME: insert proper C++ library support
30063 + _LT_TAGVAR(ld_shlibs, $1)=no
30064 + ;;
30065 + esac
30066 + ;;
30067 +
30068 + vxworks*)
30069 + # FIXME: insert proper C++ library support
30070 + _LT_TAGVAR(ld_shlibs, $1)=no
30071 + ;;
30072 +
30073 + *)
30074 + # FIXME: insert proper C++ library support
30075 + _LT_TAGVAR(ld_shlibs, $1)=no
30076 + ;;
30077 + esac
30078 +
30079 + AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
30080 + test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
30081 +
30082 + _LT_TAGVAR(GCC, $1)="$GXX"
30083 + _LT_TAGVAR(LD, $1)="$LD"
30084 +
30085 + ## CAVEAT EMPTOR:
30086 + ## There is no encapsulation within the following macros, do not change
30087 + ## the running order or otherwise move them around unless you know exactly
30088 + ## what you are doing...
30089 + _LT_SYS_HIDDEN_LIBDEPS($1)
30090 + _LT_COMPILER_PIC($1)
30091 + _LT_COMPILER_C_O($1)
30092 + _LT_COMPILER_FILE_LOCKS($1)
30093 + _LT_LINKER_SHLIBS($1)
30094 + _LT_SYS_DYNAMIC_LINKER($1)
30095 + _LT_LINKER_HARDCODE_LIBPATH($1)
30096 +
30097 + _LT_CONFIG($1)
30098 + fi # test -n "$compiler"
30099 +
30100 + CC=$lt_save_CC
30101 + CFLAGS=$lt_save_CFLAGS
30102 + LDCXX=$LD
30103 + LD=$lt_save_LD
30104 + GCC=$lt_save_GCC
30105 + with_gnu_ld=$lt_save_with_gnu_ld
30106 + lt_cv_path_LDCXX=$lt_cv_path_LD
30107 + lt_cv_path_LD=$lt_save_path_LD
30108 + lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
30109 + lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
30110 +fi # test "$_lt_caught_CXX_error" != yes
30111 +
30112 +AC_LANG_POP
30113 +])# _LT_LANG_CXX_CONFIG
30114 +
30115 +
30116 +# _LT_FUNC_STRIPNAME_CNF
30117 +# ----------------------
30118 +# func_stripname_cnf prefix suffix name
30119 +# strip PREFIX and SUFFIX off of NAME.
30120 +# PREFIX and SUFFIX must not contain globbing or regex special
30121 +# characters, hashes, percent signs, but SUFFIX may contain a leading
30122 +# dot (in which case that matches only a dot).
30123 +#
30124 +# This function is identical to the (non-XSI) version of func_stripname,
30125 +# except this one can be used by m4 code that may be executed by configure,
30126 +# rather than the libtool script.
30127 +m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
30128 +AC_REQUIRE([_LT_DECL_SED])
30129 +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
30130 +func_stripname_cnf ()
30131 +{
30132 + case ${2} in
30133 + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
30134 + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
30135 + esac
30136 +} # func_stripname_cnf
30137 +])# _LT_FUNC_STRIPNAME_CNF
30138 +
30139 +# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
30140 +# ---------------------------------
30141 +# Figure out "hidden" library dependencies from verbose
30142 +# compiler output when linking a shared library.
30143 +# Parse the compiler output and extract the necessary
30144 +# objects, libraries and library flags.
30145 +m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
30146 +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
30147 +AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
30148 +# Dependencies to place before and after the object being linked:
30149 +_LT_TAGVAR(predep_objects, $1)=
30150 +_LT_TAGVAR(postdep_objects, $1)=
30151 +_LT_TAGVAR(predeps, $1)=
30152 +_LT_TAGVAR(postdeps, $1)=
30153 +_LT_TAGVAR(compiler_lib_search_path, $1)=
30154 +
30155 +dnl we can't use the lt_simple_compile_test_code here,
30156 +dnl because it contains code intended for an executable,
30157 +dnl not a library. It's possible we should let each
30158 +dnl tag define a new lt_????_link_test_code variable,
30159 +dnl but it's only used here...
30160 +m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
30161 +int a;
30162 +void foo (void) { a = 0; }
30163 +_LT_EOF
30164 +], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
30165 +class Foo
30166 +{
30167 +public:
30168 + Foo (void) { a = 0; }
30169 +private:
30170 + int a;
30171 +};
30172 +_LT_EOF
30173 +], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
30174 + subroutine foo
30175 + implicit none
30176 + integer*4 a
30177 + a=0
30178 + return
30179 + end
30180 +_LT_EOF
30181 +], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
30182 + subroutine foo
30183 + implicit none
30184 + integer a
30185 + a=0
30186 + return
30187 + end
30188 +_LT_EOF
30189 +], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
30190 +public class foo {
30191 + private int a;
30192 + public void bar (void) {
30193 + a = 0;
30194 + }
30195 +};
30196 +_LT_EOF
30197 +], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
30198 +package foo
30199 +func foo() {
30200 +}
30201 +_LT_EOF
30202 +])
30203 +
30204 +_lt_libdeps_save_CFLAGS=$CFLAGS
30205 +case "$CC $CFLAGS " in #(
30206 +*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
30207 +*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
30208 +*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
30209 +esac
30210 +
30211 +dnl Parse the compiler output and extract the necessary
30212 +dnl objects, libraries and library flags.
30213 +if AC_TRY_EVAL(ac_compile); then
30214 + # Parse the compiler output and extract the necessary
30215 + # objects, libraries and library flags.
30216 +
30217 + # Sentinel used to keep track of whether or not we are before
30218 + # the conftest object file.
30219 + pre_test_object_deps_done=no
30220 +
30221 + for p in `eval "$output_verbose_link_cmd"`; do
30222 + case ${prev}${p} in
30223 +
30224 + -L* | -R* | -l*)
30225 + # Some compilers place space between "-{L,R}" and the path.
30226 + # Remove the space.
30227 + if test $p = "-L" ||
30228 + test $p = "-R"; then
30229 + prev=$p
30230 + continue
30231 + fi
30232 +
30233 + # Expand the sysroot to ease extracting the directories later.
30234 + if test -z "$prev"; then
30235 + case $p in
30236 + -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
30237 + -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
30238 + -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
30239 + esac
30240 + fi
30241 + case $p in
30242 + =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
30243 + esac
30244 + if test "$pre_test_object_deps_done" = no; then
30245 + case ${prev} in
30246 + -L | -R)
30247 + # Internal compiler library paths should come after those
30248 + # provided the user. The postdeps already come after the
30249 + # user supplied libs so there is no need to process them.
30250 + if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
30251 + _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
30252 + else
30253 + _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
30254 + fi
30255 + ;;
30256 + # The "-l" case would never come before the object being
30257 + # linked, so don't bother handling this case.
30258 + esac
30259 + else
30260 + if test -z "$_LT_TAGVAR(postdeps, $1)"; then
30261 + _LT_TAGVAR(postdeps, $1)="${prev}${p}"
30262 + else
30263 + _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
30264 + fi
30265 + fi
30266 + prev=
30267 + ;;
30268 +
30269 + *.lto.$objext) ;; # Ignore GCC LTO objects
30270 + *.$objext)
30271 + # This assumes that the test object file only shows up
30272 + # once in the compiler output.
30273 + if test "$p" = "conftest.$objext"; then
30274 + pre_test_object_deps_done=yes
30275 + continue
30276 + fi
30277 +
30278 + if test "$pre_test_object_deps_done" = no; then
30279 + if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
30280 + _LT_TAGVAR(predep_objects, $1)="$p"
30281 + else
30282 + _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
30283 + fi
30284 + else
30285 + if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
30286 + _LT_TAGVAR(postdep_objects, $1)="$p"
30287 + else
30288 + _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
30289 + fi
30290 + fi
30291 + ;;
30292 +
30293 + *) ;; # Ignore the rest.
30294 +
30295 + esac
30296 + done
30297 +
30298 + # Clean up.
30299 + rm -f a.out a.exe
30300 +else
30301 + echo "libtool.m4: error: problem compiling $1 test program"
30302 +fi
30303 +
30304 +$RM -f confest.$objext
30305 +CFLAGS=$_lt_libdeps_save_CFLAGS
30306 +
30307 +# PORTME: override above test on systems where it is broken
30308 +m4_if([$1], [CXX],
30309 +[case $host_os in
30310 +interix[[3-9]]*)
30311 + # Interix 3.5 installs completely hosed .la files for C++, so rather than
30312 + # hack all around it, let's just trust "g++" to DTRT.
30313 + _LT_TAGVAR(predep_objects,$1)=
30314 + _LT_TAGVAR(postdep_objects,$1)=
30315 + _LT_TAGVAR(postdeps,$1)=
30316 + ;;
30317 +
30318 +linux*)
30319 + case `$CC -V 2>&1 | sed 5q` in
30320 + *Sun\ C*)
30321 + # Sun C++ 5.9
30322 +
30323 + # The more standards-conforming stlport4 library is
30324 + # incompatible with the Cstd library. Avoid specifying
30325 + # it if it's in CXXFLAGS. Ignore libCrun as
30326 + # -library=stlport4 depends on it.
30327 + case " $CXX $CXXFLAGS " in
30328 + *" -library=stlport4 "*)
30329 + solaris_use_stlport4=yes
30330 + ;;
30331 + esac
30332 +
30333 + if test "$solaris_use_stlport4" != yes; then
30334 + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
30335 + fi
30336 + ;;
30337 + esac
30338 + ;;
30339 +
30340 +solaris*)
30341 + case $cc_basename in
30342 + CC* | sunCC*)
30343 + # The more standards-conforming stlport4 library is
30344 + # incompatible with the Cstd library. Avoid specifying
30345 + # it if it's in CXXFLAGS. Ignore libCrun as
30346 + # -library=stlport4 depends on it.
30347 + case " $CXX $CXXFLAGS " in
30348 + *" -library=stlport4 "*)
30349 + solaris_use_stlport4=yes
30350 + ;;
30351 + esac
30352 +
30353 + # Adding this requires a known-good setup of shared libraries for
30354 + # Sun compiler versions before 5.6, else PIC objects from an old
30355 + # archive will be linked into the output, leading to subtle bugs.
30356 + if test "$solaris_use_stlport4" != yes; then
30357 + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
30358 + fi
30359 + ;;
30360 + esac
30361 + ;;
30362 +esac
30363 +])
30364 +
30365 +case " $_LT_TAGVAR(postdeps, $1) " in
30366 +*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
30367 +esac
30368 + _LT_TAGVAR(compiler_lib_search_dirs, $1)=
30369 +if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
30370 + _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
30371 +fi
30372 +_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
30373 + [The directories searched by this compiler when creating a shared library])
30374 +_LT_TAGDECL([], [predep_objects], [1],
30375 + [Dependencies to place before and after the objects being linked to
30376 + create a shared library])
30377 +_LT_TAGDECL([], [postdep_objects], [1])
30378 +_LT_TAGDECL([], [predeps], [1])
30379 +_LT_TAGDECL([], [postdeps], [1])
30380 +_LT_TAGDECL([], [compiler_lib_search_path], [1],
30381 + [The library search path used internally by the compiler when linking
30382 + a shared library])
30383 +])# _LT_SYS_HIDDEN_LIBDEPS
30384 +
30385 +
30386 +# _LT_LANG_F77_CONFIG([TAG])
30387 +# --------------------------
30388 +# Ensure that the configuration variables for a Fortran 77 compiler are
30389 +# suitably defined. These variables are subsequently used by _LT_CONFIG
30390 +# to write the compiler configuration to `libtool'.
30391 +m4_defun([_LT_LANG_F77_CONFIG],
30392 +[AC_LANG_PUSH(Fortran 77)
30393 +if test -z "$F77" || test "X$F77" = "Xno"; then
30394 + _lt_disable_F77=yes
30395 +fi
30396 +
30397 +_LT_TAGVAR(archive_cmds_need_lc, $1)=no
30398 +_LT_TAGVAR(allow_undefined_flag, $1)=
30399 +_LT_TAGVAR(always_export_symbols, $1)=no
30400 +_LT_TAGVAR(archive_expsym_cmds, $1)=
30401 +_LT_TAGVAR(export_dynamic_flag_spec, $1)=
30402 +_LT_TAGVAR(hardcode_direct, $1)=no
30403 +_LT_TAGVAR(hardcode_direct_absolute, $1)=no
30404 +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
30405 +_LT_TAGVAR(hardcode_libdir_separator, $1)=
30406 +_LT_TAGVAR(hardcode_minus_L, $1)=no
30407 +_LT_TAGVAR(hardcode_automatic, $1)=no
30408 +_LT_TAGVAR(inherit_rpath, $1)=no
30409 +_LT_TAGVAR(module_cmds, $1)=
30410 +_LT_TAGVAR(module_expsym_cmds, $1)=
30411 +_LT_TAGVAR(link_all_deplibs, $1)=unknown
30412 +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
30413 +_LT_TAGVAR(reload_flag, $1)=$reload_flag
30414 +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
30415 +_LT_TAGVAR(no_undefined_flag, $1)=
30416 +_LT_TAGVAR(whole_archive_flag_spec, $1)=
30417 +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
30418 +
30419 +# Source file extension for f77 test sources.
30420 +ac_ext=f
30421 +
30422 +# Object file extension for compiled f77 test sources.
30423 +objext=o
30424 +_LT_TAGVAR(objext, $1)=$objext
30425 +
30426 +# No sense in running all these tests if we already determined that
30427 +# the F77 compiler isn't working. Some variables (like enable_shared)
30428 +# are currently assumed to apply to all compilers on this platform,
30429 +# and will be corrupted by setting them based on a non-working compiler.
30430 +if test "$_lt_disable_F77" != yes; then
30431 + # Code to be used in simple compile tests
30432 + lt_simple_compile_test_code="\
30433 + subroutine t
30434 + return
30435 + end
30436 +"
30437 +
30438 + # Code to be used in simple link tests
30439 + lt_simple_link_test_code="\
30440 + program t
30441 + end
30442 +"
30443 +
30444 + # ltmain only uses $CC for tagged configurations so make sure $CC is set.
30445 + _LT_TAG_COMPILER
30446 +
30447 + # save warnings/boilerplate of simple test code
30448 + _LT_COMPILER_BOILERPLATE
30449 + _LT_LINKER_BOILERPLATE
30450 +
30451 + # Allow CC to be a program name with arguments.
30452 + lt_save_CC="$CC"
30453 + lt_save_GCC=$GCC
30454 + lt_save_CFLAGS=$CFLAGS
30455 + CC=${F77-"f77"}
30456 + CFLAGS=$FFLAGS
30457 + compiler=$CC
30458 + _LT_TAGVAR(compiler, $1)=$CC
30459 + _LT_CC_BASENAME([$compiler])
30460 + GCC=$G77
30461 + if test -n "$compiler"; then
30462 + AC_MSG_CHECKING([if libtool supports shared libraries])
30463 + AC_MSG_RESULT([$can_build_shared])
30464 +
30465 + AC_MSG_CHECKING([whether to build shared libraries])
30466 + test "$can_build_shared" = "no" && enable_shared=no
30467 +
30468 + # On AIX, shared libraries and static libraries use the same namespace, and
30469 + # are all built from PIC.
30470 + case $host_os in
30471 + aix3*)
30472 + test "$enable_shared" = yes && enable_static=no
30473 + if test -n "$RANLIB"; then
30474 + archive_cmds="$archive_cmds~\$RANLIB \$lib"
30475 + postinstall_cmds='$RANLIB $lib'
30476 + fi
30477 + ;;
30478 + aix[[4-9]]*)
30479 + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
30480 + test "$enable_shared" = yes && enable_static=no
30481 + fi
30482 + ;;
30483 + esac
30484 + AC_MSG_RESULT([$enable_shared])
30485 +
30486 + AC_MSG_CHECKING([whether to build static libraries])
30487 + # Make sure either enable_shared or enable_static is yes.
30488 + test "$enable_shared" = yes || enable_static=yes
30489 + AC_MSG_RESULT([$enable_static])
30490 +
30491 + _LT_TAGVAR(GCC, $1)="$G77"
30492 + _LT_TAGVAR(LD, $1)="$LD"
30493 +
30494 + ## CAVEAT EMPTOR:
30495 + ## There is no encapsulation within the following macros, do not change
30496 + ## the running order or otherwise move them around unless you know exactly
30497 + ## what you are doing...
30498 + _LT_COMPILER_PIC($1)
30499 + _LT_COMPILER_C_O($1)
30500 + _LT_COMPILER_FILE_LOCKS($1)
30501 + _LT_LINKER_SHLIBS($1)
30502 + _LT_SYS_DYNAMIC_LINKER($1)
30503 + _LT_LINKER_HARDCODE_LIBPATH($1)
30504 +
30505 + _LT_CONFIG($1)
30506 + fi # test -n "$compiler"
30507 +
30508 + GCC=$lt_save_GCC
30509 + CC="$lt_save_CC"
30510 + CFLAGS="$lt_save_CFLAGS"
30511 +fi # test "$_lt_disable_F77" != yes
30512 +
30513 +AC_LANG_POP
30514 +])# _LT_LANG_F77_CONFIG
30515 +
30516 +
30517 +# _LT_LANG_FC_CONFIG([TAG])
30518 +# -------------------------
30519 +# Ensure that the configuration variables for a Fortran compiler are
30520 +# suitably defined. These variables are subsequently used by _LT_CONFIG
30521 +# to write the compiler configuration to `libtool'.
30522 +m4_defun([_LT_LANG_FC_CONFIG],
30523 +[AC_LANG_PUSH(Fortran)
30524 +
30525 +if test -z "$FC" || test "X$FC" = "Xno"; then
30526 + _lt_disable_FC=yes
30527 +fi
30528 +
30529 +_LT_TAGVAR(archive_cmds_need_lc, $1)=no
30530 +_LT_TAGVAR(allow_undefined_flag, $1)=
30531 +_LT_TAGVAR(always_export_symbols, $1)=no
30532 +_LT_TAGVAR(archive_expsym_cmds, $1)=
30533 +_LT_TAGVAR(export_dynamic_flag_spec, $1)=
30534 +_LT_TAGVAR(hardcode_direct, $1)=no
30535 +_LT_TAGVAR(hardcode_direct_absolute, $1)=no
30536 +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
30537 +_LT_TAGVAR(hardcode_libdir_separator, $1)=
30538 +_LT_TAGVAR(hardcode_minus_L, $1)=no
30539 +_LT_TAGVAR(hardcode_automatic, $1)=no
30540 +_LT_TAGVAR(inherit_rpath, $1)=no
30541 +_LT_TAGVAR(module_cmds, $1)=
30542 +_LT_TAGVAR(module_expsym_cmds, $1)=
30543 +_LT_TAGVAR(link_all_deplibs, $1)=unknown
30544 +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
30545 +_LT_TAGVAR(reload_flag, $1)=$reload_flag
30546 +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
30547 +_LT_TAGVAR(no_undefined_flag, $1)=
30548 +_LT_TAGVAR(whole_archive_flag_spec, $1)=
30549 +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
30550 +
30551 +# Source file extension for fc test sources.
30552 +ac_ext=${ac_fc_srcext-f}
30553 +
30554 +# Object file extension for compiled fc test sources.
30555 +objext=o
30556 +_LT_TAGVAR(objext, $1)=$objext
30557 +
30558 +# No sense in running all these tests if we already determined that
30559 +# the FC compiler isn't working. Some variables (like enable_shared)
30560 +# are currently assumed to apply to all compilers on this platform,
30561 +# and will be corrupted by setting them based on a non-working compiler.
30562 +if test "$_lt_disable_FC" != yes; then
30563 + # Code to be used in simple compile tests
30564 + lt_simple_compile_test_code="\
30565 + subroutine t
30566 + return
30567 + end
30568 +"
30569 +
30570 + # Code to be used in simple link tests
30571 + lt_simple_link_test_code="\
30572 + program t
30573 + end
30574 +"
30575 +
30576 + # ltmain only uses $CC for tagged configurations so make sure $CC is set.
30577 + _LT_TAG_COMPILER
30578 +
30579 + # save warnings/boilerplate of simple test code
30580 + _LT_COMPILER_BOILERPLATE
30581 + _LT_LINKER_BOILERPLATE
30582 +
30583 + # Allow CC to be a program name with arguments.
30584 + lt_save_CC="$CC"
30585 + lt_save_GCC=$GCC
30586 + lt_save_CFLAGS=$CFLAGS
30587 + CC=${FC-"f95"}
30588 + CFLAGS=$FCFLAGS
30589 + compiler=$CC
30590 + GCC=$ac_cv_fc_compiler_gnu
30591 +
30592 + _LT_TAGVAR(compiler, $1)=$CC
30593 + _LT_CC_BASENAME([$compiler])
30594 +
30595 + if test -n "$compiler"; then
30596 + AC_MSG_CHECKING([if libtool supports shared libraries])
30597 + AC_MSG_RESULT([$can_build_shared])
30598 +
30599 + AC_MSG_CHECKING([whether to build shared libraries])
30600 + test "$can_build_shared" = "no" && enable_shared=no
30601 +
30602 + # On AIX, shared libraries and static libraries use the same namespace, and
30603 + # are all built from PIC.
30604 + case $host_os in
30605 + aix3*)
30606 + test "$enable_shared" = yes && enable_static=no
30607 + if test -n "$RANLIB"; then
30608 + archive_cmds="$archive_cmds~\$RANLIB \$lib"
30609 + postinstall_cmds='$RANLIB $lib'
30610 + fi
30611 + ;;
30612 + aix[[4-9]]*)
30613 + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
30614 + test "$enable_shared" = yes && enable_static=no
30615 + fi
30616 + ;;
30617 + esac
30618 + AC_MSG_RESULT([$enable_shared])
30619 +
30620 + AC_MSG_CHECKING([whether to build static libraries])
30621 + # Make sure either enable_shared or enable_static is yes.
30622 + test "$enable_shared" = yes || enable_static=yes
30623 + AC_MSG_RESULT([$enable_static])
30624 +
30625 + _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
30626 + _LT_TAGVAR(LD, $1)="$LD"
30627 +
30628 + ## CAVEAT EMPTOR:
30629 + ## There is no encapsulation within the following macros, do not change
30630 + ## the running order or otherwise move them around unless you know exactly
30631 + ## what you are doing...
30632 + _LT_SYS_HIDDEN_LIBDEPS($1)
30633 + _LT_COMPILER_PIC($1)
30634 + _LT_COMPILER_C_O($1)
30635 + _LT_COMPILER_FILE_LOCKS($1)
30636 + _LT_LINKER_SHLIBS($1)
30637 + _LT_SYS_DYNAMIC_LINKER($1)
30638 + _LT_LINKER_HARDCODE_LIBPATH($1)
30639 +
30640 + _LT_CONFIG($1)
30641 + fi # test -n "$compiler"
30642 +
30643 + GCC=$lt_save_GCC
30644 + CC=$lt_save_CC
30645 + CFLAGS=$lt_save_CFLAGS
30646 +fi # test "$_lt_disable_FC" != yes
30647 +
30648 +AC_LANG_POP
30649 +])# _LT_LANG_FC_CONFIG
30650 +
30651 +
30652 +# _LT_LANG_GCJ_CONFIG([TAG])
30653 +# --------------------------
30654 +# Ensure that the configuration variables for the GNU Java Compiler compiler
30655 +# are suitably defined. These variables are subsequently used by _LT_CONFIG
30656 +# to write the compiler configuration to `libtool'.
30657 +m4_defun([_LT_LANG_GCJ_CONFIG],
30658 +[AC_REQUIRE([LT_PROG_GCJ])dnl
30659 +AC_LANG_SAVE
30660 +
30661 +# Source file extension for Java test sources.
30662 +ac_ext=java
30663 +
30664 +# Object file extension for compiled Java test sources.
30665 +objext=o
30666 +_LT_TAGVAR(objext, $1)=$objext
30667 +
30668 +# Code to be used in simple compile tests
30669 +lt_simple_compile_test_code="class foo {}"
30670 +
30671 +# Code to be used in simple link tests
30672 +lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
30673 +
30674 +# ltmain only uses $CC for tagged configurations so make sure $CC is set.
30675 +_LT_TAG_COMPILER
30676 +
30677 +# save warnings/boilerplate of simple test code
30678 +_LT_COMPILER_BOILERPLATE
30679 +_LT_LINKER_BOILERPLATE
30680 +
30681 +# Allow CC to be a program name with arguments.
30682 +lt_save_CC=$CC
30683 +lt_save_CFLAGS=$CFLAGS
30684 +lt_save_GCC=$GCC
30685 +GCC=yes
30686 +CC=${GCJ-"gcj"}
30687 +CFLAGS=$GCJFLAGS
30688 +compiler=$CC
30689 +_LT_TAGVAR(compiler, $1)=$CC
30690 +_LT_TAGVAR(LD, $1)="$LD"
30691 +_LT_CC_BASENAME([$compiler])
30692 +
30693 +# GCJ did not exist at the time GCC didn't implicitly link libc in.
30694 +_LT_TAGVAR(archive_cmds_need_lc, $1)=no
30695 +
30696 +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
30697 +_LT_TAGVAR(reload_flag, $1)=$reload_flag
30698 +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
30699 +
30700 +## CAVEAT EMPTOR:
30701 +## There is no encapsulation within the following macros, do not change
30702 +## the running order or otherwise move them around unless you know exactly
30703 +## what you are doing...
30704 +if test -n "$compiler"; then
30705 + _LT_COMPILER_NO_RTTI($1)
30706 + _LT_COMPILER_PIC($1)
30707 + _LT_COMPILER_C_O($1)
30708 + _LT_COMPILER_FILE_LOCKS($1)
30709 + _LT_LINKER_SHLIBS($1)
30710 + _LT_LINKER_HARDCODE_LIBPATH($1)
30711 +
30712 + _LT_CONFIG($1)
30713 +fi
30714 +
30715 +AC_LANG_RESTORE
30716 +
30717 +GCC=$lt_save_GCC
30718 +CC=$lt_save_CC
30719 +CFLAGS=$lt_save_CFLAGS
30720 +])# _LT_LANG_GCJ_CONFIG
30721 +
30722 +
30723 +# _LT_LANG_GO_CONFIG([TAG])
30724 +# --------------------------
30725 +# Ensure that the configuration variables for the GNU Go compiler
30726 +# are suitably defined. These variables are subsequently used by _LT_CONFIG
30727 +# to write the compiler configuration to `libtool'.
30728 +m4_defun([_LT_LANG_GO_CONFIG],
30729 +[AC_REQUIRE([LT_PROG_GO])dnl
30730 +AC_LANG_SAVE
30731 +
30732 +# Source file extension for Go test sources.
30733 +ac_ext=go
30734 +
30735 +# Object file extension for compiled Go test sources.
30736 +objext=o
30737 +_LT_TAGVAR(objext, $1)=$objext
30738 +
30739 +# Code to be used in simple compile tests
30740 +lt_simple_compile_test_code="package main; func main() { }"
30741 +
30742 +# Code to be used in simple link tests
30743 +lt_simple_link_test_code='package main; func main() { }'
30744 +
30745 +# ltmain only uses $CC for tagged configurations so make sure $CC is set.
30746 +_LT_TAG_COMPILER
30747 +
30748 +# save warnings/boilerplate of simple test code
30749 +_LT_COMPILER_BOILERPLATE
30750 +_LT_LINKER_BOILERPLATE
30751 +
30752 +# Allow CC to be a program name with arguments.
30753 +lt_save_CC=$CC
30754 +lt_save_CFLAGS=$CFLAGS
30755 +lt_save_GCC=$GCC
30756 +GCC=yes
30757 +CC=${GOC-"gccgo"}
30758 +CFLAGS=$GOFLAGS
30759 +compiler=$CC
30760 +_LT_TAGVAR(compiler, $1)=$CC
30761 +_LT_TAGVAR(LD, $1)="$LD"
30762 +_LT_CC_BASENAME([$compiler])
30763 +
30764 +# Go did not exist at the time GCC didn't implicitly link libc in.
30765 +_LT_TAGVAR(archive_cmds_need_lc, $1)=no
30766 +
30767 +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
30768 +_LT_TAGVAR(reload_flag, $1)=$reload_flag
30769 +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
30770 +
30771 +## CAVEAT EMPTOR:
30772 +## There is no encapsulation within the following macros, do not change
30773 +## the running order or otherwise move them around unless you know exactly
30774 +## what you are doing...
30775 +if test -n "$compiler"; then
30776 + _LT_COMPILER_NO_RTTI($1)
30777 + _LT_COMPILER_PIC($1)
30778 + _LT_COMPILER_C_O($1)
30779 + _LT_COMPILER_FILE_LOCKS($1)
30780 + _LT_LINKER_SHLIBS($1)
30781 + _LT_LINKER_HARDCODE_LIBPATH($1)
30782 +
30783 + _LT_CONFIG($1)
30784 +fi
30785 +
30786 +AC_LANG_RESTORE
30787 +
30788 +GCC=$lt_save_GCC
30789 +CC=$lt_save_CC
30790 +CFLAGS=$lt_save_CFLAGS
30791 +])# _LT_LANG_GO_CONFIG
30792 +
30793 +
30794 +# _LT_LANG_RC_CONFIG([TAG])
30795 +# -------------------------
30796 +# Ensure that the configuration variables for the Windows resource compiler
30797 +# are suitably defined. These variables are subsequently used by _LT_CONFIG
30798 +# to write the compiler configuration to `libtool'.
30799 +m4_defun([_LT_LANG_RC_CONFIG],
30800 +[AC_REQUIRE([LT_PROG_RC])dnl
30801 +AC_LANG_SAVE
30802 +
30803 +# Source file extension for RC test sources.
30804 +ac_ext=rc
30805 +
30806 +# Object file extension for compiled RC test sources.
30807 +objext=o
30808 +_LT_TAGVAR(objext, $1)=$objext
30809 +
30810 +# Code to be used in simple compile tests
30811 +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
30812 +
30813 +# Code to be used in simple link tests
30814 +lt_simple_link_test_code="$lt_simple_compile_test_code"
30815 +
30816 +# ltmain only uses $CC for tagged configurations so make sure $CC is set.
30817 +_LT_TAG_COMPILER
30818 +
30819 +# save warnings/boilerplate of simple test code
30820 +_LT_COMPILER_BOILERPLATE
30821 +_LT_LINKER_BOILERPLATE
30822 +
30823 +# Allow CC to be a program name with arguments.
30824 +lt_save_CC="$CC"
30825 +lt_save_CFLAGS=$CFLAGS
30826 +lt_save_GCC=$GCC
30827 +GCC=
30828 +CC=${RC-"windres"}
30829 +CFLAGS=
30830 +compiler=$CC
30831 +_LT_TAGVAR(compiler, $1)=$CC
30832 +_LT_CC_BASENAME([$compiler])
30833 +_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
30834 +
30835 +if test -n "$compiler"; then
30836 + :
30837 + _LT_CONFIG($1)
30838 +fi
30839 +
30840 +GCC=$lt_save_GCC
30841 +AC_LANG_RESTORE
30842 +CC=$lt_save_CC
30843 +CFLAGS=$lt_save_CFLAGS
30844 +])# _LT_LANG_RC_CONFIG
30845 +
30846 +
30847 +# LT_PROG_GCJ
30848 +# -----------
30849 +AC_DEFUN([LT_PROG_GCJ],
30850 +[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
30851 + [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
30852 + [AC_CHECK_TOOL(GCJ, gcj,)
30853 + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
30854 + AC_SUBST(GCJFLAGS)])])[]dnl
30855 +])
30856 +
30857 +# Old name:
30858 +AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
30859 +dnl aclocal-1.4 backwards compatibility:
30860 +dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
30861 +
30862 +
30863 +# LT_PROG_GO
30864 +# ----------
30865 +AC_DEFUN([LT_PROG_GO],
30866 +[AC_CHECK_TOOL(GOC, gccgo,)
30867 +])
30868 +
30869 +
30870 +# LT_PROG_RC
30871 +# ----------
30872 +AC_DEFUN([LT_PROG_RC],
30873 +[AC_CHECK_TOOL(RC, windres,)
30874 +])
30875 +
30876 +# Old name:
30877 +AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
30878 +dnl aclocal-1.4 backwards compatibility:
30879 +dnl AC_DEFUN([LT_AC_PROG_RC], [])
30880 +
30881 +
30882 +# _LT_DECL_EGREP
30883 +# --------------
30884 +# If we don't have a new enough Autoconf to choose the best grep
30885 +# available, choose the one first in the user's PATH.
30886 +m4_defun([_LT_DECL_EGREP],
30887 +[AC_REQUIRE([AC_PROG_EGREP])dnl
30888 +AC_REQUIRE([AC_PROG_FGREP])dnl
30889 +test -z "$GREP" && GREP=grep
30890 +_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
30891 +_LT_DECL([], [EGREP], [1], [An ERE matcher])
30892 +_LT_DECL([], [FGREP], [1], [A literal string matcher])
30893 +dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
30894 +AC_SUBST([GREP])
30895 +])
30896 +
30897 +
30898 +# _LT_DECL_OBJDUMP
30899 +# --------------
30900 +# If we don't have a new enough Autoconf to choose the best objdump
30901 +# available, choose the one first in the user's PATH.
30902 +m4_defun([_LT_DECL_OBJDUMP],
30903 +[AC_CHECK_TOOL(OBJDUMP, objdump, false)
30904 +test -z "$OBJDUMP" && OBJDUMP=objdump
30905 +_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
30906 +AC_SUBST([OBJDUMP])
30907 +])
30908 +
30909 +# _LT_DECL_DLLTOOL
30910 +# ----------------
30911 +# Ensure DLLTOOL variable is set.
30912 +m4_defun([_LT_DECL_DLLTOOL],
30913 +[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
30914 +test -z "$DLLTOOL" && DLLTOOL=dlltool
30915 +_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
30916 +AC_SUBST([DLLTOOL])
30917 +])
30918 +
30919 +# _LT_DECL_SED
30920 +# ------------
30921 +# Check for a fully-functional sed program, that truncates
30922 +# as few characters as possible. Prefer GNU sed if found.
30923 +m4_defun([_LT_DECL_SED],
30924 +[AC_PROG_SED
30925 +test -z "$SED" && SED=sed
30926 +Xsed="$SED -e 1s/^X//"
30927 +_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
30928 +_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
30929 + [Sed that helps us avoid accidentally triggering echo(1) options like -n])
30930 +])# _LT_DECL_SED
30931 +
30932 +m4_ifndef([AC_PROG_SED], [
30933 +############################################################
30934 +# NOTE: This macro has been submitted for inclusion into #
30935 +# GNU Autoconf as AC_PROG_SED. When it is available in #
30936 +# a released version of Autoconf we should remove this #
30937 +# macro and use it instead. #
30938 +############################################################
30939 +
30940 +m4_defun([AC_PROG_SED],
30941 +[AC_MSG_CHECKING([for a sed that does not truncate output])
30942 +AC_CACHE_VAL(lt_cv_path_SED,
30943 +[# Loop through the user's path and test for sed and gsed.
30944 +# Then use that list of sed's as ones to test for truncation.
30945 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30946 +for as_dir in $PATH
30947 +do
30948 + IFS=$as_save_IFS
30949 + test -z "$as_dir" && as_dir=.
30950 + for lt_ac_prog in sed gsed; do
30951 + for ac_exec_ext in '' $ac_executable_extensions; do
30952 + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
30953 + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
30954 + fi
30955 + done
30956 + done
30957 +done
30958 +IFS=$as_save_IFS
30959 +lt_ac_max=0
30960 +lt_ac_count=0
30961 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris
30962 +# along with /bin/sed that truncates output.
30963 +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
30964 + test ! -f $lt_ac_sed && continue
30965 + cat /dev/null > conftest.in
30966 + lt_ac_count=0
30967 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in
30968 + # Check for GNU sed and select it if it is found.
30969 + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
30970 + lt_cv_path_SED=$lt_ac_sed
30971 + break
30972 + fi
30973 + while true; do
30974 + cat conftest.in conftest.in >conftest.tmp
30975 + mv conftest.tmp conftest.in
30976 + cp conftest.in conftest.nl
30977 + echo >>conftest.nl
30978 + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
30979 + cmp -s conftest.out conftest.nl || break
30980 + # 10000 chars as input seems more than enough
30981 + test $lt_ac_count -gt 10 && break
30982 + lt_ac_count=`expr $lt_ac_count + 1`
30983 + if test $lt_ac_count -gt $lt_ac_max; then
30984 + lt_ac_max=$lt_ac_count
30985 + lt_cv_path_SED=$lt_ac_sed
30986 + fi
30987 + done
30988 +done
30989 +])
30990 +SED=$lt_cv_path_SED
30991 +AC_SUBST([SED])
30992 +AC_MSG_RESULT([$SED])
30993 +])#AC_PROG_SED
30994 +])#m4_ifndef
30995 +
30996 +# Old name:
30997 +AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
30998 +dnl aclocal-1.4 backwards compatibility:
30999 +dnl AC_DEFUN([LT_AC_PROG_SED], [])
31000 +
31001 +
31002 +# _LT_CHECK_SHELL_FEATURES
31003 +# ------------------------
31004 +# Find out whether the shell is Bourne or XSI compatible,
31005 +# or has some other useful features.
31006 +m4_defun([_LT_CHECK_SHELL_FEATURES],
31007 +[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
31008 +# Try some XSI features
31009 +xsi_shell=no
31010 +( _lt_dummy="a/b/c"
31011 + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
31012 + = c,a/b,b/c, \
31013 + && eval 'test $(( 1 + 1 )) -eq 2 \
31014 + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
31015 + && xsi_shell=yes
31016 +AC_MSG_RESULT([$xsi_shell])
31017 +_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
31018 +
31019 +AC_MSG_CHECKING([whether the shell understands "+="])
31020 +lt_shell_append=no
31021 +( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
31022 + >/dev/null 2>&1 \
31023 + && lt_shell_append=yes
31024 +AC_MSG_RESULT([$lt_shell_append])
31025 +_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
31026 +
31027 +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
31028 + lt_unset=unset
31029 +else
31030 + lt_unset=false
31031 +fi
31032 +_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
31033 +
31034 +# test EBCDIC or ASCII
31035 +case `echo X|tr X '\101'` in
31036 + A) # ASCII based system
31037 + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
31038 + lt_SP2NL='tr \040 \012'
31039 + lt_NL2SP='tr \015\012 \040\040'
31040 + ;;
31041 + *) # EBCDIC based system
31042 + lt_SP2NL='tr \100 \n'
31043 + lt_NL2SP='tr \r\n \100\100'
31044 + ;;
31045 +esac
31046 +_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
31047 +_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
31048 +])# _LT_CHECK_SHELL_FEATURES
31049 +
31050 +
31051 +# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
31052 +# ------------------------------------------------------
31053 +# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
31054 +# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
31055 +m4_defun([_LT_PROG_FUNCTION_REPLACE],
31056 +[dnl {
31057 +sed -e '/^$1 ()$/,/^} # $1 /c\
31058 +$1 ()\
31059 +{\
31060 +m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
31061 +} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
31062 + && mv -f "$cfgfile.tmp" "$cfgfile" \
31063 + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
31064 +test 0 -eq $? || _lt_function_replace_fail=:
31065 +])
31066 +
31067 +
31068 +# _LT_PROG_REPLACE_SHELLFNS
31069 +# -------------------------
31070 +# Replace existing portable implementations of several shell functions with
31071 +# equivalent extended shell implementations where those features are available..
31072 +m4_defun([_LT_PROG_REPLACE_SHELLFNS],
31073 +[if test x"$xsi_shell" = xyes; then
31074 + _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
31075 + case ${1} in
31076 + */*) func_dirname_result="${1%/*}${2}" ;;
31077 + * ) func_dirname_result="${3}" ;;
31078 + esac])
31079 +
31080 + _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
31081 + func_basename_result="${1##*/}"])
31082 +
31083 + _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
31084 + case ${1} in
31085 + */*) func_dirname_result="${1%/*}${2}" ;;
31086 + * ) func_dirname_result="${3}" ;;
31087 + esac
31088 + func_basename_result="${1##*/}"])
31089 +
31090 + _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
31091 + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
31092 + # positional parameters, so assign one to ordinary parameter first.
31093 + func_stripname_result=${3}
31094 + func_stripname_result=${func_stripname_result#"${1}"}
31095 + func_stripname_result=${func_stripname_result%"${2}"}])
31096 +
31097 + _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
31098 + func_split_long_opt_name=${1%%=*}
31099 + func_split_long_opt_arg=${1#*=}])
31100 +
31101 + _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
31102 + func_split_short_opt_arg=${1#??}
31103 + func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
31104 +
31105 + _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
31106 + case ${1} in
31107 + *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
31108 + *) func_lo2o_result=${1} ;;
31109 + esac])
31110 +
31111 + _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
31112 +
31113 + _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
31114 +
31115 + _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
31116 +fi
31117 +
31118 +if test x"$lt_shell_append" = xyes; then
31119 + _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
31120 +
31121 + _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
31122 + func_quote_for_eval "${2}"
31123 +dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
31124 + eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
31125 +
31126 + # Save a `func_append' function call where possible by direct use of '+='
31127 + sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
31128 + && mv -f "$cfgfile.tmp" "$cfgfile" \
31129 + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
31130 + test 0 -eq $? || _lt_function_replace_fail=:
31131 +else
31132 + # Save a `func_append' function call even when '+=' is not available
31133 + sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
31134 + && mv -f "$cfgfile.tmp" "$cfgfile" \
31135 + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
31136 + test 0 -eq $? || _lt_function_replace_fail=:
31137 +fi
31138 +
31139 +if test x"$_lt_function_replace_fail" = x":"; then
31140 + AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
31141 +fi
31142 +])
31143 +
31144 +# _LT_PATH_CONVERSION_FUNCTIONS
31145 +# -----------------------------
31146 +# Determine which file name conversion functions should be used by
31147 +# func_to_host_file (and, implicitly, by func_to_host_path). These are needed
31148 +# for certain cross-compile configurations and native mingw.
31149 +m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
31150 +[AC_REQUIRE([AC_CANONICAL_HOST])dnl
31151 +AC_REQUIRE([AC_CANONICAL_BUILD])dnl
31152 +AC_MSG_CHECKING([how to convert $build file names to $host format])
31153 +AC_CACHE_VAL(lt_cv_to_host_file_cmd,
31154 +[case $host in
31155 + *-*-mingw* )
31156 + case $build in
31157 + *-*-mingw* ) # actually msys
31158 + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
31159 + ;;
31160 + *-*-cygwin* )
31161 + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
31162 + ;;
31163 + * ) # otherwise, assume *nix
31164 + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
31165 + ;;
31166 + esac
31167 + ;;
31168 + *-*-cygwin* )
31169 + case $build in
31170 + *-*-mingw* ) # actually msys
31171 + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
31172 + ;;
31173 + *-*-cygwin* )
31174 + lt_cv_to_host_file_cmd=func_convert_file_noop
31175 + ;;
31176 + * ) # otherwise, assume *nix
31177 + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
31178 + ;;
31179 + esac
31180 + ;;
31181 + * ) # unhandled hosts (and "normal" native builds)
31182 + lt_cv_to_host_file_cmd=func_convert_file_noop
31183 + ;;
31184 +esac
31185 +])
31186 +to_host_file_cmd=$lt_cv_to_host_file_cmd
31187 +AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
31188 +_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
31189 + [0], [convert $build file names to $host format])dnl
31190 +
31191 +AC_MSG_CHECKING([how to convert $build file names to toolchain format])
31192 +AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
31193 +[#assume ordinary cross tools, or native build.
31194 +lt_cv_to_tool_file_cmd=func_convert_file_noop
31195 +case $host in
31196 + *-*-mingw* )
31197 + case $build in
31198 + *-*-mingw* ) # actually msys
31199 + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
31200 + ;;
31201 + esac
31202 + ;;
31203 +esac
31204 +])
31205 +to_tool_file_cmd=$lt_cv_to_tool_file_cmd
31206 +AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
31207 +_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
31208 + [0], [convert $build files to toolchain format])dnl
31209 +])# _LT_PATH_CONVERSION_FUNCTIONS
31210 --- /dev/null
31211 +++ b/m4/ltversion.m4
31212 @@ -0,0 +1,23 @@
31213 +# ltversion.m4 -- version numbers -*- Autoconf -*-
31214 +#
31215 +# Copyright (C) 2004 Free Software Foundation, Inc.
31216 +# Written by Scott James Remnant, 2004
31217 +#
31218 +# This file is free software; the Free Software Foundation gives
31219 +# unlimited permission to copy and/or distribute it, with or without
31220 +# modifications, as long as this notice is preserved.
31221 +
31222 +# @configure_input@
31223 +
31224 +# serial 3337 ltversion.m4
31225 +# This file is part of GNU Libtool
31226 +
31227 +m4_define([LT_PACKAGE_VERSION], [2.4.2])
31228 +m4_define([LT_PACKAGE_REVISION], [1.3337])
31229 +
31230 +AC_DEFUN([LTVERSION_VERSION],
31231 +[macro_version='2.4.2'
31232 +macro_revision='1.3337'
31233 +_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
31234 +_LT_DECL(, macro_revision, 0)
31235 +])
31236 --- /dev/null
31237 +++ b/m4/ltsugar.m4
31238 @@ -0,0 +1,123 @@
31239 +# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
31240 +#
31241 +# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
31242 +# Written by Gary V. Vaughan, 2004
31243 +#
31244 +# This file is free software; the Free Software Foundation gives
31245 +# unlimited permission to copy and/or distribute it, with or without
31246 +# modifications, as long as this notice is preserved.
31247 +
31248 +# serial 6 ltsugar.m4
31249 +
31250 +# This is to help aclocal find these macros, as it can't see m4_define.
31251 +AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
31252 +
31253 +
31254 +# lt_join(SEP, ARG1, [ARG2...])
31255 +# -----------------------------
31256 +# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
31257 +# associated separator.
31258 +# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
31259 +# versions in m4sugar had bugs.
31260 +m4_define([lt_join],
31261 +[m4_if([$#], [1], [],
31262 + [$#], [2], [[$2]],
31263 + [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
31264 +m4_define([_lt_join],
31265 +[m4_if([$#$2], [2], [],
31266 + [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
31267 +
31268 +
31269 +# lt_car(LIST)
31270 +# lt_cdr(LIST)
31271 +# ------------
31272 +# Manipulate m4 lists.
31273 +# These macros are necessary as long as will still need to support
31274 +# Autoconf-2.59 which quotes differently.
31275 +m4_define([lt_car], [[$1]])
31276 +m4_define([lt_cdr],
31277 +[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
31278 + [$#], 1, [],
31279 + [m4_dquote(m4_shift($@))])])
31280 +m4_define([lt_unquote], $1)
31281 +
31282 +
31283 +# lt_append(MACRO-NAME, STRING, [SEPARATOR])
31284 +# ------------------------------------------
31285 +# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
31286 +# Note that neither SEPARATOR nor STRING are expanded; they are appended
31287 +# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
31288 +# No SEPARATOR is output if MACRO-NAME was previously undefined (different
31289 +# than defined and empty).
31290 +#
31291 +# This macro is needed until we can rely on Autoconf 2.62, since earlier
31292 +# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
31293 +m4_define([lt_append],
31294 +[m4_define([$1],
31295 + m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
31296 +
31297 +
31298 +
31299 +# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
31300 +# ----------------------------------------------------------
31301 +# Produce a SEP delimited list of all paired combinations of elements of
31302 +# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
31303 +# has the form PREFIXmINFIXSUFFIXn.
31304 +# Needed until we can rely on m4_combine added in Autoconf 2.62.
31305 +m4_define([lt_combine],
31306 +[m4_if(m4_eval([$# > 3]), [1],
31307 + [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
31308 +[[m4_foreach([_Lt_prefix], [$2],
31309 + [m4_foreach([_Lt_suffix],
31310 + ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
31311 + [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
31312 +
31313 +
31314 +# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
31315 +# -----------------------------------------------------------------------
31316 +# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
31317 +# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
31318 +m4_define([lt_if_append_uniq],
31319 +[m4_ifdef([$1],
31320 + [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
31321 + [lt_append([$1], [$2], [$3])$4],
31322 + [$5])],
31323 + [lt_append([$1], [$2], [$3])$4])])
31324 +
31325 +
31326 +# lt_dict_add(DICT, KEY, VALUE)
31327 +# -----------------------------
31328 +m4_define([lt_dict_add],
31329 +[m4_define([$1($2)], [$3])])
31330 +
31331 +
31332 +# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
31333 +# --------------------------------------------
31334 +m4_define([lt_dict_add_subkey],
31335 +[m4_define([$1($2:$3)], [$4])])
31336 +
31337 +
31338 +# lt_dict_fetch(DICT, KEY, [SUBKEY])
31339 +# ----------------------------------
31340 +m4_define([lt_dict_fetch],
31341 +[m4_ifval([$3],
31342 + m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
31343 + m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
31344 +
31345 +
31346 +# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
31347 +# -----------------------------------------------------------------
31348 +m4_define([lt_if_dict_fetch],
31349 +[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
31350 + [$5],
31351 + [$6])])
31352 +
31353 +
31354 +# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
31355 +# --------------------------------------------------------------
31356 +m4_define([lt_dict_filter],
31357 +[m4_if([$5], [], [],
31358 + [lt_join(m4_quote(m4_default([$4], [[, ]])),
31359 + lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
31360 + [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
31361 +])
31362 --- /dev/null
31363 +++ b/m4/lt~obsolete.m4
31364 @@ -0,0 +1,98 @@
31365 +# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
31366 +#
31367 +# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
31368 +# Written by Scott James Remnant, 2004.
31369 +#
31370 +# This file is free software; the Free Software Foundation gives
31371 +# unlimited permission to copy and/or distribute it, with or without
31372 +# modifications, as long as this notice is preserved.
31373 +
31374 +# serial 5 lt~obsolete.m4
31375 +
31376 +# These exist entirely to fool aclocal when bootstrapping libtool.
31377 +#
31378 +# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
31379 +# which have later been changed to m4_define as they aren't part of the
31380 +# exported API, or moved to Autoconf or Automake where they belong.
31381 +#
31382 +# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
31383 +# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
31384 +# using a macro with the same name in our local m4/libtool.m4 it'll
31385 +# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
31386 +# and doesn't know about Autoconf macros at all.)
31387 +#
31388 +# So we provide this file, which has a silly filename so it's always
31389 +# included after everything else. This provides aclocal with the
31390 +# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
31391 +# because those macros already exist, or will be overwritten later.
31392 +# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
31393 +#
31394 +# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
31395 +# Yes, that means every name once taken will need to remain here until
31396 +# we give up compatibility with versions before 1.7, at which point
31397 +# we need to keep only those names which we still refer to.
31398 +
31399 +# This is to help aclocal find these macros, as it can't see m4_define.
31400 +AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
31401 +
31402 +m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
31403 +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
31404 +m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
31405 +m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
31406 +m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
31407 +m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
31408 +m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
31409 +m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
31410 +m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
31411 +m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
31412 +m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
31413 +m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
31414 +m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
31415 +m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
31416 +m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
31417 +m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
31418 +m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
31419 +m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
31420 +m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
31421 +m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
31422 +m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
31423 +m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
31424 +m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
31425 +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
31426 +m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
31427 +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
31428 +m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
31429 +m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
31430 +m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
31431 +m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
31432 +m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
31433 +m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
31434 +m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
31435 +m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
31436 +m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
31437 +m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
31438 +m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
31439 +m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
31440 +m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
31441 +m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
31442 +m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
31443 +m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
31444 +m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
31445 +m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
31446 +m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
31447 +m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
31448 +m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
31449 +m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
31450 +m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
31451 +m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
31452 +m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
31453 +m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
31454 +m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
31455 +m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
31456 +m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
31457 +m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
31458 +m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
31459 +m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
31460 +m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
31461 +m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
31462 +m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
+0
-71
debian/patches/02_firmware-package-builder.diff less more
0 Description: template for firmware for Spyder2 device
1 Contains template for argyll-firmware-spyder2 package that may be created
2 by end user to distribute firmware for Spyder2 to multiple Debian systems
3 Author: Roland Mas <lolando@debian.org>
4 --- /dev/null
5 +++ b/firmware-package-builder/argyll-firmware-spyder2/debian/control
6 @@ -0,0 +1,17 @@
7 +Source: argyll-firmware-spyder2
8 +Section: non-free/graphics
9 +Priority: optional
10 +Maintainer: Roland Mas <lolando@debian.org>
11 +Build-Depends: debhelper (>= 7)
12 +Standards-Version: 3.9.1
13 +
14 +Package: argyll-firmware-spyder2
15 +Architecture: all
16 +Recommends: argyll
17 +Depends: ${misc:Depends}
18 +Description: ColorVision Spyder2 firmware for Argyll
19 + Argyll is an open source, ICC compatible color management system. It
20 + can drive display calibrators such as the ColorVision Spyder2, which
21 + requires a firmware to be uploaded to the device. This package is
22 + generated from the drivers CD provided with the Spyder2, and contains
23 + the firmware ready to be used by Argyll.
24 --- /dev/null
25 +++ b/firmware-package-builder/argyll-firmware-spyder2/debian/rules
26 @@ -0,0 +1,10 @@
27 +#! /usr/bin/make -f
28 +
29 +%:
30 + dh $@
31 +
32 +override_dh_auto_build:
33 + cp /usr/local/share/color/spyd2PLD.bin .
34 +
35 +override_dh_auto_clean:
36 + rm -f spyd2PLD.bin
37 --- /dev/null
38 +++ b/firmware-package-builder/argyll-firmware-spyder2/debian/changelog
39 @@ -0,0 +1,12 @@
40 +argyll-firmware-spyder2 (1.1) unstable; urgency=low
41 +
42 + * Moved firmware to /usr/share/color, which is freedesktop.org-compliant
43 + and (more to the point) where Argyll 1.2.0 looks for it.
44 +
45 + -- Roland Mas <lolando@debian.org> Thu, 05 Aug 2010 15:32:53 +0200
46 +
47 +argyll-firmware-spyder2 (1.0) unstable; urgency=low
48 +
49 + * Package automatically generated from the Spyder2 driver CD.
50 +
51 + -- Roland Mas <lolando@debian.org> Fri, 17 Apr 2009 22:28:37 +0200
52 --- /dev/null
53 +++ b/firmware-package-builder/argyll-firmware-spyder2/debian/compat
54 @@ -0,0 +1 @@
55 +7
56 --- /dev/null
57 +++ b/firmware-package-builder/argyll-firmware-spyder2/debian/copyright
58 @@ -0,0 +1,8 @@
59 +The binary package contains the proprietary firmware for the
60 +ColorVision Spyder2 device. As such, it is not meant to be
61 +distributed.
62 +
63 +The source package itself (which builds the binary package) is
64 +Copyright 2009, Roland Mas, and can be distributed under the terms of
65 +the GNU General Public License, version 2 or (at your option) any
66 +later version published by the Free Software Foundation.
67 --- /dev/null
68 +++ b/firmware-package-builder/argyll-firmware-spyder2/debian/install
69 @@ -0,0 +1 @@
70 +spyd2PLD.bin usr/share/color
+0
-22
debian/patches/03_kfreebsd.diff less more
0 --- a/spectro/usbio.c
1 +++ b/spectro/usbio.c
2 @@ -203,10 +203,6 @@ struct _icoms *p
3 #ifdef ENABLE_USB
4 struct usb_bus *bus;
5
6 - /* Check that we've got an up to date version of libusb */
7 - if (usb_argyll_patched() < 2)
8 - error("usblib isn't up to date to work with this version of Argyll");
9 -
10 if (p->debug > 8)
11 usb_set_debug(p->debug);
12
13 @@ -738,7 +734,7 @@ char **pnames /* List of process names
14 if (libusb_get_device_descriptor(p->ppath->dev, &descriptor) != LIBUSB_SUCCESS)
15 error("Get device descriptor on USB port '%s' failed with %d (%s)",p->ppath->path,rv,libusb_strerror(rv));
16 #else
17 - descriptor = dev->descriptor; /* Copy */
18 + descriptor = p->ppath->dev->descriptor; /* Copy */
19 #endif
20
21 p->vid = p->ppath->vid;
+0
-15
debian/patches/03_usb-db.diff less more
0 Description: Use hwdb builtin, instead of the obsolete usb-db in the udev rules.
1 Author: Dmitrijs Ledkovs <dmitrij.ledkov@ubuntu.com>
2 Bug-Ubuntu: https://bugs.launchpad.net/bugs/1200185
3 Last-Update: 2014-02-03
4
5 --- a/usb/55-Argyll.rules
6 +++ b/usb/55-Argyll.rules
7 @@ -85,6 +85,6 @@ TEST=="/var/run/ConsoleKit/database", EN
8 ENV{COLOR_MEASUREMENT_DEVICE}=="*?", ENV{ACL_MANAGE}!="*?", MODE="660", GROUP="plugdev"
9
10 # Set ID_VENDOR and ID_MODEL acording to VID and PID
11 -IMPORT{program}="usb-db %p"
12 +IMPORT{builtin}="hwdb --subsystem=usb"
13
14 LABEL="argyll_rules_end"
+0
-14
debian/patches/04_CVE-2012-4405.diff less more
0 --- a/icc/icc.c
1 +++ b/icc/icc.c
2 @@ -6348,6 +6348,11 @@ static int icmLut_read(
3 p->clutPoints = read_UInt8Number(bp+10);
4
5 /* Sanity check */
6 + if (p->inputChan < 1) {
7 + sprintf(icp->err,"icmLut_read: No input channels!");
8 + return icp->errc = 1;
9 + }
10 +
11 if (p->inputChan > MAX_CHAN) {
12 sprintf(icp->err,"icmLut_read: Can't handle > %d input channels\n",MAX_CHAN);
13 return icp->errc = 1;
+0
-19
debian/patches/05_external-yajl.diff less more
0 --- a/jcnf/jcnf.c
1 +++ b/jcnf/jcnf.c
2 @@ -989,14 +989,15 @@ static jc_error jcnf_write(
3 }
4 }
5
6 +#ifdef NEVER
7 if (p->keys[i]->cpp_comment != NULL) {
8 yajl_gen_cpp_comment(g, p->keys[i]->cpp_comment, strlen(p->keys[i]->cpp_comment));
9 }
10 +
11 if (p->keys[i]->c_comment != NULL) {
12 yajl_gen_c_comment(g, p->keys[i]->c_comment, strlen(p->keys[i]->c_comment), 1);
13 }
14
15 -#ifdef NEVER
16 yajl_gen_map_open(g);
17 yajl_gen_string(g, "test", strlen("test"));
18 yajl_gen_string(g, "test value", strlen("test value"));
+0
-23
debian/patches/06_fix_udev_rule.patch less more
0 Description: Fix udev rules to actually work; ENV{ACL_MANAGE} has stopped working ages ago, and with logind it's now the "uaccess" tag.
1 Author: Martin Pitt <martin.pitt@ubuntu.com>
2 Bug-Ubuntu: https://launchpad.net/bugs/468345
3 Last-Update: 2014-02-03
4
5 --- a/usb/55-Argyll.rules
6 +++ b/usb/55-Argyll.rules
7 @@ -77,12 +77,12 @@ ATTRS{idVendor}=="04d8", ATTRS{idProduct
8 ATTRS{idVendor}=="273f", ATTRS{idProduct}=="1001", ENV{COLOR_MEASUREMENT_DEVICE}="1"
9
10
11 -# Let udev-acl manage these devices, if it's available
12 -TEST=="/var/run/ConsoleKit/database", ENV{COLOR_MEASUREMENT_DEVICE}=="*?", ENV{ACL_MANAGE}="1"
13 +# Let users access these devices
14 +ENV{COLOR_MEASUREMENT_DEVICE}=="*?", TAG+="uaccess"
15
16 # Otherwise, restrict access to members of the plugdev group,
17 # which the user may have to add to the system.
18 -ENV{COLOR_MEASUREMENT_DEVICE}=="*?", ENV{ACL_MANAGE}!="*?", MODE="660", GROUP="plugdev"
19 +ENV{COLOR_MEASUREMENT_DEVICE}=="*?", MODE="660", GROUP="plugdev"
20
21 # Set ID_VENDOR and ID_MODEL acording to VID and PID
22 IMPORT{builtin}="hwdb --subsystem=usb"
+0
-5
debian/patches/series less more
0 01_autotools-support.diff
1 02_firmware-package-builder.diff
2 03_usb-db.diff
3 04_CVE-2012-4405.diff
4 06_fix_udev_rule.patch
+0
-17
debian/pathplot.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH PLOT "1" "August 2013" "Plot device space path L in/out curve from an ICC link file, Version 1.5.1" "User Commands"
2 .SH NAME
3 Plot \- Plot device space path L in/out curve from an ICC link file.
4 .SH DESCRIPTION
5 Plot device space path L in/out curve from an ICC link file, Version 1.5.1
6 Author: Graeme W. Gill
7 usage: pathplot inprof linkprof outprof
8 .TP
9 \fB\-v\fR
10 verbose
11 .PP
12 Author: Graeme W. Gill
13 usage: pathplot inprof linkprof outprof
14 .TP
15 \fB\-v\fR
16 verbose
+0
-153
debian/printcal.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH CREATE "1" "August 2013" "Create printer calibration, Version 1.5.1" "User Commands"
2 .SH NAME
3 Create \- Create printer calibration.
4 .SH DESCRIPTION
5 Create printer calibration, Version 1.5.1
6 Author: Graeme W. Gill, licensed under the AGPL Version 3
7 .IP
8 Diagnostic: Too few arguments, got 1 expect at least 2
9 .PP
10 usage: debian/tmp/usr/bin/printcal [\-options] [prevcal] inoutfile
11 .TP
12 \fB\-v\fR verbosity
13 Verbose mode
14 .TP
15 \fB\-p\fR
16 Plot graphs.
17 .TP
18 \fB\-i\fR
19 Initial calibration, set targets, create .cal
20 .TP
21 \fB\-r\fR
22 Re\-calibrate against previous .cal and create new .cal
23 .TP
24 \fB\-e\fR
25 Verify against previous .cal
26 .TP
27 \fB\-I\fR
28 Create imitation target from .ti3 and null calibration
29 .TP
30 \fB\-d\fR
31 Go through the motions but don't write any files
32 .TP
33 \fB\-s\fR smoothing
34 Extra curve smoothing (default 1.0)
35 .HP
36 \fB\-A\fR manufacturer Set the manufacturer description string
37 .TP
38 \fB\-M\fR model
39 Set the model description string
40 .TP
41 \fB\-D\fR description
42 Set the profile Description string
43 .TP
44 \fB\-C\fR copyright
45 Set the copyright string
46 .TP
47 \fB\-x\fR# percent
48 Set initial maximum device % target (override auto)
49 .TP
50 \fB\-m\fR# percent
51 Set initial dev target to % of auto maximum
52 .TP
53 \fB\-n\fR# deltaE
54 Set initial white minimum deltaE target
55 .TP
56 \fB\-t\fR# percent
57 Set initial 50% transfer curve percentage target
58 .TP
59 # = c, r, 0
60 First channel
61 .TP
62 m, g, 1
63 Second channel
64 .TP
65 y, b, 2
66 Third channel
67 .TP
68 k,
69 3 Fourth channel, etc.
70 .TP
71 \fB\-a\fR
72 Create an Adobe Photoshop .AMP file as well as a .cal
73 .TP
74 prevcal
75 Base name of previous .cal file for recal or verify.
76 .TP
77 inoutname
78 Base name of input .ti3 file, output .cal file
79 .PP
80 Author: Graeme W. Gill, licensed under the AGPL Version 3
81 .IP
82 Diagnostic: Too few arguments, got 1 expect at least 2
83 .PP
84 usage: debian/tmp/usr/bin/printcal [\-options] [prevcal] inoutfile
85 .TP
86 \fB\-v\fR verbosity
87 Verbose mode
88 .TP
89 \fB\-p\fR
90 Plot graphs.
91 .TP
92 \fB\-i\fR
93 Initial calibration, set targets, create .cal
94 .TP
95 \fB\-r\fR
96 Re\-calibrate against previous .cal and create new .cal
97 .TP
98 \fB\-e\fR
99 Verify against previous .cal
100 .TP
101 \fB\-I\fR
102 Create imitation target from .ti3 and null calibration
103 .TP
104 \fB\-d\fR
105 Go through the motions but don't write any files
106 .TP
107 \fB\-s\fR smoothing
108 Extra curve smoothing (default 1.0)
109 .HP
110 \fB\-A\fR manufacturer Set the manufacturer description string
111 .TP
112 \fB\-M\fR model
113 Set the model description string
114 .TP
115 \fB\-D\fR description
116 Set the profile Description string
117 .TP
118 \fB\-C\fR copyright
119 Set the copyright string
120 .TP
121 \fB\-x\fR# percent
122 Set initial maximum device % target (override auto)
123 .TP
124 \fB\-m\fR# percent
125 Set initial dev target to % of auto maximum
126 .TP
127 \fB\-n\fR# deltaE
128 Set initial white minimum deltaE target
129 .TP
130 \fB\-t\fR# percent
131 Set initial 50% transfer curve percentage target
132 .TP
133 # = c, r, 0
134 First channel
135 .TP
136 m, g, 1
137 Second channel
138 .TP
139 y, b, 2
140 Third channel
141 .TP
142 k,
143 3 Fourth channel, etc.
144 .TP
145 \fB\-a\fR
146 Create an Adobe Photoshop .AMP file as well as a .cal
147 .TP
148 prevcal
149 Base name of previous .cal file for recal or verify.
150 .TP
151 inoutname
152 Base name of input .ti3 file, output .cal file
+0
-243
debian/printtarg.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH GENERATE "1" "August 2013" "Generate Target PostScrip file, Version 1.5.1" "User Commands"
2 .SH NAME
3 Generate \- Generate Target PostScrip file.
4 .SH DESCRIPTION
5 Generate Target PostScrip file, Version 1.5.1
6 Author: Graeme W. Gill, licensed under the AGPL Version 3
7 .IP
8 Diagnostic: Unknown flag
9 .PP
10 usage: printtarg [\-v] [\-i instr] [\-r] [\-s] [\-p size] basename
11 .TP
12 \fB\-v\fR
13 Verbose mode
14 .HP
15 \fB\-i\fR 20 | 22 | 41 | 51 | SS | i1 | CM Select target instrument (default DTP41)
16 .IP
17 20 = DTP20, 22 = DTP22, 41 = DTP41, 51 = DTP51,
18 SS = SpectroScan, i1 = i1Pro, CM = ColorMunki
19 .TP
20 \fB\-h\fR
21 Use hexagon patches for SS, double density for CM
22 .TP
23 \fB\-a\fR scale
24 Scale patch size and spacers by factor (e.g. 0.857 or 1.5 etc.)
25 .TP
26 \fB\-A\fR scale
27 Scale spacers by additional factor (e.g. 0.857 or 1.5 etc.)
28 .TP
29 \fB\-r\fR
30 Don't randomize patch location
31 .TP
32 \fB\-s\fR
33 Create a scan image recognition (.cht) file
34 .TP
35 \fB\-S\fR
36 Same as \fB\-s\fR, but don't generate wide orientation strip.
37 .TP
38 \fB\-c\fR
39 Force colored spacers
40 .TP
41 \fB\-b\fR
42 Force B&W spacers
43 .TP
44 \fB\-n\fR
45 Force no spacers
46 .TP
47 \fB\-f\fR
48 Create PostScript DeviceN Color fallback
49 .TP
50 \fB\-w\fR g|r|s|n
51 White colorspace encoding DeviceGray (def), DeviceRGB, Separation or DeviceN
52 .TP
53 \fB\-k\fR g|c|s|n
54 Black colorspace encoding DeviceGray (def), DeviceCMYK, Separation or DeviceN
55 .TP
56 \fB\-o\fR k|r|n
57 CMY colorspace encoding DefiveCMYK (def), inverted DeviceRGB or DeviceN
58 .TP
59 \fB\-e\fR
60 Output EPS compatible file
61 .TP
62 \fB\-t\fR [res]
63 Output 8 bit TIFF raster file, optional res DPI (default 100)
64 .TP
65 \fB\-T\fR [res]
66 Output 16 bit TIFF raster file, optional res DPI (default 100)
67 .TP
68 \fB\-C\fR
69 Don't use TIFF compression
70 .TP
71 \fB\-N\fR
72 Use TIFF alpha N channels more than 4
73 .TP
74 \fB\-D\fR
75 Dither 8 bit TIFF values down from 16 bit
76 .TP
77 \fB\-Q\fR nbits
78 Quantize test values to fit in nbits
79 .TP
80 \fB\-R\fR rsnum
81 Use given random start number
82 .TP
83 \fB\-K\fR file.cal
84 Apply printer calibration to patch values and include in .ti2
85 .TP
86 \fB\-I\fR file.cal
87 Include calibration in .ti2 (but don't apply it)
88 .TP
89 \fB\-x\fR pattern
90 Use given strip indexing pattern (Default = "A\-Z, A\-Z")
91 .TP
92 \fB\-y\fR pattern
93 Use given patch indexing pattern (Default = "0\-9,@\-9,@\-9;1\-999")
94 .TP
95 \fB\-m\fR margin
96 Set a page margin in mm (default 6.0 mm)
97 .TP
98 \fB\-M\fR margin
99 Set a page margin in mm and include it in TIFF
100 .TP
101 \fB\-P\fR
102 Don't limit strip length
103 .TP
104 \fB\-L\fR
105 Suppress any left paper clip border
106 .TP
107 \fB\-p\fR size
108 Select page size from:
109 A4 [210.0 x 297.0 mm]
110 A4R [297.0 x 210.0 mm]
111 A3 [297.0 x 420.0 mm] (default)
112 A2 [420.0 x 594.0 mm]
113 Letter [215.9 x 279.4 mm]
114 LetterR [279.4 x 215.9 mm]
115 Legal [215.9 x 355.6 mm]
116 4x6 [101.6 x 152.4 mm]
117 11x17 [279.4 x 431.8 mm]
118 .TP
119 \fB\-p\fR WWWxHHH
120 Custom size, WWW mm wide by HHH mm high
121 .TP
122 basname
123 Base name for input(.ti1), output(.ti2) and output(.ps/.eps/.tif)
124 .PP
125 Author: Graeme W. Gill, licensed under the AGPL Version 3
126 .IP
127 Diagnostic: Unknown flag
128 .PP
129 usage: printtarg [\-v] [\-i instr] [\-r] [\-s] [\-p size] basename
130 .TP
131 \fB\-v\fR
132 Verbose mode
133 .HP
134 \fB\-i\fR 20 | 22 | 41 | 51 | SS | i1 | CM Select target instrument (default DTP41)
135 .IP
136 20 = DTP20, 22 = DTP22, 41 = DTP41, 51 = DTP51,
137 SS = SpectroScan, i1 = i1Pro, CM = ColorMunki
138 .TP
139 \fB\-h\fR
140 Use hexagon patches for SS, double density for CM
141 .TP
142 \fB\-a\fR scale
143 Scale patch size and spacers by factor (e.g. 0.857 or 1.5 etc.)
144 .TP
145 \fB\-A\fR scale
146 Scale spacers by additional factor (e.g. 0.857 or 1.5 etc.)
147 .TP
148 \fB\-r\fR
149 Don't randomize patch location
150 .TP
151 \fB\-s\fR
152 Create a scan image recognition (.cht) file
153 .TP
154 \fB\-S\fR
155 Same as \fB\-s\fR, but don't generate wide orientation strip.
156 .TP
157 \fB\-c\fR
158 Force colored spacers
159 .TP
160 \fB\-b\fR
161 Force B&W spacers
162 .TP
163 \fB\-n\fR
164 Force no spacers
165 .TP
166 \fB\-f\fR
167 Create PostScript DeviceN Color fallback
168 .TP
169 \fB\-w\fR g|r|s|n
170 White colorspace encoding DeviceGray (def), DeviceRGB, Separation or DeviceN
171 .TP
172 \fB\-k\fR g|c|s|n
173 Black colorspace encoding DeviceGray (def), DeviceCMYK, Separation or DeviceN
174 .TP
175 \fB\-o\fR k|r|n
176 CMY colorspace encoding DefiveCMYK (def), inverted DeviceRGB or DeviceN
177 .TP
178 \fB\-e\fR
179 Output EPS compatible file
180 .TP
181 \fB\-t\fR [res]
182 Output 8 bit TIFF raster file, optional res DPI (default 100)
183 .TP
184 \fB\-T\fR [res]
185 Output 16 bit TIFF raster file, optional res DPI (default 100)
186 .TP
187 \fB\-C\fR
188 Don't use TIFF compression
189 .TP
190 \fB\-N\fR
191 Use TIFF alpha N channels more than 4
192 .TP
193 \fB\-D\fR
194 Dither 8 bit TIFF values down from 16 bit
195 .TP
196 \fB\-Q\fR nbits
197 Quantize test values to fit in nbits
198 .TP
199 \fB\-R\fR rsnum
200 Use given random start number
201 .TP
202 \fB\-K\fR file.cal
203 Apply printer calibration to patch values and include in .ti2
204 .TP
205 \fB\-I\fR file.cal
206 Include calibration in .ti2 (but don't apply it)
207 .TP
208 \fB\-x\fR pattern
209 Use given strip indexing pattern (Default = "A\-Z, A\-Z")
210 .TP
211 \fB\-y\fR pattern
212 Use given patch indexing pattern (Default = "0\-9,@\-9,@\-9;1\-999")
213 .TP
214 \fB\-m\fR margin
215 Set a page margin in mm (default 6.0 mm)
216 .TP
217 \fB\-M\fR margin
218 Set a page margin in mm and include it in TIFF
219 .TP
220 \fB\-P\fR
221 Don't limit strip length
222 .TP
223 \fB\-L\fR
224 Suppress any left paper clip border
225 .TP
226 \fB\-p\fR size
227 Select page size from:
228 A4 [210.0 x 297.0 mm]
229 A4R [297.0 x 210.0 mm]
230 A3 [297.0 x 420.0 mm] (default)
231 A2 [420.0 x 594.0 mm]
232 Letter [215.9 x 279.4 mm]
233 LetterR [279.4 x 215.9 mm]
234 Legal [215.9 x 355.6 mm]
235 4x6 [101.6 x 152.4 mm]
236 11x17 [279.4 x 431.8 mm]
237 .TP
238 \fB\-p\fR WWWxHHH
239 Custom size, WWW mm wide by HHH mm high
240 .TP
241 basname
242 Base name for input(.ti1), output(.ti2) and output(.ps/.eps/.tif)
+0
-115
debian/profcheck.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH CHECK "1" "August 2013" "Check accuracy of ICC profile, Version 1.5.1" "User Commands"
2 .SH NAME
3 Check \- Check accuracy of ICC profile.
4 .SH DESCRIPTION
5 Check accuracy of ICC profile, Version 1.5.1
6 Author: Graeme W. Gill, licensed under the AGPL Version 3
7 usage: profcheck [\-options] data.ti3 iccprofile.icm
8 .TP
9 \fB\-v\fR [level]
10 Verbosity level (default 1), 2 to print each DE
11 .TP
12 \fB\-c\fR
13 Show CIE94 delta E values
14 .TP
15 \fB\-k\fR
16 Show CIEDE2000 delta E values
17 .TP
18 \fB\-w\fR
19 create VRML visualisation (iccprofile.wrl)
20 .TP
21 \fB\-x\fR
22 Use VRML axes
23 .TP
24 \fB\-m\fR
25 Make VRML lines a minimum of 0.5
26 .TP
27 \fB\-e\fR
28 Color vectors acording to delta E
29 .HP
30 \fB\-d\fR devval1,deval2,devvalN
31 .IP
32 Specify a device value to sort against
33 .TP
34 \fB\-p\fR
35 Sort device value by PCS (Lab) target
36 .TP
37 \fB\-f\fR [illum]
38 Use Fluorescent Whitening Agent compensation [opt. simulated inst. illum.:
39 .IP
40 M0, M1, M2, A, C, D50 (def.), D50M2, D65, F5, F8, F10 or file.sp]
41 .TP
42 \fB\-i\fR illum
43 Choose illuminant for computation of CIE XYZ from spectral data & FWA:
44 .IP
45 A, C, D50 (def.), D50M2, D65, F5, F8, F10 or file.sp
46 .TP
47 \fB\-o\fR observ
48 Choose CIE Observer for spectral data:
49 .IP
50 1931_2 (def), 1964_10, S&B 1955_2, shaw, J&V 1978_2
51 .TP
52 \fB\-I\fR intent
53 r = relative colorimetric, a = absolute (default)
54 .TP
55 data.ti3
56 Test data file
57 .TP
58 iccprofile.icm
59 Profile to check against
60 .PP
61 Author: Graeme W. Gill, licensed under the AGPL Version 3
62 usage: profcheck [\-options] data.ti3 iccprofile.icm
63 .TP
64 \fB\-v\fR [level]
65 Verbosity level (default 1), 2 to print each DE
66 .TP
67 \fB\-c\fR
68 Show CIE94 delta E values
69 .TP
70 \fB\-k\fR
71 Show CIEDE2000 delta E values
72 .TP
73 \fB\-w\fR
74 create VRML visualisation (iccprofile.wrl)
75 .TP
76 \fB\-x\fR
77 Use VRML axes
78 .TP
79 \fB\-m\fR
80 Make VRML lines a minimum of 0.5
81 .TP
82 \fB\-e\fR
83 Color vectors acording to delta E
84 .HP
85 \fB\-d\fR devval1,deval2,devvalN
86 .IP
87 Specify a device value to sort against
88 .TP
89 \fB\-p\fR
90 Sort device value by PCS (Lab) target
91 .TP
92 \fB\-f\fR [illum]
93 Use Fluorescent Whitening Agent compensation [opt. simulated inst. illum.:
94 .IP
95 M0, M1, M2, A, C, D50 (def.), D50M2, D65, F5, F8, F10 or file.sp]
96 .TP
97 \fB\-i\fR illum
98 Choose illuminant for computation of CIE XYZ from spectral data & FWA:
99 .IP
100 A, C, D50 (def.), D50M2, D65, F5, F8, F10 or file.sp
101 .TP
102 \fB\-o\fR observ
103 Choose CIE Observer for spectral data:
104 .IP
105 1931_2 (def), 1964_10, S&B 1955_2, shaw, J&V 1978_2
106 .TP
107 \fB\-I\fR intent
108 r = relative colorimetric, a = absolute (default)
109 .TP
110 data.ti3
111 Test data file
112 .TP
113 iccprofile.icm
114 Profile to check against
+0
-109
debian/refine.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH CREATE "1" "August 2013" "Create abstract correction profile given table of absolute CIE correction values, Version 1.5.1" "User Commands"
2 .SH NAME
3 Create \- Create abstract correction profile given table of absolute CIE correction values.
4 .SH DESCRIPTION
5 Create abstract correction profile given table of absolute CIE correction values, Version 1.5.1
6 Author: Graeme W. Gill, licensed under the AGPL Version 3
7 Diagnostic: Too few arguments
8 usage: refine [\-options] cietarget ciecurrent [outdevicc] [inabs] outabs
9 .TP
10 \fB\-v\fR
11 Verbose
12 .TP
13 \fB\-c\fR
14 Create initial abstract correction profile
15 .TP
16 \fB\-g\fR
17 Don't impose output device gamut limit
18 .TP
19 \fB\-r\fR res
20 Set abstract profile clut resolution (default 33)
21 .TP
22 \fB\-d\fR factor
23 Override default damping factor (default 0.950000, then 0.700000)
24 .TP
25 \fB\-R\fR
26 Aim for white point relative match rather than absolute
27 .TP
28 \fB\-f\fR [illum]
29 Use Fluorescent Whitening Agent compensation [opt. simulated inst. illum.:
30 .IP
31 M0, M1, M2, A, C, D50 (def.), D50M2, D65, F5, F8, F10 or file.sp]
32 .TP
33 \fB\-i\fR illum
34 Choose illuminant for computation of CIE XYZ from spectral data & FWA:
35 .IP
36 A, C, D50 (def.), D50M2, D65, F5, F8, F10 or file.sp
37 .TP
38 \fB\-o\fR observ
39 Choose CIE Observer for spectral data:
40 .IP
41 1931_2 (def), 1964_10, S&B 1955_2, shaw, J&V 1978_2
42 .TP
43 cietarget
44 Target CIE or spectral values, CGATS file (e.g. .ti3)
45 .TP
46 ciecurrent
47 Actual CIE or spectral values, CGATS file (e.g. .ti3)
48 .TP
49 [outdevicc]
50 Output device ICC profile to set gamut limit (not used if \fB\-g\fR)
51 .TP
52 [inabs]
53 Previous abstract correction ICC profile (not used if \fB\-c\fR)
54 .TP
55 outabs
56 Created/refined abstract correction ICC profile
57 .PP
58 Author: Graeme W. Gill, licensed under the AGPL Version 3
59 Diagnostic: Too few arguments
60 usage: refine [\-options] cietarget ciecurrent [outdevicc] [inabs] outabs
61 .TP
62 \fB\-v\fR
63 Verbose
64 .TP
65 \fB\-c\fR
66 Create initial abstract correction profile
67 .TP
68 \fB\-g\fR
69 Don't impose output device gamut limit
70 .TP
71 \fB\-r\fR res
72 Set abstract profile clut resolution (default 33)
73 .TP
74 \fB\-d\fR factor
75 Override default damping factor (default 0.950000, then 0.700000)
76 .TP
77 \fB\-R\fR
78 Aim for white point relative match rather than absolute
79 .TP
80 \fB\-f\fR [illum]
81 Use Fluorescent Whitening Agent compensation [opt. simulated inst. illum.:
82 .IP
83 M0, M1, M2, A, C, D50 (def.), D50M2, D65, F5, F8, F10 or file.sp]
84 .TP
85 \fB\-i\fR illum
86 Choose illuminant for computation of CIE XYZ from spectral data & FWA:
87 .IP
88 A, C, D50 (def.), D50M2, D65, F5, F8, F10 or file.sp
89 .TP
90 \fB\-o\fR observ
91 Choose CIE Observer for spectral data:
92 .IP
93 1931_2 (def), 1964_10, S&B 1955_2, shaw, J&V 1978_2
94 .TP
95 cietarget
96 Target CIE or spectral values, CGATS file (e.g. .ti3)
97 .TP
98 ciecurrent
99 Actual CIE or spectral values, CGATS file (e.g. .ti3)
100 .TP
101 [outdevicc]
102 Output device ICC profile to set gamut limit (not used if \fB\-g\fR)
103 .TP
104 [inabs]
105 Previous abstract correction ICC profile (not used if \fB\-c\fR)
106 .TP
107 outabs
108 Created/refined abstract correction ICC profile
+0
-91
debian/revfix.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH INVERT "1" "August 2013" "Invert AtoB1 to make BtoA1 for CMYK profiles, Version 1.5.1" "User Commands"
2 .SH NAME
3 Invert \- Invert AtoB1 to make BtoA1 for CMYK profiles.
4 .SH DESCRIPTION
5 Invert AtoB1 to make BtoA1 for CMYK profiles, Version 1.5.1
6 Author: Graeme W. Gill, licensed under the AGPL Version 3
7 usage: revfix [\-options] iccin iccout
8 .TP
9 \fB\-v\fR
10 Verbose
11 .TP
12 \fB\-0\fR
13 Process perceptual
14 .TP
15 \fB\-1\fR
16 Process absolute/relative colorimetric
17 .TP
18 \fB\-2\fR
19 Process saturation
20 .TP
21 \fB\-r\fR res
22 Override BtoA1 Clut res
23 .TP
24 \fB\-k\fR [ezhxr]
25 e = same K as existing BtoA table (def)
26 z = zero, h = 0.5 K, x = max K, r = ramp K
27 .HP
28 \fB\-k\fR p stle stpo enle enpo shape
29 .IP
30 p = curve parameters
31 stle: K level at White 0.0 \- 1.0
32 stpo: start point of transition Wh 0.0 \- Bk 1.0
33 enpo: End point of transition Wh 0.0 \- Bk 1.0
34 enle: K level at Black 0.0 \- 1.0
35 shape: 1.0 = straight, 0.0\-1.0 concave, 1.0\-2.0 convex
36 .TP
37 \fB\-K\fR parameters
38 Same as \fB\-k\fR, but target is K locus rather than K value itself
39 .TP
40 \fB\-l\fR tlimit
41 set total ink limit, 0 \- 400% (estimate by default)
42 .TP
43 \fB\-L\fR klimit
44 set black ink limit, 0 \- 100% (estimate by default)
45 .TP
46 \fB\-p\fR absprof
47 Include abstract profile in output tables
48 .PP
49 Author: Graeme W. Gill, licensed under the AGPL Version 3
50 usage: revfix [\-options] iccin iccout
51 .TP
52 \fB\-v\fR
53 Verbose
54 .TP
55 \fB\-0\fR
56 Process perceptual
57 .TP
58 \fB\-1\fR
59 Process absolute/relative colorimetric
60 .TP
61 \fB\-2\fR
62 Process saturation
63 .TP
64 \fB\-r\fR res
65 Override BtoA1 Clut res
66 .TP
67 \fB\-k\fR [ezhxr]
68 e = same K as existing BtoA table (def)
69 z = zero, h = 0.5 K, x = max K, r = ramp K
70 .HP
71 \fB\-k\fR p stle stpo enle enpo shape
72 .IP
73 p = curve parameters
74 stle: K level at White 0.0 \- 1.0
75 stpo: start point of transition Wh 0.0 \- Bk 1.0
76 enpo: End point of transition Wh 0.0 \- Bk 1.0
77 enle: K level at Black 0.0 \- 1.0
78 shape: 1.0 = straight, 0.0\-1.0 concave, 1.0\-2.0 convex
79 .TP
80 \fB\-K\fR parameters
81 Same as \fB\-k\fR, but target is K locus rather than K value itself
82 .TP
83 \fB\-l\fR tlimit
84 set total ink limit, 0 \- 400% (estimate by default)
85 .TP
86 \fB\-L\fR klimit
87 set black ink limit, 0 \- 100% (estimate by default)
88 .TP
89 \fB\-p\fR absprof
90 Include abstract profile in output tables
+0
-125
debian/rules less more
0 #!/usr/bin/make -f
1
2 export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed -Wl,--no-undefined
3
4 ####CC:=ccache $(CC)
5
6 %:
7 dh $@ --with quilt,autoreconf
8
9 # Doesn't work for now.
10 #--parallel
11
12 override_dh_auto_configure:
13 chmod +x ./configure
14
15 dh_auto_configure -- \
16 CC="$(CC)"
17
18 override_dh_autoreconf:
19 dh_autoreconf --as-needed
20
21 override_dh_auto_clean:
22 dh_clean imdi/imdi_k.c ref/RefMediumGamut.gam \
23 libusb/Makefile libusb/config.h libusb/config.log libusb/usb.h \
24 libusb/config.status libusb/doc/Makefile libusb/libtool \
25 libusb/libusb-config libusb/libusb.pc libusb/stamp-h1 \
26 libusb/tests/Makefile firmware-package-builder/*.tar.gz
27
28 [ ! $(shell grep jam Makefile) ] || rm Makefile
29
30 [ ! -f Makefile ] || $(MAKE) distclean
31
32 find -name Makefile.in | xargs -r rm
33
34 override_dh_auto_install: firmware-package-builder/spyder2.tar.gz
35 $(MAKE) install -i DESTDIR=$(CURDIR)/debian/tmp
36 $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
37
38 rm debian/tmp/usr/share/doc/argyll/DocLicense.txt
39 rm debian/tmp/usr/share/doc/argyll/License.txt
40
41 -rm `find $(CURDIR)/debian/tmp -name '*.la'`
42
43 override_dh_install:
44 dh_install -X.a -X.la --fail-missing
45
46 # for i in $$(cat debian/libicc2.install debian/libicc-dev.install) ; do rm -f $(CURDIR)/debian/argyll/$$i ; done
47 # rm $(CURDIR)/debian/argyll/usr/share/doc/argyll/License.txt $(CURDIR)/debian/argyll/usr/share/doc/argyll/DocLicense.txt
48 # for i in average refine targen verify ; do mv $(CURDIR)/debian/argyll/usr/bin/$$i $(CURDIR)/debian/argyll/usr/bin/argyll-$$i ; done
49
50 override_dh_installchangelogs:
51 dh_installchangelogs log.txt
52
53 LIBICC_VERSION=$(shell awk -F= '/^LIBICC_VERSION=/ { print $$2 }' icc/Makefile.am)
54 ARGYLL_VERSION=$(shell dpkg-parsechangelog | awk '/^Version:/ { print $$2 }')
55
56 override_dh_gencontrol:
57 dh_gencontrol -plibicc2 -- -v$(LIBICC_VERSION)+argyll$(ARGYLL_VERSION)
58 dh_gencontrol -plibicc-dev -- -v$(LIBICC_VERSION)+argyll$(ARGYLL_VERSION)
59 dh_gencontrol --remaining-packages
60
61 #build: firmware-package-builder/spyder2.tar.gz
62
63 firmware-package-builder/%.tar.gz: firmware-package-builder/argyll-firmware-%
64 chmod +x $</debian/rules
65 tar cfCz $@ firmware-package-builder $(notdir $<)
66
67 override_dh_strip:
68 dh_strip --dbg-package=argyll-dbg
69
70 override_dh_makeshlibs:
71 dh_makeshlibs -- -c4
72
73 override_dh_builddeb:
74 dh_builddeb -- -Zbzip2
75
76 build-manpages:
77 help2man -N --no-discard-stderr --name="Dump an ICC file in human readable form." debian/tmp/usr/bin/iccdump > debian/iccdump.1
78 help2man -N --no-discard-stderr --name="Translate colors through an ICC profile." debian/tmp/usr/bin/icclu > debian/icclu.1
79 help2man -N --no-discard-stderr --name="Apply device calibration to an ICC profile." debian/tmp/usr/bin/applycal > debian/applycal.1
80 help2man -N --no-discard-stderr --name="Average or merge values in .ti3 like files." debian/tmp/usr/bin/average > debian/average.1
81 help2man -N --no-discard-stderr --name="Convert Colorblind raw device profile data to Argyll data." debian/tmp/usr/bin/cb2ti3 > debian/cb2ti3.1
82 help2man -N --no-discard-stderr --name="Color Correct a TIFF file using any sequence of ICC profiles or Calibrations." debian/tmp/usr/bin/cctiff > debian/cctiff.1
83 help2man -N --no-discard-stderr --name="Plot spectrum and calculate CCT and VCT." debian/tmp/usr/bin/ccttest > debian/ccttest.1
84 help2man -N --no-discard-stderr --name="Create CCMX or CCSS." debian/tmp/usr/bin/ccxxmake > debian/ccxxmake.1
85 help2man -N --no-discard-stderr --name="Read Target Test Chart." debian/tmp/usr/bin/chartread > debian/chartread.1
86 help2man -N --no-discard-stderr --name="Link ICC profiles." debian/tmp/usr/bin/collink > debian/collink.1
87 help2man -N --no-discard-stderr --name="Create ICC profile." debian/tmp/usr/bin/colprof > debian/colprof.1
88 help2man -N --no-discard-stderr --name="Calibrate a Display." debian/tmp/usr/bin/dispcal > debian/dispcal.1
89 help2man -N --no-discard-stderr --name="Read a Display." debian/tmp/usr/bin/dispread > debian/dispread.1
90 help2man -N --no-discard-stderr --name="Test display patch window, Set Video LUTs, Install profiles." debian/tmp/usr/bin/dispwin > debian/dispwin.1
91 help2man -N --no-discard-stderr --name="Extract an ICC profile from a TIFF file." debian/tmp/usr/bin/extracticc > debian/extracticc.1
92 help2man -N --no-discard-stderr --name="Extract a text tag from an ICC profile." debian/tmp/usr/bin/extractttag > debian/extractttag.1
93 help2man -N --no-discard-stderr --name="Create a fake CMY data file from a CMYK profile." debian/tmp/usr/bin/fakeCMY > debian/fakeCMY.1
94 help2man -N --no-discard-stderr --name="Fake test chart reader - lookup values in ICC/MPP profile." debian/tmp/usr/bin/fakeread > debian/fakeread.1
95 help2man -N --no-discard-stderr --name="Convert a TIFF file to monochrome using an ICC device profile." debian/tmp/usr/bin/greytiff > debian/greytiff.1
96 help2man -N --no-discard-stderr --name="Dump an ICC file in human readable form." debian/tmp/usr/bin/iccdump > debian/iccdump.1
97 help2man -N --no-discard-stderr --name="Create Lab/Jab gamut plot." debian/tmp/usr/bin/iccgamut > debian/iccgamut.1
98 help2man -N --no-discard-stderr --name="Measure an illuminant." debian/tmp/usr/bin/illumread > debian/illumread.1
99 help2man -N --no-discard-stderr --name="Check fwd to bwd relative transfer of an ICC file." debian/tmp/usr/bin/invprofcheck > debian/invprofcheck.1
100 help2man -N --no-discard-stderr --name="Convert Kodak raw printer profile data to Argyll print data." debian/tmp/usr/bin/kodak2ti3 > debian/kodak2ti3.1
101 help2man -N --no-discard-stderr --name="Check Model Printer Profile." debian/tmp/usr/bin/mppcheck > debian/mppcheck.1
102 help2man -N --no-discard-stderr --name="Translate colors through an MPP profile." debian/tmp/usr/bin/mpplu > debian/mpplu.1
103 help2man -N --no-discard-stderr --name="Create Model Printer Profile." debian/tmp/usr/bin/mppprof > debian/mppprof.1
104 help2man -N --no-discard-stderr --name="Plot device space path L in/out curve from an ICC link file." debian/tmp/usr/bin/pathplot > debian/pathplot.1
105 help2man -N --no-discard-stderr --name="Create printer calibration." debian/tmp/usr/bin/printcal > debian/printcal.1
106 help2man -N --no-discard-stderr --name="Generate Target PostScrip file." debian/tmp/usr/bin/printtarg > debian/printtarg.1
107 help2man -N --no-discard-stderr --name="Check accuracy of ICC profile." debian/tmp/usr/bin/profcheck > debian/profcheck.1
108 help2man -N --no-discard-stderr --name="Create abstract correction profile given table of absolute CIE correction values." debian/tmp/usr/bin/refine > debian/refine.1
109 help2man -N --no-discard-stderr --name="Invert AtoB1 to make BtoA1 for CMYK profiles." debian/tmp/usr/bin/revfix > debian/revfix.1
110 help2man -N --no-discard-stderr --name="Scanin." debian/tmp/usr/bin/scanin > debian/scanin.1
111 help2man -N --no-discard-stderr --name="Create Simple CMYK Device Profile." debian/tmp/usr/bin/simpprof > debian/simpprof.1
112 help2man -N --no-discard-stderr --name="Convert spectral .ti3 file." debian/tmp/usr/bin/spec2cie > debian/spec2cie.1
113 help2man -N --no-discard-stderr --name="Plot spectrum and calculate CCT and VCT." debian/tmp/usr/bin/specplot > debian/specplot.1
114 help2man -N --no-discard-stderr --name="Split a .ti3 into two." debian/tmp/usr/bin/splitti3 > debian/splitti3.1
115 help2man -N --no-discard-stderr --name="Read Print Spot values." debian/tmp/usr/bin/spotread > debian/spotread.1
116 help2man -N --no-discard-stderr --name="Create a synthetic calibration file." debian/tmp/usr/bin/synthcal > debian/synthcal.1
117 help2man -N --no-discard-stderr --name="Synthetic device model test chart reader." debian/tmp/usr/bin/synthread > debian/synthread.1
118 help2man -N --no-discard-stderr --name="Generate Target deviceb test chart color values." debian/tmp/usr/bin/targen > debian/targen.1
119 help2man -N --no-discard-stderr --name="Create VRML image of the gamut surface of a TIFF." debian/tmp/usr/bin/tiffgamut > debian/tiffgamut.1
120 help2man -N --no-discard-stderr --name="Convert Gretag/Logo or X-Rite ColorPport raw RGB or CMYK device profile data to Argyll CGATS data." debian/tmp/usr/bin/txt2ti3 > debian/txt2ti3.1
121 help2man -N --no-discard-stderr --name="Verify CIE values." debian/tmp/usr/bin/verify > debian/verify.1
122 help2man -N --no-discard-stderr --name="View gamuts." debian/tmp/usr/bin/viewgam > debian/viewgam.1
123 help2man -N --no-discard-stderr --name="Translate colors through an xicc." debian/tmp/usr/bin/xicclu > debian/xicclu.1
124 help2man -N --no-discard-stderr --name="List information about the FILEs." debian/tmp/usr/bin/oeminst > debian/oeminst.1
+0
-215
debian/scanin.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH SCANIN, "1" "August 2013" "Scanin, Version 1.5.1" "User Commands"
2 .SH NAME
3 Scanin, \- Scanin.
4 .SH DESCRIPTION
5 Scanin, Version 1.5.1
6 Author: Graeme W. Gill, licensed under the AGPL Version 3
7 .PP
8 usage: scanin [options] input.tif recogin.cht valin.cie [diag.tif]
9 .IP
10 :\- inputs 'input.tif' and outputs scanner 'input.ti3', or
11 .PP
12 usage: scanin \fB\-g\fR [options] input.tif recogout.cht [diag.tif]
13 .IP
14 :\- outputs file 'recogout.cht', or
15 .PP
16 usage: scanin \fB\-o\fR [options] input.tif recogin.cht [diag.tif]
17 .IP
18 :\- outputs file 'input.val', or
19 .PP
20 usage: scanin \fB\-c\fR [options] input.tif recogin.cht scanprofile.[icc|mpp] pbase [diag.tif]
21 .IP
22 :\- inputs pbase.ti2 and outputs printer pbase.ti3, or
23 .PP
24 usage: scanin \fB\-r\fR [options] input.tif recogin.cht pbase [diag.tif]
25 .IP
26 :\- inputs pbase.ti2+.ti3 and outputs pbase.ti3
27 .TP
28 \fB\-g\fR
29 Generate a chart reference (.cht) file
30 .TP
31 \fB\-o\fR
32 Output patch values in .val file
33 .TP
34 \fB\-c\fR
35 Use image to measure color to convert printer pbase .ti2 to .ti3
36 .TP
37 \fB\-ca\fR
38 Same as \fB\-c\fR, but accumulates more values to pbase .ti3
39 from subsequent pages
40 .TP
41 \fB\-r\fR
42 Replace device values in pbase .ti2/.ti3
43 Default is to create a scanner .ti3 file
44 .TP
45 \fB\-F\fR x1,y1,x2,y2,x3,y3,x4,y4
46 Don't auto recognize, locate using four fiducual marks
47 .TP
48 \fB\-p\fR
49 Compensate for perspective distortion
50 .TP
51 \fB\-a\fR
52 Recognise chart in normal orientation only (\fB\-A\fR fallback as is)
53 Default is to recognise all possible chart angles
54 .TP
55 \fB\-m\fR
56 Return true mean (default is robust mean)
57 .TP
58 \fB\-G\fR gamma
59 Approximate gamma encoding of image
60 .TP
61 \fB\-v\fR [n]
62 Verbosity level 0\-9
63 .TP
64 \fB\-d\fR [ihvglLIcrsonap]
65 Generate diagnostic output (try \fB\-dipn\fR)
66 .TP
67 i
68 diag \- B&W of input image
69 .TP
70 h
71 diag \- Horizontal edge/tick detection
72 .TP
73 v
74 diag \- Vertical edge/tick detection
75 .TP
76 g
77 diag \- Groups detected
78 .TP
79 l
80 diag \- Lines detected
81 .TP
82 L
83 diag \- All lines detected
84 .TP
85 I
86 diag \- lines used to improve fit
87 .TP
88 c
89 diag \- lines perspective corrected
90 .TP
91 r
92 diag \- lines rotated
93 .TP
94 s
95 diag \- diagnostic sample boxes rotated
96 .TP
97 o
98 diag \- sample box outlines
99 .TP
100 n
101 diag \- sample box names
102 .TP
103 a
104 diag \- sample box areas
105 .TP
106 p
107 diag \- pixel areas sampled
108 .HP
109 \fB\-O\fR outputfile Override the default output filename & extension.
110 .PP
111 Author: Graeme W. Gill, licensed under the AGPL Version 3
112 .PP
113 usage: scanin [options] input.tif recogin.cht valin.cie [diag.tif]
114 .IP
115 :\- inputs 'input.tif' and outputs scanner 'input.ti3', or
116 .PP
117 usage: scanin \fB\-g\fR [options] input.tif recogout.cht [diag.tif]
118 .IP
119 :\- outputs file 'recogout.cht', or
120 .PP
121 usage: scanin \fB\-o\fR [options] input.tif recogin.cht [diag.tif]
122 .IP
123 :\- outputs file 'input.val', or
124 .PP
125 usage: scanin \fB\-c\fR [options] input.tif recogin.cht scanprofile.[icc|mpp] pbase [diag.tif]
126 .IP
127 :\- inputs pbase.ti2 and outputs printer pbase.ti3, or
128 .PP
129 usage: scanin \fB\-r\fR [options] input.tif recogin.cht pbase [diag.tif]
130 .IP
131 :\- inputs pbase.ti2+.ti3 and outputs pbase.ti3
132 .TP
133 \fB\-g\fR
134 Generate a chart reference (.cht) file
135 .TP
136 \fB\-o\fR
137 Output patch values in .val file
138 .TP
139 \fB\-c\fR
140 Use image to measure color to convert printer pbase .ti2 to .ti3
141 .TP
142 \fB\-ca\fR
143 Same as \fB\-c\fR, but accumulates more values to pbase .ti3
144 from subsequent pages
145 .TP
146 \fB\-r\fR
147 Replace device values in pbase .ti2/.ti3
148 Default is to create a scanner .ti3 file
149 .TP
150 \fB\-F\fR x1,y1,x2,y2,x3,y3,x4,y4
151 Don't auto recognize, locate using four fiducual marks
152 .TP
153 \fB\-p\fR
154 Compensate for perspective distortion
155 .TP
156 \fB\-a\fR
157 Recognise chart in normal orientation only (\fB\-A\fR fallback as is)
158 Default is to recognise all possible chart angles
159 .TP
160 \fB\-m\fR
161 Return true mean (default is robust mean)
162 .TP
163 \fB\-G\fR gamma
164 Approximate gamma encoding of image
165 .TP
166 \fB\-v\fR [n]
167 Verbosity level 0\-9
168 .TP
169 \fB\-d\fR [ihvglLIcrsonap]
170 Generate diagnostic output (try \fB\-dipn\fR)
171 .TP
172 i
173 diag \- B&W of input image
174 .TP
175 h
176 diag \- Horizontal edge/tick detection
177 .TP
178 v
179 diag \- Vertical edge/tick detection
180 .TP
181 g
182 diag \- Groups detected
183 .TP
184 l
185 diag \- Lines detected
186 .TP
187 L
188 diag \- All lines detected
189 .TP
190 I
191 diag \- lines used to improve fit
192 .TP
193 c
194 diag \- lines perspective corrected
195 .TP
196 r
197 diag \- lines rotated
198 .TP
199 s
200 diag \- diagnostic sample boxes rotated
201 .TP
202 o
203 diag \- sample box outlines
204 .TP
205 n
206 diag \- sample box names
207 .TP
208 a
209 diag \- sample box areas
210 .TP
211 p
212 diag \- pixel areas sampled
213 .HP
214 \fB\-O\fR outputfile Override the default output filename & extension.
+0
-23
debian/simpprof.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH CREATE "1" "August 2013" "Create Simple CMYK Device Profile, Version 1.1" "User Commands"
2 .SH NAME
3 Create \- Create Simple CMYK Device Profile.
4 .SH DESCRIPTION
5 Create Simple CMYK Device Profile, Version 1.1
6 Author: Graeme W. Gill, licensed under the AGPL Version 3
7 usage: debian/tmp/usr/bin/simpprof [\-v] outfile
8 .TP
9 \fB\-v\fR
10 Verbose mode
11 .TP
12 outfile
13 Base name for input.tr3/output.pr1 file
14 .PP
15 Author: Graeme W. Gill, licensed under the AGPL Version 3
16 usage: debian/tmp/usr/bin/simpprof [\-v] outfile
17 .TP
18 \fB\-v\fR
19 Verbose mode
20 .TP
21 outfile
22 Base name for input.tr3/output.pr1 file
+0
-1
debian/source/format less more
0 3.0 (quilt)
+0
-84
debian/spec2cie.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH CONVERT "1" "August 2013" "Convert spectral .ti3 file, Version 1.5.1" "User Commands"
2 .SH NAME
3 Convert \- Convert spectral .ti3 file.
4 .SH SYNOPSIS
5 .B spec2cie
6 [\fIoptions\fR] \fIinput.ti3 output.ti3\fR
7 .SH DESCRIPTION
8 Convert spectral .ti3 file, Version 1.5.1
9 Author: Gerhard Fuernkranz, licensed under the AGPL Version 3
10 .TP
11 \fB\-v\fR
12 Verbose mode
13 .TP
14 \fB\-I\fR illum
15 Override actual instrument illuminant in .ti3 file:
16 .IP
17 A, C, D50, D50M2, D65, F5, F8, F10 or file.sp
18 (only used in conjunction with \fB\-f\fR)
19 .TP
20 \fB\-f\fR [illum]
21 Use Fluorescent Whitening Agent compensation [simulated inst. illum.:
22 .IP
23 M0, M1, M2, A, C, D50 (def.), D50M2, D65, F5, F8, F10 or file.sp]
24 .TP
25 \fB\-i\fR illum
26 Choose illuminant for computation of CIE XYZ from spectral data & FWA:
27 A, C, D50 (def.), D50M2, D65, F5, F8, F10 or file.sp
28 .TP
29 \fB\-o\fR observ
30 Choose CIE Observer for spectral data:
31 .IP
32 1931_2 (def), 1964_10, S&B 1955_2, shaw, J&V 1978_2
33 .TP
34 \fB\-n\fR
35 Don't output spectral values
36 .TP
37 \fB\-p\fR
38 Plot each values spectrum
39 .TP
40 input.ti3
41 Measurement file
42 .TP
43 output.ti3
44 Converted measurement file
45 .PP
46 Author: Gerhard Fuernkranz, licensed under the AGPL Version 3
47 .PP
48 Usage: spec2cie [options] input.ti3 output.ti3
49 .TP
50 \fB\-v\fR
51 Verbose mode
52 .TP
53 \fB\-I\fR illum
54 Override actual instrument illuminant in .ti3 file:
55 .IP
56 A, C, D50, D50M2, D65, F5, F8, F10 or file.sp
57 (only used in conjunction with \fB\-f\fR)
58 .TP
59 \fB\-f\fR [illum]
60 Use Fluorescent Whitening Agent compensation [simulated inst. illum.:
61 .IP
62 M0, M1, M2, A, C, D50 (def.), D50M2, D65, F5, F8, F10 or file.sp]
63 .TP
64 \fB\-i\fR illum
65 Choose illuminant for computation of CIE XYZ from spectral data & FWA:
66 A, C, D50 (def.), D50M2, D65, F5, F8, F10 or file.sp
67 .TP
68 \fB\-o\fR observ
69 Choose CIE Observer for spectral data:
70 .IP
71 1931_2 (def), 1964_10, S&B 1955_2, shaw, J&V 1978_2
72 .TP
73 \fB\-n\fR
74 Don't output spectral values
75 .TP
76 \fB\-p\fR
77 Plot each values spectrum
78 .TP
79 input.ti3
80 Measurement file
81 .TP
82 output.ti3
83 Converted measurement file
+0
-49
debian/specplot.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH PLOT "1" "August 2013" "Plot spectrum and calculate CCT and VCT" "User Commands"
2 .SH NAME
3 Plot \- Plot spectrum and calculate CCT and VCT.
4 .SH DESCRIPTION
5 Plot spectrum and calculate CCT and VCT
6 Author: Graeme W. Gill
7 usage: specplot [infile.sp]
8 .TP
9 \fB\-v\fR
10 verbose
11 .TP
12 \fB\-c\fR
13 combine multiple files into one plot
14 .TP
15 \fB\-z\fR
16 don't make range cover zero
17 .TP
18 \fB\-u\fR level
19 plot effect of adding estimated UV level
20 .TP
21 \fB\-U\fR
22 plot effect of adding range of estimated UV level
23 .TP
24 [infile.sp ...]
25 spectrum files to plot
26 default is all built in illuminants
27 .PP
28 Author: Graeme W. Gill
29 usage: specplot [infile.sp]
30 .TP
31 \fB\-v\fR
32 verbose
33 .TP
34 \fB\-c\fR
35 combine multiple files into one plot
36 .TP
37 \fB\-z\fR
38 don't make range cover zero
39 .TP
40 \fB\-u\fR level
41 plot effect of adding estimated UV level
42 .TP
43 \fB\-U\fR
44 plot effect of adding range of estimated UV level
45 .TP
46 [infile.sp ...]
47 spectrum files to plot
48 default is all built in illuminants
+0
-59
debian/splitti3.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH SPLIT "1" "August 2013" "Split a .ti3 into two, Version 1.5.1" "User Commands"
2 .SH NAME
3 Split \- Split a .ti3 into two.
4 .SH DESCRIPTION
5 Split a .ti3 into two, Version 1.5.1
6 Author: Graeme W. Gill, licensed under the AGPL Version 3
7 usage: splitcgats [\-options] input.ti3 output1.ti3 output2.ti3
8 .TP
9 \fB\-v\fR
10 Verbose \- print each patch value
11 .TP
12 \fB\-n\fR no
13 Put no sets in first file, and balance in second file.
14 .TP
15 \fB\-p\fR percent
16 Put percent% sets in first file, and balance in second file. (def. 50%)
17 .TP
18 \fB\-w\fR
19 Put white patches in both files.
20 .TP
21 \fB\-r\fR seed
22 Use given random seed.
23 .TP
24 input.ti3
25 File to be split up.
26 .TP
27 output1.ti3
28 First output file
29 .TP
30 output2.ti3
31 Second output file
32 .PP
33 Author: Graeme W. Gill, licensed under the AGPL Version 3
34 usage: splitcgats [\-options] input.ti3 output1.ti3 output2.ti3
35 .TP
36 \fB\-v\fR
37 Verbose \- print each patch value
38 .TP
39 \fB\-n\fR no
40 Put no sets in first file, and balance in second file.
41 .TP
42 \fB\-p\fR percent
43 Put percent% sets in first file, and balance in second file. (def. 50%)
44 .TP
45 \fB\-w\fR
46 Put white patches in both files.
47 .TP
48 \fB\-r\fR seed
49 Use given random seed.
50 .TP
51 input.ti3
52 File to be split up.
53 .TP
54 output1.ti3
55 First output file
56 .TP
57 output2.ti3
58 Second output file
+0
-235
debian/spotread.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH MEASURE "1" "August 2013" "Measure spot values, Version 1.5.1" "User Commands"
2 .SH NAME
3 Measure \- Read Print Spot values.
4 .SH DESCRIPTION
5 Measure spot values, Version 1.5.1
6 Author: Graeme W. Gill, licensed under the GPL Version 2 or later
7 Diagnostic: Flag \fB\-\-\fR not recognised
8 usage: spotread [\-options] [logfile]
9 .TP
10 \fB\-v\fR
11 Verbose mode
12 .TP
13 \fB\-s\fR
14 Print spectrum for each reading
15 .TP
16 \fB\-S\fR
17 Plot spectrum for each reading
18 .TP
19 \fB\-c\fR listno
20 Set communication port from the following list (default 1)
21 .IP
22 ** No ports found **
23 .TP
24 \fB\-t\fR
25 Use transmission measurement mode
26 .TP
27 \fB\-e\fR
28 Use emissive measurement mode (absolute results)
29 .TP
30 \fB\-eb\fR
31 Use display white brightness relative measurement mode
32 .TP
33 \fB\-ew\fR
34 Use display white relative measurement mode
35 .TP
36 \fB\-p\fR
37 Use telephoto measurement mode (absolute results)
38 .TP
39 \fB\-pb\fR
40 Use projector white brightness relative measurement mode
41 .TP
42 \fB\-pw\fR
43 Use projector white relative measurement mode
44 .TP
45 \fB\-a\fR
46 Use ambient measurement mode (absolute results)
47 .TP
48 \fB\-f\fR
49 Use ambient flash measurement mode (absolute results)
50 .TP
51 \fB\-I\fR illum
52 Set simulated instrument illumination using FWA (def \fB\-i\fR illum):
53 M0, M1, M2, A, C, D50, D50M2, D65, F5, F8, F10 or file.sp]
54 .TP
55 \fB\-i\fR illum
56 Choose illuminant for computation of CIE XYZ from spectral data & FWA:
57 A, C, D50 (def.), D50M2, D65, F5, F8, F10 or file.sp
58 .TP
59 \fB\-Q\fR observ
60 Choose CIE Observer for spectral data or CCSS instrument:
61 1931_2 (def), 1964_10, S&B 1955_2, shaw, J&V 1978_2
62 (Choose FWA during operation)
63 .TP
64 \fB\-F\fR filter
65 Set filter configuration (if aplicable):
66 .TP
67 n
68 None
69 .TP
70 p
71 Polarising filter
72 .TP
73 6
74 D65
75 .TP
76 u
77 U.V. Cut
78 .TP
79 \fB\-E\fR extrafilterfile
80 Apply extra filter compensation file
81 .TP
82 \fB\-x\fR
83 Display Yxy instead of Lab
84 .TP
85 \fB\-h\fR
86 Display LCh instead of Lab
87 .TP
88 \fB\-V\fR
89 Show running average and std. devation from ref.
90 .TP
91 \fB\-T\fR
92 Display correlated color temperatures and CRI
93 .TP
94 \fB\-N\fR
95 Disable auto calibration of instrument
96 .TP
97 \fB\-H\fR
98 Start in high resolution spectrum mode (if available)
99 .TP
100 \fB\-X\fR file.ccmx
101 Apply Colorimeter Correction Matrix
102 .TP
103 \fB\-X\fR file.ccss
104 Use Colorimeter Calibration Spectral Samples for calibration
105 .TP
106 \fB\-Y\fR r|n
107 Override refresh, non\-refresh display mode
108 .TP
109 \fB\-Y\fR A
110 Use non\-adaptive integration time mode (if available).
111 .TP
112 \fB\-W\fR n|h|x
113 Override serial port flow control: n = none, h = HW, x = Xon/Xoff
114 .TP
115 \fB\-D\fR [level]
116 Print debug diagnostics to stderr
117 .TP
118 logfile
119 Optional file to save reading results as text
120 .PP
121 Author: Graeme W. Gill, licensed under the GPL Version 2 or later
122 Diagnostic: Flag \fB\-\-\fR not recognised
123 usage: spotread [\-options] [logfile]
124 .TP
125 \fB\-v\fR
126 Verbose mode
127 .TP
128 \fB\-s\fR
129 Print spectrum for each reading
130 .TP
131 \fB\-S\fR
132 Plot spectrum for each reading
133 .TP
134 \fB\-c\fR listno
135 Set communication port from the following list (default 1)
136 .IP
137 ** No ports found **
138 .TP
139 \fB\-t\fR
140 Use transmission measurement mode
141 .TP
142 \fB\-e\fR
143 Use emissive measurement mode (absolute results)
144 .TP
145 \fB\-eb\fR
146 Use display white brightness relative measurement mode
147 .TP
148 \fB\-ew\fR
149 Use display white relative measurement mode
150 .TP
151 \fB\-p\fR
152 Use telephoto measurement mode (absolute results)
153 .TP
154 \fB\-pb\fR
155 Use projector white brightness relative measurement mode
156 .TP
157 \fB\-pw\fR
158 Use projector white relative measurement mode
159 .TP
160 \fB\-a\fR
161 Use ambient measurement mode (absolute results)
162 .TP
163 \fB\-f\fR
164 Use ambient flash measurement mode (absolute results)
165 .TP
166 \fB\-I\fR illum
167 Set simulated instrument illumination using FWA (def \fB\-i\fR illum):
168 M0, M1, M2, A, C, D50, D50M2, D65, F5, F8, F10 or file.sp]
169 .TP
170 \fB\-i\fR illum
171 Choose illuminant for computation of CIE XYZ from spectral data & FWA:
172 A, C, D50 (def.), D50M2, D65, F5, F8, F10 or file.sp
173 .TP
174 \fB\-Q\fR observ
175 Choose CIE Observer for spectral data or CCSS instrument:
176 1931_2 (def), 1964_10, S&B 1955_2, shaw, J&V 1978_2
177 (Choose FWA during operation)
178 .TP
179 \fB\-F\fR filter
180 Set filter configuration (if aplicable):
181 .TP
182 n
183 None
184 .TP
185 p
186 Polarising filter
187 .TP
188 6
189 D65
190 .TP
191 u
192 U.V. Cut
193 .TP
194 \fB\-E\fR extrafilterfile
195 Apply extra filter compensation file
196 .TP
197 \fB\-x\fR
198 Display Yxy instead of Lab
199 .TP
200 \fB\-h\fR
201 Display LCh instead of Lab
202 .TP
203 \fB\-V\fR
204 Show running average and std. devation from ref.
205 .TP
206 \fB\-T\fR
207 Display correlated color temperatures and CRI
208 .TP
209 \fB\-N\fR
210 Disable auto calibration of instrument
211 .TP
212 \fB\-H\fR
213 Start in high resolution spectrum mode (if available)
214 .TP
215 \fB\-X\fR file.ccmx
216 Apply Colorimeter Correction Matrix
217 .TP
218 \fB\-X\fR file.ccss
219 Use Colorimeter Calibration Spectral Samples for calibration
220 .TP
221 \fB\-Y\fR r|n
222 Override refresh, non\-refresh display mode
223 .TP
224 \fB\-Y\fR A
225 Use non\-adaptive integration time mode (if available).
226 .TP
227 \fB\-W\fR n|h|x
228 Override serial port flow control: n = none, h = HW, x = Xon/Xoff
229 .TP
230 \fB\-D\fR [level]
231 Print debug diagnostics to stderr
232 .TP
233 logfile
234 Optional file to save reading results as text
+0
-87
debian/synthcal.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH CREATE "1" "August 2013" "Create a synthetic calibration file, Version 1.5.1" "User Commands"
2 .SH NAME
3 Create \- Create a synthetic calibration file.
4 .SH DESCRIPTION
5 Create a synthetic calibration file, Version 1.5.1
6 Author: Graeme W. Gill, licensed under the AGPL Version 3
7 usage: synthcal [\-options] outfile
8 .TP
9 \fB\-t\fR N
10 i = input, o = output, d = display (default)
11 .TP
12 \fB\-d\fR col_comb
13 choose colorant combination from the following (default 3):
14 0: Print grey
15 1: Video grey
16 2: Print RGB
17 3: Video RGB
18 4: CMYK
19 5: CMY
20 6: CMYK + Light CM
21 7: CMYK + Light CMK
22 8: CMYK + Red + Blue
23 9: CMYK + Orange + Green
24 10: CMYK + Light CMK + Light Light K
25 11: CMYK + Orange + Green + Light CM
26 12: CMYK + Light CM + Medium CM
27 .TP
28 \fB\-D\fR colorant
29 Add or delete colorant from combination:
30 (Use \-?? to list known colorants)
31 .TP
32 \fB\-o\fR o1,o2,o3,
33 Set non\-linear curve offset (default 0.0)
34 .TP
35 \fB\-s\fR s1,s2,s3,
36 Set non\-linear curve scale (default 1.0)
37 .TP
38 \fB\-p\fR p1,p2,p3,
39 Set non\-linear curve powers (default 1.0)
40 .TP
41 \fB\-E\fR description
42 Set the profile dEscription string
43 .TP
44 outfile
45 Base name for output .cal file
46 .PP
47 Author: Graeme W. Gill, licensed under the AGPL Version 3
48 usage: synthcal [\-options] outfile
49 .TP
50 \fB\-t\fR N
51 i = input, o = output, d = display (default)
52 .TP
53 \fB\-d\fR col_comb
54 choose colorant combination from the following (default 3):
55 0: Print grey
56 1: Video grey
57 2: Print RGB
58 3: Video RGB
59 4: CMYK
60 5: CMY
61 6: CMYK + Light CM
62 7: CMYK + Light CMK
63 8: CMYK + Red + Blue
64 9: CMYK + Orange + Green
65 10: CMYK + Light CMK + Light Light K
66 11: CMYK + Orange + Green + Light CM
67 12: CMYK + Light CM + Medium CM
68 .TP
69 \fB\-D\fR colorant
70 Add or delete colorant from combination:
71 (Use \-?? to list known colorants)
72 .TP
73 \fB\-o\fR o1,o2,o3,
74 Set non\-linear curve offset (default 0.0)
75 .TP
76 \fB\-s\fR s1,s2,s3,
77 Set non\-linear curve scale (default 1.0)
78 .TP
79 \fB\-p\fR p1,p2,p3,
80 Set non\-linear curve powers (default 1.0)
81 .TP
82 \fB\-E\fR description
83 Set the profile dEscription string
84 .TP
85 outfile
86 Base name for output .cal file
+0
-85
debian/synthread.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH SYNTHETIC "1" "August 2013" "Synthetic device model test chart reader - Version 1.5.1" "User Commands"
2 .SH NAME
3 Synthetic \- Synthetic device model test chart reader.
4 .SH DESCRIPTION
5 Synthetic device model test chart reader \- Version 1.5.1
6 Author: Graeme W. Gill, licensed under the AGPL Version 3
7 Error 'Unrecognised flag'
8 usage: synthread [\-v] [\-s] [separation.icm] profile.[icc|mpp|ti3] outfile
9 .TP
10 \fB\-v\fR
11 Verbose mode
12 .TP
13 \fB\-p\fR
14 Use separation profile
15 .TP
16 \fB\-l\fR
17 Construct and output in Lab rather than XYZ
18 .TP
19 \fB\-i\fR p1,p2,p3,
20 Set input channel curve powers (default 1.0)
21 .TP
22 \fB\-k\fR x1:y1,x2:y2,x3:y2
23 Set input channel inflection points (default 0.5,0.5)
24 .TP
25 \fB\-o\fR p1,p2,p3,
26 Set output channel curve powers (default 1.0)
27 .TP
28 \fB\-r\fR level
29 Add average random deviation of <level>% to input device values (after sep.)
30 .TP
31 \fB\-R\fR level
32 Add average random deviation of <level>% to output PCS values
33 .TP
34 \fB\-u\fR
35 Make random deviations have uniform distributions rather than normal
36 .TP
37 \fB\-b\fR L,a,b
38 Scale black point to target Lab value
39 .TP
40 [separation.icm]
41 Device link separation profile
42 .IP
43 profile.[icc|mpp|ti3] ICC, MPP profile or TI3 to use
44 outfile Base name for input[ti1]/output[ti3] file
45 .PP
46 Author: Graeme W. Gill, licensed under the AGPL Version 3
47 Error 'Unrecognised flag'
48 usage: synthread [\-v] [\-s] [separation.icm] profile.[icc|mpp|ti3] outfile
49 .TP
50 \fB\-v\fR
51 Verbose mode
52 .TP
53 \fB\-p\fR
54 Use separation profile
55 .TP
56 \fB\-l\fR
57 Construct and output in Lab rather than XYZ
58 .TP
59 \fB\-i\fR p1,p2,p3,
60 Set input channel curve powers (default 1.0)
61 .TP
62 \fB\-k\fR x1:y1,x2:y2,x3:y2
63 Set input channel inflection points (default 0.5,0.5)
64 .TP
65 \fB\-o\fR p1,p2,p3,
66 Set output channel curve powers (default 1.0)
67 .TP
68 \fB\-r\fR level
69 Add average random deviation of <level>% to input device values (after sep.)
70 .TP
71 \fB\-R\fR level
72 Add average random deviation of <level>% to output PCS values
73 .TP
74 \fB\-u\fR
75 Make random deviations have uniform distributions rather than normal
76 .TP
77 \fB\-b\fR L,a,b
78 Scale black point to target Lab value
79 .TP
80 [separation.icm]
81 Device link separation profile
82 .IP
83 profile.[icc|mpp|ti3] ICC, MPP profile or TI3 to use
84 outfile Base name for input[ti1]/output[ti3] file
+0
-203
debian/targen.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH GENERATE "1" "August 2013" "Generate Target deviceb test chart color values, Version 1.5.1" "User Commands"
2 .SH NAME
3 Generate \- Generate Target deviceb test chart color values.
4 .SH DESCRIPTION
5 Generate Target deviceb test chart color values, Version 1.5.1
6 Author: Graeme W. Gill, licensed under the AGPL Version 3
7 usage: targen [options] outfile
8 .IP
9 Diagnostic: Usage requested
10 .TP
11 \fB\-v\fR [level]
12 Verbose mode [optional level 1..N]
13 .TP
14 \fB\-d\fR col_comb
15 choose colorant combination from the following:
16 0: Print grey
17 1: Video grey
18 2: Print RGB
19 3: Video RGB
20 4: CMYK
21 5: CMY
22 6: CMYK + Light CM
23 7: CMYK + Light CMK
24 8: CMYK + Red + Blue
25 9: CMYK + Orange + Green
26 10: CMYK + Light CMK + Light Light K
27 11: CMYK + Orange + Green + Light CM
28 12: CMYK + Light CM + Medium CM
29 .TP
30 \fB\-D\fR colorant
31 Add or delete colorant from combination:
32 (Use \-?? to list known colorants)
33 .TP
34 \fB\-G\fR
35 Generate good optimized points rather than Fast
36 .TP
37 \fB\-e\fR patches
38 White test patches (default 4)
39 .TP
40 \fB\-s\fR steps
41 Single channel steps (default grey 50, color 0)
42 .TP
43 \fB\-g\fR steps
44 Grey axis RGB or CMY steps (default 0)
45 .TP
46 \fB\-m\fR steps
47 Multidimensional device space cube steps (default 0)
48 .TP
49 \fB\-f\fR patches
50 Add iterative & adaptive full spread patches to total (default grey 0, color 836)
51 Default is Optimised Farthest Point Sampling (OFPS)
52 .TP
53 \fB\-t\fR
54 Use incremental far point for full spread
55 .TP
56 \fB\-r\fR
57 Use device space random for full spread
58 .TP
59 \fB\-R\fR
60 Use perceptual space random for full spread
61 .TP
62 \fB\-q\fR
63 Use device space\-filling quasi\-random for full spread
64 .TP
65 \fB\-Q\fR
66 Use perceptual space\-filling quasi\-random for full spread
67 .TP
68 \fB\-i\fR
69 Use device space body centered cubic grid for full spread
70 .TP
71 \fB\-I\fR
72 Use perceptual space body centered cubic grid for full spread
73 .TP
74 \fB\-a\fR angle
75 Simplex grid angle 0.0 \- 0.5 for B.C.C. grid, default 0.333300
76 .TP
77 \fB\-A\fR adaptation
78 Degree of adaptation of OFPS 0.0 \- 1.0 (default 0.1, \fB\-c\fR profile used 1.0)
79 .TP
80 \fB\-l\fR ilimit
81 Total ink limit in % (default = none)
82 .TP
83 \fB\-p\fR power
84 Optional power\-like value applied to all device values.
85 .TP
86 \fB\-c\fR profile
87 Optional device ICC or MPP pre\-conditioning profile filename
88 (Use "none" to turn off any conditioning)
89 .TP
90 \fB\-N\fR emphasis
91 Degree of neutral axis patch concentration 0.0\-1.0 (default 0.50)
92 .TP
93 \fB\-F\fR L,a,b,rad
94 Filter out samples outside Lab sphere.
95 .TP
96 \fB\-w\fR
97 Dump diagnostic outfilel.wrl file (Lab locations)
98 .TP
99 \fB\-W\fR
100 Dump diagnostic outfiled.wrl file (Device locations)
101 .TP
102 outfile
103 Base name for output(.ti1)
104 .PP
105 Author: Graeme W. Gill, licensed under the AGPL Version 3
106 usage: targen [options] outfile
107 .IP
108 Diagnostic: Usage requested
109 .TP
110 \fB\-v\fR [level]
111 Verbose mode [optional level 1..N]
112 .TP
113 \fB\-d\fR col_comb
114 choose colorant combination from the following:
115 0: Print grey
116 1: Video grey
117 2: Print RGB
118 3: Video RGB
119 4: CMYK
120 5: CMY
121 6: CMYK + Light CM
122 7: CMYK + Light CMK
123 8: CMYK + Red + Blue
124 9: CMYK + Orange + Green
125 10: CMYK + Light CMK + Light Light K
126 11: CMYK + Orange + Green + Light CM
127 12: CMYK + Light CM + Medium CM
128 .TP
129 \fB\-D\fR colorant
130 Add or delete colorant from combination:
131 (Use \-?? to list known colorants)
132 .TP
133 \fB\-G\fR
134 Generate good optimized points rather than Fast
135 .TP
136 \fB\-e\fR patches
137 White test patches (default 4)
138 .TP
139 \fB\-s\fR steps
140 Single channel steps (default grey 50, color 0)
141 .TP
142 \fB\-g\fR steps
143 Grey axis RGB or CMY steps (default 0)
144 .TP
145 \fB\-m\fR steps
146 Multidimensional device space cube steps (default 0)
147 .TP
148 \fB\-f\fR patches
149 Add iterative & adaptive full spread patches to total (default grey 0, color 836)
150 Default is Optimised Farthest Point Sampling (OFPS)
151 .TP
152 \fB\-t\fR
153 Use incremental far point for full spread
154 .TP
155 \fB\-r\fR
156 Use device space random for full spread
157 .TP
158 \fB\-R\fR
159 Use perceptual space random for full spread
160 .TP
161 \fB\-q\fR
162 Use device space\-filling quasi\-random for full spread
163 .TP
164 \fB\-Q\fR
165 Use perceptual space\-filling quasi\-random for full spread
166 .TP
167 \fB\-i\fR
168 Use device space body centered cubic grid for full spread
169 .TP
170 \fB\-I\fR
171 Use perceptual space body centered cubic grid for full spread
172 .TP
173 \fB\-a\fR angle
174 Simplex grid angle 0.0 \- 0.5 for B.C.C. grid, default 0.333300
175 .TP
176 \fB\-A\fR adaptation
177 Degree of adaptation of OFPS 0.0 \- 1.0 (default 0.1, \fB\-c\fR profile used 1.0)
178 .TP
179 \fB\-l\fR ilimit
180 Total ink limit in % (default = none)
181 .TP
182 \fB\-p\fR power
183 Optional power\-like value applied to all device values.
184 .TP
185 \fB\-c\fR profile
186 Optional device ICC or MPP pre\-conditioning profile filename
187 (Use "none" to turn off any conditioning)
188 .TP
189 \fB\-N\fR emphasis
190 Degree of neutral axis patch concentration 0.0\-1.0 (default 0.50)
191 .TP
192 \fB\-F\fR L,a,b,rad
193 Filter out samples outside Lab sphere.
194 .TP
195 \fB\-w\fR
196 Dump diagnostic outfilel.wrl file (Lab locations)
197 .TP
198 \fB\-W\fR
199 Dump diagnostic outfiled.wrl file (Device locations)
200 .TP
201 outfile
202 Base name for output(.ti1)
+0
-165
debian/tiffgamut.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH CREATE "1" "August 2013" "Create VRML image of the gamut surface of a TIFF or JPEG, Version 1.5.1" "User Commands"
2 .SH NAME
3 Create \- Create VRML image of the gamut surface of a TIFF.
4 .SH DESCRIPTION
5 Create VRML image of the gamut surface of a TIFF or JPEG, Version 1.5.1
6 Author: Graeme W. Gill, licensed under the AGPL Version 3
7 usage: tiffgamut [\-v level] [profile.icm | embedded.tif/jpg] infile1.tif/jpg [infile2.tif/jpg ...]
8 .TP
9 \fB\-v\fR
10 Verbose
11 .TP
12 \fB\-d\fR sres
13 Surface resolution details 1.0 \- 50.0
14 .TP
15 \fB\-w\fR
16 emit VRML .wrl file as well as CGATS .gam file
17 .TP
18 \fB\-n\fR
19 Don't add VRML axes or white/black point
20 .TP
21 \fB\-k\fR
22 Add markers for prim. & sec. "cusp" points
23 .TP
24 \fB\-f\fR perc
25 Filter by popularity, perc = percent to use
26 .TP
27 \fB\-i\fR intent
28 p = perceptual, r = relative colorimetric,
29 s = saturation, a = absolute (default), d = profile default
30 .TP
31 \fB\-p\fR oride
32 l = Lab_PCS (default), j = CIECAM02 Appearance Jab
33 .TP
34 \fB\-o\fR order
35 n = normal (priority: lut > matrix > monochrome)
36 r = reverse (priority: monochrome > matrix > lut)
37 .TP
38 \fB\-c\fR viewcond
39 set appearance mode and viewing conditions for CIECAM02,
40 either an enumerated choice, or a parameter:value changes
41 .IP
42 pp \- Practical Reflection Print (ISO\-3664 P2)
43 pe \- Print evaluation environment (CIE 116\-1995)
44 pc \- Critical print evaluation environment (ISO\-3664 P1)
45 mt \- Monitor in typical work environment
46 mb \- Bright monitor in bright work environment
47 md \- Monitor in darkened work environment
48 jm \- Projector in dim environment
49 jd \- Projector in dark environment
50 .IP
51 pcd \- Photo CD \- original scene outdoors
52 .IP
53 ob \- Original scene \- Bright Outdoors
54 cx \- Cut Sheet Transparencies on a viewing box
55 .TP
56 s:surround
57 n = auto, a = average, m = dim, d = dark,
58 c = transparency (default average)
59 .TP
60 w:X:Y:Z
61 Adapted white point as XYZ (default media white)
62 .TP
63 w:x:y
64 Adapted white point as x, y
65 .TP
66 a:adaptation
67 Adaptation luminance in cd.m^2 (default 50.0)
68 .TP
69 b:background
70 Background % of image luminance (default 20)
71 .TP
72 l:scenewhite
73 Scene white in cd.m^2 if surround = auto (default 250)
74 .TP
75 f:flare
76 Flare light % of image luminance (default 1)
77 .TP
78 f:X:Y:Z
79 Flare color as XYZ (default media white)
80 .TP
81 f:x:y
82 Flare color as x, y
83 .HP
84 \fB\-O\fR outputfile Override the default output filename.
85 .PP
86 Author: Graeme W. Gill, licensed under the AGPL Version 3
87 usage: tiffgamut [\-v level] [profile.icm | embedded.tif/jpg] infile1.tif/jpg [infile2.tif/jpg ...]
88 .TP
89 \fB\-v\fR
90 Verbose
91 .TP
92 \fB\-d\fR sres
93 Surface resolution details 1.0 \- 50.0
94 .TP
95 \fB\-w\fR
96 emit VRML .wrl file as well as CGATS .gam file
97 .TP
98 \fB\-n\fR
99 Don't add VRML axes or white/black point
100 .TP
101 \fB\-k\fR
102 Add markers for prim. & sec. "cusp" points
103 .TP
104 \fB\-f\fR perc
105 Filter by popularity, perc = percent to use
106 .TP
107 \fB\-i\fR intent
108 p = perceptual, r = relative colorimetric,
109 s = saturation, a = absolute (default), d = profile default
110 .TP
111 \fB\-p\fR oride
112 l = Lab_PCS (default), j = CIECAM02 Appearance Jab
113 .TP
114 \fB\-o\fR order
115 n = normal (priority: lut > matrix > monochrome)
116 r = reverse (priority: monochrome > matrix > lut)
117 .TP
118 \fB\-c\fR viewcond
119 set appearance mode and viewing conditions for CIECAM02,
120 either an enumerated choice, or a parameter:value changes
121 .IP
122 pp \- Practical Reflection Print (ISO\-3664 P2)
123 pe \- Print evaluation environment (CIE 116\-1995)
124 pc \- Critical print evaluation environment (ISO\-3664 P1)
125 mt \- Monitor in typical work environment
126 mb \- Bright monitor in bright work environment
127 md \- Monitor in darkened work environment
128 jm \- Projector in dim environment
129 jd \- Projector in dark environment
130 .IP
131 pcd \- Photo CD \- original scene outdoors
132 .IP
133 ob \- Original scene \- Bright Outdoors
134 cx \- Cut Sheet Transparencies on a viewing box
135 .TP
136 s:surround
137 n = auto, a = average, m = dim, d = dark,
138 c = transparency (default average)
139 .TP
140 w:X:Y:Z
141 Adapted white point as XYZ (default media white)
142 .TP
143 w:x:y
144 Adapted white point as x, y
145 .TP
146 a:adaptation
147 Adaptation luminance in cd.m^2 (default 50.0)
148 .TP
149 b:background
150 Background % of image luminance (default 20)
151 .TP
152 l:scenewhite
153 Scene white in cd.m^2 if surround = auto (default 250)
154 .TP
155 f:flare
156 Flare light % of image luminance (default 1)
157 .TP
158 f:X:Y:Z
159 Flare color as XYZ (default media white)
160 .TP
161 f:x:y
162 Flare color as x, y
163 .HP
164 \fB\-O\fR outputfile Override the default output filename.
+0
-61
debian/txt2ti3.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH CONVERT "1" "August 2013" "Convert Gretag/Logo or X-Rite ColorPport raw RGB or CMYK device profile data to Argyll CGATS data, Version 1.5.1" "User Commands"
2 .SH NAME
3 Convert \- Convert Gretag/Logo or X-Rite ColorPport raw RGB or CMYK device profile data to Argyll CGATS data.
4 .SH DESCRIPTION
5 Convert Gretag/Logo or X\-Rite ColorPport raw RGB or CMYK device profile data to Argyll CGATS data, Version 1.5.1
6 Author: Graeme W. Gill, licensed under the AGPL Version 3
7 error: Unknown flag
8 usage: txt2ti3 [\-v] [\-l limit] [devfile] infile [specfile] outfile
9 .TP
10 \fB\-2\fR
11 Create dummy .ti2 file as well
12 .TP
13 \fB\-l\fR limit
14 set ink limit, 0 \- 400% (default max in file)
15 .TP
16 \fB\-d\fR
17 Set type of device as Display, not Output
18 .TP
19 \fB\-i\fR
20 Set type of device as Input, not Output
21 .TP
22 [devfile]
23 Input Device CMYK target file (typically file.txt)
24 .TP
25 infile
26 Input CIE, Spectral or Device & Spectral file (typically file.txt)
27 .TP
28 [specfile]
29 Input Spectral file (typically file.txt)
30 .TP
31 outbasename
32 Output file basename for .ti3 and .ti2
33 .PP
34 Author: Graeme W. Gill, licensed under the AGPL Version 3
35 error: Unknown flag
36 usage: txt2ti3 [\-v] [\-l limit] [devfile] infile [specfile] outfile
37 .TP
38 \fB\-2\fR
39 Create dummy .ti2 file as well
40 .TP
41 \fB\-l\fR limit
42 set ink limit, 0 \- 400% (default max in file)
43 .TP
44 \fB\-d\fR
45 Set type of device as Display, not Output
46 .TP
47 \fB\-i\fR
48 Set type of device as Input, not Output
49 .TP
50 [devfile]
51 Input Device CMYK target file (typically file.txt)
52 .TP
53 infile
54 Input CIE, Spectral or Device & Spectral file (typically file.txt)
55 .TP
56 [specfile]
57 Input Spectral file (typically file.txt)
58 .TP
59 outbasename
60 Output file basename for .ti3 and .ti2
+0
-117
debian/verify.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH VERIFY "1" "August 2013" "Verify CIE values, Version 1.5.1" "User Commands"
2 .SH NAME
3 Verify \- Verify CIE values.
4 .SH DESCRIPTION
5 Verify CIE values, Version 1.5.1
6 Author: Graeme W. Gill, licensed under the AGPL Version 3
7 usage: verify [\-options] target.ti3 measured.ti3
8 .TP
9 \fB\-v\fR
10 Verbose \- print each patch value
11 .TP
12 \fB\-n\fR
13 Normalise each files reading to white Y
14 .TP
15 \fB\-N\fR
16 Normalise each files reading to white XYZ
17 .TP
18 \fB\-D\fR
19 Use D50 100.0 as L*a*b* white reference
20 .TP
21 \fB\-c\fR
22 Show CIE94 delta E values
23 .TP
24 \fB\-k\fR
25 Show CIEDE2000 delta E values
26 .TP
27 \fB\-s\fR
28 Sort patch values by error
29 .TP
30 \fB\-w\fR
31 create VRML vector visualisation (measured.wrl)
32 .TP
33 \fB\-W\fR
34 create VRML marker visualisation (measured.wrl)
35 .TP
36 \fB\-x\fR
37 Use VRML axes
38 .TP
39 \fB\-f\fR [illum]
40 Use Fluorescent Whitening Agent compensation [opt. simulated inst. illum.:
41 .IP
42 M0, M1, M2, A, C, D50 (def.), D50M2, D65, F5, F8, F10 or file.sp]
43 .TP
44 \fB\-i\fR illum
45 Choose illuminant for computation of CIE XYZ from spectral data & FWA:
46 .IP
47 A, C, D50 (def.), D50M2, D65, F5, F8, F10 or file.sp
48 .TP
49 \fB\-o\fR observ
50 Choose CIE Observer for spectral data:
51 1931_2 (def), 1964_10, S&B 1955_2, shaw, J&V 1978_2
52 .TP
53 \fB\-X\fR file.ccmx
54 Apply Colorimeter Correction Matrix to second file
55 .TP
56 target.ti3
57 Target (reference) PCS or spectral values.
58 .TP
59 measured.ti3
60 Measured (actual) PCS or spectral values
61 .PP
62 Author: Graeme W. Gill, licensed under the AGPL Version 3
63 usage: verify [\-options] target.ti3 measured.ti3
64 .TP
65 \fB\-v\fR
66 Verbose \- print each patch value
67 .TP
68 \fB\-n\fR
69 Normalise each files reading to white Y
70 .TP
71 \fB\-N\fR
72 Normalise each files reading to white XYZ
73 .TP
74 \fB\-D\fR
75 Use D50 100.0 as L*a*b* white reference
76 .TP
77 \fB\-c\fR
78 Show CIE94 delta E values
79 .TP
80 \fB\-k\fR
81 Show CIEDE2000 delta E values
82 .TP
83 \fB\-s\fR
84 Sort patch values by error
85 .TP
86 \fB\-w\fR
87 create VRML vector visualisation (measured.wrl)
88 .TP
89 \fB\-W\fR
90 create VRML marker visualisation (measured.wrl)
91 .TP
92 \fB\-x\fR
93 Use VRML axes
94 .TP
95 \fB\-f\fR [illum]
96 Use Fluorescent Whitening Agent compensation [opt. simulated inst. illum.:
97 .IP
98 M0, M1, M2, A, C, D50 (def.), D50M2, D65, F5, F8, F10 or file.sp]
99 .TP
100 \fB\-i\fR illum
101 Choose illuminant for computation of CIE XYZ from spectral data & FWA:
102 .IP
103 A, C, D50 (def.), D50M2, D65, F5, F8, F10 or file.sp
104 .TP
105 \fB\-o\fR observ
106 Choose CIE Observer for spectral data:
107 1931_2 (def), 1964_10, S&B 1955_2, shaw, J&V 1978_2
108 .TP
109 \fB\-X\fR file.ccmx
110 Apply Colorimeter Correction Matrix to second file
111 .TP
112 target.ti3
113 Target (reference) PCS or spectral values.
114 .TP
115 measured.ti3
116 Measured (actual) PCS or spectral values
+0
-79
debian/viewgam.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH VIEW "1" "August 2013" "View gamuts Version 1.5.1" "User Commands"
2 .SH NAME
3 View \- View gamuts.
4 .SH DESCRIPTION
5 View gamuts Version 1.5.1
6 Author: Graeme W. Gill, licensed under the AGPL Version 3
7 Diagnostic: Too few arguments, got 1 expect at least 2
8 usage: viewgam { [\-c color] [\-t trans] [\-w|s] infile.gam } ... outfile.wrl
9 .TP
10 \fB\-c\fR color
11 Color to make gamut, r = red, g = green, b = blue
12 c = cyan, m = magenta, y = yellow, e = grey, w = white
13 n = natural color
14 .TP
15 \fB\-t\fR trans
16 Set transparency from 0.0 (opaque) to 1.0 (invisible)
17 .TP
18 \fB\-w\fR
19 Show as a wireframe
20 .TP
21 \fB\-s\fR
22 Show as a solid surace
23 .TP
24 infile.gam
25 Name of .gam file
26 Repeat above for each input file
27 .TP
28 \fB\-n\fR
29 Don't add Lab axes
30 .TP
31 \fB\-k\fR
32 Add markers for prim. & sec. "cusp" points
33 .TP
34 \fB\-i\fR
35 Compute and print intersecting volume of first 2 gamuts
36 .TP
37 \fB\-I\fR isect.gam
38 Same as \fB\-i\fR, but save intersection gamut to isect.gam
39 .TP
40 outfile.wrl
41 Name of output .wrl file
42 .PP
43 Author: Graeme W. Gill, licensed under the AGPL Version 3
44 Diagnostic: Too few arguments, got 1 expect at least 2
45 usage: viewgam { [\-c color] [\-t trans] [\-w|s] infile.gam } ... outfile.wrl
46 .TP
47 \fB\-c\fR color
48 Color to make gamut, r = red, g = green, b = blue
49 c = cyan, m = magenta, y = yellow, e = grey, w = white
50 n = natural color
51 .TP
52 \fB\-t\fR trans
53 Set transparency from 0.0 (opaque) to 1.0 (invisible)
54 .TP
55 \fB\-w\fR
56 Show as a wireframe
57 .TP
58 \fB\-s\fR
59 Show as a solid surace
60 .TP
61 infile.gam
62 Name of .gam file
63 Repeat above for each input file
64 .TP
65 \fB\-n\fR
66 Don't add Lab axes
67 .TP
68 \fB\-k\fR
69 Add markers for prim. & sec. "cusp" points
70 .TP
71 \fB\-i\fR
72 Compute and print intersecting volume of first 2 gamuts
73 .TP
74 \fB\-I\fR isect.gam
75 Same as \fB\-i\fR, but save intersection gamut to isect.gam
76 .TP
77 outfile.wrl
78 Name of output .wrl file
+0
-3
debian/watch less more
0 version=3
1
2 opts="dversionmangle=s/\+dfsg\d+$//" http://www.argyllcms.com/downloadsrc.html Argyll_V(.*)_src\.zip
+0
-257
debian/xicclu.1 less more
0 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
1 .TH TRANSLATE "1" "August 2013" "Translate colors through an xicc, Version 1.5.1" "User Commands"
2 .SH NAME
3 Translate \- Translate colors through an xicc.
4 .SH DESCRIPTION
5 Translate colors through an xicc, Version 1.5.1
6 Author: Graeme W. Gill, licensed under the AGPL Version 3
7 usage: xicclu [\-options] profile
8 Diagnostic: Unknown flag
9 .TP
10 \fB\-v\fR level
11 Verbosity level 0 \- 2 (default = 1)
12 .TP
13 \fB\-g\fR
14 Plot slice instead of looking colors up. (Default white to black)
15 .TP
16 \fB\-G\fR s:L:a:b
17 Override plot slice start with Lab or Jab co\-ordinate
18 .TP
19 \fB\-G\fR e:L:a:b
20 Override plot slice end with Lab or Jab co\-ordinate
21 .TP
22 \fB\-f\fR function
23 f = forward, b = backwards, g = gamut, p = preview
24 if = inverted forward, ib = inverted backwards
25 .TP
26 \fB\-i\fR intent
27 a = absolute, r = relative colorimetric
28 p = perceptual, s = saturation
29 .TP
30 \fB\-o\fR order
31 n = normal (priority: lut > matrix > monochrome)
32 r = reverse (priority: monochrome > matrix > lut)
33 .TP
34 \fB\-p\fR oride
35 x = XYZ_PCS, X = XYZ * 100, l = Lab_PCS, L = LCh, y = Yxy
36 j = CIECAM02 Appearance Jab, J = CIECAM02 Appearance JCh
37 .TP
38 \fB\-s\fR scale
39 Scale device range 0.0 \- scale rather than 0.0 \- 1.0
40 .TP
41 \fB\-k\fR [zhxrlv]
42 Black value target: z = zero K,
43 h = 0.5 K, x = max K, r = ramp K (def.)
44 l = extra PCS input is portion of K locus
45 v = extra PCS input is K target value
46 .HP
47 \fB\-k\fR p stle stpo enpo enle shape
48 .IP
49 stle: K level at White 0.0 \- 1.0
50 stpo: start point of transition Wh 0.0 \- Bk 1.0
51 enpo: End point of transition Wh 0.0 \- Bk 1.0
52 enle: K level at Black 0.0 \- 1.0
53 shape: 1.0 = straight, 0.0\-1.0 concave, 1.0\-2.0 convex
54 .HP
55 \fB\-k\fR q stle0 stpo0 enpo0 enle0 shape0 stle2 stpo2 enpo2 enle2 shape2
56 .IP
57 Transfer extra PCS input to dual curve limits
58 .TP
59 \fB\-K\fR parameters
60 Same as \fB\-k\fR, but target is K locus rather than K value itself
61 .TP
62 \fB\-l\fR tlimit
63 set total ink limit, 0 \- 400% (estimate by default)
64 .TP
65 \fB\-L\fR klimit
66 set black ink limit, 0 \- 100% (estimate by default)
67 .TP
68 \fB\-a\fR
69 show actual target values if clipped
70 .TP
71 \fB\-u\fR
72 warn if output PCS is outside the spectrum locus
73 .TP
74 \fB\-m\fR
75 merge output processing into clut
76 .TP
77 \fB\-b\fR
78 use CAM Jab for clipping
79 .TP
80 \fB\-c\fR viewcond
81 set viewing conditions for CIECAM97s,
82 either an enumerated choice, or a parameter:value changes
83 .IP
84 pp \- Practical Reflection Print (ISO\-3664 P2)
85 pe \- Print evaluation environment (CIE 116\-1995)
86 pc \- Critical print evaluation environment (ISO\-3664 P1)
87 mt \- Monitor in typical work environment
88 mb \- Bright monitor in bright work environment
89 md \- Monitor in darkened work environment
90 jm \- Projector in dim environment
91 jd \- Projector in dark environment
92 .IP
93 pcd \- Photo CD \- original scene outdoors
94 .IP
95 ob \- Original scene \- Bright Outdoors
96 cx \- Cut Sheet Transparencies on a viewing box
97 .TP
98 s:surround
99 n = auto, a = average, m = dim, d = dark,
100 c = transparency (default average)
101 .TP
102 w:X:Y:Z
103 Adapted white point as XYZ (default media white, Abs: D50)
104 .TP
105 w:x:y
106 Adapted white point as x, y
107 .TP
108 a:adaptation
109 Adaptation luminance in cd.m^2 (default 50.0)
110 .TP
111 b:background
112 Background % of image luminance (default 20)
113 .TP
114 l:scenewhite
115 Scene white in cd.m^2 if surround = auto (default 250)
116 .TP
117 f:flare
118 Flare light % of image luminance (default 1)
119 .TP
120 f:X:Y:Z
121 Flare color as XYZ (default media white, Abs: D50)
122 .TP
123 f:x:y
124 Flare color as x, y
125 .IP
126 The colors to be translated should be fed into standard in,
127 one input color per line, white space separated.
128 A line starting with a # will be ignored.
129 A line not starting with a number will terminate the program.
130 Use \fB\-v0\fR for just output colors.
131 .PP
132 Author: Graeme W. Gill, licensed under the AGPL Version 3
133 usage: xicclu [\-options] profile
134 Diagnostic: Unknown flag
135 .TP
136 \fB\-v\fR level
137 Verbosity level 0 \- 2 (default = 1)
138 .TP
139 \fB\-g\fR
140 Plot slice instead of looking colors up. (Default white to black)
141 .TP
142 \fB\-G\fR s:L:a:b
143 Override plot slice start with Lab or Jab co\-ordinate
144 .TP
145 \fB\-G\fR e:L:a:b
146 Override plot slice end with Lab or Jab co\-ordinate
147 .TP
148 \fB\-f\fR function
149 f = forward, b = backwards, g = gamut, p = preview
150 if = inverted forward, ib = inverted backwards
151 .TP
152 \fB\-i\fR intent
153 a = absolute, r = relative colorimetric
154 p = perceptual, s = saturation
155 .TP
156 \fB\-o\fR order
157 n = normal (priority: lut > matrix > monochrome)
158 r = reverse (priority: monochrome > matrix > lut)
159 .TP
160 \fB\-p\fR oride
161 x = XYZ_PCS, X = XYZ * 100, l = Lab_PCS, L = LCh, y = Yxy
162 j = CIECAM02 Appearance Jab, J = CIECAM02 Appearance JCh
163 .TP
164 \fB\-s\fR scale
165 Scale device range 0.0 \- scale rather than 0.0 \- 1.0
166 .TP
167 \fB\-k\fR [zhxrlv]
168 Black value target: z = zero K,
169 h = 0.5 K, x = max K, r = ramp K (def.)
170 l = extra PCS input is portion of K locus
171 v = extra PCS input is K target value
172 .HP
173 \fB\-k\fR p stle stpo enpo enle shape
174 .IP
175 stle: K level at White 0.0 \- 1.0
176 stpo: start point of transition Wh 0.0 \- Bk 1.0
177 enpo: End point of transition Wh 0.0 \- Bk 1.0
178 enle: K level at Black 0.0 \- 1.0
179 shape: 1.0 = straight, 0.0\-1.0 concave, 1.0\-2.0 convex
180 .HP
181 \fB\-k\fR q stle0 stpo0 enpo0 enle0 shape0 stle2 stpo2 enpo2 enle2 shape2
182 .IP
183 Transfer extra PCS input to dual curve limits
184 .TP
185 \fB\-K\fR parameters
186 Same as \fB\-k\fR, but target is K locus rather than K value itself
187 .TP
188 \fB\-l\fR tlimit
189 set total ink limit, 0 \- 400% (estimate by default)
190 .TP
191 \fB\-L\fR klimit
192 set black ink limit, 0 \- 100% (estimate by default)
193 .TP
194 \fB\-a\fR
195 show actual target values if clipped
196 .TP
197 \fB\-u\fR
198 warn if output PCS is outside the spectrum locus
199 .TP
200 \fB\-m\fR
201 merge output processing into clut
202 .TP
203 \fB\-b\fR
204 use CAM Jab for clipping
205 .TP
206 \fB\-c\fR viewcond
207 set viewing conditions for CIECAM97s,
208 either an enumerated choice, or a parameter:value changes
209 .IP
210 pp \- Practical Reflection Print (ISO\-3664 P2)
211 pe \- Print evaluation environment (CIE 116\-1995)
212 pc \- Critical print evaluation environment (ISO\-3664 P1)
213 mt \- Monitor in typical work environment
214 mb \- Bright monitor in bright work environment
215 md \- Monitor in darkened work environment
216 jm \- Projector in dim environment
217 jd \- Projector in dark environment
218 .IP
219 pcd \- Photo CD \- original scene outdoors
220 .IP
221 ob \- Original scene \- Bright Outdoors
222 cx \- Cut Sheet Transparencies on a viewing box
223 .TP
224 s:surround
225 n = auto, a = average, m = dim, d = dark,
226 c = transparency (default average)
227 .TP
228 w:X:Y:Z
229 Adapted white point as XYZ (default media white, Abs: D50)
230 .TP
231 w:x:y
232 Adapted white point as x, y
233 .TP
234 a:adaptation
235 Adaptation luminance in cd.m^2 (default 50.0)
236 .TP
237 b:background
238 Background % of image luminance (default 20)
239 .TP
240 l:scenewhite
241 Scene white in cd.m^2 if surround = auto (default 250)
242 .TP
243 f:flare
244 Flare light % of image luminance (default 1)
245 .TP
246 f:X:Y:Z
247 Flare color as XYZ (default media white, Abs: D50)
248 .TP
249 f:x:y
250 Flare color as x, y
251 .IP
252 The colors to be translated should be fed into standard in,
253 one input color per line, white space separated.
254 A line starting with a # will be ignored.
255 A line not starting with a number will terminate the program.
256 Use \fB\-v0\fR for just output colors.
+0
-791
depcomp less more
0 #! /bin/sh
1 # depcomp - compile a program generating dependencies as side-effects
2
3 scriptversion=2013-05-30.07; # UTC
4
5 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
6
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2, or (at your option)
10 # any later version.
11
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
16
17 # You should have received a copy of the GNU General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19
20 # As a special exception to the GNU General Public License, if you
21 # distribute this file as part of a program that contains a
22 # configuration script generated by Autoconf, you may include it under
23 # the same distribution terms that you use for the rest of that program.
24
25 # Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
26
27 case $1 in
28 '')
29 echo "$0: No command. Try '$0 --help' for more information." 1>&2
30 exit 1;
31 ;;
32 -h | --h*)
33 cat <<\EOF
34 Usage: depcomp [--help] [--version] PROGRAM [ARGS]
35
36 Run PROGRAMS ARGS to compile a file, generating dependencies
37 as side-effects.
38
39 Environment variables:
40 depmode Dependency tracking mode.
41 source Source file read by 'PROGRAMS ARGS'.
42 object Object file output by 'PROGRAMS ARGS'.
43 DEPDIR directory where to store dependencies.
44 depfile Dependency file to output.
45 tmpdepfile Temporary file to use when outputting dependencies.
46 libtool Whether libtool is used (yes/no).
47
48 Report bugs to <bug-automake@gnu.org>.
49 EOF
50 exit $?
51 ;;
52 -v | --v*)
53 echo "depcomp $scriptversion"
54 exit $?
55 ;;
56 esac
57
58 # Get the directory component of the given path, and save it in the
59 # global variables '$dir'. Note that this directory component will
60 # be either empty or ending with a '/' character. This is deliberate.
61 set_dir_from ()
62 {
63 case $1 in
64 */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
65 *) dir=;;
66 esac
67 }
68
69 # Get the suffix-stripped basename of the given path, and save it the
70 # global variable '$base'.
71 set_base_from ()
72 {
73 base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
74 }
75
76 # If no dependency file was actually created by the compiler invocation,
77 # we still have to create a dummy depfile, to avoid errors with the
78 # Makefile "include basename.Plo" scheme.
79 make_dummy_depfile ()
80 {
81 echo "#dummy" > "$depfile"
82 }
83
84 # Factor out some common post-processing of the generated depfile.
85 # Requires the auxiliary global variable '$tmpdepfile' to be set.
86 aix_post_process_depfile ()
87 {
88 # If the compiler actually managed to produce a dependency file,
89 # post-process it.
90 if test -f "$tmpdepfile"; then
91 # Each line is of the form 'foo.o: dependency.h'.
92 # Do two passes, one to just change these to
93 # $object: dependency.h
94 # and one to simply output
95 # dependency.h:
96 # which is needed to avoid the deleted-header problem.
97 { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
98 sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
99 } > "$depfile"
100 rm -f "$tmpdepfile"
101 else
102 make_dummy_depfile
103 fi
104 }
105
106 # A tabulation character.
107 tab=' '
108 # A newline character.
109 nl='
110 '
111 # Character ranges might be problematic outside the C locale.
112 # These definitions help.
113 upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
114 lower=abcdefghijklmnopqrstuvwxyz
115 digits=0123456789
116 alpha=${upper}${lower}
117
118 if test -z "$depmode" || test -z "$source" || test -z "$object"; then
119 echo "depcomp: Variables source, object and depmode must be set" 1>&2
120 exit 1
121 fi
122
123 # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
124 depfile=${depfile-`echo "$object" |
125 sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
126 tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
127
128 rm -f "$tmpdepfile"
129
130 # Avoid interferences from the environment.
131 gccflag= dashmflag=
132
133 # Some modes work just like other modes, but use different flags. We
134 # parameterize here, but still list the modes in the big case below,
135 # to make depend.m4 easier to write. Note that we *cannot* use a case
136 # here, because this file can only contain one case statement.
137 if test "$depmode" = hp; then
138 # HP compiler uses -M and no extra arg.
139 gccflag=-M
140 depmode=gcc
141 fi
142
143 if test "$depmode" = dashXmstdout; then
144 # This is just like dashmstdout with a different argument.
145 dashmflag=-xM
146 depmode=dashmstdout
147 fi
148
149 cygpath_u="cygpath -u -f -"
150 if test "$depmode" = msvcmsys; then
151 # This is just like msvisualcpp but w/o cygpath translation.
152 # Just convert the backslash-escaped backslashes to single forward
153 # slashes to satisfy depend.m4
154 cygpath_u='sed s,\\\\,/,g'
155 depmode=msvisualcpp
156 fi
157
158 if test "$depmode" = msvc7msys; then
159 # This is just like msvc7 but w/o cygpath translation.
160 # Just convert the backslash-escaped backslashes to single forward
161 # slashes to satisfy depend.m4
162 cygpath_u='sed s,\\\\,/,g'
163 depmode=msvc7
164 fi
165
166 if test "$depmode" = xlc; then
167 # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
168 gccflag=-qmakedep=gcc,-MF
169 depmode=gcc
170 fi
171
172 case "$depmode" in
173 gcc3)
174 ## gcc 3 implements dependency tracking that does exactly what
175 ## we want. Yay! Note: for some reason libtool 1.4 doesn't like
176 ## it if -MD -MP comes after the -MF stuff. Hmm.
177 ## Unfortunately, FreeBSD c89 acceptance of flags depends upon
178 ## the command line argument order; so add the flags where they
179 ## appear in depend2.am. Note that the slowdown incurred here
180 ## affects only configure: in makefiles, %FASTDEP% shortcuts this.
181 for arg
182 do
183 case $arg in
184 -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
185 *) set fnord "$@" "$arg" ;;
186 esac
187 shift # fnord
188 shift # $arg
189 done
190 "$@"
191 stat=$?
192 if test $stat -ne 0; then
193 rm -f "$tmpdepfile"
194 exit $stat
195 fi
196 mv "$tmpdepfile" "$depfile"
197 ;;
198
199 gcc)
200 ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
201 ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
202 ## (see the conditional assignment to $gccflag above).
203 ## There are various ways to get dependency output from gcc. Here's
204 ## why we pick this rather obscure method:
205 ## - Don't want to use -MD because we'd like the dependencies to end
206 ## up in a subdir. Having to rename by hand is ugly.
207 ## (We might end up doing this anyway to support other compilers.)
208 ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
209 ## -MM, not -M (despite what the docs say). Also, it might not be
210 ## supported by the other compilers which use the 'gcc' depmode.
211 ## - Using -M directly means running the compiler twice (even worse
212 ## than renaming).
213 if test -z "$gccflag"; then
214 gccflag=-MD,
215 fi
216 "$@" -Wp,"$gccflag$tmpdepfile"
217 stat=$?
218 if test $stat -ne 0; then
219 rm -f "$tmpdepfile"
220 exit $stat
221 fi
222 rm -f "$depfile"
223 echo "$object : \\" > "$depfile"
224 # The second -e expression handles DOS-style file names with drive
225 # letters.
226 sed -e 's/^[^:]*: / /' \
227 -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
228 ## This next piece of magic avoids the "deleted header file" problem.
229 ## The problem is that when a header file which appears in a .P file
230 ## is deleted, the dependency causes make to die (because there is
231 ## typically no way to rebuild the header). We avoid this by adding
232 ## dummy dependencies for each header file. Too bad gcc doesn't do
233 ## this for us directly.
234 ## Some versions of gcc put a space before the ':'. On the theory
235 ## that the space means something, we add a space to the output as
236 ## well. hp depmode also adds that space, but also prefixes the VPATH
237 ## to the object. Take care to not repeat it in the output.
238 ## Some versions of the HPUX 10.20 sed can't process this invocation
239 ## correctly. Breaking it into two sed invocations is a workaround.
240 tr ' ' "$nl" < "$tmpdepfile" \
241 | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
242 | sed -e 's/$/ :/' >> "$depfile"
243 rm -f "$tmpdepfile"
244 ;;
245
246 hp)
247 # This case exists only to let depend.m4 do its work. It works by
248 # looking at the text of this script. This case will never be run,
249 # since it is checked for above.
250 exit 1
251 ;;
252
253 sgi)
254 if test "$libtool" = yes; then
255 "$@" "-Wp,-MDupdate,$tmpdepfile"
256 else
257 "$@" -MDupdate "$tmpdepfile"
258 fi
259 stat=$?
260 if test $stat -ne 0; then
261 rm -f "$tmpdepfile"
262 exit $stat
263 fi
264 rm -f "$depfile"
265
266 if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
267 echo "$object : \\" > "$depfile"
268 # Clip off the initial element (the dependent). Don't try to be
269 # clever and replace this with sed code, as IRIX sed won't handle
270 # lines with more than a fixed number of characters (4096 in
271 # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
272 # the IRIX cc adds comments like '#:fec' to the end of the
273 # dependency line.
274 tr ' ' "$nl" < "$tmpdepfile" \
275 | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
276 | tr "$nl" ' ' >> "$depfile"
277 echo >> "$depfile"
278 # The second pass generates a dummy entry for each header file.
279 tr ' ' "$nl" < "$tmpdepfile" \
280 | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
281 >> "$depfile"
282 else
283 make_dummy_depfile
284 fi
285 rm -f "$tmpdepfile"
286 ;;
287
288 xlc)
289 # This case exists only to let depend.m4 do its work. It works by
290 # looking at the text of this script. This case will never be run,
291 # since it is checked for above.
292 exit 1
293 ;;
294
295 aix)
296 # The C for AIX Compiler uses -M and outputs the dependencies
297 # in a .u file. In older versions, this file always lives in the
298 # current directory. Also, the AIX compiler puts '$object:' at the
299 # start of each line; $object doesn't have directory information.
300 # Version 6 uses the directory in both cases.
301 set_dir_from "$object"
302 set_base_from "$object"
303 if test "$libtool" = yes; then
304 tmpdepfile1=$dir$base.u
305 tmpdepfile2=$base.u
306 tmpdepfile3=$dir.libs/$base.u
307 "$@" -Wc,-M
308 else
309 tmpdepfile1=$dir$base.u
310 tmpdepfile2=$dir$base.u
311 tmpdepfile3=$dir$base.u
312 "$@" -M
313 fi
314 stat=$?
315 if test $stat -ne 0; then
316 rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
317 exit $stat
318 fi
319
320 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
321 do
322 test -f "$tmpdepfile" && break
323 done
324 aix_post_process_depfile
325 ;;
326
327 tcc)
328 # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
329 # FIXME: That version still under development at the moment of writing.
330 # Make that this statement remains true also for stable, released
331 # versions.
332 # It will wrap lines (doesn't matter whether long or short) with a
333 # trailing '\', as in:
334 #
335 # foo.o : \
336 # foo.c \
337 # foo.h \
338 #
339 # It will put a trailing '\' even on the last line, and will use leading
340 # spaces rather than leading tabs (at least since its commit 0394caf7
341 # "Emit spaces for -MD").
342 "$@" -MD -MF "$tmpdepfile"
343 stat=$?
344 if test $stat -ne 0; then
345 rm -f "$tmpdepfile"
346 exit $stat
347 fi
348 rm -f "$depfile"
349 # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
350 # We have to change lines of the first kind to '$object: \'.
351 sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
352 # And for each line of the second kind, we have to emit a 'dep.h:'
353 # dummy dependency, to avoid the deleted-header problem.
354 sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
355 rm -f "$tmpdepfile"
356 ;;
357
358 ## The order of this option in the case statement is important, since the
359 ## shell code in configure will try each of these formats in the order
360 ## listed in this file. A plain '-MD' option would be understood by many
361 ## compilers, so we must ensure this comes after the gcc and icc options.
362 pgcc)
363 # Portland's C compiler understands '-MD'.
364 # Will always output deps to 'file.d' where file is the root name of the
365 # source file under compilation, even if file resides in a subdirectory.
366 # The object file name does not affect the name of the '.d' file.
367 # pgcc 10.2 will output
368 # foo.o: sub/foo.c sub/foo.h
369 # and will wrap long lines using '\' :
370 # foo.o: sub/foo.c ... \
371 # sub/foo.h ... \
372 # ...
373 set_dir_from "$object"
374 # Use the source, not the object, to determine the base name, since
375 # that's sadly what pgcc will do too.
376 set_base_from "$source"
377 tmpdepfile=$base.d
378
379 # For projects that build the same source file twice into different object
380 # files, the pgcc approach of using the *source* file root name can cause
381 # problems in parallel builds. Use a locking strategy to avoid stomping on
382 # the same $tmpdepfile.
383 lockdir=$base.d-lock
384 trap "
385 echo '$0: caught signal, cleaning up...' >&2
386 rmdir '$lockdir'
387 exit 1
388 " 1 2 13 15
389 numtries=100
390 i=$numtries
391 while test $i -gt 0; do
392 # mkdir is a portable test-and-set.
393 if mkdir "$lockdir" 2>/dev/null; then
394 # This process acquired the lock.
395 "$@" -MD
396 stat=$?
397 # Release the lock.
398 rmdir "$lockdir"
399 break
400 else
401 # If the lock is being held by a different process, wait
402 # until the winning process is done or we timeout.
403 while test -d "$lockdir" && test $i -gt 0; do
404 sleep 1
405 i=`expr $i - 1`
406 done
407 fi
408 i=`expr $i - 1`
409 done
410 trap - 1 2 13 15
411 if test $i -le 0; then
412 echo "$0: failed to acquire lock after $numtries attempts" >&2
413 echo "$0: check lockdir '$lockdir'" >&2
414 exit 1
415 fi
416
417 if test $stat -ne 0; then
418 rm -f "$tmpdepfile"
419 exit $stat
420 fi
421 rm -f "$depfile"
422 # Each line is of the form `foo.o: dependent.h',
423 # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
424 # Do two passes, one to just change these to
425 # `$object: dependent.h' and one to simply `dependent.h:'.
426 sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
427 # Some versions of the HPUX 10.20 sed can't process this invocation
428 # correctly. Breaking it into two sed invocations is a workaround.
429 sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
430 | sed -e 's/$/ :/' >> "$depfile"
431 rm -f "$tmpdepfile"
432 ;;
433
434 hp2)
435 # The "hp" stanza above does not work with aCC (C++) and HP's ia64
436 # compilers, which have integrated preprocessors. The correct option
437 # to use with these is +Maked; it writes dependencies to a file named
438 # 'foo.d', which lands next to the object file, wherever that
439 # happens to be.
440 # Much of this is similar to the tru64 case; see comments there.
441 set_dir_from "$object"
442 set_base_from "$object"
443 if test "$libtool" = yes; then
444 tmpdepfile1=$dir$base.d
445 tmpdepfile2=$dir.libs/$base.d
446 "$@" -Wc,+Maked
447 else
448 tmpdepfile1=$dir$base.d
449 tmpdepfile2=$dir$base.d
450 "$@" +Maked
451 fi
452 stat=$?
453 if test $stat -ne 0; then
454 rm -f "$tmpdepfile1" "$tmpdepfile2"
455 exit $stat
456 fi
457
458 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
459 do
460 test -f "$tmpdepfile" && break
461 done
462 if test -f "$tmpdepfile"; then
463 sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
464 # Add 'dependent.h:' lines.
465 sed -ne '2,${
466 s/^ *//
467 s/ \\*$//
468 s/$/:/
469 p
470 }' "$tmpdepfile" >> "$depfile"
471 else
472 make_dummy_depfile
473 fi
474 rm -f "$tmpdepfile" "$tmpdepfile2"
475 ;;
476
477 tru64)
478 # The Tru64 compiler uses -MD to generate dependencies as a side
479 # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
480 # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
481 # dependencies in 'foo.d' instead, so we check for that too.
482 # Subdirectories are respected.
483 set_dir_from "$object"
484 set_base_from "$object"
485
486 if test "$libtool" = yes; then
487 # Libtool generates 2 separate objects for the 2 libraries. These
488 # two compilations output dependencies in $dir.libs/$base.o.d and
489 # in $dir$base.o.d. We have to check for both files, because
490 # one of the two compilations can be disabled. We should prefer
491 # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
492 # automatically cleaned when .libs/ is deleted, while ignoring
493 # the former would cause a distcleancheck panic.
494 tmpdepfile1=$dir$base.o.d # libtool 1.5
495 tmpdepfile2=$dir.libs/$base.o.d # Likewise.
496 tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
497 "$@" -Wc,-MD
498 else
499 tmpdepfile1=$dir$base.d
500 tmpdepfile2=$dir$base.d
501 tmpdepfile3=$dir$base.d
502 "$@" -MD
503 fi
504
505 stat=$?
506 if test $stat -ne 0; then
507 rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
508 exit $stat
509 fi
510
511 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
512 do
513 test -f "$tmpdepfile" && break
514 done
515 # Same post-processing that is required for AIX mode.
516 aix_post_process_depfile
517 ;;
518
519 msvc7)
520 if test "$libtool" = yes; then
521 showIncludes=-Wc,-showIncludes
522 else
523 showIncludes=-showIncludes
524 fi
525 "$@" $showIncludes > "$tmpdepfile"
526 stat=$?
527 grep -v '^Note: including file: ' "$tmpdepfile"
528 if test $stat -ne 0; then
529 rm -f "$tmpdepfile"
530 exit $stat
531 fi
532 rm -f "$depfile"
533 echo "$object : \\" > "$depfile"
534 # The first sed program below extracts the file names and escapes
535 # backslashes for cygpath. The second sed program outputs the file
536 # name when reading, but also accumulates all include files in the
537 # hold buffer in order to output them again at the end. This only
538 # works with sed implementations that can handle large buffers.
539 sed < "$tmpdepfile" -n '
540 /^Note: including file: *\(.*\)/ {
541 s//\1/
542 s/\\/\\\\/g
543 p
544 }' | $cygpath_u | sort -u | sed -n '
545 s/ /\\ /g
546 s/\(.*\)/'"$tab"'\1 \\/p
547 s/.\(.*\) \\/\1:/
548 H
549 $ {
550 s/.*/'"$tab"'/
551 G
552 p
553 }' >> "$depfile"
554 echo >> "$depfile" # make sure the fragment doesn't end with a backslash
555 rm -f "$tmpdepfile"
556 ;;
557
558 msvc7msys)
559 # This case exists only to let depend.m4 do its work. It works by
560 # looking at the text of this script. This case will never be run,
561 # since it is checked for above.
562 exit 1
563 ;;
564
565 #nosideeffect)
566 # This comment above is used by automake to tell side-effect
567 # dependency tracking mechanisms from slower ones.
568
569 dashmstdout)
570 # Important note: in order to support this mode, a compiler *must*
571 # always write the preprocessed file to stdout, regardless of -o.
572 "$@" || exit $?
573
574 # Remove the call to Libtool.
575 if test "$libtool" = yes; then
576 while test "X$1" != 'X--mode=compile'; do
577 shift
578 done
579 shift
580 fi
581
582 # Remove '-o $object'.
583 IFS=" "
584 for arg
585 do
586 case $arg in
587 -o)
588 shift
589 ;;
590 $object)
591 shift
592 ;;
593 *)
594 set fnord "$@" "$arg"
595 shift # fnord
596 shift # $arg
597 ;;
598 esac
599 done
600
601 test -z "$dashmflag" && dashmflag=-M
602 # Require at least two characters before searching for ':'
603 # in the target name. This is to cope with DOS-style filenames:
604 # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
605 "$@" $dashmflag |
606 sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
607 rm -f "$depfile"
608 cat < "$tmpdepfile" > "$depfile"
609 # Some versions of the HPUX 10.20 sed can't process this sed invocation
610 # correctly. Breaking it into two sed invocations is a workaround.
611 tr ' ' "$nl" < "$tmpdepfile" \
612 | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
613 | sed -e 's/$/ :/' >> "$depfile"
614 rm -f "$tmpdepfile"
615 ;;
616
617 dashXmstdout)
618 # This case only exists to satisfy depend.m4. It is never actually
619 # run, as this mode is specially recognized in the preamble.
620 exit 1
621 ;;
622
623 makedepend)
624 "$@" || exit $?
625 # Remove any Libtool call
626 if test "$libtool" = yes; then
627 while test "X$1" != 'X--mode=compile'; do
628 shift
629 done
630 shift
631 fi
632 # X makedepend
633 shift
634 cleared=no eat=no
635 for arg
636 do
637 case $cleared in
638 no)
639 set ""; shift
640 cleared=yes ;;
641 esac
642 if test $eat = yes; then
643 eat=no
644 continue
645 fi
646 case "$arg" in
647 -D*|-I*)
648 set fnord "$@" "$arg"; shift ;;
649 # Strip any option that makedepend may not understand. Remove
650 # the object too, otherwise makedepend will parse it as a source file.
651 -arch)
652 eat=yes ;;
653 -*|$object)
654 ;;
655 *)
656 set fnord "$@" "$arg"; shift ;;
657 esac
658 done
659 obj_suffix=`echo "$object" | sed 's/^.*\././'`
660 touch "$tmpdepfile"
661 ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
662 rm -f "$depfile"
663 # makedepend may prepend the VPATH from the source file name to the object.
664 # No need to regex-escape $object, excess matching of '.' is harmless.
665 sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
666 # Some versions of the HPUX 10.20 sed can't process the last invocation
667 # correctly. Breaking it into two sed invocations is a workaround.
668 sed '1,2d' "$tmpdepfile" \
669 | tr ' ' "$nl" \
670 | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
671 | sed -e 's/$/ :/' >> "$depfile"
672 rm -f "$tmpdepfile" "$tmpdepfile".bak
673 ;;
674
675 cpp)
676 # Important note: in order to support this mode, a compiler *must*
677 # always write the preprocessed file to stdout.
678 "$@" || exit $?
679
680 # Remove the call to Libtool.
681 if test "$libtool" = yes; then
682 while test "X$1" != 'X--mode=compile'; do
683 shift
684 done
685 shift
686 fi
687
688 # Remove '-o $object'.
689 IFS=" "
690 for arg
691 do
692 case $arg in
693 -o)
694 shift
695 ;;
696 $object)
697 shift
698 ;;
699 *)
700 set fnord "$@" "$arg"
701 shift # fnord
702 shift # $arg
703 ;;
704 esac
705 done
706
707 "$@" -E \
708 | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
709 -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
710 | sed '$ s: \\$::' > "$tmpdepfile"
711 rm -f "$depfile"
712 echo "$object : \\" > "$depfile"
713 cat < "$tmpdepfile" >> "$depfile"
714 sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
715 rm -f "$tmpdepfile"
716 ;;
717
718 msvisualcpp)
719 # Important note: in order to support this mode, a compiler *must*
720 # always write the preprocessed file to stdout.
721 "$@" || exit $?
722
723 # Remove the call to Libtool.
724 if test "$libtool" = yes; then
725 while test "X$1" != 'X--mode=compile'; do
726 shift
727 done
728 shift
729 fi
730
731 IFS=" "
732 for arg
733 do
734 case "$arg" in
735 -o)
736 shift
737 ;;
738 $object)
739 shift
740 ;;
741 "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
742 set fnord "$@"
743 shift
744 shift
745 ;;
746 *)
747 set fnord "$@" "$arg"
748 shift
749 shift
750 ;;
751 esac
752 done
753 "$@" -E 2>/dev/null |
754 sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
755 rm -f "$depfile"
756 echo "$object : \\" > "$depfile"
757 sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
758 echo "$tab" >> "$depfile"
759 sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
760 rm -f "$tmpdepfile"
761 ;;
762
763 msvcmsys)
764 # This case exists only to let depend.m4 do its work. It works by
765 # looking at the text of this script. This case will never be run,
766 # since it is checked for above.
767 exit 1
768 ;;
769
770 none)
771 exec "$@"
772 ;;
773
774 *)
775 echo "Unknown depmode $depmode" 1>&2
776 exit 1
777 ;;
778 esac
779
780 exit 0
781
782 # Local Variables:
783 # mode: shell-script
784 # sh-indentation: 2
785 # eval: (add-hook 'write-file-hooks 'time-stamp)
786 # time-stamp-start: "scriptversion="
787 # time-stamp-format: "%:y-%02m-%02d.%02H"
788 # time-stamp-time-zone: "UTC"
789 # time-stamp-end: "; # UTC"
790 # End:
+0
-6
doc/Makefile.am less more
0 docdir = $(datadir)/doc/argyll
1
2 doc_DATA = $(wildcard *.txt) $(wildcard *.html) $(wildcard *.jpg) \
3 $(wildcard *.gif)
4
5 EXTRA_DIST = $(doc_DATA)
+0
-12
firmware-package-builder/argyll-firmware-spyder2/debian/changelog less more
0 argyll-firmware-spyder2 (1.1) unstable; urgency=low
1
2 * Moved firmware to /usr/share/color, which is freedesktop.org-compliant
3 and (more to the point) where Argyll 1.2.0 looks for it.
4
5 -- Roland Mas <lolando@debian.org> Thu, 05 Aug 2010 15:32:53 +0200
6
7 argyll-firmware-spyder2 (1.0) unstable; urgency=low
8
9 * Package automatically generated from the Spyder2 driver CD.
10
11 -- Roland Mas <lolando@debian.org> Fri, 17 Apr 2009 22:28:37 +0200
+0
-1
firmware-package-builder/argyll-firmware-spyder2/debian/compat less more
0 7
+0
-17
firmware-package-builder/argyll-firmware-spyder2/debian/control less more
0 Source: argyll-firmware-spyder2
1 Section: non-free/graphics
2 Priority: optional
3 Maintainer: Roland Mas <lolando@debian.org>
4 Build-Depends: debhelper (>= 7)
5 Standards-Version: 3.9.1
6
7 Package: argyll-firmware-spyder2
8 Architecture: all
9 Recommends: argyll
10 Depends: ${misc:Depends}
11 Description: ColorVision Spyder2 firmware for Argyll
12 Argyll is an open source, ICC compatible color management system. It
13 can drive display calibrators such as the ColorVision Spyder2, which
14 requires a firmware to be uploaded to the device. This package is
15 generated from the drivers CD provided with the Spyder2, and contains
16 the firmware ready to be used by Argyll.
+0
-8
firmware-package-builder/argyll-firmware-spyder2/debian/copyright less more
0 The binary package contains the proprietary firmware for the
1 ColorVision Spyder2 device. As such, it is not meant to be
2 distributed.
3
4 The source package itself (which builds the binary package) is
5 Copyright 2009, Roland Mas, and can be distributed under the terms of
6 the GNU General Public License, version 2 or (at your option) any
7 later version published by the Free Software Foundation.
+0
-1
firmware-package-builder/argyll-firmware-spyder2/debian/install less more
0 spyd2PLD.bin usr/share/color
+0
-10
firmware-package-builder/argyll-firmware-spyder2/debian/rules less more
0 #! /usr/bin/make -f
1
2 %:
3 dh $@
4
5 override_dh_auto_build:
6 cp /usr/local/share/color/spyd2PLD.bin .
7
8 override_dh_auto_clean:
9 rm -f spyd2PLD.bin
+0
-27
gamut/Makefile.am less more
0 include $(top_srcdir)/Makefile.shared
1
2 privatelib_LTLIBRARIES = libgamut.la libgammap.la
3 privatelibdir = $(pkglibdir)
4
5 libgamut_la_SOURCES = gamut.h gamut.c
6 libgamut_la_LIBADD = ../cgats/libcgats.la $(ICC_LIBS) \
7 ../numlib/libargyllnum.la
8
9 libgammap_la_SOURCES = gammap.h gammap.c nearsmth.c nearsmth.h
10 libgammap_la_LIBADD = ./libgamut.la $(ICC_LIBS) \
11 ../numlib/libargyllnum.la ../plot/libvrml.la \
12 ../rspl/librspl.la ../libargyll.la ../cgats/libcgats.la
13
14 LDADD = ./libgamut.la ./libgammap.la $(ICC_LIBS) ../cgats/libcgats.la \
15 ../rspl/librspl.la ../plot/libvrml.la ../xicc/libxicc.la \
16 ../spectro/libinsttypes.la ../numlib/libargyllnum.la
17
18 bin_PROGRAMS = viewgam
19
20 check_PROGRAMS = smthtest GenRMGam GenVisGam maptest surftest fakegam
21
22 refdir = $(datadir)/color/argyll/ref
23
24 ##ref_DATA = RefMediumGamut.gam
25
26 EXTRA_DIST = License.txt Readme.txt
+0
-3
h/Makefile.am less more
0 EXTRA_DIST = Readme.txt copyright.h config.h sort.h llist.h xlist.h \
1 counters.h
2
+0
-22
icc/Makefile.am less more
0 include $(top_srcdir)/Makefile.shared
1
2 LIBICC_VERSION=2.12
3
4 lib_LTLIBRARIES = libicc.la
5
6 libicc_la_SOURCES = icc.h iccV42.h icc.c iccstd.c
7 libicc_la_LDFLAGS = -version-number $(shell echo $(LIBICC_VERSION) | tr . :):0
8
9 include_HEADERS = icc.h iccV42.h
10
11 LDADD = libicc.la
12
13 bin_PROGRAMS = iccdump icclu
14
15 check_PROGRAMS = icctest iccrw lutest
16
17 refdir = $(datadir)/color/argyll/ref
18
19 ref_DATA = $(wildcard *.icm)
20
21 EXTRA_DIST = License.txt Readme.txt
63476347 p->clutPoints = read_UInt8Number(bp+10);
63486348
63496349 /* Sanity check */
6350 if (p->inputChan < 1) {
6351 sprintf(icp->err,"icmLut_read: No input channels!");
6352 return icp->errc = 1;
6353 }
6354
63556350 if (p->inputChan > MAX_CHAN) {
63566351 sprintf(icp->err,"icmLut_read: Can't handle > %d input channels\n",MAX_CHAN);
63576352 return icp->errc = 1;
+0
-40
imdi/Makefile.am less more
0 include $(top_srcdir)/Makefile.shared
1
2 lib_LTLIBRARIES = libimdi.la
3
4 LIBIMDI_VERSION=0.0
5
6 libimdi_la_SOURCES = imdi.c imdi_tab.c imdi_arch.h imdi_gen.h imdi.h \
7 imdi_tab.h imdi_utl.h refi.h imdi_k.h
8 libimdi_la_LDFLAGS = -version $(shell echo $(LIBIMDI_VERSION) | tr . :):0
9
10 include_HEADERS = imdi_arch.h imdi_gen.h imdi.h imdi_tab.h \
11 imdi_utl.h refi.h
12
13 bin_PROGRAMS = cctiff greytiff
14
15 BINLDADD = ./libimdi.la ../spectro/libinsttypes.la ../plot/libvrml.la \
16 ../xicc/libxicc.la ../xicc/libxutils.la ../gamut/libgamut.la \
17 ../gamut/libgammap.la ../rspl/librspl.la $(ICC_LIBS) \
18 ../cgats/libcgats.la ../numlib/libargyllnum.la ../libargyll.la \
19 $(TIFF_LIBS) -ljpeg
20
21 cctiff_LDADD = $(BINLDADD)
22 greytiff_LDADD = $(BINLDADD)
23
24 check_PROGRAMS = ctest
25
26 ctest_SOURCES = ctest.c cgen.c
27
28 noinst_PROGRAMS = imdi_make
29
30 imdi_make_SOURCES = imdi_make.c imdi_gen.c cgen.c
31 ##imdi_make_CFLAGS = $(CFLAGS) -O
32
33 BUILT_SOURCES = imdi_k.h
34
35 imdi.c: imdi_k.h
36 imdi_k.h: imdi_make
37 ./imdi_make
38
39 EXTRA_DIST = License.txt Readme.txt
+0
-910
imdi/imdi_k.h less more
0 /* Integer Multi-Dimensional Interpolation */
1 /* Declarations for all the generated kernel functions */
2 /* This file is generated by imdi_make */
3
4 /* Copyright 2000 - 2007 Graeme W. Gill */
5 /* All rights reserved. */
6 /* This material is licensed under the GNU AFFERO GENERAL PUBLIC LICENSE Version 3 :- */
7 /* see the License.txt file for licensing details.*/
8
9 #include "imdi_k.c" /* All the kernel code */
10
11 struct {
12 void (*interp)(imdi *s, void **outp, int ostride, void **inp, int istride, unsigned int npix);
13 void (*gentab)(genspec *g, tabspec *t);
14 } ktable[891] = {
15 { imdi_k1, imdi_k1_gentab },
16 { imdi_k2, imdi_k2_gentab },
17 { imdi_k3, imdi_k3_gentab },
18 { imdi_k4, imdi_k4_gentab },
19 { imdi_k5, imdi_k5_gentab },
20 { imdi_k6, imdi_k6_gentab },
21 { imdi_k7, imdi_k7_gentab },
22 { imdi_k8, imdi_k8_gentab },
23 { imdi_k9, imdi_k9_gentab },
24 { imdi_k10, imdi_k10_gentab },
25 { imdi_k11, imdi_k11_gentab },
26 { imdi_k12, imdi_k12_gentab },
27 { imdi_k13, imdi_k13_gentab },
28 { imdi_k14, imdi_k14_gentab },
29 { imdi_k15, imdi_k15_gentab },
30 { imdi_k16, imdi_k16_gentab },
31 { imdi_k17, imdi_k17_gentab },
32 { imdi_k18, imdi_k18_gentab },
33 { imdi_k19, imdi_k19_gentab },
34 { imdi_k20, imdi_k20_gentab },
35 { imdi_k21, imdi_k21_gentab },
36 { imdi_k22, imdi_k22_gentab },
37 { imdi_k23, imdi_k23_gentab },
38 { imdi_k24, imdi_k24_gentab },
39 { imdi_k25, imdi_k25_gentab },
40 { imdi_k26, imdi_k26_gentab },
41 { imdi_k27, imdi_k27_gentab },
42 { imdi_k28, imdi_k28_gentab },
43 { imdi_k29, imdi_k29_gentab },
44 { imdi_k30, imdi_k30_gentab },
45 { imdi_k31, imdi_k31_gentab },
46 { imdi_k32, imdi_k32_gentab },
47 { imdi_k33, imdi_k33_gentab },
48 { imdi_k34, imdi_k34_gentab },
49 { imdi_k35, imdi_k35_gentab },
50 { imdi_k36, imdi_k36_gentab },
51 { imdi_k37, imdi_k37_gentab },
52 { imdi_k38, imdi_k38_gentab },
53 { imdi_k39, imdi_k39_gentab },
54 { imdi_k40, imdi_k40_gentab },
55 { imdi_k41, imdi_k41_gentab },
56 { imdi_k42, imdi_k42_gentab },
57 { imdi_k43, imdi_k43_gentab },
58 { imdi_k44, imdi_k44_gentab },
59 { imdi_k45, imdi_k45_gentab },
60 { imdi_k46, imdi_k46_gentab },
61 { imdi_k47, imdi_k47_gentab },
62 { imdi_k48, imdi_k48_gentab },
63 { imdi_k49, imdi_k49_gentab },
64 { imdi_k50, imdi_k50_gentab },
65 { imdi_k51, imdi_k51_gentab },
66 { imdi_k52, imdi_k52_gentab },
67 { imdi_k53, imdi_k53_gentab },
68 { imdi_k54, imdi_k54_gentab },
69 { imdi_k55, imdi_k55_gentab },
70 { imdi_k56, imdi_k56_gentab },
71 { imdi_k57, imdi_k57_gentab },
72 { imdi_k58, imdi_k58_gentab },
73 { imdi_k59, imdi_k59_gentab },
74 { imdi_k60, imdi_k60_gentab },
75 { imdi_k61, imdi_k61_gentab },
76 { imdi_k62, imdi_k62_gentab },
77 { imdi_k63, imdi_k63_gentab },
78 { imdi_k64, imdi_k64_gentab },
79 { imdi_k65, imdi_k65_gentab },
80 { imdi_k66, imdi_k66_gentab },
81 { imdi_k67, imdi_k67_gentab },
82 { imdi_k68, imdi_k68_gentab },
83 { imdi_k69, imdi_k69_gentab },
84 { imdi_k70, imdi_k70_gentab },
85 { imdi_k71, imdi_k71_gentab },
86 { imdi_k72, imdi_k72_gentab },
87 { imdi_k73, imdi_k73_gentab },
88 { imdi_k74, imdi_k74_gentab },
89 { imdi_k75, imdi_k75_gentab },
90 { imdi_k76, imdi_k76_gentab },
91 { imdi_k77, imdi_k77_gentab },
92 { imdi_k78, imdi_k78_gentab },
93 { imdi_k79, imdi_k79_gentab },
94 { imdi_k80, imdi_k80_gentab },
95 { imdi_k81, imdi_k81_gentab },
96 { imdi_k82, imdi_k82_gentab },
97 { imdi_k83, imdi_k83_gentab },
98 { imdi_k84, imdi_k84_gentab },
99 { imdi_k85, imdi_k85_gentab },
100 { imdi_k86, imdi_k86_gentab },
101 { imdi_k87, imdi_k87_gentab },
102 { imdi_k88, imdi_k88_gentab },
103 { imdi_k89, imdi_k89_gentab },
104 { imdi_k90, imdi_k90_gentab },
105 { imdi_k91, imdi_k91_gentab },
106 { imdi_k92, imdi_k92_gentab },
107 { imdi_k93, imdi_k93_gentab },
108 { imdi_k94, imdi_k94_gentab },
109 { imdi_k95, imdi_k95_gentab },
110 { imdi_k96, imdi_k96_gentab },
111 { imdi_k97, imdi_k97_gentab },
112 { imdi_k98, imdi_k98_gentab },
113 { imdi_k99, imdi_k99_gentab },
114 { imdi_k100, imdi_k100_gentab },
115 { imdi_k101, imdi_k101_gentab },
116 { imdi_k102, imdi_k102_gentab },
117 { imdi_k103, imdi_k103_gentab },
118 { imdi_k104, imdi_k104_gentab },
119 { imdi_k105, imdi_k105_gentab },
120 { imdi_k106, imdi_k106_gentab },
121 { imdi_k107, imdi_k107_gentab },
122 { imdi_k108, imdi_k108_gentab },
123 { imdi_k109, imdi_k109_gentab },
124 { imdi_k110, imdi_k110_gentab },
125 { imdi_k111, imdi_k111_gentab },
126 { imdi_k112, imdi_k112_gentab },
127 { imdi_k113, imdi_k113_gentab },
128 { imdi_k114, imdi_k114_gentab },
129 { imdi_k115, imdi_k115_gentab },
130 { imdi_k116, imdi_k116_gentab },
131 { imdi_k117, imdi_k117_gentab },
132 { imdi_k118, imdi_k118_gentab },
133 { imdi_k119, imdi_k119_gentab },
134 { imdi_k120, imdi_k120_gentab },
135 { imdi_k121, imdi_k121_gentab },
136 { imdi_k122, imdi_k122_gentab },
137 { imdi_k123, imdi_k123_gentab },
138 { imdi_k124, imdi_k124_gentab },
139 { imdi_k125, imdi_k125_gentab },
140 { imdi_k126, imdi_k126_gentab },
141 { imdi_k127, imdi_k127_gentab },
142 { imdi_k128, imdi_k128_gentab },
143 { imdi_k129, imdi_k129_gentab },
144 { imdi_k130, imdi_k130_gentab },
145 { imdi_k131, imdi_k131_gentab },
146 { imdi_k132, imdi_k132_gentab },
147 { imdi_k133, imdi_k133_gentab },
148 { imdi_k134, imdi_k134_gentab },
149 { imdi_k135, imdi_k135_gentab },
150 { imdi_k136, imdi_k136_gentab },
151 { imdi_k137, imdi_k137_gentab },
152 { imdi_k138, imdi_k138_gentab },
153 { imdi_k139, imdi_k139_gentab },
154 { imdi_k140, imdi_k140_gentab },
155 { imdi_k141, imdi_k141_gentab },
156 { imdi_k142, imdi_k142_gentab },
157 { imdi_k143, imdi_k143_gentab },
158 { imdi_k144, imdi_k144_gentab },
159 { imdi_k145, imdi_k145_gentab },
160 { imdi_k146, imdi_k146_gentab },
161 { imdi_k147, imdi_k147_gentab },
162 { imdi_k148, imdi_k148_gentab },
163 { imdi_k149, imdi_k149_gentab },
164 { imdi_k150, imdi_k150_gentab },
165 { imdi_k151, imdi_k151_gentab },
166 { imdi_k152, imdi_k152_gentab },
167 { imdi_k153, imdi_k153_gentab },
168 { imdi_k154, imdi_k154_gentab },
169 { imdi_k155, imdi_k155_gentab },
170 { imdi_k156, imdi_k156_gentab },
171 { imdi_k157, imdi_k157_gentab },
172 { imdi_k158, imdi_k158_gentab },
173 { imdi_k159, imdi_k159_gentab },
174 { imdi_k160, imdi_k160_gentab },
175 { imdi_k161, imdi_k161_gentab },
176 { imdi_k162, imdi_k162_gentab },
177 { imdi_k163, imdi_k163_gentab },
178 { imdi_k164, imdi_k164_gentab },
179 { imdi_k165, imdi_k165_gentab },
180 { imdi_k166, imdi_k166_gentab },
181 { imdi_k167, imdi_k167_gentab },
182 { imdi_k168, imdi_k168_gentab },
183 { imdi_k169, imdi_k169_gentab },
184 { imdi_k170, imdi_k170_gentab },
185 { imdi_k171, imdi_k171_gentab },
186 { imdi_k172, imdi_k172_gentab },
187 { imdi_k173, imdi_k173_gentab },
188 { imdi_k174, imdi_k174_gentab },
189 { imdi_k175, imdi_k175_gentab },
190 { imdi_k176, imdi_k176_gentab },
191 { imdi_k177, imdi_k177_gentab },
192 { imdi_k178, imdi_k178_gentab },
193 { imdi_k179, imdi_k179_gentab },
194 { imdi_k180, imdi_k180_gentab },
195 { imdi_k181, imdi_k181_gentab },
196 { imdi_k182, imdi_k182_gentab },
197 { imdi_k183, imdi_k183_gentab },
198 { imdi_k184, imdi_k184_gentab },
199 { imdi_k185, imdi_k185_gentab },
200 { imdi_k186, imdi_k186_gentab },
201 { imdi_k187, imdi_k187_gentab },
202 { imdi_k188, imdi_k188_gentab },
203 { imdi_k189, imdi_k189_gentab },
204 { imdi_k190, imdi_k190_gentab },
205 { imdi_k191, imdi_k191_gentab },
206 { imdi_k192, imdi_k192_gentab },
207 { imdi_k193, imdi_k193_gentab },
208 { imdi_k194, imdi_k194_gentab },
209 { imdi_k195, imdi_k195_gentab },
210 { imdi_k196, imdi_k196_gentab },
211 { imdi_k197, imdi_k197_gentab },
212 { imdi_k198, imdi_k198_gentab },
213 { imdi_k199, imdi_k199_gentab },
214 { imdi_k200, imdi_k200_gentab },
215 { imdi_k201, imdi_k201_gentab },
216 { imdi_k202, imdi_k202_gentab },
217 { imdi_k203, imdi_k203_gentab },
218 { imdi_k204, imdi_k204_gentab },
219 { imdi_k205, imdi_k205_gentab },
220 { imdi_k206, imdi_k206_gentab },
221 { imdi_k207, imdi_k207_gentab },
222 { imdi_k208, imdi_k208_gentab },
223 { imdi_k209, imdi_k209_gentab },
224 { imdi_k210, imdi_k210_gentab },
225 { imdi_k211, imdi_k211_gentab },
226 { imdi_k212, imdi_k212_gentab },
227 { imdi_k213, imdi_k213_gentab },
228 { imdi_k214, imdi_k214_gentab },
229 { imdi_k215, imdi_k215_gentab },
230 { imdi_k216, imdi_k216_gentab },
231 { imdi_k217, imdi_k217_gentab },
232 { imdi_k218, imdi_k218_gentab },
233 { imdi_k219, imdi_k219_gentab },
234 { imdi_k220, imdi_k220_gentab },
235 { imdi_k221, imdi_k221_gentab },
236 { imdi_k222, imdi_k222_gentab },
237 { imdi_k223, imdi_k223_gentab },
238 { imdi_k224, imdi_k224_gentab },
239 { imdi_k225, imdi_k225_gentab },
240 { imdi_k226, imdi_k226_gentab },
241 { imdi_k227, imdi_k227_gentab },
242 { imdi_k228, imdi_k228_gentab },
243 { imdi_k229, imdi_k229_gentab },
244 { imdi_k230, imdi_k230_gentab },
245 { imdi_k231, imdi_k231_gentab },
246 { imdi_k232, imdi_k232_gentab },
247 { imdi_k233, imdi_k233_gentab },
248 { imdi_k234, imdi_k234_gentab },
249 { imdi_k235, imdi_k235_gentab },
250 { imdi_k236, imdi_k236_gentab },
251 { imdi_k237, imdi_k237_gentab },
252 { imdi_k238, imdi_k238_gentab },
253 { imdi_k239, imdi_k239_gentab },
254 { imdi_k240, imdi_k240_gentab },
255 { imdi_k241, imdi_k241_gentab },
256 { imdi_k242, imdi_k242_gentab },
257 { imdi_k243, imdi_k243_gentab },
258 { imdi_k244, imdi_k244_gentab },
259 { imdi_k245, imdi_k245_gentab },
260 { imdi_k246, imdi_k246_gentab },
261 { imdi_k247, imdi_k247_gentab },
262 { imdi_k248, imdi_k248_gentab },
263 { imdi_k249, imdi_k249_gentab },
264 { imdi_k250, imdi_k250_gentab },
265 { imdi_k251, imdi_k251_gentab },
266 { imdi_k252, imdi_k252_gentab },
267 { imdi_k253, imdi_k253_gentab },
268 { imdi_k254, imdi_k254_gentab },
269 { imdi_k255, imdi_k255_gentab },
270 { imdi_k256, imdi_k256_gentab },
271 { imdi_k257, imdi_k257_gentab },
272 { imdi_k258, imdi_k258_gentab },
273 { imdi_k259, imdi_k259_gentab },
274 { imdi_k260, imdi_k260_gentab },
275 { imdi_k261, imdi_k261_gentab },
276 { imdi_k262, imdi_k262_gentab },
277 { imdi_k263, imdi_k263_gentab },
278 { imdi_k264, imdi_k264_gentab },
279 { imdi_k265, imdi_k265_gentab },
280 { imdi_k266, imdi_k266_gentab },
281 { imdi_k267, imdi_k267_gentab },
282 { imdi_k268, imdi_k268_gentab },
283 { imdi_k269, imdi_k269_gentab },
284 { imdi_k270, imdi_k270_gentab },
285 { imdi_k271, imdi_k271_gentab },
286 { imdi_k272, imdi_k272_gentab },
287 { imdi_k273, imdi_k273_gentab },
288 { imdi_k274, imdi_k274_gentab },
289 { imdi_k275, imdi_k275_gentab },
290 { imdi_k276, imdi_k276_gentab },
291 { imdi_k277, imdi_k277_gentab },
292 { imdi_k278, imdi_k278_gentab },
293 { imdi_k279, imdi_k279_gentab },
294 { imdi_k280, imdi_k280_gentab },
295 { imdi_k281, imdi_k281_gentab },
296 { imdi_k282, imdi_k282_gentab },
297 { imdi_k283, imdi_k283_gentab },
298 { imdi_k284, imdi_k284_gentab },
299 { imdi_k285, imdi_k285_gentab },
300 { imdi_k286, imdi_k286_gentab },
301 { imdi_k287, imdi_k287_gentab },
302 { imdi_k288, imdi_k288_gentab },
303 { imdi_k289, imdi_k289_gentab },
304 { imdi_k290, imdi_k290_gentab },
305 { imdi_k291, imdi_k291_gentab },
306 { imdi_k292, imdi_k292_gentab },
307 { imdi_k293, imdi_k293_gentab },
308 { imdi_k294, imdi_k294_gentab },
309 { imdi_k295, imdi_k295_gentab },
310 { imdi_k296, imdi_k296_gentab },
311 { imdi_k297, imdi_k297_gentab },
312 { imdi_k298, imdi_k298_gentab },
313 { imdi_k299, imdi_k299_gentab },
314 { imdi_k300, imdi_k300_gentab },
315 { imdi_k301, imdi_k301_gentab },
316 { imdi_k302, imdi_k302_gentab },
317 { imdi_k303, imdi_k303_gentab },
318 { imdi_k304, imdi_k304_gentab },
319 { imdi_k305, imdi_k305_gentab },
320 { imdi_k306, imdi_k306_gentab },
321 { imdi_k307, imdi_k307_gentab },
322 { imdi_k308, imdi_k308_gentab },
323 { imdi_k309, imdi_k309_gentab },
324 { imdi_k310, imdi_k310_gentab },
325 { imdi_k311, imdi_k311_gentab },
326 { imdi_k312, imdi_k312_gentab },
327 { imdi_k313, imdi_k313_gentab },
328 { imdi_k314, imdi_k314_gentab },
329 { imdi_k315, imdi_k315_gentab },
330 { imdi_k316, imdi_k316_gentab },
331 { imdi_k317, imdi_k317_gentab },
332 { imdi_k318, imdi_k318_gentab },
333 { imdi_k319, imdi_k319_gentab },
334 { imdi_k320, imdi_k320_gentab },
335 { imdi_k321, imdi_k321_gentab },
336 { imdi_k322, imdi_k322_gentab },
337 { imdi_k323, imdi_k323_gentab },
338 { imdi_k324, imdi_k324_gentab },
339 { imdi_k325, imdi_k325_gentab },
340 { imdi_k326, imdi_k326_gentab },
341 { imdi_k327, imdi_k327_gentab },
342 { imdi_k328, imdi_k328_gentab },
343 { imdi_k329, imdi_k329_gentab },
344 { imdi_k330, imdi_k330_gentab },
345 { imdi_k331, imdi_k331_gentab },
346 { imdi_k332, imdi_k332_gentab },
347 { imdi_k333, imdi_k333_gentab },
348 { imdi_k334, imdi_k334_gentab },
349 { imdi_k335, imdi_k335_gentab },
350 { imdi_k336, imdi_k336_gentab },
351 { imdi_k337, imdi_k337_gentab },
352 { imdi_k338, imdi_k338_gentab },
353 { imdi_k339, imdi_k339_gentab },
354 { imdi_k340, imdi_k340_gentab },
355 { imdi_k341, imdi_k341_gentab },
356 { imdi_k342, imdi_k342_gentab },
357 { imdi_k343, imdi_k343_gentab },
358 { imdi_k344, imdi_k344_gentab },
359 { imdi_k345, imdi_k345_gentab },
360 { imdi_k346, imdi_k346_gentab },
361 { imdi_k347, imdi_k347_gentab },
362 { imdi_k348, imdi_k348_gentab },
363 { imdi_k349, imdi_k349_gentab },
364 { imdi_k350, imdi_k350_gentab },
365 { imdi_k351, imdi_k351_gentab },
366 { imdi_k352, imdi_k352_gentab },
367 { imdi_k353, imdi_k353_gentab },
368 { imdi_k354, imdi_k354_gentab },
369 { imdi_k355, imdi_k355_gentab },
370 { imdi_k356, imdi_k356_gentab },
371 { imdi_k357, imdi_k357_gentab },
372 { imdi_k358, imdi_k358_gentab },
373 { imdi_k359, imdi_k359_gentab },
374 { imdi_k360, imdi_k360_gentab },
375 { imdi_k361, imdi_k361_gentab },
376 { imdi_k362, imdi_k362_gentab },
377 { imdi_k363, imdi_k363_gentab },
378 { imdi_k364, imdi_k364_gentab },
379 { imdi_k365, imdi_k365_gentab },
380 { imdi_k366, imdi_k366_gentab },
381 { imdi_k367, imdi_k367_gentab },
382 { imdi_k368, imdi_k368_gentab },
383 { imdi_k369, imdi_k369_gentab },
384 { imdi_k370, imdi_k370_gentab },
385 { imdi_k371, imdi_k371_gentab },
386 { imdi_k372, imdi_k372_gentab },
387 { imdi_k373, imdi_k373_gentab },
388 { imdi_k374, imdi_k374_gentab },
389 { imdi_k375, imdi_k375_gentab },
390 { imdi_k376, imdi_k376_gentab },
391 { imdi_k377, imdi_k377_gentab },
392 { imdi_k378, imdi_k378_gentab },
393 { imdi_k379, imdi_k379_gentab },
394 { imdi_k380, imdi_k380_gentab },
395 { imdi_k381, imdi_k381_gentab },
396 { imdi_k382, imdi_k382_gentab },
397 { imdi_k383, imdi_k383_gentab },
398 { imdi_k384, imdi_k384_gentab },
399 { imdi_k385, imdi_k385_gentab },
400 { imdi_k386, imdi_k386_gentab },
401 { imdi_k387, imdi_k387_gentab },
402 { imdi_k388, imdi_k388_gentab },
403 { imdi_k389, imdi_k389_gentab },
404 { imdi_k390, imdi_k390_gentab },
405 { imdi_k391, imdi_k391_gentab },
406 { imdi_k392, imdi_k392_gentab },
407 { imdi_k393, imdi_k393_gentab },
408 { imdi_k394, imdi_k394_gentab },
409 { imdi_k395, imdi_k395_gentab },
410 { imdi_k396, imdi_k396_gentab },
411 { imdi_k397, imdi_k397_gentab },
412 { imdi_k398, imdi_k398_gentab },
413 { imdi_k399, imdi_k399_gentab },
414 { imdi_k400, imdi_k400_gentab },
415 { imdi_k401, imdi_k401_gentab },
416 { imdi_k402, imdi_k402_gentab },
417 { imdi_k403, imdi_k403_gentab },
418 { imdi_k404, imdi_k404_gentab },
419 { imdi_k405, imdi_k405_gentab },
420 { imdi_k406, imdi_k406_gentab },
421 { imdi_k407, imdi_k407_gentab },
422 { imdi_k408, imdi_k408_gentab },
423 { imdi_k409, imdi_k409_gentab },
424 { imdi_k410, imdi_k410_gentab },
425 { imdi_k411, imdi_k411_gentab },
426 { imdi_k412, imdi_k412_gentab },
427 { imdi_k413, imdi_k413_gentab },
428 { imdi_k414, imdi_k414_gentab },
429 { imdi_k415, imdi_k415_gentab },
430 { imdi_k416, imdi_k416_gentab },
431 { imdi_k417, imdi_k417_gentab },
432 { imdi_k418, imdi_k418_gentab },
433 { imdi_k419, imdi_k419_gentab },
434 { imdi_k420, imdi_k420_gentab },
435 { imdi_k421, imdi_k421_gentab },
436 { imdi_k422, imdi_k422_gentab },
437 { imdi_k423, imdi_k423_gentab },
438 { imdi_k424, imdi_k424_gentab },
439 { imdi_k425, imdi_k425_gentab },
440 { imdi_k426, imdi_k426_gentab },
441 { imdi_k427, imdi_k427_gentab },
442 { imdi_k428, imdi_k428_gentab },
443 { imdi_k429, imdi_k429_gentab },
444 { imdi_k430, imdi_k430_gentab },
445 { imdi_k431, imdi_k431_gentab },
446 { imdi_k432, imdi_k432_gentab },
447 { imdi_k433, imdi_k433_gentab },
448 { imdi_k434, imdi_k434_gentab },
449 { imdi_k435, imdi_k435_gentab },
450 { imdi_k436, imdi_k436_gentab },
451 { imdi_k437, imdi_k437_gentab },
452 { imdi_k438, imdi_k438_gentab },
453 { imdi_k439, imdi_k439_gentab },
454 { imdi_k440, imdi_k440_gentab },
455 { imdi_k441, imdi_k441_gentab },
456 { imdi_k442, imdi_k442_gentab },
457 { imdi_k443, imdi_k443_gentab },
458 { imdi_k444, imdi_k444_gentab },
459 { imdi_k445, imdi_k445_gentab },
460 { imdi_k446, imdi_k446_gentab },
461 { imdi_k447, imdi_k447_gentab },
462 { imdi_k448, imdi_k448_gentab },
463 { imdi_k449, imdi_k449_gentab },
464 { imdi_k450, imdi_k450_gentab },
465 { imdi_k451, imdi_k451_gentab },
466 { imdi_k452, imdi_k452_gentab },
467 { imdi_k453, imdi_k453_gentab },
468 { imdi_k454, imdi_k454_gentab },
469 { imdi_k455, imdi_k455_gentab },
470 { imdi_k456, imdi_k456_gentab },
471 { imdi_k457, imdi_k457_gentab },
472 { imdi_k458, imdi_k458_gentab },
473 { imdi_k459, imdi_k459_gentab },
474 { imdi_k460, imdi_k460_gentab },
475 { imdi_k461, imdi_k461_gentab },
476 { imdi_k462, imdi_k462_gentab },
477 { imdi_k463, imdi_k463_gentab },
478 { imdi_k464, imdi_k464_gentab },
479 { imdi_k465, imdi_k465_gentab },
480 { imdi_k466, imdi_k466_gentab },
481 { imdi_k467, imdi_k467_gentab },
482 { imdi_k468, imdi_k468_gentab },
483 { imdi_k469, imdi_k469_gentab },
484 { imdi_k470, imdi_k470_gentab },
485 { imdi_k471, imdi_k471_gentab },
486 { imdi_k472, imdi_k472_gentab },
487 { imdi_k473, imdi_k473_gentab },
488 { imdi_k474, imdi_k474_gentab },
489 { imdi_k475, imdi_k475_gentab },
490 { imdi_k476, imdi_k476_gentab },
491 { imdi_k477, imdi_k477_gentab },
492 { imdi_k478, imdi_k478_gentab },
493 { imdi_k479, imdi_k479_gentab },
494 { imdi_k480, imdi_k480_gentab },
495 { imdi_k481, imdi_k481_gentab },
496 { imdi_k482, imdi_k482_gentab },
497 { imdi_k483, imdi_k483_gentab },
498 { imdi_k484, imdi_k484_gentab },
499 { imdi_k485, imdi_k485_gentab },
500 { imdi_k486, imdi_k486_gentab },
501 { imdi_k487, imdi_k487_gentab },
502 { imdi_k488, imdi_k488_gentab },
503 { imdi_k489, imdi_k489_gentab },
504 { imdi_k490, imdi_k490_gentab },
505 { imdi_k491, imdi_k491_gentab },
506 { imdi_k492, imdi_k492_gentab },
507 { imdi_k493, imdi_k493_gentab },
508 { imdi_k494, imdi_k494_gentab },
509 { imdi_k495, imdi_k495_gentab },
510 { imdi_k496, imdi_k496_gentab },
511 { imdi_k497, imdi_k497_gentab },
512 { imdi_k498, imdi_k498_gentab },
513 { imdi_k499, imdi_k499_gentab },
514 { imdi_k500, imdi_k500_gentab },
515 { imdi_k501, imdi_k501_gentab },
516 { imdi_k502, imdi_k502_gentab },
517 { imdi_k503, imdi_k503_gentab },
518 { imdi_k504, imdi_k504_gentab },
519 { imdi_k505, imdi_k505_gentab },
520 { imdi_k506, imdi_k506_gentab },
521 { imdi_k507, imdi_k507_gentab },
522 { imdi_k508, imdi_k508_gentab },
523 { imdi_k509, imdi_k509_gentab },
524 { imdi_k510, imdi_k510_gentab },
525 { imdi_k511, imdi_k511_gentab },
526 { imdi_k512, imdi_k512_gentab },
527 { imdi_k513, imdi_k513_gentab },
528 { imdi_k514, imdi_k514_gentab },
529 { imdi_k515, imdi_k515_gentab },
530 { imdi_k516, imdi_k516_gentab },
531 { imdi_k517, imdi_k517_gentab },
532 { imdi_k518, imdi_k518_gentab },
533 { imdi_k519, imdi_k519_gentab },
534 { imdi_k520, imdi_k520_gentab },
535 { imdi_k521, imdi_k521_gentab },
536 { imdi_k522, imdi_k522_gentab },
537 { imdi_k523, imdi_k523_gentab },
538 { imdi_k524, imdi_k524_gentab },
539 { imdi_k525, imdi_k525_gentab },
540 { imdi_k526, imdi_k526_gentab },
541 { imdi_k527, imdi_k527_gentab },
542 { imdi_k528, imdi_k528_gentab },
543 { imdi_k529, imdi_k529_gentab },
544 { imdi_k530, imdi_k530_gentab },
545 { imdi_k531, imdi_k531_gentab },
546 { imdi_k532, imdi_k532_gentab },
547 { imdi_k533, imdi_k533_gentab },
548 { imdi_k534, imdi_k534_gentab },
549 { imdi_k535, imdi_k535_gentab },
550 { imdi_k536, imdi_k536_gentab },
551 { imdi_k537, imdi_k537_gentab },
552 { imdi_k538, imdi_k538_gentab },
553 { imdi_k539, imdi_k539_gentab },
554 { imdi_k540, imdi_k540_gentab },
555 { imdi_k541, imdi_k541_gentab },
556 { imdi_k542, imdi_k542_gentab },
557 { imdi_k543, imdi_k543_gentab },
558 { imdi_k544, imdi_k544_gentab },
559 { imdi_k545, imdi_k545_gentab },
560 { imdi_k546, imdi_k546_gentab },
561 { imdi_k547, imdi_k547_gentab },
562 { imdi_k548, imdi_k548_gentab },
563 { imdi_k549, imdi_k549_gentab },
564 { imdi_k550, imdi_k550_gentab },
565 { imdi_k551, imdi_k551_gentab },
566 { imdi_k552, imdi_k552_gentab },
567 { imdi_k553, imdi_k553_gentab },
568 { imdi_k554, imdi_k554_gentab },
569 { imdi_k555, imdi_k555_gentab },
570 { imdi_k556, imdi_k556_gentab },
571 { imdi_k557, imdi_k557_gentab },
572 { imdi_k558, imdi_k558_gentab },
573 { imdi_k559, imdi_k559_gentab },
574 { imdi_k560, imdi_k560_gentab },
575 { imdi_k561, imdi_k561_gentab },
576 { imdi_k562, imdi_k562_gentab },
577 { imdi_k563, imdi_k563_gentab },
578 { imdi_k564, imdi_k564_gentab },
579 { imdi_k565, imdi_k565_gentab },
580 { imdi_k566, imdi_k566_gentab },
581 { imdi_k567, imdi_k567_gentab },
582 { imdi_k568, imdi_k568_gentab },
583 { imdi_k569, imdi_k569_gentab },
584 { imdi_k570, imdi_k570_gentab },
585 { imdi_k571, imdi_k571_gentab },
586 { imdi_k572, imdi_k572_gentab },
587 { imdi_k573, imdi_k573_gentab },
588 { imdi_k574, imdi_k574_gentab },
589 { imdi_k575, imdi_k575_gentab },
590 { imdi_k576, imdi_k576_gentab },
591 { imdi_k577, imdi_k577_gentab },
592 { imdi_k578, imdi_k578_gentab },
593 { imdi_k579, imdi_k579_gentab },
594 { imdi_k580, imdi_k580_gentab },
595 { imdi_k581, imdi_k581_gentab },
596 { imdi_k582, imdi_k582_gentab },
597 { imdi_k583, imdi_k583_gentab },
598 { imdi_k584, imdi_k584_gentab },
599 { imdi_k585, imdi_k585_gentab },
600 { imdi_k586, imdi_k586_gentab },
601 { imdi_k587, imdi_k587_gentab },
602 { imdi_k588, imdi_k588_gentab },
603 { imdi_k589, imdi_k589_gentab },
604 { imdi_k590, imdi_k590_gentab },
605 { imdi_k591, imdi_k591_gentab },
606 { imdi_k592, imdi_k592_gentab },
607 { imdi_k593, imdi_k593_gentab },
608 { imdi_k594, imdi_k594_gentab },
609 { imdi_k595, imdi_k595_gentab },
610 { imdi_k596, imdi_k596_gentab },
611 { imdi_k597, imdi_k597_gentab },
612 { imdi_k598, imdi_k598_gentab },
613 { imdi_k599, imdi_k599_gentab },
614 { imdi_k600, imdi_k600_gentab },
615 { imdi_k601, imdi_k601_gentab },
616 { imdi_k602, imdi_k602_gentab },
617 { imdi_k603, imdi_k603_gentab },
618 { imdi_k604, imdi_k604_gentab },
619 { imdi_k605, imdi_k605_gentab },
620 { imdi_k606, imdi_k606_gentab },
621 { imdi_k607, imdi_k607_gentab },
622 { imdi_k608, imdi_k608_gentab },
623 { imdi_k609, imdi_k609_gentab },
624 { imdi_k610, imdi_k610_gentab },
625 { imdi_k611, imdi_k611_gentab },
626 { imdi_k612, imdi_k612_gentab },
627 { imdi_k613, imdi_k613_gentab },
628 { imdi_k614, imdi_k614_gentab },
629 { imdi_k615, imdi_k615_gentab },
630 { imdi_k616, imdi_k616_gentab },
631 { imdi_k617, imdi_k617_gentab },
632 { imdi_k618, imdi_k618_gentab },
633 { imdi_k619, imdi_k619_gentab },
634 { imdi_k620, imdi_k620_gentab },
635 { imdi_k621, imdi_k621_gentab },
636 { imdi_k622, imdi_k622_gentab },
637 { imdi_k623, imdi_k623_gentab },
638 { imdi_k624, imdi_k624_gentab },
639 { imdi_k625, imdi_k625_gentab },
640 { imdi_k626, imdi_k626_gentab },
641 { imdi_k627, imdi_k627_gentab },
642 { imdi_k628, imdi_k628_gentab },
643 { imdi_k629, imdi_k629_gentab },
644 { imdi_k630, imdi_k630_gentab },
645 { imdi_k631, imdi_k631_gentab },
646 { imdi_k632, imdi_k632_gentab },
647 { imdi_k633, imdi_k633_gentab },
648 { imdi_k634, imdi_k634_gentab },
649 { imdi_k635, imdi_k635_gentab },
650 { imdi_k636, imdi_k636_gentab },
651 { imdi_k637, imdi_k637_gentab },
652 { imdi_k638, imdi_k638_gentab },
653 { imdi_k639, imdi_k639_gentab },
654 { imdi_k640, imdi_k640_gentab },
655 { imdi_k641, imdi_k641_gentab },
656 { imdi_k642, imdi_k642_gentab },
657 { imdi_k643, imdi_k643_gentab },
658 { imdi_k644, imdi_k644_gentab },
659 { imdi_k645, imdi_k645_gentab },
660 { imdi_k646, imdi_k646_gentab },
661 { imdi_k647, imdi_k647_gentab },
662 { imdi_k648, imdi_k648_gentab },
663 { imdi_k649, imdi_k649_gentab },
664 { imdi_k650, imdi_k650_gentab },
665 { imdi_k651, imdi_k651_gentab },
666 { imdi_k652, imdi_k652_gentab },
667 { imdi_k653, imdi_k653_gentab },
668 { imdi_k654, imdi_k654_gentab },
669 { imdi_k655, imdi_k655_gentab },
670 { imdi_k656, imdi_k656_gentab },
671 { imdi_k657, imdi_k657_gentab },
672 { imdi_k658, imdi_k658_gentab },
673 { imdi_k659, imdi_k659_gentab },
674 { imdi_k660, imdi_k660_gentab },
675 { imdi_k661, imdi_k661_gentab },
676 { imdi_k662, imdi_k662_gentab },
677 { imdi_k663, imdi_k663_gentab },
678 { imdi_k664, imdi_k664_gentab },
679 { imdi_k665, imdi_k665_gentab },
680 { imdi_k666, imdi_k666_gentab },
681 { imdi_k667, imdi_k667_gentab },
682 { imdi_k668, imdi_k668_gentab },
683 { imdi_k669, imdi_k669_gentab },
684 { imdi_k670, imdi_k670_gentab },
685 { imdi_k671, imdi_k671_gentab },
686 { imdi_k672, imdi_k672_gentab },
687 { imdi_k673, imdi_k673_gentab },
688 { imdi_k674, imdi_k674_gentab },
689 { imdi_k675, imdi_k675_gentab },
690 { imdi_k676, imdi_k676_gentab },
691 { imdi_k677, imdi_k677_gentab },
692 { imdi_k678, imdi_k678_gentab },
693 { imdi_k679, imdi_k679_gentab },
694 { imdi_k680, imdi_k680_gentab },
695 { imdi_k681, imdi_k681_gentab },
696 { imdi_k682, imdi_k682_gentab },
697 { imdi_k683, imdi_k683_gentab },
698 { imdi_k684, imdi_k684_gentab },
699 { imdi_k685, imdi_k685_gentab },
700 { imdi_k686, imdi_k686_gentab },
701 { imdi_k687, imdi_k687_gentab },
702 { imdi_k688, imdi_k688_gentab },
703 { imdi_k689, imdi_k689_gentab },
704 { imdi_k690, imdi_k690_gentab },
705 { imdi_k691, imdi_k691_gentab },
706 { imdi_k692, imdi_k692_gentab },
707 { imdi_k693, imdi_k693_gentab },
708 { imdi_k694, imdi_k694_gentab },
709 { imdi_k695, imdi_k695_gentab },
710 { imdi_k696, imdi_k696_gentab },
711 { imdi_k697, imdi_k697_gentab },
712 { imdi_k698, imdi_k698_gentab },
713 { imdi_k699, imdi_k699_gentab },
714 { imdi_k700, imdi_k700_gentab },
715 { imdi_k701, imdi_k701_gentab },
716 { imdi_k702, imdi_k702_gentab },
717 { imdi_k703, imdi_k703_gentab },
718 { imdi_k704, imdi_k704_gentab },
719 { imdi_k705, imdi_k705_gentab },
720 { imdi_k706, imdi_k706_gentab },
721 { imdi_k707, imdi_k707_gentab },
722 { imdi_k708, imdi_k708_gentab },
723 { imdi_k709, imdi_k709_gentab },
724 { imdi_k710, imdi_k710_gentab },
725 { imdi_k711, imdi_k711_gentab },
726 { imdi_k712, imdi_k712_gentab },
727 { imdi_k713, imdi_k713_gentab },
728 { imdi_k714, imdi_k714_gentab },
729 { imdi_k715, imdi_k715_gentab },
730 { imdi_k716, imdi_k716_gentab },
731 { imdi_k717, imdi_k717_gentab },
732 { imdi_k718, imdi_k718_gentab },
733 { imdi_k719, imdi_k719_gentab },
734 { imdi_k720, imdi_k720_gentab },
735 { imdi_k721, imdi_k721_gentab },
736 { imdi_k722, imdi_k722_gentab },
737 { imdi_k723, imdi_k723_gentab },
738 { imdi_k724, imdi_k724_gentab },
739 { imdi_k725, imdi_k725_gentab },
740 { imdi_k726, imdi_k726_gentab },
741 { imdi_k727, imdi_k727_gentab },
742 { imdi_k728, imdi_k728_gentab },
743 { imdi_k729, imdi_k729_gentab },
744 { imdi_k730, imdi_k730_gentab },
745 { imdi_k731, imdi_k731_gentab },
746 { imdi_k732, imdi_k732_gentab },
747 { imdi_k733, imdi_k733_gentab },
748 { imdi_k734, imdi_k734_gentab },
749 { imdi_k735, imdi_k735_gentab },
750 { imdi_k736, imdi_k736_gentab },
751 { imdi_k737, imdi_k737_gentab },
752 { imdi_k738, imdi_k738_gentab },
753 { imdi_k739, imdi_k739_gentab },
754 { imdi_k740, imdi_k740_gentab },
755 { imdi_k741, imdi_k741_gentab },
756 { imdi_k742, imdi_k742_gentab },
757 { imdi_k743, imdi_k743_gentab },
758 { imdi_k744, imdi_k744_gentab },
759 { imdi_k745, imdi_k745_gentab },
760 { imdi_k746, imdi_k746_gentab },
761 { imdi_k747, imdi_k747_gentab },
762 { imdi_k748, imdi_k748_gentab },
763 { imdi_k749, imdi_k749_gentab },
764 { imdi_k750, imdi_k750_gentab },
765 { imdi_k751, imdi_k751_gentab },
766 { imdi_k752, imdi_k752_gentab },
767 { imdi_k753, imdi_k753_gentab },
768 { imdi_k754, imdi_k754_gentab },
769 { imdi_k755, imdi_k755_gentab },
770 { imdi_k756, imdi_k756_gentab },
771 { imdi_k757, imdi_k757_gentab },
772 { imdi_k758, imdi_k758_gentab },
773 { imdi_k759, imdi_k759_gentab },
774 { imdi_k760, imdi_k760_gentab },
775 { imdi_k761, imdi_k761_gentab },
776 { imdi_k762, imdi_k762_gentab },
777 { imdi_k763, imdi_k763_gentab },
778 { imdi_k764, imdi_k764_gentab },
779 { imdi_k765, imdi_k765_gentab },
780 { imdi_k766, imdi_k766_gentab },
781 { imdi_k767, imdi_k767_gentab },
782 { imdi_k768, imdi_k768_gentab },
783 { imdi_k769, imdi_k769_gentab },
784 { imdi_k770, imdi_k770_gentab },
785 { imdi_k771, imdi_k771_gentab },
786 { imdi_k772, imdi_k772_gentab },
787 { imdi_k773, imdi_k773_gentab },
788 { imdi_k774, imdi_k774_gentab },
789 { imdi_k775, imdi_k775_gentab },
790 { imdi_k776, imdi_k776_gentab },
791 { imdi_k777, imdi_k777_gentab },
792 { imdi_k778, imdi_k778_gentab },
793 { imdi_k779, imdi_k779_gentab },
794 { imdi_k780, imdi_k780_gentab },
795 { imdi_k781, imdi_k781_gentab },
796 { imdi_k782, imdi_k782_gentab },
797 { imdi_k783, imdi_k783_gentab },
798 { imdi_k784, imdi_k784_gentab },
799 { imdi_k785, imdi_k785_gentab },
800 { imdi_k786, imdi_k786_gentab },
801 { imdi_k787, imdi_k787_gentab },
802 { imdi_k788, imdi_k788_gentab },
803 { imdi_k789, imdi_k789_gentab },
804 { imdi_k790, imdi_k790_gentab },
805 { imdi_k791, imdi_k791_gentab },
806 { imdi_k792, imdi_k792_gentab },
807 { imdi_k793, imdi_k793_gentab },
808 { imdi_k794, imdi_k794_gentab },
809 { imdi_k795, imdi_k795_gentab },
810 { imdi_k796, imdi_k796_gentab },
811 { imdi_k797, imdi_k797_gentab },
812 { imdi_k798, imdi_k798_gentab },
813 { imdi_k799, imdi_k799_gentab },
814 { imdi_k800, imdi_k800_gentab },
815 { imdi_k801, imdi_k801_gentab },
816 { imdi_k802, imdi_k802_gentab },
817 { imdi_k803, imdi_k803_gentab },
818 { imdi_k804, imdi_k804_gentab },
819 { imdi_k805, imdi_k805_gentab },
820 { imdi_k806, imdi_k806_gentab },
821 { imdi_k807, imdi_k807_gentab },
822 { imdi_k808, imdi_k808_gentab },
823 { imdi_k809, imdi_k809_gentab },
824 { imdi_k810, imdi_k810_gentab },
825 { imdi_k811, imdi_k811_gentab },
826 { imdi_k812, imdi_k812_gentab },
827 { imdi_k813, imdi_k813_gentab },
828 { imdi_k814, imdi_k814_gentab },
829 { imdi_k815, imdi_k815_gentab },
830 { imdi_k816, imdi_k816_gentab },
831 { imdi_k817, imdi_k817_gentab },
832 { imdi_k818, imdi_k818_gentab },
833 { imdi_k819, imdi_k819_gentab },
834 { imdi_k820, imdi_k820_gentab },
835 { imdi_k821, imdi_k821_gentab },
836 { imdi_k822, imdi_k822_gentab },
837 { imdi_k823, imdi_k823_gentab },
838 { imdi_k824, imdi_k824_gentab },
839 { imdi_k825, imdi_k825_gentab },
840 { imdi_k826, imdi_k826_gentab },
841 { imdi_k827, imdi_k827_gentab },
842 { imdi_k828, imdi_k828_gentab },
843 { imdi_k829, imdi_k829_gentab },
844 { imdi_k830, imdi_k830_gentab },
845 { imdi_k831, imdi_k831_gentab },
846 { imdi_k832, imdi_k832_gentab },
847 { imdi_k833, imdi_k833_gentab },
848 { imdi_k834, imdi_k834_gentab },
849 { imdi_k835, imdi_k835_gentab },
850 { imdi_k836, imdi_k836_gentab },
851 { imdi_k837, imdi_k837_gentab },
852 { imdi_k838, imdi_k838_gentab },
853 { imdi_k839, imdi_k839_gentab },
854 { imdi_k840, imdi_k840_gentab },
855 { imdi_k841, imdi_k841_gentab },
856 { imdi_k842, imdi_k842_gentab },
857 { imdi_k843, imdi_k843_gentab },
858 { imdi_k844, imdi_k844_gentab },
859 { imdi_k845, imdi_k845_gentab },
860 { imdi_k846, imdi_k846_gentab },
861 { imdi_k847, imdi_k847_gentab },
862 { imdi_k848, imdi_k848_gentab },
863 { imdi_k849, imdi_k849_gentab },
864 { imdi_k850, imdi_k850_gentab },
865 { imdi_k851, imdi_k851_gentab },
866 { imdi_k852, imdi_k852_gentab },
867 { imdi_k853, imdi_k853_gentab },
868 { imdi_k854, imdi_k854_gentab },
869 { imdi_k855, imdi_k855_gentab },
870 { imdi_k856, imdi_k856_gentab },
871 { imdi_k857, imdi_k857_gentab },
872 { imdi_k858, imdi_k858_gentab },
873 { imdi_k859, imdi_k859_gentab },
874 { imdi_k860, imdi_k860_gentab },
875 { imdi_k861, imdi_k861_gentab },
876 { imdi_k862, imdi_k862_gentab },
877 { imdi_k863, imdi_k863_gentab },
878 { imdi_k864, imdi_k864_gentab },
879 { imdi_k865, imdi_k865_gentab },
880 { imdi_k866, imdi_k866_gentab },
881 { imdi_k867, imdi_k867_gentab },
882 { imdi_k868, imdi_k868_gentab },
883 { imdi_k869, imdi_k869_gentab },
884 { imdi_k870, imdi_k870_gentab },
885 { imdi_k871, imdi_k871_gentab },
886 { imdi_k872, imdi_k872_gentab },
887 { imdi_k873, imdi_k873_gentab },
888 { imdi_k874, imdi_k874_gentab },
889 { imdi_k875, imdi_k875_gentab },
890 { imdi_k876, imdi_k876_gentab },
891 { imdi_k877, imdi_k877_gentab },
892 { imdi_k878, imdi_k878_gentab },
893 { imdi_k879, imdi_k879_gentab },
894 { imdi_k880, imdi_k880_gentab },
895 { imdi_k881, imdi_k881_gentab },
896 { imdi_k882, imdi_k882_gentab },
897 { imdi_k883, imdi_k883_gentab },
898 { imdi_k884, imdi_k884_gentab },
899 { imdi_k885, imdi_k885_gentab },
900 { imdi_k886, imdi_k886_gentab },
901 { imdi_k887, imdi_k887_gentab },
902 { imdi_k888, imdi_k888_gentab },
903 { imdi_k889, imdi_k889_gentab },
904 { imdi_k890, imdi_k890_gentab },
905 { imdi_k891, imdi_k891_gentab }
906 };
907
908 int no_kfuncs = 891;
909
+0
-527
install-sh less more
0 #!/bin/sh
1 # install - install a program, script, or datafile
2
3 scriptversion=2011-11-20.07; # UTC
4
5 # This originates from X11R5 (mit/util/scripts/install.sh), which was
6 # later released in X11R6 (xc/config/util/install.sh) with the
7 # following copyright and license.
8 #
9 # Copyright (C) 1994 X Consortium
10 #
11 # Permission is hereby granted, free of charge, to any person obtaining a copy
12 # of this software and associated documentation files (the "Software"), to
13 # deal in the Software without restriction, including without limitation the
14 # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
15 # sell copies of the Software, and to permit persons to whom the Software is
16 # furnished to do so, subject to the following conditions:
17 #
18 # The above copyright notice and this permission notice shall be included in
19 # all copies or substantial portions of the Software.
20 #
21 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24 # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
25 # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
26 # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 #
28 # Except as contained in this notice, the name of the X Consortium shall not
29 # be used in advertising or otherwise to promote the sale, use or other deal-
30 # ings in this Software without prior written authorization from the X Consor-
31 # tium.
32 #
33 #
34 # FSF changes to this file are in the public domain.
35 #
36 # Calling this script install-sh is preferred over install.sh, to prevent
37 # 'make' implicit rules from creating a file called install from it
38 # when there is no Makefile.
39 #
40 # This script is compatible with the BSD install script, but was written
41 # from scratch.
42
43 nl='
44 '
45 IFS=" "" $nl"
46
47 # set DOITPROG to echo to test this script
48
49 # Don't use :- since 4.3BSD and earlier shells don't like it.
50 doit=${DOITPROG-}
51 if test -z "$doit"; then
52 doit_exec=exec
53 else
54 doit_exec=$doit
55 fi
56
57 # Put in absolute file names if you don't have them in your path;
58 # or use environment vars.
59
60 chgrpprog=${CHGRPPROG-chgrp}
61 chmodprog=${CHMODPROG-chmod}
62 chownprog=${CHOWNPROG-chown}
63 cmpprog=${CMPPROG-cmp}
64 cpprog=${CPPROG-cp}
65 mkdirprog=${MKDIRPROG-mkdir}
66 mvprog=${MVPROG-mv}
67 rmprog=${RMPROG-rm}
68 stripprog=${STRIPPROG-strip}
69
70 posix_glob='?'
71 initialize_posix_glob='
72 test "$posix_glob" != "?" || {
73 if (set -f) 2>/dev/null; then
74 posix_glob=
75 else
76 posix_glob=:
77 fi
78 }
79 '
80
81 posix_mkdir=
82
83 # Desired mode of installed file.
84 mode=0755
85
86 chgrpcmd=
87 chmodcmd=$chmodprog
88 chowncmd=
89 mvcmd=$mvprog
90 rmcmd="$rmprog -f"
91 stripcmd=
92
93 src=
94 dst=
95 dir_arg=
96 dst_arg=
97
98 copy_on_change=false
99 no_target_directory=
100
101 usage="\
102 Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
103 or: $0 [OPTION]... SRCFILES... DIRECTORY
104 or: $0 [OPTION]... -t DIRECTORY SRCFILES...
105 or: $0 [OPTION]... -d DIRECTORIES...
106
107 In the 1st form, copy SRCFILE to DSTFILE.
108 In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
109 In the 4th, create DIRECTORIES.
110
111 Options:
112 --help display this help and exit.
113 --version display version info and exit.
114
115 -c (ignored)
116 -C install only if different (preserve the last data modification time)
117 -d create directories instead of installing files.
118 -g GROUP $chgrpprog installed files to GROUP.
119 -m MODE $chmodprog installed files to MODE.
120 -o USER $chownprog installed files to USER.
121 -s $stripprog installed files.
122 -t DIRECTORY install into DIRECTORY.
123 -T report an error if DSTFILE is a directory.
124
125 Environment variables override the default commands:
126 CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
127 RMPROG STRIPPROG
128 "
129
130 while test $# -ne 0; do
131 case $1 in
132 -c) ;;
133
134 -C) copy_on_change=true;;
135
136 -d) dir_arg=true;;
137
138 -g) chgrpcmd="$chgrpprog $2"
139 shift;;
140
141 --help) echo "$usage"; exit $?;;
142
143 -m) mode=$2
144 case $mode in
145 *' '* | *' '* | *'
146 '* | *'*'* | *'?'* | *'['*)
147 echo "$0: invalid mode: $mode" >&2
148 exit 1;;
149 esac
150 shift;;
151
152 -o) chowncmd="$chownprog $2"
153 shift;;
154
155 -s) stripcmd=$stripprog;;
156
157 -t) dst_arg=$2
158 # Protect names problematic for 'test' and other utilities.
159 case $dst_arg in
160 -* | [=\(\)!]) dst_arg=./$dst_arg;;
161 esac
162 shift;;
163
164 -T) no_target_directory=true;;
165
166 --version) echo "$0 $scriptversion"; exit $?;;
167
168 --) shift
169 break;;
170
171 -*) echo "$0: invalid option: $1" >&2
172 exit 1;;
173
174 *) break;;
175 esac
176 shift
177 done
178
179 if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
180 # When -d is used, all remaining arguments are directories to create.
181 # When -t is used, the destination is already specified.
182 # Otherwise, the last argument is the destination. Remove it from $@.
183 for arg
184 do
185 if test -n "$dst_arg"; then
186 # $@ is not empty: it contains at least $arg.
187 set fnord "$@" "$dst_arg"
188 shift # fnord
189 fi
190 shift # arg
191 dst_arg=$arg
192 # Protect names problematic for 'test' and other utilities.
193 case $dst_arg in
194 -* | [=\(\)!]) dst_arg=./$dst_arg;;
195 esac
196 done
197 fi
198
199 if test $# -eq 0; then
200 if test -z "$dir_arg"; then
201 echo "$0: no input file specified." >&2
202 exit 1
203 fi
204 # It's OK to call 'install-sh -d' without argument.
205 # This can happen when creating conditional directories.
206 exit 0
207 fi
208
209 if test -z "$dir_arg"; then
210 do_exit='(exit $ret); exit $ret'
211 trap "ret=129; $do_exit" 1
212 trap "ret=130; $do_exit" 2
213 trap "ret=141; $do_exit" 13
214 trap "ret=143; $do_exit" 15
215
216 # Set umask so as not to create temps with too-generous modes.
217 # However, 'strip' requires both read and write access to temps.
218 case $mode in
219 # Optimize common cases.
220 *644) cp_umask=133;;
221 *755) cp_umask=22;;
222
223 *[0-7])
224 if test -z "$stripcmd"; then
225 u_plus_rw=
226 else
227 u_plus_rw='% 200'
228 fi
229 cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
230 *)
231 if test -z "$stripcmd"; then
232 u_plus_rw=
233 else
234 u_plus_rw=,u+rw
235 fi
236 cp_umask=$mode$u_plus_rw;;
237 esac
238 fi
239
240 for src
241 do
242 # Protect names problematic for 'test' and other utilities.
243 case $src in
244 -* | [=\(\)!]) src=./$src;;
245 esac
246
247 if test -n "$dir_arg"; then
248 dst=$src
249 dstdir=$dst
250 test -d "$dstdir"
251 dstdir_status=$?
252 else
253
254 # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
255 # might cause directories to be created, which would be especially bad
256 # if $src (and thus $dsttmp) contains '*'.
257 if test ! -f "$src" && test ! -d "$src"; then
258 echo "$0: $src does not exist." >&2
259 exit 1
260 fi
261
262 if test -z "$dst_arg"; then
263 echo "$0: no destination specified." >&2
264 exit 1
265 fi
266 dst=$dst_arg
267
268 # If destination is a directory, append the input filename; won't work
269 # if double slashes aren't ignored.
270 if test -d "$dst"; then
271 if test -n "$no_target_directory"; then
272 echo "$0: $dst_arg: Is a directory" >&2
273 exit 1
274 fi
275 dstdir=$dst
276 dst=$dstdir/`basename "$src"`
277 dstdir_status=0
278 else
279 # Prefer dirname, but fall back on a substitute if dirname fails.
280 dstdir=`
281 (dirname "$dst") 2>/dev/null ||
282 expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
283 X"$dst" : 'X\(//\)[^/]' \| \
284 X"$dst" : 'X\(//\)$' \| \
285 X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
286 echo X"$dst" |
287 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
288 s//\1/
289 q
290 }
291 /^X\(\/\/\)[^/].*/{
292 s//\1/
293 q
294 }
295 /^X\(\/\/\)$/{
296 s//\1/
297 q
298 }
299 /^X\(\/\).*/{
300 s//\1/
301 q
302 }
303 s/.*/./; q'
304 `
305
306 test -d "$dstdir"
307 dstdir_status=$?
308 fi
309 fi
310
311 obsolete_mkdir_used=false
312
313 if test $dstdir_status != 0; then
314 case $posix_mkdir in
315 '')
316 # Create intermediate dirs using mode 755 as modified by the umask.
317 # This is like FreeBSD 'install' as of 1997-10-28.
318 umask=`umask`
319 case $stripcmd.$umask in
320 # Optimize common cases.
321 *[2367][2367]) mkdir_umask=$umask;;
322 .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
323
324 *[0-7])
325 mkdir_umask=`expr $umask + 22 \
326 - $umask % 100 % 40 + $umask % 20 \
327 - $umask % 10 % 4 + $umask % 2
328 `;;
329 *) mkdir_umask=$umask,go-w;;
330 esac
331
332 # With -d, create the new directory with the user-specified mode.
333 # Otherwise, rely on $mkdir_umask.
334 if test -n "$dir_arg"; then
335 mkdir_mode=-m$mode
336 else
337 mkdir_mode=
338 fi
339
340 posix_mkdir=false
341 case $umask in
342 *[123567][0-7][0-7])
343 # POSIX mkdir -p sets u+wx bits regardless of umask, which
344 # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
345 ;;
346 *)
347 tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
348 trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
349
350 if (umask $mkdir_umask &&
351 exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
352 then
353 if test -z "$dir_arg" || {
354 # Check for POSIX incompatibilities with -m.
355 # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
356 # other-writable bit of parent directory when it shouldn't.
357 # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
358 ls_ld_tmpdir=`ls -ld "$tmpdir"`
359 case $ls_ld_tmpdir in
360 d????-?r-*) different_mode=700;;
361 d????-?--*) different_mode=755;;
362 *) false;;
363 esac &&
364 $mkdirprog -m$different_mode -p -- "$tmpdir" && {
365 ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
366 test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
367 }
368 }
369 then posix_mkdir=:
370 fi
371 rmdir "$tmpdir/d" "$tmpdir"
372 else
373 # Remove any dirs left behind by ancient mkdir implementations.
374 rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
375 fi
376 trap '' 0;;
377 esac;;
378 esac
379
380 if
381 $posix_mkdir && (
382 umask $mkdir_umask &&
383 $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
384 )
385 then :
386 else
387
388 # The umask is ridiculous, or mkdir does not conform to POSIX,
389 # or it failed possibly due to a race condition. Create the
390 # directory the slow way, step by step, checking for races as we go.
391
392 case $dstdir in
393 /*) prefix='/';;
394 [-=\(\)!]*) prefix='./';;
395 *) prefix='';;
396 esac
397
398 eval "$initialize_posix_glob"
399
400 oIFS=$IFS
401 IFS=/
402 $posix_glob set -f
403 set fnord $dstdir
404 shift
405 $posix_glob set +f
406 IFS=$oIFS
407
408 prefixes=
409
410 for d
411 do
412 test X"$d" = X && continue
413
414 prefix=$prefix$d
415 if test -d "$prefix"; then
416 prefixes=
417 else
418 if $posix_mkdir; then
419 (umask=$mkdir_umask &&
420 $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
421 # Don't fail if two instances are running concurrently.
422 test -d "$prefix" || exit 1
423 else
424 case $prefix in
425 *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
426 *) qprefix=$prefix;;
427 esac
428 prefixes="$prefixes '$qprefix'"
429 fi
430 fi
431 prefix=$prefix/
432 done
433
434 if test -n "$prefixes"; then
435 # Don't fail if two instances are running concurrently.
436 (umask $mkdir_umask &&
437 eval "\$doit_exec \$mkdirprog $prefixes") ||
438 test -d "$dstdir" || exit 1
439 obsolete_mkdir_used=true
440 fi
441 fi
442 fi
443
444 if test -n "$dir_arg"; then
445 { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
446 { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
447 { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
448 test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
449 else
450
451 # Make a couple of temp file names in the proper directory.
452 dsttmp=$dstdir/_inst.$$_
453 rmtmp=$dstdir/_rm.$$_
454
455 # Trap to clean up those temp files at exit.
456 trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
457
458 # Copy the file name to the temp name.
459 (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
460
461 # and set any options; do chmod last to preserve setuid bits.
462 #
463 # If any of these fail, we abort the whole thing. If we want to
464 # ignore errors from any of these, just make sure not to ignore
465 # errors from the above "$doit $cpprog $src $dsttmp" command.
466 #
467 { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
468 { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
469 { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
470 { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
471
472 # If -C, don't bother to copy if it wouldn't change the file.
473 if $copy_on_change &&
474 old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
475 new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
476
477 eval "$initialize_posix_glob" &&
478 $posix_glob set -f &&
479 set X $old && old=:$2:$4:$5:$6 &&
480 set X $new && new=:$2:$4:$5:$6 &&
481 $posix_glob set +f &&
482
483 test "$old" = "$new" &&
484 $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
485 then
486 rm -f "$dsttmp"
487 else
488 # Rename the file to the real destination.
489 $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
490
491 # The rename failed, perhaps because mv can't rename something else
492 # to itself, or perhaps because mv is so ancient that it does not
493 # support -f.
494 {
495 # Now remove or move aside any old file at destination location.
496 # We try this two ways since rm can't unlink itself on some
497 # systems and the destination file might be busy for other
498 # reasons. In this case, the final cleanup might fail but the new
499 # file should still install successfully.
500 {
501 test ! -f "$dst" ||
502 $doit $rmcmd -f "$dst" 2>/dev/null ||
503 { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
504 { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
505 } ||
506 { echo "$0: cannot unlink or rename $dst" >&2
507 (exit 1); exit 1
508 }
509 } &&
510
511 # Now rename the file to the real destination.
512 $doit $mvcmd "$dsttmp" "$dst"
513 }
514 fi || exit 1
515
516 trap '' 0
517 fi
518 done
519
520 # Local variables:
521 # eval: (add-hook 'write-file-hooks 'time-stamp)
522 # time-stamp-start: "scriptversion="
523 # time-stamp-format: "%:y-%02m-%02d.%02H"
524 # time-stamp-time-zone: "UTC"
525 # time-stamp-end: "; # UTC"
526 # End:
+0
-15
jcnf/Makefile.am less more
0 include $(top_srcdir)/Makefile.shared
1
2 SUBDIRS = $(YAJL_SUBDIRS)
3
4 privatelib_LTLIBRARIES = libjcnf.la
5 privatelibdir = $(pkglibdir)
6
7 libjcnf_la_SOURCES = jcnf.h jcnf.c
8 libjcnf_la_LIBADD = $(YAJL_LIBS)
9
10 LDADD = ./libjcnf.la $(YAJL_LIBS)
11
12 check_PROGRAMS = test
13
14 EXTRA_DIST = Readme.txt
+0
-13
jcnf/yajl/Makefile.am less more
0 include $(top_srcdir)/Makefile.shared
1
2 privatelib_LTLIBRARIES = libyajl.la
3 privatelibdir = $(pkglibdir)
4
5 libyajl_la_SOURCES = yajl_common.h yajl_gen.h yajl_parse.h yajl.c \
6 yajl_alloc.c yajl_alloc.h yajl_buf.c yajl_buf.h yajl_encode.c \
7 yajl_encode.h yajl_gen.c yajl_lex.c yajl_lex.h yajl_parser.c \
8 yajl_parser.h
9
10 LDADD = ./libyajl.la
11
12 check_PROGRAMS = yajl_test json_verify
+0
-11
link/Makefile.am less more
0 include $(top_srcdir)/Makefile.shared
1
2 LDADD = ../spectro/libinsttypes.la ../xicc/libxicc.la \
3 ../xicc/libxutils.la ../gamut/libgamut.la \
4 ../gamut/libgammap.la ../plot/libplot.la ../plot/libvrml.la \
5 ../rspl/librspl.la $(ICC_LIBS) ../cgats/libcgats.la \
6 ../numlib/libargyllnum.la ../libargyll.la $(X_LIBS) $(TIFF_LIBS)
7
8 bin_PROGRAMS = collink pathplot
9
10 EXTRA_DIST = License.txt Readme.txt
+0
-7991
m4/libtool.m4 less more
0 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1 #
2 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
3 # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
4 # Foundation, Inc.
5 # Written by Gordon Matzigkeit, 1996
6 #
7 # This file is free software; the Free Software Foundation gives
8 # unlimited permission to copy and/or distribute it, with or without
9 # modifications, as long as this notice is preserved.
10
11 m4_define([_LT_COPYING], [dnl
12 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
13 # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
14 # Foundation, Inc.
15 # Written by Gordon Matzigkeit, 1996
16 #
17 # This file is part of GNU Libtool.
18 #
19 # GNU Libtool is free software; you can redistribute it and/or
20 # modify it under the terms of the GNU General Public License as
21 # published by the Free Software Foundation; either version 2 of
22 # the License, or (at your option) any later version.
23 #
24 # As a special exception to the GNU General Public License,
25 # if you distribute this file as part of a program or library that
26 # is built using GNU Libtool, you may include this file under the
27 # same distribution terms that you use for the rest of that program.
28 #
29 # GNU Libtool is distributed in the hope that it will be useful,
30 # but WITHOUT ANY WARRANTY; without even the implied warranty of
31 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32 # GNU General Public License for more details.
33 #
34 # You should have received a copy of the GNU General Public License
35 # along with GNU Libtool; see the file COPYING. If not, a copy
36 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
37 # obtained by writing to the Free Software Foundation, Inc.,
38 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
39 ])
40
41 # serial 57 LT_INIT
42
43
44 # LT_PREREQ(VERSION)
45 # ------------------
46 # Complain and exit if this libtool version is less that VERSION.
47 m4_defun([LT_PREREQ],
48 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
49 [m4_default([$3],
50 [m4_fatal([Libtool version $1 or higher is required],
51 63)])],
52 [$2])])
53
54
55 # _LT_CHECK_BUILDDIR
56 # ------------------
57 # Complain if the absolute build directory name contains unusual characters
58 m4_defun([_LT_CHECK_BUILDDIR],
59 [case `pwd` in
60 *\ * | *\ *)
61 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
62 esac
63 ])
64
65
66 # LT_INIT([OPTIONS])
67 # ------------------
68 AC_DEFUN([LT_INIT],
69 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
70 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
71 AC_BEFORE([$0], [LT_LANG])dnl
72 AC_BEFORE([$0], [LT_OUTPUT])dnl
73 AC_BEFORE([$0], [LTDL_INIT])dnl
74 m4_require([_LT_CHECK_BUILDDIR])dnl
75
76 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
77 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
78 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
79 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
80 dnl unless we require an AC_DEFUNed macro:
81 AC_REQUIRE([LTOPTIONS_VERSION])dnl
82 AC_REQUIRE([LTSUGAR_VERSION])dnl
83 AC_REQUIRE([LTVERSION_VERSION])dnl
84 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
85 m4_require([_LT_PROG_LTMAIN])dnl
86
87 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
88
89 dnl Parse OPTIONS
90 _LT_SET_OPTIONS([$0], [$1])
91
92 # This can be used to rebuild libtool when needed
93 LIBTOOL_DEPS="$ltmain"
94
95 # Always use our own libtool.
96 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
97 AC_SUBST(LIBTOOL)dnl
98
99 _LT_SETUP
100
101 # Only expand once:
102 m4_define([LT_INIT])
103 ])# LT_INIT
104
105 # Old names:
106 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
107 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
108 dnl aclocal-1.4 backwards compatibility:
109 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
110 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
111
112
113 # _LT_CC_BASENAME(CC)
114 # -------------------
115 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
116 m4_defun([_LT_CC_BASENAME],
117 [for cc_temp in $1""; do
118 case $cc_temp in
119 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
120 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
121 \-*) ;;
122 *) break;;
123 esac
124 done
125 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
126 ])
127
128
129 # _LT_FILEUTILS_DEFAULTS
130 # ----------------------
131 # It is okay to use these file commands and assume they have been set
132 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
133 m4_defun([_LT_FILEUTILS_DEFAULTS],
134 [: ${CP="cp -f"}
135 : ${MV="mv -f"}
136 : ${RM="rm -f"}
137 ])# _LT_FILEUTILS_DEFAULTS
138
139
140 # _LT_SETUP
141 # ---------
142 m4_defun([_LT_SETUP],
143 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
144 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
145 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
146 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
147
148 _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
149 dnl
150 _LT_DECL([], [host_alias], [0], [The host system])dnl
151 _LT_DECL([], [host], [0])dnl
152 _LT_DECL([], [host_os], [0])dnl
153 dnl
154 _LT_DECL([], [build_alias], [0], [The build system])dnl
155 _LT_DECL([], [build], [0])dnl
156 _LT_DECL([], [build_os], [0])dnl
157 dnl
158 AC_REQUIRE([AC_PROG_CC])dnl
159 AC_REQUIRE([LT_PATH_LD])dnl
160 AC_REQUIRE([LT_PATH_NM])dnl
161 dnl
162 AC_REQUIRE([AC_PROG_LN_S])dnl
163 test -z "$LN_S" && LN_S="ln -s"
164 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
165 dnl
166 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
167 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
168 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
169 dnl
170 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
171 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
172 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
173 m4_require([_LT_CMD_RELOAD])dnl
174 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
175 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
176 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
177 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
178 m4_require([_LT_WITH_SYSROOT])dnl
179
180 _LT_CONFIG_LIBTOOL_INIT([
181 # See if we are running on zsh, and set the options which allow our
182 # commands through without removal of \ escapes INIT.
183 if test -n "\${ZSH_VERSION+set}" ; then
184 setopt NO_GLOB_SUBST
185 fi
186 ])
187 if test -n "${ZSH_VERSION+set}" ; then
188 setopt NO_GLOB_SUBST
189 fi
190
191 _LT_CHECK_OBJDIR
192
193 m4_require([_LT_TAG_COMPILER])dnl
194
195 case $host_os in
196 aix3*)
197 # AIX sometimes has problems with the GCC collect2 program. For some
198 # reason, if we set the COLLECT_NAMES environment variable, the problems
199 # vanish in a puff of smoke.
200 if test "X${COLLECT_NAMES+set}" != Xset; then
201 COLLECT_NAMES=
202 export COLLECT_NAMES
203 fi
204 ;;
205 esac
206
207 # Global variables:
208 ofile=libtool
209 can_build_shared=yes
210
211 # All known linkers require a `.a' archive for static linking (except MSVC,
212 # which needs '.lib').
213 libext=a
214
215 with_gnu_ld="$lt_cv_prog_gnu_ld"
216
217 old_CC="$CC"
218 old_CFLAGS="$CFLAGS"
219
220 # Set sane defaults for various variables
221 test -z "$CC" && CC=cc
222 test -z "$LTCC" && LTCC=$CC
223 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
224 test -z "$LD" && LD=ld
225 test -z "$ac_objext" && ac_objext=o
226
227 _LT_CC_BASENAME([$compiler])
228
229 # Only perform the check for file, if the check method requires it
230 test -z "$MAGIC_CMD" && MAGIC_CMD=file
231 case $deplibs_check_method in
232 file_magic*)
233 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
234 _LT_PATH_MAGIC
235 fi
236 ;;
237 esac
238
239 # Use C for the default configuration in the libtool script
240 LT_SUPPORTED_TAG([CC])
241 _LT_LANG_C_CONFIG
242 _LT_LANG_DEFAULT_CONFIG
243 _LT_CONFIG_COMMANDS
244 ])# _LT_SETUP
245
246
247 # _LT_PREPARE_SED_QUOTE_VARS
248 # --------------------------
249 # Define a few sed substitution that help us do robust quoting.
250 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
251 [# Backslashify metacharacters that are still active within
252 # double-quoted strings.
253 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
254
255 # Same as above, but do not quote variable references.
256 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
257
258 # Sed substitution to delay expansion of an escaped shell variable in a
259 # double_quote_subst'ed string.
260 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
261
262 # Sed substitution to delay expansion of an escaped single quote.
263 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
264
265 # Sed substitution to avoid accidental globbing in evaled expressions
266 no_glob_subst='s/\*/\\\*/g'
267 ])
268
269 # _LT_PROG_LTMAIN
270 # ---------------
271 # Note that this code is called both from `configure', and `config.status'
272 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
273 # `config.status' has no value for ac_aux_dir unless we are using Automake,
274 # so we pass a copy along to make sure it has a sensible value anyway.
275 m4_defun([_LT_PROG_LTMAIN],
276 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
277 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
278 ltmain="$ac_aux_dir/ltmain.sh"
279 ])# _LT_PROG_LTMAIN
280
281
282 ## ------------------------------------- ##
283 ## Accumulate code for creating libtool. ##
284 ## ------------------------------------- ##
285
286 # So that we can recreate a full libtool script including additional
287 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
288 # in macros and then make a single call at the end using the `libtool'
289 # label.
290
291
292 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
293 # ----------------------------------------
294 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
295 m4_define([_LT_CONFIG_LIBTOOL_INIT],
296 [m4_ifval([$1],
297 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
298 [$1
299 ])])])
300
301 # Initialize.
302 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
303
304
305 # _LT_CONFIG_LIBTOOL([COMMANDS])
306 # ------------------------------
307 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
308 m4_define([_LT_CONFIG_LIBTOOL],
309 [m4_ifval([$1],
310 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
311 [$1
312 ])])])
313
314 # Initialize.
315 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
316
317
318 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
319 # -----------------------------------------------------
320 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
321 [_LT_CONFIG_LIBTOOL([$1])
322 _LT_CONFIG_LIBTOOL_INIT([$2])
323 ])
324
325
326 # _LT_FORMAT_COMMENT([COMMENT])
327 # -----------------------------
328 # Add leading comment marks to the start of each line, and a trailing
329 # full-stop to the whole comment if one is not present already.
330 m4_define([_LT_FORMAT_COMMENT],
331 [m4_ifval([$1], [
332 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
333 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
334 )])
335
336
337
338 ## ------------------------ ##
339 ## FIXME: Eliminate VARNAME ##
340 ## ------------------------ ##
341
342
343 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
344 # -------------------------------------------------------------------
345 # CONFIGNAME is the name given to the value in the libtool script.
346 # VARNAME is the (base) name used in the configure script.
347 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
348 # VARNAME. Any other value will be used directly.
349 m4_define([_LT_DECL],
350 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
351 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
352 [m4_ifval([$1], [$1], [$2])])
353 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
354 m4_ifval([$4],
355 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
356 lt_dict_add_subkey([lt_decl_dict], [$2],
357 [tagged?], [m4_ifval([$5], [yes], [no])])])
358 ])
359
360
361 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
362 # --------------------------------------------------------
363 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
364
365
366 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
367 # ------------------------------------------------
368 m4_define([lt_decl_tag_varnames],
369 [_lt_decl_filter([tagged?], [yes], $@)])
370
371
372 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
373 # ---------------------------------------------------------
374 m4_define([_lt_decl_filter],
375 [m4_case([$#],
376 [0], [m4_fatal([$0: too few arguments: $#])],
377 [1], [m4_fatal([$0: too few arguments: $#: $1])],
378 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
379 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
380 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
381 ])
382
383
384 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
385 # --------------------------------------------------
386 m4_define([lt_decl_quote_varnames],
387 [_lt_decl_filter([value], [1], $@)])
388
389
390 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
391 # ---------------------------------------------------
392 m4_define([lt_decl_dquote_varnames],
393 [_lt_decl_filter([value], [2], $@)])
394
395
396 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
397 # ---------------------------------------------------
398 m4_define([lt_decl_varnames_tagged],
399 [m4_assert([$# <= 2])dnl
400 _$0(m4_quote(m4_default([$1], [[, ]])),
401 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
402 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
403 m4_define([_lt_decl_varnames_tagged],
404 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
405
406
407 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
408 # ------------------------------------------------
409 m4_define([lt_decl_all_varnames],
410 [_$0(m4_quote(m4_default([$1], [[, ]])),
411 m4_if([$2], [],
412 m4_quote(lt_decl_varnames),
413 m4_quote(m4_shift($@))))[]dnl
414 ])
415 m4_define([_lt_decl_all_varnames],
416 [lt_join($@, lt_decl_varnames_tagged([$1],
417 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
418 ])
419
420
421 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
422 # ------------------------------------
423 # Quote a variable value, and forward it to `config.status' so that its
424 # declaration there will have the same value as in `configure'. VARNAME
425 # must have a single quote delimited value for this to work.
426 m4_define([_LT_CONFIG_STATUS_DECLARE],
427 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
428
429
430 # _LT_CONFIG_STATUS_DECLARATIONS
431 # ------------------------------
432 # We delimit libtool config variables with single quotes, so when
433 # we write them to config.status, we have to be sure to quote all
434 # embedded single quotes properly. In configure, this macro expands
435 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
436 #
437 # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
438 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
439 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
440 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
441
442
443 # _LT_LIBTOOL_TAGS
444 # ----------------
445 # Output comment and list of tags supported by the script
446 m4_defun([_LT_LIBTOOL_TAGS],
447 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
448 available_tags="_LT_TAGS"dnl
449 ])
450
451
452 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
453 # -----------------------------------
454 # Extract the dictionary values for VARNAME (optionally with TAG) and
455 # expand to a commented shell variable setting:
456 #
457 # # Some comment about what VAR is for.
458 # visible_name=$lt_internal_name
459 m4_define([_LT_LIBTOOL_DECLARE],
460 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
461 [description])))[]dnl
462 m4_pushdef([_libtool_name],
463 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
464 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
465 [0], [_libtool_name=[$]$1],
466 [1], [_libtool_name=$lt_[]$1],
467 [2], [_libtool_name=$lt_[]$1],
468 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
469 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
470 ])
471
472
473 # _LT_LIBTOOL_CONFIG_VARS
474 # -----------------------
475 # Produce commented declarations of non-tagged libtool config variables
476 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
477 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
478 # section) are produced by _LT_LIBTOOL_TAG_VARS.
479 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
480 [m4_foreach([_lt_var],
481 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
482 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
483
484
485 # _LT_LIBTOOL_TAG_VARS(TAG)
486 # -------------------------
487 m4_define([_LT_LIBTOOL_TAG_VARS],
488 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
489 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
490
491
492 # _LT_TAGVAR(VARNAME, [TAGNAME])
493 # ------------------------------
494 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
495
496
497 # _LT_CONFIG_COMMANDS
498 # -------------------
499 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
500 # variables for single and double quote escaping we saved from calls
501 # to _LT_DECL, we can put quote escaped variables declarations
502 # into `config.status', and then the shell code to quote escape them in
503 # for loops in `config.status'. Finally, any additional code accumulated
504 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
505 m4_defun([_LT_CONFIG_COMMANDS],
506 [AC_PROVIDE_IFELSE([LT_OUTPUT],
507 dnl If the libtool generation code has been placed in $CONFIG_LT,
508 dnl instead of duplicating it all over again into config.status,
509 dnl then we will have config.status run $CONFIG_LT later, so it
510 dnl needs to know what name is stored there:
511 [AC_CONFIG_COMMANDS([libtool],
512 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
513 dnl If the libtool generation code is destined for config.status,
514 dnl expand the accumulated commands and init code now:
515 [AC_CONFIG_COMMANDS([libtool],
516 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
517 ])#_LT_CONFIG_COMMANDS
518
519
520 # Initialize.
521 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
522 [
523
524 # The HP-UX ksh and POSIX shell print the target directory to stdout
525 # if CDPATH is set.
526 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
527
528 sed_quote_subst='$sed_quote_subst'
529 double_quote_subst='$double_quote_subst'
530 delay_variable_subst='$delay_variable_subst'
531 _LT_CONFIG_STATUS_DECLARATIONS
532 LTCC='$LTCC'
533 LTCFLAGS='$LTCFLAGS'
534 compiler='$compiler_DEFAULT'
535
536 # A function that is used when there is no print builtin or printf.
537 func_fallback_echo ()
538 {
539 eval 'cat <<_LTECHO_EOF
540 \$[]1
541 _LTECHO_EOF'
542 }
543
544 # Quote evaled strings.
545 for var in lt_decl_all_varnames([[ \
546 ]], lt_decl_quote_varnames); do
547 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
548 *[[\\\\\\\`\\"\\\$]]*)
549 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
550 ;;
551 *)
552 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
553 ;;
554 esac
555 done
556
557 # Double-quote double-evaled strings.
558 for var in lt_decl_all_varnames([[ \
559 ]], lt_decl_dquote_varnames); do
560 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
561 *[[\\\\\\\`\\"\\\$]]*)
562 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
563 ;;
564 *)
565 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
566 ;;
567 esac
568 done
569
570 _LT_OUTPUT_LIBTOOL_INIT
571 ])
572
573 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
574 # ------------------------------------
575 # Generate a child script FILE with all initialization necessary to
576 # reuse the environment learned by the parent script, and make the
577 # file executable. If COMMENT is supplied, it is inserted after the
578 # `#!' sequence but before initialization text begins. After this
579 # macro, additional text can be appended to FILE to form the body of
580 # the child script. The macro ends with non-zero status if the
581 # file could not be fully written (such as if the disk is full).
582 m4_ifdef([AS_INIT_GENERATED],
583 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
584 [m4_defun([_LT_GENERATED_FILE_INIT],
585 [m4_require([AS_PREPARE])]dnl
586 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
587 [lt_write_fail=0
588 cat >$1 <<_ASEOF || lt_write_fail=1
589 #! $SHELL
590 # Generated by $as_me.
591 $2
592 SHELL=\${CONFIG_SHELL-$SHELL}
593 export SHELL
594 _ASEOF
595 cat >>$1 <<\_ASEOF || lt_write_fail=1
596 AS_SHELL_SANITIZE
597 _AS_PREPARE
598 exec AS_MESSAGE_FD>&1
599 _ASEOF
600 test $lt_write_fail = 0 && chmod +x $1[]dnl
601 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
602
603 # LT_OUTPUT
604 # ---------
605 # This macro allows early generation of the libtool script (before
606 # AC_OUTPUT is called), incase it is used in configure for compilation
607 # tests.
608 AC_DEFUN([LT_OUTPUT],
609 [: ${CONFIG_LT=./config.lt}
610 AC_MSG_NOTICE([creating $CONFIG_LT])
611 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
612 [# Run this file to recreate a libtool stub with the current configuration.])
613
614 cat >>"$CONFIG_LT" <<\_LTEOF
615 lt_cl_silent=false
616 exec AS_MESSAGE_LOG_FD>>config.log
617 {
618 echo
619 AS_BOX([Running $as_me.])
620 } >&AS_MESSAGE_LOG_FD
621
622 lt_cl_help="\
623 \`$as_me' creates a local libtool stub from the current configuration,
624 for use in further configure time tests before the real libtool is
625 generated.
626
627 Usage: $[0] [[OPTIONS]]
628
629 -h, --help print this help, then exit
630 -V, --version print version number, then exit
631 -q, --quiet do not print progress messages
632 -d, --debug don't remove temporary files
633
634 Report bugs to <bug-libtool@gnu.org>."
635
636 lt_cl_version="\
637 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
638 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
639 configured by $[0], generated by m4_PACKAGE_STRING.
640
641 Copyright (C) 2011 Free Software Foundation, Inc.
642 This config.lt script is free software; the Free Software Foundation
643 gives unlimited permision to copy, distribute and modify it."
644
645 while test $[#] != 0
646 do
647 case $[1] in
648 --version | --v* | -V )
649 echo "$lt_cl_version"; exit 0 ;;
650 --help | --h* | -h )
651 echo "$lt_cl_help"; exit 0 ;;
652 --debug | --d* | -d )
653 debug=: ;;
654 --quiet | --q* | --silent | --s* | -q )
655 lt_cl_silent=: ;;
656
657 -*) AC_MSG_ERROR([unrecognized option: $[1]
658 Try \`$[0] --help' for more information.]) ;;
659
660 *) AC_MSG_ERROR([unrecognized argument: $[1]
661 Try \`$[0] --help' for more information.]) ;;
662 esac
663 shift
664 done
665
666 if $lt_cl_silent; then
667 exec AS_MESSAGE_FD>/dev/null
668 fi
669 _LTEOF
670
671 cat >>"$CONFIG_LT" <<_LTEOF
672 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
673 _LTEOF
674
675 cat >>"$CONFIG_LT" <<\_LTEOF
676 AC_MSG_NOTICE([creating $ofile])
677 _LT_OUTPUT_LIBTOOL_COMMANDS
678 AS_EXIT(0)
679 _LTEOF
680 chmod +x "$CONFIG_LT"
681
682 # configure is writing to config.log, but config.lt does its own redirection,
683 # appending to config.log, which fails on DOS, as config.log is still kept
684 # open by configure. Here we exec the FD to /dev/null, effectively closing
685 # config.log, so it can be properly (re)opened and appended to by config.lt.
686 lt_cl_success=:
687 test "$silent" = yes &&
688 lt_config_lt_args="$lt_config_lt_args --quiet"
689 exec AS_MESSAGE_LOG_FD>/dev/null
690 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
691 exec AS_MESSAGE_LOG_FD>>config.log
692 $lt_cl_success || AS_EXIT(1)
693 ])# LT_OUTPUT
694
695
696 # _LT_CONFIG(TAG)
697 # ---------------
698 # If TAG is the built-in tag, create an initial libtool script with a
699 # default configuration from the untagged config vars. Otherwise add code
700 # to config.status for appending the configuration named by TAG from the
701 # matching tagged config vars.
702 m4_defun([_LT_CONFIG],
703 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
704 _LT_CONFIG_SAVE_COMMANDS([
705 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
706 m4_if(_LT_TAG, [C], [
707 # See if we are running on zsh, and set the options which allow our
708 # commands through without removal of \ escapes.
709 if test -n "${ZSH_VERSION+set}" ; then
710 setopt NO_GLOB_SUBST
711 fi
712
713 cfgfile="${ofile}T"
714 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
715 $RM "$cfgfile"
716
717 cat <<_LT_EOF >> "$cfgfile"
718 #! $SHELL
719
720 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
721 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
722 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
723 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
724 #
725 _LT_COPYING
726 _LT_LIBTOOL_TAGS
727
728 # ### BEGIN LIBTOOL CONFIG
729 _LT_LIBTOOL_CONFIG_VARS
730 _LT_LIBTOOL_TAG_VARS
731 # ### END LIBTOOL CONFIG
732
733 _LT_EOF
734
735 case $host_os in
736 aix3*)
737 cat <<\_LT_EOF >> "$cfgfile"
738 # AIX sometimes has problems with the GCC collect2 program. For some
739 # reason, if we set the COLLECT_NAMES environment variable, the problems
740 # vanish in a puff of smoke.
741 if test "X${COLLECT_NAMES+set}" != Xset; then
742 COLLECT_NAMES=
743 export COLLECT_NAMES
744 fi
745 _LT_EOF
746 ;;
747 esac
748
749 _LT_PROG_LTMAIN
750
751 # We use sed instead of cat because bash on DJGPP gets confused if
752 # if finds mixed CR/LF and LF-only lines. Since sed operates in
753 # text mode, it properly converts lines to CR/LF. This bash problem
754 # is reportedly fixed, but why not run on old versions too?
755 sed '$q' "$ltmain" >> "$cfgfile" \
756 || (rm -f "$cfgfile"; exit 1)
757
758 _LT_PROG_REPLACE_SHELLFNS
759
760 mv -f "$cfgfile" "$ofile" ||
761 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
762 chmod +x "$ofile"
763 ],
764 [cat <<_LT_EOF >> "$ofile"
765
766 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
767 dnl in a comment (ie after a #).
768 # ### BEGIN LIBTOOL TAG CONFIG: $1
769 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
770 # ### END LIBTOOL TAG CONFIG: $1
771 _LT_EOF
772 ])dnl /m4_if
773 ],
774 [m4_if([$1], [], [
775 PACKAGE='$PACKAGE'
776 VERSION='$VERSION'
777 TIMESTAMP='$TIMESTAMP'
778 RM='$RM'
779 ofile='$ofile'], [])
780 ])dnl /_LT_CONFIG_SAVE_COMMANDS
781 ])# _LT_CONFIG
782
783
784 # LT_SUPPORTED_TAG(TAG)
785 # ---------------------
786 # Trace this macro to discover what tags are supported by the libtool
787 # --tag option, using:
788 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
789 AC_DEFUN([LT_SUPPORTED_TAG], [])
790
791
792 # C support is built-in for now
793 m4_define([_LT_LANG_C_enabled], [])
794 m4_define([_LT_TAGS], [])
795
796
797 # LT_LANG(LANG)
798 # -------------
799 # Enable libtool support for the given language if not already enabled.
800 AC_DEFUN([LT_LANG],
801 [AC_BEFORE([$0], [LT_OUTPUT])dnl
802 m4_case([$1],
803 [C], [_LT_LANG(C)],
804 [C++], [_LT_LANG(CXX)],
805 [Go], [_LT_LANG(GO)],
806 [Java], [_LT_LANG(GCJ)],
807 [Fortran 77], [_LT_LANG(F77)],
808 [Fortran], [_LT_LANG(FC)],
809 [Windows Resource], [_LT_LANG(RC)],
810 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
811 [_LT_LANG($1)],
812 [m4_fatal([$0: unsupported language: "$1"])])])dnl
813 ])# LT_LANG
814
815
816 # _LT_LANG(LANGNAME)
817 # ------------------
818 m4_defun([_LT_LANG],
819 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
820 [LT_SUPPORTED_TAG([$1])dnl
821 m4_append([_LT_TAGS], [$1 ])dnl
822 m4_define([_LT_LANG_]$1[_enabled], [])dnl
823 _LT_LANG_$1_CONFIG($1)])dnl
824 ])# _LT_LANG
825
826
827 m4_ifndef([AC_PROG_GO], [
828 ############################################################
829 # NOTE: This macro has been submitted for inclusion into #
830 # GNU Autoconf as AC_PROG_GO. When it is available in #
831 # a released version of Autoconf we should remove this #
832 # macro and use it instead. #
833 ############################################################
834 m4_defun([AC_PROG_GO],
835 [AC_LANG_PUSH(Go)dnl
836 AC_ARG_VAR([GOC], [Go compiler command])dnl
837 AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
838 _AC_ARG_VAR_LDFLAGS()dnl
839 AC_CHECK_TOOL(GOC, gccgo)
840 if test -z "$GOC"; then
841 if test -n "$ac_tool_prefix"; then
842 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
843 fi
844 fi
845 if test -z "$GOC"; then
846 AC_CHECK_PROG(GOC, gccgo, gccgo, false)
847 fi
848 ])#m4_defun
849 ])#m4_ifndef
850
851
852 # _LT_LANG_DEFAULT_CONFIG
853 # -----------------------
854 m4_defun([_LT_LANG_DEFAULT_CONFIG],
855 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
856 [LT_LANG(CXX)],
857 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
858
859 AC_PROVIDE_IFELSE([AC_PROG_F77],
860 [LT_LANG(F77)],
861 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
862
863 AC_PROVIDE_IFELSE([AC_PROG_FC],
864 [LT_LANG(FC)],
865 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
866
867 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
868 dnl pulling things in needlessly.
869 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
870 [LT_LANG(GCJ)],
871 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
872 [LT_LANG(GCJ)],
873 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
874 [LT_LANG(GCJ)],
875 [m4_ifdef([AC_PROG_GCJ],
876 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
877 m4_ifdef([A][M_PROG_GCJ],
878 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
879 m4_ifdef([LT_PROG_GCJ],
880 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
881
882 AC_PROVIDE_IFELSE([AC_PROG_GO],
883 [LT_LANG(GO)],
884 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
885
886 AC_PROVIDE_IFELSE([LT_PROG_RC],
887 [LT_LANG(RC)],
888 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
889 ])# _LT_LANG_DEFAULT_CONFIG
890
891 # Obsolete macros:
892 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
893 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
894 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
895 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
896 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
897 dnl aclocal-1.4 backwards compatibility:
898 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
899 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
900 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
901 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
902 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
903
904
905 # _LT_TAG_COMPILER
906 # ----------------
907 m4_defun([_LT_TAG_COMPILER],
908 [AC_REQUIRE([AC_PROG_CC])dnl
909
910 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
911 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
912 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
913 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
914
915 # If no C compiler was specified, use CC.
916 LTCC=${LTCC-"$CC"}
917
918 # If no C compiler flags were specified, use CFLAGS.
919 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
920
921 # Allow CC to be a program name with arguments.
922 compiler=$CC
923 ])# _LT_TAG_COMPILER
924
925
926 # _LT_COMPILER_BOILERPLATE
927 # ------------------------
928 # Check for compiler boilerplate output or warnings with
929 # the simple compiler test code.
930 m4_defun([_LT_COMPILER_BOILERPLATE],
931 [m4_require([_LT_DECL_SED])dnl
932 ac_outfile=conftest.$ac_objext
933 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
934 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
935 _lt_compiler_boilerplate=`cat conftest.err`
936 $RM conftest*
937 ])# _LT_COMPILER_BOILERPLATE
938
939
940 # _LT_LINKER_BOILERPLATE
941 # ----------------------
942 # Check for linker boilerplate output or warnings with
943 # the simple link test code.
944 m4_defun([_LT_LINKER_BOILERPLATE],
945 [m4_require([_LT_DECL_SED])dnl
946 ac_outfile=conftest.$ac_objext
947 echo "$lt_simple_link_test_code" >conftest.$ac_ext
948 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
949 _lt_linker_boilerplate=`cat conftest.err`
950 $RM -r conftest*
951 ])# _LT_LINKER_BOILERPLATE
952
953 # _LT_REQUIRED_DARWIN_CHECKS
954 # -------------------------
955 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
956 case $host_os in
957 rhapsody* | darwin*)
958 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
959 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
960 AC_CHECK_TOOL([LIPO], [lipo], [:])
961 AC_CHECK_TOOL([OTOOL], [otool], [:])
962 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
963 _LT_DECL([], [DSYMUTIL], [1],
964 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
965 _LT_DECL([], [NMEDIT], [1],
966 [Tool to change global to local symbols on Mac OS X])
967 _LT_DECL([], [LIPO], [1],
968 [Tool to manipulate fat objects and archives on Mac OS X])
969 _LT_DECL([], [OTOOL], [1],
970 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
971 _LT_DECL([], [OTOOL64], [1],
972 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
973
974 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
975 [lt_cv_apple_cc_single_mod=no
976 if test -z "${LT_MULTI_MODULE}"; then
977 # By default we will add the -single_module flag. You can override
978 # by either setting the environment variable LT_MULTI_MODULE
979 # non-empty at configure time, or by adding -multi_module to the
980 # link flags.
981 rm -rf libconftest.dylib*
982 echo "int foo(void){return 1;}" > conftest.c
983 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
984 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
985 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
986 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
987 _lt_result=$?
988 # If there is a non-empty error log, and "single_module"
989 # appears in it, assume the flag caused a linker warning
990 if test -s conftest.err && $GREP single_module conftest.err; then
991 cat conftest.err >&AS_MESSAGE_LOG_FD
992 # Otherwise, if the output was created with a 0 exit code from
993 # the compiler, it worked.
994 elif test -f libconftest.dylib && test $_lt_result -eq 0; then
995 lt_cv_apple_cc_single_mod=yes
996 else
997 cat conftest.err >&AS_MESSAGE_LOG_FD
998 fi
999 rm -rf libconftest.dylib*
1000 rm -f conftest.*
1001 fi])
1002
1003 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1004 [lt_cv_ld_exported_symbols_list],
1005 [lt_cv_ld_exported_symbols_list=no
1006 save_LDFLAGS=$LDFLAGS
1007 echo "_main" > conftest.sym
1008 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1009 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1010 [lt_cv_ld_exported_symbols_list=yes],
1011 [lt_cv_ld_exported_symbols_list=no])
1012 LDFLAGS="$save_LDFLAGS"
1013 ])
1014
1015 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
1016 [lt_cv_ld_force_load=no
1017 cat > conftest.c << _LT_EOF
1018 int forced_loaded() { return 2;}
1019 _LT_EOF
1020 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
1021 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1022 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1023 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1024 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
1025 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
1026 cat > conftest.c << _LT_EOF
1027 int main() { return 0;}
1028 _LT_EOF
1029 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
1030 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
1031 _lt_result=$?
1032 if test -s conftest.err && $GREP force_load conftest.err; then
1033 cat conftest.err >&AS_MESSAGE_LOG_FD
1034 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
1035 lt_cv_ld_force_load=yes
1036 else
1037 cat conftest.err >&AS_MESSAGE_LOG_FD
1038 fi
1039 rm -f conftest.err libconftest.a conftest conftest.c
1040 rm -rf conftest.dSYM
1041 ])
1042 case $host_os in
1043 rhapsody* | darwin1.[[012]])
1044 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
1045 darwin1.*)
1046 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1047 darwin*) # darwin 5.x on
1048 # if running on 10.5 or later, the deployment target defaults
1049 # to the OS version, if on x86, and 10.4, the deployment
1050 # target defaults to 10.4. Don't you love it?
1051 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1052 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1053 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1054 10.[[012]]*)
1055 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1056 10.*)
1057 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1058 esac
1059 ;;
1060 esac
1061 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
1062 _lt_dar_single_mod='$single_module'
1063 fi
1064 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
1065 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
1066 else
1067 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
1068 fi
1069 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
1070 _lt_dsymutil='~$DSYMUTIL $lib || :'
1071 else
1072 _lt_dsymutil=
1073 fi
1074 ;;
1075 esac
1076 ])
1077
1078
1079 # _LT_DARWIN_LINKER_FEATURES([TAG])
1080 # ---------------------------------
1081 # Checks for linker and compiler features on darwin
1082 m4_defun([_LT_DARWIN_LINKER_FEATURES],
1083 [
1084 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1085 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1086 _LT_TAGVAR(hardcode_direct, $1)=no
1087 _LT_TAGVAR(hardcode_automatic, $1)=yes
1088 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1089 if test "$lt_cv_ld_force_load" = "yes"; then
1090 _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
1091 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
1092 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
1093 else
1094 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1095 fi
1096 _LT_TAGVAR(link_all_deplibs, $1)=yes
1097 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1098 case $cc_basename in
1099 ifort*) _lt_dar_can_shared=yes ;;
1100 *) _lt_dar_can_shared=$GCC ;;
1101 esac
1102 if test "$_lt_dar_can_shared" = "yes"; then
1103 output_verbose_link_cmd=func_echo_all
1104 _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
1105 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1106 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
1107 _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
1108 m4_if([$1], [CXX],
1109 [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1110 _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
1111 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
1112 fi
1113 ],[])
1114 else
1115 _LT_TAGVAR(ld_shlibs, $1)=no
1116 fi
1117 ])
1118
1119 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1120 # ----------------------------------
1121 # Links a minimal program and checks the executable
1122 # for the system default hardcoded library path. In most cases,
1123 # this is /usr/lib:/lib, but when the MPI compilers are used
1124 # the location of the communication and MPI libs are included too.
1125 # If we don't find anything, use the default library path according
1126 # to the aix ld manual.
1127 # Store the results from the different compilers for each TAGNAME.
1128 # Allow to override them for all tags through lt_cv_aix_libpath.
1129 m4_defun([_LT_SYS_MODULE_PATH_AIX],
1130 [m4_require([_LT_DECL_SED])dnl
1131 if test "${lt_cv_aix_libpath+set}" = set; then
1132 aix_libpath=$lt_cv_aix_libpath
1133 else
1134 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1135 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1136 lt_aix_libpath_sed='[
1137 /Import File Strings/,/^$/ {
1138 /^0/ {
1139 s/^0 *\([^ ]*\) *$/\1/
1140 p
1141 }
1142 }]'
1143 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1144 # Check for a 64-bit object if we didn't find anything.
1145 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1146 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1147 fi],[])
1148 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1149 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
1150 fi
1151 ])
1152 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1153 fi
1154 ])# _LT_SYS_MODULE_PATH_AIX
1155
1156
1157 # _LT_SHELL_INIT(ARG)
1158 # -------------------
1159 m4_define([_LT_SHELL_INIT],
1160 [m4_divert_text([M4SH-INIT], [$1
1161 ])])# _LT_SHELL_INIT
1162
1163
1164
1165 # _LT_PROG_ECHO_BACKSLASH
1166 # -----------------------
1167 # Find how we can fake an echo command that does not interpret backslash.
1168 # In particular, with Autoconf 2.60 or later we add some code to the start
1169 # of the generated configure script which will find a shell with a builtin
1170 # printf (which we can use as an echo command).
1171 m4_defun([_LT_PROG_ECHO_BACKSLASH],
1172 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1173 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1174 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1175
1176 AC_MSG_CHECKING([how to print strings])
1177 # Test print first, because it will be a builtin if present.
1178 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
1179 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1180 ECHO='print -r --'
1181 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1182 ECHO='printf %s\n'
1183 else
1184 # Use this function as a fallback that always works.
1185 func_fallback_echo ()
1186 {
1187 eval 'cat <<_LTECHO_EOF
1188 $[]1
1189 _LTECHO_EOF'
1190 }
1191 ECHO='func_fallback_echo'
1192 fi
1193
1194 # func_echo_all arg...
1195 # Invoke $ECHO with all args, space-separated.
1196 func_echo_all ()
1197 {
1198 $ECHO "$*"
1199 }
1200
1201 case "$ECHO" in
1202 printf*) AC_MSG_RESULT([printf]) ;;
1203 print*) AC_MSG_RESULT([print -r]) ;;
1204 *) AC_MSG_RESULT([cat]) ;;
1205 esac
1206
1207 m4_ifdef([_AS_DETECT_SUGGESTED],
1208 [_AS_DETECT_SUGGESTED([
1209 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
1210 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1211 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1212 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1213 PATH=/empty FPATH=/empty; export PATH FPATH
1214 test "X`printf %s $ECHO`" = "X$ECHO" \
1215 || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
1216
1217 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1218 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
1219 ])# _LT_PROG_ECHO_BACKSLASH
1220
1221
1222 # _LT_WITH_SYSROOT
1223 # ----------------
1224 AC_DEFUN([_LT_WITH_SYSROOT],
1225 [AC_MSG_CHECKING([for sysroot])
1226 AC_ARG_WITH([sysroot],
1227 [ --with-sysroot[=DIR] Search for dependent libraries within DIR
1228 (or the compiler's sysroot if not specified).],
1229 [], [with_sysroot=no])
1230
1231 dnl lt_sysroot will always be passed unquoted. We quote it here
1232 dnl in case the user passed a directory name.
1233 lt_sysroot=
1234 case ${with_sysroot} in #(
1235 yes)
1236 if test "$GCC" = yes; then
1237 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
1238 fi
1239 ;; #(
1240 /*)
1241 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
1242 ;; #(
1243 no|'')
1244 ;; #(
1245 *)
1246 AC_MSG_RESULT([${with_sysroot}])
1247 AC_MSG_ERROR([The sysroot must be an absolute path.])
1248 ;;
1249 esac
1250
1251 AC_MSG_RESULT([${lt_sysroot:-no}])
1252 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
1253 [dependent libraries, and in which our libraries should be installed.])])
1254
1255 # _LT_ENABLE_LOCK
1256 # ---------------
1257 m4_defun([_LT_ENABLE_LOCK],
1258 [AC_ARG_ENABLE([libtool-lock],
1259 [AS_HELP_STRING([--disable-libtool-lock],
1260 [avoid locking (might break parallel builds)])])
1261 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1262
1263 # Some flags need to be propagated to the compiler or linker for good
1264 # libtool support.
1265 case $host in
1266 ia64-*-hpux*)
1267 # Find out which ABI we are using.
1268 echo 'int i;' > conftest.$ac_ext
1269 if AC_TRY_EVAL(ac_compile); then
1270 case `/usr/bin/file conftest.$ac_objext` in
1271 *ELF-32*)
1272 HPUX_IA64_MODE="32"
1273 ;;
1274 *ELF-64*)
1275 HPUX_IA64_MODE="64"
1276 ;;
1277 esac
1278 fi
1279 rm -rf conftest*
1280 ;;
1281 *-*-irix6*)
1282 # Find out which ABI we are using.
1283 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1284 if AC_TRY_EVAL(ac_compile); then
1285 if test "$lt_cv_prog_gnu_ld" = yes; then
1286 case `/usr/bin/file conftest.$ac_objext` in
1287 *32-bit*)
1288 LD="${LD-ld} -melf32bsmip"
1289 ;;
1290 *N32*)
1291 LD="${LD-ld} -melf32bmipn32"
1292 ;;
1293 *64-bit*)
1294 LD="${LD-ld} -melf64bmip"
1295 ;;
1296 esac
1297 else
1298 case `/usr/bin/file conftest.$ac_objext` in
1299 *32-bit*)
1300 LD="${LD-ld} -32"
1301 ;;
1302 *N32*)
1303 LD="${LD-ld} -n32"
1304 ;;
1305 *64-bit*)
1306 LD="${LD-ld} -64"
1307 ;;
1308 esac
1309 fi
1310 fi
1311 rm -rf conftest*
1312 ;;
1313
1314 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1315 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1316 # Find out which ABI we are using.
1317 echo 'int i;' > conftest.$ac_ext
1318 if AC_TRY_EVAL(ac_compile); then
1319 case `/usr/bin/file conftest.o` in
1320 *32-bit*)
1321 case $host in
1322 x86_64-*kfreebsd*-gnu)
1323 LD="${LD-ld} -m elf_i386_fbsd"
1324 ;;
1325 x86_64-*linux*)
1326 case `/usr/bin/file conftest.o` in
1327 *x86-64*)
1328 LD="${LD-ld} -m elf32_x86_64"
1329 ;;
1330 *)
1331 LD="${LD-ld} -m elf_i386"
1332 ;;
1333 esac
1334 ;;
1335 ppc64-*linux*|powerpc64-*linux*)
1336 LD="${LD-ld} -m elf32ppclinux"
1337 ;;
1338 s390x-*linux*)
1339 LD="${LD-ld} -m elf_s390"
1340 ;;
1341 sparc64-*linux*)
1342 LD="${LD-ld} -m elf32_sparc"
1343 ;;
1344 esac
1345 ;;
1346 *64-bit*)
1347 case $host in
1348 x86_64-*kfreebsd*-gnu)
1349 LD="${LD-ld} -m elf_x86_64_fbsd"
1350 ;;
1351 x86_64-*linux*)
1352 LD="${LD-ld} -m elf_x86_64"
1353 ;;
1354 ppc*-*linux*|powerpc*-*linux*)
1355 LD="${LD-ld} -m elf64ppc"
1356 ;;
1357 s390*-*linux*|s390*-*tpf*)
1358 LD="${LD-ld} -m elf64_s390"
1359 ;;
1360 sparc*-*linux*)
1361 LD="${LD-ld} -m elf64_sparc"
1362 ;;
1363 esac
1364 ;;
1365 esac
1366 fi
1367 rm -rf conftest*
1368 ;;
1369
1370 *-*-sco3.2v5*)
1371 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1372 SAVE_CFLAGS="$CFLAGS"
1373 CFLAGS="$CFLAGS -belf"
1374 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1375 [AC_LANG_PUSH(C)
1376 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1377 AC_LANG_POP])
1378 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1379 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1380 CFLAGS="$SAVE_CFLAGS"
1381 fi
1382 ;;
1383 *-*solaris*)
1384 # Find out which ABI we are using.
1385 echo 'int i;' > conftest.$ac_ext
1386 if AC_TRY_EVAL(ac_compile); then
1387 case `/usr/bin/file conftest.o` in
1388 *64-bit*)
1389 case $lt_cv_prog_gnu_ld in
1390 yes*)
1391 case $host in
1392 i?86-*-solaris*)
1393 LD="${LD-ld} -m elf_x86_64"
1394 ;;
1395 sparc*-*-solaris*)
1396 LD="${LD-ld} -m elf64_sparc"
1397 ;;
1398 esac
1399 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
1400 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
1401 LD="${LD-ld}_sol2"
1402 fi
1403 ;;
1404 *)
1405 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1406 LD="${LD-ld} -64"
1407 fi
1408 ;;
1409 esac
1410 ;;
1411 esac
1412 fi
1413 rm -rf conftest*
1414 ;;
1415 esac
1416
1417 need_locks="$enable_libtool_lock"
1418 ])# _LT_ENABLE_LOCK
1419
1420
1421 # _LT_PROG_AR
1422 # -----------
1423 m4_defun([_LT_PROG_AR],
1424 [AC_CHECK_TOOLS(AR, [ar], false)
1425 : ${AR=ar}
1426 : ${AR_FLAGS=cru}
1427 _LT_DECL([], [AR], [1], [The archiver])
1428 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
1429
1430 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
1431 [lt_cv_ar_at_file=no
1432 AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
1433 [echo conftest.$ac_objext > conftest.lst
1434 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
1435 AC_TRY_EVAL([lt_ar_try])
1436 if test "$ac_status" -eq 0; then
1437 # Ensure the archiver fails upon bogus file names.
1438 rm -f conftest.$ac_objext libconftest.a
1439 AC_TRY_EVAL([lt_ar_try])
1440 if test "$ac_status" -ne 0; then
1441 lt_cv_ar_at_file=@
1442 fi
1443 fi
1444 rm -f conftest.* libconftest.a
1445 ])
1446 ])
1447
1448 if test "x$lt_cv_ar_at_file" = xno; then
1449 archiver_list_spec=
1450 else
1451 archiver_list_spec=$lt_cv_ar_at_file
1452 fi
1453 _LT_DECL([], [archiver_list_spec], [1],
1454 [How to feed a file listing to the archiver])
1455 ])# _LT_PROG_AR
1456
1457
1458 # _LT_CMD_OLD_ARCHIVE
1459 # -------------------
1460 m4_defun([_LT_CMD_OLD_ARCHIVE],
1461 [_LT_PROG_AR
1462
1463 AC_CHECK_TOOL(STRIP, strip, :)
1464 test -z "$STRIP" && STRIP=:
1465 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
1466
1467 AC_CHECK_TOOL(RANLIB, ranlib, :)
1468 test -z "$RANLIB" && RANLIB=:
1469 _LT_DECL([], [RANLIB], [1],
1470 [Commands used to install an old-style archive])
1471
1472 # Determine commands to create old-style static archives.
1473 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1474 old_postinstall_cmds='chmod 644 $oldlib'
1475 old_postuninstall_cmds=
1476
1477 if test -n "$RANLIB"; then
1478 case $host_os in
1479 openbsd*)
1480 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
1481 ;;
1482 *)
1483 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
1484 ;;
1485 esac
1486 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
1487 fi
1488
1489 case $host_os in
1490 darwin*)
1491 lock_old_archive_extraction=yes ;;
1492 *)
1493 lock_old_archive_extraction=no ;;
1494 esac
1495 _LT_DECL([], [old_postinstall_cmds], [2])
1496 _LT_DECL([], [old_postuninstall_cmds], [2])
1497 _LT_TAGDECL([], [old_archive_cmds], [2],
1498 [Commands used to build an old-style archive])
1499 _LT_DECL([], [lock_old_archive_extraction], [0],
1500 [Whether to use a lock for old archive extraction])
1501 ])# _LT_CMD_OLD_ARCHIVE
1502
1503
1504 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1505 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1506 # ----------------------------------------------------------------
1507 # Check whether the given compiler option works
1508 AC_DEFUN([_LT_COMPILER_OPTION],
1509 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1510 m4_require([_LT_DECL_SED])dnl
1511 AC_CACHE_CHECK([$1], [$2],
1512 [$2=no
1513 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1514 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1515 lt_compiler_flag="$3"
1516 # Insert the option either (1) after the last *FLAGS variable, or
1517 # (2) before a word containing "conftest.", or (3) at the end.
1518 # Note that $ac_compile itself does not contain backslashes and begins
1519 # with a dollar sign (not a hyphen), so the echo should work correctly.
1520 # The option is referenced via a variable to avoid confusing sed.
1521 lt_compile=`echo "$ac_compile" | $SED \
1522 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1523 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1524 -e 's:$: $lt_compiler_flag:'`
1525 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1526 (eval "$lt_compile" 2>conftest.err)
1527 ac_status=$?
1528 cat conftest.err >&AS_MESSAGE_LOG_FD
1529 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1530 if (exit $ac_status) && test -s "$ac_outfile"; then
1531 # The compiler can only warn and ignore the option if not recognized
1532 # So say no if there are warnings other than the usual output.
1533 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
1534 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1535 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1536 $2=yes
1537 fi
1538 fi
1539 $RM conftest*
1540 ])
1541
1542 if test x"[$]$2" = xyes; then
1543 m4_if([$5], , :, [$5])
1544 else
1545 m4_if([$6], , :, [$6])
1546 fi
1547 ])# _LT_COMPILER_OPTION
1548
1549 # Old name:
1550 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1551 dnl aclocal-1.4 backwards compatibility:
1552 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1553
1554
1555 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1556 # [ACTION-SUCCESS], [ACTION-FAILURE])
1557 # ----------------------------------------------------
1558 # Check whether the given linker option works
1559 AC_DEFUN([_LT_LINKER_OPTION],
1560 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1561 m4_require([_LT_DECL_SED])dnl
1562 AC_CACHE_CHECK([$1], [$2],
1563 [$2=no
1564 save_LDFLAGS="$LDFLAGS"
1565 LDFLAGS="$LDFLAGS $3"
1566 echo "$lt_simple_link_test_code" > conftest.$ac_ext
1567 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1568 # The linker can only warn and ignore the option if not recognized
1569 # So say no if there are warnings
1570 if test -s conftest.err; then
1571 # Append any errors to the config.log.
1572 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1573 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
1574 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1575 if diff conftest.exp conftest.er2 >/dev/null; then
1576 $2=yes
1577 fi
1578 else
1579 $2=yes
1580 fi
1581 fi
1582 $RM -r conftest*
1583 LDFLAGS="$save_LDFLAGS"
1584 ])
1585
1586 if test x"[$]$2" = xyes; then
1587 m4_if([$4], , :, [$4])
1588 else
1589 m4_if([$5], , :, [$5])
1590 fi
1591 ])# _LT_LINKER_OPTION
1592
1593 # Old name:
1594 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1595 dnl aclocal-1.4 backwards compatibility:
1596 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1597
1598
1599 # LT_CMD_MAX_LEN
1600 #---------------
1601 AC_DEFUN([LT_CMD_MAX_LEN],
1602 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1603 # find the maximum length of command line arguments
1604 AC_MSG_CHECKING([the maximum length of command line arguments])
1605 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1606 i=0
1607 teststring="ABCD"
1608
1609 case $build_os in
1610 msdosdjgpp*)
1611 # On DJGPP, this test can blow up pretty badly due to problems in libc
1612 # (any single argument exceeding 2000 bytes causes a buffer overrun
1613 # during glob expansion). Even if it were fixed, the result of this
1614 # check would be larger than it should be.
1615 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1616 ;;
1617
1618 gnu*)
1619 # Under GNU Hurd, this test is not required because there is
1620 # no limit to the length of command line arguments.
1621 # Libtool will interpret -1 as no limit whatsoever
1622 lt_cv_sys_max_cmd_len=-1;
1623 ;;
1624
1625 cygwin* | mingw* | cegcc*)
1626 # On Win9x/ME, this test blows up -- it succeeds, but takes
1627 # about 5 minutes as the teststring grows exponentially.
1628 # Worse, since 9x/ME are not pre-emptively multitasking,
1629 # you end up with a "frozen" computer, even though with patience
1630 # the test eventually succeeds (with a max line length of 256k).
1631 # Instead, let's just punt: use the minimum linelength reported by
1632 # all of the supported platforms: 8192 (on NT/2K/XP).
1633 lt_cv_sys_max_cmd_len=8192;
1634 ;;
1635
1636 mint*)
1637 # On MiNT this can take a long time and run out of memory.
1638 lt_cv_sys_max_cmd_len=8192;
1639 ;;
1640
1641 amigaos*)
1642 # On AmigaOS with pdksh, this test takes hours, literally.
1643 # So we just punt and use a minimum line length of 8192.
1644 lt_cv_sys_max_cmd_len=8192;
1645 ;;
1646
1647 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1648 # This has been around since 386BSD, at least. Likely further.
1649 if test -x /sbin/sysctl; then
1650 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1651 elif test -x /usr/sbin/sysctl; then
1652 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1653 else
1654 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1655 fi
1656 # And add a safety zone
1657 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1658 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1659 ;;
1660
1661 interix*)
1662 # We know the value 262144 and hardcode it with a safety zone (like BSD)
1663 lt_cv_sys_max_cmd_len=196608
1664 ;;
1665
1666 os2*)
1667 # The test takes a long time on OS/2.
1668 lt_cv_sys_max_cmd_len=8192
1669 ;;
1670
1671 osf*)
1672 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1673 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1674 # nice to cause kernel panics so lets avoid the loop below.
1675 # First set a reasonable default.
1676 lt_cv_sys_max_cmd_len=16384
1677 #
1678 if test -x /sbin/sysconfig; then
1679 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1680 *1*) lt_cv_sys_max_cmd_len=-1 ;;
1681 esac
1682 fi
1683 ;;
1684 sco3.2v5*)
1685 lt_cv_sys_max_cmd_len=102400
1686 ;;
1687 sysv5* | sco5v6* | sysv4.2uw2*)
1688 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1689 if test -n "$kargmax"; then
1690 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
1691 else
1692 lt_cv_sys_max_cmd_len=32768
1693 fi
1694 ;;
1695 *)
1696 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1697 if test -n "$lt_cv_sys_max_cmd_len" && \
1698 test undefined != "$lt_cv_sys_max_cmd_len"; then
1699 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1700 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1701 else
1702 # Make teststring a little bigger before we do anything with it.
1703 # a 1K string should be a reasonable start.
1704 for i in 1 2 3 4 5 6 7 8 ; do
1705 teststring=$teststring$teststring
1706 done
1707 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1708 # If test is not a shell built-in, we'll probably end up computing a
1709 # maximum length that is only half of the actual maximum length, but
1710 # we can't tell.
1711 while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
1712 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
1713 test $i != 17 # 1/2 MB should be enough
1714 do
1715 i=`expr $i + 1`
1716 teststring=$teststring$teststring
1717 done
1718 # Only check the string length outside the loop.
1719 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1720 teststring=
1721 # Add a significant safety factor because C++ compilers can tack on
1722 # massive amounts of additional arguments before passing them to the
1723 # linker. It appears as though 1/2 is a usable value.
1724 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1725 fi
1726 ;;
1727 esac
1728 ])
1729 if test -n $lt_cv_sys_max_cmd_len ; then
1730 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1731 else
1732 AC_MSG_RESULT(none)
1733 fi
1734 max_cmd_len=$lt_cv_sys_max_cmd_len
1735 _LT_DECL([], [max_cmd_len], [0],
1736 [What is the maximum length of a command?])
1737 ])# LT_CMD_MAX_LEN
1738
1739 # Old name:
1740 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1741 dnl aclocal-1.4 backwards compatibility:
1742 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1743
1744
1745 # _LT_HEADER_DLFCN
1746 # ----------------
1747 m4_defun([_LT_HEADER_DLFCN],
1748 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1749 ])# _LT_HEADER_DLFCN
1750
1751
1752 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1753 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1754 # ----------------------------------------------------------------
1755 m4_defun([_LT_TRY_DLOPEN_SELF],
1756 [m4_require([_LT_HEADER_DLFCN])dnl
1757 if test "$cross_compiling" = yes; then :
1758 [$4]
1759 else
1760 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1761 lt_status=$lt_dlunknown
1762 cat > conftest.$ac_ext <<_LT_EOF
1763 [#line $LINENO "configure"
1764 #include "confdefs.h"
1765
1766 #if HAVE_DLFCN_H
1767 #include <dlfcn.h>
1768 #endif
1769
1770 #include <stdio.h>
1771
1772 #ifdef RTLD_GLOBAL
1773 # define LT_DLGLOBAL RTLD_GLOBAL
1774 #else
1775 # ifdef DL_GLOBAL
1776 # define LT_DLGLOBAL DL_GLOBAL
1777 # else
1778 # define LT_DLGLOBAL 0
1779 # endif
1780 #endif
1781
1782 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1783 find out it does not work in some platform. */
1784 #ifndef LT_DLLAZY_OR_NOW
1785 # ifdef RTLD_LAZY
1786 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1787 # else
1788 # ifdef DL_LAZY
1789 # define LT_DLLAZY_OR_NOW DL_LAZY
1790 # else
1791 # ifdef RTLD_NOW
1792 # define LT_DLLAZY_OR_NOW RTLD_NOW
1793 # else
1794 # ifdef DL_NOW
1795 # define LT_DLLAZY_OR_NOW DL_NOW
1796 # else
1797 # define LT_DLLAZY_OR_NOW 0
1798 # endif
1799 # endif
1800 # endif
1801 # endif
1802 #endif
1803
1804 /* When -fvisbility=hidden is used, assume the code has been annotated
1805 correspondingly for the symbols needed. */
1806 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
1807 int fnord () __attribute__((visibility("default")));
1808 #endif
1809
1810 int fnord () { return 42; }
1811 int main ()
1812 {
1813 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1814 int status = $lt_dlunknown;
1815
1816 if (self)
1817 {
1818 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1819 else
1820 {
1821 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1822 else puts (dlerror ());
1823 }
1824 /* dlclose (self); */
1825 }
1826 else
1827 puts (dlerror ());
1828
1829 return status;
1830 }]
1831 _LT_EOF
1832 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1833 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1834 lt_status=$?
1835 case x$lt_status in
1836 x$lt_dlno_uscore) $1 ;;
1837 x$lt_dlneed_uscore) $2 ;;
1838 x$lt_dlunknown|x*) $3 ;;
1839 esac
1840 else :
1841 # compilation failed
1842 $3
1843 fi
1844 fi
1845 rm -fr conftest*
1846 ])# _LT_TRY_DLOPEN_SELF
1847
1848
1849 # LT_SYS_DLOPEN_SELF
1850 # ------------------
1851 AC_DEFUN([LT_SYS_DLOPEN_SELF],
1852 [m4_require([_LT_HEADER_DLFCN])dnl
1853 if test "x$enable_dlopen" != xyes; then
1854 enable_dlopen=unknown
1855 enable_dlopen_self=unknown
1856 enable_dlopen_self_static=unknown
1857 else
1858 lt_cv_dlopen=no
1859 lt_cv_dlopen_libs=
1860
1861 case $host_os in
1862 beos*)
1863 lt_cv_dlopen="load_add_on"
1864 lt_cv_dlopen_libs=
1865 lt_cv_dlopen_self=yes
1866 ;;
1867
1868 mingw* | pw32* | cegcc*)
1869 lt_cv_dlopen="LoadLibrary"
1870 lt_cv_dlopen_libs=
1871 ;;
1872
1873 cygwin*)
1874 lt_cv_dlopen="dlopen"
1875 lt_cv_dlopen_libs=
1876 ;;
1877
1878 darwin*)
1879 # if libdl is installed we need to link against it
1880 AC_CHECK_LIB([dl], [dlopen],
1881 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1882 lt_cv_dlopen="dyld"
1883 lt_cv_dlopen_libs=
1884 lt_cv_dlopen_self=yes
1885 ])
1886 ;;
1887
1888 *)
1889 AC_CHECK_FUNC([shl_load],
1890 [lt_cv_dlopen="shl_load"],
1891 [AC_CHECK_LIB([dld], [shl_load],
1892 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1893 [AC_CHECK_FUNC([dlopen],
1894 [lt_cv_dlopen="dlopen"],
1895 [AC_CHECK_LIB([dl], [dlopen],
1896 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1897 [AC_CHECK_LIB([svld], [dlopen],
1898 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1899 [AC_CHECK_LIB([dld], [dld_link],
1900 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1901 ])
1902 ])
1903 ])
1904 ])
1905 ])
1906 ;;
1907 esac
1908
1909 if test "x$lt_cv_dlopen" != xno; then
1910 enable_dlopen=yes
1911 else
1912 enable_dlopen=no
1913 fi
1914
1915 case $lt_cv_dlopen in
1916 dlopen)
1917 save_CPPFLAGS="$CPPFLAGS"
1918 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1919
1920 save_LDFLAGS="$LDFLAGS"
1921 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1922
1923 save_LIBS="$LIBS"
1924 LIBS="$lt_cv_dlopen_libs $LIBS"
1925
1926 AC_CACHE_CHECK([whether a program can dlopen itself],
1927 lt_cv_dlopen_self, [dnl
1928 _LT_TRY_DLOPEN_SELF(
1929 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1930 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1931 ])
1932
1933 if test "x$lt_cv_dlopen_self" = xyes; then
1934 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1935 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1936 lt_cv_dlopen_self_static, [dnl
1937 _LT_TRY_DLOPEN_SELF(
1938 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1939 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1940 ])
1941 fi
1942
1943 CPPFLAGS="$save_CPPFLAGS"
1944 LDFLAGS="$save_LDFLAGS"
1945 LIBS="$save_LIBS"
1946 ;;
1947 esac
1948
1949 case $lt_cv_dlopen_self in
1950 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1951 *) enable_dlopen_self=unknown ;;
1952 esac
1953
1954 case $lt_cv_dlopen_self_static in
1955 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1956 *) enable_dlopen_self_static=unknown ;;
1957 esac
1958 fi
1959 _LT_DECL([dlopen_support], [enable_dlopen], [0],
1960 [Whether dlopen is supported])
1961 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
1962 [Whether dlopen of programs is supported])
1963 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
1964 [Whether dlopen of statically linked programs is supported])
1965 ])# LT_SYS_DLOPEN_SELF
1966
1967 # Old name:
1968 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
1969 dnl aclocal-1.4 backwards compatibility:
1970 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
1971
1972
1973 # _LT_COMPILER_C_O([TAGNAME])
1974 # ---------------------------
1975 # Check to see if options -c and -o are simultaneously supported by compiler.
1976 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
1977 m4_defun([_LT_COMPILER_C_O],
1978 [m4_require([_LT_DECL_SED])dnl
1979 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1980 m4_require([_LT_TAG_COMPILER])dnl
1981 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1982 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1983 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1984 $RM -r conftest 2>/dev/null
1985 mkdir conftest
1986 cd conftest
1987 mkdir out
1988 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1989
1990 lt_compiler_flag="-o out/conftest2.$ac_objext"
1991 # Insert the option either (1) after the last *FLAGS variable, or
1992 # (2) before a word containing "conftest.", or (3) at the end.
1993 # Note that $ac_compile itself does not contain backslashes and begins
1994 # with a dollar sign (not a hyphen), so the echo should work correctly.
1995 lt_compile=`echo "$ac_compile" | $SED \
1996 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1997 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1998 -e 's:$: $lt_compiler_flag:'`
1999 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2000 (eval "$lt_compile" 2>out/conftest.err)
2001 ac_status=$?
2002 cat out/conftest.err >&AS_MESSAGE_LOG_FD
2003 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2004 if (exit $ac_status) && test -s out/conftest2.$ac_objext
2005 then
2006 # The compiler can only warn and ignore the option if not recognized
2007 # So say no if there are warnings
2008 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
2009 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2010 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2011 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2012 fi
2013 fi
2014 chmod u+w . 2>&AS_MESSAGE_LOG_FD
2015 $RM conftest*
2016 # SGI C++ compiler will create directory out/ii_files/ for
2017 # template instantiation
2018 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2019 $RM out/* && rmdir out
2020 cd ..
2021 $RM -r conftest
2022 $RM conftest*
2023 ])
2024 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2025 [Does compiler simultaneously support -c and -o options?])
2026 ])# _LT_COMPILER_C_O
2027
2028
2029 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
2030 # ----------------------------------
2031 # Check to see if we can do hard links to lock some files if needed
2032 m4_defun([_LT_COMPILER_FILE_LOCKS],
2033 [m4_require([_LT_ENABLE_LOCK])dnl
2034 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2035 _LT_COMPILER_C_O([$1])
2036
2037 hard_links="nottested"
2038 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2039 # do not overwrite the value of need_locks provided by the user
2040 AC_MSG_CHECKING([if we can lock with hard links])
2041 hard_links=yes
2042 $RM conftest*
2043 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2044 touch conftest.a
2045 ln conftest.a conftest.b 2>&5 || hard_links=no
2046 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2047 AC_MSG_RESULT([$hard_links])
2048 if test "$hard_links" = no; then
2049 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2050 need_locks=warn
2051 fi
2052 else
2053 need_locks=no
2054 fi
2055 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2056 ])# _LT_COMPILER_FILE_LOCKS
2057
2058
2059 # _LT_CHECK_OBJDIR
2060 # ----------------
2061 m4_defun([_LT_CHECK_OBJDIR],
2062 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2063 [rm -f .libs 2>/dev/null
2064 mkdir .libs 2>/dev/null
2065 if test -d .libs; then
2066 lt_cv_objdir=.libs
2067 else
2068 # MS-DOS does not allow filenames that begin with a dot.
2069 lt_cv_objdir=_libs
2070 fi
2071 rmdir .libs 2>/dev/null])
2072 objdir=$lt_cv_objdir
2073 _LT_DECL([], [objdir], [0],
2074 [The name of the directory that contains temporary libtool files])dnl
2075 m4_pattern_allow([LT_OBJDIR])dnl
2076 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
2077 [Define to the sub-directory in which libtool stores uninstalled libraries.])
2078 ])# _LT_CHECK_OBJDIR
2079
2080
2081 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2082 # --------------------------------------
2083 # Check hardcoding attributes.
2084 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2085 [AC_MSG_CHECKING([how to hardcode library paths into programs])
2086 _LT_TAGVAR(hardcode_action, $1)=
2087 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2088 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2089 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2090
2091 # We can hardcode non-existent directories.
2092 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
2093 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2094 # have to relink, otherwise we might link with an installed library
2095 # when we should be linking with a yet-to-be-installed one
2096 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2097 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
2098 # Linking always hardcodes the temporary library directory.
2099 _LT_TAGVAR(hardcode_action, $1)=relink
2100 else
2101 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2102 _LT_TAGVAR(hardcode_action, $1)=immediate
2103 fi
2104 else
2105 # We cannot hardcode anything, or else we can only hardcode existing
2106 # directories.
2107 _LT_TAGVAR(hardcode_action, $1)=unsupported
2108 fi
2109 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2110
2111 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2112 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2113 # Fast installation is not supported
2114 enable_fast_install=no
2115 elif test "$shlibpath_overrides_runpath" = yes ||
2116 test "$enable_shared" = no; then
2117 # Fast installation is not necessary
2118 enable_fast_install=needless
2119 fi
2120 _LT_TAGDECL([], [hardcode_action], [0],
2121 [How to hardcode a shared library path into an executable])
2122 ])# _LT_LINKER_HARDCODE_LIBPATH
2123
2124
2125 # _LT_CMD_STRIPLIB
2126 # ----------------
2127 m4_defun([_LT_CMD_STRIPLIB],
2128 [m4_require([_LT_DECL_EGREP])
2129 striplib=
2130 old_striplib=
2131 AC_MSG_CHECKING([whether stripping libraries is possible])
2132 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2133 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2134 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2135 AC_MSG_RESULT([yes])
2136 else
2137 # FIXME - insert some real tests, host_os isn't really good enough
2138 case $host_os in
2139 darwin*)
2140 if test -n "$STRIP" ; then
2141 striplib="$STRIP -x"
2142 old_striplib="$STRIP -S"
2143 AC_MSG_RESULT([yes])
2144 else
2145 AC_MSG_RESULT([no])
2146 fi
2147 ;;
2148 *)
2149 AC_MSG_RESULT([no])
2150 ;;
2151 esac
2152 fi
2153 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2154 _LT_DECL([], [striplib], [1])
2155 ])# _LT_CMD_STRIPLIB
2156
2157
2158 # _LT_SYS_DYNAMIC_LINKER([TAG])
2159 # -----------------------------
2160 # PORTME Fill in your ld.so characteristics
2161 m4_defun([_LT_SYS_DYNAMIC_LINKER],
2162 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2163 m4_require([_LT_DECL_EGREP])dnl
2164 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2165 m4_require([_LT_DECL_OBJDUMP])dnl
2166 m4_require([_LT_DECL_SED])dnl
2167 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2168 AC_MSG_CHECKING([dynamic linker characteristics])
2169 m4_if([$1],
2170 [], [
2171 if test "$GCC" = yes; then
2172 case $host_os in
2173 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2174 *) lt_awk_arg="/^libraries:/" ;;
2175 esac
2176 case $host_os in
2177 mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
2178 *) lt_sed_strip_eq="s,=/,/,g" ;;
2179 esac
2180 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
2181 case $lt_search_path_spec in
2182 *\;*)
2183 # if the path contains ";" then we assume it to be the separator
2184 # otherwise default to the standard path separator (i.e. ":") - it is
2185 # assumed that no part of a normal pathname contains ";" but that should
2186 # okay in the real world where ";" in dirpaths is itself problematic.
2187 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
2188 ;;
2189 *)
2190 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
2191 ;;
2192 esac
2193 # Ok, now we have the path, separated by spaces, we can step through it
2194 # and add multilib dir if necessary.
2195 lt_tmp_lt_search_path_spec=
2196 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2197 for lt_sys_path in $lt_search_path_spec; do
2198 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2199 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2200 else
2201 test -d "$lt_sys_path" && \
2202 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2203 fi
2204 done
2205 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
2206 BEGIN {RS=" "; FS="/|\n";} {
2207 lt_foo="";
2208 lt_count=0;
2209 for (lt_i = NF; lt_i > 0; lt_i--) {
2210 if ($lt_i != "" && $lt_i != ".") {
2211 if ($lt_i == "..") {
2212 lt_count++;
2213 } else {
2214 if (lt_count == 0) {
2215 lt_foo="/" $lt_i lt_foo;
2216 } else {
2217 lt_count--;
2218 }
2219 }
2220 }
2221 }
2222 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2223 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2224 }'`
2225 # AWK program above erroneously prepends '/' to C:/dos/paths
2226 # for these hosts.
2227 case $host_os in
2228 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
2229 $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
2230 esac
2231 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
2232 else
2233 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2234 fi])
2235 library_names_spec=
2236 libname_spec='lib$name'
2237 soname_spec=
2238 shrext_cmds=".so"
2239 postinstall_cmds=
2240 postuninstall_cmds=
2241 finish_cmds=
2242 finish_eval=
2243 shlibpath_var=
2244 shlibpath_overrides_runpath=unknown
2245 version_type=none
2246 dynamic_linker="$host_os ld.so"
2247 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2248 need_lib_prefix=unknown
2249 hardcode_into_libs=no
2250
2251 # when you set need_version to no, make sure it does not cause -set_version
2252 # flags to be left without arguments
2253 need_version=unknown
2254
2255 case $host_os in
2256 aix3*)
2257 version_type=linux # correct to gnu/linux during the next big refactor
2258 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2259 shlibpath_var=LIBPATH
2260
2261 # AIX 3 has no versioning support, so we append a major version to the name.
2262 soname_spec='${libname}${release}${shared_ext}$major'
2263 ;;
2264
2265 aix[[4-9]]*)
2266 version_type=linux # correct to gnu/linux during the next big refactor
2267 need_lib_prefix=no
2268 need_version=no
2269 hardcode_into_libs=yes
2270 if test "$host_cpu" = ia64; then
2271 # AIX 5 supports IA64
2272 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2273 shlibpath_var=LD_LIBRARY_PATH
2274 else
2275 # With GCC up to 2.95.x, collect2 would create an import file
2276 # for dependence libraries. The import file would start with
2277 # the line `#! .'. This would cause the generated library to
2278 # depend on `.', always an invalid library. This was fixed in
2279 # development snapshots of GCC prior to 3.0.
2280 case $host_os in
2281 aix4 | aix4.[[01]] | aix4.[[01]].*)
2282 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2283 echo ' yes '
2284 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2285 :
2286 else
2287 can_build_shared=no
2288 fi
2289 ;;
2290 esac
2291 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2292 # soname into executable. Probably we can add versioning support to
2293 # collect2, so additional links can be useful in future.
2294 if test "$aix_use_runtimelinking" = yes; then
2295 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2296 # instead of lib<name>.a to let people know that these are not
2297 # typical AIX shared libraries.
2298 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2299 else
2300 # We preserve .a as extension for shared libraries through AIX4.2
2301 # and later when we are not doing run time linking.
2302 library_names_spec='${libname}${release}.a $libname.a'
2303 soname_spec='${libname}${release}${shared_ext}$major'
2304 fi
2305 shlibpath_var=LIBPATH
2306 fi
2307 ;;
2308
2309 amigaos*)
2310 case $host_cpu in
2311 powerpc)
2312 # Since July 2007 AmigaOS4 officially supports .so libraries.
2313 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2314 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2315 ;;
2316 m68k)
2317 library_names_spec='$libname.ixlibrary $libname.a'
2318 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2319 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
2320 ;;
2321 esac
2322 ;;
2323
2324 beos*)
2325 library_names_spec='${libname}${shared_ext}'
2326 dynamic_linker="$host_os ld.so"
2327 shlibpath_var=LIBRARY_PATH
2328 ;;
2329
2330 bsdi[[45]]*)
2331 version_type=linux # correct to gnu/linux during the next big refactor
2332 need_version=no
2333 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2334 soname_spec='${libname}${release}${shared_ext}$major'
2335 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2336 shlibpath_var=LD_LIBRARY_PATH
2337 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2338 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2339 # the default ld.so.conf also contains /usr/contrib/lib and
2340 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2341 # libtool to hard-code these into programs
2342 ;;
2343
2344 cygwin* | mingw* | pw32* | cegcc*)
2345 version_type=windows
2346 shrext_cmds=".dll"
2347 need_version=no
2348 need_lib_prefix=no
2349
2350 case $GCC,$cc_basename in
2351 yes,*)
2352 # gcc
2353 library_names_spec='$libname.dll.a'
2354 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2355 postinstall_cmds='base_file=`basename \${file}`~
2356 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2357 dldir=$destdir/`dirname \$dlpath`~
2358 test -d \$dldir || mkdir -p \$dldir~
2359 $install_prog $dir/$dlname \$dldir/$dlname~
2360 chmod a+x \$dldir/$dlname~
2361 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2362 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2363 fi'
2364 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2365 dlpath=$dir/\$dldll~
2366 $RM \$dlpath'
2367 shlibpath_overrides_runpath=yes
2368
2369 case $host_os in
2370 cygwin*)
2371 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2372 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2373 m4_if([$1], [],[
2374 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
2375 ;;
2376 mingw* | cegcc*)
2377 # MinGW DLLs use traditional 'lib' prefix
2378 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2379 ;;
2380 pw32*)
2381 # pw32 DLLs use 'pw' prefix rather than 'lib'
2382 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2383 ;;
2384 esac
2385 dynamic_linker='Win32 ld.exe'
2386 ;;
2387
2388 *,cl*)
2389 # Native MSVC
2390 libname_spec='$name'
2391 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2392 library_names_spec='${libname}.dll.lib'
2393
2394 case $build_os in
2395 mingw*)
2396 sys_lib_search_path_spec=
2397 lt_save_ifs=$IFS
2398 IFS=';'
2399 for lt_path in $LIB
2400 do
2401 IFS=$lt_save_ifs
2402 # Let DOS variable expansion print the short 8.3 style file name.
2403 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
2404 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
2405 done
2406 IFS=$lt_save_ifs
2407 # Convert to MSYS style.
2408 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
2409 ;;
2410 cygwin*)
2411 # Convert to unix form, then to dos form, then back to unix form
2412 # but this time dos style (no spaces!) so that the unix form looks
2413 # like /cygdrive/c/PROGRA~1:/cygdr...
2414 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
2415 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
2416 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2417 ;;
2418 *)
2419 sys_lib_search_path_spec="$LIB"
2420 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2421 # It is most probably a Windows format PATH.
2422 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2423 else
2424 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2425 fi
2426 # FIXME: find the short name or the path components, as spaces are
2427 # common. (e.g. "Program Files" -> "PROGRA~1")
2428 ;;
2429 esac
2430
2431 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2432 postinstall_cmds='base_file=`basename \${file}`~
2433 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2434 dldir=$destdir/`dirname \$dlpath`~
2435 test -d \$dldir || mkdir -p \$dldir~
2436 $install_prog $dir/$dlname \$dldir/$dlname'
2437 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2438 dlpath=$dir/\$dldll~
2439 $RM \$dlpath'
2440 shlibpath_overrides_runpath=yes
2441 dynamic_linker='Win32 link.exe'
2442 ;;
2443
2444 *)
2445 # Assume MSVC wrapper
2446 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2447 dynamic_linker='Win32 ld.exe'
2448 ;;
2449 esac
2450 # FIXME: first we should search . and the directory the executable is in
2451 shlibpath_var=PATH
2452 ;;
2453
2454 darwin* | rhapsody*)
2455 dynamic_linker="$host_os dyld"
2456 version_type=darwin
2457 need_lib_prefix=no
2458 need_version=no
2459 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2460 soname_spec='${libname}${release}${major}$shared_ext'
2461 shlibpath_overrides_runpath=yes
2462 shlibpath_var=DYLD_LIBRARY_PATH
2463 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2464 m4_if([$1], [],[
2465 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2466 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2467 ;;
2468
2469 dgux*)
2470 version_type=linux # correct to gnu/linux during the next big refactor
2471 need_lib_prefix=no
2472 need_version=no
2473 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2474 soname_spec='${libname}${release}${shared_ext}$major'
2475 shlibpath_var=LD_LIBRARY_PATH
2476 ;;
2477
2478 freebsd* | dragonfly*)
2479 # DragonFly does not have aout. When/if they implement a new
2480 # versioning mechanism, adjust this.
2481 if test -x /usr/bin/objformat; then
2482 objformat=`/usr/bin/objformat`
2483 else
2484 case $host_os in
2485 freebsd[[23]].*) objformat=aout ;;
2486 *) objformat=elf ;;
2487 esac
2488 fi
2489 version_type=freebsd-$objformat
2490 case $version_type in
2491 freebsd-elf*)
2492 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2493 need_version=no
2494 need_lib_prefix=no
2495 ;;
2496 freebsd-*)
2497 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2498 need_version=yes
2499 ;;
2500 esac
2501 shlibpath_var=LD_LIBRARY_PATH
2502 case $host_os in
2503 freebsd2.*)
2504 shlibpath_overrides_runpath=yes
2505 ;;
2506 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2507 shlibpath_overrides_runpath=yes
2508 hardcode_into_libs=yes
2509 ;;
2510 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2511 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2512 shlibpath_overrides_runpath=no
2513 hardcode_into_libs=yes
2514 ;;
2515 *) # from 4.6 on, and DragonFly
2516 shlibpath_overrides_runpath=yes
2517 hardcode_into_libs=yes
2518 ;;
2519 esac
2520 ;;
2521
2522 haiku*)
2523 version_type=linux # correct to gnu/linux during the next big refactor
2524 need_lib_prefix=no
2525 need_version=no
2526 dynamic_linker="$host_os runtime_loader"
2527 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2528 soname_spec='${libname}${release}${shared_ext}$major'
2529 shlibpath_var=LIBRARY_PATH
2530 shlibpath_overrides_runpath=yes
2531 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
2532 hardcode_into_libs=yes
2533 ;;
2534
2535 hpux9* | hpux10* | hpux11*)
2536 # Give a soname corresponding to the major version so that dld.sl refuses to
2537 # link against other versions.
2538 version_type=sunos
2539 need_lib_prefix=no
2540 need_version=no
2541 case $host_cpu in
2542 ia64*)
2543 shrext_cmds='.so'
2544 hardcode_into_libs=yes
2545 dynamic_linker="$host_os dld.so"
2546 shlibpath_var=LD_LIBRARY_PATH
2547 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2548 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2549 soname_spec='${libname}${release}${shared_ext}$major'
2550 if test "X$HPUX_IA64_MODE" = X32; then
2551 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2552 else
2553 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2554 fi
2555 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2556 ;;
2557 hppa*64*)
2558 shrext_cmds='.sl'
2559 hardcode_into_libs=yes
2560 dynamic_linker="$host_os dld.sl"
2561 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2562 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2563 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2564 soname_spec='${libname}${release}${shared_ext}$major'
2565 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2566 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2567 ;;
2568 *)
2569 shrext_cmds='.sl'
2570 dynamic_linker="$host_os dld.sl"
2571 shlibpath_var=SHLIB_PATH
2572 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2573 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2574 soname_spec='${libname}${release}${shared_ext}$major'
2575 ;;
2576 esac
2577 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
2578 postinstall_cmds='chmod 555 $lib'
2579 # or fails outright, so override atomically:
2580 install_override_mode=555
2581 ;;
2582
2583 interix[[3-9]]*)
2584 version_type=linux # correct to gnu/linux during the next big refactor
2585 need_lib_prefix=no
2586 need_version=no
2587 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2588 soname_spec='${libname}${release}${shared_ext}$major'
2589 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2590 shlibpath_var=LD_LIBRARY_PATH
2591 shlibpath_overrides_runpath=no
2592 hardcode_into_libs=yes
2593 ;;
2594
2595 irix5* | irix6* | nonstopux*)
2596 case $host_os in
2597 nonstopux*) version_type=nonstopux ;;
2598 *)
2599 if test "$lt_cv_prog_gnu_ld" = yes; then
2600 version_type=linux # correct to gnu/linux during the next big refactor
2601 else
2602 version_type=irix
2603 fi ;;
2604 esac
2605 need_lib_prefix=no
2606 need_version=no
2607 soname_spec='${libname}${release}${shared_ext}$major'
2608 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2609 case $host_os in
2610 irix5* | nonstopux*)
2611 libsuff= shlibsuff=
2612 ;;
2613 *)
2614 case $LD in # libtool.m4 will add one of these switches to LD
2615 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2616 libsuff= shlibsuff= libmagic=32-bit;;
2617 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2618 libsuff=32 shlibsuff=N32 libmagic=N32;;
2619 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2620 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2621 *) libsuff= shlibsuff= libmagic=never-match;;
2622 esac
2623 ;;
2624 esac
2625 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2626 shlibpath_overrides_runpath=no
2627 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2628 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2629 hardcode_into_libs=yes
2630 ;;
2631
2632 # No shared lib support for Linux oldld, aout, or coff.
2633 linux*oldld* | linux*aout* | linux*coff*)
2634 dynamic_linker=no
2635 ;;
2636
2637 # This must be glibc/ELF.
2638 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
2639 version_type=linux # correct to gnu/linux during the next big refactor
2640 need_lib_prefix=no
2641 need_version=no
2642 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2643 soname_spec='${libname}${release}${shared_ext}$major'
2644 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2645 shlibpath_var=LD_LIBRARY_PATH
2646 shlibpath_overrides_runpath=no
2647
2648 # Some binutils ld are patched to set DT_RUNPATH
2649 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
2650 [lt_cv_shlibpath_overrides_runpath=no
2651 save_LDFLAGS=$LDFLAGS
2652 save_libdir=$libdir
2653 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2654 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2655 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2656 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2657 [lt_cv_shlibpath_overrides_runpath=yes])])
2658 LDFLAGS=$save_LDFLAGS
2659 libdir=$save_libdir
2660 ])
2661 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
2662
2663 # This implies no fast_install, which is unacceptable.
2664 # Some rework will be needed to allow for fast_install
2665 # before this can be enabled.
2666 hardcode_into_libs=yes
2667
2668 # Append ld.so.conf contents to the search path
2669 if test -f /etc/ld.so.conf; then
2670 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
2671 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2672 fi
2673
2674 # We used to test for /lib/ld.so.1 and disable shared libraries on
2675 # powerpc, because MkLinux only supported shared libraries with the
2676 # GNU dynamic linker. Since this was broken with cross compilers,
2677 # most powerpc-linux boxes support dynamic linking these days and
2678 # people can always --disable-shared, the test was removed, and we
2679 # assume the GNU/Linux dynamic linker is in use.
2680 dynamic_linker='GNU/Linux ld.so'
2681 ;;
2682
2683 netbsdelf*-gnu)
2684 version_type=linux
2685 need_lib_prefix=no
2686 need_version=no
2687 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2688 soname_spec='${libname}${release}${shared_ext}$major'
2689 shlibpath_var=LD_LIBRARY_PATH
2690 shlibpath_overrides_runpath=no
2691 hardcode_into_libs=yes
2692 dynamic_linker='NetBSD ld.elf_so'
2693 ;;
2694
2695 netbsd*)
2696 version_type=sunos
2697 need_lib_prefix=no
2698 need_version=no
2699 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2700 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2701 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2702 dynamic_linker='NetBSD (a.out) ld.so'
2703 else
2704 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2705 soname_spec='${libname}${release}${shared_ext}$major'
2706 dynamic_linker='NetBSD ld.elf_so'
2707 fi
2708 shlibpath_var=LD_LIBRARY_PATH
2709 shlibpath_overrides_runpath=yes
2710 hardcode_into_libs=yes
2711 ;;
2712
2713 newsos6)
2714 version_type=linux # correct to gnu/linux during the next big refactor
2715 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2716 shlibpath_var=LD_LIBRARY_PATH
2717 shlibpath_overrides_runpath=yes
2718 ;;
2719
2720 *nto* | *qnx*)
2721 version_type=qnx
2722 need_lib_prefix=no
2723 need_version=no
2724 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2725 soname_spec='${libname}${release}${shared_ext}$major'
2726 shlibpath_var=LD_LIBRARY_PATH
2727 shlibpath_overrides_runpath=no
2728 hardcode_into_libs=yes
2729 dynamic_linker='ldqnx.so'
2730 ;;
2731
2732 openbsd*)
2733 version_type=sunos
2734 sys_lib_dlsearch_path_spec="/usr/lib"
2735 need_lib_prefix=no
2736 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2737 case $host_os in
2738 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2739 *) need_version=no ;;
2740 esac
2741 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2742 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2743 shlibpath_var=LD_LIBRARY_PATH
2744 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2745 case $host_os in
2746 openbsd2.[[89]] | openbsd2.[[89]].*)
2747 shlibpath_overrides_runpath=no
2748 ;;
2749 *)
2750 shlibpath_overrides_runpath=yes
2751 ;;
2752 esac
2753 else
2754 shlibpath_overrides_runpath=yes
2755 fi
2756 ;;
2757
2758 os2*)
2759 libname_spec='$name'
2760 shrext_cmds=".dll"
2761 need_lib_prefix=no
2762 library_names_spec='$libname${shared_ext} $libname.a'
2763 dynamic_linker='OS/2 ld.exe'
2764 shlibpath_var=LIBPATH
2765 ;;
2766
2767 osf3* | osf4* | osf5*)
2768 version_type=osf
2769 need_lib_prefix=no
2770 need_version=no
2771 soname_spec='${libname}${release}${shared_ext}$major'
2772 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2773 shlibpath_var=LD_LIBRARY_PATH
2774 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2775 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2776 ;;
2777
2778 rdos*)
2779 dynamic_linker=no
2780 ;;
2781
2782 solaris*)
2783 version_type=linux # correct to gnu/linux during the next big refactor
2784 need_lib_prefix=no
2785 need_version=no
2786 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2787 soname_spec='${libname}${release}${shared_ext}$major'
2788 shlibpath_var=LD_LIBRARY_PATH
2789 shlibpath_overrides_runpath=yes
2790 hardcode_into_libs=yes
2791 # ldd complains unless libraries are executable
2792 postinstall_cmds='chmod +x $lib'
2793 ;;
2794
2795 sunos4*)
2796 version_type=sunos
2797 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2798 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2799 shlibpath_var=LD_LIBRARY_PATH
2800 shlibpath_overrides_runpath=yes
2801 if test "$with_gnu_ld" = yes; then
2802 need_lib_prefix=no
2803 fi
2804 need_version=yes
2805 ;;
2806
2807 sysv4 | sysv4.3*)
2808 version_type=linux # correct to gnu/linux during the next big refactor
2809 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2810 soname_spec='${libname}${release}${shared_ext}$major'
2811 shlibpath_var=LD_LIBRARY_PATH
2812 case $host_vendor in
2813 sni)
2814 shlibpath_overrides_runpath=no
2815 need_lib_prefix=no
2816 runpath_var=LD_RUN_PATH
2817 ;;
2818 siemens)
2819 need_lib_prefix=no
2820 ;;
2821 motorola)
2822 need_lib_prefix=no
2823 need_version=no
2824 shlibpath_overrides_runpath=no
2825 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2826 ;;
2827 esac
2828 ;;
2829
2830 sysv4*MP*)
2831 if test -d /usr/nec ;then
2832 version_type=linux # correct to gnu/linux during the next big refactor
2833 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2834 soname_spec='$libname${shared_ext}.$major'
2835 shlibpath_var=LD_LIBRARY_PATH
2836 fi
2837 ;;
2838
2839 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2840 version_type=freebsd-elf
2841 need_lib_prefix=no
2842 need_version=no
2843 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2844 soname_spec='${libname}${release}${shared_ext}$major'
2845 shlibpath_var=LD_LIBRARY_PATH
2846 shlibpath_overrides_runpath=yes
2847 hardcode_into_libs=yes
2848 if test "$with_gnu_ld" = yes; then
2849 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2850 else
2851 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2852 case $host_os in
2853 sco3.2v5*)
2854 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2855 ;;
2856 esac
2857 fi
2858 sys_lib_dlsearch_path_spec='/usr/lib'
2859 ;;
2860
2861 tpf*)
2862 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
2863 version_type=linux # correct to gnu/linux during the next big refactor
2864 need_lib_prefix=no
2865 need_version=no
2866 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2867 shlibpath_var=LD_LIBRARY_PATH
2868 shlibpath_overrides_runpath=no
2869 hardcode_into_libs=yes
2870 ;;
2871
2872 uts4*)
2873 version_type=linux # correct to gnu/linux during the next big refactor
2874 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2875 soname_spec='${libname}${release}${shared_ext}$major'
2876 shlibpath_var=LD_LIBRARY_PATH
2877 ;;
2878
2879 *)
2880 dynamic_linker=no
2881 ;;
2882 esac
2883 AC_MSG_RESULT([$dynamic_linker])
2884 test "$dynamic_linker" = no && can_build_shared=no
2885
2886 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2887 if test "$GCC" = yes; then
2888 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2889 fi
2890
2891 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
2892 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
2893 fi
2894 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
2895 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
2896 fi
2897
2898 _LT_DECL([], [variables_saved_for_relink], [1],
2899 [Variables whose values should be saved in libtool wrapper scripts and
2900 restored at link time])
2901 _LT_DECL([], [need_lib_prefix], [0],
2902 [Do we need the "lib" prefix for modules?])
2903 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
2904 _LT_DECL([], [version_type], [0], [Library versioning type])
2905 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
2906 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
2907 _LT_DECL([], [shlibpath_overrides_runpath], [0],
2908 [Is shlibpath searched before the hard-coded library search path?])
2909 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
2910 _LT_DECL([], [library_names_spec], [1],
2911 [[List of archive names. First name is the real one, the rest are links.
2912 The last name is the one that the linker finds with -lNAME]])
2913 _LT_DECL([], [soname_spec], [1],
2914 [[The coded name of the library, if different from the real name]])
2915 _LT_DECL([], [install_override_mode], [1],
2916 [Permission mode override for installation of shared libraries])
2917 _LT_DECL([], [postinstall_cmds], [2],
2918 [Command to use after installation of a shared archive])
2919 _LT_DECL([], [postuninstall_cmds], [2],
2920 [Command to use after uninstallation of a shared archive])
2921 _LT_DECL([], [finish_cmds], [2],
2922 [Commands used to finish a libtool library installation in a directory])
2923 _LT_DECL([], [finish_eval], [1],
2924 [[As "finish_cmds", except a single script fragment to be evaled but
2925 not shown]])
2926 _LT_DECL([], [hardcode_into_libs], [0],
2927 [Whether we should hardcode library paths into libraries])
2928 _LT_DECL([], [sys_lib_search_path_spec], [2],
2929 [Compile-time system search path for libraries])
2930 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
2931 [Run-time system search path for libraries])
2932 ])# _LT_SYS_DYNAMIC_LINKER
2933
2934
2935 # _LT_PATH_TOOL_PREFIX(TOOL)
2936 # --------------------------
2937 # find a file program which can recognize shared library
2938 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
2939 [m4_require([_LT_DECL_EGREP])dnl
2940 AC_MSG_CHECKING([for $1])
2941 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2942 [case $MAGIC_CMD in
2943 [[\\/*] | ?:[\\/]*])
2944 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2945 ;;
2946 *)
2947 lt_save_MAGIC_CMD="$MAGIC_CMD"
2948 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2949 dnl $ac_dummy forces splitting on constant user-supplied paths.
2950 dnl POSIX.2 word splitting is done only on the output of word expansions,
2951 dnl not every word. This closes a longstanding sh security hole.
2952 ac_dummy="m4_if([$2], , $PATH, [$2])"
2953 for ac_dir in $ac_dummy; do
2954 IFS="$lt_save_ifs"
2955 test -z "$ac_dir" && ac_dir=.
2956 if test -f $ac_dir/$1; then
2957 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2958 if test -n "$file_magic_test_file"; then
2959 case $deplibs_check_method in
2960 "file_magic "*)
2961 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2962 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2963 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2964 $EGREP "$file_magic_regex" > /dev/null; then
2965 :
2966 else
2967 cat <<_LT_EOF 1>&2
2968
2969 *** Warning: the command libtool uses to detect shared libraries,
2970 *** $file_magic_cmd, produces output that libtool cannot recognize.
2971 *** The result is that libtool may fail to recognize shared libraries
2972 *** as such. This will affect the creation of libtool libraries that
2973 *** depend on shared libraries, but programs linked with such libtool
2974 *** libraries will work regardless of this problem. Nevertheless, you
2975 *** may want to report the problem to your system manager and/or to
2976 *** bug-libtool@gnu.org
2977
2978 _LT_EOF
2979 fi ;;
2980 esac
2981 fi
2982 break
2983 fi
2984 done
2985 IFS="$lt_save_ifs"
2986 MAGIC_CMD="$lt_save_MAGIC_CMD"
2987 ;;
2988 esac])
2989 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2990 if test -n "$MAGIC_CMD"; then
2991 AC_MSG_RESULT($MAGIC_CMD)
2992 else
2993 AC_MSG_RESULT(no)
2994 fi
2995 _LT_DECL([], [MAGIC_CMD], [0],
2996 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
2997 ])# _LT_PATH_TOOL_PREFIX
2998
2999 # Old name:
3000 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3001 dnl aclocal-1.4 backwards compatibility:
3002 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3003
3004
3005 # _LT_PATH_MAGIC
3006 # --------------
3007 # find a file program which can recognize a shared library
3008 m4_defun([_LT_PATH_MAGIC],
3009 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3010 if test -z "$lt_cv_path_MAGIC_CMD"; then
3011 if test -n "$ac_tool_prefix"; then
3012 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3013 else
3014 MAGIC_CMD=:
3015 fi
3016 fi
3017 ])# _LT_PATH_MAGIC
3018
3019
3020 # LT_PATH_LD
3021 # ----------
3022 # find the pathname to the GNU or non-GNU linker
3023 AC_DEFUN([LT_PATH_LD],
3024 [AC_REQUIRE([AC_PROG_CC])dnl
3025 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3026 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3027 m4_require([_LT_DECL_SED])dnl
3028 m4_require([_LT_DECL_EGREP])dnl
3029 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
3030
3031 AC_ARG_WITH([gnu-ld],
3032 [AS_HELP_STRING([--with-gnu-ld],
3033 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
3034 [test "$withval" = no || with_gnu_ld=yes],
3035 [with_gnu_ld=no])dnl
3036
3037 ac_prog=ld
3038 if test "$GCC" = yes; then
3039 # Check if gcc -print-prog-name=ld gives a path.
3040 AC_MSG_CHECKING([for ld used by $CC])
3041 case $host in
3042 *-*-mingw*)
3043 # gcc leaves a trailing carriage return which upsets mingw
3044 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3045 *)
3046 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3047 esac
3048 case $ac_prog in
3049 # Accept absolute paths.
3050 [[\\/]]* | ?:[[\\/]]*)
3051 re_direlt='/[[^/]][[^/]]*/\.\./'
3052 # Canonicalize the pathname of ld
3053 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3054 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3055 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3056 done
3057 test -z "$LD" && LD="$ac_prog"
3058 ;;
3059 "")
3060 # If it fails, then pretend we aren't using GCC.
3061 ac_prog=ld
3062 ;;
3063 *)
3064 # If it is relative, then search for the first ld in PATH.
3065 with_gnu_ld=unknown
3066 ;;
3067 esac
3068 elif test "$with_gnu_ld" = yes; then
3069 AC_MSG_CHECKING([for GNU ld])
3070 else
3071 AC_MSG_CHECKING([for non-GNU ld])
3072 fi
3073 AC_CACHE_VAL(lt_cv_path_LD,
3074 [if test -z "$LD"; then
3075 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3076 for ac_dir in $PATH; do
3077 IFS="$lt_save_ifs"
3078 test -z "$ac_dir" && ac_dir=.
3079 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3080 lt_cv_path_LD="$ac_dir/$ac_prog"
3081 # Check to see if the program is GNU ld. I'd rather use --version,
3082 # but apparently some variants of GNU ld only accept -v.
3083 # Break only if it was the GNU/non-GNU ld that we prefer.
3084 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3085 *GNU* | *'with BFD'*)
3086 test "$with_gnu_ld" != no && break
3087 ;;
3088 *)
3089 test "$with_gnu_ld" != yes && break
3090 ;;
3091 esac
3092 fi
3093 done
3094 IFS="$lt_save_ifs"
3095 else
3096 lt_cv_path_LD="$LD" # Let the user override the test with a path.
3097 fi])
3098 LD="$lt_cv_path_LD"
3099 if test -n "$LD"; then
3100 AC_MSG_RESULT($LD)
3101 else
3102 AC_MSG_RESULT(no)
3103 fi
3104 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3105 _LT_PATH_LD_GNU
3106 AC_SUBST([LD])
3107
3108 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3109 ])# LT_PATH_LD
3110
3111 # Old names:
3112 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3113 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3114 dnl aclocal-1.4 backwards compatibility:
3115 dnl AC_DEFUN([AM_PROG_LD], [])
3116 dnl AC_DEFUN([AC_PROG_LD], [])
3117
3118
3119 # _LT_PATH_LD_GNU
3120 #- --------------
3121 m4_defun([_LT_PATH_LD_GNU],
3122 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3123 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
3124 case `$LD -v 2>&1 </dev/null` in
3125 *GNU* | *'with BFD'*)
3126 lt_cv_prog_gnu_ld=yes
3127 ;;
3128 *)
3129 lt_cv_prog_gnu_ld=no
3130 ;;
3131 esac])
3132 with_gnu_ld=$lt_cv_prog_gnu_ld
3133 ])# _LT_PATH_LD_GNU
3134
3135
3136 # _LT_CMD_RELOAD
3137 # --------------
3138 # find reload flag for linker
3139 # -- PORTME Some linkers may need a different reload flag.
3140 m4_defun([_LT_CMD_RELOAD],
3141 [AC_CACHE_CHECK([for $LD option to reload object files],
3142 lt_cv_ld_reload_flag,
3143 [lt_cv_ld_reload_flag='-r'])
3144 reload_flag=$lt_cv_ld_reload_flag
3145 case $reload_flag in
3146 "" | " "*) ;;
3147 *) reload_flag=" $reload_flag" ;;
3148 esac
3149 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3150 case $host_os in
3151 cygwin* | mingw* | pw32* | cegcc*)
3152 if test "$GCC" != yes; then
3153 reload_cmds=false
3154 fi
3155 ;;
3156 darwin*)
3157 if test "$GCC" = yes; then
3158 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3159 else
3160 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3161 fi
3162 ;;
3163 esac
3164 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3165 _LT_TAGDECL([], [reload_cmds], [2])dnl
3166 ])# _LT_CMD_RELOAD
3167
3168
3169 # _LT_CHECK_MAGIC_METHOD
3170 # ----------------------
3171 # how to check for library dependencies
3172 # -- PORTME fill in with the dynamic library characteristics
3173 m4_defun([_LT_CHECK_MAGIC_METHOD],
3174 [m4_require([_LT_DECL_EGREP])
3175 m4_require([_LT_DECL_OBJDUMP])
3176 AC_CACHE_CHECK([how to recognize dependent libraries],
3177 lt_cv_deplibs_check_method,
3178 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3179 lt_cv_file_magic_test_file=
3180 lt_cv_deplibs_check_method='unknown'
3181 # Need to set the preceding variable on all platforms that support
3182 # interlibrary dependencies.
3183 # 'none' -- dependencies not supported.
3184 # `unknown' -- same as none, but documents that we really don't know.
3185 # 'pass_all' -- all dependencies passed with no checks.
3186 # 'test_compile' -- check by making test program.
3187 # 'file_magic [[regex]]' -- check by looking for files in library path
3188 # which responds to the $file_magic_cmd with a given extended regex.
3189 # If you have `file' or equivalent on your system and you're not sure
3190 # whether `pass_all' will *always* work, you probably want this one.
3191
3192 case $host_os in
3193 aix[[4-9]]*)
3194 lt_cv_deplibs_check_method=pass_all
3195 ;;
3196
3197 beos*)
3198 lt_cv_deplibs_check_method=pass_all
3199 ;;
3200
3201 bsdi[[45]]*)
3202 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3203 lt_cv_file_magic_cmd='/usr/bin/file -L'
3204 lt_cv_file_magic_test_file=/shlib/libc.so
3205 ;;
3206
3207 cygwin*)
3208 # func_win32_libid is a shell function defined in ltmain.sh
3209 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3210 lt_cv_file_magic_cmd='func_win32_libid'
3211 ;;
3212
3213 mingw* | pw32*)
3214 # Base MSYS/MinGW do not provide the 'file' command needed by
3215 # func_win32_libid shell function, so use a weaker test based on 'objdump',
3216 # unless we find 'file', for example because we are cross-compiling.
3217 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
3218 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
3219 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3220 lt_cv_file_magic_cmd='func_win32_libid'
3221 else
3222 # Keep this pattern in sync with the one in func_win32_libid.
3223 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
3224 lt_cv_file_magic_cmd='$OBJDUMP -f'
3225 fi
3226 ;;
3227
3228 cegcc*)
3229 # use the weaker test based on 'objdump'. See mingw*.
3230 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3231 lt_cv_file_magic_cmd='$OBJDUMP -f'
3232 ;;
3233
3234 darwin* | rhapsody*)
3235 lt_cv_deplibs_check_method=pass_all
3236 ;;
3237
3238 freebsd* | dragonfly*)
3239 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3240 case $host_cpu in
3241 i*86 )
3242 # Not sure whether the presence of OpenBSD here was a mistake.
3243 # Let's accept both of them until this is cleared up.
3244 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3245 lt_cv_file_magic_cmd=/usr/bin/file
3246 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3247 ;;
3248 esac
3249 else
3250 lt_cv_deplibs_check_method=pass_all
3251 fi
3252 ;;
3253
3254 haiku*)
3255 lt_cv_deplibs_check_method=pass_all
3256 ;;
3257
3258 hpux10.20* | hpux11*)
3259 lt_cv_file_magic_cmd=/usr/bin/file
3260 case $host_cpu in
3261 ia64*)
3262 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3263 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3264 ;;
3265 hppa*64*)
3266 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
3267 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3268 ;;
3269 *)
3270 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
3271 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3272 ;;
3273 esac
3274 ;;
3275
3276 interix[[3-9]]*)
3277 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3278 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3279 ;;
3280
3281 irix5* | irix6* | nonstopux*)
3282 case $LD in
3283 *-32|*"-32 ") libmagic=32-bit;;
3284 *-n32|*"-n32 ") libmagic=N32;;
3285 *-64|*"-64 ") libmagic=64-bit;;
3286 *) libmagic=never-match;;
3287 esac
3288 lt_cv_deplibs_check_method=pass_all
3289 ;;
3290
3291 # This must be glibc/ELF.
3292 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
3293 lt_cv_deplibs_check_method=pass_all
3294 ;;
3295
3296 netbsd* | netbsdelf*-gnu)
3297 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3298 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3299 else
3300 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3301 fi
3302 ;;
3303
3304 newos6*)
3305 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3306 lt_cv_file_magic_cmd=/usr/bin/file
3307 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3308 ;;
3309
3310 *nto* | *qnx*)
3311 lt_cv_deplibs_check_method=pass_all
3312 ;;
3313
3314 openbsd*)
3315 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3316 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3317 else
3318 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3319 fi
3320 ;;
3321
3322 osf3* | osf4* | osf5*)
3323 lt_cv_deplibs_check_method=pass_all
3324 ;;
3325
3326 rdos*)
3327 lt_cv_deplibs_check_method=pass_all
3328 ;;
3329
3330 solaris*)
3331 lt_cv_deplibs_check_method=pass_all
3332 ;;
3333
3334 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3335 lt_cv_deplibs_check_method=pass_all
3336 ;;
3337
3338 sysv4 | sysv4.3*)
3339 case $host_vendor in
3340 motorola)
3341 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
3342 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3343 ;;
3344 ncr)
3345 lt_cv_deplibs_check_method=pass_all
3346 ;;
3347 sequent)
3348 lt_cv_file_magic_cmd='/bin/file'
3349 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3350 ;;
3351 sni)
3352 lt_cv_file_magic_cmd='/bin/file'
3353 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3354 lt_cv_file_magic_test_file=/lib/libc.so
3355 ;;
3356 siemens)
3357 lt_cv_deplibs_check_method=pass_all
3358 ;;
3359 pc)
3360 lt_cv_deplibs_check_method=pass_all
3361 ;;
3362 esac
3363 ;;
3364
3365 tpf*)
3366 lt_cv_deplibs_check_method=pass_all
3367 ;;
3368 esac
3369 ])
3370
3371 file_magic_glob=
3372 want_nocaseglob=no
3373 if test "$build" = "$host"; then
3374 case $host_os in
3375 mingw* | pw32*)
3376 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
3377 want_nocaseglob=yes
3378 else
3379 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
3380 fi
3381 ;;
3382 esac
3383 fi
3384
3385 file_magic_cmd=$lt_cv_file_magic_cmd
3386 deplibs_check_method=$lt_cv_deplibs_check_method
3387 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3388
3389 _LT_DECL([], [deplibs_check_method], [1],
3390 [Method to check whether dependent libraries are shared objects])
3391 _LT_DECL([], [file_magic_cmd], [1],
3392 [Command to use when deplibs_check_method = "file_magic"])
3393 _LT_DECL([], [file_magic_glob], [1],
3394 [How to find potential files when deplibs_check_method = "file_magic"])
3395 _LT_DECL([], [want_nocaseglob], [1],
3396 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
3397 ])# _LT_CHECK_MAGIC_METHOD
3398
3399
3400 # LT_PATH_NM
3401 # ----------
3402 # find the pathname to a BSD- or MS-compatible name lister
3403 AC_DEFUN([LT_PATH_NM],
3404 [AC_REQUIRE([AC_PROG_CC])dnl
3405 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3406 [if test -n "$NM"; then
3407 # Let the user override the test.
3408 lt_cv_path_NM="$NM"
3409 else
3410 lt_nm_to_check="${ac_tool_prefix}nm"
3411 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3412 lt_nm_to_check="$lt_nm_to_check nm"
3413 fi
3414 for lt_tmp_nm in $lt_nm_to_check; do
3415 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3416 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3417 IFS="$lt_save_ifs"
3418 test -z "$ac_dir" && ac_dir=.
3419 tmp_nm="$ac_dir/$lt_tmp_nm"
3420 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3421 # Check to see if the nm accepts a BSD-compat flag.
3422 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3423 # nm: unknown option "B" ignored
3424 # Tru64's nm complains that /dev/null is an invalid object file
3425 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3426 */dev/null* | *'Invalid file or object type'*)
3427 lt_cv_path_NM="$tmp_nm -B"
3428 break
3429 ;;
3430 *)
3431 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3432 */dev/null*)
3433 lt_cv_path_NM="$tmp_nm -p"
3434 break
3435 ;;
3436 *)
3437 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3438 continue # so that we can try to find one that supports BSD flags
3439 ;;
3440 esac
3441 ;;
3442 esac
3443 fi
3444 done
3445 IFS="$lt_save_ifs"
3446 done
3447 : ${lt_cv_path_NM=no}
3448 fi])
3449 if test "$lt_cv_path_NM" != "no"; then
3450 NM="$lt_cv_path_NM"
3451 else
3452 # Didn't find any BSD compatible name lister, look for dumpbin.
3453 if test -n "$DUMPBIN"; then :
3454 # Let the user override the test.
3455 else
3456 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
3457 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
3458 *COFF*)
3459 DUMPBIN="$DUMPBIN -symbols"
3460 ;;
3461 *)
3462 DUMPBIN=:
3463 ;;
3464 esac
3465 fi
3466 AC_SUBST([DUMPBIN])
3467 if test "$DUMPBIN" != ":"; then
3468 NM="$DUMPBIN"
3469 fi
3470 fi
3471 test -z "$NM" && NM=nm
3472 AC_SUBST([NM])
3473 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3474
3475 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3476 [lt_cv_nm_interface="BSD nm"
3477 echo "int some_variable = 0;" > conftest.$ac_ext
3478 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3479 (eval "$ac_compile" 2>conftest.err)
3480 cat conftest.err >&AS_MESSAGE_LOG_FD
3481 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3482 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3483 cat conftest.err >&AS_MESSAGE_LOG_FD
3484 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
3485 cat conftest.out >&AS_MESSAGE_LOG_FD
3486 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3487 lt_cv_nm_interface="MS dumpbin"
3488 fi
3489 rm -f conftest*])
3490 ])# LT_PATH_NM
3491
3492 # Old names:
3493 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3494 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3495 dnl aclocal-1.4 backwards compatibility:
3496 dnl AC_DEFUN([AM_PROG_NM], [])
3497 dnl AC_DEFUN([AC_PROG_NM], [])
3498
3499 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3500 # --------------------------------
3501 # how to determine the name of the shared library
3502 # associated with a specific link library.
3503 # -- PORTME fill in with the dynamic library characteristics
3504 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
3505 [m4_require([_LT_DECL_EGREP])
3506 m4_require([_LT_DECL_OBJDUMP])
3507 m4_require([_LT_DECL_DLLTOOL])
3508 AC_CACHE_CHECK([how to associate runtime and link libraries],
3509 lt_cv_sharedlib_from_linklib_cmd,
3510 [lt_cv_sharedlib_from_linklib_cmd='unknown'
3511
3512 case $host_os in
3513 cygwin* | mingw* | pw32* | cegcc*)
3514 # two different shell functions defined in ltmain.sh
3515 # decide which to use based on capabilities of $DLLTOOL
3516 case `$DLLTOOL --help 2>&1` in
3517 *--identify-strict*)
3518 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
3519 ;;
3520 *)
3521 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
3522 ;;
3523 esac
3524 ;;
3525 *)
3526 # fallback: assume linklib IS sharedlib
3527 lt_cv_sharedlib_from_linklib_cmd="$ECHO"
3528 ;;
3529 esac
3530 ])
3531 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
3532 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
3533
3534 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
3535 [Command to associate shared and link libraries])
3536 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3537
3538
3539 # _LT_PATH_MANIFEST_TOOL
3540 # ----------------------
3541 # locate the manifest tool
3542 m4_defun([_LT_PATH_MANIFEST_TOOL],
3543 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
3544 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
3545 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
3546 [lt_cv_path_mainfest_tool=no
3547 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
3548 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
3549 cat conftest.err >&AS_MESSAGE_LOG_FD
3550 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
3551 lt_cv_path_mainfest_tool=yes
3552 fi
3553 rm -f conftest*])
3554 if test "x$lt_cv_path_mainfest_tool" != xyes; then
3555 MANIFEST_TOOL=:
3556 fi
3557 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
3558 ])# _LT_PATH_MANIFEST_TOOL
3559
3560
3561 # LT_LIB_M
3562 # --------
3563 # check for math library
3564 AC_DEFUN([LT_LIB_M],
3565 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3566 LIBM=
3567 case $host in
3568 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
3569 # These system don't have libm, or don't need it
3570 ;;
3571 *-ncr-sysv4.3*)
3572 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3573 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3574 ;;
3575 *)
3576 AC_CHECK_LIB(m, cos, LIBM="-lm")
3577 ;;
3578 esac
3579 AC_SUBST([LIBM])
3580 ])# LT_LIB_M
3581
3582 # Old name:
3583 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3584 dnl aclocal-1.4 backwards compatibility:
3585 dnl AC_DEFUN([AC_CHECK_LIBM], [])
3586
3587
3588 # _LT_COMPILER_NO_RTTI([TAGNAME])
3589 # -------------------------------
3590 m4_defun([_LT_COMPILER_NO_RTTI],
3591 [m4_require([_LT_TAG_COMPILER])dnl
3592
3593 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3594
3595 if test "$GCC" = yes; then
3596 case $cc_basename in
3597 nvcc*)
3598 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
3599 *)
3600 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
3601 esac
3602
3603 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3604 lt_cv_prog_compiler_rtti_exceptions,
3605 [-fno-rtti -fno-exceptions], [],
3606 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3607 fi
3608 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3609 [Compiler flag to turn off builtin functions])
3610 ])# _LT_COMPILER_NO_RTTI
3611
3612
3613 # _LT_CMD_GLOBAL_SYMBOLS
3614 # ----------------------
3615 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3616 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3617 AC_REQUIRE([AC_PROG_CC])dnl
3618 AC_REQUIRE([AC_PROG_AWK])dnl
3619 AC_REQUIRE([LT_PATH_NM])dnl
3620 AC_REQUIRE([LT_PATH_LD])dnl
3621 m4_require([_LT_DECL_SED])dnl
3622 m4_require([_LT_DECL_EGREP])dnl
3623 m4_require([_LT_TAG_COMPILER])dnl
3624
3625 # Check for command to grab the raw symbol name followed by C symbol from nm.
3626 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3627 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3628 [
3629 # These are sane defaults that work on at least a few old systems.
3630 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
3631
3632 # Character class describing NM global symbol codes.
3633 symcode='[[BCDEGRST]]'
3634
3635 # Regexp to match symbols that can be accessed directly from C.
3636 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3637
3638 # Define system-specific variables.
3639 case $host_os in
3640 aix*)
3641 symcode='[[BCDT]]'
3642 ;;
3643 cygwin* | mingw* | pw32* | cegcc*)
3644 symcode='[[ABCDGISTW]]'
3645 ;;
3646 hpux*)
3647 if test "$host_cpu" = ia64; then
3648 symcode='[[ABCDEGRST]]'
3649 fi
3650 ;;
3651 irix* | nonstopux*)
3652 symcode='[[BCDEGRST]]'
3653 ;;
3654 osf*)
3655 symcode='[[BCDEGQRST]]'
3656 ;;
3657 solaris*)
3658 symcode='[[BDRT]]'
3659 ;;
3660 sco3.2v5*)
3661 symcode='[[DT]]'
3662 ;;
3663 sysv4.2uw2*)
3664 symcode='[[DT]]'
3665 ;;
3666 sysv5* | sco5v6* | unixware* | OpenUNIX*)
3667 symcode='[[ABDT]]'
3668 ;;
3669 sysv4)
3670 symcode='[[DFNSTU]]'
3671 ;;
3672 esac
3673
3674 # If we're using GNU nm, then use its standard symbol codes.
3675 case `$NM -V 2>&1` in
3676 *GNU* | *'with BFD'*)
3677 symcode='[[ABCDGIRSTW]]' ;;
3678 esac
3679
3680 # Transform an extracted symbol line into a proper C declaration.
3681 # Some systems (esp. on ia64) link data and code symbols differently,
3682 # so use this general approach.
3683 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3684
3685 # Transform an extracted symbol line into symbol name and symbol address
3686 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
3687 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
3688
3689 # Handle CRLF in mingw tool chain
3690 opt_cr=
3691 case $build_os in
3692 mingw*)
3693 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3694 ;;
3695 esac
3696
3697 # Try without a prefix underscore, then with it.
3698 for ac_symprfx in "" "_"; do
3699
3700 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
3701 symxfrm="\\1 $ac_symprfx\\2 \\2"
3702
3703 # Write the raw and C identifiers.
3704 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3705 # Fake it for dumpbin and say T for any non-static function
3706 # and D for any global variable.
3707 # Also find C++ and __fastcall symbols from MSVC++,
3708 # which start with @ or ?.
3709 lt_cv_sys_global_symbol_pipe="$AWK ['"\
3710 " {last_section=section; section=\$ 3};"\
3711 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
3712 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
3713 " \$ 0!~/External *\|/{next};"\
3714 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
3715 " {if(hide[section]) next};"\
3716 " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
3717 " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
3718 " s[1]~/^[@?]/{print s[1], s[1]; next};"\
3719 " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
3720 " ' prfx=^$ac_symprfx]"
3721 else
3722 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
3723 fi
3724 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
3725
3726 # Check to see that the pipe works correctly.
3727 pipe_works=no
3728
3729 rm -f conftest*
3730 cat > conftest.$ac_ext <<_LT_EOF
3731 #ifdef __cplusplus
3732 extern "C" {
3733 #endif
3734 char nm_test_var;
3735 void nm_test_func(void);
3736 void nm_test_func(void){}
3737 #ifdef __cplusplus
3738 }
3739 #endif
3740 int main(){nm_test_var='a';nm_test_func();return(0);}
3741 _LT_EOF
3742
3743 if AC_TRY_EVAL(ac_compile); then
3744 # Now try to grab the symbols.
3745 nlist=conftest.nm
3746 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
3747 # Try sorting and uniquifying the output.
3748 if sort "$nlist" | uniq > "$nlist"T; then
3749 mv -f "$nlist"T "$nlist"
3750 else
3751 rm -f "$nlist"T
3752 fi
3753
3754 # Make sure that we snagged all the symbols we need.
3755 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
3756 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
3757 cat <<_LT_EOF > conftest.$ac_ext
3758 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
3759 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
3760 /* DATA imports from DLLs on WIN32 con't be const, because runtime
3761 relocations are performed -- see ld's documentation on pseudo-relocs. */
3762 # define LT@&t@_DLSYM_CONST
3763 #elif defined(__osf__)
3764 /* This system does not cope well with relocations in const data. */
3765 # define LT@&t@_DLSYM_CONST
3766 #else
3767 # define LT@&t@_DLSYM_CONST const
3768 #endif
3769
3770 #ifdef __cplusplus
3771 extern "C" {
3772 #endif
3773
3774 _LT_EOF
3775 # Now generate the symbol file.
3776 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
3777
3778 cat <<_LT_EOF >> conftest.$ac_ext
3779
3780 /* The mapping between symbol names and symbols. */
3781 LT@&t@_DLSYM_CONST struct {
3782 const char *name;
3783 void *address;
3784 }
3785 lt__PROGRAM__LTX_preloaded_symbols[[]] =
3786 {
3787 { "@PROGRAM@", (void *) 0 },
3788 _LT_EOF
3789 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
3790 cat <<\_LT_EOF >> conftest.$ac_ext
3791 {0, (void *) 0}
3792 };
3793
3794 /* This works around a problem in FreeBSD linker */
3795 #ifdef FREEBSD_WORKAROUND
3796 static const void *lt_preloaded_setup() {
3797 return lt__PROGRAM__LTX_preloaded_symbols;
3798 }
3799 #endif
3800
3801 #ifdef __cplusplus
3802 }
3803 #endif
3804 _LT_EOF
3805 # Now try linking the two files.
3806 mv conftest.$ac_objext conftstm.$ac_objext
3807 lt_globsym_save_LIBS=$LIBS
3808 lt_globsym_save_CFLAGS=$CFLAGS
3809 LIBS="conftstm.$ac_objext"
3810 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3811 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3812 pipe_works=yes
3813 fi
3814 LIBS=$lt_globsym_save_LIBS
3815 CFLAGS=$lt_globsym_save_CFLAGS
3816 else
3817 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3818 fi
3819 else
3820 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
3821 fi
3822 else
3823 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
3824 fi
3825 else
3826 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
3827 cat conftest.$ac_ext >&5
3828 fi
3829 rm -rf conftest* conftst*
3830
3831 # Do not use the global_symbol_pipe unless it works.
3832 if test "$pipe_works" = yes; then
3833 break
3834 else
3835 lt_cv_sys_global_symbol_pipe=
3836 fi
3837 done
3838 ])
3839 if test -z "$lt_cv_sys_global_symbol_pipe"; then
3840 lt_cv_sys_global_symbol_to_cdecl=
3841 fi
3842 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
3843 AC_MSG_RESULT(failed)
3844 else
3845 AC_MSG_RESULT(ok)
3846 fi
3847
3848 # Response file support.
3849 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3850 nm_file_list_spec='@'
3851 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
3852 nm_file_list_spec='@'
3853 fi
3854
3855 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
3856 [Take the output of nm and produce a listing of raw symbols and C names])
3857 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
3858 [Transform the output of nm in a proper C declaration])
3859 _LT_DECL([global_symbol_to_c_name_address],
3860 [lt_cv_sys_global_symbol_to_c_name_address], [1],
3861 [Transform the output of nm in a C name address pair])
3862 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
3863 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
3864 [Transform the output of nm in a C name address pair when lib prefix is needed])
3865 _LT_DECL([], [nm_file_list_spec], [1],
3866 [Specify filename containing input files for $NM])
3867 ]) # _LT_CMD_GLOBAL_SYMBOLS
3868
3869
3870 # _LT_COMPILER_PIC([TAGNAME])
3871 # ---------------------------
3872 m4_defun([_LT_COMPILER_PIC],
3873 [m4_require([_LT_TAG_COMPILER])dnl
3874 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
3875 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3876 _LT_TAGVAR(lt_prog_compiler_static, $1)=
3877
3878 m4_if([$1], [CXX], [
3879 # C++ specific cases for pic, static, wl, etc.
3880 if test "$GXX" = yes; then
3881 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3882 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3883
3884 case $host_os in
3885 aix*)
3886 # All AIX code is PIC.
3887 if test "$host_cpu" = ia64; then
3888 # AIX 5 now supports IA64 processor
3889 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3890 fi
3891 ;;
3892
3893 amigaos*)
3894 case $host_cpu in
3895 powerpc)
3896 # see comment about AmigaOS4 .so support
3897 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3898 ;;
3899 m68k)
3900 # FIXME: we need at least 68020 code to build shared libraries, but
3901 # adding the `-m68020' flag to GCC prevents building anything better,
3902 # like `-m68040'.
3903 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3904 ;;
3905 esac
3906 ;;
3907
3908 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3909 # PIC is the default for these OSes.
3910 ;;
3911 mingw* | cygwin* | os2* | pw32* | cegcc*)
3912 # This hack is so that the source file can tell whether it is being
3913 # built for inclusion in a dll (and should export symbols for example).
3914 # Although the cygwin gcc ignores -fPIC, still need this for old-style
3915 # (--disable-auto-import) libraries
3916 m4_if([$1], [GCJ], [],
3917 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3918 ;;
3919 darwin* | rhapsody*)
3920 # PIC is the default on this platform
3921 # Common symbols not allowed in MH_DYLIB files
3922 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3923 ;;
3924 *djgpp*)
3925 # DJGPP does not support shared libraries at all
3926 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3927 ;;
3928 haiku*)
3929 # PIC is the default for Haiku.
3930 # The "-static" flag exists, but is broken.
3931 _LT_TAGVAR(lt_prog_compiler_static, $1)=
3932 ;;
3933 interix[[3-9]]*)
3934 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3935 # Instead, we relocate shared libraries at runtime.
3936 ;;
3937 sysv4*MP*)
3938 if test -d /usr/nec; then
3939 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3940 fi
3941 ;;
3942 hpux*)
3943 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
3944 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
3945 # sets the default TLS model and affects inlining.
3946 case $host_cpu in
3947 hppa*64*)
3948 ;;
3949 *)
3950 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3951 ;;
3952 esac
3953 ;;
3954 *qnx* | *nto*)
3955 # QNX uses GNU C++, but need to define -shared option too, otherwise
3956 # it will coredump.
3957 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3958 ;;
3959 *)
3960 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3961 ;;
3962 esac
3963 else
3964 case $host_os in
3965 aix[[4-9]]*)
3966 # All AIX code is PIC.
3967 if test "$host_cpu" = ia64; then
3968 # AIX 5 now supports IA64 processor
3969 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3970 else
3971 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3972 fi
3973 ;;
3974 chorus*)
3975 case $cc_basename in
3976 cxch68*)
3977 # Green Hills C++ Compiler
3978 # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
3979 ;;
3980 esac
3981 ;;
3982 mingw* | cygwin* | os2* | pw32* | cegcc*)
3983 # This hack is so that the source file can tell whether it is being
3984 # built for inclusion in a dll (and should export symbols for example).
3985 m4_if([$1], [GCJ], [],
3986 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3987 ;;
3988 dgux*)
3989 case $cc_basename in
3990 ec++*)
3991 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3992 ;;
3993 ghcx*)
3994 # Green Hills C++ Compiler
3995 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3996 ;;
3997 *)
3998 ;;
3999 esac
4000 ;;
4001 freebsd* | dragonfly*)
4002 # FreeBSD uses GNU C++
4003 ;;
4004 hpux9* | hpux10* | hpux11*)
4005 case $cc_basename in
4006 CC*)
4007 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4008 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4009 if test "$host_cpu" != ia64; then
4010 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4011 fi
4012 ;;
4013 aCC*)
4014 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4015 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4016 case $host_cpu in
4017 hppa*64*|ia64*)
4018 # +Z the default
4019 ;;
4020 *)
4021 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4022 ;;
4023 esac
4024 ;;
4025 *)
4026 ;;
4027 esac
4028 ;;
4029 interix*)
4030 # This is c89, which is MS Visual C++ (no shared libs)
4031 # Anyone wants to do a port?
4032 ;;
4033 irix5* | irix6* | nonstopux*)
4034 case $cc_basename in
4035 CC*)
4036 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4037 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4038 # CC pic flag -KPIC is the default.
4039 ;;
4040 *)
4041 ;;
4042 esac
4043 ;;
4044 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4045 case $cc_basename in
4046 KCC*)
4047 # KAI C++ Compiler
4048 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4049 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4050 ;;
4051 ecpc* )
4052 # old Intel C++ for x86_64 which still supported -KPIC.
4053 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4054 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4055 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4056 ;;
4057 icpc* )
4058 # Intel C++, used to be incompatible with GCC.
4059 # ICC 10 doesn't accept -KPIC any more.
4060 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4061 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4062 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4063 ;;
4064 pgCC* | pgcpp*)
4065 # Portland Group C++ compiler
4066 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4067 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4068 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4069 ;;
4070 cxx*)
4071 # Compaq C++
4072 # Make sure the PIC flag is empty. It appears that all Alpha
4073 # Linux and Compaq Tru64 Unix objects are PIC.
4074 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4075 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4076 ;;
4077 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
4078 # IBM XL 8.0, 9.0 on PPC and BlueGene
4079 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4080 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4081 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4082 ;;
4083 *)
4084 case `$CC -V 2>&1 | sed 5q` in
4085 *Sun\ C*)
4086 # Sun C++ 5.9
4087 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4088 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4089 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4090 ;;
4091 esac
4092 ;;
4093 esac
4094 ;;
4095 lynxos*)
4096 ;;
4097 m88k*)
4098 ;;
4099 mvs*)
4100 case $cc_basename in
4101 cxx*)
4102 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4103 ;;
4104 *)
4105 ;;
4106 esac
4107 ;;
4108 netbsd* | netbsdelf*-gnu)
4109 ;;
4110 *qnx* | *nto*)
4111 # QNX uses GNU C++, but need to define -shared option too, otherwise
4112 # it will coredump.
4113 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4114 ;;
4115 osf3* | osf4* | osf5*)
4116 case $cc_basename in
4117 KCC*)
4118 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4119 ;;
4120 RCC*)
4121 # Rational C++ 2.4.1
4122 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4123 ;;
4124 cxx*)
4125 # Digital/Compaq C++
4126 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4127 # Make sure the PIC flag is empty. It appears that all Alpha
4128 # Linux and Compaq Tru64 Unix objects are PIC.
4129 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4130 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4131 ;;
4132 *)
4133 ;;
4134 esac
4135 ;;
4136 psos*)
4137 ;;
4138 solaris*)
4139 case $cc_basename in
4140 CC* | sunCC*)
4141 # Sun C++ 4.2, 5.x and Centerline C++
4142 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4143 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4144 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4145 ;;
4146 gcx*)
4147 # Green Hills C++ Compiler
4148 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4149 ;;
4150 *)
4151 ;;
4152 esac
4153 ;;
4154 sunos4*)
4155 case $cc_basename in
4156 CC*)
4157 # Sun C++ 4.x
4158 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4159 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4160 ;;
4161 lcc*)
4162 # Lucid
4163 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4164 ;;
4165 *)
4166 ;;
4167 esac
4168 ;;
4169 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4170 case $cc_basename in
4171 CC*)
4172 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4173 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4174 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4175 ;;
4176 esac
4177 ;;
4178 tandem*)
4179 case $cc_basename in
4180 NCC*)
4181 # NonStop-UX NCC 3.20
4182 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4183 ;;
4184 *)
4185 ;;
4186 esac
4187 ;;
4188 vxworks*)
4189 ;;
4190 *)
4191 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4192 ;;
4193 esac
4194 fi
4195 ],
4196 [
4197 if test "$GCC" = yes; then
4198 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4199 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4200
4201 case $host_os in
4202 aix*)
4203 # All AIX code is PIC.
4204 if test "$host_cpu" = ia64; then
4205 # AIX 5 now supports IA64 processor
4206 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4207 fi
4208 ;;
4209
4210 amigaos*)
4211 case $host_cpu in
4212 powerpc)
4213 # see comment about AmigaOS4 .so support
4214 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4215 ;;
4216 m68k)
4217 # FIXME: we need at least 68020 code to build shared libraries, but
4218 # adding the `-m68020' flag to GCC prevents building anything better,
4219 # like `-m68040'.
4220 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4221 ;;
4222 esac
4223 ;;
4224
4225 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4226 # PIC is the default for these OSes.
4227 ;;
4228
4229 mingw* | cygwin* | pw32* | os2* | cegcc*)
4230 # This hack is so that the source file can tell whether it is being
4231 # built for inclusion in a dll (and should export symbols for example).
4232 # Although the cygwin gcc ignores -fPIC, still need this for old-style
4233 # (--disable-auto-import) libraries
4234 m4_if([$1], [GCJ], [],
4235 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4236 ;;
4237
4238 darwin* | rhapsody*)
4239 # PIC is the default on this platform
4240 # Common symbols not allowed in MH_DYLIB files
4241 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4242 ;;
4243
4244 haiku*)
4245 # PIC is the default for Haiku.
4246 # The "-static" flag exists, but is broken.
4247 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4248 ;;
4249
4250 hpux*)
4251 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4252 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4253 # sets the default TLS model and affects inlining.
4254 case $host_cpu in
4255 hppa*64*)
4256 # +Z the default
4257 ;;
4258 *)
4259 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4260 ;;
4261 esac
4262 ;;
4263
4264 interix[[3-9]]*)
4265 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4266 # Instead, we relocate shared libraries at runtime.
4267 ;;
4268
4269 msdosdjgpp*)
4270 # Just because we use GCC doesn't mean we suddenly get shared libraries
4271 # on systems that don't support them.
4272 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4273 enable_shared=no
4274 ;;
4275
4276 *nto* | *qnx*)
4277 # QNX uses GNU C++, but need to define -shared option too, otherwise
4278 # it will coredump.
4279 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4280 ;;
4281
4282 sysv4*MP*)
4283 if test -d /usr/nec; then
4284 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4285 fi
4286 ;;
4287
4288 *)
4289 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4290 ;;
4291 esac
4292
4293 case $cc_basename in
4294 nvcc*) # Cuda Compiler Driver 2.2
4295 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
4296 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4297 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
4298 fi
4299 ;;
4300 esac
4301 else
4302 # PORTME Check for flag to pass linker flags through the system compiler.
4303 case $host_os in
4304 aix*)
4305 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4306 if test "$host_cpu" = ia64; then
4307 # AIX 5 now supports IA64 processor
4308 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4309 else
4310 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4311 fi
4312 ;;
4313
4314 mingw* | cygwin* | pw32* | os2* | cegcc*)
4315 # This hack is so that the source file can tell whether it is being
4316 # built for inclusion in a dll (and should export symbols for example).
4317 m4_if([$1], [GCJ], [],
4318 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4319 ;;
4320
4321 hpux9* | hpux10* | hpux11*)
4322 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4323 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4324 # not for PA HP-UX.
4325 case $host_cpu in
4326 hppa*64*|ia64*)
4327 # +Z the default
4328 ;;
4329 *)
4330 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4331 ;;
4332 esac
4333 # Is there a better lt_prog_compiler_static that works with the bundled CC?
4334 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4335 ;;
4336
4337 irix5* | irix6* | nonstopux*)
4338 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4339 # PIC (with -KPIC) is the default.
4340 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4341 ;;
4342
4343 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4344 case $cc_basename in
4345 # old Intel for x86_64 which still supported -KPIC.
4346 ecc*)
4347 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4348 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4349 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4350 ;;
4351 # icc used to be incompatible with GCC.
4352 # ICC 10 doesn't accept -KPIC any more.
4353 icc* | ifort*)
4354 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4355 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4356 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4357 ;;
4358 # Lahey Fortran 8.1.
4359 lf95*)
4360 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4361 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4362 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4363 ;;
4364 nagfor*)
4365 # NAG Fortran compiler
4366 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4367 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4368 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4369 ;;
4370 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
4371 # Portland Group compilers (*not* the Pentium gcc compiler,
4372 # which looks to be a dead project)
4373 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4374 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4375 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4376 ;;
4377 ccc*)
4378 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4379 # All Alpha code is PIC.
4380 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4381 ;;
4382 xl* | bgxl* | bgf* | mpixl*)
4383 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
4384 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4385 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4386 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4387 ;;
4388 *)
4389 case `$CC -V 2>&1 | sed 5q` in
4390 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
4391 # Sun Fortran 8.3 passes all unrecognized flags to the linker
4392 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4393 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4394 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4395 ;;
4396 *Sun\ F* | *Sun*Fortran*)
4397 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4398 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4399 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4400 ;;
4401 *Sun\ C*)
4402 # Sun C 5.9
4403 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4404 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4405 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4406 ;;
4407 *Intel*\ [[CF]]*Compiler*)
4408 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4409 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4410 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4411 ;;
4412 *Portland\ Group*)
4413 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4414 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4415 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4416 ;;
4417 esac
4418 ;;
4419 esac
4420 ;;
4421
4422 newsos6)
4423 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4424 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4425 ;;
4426
4427 *nto* | *qnx*)
4428 # QNX uses GNU C++, but need to define -shared option too, otherwise
4429 # it will coredump.
4430 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4431 ;;
4432
4433 osf3* | osf4* | osf5*)
4434 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4435 # All OSF/1 code is PIC.
4436 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4437 ;;
4438
4439 rdos*)
4440 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4441 ;;
4442
4443 solaris*)
4444 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4445 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4446 case $cc_basename in
4447 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
4448 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4449 *)
4450 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4451 esac
4452 ;;
4453
4454 sunos4*)
4455 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4456 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4457 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4458 ;;
4459
4460 sysv4 | sysv4.2uw2* | sysv4.3*)
4461 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4462 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4463 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4464 ;;
4465
4466 sysv4*MP*)
4467 if test -d /usr/nec ;then
4468 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4469 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4470 fi
4471 ;;
4472
4473 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4474 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4475 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4476 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4477 ;;
4478
4479 unicos*)
4480 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4481 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4482 ;;
4483
4484 uts4*)
4485 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4486 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4487 ;;
4488
4489 *)
4490 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4491 ;;
4492 esac
4493 fi
4494 ])
4495 case $host_os in
4496 # For platforms which do not support PIC, -DPIC is meaningless:
4497 *djgpp*)
4498 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4499 ;;
4500 *)
4501 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4502 ;;
4503 esac
4504
4505 AC_CACHE_CHECK([for $compiler option to produce PIC],
4506 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
4507 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4508 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
4509
4510 #
4511 # Check to make sure the PIC flag actually works.
4512 #
4513 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4514 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4515 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4516 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4517 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4518 "" | " "*) ;;
4519 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4520 esac],
4521 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4522 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4523 fi
4524 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4525 [Additional compiler flags for building library objects])
4526
4527 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4528 [How to pass a linker flag through the compiler])
4529 #
4530 # Check to make sure the static flag actually works.
4531 #
4532 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4533 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4534 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4535 $lt_tmp_static_flag,
4536 [],
4537 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4538 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4539 [Compiler flag to prevent dynamic linking])
4540 ])# _LT_COMPILER_PIC
4541
4542
4543 # _LT_LINKER_SHLIBS([TAGNAME])
4544 # ----------------------------
4545 # See if the linker supports building shared libraries.
4546 m4_defun([_LT_LINKER_SHLIBS],
4547 [AC_REQUIRE([LT_PATH_LD])dnl
4548 AC_REQUIRE([LT_PATH_NM])dnl
4549 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
4550 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4551 m4_require([_LT_DECL_EGREP])dnl
4552 m4_require([_LT_DECL_SED])dnl
4553 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4554 m4_require([_LT_TAG_COMPILER])dnl
4555 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4556 m4_if([$1], [CXX], [
4557 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4558 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4559 case $host_os in
4560 aix[[4-9]]*)
4561 # If we're using GNU nm, then we don't want the "-C" option.
4562 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4563 # Also, AIX nm treats weak defined symbols like other global defined
4564 # symbols, whereas GNU nm marks them as "W".
4565 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4566 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4567 else
4568 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4569 fi
4570 ;;
4571 pw32*)
4572 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4573 ;;
4574 cygwin* | mingw* | cegcc*)
4575 case $cc_basename in
4576 cl*)
4577 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
4578 ;;
4579 *)
4580 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
4581 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4582 ;;
4583 esac
4584 ;;
4585 linux* | k*bsd*-gnu | gnu*)
4586 _LT_TAGVAR(link_all_deplibs, $1)=no
4587 ;;
4588 *)
4589 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4590 ;;
4591 esac
4592 ], [
4593 runpath_var=
4594 _LT_TAGVAR(allow_undefined_flag, $1)=
4595 _LT_TAGVAR(always_export_symbols, $1)=no
4596 _LT_TAGVAR(archive_cmds, $1)=
4597 _LT_TAGVAR(archive_expsym_cmds, $1)=
4598 _LT_TAGVAR(compiler_needs_object, $1)=no
4599 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4600 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4601 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4602 _LT_TAGVAR(hardcode_automatic, $1)=no
4603 _LT_TAGVAR(hardcode_direct, $1)=no
4604 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4605 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4606 _LT_TAGVAR(hardcode_libdir_separator, $1)=
4607 _LT_TAGVAR(hardcode_minus_L, $1)=no
4608 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4609 _LT_TAGVAR(inherit_rpath, $1)=no
4610 _LT_TAGVAR(link_all_deplibs, $1)=unknown
4611 _LT_TAGVAR(module_cmds, $1)=
4612 _LT_TAGVAR(module_expsym_cmds, $1)=
4613 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4614 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4615 _LT_TAGVAR(thread_safe_flag_spec, $1)=
4616 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4617 # include_expsyms should be a list of space-separated symbols to be *always*
4618 # included in the symbol list
4619 _LT_TAGVAR(include_expsyms, $1)=
4620 # exclude_expsyms can be an extended regexp of symbols to exclude
4621 # it will be wrapped by ` (' and `)$', so one must not match beginning or
4622 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4623 # as well as any symbol that contains `d'.
4624 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4625 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4626 # platforms (ab)use it in PIC code, but their linkers get confused if
4627 # the symbol is explicitly referenced. Since portable code cannot
4628 # rely on this symbol name, it's probably fine to never include it in
4629 # preloaded symbol tables.
4630 # Exclude shared library initialization/finalization symbols.
4631 dnl Note also adjust exclude_expsyms for C++ above.
4632 extract_expsyms_cmds=
4633
4634 case $host_os in
4635 cygwin* | mingw* | pw32* | cegcc*)
4636 # FIXME: the MSVC++ port hasn't been tested in a loooong time
4637 # When not using gcc, we currently assume that we are using
4638 # Microsoft Visual C++.
4639 if test "$GCC" != yes; then
4640 with_gnu_ld=no
4641 fi
4642 ;;
4643 interix*)
4644 # we just hope/assume this is gcc and not c89 (= MSVC++)
4645 with_gnu_ld=yes
4646 ;;
4647 openbsd*)
4648 with_gnu_ld=no
4649 ;;
4650 linux* | k*bsd*-gnu | gnu*)
4651 _LT_TAGVAR(link_all_deplibs, $1)=no
4652 ;;
4653 esac
4654
4655 _LT_TAGVAR(ld_shlibs, $1)=yes
4656
4657 # On some targets, GNU ld is compatible enough with the native linker
4658 # that we're better off using the native interface for both.
4659 lt_use_gnu_ld_interface=no
4660 if test "$with_gnu_ld" = yes; then
4661 case $host_os in
4662 aix*)
4663 # The AIX port of GNU ld has always aspired to compatibility
4664 # with the native linker. However, as the warning in the GNU ld
4665 # block says, versions before 2.19.5* couldn't really create working
4666 # shared libraries, regardless of the interface used.
4667 case `$LD -v 2>&1` in
4668 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
4669 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
4670 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
4671 *)
4672 lt_use_gnu_ld_interface=yes
4673 ;;
4674 esac
4675 ;;
4676 *)
4677 lt_use_gnu_ld_interface=yes
4678 ;;
4679 esac
4680 fi
4681
4682 if test "$lt_use_gnu_ld_interface" = yes; then
4683 # If archive_cmds runs LD, not CC, wlarc should be empty
4684 wlarc='${wl}'
4685
4686 # Set some defaults for GNU ld with shared library support. These
4687 # are reset later if shared libraries are not supported. Putting them
4688 # here allows them to be overridden if necessary.
4689 runpath_var=LD_RUN_PATH
4690 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4691 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4692 # ancient GNU ld didn't support --whole-archive et. al.
4693 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4694 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4695 else
4696 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4697 fi
4698 supports_anon_versioning=no
4699 case `$LD -v 2>&1` in
4700 *GNU\ gold*) supports_anon_versioning=yes ;;
4701 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4702 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4703 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4704 *\ 2.11.*) ;; # other 2.11 versions
4705 *) supports_anon_versioning=yes ;;
4706 esac
4707
4708 # See if GNU ld supports shared libraries.
4709 case $host_os in
4710 aix[[3-9]]*)
4711 # On AIX/PPC, the GNU linker is very broken
4712 if test "$host_cpu" != ia64; then
4713 _LT_TAGVAR(ld_shlibs, $1)=no
4714 cat <<_LT_EOF 1>&2
4715
4716 *** Warning: the GNU linker, at least up to release 2.19, is reported
4717 *** to be unable to reliably create shared libraries on AIX.
4718 *** Therefore, libtool is disabling shared libraries support. If you
4719 *** really care for shared libraries, you may want to install binutils
4720 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
4721 *** You will then need to restart the configuration process.
4722
4723 _LT_EOF
4724 fi
4725 ;;
4726
4727 amigaos*)
4728 case $host_cpu in
4729 powerpc)
4730 # see comment about AmigaOS4 .so support
4731 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4732 _LT_TAGVAR(archive_expsym_cmds, $1)=''
4733 ;;
4734 m68k)
4735 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
4736 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4737 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4738 ;;
4739 esac
4740 ;;
4741
4742 beos*)
4743 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4744 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4745 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4746 # support --undefined. This deserves some investigation. FIXME
4747 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4748 else
4749 _LT_TAGVAR(ld_shlibs, $1)=no
4750 fi
4751 ;;
4752
4753 cygwin* | mingw* | pw32* | cegcc*)
4754 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4755 # as there is no search path for DLLs.
4756 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4757 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
4758 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4759 _LT_TAGVAR(always_export_symbols, $1)=no
4760 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4761 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
4762 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4763
4764 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4765 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4766 # If the export-symbols file already is a .def file (1st line
4767 # is EXPORTS), use it as is; otherwise, prepend...
4768 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4769 cp $export_symbols $output_objdir/$soname.def;
4770 else
4771 echo EXPORTS > $output_objdir/$soname.def;
4772 cat $export_symbols >> $output_objdir/$soname.def;
4773 fi~
4774 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4775 else
4776 _LT_TAGVAR(ld_shlibs, $1)=no
4777 fi
4778 ;;
4779
4780 haiku*)
4781 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4782 _LT_TAGVAR(link_all_deplibs, $1)=yes
4783 ;;
4784
4785 interix[[3-9]]*)
4786 _LT_TAGVAR(hardcode_direct, $1)=no
4787 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4788 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4789 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4790 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4791 # Instead, shared libraries are loaded at an image base (0x10000000 by
4792 # default) and relocated if they conflict, which is a slow very memory
4793 # consuming and fragmenting process. To avoid this, we pick a random,
4794 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4795 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
4796 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4797 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4798 ;;
4799
4800 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
4801 tmp_diet=no
4802 if test "$host_os" = linux-dietlibc; then
4803 case $cc_basename in
4804 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
4805 esac
4806 fi
4807 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
4808 && test "$tmp_diet" = no
4809 then
4810 tmp_addflag=' $pic_flag'
4811 tmp_sharedflag='-shared'
4812 case $cc_basename,$host_cpu in
4813 pgcc*) # Portland Group C compiler
4814 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
4815 tmp_addflag=' $pic_flag'
4816 ;;
4817 pgf77* | pgf90* | pgf95* | pgfortran*)
4818 # Portland Group f77 and f90 compilers
4819 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
4820 tmp_addflag=' $pic_flag -Mnomain' ;;
4821 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
4822 tmp_addflag=' -i_dynamic' ;;
4823 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
4824 tmp_addflag=' -i_dynamic -nofor_main' ;;
4825 ifc* | ifort*) # Intel Fortran compiler
4826 tmp_addflag=' -nofor_main' ;;
4827 lf95*) # Lahey Fortran 8.1
4828 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4829 tmp_sharedflag='--shared' ;;
4830 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
4831 tmp_sharedflag='-qmkshrobj'
4832 tmp_addflag= ;;
4833 nvcc*) # Cuda Compiler Driver 2.2
4834 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
4835 _LT_TAGVAR(compiler_needs_object, $1)=yes
4836 ;;
4837 esac
4838 case `$CC -V 2>&1 | sed 5q` in
4839 *Sun\ C*) # Sun C 5.9
4840 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
4841 _LT_TAGVAR(compiler_needs_object, $1)=yes
4842 tmp_sharedflag='-G' ;;
4843 *Sun\ F*) # Sun Fortran 8.3
4844 tmp_sharedflag='-G' ;;
4845 esac
4846 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4847
4848 if test "x$supports_anon_versioning" = xyes; then
4849 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4850 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4851 echo "local: *; };" >> $output_objdir/$libname.ver~
4852 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
4853 fi
4854
4855 case $cc_basename in
4856 xlf* | bgf* | bgxlf* | mpixlf*)
4857 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
4858 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
4859 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4860 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
4861 if test "x$supports_anon_versioning" = xyes; then
4862 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4863 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4864 echo "local: *; };" >> $output_objdir/$libname.ver~
4865 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
4866 fi
4867 ;;
4868 esac
4869 else
4870 _LT_TAGVAR(ld_shlibs, $1)=no
4871 fi
4872 ;;
4873
4874 netbsd* | netbsdelf*-gnu)
4875 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4876 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4877 wlarc=
4878 else
4879 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4880 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4881 fi
4882 ;;
4883
4884 solaris*)
4885 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
4886 _LT_TAGVAR(ld_shlibs, $1)=no
4887 cat <<_LT_EOF 1>&2
4888
4889 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
4890 *** create shared libraries on Solaris systems. Therefore, libtool
4891 *** is disabling shared libraries support. We urge you to upgrade GNU
4892 *** binutils to release 2.9.1 or newer. Another option is to modify
4893 *** your PATH or compiler configuration so that the native linker is
4894 *** used, and then restart.
4895
4896 _LT_EOF
4897 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4898 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4899 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4900 else
4901 _LT_TAGVAR(ld_shlibs, $1)=no
4902 fi
4903 ;;
4904
4905 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
4906 case `$LD -v 2>&1` in
4907 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
4908 _LT_TAGVAR(ld_shlibs, $1)=no
4909 cat <<_LT_EOF 1>&2
4910
4911 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
4912 *** reliably create shared libraries on SCO systems. Therefore, libtool
4913 *** is disabling shared libraries support. We urge you to upgrade GNU
4914 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
4915 *** your PATH or compiler configuration so that the native linker is
4916 *** used, and then restart.
4917
4918 _LT_EOF
4919 ;;
4920 *)
4921 # For security reasons, it is highly recommended that you always
4922 # use absolute paths for naming shared libraries, and exclude the
4923 # DT_RUNPATH tag from executables and libraries. But doing so
4924 # requires that you compile everything twice, which is a pain.
4925 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4926 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4927 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4928 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4929 else
4930 _LT_TAGVAR(ld_shlibs, $1)=no
4931 fi
4932 ;;
4933 esac
4934 ;;
4935
4936 sunos4*)
4937 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4938 wlarc=
4939 _LT_TAGVAR(hardcode_direct, $1)=yes
4940 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4941 ;;
4942
4943 *)
4944 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4945 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4946 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4947 else
4948 _LT_TAGVAR(ld_shlibs, $1)=no
4949 fi
4950 ;;
4951 esac
4952
4953 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
4954 runpath_var=
4955 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4956 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4957 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4958 fi
4959 else
4960 # PORTME fill in a description of your system's linker (not GNU ld)
4961 case $host_os in
4962 aix3*)
4963 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4964 _LT_TAGVAR(always_export_symbols, $1)=yes
4965 _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
4966 # Note: this linker hardcodes the directories in LIBPATH if there
4967 # are no directories specified by -L.
4968 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4969 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
4970 # Neither direct hardcoding nor static linking is supported with a
4971 # broken collect2.
4972 _LT_TAGVAR(hardcode_direct, $1)=unsupported
4973 fi
4974 ;;
4975
4976 aix[[4-9]]*)
4977 if test "$host_cpu" = ia64; then
4978 # On IA64, the linker does run time linking by default, so we don't
4979 # have to do anything special.
4980 aix_use_runtimelinking=no
4981 exp_sym_flag='-Bexport'
4982 no_entry_flag=""
4983 else
4984 # If we're using GNU nm, then we don't want the "-C" option.
4985 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4986 # Also, AIX nm treats weak defined symbols like other global
4987 # defined symbols, whereas GNU nm marks them as "W".
4988 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4989 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4990 else
4991 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4992 fi
4993 aix_use_runtimelinking=no
4994
4995 # Test if we are trying to use run time linking or normal
4996 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
4997 # need to do runtime linking.
4998 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
4999 for ld_flag in $LDFLAGS; do
5000 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5001 aix_use_runtimelinking=yes
5002 break
5003 fi
5004 done
5005 ;;
5006 esac
5007
5008 exp_sym_flag='-bexport'
5009 no_entry_flag='-bnoentry'
5010 fi
5011
5012 # When large executables or shared objects are built, AIX ld can
5013 # have problems creating the table of contents. If linking a library
5014 # or program results in "error TOC overflow" add -mminimal-toc to
5015 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5016 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5017
5018 _LT_TAGVAR(archive_cmds, $1)=''
5019 _LT_TAGVAR(hardcode_direct, $1)=yes
5020 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5021 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5022 _LT_TAGVAR(link_all_deplibs, $1)=yes
5023 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5024
5025 if test "$GCC" = yes; then
5026 case $host_os in aix4.[[012]]|aix4.[[012]].*)
5027 # We only want to do this on AIX 4.2 and lower, the check
5028 # below for broken collect2 doesn't work under 4.3+
5029 collect2name=`${CC} -print-prog-name=collect2`
5030 if test -f "$collect2name" &&
5031 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5032 then
5033 # We have reworked collect2
5034 :
5035 else
5036 # We have old collect2
5037 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5038 # It fails to find uninstalled libraries when the uninstalled
5039 # path is not listed in the libpath. Setting hardcode_minus_L
5040 # to unsupported forces relinking
5041 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5042 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5043 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5044 fi
5045 ;;
5046 esac
5047 shared_flag='-shared'
5048 if test "$aix_use_runtimelinking" = yes; then
5049 shared_flag="$shared_flag "'${wl}-G'
5050 fi
5051 _LT_TAGVAR(link_all_deplibs, $1)=no
5052 else
5053 # not using gcc
5054 if test "$host_cpu" = ia64; then
5055 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5056 # chokes on -Wl,-G. The following line is correct:
5057 shared_flag='-G'
5058 else
5059 if test "$aix_use_runtimelinking" = yes; then
5060 shared_flag='${wl}-G'
5061 else
5062 shared_flag='${wl}-bM:SRE'
5063 fi
5064 fi
5065 fi
5066
5067 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5068 # It seems that -bexpall does not export symbols beginning with
5069 # underscore (_), so it is better to generate a list of symbols to export.
5070 _LT_TAGVAR(always_export_symbols, $1)=yes
5071 if test "$aix_use_runtimelinking" = yes; then
5072 # Warning - without using the other runtime loading flags (-brtl),
5073 # -berok will link without error, but may produce a broken library.
5074 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5075 # Determine the default libpath from the value encoded in an
5076 # empty executable.
5077 _LT_SYS_MODULE_PATH_AIX([$1])
5078 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5079 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5080 else
5081 if test "$host_cpu" = ia64; then
5082 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5083 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5084 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
5085 else
5086 # Determine the default libpath from the value encoded in an
5087 # empty executable.
5088 _LT_SYS_MODULE_PATH_AIX([$1])
5089 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5090 # Warning - without using the other run time loading flags,
5091 # -berok will link without error, but may produce a broken library.
5092 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5093 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5094 if test "$with_gnu_ld" = yes; then
5095 # We only use this code for GNU lds that support --whole-archive.
5096 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5097 else
5098 # Exported symbols can be pulled into shared objects from archives
5099 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5100 fi
5101 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5102 # This is similar to how AIX traditionally builds its shared libraries.
5103 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5104 fi
5105 fi
5106 ;;
5107
5108 amigaos*)
5109 case $host_cpu in
5110 powerpc)
5111 # see comment about AmigaOS4 .so support
5112 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5113 _LT_TAGVAR(archive_expsym_cmds, $1)=''
5114 ;;
5115 m68k)
5116 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5117 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5118 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5119 ;;
5120 esac
5121 ;;
5122
5123 bsdi[[45]]*)
5124 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5125 ;;
5126
5127 cygwin* | mingw* | pw32* | cegcc*)
5128 # When not using gcc, we currently assume that we are using
5129 # Microsoft Visual C++.
5130 # hardcode_libdir_flag_spec is actually meaningless, as there is
5131 # no search path for DLLs.
5132 case $cc_basename in
5133 cl*)
5134 # Native MSVC
5135 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5136 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5137 _LT_TAGVAR(always_export_symbols, $1)=yes
5138 _LT_TAGVAR(file_list_spec, $1)='@'
5139 # Tell ltmain to make .lib files, not .a files.
5140 libext=lib
5141 # Tell ltmain to make .dll files, not .so files.
5142 shrext_cmds=".dll"
5143 # FIXME: Setting linknames here is a bad hack.
5144 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
5145 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5146 sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
5147 else
5148 sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
5149 fi~
5150 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5151 linknames='
5152 # The linker will not automatically build a static lib if we build a DLL.
5153 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5154 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5155 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5156 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
5157 # Don't use ranlib
5158 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
5159 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5160 lt_tool_outputfile="@TOOL_OUTPUT@"~
5161 case $lt_outputfile in
5162 *.exe|*.EXE) ;;
5163 *)
5164 lt_outputfile="$lt_outputfile.exe"
5165 lt_tool_outputfile="$lt_tool_outputfile.exe"
5166 ;;
5167 esac~
5168 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
5169 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5170 $RM "$lt_outputfile.manifest";
5171 fi'
5172 ;;
5173 *)
5174 # Assume MSVC wrapper
5175 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5176 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5177 # Tell ltmain to make .lib files, not .a files.
5178 libext=lib
5179 # Tell ltmain to make .dll files, not .so files.
5180 shrext_cmds=".dll"
5181 # FIXME: Setting linknames here is a bad hack.
5182 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5183 # The linker will automatically build a .lib file if we build a DLL.
5184 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5185 # FIXME: Should let the user specify the lib program.
5186 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5187 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5188 ;;
5189 esac
5190 ;;
5191
5192 darwin* | rhapsody*)
5193 _LT_DARWIN_LINKER_FEATURES($1)
5194 ;;
5195
5196 dgux*)
5197 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5198 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5199 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5200 ;;
5201
5202 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5203 # support. Future versions do this automatically, but an explicit c++rt0.o
5204 # does not break anything, and helps significantly (at the cost of a little
5205 # extra space).
5206 freebsd2.2*)
5207 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5208 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5209 _LT_TAGVAR(hardcode_direct, $1)=yes
5210 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5211 ;;
5212
5213 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5214 freebsd2.*)
5215 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5216 _LT_TAGVAR(hardcode_direct, $1)=yes
5217 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5218 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5219 ;;
5220
5221 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5222 freebsd* | dragonfly*)
5223 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5224 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5225 _LT_TAGVAR(hardcode_direct, $1)=yes
5226 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5227 ;;
5228
5229 hpux9*)
5230 if test "$GCC" = yes; then
5231 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5232 else
5233 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5234 fi
5235 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5236 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5237 _LT_TAGVAR(hardcode_direct, $1)=yes
5238
5239 # hardcode_minus_L: Not really in the search PATH,
5240 # but as the default location of the library.
5241 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5242 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5243 ;;
5244
5245 hpux10*)
5246 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5247 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5248 else
5249 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5250 fi
5251 if test "$with_gnu_ld" = no; then
5252 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5253 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5254 _LT_TAGVAR(hardcode_direct, $1)=yes
5255 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5256 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5257 # hardcode_minus_L: Not really in the search PATH,
5258 # but as the default location of the library.
5259 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5260 fi
5261 ;;
5262
5263 hpux11*)
5264 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5265 case $host_cpu in
5266 hppa*64*)
5267 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5268 ;;
5269 ia64*)
5270 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5271 ;;
5272 *)
5273 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5274 ;;
5275 esac
5276 else
5277 case $host_cpu in
5278 hppa*64*)
5279 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5280 ;;
5281 ia64*)
5282 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5283 ;;
5284 *)
5285 m4_if($1, [], [
5286 # Older versions of the 11.00 compiler do not understand -b yet
5287 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
5288 _LT_LINKER_OPTION([if $CC understands -b],
5289 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
5290 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
5291 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
5292 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
5293 ;;
5294 esac
5295 fi
5296 if test "$with_gnu_ld" = no; then
5297 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5298 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5299
5300 case $host_cpu in
5301 hppa*64*|ia64*)
5302 _LT_TAGVAR(hardcode_direct, $1)=no
5303 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5304 ;;
5305 *)
5306 _LT_TAGVAR(hardcode_direct, $1)=yes
5307 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5308 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5309
5310 # hardcode_minus_L: Not really in the search PATH,
5311 # but as the default location of the library.
5312 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5313 ;;
5314 esac
5315 fi
5316 ;;
5317
5318 irix5* | irix6* | nonstopux*)
5319 if test "$GCC" = yes; then
5320 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5321 # Try to use the -exported_symbol ld option, if it does not
5322 # work, assume that -exports_file does not work either and
5323 # implicitly export all symbols.
5324 # This should be the same for all languages, so no per-tag cache variable.
5325 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
5326 [lt_cv_irix_exported_symbol],
5327 [save_LDFLAGS="$LDFLAGS"
5328 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
5329 AC_LINK_IFELSE(
5330 [AC_LANG_SOURCE(
5331 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
5332 [C++], [[int foo (void) { return 0; }]],
5333 [Fortran 77], [[
5334 subroutine foo
5335 end]],
5336 [Fortran], [[
5337 subroutine foo
5338 end]])])],
5339 [lt_cv_irix_exported_symbol=yes],
5340 [lt_cv_irix_exported_symbol=no])
5341 LDFLAGS="$save_LDFLAGS"])
5342 if test "$lt_cv_irix_exported_symbol" = yes; then
5343 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
5344 fi
5345 else
5346 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
5347 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
5348 fi
5349 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5350 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5351 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5352 _LT_TAGVAR(inherit_rpath, $1)=yes
5353 _LT_TAGVAR(link_all_deplibs, $1)=yes
5354 ;;
5355
5356 netbsd* | netbsdelf*-gnu)
5357 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5358 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
5359 else
5360 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
5361 fi
5362 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5363 _LT_TAGVAR(hardcode_direct, $1)=yes
5364 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5365 ;;
5366
5367 newsos6)
5368 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5369 _LT_TAGVAR(hardcode_direct, $1)=yes
5370 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5371 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5372 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5373 ;;
5374
5375 *nto* | *qnx*)
5376 ;;
5377
5378 openbsd*)
5379 if test -f /usr/libexec/ld.so; then
5380 _LT_TAGVAR(hardcode_direct, $1)=yes
5381 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5382 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5383 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5384 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5385 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
5386 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5387 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5388 else
5389 case $host_os in
5390 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5391 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5392 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5393 ;;
5394 *)
5395 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5396 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5397 ;;
5398 esac
5399 fi
5400 else
5401 _LT_TAGVAR(ld_shlibs, $1)=no
5402 fi
5403 ;;
5404
5405 os2*)
5406 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5407 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5408 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5409 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
5410 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5411 ;;
5412
5413 osf3*)
5414 if test "$GCC" = yes; then
5415 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5416 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5417 else
5418 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5419 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
5420 fi
5421 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5422 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5423 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5424 ;;
5425
5426 osf4* | osf5*) # as osf3* with the addition of -msym flag
5427 if test "$GCC" = yes; then
5428 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5429 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5430 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5431 else
5432 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5433 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
5434 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
5435 $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
5436
5437 # Both c and cxx compiler support -rpath directly
5438 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5439 fi
5440 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5441 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5442 ;;
5443
5444 solaris*)
5445 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5446 if test "$GCC" = yes; then
5447 wlarc='${wl}'
5448 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5449 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5450 $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5451 else
5452 case `$CC -V 2>&1` in
5453 *"Compilers 5.0"*)
5454 wlarc=''
5455 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5456 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5457 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5458 ;;
5459 *)
5460 wlarc='${wl}'
5461 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5462 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5463 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5464 ;;
5465 esac
5466 fi
5467 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5468 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5469 case $host_os in
5470 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5471 *)
5472 # The compiler driver will combine and reorder linker options,
5473 # but understands `-z linker_flag'. GCC discards it without `$wl',
5474 # but is careful enough not to reorder.
5475 # Supported since Solaris 2.6 (maybe 2.5.1?)
5476 if test "$GCC" = yes; then
5477 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
5478 else
5479 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5480 fi
5481 ;;
5482 esac
5483 _LT_TAGVAR(link_all_deplibs, $1)=yes
5484 ;;
5485
5486 sunos4*)
5487 if test "x$host_vendor" = xsequent; then
5488 # Use $CC to link under sequent, because it throws in some extra .o
5489 # files that make .init and .fini sections work.
5490 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5491 else
5492 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5493 fi
5494 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5495 _LT_TAGVAR(hardcode_direct, $1)=yes
5496 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5497 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5498 ;;
5499
5500 sysv4)
5501 case $host_vendor in
5502 sni)
5503 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5504 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5505 ;;
5506 siemens)
5507 ## LD is ld it makes a PLAMLIB
5508 ## CC just makes a GrossModule.
5509 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5510 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5511 _LT_TAGVAR(hardcode_direct, $1)=no
5512 ;;
5513 motorola)
5514 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5515 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5516 ;;
5517 esac
5518 runpath_var='LD_RUN_PATH'
5519 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5520 ;;
5521
5522 sysv4.3*)
5523 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5524 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5525 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5526 ;;
5527
5528 sysv4*MP*)
5529 if test -d /usr/nec; then
5530 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5531 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5532 runpath_var=LD_RUN_PATH
5533 hardcode_runpath_var=yes
5534 _LT_TAGVAR(ld_shlibs, $1)=yes
5535 fi
5536 ;;
5537
5538 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5539 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5540 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5541 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5542 runpath_var='LD_RUN_PATH'
5543
5544 if test "$GCC" = yes; then
5545 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5546 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5547 else
5548 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5549 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5550 fi
5551 ;;
5552
5553 sysv5* | sco3.2v5* | sco5v6*)
5554 # Note: We can NOT use -z defs as we might desire, because we do not
5555 # link with -lc, and that would cause any symbols used from libc to
5556 # always be unresolved, which means just about no library would
5557 # ever link correctly. If we're not using GNU ld we use -z text
5558 # though, which does catch some bad symbols but isn't as heavy-handed
5559 # as -z defs.
5560 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5561 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5562 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5563 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5564 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
5565 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5566 _LT_TAGVAR(link_all_deplibs, $1)=yes
5567 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5568 runpath_var='LD_RUN_PATH'
5569
5570 if test "$GCC" = yes; then
5571 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5572 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5573 else
5574 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5575 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5576 fi
5577 ;;
5578
5579 uts4*)
5580 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5581 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5582 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5583 ;;
5584
5585 *)
5586 _LT_TAGVAR(ld_shlibs, $1)=no
5587 ;;
5588 esac
5589
5590 if test x$host_vendor = xsni; then
5591 case $host in
5592 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5593 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
5594 ;;
5595 esac
5596 fi
5597 fi
5598 ])
5599 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5600 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5601
5602 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
5603
5604 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
5605 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
5606 _LT_DECL([], [extract_expsyms_cmds], [2],
5607 [The commands to extract the exported symbol list from a shared archive])
5608
5609 #
5610 # Do we need to explicitly link libc?
5611 #
5612 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
5613 x|xyes)
5614 # Assume -lc should be added
5615 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5616
5617 if test "$enable_shared" = yes && test "$GCC" = yes; then
5618 case $_LT_TAGVAR(archive_cmds, $1) in
5619 *'~'*)
5620 # FIXME: we may have to deal with multi-command sequences.
5621 ;;
5622 '$CC '*)
5623 # Test whether the compiler implicitly links with -lc since on some
5624 # systems, -lgcc has to come before -lc. If gcc already passes -lc
5625 # to ld, don't add -lc before -lgcc.
5626 AC_CACHE_CHECK([whether -lc should be explicitly linked in],
5627 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
5628 [$RM conftest*
5629 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5630
5631 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5632 soname=conftest
5633 lib=conftest
5634 libobjs=conftest.$ac_objext
5635 deplibs=
5636 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5637 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5638 compiler_flags=-v
5639 linker_flags=-v
5640 verstring=
5641 output_objdir=.
5642 libname=conftest
5643 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5644 _LT_TAGVAR(allow_undefined_flag, $1)=
5645 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5646 then
5647 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5648 else
5649 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5650 fi
5651 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5652 else
5653 cat conftest.err 1>&5
5654 fi
5655 $RM conftest*
5656 ])
5657 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
5658 ;;
5659 esac
5660 fi
5661 ;;
5662 esac
5663
5664 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
5665 [Whether or not to add -lc for building shared libraries])
5666 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
5667 [enable_shared_with_static_runtimes], [0],
5668 [Whether or not to disallow shared libs when runtime libs are static])
5669 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
5670 [Compiler flag to allow reflexive dlopens])
5671 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
5672 [Compiler flag to generate shared objects directly from archives])
5673 _LT_TAGDECL([], [compiler_needs_object], [1],
5674 [Whether the compiler copes with passing no objects directly])
5675 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
5676 [Create an old-style archive from a shared archive])
5677 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
5678 [Create a temporary old-style archive to link instead of a shared archive])
5679 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
5680 _LT_TAGDECL([], [archive_expsym_cmds], [2])
5681 _LT_TAGDECL([], [module_cmds], [2],
5682 [Commands used to build a loadable module if different from building
5683 a shared archive.])
5684 _LT_TAGDECL([], [module_expsym_cmds], [2])
5685 _LT_TAGDECL([], [with_gnu_ld], [1],
5686 [Whether we are building with GNU ld or not])
5687 _LT_TAGDECL([], [allow_undefined_flag], [1],
5688 [Flag that allows shared libraries with undefined symbols to be built])
5689 _LT_TAGDECL([], [no_undefined_flag], [1],
5690 [Flag that enforces no undefined symbols])
5691 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
5692 [Flag to hardcode $libdir into a binary during linking.
5693 This must work even if $libdir does not exist])
5694 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
5695 [Whether we need a single "-rpath" flag with a separated argument])
5696 _LT_TAGDECL([], [hardcode_direct], [0],
5697 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5698 DIR into the resulting binary])
5699 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
5700 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5701 DIR into the resulting binary and the resulting library dependency is
5702 "absolute", i.e impossible to change by setting ${shlibpath_var} if the
5703 library is relocated])
5704 _LT_TAGDECL([], [hardcode_minus_L], [0],
5705 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
5706 into the resulting binary])
5707 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
5708 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
5709 into the resulting binary])
5710 _LT_TAGDECL([], [hardcode_automatic], [0],
5711 [Set to "yes" if building a shared library automatically hardcodes DIR
5712 into the library and all subsequent libraries and executables linked
5713 against it])
5714 _LT_TAGDECL([], [inherit_rpath], [0],
5715 [Set to yes if linker adds runtime paths of dependent libraries
5716 to runtime path list])
5717 _LT_TAGDECL([], [link_all_deplibs], [0],
5718 [Whether libtool must link a program against all its dependency libraries])
5719 _LT_TAGDECL([], [always_export_symbols], [0],
5720 [Set to "yes" if exported symbols are required])
5721 _LT_TAGDECL([], [export_symbols_cmds], [2],
5722 [The commands to list exported symbols])
5723 _LT_TAGDECL([], [exclude_expsyms], [1],
5724 [Symbols that should not be listed in the preloaded symbols])
5725 _LT_TAGDECL([], [include_expsyms], [1],
5726 [Symbols that must always be exported])
5727 _LT_TAGDECL([], [prelink_cmds], [2],
5728 [Commands necessary for linking programs (against libraries) with templates])
5729 _LT_TAGDECL([], [postlink_cmds], [2],
5730 [Commands necessary for finishing linking programs])
5731 _LT_TAGDECL([], [file_list_spec], [1],
5732 [Specify filename containing input files])
5733 dnl FIXME: Not yet implemented
5734 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
5735 dnl [Compiler flag to generate thread safe objects])
5736 ])# _LT_LINKER_SHLIBS
5737
5738
5739 # _LT_LANG_C_CONFIG([TAG])
5740 # ------------------------
5741 # Ensure that the configuration variables for a C compiler are suitably
5742 # defined. These variables are subsequently used by _LT_CONFIG to write
5743 # the compiler configuration to `libtool'.
5744 m4_defun([_LT_LANG_C_CONFIG],
5745 [m4_require([_LT_DECL_EGREP])dnl
5746 lt_save_CC="$CC"
5747 AC_LANG_PUSH(C)
5748
5749 # Source file extension for C test sources.
5750 ac_ext=c
5751
5752 # Object file extension for compiled C test sources.
5753 objext=o
5754 _LT_TAGVAR(objext, $1)=$objext
5755
5756 # Code to be used in simple compile tests
5757 lt_simple_compile_test_code="int some_variable = 0;"
5758
5759 # Code to be used in simple link tests
5760 lt_simple_link_test_code='int main(){return(0);}'
5761
5762 _LT_TAG_COMPILER
5763 # Save the default compiler, since it gets overwritten when the other
5764 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
5765 compiler_DEFAULT=$CC
5766
5767 # save warnings/boilerplate of simple test code
5768 _LT_COMPILER_BOILERPLATE
5769 _LT_LINKER_BOILERPLATE
5770
5771 ## CAVEAT EMPTOR:
5772 ## There is no encapsulation within the following macros, do not change
5773 ## the running order or otherwise move them around unless you know exactly
5774 ## what you are doing...
5775 if test -n "$compiler"; then
5776 _LT_COMPILER_NO_RTTI($1)
5777 _LT_COMPILER_PIC($1)
5778 _LT_COMPILER_C_O($1)
5779 _LT_COMPILER_FILE_LOCKS($1)
5780 _LT_LINKER_SHLIBS($1)
5781 _LT_SYS_DYNAMIC_LINKER($1)
5782 _LT_LINKER_HARDCODE_LIBPATH($1)
5783 LT_SYS_DLOPEN_SELF
5784 _LT_CMD_STRIPLIB
5785
5786 # Report which library types will actually be built
5787 AC_MSG_CHECKING([if libtool supports shared libraries])
5788 AC_MSG_RESULT([$can_build_shared])
5789
5790 AC_MSG_CHECKING([whether to build shared libraries])
5791 test "$can_build_shared" = "no" && enable_shared=no
5792
5793 # On AIX, shared libraries and static libraries use the same namespace, and
5794 # are all built from PIC.
5795 case $host_os in
5796 aix3*)
5797 test "$enable_shared" = yes && enable_static=no
5798 if test -n "$RANLIB"; then
5799 archive_cmds="$archive_cmds~\$RANLIB \$lib"
5800 postinstall_cmds='$RANLIB $lib'
5801 fi
5802 ;;
5803
5804 aix[[4-9]]*)
5805 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5806 test "$enable_shared" = yes && enable_static=no
5807 fi
5808 ;;
5809 esac
5810 AC_MSG_RESULT([$enable_shared])
5811
5812 AC_MSG_CHECKING([whether to build static libraries])
5813 # Make sure either enable_shared or enable_static is yes.
5814 test "$enable_shared" = yes || enable_static=yes
5815 AC_MSG_RESULT([$enable_static])
5816
5817 _LT_CONFIG($1)
5818 fi
5819 AC_LANG_POP
5820 CC="$lt_save_CC"
5821 ])# _LT_LANG_C_CONFIG
5822
5823
5824 # _LT_LANG_CXX_CONFIG([TAG])
5825 # --------------------------
5826 # Ensure that the configuration variables for a C++ compiler are suitably
5827 # defined. These variables are subsequently used by _LT_CONFIG to write
5828 # the compiler configuration to `libtool'.
5829 m4_defun([_LT_LANG_CXX_CONFIG],
5830 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5831 m4_require([_LT_DECL_EGREP])dnl
5832 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
5833 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5834 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5835 (test "X$CXX" != "Xg++"))) ; then
5836 AC_PROG_CXXCPP
5837 else
5838 _lt_caught_CXX_error=yes
5839 fi
5840
5841 AC_LANG_PUSH(C++)
5842 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5843 _LT_TAGVAR(allow_undefined_flag, $1)=
5844 _LT_TAGVAR(always_export_symbols, $1)=no
5845 _LT_TAGVAR(archive_expsym_cmds, $1)=
5846 _LT_TAGVAR(compiler_needs_object, $1)=no
5847 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5848 _LT_TAGVAR(hardcode_direct, $1)=no
5849 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5850 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5851 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5852 _LT_TAGVAR(hardcode_minus_L, $1)=no
5853 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5854 _LT_TAGVAR(hardcode_automatic, $1)=no
5855 _LT_TAGVAR(inherit_rpath, $1)=no
5856 _LT_TAGVAR(module_cmds, $1)=
5857 _LT_TAGVAR(module_expsym_cmds, $1)=
5858 _LT_TAGVAR(link_all_deplibs, $1)=unknown
5859 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5860 _LT_TAGVAR(reload_flag, $1)=$reload_flag
5861 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
5862 _LT_TAGVAR(no_undefined_flag, $1)=
5863 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5864 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5865
5866 # Source file extension for C++ test sources.
5867 ac_ext=cpp
5868
5869 # Object file extension for compiled C++ test sources.
5870 objext=o
5871 _LT_TAGVAR(objext, $1)=$objext
5872
5873 # No sense in running all these tests if we already determined that
5874 # the CXX compiler isn't working. Some variables (like enable_shared)
5875 # are currently assumed to apply to all compilers on this platform,
5876 # and will be corrupted by setting them based on a non-working compiler.
5877 if test "$_lt_caught_CXX_error" != yes; then
5878 # Code to be used in simple compile tests
5879 lt_simple_compile_test_code="int some_variable = 0;"
5880
5881 # Code to be used in simple link tests
5882 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
5883
5884 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5885 _LT_TAG_COMPILER
5886
5887 # save warnings/boilerplate of simple test code
5888 _LT_COMPILER_BOILERPLATE
5889 _LT_LINKER_BOILERPLATE
5890
5891 # Allow CC to be a program name with arguments.
5892 lt_save_CC=$CC
5893 lt_save_CFLAGS=$CFLAGS
5894 lt_save_LD=$LD
5895 lt_save_GCC=$GCC
5896 GCC=$GXX
5897 lt_save_with_gnu_ld=$with_gnu_ld
5898 lt_save_path_LD=$lt_cv_path_LD
5899 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
5900 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
5901 else
5902 $as_unset lt_cv_prog_gnu_ld
5903 fi
5904 if test -n "${lt_cv_path_LDCXX+set}"; then
5905 lt_cv_path_LD=$lt_cv_path_LDCXX
5906 else
5907 $as_unset lt_cv_path_LD
5908 fi
5909 test -z "${LDCXX+set}" || LD=$LDCXX
5910 CC=${CXX-"c++"}
5911 CFLAGS=$CXXFLAGS
5912 compiler=$CC
5913 _LT_TAGVAR(compiler, $1)=$CC
5914 _LT_CC_BASENAME([$compiler])
5915
5916 if test -n "$compiler"; then
5917 # We don't want -fno-exception when compiling C++ code, so set the
5918 # no_builtin_flag separately
5919 if test "$GXX" = yes; then
5920 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5921 else
5922 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5923 fi
5924
5925 if test "$GXX" = yes; then
5926 # Set up default GNU C++ configuration
5927
5928 LT_PATH_LD
5929
5930 # Check if GNU C++ uses GNU ld as the underlying linker, since the
5931 # archiving commands below assume that GNU ld is being used.
5932 if test "$with_gnu_ld" = yes; then
5933 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5934 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5935
5936 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5937 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5938
5939 # If archive_cmds runs LD, not CC, wlarc should be empty
5940 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
5941 # investigate it a little bit more. (MM)
5942 wlarc='${wl}'
5943
5944 # ancient GNU ld didn't support --whole-archive et. al.
5945 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
5946 $GREP 'no-whole-archive' > /dev/null; then
5947 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5948 else
5949 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5950 fi
5951 else
5952 with_gnu_ld=no
5953 wlarc=
5954
5955 # A generic and very simple default shared library creation
5956 # command for GNU C++ for the case where it uses the native
5957 # linker, instead of GNU ld. If possible, this setting should
5958 # overridden to take advantage of the native linker features on
5959 # the platform it is being used on.
5960 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5961 fi
5962
5963 # Commands to make compiler produce verbose output that lists
5964 # what "hidden" libraries, object files and flags are used when
5965 # linking a shared library.
5966 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
5967
5968 else
5969 GXX=no
5970 with_gnu_ld=no
5971 wlarc=
5972 fi
5973
5974 # PORTME: fill in a description of your system's C++ link characteristics
5975 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5976 _LT_TAGVAR(ld_shlibs, $1)=yes
5977 case $host_os in
5978 aix3*)
5979 # FIXME: insert proper C++ library support
5980 _LT_TAGVAR(ld_shlibs, $1)=no
5981 ;;
5982 aix[[4-9]]*)
5983 if test "$host_cpu" = ia64; then
5984 # On IA64, the linker does run time linking by default, so we don't
5985 # have to do anything special.
5986 aix_use_runtimelinking=no
5987 exp_sym_flag='-Bexport'
5988 no_entry_flag=""
5989 else
5990 aix_use_runtimelinking=no
5991
5992 # Test if we are trying to use run time linking or normal
5993 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5994 # need to do runtime linking.
5995 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5996 for ld_flag in $LDFLAGS; do
5997 case $ld_flag in
5998 *-brtl*)
5999 aix_use_runtimelinking=yes
6000 break
6001 ;;
6002 esac
6003 done
6004 ;;
6005 esac
6006
6007 exp_sym_flag='-bexport'
6008 no_entry_flag='-bnoentry'
6009 fi
6010
6011 # When large executables or shared objects are built, AIX ld can
6012 # have problems creating the table of contents. If linking a library
6013 # or program results in "error TOC overflow" add -mminimal-toc to
6014 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6015 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6016
6017 _LT_TAGVAR(archive_cmds, $1)=''
6018 _LT_TAGVAR(hardcode_direct, $1)=yes
6019 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6020 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6021 _LT_TAGVAR(link_all_deplibs, $1)=yes
6022 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6023
6024 if test "$GXX" = yes; then
6025 case $host_os in aix4.[[012]]|aix4.[[012]].*)
6026 # We only want to do this on AIX 4.2 and lower, the check
6027 # below for broken collect2 doesn't work under 4.3+
6028 collect2name=`${CC} -print-prog-name=collect2`
6029 if test -f "$collect2name" &&
6030 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6031 then
6032 # We have reworked collect2
6033 :
6034 else
6035 # We have old collect2
6036 _LT_TAGVAR(hardcode_direct, $1)=unsupported
6037 # It fails to find uninstalled libraries when the uninstalled
6038 # path is not listed in the libpath. Setting hardcode_minus_L
6039 # to unsupported forces relinking
6040 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6041 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6042 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6043 fi
6044 esac
6045 shared_flag='-shared'
6046 if test "$aix_use_runtimelinking" = yes; then
6047 shared_flag="$shared_flag "'${wl}-G'
6048 fi
6049 else
6050 # not using gcc
6051 if test "$host_cpu" = ia64; then
6052 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6053 # chokes on -Wl,-G. The following line is correct:
6054 shared_flag='-G'
6055 else
6056 if test "$aix_use_runtimelinking" = yes; then
6057 shared_flag='${wl}-G'
6058 else
6059 shared_flag='${wl}-bM:SRE'
6060 fi
6061 fi
6062 fi
6063
6064 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6065 # It seems that -bexpall does not export symbols beginning with
6066 # underscore (_), so it is better to generate a list of symbols to
6067 # export.
6068 _LT_TAGVAR(always_export_symbols, $1)=yes
6069 if test "$aix_use_runtimelinking" = yes; then
6070 # Warning - without using the other runtime loading flags (-brtl),
6071 # -berok will link without error, but may produce a broken library.
6072 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6073 # Determine the default libpath from the value encoded in an empty
6074 # executable.
6075 _LT_SYS_MODULE_PATH_AIX([$1])
6076 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6077
6078 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6079 else
6080 if test "$host_cpu" = ia64; then
6081 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6082 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6083 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
6084 else
6085 # Determine the default libpath from the value encoded in an
6086 # empty executable.
6087 _LT_SYS_MODULE_PATH_AIX([$1])
6088 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6089 # Warning - without using the other run time loading flags,
6090 # -berok will link without error, but may produce a broken library.
6091 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6092 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6093 if test "$with_gnu_ld" = yes; then
6094 # We only use this code for GNU lds that support --whole-archive.
6095 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6096 else
6097 # Exported symbols can be pulled into shared objects from archives
6098 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6099 fi
6100 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6101 # This is similar to how AIX traditionally builds its shared
6102 # libraries.
6103 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6104 fi
6105 fi
6106 ;;
6107
6108 beos*)
6109 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6110 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6111 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6112 # support --undefined. This deserves some investigation. FIXME
6113 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6114 else
6115 _LT_TAGVAR(ld_shlibs, $1)=no
6116 fi
6117 ;;
6118
6119 chorus*)
6120 case $cc_basename in
6121 *)
6122 # FIXME: insert proper C++ library support
6123 _LT_TAGVAR(ld_shlibs, $1)=no
6124 ;;
6125 esac
6126 ;;
6127
6128 cygwin* | mingw* | pw32* | cegcc*)
6129 case $GXX,$cc_basename in
6130 ,cl* | no,cl*)
6131 # Native MSVC
6132 # hardcode_libdir_flag_spec is actually meaningless, as there is
6133 # no search path for DLLs.
6134 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6135 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6136 _LT_TAGVAR(always_export_symbols, $1)=yes
6137 _LT_TAGVAR(file_list_spec, $1)='@'
6138 # Tell ltmain to make .lib files, not .a files.
6139 libext=lib
6140 # Tell ltmain to make .dll files, not .so files.
6141 shrext_cmds=".dll"
6142 # FIXME: Setting linknames here is a bad hack.
6143 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6144 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6145 $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6146 else
6147 $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6148 fi~
6149 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6150 linknames='
6151 # The linker will not automatically build a static lib if we build a DLL.
6152 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6153 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6154 # Don't use ranlib
6155 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6156 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6157 lt_tool_outputfile="@TOOL_OUTPUT@"~
6158 case $lt_outputfile in
6159 *.exe|*.EXE) ;;
6160 *)
6161 lt_outputfile="$lt_outputfile.exe"
6162 lt_tool_outputfile="$lt_tool_outputfile.exe"
6163 ;;
6164 esac~
6165 func_to_tool_file "$lt_outputfile"~
6166 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6167 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6168 $RM "$lt_outputfile.manifest";
6169 fi'
6170 ;;
6171 *)
6172 # g++
6173 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6174 # as there is no search path for DLLs.
6175 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6176 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
6177 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6178 _LT_TAGVAR(always_export_symbols, $1)=no
6179 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6180
6181 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6182 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6183 # If the export-symbols file already is a .def file (1st line
6184 # is EXPORTS), use it as is; otherwise, prepend...
6185 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6186 cp $export_symbols $output_objdir/$soname.def;
6187 else
6188 echo EXPORTS > $output_objdir/$soname.def;
6189 cat $export_symbols >> $output_objdir/$soname.def;
6190 fi~
6191 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6192 else
6193 _LT_TAGVAR(ld_shlibs, $1)=no
6194 fi
6195 ;;
6196 esac
6197 ;;
6198 darwin* | rhapsody*)
6199 _LT_DARWIN_LINKER_FEATURES($1)
6200 ;;
6201
6202 dgux*)
6203 case $cc_basename in
6204 ec++*)
6205 # FIXME: insert proper C++ library support
6206 _LT_TAGVAR(ld_shlibs, $1)=no
6207 ;;
6208 ghcx*)
6209 # Green Hills C++ Compiler
6210 # FIXME: insert proper C++ library support
6211 _LT_TAGVAR(ld_shlibs, $1)=no
6212 ;;
6213 *)
6214 # FIXME: insert proper C++ library support
6215 _LT_TAGVAR(ld_shlibs, $1)=no
6216 ;;
6217 esac
6218 ;;
6219
6220 freebsd2.*)
6221 # C++ shared libraries reported to be fairly broken before
6222 # switch to ELF
6223 _LT_TAGVAR(ld_shlibs, $1)=no
6224 ;;
6225
6226 freebsd-elf*)
6227 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6228 ;;
6229
6230 freebsd* | dragonfly*)
6231 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6232 # conventions
6233 _LT_TAGVAR(ld_shlibs, $1)=yes
6234 ;;
6235
6236 haiku*)
6237 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6238 _LT_TAGVAR(link_all_deplibs, $1)=yes
6239 ;;
6240
6241 hpux9*)
6242 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6243 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6244 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6245 _LT_TAGVAR(hardcode_direct, $1)=yes
6246 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6247 # but as the default
6248 # location of the library.
6249
6250 case $cc_basename in
6251 CC*)
6252 # FIXME: insert proper C++ library support
6253 _LT_TAGVAR(ld_shlibs, $1)=no
6254 ;;
6255 aCC*)
6256 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6257 # Commands to make compiler produce verbose output that lists
6258 # what "hidden" libraries, object files and flags are used when
6259 # linking a shared library.
6260 #
6261 # There doesn't appear to be a way to prevent this compiler from
6262 # explicitly linking system object files so we need to strip them
6263 # from the output so that they don't get included in the library
6264 # dependencies.
6265 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6266 ;;
6267 *)
6268 if test "$GXX" = yes; then
6269 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6270 else
6271 # FIXME: insert proper C++ library support
6272 _LT_TAGVAR(ld_shlibs, $1)=no
6273 fi
6274 ;;
6275 esac
6276 ;;
6277
6278 hpux10*|hpux11*)
6279 if test $with_gnu_ld = no; then
6280 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6281 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6282
6283 case $host_cpu in
6284 hppa*64*|ia64*)
6285 ;;
6286 *)
6287 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6288 ;;
6289 esac
6290 fi
6291 case $host_cpu in
6292 hppa*64*|ia64*)
6293 _LT_TAGVAR(hardcode_direct, $1)=no
6294 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6295 ;;
6296 *)
6297 _LT_TAGVAR(hardcode_direct, $1)=yes
6298 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6299 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6300 # but as the default
6301 # location of the library.
6302 ;;
6303 esac
6304
6305 case $cc_basename in
6306 CC*)
6307 # FIXME: insert proper C++ library support
6308 _LT_TAGVAR(ld_shlibs, $1)=no
6309 ;;
6310 aCC*)
6311 case $host_cpu in
6312 hppa*64*)
6313 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6314 ;;
6315 ia64*)
6316 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6317 ;;
6318 *)
6319 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6320 ;;
6321 esac
6322 # Commands to make compiler produce verbose output that lists
6323 # what "hidden" libraries, object files and flags are used when
6324 # linking a shared library.
6325 #
6326 # There doesn't appear to be a way to prevent this compiler from
6327 # explicitly linking system object files so we need to strip them
6328 # from the output so that they don't get included in the library
6329 # dependencies.
6330 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6331 ;;
6332 *)
6333 if test "$GXX" = yes; then
6334 if test $with_gnu_ld = no; then
6335 case $host_cpu in
6336 hppa*64*)
6337 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6338 ;;
6339 ia64*)
6340 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6341 ;;
6342 *)
6343 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6344 ;;
6345 esac
6346 fi
6347 else
6348 # FIXME: insert proper C++ library support
6349 _LT_TAGVAR(ld_shlibs, $1)=no
6350 fi
6351 ;;
6352 esac
6353 ;;
6354
6355 interix[[3-9]]*)
6356 _LT_TAGVAR(hardcode_direct, $1)=no
6357 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6358 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6359 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6360 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6361 # Instead, shared libraries are loaded at an image base (0x10000000 by
6362 # default) and relocated if they conflict, which is a slow very memory
6363 # consuming and fragmenting process. To avoid this, we pick a random,
6364 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6365 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
6366 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6367 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6368 ;;
6369 irix5* | irix6*)
6370 case $cc_basename in
6371 CC*)
6372 # SGI C++
6373 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6374
6375 # Archives containing C++ object files must be created using
6376 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
6377 # necessary to make sure instantiated templates are included
6378 # in the archive.
6379 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6380 ;;
6381 *)
6382 if test "$GXX" = yes; then
6383 if test "$with_gnu_ld" = no; then
6384 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6385 else
6386 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
6387 fi
6388 fi
6389 _LT_TAGVAR(link_all_deplibs, $1)=yes
6390 ;;
6391 esac
6392 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6393 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6394 _LT_TAGVAR(inherit_rpath, $1)=yes
6395 ;;
6396
6397 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
6398 case $cc_basename in
6399 KCC*)
6400 # Kuck and Associates, Inc. (KAI) C++ Compiler
6401
6402 # KCC will only create a shared library if the output file
6403 # ends with ".so" (or ".sl" for HP-UX), so rename the library
6404 # to its proper name (with version) after linking.
6405 _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
6406 _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
6407 # Commands to make compiler produce verbose output that lists
6408 # what "hidden" libraries, object files and flags are used when
6409 # linking a shared library.
6410 #
6411 # There doesn't appear to be a way to prevent this compiler from
6412 # explicitly linking system object files so we need to strip them
6413 # from the output so that they don't get included in the library
6414 # dependencies.
6415 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6416
6417 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6418 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6419
6420 # Archives containing C++ object files must be created using
6421 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6422 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6423 ;;
6424 icpc* | ecpc* )
6425 # Intel C++
6426 with_gnu_ld=yes
6427 # version 8.0 and above of icpc choke on multiply defined symbols
6428 # if we add $predep_objects and $postdep_objects, however 7.1 and
6429 # earlier do not add the objects themselves.
6430 case `$CC -V 2>&1` in
6431 *"Version 7."*)
6432 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6433 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6434 ;;
6435 *) # Version 8.0 or newer
6436 tmp_idyn=
6437 case $host_cpu in
6438 ia64*) tmp_idyn=' -i_dynamic';;
6439 esac
6440 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6441 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6442 ;;
6443 esac
6444 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6445 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6446 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6447 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6448 ;;
6449 pgCC* | pgcpp*)
6450 # Portland Group C++ compiler
6451 case `$CC -V` in
6452 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
6453 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
6454 rm -rf $tpldir~
6455 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
6456 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
6457 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
6458 rm -rf $tpldir~
6459 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
6460 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
6461 $RANLIB $oldlib'
6462 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
6463 rm -rf $tpldir~
6464 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6465 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6466 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
6467 rm -rf $tpldir~
6468 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6469 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
6470 ;;
6471 *) # Version 6 and above use weak symbols
6472 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6473 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
6474 ;;
6475 esac
6476
6477 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6478 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6479 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
6480 ;;
6481 cxx*)
6482 # Compaq C++
6483 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6484 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
6485
6486 runpath_var=LD_RUN_PATH
6487 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6488 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6489
6490 # Commands to make compiler produce verbose output that lists
6491 # what "hidden" libraries, object files and flags are used when
6492 # linking a shared library.
6493 #
6494 # There doesn't appear to be a way to prevent this compiler from
6495 # explicitly linking system object files so we need to strip them
6496 # from the output so that they don't get included in the library
6497 # dependencies.
6498 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
6499 ;;
6500 xl* | mpixl* | bgxl*)
6501 # IBM XL 8.0 on PPC, with GNU ld
6502 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6503 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6504 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6505 if test "x$supports_anon_versioning" = xyes; then
6506 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6507 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6508 echo "local: *; };" >> $output_objdir/$libname.ver~
6509 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6510 fi
6511 ;;
6512 *)
6513 case `$CC -V 2>&1 | sed 5q` in
6514 *Sun\ C*)
6515 # Sun C++ 5.9
6516 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6517 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6518 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
6519 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6520 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
6521 _LT_TAGVAR(compiler_needs_object, $1)=yes
6522
6523 # Not sure whether something based on
6524 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
6525 # would be better.
6526 output_verbose_link_cmd='func_echo_all'
6527
6528 # Archives containing C++ object files must be created using
6529 # "CC -xar", where "CC" is the Sun C++ compiler. This is
6530 # necessary to make sure instantiated templates are included
6531 # in the archive.
6532 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6533 ;;
6534 esac
6535 ;;
6536 esac
6537 ;;
6538
6539 lynxos*)
6540 # FIXME: insert proper C++ library support
6541 _LT_TAGVAR(ld_shlibs, $1)=no
6542 ;;
6543
6544 m88k*)
6545 # FIXME: insert proper C++ library support
6546 _LT_TAGVAR(ld_shlibs, $1)=no
6547 ;;
6548
6549 mvs*)
6550 case $cc_basename in
6551 cxx*)
6552 # FIXME: insert proper C++ library support
6553 _LT_TAGVAR(ld_shlibs, $1)=no
6554 ;;
6555 *)
6556 # FIXME: insert proper C++ library support
6557 _LT_TAGVAR(ld_shlibs, $1)=no
6558 ;;
6559 esac
6560 ;;
6561
6562 netbsd*)
6563 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6564 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6565 wlarc=
6566 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6567 _LT_TAGVAR(hardcode_direct, $1)=yes
6568 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6569 fi
6570 # Workaround some broken pre-1.5 toolchains
6571 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6572 ;;
6573
6574 *nto* | *qnx*)
6575 _LT_TAGVAR(ld_shlibs, $1)=yes
6576 ;;
6577
6578 openbsd2*)
6579 # C++ shared libraries are fairly broken
6580 _LT_TAGVAR(ld_shlibs, $1)=no
6581 ;;
6582
6583 openbsd*)
6584 if test -f /usr/libexec/ld.so; then
6585 _LT_TAGVAR(hardcode_direct, $1)=yes
6586 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6587 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6588 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6589 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6590 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6591 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
6592 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6593 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6594 fi
6595 output_verbose_link_cmd=func_echo_all
6596 else
6597 _LT_TAGVAR(ld_shlibs, $1)=no
6598 fi
6599 ;;
6600
6601 osf3* | osf4* | osf5*)
6602 case $cc_basename in
6603 KCC*)
6604 # Kuck and Associates, Inc. (KAI) C++ Compiler
6605
6606 # KCC will only create a shared library if the output file
6607 # ends with ".so" (or ".sl" for HP-UX), so rename the library
6608 # to its proper name (with version) after linking.
6609 _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
6610
6611 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6612 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6613
6614 # Archives containing C++ object files must be created using
6615 # the KAI C++ compiler.
6616 case $host in
6617 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
6618 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
6619 esac
6620 ;;
6621 RCC*)
6622 # Rational C++ 2.4.1
6623 # FIXME: insert proper C++ library support
6624 _LT_TAGVAR(ld_shlibs, $1)=no
6625 ;;
6626 cxx*)
6627 case $host in
6628 osf3*)
6629 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6630 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6631 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6632 ;;
6633 *)
6634 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6635 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6636 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6637 echo "-hidden">> $lib.exp~
6638 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
6639 $RM $lib.exp'
6640 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6641 ;;
6642 esac
6643
6644 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6645
6646 # Commands to make compiler produce verbose output that lists
6647 # what "hidden" libraries, object files and flags are used when
6648 # linking a shared library.
6649 #
6650 # There doesn't appear to be a way to prevent this compiler from
6651 # explicitly linking system object files so we need to strip them
6652 # from the output so that they don't get included in the library
6653 # dependencies.
6654 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6655 ;;
6656 *)
6657 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6658 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6659 case $host in
6660 osf3*)
6661 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6662 ;;
6663 *)
6664 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6665 ;;
6666 esac
6667
6668 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6669 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6670
6671 # Commands to make compiler produce verbose output that lists
6672 # what "hidden" libraries, object files and flags are used when
6673 # linking a shared library.
6674 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6675
6676 else
6677 # FIXME: insert proper C++ library support
6678 _LT_TAGVAR(ld_shlibs, $1)=no
6679 fi
6680 ;;
6681 esac
6682 ;;
6683
6684 psos*)
6685 # FIXME: insert proper C++ library support
6686 _LT_TAGVAR(ld_shlibs, $1)=no
6687 ;;
6688
6689 sunos4*)
6690 case $cc_basename in
6691 CC*)
6692 # Sun C++ 4.x
6693 # FIXME: insert proper C++ library support
6694 _LT_TAGVAR(ld_shlibs, $1)=no
6695 ;;
6696 lcc*)
6697 # Lucid
6698 # FIXME: insert proper C++ library support
6699 _LT_TAGVAR(ld_shlibs, $1)=no
6700 ;;
6701 *)
6702 # FIXME: insert proper C++ library support
6703 _LT_TAGVAR(ld_shlibs, $1)=no
6704 ;;
6705 esac
6706 ;;
6707
6708 solaris*)
6709 case $cc_basename in
6710 CC* | sunCC*)
6711 # Sun C++ 4.2, 5.x and Centerline C++
6712 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6713 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6714 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6715 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6716 $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6717
6718 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6719 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6720 case $host_os in
6721 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6722 *)
6723 # The compiler driver will combine and reorder linker options,
6724 # but understands `-z linker_flag'.
6725 # Supported since Solaris 2.6 (maybe 2.5.1?)
6726 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6727 ;;
6728 esac
6729 _LT_TAGVAR(link_all_deplibs, $1)=yes
6730
6731 output_verbose_link_cmd='func_echo_all'
6732
6733 # Archives containing C++ object files must be created using
6734 # "CC -xar", where "CC" is the Sun C++ compiler. This is
6735 # necessary to make sure instantiated templates are included
6736 # in the archive.
6737 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6738 ;;
6739 gcx*)
6740 # Green Hills C++ Compiler
6741 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6742
6743 # The C++ compiler must be used to create the archive.
6744 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6745 ;;
6746 *)
6747 # GNU C++ compiler with Solaris linker
6748 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6749 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6750 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6751 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6752 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6753 $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6754
6755 # Commands to make compiler produce verbose output that lists
6756 # what "hidden" libraries, object files and flags are used when
6757 # linking a shared library.
6758 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6759 else
6760 # g++ 2.7 appears to require `-G' NOT `-shared' on this
6761 # platform.
6762 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6763 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6764 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6765
6766 # Commands to make compiler produce verbose output that lists
6767 # what "hidden" libraries, object files and flags are used when
6768 # linking a shared library.
6769 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6770 fi
6771
6772 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6773 case $host_os in
6774 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6775 *)
6776 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6777 ;;
6778 esac
6779 fi
6780 ;;
6781 esac
6782 ;;
6783
6784 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6785 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6786 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6787 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6788 runpath_var='LD_RUN_PATH'
6789
6790 case $cc_basename in
6791 CC*)
6792 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6793 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6794 ;;
6795 *)
6796 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6797 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6798 ;;
6799 esac
6800 ;;
6801
6802 sysv5* | sco3.2v5* | sco5v6*)
6803 # Note: We can NOT use -z defs as we might desire, because we do not
6804 # link with -lc, and that would cause any symbols used from libc to
6805 # always be unresolved, which means just about no library would
6806 # ever link correctly. If we're not using GNU ld we use -z text
6807 # though, which does catch some bad symbols but isn't as heavy-handed
6808 # as -z defs.
6809 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6810 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6811 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6812 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6813 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6814 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6815 _LT_TAGVAR(link_all_deplibs, $1)=yes
6816 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6817 runpath_var='LD_RUN_PATH'
6818
6819 case $cc_basename in
6820 CC*)
6821 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6822 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6823 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
6824 '"$_LT_TAGVAR(old_archive_cmds, $1)"
6825 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
6826 '"$_LT_TAGVAR(reload_cmds, $1)"
6827 ;;
6828 *)
6829 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6830 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6831 ;;
6832 esac
6833 ;;
6834
6835 tandem*)
6836 case $cc_basename in
6837 NCC*)
6838 # NonStop-UX NCC 3.20
6839 # FIXME: insert proper C++ library support
6840 _LT_TAGVAR(ld_shlibs, $1)=no
6841 ;;
6842 *)
6843 # FIXME: insert proper C++ library support
6844 _LT_TAGVAR(ld_shlibs, $1)=no
6845 ;;
6846 esac
6847 ;;
6848
6849 vxworks*)
6850 # FIXME: insert proper C++ library support
6851 _LT_TAGVAR(ld_shlibs, $1)=no
6852 ;;
6853
6854 *)
6855 # FIXME: insert proper C++ library support
6856 _LT_TAGVAR(ld_shlibs, $1)=no
6857 ;;
6858 esac
6859
6860 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6861 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6862
6863 _LT_TAGVAR(GCC, $1)="$GXX"
6864 _LT_TAGVAR(LD, $1)="$LD"
6865
6866 ## CAVEAT EMPTOR:
6867 ## There is no encapsulation within the following macros, do not change
6868 ## the running order or otherwise move them around unless you know exactly
6869 ## what you are doing...
6870 _LT_SYS_HIDDEN_LIBDEPS($1)
6871 _LT_COMPILER_PIC($1)
6872 _LT_COMPILER_C_O($1)
6873 _LT_COMPILER_FILE_LOCKS($1)
6874 _LT_LINKER_SHLIBS($1)
6875 _LT_SYS_DYNAMIC_LINKER($1)
6876 _LT_LINKER_HARDCODE_LIBPATH($1)
6877
6878 _LT_CONFIG($1)
6879 fi # test -n "$compiler"
6880
6881 CC=$lt_save_CC
6882 CFLAGS=$lt_save_CFLAGS
6883 LDCXX=$LD
6884 LD=$lt_save_LD
6885 GCC=$lt_save_GCC
6886 with_gnu_ld=$lt_save_with_gnu_ld
6887 lt_cv_path_LDCXX=$lt_cv_path_LD
6888 lt_cv_path_LD=$lt_save_path_LD
6889 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6890 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6891 fi # test "$_lt_caught_CXX_error" != yes
6892
6893 AC_LANG_POP
6894 ])# _LT_LANG_CXX_CONFIG
6895
6896
6897 # _LT_FUNC_STRIPNAME_CNF
6898 # ----------------------
6899 # func_stripname_cnf prefix suffix name
6900 # strip PREFIX and SUFFIX off of NAME.
6901 # PREFIX and SUFFIX must not contain globbing or regex special
6902 # characters, hashes, percent signs, but SUFFIX may contain a leading
6903 # dot (in which case that matches only a dot).
6904 #
6905 # This function is identical to the (non-XSI) version of func_stripname,
6906 # except this one can be used by m4 code that may be executed by configure,
6907 # rather than the libtool script.
6908 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
6909 AC_REQUIRE([_LT_DECL_SED])
6910 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
6911 func_stripname_cnf ()
6912 {
6913 case ${2} in
6914 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
6915 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
6916 esac
6917 } # func_stripname_cnf
6918 ])# _LT_FUNC_STRIPNAME_CNF
6919
6920 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
6921 # ---------------------------------
6922 # Figure out "hidden" library dependencies from verbose
6923 # compiler output when linking a shared library.
6924 # Parse the compiler output and extract the necessary
6925 # objects, libraries and library flags.
6926 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
6927 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6928 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
6929 # Dependencies to place before and after the object being linked:
6930 _LT_TAGVAR(predep_objects, $1)=
6931 _LT_TAGVAR(postdep_objects, $1)=
6932 _LT_TAGVAR(predeps, $1)=
6933 _LT_TAGVAR(postdeps, $1)=
6934 _LT_TAGVAR(compiler_lib_search_path, $1)=
6935
6936 dnl we can't use the lt_simple_compile_test_code here,
6937 dnl because it contains code intended for an executable,
6938 dnl not a library. It's possible we should let each
6939 dnl tag define a new lt_????_link_test_code variable,
6940 dnl but it's only used here...
6941 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
6942 int a;
6943 void foo (void) { a = 0; }
6944 _LT_EOF
6945 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
6946 class Foo
6947 {
6948 public:
6949 Foo (void) { a = 0; }
6950 private:
6951 int a;
6952 };
6953 _LT_EOF
6954 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
6955 subroutine foo
6956 implicit none
6957 integer*4 a
6958 a=0
6959 return
6960 end
6961 _LT_EOF
6962 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
6963 subroutine foo
6964 implicit none
6965 integer a
6966 a=0
6967 return
6968 end
6969 _LT_EOF
6970 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
6971 public class foo {
6972 private int a;
6973 public void bar (void) {
6974 a = 0;
6975 }
6976 };
6977 _LT_EOF
6978 ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
6979 package foo
6980 func foo() {
6981 }
6982 _LT_EOF
6983 ])
6984
6985 _lt_libdeps_save_CFLAGS=$CFLAGS
6986 case "$CC $CFLAGS " in #(
6987 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
6988 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
6989 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
6990 esac
6991
6992 dnl Parse the compiler output and extract the necessary
6993 dnl objects, libraries and library flags.
6994 if AC_TRY_EVAL(ac_compile); then
6995 # Parse the compiler output and extract the necessary
6996 # objects, libraries and library flags.
6997
6998 # Sentinel used to keep track of whether or not we are before
6999 # the conftest object file.
7000 pre_test_object_deps_done=no
7001
7002 for p in `eval "$output_verbose_link_cmd"`; do
7003 case ${prev}${p} in
7004
7005 -L* | -R* | -l*)
7006 # Some compilers place space between "-{L,R}" and the path.
7007 # Remove the space.
7008 if test $p = "-L" ||
7009 test $p = "-R"; then
7010 prev=$p
7011 continue
7012 fi
7013
7014 # Expand the sysroot to ease extracting the directories later.
7015 if test -z "$prev"; then
7016 case $p in
7017 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
7018 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
7019 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
7020 esac
7021 fi
7022 case $p in
7023 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
7024 esac
7025 if test "$pre_test_object_deps_done" = no; then
7026 case ${prev} in
7027 -L | -R)
7028 # Internal compiler library paths should come after those
7029 # provided the user. The postdeps already come after the
7030 # user supplied libs so there is no need to process them.
7031 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7032 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
7033 else
7034 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
7035 fi
7036 ;;
7037 # The "-l" case would never come before the object being
7038 # linked, so don't bother handling this case.
7039 esac
7040 else
7041 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7042 _LT_TAGVAR(postdeps, $1)="${prev}${p}"
7043 else
7044 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
7045 fi
7046 fi
7047 prev=
7048 ;;
7049
7050 *.lto.$objext) ;; # Ignore GCC LTO objects
7051 *.$objext)
7052 # This assumes that the test object file only shows up
7053 # once in the compiler output.
7054 if test "$p" = "conftest.$objext"; then
7055 pre_test_object_deps_done=yes
7056 continue
7057 fi
7058
7059 if test "$pre_test_object_deps_done" = no; then
7060 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7061 _LT_TAGVAR(predep_objects, $1)="$p"
7062 else
7063 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7064 fi
7065 else
7066 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7067 _LT_TAGVAR(postdep_objects, $1)="$p"
7068 else
7069 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7070 fi
7071 fi
7072 ;;
7073
7074 *) ;; # Ignore the rest.
7075
7076 esac
7077 done
7078
7079 # Clean up.
7080 rm -f a.out a.exe
7081 else
7082 echo "libtool.m4: error: problem compiling $1 test program"
7083 fi
7084
7085 $RM -f confest.$objext
7086 CFLAGS=$_lt_libdeps_save_CFLAGS
7087
7088 # PORTME: override above test on systems where it is broken
7089 m4_if([$1], [CXX],
7090 [case $host_os in
7091 interix[[3-9]]*)
7092 # Interix 3.5 installs completely hosed .la files for C++, so rather than
7093 # hack all around it, let's just trust "g++" to DTRT.
7094 _LT_TAGVAR(predep_objects,$1)=
7095 _LT_TAGVAR(postdep_objects,$1)=
7096 _LT_TAGVAR(postdeps,$1)=
7097 ;;
7098
7099 linux*)
7100 case `$CC -V 2>&1 | sed 5q` in
7101 *Sun\ C*)
7102 # Sun C++ 5.9
7103
7104 # The more standards-conforming stlport4 library is
7105 # incompatible with the Cstd library. Avoid specifying
7106 # it if it's in CXXFLAGS. Ignore libCrun as
7107 # -library=stlport4 depends on it.
7108 case " $CXX $CXXFLAGS " in
7109 *" -library=stlport4 "*)
7110 solaris_use_stlport4=yes
7111 ;;
7112 esac
7113
7114 if test "$solaris_use_stlport4" != yes; then
7115 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7116 fi
7117 ;;
7118 esac
7119 ;;
7120
7121 solaris*)
7122 case $cc_basename in
7123 CC* | sunCC*)
7124 # The more standards-conforming stlport4 library is
7125 # incompatible with the Cstd library. Avoid specifying
7126 # it if it's in CXXFLAGS. Ignore libCrun as
7127 # -library=stlport4 depends on it.
7128 case " $CXX $CXXFLAGS " in
7129 *" -library=stlport4 "*)
7130 solaris_use_stlport4=yes
7131 ;;
7132 esac
7133
7134 # Adding this requires a known-good setup of shared libraries for
7135 # Sun compiler versions before 5.6, else PIC objects from an old
7136 # archive will be linked into the output, leading to subtle bugs.
7137 if test "$solaris_use_stlport4" != yes; then
7138 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7139 fi
7140 ;;
7141 esac
7142 ;;
7143 esac
7144 ])
7145
7146 case " $_LT_TAGVAR(postdeps, $1) " in
7147 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7148 esac
7149 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7150 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7151 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
7152 fi
7153 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7154 [The directories searched by this compiler when creating a shared library])
7155 _LT_TAGDECL([], [predep_objects], [1],
7156 [Dependencies to place before and after the objects being linked to
7157 create a shared library])
7158 _LT_TAGDECL([], [postdep_objects], [1])
7159 _LT_TAGDECL([], [predeps], [1])
7160 _LT_TAGDECL([], [postdeps], [1])
7161 _LT_TAGDECL([], [compiler_lib_search_path], [1],
7162 [The library search path used internally by the compiler when linking
7163 a shared library])
7164 ])# _LT_SYS_HIDDEN_LIBDEPS
7165
7166
7167 # _LT_LANG_F77_CONFIG([TAG])
7168 # --------------------------
7169 # Ensure that the configuration variables for a Fortran 77 compiler are
7170 # suitably defined. These variables are subsequently used by _LT_CONFIG
7171 # to write the compiler configuration to `libtool'.
7172 m4_defun([_LT_LANG_F77_CONFIG],
7173 [AC_LANG_PUSH(Fortran 77)
7174 if test -z "$F77" || test "X$F77" = "Xno"; then
7175 _lt_disable_F77=yes
7176 fi
7177
7178 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7179 _LT_TAGVAR(allow_undefined_flag, $1)=
7180 _LT_TAGVAR(always_export_symbols, $1)=no
7181 _LT_TAGVAR(archive_expsym_cmds, $1)=
7182 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7183 _LT_TAGVAR(hardcode_direct, $1)=no
7184 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7185 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7186 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7187 _LT_TAGVAR(hardcode_minus_L, $1)=no
7188 _LT_TAGVAR(hardcode_automatic, $1)=no
7189 _LT_TAGVAR(inherit_rpath, $1)=no
7190 _LT_TAGVAR(module_cmds, $1)=
7191 _LT_TAGVAR(module_expsym_cmds, $1)=
7192 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7193 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7194 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7195 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7196 _LT_TAGVAR(no_undefined_flag, $1)=
7197 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7198 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7199
7200 # Source file extension for f77 test sources.
7201 ac_ext=f
7202
7203 # Object file extension for compiled f77 test sources.
7204 objext=o
7205 _LT_TAGVAR(objext, $1)=$objext
7206
7207 # No sense in running all these tests if we already determined that
7208 # the F77 compiler isn't working. Some variables (like enable_shared)
7209 # are currently assumed to apply to all compilers on this platform,
7210 # and will be corrupted by setting them based on a non-working compiler.
7211 if test "$_lt_disable_F77" != yes; then
7212 # Code to be used in simple compile tests
7213 lt_simple_compile_test_code="\
7214 subroutine t
7215 return
7216 end
7217 "
7218
7219 # Code to be used in simple link tests
7220 lt_simple_link_test_code="\
7221 program t
7222 end
7223 "
7224
7225 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7226 _LT_TAG_COMPILER
7227
7228 # save warnings/boilerplate of simple test code
7229 _LT_COMPILER_BOILERPLATE
7230 _LT_LINKER_BOILERPLATE
7231
7232 # Allow CC to be a program name with arguments.
7233 lt_save_CC="$CC"
7234 lt_save_GCC=$GCC
7235 lt_save_CFLAGS=$CFLAGS
7236 CC=${F77-"f77"}
7237 CFLAGS=$FFLAGS
7238 compiler=$CC
7239 _LT_TAGVAR(compiler, $1)=$CC
7240 _LT_CC_BASENAME([$compiler])
7241 GCC=$G77
7242 if test -n "$compiler"; then
7243 AC_MSG_CHECKING([if libtool supports shared libraries])
7244 AC_MSG_RESULT([$can_build_shared])
7245
7246 AC_MSG_CHECKING([whether to build shared libraries])
7247 test "$can_build_shared" = "no" && enable_shared=no
7248
7249 # On AIX, shared libraries and static libraries use the same namespace, and
7250 # are all built from PIC.
7251 case $host_os in
7252 aix3*)
7253 test "$enable_shared" = yes && enable_static=no
7254 if test -n "$RANLIB"; then
7255 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7256 postinstall_cmds='$RANLIB $lib'
7257 fi
7258 ;;
7259 aix[[4-9]]*)
7260 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7261 test "$enable_shared" = yes && enable_static=no
7262 fi
7263 ;;
7264 esac
7265 AC_MSG_RESULT([$enable_shared])
7266
7267 AC_MSG_CHECKING([whether to build static libraries])
7268 # Make sure either enable_shared or enable_static is yes.
7269 test "$enable_shared" = yes || enable_static=yes
7270 AC_MSG_RESULT([$enable_static])
7271
7272 _LT_TAGVAR(GCC, $1)="$G77"
7273 _LT_TAGVAR(LD, $1)="$LD"
7274
7275 ## CAVEAT EMPTOR:
7276 ## There is no encapsulation within the following macros, do not change
7277 ## the running order or otherwise move them around unless you know exactly
7278 ## what you are doing...
7279 _LT_COMPILER_PIC($1)
7280 _LT_COMPILER_C_O($1)
7281 _LT_COMPILER_FILE_LOCKS($1)
7282 _LT_LINKER_SHLIBS($1)
7283 _LT_SYS_DYNAMIC_LINKER($1)
7284 _LT_LINKER_HARDCODE_LIBPATH($1)
7285
7286 _LT_CONFIG($1)
7287 fi # test -n "$compiler"
7288
7289 GCC=$lt_save_GCC
7290 CC="$lt_save_CC"
7291 CFLAGS="$lt_save_CFLAGS"
7292 fi # test "$_lt_disable_F77" != yes
7293
7294 AC_LANG_POP
7295 ])# _LT_LANG_F77_CONFIG
7296
7297
7298 # _LT_LANG_FC_CONFIG([TAG])
7299 # -------------------------
7300 # Ensure that the configuration variables for a Fortran compiler are
7301 # suitably defined. These variables are subsequently used by _LT_CONFIG
7302 # to write the compiler configuration to `libtool'.
7303 m4_defun([_LT_LANG_FC_CONFIG],
7304 [AC_LANG_PUSH(Fortran)
7305
7306 if test -z "$FC" || test "X$FC" = "Xno"; then
7307 _lt_disable_FC=yes
7308 fi
7309
7310 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7311 _LT_TAGVAR(allow_undefined_flag, $1)=
7312 _LT_TAGVAR(always_export_symbols, $1)=no
7313 _LT_TAGVAR(archive_expsym_cmds, $1)=
7314 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7315 _LT_TAGVAR(hardcode_direct, $1)=no
7316 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7317 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7318 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7319 _LT_TAGVAR(hardcode_minus_L, $1)=no
7320 _LT_TAGVAR(hardcode_automatic, $1)=no
7321 _LT_TAGVAR(inherit_rpath, $1)=no
7322 _LT_TAGVAR(module_cmds, $1)=
7323 _LT_TAGVAR(module_expsym_cmds, $1)=
7324 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7325 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7326 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7327 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7328 _LT_TAGVAR(no_undefined_flag, $1)=
7329 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7330 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7331
7332 # Source file extension for fc test sources.
7333 ac_ext=${ac_fc_srcext-f}
7334
7335 # Object file extension for compiled fc test sources.
7336 objext=o
7337 _LT_TAGVAR(objext, $1)=$objext
7338
7339 # No sense in running all these tests if we already determined that
7340 # the FC compiler isn't working. Some variables (like enable_shared)
7341 # are currently assumed to apply to all compilers on this platform,
7342 # and will be corrupted by setting them based on a non-working compiler.
7343 if test "$_lt_disable_FC" != yes; then
7344 # Code to be used in simple compile tests
7345 lt_simple_compile_test_code="\
7346 subroutine t
7347 return
7348 end
7349 "
7350
7351 # Code to be used in simple link tests
7352 lt_simple_link_test_code="\
7353 program t
7354 end
7355 "
7356
7357 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7358 _LT_TAG_COMPILER
7359
7360 # save warnings/boilerplate of simple test code
7361 _LT_COMPILER_BOILERPLATE
7362 _LT_LINKER_BOILERPLATE
7363
7364 # Allow CC to be a program name with arguments.
7365 lt_save_CC="$CC"
7366 lt_save_GCC=$GCC
7367 lt_save_CFLAGS=$CFLAGS
7368 CC=${FC-"f95"}
7369 CFLAGS=$FCFLAGS
7370 compiler=$CC
7371 GCC=$ac_cv_fc_compiler_gnu
7372
7373 _LT_TAGVAR(compiler, $1)=$CC
7374 _LT_CC_BASENAME([$compiler])
7375
7376 if test -n "$compiler"; then
7377 AC_MSG_CHECKING([if libtool supports shared libraries])
7378 AC_MSG_RESULT([$can_build_shared])
7379
7380 AC_MSG_CHECKING([whether to build shared libraries])
7381 test "$can_build_shared" = "no" && enable_shared=no
7382
7383 # On AIX, shared libraries and static libraries use the same namespace, and
7384 # are all built from PIC.
7385 case $host_os in
7386 aix3*)
7387 test "$enable_shared" = yes && enable_static=no
7388 if test -n "$RANLIB"; then
7389 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7390 postinstall_cmds='$RANLIB $lib'
7391 fi
7392 ;;
7393 aix[[4-9]]*)
7394 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7395 test "$enable_shared" = yes && enable_static=no
7396 fi
7397 ;;
7398 esac
7399 AC_MSG_RESULT([$enable_shared])
7400
7401 AC_MSG_CHECKING([whether to build static libraries])
7402 # Make sure either enable_shared or enable_static is yes.
7403 test "$enable_shared" = yes || enable_static=yes
7404 AC_MSG_RESULT([$enable_static])
7405
7406 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
7407 _LT_TAGVAR(LD, $1)="$LD"
7408
7409 ## CAVEAT EMPTOR:
7410 ## There is no encapsulation within the following macros, do not change
7411 ## the running order or otherwise move them around unless you know exactly
7412 ## what you are doing...
7413 _LT_SYS_HIDDEN_LIBDEPS($1)
7414 _LT_COMPILER_PIC($1)
7415 _LT_COMPILER_C_O($1)
7416 _LT_COMPILER_FILE_LOCKS($1)
7417 _LT_LINKER_SHLIBS($1)
7418 _LT_SYS_DYNAMIC_LINKER($1)
7419 _LT_LINKER_HARDCODE_LIBPATH($1)
7420
7421 _LT_CONFIG($1)
7422 fi # test -n "$compiler"
7423
7424 GCC=$lt_save_GCC
7425 CC=$lt_save_CC
7426 CFLAGS=$lt_save_CFLAGS
7427 fi # test "$_lt_disable_FC" != yes
7428
7429 AC_LANG_POP
7430 ])# _LT_LANG_FC_CONFIG
7431
7432
7433 # _LT_LANG_GCJ_CONFIG([TAG])
7434 # --------------------------
7435 # Ensure that the configuration variables for the GNU Java Compiler compiler
7436 # are suitably defined. These variables are subsequently used by _LT_CONFIG
7437 # to write the compiler configuration to `libtool'.
7438 m4_defun([_LT_LANG_GCJ_CONFIG],
7439 [AC_REQUIRE([LT_PROG_GCJ])dnl
7440 AC_LANG_SAVE
7441
7442 # Source file extension for Java test sources.
7443 ac_ext=java
7444
7445 # Object file extension for compiled Java test sources.
7446 objext=o
7447 _LT_TAGVAR(objext, $1)=$objext
7448
7449 # Code to be used in simple compile tests
7450 lt_simple_compile_test_code="class foo {}"
7451
7452 # Code to be used in simple link tests
7453 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7454
7455 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7456 _LT_TAG_COMPILER
7457
7458 # save warnings/boilerplate of simple test code
7459 _LT_COMPILER_BOILERPLATE
7460 _LT_LINKER_BOILERPLATE
7461
7462 # Allow CC to be a program name with arguments.
7463 lt_save_CC=$CC
7464 lt_save_CFLAGS=$CFLAGS
7465 lt_save_GCC=$GCC
7466 GCC=yes
7467 CC=${GCJ-"gcj"}
7468 CFLAGS=$GCJFLAGS
7469 compiler=$CC
7470 _LT_TAGVAR(compiler, $1)=$CC
7471 _LT_TAGVAR(LD, $1)="$LD"
7472 _LT_CC_BASENAME([$compiler])
7473
7474 # GCJ did not exist at the time GCC didn't implicitly link libc in.
7475 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7476
7477 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7478 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7479 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7480
7481 ## CAVEAT EMPTOR:
7482 ## There is no encapsulation within the following macros, do not change
7483 ## the running order or otherwise move them around unless you know exactly
7484 ## what you are doing...
7485 if test -n "$compiler"; then
7486 _LT_COMPILER_NO_RTTI($1)
7487 _LT_COMPILER_PIC($1)
7488 _LT_COMPILER_C_O($1)
7489 _LT_COMPILER_FILE_LOCKS($1)
7490 _LT_LINKER_SHLIBS($1)
7491 _LT_LINKER_HARDCODE_LIBPATH($1)
7492
7493 _LT_CONFIG($1)
7494 fi
7495
7496 AC_LANG_RESTORE
7497
7498 GCC=$lt_save_GCC
7499 CC=$lt_save_CC
7500 CFLAGS=$lt_save_CFLAGS
7501 ])# _LT_LANG_GCJ_CONFIG
7502
7503
7504 # _LT_LANG_GO_CONFIG([TAG])
7505 # --------------------------
7506 # Ensure that the configuration variables for the GNU Go compiler
7507 # are suitably defined. These variables are subsequently used by _LT_CONFIG
7508 # to write the compiler configuration to `libtool'.
7509 m4_defun([_LT_LANG_GO_CONFIG],
7510 [AC_REQUIRE([LT_PROG_GO])dnl
7511 AC_LANG_SAVE
7512
7513 # Source file extension for Go test sources.
7514 ac_ext=go
7515
7516 # Object file extension for compiled Go test sources.
7517 objext=o
7518 _LT_TAGVAR(objext, $1)=$objext
7519
7520 # Code to be used in simple compile tests
7521 lt_simple_compile_test_code="package main; func main() { }"
7522
7523 # Code to be used in simple link tests
7524 lt_simple_link_test_code='package main; func main() { }'
7525
7526 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7527 _LT_TAG_COMPILER
7528
7529 # save warnings/boilerplate of simple test code
7530 _LT_COMPILER_BOILERPLATE
7531 _LT_LINKER_BOILERPLATE
7532
7533 # Allow CC to be a program name with arguments.
7534 lt_save_CC=$CC
7535 lt_save_CFLAGS=$CFLAGS
7536 lt_save_GCC=$GCC
7537 GCC=yes
7538 CC=${GOC-"gccgo"}
7539 CFLAGS=$GOFLAGS
7540 compiler=$CC
7541 _LT_TAGVAR(compiler, $1)=$CC
7542 _LT_TAGVAR(LD, $1)="$LD"
7543 _LT_CC_BASENAME([$compiler])
7544
7545 # Go did not exist at the time GCC didn't implicitly link libc in.
7546 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7547
7548 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7549 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7550 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7551
7552 ## CAVEAT EMPTOR:
7553 ## There is no encapsulation within the following macros, do not change
7554 ## the running order or otherwise move them around unless you know exactly
7555 ## what you are doing...
7556 if test -n "$compiler"; then
7557 _LT_COMPILER_NO_RTTI($1)
7558 _LT_COMPILER_PIC($1)
7559 _LT_COMPILER_C_O($1)
7560 _LT_COMPILER_FILE_LOCKS($1)
7561 _LT_LINKER_SHLIBS($1)
7562 _LT_LINKER_HARDCODE_LIBPATH($1)
7563
7564 _LT_CONFIG($1)
7565 fi
7566
7567 AC_LANG_RESTORE
7568
7569 GCC=$lt_save_GCC
7570 CC=$lt_save_CC
7571 CFLAGS=$lt_save_CFLAGS
7572 ])# _LT_LANG_GO_CONFIG
7573
7574
7575 # _LT_LANG_RC_CONFIG([TAG])
7576 # -------------------------
7577 # Ensure that the configuration variables for the Windows resource compiler
7578 # are suitably defined. These variables are subsequently used by _LT_CONFIG
7579 # to write the compiler configuration to `libtool'.
7580 m4_defun([_LT_LANG_RC_CONFIG],
7581 [AC_REQUIRE([LT_PROG_RC])dnl
7582 AC_LANG_SAVE
7583
7584 # Source file extension for RC test sources.
7585 ac_ext=rc
7586
7587 # Object file extension for compiled RC test sources.
7588 objext=o
7589 _LT_TAGVAR(objext, $1)=$objext
7590
7591 # Code to be used in simple compile tests
7592 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
7593
7594 # Code to be used in simple link tests
7595 lt_simple_link_test_code="$lt_simple_compile_test_code"
7596
7597 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7598 _LT_TAG_COMPILER
7599
7600 # save warnings/boilerplate of simple test code
7601 _LT_COMPILER_BOILERPLATE
7602 _LT_LINKER_BOILERPLATE
7603
7604 # Allow CC to be a program name with arguments.
7605 lt_save_CC="$CC"
7606 lt_save_CFLAGS=$CFLAGS
7607 lt_save_GCC=$GCC
7608 GCC=
7609 CC=${RC-"windres"}
7610 CFLAGS=
7611 compiler=$CC
7612 _LT_TAGVAR(compiler, $1)=$CC
7613 _LT_CC_BASENAME([$compiler])
7614 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
7615
7616 if test -n "$compiler"; then
7617 :
7618 _LT_CONFIG($1)
7619 fi
7620
7621 GCC=$lt_save_GCC
7622 AC_LANG_RESTORE
7623 CC=$lt_save_CC
7624 CFLAGS=$lt_save_CFLAGS
7625 ])# _LT_LANG_RC_CONFIG
7626
7627
7628 # LT_PROG_GCJ
7629 # -----------
7630 AC_DEFUN([LT_PROG_GCJ],
7631 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
7632 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
7633 [AC_CHECK_TOOL(GCJ, gcj,)
7634 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7635 AC_SUBST(GCJFLAGS)])])[]dnl
7636 ])
7637
7638 # Old name:
7639 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
7640 dnl aclocal-1.4 backwards compatibility:
7641 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
7642
7643
7644 # LT_PROG_GO
7645 # ----------
7646 AC_DEFUN([LT_PROG_GO],
7647 [AC_CHECK_TOOL(GOC, gccgo,)
7648 ])
7649
7650
7651 # LT_PROG_RC
7652 # ----------
7653 AC_DEFUN([LT_PROG_RC],
7654 [AC_CHECK_TOOL(RC, windres,)
7655 ])
7656
7657 # Old name:
7658 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
7659 dnl aclocal-1.4 backwards compatibility:
7660 dnl AC_DEFUN([LT_AC_PROG_RC], [])
7661
7662
7663 # _LT_DECL_EGREP
7664 # --------------
7665 # If we don't have a new enough Autoconf to choose the best grep
7666 # available, choose the one first in the user's PATH.
7667 m4_defun([_LT_DECL_EGREP],
7668 [AC_REQUIRE([AC_PROG_EGREP])dnl
7669 AC_REQUIRE([AC_PROG_FGREP])dnl
7670 test -z "$GREP" && GREP=grep
7671 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
7672 _LT_DECL([], [EGREP], [1], [An ERE matcher])
7673 _LT_DECL([], [FGREP], [1], [A literal string matcher])
7674 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
7675 AC_SUBST([GREP])
7676 ])
7677
7678
7679 # _LT_DECL_OBJDUMP
7680 # --------------
7681 # If we don't have a new enough Autoconf to choose the best objdump
7682 # available, choose the one first in the user's PATH.
7683 m4_defun([_LT_DECL_OBJDUMP],
7684 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
7685 test -z "$OBJDUMP" && OBJDUMP=objdump
7686 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
7687 AC_SUBST([OBJDUMP])
7688 ])
7689
7690 # _LT_DECL_DLLTOOL
7691 # ----------------
7692 # Ensure DLLTOOL variable is set.
7693 m4_defun([_LT_DECL_DLLTOOL],
7694 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
7695 test -z "$DLLTOOL" && DLLTOOL=dlltool
7696 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
7697 AC_SUBST([DLLTOOL])
7698 ])
7699
7700 # _LT_DECL_SED
7701 # ------------
7702 # Check for a fully-functional sed program, that truncates
7703 # as few characters as possible. Prefer GNU sed if found.
7704 m4_defun([_LT_DECL_SED],
7705 [AC_PROG_SED
7706 test -z "$SED" && SED=sed
7707 Xsed="$SED -e 1s/^X//"
7708 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
7709 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
7710 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
7711 ])# _LT_DECL_SED
7712
7713 m4_ifndef([AC_PROG_SED], [
7714 ############################################################
7715 # NOTE: This macro has been submitted for inclusion into #
7716 # GNU Autoconf as AC_PROG_SED. When it is available in #
7717 # a released version of Autoconf we should remove this #
7718 # macro and use it instead. #
7719 ############################################################
7720
7721 m4_defun([AC_PROG_SED],
7722 [AC_MSG_CHECKING([for a sed that does not truncate output])
7723 AC_CACHE_VAL(lt_cv_path_SED,
7724 [# Loop through the user's path and test for sed and gsed.
7725 # Then use that list of sed's as ones to test for truncation.
7726 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7727 for as_dir in $PATH
7728 do
7729 IFS=$as_save_IFS
7730 test -z "$as_dir" && as_dir=.
7731 for lt_ac_prog in sed gsed; do
7732 for ac_exec_ext in '' $ac_executable_extensions; do
7733 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7734 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7735 fi
7736 done
7737 done
7738 done
7739 IFS=$as_save_IFS
7740 lt_ac_max=0
7741 lt_ac_count=0
7742 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
7743 # along with /bin/sed that truncates output.
7744 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7745 test ! -f $lt_ac_sed && continue
7746 cat /dev/null > conftest.in
7747 lt_ac_count=0
7748 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7749 # Check for GNU sed and select it if it is found.
7750 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7751 lt_cv_path_SED=$lt_ac_sed
7752 break
7753 fi
7754 while true; do
7755 cat conftest.in conftest.in >conftest.tmp
7756 mv conftest.tmp conftest.in
7757 cp conftest.in conftest.nl
7758 echo >>conftest.nl
7759 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7760 cmp -s conftest.out conftest.nl || break
7761 # 10000 chars as input seems more than enough
7762 test $lt_ac_count -gt 10 && break
7763 lt_ac_count=`expr $lt_ac_count + 1`
7764 if test $lt_ac_count -gt $lt_ac_max; then
7765 lt_ac_max=$lt_ac_count
7766 lt_cv_path_SED=$lt_ac_sed
7767 fi
7768 done
7769 done
7770 ])
7771 SED=$lt_cv_path_SED
7772 AC_SUBST([SED])
7773 AC_MSG_RESULT([$SED])
7774 ])#AC_PROG_SED
7775 ])#m4_ifndef
7776
7777 # Old name:
7778 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
7779 dnl aclocal-1.4 backwards compatibility:
7780 dnl AC_DEFUN([LT_AC_PROG_SED], [])
7781
7782
7783 # _LT_CHECK_SHELL_FEATURES
7784 # ------------------------
7785 # Find out whether the shell is Bourne or XSI compatible,
7786 # or has some other useful features.
7787 m4_defun([_LT_CHECK_SHELL_FEATURES],
7788 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7789 # Try some XSI features
7790 xsi_shell=no
7791 ( _lt_dummy="a/b/c"
7792 test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
7793 = c,a/b,b/c, \
7794 && eval 'test $(( 1 + 1 )) -eq 2 \
7795 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7796 && xsi_shell=yes
7797 AC_MSG_RESULT([$xsi_shell])
7798 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7799
7800 AC_MSG_CHECKING([whether the shell understands "+="])
7801 lt_shell_append=no
7802 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7803 >/dev/null 2>&1 \
7804 && lt_shell_append=yes
7805 AC_MSG_RESULT([$lt_shell_append])
7806 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
7807
7808 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7809 lt_unset=unset
7810 else
7811 lt_unset=false
7812 fi
7813 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
7814
7815 # test EBCDIC or ASCII
7816 case `echo X|tr X '\101'` in
7817 A) # ASCII based system
7818 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7819 lt_SP2NL='tr \040 \012'
7820 lt_NL2SP='tr \015\012 \040\040'
7821 ;;
7822 *) # EBCDIC based system
7823 lt_SP2NL='tr \100 \n'
7824 lt_NL2SP='tr \r\n \100\100'
7825 ;;
7826 esac
7827 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
7828 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
7829 ])# _LT_CHECK_SHELL_FEATURES
7830
7831
7832 # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
7833 # ------------------------------------------------------
7834 # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
7835 # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
7836 m4_defun([_LT_PROG_FUNCTION_REPLACE],
7837 [dnl {
7838 sed -e '/^$1 ()$/,/^} # $1 /c\
7839 $1 ()\
7840 {\
7841 m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
7842 } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
7843 && mv -f "$cfgfile.tmp" "$cfgfile" \
7844 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7845 test 0 -eq $? || _lt_function_replace_fail=:
7846 ])
7847
7848
7849 # _LT_PROG_REPLACE_SHELLFNS
7850 # -------------------------
7851 # Replace existing portable implementations of several shell functions with
7852 # equivalent extended shell implementations where those features are available..
7853 m4_defun([_LT_PROG_REPLACE_SHELLFNS],
7854 [if test x"$xsi_shell" = xyes; then
7855 _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
7856 case ${1} in
7857 */*) func_dirname_result="${1%/*}${2}" ;;
7858 * ) func_dirname_result="${3}" ;;
7859 esac])
7860
7861 _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
7862 func_basename_result="${1##*/}"])
7863
7864 _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
7865 case ${1} in
7866 */*) func_dirname_result="${1%/*}${2}" ;;
7867 * ) func_dirname_result="${3}" ;;
7868 esac
7869 func_basename_result="${1##*/}"])
7870
7871 _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
7872 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7873 # positional parameters, so assign one to ordinary parameter first.
7874 func_stripname_result=${3}
7875 func_stripname_result=${func_stripname_result#"${1}"}
7876 func_stripname_result=${func_stripname_result%"${2}"}])
7877
7878 _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
7879 func_split_long_opt_name=${1%%=*}
7880 func_split_long_opt_arg=${1#*=}])
7881
7882 _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
7883 func_split_short_opt_arg=${1#??}
7884 func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
7885
7886 _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
7887 case ${1} in
7888 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7889 *) func_lo2o_result=${1} ;;
7890 esac])
7891
7892 _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
7893
7894 _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
7895
7896 _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
7897 fi
7898
7899 if test x"$lt_shell_append" = xyes; then
7900 _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
7901
7902 _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
7903 func_quote_for_eval "${2}"
7904 dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
7905 eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
7906
7907 # Save a `func_append' function call where possible by direct use of '+='
7908 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
7909 && mv -f "$cfgfile.tmp" "$cfgfile" \
7910 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7911 test 0 -eq $? || _lt_function_replace_fail=:
7912 else
7913 # Save a `func_append' function call even when '+=' is not available
7914 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
7915 && mv -f "$cfgfile.tmp" "$cfgfile" \
7916 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7917 test 0 -eq $? || _lt_function_replace_fail=:
7918 fi
7919
7920 if test x"$_lt_function_replace_fail" = x":"; then
7921 AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
7922 fi
7923 ])
7924
7925 # _LT_PATH_CONVERSION_FUNCTIONS
7926 # -----------------------------
7927 # Determine which file name conversion functions should be used by
7928 # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
7929 # for certain cross-compile configurations and native mingw.
7930 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
7931 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
7932 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
7933 AC_MSG_CHECKING([how to convert $build file names to $host format])
7934 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
7935 [case $host in
7936 *-*-mingw* )
7937 case $build in
7938 *-*-mingw* ) # actually msys
7939 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
7940 ;;
7941 *-*-cygwin* )
7942 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
7943 ;;
7944 * ) # otherwise, assume *nix
7945 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
7946 ;;
7947 esac
7948 ;;
7949 *-*-cygwin* )
7950 case $build in
7951 *-*-mingw* ) # actually msys
7952 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
7953 ;;
7954 *-*-cygwin* )
7955 lt_cv_to_host_file_cmd=func_convert_file_noop
7956 ;;
7957 * ) # otherwise, assume *nix
7958 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
7959 ;;
7960 esac
7961 ;;
7962 * ) # unhandled hosts (and "normal" native builds)
7963 lt_cv_to_host_file_cmd=func_convert_file_noop
7964 ;;
7965 esac
7966 ])
7967 to_host_file_cmd=$lt_cv_to_host_file_cmd
7968 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
7969 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
7970 [0], [convert $build file names to $host format])dnl
7971
7972 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
7973 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
7974 [#assume ordinary cross tools, or native build.
7975 lt_cv_to_tool_file_cmd=func_convert_file_noop
7976 case $host in
7977 *-*-mingw* )
7978 case $build in
7979 *-*-mingw* ) # actually msys
7980 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
7981 ;;
7982 esac
7983 ;;
7984 esac
7985 ])
7986 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
7987 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
7988 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
7989 [0], [convert $build files to toolchain format])dnl
7990 ])# _LT_PATH_CONVERSION_FUNCTIONS
+0
-384
m4/ltoptions.m4 less more
0 # Helper functions for option handling. -*- Autoconf -*-
1 #
2 # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
3 # Inc.
4 # Written by Gary V. Vaughan, 2004
5 #
6 # This file is free software; the Free Software Foundation gives
7 # unlimited permission to copy and/or distribute it, with or without
8 # modifications, as long as this notice is preserved.
9
10 # serial 7 ltoptions.m4
11
12 # This is to help aclocal find these macros, as it can't see m4_define.
13 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
14
15
16 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
17 # ------------------------------------------
18 m4_define([_LT_MANGLE_OPTION],
19 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
20
21
22 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
23 # ---------------------------------------
24 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
25 # matching handler defined, dispatch to it. Other OPTION-NAMEs are
26 # saved as a flag.
27 m4_define([_LT_SET_OPTION],
28 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
29 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
30 _LT_MANGLE_DEFUN([$1], [$2]),
31 [m4_warning([Unknown $1 option `$2'])])[]dnl
32 ])
33
34
35 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
36 # ------------------------------------------------------------
37 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
38 m4_define([_LT_IF_OPTION],
39 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
40
41
42 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
43 # -------------------------------------------------------
44 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
45 # are set.
46 m4_define([_LT_UNLESS_OPTIONS],
47 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
48 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
49 [m4_define([$0_found])])])[]dnl
50 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
51 ])[]dnl
52 ])
53
54
55 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
56 # ----------------------------------------
57 # OPTION-LIST is a space-separated list of Libtool options associated
58 # with MACRO-NAME. If any OPTION has a matching handler declared with
59 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
60 # the unknown option and exit.
61 m4_defun([_LT_SET_OPTIONS],
62 [# Set options
63 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
64 [_LT_SET_OPTION([$1], _LT_Option)])
65
66 m4_if([$1],[LT_INIT],[
67 dnl
68 dnl Simply set some default values (i.e off) if boolean options were not
69 dnl specified:
70 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
71 ])
72 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
73 ])
74 dnl
75 dnl If no reference was made to various pairs of opposing options, then
76 dnl we run the default mode handler for the pair. For example, if neither
77 dnl `shared' nor `disable-shared' was passed, we enable building of shared
78 dnl archives by default:
79 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
80 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
81 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
82 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
83 [_LT_ENABLE_FAST_INSTALL])
84 ])
85 ])# _LT_SET_OPTIONS
86
87
88 ## --------------------------------- ##
89 ## Macros to handle LT_INIT options. ##
90 ## --------------------------------- ##
91
92 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
93 # -----------------------------------------
94 m4_define([_LT_MANGLE_DEFUN],
95 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
96
97
98 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
99 # -----------------------------------------------
100 m4_define([LT_OPTION_DEFINE],
101 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
102 ])# LT_OPTION_DEFINE
103
104
105 # dlopen
106 # ------
107 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
108 ])
109
110 AU_DEFUN([AC_LIBTOOL_DLOPEN],
111 [_LT_SET_OPTION([LT_INIT], [dlopen])
112 AC_DIAGNOSE([obsolete],
113 [$0: Remove this warning and the call to _LT_SET_OPTION when you
114 put the `dlopen' option into LT_INIT's first parameter.])
115 ])
116
117 dnl aclocal-1.4 backwards compatibility:
118 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
119
120
121 # win32-dll
122 # ---------
123 # Declare package support for building win32 dll's.
124 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
125 [enable_win32_dll=yes
126
127 case $host in
128 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
129 AC_CHECK_TOOL(AS, as, false)
130 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
131 AC_CHECK_TOOL(OBJDUMP, objdump, false)
132 ;;
133 esac
134
135 test -z "$AS" && AS=as
136 _LT_DECL([], [AS], [1], [Assembler program])dnl
137
138 test -z "$DLLTOOL" && DLLTOOL=dlltool
139 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
140
141 test -z "$OBJDUMP" && OBJDUMP=objdump
142 _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
143 ])# win32-dll
144
145 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
146 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
147 _LT_SET_OPTION([LT_INIT], [win32-dll])
148 AC_DIAGNOSE([obsolete],
149 [$0: Remove this warning and the call to _LT_SET_OPTION when you
150 put the `win32-dll' option into LT_INIT's first parameter.])
151 ])
152
153 dnl aclocal-1.4 backwards compatibility:
154 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
155
156
157 # _LT_ENABLE_SHARED([DEFAULT])
158 # ----------------------------
159 # implement the --enable-shared flag, and supports the `shared' and
160 # `disable-shared' LT_INIT options.
161 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
162 m4_define([_LT_ENABLE_SHARED],
163 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
164 AC_ARG_ENABLE([shared],
165 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
166 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
167 [p=${PACKAGE-default}
168 case $enableval in
169 yes) enable_shared=yes ;;
170 no) enable_shared=no ;;
171 *)
172 enable_shared=no
173 # Look at the argument we got. We use all the common list separators.
174 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
175 for pkg in $enableval; do
176 IFS="$lt_save_ifs"
177 if test "X$pkg" = "X$p"; then
178 enable_shared=yes
179 fi
180 done
181 IFS="$lt_save_ifs"
182 ;;
183 esac],
184 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
185
186 _LT_DECL([build_libtool_libs], [enable_shared], [0],
187 [Whether or not to build shared libraries])
188 ])# _LT_ENABLE_SHARED
189
190 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
191 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
192
193 # Old names:
194 AC_DEFUN([AC_ENABLE_SHARED],
195 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
196 ])
197
198 AC_DEFUN([AC_DISABLE_SHARED],
199 [_LT_SET_OPTION([LT_INIT], [disable-shared])
200 ])
201
202 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
203 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
204
205 dnl aclocal-1.4 backwards compatibility:
206 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
207 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
208
209
210
211 # _LT_ENABLE_STATIC([DEFAULT])
212 # ----------------------------
213 # implement the --enable-static flag, and support the `static' and
214 # `disable-static' LT_INIT options.
215 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
216 m4_define([_LT_ENABLE_STATIC],
217 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
218 AC_ARG_ENABLE([static],
219 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
220 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
221 [p=${PACKAGE-default}
222 case $enableval in
223 yes) enable_static=yes ;;
224 no) enable_static=no ;;
225 *)
226 enable_static=no
227 # Look at the argument we got. We use all the common list separators.
228 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
229 for pkg in $enableval; do
230 IFS="$lt_save_ifs"
231 if test "X$pkg" = "X$p"; then
232 enable_static=yes
233 fi
234 done
235 IFS="$lt_save_ifs"
236 ;;
237 esac],
238 [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
239
240 _LT_DECL([build_old_libs], [enable_static], [0],
241 [Whether or not to build static libraries])
242 ])# _LT_ENABLE_STATIC
243
244 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
245 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
246
247 # Old names:
248 AC_DEFUN([AC_ENABLE_STATIC],
249 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
250 ])
251
252 AC_DEFUN([AC_DISABLE_STATIC],
253 [_LT_SET_OPTION([LT_INIT], [disable-static])
254 ])
255
256 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
257 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
258
259 dnl aclocal-1.4 backwards compatibility:
260 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
261 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
262
263
264
265 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
266 # ----------------------------------
267 # implement the --enable-fast-install flag, and support the `fast-install'
268 # and `disable-fast-install' LT_INIT options.
269 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
270 m4_define([_LT_ENABLE_FAST_INSTALL],
271 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
272 AC_ARG_ENABLE([fast-install],
273 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
274 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
275 [p=${PACKAGE-default}
276 case $enableval in
277 yes) enable_fast_install=yes ;;
278 no) enable_fast_install=no ;;
279 *)
280 enable_fast_install=no
281 # Look at the argument we got. We use all the common list separators.
282 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
283 for pkg in $enableval; do
284 IFS="$lt_save_ifs"
285 if test "X$pkg" = "X$p"; then
286 enable_fast_install=yes
287 fi
288 done
289 IFS="$lt_save_ifs"
290 ;;
291 esac],
292 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
293
294 _LT_DECL([fast_install], [enable_fast_install], [0],
295 [Whether or not to optimize for fast installation])dnl
296 ])# _LT_ENABLE_FAST_INSTALL
297
298 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
299 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
300
301 # Old names:
302 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
303 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
304 AC_DIAGNOSE([obsolete],
305 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
306 the `fast-install' option into LT_INIT's first parameter.])
307 ])
308
309 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
310 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
311 AC_DIAGNOSE([obsolete],
312 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
313 the `disable-fast-install' option into LT_INIT's first parameter.])
314 ])
315
316 dnl aclocal-1.4 backwards compatibility:
317 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
318 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
319
320
321 # _LT_WITH_PIC([MODE])
322 # --------------------
323 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
324 # LT_INIT options.
325 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
326 m4_define([_LT_WITH_PIC],
327 [AC_ARG_WITH([pic],
328 [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
329 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
330 [lt_p=${PACKAGE-default}
331 case $withval in
332 yes|no) pic_mode=$withval ;;
333 *)
334 pic_mode=default
335 # Look at the argument we got. We use all the common list separators.
336 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
337 for lt_pkg in $withval; do
338 IFS="$lt_save_ifs"
339 if test "X$lt_pkg" = "X$lt_p"; then
340 pic_mode=yes
341 fi
342 done
343 IFS="$lt_save_ifs"
344 ;;
345 esac],
346 [pic_mode=default])
347
348 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
349
350 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
351 ])# _LT_WITH_PIC
352
353 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
354 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
355
356 # Old name:
357 AU_DEFUN([AC_LIBTOOL_PICMODE],
358 [_LT_SET_OPTION([LT_INIT], [pic-only])
359 AC_DIAGNOSE([obsolete],
360 [$0: Remove this warning and the call to _LT_SET_OPTION when you
361 put the `pic-only' option into LT_INIT's first parameter.])
362 ])
363
364 dnl aclocal-1.4 backwards compatibility:
365 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
366
367 ## ----------------- ##
368 ## LTDL_INIT Options ##
369 ## ----------------- ##
370
371 m4_define([_LTDL_MODE], [])
372 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
373 [m4_define([_LTDL_MODE], [nonrecursive])])
374 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
375 [m4_define([_LTDL_MODE], [recursive])])
376 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
377 [m4_define([_LTDL_MODE], [subproject])])
378
379 m4_define([_LTDL_TYPE], [])
380 LT_OPTION_DEFINE([LTDL_INIT], [installable],
381 [m4_define([_LTDL_TYPE], [installable])])
382 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
383 [m4_define([_LTDL_TYPE], [convenience])])
+0
-123
m4/ltsugar.m4 less more
0 # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
1 #
2 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
3 # Written by Gary V. Vaughan, 2004
4 #
5 # This file is free software; the Free Software Foundation gives
6 # unlimited permission to copy and/or distribute it, with or without
7 # modifications, as long as this notice is preserved.
8
9 # serial 6 ltsugar.m4
10
11 # This is to help aclocal find these macros, as it can't see m4_define.
12 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
13
14
15 # lt_join(SEP, ARG1, [ARG2...])
16 # -----------------------------
17 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
18 # associated separator.
19 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
20 # versions in m4sugar had bugs.
21 m4_define([lt_join],
22 [m4_if([$#], [1], [],
23 [$#], [2], [[$2]],
24 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
25 m4_define([_lt_join],
26 [m4_if([$#$2], [2], [],
27 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
28
29
30 # lt_car(LIST)
31 # lt_cdr(LIST)
32 # ------------
33 # Manipulate m4 lists.
34 # These macros are necessary as long as will still need to support
35 # Autoconf-2.59 which quotes differently.
36 m4_define([lt_car], [[$1]])
37 m4_define([lt_cdr],
38 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
39 [$#], 1, [],
40 [m4_dquote(m4_shift($@))])])
41 m4_define([lt_unquote], $1)
42
43
44 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
45 # ------------------------------------------
46 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
47 # Note that neither SEPARATOR nor STRING are expanded; they are appended
48 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
49 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
50 # than defined and empty).
51 #
52 # This macro is needed until we can rely on Autoconf 2.62, since earlier
53 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
54 m4_define([lt_append],
55 [m4_define([$1],
56 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
57
58
59
60 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
61 # ----------------------------------------------------------
62 # Produce a SEP delimited list of all paired combinations of elements of
63 # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
64 # has the form PREFIXmINFIXSUFFIXn.
65 # Needed until we can rely on m4_combine added in Autoconf 2.62.
66 m4_define([lt_combine],
67 [m4_if(m4_eval([$# > 3]), [1],
68 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
69 [[m4_foreach([_Lt_prefix], [$2],
70 [m4_foreach([_Lt_suffix],
71 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
72 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
73
74
75 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
76 # -----------------------------------------------------------------------
77 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
78 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
79 m4_define([lt_if_append_uniq],
80 [m4_ifdef([$1],
81 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
82 [lt_append([$1], [$2], [$3])$4],
83 [$5])],
84 [lt_append([$1], [$2], [$3])$4])])
85
86
87 # lt_dict_add(DICT, KEY, VALUE)
88 # -----------------------------
89 m4_define([lt_dict_add],
90 [m4_define([$1($2)], [$3])])
91
92
93 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
94 # --------------------------------------------
95 m4_define([lt_dict_add_subkey],
96 [m4_define([$1($2:$3)], [$4])])
97
98
99 # lt_dict_fetch(DICT, KEY, [SUBKEY])
100 # ----------------------------------
101 m4_define([lt_dict_fetch],
102 [m4_ifval([$3],
103 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
104 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
105
106
107 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
108 # -----------------------------------------------------------------
109 m4_define([lt_if_dict_fetch],
110 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
111 [$5],
112 [$6])])
113
114
115 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
116 # --------------------------------------------------------------
117 m4_define([lt_dict_filter],
118 [m4_if([$5], [], [],
119 [lt_join(m4_quote(m4_default([$4], [[, ]])),
120 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
121 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
122 ])
+0
-23
m4/ltversion.m4 less more
0 # ltversion.m4 -- version numbers -*- Autoconf -*-
1 #
2 # Copyright (C) 2004 Free Software Foundation, Inc.
3 # Written by Scott James Remnant, 2004
4 #
5 # This file is free software; the Free Software Foundation gives
6 # unlimited permission to copy and/or distribute it, with or without
7 # modifications, as long as this notice is preserved.
8
9 # @configure_input@
10
11 # serial 3337 ltversion.m4
12 # This file is part of GNU Libtool
13
14 m4_define([LT_PACKAGE_VERSION], [2.4.2])
15 m4_define([LT_PACKAGE_REVISION], [1.3337])
16
17 AC_DEFUN([LTVERSION_VERSION],
18 [macro_version='2.4.2'
19 macro_revision='1.3337'
20 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
21 _LT_DECL(, macro_revision, 0)
22 ])
+0
-98
m4/lt~obsolete.m4 less more
0 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
1 #
2 # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
3 # Written by Scott James Remnant, 2004.
4 #
5 # This file is free software; the Free Software Foundation gives
6 # unlimited permission to copy and/or distribute it, with or without
7 # modifications, as long as this notice is preserved.
8
9 # serial 5 lt~obsolete.m4
10
11 # These exist entirely to fool aclocal when bootstrapping libtool.
12 #
13 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
14 # which have later been changed to m4_define as they aren't part of the
15 # exported API, or moved to Autoconf or Automake where they belong.
16 #
17 # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
18 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
19 # using a macro with the same name in our local m4/libtool.m4 it'll
20 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
21 # and doesn't know about Autoconf macros at all.)
22 #
23 # So we provide this file, which has a silly filename so it's always
24 # included after everything else. This provides aclocal with the
25 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
26 # because those macros already exist, or will be overwritten later.
27 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
28 #
29 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
30 # Yes, that means every name once taken will need to remain here until
31 # we give up compatibility with versions before 1.7, at which point
32 # we need to keep only those names which we still refer to.
33
34 # This is to help aclocal find these macros, as it can't see m4_define.
35 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
36
37 m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
38 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
39 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
40 m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
41 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
42 m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
43 m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
44 m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
45 m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
46 m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
47 m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
48 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
49 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
50 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
51 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
52 m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
53 m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
54 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
55 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
56 m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
57 m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
58 m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
59 m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
60 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
61 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
62 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
63 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
64 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
65 m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
66 m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
67 m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
68 m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
69 m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
70 m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
71 m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
72 m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
73 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
74 m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
75 m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
76 m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
77 m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
78 m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
79 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
80 m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
81 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
82 m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
83 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
84 m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
85 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
86 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
87 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
88 m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
89 m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
90 m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
91 m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
92 m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
93 m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
94 m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
95 m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
96 m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
97 m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
+0
-215
missing less more
0 #! /bin/sh
1 # Common wrapper for a few potentially missing GNU programs.
2
3 scriptversion=2012-06-26.16; # UTC
4
5 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
6 # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
7
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2, or (at your option)
11 # any later version.
12
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
17
18 # You should have received a copy of the GNU General Public License
19 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20
21 # As a special exception to the GNU General Public License, if you
22 # distribute this file as part of a program that contains a
23 # configuration script generated by Autoconf, you may include it under
24 # the same distribution terms that you use for the rest of that program.
25
26 if test $# -eq 0; then
27 echo 1>&2 "Try '$0 --help' for more information"
28 exit 1
29 fi
30
31 case $1 in
32
33 --is-lightweight)
34 # Used by our autoconf macros to check whether the available missing
35 # script is modern enough.
36 exit 0
37 ;;
38
39 --run)
40 # Back-compat with the calling convention used by older automake.
41 shift
42 ;;
43
44 -h|--h|--he|--hel|--help)
45 echo "\
46 $0 [OPTION]... PROGRAM [ARGUMENT]...
47
48 Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
49 to PROGRAM being missing or too old.
50
51 Options:
52 -h, --help display this help and exit
53 -v, --version output version information and exit
54
55 Supported PROGRAM values:
56 aclocal autoconf autoheader autom4te automake makeinfo
57 bison yacc flex lex help2man
58
59 Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
60 'g' are ignored when checking the name.
61
62 Send bug reports to <bug-automake@gnu.org>."
63 exit $?
64 ;;
65
66 -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
67 echo "missing $scriptversion (GNU Automake)"
68 exit $?
69 ;;
70
71 -*)
72 echo 1>&2 "$0: unknown '$1' option"
73 echo 1>&2 "Try '$0 --help' for more information"
74 exit 1
75 ;;
76
77 esac
78
79 # Run the given program, remember its exit status.
80 "$@"; st=$?
81
82 # If it succeeded, we are done.
83 test $st -eq 0 && exit 0
84
85 # Also exit now if we it failed (or wasn't found), and '--version' was
86 # passed; such an option is passed most likely to detect whether the
87 # program is present and works.
88 case $2 in --version|--help) exit $st;; esac
89
90 # Exit code 63 means version mismatch. This often happens when the user
91 # tries to use an ancient version of a tool on a file that requires a
92 # minimum version.
93 if test $st -eq 63; then
94 msg="probably too old"
95 elif test $st -eq 127; then
96 # Program was missing.
97 msg="missing on your system"
98 else
99 # Program was found and executed, but failed. Give up.
100 exit $st
101 fi
102
103 perl_URL=http://www.perl.org/
104 flex_URL=http://flex.sourceforge.net/
105 gnu_software_URL=http://www.gnu.org/software
106
107 program_details ()
108 {
109 case $1 in
110 aclocal|automake)
111 echo "The '$1' program is part of the GNU Automake package:"
112 echo "<$gnu_software_URL/automake>"
113 echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
114 echo "<$gnu_software_URL/autoconf>"
115 echo "<$gnu_software_URL/m4/>"
116 echo "<$perl_URL>"
117 ;;
118 autoconf|autom4te|autoheader)
119 echo "The '$1' program is part of the GNU Autoconf package:"
120 echo "<$gnu_software_URL/autoconf/>"
121 echo "It also requires GNU m4 and Perl in order to run:"
122 echo "<$gnu_software_URL/m4/>"
123 echo "<$perl_URL>"
124 ;;
125 esac
126 }
127
128 give_advice ()
129 {
130 # Normalize program name to check for.
131 normalized_program=`echo "$1" | sed '
132 s/^gnu-//; t
133 s/^gnu//; t
134 s/^g//; t'`
135
136 printf '%s\n' "'$1' is $msg."
137
138 configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
139 case $normalized_program in
140 autoconf*)
141 echo "You should only need it if you modified 'configure.ac',"
142 echo "or m4 files included by it."
143 program_details 'autoconf'
144 ;;
145 autoheader*)
146 echo "You should only need it if you modified 'acconfig.h' or"
147 echo "$configure_deps."
148 program_details 'autoheader'
149 ;;
150 automake*)
151 echo "You should only need it if you modified 'Makefile.am' or"
152 echo "$configure_deps."
153 program_details 'automake'
154 ;;
155 aclocal*)
156 echo "You should only need it if you modified 'acinclude.m4' or"
157 echo "$configure_deps."
158 program_details 'aclocal'
159 ;;
160 autom4te*)
161 echo "You might have modified some maintainer files that require"
162 echo "the 'automa4te' program to be rebuilt."
163 program_details 'autom4te'
164 ;;
165 bison*|yacc*)
166 echo "You should only need it if you modified a '.y' file."
167 echo "You may want to install the GNU Bison package:"
168 echo "<$gnu_software_URL/bison/>"
169 ;;
170 lex*|flex*)
171 echo "You should only need it if you modified a '.l' file."
172 echo "You may want to install the Fast Lexical Analyzer package:"
173 echo "<$flex_URL>"
174 ;;
175 help2man*)
176 echo "You should only need it if you modified a dependency" \
177 "of a man page."
178 echo "You may want to install the GNU Help2man package:"
179 echo "<$gnu_software_URL/help2man/>"
180 ;;
181 makeinfo*)
182 echo "You should only need it if you modified a '.texi' file, or"
183 echo "any other file indirectly affecting the aspect of the manual."
184 echo "You might want to install the Texinfo package:"
185 echo "<$gnu_software_URL/texinfo/>"
186 echo "The spurious makeinfo call might also be the consequence of"
187 echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
188 echo "want to install GNU make:"
189 echo "<$gnu_software_URL/make/>"
190 ;;
191 *)
192 echo "You might have modified some files without having the proper"
193 echo "tools for further handling them. Check the 'README' file, it"
194 echo "often tells you about the needed prerequisites for installing"
195 echo "this package. You may also peek at any GNU archive site, in"
196 echo "case some other package contains this missing '$1' program."
197 ;;
198 esac
199 }
200
201 give_advice "$1" | sed -e '1s/^/WARNING: /' \
202 -e '2,$s/^/ /' >&2
203
204 # Propagate the correct exit status (expected to be 127 for a program
205 # not found, 63 for a program that failed due to version mismatch).
206 exit $st
207
208 # Local variables:
209 # eval: (add-hook 'write-file-hooks 'time-stamp)
210 # time-stamp-start: "scriptversion="
211 # time-stamp-format: "%:y-%02m-%02d.%02H"
212 # time-stamp-time-zone: "UTC"
213 # time-stamp-end: "; # UTC"
214 # End:
+0
-15
numlib/Makefile.am less more
0 include $(top_srcdir)/Makefile.shared
1
2 privatelib_LTLIBRARIES = libargyllnum.la
3 privatelibdir = $(pkglibdir)
4
5 libargyllnum_la_SOURCES = numlib.h numsup.c numsup.h dnsq.c dnsq.h \
6 powell.c powell.h dhsx.c dhsx.h ludecomp.c ludecomp.h svd.c \
7 svd.h zbrent.c zbrent.h rand.c rand.h sobol.c sobol.h aatree.c
8
9 LDADD = ./libargyllnum.la
10
11 check_PROGRAMS = dnsqtest tpowell tdhsx LUtest svdtest zbrenttest \
12 soboltest
13
14 EXTRA_DIST = License.txt Readme.txt
+0
-12
plot/Makefile.am less more
0 include $(top_srcdir)/Makefile.shared
1
2 privatelib_LTLIBRARIES = libplot.la libvrml.la
3 privatelibdir = $(pkglibdir)
4
5 libplot_la_SOURCES = plot.h plot.c
6 libplot_la_LIBADD = $(X_LIBS)
7
8 libvrml_la_SOURCES = vrml.h vrml.c
9 libvrml_la_LIBADD = $(ICC_LIBS) ../numlib/libargyllnum.la
10
11 EXTRA_DIST = License.txt Readme.txt
+0
-27
profile/Makefile.am less more
0 include $(top_srcdir)/Makefile.shared
1
2 privatelib_LTLIBRARIES = libprof.la
3 privatelibdir = $(pkglibdir)
4
5 libprof_la_SOURCES = prof.h profin.c profout.c
6 libprof_la_LIBADD = ../gamut/libgammap.la $(ICC_LIBS) \
7 ../gamut/libgamut.la ../xicc/libxicc.la \
8 ../numlib/libargyllnum.la ../spectro/libinsttypes.la \
9 ../xicc/libxutils.la ../libargyll.la
10
11 LDADD = ./libprof.la ../xicc/libxutils.la ../spectro/libinst.la \
12 ../xicc/libxicc.la ../spectro/libinsttypes.la \
13 ../gamut/libgamut.la ../gamut/libgammap.la ../plot/libvrml.la \
14 ../plot/libplot.la ../rspl/librspl.la \
15 ../numlib/libargyllnum.la $(ICC_LIBS) ../cgats/libcgats.la \
16 ../libargyll.la $(TIFF_LIBS) ../spectro/libconv.la
17
18 bin_PROGRAMS = simpprof kodak2ti3 cb2ti3 txt2ti3 splitti3 \
19 profcheck invprofcheck mppprof mppcheck verify colprof printcal \
20 applycal
21
22 refdir = $(datadir)/color/argyll/ref
23
24 ref_DATA = $(wildcard *.sp)
25
26 EXTRA_DIST = License.txt Readme.txt
+0
-7
ref/Makefile.am less more
0 refdir = $(datadir)/color/argyll/ref
1
2 ref_DATA = $(wildcard *.cal) $(wildcard *.cht) $(wildcard *.cie) \
3 $(wildcard *.icm) $(wildcard *.sp) $(wildcard *.ti1) \
4 $(wildcard *.ti2)
5
6 EXTRA_DIST = $(ref_DATA)
+0
-13
render/Makefile.am less more
0 include $(top_srcdir)/Makefile.shared
1
2 privatelib_LTLIBRARIES = librender.la
3 privatelibdir = $(pkglibdir)
4
5 librender_la_SOURCES = render.h render.c thscreen.h thscreen.c
6 librender_la_LIBADD = $(TIFF_LIBS) ../numlib/libargyllnum.la
7
8 LDADD = ./librender.la ../numlib/libargyllnum.la $(TIFF_LIBS)
9
10 check_PROGRAMS = timage
11
12 EXTRA_DIST = License.txt Readme.txt
+0
-15
rspl/Makefile.am less more
0 include $(top_srcdir)/Makefile.shared
1
2 privatelib_LTLIBRARIES = librspl.la
3 privatelibdir = $(pkglibdir)
4
5 librspl_la_SOURCES = rspl.h rspl_imp.h mlbs.h rspl.c scat.c rev.c \
6 rev.h gam.c spline.c opt.c
7 librspl_la_LIBADD = ../numlib/libargyllnum.la ../plot/libvrml.la
8
9 LDADD = ./librspl.la ../numlib/libargyllnum.la ../plot/libplot.la \
10 ../plot/libvrml.la $(X_LIBS) $(TIFF_LIBS) $(ICC_LIBS)
11
12 check_PROGRAMS = revbench c1 c1df t2d t2ddf t3d t3ddf tnd trnd
13
14 EXTRA_DIST = License.txt Readme.txt
+0
-19
scanin/Makefile.am less more
0 include $(top_srcdir)/Makefile.shared
1
2 privatelib_LTLIBRARIES = libscanrd.la
3 privatelibdir = $(pkglibdir)
4
5 libscanrd_la_SOURCES = scanrd.h scanrd_.h scanrd.c
6 libscanrd_la_LIBADD = ../rspl/librspl.la ../numlib/libargyllnum.la
7
8 LDADD = ./libscanrd.la ../numlib/libargyllnum.la $(ICC_LIBS) \
9 ../cgats/libcgats.la ../xicc/libxicc.la $(TIFF_LIBS) \
10 ../libargyll.la
11
12 bin_PROGRAMS = scanin
13
14 refdir = $(datadir)/color/argyll/ref
15
16 ref_DATA = $(wildcard *.cht) $(wildcard *.cie) $(wildcard *.ti2)
17
18 EXTRA_DIST = $(ref_DATA) License.txt Readme.txt
+0
-53
spectro/Makefile.am less more
0 include $(top_srcdir)/Makefile.shared
1
2 privatelib_LTLIBRARIES = libinsttypes.la libconv.la libinst.la libinstapp.la libdisp.la
3 privatelibdir = $(pkglibdir)
4
5 libinsttypes_la_SOURCES = insttypes.h insttypes.c insttypeinst.h
6 libinsttypes_la_LIBADD = ../libargyll.la
7
8 libinst_la_SOURCES = inst.h inst.c insttypes.c dtp20.c dtp20.h dtp22.c \
9 dtp22.h dtp41.c dtp41.h dtp51.c dtp51.h dtp92.c dtp92.h \
10 i1disp.c i1disp.h i1pro.c i1pro.h i1pro_imp.c i1pro_imp.h \
11 munki.c munki_imp.c ss.c ss.h ss_imp.c ss_imp.h hcfr.c hcfr.h \
12 spyd2.c spyd2.h spyd2setup.h spyd2PLD.h huey.c huey.h \
13 usbio.c hidio.c pollem.c pollem.h icoms.h conv.h usbio.h \
14 hidio.h i1d3.h i1d3.c colorhug.c colorhug.h icoms.c \
15 oemarch.h oemarch.c iusb.h vinflate.c inflate.c
16 libinst_la_LIBADD = $(ICC_LIBS) ../numlib/libargyllnum.la \
17 ../libargyll.la ../rspl/librspl.la libconv.la
18
19 libinst_la_LDFLAGS = $(shell libusb-config --libs)
20
21 libdisp_la_SOURCES = dispsup.c dispwin.c dispwin.h dispsup.h webwin.c webwin.h mongoose.c mongoose.h
22 libdisp_la_LIBADD = $(X_LIBS) ../ucmm/libucmm.la $(ICC_LIBS) -ldl \
23 ../numlib/libargyllnum.la libconv.la libinst.la libinstapp.la \
24 ../libargyll.la
25
26 libconv_la_SOURCES = conv.c pollem.c xdg_bds.h xdg_bds.c aglob.c ../xicc/ccss.c
27 libconv_la_LIBADD = ../libargyll.la ../numlib/libargyllnum.la \
28 ../cgats/libcgats.la
29
30 libinstapp_la_SOURCES = instappsup.c instappsup.h
31 libinstapp_la_LIBADD = libinst.la ../libargyll.la ../numlib/libargyllnum.la \
32 libconv.la
33
34 LDADD = ./libinsttypes.la ./libinstapp.la ./libdisp.la ./libinst.la \
35 ./libconv.la ../ucmm/libucmm.la ../jcnf/libjcnf.la $(YAJL_LIBS) \
36 ../xicc/libxicc.la $(ICC_LIBS) ../cgats/libcgats.la \
37 ../rspl/librspl.la ../gamut/libgamut.la ../target/libtarget.la \
38 ../plot/libplot.la ../numlib/libargyllnum.la $(X_LIBS) \
39 ../libargyll.la
40
41 bin_PROGRAMS = dispwin synthcal dispread dispcal fakeread synthread \
42 chartread spotread illumread ccxxmake spec2cie average oeminst
43
44 dispwin_CFLAGS = $(AM_CFLAGS) -DSTANDALONE_TEST
45
46 synthcal_DEPENDENCIES = ../gamut/libgammap.la ../target/libtarget.la
47
48 refdir = $(datadir)/color/argyll/ref
49
50 ref_DATA = ccxx.ti1 SOtele.sp $(wildcard *.cal)
51
52 EXTRA_DIST = Readme.txt
+0
-28
target/Makefile.am less more
0 include $(top_srcdir)/Makefile.shared
1
2 CPPFLAGS+=-D_FORTIFY_SOURCE=2
3
4 privatelib_LTLIBRARIES = libtarget.la
5 privatelibdir = $(pkglibdir)
6
7 libtarget_la_SOURCES = alphix.c alphix.h randix.c randix.h
8
9 LDADD = ./libtarget.la ../rspl/librspl.la ../plot/libvrml.la \
10 $(ICC_LIBS) ../render/librender.la ../cgats/libcgats.la \
11 ../xicc/libxicc.la ../gamut/libgamut.la \
12 ../spectro/libinsttypes.la ../spectro/libconv.la \
13 ../numlib/libargyllnum.la ../libargyll.la $(TIFF_LIBS)
14
15 bin_PROGRAMS = targen printtarg
16
17 targen_DEPENDENCIES = ../spectro/libinsttypes.la
18 targen_SOURCES = targen.c targen.h ofps.c ofps.h ifarp.c ifarp.h \
19 simplat.c simplat.h simdlat.c simdlat.h prand.c prand.h
20
21 printtarg_SOURCES = printtarg.c
22
23 refdir = $(datadir)/color/argyll/ref
24
25 ref_DATA = $(wildcard *.ti2)
26
27 EXTRA_DIST = License.txt Readme.txt
+0
-11
tweak/Makefile.am less more
0 include $(top_srcdir)/Makefile.shared
1
2 LDADD = ../spectro/libinsttypes.la ../gamut/libgamut.la \
3 ../gamut/libgammap.la ../plot/libvrml.la ../xicc/libxutils.la \
4 ../xicc/libxicc.la ../rspl/librspl.la ../gamut/libgamut.la \
5 ../gamut/libgammap.la $(ICC_LIBS) ../cgats/libcgats.la \
6 ../numlib/libargyllnum.la $(TIFF_LIBS)
7
8 bin_PROGRAMS = refine
9
10 EXTRA_DIST = License.txt Readme.txt
+0
-9
ucmm/Makefile.am less more
0 include $(top_srcdir)/Makefile.shared
1
2 privatelib_LTLIBRARIES = libucmm.la
3 privatelibdir = $(pkglibdir)
4
5 libucmm_la_SOURCES = ucmm.h ucmm.c
6 libucmm_la_LIBADD = $(ICC_LIBS) ../jcnf/libjcnf.la ../spectro/libconv.la
7
8 LDADD = libucmm.la
7676 ATTRS{idVendor}=="273f", ATTRS{idProduct}=="1001", ENV{COLOR_MEASUREMENT_DEVICE}="1"
7777
7878
79 # Let users access these devices
80 ENV{COLOR_MEASUREMENT_DEVICE}=="*?", TAG+="uaccess"
79 # Let udev-acl manage these devices, if it's available
80 TEST=="/var/run/ConsoleKit/database", ENV{COLOR_MEASUREMENT_DEVICE}=="*?", ENV{ACL_MANAGE}="1"
8181
8282 # Otherwise, restrict access to members of the plugdev group,
8383 # which the user may have to add to the system.
84 ENV{COLOR_MEASUREMENT_DEVICE}=="*?", MODE="660", GROUP="plugdev"
84 ENV{COLOR_MEASUREMENT_DEVICE}=="*?", ENV{ACL_MANAGE}!="*?", MODE="660", GROUP="plugdev"
8585
8686 # Set ID_VENDOR and ID_MODEL acording to VID and PID
87 IMPORT{builtin}="hwdb --subsystem=usb"
87 IMPORT{program}="usb-db %p"
8888
8989 LABEL="argyll_rules_end"
+0
-28
xicc/Makefile.am less more
0 include $(top_srcdir)/Makefile.shared
1
2 privatelib_LTLIBRARIES = libxicc.la libxutils.la
3 privatelibdir = $(pkglibdir)
4
5 libxicc_la_SOURCES = xicc.c xlutfix.c xspect.c xcolorants.c \
6 xutils.c iccjpeg.c xdevlin.c xcam.c cam97s3.c cam02.c mpp.c \
7 ccmx.c ccss.c xfit.c xdgb.c moncurve.c xcal.c
8 libxicc_la_LIBADD = $(ICC_LIBS) ../gamut/libgamut.la \
9 ../numlib/libargyllnum.la ../spectro/libinsttypes.la \
10 ../cgats/libcgats.la ../rspl/librspl.la ../libargyll.la -ljpeg $(TIFF_LIBS)
11
12 libxutils_la_SOURCES = xutils.h xutils.c iccjpeg.c iccjpeg.h
13 libxutils_la_LIBADD = $(TIFF_LIBS) $(ICC_LIBS) -ljpeg
14
15 LDADD = ./libxicc.la ./libxutils.la ../rspl/librspl.la \
16 ../numlib/libargyllnum.la ../gamut/libgamut.la \
17 ../gamut/libgammap.la ../spectro/libinsttypes.la $(ICC_LIBS) \
18 ../cgats/libcgats.la ../plot/libvrml.la ../plot/libplot.la \
19 $(TIFF_LIBS) $(X_LIBS) ../libargyll.la -ljpeg
20
21 bin_PROGRAMS = fakeCMY iccgamut mpplu revfix tiffgamut xicclu \
22 extracticc extractttag specplot ccttest
23
24 fakeCMY_DEPENDENCIES = ../spectro/libinsttypes.la \
25 ../gamut/libgammap.la ../target/libtarget.la
26
27 EXTRA_DIST = xmono.c xmatrix.c xlut.c