Codebase list elektroid / f78a879
New upstream version 2.2 Dennis Braun 1 year, 5 months ago
118 changed file(s) with 69737 addition(s) and 10484 deletion(s). Raw diff Collapse all Expand all
+0
-64
.gitignore less more
0 /autom4te.cache/
1 /config/
2 Makefile
3 Makefile.in
4 aclocal.m4
5 app.info
6 compile
7 config.h
8 config.h.in
9 config.log
10 config.status
11 configure
12 configure.scan
13 coverage_report
14 depcomp
15 install-sh
16 libtool
17 m4
18 missing
19 stamp-h1
20 test-driver
21 *~
22 *.html
23 *.log
24 *.o
25 *.la
26 *.so*
27 *.a
28 .deps
29 *.tar*
30 *.zip
31 *.lo
32 *.gcno
33 *.gcda
34 src/elektroid
35 src/elektroid-cli
36 src/*~
37 test/*.log
38 test/*.trs
39 config.guess
40 config.sub
41 ltmain.sh
42 ABOUT-NLS
43 config.rpath
44 po/Makefile.in.in
45 po/Makevars.template
46 po/POTFILES
47 po/Rules-quot
48 po/boldquot.sed
49 po/en@boldquot.header
50 po/en@quot.header
51 po/*.gmo
52 po/insert-header.sin
53 po/quot.sed
54 po/remove-potcdate.sin
55 po/stamp-po
56 po/remove-potcdate.sed
57 debian/.debhelper/
58 debian/autoreconf.after
59 debian/autoreconf.before
60 debian/debhelper-build-stamp
61 debian/elektroid.substvars
62 debian/elektroid/
63 debian/files
0 1 Notes on the Free Translation Project
1 ***************************************
2
3 Free software is going international! The Free Translation Project is
4 a way to get maintainers of free software, translators, and users all
5 together, so that free software will gradually become able to speak many
6 languages. A few packages already provide translations for their
7 messages.
8
9 If you found this `ABOUT-NLS' file inside a distribution, you may
10 assume that the distributed package does use GNU `gettext' internally,
11 itself available at your nearest GNU archive site. But you do _not_
12 need to install GNU `gettext' prior to configuring, installing or using
13 this package with messages translated.
14
15 Installers will find here some useful hints. These notes also
16 explain how users should proceed for getting the programs to use the
17 available translations. They tell how people wanting to contribute and
18 work on translations can contact the appropriate team.
19
20 1.1 INSTALL Matters
21 ===================
22
23 Some packages are "localizable" when properly installed; the programs
24 they contain can be made to speak your own native language. Most such
25 packages use GNU `gettext'. Other packages have their own ways to
26 internationalization, predating GNU `gettext'.
27
28 By default, this package will be installed to allow translation of
29 messages. It will automatically detect whether the system already
30 provides the GNU `gettext' functions. Installers may use special
31 options at configuration time for changing the default behaviour. The
32 command:
33
34 ./configure --disable-nls
35
36 will _totally_ disable translation of messages.
37
38 When you already have GNU `gettext' installed on your system and run
39 configure without an option for your new package, `configure' will
40 probably detect the previously built and installed `libintl' library
41 and will decide to use it. If not, you may have to to use the
42 `--with-libintl-prefix' option to tell `configure' where to look for it.
43
44 Internationalized packages usually have many `po/LL.po' files, where
45 LL gives an ISO 639 two-letter code identifying the language. Unless
46 translations have been forbidden at `configure' time by using the
47 `--disable-nls' switch, all available translations are installed
48 together with the package. However, the environment variable `LINGUAS'
49 may be set, prior to configuration, to limit the installed set.
50 `LINGUAS' should then contain a space separated list of two-letter
51 codes, stating which languages are allowed.
52
53 1.2 Using This Package
54 ======================
55
56 As a user, if your language has been installed for this package, you
57 only have to set the `LANG' environment variable to the appropriate
58 `LL_CC' combination. If you happen to have the `LC_ALL' or some other
59 `LC_xxx' environment variables set, you should unset them before
60 setting `LANG', otherwise the setting of `LANG' will not have the
61 desired effect. Here `LL' is an ISO 639 two-letter language code, and
62 `CC' is an ISO 3166 two-letter country code. For example, let's
63 suppose that you speak German and live in Germany. At the shell
64 prompt, merely execute `setenv LANG de_DE' (in `csh'),
65 `export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
66 This can be done from your `.login' or `.profile' file, once and for
67 all.
68
69 You might think that the country code specification is redundant.
70 But in fact, some languages have dialects in different countries. For
71 example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The
72 country code serves to distinguish the dialects.
73
74 The locale naming convention of `LL_CC', with `LL' denoting the
75 language and `CC' denoting the country, is the one use on systems based
76 on GNU libc. On other systems, some variations of this scheme are
77 used, such as `LL' or `LL_CC.ENCODING'. You can get the list of
78 locales supported by your system for your language by running the
79 command `locale -a | grep '^LL''.
80
81 Not all programs have translations for all languages. By default, an
82 English message is shown in place of a nonexistent translation. If you
83 understand other languages, you can set up a priority list of languages.
84 This is done through a different environment variable, called
85 `LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG'
86 for the purpose of message handling, but you still need to have `LANG'
87 set to the primary language; this is required by other parts of the
88 system libraries. For example, some Swedish users who would rather
89 read translations in German than English for when Swedish is not
90 available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
91
92 Special advice for Norwegian users: The language code for Norwegian
93 bokma*l changed from `no' to `nb' recently (in 2003). During the
94 transition period, while some message catalogs for this language are
95 installed under `nb' and some older ones under `no', it's recommended
96 for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and
97 older translations are used.
98
99 In the `LANGUAGE' environment variable, but not in the `LANG'
100 environment variable, `LL_CC' combinations can be abbreviated as `LL'
101 to denote the language's main dialect. For example, `de' is equivalent
102 to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
103 (Portuguese as spoken in Portugal) in this context.
104
105 1.3 Translating Teams
106 =====================
107
108 For the Free Translation Project to be a success, we need interested
109 people who like their own language and write it well, and who are also
110 able to synergize with other translators speaking the same language.
111 Each translation team has its own mailing list. The up-to-date list of
112 teams can be found at the Free Translation Project's homepage,
113 `http://translationproject.org/', in the "Teams" area.
114
115 If you'd like to volunteer to _work_ at translating messages, you
116 should become a member of the translating team for your own language.
117 The subscribing address is _not_ the same as the list itself, it has
118 `-request' appended. For example, speakers of Swedish can send a
119 message to `sv-request@li.org', having this message body:
120
121 subscribe
122
123 Keep in mind that team members are expected to participate
124 _actively_ in translations, or at solving translational difficulties,
125 rather than merely lurking around. If your team does not exist yet and
126 you want to start one, or if you are unsure about what to do or how to
127 get started, please write to `coordinator@translationproject.org' to
128 reach the coordinator for all translator teams.
129
130 The English team is special. It works at improving and uniformizing
131 the terminology in use. Proven linguistic skills are praised more than
132 programming skills, here.
133
134 1.4 Available Packages
135 ======================
136
137 Languages are not equally supported in all packages. The following
138 matrix shows the current state of internationalization, as of June
139 2010. The matrix shows, in regard of each package, for which languages
140 PO files have been submitted to translation coordination, with a
141 translation percentage of at least 50%.
142
143 Ready PO files af am an ar as ast az be be@latin bg bn_IN bs ca
144 +--------------------------------------------------+
145 a2ps | [] [] |
146 aegis | |
147 ant-phone | |
148 anubis | |
149 aspell | [] [] |
150 bash | |
151 bfd | |
152 bibshelf | [] |
153 binutils | |
154 bison | |
155 bison-runtime | [] |
156 bluez-pin | [] [] |
157 bombono-dvd | |
158 buzztard | |
159 cflow | |
160 clisp | |
161 coreutils | [] [] |
162 cpio | |
163 cppi | |
164 cpplib | [] |
165 cryptsetup | |
166 dfarc | |
167 dialog | [] [] |
168 dico | |
169 diffutils | [] |
170 dink | |
171 doodle | |
172 e2fsprogs | [] |
173 enscript | [] |
174 exif | |
175 fetchmail | [] |
176 findutils | [] |
177 flex | [] |
178 freedink | |
179 gas | |
180 gawk | [] [] |
181 gcal | [] |
182 gcc | |
183 gettext-examples | [] [] [] [] |
184 gettext-runtime | [] [] |
185 gettext-tools | [] [] |
186 gip | [] |
187 gjay | |
188 gliv | [] |
189 glunarclock | [] [] |
190 gnubiff | |
191 gnucash | [] |
192 gnuedu | |
193 gnulib | |
194 gnunet | |
195 gnunet-gtk | |
196 gnutls | |
197 gold | |
198 gpe-aerial | |
199 gpe-beam | |
200 gpe-bluetooth | |
201 gpe-calendar | |
202 gpe-clock | [] |
203 gpe-conf | |
204 gpe-contacts | |
205 gpe-edit | |
206 gpe-filemanager | |
207 gpe-go | |
208 gpe-login | |
209 gpe-ownerinfo | [] |
210 gpe-package | |
211 gpe-sketchbook | |
212 gpe-su | [] |
213 gpe-taskmanager | [] |
214 gpe-timesheet | [] |
215 gpe-today | [] |
216 gpe-todo | |
217 gphoto2 | |
218 gprof | [] |
219 gpsdrive | |
220 gramadoir | |
221 grep | |
222 grub | [] [] |
223 gsasl | |
224 gss | |
225 gst-plugins-bad | [] |
226 gst-plugins-base | [] |
227 gst-plugins-good | [] |
228 gst-plugins-ugly | [] |
229 gstreamer | [] [] [] |
230 gtick | |
231 gtkam | [] |
232 gtkorphan | [] |
233 gtkspell | [] [] [] |
234 gutenprint | |
235 hello | [] |
236 help2man | |
237 hylafax | |
238 idutils | |
239 indent | [] [] |
240 iso_15924 | |
241 iso_3166 | [] [] [] [] [] [] [] |
242 iso_3166_2 | |
243 iso_4217 | |
244 iso_639 | [] [] [] [] |
245 iso_639_3 | |
246 jwhois | |
247 kbd | |
248 keytouch | [] |
249 keytouch-editor | |
250 keytouch-keyboa... | [] |
251 klavaro | [] |
252 latrine | |
253 ld | [] |
254 leafpad | [] [] |
255 libc | [] [] |
256 libexif | () |
257 libextractor | |
258 libgnutls | |
259 libgpewidget | |
260 libgpg-error | |
261 libgphoto2 | |
262 libgphoto2_port | |
263 libgsasl | |
264 libiconv | [] |
265 libidn | |
266 lifelines | |
267 liferea | [] [] |
268 lilypond | |
269 linkdr | [] |
270 lordsawar | |
271 lprng | |
272 lynx | [] |
273 m4 | |
274 mailfromd | |
275 mailutils | |
276 make | |
277 man-db | |
278 man-db-manpages | |
279 minicom | |
280 mkisofs | |
281 myserver | |
282 nano | [] [] |
283 opcodes | |
284 parted | |
285 pies | |
286 popt | |
287 psmisc | |
288 pspp | [] |
289 pwdutils | |
290 radius | [] |
291 recode | [] [] |
292 rosegarden | |
293 rpm | |
294 rush | |
295 sarg | |
296 screem | |
297 scrollkeeper | [] [] [] |
298 sed | [] [] |
299 sharutils | [] [] |
300 shishi | |
301 skencil | |
302 solfege | |
303 solfege-manual | |
304 soundtracker | |
305 sp | |
306 sysstat | |
307 tar | [] |
308 texinfo | |
309 tin | |
310 unicode-han-tra... | |
311 unicode-transla... | |
312 util-linux-ng | [] |
313 vice | |
314 vmm | |
315 vorbis-tools | |
316 wastesedge | |
317 wdiff | |
318 wget | [] [] |
319 wyslij-po | |
320 xchat | [] [] [] [] |
321 xdg-user-dirs | [] [] [] [] [] [] [] [] [] |
322 xkeyboard-config | [] [] |
323 +--------------------------------------------------+
324 af am an ar as ast az be be@latin bg bn_IN bs ca
325 6 0 1 2 3 19 1 10 3 28 3 1 38
326
327 crh cs da de el en en_GB en_ZA eo es et eu fa
328 +-------------------------------------------------+
329 a2ps | [] [] [] [] [] [] [] |
330 aegis | [] [] [] |
331 ant-phone | [] () |
332 anubis | [] [] |
333 aspell | [] [] [] [] [] |
334 bash | [] [] [] |
335 bfd | [] |
336 bibshelf | [] [] [] |
337 binutils | [] |
338 bison | [] [] |
339 bison-runtime | [] [] [] [] |
340 bluez-pin | [] [] [] [] [] [] |
341 bombono-dvd | [] |
342 buzztard | [] [] [] |
343 cflow | [] [] |
344 clisp | [] [] [] [] |
345 coreutils | [] [] [] [] |
346 cpio | |
347 cppi | |
348 cpplib | [] [] [] |
349 cryptsetup | [] |
350 dfarc | [] [] [] |
351 dialog | [] [] [] [] [] |
352 dico | |
353 diffutils | [] [] [] [] [] [] |
354 dink | [] [] [] |
355 doodle | [] |
356 e2fsprogs | [] [] [] |
357 enscript | [] [] [] |
358 exif | () [] [] |
359 fetchmail | [] [] () [] [] [] |
360 findutils | [] [] [] |
361 flex | [] [] |
362 freedink | [] [] [] |
363 gas | [] |
364 gawk | [] [] [] |
365 gcal | [] |
366 gcc | [] [] |
367 gettext-examples | [] [] [] [] |
368 gettext-runtime | [] [] [] [] |
369 gettext-tools | [] [] [] |
370 gip | [] [] [] [] |
371 gjay | [] |
372 gliv | [] [] [] |
373 glunarclock | [] [] |
374 gnubiff | () |
375 gnucash | [] () () () () |
376 gnuedu | [] [] |
377 gnulib | [] [] |
378 gnunet | |
379 gnunet-gtk | [] |
380 gnutls | [] [] |
381 gold | [] |
382 gpe-aerial | [] [] [] [] |
383 gpe-beam | [] [] [] [] |
384 gpe-bluetooth | [] [] |
385 gpe-calendar | [] |
386 gpe-clock | [] [] [] [] |
387 gpe-conf | [] [] [] |
388 gpe-contacts | [] [] [] |
389 gpe-edit | [] [] |
390 gpe-filemanager | [] [] [] |
391 gpe-go | [] [] [] [] |
392 gpe-login | [] [] |
393 gpe-ownerinfo | [] [] [] [] |
394 gpe-package | [] [] [] |
395 gpe-sketchbook | [] [] [] [] |
396 gpe-su | [] [] [] [] |
397 gpe-taskmanager | [] [] [] [] |
398 gpe-timesheet | [] [] [] [] |
399 gpe-today | [] [] [] [] |
400 gpe-todo | [] [] [] |
401 gphoto2 | [] [] () [] [] [] |
402 gprof | [] [] [] |
403 gpsdrive | [] [] [] |
404 gramadoir | [] [] [] |
405 grep | [] |
406 grub | [] [] |
407 gsasl | [] |
408 gss | |
409 gst-plugins-bad | [] [] [] [] [] |
410 gst-plugins-base | [] [] [] [] [] |
411 gst-plugins-good | [] [] [] [] [] [] |
412 gst-plugins-ugly | [] [] [] [] [] [] |
413 gstreamer | [] [] [] [] [] |
414 gtick | [] () [] |
415 gtkam | [] [] () [] [] |
416 gtkorphan | [] [] [] [] |
417 gtkspell | [] [] [] [] [] [] [] |
418 gutenprint | [] [] [] |
419 hello | [] [] [] [] |
420 help2man | [] |
421 hylafax | [] [] |
422 idutils | [] [] |
423 indent | [] [] [] [] [] [] [] |
424 iso_15924 | [] () [] [] |
425 iso_3166 | [] [] [] [] () [] [] [] () |
426 iso_3166_2 | () |
427 iso_4217 | [] [] [] () [] [] |
428 iso_639 | [] [] [] [] () [] [] |
429 iso_639_3 | [] |
430 jwhois | [] |
431 kbd | [] [] [] [] [] |
432 keytouch | [] [] |
433 keytouch-editor | [] [] |
434 keytouch-keyboa... | [] |
435 klavaro | [] [] [] [] |
436 latrine | [] () |
437 ld | [] [] |
438 leafpad | [] [] [] [] [] [] |
439 libc | [] [] [] [] |
440 libexif | [] [] () |
441 libextractor | |
442 libgnutls | [] |
443 libgpewidget | [] [] |
444 libgpg-error | [] [] |
445 libgphoto2 | [] () |
446 libgphoto2_port | [] () [] |
447 libgsasl | |
448 libiconv | [] [] [] [] [] |
449 libidn | [] [] [] |
450 lifelines | [] () |
451 liferea | [] [] [] [] [] |
452 lilypond | [] [] [] |
453 linkdr | [] [] [] |
454 lordsawar | [] |
455 lprng | |
456 lynx | [] [] [] [] |
457 m4 | [] [] [] [] |
458 mailfromd | |
459 mailutils | [] |
460 make | [] [] [] |
461 man-db | |
462 man-db-manpages | |
463 minicom | [] [] [] [] |
464 mkisofs | |
465 myserver | |
466 nano | [] [] [] |
467 opcodes | [] [] |
468 parted | [] [] |
469 pies | |
470 popt | [] [] [] [] [] |
471 psmisc | [] [] [] |
472 pspp | [] |
473 pwdutils | [] |
474 radius | [] |
475 recode | [] [] [] [] [] [] |
476 rosegarden | () () () |
477 rpm | [] [] [] |
478 rush | |
479 sarg | |
480 screem | |
481 scrollkeeper | [] [] [] [] [] |
482 sed | [] [] [] [] [] [] |
483 sharutils | [] [] [] [] |
484 shishi | |
485 skencil | [] () [] |
486 solfege | [] [] [] |
487 solfege-manual | [] [] |
488 soundtracker | [] [] [] |
489 sp | [] |
490 sysstat | [] [] [] |
491 tar | [] [] [] [] |
492 texinfo | [] [] [] |
493 tin | [] [] |
494 unicode-han-tra... | |
495 unicode-transla... | |
496 util-linux-ng | [] [] [] [] |
497 vice | () () |
498 vmm | [] |
499 vorbis-tools | [] [] |
500 wastesedge | [] |
501 wdiff | [] [] |
502 wget | [] [] [] |
503 wyslij-po | |
504 xchat | [] [] [] [] [] |
505 xdg-user-dirs | [] [] [] [] [] [] [] [] [] |
506 xkeyboard-config | [] [] [] [] [] [] |
507 +-------------------------------------------------+
508 crh cs da de el en en_GB en_ZA eo es et eu fa
509 5 64 105 117 18 1 8 0 28 89 18 19 0
510
511 fi fr ga gl gu he hi hr hu hy id is it ja ka kn
512 +----------------------------------------------------+
513 a2ps | [] [] [] [] |
514 aegis | [] [] |
515 ant-phone | [] [] |
516 anubis | [] [] [] [] |
517 aspell | [] [] [] [] |
518 bash | [] [] [] [] |
519 bfd | [] [] [] |
520 bibshelf | [] [] [] [] [] |
521 binutils | [] [] [] |
522 bison | [] [] [] [] |
523 bison-runtime | [] [] [] [] [] [] |
524 bluez-pin | [] [] [] [] [] [] [] [] |
525 bombono-dvd | [] |
526 buzztard | [] |
527 cflow | [] [] [] |
528 clisp | [] |
529 coreutils | [] [] [] [] [] |
530 cpio | [] [] [] [] |
531 cppi | [] [] |
532 cpplib | [] [] [] |
533 cryptsetup | [] [] [] |
534 dfarc | [] [] [] |
535 dialog | [] [] [] [] [] [] [] |
536 dico | |
537 diffutils | [] [] [] [] [] [] [] [] [] |
538 dink | [] |
539 doodle | [] [] |
540 e2fsprogs | [] [] |
541 enscript | [] [] [] [] |
542 exif | [] [] [] [] [] [] |
543 fetchmail | [] [] [] [] |
544 findutils | [] [] [] [] [] [] |
545 flex | [] [] [] |
546 freedink | [] [] [] |
547 gas | [] [] |
548 gawk | [] [] [] [] () [] |
549 gcal | [] |
550 gcc | [] |
551 gettext-examples | [] [] [] [] [] [] [] |
552 gettext-runtime | [] [] [] [] [] [] |
553 gettext-tools | [] [] [] [] |
554 gip | [] [] [] [] [] [] |
555 gjay | [] |
556 gliv | [] () |
557 glunarclock | [] [] [] [] |
558 gnubiff | () [] () |
559 gnucash | () () () () () [] |
560 gnuedu | [] [] |
561 gnulib | [] [] [] [] [] [] |
562 gnunet | |
563 gnunet-gtk | [] |
564 gnutls | [] [] |
565 gold | [] [] |
566 gpe-aerial | [] [] [] |
567 gpe-beam | [] [] [] [] |
568 gpe-bluetooth | [] [] [] [] |
569 gpe-calendar | [] [] |
570 gpe-clock | [] [] [] [] [] |
571 gpe-conf | [] [] [] [] |
572 gpe-contacts | [] [] [] [] |
573 gpe-edit | [] [] [] |
574 gpe-filemanager | [] [] [] [] |
575 gpe-go | [] [] [] [] [] |
576 gpe-login | [] [] [] |
577 gpe-ownerinfo | [] [] [] [] [] |
578 gpe-package | [] [] [] |
579 gpe-sketchbook | [] [] [] [] |
580 gpe-su | [] [] [] [] [] [] |
581 gpe-taskmanager | [] [] [] [] [] |
582 gpe-timesheet | [] [] [] [] [] |
583 gpe-today | [] [] [] [] [] [] [] |
584 gpe-todo | [] [] [] |
585 gphoto2 | [] [] [] [] [] [] |
586 gprof | [] [] [] [] |
587 gpsdrive | [] [] [] |
588 gramadoir | [] [] [] |
589 grep | [] [] |
590 grub | [] [] [] [] |
591 gsasl | [] [] [] [] [] |
592 gss | [] [] [] [] [] |
593 gst-plugins-bad | [] [] [] [] [] [] |
594 gst-plugins-base | [] [] [] [] [] [] |
595 gst-plugins-good | [] [] [] [] [] [] |
596 gst-plugins-ugly | [] [] [] [] [] [] |
597 gstreamer | [] [] [] [] [] |
598 gtick | [] [] [] [] [] |
599 gtkam | [] [] [] [] [] |
600 gtkorphan | [] [] [] |
601 gtkspell | [] [] [] [] [] [] [] [] [] |
602 gutenprint | [] [] [] [] |
603 hello | [] [] [] |
604 help2man | [] [] |
605 hylafax | [] |
606 idutils | [] [] [] [] [] [] |
607 indent | [] [] [] [] [] [] [] [] |
608 iso_15924 | [] () [] [] |
609 iso_3166 | [] () [] [] [] [] [] [] [] [] [] [] |
610 iso_3166_2 | () [] [] [] |
611 iso_4217 | [] () [] [] [] [] |
612 iso_639 | [] () [] [] [] [] [] [] [] |
613 iso_639_3 | () [] [] |
614 jwhois | [] [] [] [] [] |
615 kbd | [] [] |
616 keytouch | [] [] [] [] [] [] |
617 keytouch-editor | [] [] [] [] [] |
618 keytouch-keyboa... | [] [] [] [] [] |
619 klavaro | [] [] |
620 latrine | [] [] [] |
621 ld | [] [] [] [] |
622 leafpad | [] [] [] [] [] [] [] () |
623 libc | [] [] [] [] [] |
624 libexif | [] |
625 libextractor | |
626 libgnutls | [] [] |
627 libgpewidget | [] [] [] [] |
628 libgpg-error | [] [] |
629 libgphoto2 | [] [] [] |
630 libgphoto2_port | [] [] [] |
631 libgsasl | [] [] [] [] [] |
632 libiconv | [] [] [] [] [] [] |
633 libidn | [] [] [] [] |
634 lifelines | () |
635 liferea | [] [] [] [] |
636 lilypond | [] [] |
637 linkdr | [] [] [] [] [] |
638 lordsawar | |
639 lprng | [] |
640 lynx | [] [] [] [] [] |
641 m4 | [] [] [] [] [] [] |
642 mailfromd | |
643 mailutils | [] [] |
644 make | [] [] [] [] [] [] [] [] [] |
645 man-db | [] [] |
646 man-db-manpages | [] |
647 minicom | [] [] [] [] [] |
648 mkisofs | [] [] [] [] |
649 myserver | |
650 nano | [] [] [] [] [] [] |
651 opcodes | [] [] [] [] |
652 parted | [] [] [] [] |
653 pies | |
654 popt | [] [] [] [] [] [] [] [] [] |
655 psmisc | [] [] [] |
656 pspp | |
657 pwdutils | [] [] |
658 radius | [] [] |
659 recode | [] [] [] [] [] [] [] [] |
660 rosegarden | () () () () () |
661 rpm | [] [] |
662 rush | |
663 sarg | [] |
664 screem | [] [] |
665 scrollkeeper | [] [] [] [] |
666 sed | [] [] [] [] [] [] [] [] |
667 sharutils | [] [] [] [] [] [] [] |
668 shishi | [] |
669 skencil | [] |
670 solfege | [] [] [] [] |
671 solfege-manual | [] [] |
672 soundtracker | [] [] |
673 sp | [] () |
674 sysstat | [] [] [] [] [] |
675 tar | [] [] [] [] [] [] [] |
676 texinfo | [] [] [] [] |
677 tin | [] |
678 unicode-han-tra... | |
679 unicode-transla... | [] [] |
680 util-linux-ng | [] [] [] [] [] [] |
681 vice | () () () |
682 vmm | [] |
683 vorbis-tools | [] |
684 wastesedge | () () |
685 wdiff | [] |
686 wget | [] [] [] [] [] [] [] [] |
687 wyslij-po | [] [] [] |
688 xchat | [] [] [] [] [] [] [] [] [] |
689 xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] [] [] |
690 xkeyboard-config | [] [] [] [] [] |
691 +----------------------------------------------------+
692 fi fr ga gl gu he hi hr hu hy id is it ja ka kn
693 105 121 53 20 4 8 3 5 53 2 120 5 84 67 0 4
694
695 ko ku ky lg lt lv mk ml mn mr ms mt nb nds ne
696 +-----------------------------------------------+
697 a2ps | [] |
698 aegis | |
699 ant-phone | |
700 anubis | [] [] |
701 aspell | [] |
702 bash | |
703 bfd | |
704 bibshelf | [] [] |
705 binutils | |
706 bison | [] |
707 bison-runtime | [] [] [] [] [] |
708 bluez-pin | [] [] [] [] [] |
709 bombono-dvd | |
710 buzztard | |
711 cflow | |
712 clisp | |
713 coreutils | [] |
714 cpio | |
715 cppi | |
716 cpplib | |
717 cryptsetup | |
718 dfarc | [] |
719 dialog | [] [] [] [] [] |
720 dico | |
721 diffutils | [] [] |
722 dink | |
723 doodle | |
724 e2fsprogs | |
725 enscript | |
726 exif | [] |
727 fetchmail | |
728 findutils | |
729 flex | |
730 freedink | [] |
731 gas | |
732 gawk | |
733 gcal | |
734 gcc | |
735 gettext-examples | [] [] [] [] |
736 gettext-runtime | [] |
737 gettext-tools | [] |
738 gip | [] [] |
739 gjay | |
740 gliv | |
741 glunarclock | [] |
742 gnubiff | |
743 gnucash | () () () () |
744 gnuedu | |
745 gnulib | |
746 gnunet | |
747 gnunet-gtk | |
748 gnutls | [] |
749 gold | |
750 gpe-aerial | [] |
751 gpe-beam | [] |
752 gpe-bluetooth | [] [] |
753 gpe-calendar | [] |
754 gpe-clock | [] [] [] [] [] |
755 gpe-conf | [] [] |
756 gpe-contacts | [] [] |
757 gpe-edit | [] |
758 gpe-filemanager | [] [] |
759 gpe-go | [] [] [] |
760 gpe-login | [] |
761 gpe-ownerinfo | [] [] |
762 gpe-package | [] [] |
763 gpe-sketchbook | [] [] |
764 gpe-su | [] [] [] [] [] [] |
765 gpe-taskmanager | [] [] [] [] [] [] |
766 gpe-timesheet | [] [] |
767 gpe-today | [] [] [] [] |
768 gpe-todo | [] [] |
769 gphoto2 | |
770 gprof | [] |
771 gpsdrive | |
772 gramadoir | |
773 grep | |
774 grub | |
775 gsasl | |
776 gss | |
777 gst-plugins-bad | [] [] [] [] |
778 gst-plugins-base | [] [] |
779 gst-plugins-good | [] [] |
780 gst-plugins-ugly | [] [] [] [] [] |
781 gstreamer | |
782 gtick | |
783 gtkam | [] |
784 gtkorphan | [] [] |
785 gtkspell | [] [] [] [] [] [] [] |
786 gutenprint | |
787 hello | [] [] [] |
788 help2man | |
789 hylafax | |
790 idutils | |
791 indent | |
792 iso_15924 | [] [] |
793 iso_3166 | [] [] () [] [] [] [] [] |
794 iso_3166_2 | |
795 iso_4217 | [] [] |
796 iso_639 | [] [] |
797 iso_639_3 | [] |
798 jwhois | [] |
799 kbd | |
800 keytouch | [] |
801 keytouch-editor | [] |
802 keytouch-keyboa... | [] |
803 klavaro | [] |
804 latrine | [] |
805 ld | |
806 leafpad | [] [] [] |
807 libc | [] |
808 libexif | |
809 libextractor | |
810 libgnutls | [] |
811 libgpewidget | [] [] |
812 libgpg-error | |
813 libgphoto2 | |
814 libgphoto2_port | |
815 libgsasl | |
816 libiconv | |
817 libidn | |
818 lifelines | |
819 liferea | |
820 lilypond | |
821 linkdr | |
822 lordsawar | |
823 lprng | |
824 lynx | |
825 m4 | |
826 mailfromd | |
827 mailutils | |
828 make | [] |
829 man-db | |
830 man-db-manpages | |
831 minicom | [] |
832 mkisofs | |
833 myserver | |
834 nano | [] [] |
835 opcodes | |
836 parted | |
837 pies | |
838 popt | [] [] [] |
839 psmisc | |
840 pspp | |
841 pwdutils | |
842 radius | |
843 recode | |
844 rosegarden | |
845 rpm | |
846 rush | |
847 sarg | |
848 screem | |
849 scrollkeeper | [] [] |
850 sed | |
851 sharutils | |
852 shishi | |
853 skencil | |
854 solfege | [] |
855 solfege-manual | |
856 soundtracker | |
857 sp | |
858 sysstat | [] |
859 tar | [] |
860 texinfo | [] |
861 tin | |
862 unicode-han-tra... | |
863 unicode-transla... | |
864 util-linux-ng | |
865 vice | |
866 vmm | |
867 vorbis-tools | |
868 wastesedge | |
869 wdiff | |
870 wget | [] |
871 wyslij-po | |
872 xchat | [] [] [] |
873 xdg-user-dirs | [] [] [] [] [] [] [] [] |
874 xkeyboard-config | [] [] [] |
875 +-----------------------------------------------+
876 ko ku ky lg lt lv mk ml mn mr ms mt nb nds ne
877 20 5 10 1 13 48 4 2 2 4 24 10 20 3 1
878
879 nl nn or pa pl ps pt pt_BR ro ru rw sk sl sq sr
880 +---------------------------------------------------+
881 a2ps | [] [] [] [] [] [] [] [] |
882 aegis | [] [] [] |
883 ant-phone | [] [] |
884 anubis | [] [] [] |
885 aspell | [] [] [] [] [] |
886 bash | [] [] |
887 bfd | [] |
888 bibshelf | [] [] |
889 binutils | [] [] |
890 bison | [] [] [] |
891 bison-runtime | [] [] [] [] [] [] [] |
892 bluez-pin | [] [] [] [] [] [] [] [] |
893 bombono-dvd | [] () |
894 buzztard | [] [] |
895 cflow | [] |
896 clisp | [] [] |
897 coreutils | [] [] [] [] [] [] |
898 cpio | [] [] [] |
899 cppi | [] |
900 cpplib | [] |
901 cryptsetup | [] |
902 dfarc | [] |
903 dialog | [] [] [] [] |
904 dico | [] |
905 diffutils | [] [] [] [] [] [] |
906 dink | () |
907 doodle | [] [] |
908 e2fsprogs | [] [] |
909 enscript | [] [] [] [] [] |
910 exif | [] [] [] () [] |
911 fetchmail | [] [] [] [] |
912 findutils | [] [] [] [] [] |
913 flex | [] [] [] [] [] |
914 freedink | [] [] |
915 gas | |
916 gawk | [] [] [] [] |
917 gcal | |
918 gcc | [] |
919 gettext-examples | [] [] [] [] [] [] [] [] |
920 gettext-runtime | [] [] [] [] [] [] [] [] [] |
921 gettext-tools | [] [] [] [] [] [] |
922 gip | [] [] [] [] [] |
923 gjay | |
924 gliv | [] [] [] [] [] [] |
925 glunarclock | [] [] [] [] [] |
926 gnubiff | [] () |
927 gnucash | [] () () () |
928 gnuedu | [] |
929 gnulib | [] [] [] [] |
930 gnunet | |
931 gnunet-gtk | |
932 gnutls | [] [] |
933 gold | |
934 gpe-aerial | [] [] [] [] [] [] [] |
935 gpe-beam | [] [] [] [] [] [] [] |
936 gpe-bluetooth | [] [] |
937 gpe-calendar | [] [] [] [] |
938 gpe-clock | [] [] [] [] [] [] [] [] |
939 gpe-conf | [] [] [] [] [] [] [] |
940 gpe-contacts | [] [] [] [] [] |
941 gpe-edit | [] [] [] |
942 gpe-filemanager | [] [] [] |
943 gpe-go | [] [] [] [] [] [] [] [] |
944 gpe-login | [] [] |
945 gpe-ownerinfo | [] [] [] [] [] [] [] [] |
946 gpe-package | [] [] |
947 gpe-sketchbook | [] [] [] [] [] [] [] |
948 gpe-su | [] [] [] [] [] [] [] [] |
949 gpe-taskmanager | [] [] [] [] [] [] [] [] |
950 gpe-timesheet | [] [] [] [] [] [] [] [] |
951 gpe-today | [] [] [] [] [] [] [] [] |
952 gpe-todo | [] [] [] [] [] |
953 gphoto2 | [] [] [] [] [] [] [] [] |
954 gprof | [] [] [] |
955 gpsdrive | [] [] |
956 gramadoir | [] [] |
957 grep | [] [] [] [] |
958 grub | [] [] [] |
959 gsasl | [] [] [] [] |
960 gss | [] [] [] |
961 gst-plugins-bad | [] [] [] [] [] [] |
962 gst-plugins-base | [] [] [] [] [] |
963 gst-plugins-good | [] [] [] [] [] |
964 gst-plugins-ugly | [] [] [] [] [] [] |
965 gstreamer | [] [] [] [] [] |
966 gtick | [] [] [] |
967 gtkam | [] [] [] [] [] [] |
968 gtkorphan | [] |
969 gtkspell | [] [] [] [] [] [] [] [] [] [] |
970 gutenprint | [] [] |
971 hello | [] [] [] [] |
972 help2man | [] [] |
973 hylafax | [] |
974 idutils | [] [] [] [] [] |
975 indent | [] [] [] [] [] [] [] |
976 iso_15924 | [] [] [] [] |
977 iso_3166 | [] [] [] [] [] () [] [] [] [] [] [] [] [] |
978 iso_3166_2 | [] [] [] |
979 iso_4217 | [] [] [] [] [] [] [] [] |
980 iso_639 | [] [] [] [] [] [] [] [] [] |
981 iso_639_3 | [] [] |
982 jwhois | [] [] [] [] |
983 kbd | [] [] [] |
984 keytouch | [] [] [] |
985 keytouch-editor | [] [] [] |
986 keytouch-keyboa... | [] [] [] |
987 klavaro | [] [] |
988 latrine | [] [] |
989 ld | |
990 leafpad | [] [] [] [] [] [] [] [] [] |
991 libc | [] [] [] [] |
992 libexif | [] [] () [] |
993 libextractor | |
994 libgnutls | [] [] |
995 libgpewidget | [] [] [] |
996 libgpg-error | [] [] |
997 libgphoto2 | [] [] |
998 libgphoto2_port | [] [] [] [] [] |
999 libgsasl | [] [] [] [] [] |
1000 libiconv | [] [] [] [] [] |
1001 libidn | [] [] |
1002 lifelines | [] [] |
1003 liferea | [] [] [] [] [] () () [] |
1004 lilypond | [] |
1005 linkdr | [] [] [] |
1006 lordsawar | |
1007 lprng | [] |
1008 lynx | [] [] [] |
1009 m4 | [] [] [] [] [] |
1010 mailfromd | [] |
1011 mailutils | [] |
1012 make | [] [] [] [] |
1013 man-db | [] [] [] |
1014 man-db-manpages | [] [] [] |
1015 minicom | [] [] [] [] |
1016 mkisofs | [] [] [] |
1017 myserver | |
1018 nano | [] [] [] [] |
1019 opcodes | [] [] |
1020 parted | [] [] [] [] |
1021 pies | [] |
1022 popt | [] [] [] [] |
1023 psmisc | [] [] [] |
1024 pspp | [] [] |
1025 pwdutils | [] |
1026 radius | [] [] [] |
1027 recode | [] [] [] [] [] [] [] [] |
1028 rosegarden | () () |
1029 rpm | [] [] [] |
1030 rush | [] [] |
1031 sarg | |
1032 screem | |
1033 scrollkeeper | [] [] [] [] [] [] [] [] |
1034 sed | [] [] [] [] [] [] [] [] [] |
1035 sharutils | [] [] [] [] |
1036 shishi | [] |
1037 skencil | [] [] |
1038 solfege | [] [] [] [] |
1039 solfege-manual | [] [] [] |
1040 soundtracker | [] |
1041 sp | |
1042 sysstat | [] [] [] [] |
1043 tar | [] [] [] [] |
1044 texinfo | [] [] [] [] |
1045 tin | [] |
1046 unicode-han-tra... | |
1047 unicode-transla... | |
1048 util-linux-ng | [] [] [] [] [] |
1049 vice | [] |
1050 vmm | [] |
1051 vorbis-tools | [] [] |
1052 wastesedge | [] |
1053 wdiff | [] [] |
1054 wget | [] [] [] [] [] [] [] |
1055 wyslij-po | [] [] [] |
1056 xchat | [] [] [] [] [] [] [] [] [] |
1057 xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] [] [] [] |
1058 xkeyboard-config | [] [] [] |
1059 +---------------------------------------------------+
1060 nl nn or pa pl ps pt pt_BR ro ru rw sk sl sq sr
1061 135 10 4 7 105 1 29 62 47 91 3 54 46 9 37
1062
1063 sv sw ta te tg th tr uk vi wa zh_CN zh_HK zh_TW
1064 +---------------------------------------------------+
1065 a2ps | [] [] [] [] [] | 27
1066 aegis | [] | 9
1067 ant-phone | [] [] [] [] | 9
1068 anubis | [] [] [] [] | 15
1069 aspell | [] [] [] | 20
1070 bash | [] [] [] | 12
1071 bfd | [] | 6
1072 bibshelf | [] [] [] | 16
1073 binutils | [] [] | 8
1074 bison | [] [] | 12
1075 bison-runtime | [] [] [] [] [] [] | 29
1076 bluez-pin | [] [] [] [] [] [] [] [] | 37
1077 bombono-dvd | [] | 4
1078 buzztard | [] | 7
1079 cflow | [] [] [] | 9
1080 clisp | | 10
1081 coreutils | [] [] [] [] | 22
1082 cpio | [] [] [] [] [] [] | 13
1083 cppi | [] [] | 5
1084 cpplib | [] [] [] [] [] [] | 14
1085 cryptsetup | [] [] | 7
1086 dfarc | [] | 9
1087 dialog | [] [] [] [] [] [] [] | 30
1088 dico | [] | 2
1089 diffutils | [] [] [] [] [] [] | 30
1090 dink | | 4
1091 doodle | [] [] | 7
1092 e2fsprogs | [] [] [] | 11
1093 enscript | [] [] [] [] | 17
1094 exif | [] [] [] | 16
1095 fetchmail | [] [] [] | 17
1096 findutils | [] [] [] [] [] | 20
1097 flex | [] [] [] [] | 15
1098 freedink | [] | 10
1099 gas | [] | 4
1100 gawk | [] [] [] [] | 18
1101 gcal | [] [] | 5
1102 gcc | [] [] [] | 7
1103 gettext-examples | [] [] [] [] [] [] [] | 34
1104 gettext-runtime | [] [] [] [] [] [] [] | 29
1105 gettext-tools | [] [] [] [] [] [] | 22
1106 gip | [] [] [] [] | 22
1107 gjay | [] | 3
1108 gliv | [] [] [] | 14
1109 glunarclock | [] [] [] [] [] | 19
1110 gnubiff | [] [] | 4
1111 gnucash | () [] () [] () | 10
1112 gnuedu | [] [] | 7
1113 gnulib | [] [] [] [] | 16
1114 gnunet | [] | 1
1115 gnunet-gtk | [] [] [] | 5
1116 gnutls | [] [] [] | 10
1117 gold | [] | 4
1118 gpe-aerial | [] [] [] | 18
1119 gpe-beam | [] [] [] | 19
1120 gpe-bluetooth | [] [] [] | 13
1121 gpe-calendar | [] [] [] [] | 12
1122 gpe-clock | [] [] [] [] [] | 28
1123 gpe-conf | [] [] [] [] | 20
1124 gpe-contacts | [] [] [] | 17
1125 gpe-edit | [] [] [] | 12
1126 gpe-filemanager | [] [] [] [] | 16
1127 gpe-go | [] [] [] [] [] | 25
1128 gpe-login | [] [] [] | 11
1129 gpe-ownerinfo | [] [] [] [] [] | 25
1130 gpe-package | [] [] [] | 13
1131 gpe-sketchbook | [] [] [] | 20
1132 gpe-su | [] [] [] [] [] | 30
1133 gpe-taskmanager | [] [] [] [] [] | 29
1134 gpe-timesheet | [] [] [] [] [] | 25
1135 gpe-today | [] [] [] [] [] [] | 30
1136 gpe-todo | [] [] [] [] | 17
1137 gphoto2 | [] [] [] [] [] | 24
1138 gprof | [] [] [] | 15
1139 gpsdrive | [] [] [] | 11
1140 gramadoir | [] [] [] | 11
1141 grep | [] [] [] | 10
1142 grub | [] [] [] | 14
1143 gsasl | [] [] [] [] | 14
1144 gss | [] [] [] | 11
1145 gst-plugins-bad | [] [] [] [] | 26
1146 gst-plugins-base | [] [] [] [] [] | 24
1147 gst-plugins-good | [] [] [] [] | 24
1148 gst-plugins-ugly | [] [] [] [] [] | 29
1149 gstreamer | [] [] [] [] | 22
1150 gtick | [] [] [] | 13
1151 gtkam | [] [] [] | 20
1152 gtkorphan | [] [] [] | 14
1153 gtkspell | [] [] [] [] [] [] [] [] [] | 45
1154 gutenprint | [] | 10
1155 hello | [] [] [] [] [] [] | 21
1156 help2man | [] [] | 7
1157 hylafax | [] | 5
1158 idutils | [] [] [] [] | 17
1159 indent | [] [] [] [] [] [] | 30
1160 iso_15924 | () [] () [] [] | 16
1161 iso_3166 | [] [] () [] [] () [] [] [] () | 53
1162 iso_3166_2 | () [] () [] | 9
1163 iso_4217 | [] () [] [] () [] [] | 26
1164 iso_639 | [] [] [] () [] () [] [] [] [] | 38
1165 iso_639_3 | [] () | 8
1166 jwhois | [] [] [] [] [] | 16
1167 kbd | [] [] [] [] [] | 15
1168 keytouch | [] [] [] | 16
1169 keytouch-editor | [] [] [] | 14
1170 keytouch-keyboa... | [] [] [] | 14
1171 klavaro | [] | 11
1172 latrine | [] [] [] | 10
1173 ld | [] [] [] [] | 11
1174 leafpad | [] [] [] [] [] [] | 33
1175 libc | [] [] [] [] [] | 21
1176 libexif | [] () | 7
1177 libextractor | [] | 1
1178 libgnutls | [] [] [] | 9
1179 libgpewidget | [] [] [] | 14
1180 libgpg-error | [] [] [] | 9
1181 libgphoto2 | [] [] | 8
1182 libgphoto2_port | [] [] [] [] | 14
1183 libgsasl | [] [] [] | 13
1184 libiconv | [] [] [] [] | 21
1185 libidn | () [] [] | 11
1186 lifelines | [] | 4
1187 liferea | [] [] [] | 21
1188 lilypond | [] | 7
1189 linkdr | [] [] [] [] [] | 17
1190 lordsawar | | 1
1191 lprng | [] | 3
1192 lynx | [] [] [] [] | 17
1193 m4 | [] [] [] [] | 19
1194 mailfromd | [] [] | 3
1195 mailutils | [] | 5
1196 make | [] [] [] [] | 21
1197 man-db | [] [] [] | 8
1198 man-db-manpages | | 4
1199 minicom | [] [] | 16
1200 mkisofs | [] [] | 9
1201 myserver | | 0
1202 nano | [] [] [] [] | 21
1203 opcodes | [] [] [] | 11
1204 parted | [] [] [] [] [] | 15
1205 pies | [] [] | 3
1206 popt | [] [] [] [] [] [] | 27
1207 psmisc | [] [] | 11
1208 pspp | | 4
1209 pwdutils | [] [] | 6
1210 radius | [] [] | 9
1211 recode | [] [] [] [] | 28
1212 rosegarden | () | 0
1213 rpm | [] [] [] | 11
1214 rush | [] [] | 4
1215 sarg | | 1
1216 screem | [] | 3
1217 scrollkeeper | [] [] [] [] [] | 27
1218 sed | [] [] [] [] [] | 30
1219 sharutils | [] [] [] [] [] | 22
1220 shishi | [] | 3
1221 skencil | [] [] | 7
1222 solfege | [] [] [] [] | 16
1223 solfege-manual | [] | 8
1224 soundtracker | [] [] [] | 9
1225 sp | [] | 3
1226 sysstat | [] [] | 15
1227 tar | [] [] [] [] [] [] | 23
1228 texinfo | [] [] [] [] [] | 17
1229 tin | | 4
1230 unicode-han-tra... | | 0
1231 unicode-transla... | | 2
1232 util-linux-ng | [] [] [] [] | 20
1233 vice | () () | 1
1234 vmm | [] | 4
1235 vorbis-tools | [] | 6
1236 wastesedge | | 2
1237 wdiff | [] [] | 7
1238 wget | [] [] [] [] [] | 26
1239 wyslij-po | [] [] | 8
1240 xchat | [] [] [] [] [] [] | 36
1241 xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] | 63
1242 xkeyboard-config | [] [] [] | 22
1243 +---------------------------------------------------+
1244 85 teams sv sw ta te tg th tr uk vi wa zh_CN zh_HK zh_TW
1245 178 domains 119 1 3 3 0 10 65 51 155 17 98 7 41 2618
1246
1247 Some counters in the preceding matrix are higher than the number of
1248 visible blocks let us expect. This is because a few extra PO files are
1249 used for implementing regional variants of languages, or language
1250 dialects.
1251
1252 For a PO file in the matrix above to be effective, the package to
1253 which it applies should also have been internationalized and
1254 distributed as such by its maintainer. There might be an observable
1255 lag between the mere existence a PO file and its wide availability in a
1256 distribution.
1257
1258 If June 2010 seems to be old, you may fetch a more recent copy of
1259 this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date
1260 matrix with full percentage details can be found at
1261 `http://translationproject.org/extra/matrix.html'.
1262
1263 1.5 Using `gettext' in new packages
1264 ===================================
1265
1266 If you are writing a freely available program and want to
1267 internationalize it you are welcome to use GNU `gettext' in your
1268 package. Of course you have to respect the GNU Library General Public
1269 License which covers the use of the GNU `gettext' library. This means
1270 in particular that even non-free programs can use `libintl' as a shared
1271 library, whereas only free software can use `libintl' as a static
1272 library or use modified versions of `libintl'.
1273
1274 Once the sources are changed appropriately and the setup can handle
1275 the use of `gettext' the only thing missing are the translations. The
1276 Free Translation Project is also available for packages which are not
1277 developed inside the GNU project. Therefore the information given above
1278 applies also for every other Free Software Project. Contact
1279 `coordinator@translationproject.org' to make the `.pot' files available
1280 to the translation teams.
1281
0 # Makefile.in generated by automake 1.16.3 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994-2020 Free Software Foundation, Inc.
4
5 # This Makefile.in is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 @SET_MAKE@
15 VPATH = @srcdir@
16 am__is_gnu_make = { \
17 if test -z '$(MAKELEVEL)'; then \
18 false; \
19 elif test -n '$(MAKE_HOST)'; then \
20 true; \
21 elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
22 true; \
23 else \
24 false; \
25 fi; \
26 }
27 am__make_running_with_option = \
28 case $${target_option-} in \
29 ?) ;; \
30 *) echo "am__make_running_with_option: internal error: invalid" \
31 "target option '$${target_option-}' specified" >&2; \
32 exit 1;; \
33 esac; \
34 has_opt=no; \
35 sane_makeflags=$$MAKEFLAGS; \
36 if $(am__is_gnu_make); then \
37 sane_makeflags=$$MFLAGS; \
38 else \
39 case $$MAKEFLAGS in \
40 *\\[\ \ ]*) \
41 bs=\\; \
42 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
43 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
44 esac; \
45 fi; \
46 skip_next=no; \
47 strip_trailopt () \
48 { \
49 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
50 }; \
51 for flg in $$sane_makeflags; do \
52 test $$skip_next = yes && { skip_next=no; continue; }; \
53 case $$flg in \
54 *=*|--*) continue;; \
55 -*I) strip_trailopt 'I'; skip_next=yes;; \
56 -*I?*) strip_trailopt 'I';; \
57 -*O) strip_trailopt 'O'; skip_next=yes;; \
58 -*O?*) strip_trailopt 'O';; \
59 -*l) strip_trailopt 'l'; skip_next=yes;; \
60 -*l?*) strip_trailopt 'l';; \
61 -[dEDm]) skip_next=yes;; \
62 -[JT]) skip_next=yes;; \
63 esac; \
64 case $$flg in \
65 *$$target_option*) has_opt=yes; break;; \
66 esac; \
67 done; \
68 test $$has_opt = yes
69 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
70 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
71 pkgdatadir = $(datadir)/@PACKAGE@
72 pkgincludedir = $(includedir)/@PACKAGE@
73 pkglibdir = $(libdir)/@PACKAGE@
74 pkglibexecdir = $(libexecdir)/@PACKAGE@
75 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
76 install_sh_DATA = $(install_sh) -c -m 644
77 install_sh_PROGRAM = $(install_sh) -c
78 install_sh_SCRIPT = $(install_sh) -c
79 INSTALL_HEADER = $(INSTALL_DATA)
80 transform = $(program_transform_name)
81 NORMAL_INSTALL = :
82 PRE_INSTALL = :
83 POST_INSTALL = :
84 NORMAL_UNINSTALL = :
85 PRE_UNINSTALL = :
86 POST_UNINSTALL = :
87 build_triplet = @build@
88 host_triplet = @host@
89 subdir = .
90 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
91 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
92 $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \
93 $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
94 $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
95 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
96 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
97 $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
98 $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac
99 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
100 $(ACLOCAL_M4)
101 DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
102 $(am__configure_deps) $(am__DIST_COMMON)
103 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
104 configure.lineno config.status.lineno
105 mkinstalldirs = $(install_sh) -d
106 CONFIG_HEADER = config.h
107 CONFIG_CLEAN_FILES =
108 CONFIG_CLEAN_VPATH_FILES =
109 AM_V_P = $(am__v_P_@AM_V@)
110 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
111 am__v_P_0 = false
112 am__v_P_1 = :
113 AM_V_GEN = $(am__v_GEN_@AM_V@)
114 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
115 am__v_GEN_0 = @echo " GEN " $@;
116 am__v_GEN_1 =
117 AM_V_at = $(am__v_at_@AM_V@)
118 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
119 am__v_at_0 = @
120 am__v_at_1 =
121 SOURCES =
122 DIST_SOURCES =
123 RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
124 ctags-recursive dvi-recursive html-recursive info-recursive \
125 install-data-recursive install-dvi-recursive \
126 install-exec-recursive install-html-recursive \
127 install-info-recursive install-pdf-recursive \
128 install-ps-recursive install-recursive installcheck-recursive \
129 installdirs-recursive pdf-recursive ps-recursive \
130 tags-recursive uninstall-recursive
131 am__can_run_installinfo = \
132 case $$AM_UPDATE_INFO_DIR in \
133 n|no|NO) false;; \
134 *) (install-info --version) >/dev/null 2>&1;; \
135 esac
136 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
137 distclean-recursive maintainer-clean-recursive
138 am__recursive_targets = \
139 $(RECURSIVE_TARGETS) \
140 $(RECURSIVE_CLEAN_TARGETS) \
141 $(am__extra_recursive_targets)
142 AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
143 cscope distdir distdir-am dist dist-all distcheck
144 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \
145 config.h.in
146 # Read a list of newline-separated strings from the standard input,
147 # and print each of them once, without duplicates. Input order is
148 # *not* preserved.
149 am__uniquify_input = $(AWK) '\
150 BEGIN { nonempty = 0; } \
151 { items[$$0] = 1; nonempty = 1; } \
152 END { if (nonempty) { for (i in items) print i; }; } \
153 '
154 # Make sure the list of sources is unique. This is necessary because,
155 # e.g., the same source file might be shared among _SOURCES variables
156 # for different programs/libraries.
157 am__define_uniq_tagged_files = \
158 list='$(am__tagged_files)'; \
159 unique=`for i in $$list; do \
160 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
161 done | $(am__uniquify_input)`
162 ETAGS = etags
163 CTAGS = ctags
164 CSCOPE = cscope
165 DIST_SUBDIRS = src res test po man
166 am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
167 ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS README THANKS \
168 compile config.guess config.rpath config.sub depcomp \
169 install-sh ltmain.sh missing
170 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
171 distdir = $(PACKAGE)-$(VERSION)
172 top_distdir = $(distdir)
173 am__remove_distdir = \
174 if test -d "$(distdir)"; then \
175 find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
176 && rm -rf "$(distdir)" \
177 || { sleep 5 && rm -rf "$(distdir)"; }; \
178 else :; fi
179 am__post_remove_distdir = $(am__remove_distdir)
180 am__relativize = \
181 dir0=`pwd`; \
182 sed_first='s,^\([^/]*\)/.*$$,\1,'; \
183 sed_rest='s,^[^/]*/*,,'; \
184 sed_last='s,^.*/\([^/]*\)$$,\1,'; \
185 sed_butlast='s,/*[^/]*$$,,'; \
186 while test -n "$$dir1"; do \
187 first=`echo "$$dir1" | sed -e "$$sed_first"`; \
188 if test "$$first" != "."; then \
189 if test "$$first" = ".."; then \
190 dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
191 dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
192 else \
193 first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
194 if test "$$first2" = "$$first"; then \
195 dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
196 else \
197 dir2="../$$dir2"; \
198 fi; \
199 dir0="$$dir0"/"$$first"; \
200 fi; \
201 fi; \
202 dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
203 done; \
204 reldir="$$dir2"
205 DIST_ARCHIVES = $(distdir).tar.gz
206 GZIP_ENV = --best
207 DIST_TARGETS = dist-gzip
208 # Exists only to be overridden by the user if desired.
209 AM_DISTCHECK_DVI_TARGET = dvi
210 distuninstallcheck_listfiles = find . -type f -print
211 am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
212 | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
213 distcleancheck_listfiles = find . -type f -print
214 ACLOCAL = @ACLOCAL@
215 ALSA_CFLAGS = @ALSA_CFLAGS@
216 ALSA_LIBS = @ALSA_LIBS@
217 AMTAR = @AMTAR@
218 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
219 AR = @AR@
220 AUTOCONF = @AUTOCONF@
221 AUTOHEADER = @AUTOHEADER@
222 AUTOMAKE = @AUTOMAKE@
223 AWK = @AWK@
224 CC = @CC@
225 CCDEPMODE = @CCDEPMODE@
226 CFLAGS = @CFLAGS@
227 CPP = @CPP@
228 CPPFLAGS = @CPPFLAGS@
229 CYGPATH_W = @CYGPATH_W@
230 DEFS = @DEFS@
231 DEPDIR = @DEPDIR@
232 DLLTOOL = @DLLTOOL@
233 DSYMUTIL = @DSYMUTIL@
234 DUMPBIN = @DUMPBIN@
235 ECHO_C = @ECHO_C@
236 ECHO_N = @ECHO_N@
237 ECHO_T = @ECHO_T@
238 EGREP = @EGREP@
239 EXEEXT = @EXEEXT@
240 FGREP = @FGREP@
241 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
242 GMSGFMT = @GMSGFMT@
243 GMSGFMT_015 = @GMSGFMT_015@
244 GREP = @GREP@
245 GTK_CFLAGS = @GTK_CFLAGS@
246 GTK_LIBS = @GTK_LIBS@
247 INSTALL = @INSTALL@
248 INSTALL_DATA = @INSTALL_DATA@
249 INSTALL_PROGRAM = @INSTALL_PROGRAM@
250 INSTALL_SCRIPT = @INSTALL_SCRIPT@
251 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
252 INTLLIBS = @INTLLIBS@
253 INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
254 LD = @LD@
255 LDFLAGS = @LDFLAGS@
256 LIBICONV = @LIBICONV@
257 LIBINTL = @LIBINTL@
258 LIBOBJS = @LIBOBJS@
259 LIBS = @LIBS@
260 LIBTOOL = @LIBTOOL@
261 LIPO = @LIPO@
262 LN_S = @LN_S@
263 LTLIBICONV = @LTLIBICONV@
264 LTLIBINTL = @LTLIBINTL@
265 LTLIBOBJS = @LTLIBOBJS@
266 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
267 MAKEINFO = @MAKEINFO@
268 MANIFEST_TOOL = @MANIFEST_TOOL@
269 MKDIR_P = @MKDIR_P@
270 MSGFMT = @MSGFMT@
271 MSGFMT_015 = @MSGFMT_015@
272 MSGMERGE = @MSGMERGE@
273 NM = @NM@
274 NMEDIT = @NMEDIT@
275 OBJDUMP = @OBJDUMP@
276 OBJEXT = @OBJEXT@
277 OTOOL = @OTOOL@
278 OTOOL64 = @OTOOL64@
279 PACKAGE = @PACKAGE@
280 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
281 PACKAGE_NAME = @PACKAGE_NAME@
282 PACKAGE_STRING = @PACKAGE_STRING@
283 PACKAGE_TARNAME = @PACKAGE_TARNAME@
284 PACKAGE_URL = @PACKAGE_URL@
285 PACKAGE_VERSION = @PACKAGE_VERSION@
286 PATH_SEPARATOR = @PATH_SEPARATOR@
287 PKG_CONFIG = @PKG_CONFIG@
288 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
289 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
290 POSUB = @POSUB@
291 PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@
292 PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@
293 RANLIB = @RANLIB@
294 SAMPLERATE_CFLAGS = @SAMPLERATE_CFLAGS@
295 SAMPLERATE_LIBS = @SAMPLERATE_LIBS@
296 SED = @SED@
297 SET_MAKE = @SET_MAKE@
298 SHELL = @SHELL@
299 SNDFILE_CFLAGS = @SNDFILE_CFLAGS@
300 SNDFILE_LIBS = @SNDFILE_LIBS@
301 STRIP = @STRIP@
302 USE_NLS = @USE_NLS@
303 VERSION = @VERSION@
304 XGETTEXT = @XGETTEXT@
305 XGETTEXT_015 = @XGETTEXT_015@
306 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
307 abs_builddir = @abs_builddir@
308 abs_srcdir = @abs_srcdir@
309 abs_top_builddir = @abs_top_builddir@
310 abs_top_srcdir = @abs_top_srcdir@
311 ac_ct_AR = @ac_ct_AR@
312 ac_ct_CC = @ac_ct_CC@
313 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
314 am__include = @am__include@
315 am__leading_dot = @am__leading_dot@
316 am__quote = @am__quote@
317 am__tar = @am__tar@
318 am__untar = @am__untar@
319 bindir = @bindir@
320 build = @build@
321 build_alias = @build_alias@
322 build_cpu = @build_cpu@
323 build_os = @build_os@
324 build_vendor = @build_vendor@
325 builddir = @builddir@
326 datadir = @datadir@
327 datarootdir = @datarootdir@
328 docdir = @docdir@
329 dvidir = @dvidir@
330 exec_prefix = @exec_prefix@
331 host = @host@
332 host_alias = @host_alias@
333 host_cpu = @host_cpu@
334 host_os = @host_os@
335 host_vendor = @host_vendor@
336 htmldir = @htmldir@
337 includedir = @includedir@
338 infodir = @infodir@
339 install_sh = @install_sh@
340 libdir = @libdir@
341 libexecdir = @libexecdir@
342 libzip_CFLAGS = @libzip_CFLAGS@
343 libzip_LIBS = @libzip_LIBS@
344 localedir = @localedir@
345 localstatedir = @localstatedir@
346 mandir = @mandir@
347 mkdir_p = @mkdir_p@
348 oldincludedir = @oldincludedir@
349 pdfdir = @pdfdir@
350 prefix = @prefix@
351 program_transform_name = @program_transform_name@
352 psdir = @psdir@
353 runstatedir = @runstatedir@
354 sbindir = @sbindir@
355 sharedstatedir = @sharedstatedir@
356 srcdir = @srcdir@
357 sysconfdir = @sysconfdir@
358 target_alias = @target_alias@
359 top_build_prefix = @top_build_prefix@
360 top_builddir = @top_builddir@
361 top_srcdir = @top_srcdir@
362 zlib_CFLAGS = @zlib_CFLAGS@
363 zlib_LIBS = @zlib_LIBS@
364 ACLOCAL_AMFLAGS = -I m4
365 @CLI_ONLY_FALSE@SUBDIRS = src res test po man
366 @CLI_ONLY_TRUE@SUBDIRS = src res test man
367 all: config.h
368 $(MAKE) $(AM_MAKEFLAGS) all-recursive
369
370 .SUFFIXES:
371 am--refresh: Makefile
372 @:
373 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
374 @for dep in $?; do \
375 case '$(am__configure_deps)' in \
376 *$$dep*) \
377 echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
378 $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
379 && exit 0; \
380 exit 1;; \
381 esac; \
382 done; \
383 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
384 $(am__cd) $(top_srcdir) && \
385 $(AUTOMAKE) --gnu Makefile
386 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
387 @case '$?' in \
388 *config.status*) \
389 echo ' $(SHELL) ./config.status'; \
390 $(SHELL) ./config.status;; \
391 *) \
392 echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \
393 cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \
394 esac;
395
396 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
397 $(SHELL) ./config.status --recheck
398
399 $(top_srcdir)/configure: $(am__configure_deps)
400 $(am__cd) $(srcdir) && $(AUTOCONF)
401 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
402 $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
403 $(am__aclocal_m4_deps):
404
405 config.h: stamp-h1
406 @test -f $@ || rm -f stamp-h1
407 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
408
409 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
410 @rm -f stamp-h1
411 cd $(top_builddir) && $(SHELL) ./config.status config.h
412 $(srcdir)/config.h.in: $(am__configure_deps)
413 ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
414 rm -f stamp-h1
415 touch $@
416
417 distclean-hdr:
418 -rm -f config.h stamp-h1
419
420 mostlyclean-libtool:
421 -rm -f *.lo
422
423 clean-libtool:
424 -rm -rf .libs _libs
425
426 distclean-libtool:
427 -rm -f libtool config.lt
428
429 # This directory's subdirectories are mostly independent; you can cd
430 # into them and run 'make' without going through this Makefile.
431 # To change the values of 'make' variables: instead of editing Makefiles,
432 # (1) if the variable is set in 'config.status', edit 'config.status'
433 # (which will cause the Makefiles to be regenerated when you run 'make');
434 # (2) otherwise, pass the desired values on the 'make' command line.
435 $(am__recursive_targets):
436 @fail=; \
437 if $(am__make_keepgoing); then \
438 failcom='fail=yes'; \
439 else \
440 failcom='exit 1'; \
441 fi; \
442 dot_seen=no; \
443 target=`echo $@ | sed s/-recursive//`; \
444 case "$@" in \
445 distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
446 *) list='$(SUBDIRS)' ;; \
447 esac; \
448 for subdir in $$list; do \
449 echo "Making $$target in $$subdir"; \
450 if test "$$subdir" = "."; then \
451 dot_seen=yes; \
452 local_target="$$target-am"; \
453 else \
454 local_target="$$target"; \
455 fi; \
456 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
457 || eval $$failcom; \
458 done; \
459 if test "$$dot_seen" = "no"; then \
460 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
461 fi; test -z "$$fail"
462
463 ID: $(am__tagged_files)
464 $(am__define_uniq_tagged_files); mkid -fID $$unique
465 tags: tags-recursive
466 TAGS: tags
467
468 tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
469 set x; \
470 here=`pwd`; \
471 if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
472 include_option=--etags-include; \
473 empty_fix=.; \
474 else \
475 include_option=--include; \
476 empty_fix=; \
477 fi; \
478 list='$(SUBDIRS)'; for subdir in $$list; do \
479 if test "$$subdir" = .; then :; else \
480 test ! -f $$subdir/TAGS || \
481 set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
482 fi; \
483 done; \
484 $(am__define_uniq_tagged_files); \
485 shift; \
486 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
487 test -n "$$unique" || unique=$$empty_fix; \
488 if test $$# -gt 0; then \
489 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
490 "$$@" $$unique; \
491 else \
492 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
493 $$unique; \
494 fi; \
495 fi
496 ctags: ctags-recursive
497
498 CTAGS: ctags
499 ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
500 $(am__define_uniq_tagged_files); \
501 test -z "$(CTAGS_ARGS)$$unique" \
502 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
503 $$unique
504
505 GTAGS:
506 here=`$(am__cd) $(top_builddir) && pwd` \
507 && $(am__cd) $(top_srcdir) \
508 && gtags -i $(GTAGS_ARGS) "$$here"
509 cscope: cscope.files
510 test ! -s cscope.files \
511 || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
512 clean-cscope:
513 -rm -f cscope.files
514 cscope.files: clean-cscope cscopelist
515 cscopelist: cscopelist-recursive
516
517 cscopelist-am: $(am__tagged_files)
518 list='$(am__tagged_files)'; \
519 case "$(srcdir)" in \
520 [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
521 *) sdir=$(subdir)/$(srcdir) ;; \
522 esac; \
523 for i in $$list; do \
524 if test -f "$$i"; then \
525 echo "$(subdir)/$$i"; \
526 else \
527 echo "$$sdir/$$i"; \
528 fi; \
529 done >> $(top_builddir)/cscope.files
530
531 distclean-tags:
532 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
533 -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
534
535 distdir: $(BUILT_SOURCES)
536 $(MAKE) $(AM_MAKEFLAGS) distdir-am
537
538 distdir-am: $(DISTFILES)
539 $(am__remove_distdir)
540 test -d "$(distdir)" || mkdir "$(distdir)"
541 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
542 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
543 list='$(DISTFILES)'; \
544 dist_files=`for file in $$list; do echo $$file; done | \
545 sed -e "s|^$$srcdirstrip/||;t" \
546 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
547 case $$dist_files in \
548 */*) $(MKDIR_P) `echo "$$dist_files" | \
549 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
550 sort -u` ;; \
551 esac; \
552 for file in $$dist_files; do \
553 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
554 if test -d $$d/$$file; then \
555 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
556 if test -d "$(distdir)/$$file"; then \
557 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
558 fi; \
559 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
560 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
561 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
562 fi; \
563 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
564 else \
565 test -f "$(distdir)/$$file" \
566 || cp -p $$d/$$file "$(distdir)/$$file" \
567 || exit 1; \
568 fi; \
569 done
570 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
571 if test "$$subdir" = .; then :; else \
572 $(am__make_dryrun) \
573 || test -d "$(distdir)/$$subdir" \
574 || $(MKDIR_P) "$(distdir)/$$subdir" \
575 || exit 1; \
576 dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
577 $(am__relativize); \
578 new_distdir=$$reldir; \
579 dir1=$$subdir; dir2="$(top_distdir)"; \
580 $(am__relativize); \
581 new_top_distdir=$$reldir; \
582 echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
583 echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
584 ($(am__cd) $$subdir && \
585 $(MAKE) $(AM_MAKEFLAGS) \
586 top_distdir="$$new_top_distdir" \
587 distdir="$$new_distdir" \
588 am__remove_distdir=: \
589 am__skip_length_check=: \
590 am__skip_mode_fix=: \
591 distdir) \
592 || exit 1; \
593 fi; \
594 done
595 -test -n "$(am__skip_mode_fix)" \
596 || find "$(distdir)" -type d ! -perm -755 \
597 -exec chmod u+rwx,go+rx {} \; -o \
598 ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
599 ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
600 ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
601 || chmod -R a+r "$(distdir)"
602 dist-gzip: distdir
603 tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
604 $(am__post_remove_distdir)
605
606 dist-bzip2: distdir
607 tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
608 $(am__post_remove_distdir)
609
610 dist-lzip: distdir
611 tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
612 $(am__post_remove_distdir)
613
614 dist-xz: distdir
615 tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
616 $(am__post_remove_distdir)
617
618 dist-zstd: distdir
619 tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst
620 $(am__post_remove_distdir)
621
622 dist-tarZ: distdir
623 @echo WARNING: "Support for distribution archives compressed with" \
624 "legacy program 'compress' is deprecated." >&2
625 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
626 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
627 $(am__post_remove_distdir)
628
629 dist-shar: distdir
630 @echo WARNING: "Support for shar distribution archives is" \
631 "deprecated." >&2
632 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
633 shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
634 $(am__post_remove_distdir)
635
636 dist-zip: distdir
637 -rm -f $(distdir).zip
638 zip -rq $(distdir).zip $(distdir)
639 $(am__post_remove_distdir)
640
641 dist dist-all:
642 $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
643 $(am__post_remove_distdir)
644
645 # This target untars the dist file and tries a VPATH configuration. Then
646 # it guarantees that the distribution is self-contained by making another
647 # tarfile.
648 distcheck: dist
649 case '$(DIST_ARCHIVES)' in \
650 *.tar.gz*) \
651 eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
652 *.tar.bz2*) \
653 bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
654 *.tar.lz*) \
655 lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
656 *.tar.xz*) \
657 xz -dc $(distdir).tar.xz | $(am__untar) ;;\
658 *.tar.Z*) \
659 uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
660 *.shar.gz*) \
661 eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
662 *.zip*) \
663 unzip $(distdir).zip ;;\
664 *.tar.zst*) \
665 zstd -dc $(distdir).tar.zst | $(am__untar) ;;\
666 esac
667 chmod -R a-w $(distdir)
668 chmod u+w $(distdir)
669 mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
670 chmod a-w $(distdir)
671 test -d $(distdir)/_build || exit 0; \
672 dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
673 && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
674 && am__cwd=`pwd` \
675 && $(am__cd) $(distdir)/_build/sub \
676 && ../../configure \
677 $(AM_DISTCHECK_CONFIGURE_FLAGS) \
678 $(DISTCHECK_CONFIGURE_FLAGS) \
679 --srcdir=../.. --prefix="$$dc_install_base" \
680 && $(MAKE) $(AM_MAKEFLAGS) \
681 && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \
682 && $(MAKE) $(AM_MAKEFLAGS) check \
683 && $(MAKE) $(AM_MAKEFLAGS) install \
684 && $(MAKE) $(AM_MAKEFLAGS) installcheck \
685 && $(MAKE) $(AM_MAKEFLAGS) uninstall \
686 && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
687 distuninstallcheck \
688 && chmod -R a-w "$$dc_install_base" \
689 && ({ \
690 (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
691 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
692 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
693 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
694 distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
695 } || { rm -rf "$$dc_destdir"; exit 1; }) \
696 && rm -rf "$$dc_destdir" \
697 && $(MAKE) $(AM_MAKEFLAGS) dist \
698 && rm -rf $(DIST_ARCHIVES) \
699 && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
700 && cd "$$am__cwd" \
701 || exit 1
702 $(am__post_remove_distdir)
703 @(echo "$(distdir) archives ready for distribution: "; \
704 list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
705 sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
706 distuninstallcheck:
707 @test -n '$(distuninstallcheck_dir)' || { \
708 echo 'ERROR: trying to run $@ with an empty' \
709 '$$(distuninstallcheck_dir)' >&2; \
710 exit 1; \
711 }; \
712 $(am__cd) '$(distuninstallcheck_dir)' || { \
713 echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
714 exit 1; \
715 }; \
716 test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
717 || { echo "ERROR: files left after uninstall:" ; \
718 if test -n "$(DESTDIR)"; then \
719 echo " (check DESTDIR support)"; \
720 fi ; \
721 $(distuninstallcheck_listfiles) ; \
722 exit 1; } >&2
723 distcleancheck: distclean
724 @if test '$(srcdir)' = . ; then \
725 echo "ERROR: distcleancheck can only run from a VPATH build" ; \
726 exit 1 ; \
727 fi
728 @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
729 || { echo "ERROR: files left in build directory after distclean:" ; \
730 $(distcleancheck_listfiles) ; \
731 exit 1; } >&2
732 check-am: all-am
733 check: check-recursive
734 all-am: Makefile config.h
735 installdirs: installdirs-recursive
736 installdirs-am:
737 install: install-recursive
738 install-exec: install-exec-recursive
739 install-data: install-data-recursive
740 uninstall: uninstall-recursive
741
742 install-am: all-am
743 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
744
745 installcheck: installcheck-recursive
746 install-strip:
747 if test -z '$(STRIP)'; then \
748 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
749 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
750 install; \
751 else \
752 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
753 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
754 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
755 fi
756 mostlyclean-generic:
757
758 clean-generic:
759
760 distclean-generic:
761 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
762 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
763
764 maintainer-clean-generic:
765 @echo "This command is intended for maintainers to use"
766 @echo "it deletes files that may require special tools to rebuild."
767 clean: clean-recursive
768
769 clean-am: clean-generic clean-libtool mostlyclean-am
770
771 distclean: distclean-recursive
772 -rm -f $(am__CONFIG_DISTCLEAN_FILES)
773 -rm -f Makefile
774 distclean-am: clean-am distclean-generic distclean-hdr \
775 distclean-libtool distclean-tags
776
777 dvi: dvi-recursive
778
779 dvi-am:
780
781 html: html-recursive
782
783 html-am:
784
785 info: info-recursive
786
787 info-am:
788
789 install-data-am:
790
791 install-dvi: install-dvi-recursive
792
793 install-dvi-am:
794
795 install-exec-am:
796
797 install-html: install-html-recursive
798
799 install-html-am:
800
801 install-info: install-info-recursive
802
803 install-info-am:
804
805 install-man:
806
807 install-pdf: install-pdf-recursive
808
809 install-pdf-am:
810
811 install-ps: install-ps-recursive
812
813 install-ps-am:
814
815 installcheck-am:
816
817 maintainer-clean: maintainer-clean-recursive
818 -rm -f $(am__CONFIG_DISTCLEAN_FILES)
819 -rm -rf $(top_srcdir)/autom4te.cache
820 -rm -f Makefile
821 maintainer-clean-am: distclean-am maintainer-clean-generic
822
823 mostlyclean: mostlyclean-recursive
824
825 mostlyclean-am: mostlyclean-generic mostlyclean-libtool
826
827 pdf: pdf-recursive
828
829 pdf-am:
830
831 ps: ps-recursive
832
833 ps-am:
834
835 uninstall-am:
836
837 .MAKE: $(am__recursive_targets) all install-am install-strip
838
839 .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
840 am--refresh check check-am clean clean-cscope clean-generic \
841 clean-libtool cscope cscopelist-am ctags ctags-am dist \
842 dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \
843 dist-xz dist-zip dist-zstd distcheck distclean \
844 distclean-generic distclean-hdr distclean-libtool \
845 distclean-tags distcleancheck distdir distuninstallcheck dvi \
846 dvi-am html html-am info info-am install install-am \
847 install-data install-data-am install-dvi install-dvi-am \
848 install-exec install-exec-am install-html install-html-am \
849 install-info install-info-am install-man install-pdf \
850 install-pdf-am install-ps install-ps-am install-strip \
851 installcheck installcheck-am installdirs installdirs-am \
852 maintainer-clean maintainer-clean-generic mostlyclean \
853 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
854 tags tags-am uninstall uninstall-am
855
856 .PRECIOUS: Makefile
857
858
859 # Tell versions [3.59,3.63) of GNU make to not export all variables.
860 # Otherwise a system limit (for SysV at least) may be exceeded.
861 .NOEXPORT:
+0
-288
README.md less more
0 # Elektroid
1
2 Elektroid is a GNU/Linux transfer application for Elektron devices. It includes the `elektroid` GUI application and the `elektroid-cli` CLI application.
3 Elektroid has been reported to work with Model:Samples, Model:Cycles, Digitakt, Digitone, Syntakt, and Analog Rytm MKI and MKII.
4
5 To use Elektroid, USB configuration must be set to `USB MIDI` or `USB AUDIO/MIDI` as it won't work in Overbridge mode.
6
7 ## Installation
8
9 As with other autotools project, you need to run the following commands. If you just want to compile `elektroid-cli`, pass `CLI_ONLY=yes` to `/configure`.
10
11 ```
12 autoreconf --install
13 ./configure
14 make
15 sudo make install
16 ```
17
18 The package dependencies for Debian-based distributions are:
19 - automake
20 - libtool
21 - build-essential
22 - libasound2-dev
23 - libgtk-3-dev
24 - libpulse-dev
25 - libsndfile1-dev
26 - libsamplerate0-dev
27 - autopoint
28 - gettext
29 - zlib1g-dev
30 - libjson-glib-dev
31 - libzip-dev
32
33 You can easily install them by running `sudo apt install automake libtool build-essential libasound2-dev libgtk-3-dev libpulse-dev libsndfile1-dev libsamplerate0-dev autopoint gettext zlib1g-dev libjson-glib-dev libzip-dev`.
34
35 If you are only compiling the CLI, install the dependencies with `sudo apt install automake libtool build-essential libasound2-dev libglib2.0-dev libsndfile1-dev libsamplerate0-dev autopoint libtool zlib1g-dev libjson-glib-dev libzip-dev`.
36
37 For Fedora, `sudo dnf install autoconf libtool alsa-lib-devel zlib-devel libzip-devel gtk3-devel libsndfile-devel gettext-devel libsamplerate-devel pulseaudio-libs-devel json-glib-devel` will install the build dependencies.
38
39 For Arch Linux, `sudo pacman -S base-devel autoconf libtool alsa-lib zlib libzip gtk3 libsndfile gettext libsamplerate pulseaudio json-glib` will install the build dependencies.
40
41 ## Packaging
42
43 This is a quick glance at the instructions needed to build some distribution packages.
44
45 ### Debian
46
47 ```
48 $ dpkg-buildpackage -b -rfakeroot -us -uc
49 ```
50
51 ### Fedora
52
53 ```
54 $ rel=35
55 $ mock -r fedora-$rel-x86_64 --buildsrpm --spec elektroid.spec --sources .
56 $ mock -r fedora-$rel-x86_64 --no-clean --rebuild /var/lib/mock/fedora-$rel-x86_64/result/elektroid-*.src.rpm
57 ```
58
59 ## CLI
60
61 `elektroid-cli` brings the same functionality as `elektroid` to the command line.
62
63 There are device commands and filesystem commands. The latter have the form `a-b` where `a` is a command and `b` is a filesystem, (e.g., `ls-project`, `download-sound`, `mkdir-sample`). Notice that the filesystem is always in the singular form and some older commands are deprecated but kept for compatibility reasons although there are not documented here.
64
65 These are the available filesystems:
66
67 * `sample`
68 * `raw`
69 * `preset`
70 * `data`
71 * `project`
72 * `sound`
73
74 Raw and data are intended to interface directly with the filesystems provided by the devices so the downloaded or uploaded files are **not** compatible with Elektron Transfer formats. Preset is a particular instance of raw and so are project and sound but regarding data. Thus, raw and data filesystems should be used only for testing and are **not** available in the GUI.
75
76 These are the available commands:
77
78 * `ls` or `list`
79 * `mkdir`
80 * `rmdir` or `rm` (both behave as `rm -rf`)
81 * `mv`
82 * `cp`
83 * `cl`, clear item
84 * `sw`, swap items
85 * `ul` or `upload`
86 * `dl` or `download`
87
88 Keep in mind that not every filesystem implements all the commands. For instance, samples can not be swapped.
89
90 Provided paths must always be prepended with the device id and a colon (':') e.g., `0:/incoming`.
91
92 ### Device commands
93
94 * `ld` or `ls-devices`, list compatible devices
95
96 ```
97 $ elektroid-cli ld
98 0 Elektron Digitakt MIDI 1
99 ```
100
101 * `info` or `info-device`, show device info including device filesystems
102
103 ```
104 $ elektroid-cli info 0
105 Digitakt 1.30 (Digitakt) filesystems=sample,data,project,sound
106 ```
107
108 * `df` or `info-storage`, show size and use of +Drive and RAM
109
110 ```
111 $ elektroid-cli df 0
112 Storage Size Used Available Use%
113 +Drive 959.50MiB 198.20MiB 761.30MiB 20.66%
114 RAM 64.00MiB 13.43MiB 50.57MiB 20.98%
115 ```
116
117 * `upgrade`, upgrade firmware
118
119 ```
120 $ elektroid-cli upgrade Digitakt_OS1.30.syx 0
121 ```
122
123 ### Sample, raw and preset commands
124
125 * `ls-sample`
126
127 It only works for directories. Notice that the first column is the file type, the second is the size, the third is an internal cksum and the last one is the sample name.
128
129 ```
130 $ elektroid-cli ls-sample 0:/
131 D 0B 00000000 drum machines
132 F 630.34KiB f8711cd9 saw
133 F 1.29MiB 0bbc22bd square
134 ```
135
136 * `mkdir-sample`
137
138 ```
139 $ elektroid-cli mkdir-sample 0:/samples
140 ```
141
142 * `rmdir-sample`
143
144 ```
145 $ elektroid-cli rmdir-sample 0:/samples
146 ```
147
148 * `ul-sample`
149
150 ```
151 $ elektroid-cli ul-sample square.wav 0:/
152 ```
153
154 * `dl-sample`
155
156 ```
157 $ elektroid-cli dl-sample 0:/square
158 ```
159
160 * `mv-sample`
161
162 ```
163 $ elektroid-cli mv-sample 0:/square 0:/sample
164 ```
165
166 * `rm-sample`
167
168 ```
169 $ elektroid-cli rm-sample 0:/sample
170 ```
171
172 ### Data, sound and project commands
173
174 There are a few things to clarify first.
175
176 * All data commands are valid for both projects and sounds although the examples use just sounds.
177
178 * All data commands that use paths to items and not directories use the item index instead the item name.
179
180 Here are the commands.
181
182 * `ls-data`
183
184 It only works for directories. Notice that the first column is the file type, the second is the index, the third is the permissons in hexadecimal, the fourth indicates if the data in valid, the fifth indicates if it has metadatam, the sixth is the size and the last one is the item name.
185
186 Permissions are 16 bits values but only 6 are used from bit 2 to bit 7 both included. From LSB to MSB, this permissions are read, write, clear, copy, swap, and move.
187
188 ```
189 $ elektroid-cli ls-data 0:/
190 D -1 0000 0 0 0B projects
191 D -1 0000 0 0 0B soundbanks
192 ```
193
194 ```
195 $ elektroid-cli ls-data 0:/soundbanks/D
196 F 1 0012 1 1 160B KICK
197 F 2 0012 1 1 160B SNARE
198 ```
199
200 * `cp-data`
201
202 ```
203 $ elektroid-cli cp-data 0:/soundbanks/D/1 0:/soundbanks/D/3
204 $ elektroid-cli ls-data 0:/soundbanks/D
205 F 1 0012 1 1 160B KICK
206 F 2 0012 1 1 160B SNARE
207 F 3 0012 1 1 160B KICK
208 ```
209
210 * `sw-data`
211
212 ```
213 $ elektroid-cli sw-data 0:/soundbanks/D/2 0:/soundbanks/D/3
214 $ elektroid-cli ls-data 0:/soundbanks/D
215 F 1 0012 1 1 160B KICK
216 F 2 0012 1 1 160B KICK
217 F 3 0012 1 1 160B SNARE
218 ```
219
220 * `mv-data`
221
222 ```
223 $ elektroid-cli mv-data 0:/soundbanks/D/3 0:/soundbanks/D/1
224 $ elektroid-cli ls-data 0:/soundbanks/D
225 F 1 0012 1 1 160B SNARE
226 F 2 0012 1 1 160B KICK
227 ```
228
229 * `cl-data`
230
231 ```
232 $ elektroid-cli cl-data 0:/soundbanks/D/1
233 $ elektroid-cli ls-data 0:/soundbanks/D
234 F 2 0012 1 1 160B KICK
235 ```
236
237 * `dl-data`
238
239 ```
240 $ elektroid-cli dl-data 0:/soundbanks/D/1
241 ```
242
243 * `ul-data`
244
245 ```
246 $ elektroid-cli ul-data sound 0:/soundbanks/D
247 ```
248
249 ## Adding and reconfiguring devices
250
251 Since version 2.1, it is possible to add and reconfigure devices without recompiling as the device definitions are stored in a JSON file. Hopefully, this approach will make it easier for users to modify and add devices and new releases will only be needed if new funcionalities are actually added.
252
253 This is a device definition from `res/devices.json`.
254
255 ```
256 }, {
257 "id": 12,
258 "name": "Digitakt",
259 "alias": "dt",
260 "filesystems": 57,
261 "storage": 3
262 }, {
263 ```
264
265 Properties `filesystems` and `storage` are based on the definitions found in `src/connector.h` and are the bitwise OR result of all the supported filesystems and storage types.
266
267 ```
268 enum connector_fs
269 {
270 FS_SAMPLES = 0x1,
271 FS_RAW_ALL = 0x2,
272 FS_RAW_PRESETS = 0x4,
273 FS_DATA_ALL = 0x8,
274 FS_DATA_PRJ = 0x10,
275 FS_DATA_SND = 0x20,
276 };
277 ```
278
279 ```
280 enum connector_storage
281 {
282 STORAGE_PLUS_DRIVE = 0x1,
283 STORAGE_RAM = 0x2
284 };
285 ```
286
287 If the file `~/.config/elektroid/devices.json` is found, it will take precedence over the installed one.
0 # generated automatically by aclocal 1.16.3 -*- Autoconf -*-
1
2 # Copyright (C) 1996-2020 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 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
23 # serial 12 (pkg-config-0.29.2)
24
25 dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
26 dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
27 dnl
28 dnl This program is free software; you can redistribute it and/or modify
29 dnl it under the terms of the GNU General Public License as published by
30 dnl the Free Software Foundation; either version 2 of the License, or
31 dnl (at your option) any later version.
32 dnl
33 dnl This program is distributed in the hope that it will be useful, but
34 dnl WITHOUT ANY WARRANTY; without even the implied warranty of
35 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
36 dnl General Public License for more details.
37 dnl
38 dnl You should have received a copy of the GNU General Public License
39 dnl along with this program; if not, write to the Free Software
40 dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
41 dnl 02111-1307, USA.
42 dnl
43 dnl As a special exception to the GNU General Public License, if you
44 dnl distribute this file as part of a program that contains a
45 dnl configuration script generated by Autoconf, you may include it under
46 dnl the same distribution terms that you use for the rest of that
47 dnl program.
48
49 dnl PKG_PREREQ(MIN-VERSION)
50 dnl -----------------------
51 dnl Since: 0.29
52 dnl
53 dnl Verify that the version of the pkg-config macros are at least
54 dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
55 dnl installed version of pkg-config, this checks the developer's version
56 dnl of pkg.m4 when generating configure.
57 dnl
58 dnl To ensure that this macro is defined, also add:
59 dnl m4_ifndef([PKG_PREREQ],
60 dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
61 dnl
62 dnl See the "Since" comment for each macro you use to see what version
63 dnl of the macros you require.
64 m4_defun([PKG_PREREQ],
65 [m4_define([PKG_MACROS_VERSION], [0.29.2])
66 m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
67 [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
68 ])dnl PKG_PREREQ
69
70 dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
71 dnl ----------------------------------
72 dnl Since: 0.16
73 dnl
74 dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
75 dnl first found in the path. Checks that the version of pkg-config found
76 dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
77 dnl used since that's the first version where most current features of
78 dnl pkg-config existed.
79 AC_DEFUN([PKG_PROG_PKG_CONFIG],
80 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
81 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
82 m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
83 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
84 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
85 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
86
87 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
88 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
89 fi
90 if test -n "$PKG_CONFIG"; then
91 _pkg_min_version=m4_default([$1], [0.9.0])
92 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
93 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
94 AC_MSG_RESULT([yes])
95 else
96 AC_MSG_RESULT([no])
97 PKG_CONFIG=""
98 fi
99 fi[]dnl
100 ])dnl PKG_PROG_PKG_CONFIG
101
102 dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
103 dnl -------------------------------------------------------------------
104 dnl Since: 0.18
105 dnl
106 dnl Check to see whether a particular set of modules exists. Similar to
107 dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
108 dnl
109 dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
110 dnl only at the first occurence in configure.ac, so if the first place
111 dnl it's called might be skipped (such as if it is within an "if", you
112 dnl have to call PKG_CHECK_EXISTS manually
113 AC_DEFUN([PKG_CHECK_EXISTS],
114 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
115 if test -n "$PKG_CONFIG" && \
116 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
117 m4_default([$2], [:])
118 m4_ifvaln([$3], [else
119 $3])dnl
120 fi])
121
122 dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
123 dnl ---------------------------------------------
124 dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
125 dnl pkg_failed based on the result.
126 m4_define([_PKG_CONFIG],
127 [if test -n "$$1"; then
128 pkg_cv_[]$1="$$1"
129 elif test -n "$PKG_CONFIG"; then
130 PKG_CHECK_EXISTS([$3],
131 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
132 test "x$?" != "x0" && pkg_failed=yes ],
133 [pkg_failed=yes])
134 else
135 pkg_failed=untried
136 fi[]dnl
137 ])dnl _PKG_CONFIG
138
139 dnl _PKG_SHORT_ERRORS_SUPPORTED
140 dnl ---------------------------
141 dnl Internal check to see if pkg-config supports short errors.
142 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
143 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
144 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
145 _pkg_short_errors_supported=yes
146 else
147 _pkg_short_errors_supported=no
148 fi[]dnl
149 ])dnl _PKG_SHORT_ERRORS_SUPPORTED
150
151
152 dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
153 dnl [ACTION-IF-NOT-FOUND])
154 dnl --------------------------------------------------------------
155 dnl Since: 0.4.0
156 dnl
157 dnl Note that if there is a possibility the first call to
158 dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
159 dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
160 AC_DEFUN([PKG_CHECK_MODULES],
161 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
162 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
163 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
164
165 pkg_failed=no
166 AC_MSG_CHECKING([for $2])
167
168 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
169 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
170
171 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
172 and $1[]_LIBS to avoid the need to call pkg-config.
173 See the pkg-config man page for more details.])
174
175 if test $pkg_failed = yes; then
176 AC_MSG_RESULT([no])
177 _PKG_SHORT_ERRORS_SUPPORTED
178 if test $_pkg_short_errors_supported = yes; then
179 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
180 else
181 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
182 fi
183 # Put the nasty error message in config.log where it belongs
184 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
185
186 m4_default([$4], [AC_MSG_ERROR(
187 [Package requirements ($2) were not met:
188
189 $$1_PKG_ERRORS
190
191 Consider adjusting the PKG_CONFIG_PATH environment variable if you
192 installed software in a non-standard prefix.
193
194 _PKG_TEXT])[]dnl
195 ])
196 elif test $pkg_failed = untried; then
197 AC_MSG_RESULT([no])
198 m4_default([$4], [AC_MSG_FAILURE(
199 [The pkg-config script could not be found or is too old. Make sure it
200 is in your PATH or set the PKG_CONFIG environment variable to the full
201 path to pkg-config.
202
203 _PKG_TEXT
204
205 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
206 ])
207 else
208 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
209 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
210 AC_MSG_RESULT([yes])
211 $3
212 fi[]dnl
213 ])dnl PKG_CHECK_MODULES
214
215
216 dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
217 dnl [ACTION-IF-NOT-FOUND])
218 dnl ---------------------------------------------------------------------
219 dnl Since: 0.29
220 dnl
221 dnl Checks for existence of MODULES and gathers its build flags with
222 dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
223 dnl and VARIABLE-PREFIX_LIBS from --libs.
224 dnl
225 dnl Note that if there is a possibility the first call to
226 dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
227 dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
228 dnl configure.ac.
229 AC_DEFUN([PKG_CHECK_MODULES_STATIC],
230 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
231 _save_PKG_CONFIG=$PKG_CONFIG
232 PKG_CONFIG="$PKG_CONFIG --static"
233 PKG_CHECK_MODULES($@)
234 PKG_CONFIG=$_save_PKG_CONFIG[]dnl
235 ])dnl PKG_CHECK_MODULES_STATIC
236
237
238 dnl PKG_INSTALLDIR([DIRECTORY])
239 dnl -------------------------
240 dnl Since: 0.27
241 dnl
242 dnl Substitutes the variable pkgconfigdir as the location where a module
243 dnl should install pkg-config .pc files. By default the directory is
244 dnl $libdir/pkgconfig, but the default can be changed by passing
245 dnl DIRECTORY. The user can override through the --with-pkgconfigdir
246 dnl parameter.
247 AC_DEFUN([PKG_INSTALLDIR],
248 [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
249 m4_pushdef([pkg_description],
250 [pkg-config installation directory @<:@]pkg_default[@:>@])
251 AC_ARG_WITH([pkgconfigdir],
252 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
253 [with_pkgconfigdir=]pkg_default)
254 AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
255 m4_popdef([pkg_default])
256 m4_popdef([pkg_description])
257 ])dnl PKG_INSTALLDIR
258
259
260 dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
261 dnl --------------------------------
262 dnl Since: 0.27
263 dnl
264 dnl Substitutes the variable noarch_pkgconfigdir as the location where a
265 dnl module should install arch-independent pkg-config .pc files. By
266 dnl default the directory is $datadir/pkgconfig, but the default can be
267 dnl changed by passing DIRECTORY. The user can override through the
268 dnl --with-noarch-pkgconfigdir parameter.
269 AC_DEFUN([PKG_NOARCH_INSTALLDIR],
270 [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
271 m4_pushdef([pkg_description],
272 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
273 AC_ARG_WITH([noarch-pkgconfigdir],
274 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
275 [with_noarch_pkgconfigdir=]pkg_default)
276 AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
277 m4_popdef([pkg_default])
278 m4_popdef([pkg_description])
279 ])dnl PKG_NOARCH_INSTALLDIR
280
281
282 dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
283 dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
284 dnl -------------------------------------------
285 dnl Since: 0.28
286 dnl
287 dnl Retrieves the value of the pkg-config variable for the given module.
288 AC_DEFUN([PKG_CHECK_VAR],
289 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
290 AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
291
292 _PKG_CONFIG([$1], [variable="][$3]["], [$2])
293 AS_VAR_COPY([$1], [pkg_cv_][$1])
294
295 AS_VAR_IF([$1], [""], [$5], [$4])dnl
296 ])dnl PKG_CHECK_VAR
297
298 # Copyright (C) 2002-2020 Free Software Foundation, Inc.
299 #
300 # This file is free software; the Free Software Foundation
301 # gives unlimited permission to copy and/or distribute it,
302 # with or without modifications, as long as this notice is preserved.
303
304 # AM_AUTOMAKE_VERSION(VERSION)
305 # ----------------------------
306 # Automake X.Y traces this macro to ensure aclocal.m4 has been
307 # generated from the m4 files accompanying Automake X.Y.
308 # (This private macro should not be called outside this file.)
309 AC_DEFUN([AM_AUTOMAKE_VERSION],
310 [am__api_version='1.16'
311 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
312 dnl require some minimum version. Point them to the right macro.
313 m4_if([$1], [1.16.3], [],
314 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
315 ])
316
317 # _AM_AUTOCONF_VERSION(VERSION)
318 # -----------------------------
319 # aclocal traces this macro to find the Autoconf version.
320 # This is a private macro too. Using m4_define simplifies
321 # the logic in aclocal, which can simply ignore this definition.
322 m4_define([_AM_AUTOCONF_VERSION], [])
323
324 # AM_SET_CURRENT_AUTOMAKE_VERSION
325 # -------------------------------
326 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
327 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
328 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
329 [AM_AUTOMAKE_VERSION([1.16.3])dnl
330 m4_ifndef([AC_AUTOCONF_VERSION],
331 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
332 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
333
334 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
335
336 # Copyright (C) 2001-2020 Free Software Foundation, Inc.
337 #
338 # This file is free software; the Free Software Foundation
339 # gives unlimited permission to copy and/or distribute it,
340 # with or without modifications, as long as this notice is preserved.
341
342 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
343 # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
344 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
345 #
346 # Of course, Automake must honor this variable whenever it calls a
347 # tool from the auxiliary directory. The problem is that $srcdir (and
348 # therefore $ac_aux_dir as well) can be either absolute or relative,
349 # depending on how configure is run. This is pretty annoying, since
350 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
351 # source directory, any form will work fine, but in subdirectories a
352 # relative path needs to be adjusted first.
353 #
354 # $ac_aux_dir/missing
355 # fails when called from a subdirectory if $ac_aux_dir is relative
356 # $top_srcdir/$ac_aux_dir/missing
357 # fails if $ac_aux_dir is absolute,
358 # fails when called from a subdirectory in a VPATH build with
359 # a relative $ac_aux_dir
360 #
361 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
362 # are both prefixed by $srcdir. In an in-source build this is usually
363 # harmless because $srcdir is '.', but things will broke when you
364 # start a VPATH build or use an absolute $srcdir.
365 #
366 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
367 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
368 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
369 # and then we would define $MISSING as
370 # MISSING="\${SHELL} $am_aux_dir/missing"
371 # This will work as long as MISSING is not called from configure, because
372 # unfortunately $(top_srcdir) has no meaning in configure.
373 # However there are other variables, like CC, which are often used in
374 # configure, and could therefore not use this "fixed" $ac_aux_dir.
375 #
376 # Another solution, used here, is to always expand $ac_aux_dir to an
377 # absolute PATH. The drawback is that using absolute paths prevent a
378 # configured tree to be moved without reconfiguration.
379
380 AC_DEFUN([AM_AUX_DIR_EXPAND],
381 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
382 # Expand $ac_aux_dir to an absolute path.
383 am_aux_dir=`cd "$ac_aux_dir" && pwd`
384 ])
385
386 # AM_COND_IF -*- Autoconf -*-
387
388 # Copyright (C) 2008-2020 Free Software Foundation, Inc.
389 #
390 # This file is free software; the Free Software Foundation
391 # gives unlimited permission to copy and/or distribute it,
392 # with or without modifications, as long as this notice is preserved.
393
394 # _AM_COND_IF
395 # _AM_COND_ELSE
396 # _AM_COND_ENDIF
397 # --------------
398 # These macros are only used for tracing.
399 m4_define([_AM_COND_IF])
400 m4_define([_AM_COND_ELSE])
401 m4_define([_AM_COND_ENDIF])
402
403 # AM_COND_IF(COND, [IF-TRUE], [IF-FALSE])
404 # ---------------------------------------
405 # If the shell condition COND is true, execute IF-TRUE, otherwise execute
406 # IF-FALSE. Allow automake to learn about conditional instantiating macros
407 # (the AC_CONFIG_FOOS).
408 AC_DEFUN([AM_COND_IF],
409 [m4_ifndef([_AM_COND_VALUE_$1],
410 [m4_fatal([$0: no such condition "$1"])])dnl
411 _AM_COND_IF([$1])dnl
412 if test -z "$$1_TRUE"; then :
413 m4_n([$2])[]dnl
414 m4_ifval([$3],
415 [_AM_COND_ELSE([$1])dnl
416 else
417 $3
418 ])dnl
419 _AM_COND_ENDIF([$1])dnl
420 fi[]dnl
421 ])
422
423 # AM_CONDITIONAL -*- Autoconf -*-
424
425 # Copyright (C) 1997-2020 Free Software Foundation, Inc.
426 #
427 # This file is free software; the Free Software Foundation
428 # gives unlimited permission to copy and/or distribute it,
429 # with or without modifications, as long as this notice is preserved.
430
431 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
432 # -------------------------------------
433 # Define a conditional.
434 AC_DEFUN([AM_CONDITIONAL],
435 [AC_PREREQ([2.52])dnl
436 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
437 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
438 AC_SUBST([$1_TRUE])dnl
439 AC_SUBST([$1_FALSE])dnl
440 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
441 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
442 m4_define([_AM_COND_VALUE_$1], [$2])dnl
443 if $2; then
444 $1_TRUE=
445 $1_FALSE='#'
446 else
447 $1_TRUE='#'
448 $1_FALSE=
449 fi
450 AC_CONFIG_COMMANDS_PRE(
451 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
452 AC_MSG_ERROR([[conditional "$1" was never defined.
453 Usually this means the macro was only invoked conditionally.]])
454 fi])])
455
456 # Copyright (C) 1999-2020 Free Software Foundation, Inc.
457 #
458 # This file is free software; the Free Software Foundation
459 # gives unlimited permission to copy and/or distribute it,
460 # with or without modifications, as long as this notice is preserved.
461
462
463 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
464 # written in clear, in which case automake, when reading aclocal.m4,
465 # will think it sees a *use*, and therefore will trigger all it's
466 # C support machinery. Also note that it means that autoscan, seeing
467 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
468
469
470 # _AM_DEPENDENCIES(NAME)
471 # ----------------------
472 # See how the compiler implements dependency checking.
473 # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
474 # We try a few techniques and use that to set a single cache variable.
475 #
476 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
477 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
478 # dependency, and given that the user is not expected to run this macro,
479 # just rely on AC_PROG_CC.
480 AC_DEFUN([_AM_DEPENDENCIES],
481 [AC_REQUIRE([AM_SET_DEPDIR])dnl
482 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
483 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
484 AC_REQUIRE([AM_DEP_TRACK])dnl
485
486 m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
487 [$1], [CXX], [depcc="$CXX" am_compiler_list=],
488 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
489 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
490 [$1], [UPC], [depcc="$UPC" am_compiler_list=],
491 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
492 [depcc="$$1" am_compiler_list=])
493
494 AC_CACHE_CHECK([dependency style of $depcc],
495 [am_cv_$1_dependencies_compiler_type],
496 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
497 # We make a subdir and do the tests there. Otherwise we can end up
498 # making bogus files that we don't know about and never remove. For
499 # instance it was reported that on HP-UX the gcc test will end up
500 # making a dummy file named 'D' -- because '-MD' means "put the output
501 # in D".
502 rm -rf conftest.dir
503 mkdir conftest.dir
504 # Copy depcomp to subdir because otherwise we won't find it if we're
505 # using a relative directory.
506 cp "$am_depcomp" conftest.dir
507 cd conftest.dir
508 # We will build objects and dependencies in a subdirectory because
509 # it helps to detect inapplicable dependency modes. For instance
510 # both Tru64's cc and ICC support -MD to output dependencies as a
511 # side effect of compilation, but ICC will put the dependencies in
512 # the current directory while Tru64 will put them in the object
513 # directory.
514 mkdir sub
515
516 am_cv_$1_dependencies_compiler_type=none
517 if test "$am_compiler_list" = ""; then
518 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
519 fi
520 am__universal=false
521 m4_case([$1], [CC],
522 [case " $depcc " in #(
523 *\ -arch\ *\ -arch\ *) am__universal=true ;;
524 esac],
525 [CXX],
526 [case " $depcc " in #(
527 *\ -arch\ *\ -arch\ *) am__universal=true ;;
528 esac])
529
530 for depmode in $am_compiler_list; do
531 # Setup a source with many dependencies, because some compilers
532 # like to wrap large dependency lists on column 80 (with \), and
533 # we should not choose a depcomp mode which is confused by this.
534 #
535 # We need to recreate these files for each test, as the compiler may
536 # overwrite some of them when testing with obscure command lines.
537 # This happens at least with the AIX C compiler.
538 : > sub/conftest.c
539 for i in 1 2 3 4 5 6; do
540 echo '#include "conftst'$i'.h"' >> sub/conftest.c
541 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
542 # Solaris 10 /bin/sh.
543 echo '/* dummy */' > sub/conftst$i.h
544 done
545 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
546
547 # We check with '-c' and '-o' for the sake of the "dashmstdout"
548 # mode. It turns out that the SunPro C++ compiler does not properly
549 # handle '-M -o', and we need to detect this. Also, some Intel
550 # versions had trouble with output in subdirs.
551 am__obj=sub/conftest.${OBJEXT-o}
552 am__minus_obj="-o $am__obj"
553 case $depmode in
554 gcc)
555 # This depmode causes a compiler race in universal mode.
556 test "$am__universal" = false || continue
557 ;;
558 nosideeffect)
559 # After this tag, mechanisms are not by side-effect, so they'll
560 # only be used when explicitly requested.
561 if test "x$enable_dependency_tracking" = xyes; then
562 continue
563 else
564 break
565 fi
566 ;;
567 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
568 # This compiler won't grok '-c -o', but also, the minuso test has
569 # not run yet. These depmodes are late enough in the game, and
570 # so weak that their functioning should not be impacted.
571 am__obj=conftest.${OBJEXT-o}
572 am__minus_obj=
573 ;;
574 none) break ;;
575 esac
576 if depmode=$depmode \
577 source=sub/conftest.c object=$am__obj \
578 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
579 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
580 >/dev/null 2>conftest.err &&
581 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
582 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
583 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
584 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
585 # icc doesn't choke on unknown options, it will just issue warnings
586 # or remarks (even with -Werror). So we grep stderr for any message
587 # that says an option was ignored or not supported.
588 # When given -MP, icc 7.0 and 7.1 complain thusly:
589 # icc: Command line warning: ignoring option '-M'; no argument required
590 # The diagnosis changed in icc 8.0:
591 # icc: Command line remark: option '-MP' not supported
592 if (grep 'ignoring option' conftest.err ||
593 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
594 am_cv_$1_dependencies_compiler_type=$depmode
595 break
596 fi
597 fi
598 done
599
600 cd ..
601 rm -rf conftest.dir
602 else
603 am_cv_$1_dependencies_compiler_type=none
604 fi
605 ])
606 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
607 AM_CONDITIONAL([am__fastdep$1], [
608 test "x$enable_dependency_tracking" != xno \
609 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
610 ])
611
612
613 # AM_SET_DEPDIR
614 # -------------
615 # Choose a directory name for dependency files.
616 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
617 AC_DEFUN([AM_SET_DEPDIR],
618 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
619 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
620 ])
621
622
623 # AM_DEP_TRACK
624 # ------------
625 AC_DEFUN([AM_DEP_TRACK],
626 [AC_ARG_ENABLE([dependency-tracking], [dnl
627 AS_HELP_STRING(
628 [--enable-dependency-tracking],
629 [do not reject slow dependency extractors])
630 AS_HELP_STRING(
631 [--disable-dependency-tracking],
632 [speeds up one-time build])])
633 if test "x$enable_dependency_tracking" != xno; then
634 am_depcomp="$ac_aux_dir/depcomp"
635 AMDEPBACKSLASH='\'
636 am__nodep='_no'
637 fi
638 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
639 AC_SUBST([AMDEPBACKSLASH])dnl
640 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
641 AC_SUBST([am__nodep])dnl
642 _AM_SUBST_NOTMAKE([am__nodep])dnl
643 ])
644
645 # Generate code to set up dependency tracking. -*- Autoconf -*-
646
647 # Copyright (C) 1999-2020 Free Software Foundation, Inc.
648 #
649 # This file is free software; the Free Software Foundation
650 # gives unlimited permission to copy and/or distribute it,
651 # with or without modifications, as long as this notice is preserved.
652
653 # _AM_OUTPUT_DEPENDENCY_COMMANDS
654 # ------------------------------
655 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
656 [{
657 # Older Autoconf quotes --file arguments for eval, but not when files
658 # are listed without --file. Let's play safe and only enable the eval
659 # if we detect the quoting.
660 # TODO: see whether this extra hack can be removed once we start
661 # requiring Autoconf 2.70 or later.
662 AS_CASE([$CONFIG_FILES],
663 [*\'*], [eval set x "$CONFIG_FILES"],
664 [*], [set x $CONFIG_FILES])
665 shift
666 # Used to flag and report bootstrapping failures.
667 am_rc=0
668 for am_mf
669 do
670 # Strip MF so we end up with the name of the file.
671 am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
672 # Check whether this is an Automake generated Makefile which includes
673 # dependency-tracking related rules and includes.
674 # Grep'ing the whole file directly is not great: AIX grep has a line
675 # limit of 2048, but all sed's we know have understand at least 4000.
676 sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
677 || continue
678 am_dirpart=`AS_DIRNAME(["$am_mf"])`
679 am_filepart=`AS_BASENAME(["$am_mf"])`
680 AM_RUN_LOG([cd "$am_dirpart" \
681 && sed -e '/# am--include-marker/d' "$am_filepart" \
682 | $MAKE -f - am--depfiles]) || am_rc=$?
683 done
684 if test $am_rc -ne 0; then
685 AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
686 for automatic dependency tracking. If GNU make was not used, consider
687 re-running the configure script with MAKE="gmake" (or whatever is
688 necessary). You can also try re-running configure with the
689 '--disable-dependency-tracking' option to at least be able to build
690 the package (albeit without support for automatic dependency tracking).])
691 fi
692 AS_UNSET([am_dirpart])
693 AS_UNSET([am_filepart])
694 AS_UNSET([am_mf])
695 AS_UNSET([am_rc])
696 rm -f conftest-deps.mk
697 }
698 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
699
700
701 # AM_OUTPUT_DEPENDENCY_COMMANDS
702 # -----------------------------
703 # This macro should only be invoked once -- use via AC_REQUIRE.
704 #
705 # This code is only required when automatic dependency tracking is enabled.
706 # This creates each '.Po' and '.Plo' makefile fragment that we'll need in
707 # order to bootstrap the dependency handling code.
708 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
709 [AC_CONFIG_COMMANDS([depfiles],
710 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
711 [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
712
713 # Do all the work for Automake. -*- Autoconf -*-
714
715 # Copyright (C) 1996-2020 Free Software Foundation, Inc.
716 #
717 # This file is free software; the Free Software Foundation
718 # gives unlimited permission to copy and/or distribute it,
719 # with or without modifications, as long as this notice is preserved.
720
721 # This macro actually does too much. Some checks are only needed if
722 # your package does certain things. But this isn't really a big deal.
723
724 dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
725 m4_define([AC_PROG_CC],
726 m4_defn([AC_PROG_CC])
727 [_AM_PROG_CC_C_O
728 ])
729
730 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
731 # AM_INIT_AUTOMAKE([OPTIONS])
732 # -----------------------------------------------
733 # The call with PACKAGE and VERSION arguments is the old style
734 # call (pre autoconf-2.50), which is being phased out. PACKAGE
735 # and VERSION should now be passed to AC_INIT and removed from
736 # the call to AM_INIT_AUTOMAKE.
737 # We support both call styles for the transition. After
738 # the next Automake release, Autoconf can make the AC_INIT
739 # arguments mandatory, and then we can depend on a new Autoconf
740 # release and drop the old call support.
741 AC_DEFUN([AM_INIT_AUTOMAKE],
742 [AC_PREREQ([2.65])dnl
743 dnl Autoconf wants to disallow AM_ names. We explicitly allow
744 dnl the ones we care about.
745 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
746 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
747 AC_REQUIRE([AC_PROG_INSTALL])dnl
748 if test "`cd $srcdir && pwd`" != "`pwd`"; then
749 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
750 # is not polluted with repeated "-I."
751 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
752 # test to see if srcdir already configured
753 if test -f $srcdir/config.status; then
754 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
755 fi
756 fi
757
758 # test whether we have cygpath
759 if test -z "$CYGPATH_W"; then
760 if (cygpath --version) >/dev/null 2>/dev/null; then
761 CYGPATH_W='cygpath -w'
762 else
763 CYGPATH_W=echo
764 fi
765 fi
766 AC_SUBST([CYGPATH_W])
767
768 # Define the identity of the package.
769 dnl Distinguish between old-style and new-style calls.
770 m4_ifval([$2],
771 [AC_DIAGNOSE([obsolete],
772 [$0: two- and three-arguments forms are deprecated.])
773 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
774 AC_SUBST([PACKAGE], [$1])dnl
775 AC_SUBST([VERSION], [$2])],
776 [_AM_SET_OPTIONS([$1])dnl
777 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
778 m4_if(
779 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
780 [ok:ok],,
781 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
782 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
783 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
784
785 _AM_IF_OPTION([no-define],,
786 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
787 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
788
789 # Some tools Automake needs.
790 AC_REQUIRE([AM_SANITY_CHECK])dnl
791 AC_REQUIRE([AC_ARG_PROGRAM])dnl
792 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
793 AM_MISSING_PROG([AUTOCONF], [autoconf])
794 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
795 AM_MISSING_PROG([AUTOHEADER], [autoheader])
796 AM_MISSING_PROG([MAKEINFO], [makeinfo])
797 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
798 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
799 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
800 # For better backward compatibility. To be removed once Automake 1.9.x
801 # dies out for good. For more background, see:
802 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
803 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
804 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
805 # We need awk for the "check" target (and possibly the TAP driver). The
806 # system "awk" is bad on some platforms.
807 AC_REQUIRE([AC_PROG_AWK])dnl
808 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
809 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
810 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
811 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
812 [_AM_PROG_TAR([v7])])])
813 _AM_IF_OPTION([no-dependencies],,
814 [AC_PROVIDE_IFELSE([AC_PROG_CC],
815 [_AM_DEPENDENCIES([CC])],
816 [m4_define([AC_PROG_CC],
817 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
818 AC_PROVIDE_IFELSE([AC_PROG_CXX],
819 [_AM_DEPENDENCIES([CXX])],
820 [m4_define([AC_PROG_CXX],
821 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
822 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
823 [_AM_DEPENDENCIES([OBJC])],
824 [m4_define([AC_PROG_OBJC],
825 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
826 AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
827 [_AM_DEPENDENCIES([OBJCXX])],
828 [m4_define([AC_PROG_OBJCXX],
829 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
830 ])
831 AC_REQUIRE([AM_SILENT_RULES])dnl
832 dnl The testsuite driver may need to know about EXEEXT, so add the
833 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
834 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
835 AC_CONFIG_COMMANDS_PRE(dnl
836 [m4_provide_if([_AM_COMPILER_EXEEXT],
837 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
838
839 # POSIX will say in a future version that running "rm -f" with no argument
840 # is OK; and we want to be able to make that assumption in our Makefile
841 # recipes. So use an aggressive probe to check that the usage we want is
842 # actually supported "in the wild" to an acceptable degree.
843 # See automake bug#10828.
844 # To make any issue more visible, cause the running configure to be aborted
845 # by default if the 'rm' program in use doesn't match our expectations; the
846 # user can still override this though.
847 if rm -f && rm -fr && rm -rf; then : OK; else
848 cat >&2 <<'END'
849 Oops!
850
851 Your 'rm' program seems unable to run without file operands specified
852 on the command line, even when the '-f' option is present. This is contrary
853 to the behaviour of most rm programs out there, and not conforming with
854 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
855
856 Please tell bug-automake@gnu.org about your system, including the value
857 of your $PATH and any error possibly output before this message. This
858 can help us improve future automake versions.
859
860 END
861 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
862 echo 'Configuration will proceed anyway, since you have set the' >&2
863 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
864 echo >&2
865 else
866 cat >&2 <<'END'
867 Aborting the configuration process, to ensure you take notice of the issue.
868
869 You can download and install GNU coreutils to get an 'rm' implementation
870 that behaves properly: <https://www.gnu.org/software/coreutils/>.
871
872 If you want to complete the configuration process using your problematic
873 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
874 to "yes", and re-run configure.
875
876 END
877 AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
878 fi
879 fi
880 dnl The trailing newline in this macro's definition is deliberate, for
881 dnl backward compatibility and to allow trailing 'dnl'-style comments
882 dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
883 ])
884
885 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
886 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
887 dnl mangled by Autoconf and run in a shell conditional statement.
888 m4_define([_AC_COMPILER_EXEEXT],
889 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
890
891 # When config.status generates a header, we must update the stamp-h file.
892 # This file resides in the same directory as the config header
893 # that is generated. The stamp files are numbered to have different names.
894
895 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
896 # loop where config.status creates the headers, so we can generate
897 # our stamp files there.
898 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
899 [# Compute $1's index in $config_headers.
900 _am_arg=$1
901 _am_stamp_count=1
902 for _am_header in $config_headers :; do
903 case $_am_header in
904 $_am_arg | $_am_arg:* )
905 break ;;
906 * )
907 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
908 esac
909 done
910 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
911
912 # Copyright (C) 2001-2020 Free Software Foundation, Inc.
913 #
914 # This file is free software; the Free Software Foundation
915 # gives unlimited permission to copy and/or distribute it,
916 # with or without modifications, as long as this notice is preserved.
917
918 # AM_PROG_INSTALL_SH
919 # ------------------
920 # Define $install_sh.
921 AC_DEFUN([AM_PROG_INSTALL_SH],
922 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
923 if test x"${install_sh+set}" != xset; then
924 case $am_aux_dir in
925 *\ * | *\ *)
926 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
927 *)
928 install_sh="\${SHELL} $am_aux_dir/install-sh"
929 esac
930 fi
931 AC_SUBST([install_sh])])
932
933 # Copyright (C) 2003-2020 Free Software Foundation, Inc.
934 #
935 # This file is free software; the Free Software Foundation
936 # gives unlimited permission to copy and/or distribute it,
937 # with or without modifications, as long as this notice is preserved.
938
939 # Check whether the underlying file-system supports filenames
940 # with a leading dot. For instance MS-DOS doesn't.
941 AC_DEFUN([AM_SET_LEADING_DOT],
942 [rm -rf .tst 2>/dev/null
943 mkdir .tst 2>/dev/null
944 if test -d .tst; then
945 am__leading_dot=.
946 else
947 am__leading_dot=_
948 fi
949 rmdir .tst 2>/dev/null
950 AC_SUBST([am__leading_dot])])
951
952 # Check to see how 'make' treats includes. -*- Autoconf -*-
953
954 # Copyright (C) 2001-2020 Free Software Foundation, Inc.
955 #
956 # This file is free software; the Free Software Foundation
957 # gives unlimited permission to copy and/or distribute it,
958 # with or without modifications, as long as this notice is preserved.
959
960 # AM_MAKE_INCLUDE()
961 # -----------------
962 # Check whether make has an 'include' directive that can support all
963 # the idioms we need for our automatic dependency tracking code.
964 AC_DEFUN([AM_MAKE_INCLUDE],
965 [AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
966 cat > confinc.mk << 'END'
967 am__doit:
968 @echo this is the am__doit target >confinc.out
969 .PHONY: am__doit
970 END
971 am__include="#"
972 am__quote=
973 # BSD make does it like this.
974 echo '.include "confinc.mk" # ignored' > confmf.BSD
975 # Other make implementations (GNU, Solaris 10, AIX) do it like this.
976 echo 'include confinc.mk # ignored' > confmf.GNU
977 _am_result=no
978 for s in GNU BSD; do
979 AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
980 AS_CASE([$?:`cat confinc.out 2>/dev/null`],
981 ['0:this is the am__doit target'],
982 [AS_CASE([$s],
983 [BSD], [am__include='.include' am__quote='"'],
984 [am__include='include' am__quote=''])])
985 if test "$am__include" != "#"; then
986 _am_result="yes ($s style)"
987 break
988 fi
989 done
990 rm -f confinc.* confmf.*
991 AC_MSG_RESULT([${_am_result}])
992 AC_SUBST([am__include])])
993 AC_SUBST([am__quote])])
994
995 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
996
997 # Copyright (C) 1997-2020 Free Software Foundation, Inc.
998 #
999 # This file is free software; the Free Software Foundation
1000 # gives unlimited permission to copy and/or distribute it,
1001 # with or without modifications, as long as this notice is preserved.
1002
1003 # AM_MISSING_PROG(NAME, PROGRAM)
1004 # ------------------------------
1005 AC_DEFUN([AM_MISSING_PROG],
1006 [AC_REQUIRE([AM_MISSING_HAS_RUN])
1007 $1=${$1-"${am_missing_run}$2"}
1008 AC_SUBST($1)])
1009
1010 # AM_MISSING_HAS_RUN
1011 # ------------------
1012 # Define MISSING if not defined so far and test if it is modern enough.
1013 # If it is, set am_missing_run to use it, otherwise, to nothing.
1014 AC_DEFUN([AM_MISSING_HAS_RUN],
1015 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1016 AC_REQUIRE_AUX_FILE([missing])dnl
1017 if test x"${MISSING+set}" != xset; then
1018 MISSING="\${SHELL} '$am_aux_dir/missing'"
1019 fi
1020 # Use eval to expand $SHELL
1021 if eval "$MISSING --is-lightweight"; then
1022 am_missing_run="$MISSING "
1023 else
1024 am_missing_run=
1025 AC_MSG_WARN(['missing' script is too old or missing])
1026 fi
1027 ])
1028
1029 # Helper functions for option handling. -*- Autoconf -*-
1030
1031 # Copyright (C) 2001-2020 Free Software Foundation, Inc.
1032 #
1033 # This file is free software; the Free Software Foundation
1034 # gives unlimited permission to copy and/or distribute it,
1035 # with or without modifications, as long as this notice is preserved.
1036
1037 # _AM_MANGLE_OPTION(NAME)
1038 # -----------------------
1039 AC_DEFUN([_AM_MANGLE_OPTION],
1040 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1041
1042 # _AM_SET_OPTION(NAME)
1043 # --------------------
1044 # Set option NAME. Presently that only means defining a flag for this option.
1045 AC_DEFUN([_AM_SET_OPTION],
1046 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
1047
1048 # _AM_SET_OPTIONS(OPTIONS)
1049 # ------------------------
1050 # OPTIONS is a space-separated list of Automake options.
1051 AC_DEFUN([_AM_SET_OPTIONS],
1052 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1053
1054 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1055 # -------------------------------------------
1056 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1057 AC_DEFUN([_AM_IF_OPTION],
1058 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1059
1060 # Copyright (C) 1999-2020 Free Software Foundation, Inc.
1061 #
1062 # This file is free software; the Free Software Foundation
1063 # gives unlimited permission to copy and/or distribute it,
1064 # with or without modifications, as long as this notice is preserved.
1065
1066 # _AM_PROG_CC_C_O
1067 # ---------------
1068 # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
1069 # to automatically call this.
1070 AC_DEFUN([_AM_PROG_CC_C_O],
1071 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1072 AC_REQUIRE_AUX_FILE([compile])dnl
1073 AC_LANG_PUSH([C])dnl
1074 AC_CACHE_CHECK(
1075 [whether $CC understands -c and -o together],
1076 [am_cv_prog_cc_c_o],
1077 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
1078 # Make sure it works both with $CC and with simple cc.
1079 # Following AC_PROG_CC_C_O, we do the test twice because some
1080 # compilers refuse to overwrite an existing .o file with -o,
1081 # though they will create one.
1082 am_cv_prog_cc_c_o=yes
1083 for am_i in 1 2; do
1084 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
1085 && test -f conftest2.$ac_objext; then
1086 : OK
1087 else
1088 am_cv_prog_cc_c_o=no
1089 break
1090 fi
1091 done
1092 rm -f core conftest*
1093 unset am_i])
1094 if test "$am_cv_prog_cc_c_o" != yes; then
1095 # Losing compiler, so override with the script.
1096 # FIXME: It is wrong to rewrite CC.
1097 # But if we don't then we get into trouble of one sort or another.
1098 # A longer-term fix would be to have automake use am__CC in this case,
1099 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
1100 CC="$am_aux_dir/compile $CC"
1101 fi
1102 AC_LANG_POP([C])])
1103
1104 # For backward compatibility.
1105 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
1106
1107 # Copyright (C) 2001-2020 Free Software Foundation, Inc.
1108 #
1109 # This file is free software; the Free Software Foundation
1110 # gives unlimited permission to copy and/or distribute it,
1111 # with or without modifications, as long as this notice is preserved.
1112
1113 # AM_RUN_LOG(COMMAND)
1114 # -------------------
1115 # Run COMMAND, save the exit status in ac_status, and log it.
1116 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
1117 AC_DEFUN([AM_RUN_LOG],
1118 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
1119 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
1120 ac_status=$?
1121 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1122 (exit $ac_status); }])
1123
1124 # Check to make sure that the build environment is sane. -*- Autoconf -*-
1125
1126 # Copyright (C) 1996-2020 Free Software Foundation, Inc.
1127 #
1128 # This file is free software; the Free Software Foundation
1129 # gives unlimited permission to copy and/or distribute it,
1130 # with or without modifications, as long as this notice is preserved.
1131
1132 # AM_SANITY_CHECK
1133 # ---------------
1134 AC_DEFUN([AM_SANITY_CHECK],
1135 [AC_MSG_CHECKING([whether build environment is sane])
1136 # Reject unsafe characters in $srcdir or the absolute working directory
1137 # name. Accept space and tab only in the latter.
1138 am_lf='
1139 '
1140 case `pwd` in
1141 *[[\\\"\#\$\&\'\`$am_lf]]*)
1142 AC_MSG_ERROR([unsafe absolute working directory name]);;
1143 esac
1144 case $srcdir in
1145 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
1146 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
1147 esac
1148
1149 # Do 'set' in a subshell so we don't clobber the current shell's
1150 # arguments. Must try -L first in case configure is actually a
1151 # symlink; some systems play weird games with the mod time of symlinks
1152 # (eg FreeBSD returns the mod time of the symlink's containing
1153 # directory).
1154 if (
1155 am_has_slept=no
1156 for am_try in 1 2; do
1157 echo "timestamp, slept: $am_has_slept" > conftest.file
1158 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1159 if test "$[*]" = "X"; then
1160 # -L didn't work.
1161 set X `ls -t "$srcdir/configure" conftest.file`
1162 fi
1163 if test "$[*]" != "X $srcdir/configure conftest.file" \
1164 && test "$[*]" != "X conftest.file $srcdir/configure"; then
1165
1166 # If neither matched, then we have a broken ls. This can happen
1167 # if, for instance, CONFIG_SHELL is bash and it inherits a
1168 # broken ls alias from the environment. This has actually
1169 # happened. Such a system could not be considered "sane".
1170 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1171 alias in your environment])
1172 fi
1173 if test "$[2]" = conftest.file || test $am_try -eq 2; then
1174 break
1175 fi
1176 # Just in case.
1177 sleep 1
1178 am_has_slept=yes
1179 done
1180 test "$[2]" = conftest.file
1181 )
1182 then
1183 # Ok.
1184 :
1185 else
1186 AC_MSG_ERROR([newly created file is older than distributed files!
1187 Check your system clock])
1188 fi
1189 AC_MSG_RESULT([yes])
1190 # If we didn't sleep, we still need to ensure time stamps of config.status and
1191 # generated files are strictly newer.
1192 am_sleep_pid=
1193 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
1194 ( sleep 1 ) &
1195 am_sleep_pid=$!
1196 fi
1197 AC_CONFIG_COMMANDS_PRE(
1198 [AC_MSG_CHECKING([that generated files are newer than configure])
1199 if test -n "$am_sleep_pid"; then
1200 # Hide warnings about reused PIDs.
1201 wait $am_sleep_pid 2>/dev/null
1202 fi
1203 AC_MSG_RESULT([done])])
1204 rm -f conftest.file
1205 ])
1206
1207 # Copyright (C) 2009-2020 Free Software Foundation, Inc.
1208 #
1209 # This file is free software; the Free Software Foundation
1210 # gives unlimited permission to copy and/or distribute it,
1211 # with or without modifications, as long as this notice is preserved.
1212
1213 # AM_SILENT_RULES([DEFAULT])
1214 # --------------------------
1215 # Enable less verbose build rules; with the default set to DEFAULT
1216 # ("yes" being less verbose, "no" or empty being verbose).
1217 AC_DEFUN([AM_SILENT_RULES],
1218 [AC_ARG_ENABLE([silent-rules], [dnl
1219 AS_HELP_STRING(
1220 [--enable-silent-rules],
1221 [less verbose build output (undo: "make V=1")])
1222 AS_HELP_STRING(
1223 [--disable-silent-rules],
1224 [verbose build output (undo: "make V=0")])dnl
1225 ])
1226 case $enable_silent_rules in @%:@ (((
1227 yes) AM_DEFAULT_VERBOSITY=0;;
1228 no) AM_DEFAULT_VERBOSITY=1;;
1229 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
1230 esac
1231 dnl
1232 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
1233 dnl do not support nested variable expansions.
1234 dnl See automake bug#9928 and bug#10237.
1235 am_make=${MAKE-make}
1236 AC_CACHE_CHECK([whether $am_make supports nested variables],
1237 [am_cv_make_support_nested_variables],
1238 [if AS_ECHO([['TRUE=$(BAR$(V))
1239 BAR0=false
1240 BAR1=true
1241 V=1
1242 am__doit:
1243 @$(TRUE)
1244 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
1245 am_cv_make_support_nested_variables=yes
1246 else
1247 am_cv_make_support_nested_variables=no
1248 fi])
1249 if test $am_cv_make_support_nested_variables = yes; then
1250 dnl Using '$V' instead of '$(V)' breaks IRIX make.
1251 AM_V='$(V)'
1252 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
1253 else
1254 AM_V=$AM_DEFAULT_VERBOSITY
1255 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
1256 fi
1257 AC_SUBST([AM_V])dnl
1258 AM_SUBST_NOTMAKE([AM_V])dnl
1259 AC_SUBST([AM_DEFAULT_V])dnl
1260 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
1261 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
1262 AM_BACKSLASH='\'
1263 AC_SUBST([AM_BACKSLASH])dnl
1264 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
1265 ])
1266
1267 # Copyright (C) 2001-2020 Free Software Foundation, Inc.
1268 #
1269 # This file is free software; the Free Software Foundation
1270 # gives unlimited permission to copy and/or distribute it,
1271 # with or without modifications, as long as this notice is preserved.
1272
1273 # AM_PROG_INSTALL_STRIP
1274 # ---------------------
1275 # One issue with vendor 'install' (even GNU) is that you can't
1276 # specify the program used to strip binaries. This is especially
1277 # annoying in cross-compiling environments, where the build's strip
1278 # is unlikely to handle the host's binaries.
1279 # Fortunately install-sh will honor a STRIPPROG variable, so we
1280 # always use install-sh in "make install-strip", and initialize
1281 # STRIPPROG with the value of the STRIP variable (set by the user).
1282 AC_DEFUN([AM_PROG_INSTALL_STRIP],
1283 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1284 # Installed binaries are usually stripped using 'strip' when the user
1285 # run "make install-strip". However 'strip' might not be the right
1286 # tool to use in cross-compilation environments, therefore Automake
1287 # will honor the 'STRIP' environment variable to overrule this program.
1288 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
1289 if test "$cross_compiling" != no; then
1290 AC_CHECK_TOOL([STRIP], [strip], :)
1291 fi
1292 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1293 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1294
1295 # Copyright (C) 2006-2020 Free Software Foundation, Inc.
1296 #
1297 # This file is free software; the Free Software Foundation
1298 # gives unlimited permission to copy and/or distribute it,
1299 # with or without modifications, as long as this notice is preserved.
1300
1301 # _AM_SUBST_NOTMAKE(VARIABLE)
1302 # ---------------------------
1303 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1304 # This macro is traced by Automake.
1305 AC_DEFUN([_AM_SUBST_NOTMAKE])
1306
1307 # AM_SUBST_NOTMAKE(VARIABLE)
1308 # --------------------------
1309 # Public sister of _AM_SUBST_NOTMAKE.
1310 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1311
1312 # Check how to create a tarball. -*- Autoconf -*-
1313
1314 # Copyright (C) 2004-2020 Free Software Foundation, Inc.
1315 #
1316 # This file is free software; the Free Software Foundation
1317 # gives unlimited permission to copy and/or distribute it,
1318 # with or without modifications, as long as this notice is preserved.
1319
1320 # _AM_PROG_TAR(FORMAT)
1321 # --------------------
1322 # Check how to create a tarball in format FORMAT.
1323 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
1324 #
1325 # Substitute a variable $(am__tar) that is a command
1326 # writing to stdout a FORMAT-tarball containing the directory
1327 # $tardir.
1328 # tardir=directory && $(am__tar) > result.tar
1329 #
1330 # Substitute a variable $(am__untar) that extract such
1331 # a tarball read from stdin.
1332 # $(am__untar) < result.tar
1333 #
1334 AC_DEFUN([_AM_PROG_TAR],
1335 [# Always define AMTAR for backward compatibility. Yes, it's still used
1336 # in the wild :-( We should find a proper way to deprecate it ...
1337 AC_SUBST([AMTAR], ['$${TAR-tar}'])
1338
1339 # We'll loop over all known methods to create a tar archive until one works.
1340 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1341
1342 m4_if([$1], [v7],
1343 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1344
1345 [m4_case([$1],
1346 [ustar],
1347 [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
1348 # There is notably a 21 bits limit for the UID and the GID. In fact,
1349 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
1350 # and bug#13588).
1351 am_max_uid=2097151 # 2^21 - 1
1352 am_max_gid=$am_max_uid
1353 # The $UID and $GID variables are not portable, so we need to resort
1354 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
1355 # below are definitely unexpected, so allow the users to see them
1356 # (that is, avoid stderr redirection).
1357 am_uid=`id -u || echo unknown`
1358 am_gid=`id -g || echo unknown`
1359 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
1360 if test $am_uid -le $am_max_uid; then
1361 AC_MSG_RESULT([yes])
1362 else
1363 AC_MSG_RESULT([no])
1364 _am_tools=none
1365 fi
1366 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
1367 if test $am_gid -le $am_max_gid; then
1368 AC_MSG_RESULT([yes])
1369 else
1370 AC_MSG_RESULT([no])
1371 _am_tools=none
1372 fi],
1373
1374 [pax],
1375 [],
1376
1377 [m4_fatal([Unknown tar format])])
1378
1379 AC_MSG_CHECKING([how to create a $1 tar archive])
1380
1381 # Go ahead even if we have the value already cached. We do so because we
1382 # need to set the values for the 'am__tar' and 'am__untar' variables.
1383 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1384
1385 for _am_tool in $_am_tools; do
1386 case $_am_tool in
1387 gnutar)
1388 for _am_tar in tar gnutar gtar; do
1389 AM_RUN_LOG([$_am_tar --version]) && break
1390 done
1391 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1392 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1393 am__untar="$_am_tar -xf -"
1394 ;;
1395 plaintar)
1396 # Must skip GNU tar: if it does not support --format= it doesn't create
1397 # ustar tarball either.
1398 (tar --version) >/dev/null 2>&1 && continue
1399 am__tar='tar chf - "$$tardir"'
1400 am__tar_='tar chf - "$tardir"'
1401 am__untar='tar xf -'
1402 ;;
1403 pax)
1404 am__tar='pax -L -x $1 -w "$$tardir"'
1405 am__tar_='pax -L -x $1 -w "$tardir"'
1406 am__untar='pax -r'
1407 ;;
1408 cpio)
1409 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1410 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1411 am__untar='cpio -i -H $1 -d'
1412 ;;
1413 none)
1414 am__tar=false
1415 am__tar_=false
1416 am__untar=false
1417 ;;
1418 esac
1419
1420 # If the value was cached, stop now. We just wanted to have am__tar
1421 # and am__untar set.
1422 test -n "${am_cv_prog_tar_$1}" && break
1423
1424 # tar/untar a dummy directory, and stop if the command works.
1425 rm -rf conftest.dir
1426 mkdir conftest.dir
1427 echo GrepMe > conftest.dir/file
1428 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1429 rm -rf conftest.dir
1430 if test -s conftest.tar; then
1431 AM_RUN_LOG([$am__untar <conftest.tar])
1432 AM_RUN_LOG([cat conftest.dir/file])
1433 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1434 fi
1435 done
1436 rm -rf conftest.dir
1437
1438 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1439 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1440
1441 AC_SUBST([am__tar])
1442 AC_SUBST([am__untar])
1443 ]) # _AM_PROG_TAR
1444
1445 m4_include([m4/gettext.m4])
1446 m4_include([m4/iconv.m4])
1447 m4_include([m4/intlmacosx.m4])
1448 m4_include([m4/lib-ld.m4])
1449 m4_include([m4/lib-link.m4])
1450 m4_include([m4/lib-prefix.m4])
1451 m4_include([m4/libtool.m4])
1452 m4_include([m4/ltoptions.m4])
1453 m4_include([m4/ltsugar.m4])
1454 m4_include([m4/ltversion.m4])
1455 m4_include([m4/lt~obsolete.m4])
1456 m4_include([m4/nls.m4])
1457 m4_include([m4/po.m4])
1458 m4_include([m4/progtest.m4])
0 #! /bin/sh
1 # Wrapper for compilers which do not understand '-c -o'.
2
3 scriptversion=2018-03-07.03; # UTC
4
5 # Copyright (C) 1999-2020 Free Software Foundation, Inc.
6 # Written by Tom Tromey <tromey@cygnus.com>.
7 #
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2, or (at your option)
11 # any later version.
12 #
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with this program. If not, see <https://www.gnu.org/licenses/>.
20
21 # As a special exception to the GNU General Public License, if you
22 # distribute this file as part of a program that contains a
23 # configuration script generated by Autoconf, you may include it under
24 # the same distribution terms that you use for the rest of that program.
25
26 # This file is maintained in Automake, please report
27 # bugs to <bug-automake@gnu.org> or send patches to
28 # <automake-patches@gnu.org>.
29
30 nl='
31 '
32
33 # We need space, tab and new line, in precisely that order. Quoting is
34 # there to prevent tools from complaining about whitespace usage.
35 IFS=" "" $nl"
36
37 file_conv=
38
39 # func_file_conv build_file lazy
40 # Convert a $build file to $host form and store it in $file
41 # Currently only supports Windows hosts. If the determined conversion
42 # type is listed in (the comma separated) LAZY, no conversion will
43 # take place.
44 func_file_conv ()
45 {
46 file=$1
47 case $file in
48 / | /[!/]*) # absolute file, and not a UNC file
49 if test -z "$file_conv"; then
50 # lazily determine how to convert abs files
51 case `uname -s` in
52 MINGW*)
53 file_conv=mingw
54 ;;
55 CYGWIN* | MSYS*)
56 file_conv=cygwin
57 ;;
58 *)
59 file_conv=wine
60 ;;
61 esac
62 fi
63 case $file_conv/,$2, in
64 *,$file_conv,*)
65 ;;
66 mingw/*)
67 file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
68 ;;
69 cygwin/* | msys/*)
70 file=`cygpath -m "$file" || echo "$file"`
71 ;;
72 wine/*)
73 file=`winepath -w "$file" || echo "$file"`
74 ;;
75 esac
76 ;;
77 esac
78 }
79
80 # func_cl_dashL linkdir
81 # Make cl look for libraries in LINKDIR
82 func_cl_dashL ()
83 {
84 func_file_conv "$1"
85 if test -z "$lib_path"; then
86 lib_path=$file
87 else
88 lib_path="$lib_path;$file"
89 fi
90 linker_opts="$linker_opts -LIBPATH:$file"
91 }
92
93 # func_cl_dashl library
94 # Do a library search-path lookup for cl
95 func_cl_dashl ()
96 {
97 lib=$1
98 found=no
99 save_IFS=$IFS
100 IFS=';'
101 for dir in $lib_path $LIB
102 do
103 IFS=$save_IFS
104 if $shared && test -f "$dir/$lib.dll.lib"; then
105 found=yes
106 lib=$dir/$lib.dll.lib
107 break
108 fi
109 if test -f "$dir/$lib.lib"; then
110 found=yes
111 lib=$dir/$lib.lib
112 break
113 fi
114 if test -f "$dir/lib$lib.a"; then
115 found=yes
116 lib=$dir/lib$lib.a
117 break
118 fi
119 done
120 IFS=$save_IFS
121
122 if test "$found" != yes; then
123 lib=$lib.lib
124 fi
125 }
126
127 # func_cl_wrapper cl arg...
128 # Adjust compile command to suit cl
129 func_cl_wrapper ()
130 {
131 # Assume a capable shell
132 lib_path=
133 shared=:
134 linker_opts=
135 for arg
136 do
137 if test -n "$eat"; then
138 eat=
139 else
140 case $1 in
141 -o)
142 # configure might choose to run compile as 'compile cc -o foo foo.c'.
143 eat=1
144 case $2 in
145 *.o | *.[oO][bB][jJ])
146 func_file_conv "$2"
147 set x "$@" -Fo"$file"
148 shift
149 ;;
150 *)
151 func_file_conv "$2"
152 set x "$@" -Fe"$file"
153 shift
154 ;;
155 esac
156 ;;
157 -I)
158 eat=1
159 func_file_conv "$2" mingw
160 set x "$@" -I"$file"
161 shift
162 ;;
163 -I*)
164 func_file_conv "${1#-I}" mingw
165 set x "$@" -I"$file"
166 shift
167 ;;
168 -l)
169 eat=1
170 func_cl_dashl "$2"
171 set x "$@" "$lib"
172 shift
173 ;;
174 -l*)
175 func_cl_dashl "${1#-l}"
176 set x "$@" "$lib"
177 shift
178 ;;
179 -L)
180 eat=1
181 func_cl_dashL "$2"
182 ;;
183 -L*)
184 func_cl_dashL "${1#-L}"
185 ;;
186 -static)
187 shared=false
188 ;;
189 -Wl,*)
190 arg=${1#-Wl,}
191 save_ifs="$IFS"; IFS=','
192 for flag in $arg; do
193 IFS="$save_ifs"
194 linker_opts="$linker_opts $flag"
195 done
196 IFS="$save_ifs"
197 ;;
198 -Xlinker)
199 eat=1
200 linker_opts="$linker_opts $2"
201 ;;
202 -*)
203 set x "$@" "$1"
204 shift
205 ;;
206 *.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
207 func_file_conv "$1"
208 set x "$@" -Tp"$file"
209 shift
210 ;;
211 *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
212 func_file_conv "$1" mingw
213 set x "$@" "$file"
214 shift
215 ;;
216 *)
217 set x "$@" "$1"
218 shift
219 ;;
220 esac
221 fi
222 shift
223 done
224 if test -n "$linker_opts"; then
225 linker_opts="-link$linker_opts"
226 fi
227 exec "$@" $linker_opts
228 exit 1
229 }
230
231 eat=
232
233 case $1 in
234 '')
235 echo "$0: No command. Try '$0 --help' for more information." 1>&2
236 exit 1;
237 ;;
238 -h | --h*)
239 cat <<\EOF
240 Usage: compile [--help] [--version] PROGRAM [ARGS]
241
242 Wrapper for compilers which do not understand '-c -o'.
243 Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
244 arguments, and rename the output as expected.
245
246 If you are trying to build a whole package this is not the
247 right script to run: please start by reading the file 'INSTALL'.
248
249 Report bugs to <bug-automake@gnu.org>.
250 EOF
251 exit $?
252 ;;
253 -v | --v*)
254 echo "compile $scriptversion"
255 exit $?
256 ;;
257 cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
258 icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
259 func_cl_wrapper "$@" # Doesn't return...
260 ;;
261 esac
262
263 ofile=
264 cfile=
265
266 for arg
267 do
268 if test -n "$eat"; then
269 eat=
270 else
271 case $1 in
272 -o)
273 # configure might choose to run compile as 'compile cc -o foo foo.c'.
274 # So we strip '-o arg' only if arg is an object.
275 eat=1
276 case $2 in
277 *.o | *.obj)
278 ofile=$2
279 ;;
280 *)
281 set x "$@" -o "$2"
282 shift
283 ;;
284 esac
285 ;;
286 *.c)
287 cfile=$1
288 set x "$@" "$1"
289 shift
290 ;;
291 *)
292 set x "$@" "$1"
293 shift
294 ;;
295 esac
296 fi
297 shift
298 done
299
300 if test -z "$ofile" || test -z "$cfile"; then
301 # If no '-o' option was seen then we might have been invoked from a
302 # pattern rule where we don't need one. That is ok -- this is a
303 # normal compilation that the losing compiler can handle. If no
304 # '.c' file was seen then we are probably linking. That is also
305 # ok.
306 exec "$@"
307 fi
308
309 # Name of file we expect compiler to create.
310 cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
311
312 # Create the lock directory.
313 # Note: use '[/\\:.-]' here to ensure that we don't use the same name
314 # that we are using for the .o file. Also, base the name on the expected
315 # object file name, since that is what matters with a parallel build.
316 lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
317 while true; do
318 if mkdir "$lockdir" >/dev/null 2>&1; then
319 break
320 fi
321 sleep 1
322 done
323 # FIXME: race condition here if user kills between mkdir and trap.
324 trap "rmdir '$lockdir'; exit 1" 1 2 15
325
326 # Run the compile.
327 "$@"
328 ret=$?
329
330 if test -f "$cofile"; then
331 test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
332 elif test -f "${cofile}bj"; then
333 test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
334 fi
335
336 rmdir "$lockdir"
337 exit $ret
338
339 # Local Variables:
340 # mode: shell-script
341 # sh-indentation: 2
342 # eval: (add-hook 'before-save-hook 'time-stamp)
343 # time-stamp-start: "scriptversion="
344 # time-stamp-format: "%:y-%02m-%02d.%02H"
345 # time-stamp-time-zone: "UTC0"
346 # time-stamp-end: "; # UTC"
347 # End:
0 #! /bin/sh
1 # Attempt to guess a canonical system name.
2 # Copyright 1992-2018 Free Software Foundation, Inc.
3
4 timestamp='2018-02-24'
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 <https://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; maintained since 2000 by Ben Elliston.
27 #
28 # You can get the latest version of this script from:
29 # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
30 #
31 # Please send patches 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 Options:
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-2018 Free Software Foundation, Inc.
53
54 This is free software; see the source for copying conditions. There is NO
55 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
56
57 help="
58 Try \`$me --help' for more information."
59
60 # Parse command line
61 while test $# -gt 0 ; do
62 case $1 in
63 --time-stamp | --time* | -t )
64 echo "$timestamp" ; exit ;;
65 --version | -v )
66 echo "$version" ; exit ;;
67 --help | --h* | -h )
68 echo "$usage"; exit ;;
69 -- ) # Stop option processing
70 shift; break ;;
71 - ) # Use stdin as input.
72 break ;;
73 -* )
74 echo "$me: invalid option $1$help" >&2
75 exit 1 ;;
76 * )
77 break ;;
78 esac
79 done
80
81 if test $# != 0; then
82 echo "$me: too many arguments$help" >&2
83 exit 1
84 fi
85
86 trap 'exit 1' 1 2 15
87
88 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
89 # compiler to aid in system detection is discouraged as it requires
90 # temporary files to be created and, as you can see below, it is a
91 # headache to deal with in a portable fashion.
92
93 # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
94 # use `HOST_CC' if defined, but it is deprecated.
95
96 # Portable tmp directory creation inspired by the Autoconf team.
97
98 set_cc_for_build='
99 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
100 trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
101 : ${TMPDIR=/tmp} ;
102 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
103 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
104 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
105 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
106 dummy=$tmp/dummy ;
107 tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
108 case $CC_FOR_BUILD,$HOST_CC,$CC in
109 ,,) echo "int x;" > "$dummy.c" ;
110 for c in cc gcc c89 c99 ; do
111 if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
112 CC_FOR_BUILD="$c"; break ;
113 fi ;
114 done ;
115 if test x"$CC_FOR_BUILD" = x ; then
116 CC_FOR_BUILD=no_compiler_found ;
117 fi
118 ;;
119 ,,*) CC_FOR_BUILD=$CC ;;
120 ,*,*) CC_FOR_BUILD=$HOST_CC ;;
121 esac ; set_cc_for_build= ;'
122
123 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
124 # (ghazi@noc.rutgers.edu 1994-08-24)
125 if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
126 PATH=$PATH:/.attbin ; export PATH
127 fi
128
129 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
130 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
131 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
132 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
133
134 case "$UNAME_SYSTEM" in
135 Linux|GNU|GNU/*)
136 # If the system lacks a compiler, then just pick glibc.
137 # We could probably try harder.
138 LIBC=gnu
139
140 eval "$set_cc_for_build"
141 cat <<-EOF > "$dummy.c"
142 #include <features.h>
143 #if defined(__UCLIBC__)
144 LIBC=uclibc
145 #elif defined(__dietlibc__)
146 LIBC=dietlibc
147 #else
148 LIBC=gnu
149 #endif
150 EOF
151 eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"
152
153 # If ldd exists, use it to detect musl libc.
154 if command -v ldd >/dev/null && \
155 ldd --version 2>&1 | grep -q ^musl
156 then
157 LIBC=musl
158 fi
159 ;;
160 esac
161
162 # Note: order is significant - the case branches are not exclusive.
163
164 case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
165 *:NetBSD:*:*)
166 # NetBSD (nbsd) targets should (where applicable) match one or
167 # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
168 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
169 # switched to ELF, *-*-netbsd* would select the old
170 # object file format. This provides both forward
171 # compatibility and a consistent mechanism for selecting the
172 # object file format.
173 #
174 # Note: NetBSD doesn't particularly care about the vendor
175 # portion of the name. We always set it to "unknown".
176 sysctl="sysctl -n hw.machine_arch"
177 UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
178 "/sbin/$sysctl" 2>/dev/null || \
179 "/usr/sbin/$sysctl" 2>/dev/null || \
180 echo unknown)`
181 case "$UNAME_MACHINE_ARCH" in
182 armeb) machine=armeb-unknown ;;
183 arm*) machine=arm-unknown ;;
184 sh3el) machine=shl-unknown ;;
185 sh3eb) machine=sh-unknown ;;
186 sh5el) machine=sh5le-unknown ;;
187 earmv*)
188 arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
189 endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
190 machine="${arch}${endian}"-unknown
191 ;;
192 *) machine="$UNAME_MACHINE_ARCH"-unknown ;;
193 esac
194 # The Operating System including object format, if it has switched
195 # to ELF recently (or will in the future) and ABI.
196 case "$UNAME_MACHINE_ARCH" in
197 earm*)
198 os=netbsdelf
199 ;;
200 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
201 eval "$set_cc_for_build"
202 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
203 | grep -q __ELF__
204 then
205 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
206 # Return netbsd for either. FIX?
207 os=netbsd
208 else
209 os=netbsdelf
210 fi
211 ;;
212 *)
213 os=netbsd
214 ;;
215 esac
216 # Determine ABI tags.
217 case "$UNAME_MACHINE_ARCH" in
218 earm*)
219 expr='s/^earmv[0-9]/-eabi/;s/eb$//'
220 abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
221 ;;
222 esac
223 # The OS release
224 # Debian GNU/NetBSD machines have a different userland, and
225 # thus, need a distinct triplet. However, they do not need
226 # kernel version information, so it can be replaced with a
227 # suitable tag, in the style of linux-gnu.
228 case "$UNAME_VERSION" in
229 Debian*)
230 release='-gnu'
231 ;;
232 *)
233 release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
234 ;;
235 esac
236 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
237 # contains redundant information, the shorter form:
238 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
239 echo "$machine-${os}${release}${abi}"
240 exit ;;
241 *:Bitrig:*:*)
242 UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
243 echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
244 exit ;;
245 *:OpenBSD:*:*)
246 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
247 echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
248 exit ;;
249 *:LibertyBSD:*:*)
250 UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
251 echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
252 exit ;;
253 *:MidnightBSD:*:*)
254 echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
255 exit ;;
256 *:ekkoBSD:*:*)
257 echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
258 exit ;;
259 *:SolidBSD:*:*)
260 echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
261 exit ;;
262 macppc:MirBSD:*:*)
263 echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
264 exit ;;
265 *:MirBSD:*:*)
266 echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
267 exit ;;
268 *:Sortix:*:*)
269 echo "$UNAME_MACHINE"-unknown-sortix
270 exit ;;
271 *:Redox:*:*)
272 echo "$UNAME_MACHINE"-unknown-redox
273 exit ;;
274 mips:OSF1:*.*)
275 echo mips-dec-osf1
276 exit ;;
277 alpha:OSF1:*:*)
278 case $UNAME_RELEASE in
279 *4.0)
280 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
281 ;;
282 *5.*)
283 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
284 ;;
285 esac
286 # According to Compaq, /usr/sbin/psrinfo has been available on
287 # OSF/1 and Tru64 systems produced since 1995. I hope that
288 # covers most systems running today. This code pipes the CPU
289 # types through head -n 1, so we only detect the type of CPU 0.
290 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
291 case "$ALPHA_CPU_TYPE" in
292 "EV4 (21064)")
293 UNAME_MACHINE=alpha ;;
294 "EV4.5 (21064)")
295 UNAME_MACHINE=alpha ;;
296 "LCA4 (21066/21068)")
297 UNAME_MACHINE=alpha ;;
298 "EV5 (21164)")
299 UNAME_MACHINE=alphaev5 ;;
300 "EV5.6 (21164A)")
301 UNAME_MACHINE=alphaev56 ;;
302 "EV5.6 (21164PC)")
303 UNAME_MACHINE=alphapca56 ;;
304 "EV5.7 (21164PC)")
305 UNAME_MACHINE=alphapca57 ;;
306 "EV6 (21264)")
307 UNAME_MACHINE=alphaev6 ;;
308 "EV6.7 (21264A)")
309 UNAME_MACHINE=alphaev67 ;;
310 "EV6.8CB (21264C)")
311 UNAME_MACHINE=alphaev68 ;;
312 "EV6.8AL (21264B)")
313 UNAME_MACHINE=alphaev68 ;;
314 "EV6.8CX (21264D)")
315 UNAME_MACHINE=alphaev68 ;;
316 "EV6.9A (21264/EV69A)")
317 UNAME_MACHINE=alphaev69 ;;
318 "EV7 (21364)")
319 UNAME_MACHINE=alphaev7 ;;
320 "EV7.9 (21364A)")
321 UNAME_MACHINE=alphaev79 ;;
322 esac
323 # A Pn.n version is a patched version.
324 # A Vn.n version is a released version.
325 # A Tn.n version is a released field test version.
326 # A Xn.n version is an unreleased experimental baselevel.
327 # 1.2 uses "1.2" for uname -r.
328 echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
329 # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
330 exitcode=$?
331 trap '' 0
332 exit $exitcode ;;
333 Amiga*:UNIX_System_V:4.0:*)
334 echo m68k-unknown-sysv4
335 exit ;;
336 *:[Aa]miga[Oo][Ss]:*:*)
337 echo "$UNAME_MACHINE"-unknown-amigaos
338 exit ;;
339 *:[Mm]orph[Oo][Ss]:*:*)
340 echo "$UNAME_MACHINE"-unknown-morphos
341 exit ;;
342 *:OS/390:*:*)
343 echo i370-ibm-openedition
344 exit ;;
345 *:z/VM:*:*)
346 echo s390-ibm-zvmoe
347 exit ;;
348 *:OS400:*:*)
349 echo powerpc-ibm-os400
350 exit ;;
351 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
352 echo arm-acorn-riscix"$UNAME_RELEASE"
353 exit ;;
354 arm*:riscos:*:*|arm*:RISCOS:*:*)
355 echo arm-unknown-riscos
356 exit ;;
357 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
358 echo hppa1.1-hitachi-hiuxmpp
359 exit ;;
360 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
361 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
362 if test "`(/bin/universe) 2>/dev/null`" = att ; then
363 echo pyramid-pyramid-sysv3
364 else
365 echo pyramid-pyramid-bsd
366 fi
367 exit ;;
368 NILE*:*:*:dcosx)
369 echo pyramid-pyramid-svr4
370 exit ;;
371 DRS?6000:unix:4.0:6*)
372 echo sparc-icl-nx6
373 exit ;;
374 DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
375 case `/usr/bin/uname -p` in
376 sparc) echo sparc-icl-nx7; exit ;;
377 esac ;;
378 s390x:SunOS:*:*)
379 echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
380 exit ;;
381 sun4H:SunOS:5.*:*)
382 echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
383 exit ;;
384 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
385 echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
386 exit ;;
387 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
388 echo i386-pc-auroraux"$UNAME_RELEASE"
389 exit ;;
390 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
391 eval "$set_cc_for_build"
392 SUN_ARCH=i386
393 # If there is a compiler, see if it is configured for 64-bit objects.
394 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
395 # This test works for both compilers.
396 if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
397 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
398 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
399 grep IS_64BIT_ARCH >/dev/null
400 then
401 SUN_ARCH=x86_64
402 fi
403 fi
404 echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
405 exit ;;
406 sun4*:SunOS:6*:*)
407 # According to config.sub, this is the proper way to canonicalize
408 # SunOS6. Hard to guess exactly what SunOS6 will be like, but
409 # it's likely to be more like Solaris than SunOS4.
410 echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
411 exit ;;
412 sun4*:SunOS:*:*)
413 case "`/usr/bin/arch -k`" in
414 Series*|S4*)
415 UNAME_RELEASE=`uname -v`
416 ;;
417 esac
418 # Japanese Language versions have a version number like `4.1.3-JL'.
419 echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`"
420 exit ;;
421 sun3*:SunOS:*:*)
422 echo m68k-sun-sunos"$UNAME_RELEASE"
423 exit ;;
424 sun*:*:4.2BSD:*)
425 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
426 test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
427 case "`/bin/arch`" in
428 sun3)
429 echo m68k-sun-sunos"$UNAME_RELEASE"
430 ;;
431 sun4)
432 echo sparc-sun-sunos"$UNAME_RELEASE"
433 ;;
434 esac
435 exit ;;
436 aushp:SunOS:*:*)
437 echo sparc-auspex-sunos"$UNAME_RELEASE"
438 exit ;;
439 # The situation for MiNT is a little confusing. The machine name
440 # can be virtually everything (everything which is not
441 # "atarist" or "atariste" at least should have a processor
442 # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
443 # to the lowercase version "mint" (or "freemint"). Finally
444 # the system name "TOS" denotes a system which is actually not
445 # MiNT. But MiNT is downward compatible to TOS, so this should
446 # be no problem.
447 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
448 echo m68k-atari-mint"$UNAME_RELEASE"
449 exit ;;
450 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
451 echo m68k-atari-mint"$UNAME_RELEASE"
452 exit ;;
453 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
454 echo m68k-atari-mint"$UNAME_RELEASE"
455 exit ;;
456 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
457 echo m68k-milan-mint"$UNAME_RELEASE"
458 exit ;;
459 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
460 echo m68k-hades-mint"$UNAME_RELEASE"
461 exit ;;
462 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
463 echo m68k-unknown-mint"$UNAME_RELEASE"
464 exit ;;
465 m68k:machten:*:*)
466 echo m68k-apple-machten"$UNAME_RELEASE"
467 exit ;;
468 powerpc:machten:*:*)
469 echo powerpc-apple-machten"$UNAME_RELEASE"
470 exit ;;
471 RISC*:Mach:*:*)
472 echo mips-dec-mach_bsd4.3
473 exit ;;
474 RISC*:ULTRIX:*:*)
475 echo mips-dec-ultrix"$UNAME_RELEASE"
476 exit ;;
477 VAX*:ULTRIX*:*:*)
478 echo vax-dec-ultrix"$UNAME_RELEASE"
479 exit ;;
480 2020:CLIX:*:* | 2430:CLIX:*:*)
481 echo clipper-intergraph-clix"$UNAME_RELEASE"
482 exit ;;
483 mips:*:*:UMIPS | mips:*:*:RISCos)
484 eval "$set_cc_for_build"
485 sed 's/^ //' << EOF > "$dummy.c"
486 #ifdef __cplusplus
487 #include <stdio.h> /* for printf() prototype */
488 int main (int argc, char *argv[]) {
489 #else
490 int main (argc, argv) int argc; char *argv[]; {
491 #endif
492 #if defined (host_mips) && defined (MIPSEB)
493 #if defined (SYSTYPE_SYSV)
494 printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
495 #endif
496 #if defined (SYSTYPE_SVR4)
497 printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
498 #endif
499 #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
500 printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
501 #endif
502 #endif
503 exit (-1);
504 }
505 EOF
506 $CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
507 dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
508 SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
509 { echo "$SYSTEM_NAME"; exit; }
510 echo mips-mips-riscos"$UNAME_RELEASE"
511 exit ;;
512 Motorola:PowerMAX_OS:*:*)
513 echo powerpc-motorola-powermax
514 exit ;;
515 Motorola:*:4.3:PL8-*)
516 echo powerpc-harris-powermax
517 exit ;;
518 Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
519 echo powerpc-harris-powermax
520 exit ;;
521 Night_Hawk:Power_UNIX:*:*)
522 echo powerpc-harris-powerunix
523 exit ;;
524 m88k:CX/UX:7*:*)
525 echo m88k-harris-cxux7
526 exit ;;
527 m88k:*:4*:R4*)
528 echo m88k-motorola-sysv4
529 exit ;;
530 m88k:*:3*:R3*)
531 echo m88k-motorola-sysv3
532 exit ;;
533 AViiON:dgux:*:*)
534 # DG/UX returns AViiON for all architectures
535 UNAME_PROCESSOR=`/usr/bin/uname -p`
536 if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
537 then
538 if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
539 [ "$TARGET_BINARY_INTERFACE"x = x ]
540 then
541 echo m88k-dg-dgux"$UNAME_RELEASE"
542 else
543 echo m88k-dg-dguxbcs"$UNAME_RELEASE"
544 fi
545 else
546 echo i586-dg-dgux"$UNAME_RELEASE"
547 fi
548 exit ;;
549 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
550 echo m88k-dolphin-sysv3
551 exit ;;
552 M88*:*:R3*:*)
553 # Delta 88k system running SVR3
554 echo m88k-motorola-sysv3
555 exit ;;
556 XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
557 echo m88k-tektronix-sysv3
558 exit ;;
559 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
560 echo m68k-tektronix-bsd
561 exit ;;
562 *:IRIX*:*:*)
563 echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`"
564 exit ;;
565 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
566 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
567 exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
568 i*86:AIX:*:*)
569 echo i386-ibm-aix
570 exit ;;
571 ia64:AIX:*:*)
572 if [ -x /usr/bin/oslevel ] ; then
573 IBM_REV=`/usr/bin/oslevel`
574 else
575 IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
576 fi
577 echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
578 exit ;;
579 *:AIX:2:3)
580 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
581 eval "$set_cc_for_build"
582 sed 's/^ //' << EOF > "$dummy.c"
583 #include <sys/systemcfg.h>
584
585 main()
586 {
587 if (!__power_pc())
588 exit(1);
589 puts("powerpc-ibm-aix3.2.5");
590 exit(0);
591 }
592 EOF
593 if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
594 then
595 echo "$SYSTEM_NAME"
596 else
597 echo rs6000-ibm-aix3.2.5
598 fi
599 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
600 echo rs6000-ibm-aix3.2.4
601 else
602 echo rs6000-ibm-aix3.2
603 fi
604 exit ;;
605 *:AIX:*:[4567])
606 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
607 if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
608 IBM_ARCH=rs6000
609 else
610 IBM_ARCH=powerpc
611 fi
612 if [ -x /usr/bin/lslpp ] ; then
613 IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
614 awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
615 else
616 IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
617 fi
618 echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
619 exit ;;
620 *:AIX:*:*)
621 echo rs6000-ibm-aix
622 exit ;;
623 ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
624 echo romp-ibm-bsd4.4
625 exit ;;
626 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
627 echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to
628 exit ;; # report: romp-ibm BSD 4.3
629 *:BOSX:*:*)
630 echo rs6000-bull-bosx
631 exit ;;
632 DPX/2?00:B.O.S.:*:*)
633 echo m68k-bull-sysv3
634 exit ;;
635 9000/[34]??:4.3bsd:1.*:*)
636 echo m68k-hp-bsd
637 exit ;;
638 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
639 echo m68k-hp-bsd4.4
640 exit ;;
641 9000/[34678]??:HP-UX:*:*)
642 HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
643 case "$UNAME_MACHINE" in
644 9000/31?) HP_ARCH=m68000 ;;
645 9000/[34]??) HP_ARCH=m68k ;;
646 9000/[678][0-9][0-9])
647 if [ -x /usr/bin/getconf ]; then
648 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
649 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
650 case "$sc_cpu_version" in
651 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
652 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
653 532) # CPU_PA_RISC2_0
654 case "$sc_kernel_bits" in
655 32) HP_ARCH=hppa2.0n ;;
656 64) HP_ARCH=hppa2.0w ;;
657 '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
658 esac ;;
659 esac
660 fi
661 if [ "$HP_ARCH" = "" ]; then
662 eval "$set_cc_for_build"
663 sed 's/^ //' << EOF > "$dummy.c"
664
665 #define _HPUX_SOURCE
666 #include <stdlib.h>
667 #include <unistd.h>
668
669 int main ()
670 {
671 #if defined(_SC_KERNEL_BITS)
672 long bits = sysconf(_SC_KERNEL_BITS);
673 #endif
674 long cpu = sysconf (_SC_CPU_VERSION);
675
676 switch (cpu)
677 {
678 case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
679 case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
680 case CPU_PA_RISC2_0:
681 #if defined(_SC_KERNEL_BITS)
682 switch (bits)
683 {
684 case 64: puts ("hppa2.0w"); break;
685 case 32: puts ("hppa2.0n"); break;
686 default: puts ("hppa2.0"); break;
687 } break;
688 #else /* !defined(_SC_KERNEL_BITS) */
689 puts ("hppa2.0"); break;
690 #endif
691 default: puts ("hppa1.0"); break;
692 }
693 exit (0);
694 }
695 EOF
696 (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
697 test -z "$HP_ARCH" && HP_ARCH=hppa
698 fi ;;
699 esac
700 if [ "$HP_ARCH" = hppa2.0w ]
701 then
702 eval "$set_cc_for_build"
703
704 # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
705 # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
706 # generating 64-bit code. GNU and HP use different nomenclature:
707 #
708 # $ CC_FOR_BUILD=cc ./config.guess
709 # => hppa2.0w-hp-hpux11.23
710 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
711 # => hppa64-hp-hpux11.23
712
713 if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
714 grep -q __LP64__
715 then
716 HP_ARCH=hppa2.0w
717 else
718 HP_ARCH=hppa64
719 fi
720 fi
721 echo "$HP_ARCH"-hp-hpux"$HPUX_REV"
722 exit ;;
723 ia64:HP-UX:*:*)
724 HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
725 echo ia64-hp-hpux"$HPUX_REV"
726 exit ;;
727 3050*:HI-UX:*:*)
728 eval "$set_cc_for_build"
729 sed 's/^ //' << EOF > "$dummy.c"
730 #include <unistd.h>
731 int
732 main ()
733 {
734 long cpu = sysconf (_SC_CPU_VERSION);
735 /* The order matters, because CPU_IS_HP_MC68K erroneously returns
736 true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
737 results, however. */
738 if (CPU_IS_PA_RISC (cpu))
739 {
740 switch (cpu)
741 {
742 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
743 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
744 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
745 default: puts ("hppa-hitachi-hiuxwe2"); break;
746 }
747 }
748 else if (CPU_IS_HP_MC68K (cpu))
749 puts ("m68k-hitachi-hiuxwe2");
750 else puts ("unknown-hitachi-hiuxwe2");
751 exit (0);
752 }
753 EOF
754 $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
755 { echo "$SYSTEM_NAME"; exit; }
756 echo unknown-hitachi-hiuxwe2
757 exit ;;
758 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
759 echo hppa1.1-hp-bsd
760 exit ;;
761 9000/8??:4.3bsd:*:*)
762 echo hppa1.0-hp-bsd
763 exit ;;
764 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
765 echo hppa1.0-hp-mpeix
766 exit ;;
767 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
768 echo hppa1.1-hp-osf
769 exit ;;
770 hp8??:OSF1:*:*)
771 echo hppa1.0-hp-osf
772 exit ;;
773 i*86:OSF1:*:*)
774 if [ -x /usr/sbin/sysversion ] ; then
775 echo "$UNAME_MACHINE"-unknown-osf1mk
776 else
777 echo "$UNAME_MACHINE"-unknown-osf1
778 fi
779 exit ;;
780 parisc*:Lites*:*:*)
781 echo hppa1.1-hp-lites
782 exit ;;
783 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
784 echo c1-convex-bsd
785 exit ;;
786 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
787 if getsysinfo -f scalar_acc
788 then echo c32-convex-bsd
789 else echo c2-convex-bsd
790 fi
791 exit ;;
792 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
793 echo c34-convex-bsd
794 exit ;;
795 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
796 echo c38-convex-bsd
797 exit ;;
798 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
799 echo c4-convex-bsd
800 exit ;;
801 CRAY*Y-MP:*:*:*)
802 echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
803 exit ;;
804 CRAY*[A-Z]90:*:*:*)
805 echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
806 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
807 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
808 -e 's/\.[^.]*$/.X/'
809 exit ;;
810 CRAY*TS:*:*:*)
811 echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
812 exit ;;
813 CRAY*T3E:*:*:*)
814 echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
815 exit ;;
816 CRAY*SV1:*:*:*)
817 echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
818 exit ;;
819 *:UNICOS/mp:*:*)
820 echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
821 exit ;;
822 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
823 FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
824 FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
825 FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
826 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
827 exit ;;
828 5000:UNIX_System_V:4.*:*)
829 FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
830 FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
831 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
832 exit ;;
833 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
834 echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE"
835 exit ;;
836 sparc*:BSD/OS:*:*)
837 echo sparc-unknown-bsdi"$UNAME_RELEASE"
838 exit ;;
839 *:BSD/OS:*:*)
840 echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
841 exit ;;
842 *:FreeBSD:*:*)
843 UNAME_PROCESSOR=`/usr/bin/uname -p`
844 case "$UNAME_PROCESSOR" in
845 amd64)
846 UNAME_PROCESSOR=x86_64 ;;
847 i386)
848 UNAME_PROCESSOR=i586 ;;
849 esac
850 echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
851 exit ;;
852 i*:CYGWIN*:*)
853 echo "$UNAME_MACHINE"-pc-cygwin
854 exit ;;
855 *:MINGW64*:*)
856 echo "$UNAME_MACHINE"-pc-mingw64
857 exit ;;
858 *:MINGW*:*)
859 echo "$UNAME_MACHINE"-pc-mingw32
860 exit ;;
861 *:MSYS*:*)
862 echo "$UNAME_MACHINE"-pc-msys
863 exit ;;
864 i*:PW*:*)
865 echo "$UNAME_MACHINE"-pc-pw32
866 exit ;;
867 *:Interix*:*)
868 case "$UNAME_MACHINE" in
869 x86)
870 echo i586-pc-interix"$UNAME_RELEASE"
871 exit ;;
872 authenticamd | genuineintel | EM64T)
873 echo x86_64-unknown-interix"$UNAME_RELEASE"
874 exit ;;
875 IA64)
876 echo ia64-unknown-interix"$UNAME_RELEASE"
877 exit ;;
878 esac ;;
879 i*:UWIN*:*)
880 echo "$UNAME_MACHINE"-pc-uwin
881 exit ;;
882 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
883 echo x86_64-unknown-cygwin
884 exit ;;
885 prep*:SunOS:5.*:*)
886 echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
887 exit ;;
888 *:GNU:*:*)
889 # the GNU system
890 echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`"
891 exit ;;
892 *:GNU/*:*:*)
893 # other systems with GNU libc and userland
894 echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
895 exit ;;
896 i*86:Minix:*:*)
897 echo "$UNAME_MACHINE"-pc-minix
898 exit ;;
899 aarch64:Linux:*:*)
900 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
901 exit ;;
902 aarch64_be:Linux:*:*)
903 UNAME_MACHINE=aarch64_be
904 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
905 exit ;;
906 alpha:Linux:*:*)
907 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
908 EV5) UNAME_MACHINE=alphaev5 ;;
909 EV56) UNAME_MACHINE=alphaev56 ;;
910 PCA56) UNAME_MACHINE=alphapca56 ;;
911 PCA57) UNAME_MACHINE=alphapca56 ;;
912 EV6) UNAME_MACHINE=alphaev6 ;;
913 EV67) UNAME_MACHINE=alphaev67 ;;
914 EV68*) UNAME_MACHINE=alphaev68 ;;
915 esac
916 objdump --private-headers /bin/sh | grep -q ld.so.1
917 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
918 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
919 exit ;;
920 arc:Linux:*:* | arceb:Linux:*:*)
921 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
922 exit ;;
923 arm*:Linux:*:*)
924 eval "$set_cc_for_build"
925 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
926 | grep -q __ARM_EABI__
927 then
928 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
929 else
930 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
931 | grep -q __ARM_PCS_VFP
932 then
933 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi
934 else
935 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf
936 fi
937 fi
938 exit ;;
939 avr32*:Linux:*:*)
940 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
941 exit ;;
942 cris:Linux:*:*)
943 echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
944 exit ;;
945 crisv32:Linux:*:*)
946 echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
947 exit ;;
948 e2k:Linux:*:*)
949 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
950 exit ;;
951 frv:Linux:*:*)
952 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
953 exit ;;
954 hexagon:Linux:*:*)
955 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
956 exit ;;
957 i*86:Linux:*:*)
958 echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
959 exit ;;
960 ia64:Linux:*:*)
961 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
962 exit ;;
963 k1om:Linux:*:*)
964 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
965 exit ;;
966 m32r*:Linux:*:*)
967 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
968 exit ;;
969 m68*:Linux:*:*)
970 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
971 exit ;;
972 mips:Linux:*:* | mips64:Linux:*:*)
973 eval "$set_cc_for_build"
974 sed 's/^ //' << EOF > "$dummy.c"
975 #undef CPU
976 #undef ${UNAME_MACHINE}
977 #undef ${UNAME_MACHINE}el
978 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
979 CPU=${UNAME_MACHINE}el
980 #else
981 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
982 CPU=${UNAME_MACHINE}
983 #else
984 CPU=
985 #endif
986 #endif
987 EOF
988 eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`"
989 test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; }
990 ;;
991 mips64el:Linux:*:*)
992 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
993 exit ;;
994 openrisc*:Linux:*:*)
995 echo or1k-unknown-linux-"$LIBC"
996 exit ;;
997 or32:Linux:*:* | or1k*:Linux:*:*)
998 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
999 exit ;;
1000 padre:Linux:*:*)
1001 echo sparc-unknown-linux-"$LIBC"
1002 exit ;;
1003 parisc64:Linux:*:* | hppa64:Linux:*:*)
1004 echo hppa64-unknown-linux-"$LIBC"
1005 exit ;;
1006 parisc:Linux:*:* | hppa:Linux:*:*)
1007 # Look for CPU level
1008 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
1009 PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
1010 PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
1011 *) echo hppa-unknown-linux-"$LIBC" ;;
1012 esac
1013 exit ;;
1014 ppc64:Linux:*:*)
1015 echo powerpc64-unknown-linux-"$LIBC"
1016 exit ;;
1017 ppc:Linux:*:*)
1018 echo powerpc-unknown-linux-"$LIBC"
1019 exit ;;
1020 ppc64le:Linux:*:*)
1021 echo powerpc64le-unknown-linux-"$LIBC"
1022 exit ;;
1023 ppcle:Linux:*:*)
1024 echo powerpcle-unknown-linux-"$LIBC"
1025 exit ;;
1026 riscv32:Linux:*:* | riscv64:Linux:*:*)
1027 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1028 exit ;;
1029 s390:Linux:*:* | s390x:Linux:*:*)
1030 echo "$UNAME_MACHINE"-ibm-linux-"$LIBC"
1031 exit ;;
1032 sh64*:Linux:*:*)
1033 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1034 exit ;;
1035 sh*:Linux:*:*)
1036 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1037 exit ;;
1038 sparc:Linux:*:* | sparc64:Linux:*:*)
1039 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1040 exit ;;
1041 tile*:Linux:*:*)
1042 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1043 exit ;;
1044 vax:Linux:*:*)
1045 echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
1046 exit ;;
1047 x86_64:Linux:*:*)
1048 if objdump -f /bin/sh | grep -q elf32-x86-64; then
1049 echo "$UNAME_MACHINE"-pc-linux-"$LIBC"x32
1050 else
1051 echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
1052 fi
1053 exit ;;
1054 xtensa*:Linux:*:*)
1055 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1056 exit ;;
1057 i*86:DYNIX/ptx:4*:*)
1058 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
1059 # earlier versions are messed up and put the nodename in both
1060 # sysname and nodename.
1061 echo i386-sequent-sysv4
1062 exit ;;
1063 i*86:UNIX_SV:4.2MP:2.*)
1064 # Unixware is an offshoot of SVR4, but it has its own version
1065 # number series starting with 2...
1066 # I am not positive that other SVR4 systems won't match this,
1067 # I just have to hope. -- rms.
1068 # Use sysv4.2uw... so that sysv4* matches it.
1069 echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION"
1070 exit ;;
1071 i*86:OS/2:*:*)
1072 # If we were able to find `uname', then EMX Unix compatibility
1073 # is probably installed.
1074 echo "$UNAME_MACHINE"-pc-os2-emx
1075 exit ;;
1076 i*86:XTS-300:*:STOP)
1077 echo "$UNAME_MACHINE"-unknown-stop
1078 exit ;;
1079 i*86:atheos:*:*)
1080 echo "$UNAME_MACHINE"-unknown-atheos
1081 exit ;;
1082 i*86:syllable:*:*)
1083 echo "$UNAME_MACHINE"-pc-syllable
1084 exit ;;
1085 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1086 echo i386-unknown-lynxos"$UNAME_RELEASE"
1087 exit ;;
1088 i*86:*DOS:*:*)
1089 echo "$UNAME_MACHINE"-pc-msdosdjgpp
1090 exit ;;
1091 i*86:*:4.*:*)
1092 UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
1093 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1094 echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
1095 else
1096 echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL"
1097 fi
1098 exit ;;
1099 i*86:*:5:[678]*)
1100 # UnixWare 7.x, OpenUNIX and OpenServer 6.
1101 case `/bin/uname -X | grep "^Machine"` in
1102 *486*) UNAME_MACHINE=i486 ;;
1103 *Pentium) UNAME_MACHINE=i586 ;;
1104 *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1105 esac
1106 echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}"
1107 exit ;;
1108 i*86:*:3.2:*)
1109 if test -f /usr/options/cb.name; then
1110 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1111 echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL"
1112 elif /bin/uname -X 2>/dev/null >/dev/null ; then
1113 UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
1114 (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
1115 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
1116 && UNAME_MACHINE=i586
1117 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
1118 && UNAME_MACHINE=i686
1119 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
1120 && UNAME_MACHINE=i686
1121 echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL"
1122 else
1123 echo "$UNAME_MACHINE"-pc-sysv32
1124 fi
1125 exit ;;
1126 pc:*:*:*)
1127 # Left here for compatibility:
1128 # uname -m prints for DJGPP always 'pc', but it prints nothing about
1129 # the processor, so we play safe by assuming i586.
1130 # Note: whatever this is, it MUST be the same as what config.sub
1131 # prints for the "djgpp" host, or else GDB configure will decide that
1132 # this is a cross-build.
1133 echo i586-pc-msdosdjgpp
1134 exit ;;
1135 Intel:Mach:3*:*)
1136 echo i386-pc-mach3
1137 exit ;;
1138 paragon:*:*:*)
1139 echo i860-intel-osf1
1140 exit ;;
1141 i860:*:4.*:*) # i860-SVR4
1142 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1143 echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4
1144 else # Add other i860-SVR4 vendors below as they are discovered.
1145 echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4
1146 fi
1147 exit ;;
1148 mini*:CTIX:SYS*5:*)
1149 # "miniframe"
1150 echo m68010-convergent-sysv
1151 exit ;;
1152 mc68k:UNIX:SYSTEM5:3.51m)
1153 echo m68k-convergent-sysv
1154 exit ;;
1155 M680?0:D-NIX:5.3:*)
1156 echo m68k-diab-dnix
1157 exit ;;
1158 M68*:*:R3V[5678]*:*)
1159 test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
1160 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)
1161 OS_REL=''
1162 test -r /etc/.relid \
1163 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1164 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1165 && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
1166 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1167 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
1168 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1169 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1170 && { echo i486-ncr-sysv4; exit; } ;;
1171 NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1172 OS_REL='.3'
1173 test -r /etc/.relid \
1174 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1175 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1176 && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
1177 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1178 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
1179 /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1180 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
1181 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1182 echo m68k-unknown-lynxos"$UNAME_RELEASE"
1183 exit ;;
1184 mc68030:UNIX_System_V:4.*:*)
1185 echo m68k-atari-sysv4
1186 exit ;;
1187 TSUNAMI:LynxOS:2.*:*)
1188 echo sparc-unknown-lynxos"$UNAME_RELEASE"
1189 exit ;;
1190 rs6000:LynxOS:2.*:*)
1191 echo rs6000-unknown-lynxos"$UNAME_RELEASE"
1192 exit ;;
1193 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1194 echo powerpc-unknown-lynxos"$UNAME_RELEASE"
1195 exit ;;
1196 SM[BE]S:UNIX_SV:*:*)
1197 echo mips-dde-sysv"$UNAME_RELEASE"
1198 exit ;;
1199 RM*:ReliantUNIX-*:*:*)
1200 echo mips-sni-sysv4
1201 exit ;;
1202 RM*:SINIX-*:*:*)
1203 echo mips-sni-sysv4
1204 exit ;;
1205 *:SINIX-*:*:*)
1206 if uname -p 2>/dev/null >/dev/null ; then
1207 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1208 echo "$UNAME_MACHINE"-sni-sysv4
1209 else
1210 echo ns32k-sni-sysv
1211 fi
1212 exit ;;
1213 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1214 # says <Richard.M.Bartel@ccMail.Census.GOV>
1215 echo i586-unisys-sysv4
1216 exit ;;
1217 *:UNIX_System_V:4*:FTX*)
1218 # From Gerald Hewes <hewes@openmarket.com>.
1219 # How about differentiating between stratus architectures? -djm
1220 echo hppa1.1-stratus-sysv4
1221 exit ;;
1222 *:*:*:FTX*)
1223 # From seanf@swdc.stratus.com.
1224 echo i860-stratus-sysv4
1225 exit ;;
1226 i*86:VOS:*:*)
1227 # From Paul.Green@stratus.com.
1228 echo "$UNAME_MACHINE"-stratus-vos
1229 exit ;;
1230 *:VOS:*:*)
1231 # From Paul.Green@stratus.com.
1232 echo hppa1.1-stratus-vos
1233 exit ;;
1234 mc68*:A/UX:*:*)
1235 echo m68k-apple-aux"$UNAME_RELEASE"
1236 exit ;;
1237 news*:NEWS-OS:6*:*)
1238 echo mips-sony-newsos6
1239 exit ;;
1240 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1241 if [ -d /usr/nec ]; then
1242 echo mips-nec-sysv"$UNAME_RELEASE"
1243 else
1244 echo mips-unknown-sysv"$UNAME_RELEASE"
1245 fi
1246 exit ;;
1247 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1248 echo powerpc-be-beos
1249 exit ;;
1250 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
1251 echo powerpc-apple-beos
1252 exit ;;
1253 BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
1254 echo i586-pc-beos
1255 exit ;;
1256 BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
1257 echo i586-pc-haiku
1258 exit ;;
1259 x86_64:Haiku:*:*)
1260 echo x86_64-unknown-haiku
1261 exit ;;
1262 SX-4:SUPER-UX:*:*)
1263 echo sx4-nec-superux"$UNAME_RELEASE"
1264 exit ;;
1265 SX-5:SUPER-UX:*:*)
1266 echo sx5-nec-superux"$UNAME_RELEASE"
1267 exit ;;
1268 SX-6:SUPER-UX:*:*)
1269 echo sx6-nec-superux"$UNAME_RELEASE"
1270 exit ;;
1271 SX-7:SUPER-UX:*:*)
1272 echo sx7-nec-superux"$UNAME_RELEASE"
1273 exit ;;
1274 SX-8:SUPER-UX:*:*)
1275 echo sx8-nec-superux"$UNAME_RELEASE"
1276 exit ;;
1277 SX-8R:SUPER-UX:*:*)
1278 echo sx8r-nec-superux"$UNAME_RELEASE"
1279 exit ;;
1280 SX-ACE:SUPER-UX:*:*)
1281 echo sxace-nec-superux"$UNAME_RELEASE"
1282 exit ;;
1283 Power*:Rhapsody:*:*)
1284 echo powerpc-apple-rhapsody"$UNAME_RELEASE"
1285 exit ;;
1286 *:Rhapsody:*:*)
1287 echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
1288 exit ;;
1289 *:Darwin:*:*)
1290 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1291 eval "$set_cc_for_build"
1292 if test "$UNAME_PROCESSOR" = unknown ; then
1293 UNAME_PROCESSOR=powerpc
1294 fi
1295 if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
1296 if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
1297 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1298 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1299 grep IS_64BIT_ARCH >/dev/null
1300 then
1301 case $UNAME_PROCESSOR in
1302 i386) UNAME_PROCESSOR=x86_64 ;;
1303 powerpc) UNAME_PROCESSOR=powerpc64 ;;
1304 esac
1305 fi
1306 # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
1307 if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
1308 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1309 grep IS_PPC >/dev/null
1310 then
1311 UNAME_PROCESSOR=powerpc
1312 fi
1313 fi
1314 elif test "$UNAME_PROCESSOR" = i386 ; then
1315 # Avoid executing cc on OS X 10.9, as it ships with a stub
1316 # that puts up a graphical alert prompting to install
1317 # developer tools. Any system running Mac OS X 10.7 or
1318 # later (Darwin 11 and later) is required to have a 64-bit
1319 # processor. This is not true of the ARM version of Darwin
1320 # that Apple uses in portable devices.
1321 UNAME_PROCESSOR=x86_64
1322 fi
1323 echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
1324 exit ;;
1325 *:procnto*:*:* | *:QNX:[0123456789]*:*)
1326 UNAME_PROCESSOR=`uname -p`
1327 if test "$UNAME_PROCESSOR" = x86; then
1328 UNAME_PROCESSOR=i386
1329 UNAME_MACHINE=pc
1330 fi
1331 echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE"
1332 exit ;;
1333 *:QNX:*:4*)
1334 echo i386-pc-qnx
1335 exit ;;
1336 NEO-*:NONSTOP_KERNEL:*:*)
1337 echo neo-tandem-nsk"$UNAME_RELEASE"
1338 exit ;;
1339 NSE-*:NONSTOP_KERNEL:*:*)
1340 echo nse-tandem-nsk"$UNAME_RELEASE"
1341 exit ;;
1342 NSR-*:NONSTOP_KERNEL:*:*)
1343 echo nsr-tandem-nsk"$UNAME_RELEASE"
1344 exit ;;
1345 NSV-*:NONSTOP_KERNEL:*:*)
1346 echo nsv-tandem-nsk"$UNAME_RELEASE"
1347 exit ;;
1348 NSX-*:NONSTOP_KERNEL:*:*)
1349 echo nsx-tandem-nsk"$UNAME_RELEASE"
1350 exit ;;
1351 *:NonStop-UX:*:*)
1352 echo mips-compaq-nonstopux
1353 exit ;;
1354 BS2000:POSIX*:*:*)
1355 echo bs2000-siemens-sysv
1356 exit ;;
1357 DS/*:UNIX_System_V:*:*)
1358 echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE"
1359 exit ;;
1360 *:Plan9:*:*)
1361 # "uname -m" is not consistent, so use $cputype instead. 386
1362 # is converted to i386 for consistency with other x86
1363 # operating systems.
1364 if test "$cputype" = 386; then
1365 UNAME_MACHINE=i386
1366 else
1367 UNAME_MACHINE="$cputype"
1368 fi
1369 echo "$UNAME_MACHINE"-unknown-plan9
1370 exit ;;
1371 *:TOPS-10:*:*)
1372 echo pdp10-unknown-tops10
1373 exit ;;
1374 *:TENEX:*:*)
1375 echo pdp10-unknown-tenex
1376 exit ;;
1377 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1378 echo pdp10-dec-tops20
1379 exit ;;
1380 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
1381 echo pdp10-xkl-tops20
1382 exit ;;
1383 *:TOPS-20:*:*)
1384 echo pdp10-unknown-tops20
1385 exit ;;
1386 *:ITS:*:*)
1387 echo pdp10-unknown-its
1388 exit ;;
1389 SEI:*:*:SEIUX)
1390 echo mips-sei-seiux"$UNAME_RELEASE"
1391 exit ;;
1392 *:DragonFly:*:*)
1393 echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
1394 exit ;;
1395 *:*VMS:*:*)
1396 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1397 case "$UNAME_MACHINE" in
1398 A*) echo alpha-dec-vms ; exit ;;
1399 I*) echo ia64-dec-vms ; exit ;;
1400 V*) echo vax-dec-vms ; exit ;;
1401 esac ;;
1402 *:XENIX:*:SysV)
1403 echo i386-pc-xenix
1404 exit ;;
1405 i*86:skyos:*:*)
1406 echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`"
1407 exit ;;
1408 i*86:rdos:*:*)
1409 echo "$UNAME_MACHINE"-pc-rdos
1410 exit ;;
1411 i*86:AROS:*:*)
1412 echo "$UNAME_MACHINE"-pc-aros
1413 exit ;;
1414 x86_64:VMkernel:*:*)
1415 echo "$UNAME_MACHINE"-unknown-esx
1416 exit ;;
1417 amd64:Isilon\ OneFS:*:*)
1418 echo x86_64-unknown-onefs
1419 exit ;;
1420 esac
1421
1422 echo "$0: unable to guess system type" >&2
1423
1424 case "$UNAME_MACHINE:$UNAME_SYSTEM" in
1425 mips:Linux | mips64:Linux)
1426 # If we got here on MIPS GNU/Linux, output extra information.
1427 cat >&2 <<EOF
1428
1429 NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
1430 the system type. Please install a C compiler and try again.
1431 EOF
1432 ;;
1433 esac
1434
1435 cat >&2 <<EOF
1436
1437 This script (version $timestamp), has failed to recognize the
1438 operating system you are using. If your script is old, overwrite *all*
1439 copies of config.guess and config.sub with the latest versions from:
1440
1441 https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
1442 and
1443 https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
1444
1445 If $0 has already been updated, send the following data and any
1446 information you think might be pertinent to config-patches@gnu.org to
1447 provide the necessary information to handle your system.
1448
1449 config.guess timestamp = $timestamp
1450
1451 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1452 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1453 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1454 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1455
1456 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
1457 /bin/uname -X = `(/bin/uname -X) 2>/dev/null`
1458
1459 hostinfo = `(hostinfo) 2>/dev/null`
1460 /bin/universe = `(/bin/universe) 2>/dev/null`
1461 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
1462 /bin/arch = `(/bin/arch) 2>/dev/null`
1463 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
1464 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
1465
1466 UNAME_MACHINE = "$UNAME_MACHINE"
1467 UNAME_RELEASE = "$UNAME_RELEASE"
1468 UNAME_SYSTEM = "$UNAME_SYSTEM"
1469 UNAME_VERSION = "$UNAME_VERSION"
1470 EOF
1471
1472 exit 1
1473
1474 # Local variables:
1475 # eval: (add-hook 'write-file-functions 'time-stamp)
1476 # time-stamp-start: "timestamp='"
1477 # time-stamp-format: "%:y-%02m-%02d"
1478 # time-stamp-end: "'"
1479 # End:
0 /* config.h.in. Generated from configure.ac by autoheader. */
1
2 /* Define to 1 if translation of program messages to the user's native
3 language is requested. */
4 #undef ENABLE_NLS
5
6 /* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the
7 CoreFoundation framework. */
8 #undef HAVE_CFLOCALECOPYCURRENT
9
10 /* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in
11 the CoreFoundation framework. */
12 #undef HAVE_CFPREFERENCESCOPYAPPVALUE
13
14 /* Define if the GNU dcgettext() function is already present or preinstalled.
15 */
16 #undef HAVE_DCGETTEXT
17
18 /* Define to 1 if you have the <dlfcn.h> header file. */
19 #undef HAVE_DLFCN_H
20
21 /* Define if the GNU gettext() function is already present or preinstalled. */
22 #undef HAVE_GETTEXT
23
24 /* Define if you have the iconv() function and it works. */
25 #undef HAVE_ICONV
26
27 /* Define to 1 if you have the <inttypes.h> header file. */
28 #undef HAVE_INTTYPES_H
29
30 /* Define to 1 if you have the <limits.h> header file. */
31 #undef HAVE_LIMITS_H
32
33 /* Define to 1 if your system has a GNU libc compatible `malloc' function, and
34 to 0 otherwise. */
35 #undef HAVE_MALLOC
36
37 /* Define to 1 if you have the <memory.h> header file. */
38 #undef HAVE_MEMORY_H
39
40 /* Set to 1 if you have libsamplerate. */
41 #undef HAVE_SAMPLERATE
42
43 /* Set to 1 if you have libsndfile. */
44 #undef HAVE_SNDFILE
45
46 /* Define to 1 if you have the <stdint.h> header file. */
47 #undef HAVE_STDINT_H
48
49 /* Define to 1 if you have the <stdlib.h> header file. */
50 #undef HAVE_STDLIB_H
51
52 /* Define to 1 if you have the <strings.h> header file. */
53 #undef HAVE_STRINGS_H
54
55 /* Define to 1 if you have the <string.h> header file. */
56 #undef HAVE_STRING_H
57
58 /* Define to 1 if you have the <sys/stat.h> header file. */
59 #undef HAVE_SYS_STAT_H
60
61 /* Define to 1 if you have the <sys/types.h> header file. */
62 #undef HAVE_SYS_TYPES_H
63
64 /* Define to 1 if you have the <unistd.h> header file. */
65 #undef HAVE_UNISTD_H
66
67 /* Define to the sub-directory where libtool stores uninstalled libraries. */
68 #undef LT_OBJDIR
69
70 /* Name of package */
71 #undef PACKAGE
72
73 /* Define to the address where bug reports for this package should be sent. */
74 #undef PACKAGE_BUGREPORT
75
76 /* Define to the full name of this package. */
77 #undef PACKAGE_NAME
78
79 /* Define to the full name and version of this package. */
80 #undef PACKAGE_STRING
81
82 /* Define to the one symbol short name of this package. */
83 #undef PACKAGE_TARNAME
84
85 /* Define to the home page for this package. */
86 #undef PACKAGE_URL
87
88 /* Define to the version of this package. */
89 #undef PACKAGE_VERSION
90
91 /* Define to 1 if you have the ANSI C header files. */
92 #undef STDC_HEADERS
93
94 /* Version number of package */
95 #undef VERSION
96
97 /* Define to rpl_malloc if the replacement function should be used. */
98 #undef malloc
0 #! /bin/sh
1 # Output a system dependent set of variables, describing how to set the
2 # run time search path of shared libraries in an executable.
3 #
4 # Copyright 1996-2014 Free Software Foundation, Inc.
5 # Taken from GNU libtool, 2001
6 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7 #
8 # This file is free software; the Free Software Foundation gives
9 # unlimited permission to copy and/or distribute it, with or without
10 # modifications, as long as this notice is preserved.
11 #
12 # The first argument passed to this file is the canonical host specification,
13 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
14 # or
15 # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
16 # The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
17 # should be set by the caller.
18 #
19 # The set of defined variables is at the end of this script.
20
21 # Known limitations:
22 # - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
23 # than 256 bytes, otherwise the compiler driver will dump core. The only
24 # known workaround is to choose shorter directory names for the build
25 # directory and/or the installation directory.
26
27 # All known linkers require a '.a' archive for static linking (except MSVC,
28 # which needs '.lib').
29 libext=a
30 shrext=.so
31
32 host="$1"
33 host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
34 host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
35 host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
36
37 # Code taken from libtool.m4's _LT_CC_BASENAME.
38
39 for cc_temp in $CC""; do
40 case $cc_temp in
41 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
42 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
43 \-*) ;;
44 *) break;;
45 esac
46 done
47 cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
48
49 # Code taken from libtool.m4's _LT_COMPILER_PIC.
50
51 wl=
52 if test "$GCC" = yes; then
53 wl='-Wl,'
54 else
55 case "$host_os" in
56 aix*)
57 wl='-Wl,'
58 ;;
59 mingw* | cygwin* | pw32* | os2* | cegcc*)
60 ;;
61 hpux9* | hpux10* | hpux11*)
62 wl='-Wl,'
63 ;;
64 irix5* | irix6* | nonstopux*)
65 wl='-Wl,'
66 ;;
67 linux* | k*bsd*-gnu | kopensolaris*-gnu)
68 case $cc_basename in
69 ecc*)
70 wl='-Wl,'
71 ;;
72 icc* | ifort*)
73 wl='-Wl,'
74 ;;
75 lf95*)
76 wl='-Wl,'
77 ;;
78 nagfor*)
79 wl='-Wl,-Wl,,'
80 ;;
81 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
82 wl='-Wl,'
83 ;;
84 ccc*)
85 wl='-Wl,'
86 ;;
87 xl* | bgxl* | bgf* | mpixl*)
88 wl='-Wl,'
89 ;;
90 como)
91 wl='-lopt='
92 ;;
93 *)
94 case `$CC -V 2>&1 | sed 5q` in
95 *Sun\ F* | *Sun*Fortran*)
96 wl=
97 ;;
98 *Sun\ C*)
99 wl='-Wl,'
100 ;;
101 esac
102 ;;
103 esac
104 ;;
105 newsos6)
106 ;;
107 *nto* | *qnx*)
108 ;;
109 osf3* | osf4* | osf5*)
110 wl='-Wl,'
111 ;;
112 rdos*)
113 ;;
114 solaris*)
115 case $cc_basename in
116 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
117 wl='-Qoption ld '
118 ;;
119 *)
120 wl='-Wl,'
121 ;;
122 esac
123 ;;
124 sunos4*)
125 wl='-Qoption ld '
126 ;;
127 sysv4 | sysv4.2uw2* | sysv4.3*)
128 wl='-Wl,'
129 ;;
130 sysv4*MP*)
131 ;;
132 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
133 wl='-Wl,'
134 ;;
135 unicos*)
136 wl='-Wl,'
137 ;;
138 uts4*)
139 ;;
140 esac
141 fi
142
143 # Code taken from libtool.m4's _LT_LINKER_SHLIBS.
144
145 hardcode_libdir_flag_spec=
146 hardcode_libdir_separator=
147 hardcode_direct=no
148 hardcode_minus_L=no
149
150 case "$host_os" in
151 cygwin* | mingw* | pw32* | cegcc*)
152 # FIXME: the MSVC++ port hasn't been tested in a loooong time
153 # When not using gcc, we currently assume that we are using
154 # Microsoft Visual C++.
155 if test "$GCC" != yes; then
156 with_gnu_ld=no
157 fi
158 ;;
159 interix*)
160 # we just hope/assume this is gcc and not c89 (= MSVC++)
161 with_gnu_ld=yes
162 ;;
163 openbsd*)
164 with_gnu_ld=no
165 ;;
166 esac
167
168 ld_shlibs=yes
169 if test "$with_gnu_ld" = yes; then
170 # Set some defaults for GNU ld with shared library support. These
171 # are reset later if shared libraries are not supported. Putting them
172 # here allows them to be overridden if necessary.
173 # Unlike libtool, we use -rpath here, not --rpath, since the documented
174 # option of GNU ld is called -rpath, not --rpath.
175 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
176 case "$host_os" in
177 aix[3-9]*)
178 # On AIX/PPC, the GNU linker is very broken
179 if test "$host_cpu" != ia64; then
180 ld_shlibs=no
181 fi
182 ;;
183 amigaos*)
184 case "$host_cpu" in
185 powerpc)
186 ;;
187 m68k)
188 hardcode_libdir_flag_spec='-L$libdir'
189 hardcode_minus_L=yes
190 ;;
191 esac
192 ;;
193 beos*)
194 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
195 :
196 else
197 ld_shlibs=no
198 fi
199 ;;
200 cygwin* | mingw* | pw32* | cegcc*)
201 # hardcode_libdir_flag_spec is actually meaningless, as there is
202 # no search path for DLLs.
203 hardcode_libdir_flag_spec='-L$libdir'
204 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
205 :
206 else
207 ld_shlibs=no
208 fi
209 ;;
210 haiku*)
211 ;;
212 interix[3-9]*)
213 hardcode_direct=no
214 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
215 ;;
216 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
217 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
218 :
219 else
220 ld_shlibs=no
221 fi
222 ;;
223 netbsd*)
224 ;;
225 solaris*)
226 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
227 ld_shlibs=no
228 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
229 :
230 else
231 ld_shlibs=no
232 fi
233 ;;
234 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
235 case `$LD -v 2>&1` in
236 *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
237 ld_shlibs=no
238 ;;
239 *)
240 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
241 hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
242 else
243 ld_shlibs=no
244 fi
245 ;;
246 esac
247 ;;
248 sunos4*)
249 hardcode_direct=yes
250 ;;
251 *)
252 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
253 :
254 else
255 ld_shlibs=no
256 fi
257 ;;
258 esac
259 if test "$ld_shlibs" = no; then
260 hardcode_libdir_flag_spec=
261 fi
262 else
263 case "$host_os" in
264 aix3*)
265 # Note: this linker hardcodes the directories in LIBPATH if there
266 # are no directories specified by -L.
267 hardcode_minus_L=yes
268 if test "$GCC" = yes; then
269 # Neither direct hardcoding nor static linking is supported with a
270 # broken collect2.
271 hardcode_direct=unsupported
272 fi
273 ;;
274 aix[4-9]*)
275 if test "$host_cpu" = ia64; then
276 # On IA64, the linker does run time linking by default, so we don't
277 # have to do anything special.
278 aix_use_runtimelinking=no
279 else
280 aix_use_runtimelinking=no
281 # Test if we are trying to use run time linking or normal
282 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
283 # need to do runtime linking.
284 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
285 for ld_flag in $LDFLAGS; do
286 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
287 aix_use_runtimelinking=yes
288 break
289 fi
290 done
291 ;;
292 esac
293 fi
294 hardcode_direct=yes
295 hardcode_libdir_separator=':'
296 if test "$GCC" = yes; then
297 case $host_os in aix4.[012]|aix4.[012].*)
298 collect2name=`${CC} -print-prog-name=collect2`
299 if test -f "$collect2name" && \
300 strings "$collect2name" | grep resolve_lib_name >/dev/null
301 then
302 # We have reworked collect2
303 :
304 else
305 # We have old collect2
306 hardcode_direct=unsupported
307 hardcode_minus_L=yes
308 hardcode_libdir_flag_spec='-L$libdir'
309 hardcode_libdir_separator=
310 fi
311 ;;
312 esac
313 fi
314 # Begin _LT_AC_SYS_LIBPATH_AIX.
315 echo 'int main () { return 0; }' > conftest.c
316 ${CC} ${LDFLAGS} conftest.c -o conftest
317 aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
318 }'`
319 if test -z "$aix_libpath"; then
320 aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
321 }'`
322 fi
323 if test -z "$aix_libpath"; then
324 aix_libpath="/usr/lib:/lib"
325 fi
326 rm -f conftest.c conftest
327 # End _LT_AC_SYS_LIBPATH_AIX.
328 if test "$aix_use_runtimelinking" = yes; then
329 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
330 else
331 if test "$host_cpu" = ia64; then
332 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
333 else
334 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
335 fi
336 fi
337 ;;
338 amigaos*)
339 case "$host_cpu" in
340 powerpc)
341 ;;
342 m68k)
343 hardcode_libdir_flag_spec='-L$libdir'
344 hardcode_minus_L=yes
345 ;;
346 esac
347 ;;
348 bsdi[45]*)
349 ;;
350 cygwin* | mingw* | pw32* | cegcc*)
351 # When not using gcc, we currently assume that we are using
352 # Microsoft Visual C++.
353 # hardcode_libdir_flag_spec is actually meaningless, as there is
354 # no search path for DLLs.
355 hardcode_libdir_flag_spec=' '
356 libext=lib
357 ;;
358 darwin* | rhapsody*)
359 hardcode_direct=no
360 if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; then
361 :
362 else
363 ld_shlibs=no
364 fi
365 ;;
366 dgux*)
367 hardcode_libdir_flag_spec='-L$libdir'
368 ;;
369 freebsd2.2*)
370 hardcode_libdir_flag_spec='-R$libdir'
371 hardcode_direct=yes
372 ;;
373 freebsd2*)
374 hardcode_direct=yes
375 hardcode_minus_L=yes
376 ;;
377 freebsd* | dragonfly*)
378 hardcode_libdir_flag_spec='-R$libdir'
379 hardcode_direct=yes
380 ;;
381 hpux9*)
382 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
383 hardcode_libdir_separator=:
384 hardcode_direct=yes
385 # hardcode_minus_L: Not really in the search PATH,
386 # but as the default location of the library.
387 hardcode_minus_L=yes
388 ;;
389 hpux10*)
390 if test "$with_gnu_ld" = no; then
391 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
392 hardcode_libdir_separator=:
393 hardcode_direct=yes
394 # hardcode_minus_L: Not really in the search PATH,
395 # but as the default location of the library.
396 hardcode_minus_L=yes
397 fi
398 ;;
399 hpux11*)
400 if test "$with_gnu_ld" = no; then
401 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
402 hardcode_libdir_separator=:
403 case $host_cpu in
404 hppa*64*|ia64*)
405 hardcode_direct=no
406 ;;
407 *)
408 hardcode_direct=yes
409 # hardcode_minus_L: Not really in the search PATH,
410 # but as the default location of the library.
411 hardcode_minus_L=yes
412 ;;
413 esac
414 fi
415 ;;
416 irix5* | irix6* | nonstopux*)
417 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
418 hardcode_libdir_separator=:
419 ;;
420 netbsd*)
421 hardcode_libdir_flag_spec='-R$libdir'
422 hardcode_direct=yes
423 ;;
424 newsos6)
425 hardcode_direct=yes
426 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
427 hardcode_libdir_separator=:
428 ;;
429 *nto* | *qnx*)
430 ;;
431 openbsd*)
432 if test -f /usr/libexec/ld.so; then
433 hardcode_direct=yes
434 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
435 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
436 else
437 case "$host_os" in
438 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
439 hardcode_libdir_flag_spec='-R$libdir'
440 ;;
441 *)
442 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
443 ;;
444 esac
445 fi
446 else
447 ld_shlibs=no
448 fi
449 ;;
450 os2*)
451 hardcode_libdir_flag_spec='-L$libdir'
452 hardcode_minus_L=yes
453 ;;
454 osf3*)
455 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
456 hardcode_libdir_separator=:
457 ;;
458 osf4* | osf5*)
459 if test "$GCC" = yes; then
460 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
461 else
462 # Both cc and cxx compiler support -rpath directly
463 hardcode_libdir_flag_spec='-rpath $libdir'
464 fi
465 hardcode_libdir_separator=:
466 ;;
467 solaris*)
468 hardcode_libdir_flag_spec='-R$libdir'
469 ;;
470 sunos4*)
471 hardcode_libdir_flag_spec='-L$libdir'
472 hardcode_direct=yes
473 hardcode_minus_L=yes
474 ;;
475 sysv4)
476 case $host_vendor in
477 sni)
478 hardcode_direct=yes # is this really true???
479 ;;
480 siemens)
481 hardcode_direct=no
482 ;;
483 motorola)
484 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
485 ;;
486 esac
487 ;;
488 sysv4.3*)
489 ;;
490 sysv4*MP*)
491 if test -d /usr/nec; then
492 ld_shlibs=yes
493 fi
494 ;;
495 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
496 ;;
497 sysv5* | sco3.2v5* | sco5v6*)
498 hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
499 hardcode_libdir_separator=':'
500 ;;
501 uts4*)
502 hardcode_libdir_flag_spec='-L$libdir'
503 ;;
504 *)
505 ld_shlibs=no
506 ;;
507 esac
508 fi
509
510 # Check dynamic linker characteristics
511 # Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER.
512 # Unlike libtool.m4, here we don't care about _all_ names of the library, but
513 # only about the one the linker finds when passed -lNAME. This is the last
514 # element of library_names_spec in libtool.m4, or possibly two of them if the
515 # linker has special search rules.
516 library_names_spec= # the last element of library_names_spec in libtool.m4
517 libname_spec='lib$name'
518 case "$host_os" in
519 aix3*)
520 library_names_spec='$libname.a'
521 ;;
522 aix[4-9]*)
523 library_names_spec='$libname$shrext'
524 ;;
525 amigaos*)
526 case "$host_cpu" in
527 powerpc*)
528 library_names_spec='$libname$shrext' ;;
529 m68k)
530 library_names_spec='$libname.a' ;;
531 esac
532 ;;
533 beos*)
534 library_names_spec='$libname$shrext'
535 ;;
536 bsdi[45]*)
537 library_names_spec='$libname$shrext'
538 ;;
539 cygwin* | mingw* | pw32* | cegcc*)
540 shrext=.dll
541 library_names_spec='$libname.dll.a $libname.lib'
542 ;;
543 darwin* | rhapsody*)
544 shrext=.dylib
545 library_names_spec='$libname$shrext'
546 ;;
547 dgux*)
548 library_names_spec='$libname$shrext'
549 ;;
550 freebsd* | dragonfly*)
551 case "$host_os" in
552 freebsd[123]*)
553 library_names_spec='$libname$shrext$versuffix' ;;
554 *)
555 library_names_spec='$libname$shrext' ;;
556 esac
557 ;;
558 gnu*)
559 library_names_spec='$libname$shrext'
560 ;;
561 haiku*)
562 library_names_spec='$libname$shrext'
563 ;;
564 hpux9* | hpux10* | hpux11*)
565 case $host_cpu in
566 ia64*)
567 shrext=.so
568 ;;
569 hppa*64*)
570 shrext=.sl
571 ;;
572 *)
573 shrext=.sl
574 ;;
575 esac
576 library_names_spec='$libname$shrext'
577 ;;
578 interix[3-9]*)
579 library_names_spec='$libname$shrext'
580 ;;
581 irix5* | irix6* | nonstopux*)
582 library_names_spec='$libname$shrext'
583 case "$host_os" in
584 irix5* | nonstopux*)
585 libsuff= shlibsuff=
586 ;;
587 *)
588 case $LD in
589 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
590 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
591 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
592 *) libsuff= shlibsuff= ;;
593 esac
594 ;;
595 esac
596 ;;
597 linux*oldld* | linux*aout* | linux*coff*)
598 ;;
599 linux* | k*bsd*-gnu | kopensolaris*-gnu)
600 library_names_spec='$libname$shrext'
601 ;;
602 knetbsd*-gnu)
603 library_names_spec='$libname$shrext'
604 ;;
605 netbsd*)
606 library_names_spec='$libname$shrext'
607 ;;
608 newsos6)
609 library_names_spec='$libname$shrext'
610 ;;
611 *nto* | *qnx*)
612 library_names_spec='$libname$shrext'
613 ;;
614 openbsd*)
615 library_names_spec='$libname$shrext$versuffix'
616 ;;
617 os2*)
618 libname_spec='$name'
619 shrext=.dll
620 library_names_spec='$libname.a'
621 ;;
622 osf3* | osf4* | osf5*)
623 library_names_spec='$libname$shrext'
624 ;;
625 rdos*)
626 ;;
627 solaris*)
628 library_names_spec='$libname$shrext'
629 ;;
630 sunos4*)
631 library_names_spec='$libname$shrext$versuffix'
632 ;;
633 sysv4 | sysv4.3*)
634 library_names_spec='$libname$shrext'
635 ;;
636 sysv4*MP*)
637 library_names_spec='$libname$shrext'
638 ;;
639 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
640 library_names_spec='$libname$shrext'
641 ;;
642 tpf*)
643 library_names_spec='$libname$shrext'
644 ;;
645 uts4*)
646 library_names_spec='$libname$shrext'
647 ;;
648 esac
649
650 sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
651 escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
652 shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
653 escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
654 escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
655 escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
656
657 LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
658
659 # How to pass a linker flag through the compiler.
660 wl="$escaped_wl"
661
662 # Static library suffix (normally "a").
663 libext="$libext"
664
665 # Shared library suffix (normally "so").
666 shlibext="$shlibext"
667
668 # Format of library name prefix.
669 libname_spec="$escaped_libname_spec"
670
671 # Library names that the linker finds when passed -lNAME.
672 library_names_spec="$escaped_library_names_spec"
673
674 # Flag to hardcode \$libdir into a binary during linking.
675 # This must work even if \$libdir does not exist.
676 hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
677
678 # Whether we need a single -rpath flag with a separated argument.
679 hardcode_libdir_separator="$hardcode_libdir_separator"
680
681 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
682 # resulting binary.
683 hardcode_direct="$hardcode_direct"
684
685 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
686 # resulting binary.
687 hardcode_minus_L="$hardcode_minus_L"
688
689 EOF
0 #! /bin/sh
1 # Configuration validation subroutine script.
2 # Copyright 1992-2018 Free Software Foundation, Inc.
3
4 timestamp='2018-02-22'
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 <https://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 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 # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
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 or ALIAS
56
57 Canonicalize a configuration name.
58
59 Options:
60 -h, --help print this help, then exit
61 -t, --time-stamp print date of last modification, then exit
62 -v, --version print version number, then exit
63
64 Report bugs and patches to <config-patches@gnu.org>."
65
66 version="\
67 GNU config.sub ($timestamp)
68
69 Copyright 1992-2018 Free Software Foundation, Inc.
70
71 This is free software; see the source for copying conditions. There is NO
72 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
73
74 help="
75 Try \`$me --help' for more information."
76
77 # Parse command line
78 while test $# -gt 0 ; do
79 case $1 in
80 --time-stamp | --time* | -t )
81 echo "$timestamp" ; exit ;;
82 --version | -v )
83 echo "$version" ; exit ;;
84 --help | --h* | -h )
85 echo "$usage"; exit ;;
86 -- ) # Stop option processing
87 shift; break ;;
88 - ) # Use stdin as input.
89 break ;;
90 -* )
91 echo "$me: invalid option $1$help"
92 exit 1 ;;
93
94 *local*)
95 # First pass through any local machine types.
96 echo "$1"
97 exit ;;
98
99 * )
100 break ;;
101 esac
102 done
103
104 case $# in
105 0) echo "$me: missing argument$help" >&2
106 exit 1;;
107 1) ;;
108 *) echo "$me: too many arguments$help" >&2
109 exit 1;;
110 esac
111
112 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
113 # Here we must recognize all the valid KERNEL-OS combinations.
114 maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
115 case $maybe_os in
116 nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
117 linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
118 knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
119 kopensolaris*-gnu* | cloudabi*-eabi* | \
120 storm-chaos* | os2-emx* | rtmk-nova*)
121 os=-$maybe_os
122 basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
123 ;;
124 android-linux)
125 os=-linux-android
126 basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
127 ;;
128 *)
129 basic_machine=`echo "$1" | sed 's/-[^-]*$//'`
130 if [ "$basic_machine" != "$1" ]
131 then os=`echo "$1" | sed 's/.*-/-/'`
132 else os=; fi
133 ;;
134 esac
135
136 ### Let's recognize common machines as not being operating systems so
137 ### that things like config.sub decstation-3100 work. We also
138 ### recognize some manufacturers as not being operating systems, so we
139 ### can provide default operating systems below.
140 case $os in
141 -sun*os*)
142 # Prevent following clause from handling this invalid input.
143 ;;
144 -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
145 -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
146 -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
147 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
148 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
149 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
150 -apple | -axis | -knuth | -cray | -microblaze*)
151 os=
152 basic_machine=$1
153 ;;
154 -bluegene*)
155 os=-cnk
156 ;;
157 -sim | -cisco | -oki | -wec | -winbond)
158 os=
159 basic_machine=$1
160 ;;
161 -scout)
162 ;;
163 -wrs)
164 os=-vxworks
165 basic_machine=$1
166 ;;
167 -chorusos*)
168 os=-chorusos
169 basic_machine=$1
170 ;;
171 -chorusrdb)
172 os=-chorusrdb
173 basic_machine=$1
174 ;;
175 -hiux*)
176 os=-hiuxwe2
177 ;;
178 -sco6)
179 os=-sco5v6
180 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
181 ;;
182 -sco5)
183 os=-sco3.2v5
184 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
185 ;;
186 -sco4)
187 os=-sco3.2v4
188 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
189 ;;
190 -sco3.2.[4-9]*)
191 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
192 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
193 ;;
194 -sco3.2v[4-9]*)
195 # Don't forget version if it is 3.2v4 or newer.
196 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
197 ;;
198 -sco5v6*)
199 # Don't forget version if it is 3.2v4 or newer.
200 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
201 ;;
202 -sco*)
203 os=-sco3.2v2
204 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
205 ;;
206 -udk*)
207 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
208 ;;
209 -isc)
210 os=-isc2.2
211 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
212 ;;
213 -clix*)
214 basic_machine=clipper-intergraph
215 ;;
216 -isc*)
217 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
218 ;;
219 -lynx*178)
220 os=-lynxos178
221 ;;
222 -lynx*5)
223 os=-lynxos5
224 ;;
225 -lynx*)
226 os=-lynxos
227 ;;
228 -ptx*)
229 basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'`
230 ;;
231 -psos*)
232 os=-psos
233 ;;
234 -mint | -mint[0-9]*)
235 basic_machine=m68k-atari
236 os=-mint
237 ;;
238 esac
239
240 # Decode aliases for certain CPU-COMPANY combinations.
241 case $basic_machine in
242 # Recognize the basic CPU types without company name.
243 # Some are omitted here because they have special meanings below.
244 1750a | 580 \
245 | a29k \
246 | aarch64 | aarch64_be \
247 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
248 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
249 | am33_2.0 \
250 | arc | arceb \
251 | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
252 | avr | avr32 \
253 | ba \
254 | be32 | be64 \
255 | bfin \
256 | c4x | c8051 | clipper \
257 | d10v | d30v | dlx | dsp16xx \
258 | e2k | epiphany \
259 | fido | fr30 | frv | ft32 \
260 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
261 | hexagon \
262 | i370 | i860 | i960 | ia16 | ia64 \
263 | ip2k | iq2000 \
264 | k1om \
265 | le32 | le64 \
266 | lm32 \
267 | m32c | m32r | m32rle | m68000 | m68k | m88k \
268 | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
269 | mips | mipsbe | mipseb | mipsel | mipsle \
270 | mips16 \
271 | mips64 | mips64el \
272 | mips64octeon | mips64octeonel \
273 | mips64orion | mips64orionel \
274 | mips64r5900 | mips64r5900el \
275 | mips64vr | mips64vrel \
276 | mips64vr4100 | mips64vr4100el \
277 | mips64vr4300 | mips64vr4300el \
278 | mips64vr5000 | mips64vr5000el \
279 | mips64vr5900 | mips64vr5900el \
280 | mipsisa32 | mipsisa32el \
281 | mipsisa32r2 | mipsisa32r2el \
282 | mipsisa32r6 | mipsisa32r6el \
283 | mipsisa64 | mipsisa64el \
284 | mipsisa64r2 | mipsisa64r2el \
285 | mipsisa64r6 | mipsisa64r6el \
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 | or1k | or1knd | or32 \
298 | pdp10 | pj | pjl \
299 | powerpc | powerpc64 | powerpc64le | powerpcle \
300 | pru \
301 | pyramid \
302 | riscv32 | riscv64 \
303 | rl78 | rx \
304 | score \
305 | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
306 | sh64 | sh64le \
307 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
308 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
309 | spu \
310 | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
311 | ubicom32 \
312 | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
313 | visium \
314 | wasm32 \
315 | x86 | xc16x | xstormy16 | xtensa \
316 | z8k | z80)
317 basic_machine=$basic_machine-unknown
318 ;;
319 c54x)
320 basic_machine=tic54x-unknown
321 ;;
322 c55x)
323 basic_machine=tic55x-unknown
324 ;;
325 c6x)
326 basic_machine=tic6x-unknown
327 ;;
328 leon|leon[3-9])
329 basic_machine=sparc-$basic_machine
330 ;;
331 m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
332 basic_machine=$basic_machine-unknown
333 os=-none
334 ;;
335 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65)
336 ;;
337 ms1)
338 basic_machine=mt-unknown
339 ;;
340
341 strongarm | thumb | xscale)
342 basic_machine=arm-unknown
343 ;;
344 xgate)
345 basic_machine=$basic_machine-unknown
346 os=-none
347 ;;
348 xscaleeb)
349 basic_machine=armeb-unknown
350 ;;
351
352 xscaleel)
353 basic_machine=armel-unknown
354 ;;
355
356 # We use `pc' rather than `unknown'
357 # because (1) that's what they normally are, and
358 # (2) the word "unknown" tends to confuse beginning users.
359 i*86 | x86_64)
360 basic_machine=$basic_machine-pc
361 ;;
362 # Object if more than one company name word.
363 *-*-*)
364 echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
365 exit 1
366 ;;
367 # Recognize the basic CPU types with company name.
368 580-* \
369 | a29k-* \
370 | aarch64-* | aarch64_be-* \
371 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
372 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
373 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
374 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
375 | avr-* | avr32-* \
376 | ba-* \
377 | be32-* | be64-* \
378 | bfin-* | bs2000-* \
379 | c[123]* | c30-* | [cjt]90-* | c4x-* \
380 | c8051-* | clipper-* | craynv-* | cydra-* \
381 | d10v-* | d30v-* | dlx-* \
382 | e2k-* | elxsi-* \
383 | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
384 | h8300-* | h8500-* \
385 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
386 | hexagon-* \
387 | i*86-* | i860-* | i960-* | ia16-* | ia64-* \
388 | ip2k-* | iq2000-* \
389 | k1om-* \
390 | le32-* | le64-* \
391 | lm32-* \
392 | m32c-* | m32r-* | m32rle-* \
393 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
394 | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
395 | microblaze-* | microblazeel-* \
396 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
397 | mips16-* \
398 | mips64-* | mips64el-* \
399 | mips64octeon-* | mips64octeonel-* \
400 | mips64orion-* | mips64orionel-* \
401 | mips64r5900-* | mips64r5900el-* \
402 | mips64vr-* | mips64vrel-* \
403 | mips64vr4100-* | mips64vr4100el-* \
404 | mips64vr4300-* | mips64vr4300el-* \
405 | mips64vr5000-* | mips64vr5000el-* \
406 | mips64vr5900-* | mips64vr5900el-* \
407 | mipsisa32-* | mipsisa32el-* \
408 | mipsisa32r2-* | mipsisa32r2el-* \
409 | mipsisa32r6-* | mipsisa32r6el-* \
410 | mipsisa64-* | mipsisa64el-* \
411 | mipsisa64r2-* | mipsisa64r2el-* \
412 | mipsisa64r6-* | mipsisa64r6el-* \
413 | mipsisa64sb1-* | mipsisa64sb1el-* \
414 | mipsisa64sr71k-* | mipsisa64sr71kel-* \
415 | mipsr5900-* | mipsr5900el-* \
416 | mipstx39-* | mipstx39el-* \
417 | mmix-* \
418 | mt-* \
419 | msp430-* \
420 | nds32-* | nds32le-* | nds32be-* \
421 | nios-* | nios2-* | nios2eb-* | nios2el-* \
422 | none-* | np1-* | ns16k-* | ns32k-* \
423 | open8-* \
424 | or1k*-* \
425 | orion-* \
426 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
427 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
428 | pru-* \
429 | pyramid-* \
430 | riscv32-* | riscv64-* \
431 | rl78-* | romp-* | rs6000-* | rx-* \
432 | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
433 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
434 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
435 | sparclite-* \
436 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
437 | tahoe-* \
438 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
439 | tile*-* \
440 | tron-* \
441 | ubicom32-* \
442 | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
443 | vax-* \
444 | visium-* \
445 | wasm32-* \
446 | we32k-* \
447 | x86-* | x86_64-* | xc16x-* | xps100-* \
448 | xstormy16-* | xtensa*-* \
449 | ymp-* \
450 | z8k-* | z80-*)
451 ;;
452 # Recognize the basic CPU types without company name, with glob match.
453 xtensa*)
454 basic_machine=$basic_machine-unknown
455 ;;
456 # Recognize the various machine names and aliases which stand
457 # for a CPU type and a company and sometimes even an OS.
458 386bsd)
459 basic_machine=i386-pc
460 os=-bsd
461 ;;
462 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
463 basic_machine=m68000-att
464 ;;
465 3b*)
466 basic_machine=we32k-att
467 ;;
468 a29khif)
469 basic_machine=a29k-amd
470 os=-udi
471 ;;
472 abacus)
473 basic_machine=abacus-unknown
474 ;;
475 adobe68k)
476 basic_machine=m68010-adobe
477 os=-scout
478 ;;
479 alliant | fx80)
480 basic_machine=fx80-alliant
481 ;;
482 altos | altos3068)
483 basic_machine=m68k-altos
484 ;;
485 am29k)
486 basic_machine=a29k-none
487 os=-bsd
488 ;;
489 amd64)
490 basic_machine=x86_64-pc
491 ;;
492 amd64-*)
493 basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
494 ;;
495 amdahl)
496 basic_machine=580-amdahl
497 os=-sysv
498 ;;
499 amiga | amiga-*)
500 basic_machine=m68k-unknown
501 ;;
502 amigaos | amigados)
503 basic_machine=m68k-unknown
504 os=-amigaos
505 ;;
506 amigaunix | amix)
507 basic_machine=m68k-unknown
508 os=-sysv4
509 ;;
510 apollo68)
511 basic_machine=m68k-apollo
512 os=-sysv
513 ;;
514 apollo68bsd)
515 basic_machine=m68k-apollo
516 os=-bsd
517 ;;
518 aros)
519 basic_machine=i386-pc
520 os=-aros
521 ;;
522 asmjs)
523 basic_machine=asmjs-unknown
524 ;;
525 aux)
526 basic_machine=m68k-apple
527 os=-aux
528 ;;
529 balance)
530 basic_machine=ns32k-sequent
531 os=-dynix
532 ;;
533 blackfin)
534 basic_machine=bfin-unknown
535 os=-linux
536 ;;
537 blackfin-*)
538 basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'`
539 os=-linux
540 ;;
541 bluegene*)
542 basic_machine=powerpc-ibm
543 os=-cnk
544 ;;
545 c54x-*)
546 basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
547 ;;
548 c55x-*)
549 basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
550 ;;
551 c6x-*)
552 basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
553 ;;
554 c90)
555 basic_machine=c90-cray
556 os=-unicos
557 ;;
558 cegcc)
559 basic_machine=arm-unknown
560 os=-cegcc
561 ;;
562 convex-c1)
563 basic_machine=c1-convex
564 os=-bsd
565 ;;
566 convex-c2)
567 basic_machine=c2-convex
568 os=-bsd
569 ;;
570 convex-c32)
571 basic_machine=c32-convex
572 os=-bsd
573 ;;
574 convex-c34)
575 basic_machine=c34-convex
576 os=-bsd
577 ;;
578 convex-c38)
579 basic_machine=c38-convex
580 os=-bsd
581 ;;
582 cray | j90)
583 basic_machine=j90-cray
584 os=-unicos
585 ;;
586 craynv)
587 basic_machine=craynv-cray
588 os=-unicosmp
589 ;;
590 cr16 | cr16-*)
591 basic_machine=cr16-unknown
592 os=-elf
593 ;;
594 crds | unos)
595 basic_machine=m68k-crds
596 ;;
597 crisv32 | crisv32-* | etraxfs*)
598 basic_machine=crisv32-axis
599 ;;
600 cris | cris-* | etrax*)
601 basic_machine=cris-axis
602 ;;
603 crx)
604 basic_machine=crx-unknown
605 os=-elf
606 ;;
607 da30 | da30-*)
608 basic_machine=m68k-da30
609 ;;
610 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
611 basic_machine=mips-dec
612 ;;
613 decsystem10* | dec10*)
614 basic_machine=pdp10-dec
615 os=-tops10
616 ;;
617 decsystem20* | dec20*)
618 basic_machine=pdp10-dec
619 os=-tops20
620 ;;
621 delta | 3300 | motorola-3300 | motorola-delta \
622 | 3300-motorola | delta-motorola)
623 basic_machine=m68k-motorola
624 ;;
625 delta88)
626 basic_machine=m88k-motorola
627 os=-sysv3
628 ;;
629 dicos)
630 basic_machine=i686-pc
631 os=-dicos
632 ;;
633 djgpp)
634 basic_machine=i586-pc
635 os=-msdosdjgpp
636 ;;
637 dpx20 | dpx20-*)
638 basic_machine=rs6000-bull
639 os=-bosx
640 ;;
641 dpx2*)
642 basic_machine=m68k-bull
643 os=-sysv3
644 ;;
645 e500v[12])
646 basic_machine=powerpc-unknown
647 os=$os"spe"
648 ;;
649 e500v[12]-*)
650 basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
651 os=$os"spe"
652 ;;
653 ebmon29k)
654 basic_machine=a29k-amd
655 os=-ebmon
656 ;;
657 elxsi)
658 basic_machine=elxsi-elxsi
659 os=-bsd
660 ;;
661 encore | umax | mmax)
662 basic_machine=ns32k-encore
663 ;;
664 es1800 | OSE68k | ose68k | ose | OSE)
665 basic_machine=m68k-ericsson
666 os=-ose
667 ;;
668 fx2800)
669 basic_machine=i860-alliant
670 ;;
671 genix)
672 basic_machine=ns32k-ns
673 ;;
674 gmicro)
675 basic_machine=tron-gmicro
676 os=-sysv
677 ;;
678 go32)
679 basic_machine=i386-pc
680 os=-go32
681 ;;
682 h3050r* | hiux*)
683 basic_machine=hppa1.1-hitachi
684 os=-hiuxwe2
685 ;;
686 h8300hms)
687 basic_machine=h8300-hitachi
688 os=-hms
689 ;;
690 h8300xray)
691 basic_machine=h8300-hitachi
692 os=-xray
693 ;;
694 h8500hms)
695 basic_machine=h8500-hitachi
696 os=-hms
697 ;;
698 harris)
699 basic_machine=m88k-harris
700 os=-sysv3
701 ;;
702 hp300-*)
703 basic_machine=m68k-hp
704 ;;
705 hp300bsd)
706 basic_machine=m68k-hp
707 os=-bsd
708 ;;
709 hp300hpux)
710 basic_machine=m68k-hp
711 os=-hpux
712 ;;
713 hp3k9[0-9][0-9] | hp9[0-9][0-9])
714 basic_machine=hppa1.0-hp
715 ;;
716 hp9k2[0-9][0-9] | hp9k31[0-9])
717 basic_machine=m68000-hp
718 ;;
719 hp9k3[2-9][0-9])
720 basic_machine=m68k-hp
721 ;;
722 hp9k6[0-9][0-9] | hp6[0-9][0-9])
723 basic_machine=hppa1.0-hp
724 ;;
725 hp9k7[0-79][0-9] | hp7[0-79][0-9])
726 basic_machine=hppa1.1-hp
727 ;;
728 hp9k78[0-9] | hp78[0-9])
729 # FIXME: really hppa2.0-hp
730 basic_machine=hppa1.1-hp
731 ;;
732 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
733 # FIXME: really hppa2.0-hp
734 basic_machine=hppa1.1-hp
735 ;;
736 hp9k8[0-9][13679] | hp8[0-9][13679])
737 basic_machine=hppa1.1-hp
738 ;;
739 hp9k8[0-9][0-9] | hp8[0-9][0-9])
740 basic_machine=hppa1.0-hp
741 ;;
742 hppaosf)
743 basic_machine=hppa1.1-hp
744 os=-osf
745 ;;
746 hppro)
747 basic_machine=hppa1.1-hp
748 os=-proelf
749 ;;
750 i370-ibm* | ibm*)
751 basic_machine=i370-ibm
752 ;;
753 i*86v32)
754 basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
755 os=-sysv32
756 ;;
757 i*86v4*)
758 basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
759 os=-sysv4
760 ;;
761 i*86v)
762 basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
763 os=-sysv
764 ;;
765 i*86sol2)
766 basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
767 os=-solaris2
768 ;;
769 i386mach)
770 basic_machine=i386-mach
771 os=-mach
772 ;;
773 vsta)
774 basic_machine=i386-unknown
775 os=-vsta
776 ;;
777 iris | iris4d)
778 basic_machine=mips-sgi
779 case $os in
780 -irix*)
781 ;;
782 *)
783 os=-irix4
784 ;;
785 esac
786 ;;
787 isi68 | isi)
788 basic_machine=m68k-isi
789 os=-sysv
790 ;;
791 leon-*|leon[3-9]-*)
792 basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'`
793 ;;
794 m68knommu)
795 basic_machine=m68k-unknown
796 os=-linux
797 ;;
798 m68knommu-*)
799 basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'`
800 os=-linux
801 ;;
802 magnum | m3230)
803 basic_machine=mips-mips
804 os=-sysv
805 ;;
806 merlin)
807 basic_machine=ns32k-utek
808 os=-sysv
809 ;;
810 microblaze*)
811 basic_machine=microblaze-xilinx
812 ;;
813 mingw64)
814 basic_machine=x86_64-pc
815 os=-mingw64
816 ;;
817 mingw32)
818 basic_machine=i686-pc
819 os=-mingw32
820 ;;
821 mingw32ce)
822 basic_machine=arm-unknown
823 os=-mingw32ce
824 ;;
825 miniframe)
826 basic_machine=m68000-convergent
827 ;;
828 *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
829 basic_machine=m68k-atari
830 os=-mint
831 ;;
832 mips3*-*)
833 basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`
834 ;;
835 mips3*)
836 basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown
837 ;;
838 monitor)
839 basic_machine=m68k-rom68k
840 os=-coff
841 ;;
842 morphos)
843 basic_machine=powerpc-unknown
844 os=-morphos
845 ;;
846 moxiebox)
847 basic_machine=moxie-unknown
848 os=-moxiebox
849 ;;
850 msdos)
851 basic_machine=i386-pc
852 os=-msdos
853 ;;
854 ms1-*)
855 basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'`
856 ;;
857 msys)
858 basic_machine=i686-pc
859 os=-msys
860 ;;
861 mvs)
862 basic_machine=i370-ibm
863 os=-mvs
864 ;;
865 nacl)
866 basic_machine=le32-unknown
867 os=-nacl
868 ;;
869 ncr3000)
870 basic_machine=i486-ncr
871 os=-sysv4
872 ;;
873 netbsd386)
874 basic_machine=i386-unknown
875 os=-netbsd
876 ;;
877 netwinder)
878 basic_machine=armv4l-rebel
879 os=-linux
880 ;;
881 news | news700 | news800 | news900)
882 basic_machine=m68k-sony
883 os=-newsos
884 ;;
885 news1000)
886 basic_machine=m68030-sony
887 os=-newsos
888 ;;
889 news-3600 | risc-news)
890 basic_machine=mips-sony
891 os=-newsos
892 ;;
893 necv70)
894 basic_machine=v70-nec
895 os=-sysv
896 ;;
897 next | m*-next)
898 basic_machine=m68k-next
899 case $os in
900 -nextstep* )
901 ;;
902 -ns2*)
903 os=-nextstep2
904 ;;
905 *)
906 os=-nextstep3
907 ;;
908 esac
909 ;;
910 nh3000)
911 basic_machine=m68k-harris
912 os=-cxux
913 ;;
914 nh[45]000)
915 basic_machine=m88k-harris
916 os=-cxux
917 ;;
918 nindy960)
919 basic_machine=i960-intel
920 os=-nindy
921 ;;
922 mon960)
923 basic_machine=i960-intel
924 os=-mon960
925 ;;
926 nonstopux)
927 basic_machine=mips-compaq
928 os=-nonstopux
929 ;;
930 np1)
931 basic_machine=np1-gould
932 ;;
933 neo-tandem)
934 basic_machine=neo-tandem
935 ;;
936 nse-tandem)
937 basic_machine=nse-tandem
938 ;;
939 nsr-tandem)
940 basic_machine=nsr-tandem
941 ;;
942 nsv-tandem)
943 basic_machine=nsv-tandem
944 ;;
945 nsx-tandem)
946 basic_machine=nsx-tandem
947 ;;
948 op50n-* | op60c-*)
949 basic_machine=hppa1.1-oki
950 os=-proelf
951 ;;
952 openrisc | openrisc-*)
953 basic_machine=or32-unknown
954 ;;
955 os400)
956 basic_machine=powerpc-ibm
957 os=-os400
958 ;;
959 OSE68000 | ose68000)
960 basic_machine=m68000-ericsson
961 os=-ose
962 ;;
963 os68k)
964 basic_machine=m68k-none
965 os=-os68k
966 ;;
967 pa-hitachi)
968 basic_machine=hppa1.1-hitachi
969 os=-hiuxwe2
970 ;;
971 paragon)
972 basic_machine=i860-intel
973 os=-osf
974 ;;
975 parisc)
976 basic_machine=hppa-unknown
977 os=-linux
978 ;;
979 parisc-*)
980 basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'`
981 os=-linux
982 ;;
983 pbd)
984 basic_machine=sparc-tti
985 ;;
986 pbb)
987 basic_machine=m68k-tti
988 ;;
989 pc532 | pc532-*)
990 basic_machine=ns32k-pc532
991 ;;
992 pc98)
993 basic_machine=i386-pc
994 ;;
995 pc98-*)
996 basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'`
997 ;;
998 pentium | p5 | k5 | k6 | nexgen | viac3)
999 basic_machine=i586-pc
1000 ;;
1001 pentiumpro | p6 | 6x86 | athlon | athlon_*)
1002 basic_machine=i686-pc
1003 ;;
1004 pentiumii | pentium2 | pentiumiii | pentium3)
1005 basic_machine=i686-pc
1006 ;;
1007 pentium4)
1008 basic_machine=i786-pc
1009 ;;
1010 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
1011 basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1012 ;;
1013 pentiumpro-* | p6-* | 6x86-* | athlon-*)
1014 basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1015 ;;
1016 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
1017 basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1018 ;;
1019 pentium4-*)
1020 basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1021 ;;
1022 pn)
1023 basic_machine=pn-gould
1024 ;;
1025 power) basic_machine=power-ibm
1026 ;;
1027 ppc | ppcbe) basic_machine=powerpc-unknown
1028 ;;
1029 ppc-* | ppcbe-*)
1030 basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1031 ;;
1032 ppcle | powerpclittle)
1033 basic_machine=powerpcle-unknown
1034 ;;
1035 ppcle-* | powerpclittle-*)
1036 basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1037 ;;
1038 ppc64) basic_machine=powerpc64-unknown
1039 ;;
1040 ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1041 ;;
1042 ppc64le | powerpc64little)
1043 basic_machine=powerpc64le-unknown
1044 ;;
1045 ppc64le-* | powerpc64little-*)
1046 basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1047 ;;
1048 ps2)
1049 basic_machine=i386-ibm
1050 ;;
1051 pw32)
1052 basic_machine=i586-unknown
1053 os=-pw32
1054 ;;
1055 rdos | rdos64)
1056 basic_machine=x86_64-pc
1057 os=-rdos
1058 ;;
1059 rdos32)
1060 basic_machine=i386-pc
1061 os=-rdos
1062 ;;
1063 rom68k)
1064 basic_machine=m68k-rom68k
1065 os=-coff
1066 ;;
1067 rm[46]00)
1068 basic_machine=mips-siemens
1069 ;;
1070 rtpc | rtpc-*)
1071 basic_machine=romp-ibm
1072 ;;
1073 s390 | s390-*)
1074 basic_machine=s390-ibm
1075 ;;
1076 s390x | s390x-*)
1077 basic_machine=s390x-ibm
1078 ;;
1079 sa29200)
1080 basic_machine=a29k-amd
1081 os=-udi
1082 ;;
1083 sb1)
1084 basic_machine=mipsisa64sb1-unknown
1085 ;;
1086 sb1el)
1087 basic_machine=mipsisa64sb1el-unknown
1088 ;;
1089 sde)
1090 basic_machine=mipsisa32-sde
1091 os=-elf
1092 ;;
1093 sei)
1094 basic_machine=mips-sei
1095 os=-seiux
1096 ;;
1097 sequent)
1098 basic_machine=i386-sequent
1099 ;;
1100 sh5el)
1101 basic_machine=sh5le-unknown
1102 ;;
1103 simso-wrs)
1104 basic_machine=sparclite-wrs
1105 os=-vxworks
1106 ;;
1107 sps7)
1108 basic_machine=m68k-bull
1109 os=-sysv2
1110 ;;
1111 spur)
1112 basic_machine=spur-unknown
1113 ;;
1114 st2000)
1115 basic_machine=m68k-tandem
1116 ;;
1117 stratus)
1118 basic_machine=i860-stratus
1119 os=-sysv4
1120 ;;
1121 strongarm-* | thumb-*)
1122 basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1123 ;;
1124 sun2)
1125 basic_machine=m68000-sun
1126 ;;
1127 sun2os3)
1128 basic_machine=m68000-sun
1129 os=-sunos3
1130 ;;
1131 sun2os4)
1132 basic_machine=m68000-sun
1133 os=-sunos4
1134 ;;
1135 sun3os3)
1136 basic_machine=m68k-sun
1137 os=-sunos3
1138 ;;
1139 sun3os4)
1140 basic_machine=m68k-sun
1141 os=-sunos4
1142 ;;
1143 sun4os3)
1144 basic_machine=sparc-sun
1145 os=-sunos3
1146 ;;
1147 sun4os4)
1148 basic_machine=sparc-sun
1149 os=-sunos4
1150 ;;
1151 sun4sol2)
1152 basic_machine=sparc-sun
1153 os=-solaris2
1154 ;;
1155 sun3 | sun3-*)
1156 basic_machine=m68k-sun
1157 ;;
1158 sun4)
1159 basic_machine=sparc-sun
1160 ;;
1161 sun386 | sun386i | roadrunner)
1162 basic_machine=i386-sun
1163 ;;
1164 sv1)
1165 basic_machine=sv1-cray
1166 os=-unicos
1167 ;;
1168 symmetry)
1169 basic_machine=i386-sequent
1170 os=-dynix
1171 ;;
1172 t3e)
1173 basic_machine=alphaev5-cray
1174 os=-unicos
1175 ;;
1176 t90)
1177 basic_machine=t90-cray
1178 os=-unicos
1179 ;;
1180 tile*)
1181 basic_machine=$basic_machine-unknown
1182 os=-linux-gnu
1183 ;;
1184 tx39)
1185 basic_machine=mipstx39-unknown
1186 ;;
1187 tx39el)
1188 basic_machine=mipstx39el-unknown
1189 ;;
1190 toad1)
1191 basic_machine=pdp10-xkl
1192 os=-tops20
1193 ;;
1194 tower | tower-32)
1195 basic_machine=m68k-ncr
1196 ;;
1197 tpf)
1198 basic_machine=s390x-ibm
1199 os=-tpf
1200 ;;
1201 udi29k)
1202 basic_machine=a29k-amd
1203 os=-udi
1204 ;;
1205 ultra3)
1206 basic_machine=a29k-nyu
1207 os=-sym1
1208 ;;
1209 v810 | necv810)
1210 basic_machine=v810-nec
1211 os=-none
1212 ;;
1213 vaxv)
1214 basic_machine=vax-dec
1215 os=-sysv
1216 ;;
1217 vms)
1218 basic_machine=vax-dec
1219 os=-vms
1220 ;;
1221 vpp*|vx|vx-*)
1222 basic_machine=f301-fujitsu
1223 ;;
1224 vxworks960)
1225 basic_machine=i960-wrs
1226 os=-vxworks
1227 ;;
1228 vxworks68)
1229 basic_machine=m68k-wrs
1230 os=-vxworks
1231 ;;
1232 vxworks29k)
1233 basic_machine=a29k-wrs
1234 os=-vxworks
1235 ;;
1236 w65*)
1237 basic_machine=w65-wdc
1238 os=-none
1239 ;;
1240 w89k-*)
1241 basic_machine=hppa1.1-winbond
1242 os=-proelf
1243 ;;
1244 x64)
1245 basic_machine=x86_64-pc
1246 ;;
1247 xbox)
1248 basic_machine=i686-pc
1249 os=-mingw32
1250 ;;
1251 xps | xps100)
1252 basic_machine=xps100-honeywell
1253 ;;
1254 xscale-* | xscalee[bl]-*)
1255 basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'`
1256 ;;
1257 ymp)
1258 basic_machine=ymp-cray
1259 os=-unicos
1260 ;;
1261 none)
1262 basic_machine=none-none
1263 os=-none
1264 ;;
1265
1266 # Here we handle the default manufacturer of certain CPU types. It is in
1267 # some cases the only manufacturer, in others, it is the most popular.
1268 w89k)
1269 basic_machine=hppa1.1-winbond
1270 ;;
1271 op50n)
1272 basic_machine=hppa1.1-oki
1273 ;;
1274 op60c)
1275 basic_machine=hppa1.1-oki
1276 ;;
1277 romp)
1278 basic_machine=romp-ibm
1279 ;;
1280 mmix)
1281 basic_machine=mmix-knuth
1282 ;;
1283 rs6000)
1284 basic_machine=rs6000-ibm
1285 ;;
1286 vax)
1287 basic_machine=vax-dec
1288 ;;
1289 pdp11)
1290 basic_machine=pdp11-dec
1291 ;;
1292 we32k)
1293 basic_machine=we32k-att
1294 ;;
1295 sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
1296 basic_machine=sh-unknown
1297 ;;
1298 cydra)
1299 basic_machine=cydra-cydrome
1300 ;;
1301 orion)
1302 basic_machine=orion-highlevel
1303 ;;
1304 orion105)
1305 basic_machine=clipper-highlevel
1306 ;;
1307 mac | mpw | mac-mpw)
1308 basic_machine=m68k-apple
1309 ;;
1310 pmac | pmac-mpw)
1311 basic_machine=powerpc-apple
1312 ;;
1313 *-unknown)
1314 # Make sure to match an already-canonicalized machine name.
1315 ;;
1316 *)
1317 echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
1318 exit 1
1319 ;;
1320 esac
1321
1322 # Here we canonicalize certain aliases for manufacturers.
1323 case $basic_machine in
1324 *-digital*)
1325 basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'`
1326 ;;
1327 *-commodore*)
1328 basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'`
1329 ;;
1330 *)
1331 ;;
1332 esac
1333
1334 # Decode manufacturer-specific aliases for certain operating systems.
1335
1336 if [ x"$os" != x"" ]
1337 then
1338 case $os in
1339 # First match some system type aliases that might get confused
1340 # with valid system types.
1341 # -solaris* is a basic system type, with this one exception.
1342 -auroraux)
1343 os=-auroraux
1344 ;;
1345 -solaris1 | -solaris1.*)
1346 os=`echo $os | sed -e 's|solaris1|sunos4|'`
1347 ;;
1348 -solaris)
1349 os=-solaris2
1350 ;;
1351 -unixware*)
1352 os=-sysv4.2uw
1353 ;;
1354 -gnu/linux*)
1355 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1356 ;;
1357 # es1800 is here to avoid being matched by es* (a different OS)
1358 -es1800*)
1359 os=-ose
1360 ;;
1361 # Now accept the basic system types.
1362 # The portable systems comes first.
1363 # Each alternative MUST end in a * to match a version number.
1364 # -sysv* is not here because it comes later, after sysvr4.
1365 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1366 | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1367 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
1368 | -sym* | -kopensolaris* | -plan9* \
1369 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1370 | -aos* | -aros* | -cloudabi* | -sortix* \
1371 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1372 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1373 | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \
1374 | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
1375 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1376 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1377 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1378 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1379 | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
1380 | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1381 | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
1382 | -linux-newlib* | -linux-musl* | -linux-uclibc* \
1383 | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
1384 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \
1385 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1386 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1387 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1388 | -morphos* | -superux* | -rtmk* | -windiss* \
1389 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1390 | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
1391 | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \
1392 | -midnightbsd*)
1393 # Remember, each alternative MUST END IN *, to match a version number.
1394 ;;
1395 -qnx*)
1396 case $basic_machine in
1397 x86-* | i*86-*)
1398 ;;
1399 *)
1400 os=-nto$os
1401 ;;
1402 esac
1403 ;;
1404 -nto-qnx*)
1405 ;;
1406 -nto*)
1407 os=`echo $os | sed -e 's|nto|nto-qnx|'`
1408 ;;
1409 -sim | -xray | -os68k* | -v88r* \
1410 | -windows* | -osx | -abug | -netware* | -os9* \
1411 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
1412 ;;
1413 -mac*)
1414 os=`echo "$os" | sed -e 's|mac|macos|'`
1415 ;;
1416 -linux-dietlibc)
1417 os=-linux-dietlibc
1418 ;;
1419 -linux*)
1420 os=`echo $os | sed -e 's|linux|linux-gnu|'`
1421 ;;
1422 -sunos5*)
1423 os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
1424 ;;
1425 -sunos6*)
1426 os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
1427 ;;
1428 -opened*)
1429 os=-openedition
1430 ;;
1431 -os400*)
1432 os=-os400
1433 ;;
1434 -wince*)
1435 os=-wince
1436 ;;
1437 -utek*)
1438 os=-bsd
1439 ;;
1440 -dynix*)
1441 os=-bsd
1442 ;;
1443 -acis*)
1444 os=-aos
1445 ;;
1446 -atheos*)
1447 os=-atheos
1448 ;;
1449 -syllable*)
1450 os=-syllable
1451 ;;
1452 -386bsd)
1453 os=-bsd
1454 ;;
1455 -ctix* | -uts*)
1456 os=-sysv
1457 ;;
1458 -nova*)
1459 os=-rtmk-nova
1460 ;;
1461 -ns2)
1462 os=-nextstep2
1463 ;;
1464 -nsk*)
1465 os=-nsk
1466 ;;
1467 # Preserve the version number of sinix5.
1468 -sinix5.*)
1469 os=`echo $os | sed -e 's|sinix|sysv|'`
1470 ;;
1471 -sinix*)
1472 os=-sysv4
1473 ;;
1474 -tpf*)
1475 os=-tpf
1476 ;;
1477 -triton*)
1478 os=-sysv3
1479 ;;
1480 -oss*)
1481 os=-sysv3
1482 ;;
1483 -svr4*)
1484 os=-sysv4
1485 ;;
1486 -svr3)
1487 os=-sysv3
1488 ;;
1489 -sysvr4)
1490 os=-sysv4
1491 ;;
1492 # This must come after -sysvr4.
1493 -sysv*)
1494 ;;
1495 -ose*)
1496 os=-ose
1497 ;;
1498 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1499 os=-mint
1500 ;;
1501 -zvmoe)
1502 os=-zvmoe
1503 ;;
1504 -dicos*)
1505 os=-dicos
1506 ;;
1507 -pikeos*)
1508 # Until real need of OS specific support for
1509 # particular features comes up, bare metal
1510 # configurations are quite functional.
1511 case $basic_machine in
1512 arm*)
1513 os=-eabi
1514 ;;
1515 *)
1516 os=-elf
1517 ;;
1518 esac
1519 ;;
1520 -nacl*)
1521 ;;
1522 -ios)
1523 ;;
1524 -none)
1525 ;;
1526 *)
1527 # Get rid of the `-' at the beginning of $os.
1528 os=`echo $os | sed 's/[^-]*-//'`
1529 echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
1530 exit 1
1531 ;;
1532 esac
1533 else
1534
1535 # Here we handle the default operating systems that come with various machines.
1536 # The value should be what the vendor currently ships out the door with their
1537 # machine or put another way, the most popular os provided with the machine.
1538
1539 # Note that if you're going to try to match "-MANUFACTURER" here (say,
1540 # "-sun"), then you have to tell the case statement up towards the top
1541 # that MANUFACTURER isn't an operating system. Otherwise, code above
1542 # will signal an error saying that MANUFACTURER isn't an operating
1543 # system, and we'll never get to this point.
1544
1545 case $basic_machine in
1546 score-*)
1547 os=-elf
1548 ;;
1549 spu-*)
1550 os=-elf
1551 ;;
1552 *-acorn)
1553 os=-riscix1.2
1554 ;;
1555 arm*-rebel)
1556 os=-linux
1557 ;;
1558 arm*-semi)
1559 os=-aout
1560 ;;
1561 c4x-* | tic4x-*)
1562 os=-coff
1563 ;;
1564 c8051-*)
1565 os=-elf
1566 ;;
1567 hexagon-*)
1568 os=-elf
1569 ;;
1570 tic54x-*)
1571 os=-coff
1572 ;;
1573 tic55x-*)
1574 os=-coff
1575 ;;
1576 tic6x-*)
1577 os=-coff
1578 ;;
1579 # This must come before the *-dec entry.
1580 pdp10-*)
1581 os=-tops20
1582 ;;
1583 pdp11-*)
1584 os=-none
1585 ;;
1586 *-dec | vax-*)
1587 os=-ultrix4.2
1588 ;;
1589 m68*-apollo)
1590 os=-domain
1591 ;;
1592 i386-sun)
1593 os=-sunos4.0.2
1594 ;;
1595 m68000-sun)
1596 os=-sunos3
1597 ;;
1598 m68*-cisco)
1599 os=-aout
1600 ;;
1601 mep-*)
1602 os=-elf
1603 ;;
1604 mips*-cisco)
1605 os=-elf
1606 ;;
1607 mips*-*)
1608 os=-elf
1609 ;;
1610 or32-*)
1611 os=-coff
1612 ;;
1613 *-tti) # must be before sparc entry or we get the wrong os.
1614 os=-sysv3
1615 ;;
1616 sparc-* | *-sun)
1617 os=-sunos4.1.1
1618 ;;
1619 pru-*)
1620 os=-elf
1621 ;;
1622 *-be)
1623 os=-beos
1624 ;;
1625 *-ibm)
1626 os=-aix
1627 ;;
1628 *-knuth)
1629 os=-mmixware
1630 ;;
1631 *-wec)
1632 os=-proelf
1633 ;;
1634 *-winbond)
1635 os=-proelf
1636 ;;
1637 *-oki)
1638 os=-proelf
1639 ;;
1640 *-hp)
1641 os=-hpux
1642 ;;
1643 *-hitachi)
1644 os=-hiux
1645 ;;
1646 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1647 os=-sysv
1648 ;;
1649 *-cbm)
1650 os=-amigaos
1651 ;;
1652 *-dg)
1653 os=-dgux
1654 ;;
1655 *-dolphin)
1656 os=-sysv3
1657 ;;
1658 m68k-ccur)
1659 os=-rtu
1660 ;;
1661 m88k-omron*)
1662 os=-luna
1663 ;;
1664 *-next)
1665 os=-nextstep
1666 ;;
1667 *-sequent)
1668 os=-ptx
1669 ;;
1670 *-crds)
1671 os=-unos
1672 ;;
1673 *-ns)
1674 os=-genix
1675 ;;
1676 i370-*)
1677 os=-mvs
1678 ;;
1679 *-gould)
1680 os=-sysv
1681 ;;
1682 *-highlevel)
1683 os=-bsd
1684 ;;
1685 *-encore)
1686 os=-bsd
1687 ;;
1688 *-sgi)
1689 os=-irix
1690 ;;
1691 *-siemens)
1692 os=-sysv4
1693 ;;
1694 *-masscomp)
1695 os=-rtu
1696 ;;
1697 f30[01]-fujitsu | f700-fujitsu)
1698 os=-uxpv
1699 ;;
1700 *-rom68k)
1701 os=-coff
1702 ;;
1703 *-*bug)
1704 os=-coff
1705 ;;
1706 *-apple)
1707 os=-macos
1708 ;;
1709 *-atari*)
1710 os=-mint
1711 ;;
1712 *)
1713 os=-none
1714 ;;
1715 esac
1716 fi
1717
1718 # Here we handle the case where we know the os, and the CPU type, but not the
1719 # manufacturer. We pick the logical manufacturer.
1720 vendor=unknown
1721 case $basic_machine in
1722 *-unknown)
1723 case $os in
1724 -riscix*)
1725 vendor=acorn
1726 ;;
1727 -sunos*)
1728 vendor=sun
1729 ;;
1730 -cnk*|-aix*)
1731 vendor=ibm
1732 ;;
1733 -beos*)
1734 vendor=be
1735 ;;
1736 -hpux*)
1737 vendor=hp
1738 ;;
1739 -mpeix*)
1740 vendor=hp
1741 ;;
1742 -hiux*)
1743 vendor=hitachi
1744 ;;
1745 -unos*)
1746 vendor=crds
1747 ;;
1748 -dgux*)
1749 vendor=dg
1750 ;;
1751 -luna*)
1752 vendor=omron
1753 ;;
1754 -genix*)
1755 vendor=ns
1756 ;;
1757 -mvs* | -opened*)
1758 vendor=ibm
1759 ;;
1760 -os400*)
1761 vendor=ibm
1762 ;;
1763 -ptx*)
1764 vendor=sequent
1765 ;;
1766 -tpf*)
1767 vendor=ibm
1768 ;;
1769 -vxsim* | -vxworks* | -windiss*)
1770 vendor=wrs
1771 ;;
1772 -aux*)
1773 vendor=apple
1774 ;;
1775 -hms*)
1776 vendor=hitachi
1777 ;;
1778 -mpw* | -macos*)
1779 vendor=apple
1780 ;;
1781 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1782 vendor=atari
1783 ;;
1784 -vos*)
1785 vendor=stratus
1786 ;;
1787 esac
1788 basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"`
1789 ;;
1790 esac
1791
1792 echo "$basic_machine$os"
1793 exit
1794
1795 # Local variables:
1796 # eval: (add-hook 'write-file-functions 'time-stamp)
1797 # time-stamp-start: "timestamp='"
1798 # time-stamp-format: "%:y-%02m-%02d"
1799 # time-stamp-end: "'"
1800 # End:
0 #! /bin/sh
1 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.69 for elektroid 2.2.
3 #
4 # Report bugs to <dagargo@gmail.com>.
5 #
6 #
7 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
8 #
9 #
10 # This configure script is free software; the Free Software Foundation
11 # gives unlimited permission to copy, distribute and modify it.
12 ## -------------------- ##
13 ## M4sh Initialization. ##
14 ## -------------------- ##
15
16 # Be more Bourne compatible
17 DUALCASE=1; export DUALCASE # for MKS sh
18 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19 emulate sh
20 NULLCMD=:
21 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
22 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"'
24 setopt NO_GLOB_SUBST
25 else
26 case `(set -o) 2>/dev/null` in #(
27 *posix*) :
28 set -o posix ;; #(
29 *) :
30 ;;
31 esac
32 fi
33
34
35 as_nl='
36 '
37 export as_nl
38 # Printing a long string crashes Solaris 7 /usr/bin/printf.
39 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
40 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
41 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
42 # Prefer a ksh shell builtin over an external printf program on Solaris,
43 # but without wasting forks for bash or zsh.
44 if test -z "$BASH_VERSION$ZSH_VERSION" \
45 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
46 as_echo='print -r --'
47 as_echo_n='print -rn --'
48 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
49 as_echo='printf %s\n'
50 as_echo_n='printf %s'
51 else
52 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
53 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
54 as_echo_n='/usr/ucb/echo -n'
55 else
56 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
57 as_echo_n_body='eval
58 arg=$1;
59 case $arg in #(
60 *"$as_nl"*)
61 expr "X$arg" : "X\\(.*\\)$as_nl";
62 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
63 esac;
64 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
65 '
66 export as_echo_n_body
67 as_echo_n='sh -c $as_echo_n_body as_echo'
68 fi
69 export as_echo_body
70 as_echo='sh -c $as_echo_body as_echo'
71 fi
72
73 # The user is always right.
74 if test "${PATH_SEPARATOR+set}" != set; then
75 PATH_SEPARATOR=:
76 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
77 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
78 PATH_SEPARATOR=';'
79 }
80 fi
81
82
83 # IFS
84 # We need space, tab and new line, in precisely that order. Quoting is
85 # there to prevent editors from complaining about space-tab.
86 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
87 # splitting by setting IFS to empty value.)
88 IFS=" "" $as_nl"
89
90 # Find who we are. Look in the path if we contain no directory separator.
91 as_myself=
92 case $0 in #((
93 *[\\/]* ) as_myself=$0 ;;
94 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
95 for as_dir in $PATH
96 do
97 IFS=$as_save_IFS
98 test -z "$as_dir" && as_dir=.
99 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
100 done
101 IFS=$as_save_IFS
102
103 ;;
104 esac
105 # We did not find ourselves, most probably we were run as `sh COMMAND'
106 # in which case we are not to be found in the path.
107 if test "x$as_myself" = x; then
108 as_myself=$0
109 fi
110 if test ! -f "$as_myself"; then
111 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
112 exit 1
113 fi
114
115 # Unset variables that we do not need and which cause bugs (e.g. in
116 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
117 # suppresses any "Segmentation fault" message there. '((' could
118 # trigger a bug in pdksh 5.2.14.
119 for as_var in BASH_ENV ENV MAIL MAILPATH
120 do eval test x\${$as_var+set} = xset \
121 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
122 done
123 PS1='$ '
124 PS2='> '
125 PS4='+ '
126
127 # NLS nuisances.
128 LC_ALL=C
129 export LC_ALL
130 LANGUAGE=C
131 export LANGUAGE
132
133 # CDPATH.
134 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
135
136 # Use a proper internal environment variable to ensure we don't fall
137 # into an infinite loop, continuously re-executing ourselves.
138 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
139 _as_can_reexec=no; export _as_can_reexec;
140 # We cannot yet assume a decent shell, so we have to provide a
141 # neutralization value for shells without unset; and this also
142 # works around shells that cannot unset nonexistent variables.
143 # Preserve -v and -x to the replacement shell.
144 BASH_ENV=/dev/null
145 ENV=/dev/null
146 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
147 case $- in # ((((
148 *v*x* | *x*v* ) as_opts=-vx ;;
149 *v* ) as_opts=-v ;;
150 *x* ) as_opts=-x ;;
151 * ) as_opts= ;;
152 esac
153 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
154 # Admittedly, this is quite paranoid, since all the known shells bail
155 # out after a failed `exec'.
156 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
157 as_fn_exit 255
158 fi
159 # We don't want this to propagate to other subprocesses.
160 { _as_can_reexec=; unset _as_can_reexec;}
161 if test "x$CONFIG_SHELL" = x; then
162 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
163 emulate sh
164 NULLCMD=:
165 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
166 # is contrary to our usage. Disable this feature.
167 alias -g '\${1+\"\$@\"}'='\"\$@\"'
168 setopt NO_GLOB_SUBST
169 else
170 case \`(set -o) 2>/dev/null\` in #(
171 *posix*) :
172 set -o posix ;; #(
173 *) :
174 ;;
175 esac
176 fi
177 "
178 as_required="as_fn_return () { (exit \$1); }
179 as_fn_success () { as_fn_return 0; }
180 as_fn_failure () { as_fn_return 1; }
181 as_fn_ret_success () { return 0; }
182 as_fn_ret_failure () { return 1; }
183
184 exitcode=0
185 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
186 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
187 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
188 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
189 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
190
191 else
192 exitcode=1; echo positional parameters were not saved.
193 fi
194 test x\$exitcode = x0 || exit 1
195 test -x / || exit 1"
196 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
197 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
198 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
199 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
200
201 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
202 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
203 ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
204 ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
205 PATH=/empty FPATH=/empty; export PATH FPATH
206 test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
207 || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1
208 test \$(( 1 + 1 )) = 2 || exit 1"
209 if (eval "$as_required") 2>/dev/null; then :
210 as_have_required=yes
211 else
212 as_have_required=no
213 fi
214 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
215
216 else
217 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
218 as_found=false
219 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
220 do
221 IFS=$as_save_IFS
222 test -z "$as_dir" && as_dir=.
223 as_found=:
224 case $as_dir in #(
225 /*)
226 for as_base in sh bash ksh sh5; do
227 # Try only shells that exist, to save several forks.
228 as_shell=$as_dir/$as_base
229 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
230 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
231 CONFIG_SHELL=$as_shell as_have_required=yes
232 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
233 break 2
234 fi
235 fi
236 done;;
237 esac
238 as_found=false
239 done
240 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
241 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
242 CONFIG_SHELL=$SHELL as_have_required=yes
243 fi; }
244 IFS=$as_save_IFS
245
246
247 if test "x$CONFIG_SHELL" != x; then :
248 export CONFIG_SHELL
249 # We cannot yet assume a decent shell, so we have to provide a
250 # neutralization value for shells without unset; and this also
251 # works around shells that cannot unset nonexistent variables.
252 # Preserve -v and -x to the replacement shell.
253 BASH_ENV=/dev/null
254 ENV=/dev/null
255 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
256 case $- in # ((((
257 *v*x* | *x*v* ) as_opts=-vx ;;
258 *v* ) as_opts=-v ;;
259 *x* ) as_opts=-x ;;
260 * ) as_opts= ;;
261 esac
262 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
263 # Admittedly, this is quite paranoid, since all the known shells bail
264 # out after a failed `exec'.
265 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
266 exit 255
267 fi
268
269 if test x$as_have_required = xno; then :
270 $as_echo "$0: This script requires a shell more modern than all"
271 $as_echo "$0: the shells that I found on your system."
272 if test x${ZSH_VERSION+set} = xset ; then
273 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
274 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
275 else
276 $as_echo "$0: Please tell bug-autoconf@gnu.org and dagargo@gmail.com
277 $0: about your system, including any error possibly output
278 $0: before this message. Then install a modern shell, or
279 $0: manually run the script under such a shell if you do
280 $0: have one."
281 fi
282 exit 1
283 fi
284 fi
285 fi
286 SHELL=${CONFIG_SHELL-/bin/sh}
287 export SHELL
288 # Unset more variables known to interfere with behavior of common tools.
289 CLICOLOR_FORCE= GREP_OPTIONS=
290 unset CLICOLOR_FORCE GREP_OPTIONS
291
292 ## --------------------- ##
293 ## M4sh Shell Functions. ##
294 ## --------------------- ##
295 # as_fn_unset VAR
296 # ---------------
297 # Portably unset VAR.
298 as_fn_unset ()
299 {
300 { eval $1=; unset $1;}
301 }
302 as_unset=as_fn_unset
303
304 # as_fn_set_status STATUS
305 # -----------------------
306 # Set $? to STATUS, without forking.
307 as_fn_set_status ()
308 {
309 return $1
310 } # as_fn_set_status
311
312 # as_fn_exit STATUS
313 # -----------------
314 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
315 as_fn_exit ()
316 {
317 set +e
318 as_fn_set_status $1
319 exit $1
320 } # as_fn_exit
321
322 # as_fn_mkdir_p
323 # -------------
324 # Create "$as_dir" as a directory, including parents if necessary.
325 as_fn_mkdir_p ()
326 {
327
328 case $as_dir in #(
329 -*) as_dir=./$as_dir;;
330 esac
331 test -d "$as_dir" || eval $as_mkdir_p || {
332 as_dirs=
333 while :; do
334 case $as_dir in #(
335 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
336 *) as_qdir=$as_dir;;
337 esac
338 as_dirs="'$as_qdir' $as_dirs"
339 as_dir=`$as_dirname -- "$as_dir" ||
340 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
341 X"$as_dir" : 'X\(//\)[^/]' \| \
342 X"$as_dir" : 'X\(//\)$' \| \
343 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
344 $as_echo X"$as_dir" |
345 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
346 s//\1/
347 q
348 }
349 /^X\(\/\/\)[^/].*/{
350 s//\1/
351 q
352 }
353 /^X\(\/\/\)$/{
354 s//\1/
355 q
356 }
357 /^X\(\/\).*/{
358 s//\1/
359 q
360 }
361 s/.*/./; q'`
362 test -d "$as_dir" && break
363 done
364 test -z "$as_dirs" || eval "mkdir $as_dirs"
365 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
366
367
368 } # as_fn_mkdir_p
369
370 # as_fn_executable_p FILE
371 # -----------------------
372 # Test if FILE is an executable regular file.
373 as_fn_executable_p ()
374 {
375 test -f "$1" && test -x "$1"
376 } # as_fn_executable_p
377 # as_fn_append VAR VALUE
378 # ----------------------
379 # Append the text in VALUE to the end of the definition contained in VAR. Take
380 # advantage of any shell optimizations that allow amortized linear growth over
381 # repeated appends, instead of the typical quadratic growth present in naive
382 # implementations.
383 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
384 eval 'as_fn_append ()
385 {
386 eval $1+=\$2
387 }'
388 else
389 as_fn_append ()
390 {
391 eval $1=\$$1\$2
392 }
393 fi # as_fn_append
394
395 # as_fn_arith ARG...
396 # ------------------
397 # Perform arithmetic evaluation on the ARGs, and store the result in the
398 # global $as_val. Take advantage of shells that can avoid forks. The arguments
399 # must be portable across $(()) and expr.
400 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
401 eval 'as_fn_arith ()
402 {
403 as_val=$(( $* ))
404 }'
405 else
406 as_fn_arith ()
407 {
408 as_val=`expr "$@" || test $? -eq 1`
409 }
410 fi # as_fn_arith
411
412
413 # as_fn_error STATUS ERROR [LINENO LOG_FD]
414 # ----------------------------------------
415 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
416 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
417 # script with STATUS, using 1 if that was 0.
418 as_fn_error ()
419 {
420 as_status=$1; test $as_status -eq 0 && as_status=1
421 if test "$4"; then
422 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
423 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
424 fi
425 $as_echo "$as_me: error: $2" >&2
426 as_fn_exit $as_status
427 } # as_fn_error
428
429 if expr a : '\(a\)' >/dev/null 2>&1 &&
430 test "X`expr 00001 : '.*\(...\)'`" = X001; then
431 as_expr=expr
432 else
433 as_expr=false
434 fi
435
436 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
437 as_basename=basename
438 else
439 as_basename=false
440 fi
441
442 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
443 as_dirname=dirname
444 else
445 as_dirname=false
446 fi
447
448 as_me=`$as_basename -- "$0" ||
449 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
450 X"$0" : 'X\(//\)$' \| \
451 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
452 $as_echo X/"$0" |
453 sed '/^.*\/\([^/][^/]*\)\/*$/{
454 s//\1/
455 q
456 }
457 /^X\/\(\/\/\)$/{
458 s//\1/
459 q
460 }
461 /^X\/\(\/\).*/{
462 s//\1/
463 q
464 }
465 s/.*/./; q'`
466
467 # Avoid depending upon Character Ranges.
468 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
469 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
470 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
471 as_cr_digits='0123456789'
472 as_cr_alnum=$as_cr_Letters$as_cr_digits
473
474
475 as_lineno_1=$LINENO as_lineno_1a=$LINENO
476 as_lineno_2=$LINENO as_lineno_2a=$LINENO
477 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
478 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
479 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
480 sed -n '
481 p
482 /[$]LINENO/=
483 ' <$as_myself |
484 sed '
485 s/[$]LINENO.*/&-/
486 t lineno
487 b
488 :lineno
489 N
490 :loop
491 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
492 t loop
493 s/-\n.*//
494 ' >$as_me.lineno &&
495 chmod +x "$as_me.lineno" ||
496 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
497
498 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
499 # already done that, so ensure we don't try to do so again and fall
500 # in an infinite loop. This has already happened in practice.
501 _as_can_reexec=no; export _as_can_reexec
502 # Don't try to exec as it changes $[0], causing all sort of problems
503 # (the dirname of $[0] is not the place where we might find the
504 # original and so on. Autoconf is especially sensitive to this).
505 . "./$as_me.lineno"
506 # Exit status is that of the last command.
507 exit
508 }
509
510 ECHO_C= ECHO_N= ECHO_T=
511 case `echo -n x` in #(((((
512 -n*)
513 case `echo 'xy\c'` in
514 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
515 xy) ECHO_C='\c';;
516 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
517 ECHO_T=' ';;
518 esac;;
519 *)
520 ECHO_N='-n';;
521 esac
522
523 rm -f conf$$ conf$$.exe conf$$.file
524 if test -d conf$$.dir; then
525 rm -f conf$$.dir/conf$$.file
526 else
527 rm -f conf$$.dir
528 mkdir conf$$.dir 2>/dev/null
529 fi
530 if (echo >conf$$.file) 2>/dev/null; then
531 if ln -s conf$$.file conf$$ 2>/dev/null; then
532 as_ln_s='ln -s'
533 # ... but there are two gotchas:
534 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
535 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
536 # In both cases, we have to default to `cp -pR'.
537 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
538 as_ln_s='cp -pR'
539 elif ln conf$$.file conf$$ 2>/dev/null; then
540 as_ln_s=ln
541 else
542 as_ln_s='cp -pR'
543 fi
544 else
545 as_ln_s='cp -pR'
546 fi
547 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
548 rmdir conf$$.dir 2>/dev/null
549
550 if mkdir -p . 2>/dev/null; then
551 as_mkdir_p='mkdir -p "$as_dir"'
552 else
553 test -d ./-p && rmdir ./-p
554 as_mkdir_p=false
555 fi
556
557 as_test_x='test -x'
558 as_executable_p=as_fn_executable_p
559
560 # Sed expression to map a string onto a valid CPP name.
561 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
562
563 # Sed expression to map a string onto a valid variable name.
564 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
565
566 SHELL=${CONFIG_SHELL-/bin/sh}
567
568
569 test -n "$DJDIR" || exec 7<&0 </dev/null
570 exec 6>&1
571
572 # Name of the host.
573 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
574 # so uname gets run too.
575 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
576
577 #
578 # Initializations.
579 #
580 ac_default_prefix=/usr/local
581 ac_clean_files=
582 ac_config_libobj_dir=.
583 LIBOBJS=
584 cross_compiling=no
585 subdirs=
586 MFLAGS=
587 MAKEFLAGS=
588
589 # Identity of this package.
590 PACKAGE_NAME='elektroid'
591 PACKAGE_TARNAME='elektroid'
592 PACKAGE_VERSION='2.2'
593 PACKAGE_STRING='elektroid 2.2'
594 PACKAGE_BUGREPORT='dagargo@gmail.com'
595 PACKAGE_URL=''
596
597 ac_unique_file="src"
598 # Factoring default headers for most tests.
599 ac_includes_default="\
600 #include <stdio.h>
601 #ifdef HAVE_SYS_TYPES_H
602 # include <sys/types.h>
603 #endif
604 #ifdef HAVE_SYS_STAT_H
605 # include <sys/stat.h>
606 #endif
607 #ifdef STDC_HEADERS
608 # include <stdlib.h>
609 # include <stddef.h>
610 #else
611 # ifdef HAVE_STDLIB_H
612 # include <stdlib.h>
613 # endif
614 #endif
615 #ifdef HAVE_STRING_H
616 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
617 # include <memory.h>
618 # endif
619 # include <string.h>
620 #endif
621 #ifdef HAVE_STRINGS_H
622 # include <strings.h>
623 #endif
624 #ifdef HAVE_INTTYPES_H
625 # include <inttypes.h>
626 #endif
627 #ifdef HAVE_STDINT_H
628 # include <stdint.h>
629 #endif
630 #ifdef HAVE_UNISTD_H
631 # include <unistd.h>
632 #endif"
633
634 gt_needs=
635 ac_subst_vars='am__EXEEXT_FALSE
636 am__EXEEXT_TRUE
637 LTLIBOBJS
638 LIBOBJS
639 POSUB
640 LTLIBINTL
641 LIBINTL
642 INTLLIBS
643 LTLIBICONV
644 LIBICONV
645 INTL_MACOSX_LIBS
646 XGETTEXT_EXTRA_OPTIONS
647 MSGMERGE
648 XGETTEXT_015
649 XGETTEXT
650 GMSGFMT_015
651 MSGFMT_015
652 GMSGFMT
653 MSGFMT
654 GETTEXT_MACRO_VERSION
655 USE_NLS
656 PULSEAUDIO_LIBS
657 PULSEAUDIO_CFLAGS
658 SAMPLERATE_LIBS
659 SAMPLERATE_CFLAGS
660 SNDFILE_LIBS
661 SNDFILE_CFLAGS
662 GTK_LIBS
663 GTK_CFLAGS
664 libzip_LIBS
665 libzip_CFLAGS
666 zlib_LIBS
667 zlib_CFLAGS
668 ALSA_LIBS
669 ALSA_CFLAGS
670 PKG_CONFIG_LIBDIR
671 PKG_CONFIG_PATH
672 PKG_CONFIG
673 GUI_FALSE
674 GUI_TRUE
675 CLI_ONLY_FALSE
676 CLI_ONLY_TRUE
677 AM_BACKSLASH
678 AM_DEFAULT_VERBOSITY
679 AM_DEFAULT_V
680 AM_V
681 am__fastdepCC_FALSE
682 am__fastdepCC_TRUE
683 CCDEPMODE
684 am__nodep
685 AMDEPBACKSLASH
686 AMDEP_FALSE
687 AMDEP_TRUE
688 am__include
689 DEPDIR
690 am__untar
691 am__tar
692 AMTAR
693 am__leading_dot
694 SET_MAKE
695 mkdir_p
696 MKDIR_P
697 INSTALL_STRIP_PROGRAM
698 install_sh
699 MAKEINFO
700 AUTOHEADER
701 AUTOMAKE
702 AUTOCONF
703 ACLOCAL
704 VERSION
705 PACKAGE
706 CYGPATH_W
707 am__isrc
708 INSTALL_DATA
709 INSTALL_SCRIPT
710 INSTALL_PROGRAM
711 CPP
712 LT_SYS_LIBRARY_PATH
713 OTOOL64
714 OTOOL
715 LIPO
716 NMEDIT
717 DSYMUTIL
718 MANIFEST_TOOL
719 AWK
720 RANLIB
721 STRIP
722 ac_ct_AR
723 AR
724 DLLTOOL
725 OBJDUMP
726 LN_S
727 NM
728 ac_ct_DUMPBIN
729 DUMPBIN
730 LD
731 FGREP
732 EGREP
733 GREP
734 SED
735 OBJEXT
736 EXEEXT
737 ac_ct_CC
738 CPPFLAGS
739 LDFLAGS
740 CFLAGS
741 CC
742 host_os
743 host_vendor
744 host_cpu
745 host
746 build_os
747 build_vendor
748 build_cpu
749 build
750 LIBTOOL
751 target_alias
752 host_alias
753 build_alias
754 LIBS
755 ECHO_T
756 ECHO_N
757 ECHO_C
758 DEFS
759 mandir
760 localedir
761 libdir
762 psdir
763 pdfdir
764 dvidir
765 htmldir
766 infodir
767 docdir
768 oldincludedir
769 includedir
770 runstatedir
771 localstatedir
772 sharedstatedir
773 sysconfdir
774 datadir
775 datarootdir
776 libexecdir
777 sbindir
778 bindir
779 program_transform_name
780 prefix
781 exec_prefix
782 PACKAGE_URL
783 PACKAGE_BUGREPORT
784 PACKAGE_STRING
785 PACKAGE_VERSION
786 PACKAGE_TARNAME
787 PACKAGE_NAME
788 PATH_SEPARATOR
789 SHELL
790 am__quote'
791 ac_subst_files=''
792 ac_user_opts='
793 enable_option_checking
794 enable_shared
795 enable_static
796 with_pic
797 enable_fast_install
798 with_aix_soname
799 with_gnu_ld
800 with_sysroot
801 enable_libtool_lock
802 enable_dependency_tracking
803 enable_silent_rules
804 enable_nls
805 enable_rpath
806 with_libiconv_prefix
807 with_libintl_prefix
808 '
809 ac_precious_vars='build_alias
810 host_alias
811 target_alias
812 CC
813 CFLAGS
814 LDFLAGS
815 LIBS
816 CPPFLAGS
817 LT_SYS_LIBRARY_PATH
818 CPP
819 PKG_CONFIG
820 PKG_CONFIG_PATH
821 PKG_CONFIG_LIBDIR
822 ALSA_CFLAGS
823 ALSA_LIBS
824 zlib_CFLAGS
825 zlib_LIBS
826 libzip_CFLAGS
827 libzip_LIBS
828 GTK_CFLAGS
829 GTK_LIBS
830 SNDFILE_CFLAGS
831 SNDFILE_LIBS
832 SAMPLERATE_CFLAGS
833 SAMPLERATE_LIBS
834 PULSEAUDIO_CFLAGS
835 PULSEAUDIO_LIBS'
836
837
838 # Initialize some variables set by options.
839 ac_init_help=
840 ac_init_version=false
841 ac_unrecognized_opts=
842 ac_unrecognized_sep=
843 # The variables have the same names as the options, with
844 # dashes changed to underlines.
845 cache_file=/dev/null
846 exec_prefix=NONE
847 no_create=
848 no_recursion=
849 prefix=NONE
850 program_prefix=NONE
851 program_suffix=NONE
852 program_transform_name=s,x,x,
853 silent=
854 site=
855 srcdir=
856 verbose=
857 x_includes=NONE
858 x_libraries=NONE
859
860 # Installation directory options.
861 # These are left unexpanded so users can "make install exec_prefix=/foo"
862 # and all the variables that are supposed to be based on exec_prefix
863 # by default will actually change.
864 # Use braces instead of parens because sh, perl, etc. also accept them.
865 # (The list follows the same order as the GNU Coding Standards.)
866 bindir='${exec_prefix}/bin'
867 sbindir='${exec_prefix}/sbin'
868 libexecdir='${exec_prefix}/libexec'
869 datarootdir='${prefix}/share'
870 datadir='${datarootdir}'
871 sysconfdir='${prefix}/etc'
872 sharedstatedir='${prefix}/com'
873 localstatedir='${prefix}/var'
874 runstatedir='${localstatedir}/run'
875 includedir='${prefix}/include'
876 oldincludedir='/usr/include'
877 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
878 infodir='${datarootdir}/info'
879 htmldir='${docdir}'
880 dvidir='${docdir}'
881 pdfdir='${docdir}'
882 psdir='${docdir}'
883 libdir='${exec_prefix}/lib'
884 localedir='${datarootdir}/locale'
885 mandir='${datarootdir}/man'
886
887 ac_prev=
888 ac_dashdash=
889 for ac_option
890 do
891 # If the previous option needs an argument, assign it.
892 if test -n "$ac_prev"; then
893 eval $ac_prev=\$ac_option
894 ac_prev=
895 continue
896 fi
897
898 case $ac_option in
899 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
900 *=) ac_optarg= ;;
901 *) ac_optarg=yes ;;
902 esac
903
904 # Accept the important Cygnus configure options, so we can diagnose typos.
905
906 case $ac_dashdash$ac_option in
907 --)
908 ac_dashdash=yes ;;
909
910 -bindir | --bindir | --bindi | --bind | --bin | --bi)
911 ac_prev=bindir ;;
912 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
913 bindir=$ac_optarg ;;
914
915 -build | --build | --buil | --bui | --bu)
916 ac_prev=build_alias ;;
917 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
918 build_alias=$ac_optarg ;;
919
920 -cache-file | --cache-file | --cache-fil | --cache-fi \
921 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
922 ac_prev=cache_file ;;
923 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
924 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
925 cache_file=$ac_optarg ;;
926
927 --config-cache | -C)
928 cache_file=config.cache ;;
929
930 -datadir | --datadir | --datadi | --datad)
931 ac_prev=datadir ;;
932 -datadir=* | --datadir=* | --datadi=* | --datad=*)
933 datadir=$ac_optarg ;;
934
935 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
936 | --dataroo | --dataro | --datar)
937 ac_prev=datarootdir ;;
938 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
939 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
940 datarootdir=$ac_optarg ;;
941
942 -disable-* | --disable-*)
943 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
944 # Reject names that are not valid shell variable names.
945 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
946 as_fn_error $? "invalid feature name: $ac_useropt"
947 ac_useropt_orig=$ac_useropt
948 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
949 case $ac_user_opts in
950 *"
951 "enable_$ac_useropt"
952 "*) ;;
953 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
954 ac_unrecognized_sep=', ';;
955 esac
956 eval enable_$ac_useropt=no ;;
957
958 -docdir | --docdir | --docdi | --doc | --do)
959 ac_prev=docdir ;;
960 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
961 docdir=$ac_optarg ;;
962
963 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
964 ac_prev=dvidir ;;
965 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
966 dvidir=$ac_optarg ;;
967
968 -enable-* | --enable-*)
969 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
970 # Reject names that are not valid shell variable names.
971 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
972 as_fn_error $? "invalid feature name: $ac_useropt"
973 ac_useropt_orig=$ac_useropt
974 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
975 case $ac_user_opts in
976 *"
977 "enable_$ac_useropt"
978 "*) ;;
979 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
980 ac_unrecognized_sep=', ';;
981 esac
982 eval enable_$ac_useropt=\$ac_optarg ;;
983
984 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
985 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
986 | --exec | --exe | --ex)
987 ac_prev=exec_prefix ;;
988 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
989 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
990 | --exec=* | --exe=* | --ex=*)
991 exec_prefix=$ac_optarg ;;
992
993 -gas | --gas | --ga | --g)
994 # Obsolete; use --with-gas.
995 with_gas=yes ;;
996
997 -help | --help | --hel | --he | -h)
998 ac_init_help=long ;;
999 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1000 ac_init_help=recursive ;;
1001 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1002 ac_init_help=short ;;
1003
1004 -host | --host | --hos | --ho)
1005 ac_prev=host_alias ;;
1006 -host=* | --host=* | --hos=* | --ho=*)
1007 host_alias=$ac_optarg ;;
1008
1009 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1010 ac_prev=htmldir ;;
1011 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1012 | --ht=*)
1013 htmldir=$ac_optarg ;;
1014
1015 -includedir | --includedir | --includedi | --included | --include \
1016 | --includ | --inclu | --incl | --inc)
1017 ac_prev=includedir ;;
1018 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1019 | --includ=* | --inclu=* | --incl=* | --inc=*)
1020 includedir=$ac_optarg ;;
1021
1022 -infodir | --infodir | --infodi | --infod | --info | --inf)
1023 ac_prev=infodir ;;
1024 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1025 infodir=$ac_optarg ;;
1026
1027 -libdir | --libdir | --libdi | --libd)
1028 ac_prev=libdir ;;
1029 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1030 libdir=$ac_optarg ;;
1031
1032 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1033 | --libexe | --libex | --libe)
1034 ac_prev=libexecdir ;;
1035 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1036 | --libexe=* | --libex=* | --libe=*)
1037 libexecdir=$ac_optarg ;;
1038
1039 -localedir | --localedir | --localedi | --localed | --locale)
1040 ac_prev=localedir ;;
1041 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1042 localedir=$ac_optarg ;;
1043
1044 -localstatedir | --localstatedir | --localstatedi | --localstated \
1045 | --localstate | --localstat | --localsta | --localst | --locals)
1046 ac_prev=localstatedir ;;
1047 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1048 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1049 localstatedir=$ac_optarg ;;
1050
1051 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1052 ac_prev=mandir ;;
1053 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1054 mandir=$ac_optarg ;;
1055
1056 -nfp | --nfp | --nf)
1057 # Obsolete; use --without-fp.
1058 with_fp=no ;;
1059
1060 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1061 | --no-cr | --no-c | -n)
1062 no_create=yes ;;
1063
1064 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1065 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1066 no_recursion=yes ;;
1067
1068 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1069 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1070 | --oldin | --oldi | --old | --ol | --o)
1071 ac_prev=oldincludedir ;;
1072 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1073 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1074 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1075 oldincludedir=$ac_optarg ;;
1076
1077 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1078 ac_prev=prefix ;;
1079 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1080 prefix=$ac_optarg ;;
1081
1082 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1083 | --program-pre | --program-pr | --program-p)
1084 ac_prev=program_prefix ;;
1085 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1086 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1087 program_prefix=$ac_optarg ;;
1088
1089 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1090 | --program-suf | --program-su | --program-s)
1091 ac_prev=program_suffix ;;
1092 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1093 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1094 program_suffix=$ac_optarg ;;
1095
1096 -program-transform-name | --program-transform-name \
1097 | --program-transform-nam | --program-transform-na \
1098 | --program-transform-n | --program-transform- \
1099 | --program-transform | --program-transfor \
1100 | --program-transfo | --program-transf \
1101 | --program-trans | --program-tran \
1102 | --progr-tra | --program-tr | --program-t)
1103 ac_prev=program_transform_name ;;
1104 -program-transform-name=* | --program-transform-name=* \
1105 | --program-transform-nam=* | --program-transform-na=* \
1106 | --program-transform-n=* | --program-transform-=* \
1107 | --program-transform=* | --program-transfor=* \
1108 | --program-transfo=* | --program-transf=* \
1109 | --program-trans=* | --program-tran=* \
1110 | --progr-tra=* | --program-tr=* | --program-t=*)
1111 program_transform_name=$ac_optarg ;;
1112
1113 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1114 ac_prev=pdfdir ;;
1115 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1116 pdfdir=$ac_optarg ;;
1117
1118 -psdir | --psdir | --psdi | --psd | --ps)
1119 ac_prev=psdir ;;
1120 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1121 psdir=$ac_optarg ;;
1122
1123 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1124 | -silent | --silent | --silen | --sile | --sil)
1125 silent=yes ;;
1126
1127 -runstatedir | --runstatedir | --runstatedi | --runstated \
1128 | --runstate | --runstat | --runsta | --runst | --runs \
1129 | --run | --ru | --r)
1130 ac_prev=runstatedir ;;
1131 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1132 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1133 | --run=* | --ru=* | --r=*)
1134 runstatedir=$ac_optarg ;;
1135
1136 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1137 ac_prev=sbindir ;;
1138 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1139 | --sbi=* | --sb=*)
1140 sbindir=$ac_optarg ;;
1141
1142 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1143 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1144 | --sharedst | --shareds | --shared | --share | --shar \
1145 | --sha | --sh)
1146 ac_prev=sharedstatedir ;;
1147 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1148 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1149 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1150 | --sha=* | --sh=*)
1151 sharedstatedir=$ac_optarg ;;
1152
1153 -site | --site | --sit)
1154 ac_prev=site ;;
1155 -site=* | --site=* | --sit=*)
1156 site=$ac_optarg ;;
1157
1158 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1159 ac_prev=srcdir ;;
1160 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1161 srcdir=$ac_optarg ;;
1162
1163 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1164 | --syscon | --sysco | --sysc | --sys | --sy)
1165 ac_prev=sysconfdir ;;
1166 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1167 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1168 sysconfdir=$ac_optarg ;;
1169
1170 -target | --target | --targe | --targ | --tar | --ta | --t)
1171 ac_prev=target_alias ;;
1172 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1173 target_alias=$ac_optarg ;;
1174
1175 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1176 verbose=yes ;;
1177
1178 -version | --version | --versio | --versi | --vers | -V)
1179 ac_init_version=: ;;
1180
1181 -with-* | --with-*)
1182 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1183 # Reject names that are not valid shell variable names.
1184 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1185 as_fn_error $? "invalid package name: $ac_useropt"
1186 ac_useropt_orig=$ac_useropt
1187 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1188 case $ac_user_opts in
1189 *"
1190 "with_$ac_useropt"
1191 "*) ;;
1192 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1193 ac_unrecognized_sep=', ';;
1194 esac
1195 eval with_$ac_useropt=\$ac_optarg ;;
1196
1197 -without-* | --without-*)
1198 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1199 # Reject names that are not valid shell variable names.
1200 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1201 as_fn_error $? "invalid package name: $ac_useropt"
1202 ac_useropt_orig=$ac_useropt
1203 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1204 case $ac_user_opts in
1205 *"
1206 "with_$ac_useropt"
1207 "*) ;;
1208 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1209 ac_unrecognized_sep=', ';;
1210 esac
1211 eval with_$ac_useropt=no ;;
1212
1213 --x)
1214 # Obsolete; use --with-x.
1215 with_x=yes ;;
1216
1217 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1218 | --x-incl | --x-inc | --x-in | --x-i)
1219 ac_prev=x_includes ;;
1220 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1221 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1222 x_includes=$ac_optarg ;;
1223
1224 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1225 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1226 ac_prev=x_libraries ;;
1227 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1228 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1229 x_libraries=$ac_optarg ;;
1230
1231 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1232 Try \`$0 --help' for more information"
1233 ;;
1234
1235 *=*)
1236 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1237 # Reject names that are not valid shell variable names.
1238 case $ac_envvar in #(
1239 '' | [0-9]* | *[!_$as_cr_alnum]* )
1240 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1241 esac
1242 eval $ac_envvar=\$ac_optarg
1243 export $ac_envvar ;;
1244
1245 *)
1246 # FIXME: should be removed in autoconf 3.0.
1247 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1248 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1249 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1250 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1251 ;;
1252
1253 esac
1254 done
1255
1256 if test -n "$ac_prev"; then
1257 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1258 as_fn_error $? "missing argument to $ac_option"
1259 fi
1260
1261 if test -n "$ac_unrecognized_opts"; then
1262 case $enable_option_checking in
1263 no) ;;
1264 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1265 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1266 esac
1267 fi
1268
1269 # Check all directory arguments for consistency.
1270 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1271 datadir sysconfdir sharedstatedir localstatedir includedir \
1272 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1273 libdir localedir mandir runstatedir
1274 do
1275 eval ac_val=\$$ac_var
1276 # Remove trailing slashes.
1277 case $ac_val in
1278 */ )
1279 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1280 eval $ac_var=\$ac_val;;
1281 esac
1282 # Be sure to have absolute directory names.
1283 case $ac_val in
1284 [\\/$]* | ?:[\\/]* ) continue;;
1285 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1286 esac
1287 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1288 done
1289
1290 # There might be people who depend on the old broken behavior: `$host'
1291 # used to hold the argument of --host etc.
1292 # FIXME: To remove some day.
1293 build=$build_alias
1294 host=$host_alias
1295 target=$target_alias
1296
1297 # FIXME: To remove some day.
1298 if test "x$host_alias" != x; then
1299 if test "x$build_alias" = x; then
1300 cross_compiling=maybe
1301 elif test "x$build_alias" != "x$host_alias"; then
1302 cross_compiling=yes
1303 fi
1304 fi
1305
1306 ac_tool_prefix=
1307 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1308
1309 test "$silent" = yes && exec 6>/dev/null
1310
1311
1312 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1313 ac_ls_di=`ls -di .` &&
1314 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1315 as_fn_error $? "working directory cannot be determined"
1316 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1317 as_fn_error $? "pwd does not report name of working directory"
1318
1319
1320 # Find the source files, if location was not specified.
1321 if test -z "$srcdir"; then
1322 ac_srcdir_defaulted=yes
1323 # Try the directory containing this script, then the parent directory.
1324 ac_confdir=`$as_dirname -- "$as_myself" ||
1325 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1326 X"$as_myself" : 'X\(//\)[^/]' \| \
1327 X"$as_myself" : 'X\(//\)$' \| \
1328 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1329 $as_echo X"$as_myself" |
1330 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1331 s//\1/
1332 q
1333 }
1334 /^X\(\/\/\)[^/].*/{
1335 s//\1/
1336 q
1337 }
1338 /^X\(\/\/\)$/{
1339 s//\1/
1340 q
1341 }
1342 /^X\(\/\).*/{
1343 s//\1/
1344 q
1345 }
1346 s/.*/./; q'`
1347 srcdir=$ac_confdir
1348 if test ! -r "$srcdir/$ac_unique_file"; then
1349 srcdir=..
1350 fi
1351 else
1352 ac_srcdir_defaulted=no
1353 fi
1354 if test ! -r "$srcdir/$ac_unique_file"; then
1355 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1356 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1357 fi
1358 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1359 ac_abs_confdir=`(
1360 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1361 pwd)`
1362 # When building in place, set srcdir=.
1363 if test "$ac_abs_confdir" = "$ac_pwd"; then
1364 srcdir=.
1365 fi
1366 # Remove unnecessary trailing slashes from srcdir.
1367 # Double slashes in file names in object file debugging info
1368 # mess up M-x gdb in Emacs.
1369 case $srcdir in
1370 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1371 esac
1372 for ac_var in $ac_precious_vars; do
1373 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1374 eval ac_env_${ac_var}_value=\$${ac_var}
1375 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1376 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1377 done
1378
1379 #
1380 # Report the --help message.
1381 #
1382 if test "$ac_init_help" = "long"; then
1383 # Omit some internal or obsolete options to make the list less imposing.
1384 # This message is too long to be a string in the A/UX 3.1 sh.
1385 cat <<_ACEOF
1386 \`configure' configures elektroid 2.2 to adapt to many kinds of systems.
1387
1388 Usage: $0 [OPTION]... [VAR=VALUE]...
1389
1390 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1391 VAR=VALUE. See below for descriptions of some of the useful variables.
1392
1393 Defaults for the options are specified in brackets.
1394
1395 Configuration:
1396 -h, --help display this help and exit
1397 --help=short display options specific to this package
1398 --help=recursive display the short help of all the included packages
1399 -V, --version display version information and exit
1400 -q, --quiet, --silent do not print \`checking ...' messages
1401 --cache-file=FILE cache test results in FILE [disabled]
1402 -C, --config-cache alias for \`--cache-file=config.cache'
1403 -n, --no-create do not create output files
1404 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1405
1406 Installation directories:
1407 --prefix=PREFIX install architecture-independent files in PREFIX
1408 [$ac_default_prefix]
1409 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1410 [PREFIX]
1411
1412 By default, \`make install' will install all the files in
1413 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1414 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1415 for instance \`--prefix=\$HOME'.
1416
1417 For better control, use the options below.
1418
1419 Fine tuning of the installation directories:
1420 --bindir=DIR user executables [EPREFIX/bin]
1421 --sbindir=DIR system admin executables [EPREFIX/sbin]
1422 --libexecdir=DIR program executables [EPREFIX/libexec]
1423 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1424 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1425 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1426 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
1427 --libdir=DIR object code libraries [EPREFIX/lib]
1428 --includedir=DIR C header files [PREFIX/include]
1429 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1430 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1431 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1432 --infodir=DIR info documentation [DATAROOTDIR/info]
1433 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1434 --mandir=DIR man documentation [DATAROOTDIR/man]
1435 --docdir=DIR documentation root [DATAROOTDIR/doc/elektroid]
1436 --htmldir=DIR html documentation [DOCDIR]
1437 --dvidir=DIR dvi documentation [DOCDIR]
1438 --pdfdir=DIR pdf documentation [DOCDIR]
1439 --psdir=DIR ps documentation [DOCDIR]
1440 _ACEOF
1441
1442 cat <<\_ACEOF
1443
1444 Program names:
1445 --program-prefix=PREFIX prepend PREFIX to installed program names
1446 --program-suffix=SUFFIX append SUFFIX to installed program names
1447 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1448
1449 System types:
1450 --build=BUILD configure for building on BUILD [guessed]
1451 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1452 _ACEOF
1453 fi
1454
1455 if test -n "$ac_init_help"; then
1456 case $ac_init_help in
1457 short | recursive ) echo "Configuration of elektroid 2.2:";;
1458 esac
1459 cat <<\_ACEOF
1460
1461 Optional Features:
1462 --disable-option-checking ignore unrecognized --enable/--with options
1463 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1464 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1465 --enable-shared[=PKGS] build shared libraries [default=yes]
1466 --enable-static[=PKGS] build static libraries [default=yes]
1467 --enable-fast-install[=PKGS]
1468 optimize for fast installation [default=yes]
1469 --disable-libtool-lock avoid locking (might break parallel builds)
1470 --enable-dependency-tracking
1471 do not reject slow dependency extractors
1472 --disable-dependency-tracking
1473 speeds up one-time build
1474 --enable-silent-rules less verbose build output (undo: "make V=1")
1475 --disable-silent-rules verbose build output (undo: "make V=0")
1476 --disable-nls do not use Native Language Support
1477 --disable-rpath do not hardcode runtime library paths
1478
1479 Optional Packages:
1480 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1481 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1482 --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
1483 both]
1484 --with-aix-soname=aix|svr4|both
1485 shared library versioning (aka "SONAME") variant to
1486 provide on AIX, [default=aix].
1487 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
1488 --with-sysroot[=DIR] Search for dependent libraries within DIR (or the
1489 compiler's sysroot if not specified).
1490 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
1491 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1492 --without-libiconv-prefix don't search for libiconv in includedir and libdir
1493 --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
1494 --without-libintl-prefix don't search for libintl in includedir and libdir
1495
1496 Some influential environment variables:
1497 CC C compiler command
1498 CFLAGS C compiler flags
1499 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1500 nonstandard directory <lib dir>
1501 LIBS libraries to pass to the linker, e.g. -l<library>
1502 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1503 you have headers in a nonstandard directory <include dir>
1504 LT_SYS_LIBRARY_PATH
1505 User-defined run-time library search path.
1506 CPP C preprocessor
1507 PKG_CONFIG path to pkg-config utility
1508 PKG_CONFIG_PATH
1509 directories to add to pkg-config's search path
1510 PKG_CONFIG_LIBDIR
1511 path overriding pkg-config's built-in search path
1512 ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1513 ALSA_LIBS linker flags for ALSA, overriding pkg-config
1514 zlib_CFLAGS C compiler flags for zlib, overriding pkg-config
1515 zlib_LIBS linker flags for zlib, overriding pkg-config
1516 libzip_CFLAGS
1517 C compiler flags for libzip, overriding pkg-config
1518 libzip_LIBS linker flags for libzip, overriding pkg-config
1519 GTK_CFLAGS C compiler flags for GTK, overriding pkg-config
1520 GTK_LIBS linker flags for GTK, overriding pkg-config
1521 SNDFILE_CFLAGS
1522 C compiler flags for SNDFILE, overriding pkg-config
1523 SNDFILE_LIBS
1524 linker flags for SNDFILE, overriding pkg-config
1525 SAMPLERATE_CFLAGS
1526 C compiler flags for SAMPLERATE, overriding pkg-config
1527 SAMPLERATE_LIBS
1528 linker flags for SAMPLERATE, overriding pkg-config
1529 PULSEAUDIO_CFLAGS
1530 C compiler flags for PULSEAUDIO, overriding pkg-config
1531 PULSEAUDIO_LIBS
1532 linker flags for PULSEAUDIO, overriding pkg-config
1533
1534 Use these variables to override the choices made by `configure' or to help
1535 it to find libraries and programs with nonstandard names/locations.
1536
1537 Report bugs to <dagargo@gmail.com>.
1538 _ACEOF
1539 ac_status=$?
1540 fi
1541
1542 if test "$ac_init_help" = "recursive"; then
1543 # If there are subdirs, report their specific --help.
1544 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1545 test -d "$ac_dir" ||
1546 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1547 continue
1548 ac_builddir=.
1549
1550 case "$ac_dir" in
1551 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1552 *)
1553 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1554 # A ".." for each directory in $ac_dir_suffix.
1555 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1556 case $ac_top_builddir_sub in
1557 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1558 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1559 esac ;;
1560 esac
1561 ac_abs_top_builddir=$ac_pwd
1562 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1563 # for backward compatibility:
1564 ac_top_builddir=$ac_top_build_prefix
1565
1566 case $srcdir in
1567 .) # We are building in place.
1568 ac_srcdir=.
1569 ac_top_srcdir=$ac_top_builddir_sub
1570 ac_abs_top_srcdir=$ac_pwd ;;
1571 [\\/]* | ?:[\\/]* ) # Absolute name.
1572 ac_srcdir=$srcdir$ac_dir_suffix;
1573 ac_top_srcdir=$srcdir
1574 ac_abs_top_srcdir=$srcdir ;;
1575 *) # Relative name.
1576 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1577 ac_top_srcdir=$ac_top_build_prefix$srcdir
1578 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1579 esac
1580 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1581
1582 cd "$ac_dir" || { ac_status=$?; continue; }
1583 # Check for guested configure.
1584 if test -f "$ac_srcdir/configure.gnu"; then
1585 echo &&
1586 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1587 elif test -f "$ac_srcdir/configure"; then
1588 echo &&
1589 $SHELL "$ac_srcdir/configure" --help=recursive
1590 else
1591 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1592 fi || ac_status=$?
1593 cd "$ac_pwd" || { ac_status=$?; break; }
1594 done
1595 fi
1596
1597 test -n "$ac_init_help" && exit $ac_status
1598 if $ac_init_version; then
1599 cat <<\_ACEOF
1600 elektroid configure 2.2
1601 generated by GNU Autoconf 2.69
1602
1603 Copyright (C) 2012 Free Software Foundation, Inc.
1604 This configure script is free software; the Free Software Foundation
1605 gives unlimited permission to copy, distribute and modify it.
1606 _ACEOF
1607 exit
1608 fi
1609
1610 ## ------------------------ ##
1611 ## Autoconf initialization. ##
1612 ## ------------------------ ##
1613
1614 # ac_fn_c_try_compile LINENO
1615 # --------------------------
1616 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1617 ac_fn_c_try_compile ()
1618 {
1619 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1620 rm -f conftest.$ac_objext
1621 if { { ac_try="$ac_compile"
1622 case "(($ac_try" in
1623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1624 *) ac_try_echo=$ac_try;;
1625 esac
1626 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1627 $as_echo "$ac_try_echo"; } >&5
1628 (eval "$ac_compile") 2>conftest.err
1629 ac_status=$?
1630 if test -s conftest.err; then
1631 grep -v '^ *+' conftest.err >conftest.er1
1632 cat conftest.er1 >&5
1633 mv -f conftest.er1 conftest.err
1634 fi
1635 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1636 test $ac_status = 0; } && {
1637 test -z "$ac_c_werror_flag" ||
1638 test ! -s conftest.err
1639 } && test -s conftest.$ac_objext; then :
1640 ac_retval=0
1641 else
1642 $as_echo "$as_me: failed program was:" >&5
1643 sed 's/^/| /' conftest.$ac_ext >&5
1644
1645 ac_retval=1
1646 fi
1647 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1648 as_fn_set_status $ac_retval
1649
1650 } # ac_fn_c_try_compile
1651
1652 # ac_fn_c_try_link LINENO
1653 # -----------------------
1654 # Try to link conftest.$ac_ext, and return whether this succeeded.
1655 ac_fn_c_try_link ()
1656 {
1657 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1658 rm -f conftest.$ac_objext conftest$ac_exeext
1659 if { { ac_try="$ac_link"
1660 case "(($ac_try" in
1661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1662 *) ac_try_echo=$ac_try;;
1663 esac
1664 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1665 $as_echo "$ac_try_echo"; } >&5
1666 (eval "$ac_link") 2>conftest.err
1667 ac_status=$?
1668 if test -s conftest.err; then
1669 grep -v '^ *+' conftest.err >conftest.er1
1670 cat conftest.er1 >&5
1671 mv -f conftest.er1 conftest.err
1672 fi
1673 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1674 test $ac_status = 0; } && {
1675 test -z "$ac_c_werror_flag" ||
1676 test ! -s conftest.err
1677 } && test -s conftest$ac_exeext && {
1678 test "$cross_compiling" = yes ||
1679 test -x conftest$ac_exeext
1680 }; then :
1681 ac_retval=0
1682 else
1683 $as_echo "$as_me: failed program was:" >&5
1684 sed 's/^/| /' conftest.$ac_ext >&5
1685
1686 ac_retval=1
1687 fi
1688 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1689 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1690 # interfere with the next link command; also delete a directory that is
1691 # left behind by Apple's compiler. We do this before executing the actions.
1692 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1693 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1694 as_fn_set_status $ac_retval
1695
1696 } # ac_fn_c_try_link
1697
1698 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1699 # -------------------------------------------------------
1700 # Tests whether HEADER exists and can be compiled using the include files in
1701 # INCLUDES, setting the cache variable VAR accordingly.
1702 ac_fn_c_check_header_compile ()
1703 {
1704 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1706 $as_echo_n "checking for $2... " >&6; }
1707 if eval \${$3+:} false; then :
1708 $as_echo_n "(cached) " >&6
1709 else
1710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1711 /* end confdefs.h. */
1712 $4
1713 #include <$2>
1714 _ACEOF
1715 if ac_fn_c_try_compile "$LINENO"; then :
1716 eval "$3=yes"
1717 else
1718 eval "$3=no"
1719 fi
1720 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1721 fi
1722 eval ac_res=\$$3
1723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1724 $as_echo "$ac_res" >&6; }
1725 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1726
1727 } # ac_fn_c_check_header_compile
1728
1729 # ac_fn_c_try_cpp LINENO
1730 # ----------------------
1731 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1732 ac_fn_c_try_cpp ()
1733 {
1734 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1735 if { { ac_try="$ac_cpp conftest.$ac_ext"
1736 case "(($ac_try" in
1737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1738 *) ac_try_echo=$ac_try;;
1739 esac
1740 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1741 $as_echo "$ac_try_echo"; } >&5
1742 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1743 ac_status=$?
1744 if test -s conftest.err; then
1745 grep -v '^ *+' conftest.err >conftest.er1
1746 cat conftest.er1 >&5
1747 mv -f conftest.er1 conftest.err
1748 fi
1749 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1750 test $ac_status = 0; } > conftest.i && {
1751 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1752 test ! -s conftest.err
1753 }; then :
1754 ac_retval=0
1755 else
1756 $as_echo "$as_me: failed program was:" >&5
1757 sed 's/^/| /' conftest.$ac_ext >&5
1758
1759 ac_retval=1
1760 fi
1761 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1762 as_fn_set_status $ac_retval
1763
1764 } # ac_fn_c_try_cpp
1765
1766 # ac_fn_c_try_run LINENO
1767 # ----------------------
1768 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1769 # that executables *can* be run.
1770 ac_fn_c_try_run ()
1771 {
1772 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1773 if { { ac_try="$ac_link"
1774 case "(($ac_try" in
1775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1776 *) ac_try_echo=$ac_try;;
1777 esac
1778 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1779 $as_echo "$ac_try_echo"; } >&5
1780 (eval "$ac_link") 2>&5
1781 ac_status=$?
1782 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1783 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1784 { { case "(($ac_try" in
1785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1786 *) ac_try_echo=$ac_try;;
1787 esac
1788 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1789 $as_echo "$ac_try_echo"; } >&5
1790 (eval "$ac_try") 2>&5
1791 ac_status=$?
1792 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1793 test $ac_status = 0; }; }; then :
1794 ac_retval=0
1795 else
1796 $as_echo "$as_me: program exited with status $ac_status" >&5
1797 $as_echo "$as_me: failed program was:" >&5
1798 sed 's/^/| /' conftest.$ac_ext >&5
1799
1800 ac_retval=$ac_status
1801 fi
1802 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1803 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1804 as_fn_set_status $ac_retval
1805
1806 } # ac_fn_c_try_run
1807
1808 # ac_fn_c_check_func LINENO FUNC VAR
1809 # ----------------------------------
1810 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1811 ac_fn_c_check_func ()
1812 {
1813 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1815 $as_echo_n "checking for $2... " >&6; }
1816 if eval \${$3+:} false; then :
1817 $as_echo_n "(cached) " >&6
1818 else
1819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1820 /* end confdefs.h. */
1821 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1822 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1823 #define $2 innocuous_$2
1824
1825 /* System header to define __stub macros and hopefully few prototypes,
1826 which can conflict with char $2 (); below.
1827 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1828 <limits.h> exists even on freestanding compilers. */
1829
1830 #ifdef __STDC__
1831 # include <limits.h>
1832 #else
1833 # include <assert.h>
1834 #endif
1835
1836 #undef $2
1837
1838 /* Override any GCC internal prototype to avoid an error.
1839 Use char because int might match the return type of a GCC
1840 builtin and then its argument prototype would still apply. */
1841 #ifdef __cplusplus
1842 extern "C"
1843 #endif
1844 char $2 ();
1845 /* The GNU C library defines this for functions which it implements
1846 to always fail with ENOSYS. Some functions are actually named
1847 something starting with __ and the normal name is an alias. */
1848 #if defined __stub_$2 || defined __stub___$2
1849 choke me
1850 #endif
1851
1852 int
1853 main ()
1854 {
1855 return $2 ();
1856 ;
1857 return 0;
1858 }
1859 _ACEOF
1860 if ac_fn_c_try_link "$LINENO"; then :
1861 eval "$3=yes"
1862 else
1863 eval "$3=no"
1864 fi
1865 rm -f core conftest.err conftest.$ac_objext \
1866 conftest$ac_exeext conftest.$ac_ext
1867 fi
1868 eval ac_res=\$$3
1869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1870 $as_echo "$ac_res" >&6; }
1871 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1872
1873 } # ac_fn_c_check_func
1874
1875 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1876 # -------------------------------------------------------
1877 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1878 # the include files in INCLUDES and setting the cache variable VAR
1879 # accordingly.
1880 ac_fn_c_check_header_mongrel ()
1881 {
1882 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1883 if eval \${$3+:} false; then :
1884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1885 $as_echo_n "checking for $2... " >&6; }
1886 if eval \${$3+:} false; then :
1887 $as_echo_n "(cached) " >&6
1888 fi
1889 eval ac_res=\$$3
1890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1891 $as_echo "$ac_res" >&6; }
1892 else
1893 # Is the header compilable?
1894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1895 $as_echo_n "checking $2 usability... " >&6; }
1896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1897 /* end confdefs.h. */
1898 $4
1899 #include <$2>
1900 _ACEOF
1901 if ac_fn_c_try_compile "$LINENO"; then :
1902 ac_header_compiler=yes
1903 else
1904 ac_header_compiler=no
1905 fi
1906 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1908 $as_echo "$ac_header_compiler" >&6; }
1909
1910 # Is the header present?
1911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1912 $as_echo_n "checking $2 presence... " >&6; }
1913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1914 /* end confdefs.h. */
1915 #include <$2>
1916 _ACEOF
1917 if ac_fn_c_try_cpp "$LINENO"; then :
1918 ac_header_preproc=yes
1919 else
1920 ac_header_preproc=no
1921 fi
1922 rm -f conftest.err conftest.i conftest.$ac_ext
1923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1924 $as_echo "$ac_header_preproc" >&6; }
1925
1926 # So? What about this header?
1927 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1928 yes:no: )
1929 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1930 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1931 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1932 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1933 ;;
1934 no:yes:* )
1935 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1936 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1937 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1938 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1939 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1940 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1941 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1942 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1943 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1944 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1945 ( $as_echo "## -------------------------------- ##
1946 ## Report this to dagargo@gmail.com ##
1947 ## -------------------------------- ##"
1948 ) | sed "s/^/$as_me: WARNING: /" >&2
1949 ;;
1950 esac
1951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1952 $as_echo_n "checking for $2... " >&6; }
1953 if eval \${$3+:} false; then :
1954 $as_echo_n "(cached) " >&6
1955 else
1956 eval "$3=\$ac_header_compiler"
1957 fi
1958 eval ac_res=\$$3
1959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1960 $as_echo "$ac_res" >&6; }
1961 fi
1962 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1963
1964 } # ac_fn_c_check_header_mongrel
1965 cat >config.log <<_ACEOF
1966 This file contains any messages produced by compilers while
1967 running configure, to aid debugging if configure makes a mistake.
1968
1969 It was created by elektroid $as_me 2.2, which was
1970 generated by GNU Autoconf 2.69. Invocation command line was
1971
1972 $ $0 $@
1973
1974 _ACEOF
1975 exec 5>>config.log
1976 {
1977 cat <<_ASUNAME
1978 ## --------- ##
1979 ## Platform. ##
1980 ## --------- ##
1981
1982 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1983 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1984 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1985 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1986 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1987
1988 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1989 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1990
1991 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1992 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1993 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1994 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
1995 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1996 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1997 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1998
1999 _ASUNAME
2000
2001 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2002 for as_dir in $PATH
2003 do
2004 IFS=$as_save_IFS
2005 test -z "$as_dir" && as_dir=.
2006 $as_echo "PATH: $as_dir"
2007 done
2008 IFS=$as_save_IFS
2009
2010 } >&5
2011
2012 cat >&5 <<_ACEOF
2013
2014
2015 ## ----------- ##
2016 ## Core tests. ##
2017 ## ----------- ##
2018
2019 _ACEOF
2020
2021
2022 # Keep a trace of the command line.
2023 # Strip out --no-create and --no-recursion so they do not pile up.
2024 # Strip out --silent because we don't want to record it for future runs.
2025 # Also quote any args containing shell meta-characters.
2026 # Make two passes to allow for proper duplicate-argument suppression.
2027 ac_configure_args=
2028 ac_configure_args0=
2029 ac_configure_args1=
2030 ac_must_keep_next=false
2031 for ac_pass in 1 2
2032 do
2033 for ac_arg
2034 do
2035 case $ac_arg in
2036 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2037 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2038 | -silent | --silent | --silen | --sile | --sil)
2039 continue ;;
2040 *\'*)
2041 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2042 esac
2043 case $ac_pass in
2044 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2045 2)
2046 as_fn_append ac_configure_args1 " '$ac_arg'"
2047 if test $ac_must_keep_next = true; then
2048 ac_must_keep_next=false # Got value, back to normal.
2049 else
2050 case $ac_arg in
2051 *=* | --config-cache | -C | -disable-* | --disable-* \
2052 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2053 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2054 | -with-* | --with-* | -without-* | --without-* | --x)
2055 case "$ac_configure_args0 " in
2056 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2057 esac
2058 ;;
2059 -* ) ac_must_keep_next=true ;;
2060 esac
2061 fi
2062 as_fn_append ac_configure_args " '$ac_arg'"
2063 ;;
2064 esac
2065 done
2066 done
2067 { ac_configure_args0=; unset ac_configure_args0;}
2068 { ac_configure_args1=; unset ac_configure_args1;}
2069
2070 # When interrupted or exit'd, cleanup temporary files, and complete
2071 # config.log. We remove comments because anyway the quotes in there
2072 # would cause problems or look ugly.
2073 # WARNING: Use '\'' to represent an apostrophe within the trap.
2074 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2075 trap 'exit_status=$?
2076 # Save into config.log some information that might help in debugging.
2077 {
2078 echo
2079
2080 $as_echo "## ---------------- ##
2081 ## Cache variables. ##
2082 ## ---------------- ##"
2083 echo
2084 # The following way of writing the cache mishandles newlines in values,
2085 (
2086 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2087 eval ac_val=\$$ac_var
2088 case $ac_val in #(
2089 *${as_nl}*)
2090 case $ac_var in #(
2091 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2092 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2093 esac
2094 case $ac_var in #(
2095 _ | IFS | as_nl) ;; #(
2096 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2097 *) { eval $ac_var=; unset $ac_var;} ;;
2098 esac ;;
2099 esac
2100 done
2101 (set) 2>&1 |
2102 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2103 *${as_nl}ac_space=\ *)
2104 sed -n \
2105 "s/'\''/'\''\\\\'\'''\''/g;
2106 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2107 ;; #(
2108 *)
2109 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2110 ;;
2111 esac |
2112 sort
2113 )
2114 echo
2115
2116 $as_echo "## ----------------- ##
2117 ## Output variables. ##
2118 ## ----------------- ##"
2119 echo
2120 for ac_var in $ac_subst_vars
2121 do
2122 eval ac_val=\$$ac_var
2123 case $ac_val in
2124 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2125 esac
2126 $as_echo "$ac_var='\''$ac_val'\''"
2127 done | sort
2128 echo
2129
2130 if test -n "$ac_subst_files"; then
2131 $as_echo "## ------------------- ##
2132 ## File substitutions. ##
2133 ## ------------------- ##"
2134 echo
2135 for ac_var in $ac_subst_files
2136 do
2137 eval ac_val=\$$ac_var
2138 case $ac_val in
2139 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2140 esac
2141 $as_echo "$ac_var='\''$ac_val'\''"
2142 done | sort
2143 echo
2144 fi
2145
2146 if test -s confdefs.h; then
2147 $as_echo "## ----------- ##
2148 ## confdefs.h. ##
2149 ## ----------- ##"
2150 echo
2151 cat confdefs.h
2152 echo
2153 fi
2154 test "$ac_signal" != 0 &&
2155 $as_echo "$as_me: caught signal $ac_signal"
2156 $as_echo "$as_me: exit $exit_status"
2157 } >&5
2158 rm -f core *.core core.conftest.* &&
2159 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2160 exit $exit_status
2161 ' 0
2162 for ac_signal in 1 2 13 15; do
2163 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2164 done
2165 ac_signal=0
2166
2167 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2168 rm -f -r conftest* confdefs.h
2169
2170 $as_echo "/* confdefs.h */" > confdefs.h
2171
2172 # Predefined preprocessor variables.
2173
2174 cat >>confdefs.h <<_ACEOF
2175 #define PACKAGE_NAME "$PACKAGE_NAME"
2176 _ACEOF
2177
2178 cat >>confdefs.h <<_ACEOF
2179 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2180 _ACEOF
2181
2182 cat >>confdefs.h <<_ACEOF
2183 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2184 _ACEOF
2185
2186 cat >>confdefs.h <<_ACEOF
2187 #define PACKAGE_STRING "$PACKAGE_STRING"
2188 _ACEOF
2189
2190 cat >>confdefs.h <<_ACEOF
2191 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2192 _ACEOF
2193
2194 cat >>confdefs.h <<_ACEOF
2195 #define PACKAGE_URL "$PACKAGE_URL"
2196 _ACEOF
2197
2198
2199 # Let the site file select an alternate cache file if it wants to.
2200 # Prefer an explicitly selected file to automatically selected ones.
2201 ac_site_file1=NONE
2202 ac_site_file2=NONE
2203 if test -n "$CONFIG_SITE"; then
2204 # We do not want a PATH search for config.site.
2205 case $CONFIG_SITE in #((
2206 -*) ac_site_file1=./$CONFIG_SITE;;
2207 */*) ac_site_file1=$CONFIG_SITE;;
2208 *) ac_site_file1=./$CONFIG_SITE;;
2209 esac
2210 elif test "x$prefix" != xNONE; then
2211 ac_site_file1=$prefix/share/config.site
2212 ac_site_file2=$prefix/etc/config.site
2213 else
2214 ac_site_file1=$ac_default_prefix/share/config.site
2215 ac_site_file2=$ac_default_prefix/etc/config.site
2216 fi
2217 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2218 do
2219 test "x$ac_site_file" = xNONE && continue
2220 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2221 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2222 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2223 sed 's/^/| /' "$ac_site_file" >&5
2224 . "$ac_site_file" \
2225 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2226 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2227 as_fn_error $? "failed to load site script $ac_site_file
2228 See \`config.log' for more details" "$LINENO" 5; }
2229 fi
2230 done
2231
2232 if test -r "$cache_file"; then
2233 # Some versions of bash will fail to source /dev/null (special files
2234 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2235 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2236 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2237 $as_echo "$as_me: loading cache $cache_file" >&6;}
2238 case $cache_file in
2239 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2240 *) . "./$cache_file";;
2241 esac
2242 fi
2243 else
2244 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2245 $as_echo "$as_me: creating cache $cache_file" >&6;}
2246 >$cache_file
2247 fi
2248
2249 gt_needs="$gt_needs "
2250 # Check that the precious variables saved in the cache have kept the same
2251 # value.
2252 ac_cache_corrupted=false
2253 for ac_var in $ac_precious_vars; do
2254 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2255 eval ac_new_set=\$ac_env_${ac_var}_set
2256 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2257 eval ac_new_val=\$ac_env_${ac_var}_value
2258 case $ac_old_set,$ac_new_set in
2259 set,)
2260 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2261 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2262 ac_cache_corrupted=: ;;
2263 ,set)
2264 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2265 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2266 ac_cache_corrupted=: ;;
2267 ,);;
2268 *)
2269 if test "x$ac_old_val" != "x$ac_new_val"; then
2270 # differences in whitespace do not lead to failure.
2271 ac_old_val_w=`echo x $ac_old_val`
2272 ac_new_val_w=`echo x $ac_new_val`
2273 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2274 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2275 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2276 ac_cache_corrupted=:
2277 else
2278 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2279 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2280 eval $ac_var=\$ac_old_val
2281 fi
2282 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2283 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2284 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2285 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2286 fi;;
2287 esac
2288 # Pass precious variables to config.status.
2289 if test "$ac_new_set" = set; then
2290 case $ac_new_val in
2291 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2292 *) ac_arg=$ac_var=$ac_new_val ;;
2293 esac
2294 case " $ac_configure_args " in
2295 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2296 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2297 esac
2298 fi
2299 done
2300 if $ac_cache_corrupted; then
2301 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2302 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2303 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2304 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2305 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2306 fi
2307 ## -------------------- ##
2308 ## Main body of script. ##
2309 ## -------------------- ##
2310
2311 ac_ext=c
2312 ac_cpp='$CPP $CPPFLAGS'
2313 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2314 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2315 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2316
2317
2318
2319 ac_config_headers="$ac_config_headers config.h"
2320
2321 ac_aux_dir=
2322 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2323 if test -f "$ac_dir/install-sh"; then
2324 ac_aux_dir=$ac_dir
2325 ac_install_sh="$ac_aux_dir/install-sh -c"
2326 break
2327 elif test -f "$ac_dir/install.sh"; then
2328 ac_aux_dir=$ac_dir
2329 ac_install_sh="$ac_aux_dir/install.sh -c"
2330 break
2331 elif test -f "$ac_dir/shtool"; then
2332 ac_aux_dir=$ac_dir
2333 ac_install_sh="$ac_aux_dir/shtool install -c"
2334 break
2335 fi
2336 done
2337 if test -z "$ac_aux_dir"; then
2338 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2339 fi
2340
2341 # These three variables are undocumented and unsupported,
2342 # and are intended to be withdrawn in a future Autoconf release.
2343 # They can cause serious problems if a builder's source tree is in a directory
2344 # whose full name contains unusual characters.
2345 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2346 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2347 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2348
2349
2350 case `pwd` in
2351 *\ * | *\ *)
2352 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
2353 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
2354 esac
2355
2356
2357
2358 macro_version='2.4.6'
2359 macro_revision='2.4.6'
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373 ltmain=$ac_aux_dir/ltmain.sh
2374
2375 # Make sure we can run config.sub.
2376 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2377 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2378
2379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2380 $as_echo_n "checking build system type... " >&6; }
2381 if ${ac_cv_build+:} false; then :
2382 $as_echo_n "(cached) " >&6
2383 else
2384 ac_build_alias=$build_alias
2385 test "x$ac_build_alias" = x &&
2386 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2387 test "x$ac_build_alias" = x &&
2388 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2389 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2390 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2391
2392 fi
2393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2394 $as_echo "$ac_cv_build" >&6; }
2395 case $ac_cv_build in
2396 *-*-*) ;;
2397 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2398 esac
2399 build=$ac_cv_build
2400 ac_save_IFS=$IFS; IFS='-'
2401 set x $ac_cv_build
2402 shift
2403 build_cpu=$1
2404 build_vendor=$2
2405 shift; shift
2406 # Remember, the first character of IFS is used to create $*,
2407 # except with old shells:
2408 build_os=$*
2409 IFS=$ac_save_IFS
2410 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2411
2412
2413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2414 $as_echo_n "checking host system type... " >&6; }
2415 if ${ac_cv_host+:} false; then :
2416 $as_echo_n "(cached) " >&6
2417 else
2418 if test "x$host_alias" = x; then
2419 ac_cv_host=$ac_cv_build
2420 else
2421 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2422 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2423 fi
2424
2425 fi
2426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2427 $as_echo "$ac_cv_host" >&6; }
2428 case $ac_cv_host in
2429 *-*-*) ;;
2430 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2431 esac
2432 host=$ac_cv_host
2433 ac_save_IFS=$IFS; IFS='-'
2434 set x $ac_cv_host
2435 shift
2436 host_cpu=$1
2437 host_vendor=$2
2438 shift; shift
2439 # Remember, the first character of IFS is used to create $*,
2440 # except with old shells:
2441 host_os=$*
2442 IFS=$ac_save_IFS
2443 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2444
2445
2446 # Backslashify metacharacters that are still active within
2447 # double-quoted strings.
2448 sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
2449
2450 # Same as above, but do not quote variable references.
2451 double_quote_subst='s/\(["`\\]\)/\\\1/g'
2452
2453 # Sed substitution to delay expansion of an escaped shell variable in a
2454 # double_quote_subst'ed string.
2455 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
2456
2457 # Sed substitution to delay expansion of an escaped single quote.
2458 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
2459
2460 # Sed substitution to avoid accidental globbing in evaled expressions
2461 no_glob_subst='s/\*/\\\*/g'
2462
2463 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2464 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2465 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2466
2467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
2468 $as_echo_n "checking how to print strings... " >&6; }
2469 # Test print first, because it will be a builtin if present.
2470 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
2471 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
2472 ECHO='print -r --'
2473 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
2474 ECHO='printf %s\n'
2475 else
2476 # Use this function as a fallback that always works.
2477 func_fallback_echo ()
2478 {
2479 eval 'cat <<_LTECHO_EOF
2480 $1
2481 _LTECHO_EOF'
2482 }
2483 ECHO='func_fallback_echo'
2484 fi
2485
2486 # func_echo_all arg...
2487 # Invoke $ECHO with all args, space-separated.
2488 func_echo_all ()
2489 {
2490 $ECHO ""
2491 }
2492
2493 case $ECHO in
2494 printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
2495 $as_echo "printf" >&6; } ;;
2496 print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
2497 $as_echo "print -r" >&6; } ;;
2498 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
2499 $as_echo "cat" >&6; } ;;
2500 esac
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515 # Expand $ac_aux_dir to an absolute path.
2516 am_aux_dir=`cd "$ac_aux_dir" && pwd`
2517
2518 ac_ext=c
2519 ac_cpp='$CPP $CPPFLAGS'
2520 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2521 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2522 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2523 if test -n "$ac_tool_prefix"; then
2524 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2525 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2527 $as_echo_n "checking for $ac_word... " >&6; }
2528 if ${ac_cv_prog_CC+:} false; then :
2529 $as_echo_n "(cached) " >&6
2530 else
2531 if test -n "$CC"; then
2532 ac_cv_prog_CC="$CC" # Let the user override the test.
2533 else
2534 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2535 for as_dir in $PATH
2536 do
2537 IFS=$as_save_IFS
2538 test -z "$as_dir" && as_dir=.
2539 for ac_exec_ext in '' $ac_executable_extensions; do
2540 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2541 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2542 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2543 break 2
2544 fi
2545 done
2546 done
2547 IFS=$as_save_IFS
2548
2549 fi
2550 fi
2551 CC=$ac_cv_prog_CC
2552 if test -n "$CC"; then
2553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2554 $as_echo "$CC" >&6; }
2555 else
2556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2557 $as_echo "no" >&6; }
2558 fi
2559
2560
2561 fi
2562 if test -z "$ac_cv_prog_CC"; then
2563 ac_ct_CC=$CC
2564 # Extract the first word of "gcc", so it can be a program name with args.
2565 set dummy gcc; ac_word=$2
2566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2567 $as_echo_n "checking for $ac_word... " >&6; }
2568 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2569 $as_echo_n "(cached) " >&6
2570 else
2571 if test -n "$ac_ct_CC"; then
2572 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2573 else
2574 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2575 for as_dir in $PATH
2576 do
2577 IFS=$as_save_IFS
2578 test -z "$as_dir" && as_dir=.
2579 for ac_exec_ext in '' $ac_executable_extensions; do
2580 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2581 ac_cv_prog_ac_ct_CC="gcc"
2582 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2583 break 2
2584 fi
2585 done
2586 done
2587 IFS=$as_save_IFS
2588
2589 fi
2590 fi
2591 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2592 if test -n "$ac_ct_CC"; then
2593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2594 $as_echo "$ac_ct_CC" >&6; }
2595 else
2596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2597 $as_echo "no" >&6; }
2598 fi
2599
2600 if test "x$ac_ct_CC" = x; then
2601 CC=""
2602 else
2603 case $cross_compiling:$ac_tool_warned in
2604 yes:)
2605 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2606 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2607 ac_tool_warned=yes ;;
2608 esac
2609 CC=$ac_ct_CC
2610 fi
2611 else
2612 CC="$ac_cv_prog_CC"
2613 fi
2614
2615 if test -z "$CC"; then
2616 if test -n "$ac_tool_prefix"; then
2617 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2618 set dummy ${ac_tool_prefix}cc; ac_word=$2
2619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2620 $as_echo_n "checking for $ac_word... " >&6; }
2621 if ${ac_cv_prog_CC+:} false; then :
2622 $as_echo_n "(cached) " >&6
2623 else
2624 if test -n "$CC"; then
2625 ac_cv_prog_CC="$CC" # Let the user override the test.
2626 else
2627 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2628 for as_dir in $PATH
2629 do
2630 IFS=$as_save_IFS
2631 test -z "$as_dir" && as_dir=.
2632 for ac_exec_ext in '' $ac_executable_extensions; do
2633 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2634 ac_cv_prog_CC="${ac_tool_prefix}cc"
2635 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2636 break 2
2637 fi
2638 done
2639 done
2640 IFS=$as_save_IFS
2641
2642 fi
2643 fi
2644 CC=$ac_cv_prog_CC
2645 if test -n "$CC"; then
2646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2647 $as_echo "$CC" >&6; }
2648 else
2649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2650 $as_echo "no" >&6; }
2651 fi
2652
2653
2654 fi
2655 fi
2656 if test -z "$CC"; then
2657 # Extract the first word of "cc", so it can be a program name with args.
2658 set dummy cc; ac_word=$2
2659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2660 $as_echo_n "checking for $ac_word... " >&6; }
2661 if ${ac_cv_prog_CC+:} false; then :
2662 $as_echo_n "(cached) " >&6
2663 else
2664 if test -n "$CC"; then
2665 ac_cv_prog_CC="$CC" # Let the user override the test.
2666 else
2667 ac_prog_rejected=no
2668 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2669 for as_dir in $PATH
2670 do
2671 IFS=$as_save_IFS
2672 test -z "$as_dir" && as_dir=.
2673 for ac_exec_ext in '' $ac_executable_extensions; do
2674 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2675 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2676 ac_prog_rejected=yes
2677 continue
2678 fi
2679 ac_cv_prog_CC="cc"
2680 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2681 break 2
2682 fi
2683 done
2684 done
2685 IFS=$as_save_IFS
2686
2687 if test $ac_prog_rejected = yes; then
2688 # We found a bogon in the path, so make sure we never use it.
2689 set dummy $ac_cv_prog_CC
2690 shift
2691 if test $# != 0; then
2692 # We chose a different compiler from the bogus one.
2693 # However, it has the same basename, so the bogon will be chosen
2694 # first if we set CC to just the basename; use the full file name.
2695 shift
2696 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2697 fi
2698 fi
2699 fi
2700 fi
2701 CC=$ac_cv_prog_CC
2702 if test -n "$CC"; then
2703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2704 $as_echo "$CC" >&6; }
2705 else
2706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2707 $as_echo "no" >&6; }
2708 fi
2709
2710
2711 fi
2712 if test -z "$CC"; then
2713 if test -n "$ac_tool_prefix"; then
2714 for ac_prog in cl.exe
2715 do
2716 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2717 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2719 $as_echo_n "checking for $ac_word... " >&6; }
2720 if ${ac_cv_prog_CC+:} false; then :
2721 $as_echo_n "(cached) " >&6
2722 else
2723 if test -n "$CC"; then
2724 ac_cv_prog_CC="$CC" # Let the user override the test.
2725 else
2726 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2727 for as_dir in $PATH
2728 do
2729 IFS=$as_save_IFS
2730 test -z "$as_dir" && as_dir=.
2731 for ac_exec_ext in '' $ac_executable_extensions; do
2732 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2733 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2734 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2735 break 2
2736 fi
2737 done
2738 done
2739 IFS=$as_save_IFS
2740
2741 fi
2742 fi
2743 CC=$ac_cv_prog_CC
2744 if test -n "$CC"; then
2745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2746 $as_echo "$CC" >&6; }
2747 else
2748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2749 $as_echo "no" >&6; }
2750 fi
2751
2752
2753 test -n "$CC" && break
2754 done
2755 fi
2756 if test -z "$CC"; then
2757 ac_ct_CC=$CC
2758 for ac_prog in cl.exe
2759 do
2760 # Extract the first word of "$ac_prog", so it can be a program name with args.
2761 set dummy $ac_prog; ac_word=$2
2762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2763 $as_echo_n "checking for $ac_word... " >&6; }
2764 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2765 $as_echo_n "(cached) " >&6
2766 else
2767 if test -n "$ac_ct_CC"; then
2768 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2769 else
2770 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2771 for as_dir in $PATH
2772 do
2773 IFS=$as_save_IFS
2774 test -z "$as_dir" && as_dir=.
2775 for ac_exec_ext in '' $ac_executable_extensions; do
2776 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2777 ac_cv_prog_ac_ct_CC="$ac_prog"
2778 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2779 break 2
2780 fi
2781 done
2782 done
2783 IFS=$as_save_IFS
2784
2785 fi
2786 fi
2787 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2788 if test -n "$ac_ct_CC"; then
2789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2790 $as_echo "$ac_ct_CC" >&6; }
2791 else
2792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2793 $as_echo "no" >&6; }
2794 fi
2795
2796
2797 test -n "$ac_ct_CC" && break
2798 done
2799
2800 if test "x$ac_ct_CC" = x; then
2801 CC=""
2802 else
2803 case $cross_compiling:$ac_tool_warned in
2804 yes:)
2805 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2806 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2807 ac_tool_warned=yes ;;
2808 esac
2809 CC=$ac_ct_CC
2810 fi
2811 fi
2812
2813 fi
2814
2815
2816 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2817 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2818 as_fn_error $? "no acceptable C compiler found in \$PATH
2819 See \`config.log' for more details" "$LINENO" 5; }
2820
2821 # Provide some information about the compiler.
2822 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2823 set X $ac_compile
2824 ac_compiler=$2
2825 for ac_option in --version -v -V -qversion; do
2826 { { ac_try="$ac_compiler $ac_option >&5"
2827 case "(($ac_try" in
2828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2829 *) ac_try_echo=$ac_try;;
2830 esac
2831 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2832 $as_echo "$ac_try_echo"; } >&5
2833 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
2834 ac_status=$?
2835 if test -s conftest.err; then
2836 sed '10a\
2837 ... rest of stderr output deleted ...
2838 10q' conftest.err >conftest.er1
2839 cat conftest.er1 >&5
2840 fi
2841 rm -f conftest.er1 conftest.err
2842 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2843 test $ac_status = 0; }
2844 done
2845
2846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2847 /* end confdefs.h. */
2848
2849 int
2850 main ()
2851 {
2852
2853 ;
2854 return 0;
2855 }
2856 _ACEOF
2857 ac_clean_files_save=$ac_clean_files
2858 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
2859 # Try to create an executable without -o first, disregard a.out.
2860 # It will help us diagnose broken compilers, and finding out an intuition
2861 # of exeext.
2862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
2863 $as_echo_n "checking whether the C compiler works... " >&6; }
2864 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2865
2866 # The possible output files:
2867 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2868
2869 ac_rmfiles=
2870 for ac_file in $ac_files
2871 do
2872 case $ac_file in
2873 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2874 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2875 esac
2876 done
2877 rm -f $ac_rmfiles
2878
2879 if { { ac_try="$ac_link_default"
2880 case "(($ac_try" in
2881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2882 *) ac_try_echo=$ac_try;;
2883 esac
2884 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2885 $as_echo "$ac_try_echo"; } >&5
2886 (eval "$ac_link_default") 2>&5
2887 ac_status=$?
2888 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2889 test $ac_status = 0; }; then :
2890 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2891 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2892 # in a Makefile. We should not override ac_cv_exeext if it was cached,
2893 # so that the user can short-circuit this test for compilers unknown to
2894 # Autoconf.
2895 for ac_file in $ac_files ''
2896 do
2897 test -f "$ac_file" || continue
2898 case $ac_file in
2899 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
2900 ;;
2901 [ab].out )
2902 # We found the default executable, but exeext='' is most
2903 # certainly right.
2904 break;;
2905 *.* )
2906 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2907 then :; else
2908 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2909 fi
2910 # We set ac_cv_exeext here because the later test for it is not
2911 # safe: cross compilers may not add the suffix if given an `-o'
2912 # argument, so we may need to know it at that point already.
2913 # Even if this section looks crufty: it has the advantage of
2914 # actually working.
2915 break;;
2916 * )
2917 break;;
2918 esac
2919 done
2920 test "$ac_cv_exeext" = no && ac_cv_exeext=
2921
2922 else
2923 ac_file=''
2924 fi
2925 if test -z "$ac_file"; then :
2926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2927 $as_echo "no" >&6; }
2928 $as_echo "$as_me: failed program was:" >&5
2929 sed 's/^/| /' conftest.$ac_ext >&5
2930
2931 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2932 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2933 as_fn_error 77 "C compiler cannot create executables
2934 See \`config.log' for more details" "$LINENO" 5; }
2935 else
2936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2937 $as_echo "yes" >&6; }
2938 fi
2939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
2940 $as_echo_n "checking for C compiler default output file name... " >&6; }
2941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
2942 $as_echo "$ac_file" >&6; }
2943 ac_exeext=$ac_cv_exeext
2944
2945 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
2946 ac_clean_files=$ac_clean_files_save
2947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
2948 $as_echo_n "checking for suffix of executables... " >&6; }
2949 if { { ac_try="$ac_link"
2950 case "(($ac_try" in
2951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2952 *) ac_try_echo=$ac_try;;
2953 esac
2954 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2955 $as_echo "$ac_try_echo"; } >&5
2956 (eval "$ac_link") 2>&5
2957 ac_status=$?
2958 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2959 test $ac_status = 0; }; then :
2960 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2961 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2962 # work properly (i.e., refer to `conftest.exe'), while it won't with
2963 # `rm'.
2964 for ac_file in conftest.exe conftest conftest.*; do
2965 test -f "$ac_file" || continue
2966 case $ac_file in
2967 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2968 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2969 break;;
2970 * ) break;;
2971 esac
2972 done
2973 else
2974 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2975 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2976 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
2977 See \`config.log' for more details" "$LINENO" 5; }
2978 fi
2979 rm -f conftest conftest$ac_cv_exeext
2980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
2981 $as_echo "$ac_cv_exeext" >&6; }
2982
2983 rm -f conftest.$ac_ext
2984 EXEEXT=$ac_cv_exeext
2985 ac_exeext=$EXEEXT
2986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2987 /* end confdefs.h. */
2988 #include <stdio.h>
2989 int
2990 main ()
2991 {
2992 FILE *f = fopen ("conftest.out", "w");
2993 return ferror (f) || fclose (f) != 0;
2994
2995 ;
2996 return 0;
2997 }
2998 _ACEOF
2999 ac_clean_files="$ac_clean_files conftest.out"
3000 # Check that the compiler produces executables we can run. If not, either
3001 # the compiler is broken, or we cross compile.
3002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3003 $as_echo_n "checking whether we are cross compiling... " >&6; }
3004 if test "$cross_compiling" != yes; then
3005 { { ac_try="$ac_link"
3006 case "(($ac_try" in
3007 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3008 *) ac_try_echo=$ac_try;;
3009 esac
3010 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3011 $as_echo "$ac_try_echo"; } >&5
3012 (eval "$ac_link") 2>&5
3013 ac_status=$?
3014 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3015 test $ac_status = 0; }
3016 if { ac_try='./conftest$ac_cv_exeext'
3017 { { case "(($ac_try" in
3018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3019 *) ac_try_echo=$ac_try;;
3020 esac
3021 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3022 $as_echo "$ac_try_echo"; } >&5
3023 (eval "$ac_try") 2>&5
3024 ac_status=$?
3025 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3026 test $ac_status = 0; }; }; then
3027 cross_compiling=no
3028 else
3029 if test "$cross_compiling" = maybe; then
3030 cross_compiling=yes
3031 else
3032 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3033 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3034 as_fn_error $? "cannot run C compiled programs.
3035 If you meant to cross compile, use \`--host'.
3036 See \`config.log' for more details" "$LINENO" 5; }
3037 fi
3038 fi
3039 fi
3040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3041 $as_echo "$cross_compiling" >&6; }
3042
3043 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3044 ac_clean_files=$ac_clean_files_save
3045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3046 $as_echo_n "checking for suffix of object files... " >&6; }
3047 if ${ac_cv_objext+:} false; then :
3048 $as_echo_n "(cached) " >&6
3049 else
3050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3051 /* end confdefs.h. */
3052
3053 int
3054 main ()
3055 {
3056
3057 ;
3058 return 0;
3059 }
3060 _ACEOF
3061 rm -f conftest.o conftest.obj
3062 if { { ac_try="$ac_compile"
3063 case "(($ac_try" in
3064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3065 *) ac_try_echo=$ac_try;;
3066 esac
3067 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3068 $as_echo "$ac_try_echo"; } >&5
3069 (eval "$ac_compile") 2>&5
3070 ac_status=$?
3071 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3072 test $ac_status = 0; }; then :
3073 for ac_file in conftest.o conftest.obj conftest.*; do
3074 test -f "$ac_file" || continue;
3075 case $ac_file in
3076 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3077 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3078 break;;
3079 esac
3080 done
3081 else
3082 $as_echo "$as_me: failed program was:" >&5
3083 sed 's/^/| /' conftest.$ac_ext >&5
3084
3085 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3086 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3087 as_fn_error $? "cannot compute suffix of object files: cannot compile
3088 See \`config.log' for more details" "$LINENO" 5; }
3089 fi
3090 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3091 fi
3092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3093 $as_echo "$ac_cv_objext" >&6; }
3094 OBJEXT=$ac_cv_objext
3095 ac_objext=$OBJEXT
3096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3097 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3098 if ${ac_cv_c_compiler_gnu+:} false; then :
3099 $as_echo_n "(cached) " >&6
3100 else
3101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3102 /* end confdefs.h. */
3103
3104 int
3105 main ()
3106 {
3107 #ifndef __GNUC__
3108 choke me
3109 #endif
3110
3111 ;
3112 return 0;
3113 }
3114 _ACEOF
3115 if ac_fn_c_try_compile "$LINENO"; then :
3116 ac_compiler_gnu=yes
3117 else
3118 ac_compiler_gnu=no
3119 fi
3120 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3121 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3122
3123 fi
3124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3125 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3126 if test $ac_compiler_gnu = yes; then
3127 GCC=yes
3128 else
3129 GCC=
3130 fi
3131 ac_test_CFLAGS=${CFLAGS+set}
3132 ac_save_CFLAGS=$CFLAGS
3133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3134 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3135 if ${ac_cv_prog_cc_g+:} false; then :
3136 $as_echo_n "(cached) " >&6
3137 else
3138 ac_save_c_werror_flag=$ac_c_werror_flag
3139 ac_c_werror_flag=yes
3140 ac_cv_prog_cc_g=no
3141 CFLAGS="-g"
3142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3143 /* end confdefs.h. */
3144
3145 int
3146 main ()
3147 {
3148
3149 ;
3150 return 0;
3151 }
3152 _ACEOF
3153 if ac_fn_c_try_compile "$LINENO"; then :
3154 ac_cv_prog_cc_g=yes
3155 else
3156 CFLAGS=""
3157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3158 /* end confdefs.h. */
3159
3160 int
3161 main ()
3162 {
3163
3164 ;
3165 return 0;
3166 }
3167 _ACEOF
3168 if ac_fn_c_try_compile "$LINENO"; then :
3169
3170 else
3171 ac_c_werror_flag=$ac_save_c_werror_flag
3172 CFLAGS="-g"
3173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3174 /* end confdefs.h. */
3175
3176 int
3177 main ()
3178 {
3179
3180 ;
3181 return 0;
3182 }
3183 _ACEOF
3184 if ac_fn_c_try_compile "$LINENO"; then :
3185 ac_cv_prog_cc_g=yes
3186 fi
3187 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3188 fi
3189 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3190 fi
3191 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3192 ac_c_werror_flag=$ac_save_c_werror_flag
3193 fi
3194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3195 $as_echo "$ac_cv_prog_cc_g" >&6; }
3196 if test "$ac_test_CFLAGS" = set; then
3197 CFLAGS=$ac_save_CFLAGS
3198 elif test $ac_cv_prog_cc_g = yes; then
3199 if test "$GCC" = yes; then
3200 CFLAGS="-g -O2"
3201 else
3202 CFLAGS="-g"
3203 fi
3204 else
3205 if test "$GCC" = yes; then
3206 CFLAGS="-O2"
3207 else
3208 CFLAGS=
3209 fi
3210 fi
3211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3212 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3213 if ${ac_cv_prog_cc_c89+:} false; then :
3214 $as_echo_n "(cached) " >&6
3215 else
3216 ac_cv_prog_cc_c89=no
3217 ac_save_CC=$CC
3218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3219 /* end confdefs.h. */
3220 #include <stdarg.h>
3221 #include <stdio.h>
3222 struct stat;
3223 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3224 struct buf { int x; };
3225 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3226 static char *e (p, i)
3227 char **p;
3228 int i;
3229 {
3230 return p[i];
3231 }
3232 static char *f (char * (*g) (char **, int), char **p, ...)
3233 {
3234 char *s;
3235 va_list v;
3236 va_start (v,p);
3237 s = g (p, va_arg (v,int));
3238 va_end (v);
3239 return s;
3240 }
3241
3242 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3243 function prototypes and stuff, but not '\xHH' hex character constants.
3244 These don't provoke an error unfortunately, instead are silently treated
3245 as 'x'. The following induces an error, until -std is added to get
3246 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3247 array size at least. It's necessary to write '\x00'==0 to get something
3248 that's true only with -std. */
3249 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3250
3251 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3252 inside strings and character constants. */
3253 #define FOO(x) 'x'
3254 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3255
3256 int test (int i, double x);
3257 struct s1 {int (*f) (int a);};
3258 struct s2 {int (*f) (double a);};
3259 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3260 int argc;
3261 char **argv;
3262 int
3263 main ()
3264 {
3265 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3266 ;
3267 return 0;
3268 }
3269 _ACEOF
3270 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3271 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3272 do
3273 CC="$ac_save_CC $ac_arg"
3274 if ac_fn_c_try_compile "$LINENO"; then :
3275 ac_cv_prog_cc_c89=$ac_arg
3276 fi
3277 rm -f core conftest.err conftest.$ac_objext
3278 test "x$ac_cv_prog_cc_c89" != "xno" && break
3279 done
3280 rm -f conftest.$ac_ext
3281 CC=$ac_save_CC
3282
3283 fi
3284 # AC_CACHE_VAL
3285 case "x$ac_cv_prog_cc_c89" in
3286 x)
3287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3288 $as_echo "none needed" >&6; } ;;
3289 xno)
3290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3291 $as_echo "unsupported" >&6; } ;;
3292 *)
3293 CC="$CC $ac_cv_prog_cc_c89"
3294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3295 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3296 esac
3297 if test "x$ac_cv_prog_cc_c89" != xno; then :
3298
3299 fi
3300
3301 ac_ext=c
3302 ac_cpp='$CPP $CPPFLAGS'
3303 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3304 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3305 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3306
3307 ac_ext=c
3308 ac_cpp='$CPP $CPPFLAGS'
3309 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3310 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3311 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
3313 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
3314 if ${am_cv_prog_cc_c_o+:} false; then :
3315 $as_echo_n "(cached) " >&6
3316 else
3317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3318 /* end confdefs.h. */
3319
3320 int
3321 main ()
3322 {
3323
3324 ;
3325 return 0;
3326 }
3327 _ACEOF
3328 # Make sure it works both with $CC and with simple cc.
3329 # Following AC_PROG_CC_C_O, we do the test twice because some
3330 # compilers refuse to overwrite an existing .o file with -o,
3331 # though they will create one.
3332 am_cv_prog_cc_c_o=yes
3333 for am_i in 1 2; do
3334 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
3335 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
3336 ac_status=$?
3337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3338 (exit $ac_status); } \
3339 && test -f conftest2.$ac_objext; then
3340 : OK
3341 else
3342 am_cv_prog_cc_c_o=no
3343 break
3344 fi
3345 done
3346 rm -f core conftest*
3347 unset am_i
3348 fi
3349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
3350 $as_echo "$am_cv_prog_cc_c_o" >&6; }
3351 if test "$am_cv_prog_cc_c_o" != yes; then
3352 # Losing compiler, so override with the script.
3353 # FIXME: It is wrong to rewrite CC.
3354 # But if we don't then we get into trouble of one sort or another.
3355 # A longer-term fix would be to have automake use am__CC in this case,
3356 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
3357 CC="$am_aux_dir/compile $CC"
3358 fi
3359 ac_ext=c
3360 ac_cpp='$CPP $CPPFLAGS'
3361 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3362 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3363 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3364
3365
3366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
3367 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
3368 if ${ac_cv_path_SED+:} false; then :
3369 $as_echo_n "(cached) " >&6
3370 else
3371 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
3372 for ac_i in 1 2 3 4 5 6 7; do
3373 ac_script="$ac_script$as_nl$ac_script"
3374 done
3375 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
3376 { ac_script=; unset ac_script;}
3377 if test -z "$SED"; then
3378 ac_path_SED_found=false
3379 # Loop through the user's path and test for each of PROGNAME-LIST
3380 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3381 for as_dir in $PATH
3382 do
3383 IFS=$as_save_IFS
3384 test -z "$as_dir" && as_dir=.
3385 for ac_prog in sed gsed; do
3386 for ac_exec_ext in '' $ac_executable_extensions; do
3387 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
3388 as_fn_executable_p "$ac_path_SED" || continue
3389 # Check for GNU ac_path_SED and select it if it is found.
3390 # Check for GNU $ac_path_SED
3391 case `"$ac_path_SED" --version 2>&1` in
3392 *GNU*)
3393 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
3394 *)
3395 ac_count=0
3396 $as_echo_n 0123456789 >"conftest.in"
3397 while :
3398 do
3399 cat "conftest.in" "conftest.in" >"conftest.tmp"
3400 mv "conftest.tmp" "conftest.in"
3401 cp "conftest.in" "conftest.nl"
3402 $as_echo '' >> "conftest.nl"
3403 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
3404 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3405 as_fn_arith $ac_count + 1 && ac_count=$as_val
3406 if test $ac_count -gt ${ac_path_SED_max-0}; then
3407 # Best one so far, save it but keep looking for a better one
3408 ac_cv_path_SED="$ac_path_SED"
3409 ac_path_SED_max=$ac_count
3410 fi
3411 # 10*(2^10) chars as input seems more than enough
3412 test $ac_count -gt 10 && break
3413 done
3414 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3415 esac
3416
3417 $ac_path_SED_found && break 3
3418 done
3419 done
3420 done
3421 IFS=$as_save_IFS
3422 if test -z "$ac_cv_path_SED"; then
3423 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
3424 fi
3425 else
3426 ac_cv_path_SED=$SED
3427 fi
3428
3429 fi
3430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
3431 $as_echo "$ac_cv_path_SED" >&6; }
3432 SED="$ac_cv_path_SED"
3433 rm -f conftest.sed
3434
3435 test -z "$SED" && SED=sed
3436 Xsed="$SED -e 1s/^X//"
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3449 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3450 if ${ac_cv_path_GREP+:} false; then :
3451 $as_echo_n "(cached) " >&6
3452 else
3453 if test -z "$GREP"; then
3454 ac_path_GREP_found=false
3455 # Loop through the user's path and test for each of PROGNAME-LIST
3456 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3457 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3458 do
3459 IFS=$as_save_IFS
3460 test -z "$as_dir" && as_dir=.
3461 for ac_prog in grep ggrep; do
3462 for ac_exec_ext in '' $ac_executable_extensions; do
3463 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3464 as_fn_executable_p "$ac_path_GREP" || continue
3465 # Check for GNU ac_path_GREP and select it if it is found.
3466 # Check for GNU $ac_path_GREP
3467 case `"$ac_path_GREP" --version 2>&1` in
3468 *GNU*)
3469 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3470 *)
3471 ac_count=0
3472 $as_echo_n 0123456789 >"conftest.in"
3473 while :
3474 do
3475 cat "conftest.in" "conftest.in" >"conftest.tmp"
3476 mv "conftest.tmp" "conftest.in"
3477 cp "conftest.in" "conftest.nl"
3478 $as_echo 'GREP' >> "conftest.nl"
3479 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3480 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3481 as_fn_arith $ac_count + 1 && ac_count=$as_val
3482 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3483 # Best one so far, save it but keep looking for a better one
3484 ac_cv_path_GREP="$ac_path_GREP"
3485 ac_path_GREP_max=$ac_count
3486 fi
3487 # 10*(2^10) chars as input seems more than enough
3488 test $ac_count -gt 10 && break
3489 done
3490 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3491 esac
3492
3493 $ac_path_GREP_found && break 3
3494 done
3495 done
3496 done
3497 IFS=$as_save_IFS
3498 if test -z "$ac_cv_path_GREP"; then
3499 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3500 fi
3501 else
3502 ac_cv_path_GREP=$GREP
3503 fi
3504
3505 fi
3506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3507 $as_echo "$ac_cv_path_GREP" >&6; }
3508 GREP="$ac_cv_path_GREP"
3509
3510
3511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3512 $as_echo_n "checking for egrep... " >&6; }
3513 if ${ac_cv_path_EGREP+:} false; then :
3514 $as_echo_n "(cached) " >&6
3515 else
3516 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3517 then ac_cv_path_EGREP="$GREP -E"
3518 else
3519 if test -z "$EGREP"; then
3520 ac_path_EGREP_found=false
3521 # Loop through the user's path and test for each of PROGNAME-LIST
3522 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3523 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3524 do
3525 IFS=$as_save_IFS
3526 test -z "$as_dir" && as_dir=.
3527 for ac_prog in egrep; do
3528 for ac_exec_ext in '' $ac_executable_extensions; do
3529 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3530 as_fn_executable_p "$ac_path_EGREP" || continue
3531 # Check for GNU ac_path_EGREP and select it if it is found.
3532 # Check for GNU $ac_path_EGREP
3533 case `"$ac_path_EGREP" --version 2>&1` in
3534 *GNU*)
3535 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3536 *)
3537 ac_count=0
3538 $as_echo_n 0123456789 >"conftest.in"
3539 while :
3540 do
3541 cat "conftest.in" "conftest.in" >"conftest.tmp"
3542 mv "conftest.tmp" "conftest.in"
3543 cp "conftest.in" "conftest.nl"
3544 $as_echo 'EGREP' >> "conftest.nl"
3545 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3546 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3547 as_fn_arith $ac_count + 1 && ac_count=$as_val
3548 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3549 # Best one so far, save it but keep looking for a better one
3550 ac_cv_path_EGREP="$ac_path_EGREP"
3551 ac_path_EGREP_max=$ac_count
3552 fi
3553 # 10*(2^10) chars as input seems more than enough
3554 test $ac_count -gt 10 && break
3555 done
3556 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3557 esac
3558
3559 $ac_path_EGREP_found && break 3
3560 done
3561 done
3562 done
3563 IFS=$as_save_IFS
3564 if test -z "$ac_cv_path_EGREP"; then
3565 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3566 fi
3567 else
3568 ac_cv_path_EGREP=$EGREP
3569 fi
3570
3571 fi
3572 fi
3573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3574 $as_echo "$ac_cv_path_EGREP" >&6; }
3575 EGREP="$ac_cv_path_EGREP"
3576
3577
3578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
3579 $as_echo_n "checking for fgrep... " >&6; }
3580 if ${ac_cv_path_FGREP+:} false; then :
3581 $as_echo_n "(cached) " >&6
3582 else
3583 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
3584 then ac_cv_path_FGREP="$GREP -F"
3585 else
3586 if test -z "$FGREP"; then
3587 ac_path_FGREP_found=false
3588 # Loop through the user's path and test for each of PROGNAME-LIST
3589 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3590 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3591 do
3592 IFS=$as_save_IFS
3593 test -z "$as_dir" && as_dir=.
3594 for ac_prog in fgrep; do
3595 for ac_exec_ext in '' $ac_executable_extensions; do
3596 ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
3597 as_fn_executable_p "$ac_path_FGREP" || continue
3598 # Check for GNU ac_path_FGREP and select it if it is found.
3599 # Check for GNU $ac_path_FGREP
3600 case `"$ac_path_FGREP" --version 2>&1` in
3601 *GNU*)
3602 ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
3603 *)
3604 ac_count=0
3605 $as_echo_n 0123456789 >"conftest.in"
3606 while :
3607 do
3608 cat "conftest.in" "conftest.in" >"conftest.tmp"
3609 mv "conftest.tmp" "conftest.in"
3610 cp "conftest.in" "conftest.nl"
3611 $as_echo 'FGREP' >> "conftest.nl"
3612 "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
3613 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3614 as_fn_arith $ac_count + 1 && ac_count=$as_val
3615 if test $ac_count -gt ${ac_path_FGREP_max-0}; then
3616 # Best one so far, save it but keep looking for a better one
3617 ac_cv_path_FGREP="$ac_path_FGREP"
3618 ac_path_FGREP_max=$ac_count
3619 fi
3620 # 10*(2^10) chars as input seems more than enough
3621 test $ac_count -gt 10 && break
3622 done
3623 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3624 esac
3625
3626 $ac_path_FGREP_found && break 3
3627 done
3628 done
3629 done
3630 IFS=$as_save_IFS
3631 if test -z "$ac_cv_path_FGREP"; then
3632 as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3633 fi
3634 else
3635 ac_cv_path_FGREP=$FGREP
3636 fi
3637
3638 fi
3639 fi
3640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
3641 $as_echo "$ac_cv_path_FGREP" >&6; }
3642 FGREP="$ac_cv_path_FGREP"
3643
3644
3645 test -z "$GREP" && GREP=grep
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665 # Check whether --with-gnu-ld was given.
3666 if test "${with_gnu_ld+set}" = set; then :
3667 withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
3668 else
3669 with_gnu_ld=no
3670 fi
3671
3672 ac_prog=ld
3673 if test yes = "$GCC"; then
3674 # Check if gcc -print-prog-name=ld gives a path.
3675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
3676 $as_echo_n "checking for ld used by $CC... " >&6; }
3677 case $host in
3678 *-*-mingw*)
3679 # gcc leaves a trailing carriage return, which upsets mingw
3680 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3681 *)
3682 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3683 esac
3684 case $ac_prog in
3685 # Accept absolute paths.
3686 [\\/]* | ?:[\\/]*)
3687 re_direlt='/[^/][^/]*/\.\./'
3688 # Canonicalize the pathname of ld
3689 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3690 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3691 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3692 done
3693 test -z "$LD" && LD=$ac_prog
3694 ;;
3695 "")
3696 # If it fails, then pretend we aren't using GCC.
3697 ac_prog=ld
3698 ;;
3699 *)
3700 # If it is relative, then search for the first ld in PATH.
3701 with_gnu_ld=unknown
3702 ;;
3703 esac
3704 elif test yes = "$with_gnu_ld"; then
3705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
3706 $as_echo_n "checking for GNU ld... " >&6; }
3707 else
3708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
3709 $as_echo_n "checking for non-GNU ld... " >&6; }
3710 fi
3711 if ${lt_cv_path_LD+:} false; then :
3712 $as_echo_n "(cached) " >&6
3713 else
3714 if test -z "$LD"; then
3715 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3716 for ac_dir in $PATH; do
3717 IFS=$lt_save_ifs
3718 test -z "$ac_dir" && ac_dir=.
3719 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3720 lt_cv_path_LD=$ac_dir/$ac_prog
3721 # Check to see if the program is GNU ld. I'd rather use --version,
3722 # but apparently some variants of GNU ld only accept -v.
3723 # Break only if it was the GNU/non-GNU ld that we prefer.
3724 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3725 *GNU* | *'with BFD'*)
3726 test no != "$with_gnu_ld" && break
3727 ;;
3728 *)
3729 test yes != "$with_gnu_ld" && break
3730 ;;
3731 esac
3732 fi
3733 done
3734 IFS=$lt_save_ifs
3735 else
3736 lt_cv_path_LD=$LD # Let the user override the test with a path.
3737 fi
3738 fi
3739
3740 LD=$lt_cv_path_LD
3741 if test -n "$LD"; then
3742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
3743 $as_echo "$LD" >&6; }
3744 else
3745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3746 $as_echo "no" >&6; }
3747 fi
3748 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
3749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
3750 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
3751 if ${lt_cv_prog_gnu_ld+:} false; then :
3752 $as_echo_n "(cached) " >&6
3753 else
3754 # I'd rather use --version here, but apparently some GNU lds only accept -v.
3755 case `$LD -v 2>&1 </dev/null` in
3756 *GNU* | *'with BFD'*)
3757 lt_cv_prog_gnu_ld=yes
3758 ;;
3759 *)
3760 lt_cv_prog_gnu_ld=no
3761 ;;
3762 esac
3763 fi
3764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
3765 $as_echo "$lt_cv_prog_gnu_ld" >&6; }
3766 with_gnu_ld=$lt_cv_prog_gnu_ld
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
3777 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
3778 if ${lt_cv_path_NM+:} false; then :
3779 $as_echo_n "(cached) " >&6
3780 else
3781 if test -n "$NM"; then
3782 # Let the user override the test.
3783 lt_cv_path_NM=$NM
3784 else
3785 lt_nm_to_check=${ac_tool_prefix}nm
3786 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3787 lt_nm_to_check="$lt_nm_to_check nm"
3788 fi
3789 for lt_tmp_nm in $lt_nm_to_check; do
3790 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3791 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3792 IFS=$lt_save_ifs
3793 test -z "$ac_dir" && ac_dir=.
3794 tmp_nm=$ac_dir/$lt_tmp_nm
3795 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
3796 # Check to see if the nm accepts a BSD-compat flag.
3797 # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
3798 # nm: unknown option "B" ignored
3799 # Tru64's nm complains that /dev/null is an invalid object file
3800 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
3801 case $build_os in
3802 mingw*) lt_bad_file=conftest.nm/nofile ;;
3803 *) lt_bad_file=/dev/null ;;
3804 esac
3805 case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
3806 *$lt_bad_file* | *'Invalid file or object type'*)
3807 lt_cv_path_NM="$tmp_nm -B"
3808 break 2
3809 ;;
3810 *)
3811 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3812 */dev/null*)
3813 lt_cv_path_NM="$tmp_nm -p"
3814 break 2
3815 ;;
3816 *)
3817 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3818 continue # so that we can try to find one that supports BSD flags
3819 ;;
3820 esac
3821 ;;
3822 esac
3823 fi
3824 done
3825 IFS=$lt_save_ifs
3826 done
3827 : ${lt_cv_path_NM=no}
3828 fi
3829 fi
3830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
3831 $as_echo "$lt_cv_path_NM" >&6; }
3832 if test no != "$lt_cv_path_NM"; then
3833 NM=$lt_cv_path_NM
3834 else
3835 # Didn't find any BSD compatible name lister, look for dumpbin.
3836 if test -n "$DUMPBIN"; then :
3837 # Let the user override the test.
3838 else
3839 if test -n "$ac_tool_prefix"; then
3840 for ac_prog in dumpbin "link -dump"
3841 do
3842 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3843 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3845 $as_echo_n "checking for $ac_word... " >&6; }
3846 if ${ac_cv_prog_DUMPBIN+:} false; then :
3847 $as_echo_n "(cached) " >&6
3848 else
3849 if test -n "$DUMPBIN"; then
3850 ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
3851 else
3852 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3853 for as_dir in $PATH
3854 do
3855 IFS=$as_save_IFS
3856 test -z "$as_dir" && as_dir=.
3857 for ac_exec_ext in '' $ac_executable_extensions; do
3858 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3859 ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
3860 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3861 break 2
3862 fi
3863 done
3864 done
3865 IFS=$as_save_IFS
3866
3867 fi
3868 fi
3869 DUMPBIN=$ac_cv_prog_DUMPBIN
3870 if test -n "$DUMPBIN"; then
3871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
3872 $as_echo "$DUMPBIN" >&6; }
3873 else
3874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3875 $as_echo "no" >&6; }
3876 fi
3877
3878
3879 test -n "$DUMPBIN" && break
3880 done
3881 fi
3882 if test -z "$DUMPBIN"; then
3883 ac_ct_DUMPBIN=$DUMPBIN
3884 for ac_prog in dumpbin "link -dump"
3885 do
3886 # Extract the first word of "$ac_prog", so it can be a program name with args.
3887 set dummy $ac_prog; ac_word=$2
3888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3889 $as_echo_n "checking for $ac_word... " >&6; }
3890 if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
3891 $as_echo_n "(cached) " >&6
3892 else
3893 if test -n "$ac_ct_DUMPBIN"; then
3894 ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
3895 else
3896 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3897 for as_dir in $PATH
3898 do
3899 IFS=$as_save_IFS
3900 test -z "$as_dir" && as_dir=.
3901 for ac_exec_ext in '' $ac_executable_extensions; do
3902 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3903 ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
3904 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3905 break 2
3906 fi
3907 done
3908 done
3909 IFS=$as_save_IFS
3910
3911 fi
3912 fi
3913 ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
3914 if test -n "$ac_ct_DUMPBIN"; then
3915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
3916 $as_echo "$ac_ct_DUMPBIN" >&6; }
3917 else
3918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3919 $as_echo "no" >&6; }
3920 fi
3921
3922
3923 test -n "$ac_ct_DUMPBIN" && break
3924 done
3925
3926 if test "x$ac_ct_DUMPBIN" = x; then
3927 DUMPBIN=":"
3928 else
3929 case $cross_compiling:$ac_tool_warned in
3930 yes:)
3931 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3932 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3933 ac_tool_warned=yes ;;
3934 esac
3935 DUMPBIN=$ac_ct_DUMPBIN
3936 fi
3937 fi
3938
3939 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
3940 *COFF*)
3941 DUMPBIN="$DUMPBIN -symbols -headers"
3942 ;;
3943 *)
3944 DUMPBIN=:
3945 ;;
3946 esac
3947 fi
3948
3949 if test : != "$DUMPBIN"; then
3950 NM=$DUMPBIN
3951 fi
3952 fi
3953 test -z "$NM" && NM=nm
3954
3955
3956
3957
3958
3959
3960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
3961 $as_echo_n "checking the name lister ($NM) interface... " >&6; }
3962 if ${lt_cv_nm_interface+:} false; then :
3963 $as_echo_n "(cached) " >&6
3964 else
3965 lt_cv_nm_interface="BSD nm"
3966 echo "int some_variable = 0;" > conftest.$ac_ext
3967 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
3968 (eval "$ac_compile" 2>conftest.err)
3969 cat conftest.err >&5
3970 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
3971 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3972 cat conftest.err >&5
3973 (eval echo "\"\$as_me:$LINENO: output\"" >&5)
3974 cat conftest.out >&5
3975 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3976 lt_cv_nm_interface="MS dumpbin"
3977 fi
3978 rm -f conftest*
3979 fi
3980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
3981 $as_echo "$lt_cv_nm_interface" >&6; }
3982
3983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
3984 $as_echo_n "checking whether ln -s works... " >&6; }
3985 LN_S=$as_ln_s
3986 if test "$LN_S" = "ln -s"; then
3987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3988 $as_echo "yes" >&6; }
3989 else
3990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
3991 $as_echo "no, using $LN_S" >&6; }
3992 fi
3993
3994 # find the maximum length of command line arguments
3995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
3996 $as_echo_n "checking the maximum length of command line arguments... " >&6; }
3997 if ${lt_cv_sys_max_cmd_len+:} false; then :
3998 $as_echo_n "(cached) " >&6
3999 else
4000 i=0
4001 teststring=ABCD
4002
4003 case $build_os in
4004 msdosdjgpp*)
4005 # On DJGPP, this test can blow up pretty badly due to problems in libc
4006 # (any single argument exceeding 2000 bytes causes a buffer overrun
4007 # during glob expansion). Even if it were fixed, the result of this
4008 # check would be larger than it should be.
4009 lt_cv_sys_max_cmd_len=12288; # 12K is about right
4010 ;;
4011
4012 gnu*)
4013 # Under GNU Hurd, this test is not required because there is
4014 # no limit to the length of command line arguments.
4015 # Libtool will interpret -1 as no limit whatsoever
4016 lt_cv_sys_max_cmd_len=-1;
4017 ;;
4018
4019 cygwin* | mingw* | cegcc*)
4020 # On Win9x/ME, this test blows up -- it succeeds, but takes
4021 # about 5 minutes as the teststring grows exponentially.
4022 # Worse, since 9x/ME are not pre-emptively multitasking,
4023 # you end up with a "frozen" computer, even though with patience
4024 # the test eventually succeeds (with a max line length of 256k).
4025 # Instead, let's just punt: use the minimum linelength reported by
4026 # all of the supported platforms: 8192 (on NT/2K/XP).
4027 lt_cv_sys_max_cmd_len=8192;
4028 ;;
4029
4030 mint*)
4031 # On MiNT this can take a long time and run out of memory.
4032 lt_cv_sys_max_cmd_len=8192;
4033 ;;
4034
4035 amigaos*)
4036 # On AmigaOS with pdksh, this test takes hours, literally.
4037 # So we just punt and use a minimum line length of 8192.
4038 lt_cv_sys_max_cmd_len=8192;
4039 ;;
4040
4041 bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
4042 # This has been around since 386BSD, at least. Likely further.
4043 if test -x /sbin/sysctl; then
4044 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
4045 elif test -x /usr/sbin/sysctl; then
4046 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
4047 else
4048 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
4049 fi
4050 # And add a safety zone
4051 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
4052 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
4053 ;;
4054
4055 interix*)
4056 # We know the value 262144 and hardcode it with a safety zone (like BSD)
4057 lt_cv_sys_max_cmd_len=196608
4058 ;;
4059
4060 os2*)
4061 # The test takes a long time on OS/2.
4062 lt_cv_sys_max_cmd_len=8192
4063 ;;
4064
4065 osf*)
4066 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
4067 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
4068 # nice to cause kernel panics so lets avoid the loop below.
4069 # First set a reasonable default.
4070 lt_cv_sys_max_cmd_len=16384
4071 #
4072 if test -x /sbin/sysconfig; then
4073 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
4074 *1*) lt_cv_sys_max_cmd_len=-1 ;;
4075 esac
4076 fi
4077 ;;
4078 sco3.2v5*)
4079 lt_cv_sys_max_cmd_len=102400
4080 ;;
4081 sysv5* | sco5v6* | sysv4.2uw2*)
4082 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
4083 if test -n "$kargmax"; then
4084 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
4085 else
4086 lt_cv_sys_max_cmd_len=32768
4087 fi
4088 ;;
4089 *)
4090 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
4091 if test -n "$lt_cv_sys_max_cmd_len" && \
4092 test undefined != "$lt_cv_sys_max_cmd_len"; then
4093 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
4094 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
4095 else
4096 # Make teststring a little bigger before we do anything with it.
4097 # a 1K string should be a reasonable start.
4098 for i in 1 2 3 4 5 6 7 8; do
4099 teststring=$teststring$teststring
4100 done
4101 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
4102 # If test is not a shell built-in, we'll probably end up computing a
4103 # maximum length that is only half of the actual maximum length, but
4104 # we can't tell.
4105 while { test X`env echo "$teststring$teststring" 2>/dev/null` \
4106 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
4107 test 17 != "$i" # 1/2 MB should be enough
4108 do
4109 i=`expr $i + 1`
4110 teststring=$teststring$teststring
4111 done
4112 # Only check the string length outside the loop.
4113 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
4114 teststring=
4115 # Add a significant safety factor because C++ compilers can tack on
4116 # massive amounts of additional arguments before passing them to the
4117 # linker. It appears as though 1/2 is a usable value.
4118 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
4119 fi
4120 ;;
4121 esac
4122
4123 fi
4124
4125 if test -n "$lt_cv_sys_max_cmd_len"; then
4126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
4127 $as_echo "$lt_cv_sys_max_cmd_len" >&6; }
4128 else
4129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
4130 $as_echo "none" >&6; }
4131 fi
4132 max_cmd_len=$lt_cv_sys_max_cmd_len
4133
4134
4135
4136
4137
4138
4139 : ${CP="cp -f"}
4140 : ${MV="mv -f"}
4141 : ${RM="rm -f"}
4142
4143 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
4144 lt_unset=unset
4145 else
4146 lt_unset=false
4147 fi
4148
4149
4150
4151
4152
4153 # test EBCDIC or ASCII
4154 case `echo X|tr X '\101'` in
4155 A) # ASCII based system
4156 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
4157 lt_SP2NL='tr \040 \012'
4158 lt_NL2SP='tr \015\012 \040\040'
4159 ;;
4160 *) # EBCDIC based system
4161 lt_SP2NL='tr \100 \n'
4162 lt_NL2SP='tr \r\n \100\100'
4163 ;;
4164 esac
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
4175 $as_echo_n "checking how to convert $build file names to $host format... " >&6; }
4176 if ${lt_cv_to_host_file_cmd+:} false; then :
4177 $as_echo_n "(cached) " >&6
4178 else
4179 case $host in
4180 *-*-mingw* )
4181 case $build in
4182 *-*-mingw* ) # actually msys
4183 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
4184 ;;
4185 *-*-cygwin* )
4186 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
4187 ;;
4188 * ) # otherwise, assume *nix
4189 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
4190 ;;
4191 esac
4192 ;;
4193 *-*-cygwin* )
4194 case $build in
4195 *-*-mingw* ) # actually msys
4196 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
4197 ;;
4198 *-*-cygwin* )
4199 lt_cv_to_host_file_cmd=func_convert_file_noop
4200 ;;
4201 * ) # otherwise, assume *nix
4202 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
4203 ;;
4204 esac
4205 ;;
4206 * ) # unhandled hosts (and "normal" native builds)
4207 lt_cv_to_host_file_cmd=func_convert_file_noop
4208 ;;
4209 esac
4210
4211 fi
4212
4213 to_host_file_cmd=$lt_cv_to_host_file_cmd
4214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
4215 $as_echo "$lt_cv_to_host_file_cmd" >&6; }
4216
4217
4218
4219
4220
4221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
4222 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
4223 if ${lt_cv_to_tool_file_cmd+:} false; then :
4224 $as_echo_n "(cached) " >&6
4225 else
4226 #assume ordinary cross tools, or native build.
4227 lt_cv_to_tool_file_cmd=func_convert_file_noop
4228 case $host in
4229 *-*-mingw* )
4230 case $build in
4231 *-*-mingw* ) # actually msys
4232 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
4233 ;;
4234 esac
4235 ;;
4236 esac
4237
4238 fi
4239
4240 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
4241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
4242 $as_echo "$lt_cv_to_tool_file_cmd" >&6; }
4243
4244
4245
4246
4247
4248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
4249 $as_echo_n "checking for $LD option to reload object files... " >&6; }
4250 if ${lt_cv_ld_reload_flag+:} false; then :
4251 $as_echo_n "(cached) " >&6
4252 else
4253 lt_cv_ld_reload_flag='-r'
4254 fi
4255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
4256 $as_echo "$lt_cv_ld_reload_flag" >&6; }
4257 reload_flag=$lt_cv_ld_reload_flag
4258 case $reload_flag in
4259 "" | " "*) ;;
4260 *) reload_flag=" $reload_flag" ;;
4261 esac
4262 reload_cmds='$LD$reload_flag -o $output$reload_objs'
4263 case $host_os in
4264 cygwin* | mingw* | pw32* | cegcc*)
4265 if test yes != "$GCC"; then
4266 reload_cmds=false
4267 fi
4268 ;;
4269 darwin*)
4270 if test yes = "$GCC"; then
4271 reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
4272 else
4273 reload_cmds='$LD$reload_flag -o $output$reload_objs'
4274 fi
4275 ;;
4276 esac
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286 if test -n "$ac_tool_prefix"; then
4287 # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4288 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4290 $as_echo_n "checking for $ac_word... " >&6; }
4291 if ${ac_cv_prog_OBJDUMP+:} false; then :
4292 $as_echo_n "(cached) " >&6
4293 else
4294 if test -n "$OBJDUMP"; then
4295 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4296 else
4297 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4298 for as_dir in $PATH
4299 do
4300 IFS=$as_save_IFS
4301 test -z "$as_dir" && as_dir=.
4302 for ac_exec_ext in '' $ac_executable_extensions; do
4303 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4304 ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4305 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4306 break 2
4307 fi
4308 done
4309 done
4310 IFS=$as_save_IFS
4311
4312 fi
4313 fi
4314 OBJDUMP=$ac_cv_prog_OBJDUMP
4315 if test -n "$OBJDUMP"; then
4316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
4317 $as_echo "$OBJDUMP" >&6; }
4318 else
4319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4320 $as_echo "no" >&6; }
4321 fi
4322
4323
4324 fi
4325 if test -z "$ac_cv_prog_OBJDUMP"; then
4326 ac_ct_OBJDUMP=$OBJDUMP
4327 # Extract the first word of "objdump", so it can be a program name with args.
4328 set dummy objdump; ac_word=$2
4329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4330 $as_echo_n "checking for $ac_word... " >&6; }
4331 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
4332 $as_echo_n "(cached) " >&6
4333 else
4334 if test -n "$ac_ct_OBJDUMP"; then
4335 ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
4336 else
4337 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4338 for as_dir in $PATH
4339 do
4340 IFS=$as_save_IFS
4341 test -z "$as_dir" && as_dir=.
4342 for ac_exec_ext in '' $ac_executable_extensions; do
4343 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4344 ac_cv_prog_ac_ct_OBJDUMP="objdump"
4345 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4346 break 2
4347 fi
4348 done
4349 done
4350 IFS=$as_save_IFS
4351
4352 fi
4353 fi
4354 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
4355 if test -n "$ac_ct_OBJDUMP"; then
4356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
4357 $as_echo "$ac_ct_OBJDUMP" >&6; }
4358 else
4359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4360 $as_echo "no" >&6; }
4361 fi
4362
4363 if test "x$ac_ct_OBJDUMP" = x; then
4364 OBJDUMP="false"
4365 else
4366 case $cross_compiling:$ac_tool_warned in
4367 yes:)
4368 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4369 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4370 ac_tool_warned=yes ;;
4371 esac
4372 OBJDUMP=$ac_ct_OBJDUMP
4373 fi
4374 else
4375 OBJDUMP="$ac_cv_prog_OBJDUMP"
4376 fi
4377
4378 test -z "$OBJDUMP" && OBJDUMP=objdump
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
4389 $as_echo_n "checking how to recognize dependent libraries... " >&6; }
4390 if ${lt_cv_deplibs_check_method+:} false; then :
4391 $as_echo_n "(cached) " >&6
4392 else
4393 lt_cv_file_magic_cmd='$MAGIC_CMD'
4394 lt_cv_file_magic_test_file=
4395 lt_cv_deplibs_check_method='unknown'
4396 # Need to set the preceding variable on all platforms that support
4397 # interlibrary dependencies.
4398 # 'none' -- dependencies not supported.
4399 # 'unknown' -- same as none, but documents that we really don't know.
4400 # 'pass_all' -- all dependencies passed with no checks.
4401 # 'test_compile' -- check by making test program.
4402 # 'file_magic [[regex]]' -- check by looking for files in library path
4403 # that responds to the $file_magic_cmd with a given extended regex.
4404 # If you have 'file' or equivalent on your system and you're not sure
4405 # whether 'pass_all' will *always* work, you probably want this one.
4406
4407 case $host_os in
4408 aix[4-9]*)
4409 lt_cv_deplibs_check_method=pass_all
4410 ;;
4411
4412 beos*)
4413 lt_cv_deplibs_check_method=pass_all
4414 ;;
4415
4416 bsdi[45]*)
4417 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
4418 lt_cv_file_magic_cmd='/usr/bin/file -L'
4419 lt_cv_file_magic_test_file=/shlib/libc.so
4420 ;;
4421
4422 cygwin*)
4423 # func_win32_libid is a shell function defined in ltmain.sh
4424 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4425 lt_cv_file_magic_cmd='func_win32_libid'
4426 ;;
4427
4428 mingw* | pw32*)
4429 # Base MSYS/MinGW do not provide the 'file' command needed by
4430 # func_win32_libid shell function, so use a weaker test based on 'objdump',
4431 # unless we find 'file', for example because we are cross-compiling.
4432 if ( file / ) >/dev/null 2>&1; then
4433 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4434 lt_cv_file_magic_cmd='func_win32_libid'
4435 else
4436 # Keep this pattern in sync with the one in func_win32_libid.
4437 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
4438 lt_cv_file_magic_cmd='$OBJDUMP -f'
4439 fi
4440 ;;
4441
4442 cegcc*)
4443 # use the weaker test based on 'objdump'. See mingw*.
4444 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
4445 lt_cv_file_magic_cmd='$OBJDUMP -f'
4446 ;;
4447
4448 darwin* | rhapsody*)
4449 lt_cv_deplibs_check_method=pass_all
4450 ;;
4451
4452 freebsd* | dragonfly*)
4453 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4454 case $host_cpu in
4455 i*86 )
4456 # Not sure whether the presence of OpenBSD here was a mistake.
4457 # Let's accept both of them until this is cleared up.
4458 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
4459 lt_cv_file_magic_cmd=/usr/bin/file
4460 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4461 ;;
4462 esac
4463 else
4464 lt_cv_deplibs_check_method=pass_all
4465 fi
4466 ;;
4467
4468 haiku*)
4469 lt_cv_deplibs_check_method=pass_all
4470 ;;
4471
4472 hpux10.20* | hpux11*)
4473 lt_cv_file_magic_cmd=/usr/bin/file
4474 case $host_cpu in
4475 ia64*)
4476 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
4477 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
4478 ;;
4479 hppa*64*)
4480 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]'
4481 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
4482 ;;
4483 *)
4484 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
4485 lt_cv_file_magic_test_file=/usr/lib/libc.sl
4486 ;;
4487 esac
4488 ;;
4489
4490 interix[3-9]*)
4491 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
4492 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
4493 ;;
4494
4495 irix5* | irix6* | nonstopux*)
4496 case $LD in
4497 *-32|*"-32 ") libmagic=32-bit;;
4498 *-n32|*"-n32 ") libmagic=N32;;
4499 *-64|*"-64 ") libmagic=64-bit;;
4500 *) libmagic=never-match;;
4501 esac
4502 lt_cv_deplibs_check_method=pass_all
4503 ;;
4504
4505 # This must be glibc/ELF.
4506 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4507 lt_cv_deplibs_check_method=pass_all
4508 ;;
4509
4510 netbsd* | netbsdelf*-gnu)
4511 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4512 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
4513 else
4514 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
4515 fi
4516 ;;
4517
4518 newos6*)
4519 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
4520 lt_cv_file_magic_cmd=/usr/bin/file
4521 lt_cv_file_magic_test_file=/usr/lib/libnls.so
4522 ;;
4523
4524 *nto* | *qnx*)
4525 lt_cv_deplibs_check_method=pass_all
4526 ;;
4527
4528 openbsd* | bitrig*)
4529 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
4530 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
4531 else
4532 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
4533 fi
4534 ;;
4535
4536 osf3* | osf4* | osf5*)
4537 lt_cv_deplibs_check_method=pass_all
4538 ;;
4539
4540 rdos*)
4541 lt_cv_deplibs_check_method=pass_all
4542 ;;
4543
4544 solaris*)
4545 lt_cv_deplibs_check_method=pass_all
4546 ;;
4547
4548 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4549 lt_cv_deplibs_check_method=pass_all
4550 ;;
4551
4552 sysv4 | sysv4.3*)
4553 case $host_vendor in
4554 motorola)
4555 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]'
4556 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4557 ;;
4558 ncr)
4559 lt_cv_deplibs_check_method=pass_all
4560 ;;
4561 sequent)
4562 lt_cv_file_magic_cmd='/bin/file'
4563 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
4564 ;;
4565 sni)
4566 lt_cv_file_magic_cmd='/bin/file'
4567 lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
4568 lt_cv_file_magic_test_file=/lib/libc.so
4569 ;;
4570 siemens)
4571 lt_cv_deplibs_check_method=pass_all
4572 ;;
4573 pc)
4574 lt_cv_deplibs_check_method=pass_all
4575 ;;
4576 esac
4577 ;;
4578
4579 tpf*)
4580 lt_cv_deplibs_check_method=pass_all
4581 ;;
4582 os2*)
4583 lt_cv_deplibs_check_method=pass_all
4584 ;;
4585 esac
4586
4587 fi
4588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
4589 $as_echo "$lt_cv_deplibs_check_method" >&6; }
4590
4591 file_magic_glob=
4592 want_nocaseglob=no
4593 if test "$build" = "$host"; then
4594 case $host_os in
4595 mingw* | pw32*)
4596 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
4597 want_nocaseglob=yes
4598 else
4599 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
4600 fi
4601 ;;
4602 esac
4603 fi
4604
4605 file_magic_cmd=$lt_cv_file_magic_cmd
4606 deplibs_check_method=$lt_cv_deplibs_check_method
4607 test -z "$deplibs_check_method" && deplibs_check_method=unknown
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630 if test -n "$ac_tool_prefix"; then
4631 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4632 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4634 $as_echo_n "checking for $ac_word... " >&6; }
4635 if ${ac_cv_prog_DLLTOOL+:} false; then :
4636 $as_echo_n "(cached) " >&6
4637 else
4638 if test -n "$DLLTOOL"; then
4639 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4640 else
4641 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4642 for as_dir in $PATH
4643 do
4644 IFS=$as_save_IFS
4645 test -z "$as_dir" && as_dir=.
4646 for ac_exec_ext in '' $ac_executable_extensions; do
4647 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4648 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4649 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4650 break 2
4651 fi
4652 done
4653 done
4654 IFS=$as_save_IFS
4655
4656 fi
4657 fi
4658 DLLTOOL=$ac_cv_prog_DLLTOOL
4659 if test -n "$DLLTOOL"; then
4660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
4661 $as_echo "$DLLTOOL" >&6; }
4662 else
4663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4664 $as_echo "no" >&6; }
4665 fi
4666
4667
4668 fi
4669 if test -z "$ac_cv_prog_DLLTOOL"; then
4670 ac_ct_DLLTOOL=$DLLTOOL
4671 # Extract the first word of "dlltool", so it can be a program name with args.
4672 set dummy dlltool; ac_word=$2
4673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4674 $as_echo_n "checking for $ac_word... " >&6; }
4675 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
4676 $as_echo_n "(cached) " >&6
4677 else
4678 if test -n "$ac_ct_DLLTOOL"; then
4679 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
4680 else
4681 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4682 for as_dir in $PATH
4683 do
4684 IFS=$as_save_IFS
4685 test -z "$as_dir" && as_dir=.
4686 for ac_exec_ext in '' $ac_executable_extensions; do
4687 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4688 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
4689 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4690 break 2
4691 fi
4692 done
4693 done
4694 IFS=$as_save_IFS
4695
4696 fi
4697 fi
4698 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
4699 if test -n "$ac_ct_DLLTOOL"; then
4700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
4701 $as_echo "$ac_ct_DLLTOOL" >&6; }
4702 else
4703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4704 $as_echo "no" >&6; }
4705 fi
4706
4707 if test "x$ac_ct_DLLTOOL" = x; then
4708 DLLTOOL="false"
4709 else
4710 case $cross_compiling:$ac_tool_warned in
4711 yes:)
4712 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4713 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4714 ac_tool_warned=yes ;;
4715 esac
4716 DLLTOOL=$ac_ct_DLLTOOL
4717 fi
4718 else
4719 DLLTOOL="$ac_cv_prog_DLLTOOL"
4720 fi
4721
4722 test -z "$DLLTOOL" && DLLTOOL=dlltool
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
4734 $as_echo_n "checking how to associate runtime and link libraries... " >&6; }
4735 if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
4736 $as_echo_n "(cached) " >&6
4737 else
4738 lt_cv_sharedlib_from_linklib_cmd='unknown'
4739
4740 case $host_os in
4741 cygwin* | mingw* | pw32* | cegcc*)
4742 # two different shell functions defined in ltmain.sh;
4743 # decide which one to use based on capabilities of $DLLTOOL
4744 case `$DLLTOOL --help 2>&1` in
4745 *--identify-strict*)
4746 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
4747 ;;
4748 *)
4749 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
4750 ;;
4751 esac
4752 ;;
4753 *)
4754 # fallback: assume linklib IS sharedlib
4755 lt_cv_sharedlib_from_linklib_cmd=$ECHO
4756 ;;
4757 esac
4758
4759 fi
4760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
4761 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
4762 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
4763 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
4764
4765
4766
4767
4768
4769
4770
4771
4772 if test -n "$ac_tool_prefix"; then
4773 for ac_prog in ar
4774 do
4775 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4776 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4778 $as_echo_n "checking for $ac_word... " >&6; }
4779 if ${ac_cv_prog_AR+:} false; then :
4780 $as_echo_n "(cached) " >&6
4781 else
4782 if test -n "$AR"; then
4783 ac_cv_prog_AR="$AR" # Let the user override the test.
4784 else
4785 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4786 for as_dir in $PATH
4787 do
4788 IFS=$as_save_IFS
4789 test -z "$as_dir" && as_dir=.
4790 for ac_exec_ext in '' $ac_executable_extensions; do
4791 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4792 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
4793 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4794 break 2
4795 fi
4796 done
4797 done
4798 IFS=$as_save_IFS
4799
4800 fi
4801 fi
4802 AR=$ac_cv_prog_AR
4803 if test -n "$AR"; then
4804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
4805 $as_echo "$AR" >&6; }
4806 else
4807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4808 $as_echo "no" >&6; }
4809 fi
4810
4811
4812 test -n "$AR" && break
4813 done
4814 fi
4815 if test -z "$AR"; then
4816 ac_ct_AR=$AR
4817 for ac_prog in ar
4818 do
4819 # Extract the first word of "$ac_prog", so it can be a program name with args.
4820 set dummy $ac_prog; ac_word=$2
4821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4822 $as_echo_n "checking for $ac_word... " >&6; }
4823 if ${ac_cv_prog_ac_ct_AR+:} false; then :
4824 $as_echo_n "(cached) " >&6
4825 else
4826 if test -n "$ac_ct_AR"; then
4827 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4828 else
4829 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4830 for as_dir in $PATH
4831 do
4832 IFS=$as_save_IFS
4833 test -z "$as_dir" && as_dir=.
4834 for ac_exec_ext in '' $ac_executable_extensions; do
4835 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4836 ac_cv_prog_ac_ct_AR="$ac_prog"
4837 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4838 break 2
4839 fi
4840 done
4841 done
4842 IFS=$as_save_IFS
4843
4844 fi
4845 fi
4846 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4847 if test -n "$ac_ct_AR"; then
4848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
4849 $as_echo "$ac_ct_AR" >&6; }
4850 else
4851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4852 $as_echo "no" >&6; }
4853 fi
4854
4855
4856 test -n "$ac_ct_AR" && break
4857 done
4858
4859 if test "x$ac_ct_AR" = x; then
4860 AR="false"
4861 else
4862 case $cross_compiling:$ac_tool_warned in
4863 yes:)
4864 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4865 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4866 ac_tool_warned=yes ;;
4867 esac
4868 AR=$ac_ct_AR
4869 fi
4870 fi
4871
4872 : ${AR=ar}
4873 : ${AR_FLAGS=cr}
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
4886 $as_echo_n "checking for archiver @FILE support... " >&6; }
4887 if ${lt_cv_ar_at_file+:} false; then :
4888 $as_echo_n "(cached) " >&6
4889 else
4890 lt_cv_ar_at_file=no
4891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4892 /* end confdefs.h. */
4893
4894 int
4895 main ()
4896 {
4897
4898 ;
4899 return 0;
4900 }
4901 _ACEOF
4902 if ac_fn_c_try_compile "$LINENO"; then :
4903 echo conftest.$ac_objext > conftest.lst
4904 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
4905 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
4906 (eval $lt_ar_try) 2>&5
4907 ac_status=$?
4908 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4909 test $ac_status = 0; }
4910 if test 0 -eq "$ac_status"; then
4911 # Ensure the archiver fails upon bogus file names.
4912 rm -f conftest.$ac_objext libconftest.a
4913 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
4914 (eval $lt_ar_try) 2>&5
4915 ac_status=$?
4916 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4917 test $ac_status = 0; }
4918 if test 0 -ne "$ac_status"; then
4919 lt_cv_ar_at_file=@
4920 fi
4921 fi
4922 rm -f conftest.* libconftest.a
4923
4924 fi
4925 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4926
4927 fi
4928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
4929 $as_echo "$lt_cv_ar_at_file" >&6; }
4930
4931 if test no = "$lt_cv_ar_at_file"; then
4932 archiver_list_spec=
4933 else
4934 archiver_list_spec=$lt_cv_ar_at_file
4935 fi
4936
4937
4938
4939
4940
4941
4942
4943 if test -n "$ac_tool_prefix"; then
4944 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4945 set dummy ${ac_tool_prefix}strip; ac_word=$2
4946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4947 $as_echo_n "checking for $ac_word... " >&6; }
4948 if ${ac_cv_prog_STRIP+:} false; then :
4949 $as_echo_n "(cached) " >&6
4950 else
4951 if test -n "$STRIP"; then
4952 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4953 else
4954 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4955 for as_dir in $PATH
4956 do
4957 IFS=$as_save_IFS
4958 test -z "$as_dir" && as_dir=.
4959 for ac_exec_ext in '' $ac_executable_extensions; do
4960 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4961 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4962 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4963 break 2
4964 fi
4965 done
4966 done
4967 IFS=$as_save_IFS
4968
4969 fi
4970 fi
4971 STRIP=$ac_cv_prog_STRIP
4972 if test -n "$STRIP"; then
4973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4974 $as_echo "$STRIP" >&6; }
4975 else
4976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4977 $as_echo "no" >&6; }
4978 fi
4979
4980
4981 fi
4982 if test -z "$ac_cv_prog_STRIP"; then
4983 ac_ct_STRIP=$STRIP
4984 # Extract the first word of "strip", so it can be a program name with args.
4985 set dummy strip; ac_word=$2
4986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4987 $as_echo_n "checking for $ac_word... " >&6; }
4988 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
4989 $as_echo_n "(cached) " >&6
4990 else
4991 if test -n "$ac_ct_STRIP"; then
4992 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4993 else
4994 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4995 for as_dir in $PATH
4996 do
4997 IFS=$as_save_IFS
4998 test -z "$as_dir" && as_dir=.
4999 for ac_exec_ext in '' $ac_executable_extensions; do
5000 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5001 ac_cv_prog_ac_ct_STRIP="strip"
5002 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5003 break 2
5004 fi
5005 done
5006 done
5007 IFS=$as_save_IFS
5008
5009 fi
5010 fi
5011 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5012 if test -n "$ac_ct_STRIP"; then
5013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
5014 $as_echo "$ac_ct_STRIP" >&6; }
5015 else
5016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5017 $as_echo "no" >&6; }
5018 fi
5019
5020 if test "x$ac_ct_STRIP" = x; then
5021 STRIP=":"
5022 else
5023 case $cross_compiling:$ac_tool_warned in
5024 yes:)
5025 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5026 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5027 ac_tool_warned=yes ;;
5028 esac
5029 STRIP=$ac_ct_STRIP
5030 fi
5031 else
5032 STRIP="$ac_cv_prog_STRIP"
5033 fi
5034
5035 test -z "$STRIP" && STRIP=:
5036
5037
5038
5039
5040
5041
5042 if test -n "$ac_tool_prefix"; then
5043 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5044 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5046 $as_echo_n "checking for $ac_word... " >&6; }
5047 if ${ac_cv_prog_RANLIB+:} false; then :
5048 $as_echo_n "(cached) " >&6
5049 else
5050 if test -n "$RANLIB"; then
5051 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5052 else
5053 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5054 for as_dir in $PATH
5055 do
5056 IFS=$as_save_IFS
5057 test -z "$as_dir" && as_dir=.
5058 for ac_exec_ext in '' $ac_executable_extensions; do
5059 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5060 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5061 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5062 break 2
5063 fi
5064 done
5065 done
5066 IFS=$as_save_IFS
5067
5068 fi
5069 fi
5070 RANLIB=$ac_cv_prog_RANLIB
5071 if test -n "$RANLIB"; then
5072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5073 $as_echo "$RANLIB" >&6; }
5074 else
5075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5076 $as_echo "no" >&6; }
5077 fi
5078
5079
5080 fi
5081 if test -z "$ac_cv_prog_RANLIB"; then
5082 ac_ct_RANLIB=$RANLIB
5083 # Extract the first word of "ranlib", so it can be a program name with args.
5084 set dummy ranlib; ac_word=$2
5085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5086 $as_echo_n "checking for $ac_word... " >&6; }
5087 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
5088 $as_echo_n "(cached) " >&6
5089 else
5090 if test -n "$ac_ct_RANLIB"; then
5091 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5092 else
5093 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5094 for as_dir in $PATH
5095 do
5096 IFS=$as_save_IFS
5097 test -z "$as_dir" && as_dir=.
5098 for ac_exec_ext in '' $ac_executable_extensions; do
5099 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5100 ac_cv_prog_ac_ct_RANLIB="ranlib"
5101 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5102 break 2
5103 fi
5104 done
5105 done
5106 IFS=$as_save_IFS
5107
5108 fi
5109 fi
5110 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5111 if test -n "$ac_ct_RANLIB"; then
5112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5113 $as_echo "$ac_ct_RANLIB" >&6; }
5114 else
5115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5116 $as_echo "no" >&6; }
5117 fi
5118
5119 if test "x$ac_ct_RANLIB" = x; then
5120 RANLIB=":"
5121 else
5122 case $cross_compiling:$ac_tool_warned in
5123 yes:)
5124 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5125 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5126 ac_tool_warned=yes ;;
5127 esac
5128 RANLIB=$ac_ct_RANLIB
5129 fi
5130 else
5131 RANLIB="$ac_cv_prog_RANLIB"
5132 fi
5133
5134 test -z "$RANLIB" && RANLIB=:
5135
5136
5137
5138
5139
5140
5141 # Determine commands to create old-style static archives.
5142 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
5143 old_postinstall_cmds='chmod 644 $oldlib'
5144 old_postuninstall_cmds=
5145
5146 if test -n "$RANLIB"; then
5147 case $host_os in
5148 bitrig* | openbsd*)
5149 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
5150 ;;
5151 *)
5152 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
5153 ;;
5154 esac
5155 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
5156 fi
5157
5158 case $host_os in
5159 darwin*)
5160 lock_old_archive_extraction=yes ;;
5161 *)
5162 lock_old_archive_extraction=no ;;
5163 esac
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185 for ac_prog in gawk mawk nawk awk
5186 do
5187 # Extract the first word of "$ac_prog", so it can be a program name with args.
5188 set dummy $ac_prog; ac_word=$2
5189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5190 $as_echo_n "checking for $ac_word... " >&6; }
5191 if ${ac_cv_prog_AWK+:} false; then :
5192 $as_echo_n "(cached) " >&6
5193 else
5194 if test -n "$AWK"; then
5195 ac_cv_prog_AWK="$AWK" # Let the user override the test.
5196 else
5197 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5198 for as_dir in $PATH
5199 do
5200 IFS=$as_save_IFS
5201 test -z "$as_dir" && as_dir=.
5202 for ac_exec_ext in '' $ac_executable_extensions; do
5203 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5204 ac_cv_prog_AWK="$ac_prog"
5205 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5206 break 2
5207 fi
5208 done
5209 done
5210 IFS=$as_save_IFS
5211
5212 fi
5213 fi
5214 AWK=$ac_cv_prog_AWK
5215 if test -n "$AWK"; then
5216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5217 $as_echo "$AWK" >&6; }
5218 else
5219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5220 $as_echo "no" >&6; }
5221 fi
5222
5223
5224 test -n "$AWK" && break
5225 done
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245 # If no C compiler was specified, use CC.
5246 LTCC=${LTCC-"$CC"}
5247
5248 # If no C compiler flags were specified, use CFLAGS.
5249 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
5250
5251 # Allow CC to be a program name with arguments.
5252 compiler=$CC
5253
5254
5255 # Check for command to grab the raw symbol name followed by C symbol from nm.
5256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
5257 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
5258 if ${lt_cv_sys_global_symbol_pipe+:} false; then :
5259 $as_echo_n "(cached) " >&6
5260 else
5261
5262 # These are sane defaults that work on at least a few old systems.
5263 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
5264
5265 # Character class describing NM global symbol codes.
5266 symcode='[BCDEGRST]'
5267
5268 # Regexp to match symbols that can be accessed directly from C.
5269 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
5270
5271 # Define system-specific variables.
5272 case $host_os in
5273 aix*)
5274 symcode='[BCDT]'
5275 ;;
5276 cygwin* | mingw* | pw32* | cegcc*)
5277 symcode='[ABCDGISTW]'
5278 ;;
5279 hpux*)
5280 if test ia64 = "$host_cpu"; then
5281 symcode='[ABCDEGRST]'
5282 fi
5283 ;;
5284 irix* | nonstopux*)
5285 symcode='[BCDEGRST]'
5286 ;;
5287 osf*)
5288 symcode='[BCDEGQRST]'
5289 ;;
5290 solaris*)
5291 symcode='[BDRT]'
5292 ;;
5293 sco3.2v5*)
5294 symcode='[DT]'
5295 ;;
5296 sysv4.2uw2*)
5297 symcode='[DT]'
5298 ;;
5299 sysv5* | sco5v6* | unixware* | OpenUNIX*)
5300 symcode='[ABDT]'
5301 ;;
5302 sysv4)
5303 symcode='[DFNSTU]'
5304 ;;
5305 esac
5306
5307 # If we're using GNU nm, then use its standard symbol codes.
5308 case `$NM -V 2>&1` in
5309 *GNU* | *'with BFD'*)
5310 symcode='[ABCDGIRSTW]' ;;
5311 esac
5312
5313 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
5314 # Gets list of data symbols to import.
5315 lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
5316 # Adjust the below global symbol transforms to fixup imported variables.
5317 lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
5318 lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
5319 lt_c_name_lib_hook="\
5320 -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
5321 -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
5322 else
5323 # Disable hooks by default.
5324 lt_cv_sys_global_symbol_to_import=
5325 lt_cdecl_hook=
5326 lt_c_name_hook=
5327 lt_c_name_lib_hook=
5328 fi
5329
5330 # Transform an extracted symbol line into a proper C declaration.
5331 # Some systems (esp. on ia64) link data and code symbols differently,
5332 # so use this general approach.
5333 lt_cv_sys_global_symbol_to_cdecl="sed -n"\
5334 $lt_cdecl_hook\
5335 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
5336 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
5337
5338 # Transform an extracted symbol line into symbol name and symbol address
5339 lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
5340 $lt_c_name_hook\
5341 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
5342 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
5343
5344 # Transform an extracted symbol line into symbol name with lib prefix and
5345 # symbol address.
5346 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
5347 $lt_c_name_lib_hook\
5348 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
5349 " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
5350 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
5351
5352 # Handle CRLF in mingw tool chain
5353 opt_cr=
5354 case $build_os in
5355 mingw*)
5356 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5357 ;;
5358 esac
5359
5360 # Try without a prefix underscore, then with it.
5361 for ac_symprfx in "" "_"; do
5362
5363 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5364 symxfrm="\\1 $ac_symprfx\\2 \\2"
5365
5366 # Write the raw and C identifiers.
5367 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
5368 # Fake it for dumpbin and say T for any non-static function,
5369 # D for any global variable and I for any imported variable.
5370 # Also find C++ and __fastcall symbols from MSVC++,
5371 # which start with @ or ?.
5372 lt_cv_sys_global_symbol_pipe="$AWK '"\
5373 " {last_section=section; section=\$ 3};"\
5374 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
5375 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
5376 " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
5377 " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
5378 " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
5379 " \$ 0!~/External *\|/{next};"\
5380 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
5381 " {if(hide[section]) next};"\
5382 " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
5383 " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
5384 " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
5385 " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
5386 " ' prfx=^$ac_symprfx"
5387 else
5388 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
5389 fi
5390 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
5391
5392 # Check to see that the pipe works correctly.
5393 pipe_works=no
5394
5395 rm -f conftest*
5396 cat > conftest.$ac_ext <<_LT_EOF
5397 #ifdef __cplusplus
5398 extern "C" {
5399 #endif
5400 char nm_test_var;
5401 void nm_test_func(void);
5402 void nm_test_func(void){}
5403 #ifdef __cplusplus
5404 }
5405 #endif
5406 int main(){nm_test_var='a';nm_test_func();return(0);}
5407 _LT_EOF
5408
5409 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
5410 (eval $ac_compile) 2>&5
5411 ac_status=$?
5412 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5413 test $ac_status = 0; }; then
5414 # Now try to grab the symbols.
5415 nlist=conftest.nm
5416 $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&5
5417 if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&5 && test -s "$nlist"; then
5418 # Try sorting and uniquifying the output.
5419 if sort "$nlist" | uniq > "$nlist"T; then
5420 mv -f "$nlist"T "$nlist"
5421 else
5422 rm -f "$nlist"T
5423 fi
5424
5425 # Make sure that we snagged all the symbols we need.
5426 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
5427 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
5428 cat <<_LT_EOF > conftest.$ac_ext
5429 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
5430 #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
5431 /* DATA imports from DLLs on WIN32 can't be const, because runtime
5432 relocations are performed -- see ld's documentation on pseudo-relocs. */
5433 # define LT_DLSYM_CONST
5434 #elif defined __osf__
5435 /* This system does not cope well with relocations in const data. */
5436 # define LT_DLSYM_CONST
5437 #else
5438 # define LT_DLSYM_CONST const
5439 #endif
5440
5441 #ifdef __cplusplus
5442 extern "C" {
5443 #endif
5444
5445 _LT_EOF
5446 # Now generate the symbol file.
5447 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
5448
5449 cat <<_LT_EOF >> conftest.$ac_ext
5450
5451 /* The mapping between symbol names and symbols. */
5452 LT_DLSYM_CONST struct {
5453 const char *name;
5454 void *address;
5455 }
5456 lt__PROGRAM__LTX_preloaded_symbols[] =
5457 {
5458 { "@PROGRAM@", (void *) 0 },
5459 _LT_EOF
5460 $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
5461 cat <<\_LT_EOF >> conftest.$ac_ext
5462 {0, (void *) 0}
5463 };
5464
5465 /* This works around a problem in FreeBSD linker */
5466 #ifdef FREEBSD_WORKAROUND
5467 static const void *lt_preloaded_setup() {
5468 return lt__PROGRAM__LTX_preloaded_symbols;
5469 }
5470 #endif
5471
5472 #ifdef __cplusplus
5473 }
5474 #endif
5475 _LT_EOF
5476 # Now try linking the two files.
5477 mv conftest.$ac_objext conftstm.$ac_objext
5478 lt_globsym_save_LIBS=$LIBS
5479 lt_globsym_save_CFLAGS=$CFLAGS
5480 LIBS=conftstm.$ac_objext
5481 CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
5482 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
5483 (eval $ac_link) 2>&5
5484 ac_status=$?
5485 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5486 test $ac_status = 0; } && test -s conftest$ac_exeext; then
5487 pipe_works=yes
5488 fi
5489 LIBS=$lt_globsym_save_LIBS
5490 CFLAGS=$lt_globsym_save_CFLAGS
5491 else
5492 echo "cannot find nm_test_func in $nlist" >&5
5493 fi
5494 else
5495 echo "cannot find nm_test_var in $nlist" >&5
5496 fi
5497 else
5498 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
5499 fi
5500 else
5501 echo "$progname: failed program was:" >&5
5502 cat conftest.$ac_ext >&5
5503 fi
5504 rm -rf conftest* conftst*
5505
5506 # Do not use the global_symbol_pipe unless it works.
5507 if test yes = "$pipe_works"; then
5508 break
5509 else
5510 lt_cv_sys_global_symbol_pipe=
5511 fi
5512 done
5513
5514 fi
5515
5516 if test -z "$lt_cv_sys_global_symbol_pipe"; then
5517 lt_cv_sys_global_symbol_to_cdecl=
5518 fi
5519 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5521 $as_echo "failed" >&6; }
5522 else
5523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
5524 $as_echo "ok" >&6; }
5525 fi
5526
5527 # Response file support.
5528 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
5529 nm_file_list_spec='@'
5530 elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
5531 nm_file_list_spec='@'
5532 fi
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
5571 $as_echo_n "checking for sysroot... " >&6; }
5572
5573 # Check whether --with-sysroot was given.
5574 if test "${with_sysroot+set}" = set; then :
5575 withval=$with_sysroot;
5576 else
5577 with_sysroot=no
5578 fi
5579
5580
5581 lt_sysroot=
5582 case $with_sysroot in #(
5583 yes)
5584 if test yes = "$GCC"; then
5585 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
5586 fi
5587 ;; #(
5588 /*)
5589 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
5590 ;; #(
5591 no|'')
5592 ;; #(
5593 *)
5594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
5595 $as_echo "$with_sysroot" >&6; }
5596 as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
5597 ;;
5598 esac
5599
5600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
5601 $as_echo "${lt_sysroot:-no}" >&6; }
5602
5603
5604
5605
5606
5607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
5608 $as_echo_n "checking for a working dd... " >&6; }
5609 if ${ac_cv_path_lt_DD+:} false; then :
5610 $as_echo_n "(cached) " >&6
5611 else
5612 printf 0123456789abcdef0123456789abcdef >conftest.i
5613 cat conftest.i conftest.i >conftest2.i
5614 : ${lt_DD:=$DD}
5615 if test -z "$lt_DD"; then
5616 ac_path_lt_DD_found=false
5617 # Loop through the user's path and test for each of PROGNAME-LIST
5618 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5619 for as_dir in $PATH
5620 do
5621 IFS=$as_save_IFS
5622 test -z "$as_dir" && as_dir=.
5623 for ac_prog in dd; do
5624 for ac_exec_ext in '' $ac_executable_extensions; do
5625 ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
5626 as_fn_executable_p "$ac_path_lt_DD" || continue
5627 if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
5628 cmp -s conftest.i conftest.out \
5629 && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
5630 fi
5631 $ac_path_lt_DD_found && break 3
5632 done
5633 done
5634 done
5635 IFS=$as_save_IFS
5636 if test -z "$ac_cv_path_lt_DD"; then
5637 :
5638 fi
5639 else
5640 ac_cv_path_lt_DD=$lt_DD
5641 fi
5642
5643 rm -f conftest.i conftest2.i conftest.out
5644 fi
5645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
5646 $as_echo "$ac_cv_path_lt_DD" >&6; }
5647
5648
5649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
5650 $as_echo_n "checking how to truncate binary pipes... " >&6; }
5651 if ${lt_cv_truncate_bin+:} false; then :
5652 $as_echo_n "(cached) " >&6
5653 else
5654 printf 0123456789abcdef0123456789abcdef >conftest.i
5655 cat conftest.i conftest.i >conftest2.i
5656 lt_cv_truncate_bin=
5657 if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
5658 cmp -s conftest.i conftest.out \
5659 && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
5660 fi
5661 rm -f conftest.i conftest2.i conftest.out
5662 test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
5663 fi
5664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
5665 $as_echo "$lt_cv_truncate_bin" >&6; }
5666
5667
5668
5669
5670
5671
5672
5673 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
5674 func_cc_basename ()
5675 {
5676 for cc_temp in $*""; do
5677 case $cc_temp in
5678 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
5679 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
5680 \-*) ;;
5681 *) break;;
5682 esac
5683 done
5684 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
5685 }
5686
5687 # Check whether --enable-libtool-lock was given.
5688 if test "${enable_libtool_lock+set}" = set; then :
5689 enableval=$enable_libtool_lock;
5690 fi
5691
5692 test no = "$enable_libtool_lock" || enable_libtool_lock=yes
5693
5694 # Some flags need to be propagated to the compiler or linker for good
5695 # libtool support.
5696 case $host in
5697 ia64-*-hpux*)
5698 # Find out what ABI is being produced by ac_compile, and set mode
5699 # options accordingly.
5700 echo 'int i;' > conftest.$ac_ext
5701 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
5702 (eval $ac_compile) 2>&5
5703 ac_status=$?
5704 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5705 test $ac_status = 0; }; then
5706 case `/usr/bin/file conftest.$ac_objext` in
5707 *ELF-32*)
5708 HPUX_IA64_MODE=32
5709 ;;
5710 *ELF-64*)
5711 HPUX_IA64_MODE=64
5712 ;;
5713 esac
5714 fi
5715 rm -rf conftest*
5716 ;;
5717 *-*-irix6*)
5718 # Find out what ABI is being produced by ac_compile, and set linker
5719 # options accordingly.
5720 echo '#line '$LINENO' "configure"' > conftest.$ac_ext
5721 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
5722 (eval $ac_compile) 2>&5
5723 ac_status=$?
5724 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5725 test $ac_status = 0; }; then
5726 if test yes = "$lt_cv_prog_gnu_ld"; then
5727 case `/usr/bin/file conftest.$ac_objext` in
5728 *32-bit*)
5729 LD="${LD-ld} -melf32bsmip"
5730 ;;
5731 *N32*)
5732 LD="${LD-ld} -melf32bmipn32"
5733 ;;
5734 *64-bit*)
5735 LD="${LD-ld} -melf64bmip"
5736 ;;
5737 esac
5738 else
5739 case `/usr/bin/file conftest.$ac_objext` in
5740 *32-bit*)
5741 LD="${LD-ld} -32"
5742 ;;
5743 *N32*)
5744 LD="${LD-ld} -n32"
5745 ;;
5746 *64-bit*)
5747 LD="${LD-ld} -64"
5748 ;;
5749 esac
5750 fi
5751 fi
5752 rm -rf conftest*
5753 ;;
5754
5755 mips64*-*linux*)
5756 # Find out what ABI is being produced by ac_compile, and set linker
5757 # options accordingly.
5758 echo '#line '$LINENO' "configure"' > conftest.$ac_ext
5759 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
5760 (eval $ac_compile) 2>&5
5761 ac_status=$?
5762 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5763 test $ac_status = 0; }; then
5764 emul=elf
5765 case `/usr/bin/file conftest.$ac_objext` in
5766 *32-bit*)
5767 emul="${emul}32"
5768 ;;
5769 *64-bit*)
5770 emul="${emul}64"
5771 ;;
5772 esac
5773 case `/usr/bin/file conftest.$ac_objext` in
5774 *MSB*)
5775 emul="${emul}btsmip"
5776 ;;
5777 *LSB*)
5778 emul="${emul}ltsmip"
5779 ;;
5780 esac
5781 case `/usr/bin/file conftest.$ac_objext` in
5782 *N32*)
5783 emul="${emul}n32"
5784 ;;
5785 esac
5786 LD="${LD-ld} -m $emul"
5787 fi
5788 rm -rf conftest*
5789 ;;
5790
5791 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
5792 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
5793 # Find out what ABI is being produced by ac_compile, and set linker
5794 # options accordingly. Note that the listed cases only cover the
5795 # situations where additional linker options are needed (such as when
5796 # doing 32-bit compilation for a host where ld defaults to 64-bit, or
5797 # vice versa); the common cases where no linker options are needed do
5798 # not appear in the list.
5799 echo 'int i;' > conftest.$ac_ext
5800 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
5801 (eval $ac_compile) 2>&5
5802 ac_status=$?
5803 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5804 test $ac_status = 0; }; then
5805 case `/usr/bin/file conftest.o` in
5806 *32-bit*)
5807 case $host in
5808 x86_64-*kfreebsd*-gnu)
5809 LD="${LD-ld} -m elf_i386_fbsd"
5810 ;;
5811 x86_64-*linux*)
5812 case `/usr/bin/file conftest.o` in
5813 *x86-64*)
5814 LD="${LD-ld} -m elf32_x86_64"
5815 ;;
5816 *)
5817 LD="${LD-ld} -m elf_i386"
5818 ;;
5819 esac
5820 ;;
5821 powerpc64le-*linux*)
5822 LD="${LD-ld} -m elf32lppclinux"
5823 ;;
5824 powerpc64-*linux*)
5825 LD="${LD-ld} -m elf32ppclinux"
5826 ;;
5827 s390x-*linux*)
5828 LD="${LD-ld} -m elf_s390"
5829 ;;
5830 sparc64-*linux*)
5831 LD="${LD-ld} -m elf32_sparc"
5832 ;;
5833 esac
5834 ;;
5835 *64-bit*)
5836 case $host in
5837 x86_64-*kfreebsd*-gnu)
5838 LD="${LD-ld} -m elf_x86_64_fbsd"
5839 ;;
5840 x86_64-*linux*)
5841 LD="${LD-ld} -m elf_x86_64"
5842 ;;
5843 powerpcle-*linux*)
5844 LD="${LD-ld} -m elf64lppc"
5845 ;;
5846 powerpc-*linux*)
5847 LD="${LD-ld} -m elf64ppc"
5848 ;;
5849 s390*-*linux*|s390*-*tpf*)
5850 LD="${LD-ld} -m elf64_s390"
5851 ;;
5852 sparc*-*linux*)
5853 LD="${LD-ld} -m elf64_sparc"
5854 ;;
5855 esac
5856 ;;
5857 esac
5858 fi
5859 rm -rf conftest*
5860 ;;
5861
5862 *-*-sco3.2v5*)
5863 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
5864 SAVE_CFLAGS=$CFLAGS
5865 CFLAGS="$CFLAGS -belf"
5866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
5867 $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
5868 if ${lt_cv_cc_needs_belf+:} false; then :
5869 $as_echo_n "(cached) " >&6
5870 else
5871 ac_ext=c
5872 ac_cpp='$CPP $CPPFLAGS'
5873 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5874 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5875 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5876
5877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5878 /* end confdefs.h. */
5879
5880 int
5881 main ()
5882 {
5883
5884 ;
5885 return 0;
5886 }
5887 _ACEOF
5888 if ac_fn_c_try_link "$LINENO"; then :
5889 lt_cv_cc_needs_belf=yes
5890 else
5891 lt_cv_cc_needs_belf=no
5892 fi
5893 rm -f core conftest.err conftest.$ac_objext \
5894 conftest$ac_exeext conftest.$ac_ext
5895 ac_ext=c
5896 ac_cpp='$CPP $CPPFLAGS'
5897 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5898 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5899 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5900
5901 fi
5902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
5903 $as_echo "$lt_cv_cc_needs_belf" >&6; }
5904 if test yes != "$lt_cv_cc_needs_belf"; then
5905 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
5906 CFLAGS=$SAVE_CFLAGS
5907 fi
5908 ;;
5909 *-*solaris*)
5910 # Find out what ABI is being produced by ac_compile, and set linker
5911 # options accordingly.
5912 echo 'int i;' > conftest.$ac_ext
5913 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
5914 (eval $ac_compile) 2>&5
5915 ac_status=$?
5916 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5917 test $ac_status = 0; }; then
5918 case `/usr/bin/file conftest.o` in
5919 *64-bit*)
5920 case $lt_cv_prog_gnu_ld in
5921 yes*)
5922 case $host in
5923 i?86-*-solaris*|x86_64-*-solaris*)
5924 LD="${LD-ld} -m elf_x86_64"
5925 ;;
5926 sparc*-*-solaris*)
5927 LD="${LD-ld} -m elf64_sparc"
5928 ;;
5929 esac
5930 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
5931 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
5932 LD=${LD-ld}_sol2
5933 fi
5934 ;;
5935 *)
5936 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
5937 LD="${LD-ld} -64"
5938 fi
5939 ;;
5940 esac
5941 ;;
5942 esac
5943 fi
5944 rm -rf conftest*
5945 ;;
5946 esac
5947
5948 need_locks=$enable_libtool_lock
5949
5950 if test -n "$ac_tool_prefix"; then
5951 # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
5952 set dummy ${ac_tool_prefix}mt; ac_word=$2
5953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5954 $as_echo_n "checking for $ac_word... " >&6; }
5955 if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
5956 $as_echo_n "(cached) " >&6
5957 else
5958 if test -n "$MANIFEST_TOOL"; then
5959 ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
5960 else
5961 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5962 for as_dir in $PATH
5963 do
5964 IFS=$as_save_IFS
5965 test -z "$as_dir" && as_dir=.
5966 for ac_exec_ext in '' $ac_executable_extensions; do
5967 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5968 ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
5969 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5970 break 2
5971 fi
5972 done
5973 done
5974 IFS=$as_save_IFS
5975
5976 fi
5977 fi
5978 MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
5979 if test -n "$MANIFEST_TOOL"; then
5980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
5981 $as_echo "$MANIFEST_TOOL" >&6; }
5982 else
5983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5984 $as_echo "no" >&6; }
5985 fi
5986
5987
5988 fi
5989 if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
5990 ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
5991 # Extract the first word of "mt", so it can be a program name with args.
5992 set dummy mt; ac_word=$2
5993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5994 $as_echo_n "checking for $ac_word... " >&6; }
5995 if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
5996 $as_echo_n "(cached) " >&6
5997 else
5998 if test -n "$ac_ct_MANIFEST_TOOL"; then
5999 ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
6000 else
6001 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6002 for as_dir in $PATH
6003 do
6004 IFS=$as_save_IFS
6005 test -z "$as_dir" && as_dir=.
6006 for ac_exec_ext in '' $ac_executable_extensions; do
6007 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6008 ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
6009 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6010 break 2
6011 fi
6012 done
6013 done
6014 IFS=$as_save_IFS
6015
6016 fi
6017 fi
6018 ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
6019 if test -n "$ac_ct_MANIFEST_TOOL"; then
6020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
6021 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
6022 else
6023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6024 $as_echo "no" >&6; }
6025 fi
6026
6027 if test "x$ac_ct_MANIFEST_TOOL" = x; then
6028 MANIFEST_TOOL=":"
6029 else
6030 case $cross_compiling:$ac_tool_warned in
6031 yes:)
6032 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6033 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6034 ac_tool_warned=yes ;;
6035 esac
6036 MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
6037 fi
6038 else
6039 MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
6040 fi
6041
6042 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
6043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
6044 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
6045 if ${lt_cv_path_mainfest_tool+:} false; then :
6046 $as_echo_n "(cached) " >&6
6047 else
6048 lt_cv_path_mainfest_tool=no
6049 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
6050 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
6051 cat conftest.err >&5
6052 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
6053 lt_cv_path_mainfest_tool=yes
6054 fi
6055 rm -f conftest*
6056 fi
6057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
6058 $as_echo "$lt_cv_path_mainfest_tool" >&6; }
6059 if test yes != "$lt_cv_path_mainfest_tool"; then
6060 MANIFEST_TOOL=:
6061 fi
6062
6063
6064
6065
6066
6067
6068 case $host_os in
6069 rhapsody* | darwin*)
6070 if test -n "$ac_tool_prefix"; then
6071 # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
6072 set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
6073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6074 $as_echo_n "checking for $ac_word... " >&6; }
6075 if ${ac_cv_prog_DSYMUTIL+:} false; then :
6076 $as_echo_n "(cached) " >&6
6077 else
6078 if test -n "$DSYMUTIL"; then
6079 ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
6080 else
6081 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6082 for as_dir in $PATH
6083 do
6084 IFS=$as_save_IFS
6085 test -z "$as_dir" && as_dir=.
6086 for ac_exec_ext in '' $ac_executable_extensions; do
6087 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6088 ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
6089 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6090 break 2
6091 fi
6092 done
6093 done
6094 IFS=$as_save_IFS
6095
6096 fi
6097 fi
6098 DSYMUTIL=$ac_cv_prog_DSYMUTIL
6099 if test -n "$DSYMUTIL"; then
6100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
6101 $as_echo "$DSYMUTIL" >&6; }
6102 else
6103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6104 $as_echo "no" >&6; }
6105 fi
6106
6107
6108 fi
6109 if test -z "$ac_cv_prog_DSYMUTIL"; then
6110 ac_ct_DSYMUTIL=$DSYMUTIL
6111 # Extract the first word of "dsymutil", so it can be a program name with args.
6112 set dummy dsymutil; ac_word=$2
6113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6114 $as_echo_n "checking for $ac_word... " >&6; }
6115 if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
6116 $as_echo_n "(cached) " >&6
6117 else
6118 if test -n "$ac_ct_DSYMUTIL"; then
6119 ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
6120 else
6121 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6122 for as_dir in $PATH
6123 do
6124 IFS=$as_save_IFS
6125 test -z "$as_dir" && as_dir=.
6126 for ac_exec_ext in '' $ac_executable_extensions; do
6127 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6128 ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
6129 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6130 break 2
6131 fi
6132 done
6133 done
6134 IFS=$as_save_IFS
6135
6136 fi
6137 fi
6138 ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
6139 if test -n "$ac_ct_DSYMUTIL"; then
6140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
6141 $as_echo "$ac_ct_DSYMUTIL" >&6; }
6142 else
6143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6144 $as_echo "no" >&6; }
6145 fi
6146
6147 if test "x$ac_ct_DSYMUTIL" = x; then
6148 DSYMUTIL=":"
6149 else
6150 case $cross_compiling:$ac_tool_warned in
6151 yes:)
6152 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6153 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6154 ac_tool_warned=yes ;;
6155 esac
6156 DSYMUTIL=$ac_ct_DSYMUTIL
6157 fi
6158 else
6159 DSYMUTIL="$ac_cv_prog_DSYMUTIL"
6160 fi
6161
6162 if test -n "$ac_tool_prefix"; then
6163 # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
6164 set dummy ${ac_tool_prefix}nmedit; ac_word=$2
6165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6166 $as_echo_n "checking for $ac_word... " >&6; }
6167 if ${ac_cv_prog_NMEDIT+:} false; then :
6168 $as_echo_n "(cached) " >&6
6169 else
6170 if test -n "$NMEDIT"; then
6171 ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
6172 else
6173 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6174 for as_dir in $PATH
6175 do
6176 IFS=$as_save_IFS
6177 test -z "$as_dir" && as_dir=.
6178 for ac_exec_ext in '' $ac_executable_extensions; do
6179 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6180 ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
6181 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6182 break 2
6183 fi
6184 done
6185 done
6186 IFS=$as_save_IFS
6187
6188 fi
6189 fi
6190 NMEDIT=$ac_cv_prog_NMEDIT
6191 if test -n "$NMEDIT"; then
6192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
6193 $as_echo "$NMEDIT" >&6; }
6194 else
6195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6196 $as_echo "no" >&6; }
6197 fi
6198
6199
6200 fi
6201 if test -z "$ac_cv_prog_NMEDIT"; then
6202 ac_ct_NMEDIT=$NMEDIT
6203 # Extract the first word of "nmedit", so it can be a program name with args.
6204 set dummy nmedit; ac_word=$2
6205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6206 $as_echo_n "checking for $ac_word... " >&6; }
6207 if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
6208 $as_echo_n "(cached) " >&6
6209 else
6210 if test -n "$ac_ct_NMEDIT"; then
6211 ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
6212 else
6213 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6214 for as_dir in $PATH
6215 do
6216 IFS=$as_save_IFS
6217 test -z "$as_dir" && as_dir=.
6218 for ac_exec_ext in '' $ac_executable_extensions; do
6219 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6220 ac_cv_prog_ac_ct_NMEDIT="nmedit"
6221 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6222 break 2
6223 fi
6224 done
6225 done
6226 IFS=$as_save_IFS
6227
6228 fi
6229 fi
6230 ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
6231 if test -n "$ac_ct_NMEDIT"; then
6232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
6233 $as_echo "$ac_ct_NMEDIT" >&6; }
6234 else
6235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6236 $as_echo "no" >&6; }
6237 fi
6238
6239 if test "x$ac_ct_NMEDIT" = x; then
6240 NMEDIT=":"
6241 else
6242 case $cross_compiling:$ac_tool_warned in
6243 yes:)
6244 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6245 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6246 ac_tool_warned=yes ;;
6247 esac
6248 NMEDIT=$ac_ct_NMEDIT
6249 fi
6250 else
6251 NMEDIT="$ac_cv_prog_NMEDIT"
6252 fi
6253
6254 if test -n "$ac_tool_prefix"; then
6255 # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
6256 set dummy ${ac_tool_prefix}lipo; ac_word=$2
6257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6258 $as_echo_n "checking for $ac_word... " >&6; }
6259 if ${ac_cv_prog_LIPO+:} false; then :
6260 $as_echo_n "(cached) " >&6
6261 else
6262 if test -n "$LIPO"; then
6263 ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
6264 else
6265 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6266 for as_dir in $PATH
6267 do
6268 IFS=$as_save_IFS
6269 test -z "$as_dir" && as_dir=.
6270 for ac_exec_ext in '' $ac_executable_extensions; do
6271 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6272 ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
6273 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6274 break 2
6275 fi
6276 done
6277 done
6278 IFS=$as_save_IFS
6279
6280 fi
6281 fi
6282 LIPO=$ac_cv_prog_LIPO
6283 if test -n "$LIPO"; then
6284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
6285 $as_echo "$LIPO" >&6; }
6286 else
6287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6288 $as_echo "no" >&6; }
6289 fi
6290
6291
6292 fi
6293 if test -z "$ac_cv_prog_LIPO"; then
6294 ac_ct_LIPO=$LIPO
6295 # Extract the first word of "lipo", so it can be a program name with args.
6296 set dummy lipo; ac_word=$2
6297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6298 $as_echo_n "checking for $ac_word... " >&6; }
6299 if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
6300 $as_echo_n "(cached) " >&6
6301 else
6302 if test -n "$ac_ct_LIPO"; then
6303 ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
6304 else
6305 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6306 for as_dir in $PATH
6307 do
6308 IFS=$as_save_IFS
6309 test -z "$as_dir" && as_dir=.
6310 for ac_exec_ext in '' $ac_executable_extensions; do
6311 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6312 ac_cv_prog_ac_ct_LIPO="lipo"
6313 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6314 break 2
6315 fi
6316 done
6317 done
6318 IFS=$as_save_IFS
6319
6320 fi
6321 fi
6322 ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
6323 if test -n "$ac_ct_LIPO"; then
6324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
6325 $as_echo "$ac_ct_LIPO" >&6; }
6326 else
6327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6328 $as_echo "no" >&6; }
6329 fi
6330
6331 if test "x$ac_ct_LIPO" = x; then
6332 LIPO=":"
6333 else
6334 case $cross_compiling:$ac_tool_warned in
6335 yes:)
6336 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6337 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6338 ac_tool_warned=yes ;;
6339 esac
6340 LIPO=$ac_ct_LIPO
6341 fi
6342 else
6343 LIPO="$ac_cv_prog_LIPO"
6344 fi
6345
6346 if test -n "$ac_tool_prefix"; then
6347 # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
6348 set dummy ${ac_tool_prefix}otool; ac_word=$2
6349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6350 $as_echo_n "checking for $ac_word... " >&6; }
6351 if ${ac_cv_prog_OTOOL+:} false; then :
6352 $as_echo_n "(cached) " >&6
6353 else
6354 if test -n "$OTOOL"; then
6355 ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
6356 else
6357 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6358 for as_dir in $PATH
6359 do
6360 IFS=$as_save_IFS
6361 test -z "$as_dir" && as_dir=.
6362 for ac_exec_ext in '' $ac_executable_extensions; do
6363 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6364 ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
6365 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6366 break 2
6367 fi
6368 done
6369 done
6370 IFS=$as_save_IFS
6371
6372 fi
6373 fi
6374 OTOOL=$ac_cv_prog_OTOOL
6375 if test -n "$OTOOL"; then
6376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
6377 $as_echo "$OTOOL" >&6; }
6378 else
6379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6380 $as_echo "no" >&6; }
6381 fi
6382
6383
6384 fi
6385 if test -z "$ac_cv_prog_OTOOL"; then
6386 ac_ct_OTOOL=$OTOOL
6387 # Extract the first word of "otool", so it can be a program name with args.
6388 set dummy otool; ac_word=$2
6389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6390 $as_echo_n "checking for $ac_word... " >&6; }
6391 if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
6392 $as_echo_n "(cached) " >&6
6393 else
6394 if test -n "$ac_ct_OTOOL"; then
6395 ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
6396 else
6397 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6398 for as_dir in $PATH
6399 do
6400 IFS=$as_save_IFS
6401 test -z "$as_dir" && as_dir=.
6402 for ac_exec_ext in '' $ac_executable_extensions; do
6403 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6404 ac_cv_prog_ac_ct_OTOOL="otool"
6405 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6406 break 2
6407 fi
6408 done
6409 done
6410 IFS=$as_save_IFS
6411
6412 fi
6413 fi
6414 ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
6415 if test -n "$ac_ct_OTOOL"; then
6416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
6417 $as_echo "$ac_ct_OTOOL" >&6; }
6418 else
6419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6420 $as_echo "no" >&6; }
6421 fi
6422
6423 if test "x$ac_ct_OTOOL" = x; then
6424 OTOOL=":"
6425 else
6426 case $cross_compiling:$ac_tool_warned in
6427 yes:)
6428 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6429 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6430 ac_tool_warned=yes ;;
6431 esac
6432 OTOOL=$ac_ct_OTOOL
6433 fi
6434 else
6435 OTOOL="$ac_cv_prog_OTOOL"
6436 fi
6437
6438 if test -n "$ac_tool_prefix"; then
6439 # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
6440 set dummy ${ac_tool_prefix}otool64; ac_word=$2
6441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6442 $as_echo_n "checking for $ac_word... " >&6; }
6443 if ${ac_cv_prog_OTOOL64+:} false; then :
6444 $as_echo_n "(cached) " >&6
6445 else
6446 if test -n "$OTOOL64"; then
6447 ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
6448 else
6449 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6450 for as_dir in $PATH
6451 do
6452 IFS=$as_save_IFS
6453 test -z "$as_dir" && as_dir=.
6454 for ac_exec_ext in '' $ac_executable_extensions; do
6455 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6456 ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
6457 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6458 break 2
6459 fi
6460 done
6461 done
6462 IFS=$as_save_IFS
6463
6464 fi
6465 fi
6466 OTOOL64=$ac_cv_prog_OTOOL64
6467 if test -n "$OTOOL64"; then
6468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
6469 $as_echo "$OTOOL64" >&6; }
6470 else
6471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6472 $as_echo "no" >&6; }
6473 fi
6474
6475
6476 fi
6477 if test -z "$ac_cv_prog_OTOOL64"; then
6478 ac_ct_OTOOL64=$OTOOL64
6479 # Extract the first word of "otool64", so it can be a program name with args.
6480 set dummy otool64; ac_word=$2
6481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6482 $as_echo_n "checking for $ac_word... " >&6; }
6483 if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
6484 $as_echo_n "(cached) " >&6
6485 else
6486 if test -n "$ac_ct_OTOOL64"; then
6487 ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
6488 else
6489 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6490 for as_dir in $PATH
6491 do
6492 IFS=$as_save_IFS
6493 test -z "$as_dir" && as_dir=.
6494 for ac_exec_ext in '' $ac_executable_extensions; do
6495 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6496 ac_cv_prog_ac_ct_OTOOL64="otool64"
6497 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6498 break 2
6499 fi
6500 done
6501 done
6502 IFS=$as_save_IFS
6503
6504 fi
6505 fi
6506 ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
6507 if test -n "$ac_ct_OTOOL64"; then
6508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
6509 $as_echo "$ac_ct_OTOOL64" >&6; }
6510 else
6511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6512 $as_echo "no" >&6; }
6513 fi
6514
6515 if test "x$ac_ct_OTOOL64" = x; then
6516 OTOOL64=":"
6517 else
6518 case $cross_compiling:$ac_tool_warned in
6519 yes:)
6520 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6521 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6522 ac_tool_warned=yes ;;
6523 esac
6524 OTOOL64=$ac_ct_OTOOL64
6525 fi
6526 else
6527 OTOOL64="$ac_cv_prog_OTOOL64"
6528 fi
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
6557 $as_echo_n "checking for -single_module linker flag... " >&6; }
6558 if ${lt_cv_apple_cc_single_mod+:} false; then :
6559 $as_echo_n "(cached) " >&6
6560 else
6561 lt_cv_apple_cc_single_mod=no
6562 if test -z "$LT_MULTI_MODULE"; then
6563 # By default we will add the -single_module flag. You can override
6564 # by either setting the environment variable LT_MULTI_MODULE
6565 # non-empty at configure time, or by adding -multi_module to the
6566 # link flags.
6567 rm -rf libconftest.dylib*
6568 echo "int foo(void){return 1;}" > conftest.c
6569 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
6570 -dynamiclib -Wl,-single_module conftest.c" >&5
6571 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
6572 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
6573 _lt_result=$?
6574 # If there is a non-empty error log, and "single_module"
6575 # appears in it, assume the flag caused a linker warning
6576 if test -s conftest.err && $GREP single_module conftest.err; then
6577 cat conftest.err >&5
6578 # Otherwise, if the output was created with a 0 exit code from
6579 # the compiler, it worked.
6580 elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
6581 lt_cv_apple_cc_single_mod=yes
6582 else
6583 cat conftest.err >&5
6584 fi
6585 rm -rf libconftest.dylib*
6586 rm -f conftest.*
6587 fi
6588 fi
6589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
6590 $as_echo "$lt_cv_apple_cc_single_mod" >&6; }
6591
6592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
6593 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
6594 if ${lt_cv_ld_exported_symbols_list+:} false; then :
6595 $as_echo_n "(cached) " >&6
6596 else
6597 lt_cv_ld_exported_symbols_list=no
6598 save_LDFLAGS=$LDFLAGS
6599 echo "_main" > conftest.sym
6600 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
6601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6602 /* end confdefs.h. */
6603
6604 int
6605 main ()
6606 {
6607
6608 ;
6609 return 0;
6610 }
6611 _ACEOF
6612 if ac_fn_c_try_link "$LINENO"; then :
6613 lt_cv_ld_exported_symbols_list=yes
6614 else
6615 lt_cv_ld_exported_symbols_list=no
6616 fi
6617 rm -f core conftest.err conftest.$ac_objext \
6618 conftest$ac_exeext conftest.$ac_ext
6619 LDFLAGS=$save_LDFLAGS
6620
6621 fi
6622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
6623 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
6624
6625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
6626 $as_echo_n "checking for -force_load linker flag... " >&6; }
6627 if ${lt_cv_ld_force_load+:} false; then :
6628 $as_echo_n "(cached) " >&6
6629 else
6630 lt_cv_ld_force_load=no
6631 cat > conftest.c << _LT_EOF
6632 int forced_loaded() { return 2;}
6633 _LT_EOF
6634 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
6635 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
6636 echo "$AR cr libconftest.a conftest.o" >&5
6637 $AR cr libconftest.a conftest.o 2>&5
6638 echo "$RANLIB libconftest.a" >&5
6639 $RANLIB libconftest.a 2>&5
6640 cat > conftest.c << _LT_EOF
6641 int main() { return 0;}
6642 _LT_EOF
6643 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
6644 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
6645 _lt_result=$?
6646 if test -s conftest.err && $GREP force_load conftest.err; then
6647 cat conftest.err >&5
6648 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
6649 lt_cv_ld_force_load=yes
6650 else
6651 cat conftest.err >&5
6652 fi
6653 rm -f conftest.err libconftest.a conftest conftest.c
6654 rm -rf conftest.dSYM
6655
6656 fi
6657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
6658 $as_echo "$lt_cv_ld_force_load" >&6; }
6659 case $host_os in
6660 rhapsody* | darwin1.[012])
6661 _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
6662 darwin1.*)
6663 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
6664 darwin*) # darwin 5.x on
6665 # if running on 10.5 or later, the deployment target defaults
6666 # to the OS version, if on x86, and 10.4, the deployment
6667 # target defaults to 10.4. Don't you love it?
6668 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
6669 10.0,*86*-darwin8*|10.0,*-darwin[912]*)
6670 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
6671 10.[012][,.]*)
6672 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
6673 10.*|11.*)
6674 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
6675 esac
6676 ;;
6677 esac
6678 if test yes = "$lt_cv_apple_cc_single_mod"; then
6679 _lt_dar_single_mod='$single_module'
6680 fi
6681 if test yes = "$lt_cv_ld_exported_symbols_list"; then
6682 _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
6683 else
6684 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
6685 fi
6686 if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
6687 _lt_dsymutil='~$DSYMUTIL $lib || :'
6688 else
6689 _lt_dsymutil=
6690 fi
6691 ;;
6692 esac
6693
6694 # func_munge_path_list VARIABLE PATH
6695 # -----------------------------------
6696 # VARIABLE is name of variable containing _space_ separated list of
6697 # directories to be munged by the contents of PATH, which is string
6698 # having a format:
6699 # "DIR[:DIR]:"
6700 # string "DIR[ DIR]" will be prepended to VARIABLE
6701 # ":DIR[:DIR]"
6702 # string "DIR[ DIR]" will be appended to VARIABLE
6703 # "DIRP[:DIRP]::[DIRA:]DIRA"
6704 # string "DIRP[ DIRP]" will be prepended to VARIABLE and string
6705 # "DIRA[ DIRA]" will be appended to VARIABLE
6706 # "DIR[:DIR]"
6707 # VARIABLE will be replaced by "DIR[ DIR]"
6708 func_munge_path_list ()
6709 {
6710 case x$2 in
6711 x)
6712 ;;
6713 *:)
6714 eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
6715 ;;
6716 x:*)
6717 eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
6718 ;;
6719 *::*)
6720 eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
6721 eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
6722 ;;
6723 *)
6724 eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
6725 ;;
6726 esac
6727 }
6728
6729 ac_ext=c
6730 ac_cpp='$CPP $CPPFLAGS'
6731 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6732 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6733 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
6735 $as_echo_n "checking how to run the C preprocessor... " >&6; }
6736 # On Suns, sometimes $CPP names a directory.
6737 if test -n "$CPP" && test -d "$CPP"; then
6738 CPP=
6739 fi
6740 if test -z "$CPP"; then
6741 if ${ac_cv_prog_CPP+:} false; then :
6742 $as_echo_n "(cached) " >&6
6743 else
6744 # Double quotes because CPP needs to be expanded
6745 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
6746 do
6747 ac_preproc_ok=false
6748 for ac_c_preproc_warn_flag in '' yes
6749 do
6750 # Use a header file that comes with gcc, so configuring glibc
6751 # with a fresh cross-compiler works.
6752 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6753 # <limits.h> exists even on freestanding compilers.
6754 # On the NeXT, cc -E runs the code through the compiler's parser,
6755 # not just through cpp. "Syntax error" is here to catch this case.
6756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6757 /* end confdefs.h. */
6758 #ifdef __STDC__
6759 # include <limits.h>
6760 #else
6761 # include <assert.h>
6762 #endif
6763 Syntax error
6764 _ACEOF
6765 if ac_fn_c_try_cpp "$LINENO"; then :
6766
6767 else
6768 # Broken: fails on valid input.
6769 continue
6770 fi
6771 rm -f conftest.err conftest.i conftest.$ac_ext
6772
6773 # OK, works on sane cases. Now check whether nonexistent headers
6774 # can be detected and how.
6775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6776 /* end confdefs.h. */
6777 #include <ac_nonexistent.h>
6778 _ACEOF
6779 if ac_fn_c_try_cpp "$LINENO"; then :
6780 # Broken: success on invalid input.
6781 continue
6782 else
6783 # Passes both tests.
6784 ac_preproc_ok=:
6785 break
6786 fi
6787 rm -f conftest.err conftest.i conftest.$ac_ext
6788
6789 done
6790 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6791 rm -f conftest.i conftest.err conftest.$ac_ext
6792 if $ac_preproc_ok; then :
6793 break
6794 fi
6795
6796 done
6797 ac_cv_prog_CPP=$CPP
6798
6799 fi
6800 CPP=$ac_cv_prog_CPP
6801 else
6802 ac_cv_prog_CPP=$CPP
6803 fi
6804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
6805 $as_echo "$CPP" >&6; }
6806 ac_preproc_ok=false
6807 for ac_c_preproc_warn_flag in '' yes
6808 do
6809 # Use a header file that comes with gcc, so configuring glibc
6810 # with a fresh cross-compiler works.
6811 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6812 # <limits.h> exists even on freestanding compilers.
6813 # On the NeXT, cc -E runs the code through the compiler's parser,
6814 # not just through cpp. "Syntax error" is here to catch this case.
6815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6816 /* end confdefs.h. */
6817 #ifdef __STDC__
6818 # include <limits.h>
6819 #else
6820 # include <assert.h>
6821 #endif
6822 Syntax error
6823 _ACEOF
6824 if ac_fn_c_try_cpp "$LINENO"; then :
6825
6826 else
6827 # Broken: fails on valid input.
6828 continue
6829 fi
6830 rm -f conftest.err conftest.i conftest.$ac_ext
6831
6832 # OK, works on sane cases. Now check whether nonexistent headers
6833 # can be detected and how.
6834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6835 /* end confdefs.h. */
6836 #include <ac_nonexistent.h>
6837 _ACEOF
6838 if ac_fn_c_try_cpp "$LINENO"; then :
6839 # Broken: success on invalid input.
6840 continue
6841 else
6842 # Passes both tests.
6843 ac_preproc_ok=:
6844 break
6845 fi
6846 rm -f conftest.err conftest.i conftest.$ac_ext
6847
6848 done
6849 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6850 rm -f conftest.i conftest.err conftest.$ac_ext
6851 if $ac_preproc_ok; then :
6852
6853 else
6854 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6855 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6856 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
6857 See \`config.log' for more details" "$LINENO" 5; }
6858 fi
6859
6860 ac_ext=c
6861 ac_cpp='$CPP $CPPFLAGS'
6862 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6863 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6864 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6865
6866
6867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6868 $as_echo_n "checking for ANSI C header files... " >&6; }
6869 if ${ac_cv_header_stdc+:} false; then :
6870 $as_echo_n "(cached) " >&6
6871 else
6872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6873 /* end confdefs.h. */
6874 #include <stdlib.h>
6875 #include <stdarg.h>
6876 #include <string.h>
6877 #include <float.h>
6878
6879 int
6880 main ()
6881 {
6882
6883 ;
6884 return 0;
6885 }
6886 _ACEOF
6887 if ac_fn_c_try_compile "$LINENO"; then :
6888 ac_cv_header_stdc=yes
6889 else
6890 ac_cv_header_stdc=no
6891 fi
6892 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6893
6894 if test $ac_cv_header_stdc = yes; then
6895 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6897 /* end confdefs.h. */
6898 #include <string.h>
6899
6900 _ACEOF
6901 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6902 $EGREP "memchr" >/dev/null 2>&1; then :
6903
6904 else
6905 ac_cv_header_stdc=no
6906 fi
6907 rm -f conftest*
6908
6909 fi
6910
6911 if test $ac_cv_header_stdc = yes; then
6912 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6914 /* end confdefs.h. */
6915 #include <stdlib.h>
6916
6917 _ACEOF
6918 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6919 $EGREP "free" >/dev/null 2>&1; then :
6920
6921 else
6922 ac_cv_header_stdc=no
6923 fi
6924 rm -f conftest*
6925
6926 fi
6927
6928 if test $ac_cv_header_stdc = yes; then
6929 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6930 if test "$cross_compiling" = yes; then :
6931 :
6932 else
6933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6934 /* end confdefs.h. */
6935 #include <ctype.h>
6936 #include <stdlib.h>
6937 #if ((' ' & 0x0FF) == 0x020)
6938 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6939 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6940 #else
6941 # define ISLOWER(c) \
6942 (('a' <= (c) && (c) <= 'i') \
6943 || ('j' <= (c) && (c) <= 'r') \
6944 || ('s' <= (c) && (c) <= 'z'))
6945 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6946 #endif
6947
6948 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6949 int
6950 main ()
6951 {
6952 int i;
6953 for (i = 0; i < 256; i++)
6954 if (XOR (islower (i), ISLOWER (i))
6955 || toupper (i) != TOUPPER (i))
6956 return 2;
6957 return 0;
6958 }
6959 _ACEOF
6960 if ac_fn_c_try_run "$LINENO"; then :
6961
6962 else
6963 ac_cv_header_stdc=no
6964 fi
6965 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6966 conftest.$ac_objext conftest.beam conftest.$ac_ext
6967 fi
6968
6969 fi
6970 fi
6971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6972 $as_echo "$ac_cv_header_stdc" >&6; }
6973 if test $ac_cv_header_stdc = yes; then
6974
6975 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
6976
6977 fi
6978
6979 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6980 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6981 inttypes.h stdint.h unistd.h
6982 do :
6983 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6984 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6985 "
6986 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6987 cat >>confdefs.h <<_ACEOF
6988 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6989 _ACEOF
6990
6991 fi
6992
6993 done
6994
6995
6996 for ac_header in dlfcn.h
6997 do :
6998 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
6999 "
7000 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
7001 cat >>confdefs.h <<_ACEOF
7002 #define HAVE_DLFCN_H 1
7003 _ACEOF
7004
7005 fi
7006
7007 done
7008
7009
7010
7011
7012
7013 # Set options
7014
7015
7016
7017 enable_dlopen=no
7018
7019
7020 enable_win32_dll=no
7021
7022
7023 # Check whether --enable-shared was given.
7024 if test "${enable_shared+set}" = set; then :
7025 enableval=$enable_shared; p=${PACKAGE-default}
7026 case $enableval in
7027 yes) enable_shared=yes ;;
7028 no) enable_shared=no ;;
7029 *)
7030 enable_shared=no
7031 # Look at the argument we got. We use all the common list separators.
7032 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
7033 for pkg in $enableval; do
7034 IFS=$lt_save_ifs
7035 if test "X$pkg" = "X$p"; then
7036 enable_shared=yes
7037 fi
7038 done
7039 IFS=$lt_save_ifs
7040 ;;
7041 esac
7042 else
7043 enable_shared=yes
7044 fi
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054 # Check whether --enable-static was given.
7055 if test "${enable_static+set}" = set; then :
7056 enableval=$enable_static; p=${PACKAGE-default}
7057 case $enableval in
7058 yes) enable_static=yes ;;
7059 no) enable_static=no ;;
7060 *)
7061 enable_static=no
7062 # Look at the argument we got. We use all the common list separators.
7063 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
7064 for pkg in $enableval; do
7065 IFS=$lt_save_ifs
7066 if test "X$pkg" = "X$p"; then
7067 enable_static=yes
7068 fi
7069 done
7070 IFS=$lt_save_ifs
7071 ;;
7072 esac
7073 else
7074 enable_static=yes
7075 fi
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086 # Check whether --with-pic was given.
7087 if test "${with_pic+set}" = set; then :
7088 withval=$with_pic; lt_p=${PACKAGE-default}
7089 case $withval in
7090 yes|no) pic_mode=$withval ;;
7091 *)
7092 pic_mode=default
7093 # Look at the argument we got. We use all the common list separators.
7094 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
7095 for lt_pkg in $withval; do
7096 IFS=$lt_save_ifs
7097 if test "X$lt_pkg" = "X$lt_p"; then
7098 pic_mode=yes
7099 fi
7100 done
7101 IFS=$lt_save_ifs
7102 ;;
7103 esac
7104 else
7105 pic_mode=default
7106 fi
7107
7108
7109
7110
7111
7112
7113
7114
7115 # Check whether --enable-fast-install was given.
7116 if test "${enable_fast_install+set}" = set; then :
7117 enableval=$enable_fast_install; p=${PACKAGE-default}
7118 case $enableval in
7119 yes) enable_fast_install=yes ;;
7120 no) enable_fast_install=no ;;
7121 *)
7122 enable_fast_install=no
7123 # Look at the argument we got. We use all the common list separators.
7124 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
7125 for pkg in $enableval; do
7126 IFS=$lt_save_ifs
7127 if test "X$pkg" = "X$p"; then
7128 enable_fast_install=yes
7129 fi
7130 done
7131 IFS=$lt_save_ifs
7132 ;;
7133 esac
7134 else
7135 enable_fast_install=yes
7136 fi
7137
7138
7139
7140
7141
7142
7143
7144
7145 shared_archive_member_spec=
7146 case $host,$enable_shared in
7147 power*-*-aix[5-9]*,yes)
7148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
7149 $as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
7150
7151 # Check whether --with-aix-soname was given.
7152 if test "${with_aix_soname+set}" = set; then :
7153 withval=$with_aix_soname; case $withval in
7154 aix|svr4|both)
7155 ;;
7156 *)
7157 as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
7158 ;;
7159 esac
7160 lt_cv_with_aix_soname=$with_aix_soname
7161 else
7162 if ${lt_cv_with_aix_soname+:} false; then :
7163 $as_echo_n "(cached) " >&6
7164 else
7165 lt_cv_with_aix_soname=aix
7166 fi
7167
7168 with_aix_soname=$lt_cv_with_aix_soname
7169 fi
7170
7171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
7172 $as_echo "$with_aix_soname" >&6; }
7173 if test aix != "$with_aix_soname"; then
7174 # For the AIX way of multilib, we name the shared archive member
7175 # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
7176 # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
7177 # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
7178 # the AIX toolchain works better with OBJECT_MODE set (default 32).
7179 if test 64 = "${OBJECT_MODE-32}"; then
7180 shared_archive_member_spec=shr_64
7181 else
7182 shared_archive_member_spec=shr
7183 fi
7184 fi
7185 ;;
7186 *)
7187 with_aix_soname=aix
7188 ;;
7189 esac
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200 # This can be used to rebuild libtool when needed
7201 LIBTOOL_DEPS=$ltmain
7202
7203 # Always use our own libtool.
7204 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235 test -z "$LN_S" && LN_S="ln -s"
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250 if test -n "${ZSH_VERSION+set}"; then
7251 setopt NO_GLOB_SUBST
7252 fi
7253
7254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
7255 $as_echo_n "checking for objdir... " >&6; }
7256 if ${lt_cv_objdir+:} false; then :
7257 $as_echo_n "(cached) " >&6
7258 else
7259 rm -f .libs 2>/dev/null
7260 mkdir .libs 2>/dev/null
7261 if test -d .libs; then
7262 lt_cv_objdir=.libs
7263 else
7264 # MS-DOS does not allow filenames that begin with a dot.
7265 lt_cv_objdir=_libs
7266 fi
7267 rmdir .libs 2>/dev/null
7268 fi
7269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
7270 $as_echo "$lt_cv_objdir" >&6; }
7271 objdir=$lt_cv_objdir
7272
7273
7274
7275
7276
7277 cat >>confdefs.h <<_ACEOF
7278 #define LT_OBJDIR "$lt_cv_objdir/"
7279 _ACEOF
7280
7281
7282
7283
7284 case $host_os in
7285 aix3*)
7286 # AIX sometimes has problems with the GCC collect2 program. For some
7287 # reason, if we set the COLLECT_NAMES environment variable, the problems
7288 # vanish in a puff of smoke.
7289 if test set != "${COLLECT_NAMES+set}"; then
7290 COLLECT_NAMES=
7291 export COLLECT_NAMES
7292 fi
7293 ;;
7294 esac
7295
7296 # Global variables:
7297 ofile=libtool
7298 can_build_shared=yes
7299
7300 # All known linkers require a '.a' archive for static linking (except MSVC,
7301 # which needs '.lib').
7302 libext=a
7303
7304 with_gnu_ld=$lt_cv_prog_gnu_ld
7305
7306 old_CC=$CC
7307 old_CFLAGS=$CFLAGS
7308
7309 # Set sane defaults for various variables
7310 test -z "$CC" && CC=cc
7311 test -z "$LTCC" && LTCC=$CC
7312 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
7313 test -z "$LD" && LD=ld
7314 test -z "$ac_objext" && ac_objext=o
7315
7316 func_cc_basename $compiler
7317 cc_basename=$func_cc_basename_result
7318
7319
7320 # Only perform the check for file, if the check method requires it
7321 test -z "$MAGIC_CMD" && MAGIC_CMD=file
7322 case $deplibs_check_method in
7323 file_magic*)
7324 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
7325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
7326 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
7327 if ${lt_cv_path_MAGIC_CMD+:} false; then :
7328 $as_echo_n "(cached) " >&6
7329 else
7330 case $MAGIC_CMD in
7331 [\\/*] | ?:[\\/]*)
7332 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
7333 ;;
7334 *)
7335 lt_save_MAGIC_CMD=$MAGIC_CMD
7336 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7337 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
7338 for ac_dir in $ac_dummy; do
7339 IFS=$lt_save_ifs
7340 test -z "$ac_dir" && ac_dir=.
7341 if test -f "$ac_dir/${ac_tool_prefix}file"; then
7342 lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
7343 if test -n "$file_magic_test_file"; then
7344 case $deplibs_check_method in
7345 "file_magic "*)
7346 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
7347 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
7348 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
7349 $EGREP "$file_magic_regex" > /dev/null; then
7350 :
7351 else
7352 cat <<_LT_EOF 1>&2
7353
7354 *** Warning: the command libtool uses to detect shared libraries,
7355 *** $file_magic_cmd, produces output that libtool cannot recognize.
7356 *** The result is that libtool may fail to recognize shared libraries
7357 *** as such. This will affect the creation of libtool libraries that
7358 *** depend on shared libraries, but programs linked with such libtool
7359 *** libraries will work regardless of this problem. Nevertheless, you
7360 *** may want to report the problem to your system manager and/or to
7361 *** bug-libtool@gnu.org
7362
7363 _LT_EOF
7364 fi ;;
7365 esac
7366 fi
7367 break
7368 fi
7369 done
7370 IFS=$lt_save_ifs
7371 MAGIC_CMD=$lt_save_MAGIC_CMD
7372 ;;
7373 esac
7374 fi
7375
7376 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
7377 if test -n "$MAGIC_CMD"; then
7378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
7379 $as_echo "$MAGIC_CMD" >&6; }
7380 else
7381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7382 $as_echo "no" >&6; }
7383 fi
7384
7385
7386
7387
7388
7389 if test -z "$lt_cv_path_MAGIC_CMD"; then
7390 if test -n "$ac_tool_prefix"; then
7391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
7392 $as_echo_n "checking for file... " >&6; }
7393 if ${lt_cv_path_MAGIC_CMD+:} false; then :
7394 $as_echo_n "(cached) " >&6
7395 else
7396 case $MAGIC_CMD in
7397 [\\/*] | ?:[\\/]*)
7398 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
7399 ;;
7400 *)
7401 lt_save_MAGIC_CMD=$MAGIC_CMD
7402 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7403 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
7404 for ac_dir in $ac_dummy; do
7405 IFS=$lt_save_ifs
7406 test -z "$ac_dir" && ac_dir=.
7407 if test -f "$ac_dir/file"; then
7408 lt_cv_path_MAGIC_CMD=$ac_dir/"file"
7409 if test -n "$file_magic_test_file"; then
7410 case $deplibs_check_method in
7411 "file_magic "*)
7412 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
7413 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
7414 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
7415 $EGREP "$file_magic_regex" > /dev/null; then
7416 :
7417 else
7418 cat <<_LT_EOF 1>&2
7419
7420 *** Warning: the command libtool uses to detect shared libraries,
7421 *** $file_magic_cmd, produces output that libtool cannot recognize.
7422 *** The result is that libtool may fail to recognize shared libraries
7423 *** as such. This will affect the creation of libtool libraries that
7424 *** depend on shared libraries, but programs linked with such libtool
7425 *** libraries will work regardless of this problem. Nevertheless, you
7426 *** may want to report the problem to your system manager and/or to
7427 *** bug-libtool@gnu.org
7428
7429 _LT_EOF
7430 fi ;;
7431 esac
7432 fi
7433 break
7434 fi
7435 done
7436 IFS=$lt_save_ifs
7437 MAGIC_CMD=$lt_save_MAGIC_CMD
7438 ;;
7439 esac
7440 fi
7441
7442 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
7443 if test -n "$MAGIC_CMD"; then
7444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
7445 $as_echo "$MAGIC_CMD" >&6; }
7446 else
7447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7448 $as_echo "no" >&6; }
7449 fi
7450
7451
7452 else
7453 MAGIC_CMD=:
7454 fi
7455 fi
7456
7457 fi
7458 ;;
7459 esac
7460
7461 # Use C for the default configuration in the libtool script
7462
7463 lt_save_CC=$CC
7464 ac_ext=c
7465 ac_cpp='$CPP $CPPFLAGS'
7466 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7467 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7468 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7469
7470
7471 # Source file extension for C test sources.
7472 ac_ext=c
7473
7474 # Object file extension for compiled C test sources.
7475 objext=o
7476 objext=$objext
7477
7478 # Code to be used in simple compile tests
7479 lt_simple_compile_test_code="int some_variable = 0;"
7480
7481 # Code to be used in simple link tests
7482 lt_simple_link_test_code='int main(){return(0);}'
7483
7484
7485
7486
7487
7488
7489
7490 # If no C compiler was specified, use CC.
7491 LTCC=${LTCC-"$CC"}
7492
7493 # If no C compiler flags were specified, use CFLAGS.
7494 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
7495
7496 # Allow CC to be a program name with arguments.
7497 compiler=$CC
7498
7499 # Save the default compiler, since it gets overwritten when the other
7500 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
7501 compiler_DEFAULT=$CC
7502
7503 # save warnings/boilerplate of simple test code
7504 ac_outfile=conftest.$ac_objext
7505 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
7506 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
7507 _lt_compiler_boilerplate=`cat conftest.err`
7508 $RM conftest*
7509
7510 ac_outfile=conftest.$ac_objext
7511 echo "$lt_simple_link_test_code" >conftest.$ac_ext
7512 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
7513 _lt_linker_boilerplate=`cat conftest.err`
7514 $RM -r conftest*
7515
7516
7517 ## CAVEAT EMPTOR:
7518 ## There is no encapsulation within the following macros, do not change
7519 ## the running order or otherwise move them around unless you know exactly
7520 ## what you are doing...
7521 if test -n "$compiler"; then
7522
7523 lt_prog_compiler_no_builtin_flag=
7524
7525 if test yes = "$GCC"; then
7526 case $cc_basename in
7527 nvcc*)
7528 lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
7529 *)
7530 lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
7531 esac
7532
7533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
7534 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
7535 if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
7536 $as_echo_n "(cached) " >&6
7537 else
7538 lt_cv_prog_compiler_rtti_exceptions=no
7539 ac_outfile=conftest.$ac_objext
7540 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
7541 lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment
7542 # Insert the option either (1) after the last *FLAGS variable, or
7543 # (2) before a word containing "conftest.", or (3) at the end.
7544 # Note that $ac_compile itself does not contain backslashes and begins
7545 # with a dollar sign (not a hyphen), so the echo should work correctly.
7546 # The option is referenced via a variable to avoid confusing sed.
7547 lt_compile=`echo "$ac_compile" | $SED \
7548 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7549 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7550 -e 's:$: $lt_compiler_flag:'`
7551 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
7552 (eval "$lt_compile" 2>conftest.err)
7553 ac_status=$?
7554 cat conftest.err >&5
7555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7556 if (exit $ac_status) && test -s "$ac_outfile"; then
7557 # The compiler can only warn and ignore the option if not recognized
7558 # So say no if there are warnings other than the usual output.
7559 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
7560 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
7561 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
7562 lt_cv_prog_compiler_rtti_exceptions=yes
7563 fi
7564 fi
7565 $RM conftest*
7566
7567 fi
7568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
7569 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
7570
7571 if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
7572 lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
7573 else
7574 :
7575 fi
7576
7577 fi
7578
7579
7580
7581
7582
7583
7584 lt_prog_compiler_wl=
7585 lt_prog_compiler_pic=
7586 lt_prog_compiler_static=
7587
7588
7589 if test yes = "$GCC"; then
7590 lt_prog_compiler_wl='-Wl,'
7591 lt_prog_compiler_static='-static'
7592
7593 case $host_os in
7594 aix*)
7595 # All AIX code is PIC.
7596 if test ia64 = "$host_cpu"; then
7597 # AIX 5 now supports IA64 processor
7598 lt_prog_compiler_static='-Bstatic'
7599 fi
7600 lt_prog_compiler_pic='-fPIC'
7601 ;;
7602
7603 amigaos*)
7604 case $host_cpu in
7605 powerpc)
7606 # see comment about AmigaOS4 .so support
7607 lt_prog_compiler_pic='-fPIC'
7608 ;;
7609 m68k)
7610 # FIXME: we need at least 68020 code to build shared libraries, but
7611 # adding the '-m68020' flag to GCC prevents building anything better,
7612 # like '-m68040'.
7613 lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
7614 ;;
7615 esac
7616 ;;
7617
7618 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
7619 # PIC is the default for these OSes.
7620 ;;
7621
7622 mingw* | cygwin* | pw32* | os2* | cegcc*)
7623 # This hack is so that the source file can tell whether it is being
7624 # built for inclusion in a dll (and should export symbols for example).
7625 # Although the cygwin gcc ignores -fPIC, still need this for old-style
7626 # (--disable-auto-import) libraries
7627 lt_prog_compiler_pic='-DDLL_EXPORT'
7628 case $host_os in
7629 os2*)
7630 lt_prog_compiler_static='$wl-static'
7631 ;;
7632 esac
7633 ;;
7634
7635 darwin* | rhapsody*)
7636 # PIC is the default on this platform
7637 # Common symbols not allowed in MH_DYLIB files
7638 lt_prog_compiler_pic='-fno-common'
7639 ;;
7640
7641 haiku*)
7642 # PIC is the default for Haiku.
7643 # The "-static" flag exists, but is broken.
7644 lt_prog_compiler_static=
7645 ;;
7646
7647 hpux*)
7648 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
7649 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
7650 # sets the default TLS model and affects inlining.
7651 case $host_cpu in
7652 hppa*64*)
7653 # +Z the default
7654 ;;
7655 *)
7656 lt_prog_compiler_pic='-fPIC'
7657 ;;
7658 esac
7659 ;;
7660
7661 interix[3-9]*)
7662 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
7663 # Instead, we relocate shared libraries at runtime.
7664 ;;
7665
7666 msdosdjgpp*)
7667 # Just because we use GCC doesn't mean we suddenly get shared libraries
7668 # on systems that don't support them.
7669 lt_prog_compiler_can_build_shared=no
7670 enable_shared=no
7671 ;;
7672
7673 *nto* | *qnx*)
7674 # QNX uses GNU C++, but need to define -shared option too, otherwise
7675 # it will coredump.
7676 lt_prog_compiler_pic='-fPIC -shared'
7677 ;;
7678
7679 sysv4*MP*)
7680 if test -d /usr/nec; then
7681 lt_prog_compiler_pic=-Kconform_pic
7682 fi
7683 ;;
7684
7685 *)
7686 lt_prog_compiler_pic='-fPIC'
7687 ;;
7688 esac
7689
7690 case $cc_basename in
7691 nvcc*) # Cuda Compiler Driver 2.2
7692 lt_prog_compiler_wl='-Xlinker '
7693 if test -n "$lt_prog_compiler_pic"; then
7694 lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
7695 fi
7696 ;;
7697 esac
7698 else
7699 # PORTME Check for flag to pass linker flags through the system compiler.
7700 case $host_os in
7701 aix*)
7702 lt_prog_compiler_wl='-Wl,'
7703 if test ia64 = "$host_cpu"; then
7704 # AIX 5 now supports IA64 processor
7705 lt_prog_compiler_static='-Bstatic'
7706 else
7707 lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
7708 fi
7709 ;;
7710
7711 darwin* | rhapsody*)
7712 # PIC is the default on this platform
7713 # Common symbols not allowed in MH_DYLIB files
7714 lt_prog_compiler_pic='-fno-common'
7715 case $cc_basename in
7716 nagfor*)
7717 # NAG Fortran compiler
7718 lt_prog_compiler_wl='-Wl,-Wl,,'
7719 lt_prog_compiler_pic='-PIC'
7720 lt_prog_compiler_static='-Bstatic'
7721 ;;
7722 esac
7723 ;;
7724
7725 mingw* | cygwin* | pw32* | os2* | cegcc*)
7726 # This hack is so that the source file can tell whether it is being
7727 # built for inclusion in a dll (and should export symbols for example).
7728 lt_prog_compiler_pic='-DDLL_EXPORT'
7729 case $host_os in
7730 os2*)
7731 lt_prog_compiler_static='$wl-static'
7732 ;;
7733 esac
7734 ;;
7735
7736 hpux9* | hpux10* | hpux11*)
7737 lt_prog_compiler_wl='-Wl,'
7738 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
7739 # not for PA HP-UX.
7740 case $host_cpu in
7741 hppa*64*|ia64*)
7742 # +Z the default
7743 ;;
7744 *)
7745 lt_prog_compiler_pic='+Z'
7746 ;;
7747 esac
7748 # Is there a better lt_prog_compiler_static that works with the bundled CC?
7749 lt_prog_compiler_static='$wl-a ${wl}archive'
7750 ;;
7751
7752 irix5* | irix6* | nonstopux*)
7753 lt_prog_compiler_wl='-Wl,'
7754 # PIC (with -KPIC) is the default.
7755 lt_prog_compiler_static='-non_shared'
7756 ;;
7757
7758 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
7759 case $cc_basename in
7760 # old Intel for x86_64, which still supported -KPIC.
7761 ecc*)
7762 lt_prog_compiler_wl='-Wl,'
7763 lt_prog_compiler_pic='-KPIC'
7764 lt_prog_compiler_static='-static'
7765 ;;
7766 # flang / f18. f95 an alias for gfortran or flang on Debian
7767 flang* | f18* | f95*)
7768 lt_prog_compiler_wl='-Wl,'
7769 lt_prog_compiler_pic='-fPIC'
7770 lt_prog_compiler_static='-static'
7771 ;;
7772 # icc used to be incompatible with GCC.
7773 # ICC 10 doesn't accept -KPIC any more.
7774 icc* | ifort*)
7775 lt_prog_compiler_wl='-Wl,'
7776 lt_prog_compiler_pic='-fPIC'
7777 lt_prog_compiler_static='-static'
7778 ;;
7779 # Lahey Fortran 8.1.
7780 lf95*)
7781 lt_prog_compiler_wl='-Wl,'
7782 lt_prog_compiler_pic='--shared'
7783 lt_prog_compiler_static='--static'
7784 ;;
7785 nagfor*)
7786 # NAG Fortran compiler
7787 lt_prog_compiler_wl='-Wl,-Wl,,'
7788 lt_prog_compiler_pic='-PIC'
7789 lt_prog_compiler_static='-Bstatic'
7790 ;;
7791 tcc*)
7792 # Fabrice Bellard et al's Tiny C Compiler
7793 lt_prog_compiler_wl='-Wl,'
7794 lt_prog_compiler_pic='-fPIC'
7795 lt_prog_compiler_static='-static'
7796 ;;
7797 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
7798 # Portland Group compilers (*not* the Pentium gcc compiler,
7799 # which looks to be a dead project)
7800 lt_prog_compiler_wl='-Wl,'
7801 lt_prog_compiler_pic='-fpic'
7802 lt_prog_compiler_static='-Bstatic'
7803 ;;
7804 ccc*)
7805 lt_prog_compiler_wl='-Wl,'
7806 # All Alpha code is PIC.
7807 lt_prog_compiler_static='-non_shared'
7808 ;;
7809 xl* | bgxl* | bgf* | mpixl*)
7810 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
7811 lt_prog_compiler_wl='-Wl,'
7812 lt_prog_compiler_pic='-qpic'
7813 lt_prog_compiler_static='-qstaticlink'
7814 ;;
7815 *)
7816 case `$CC -V 2>&1 | sed 5q` in
7817 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
7818 # Sun Fortran 8.3 passes all unrecognized flags to the linker
7819 lt_prog_compiler_pic='-KPIC'
7820 lt_prog_compiler_static='-Bstatic'
7821 lt_prog_compiler_wl=''
7822 ;;
7823 *Sun\ F* | *Sun*Fortran*)
7824 lt_prog_compiler_pic='-KPIC'
7825 lt_prog_compiler_static='-Bstatic'
7826 lt_prog_compiler_wl='-Qoption ld '
7827 ;;
7828 *Sun\ C*)
7829 # Sun C 5.9
7830 lt_prog_compiler_pic='-KPIC'
7831 lt_prog_compiler_static='-Bstatic'
7832 lt_prog_compiler_wl='-Wl,'
7833 ;;
7834 *Intel*\ [CF]*Compiler*)
7835 lt_prog_compiler_wl='-Wl,'
7836 lt_prog_compiler_pic='-fPIC'
7837 lt_prog_compiler_static='-static'
7838 ;;
7839 *Portland\ Group*)
7840 lt_prog_compiler_wl='-Wl,'
7841 lt_prog_compiler_pic='-fpic'
7842 lt_prog_compiler_static='-Bstatic'
7843 ;;
7844 esac
7845 ;;
7846 esac
7847 ;;
7848
7849 newsos6)
7850 lt_prog_compiler_pic='-KPIC'
7851 lt_prog_compiler_static='-Bstatic'
7852 ;;
7853
7854 *nto* | *qnx*)
7855 # QNX uses GNU C++, but need to define -shared option too, otherwise
7856 # it will coredump.
7857 lt_prog_compiler_pic='-fPIC -shared'
7858 ;;
7859
7860 osf3* | osf4* | osf5*)
7861 lt_prog_compiler_wl='-Wl,'
7862 # All OSF/1 code is PIC.
7863 lt_prog_compiler_static='-non_shared'
7864 ;;
7865
7866 rdos*)
7867 lt_prog_compiler_static='-non_shared'
7868 ;;
7869
7870 solaris*)
7871 lt_prog_compiler_pic='-KPIC'
7872 lt_prog_compiler_static='-Bstatic'
7873 case $cc_basename in
7874 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
7875 lt_prog_compiler_wl='-Qoption ld ';;
7876 *)
7877 lt_prog_compiler_wl='-Wl,';;
7878 esac
7879 ;;
7880
7881 sunos4*)
7882 lt_prog_compiler_wl='-Qoption ld '
7883 lt_prog_compiler_pic='-PIC'
7884 lt_prog_compiler_static='-Bstatic'
7885 ;;
7886
7887 sysv4 | sysv4.2uw2* | sysv4.3*)
7888 lt_prog_compiler_wl='-Wl,'
7889 lt_prog_compiler_pic='-KPIC'
7890 lt_prog_compiler_static='-Bstatic'
7891 ;;
7892
7893 sysv4*MP*)
7894 if test -d /usr/nec; then
7895 lt_prog_compiler_pic='-Kconform_pic'
7896 lt_prog_compiler_static='-Bstatic'
7897 fi
7898 ;;
7899
7900 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
7901 lt_prog_compiler_wl='-Wl,'
7902 lt_prog_compiler_pic='-KPIC'
7903 lt_prog_compiler_static='-Bstatic'
7904 ;;
7905
7906 unicos*)
7907 lt_prog_compiler_wl='-Wl,'
7908 lt_prog_compiler_can_build_shared=no
7909 ;;
7910
7911 uts4*)
7912 lt_prog_compiler_pic='-pic'
7913 lt_prog_compiler_static='-Bstatic'
7914 ;;
7915
7916 *)
7917 lt_prog_compiler_can_build_shared=no
7918 ;;
7919 esac
7920 fi
7921
7922 case $host_os in
7923 # For platforms that do not support PIC, -DPIC is meaningless:
7924 *djgpp*)
7925 lt_prog_compiler_pic=
7926 ;;
7927 *)
7928 lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
7929 ;;
7930 esac
7931
7932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
7933 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
7934 if ${lt_cv_prog_compiler_pic+:} false; then :
7935 $as_echo_n "(cached) " >&6
7936 else
7937 lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
7938 fi
7939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
7940 $as_echo "$lt_cv_prog_compiler_pic" >&6; }
7941 lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
7942
7943 #
7944 # Check to make sure the PIC flag actually works.
7945 #
7946 if test -n "$lt_prog_compiler_pic"; then
7947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
7948 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
7949 if ${lt_cv_prog_compiler_pic_works+:} false; then :
7950 $as_echo_n "(cached) " >&6
7951 else
7952 lt_cv_prog_compiler_pic_works=no
7953 ac_outfile=conftest.$ac_objext
7954 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
7955 lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment
7956 # Insert the option either (1) after the last *FLAGS variable, or
7957 # (2) before a word containing "conftest.", or (3) at the end.
7958 # Note that $ac_compile itself does not contain backslashes and begins
7959 # with a dollar sign (not a hyphen), so the echo should work correctly.
7960 # The option is referenced via a variable to avoid confusing sed.
7961 lt_compile=`echo "$ac_compile" | $SED \
7962 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7963 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7964 -e 's:$: $lt_compiler_flag:'`
7965 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
7966 (eval "$lt_compile" 2>conftest.err)
7967 ac_status=$?
7968 cat conftest.err >&5
7969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7970 if (exit $ac_status) && test -s "$ac_outfile"; then
7971 # The compiler can only warn and ignore the option if not recognized
7972 # So say no if there are warnings other than the usual output.
7973 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
7974 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
7975 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
7976 lt_cv_prog_compiler_pic_works=yes
7977 fi
7978 fi
7979 $RM conftest*
7980
7981 fi
7982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
7983 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
7984
7985 if test yes = "$lt_cv_prog_compiler_pic_works"; then
7986 case $lt_prog_compiler_pic in
7987 "" | " "*) ;;
7988 *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
7989 esac
7990 else
7991 lt_prog_compiler_pic=
7992 lt_prog_compiler_can_build_shared=no
7993 fi
7994
7995 fi
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007 #
8008 # Check to make sure the static flag actually works.
8009 #
8010 wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
8011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
8012 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
8013 if ${lt_cv_prog_compiler_static_works+:} false; then :
8014 $as_echo_n "(cached) " >&6
8015 else
8016 lt_cv_prog_compiler_static_works=no
8017 save_LDFLAGS=$LDFLAGS
8018 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
8019 echo "$lt_simple_link_test_code" > conftest.$ac_ext
8020 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
8021 # The linker can only warn and ignore the option if not recognized
8022 # So say no if there are warnings
8023 if test -s conftest.err; then
8024 # Append any errors to the config.log.
8025 cat conftest.err 1>&5
8026 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
8027 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
8028 if diff conftest.exp conftest.er2 >/dev/null; then
8029 lt_cv_prog_compiler_static_works=yes
8030 fi
8031 else
8032 lt_cv_prog_compiler_static_works=yes
8033 fi
8034 fi
8035 $RM -r conftest*
8036 LDFLAGS=$save_LDFLAGS
8037
8038 fi
8039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
8040 $as_echo "$lt_cv_prog_compiler_static_works" >&6; }
8041
8042 if test yes = "$lt_cv_prog_compiler_static_works"; then
8043 :
8044 else
8045 lt_prog_compiler_static=
8046 fi
8047
8048
8049
8050
8051
8052
8053
8054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
8055 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
8056 if ${lt_cv_prog_compiler_c_o+:} false; then :
8057 $as_echo_n "(cached) " >&6
8058 else
8059 lt_cv_prog_compiler_c_o=no
8060 $RM -r conftest 2>/dev/null
8061 mkdir conftest
8062 cd conftest
8063 mkdir out
8064 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
8065
8066 lt_compiler_flag="-o out/conftest2.$ac_objext"
8067 # Insert the option either (1) after the last *FLAGS variable, or
8068 # (2) before a word containing "conftest.", or (3) at the end.
8069 # Note that $ac_compile itself does not contain backslashes and begins
8070 # with a dollar sign (not a hyphen), so the echo should work correctly.
8071 lt_compile=`echo "$ac_compile" | $SED \
8072 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8073 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8074 -e 's:$: $lt_compiler_flag:'`
8075 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
8076 (eval "$lt_compile" 2>out/conftest.err)
8077 ac_status=$?
8078 cat out/conftest.err >&5
8079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8080 if (exit $ac_status) && test -s out/conftest2.$ac_objext
8081 then
8082 # The compiler can only warn and ignore the option if not recognized
8083 # So say no if there are warnings
8084 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
8085 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
8086 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
8087 lt_cv_prog_compiler_c_o=yes
8088 fi
8089 fi
8090 chmod u+w . 2>&5
8091 $RM conftest*
8092 # SGI C++ compiler will create directory out/ii_files/ for
8093 # template instantiation
8094 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
8095 $RM out/* && rmdir out
8096 cd ..
8097 $RM -r conftest
8098 $RM conftest*
8099
8100 fi
8101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
8102 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
8103
8104
8105
8106
8107
8108
8109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
8110 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
8111 if ${lt_cv_prog_compiler_c_o+:} false; then :
8112 $as_echo_n "(cached) " >&6
8113 else
8114 lt_cv_prog_compiler_c_o=no
8115 $RM -r conftest 2>/dev/null
8116 mkdir conftest
8117 cd conftest
8118 mkdir out
8119 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
8120
8121 lt_compiler_flag="-o out/conftest2.$ac_objext"
8122 # Insert the option either (1) after the last *FLAGS variable, or
8123 # (2) before a word containing "conftest.", or (3) at the end.
8124 # Note that $ac_compile itself does not contain backslashes and begins
8125 # with a dollar sign (not a hyphen), so the echo should work correctly.
8126 lt_compile=`echo "$ac_compile" | $SED \
8127 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8128 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8129 -e 's:$: $lt_compiler_flag:'`
8130 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
8131 (eval "$lt_compile" 2>out/conftest.err)
8132 ac_status=$?
8133 cat out/conftest.err >&5
8134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8135 if (exit $ac_status) && test -s out/conftest2.$ac_objext
8136 then
8137 # The compiler can only warn and ignore the option if not recognized
8138 # So say no if there are warnings
8139 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
8140 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
8141 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
8142 lt_cv_prog_compiler_c_o=yes
8143 fi
8144 fi
8145 chmod u+w . 2>&5
8146 $RM conftest*
8147 # SGI C++ compiler will create directory out/ii_files/ for
8148 # template instantiation
8149 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
8150 $RM out/* && rmdir out
8151 cd ..
8152 $RM -r conftest
8153 $RM conftest*
8154
8155 fi
8156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
8157 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
8158
8159
8160
8161
8162 hard_links=nottested
8163 if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
8164 # do not overwrite the value of need_locks provided by the user
8165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
8166 $as_echo_n "checking if we can lock with hard links... " >&6; }
8167 hard_links=yes
8168 $RM conftest*
8169 ln conftest.a conftest.b 2>/dev/null && hard_links=no
8170 touch conftest.a
8171 ln conftest.a conftest.b 2>&5 || hard_links=no
8172 ln conftest.a conftest.b 2>/dev/null && hard_links=no
8173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
8174 $as_echo "$hard_links" >&6; }
8175 if test no = "$hard_links"; then
8176 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
8177 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
8178 need_locks=warn
8179 fi
8180 else
8181 need_locks=no
8182 fi
8183
8184
8185
8186
8187
8188
8189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
8190 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
8191
8192 runpath_var=
8193 allow_undefined_flag=
8194 always_export_symbols=no
8195 archive_cmds=
8196 archive_expsym_cmds=
8197 compiler_needs_object=no
8198 enable_shared_with_static_runtimes=no
8199 export_dynamic_flag_spec=
8200 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
8201 hardcode_automatic=no
8202 hardcode_direct=no
8203 hardcode_direct_absolute=no
8204 hardcode_libdir_flag_spec=
8205 hardcode_libdir_separator=
8206 hardcode_minus_L=no
8207 hardcode_shlibpath_var=unsupported
8208 inherit_rpath=no
8209 link_all_deplibs=unknown
8210 module_cmds=
8211 module_expsym_cmds=
8212 old_archive_from_new_cmds=
8213 old_archive_from_expsyms_cmds=
8214 thread_safe_flag_spec=
8215 whole_archive_flag_spec=
8216 # include_expsyms should be a list of space-separated symbols to be *always*
8217 # included in the symbol list
8218 include_expsyms=
8219 # exclude_expsyms can be an extended regexp of symbols to exclude
8220 # it will be wrapped by ' (' and ')$', so one must not match beginning or
8221 # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
8222 # as well as any symbol that contains 'd'.
8223 exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
8224 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
8225 # platforms (ab)use it in PIC code, but their linkers get confused if
8226 # the symbol is explicitly referenced. Since portable code cannot
8227 # rely on this symbol name, it's probably fine to never include it in
8228 # preloaded symbol tables.
8229 # Exclude shared library initialization/finalization symbols.
8230 extract_expsyms_cmds=
8231
8232 case $host_os in
8233 cygwin* | mingw* | pw32* | cegcc*)
8234 # FIXME: the MSVC++ port hasn't been tested in a loooong time
8235 # When not using gcc, we currently assume that we are using
8236 # Microsoft Visual C++.
8237 if test yes != "$GCC"; then
8238 with_gnu_ld=no
8239 fi
8240 ;;
8241 interix*)
8242 # we just hope/assume this is gcc and not c89 (= MSVC++)
8243 with_gnu_ld=yes
8244 ;;
8245 openbsd* | bitrig*)
8246 with_gnu_ld=no
8247 ;;
8248 linux* | k*bsd*-gnu | gnu*)
8249 link_all_deplibs=no
8250 ;;
8251 esac
8252
8253 ld_shlibs=yes
8254
8255 # On some targets, GNU ld is compatible enough with the native linker
8256 # that we're better off using the native interface for both.
8257 lt_use_gnu_ld_interface=no
8258 if test yes = "$with_gnu_ld"; then
8259 case $host_os in
8260 aix*)
8261 # The AIX port of GNU ld has always aspired to compatibility
8262 # with the native linker. However, as the warning in the GNU ld
8263 # block says, versions before 2.19.5* couldn't really create working
8264 # shared libraries, regardless of the interface used.
8265 case `$LD -v 2>&1` in
8266 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
8267 *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
8268 *\ \(GNU\ Binutils\)\ [3-9]*) ;;
8269 *)
8270 lt_use_gnu_ld_interface=yes
8271 ;;
8272 esac
8273 ;;
8274 *)
8275 lt_use_gnu_ld_interface=yes
8276 ;;
8277 esac
8278 fi
8279
8280 if test yes = "$lt_use_gnu_ld_interface"; then
8281 # If archive_cmds runs LD, not CC, wlarc should be empty
8282 wlarc='$wl'
8283
8284 # Set some defaults for GNU ld with shared library support. These
8285 # are reset later if shared libraries are not supported. Putting them
8286 # here allows them to be overridden if necessary.
8287 runpath_var=LD_RUN_PATH
8288 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
8289 export_dynamic_flag_spec='$wl--export-dynamic'
8290 # ancient GNU ld didn't support --whole-archive et. al.
8291 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
8292 whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
8293 else
8294 whole_archive_flag_spec=
8295 fi
8296 supports_anon_versioning=no
8297 case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
8298 *GNU\ gold*) supports_anon_versioning=yes ;;
8299 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
8300 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
8301 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
8302 *\ 2.11.*) ;; # other 2.11 versions
8303 *) supports_anon_versioning=yes ;;
8304 esac
8305
8306 # See if GNU ld supports shared libraries.
8307 case $host_os in
8308 aix[3-9]*)
8309 # On AIX/PPC, the GNU linker is very broken
8310 if test ia64 != "$host_cpu"; then
8311 ld_shlibs=no
8312 cat <<_LT_EOF 1>&2
8313
8314 *** Warning: the GNU linker, at least up to release 2.19, is reported
8315 *** to be unable to reliably create shared libraries on AIX.
8316 *** Therefore, libtool is disabling shared libraries support. If you
8317 *** really care for shared libraries, you may want to install binutils
8318 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
8319 *** You will then need to restart the configuration process.
8320
8321 _LT_EOF
8322 fi
8323 ;;
8324
8325 amigaos*)
8326 case $host_cpu in
8327 powerpc)
8328 # see comment about AmigaOS4 .so support
8329 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8330 archive_expsym_cmds=''
8331 ;;
8332 m68k)
8333 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)'
8334 hardcode_libdir_flag_spec='-L$libdir'
8335 hardcode_minus_L=yes
8336 ;;
8337 esac
8338 ;;
8339
8340 beos*)
8341 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
8342 allow_undefined_flag=unsupported
8343 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
8344 # support --undefined. This deserves some investigation. FIXME
8345 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8346 else
8347 ld_shlibs=no
8348 fi
8349 ;;
8350
8351 cygwin* | mingw* | pw32* | cegcc*)
8352 # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
8353 # as there is no search path for DLLs.
8354 hardcode_libdir_flag_spec='-L$libdir'
8355 export_dynamic_flag_spec='$wl--export-all-symbols'
8356 allow_undefined_flag=unsupported
8357 always_export_symbols=no
8358 enable_shared_with_static_runtimes=yes
8359 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'
8360 exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
8361
8362 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
8363 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
8364 # If the export-symbols file already is a .def file, use it as
8365 # is; otherwise, prepend EXPORTS...
8366 archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
8367 cp $export_symbols $output_objdir/$soname.def;
8368 else
8369 echo EXPORTS > $output_objdir/$soname.def;
8370 cat $export_symbols >> $output_objdir/$soname.def;
8371 fi~
8372 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
8373 else
8374 ld_shlibs=no
8375 fi
8376 ;;
8377
8378 haiku*)
8379 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8380 link_all_deplibs=yes
8381 ;;
8382
8383 os2*)
8384 hardcode_libdir_flag_spec='-L$libdir'
8385 hardcode_minus_L=yes
8386 allow_undefined_flag=unsupported
8387 shrext_cmds=.dll
8388 archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
8389 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
8390 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
8391 $ECHO EXPORTS >> $output_objdir/$libname.def~
8392 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
8393 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
8394 emximp -o $lib $output_objdir/$libname.def'
8395 archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
8396 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
8397 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
8398 $ECHO EXPORTS >> $output_objdir/$libname.def~
8399 prefix_cmds="$SED"~
8400 if test EXPORTS = "`$SED 1q $export_symbols`"; then
8401 prefix_cmds="$prefix_cmds -e 1d";
8402 fi~
8403 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
8404 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
8405 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
8406 emximp -o $lib $output_objdir/$libname.def'
8407 old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
8408 enable_shared_with_static_runtimes=yes
8409 ;;
8410
8411 interix[3-9]*)
8412 hardcode_direct=no
8413 hardcode_shlibpath_var=no
8414 hardcode_libdir_flag_spec='$wl-rpath,$libdir'
8415 export_dynamic_flag_spec='$wl-E'
8416 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
8417 # Instead, shared libraries are loaded at an image base (0x10000000 by
8418 # default) and relocated if they conflict, which is a slow very memory
8419 # consuming and fragmenting process. To avoid this, we pick a random,
8420 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
8421 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
8422 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
8423 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'
8424 ;;
8425
8426 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
8427 tmp_diet=no
8428 if test linux-dietlibc = "$host_os"; then
8429 case $cc_basename in
8430 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
8431 esac
8432 fi
8433 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
8434 && test no = "$tmp_diet"
8435 then
8436 tmp_addflag=' $pic_flag'
8437 tmp_sharedflag='-shared'
8438 case $cc_basename,$host_cpu in
8439 pgcc*) # Portland Group C compiler
8440 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'
8441 tmp_addflag=' $pic_flag'
8442 ;;
8443 pgf77* | pgf90* | pgf95* | pgfortran*)
8444 # Portland Group f77 and f90 compilers
8445 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'
8446 tmp_addflag=' $pic_flag -Mnomain' ;;
8447 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
8448 tmp_addflag=' -i_dynamic' ;;
8449 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
8450 tmp_addflag=' -i_dynamic -nofor_main' ;;
8451 ifc* | ifort*) # Intel Fortran compiler
8452 tmp_addflag=' -nofor_main' ;;
8453 lf95*) # Lahey Fortran 8.1
8454 whole_archive_flag_spec=
8455 tmp_sharedflag='--shared' ;;
8456 nagfor*) # NAGFOR 5.3
8457 tmp_sharedflag='-Wl,-shared' ;;
8458 xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
8459 tmp_sharedflag='-qmkshrobj'
8460 tmp_addflag= ;;
8461 nvcc*) # Cuda Compiler Driver 2.2
8462 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'
8463 compiler_needs_object=yes
8464 ;;
8465 esac
8466 case `$CC -V 2>&1 | sed 5q` in
8467 *Sun\ C*) # Sun C 5.9
8468 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'
8469 compiler_needs_object=yes
8470 tmp_sharedflag='-G' ;;
8471 *Sun\ F*) # Sun Fortran 8.3
8472 tmp_sharedflag='-G' ;;
8473 esac
8474 archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8475
8476 if test yes = "$supports_anon_versioning"; then
8477 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
8478 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
8479 echo "local: *; };" >> $output_objdir/$libname.ver~
8480 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
8481 fi
8482
8483 case $cc_basename in
8484 tcc*)
8485 export_dynamic_flag_spec='-rdynamic'
8486 ;;
8487 xlf* | bgf* | bgxlf* | mpixlf*)
8488 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
8489 whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
8490 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
8491 archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
8492 if test yes = "$supports_anon_versioning"; then
8493 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
8494 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
8495 echo "local: *; };" >> $output_objdir/$libname.ver~
8496 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
8497 fi
8498 ;;
8499 esac
8500 else
8501 ld_shlibs=no
8502 fi
8503 ;;
8504
8505 netbsd* | netbsdelf*-gnu)
8506 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
8507 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
8508 wlarc=
8509 else
8510 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8511 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
8512 fi
8513 ;;
8514
8515 solaris*)
8516 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
8517 ld_shlibs=no
8518 cat <<_LT_EOF 1>&2
8519
8520 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
8521 *** create shared libraries on Solaris systems. Therefore, libtool
8522 *** is disabling shared libraries support. We urge you to upgrade GNU
8523 *** binutils to release 2.9.1 or newer. Another option is to modify
8524 *** your PATH or compiler configuration so that the native linker is
8525 *** used, and then restart.
8526
8527 _LT_EOF
8528 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
8529 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8530 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
8531 else
8532 ld_shlibs=no
8533 fi
8534 ;;
8535
8536 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
8537 case `$LD -v 2>&1` in
8538 *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
8539 ld_shlibs=no
8540 cat <<_LT_EOF 1>&2
8541
8542 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
8543 *** reliably create shared libraries on SCO systems. Therefore, libtool
8544 *** is disabling shared libraries support. We urge you to upgrade GNU
8545 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
8546 *** your PATH or compiler configuration so that the native linker is
8547 *** used, and then restart.
8548
8549 _LT_EOF
8550 ;;
8551 *)
8552 # For security reasons, it is highly recommended that you always
8553 # use absolute paths for naming shared libraries, and exclude the
8554 # DT_RUNPATH tag from executables and libraries. But doing so
8555 # requires that you compile everything twice, which is a pain.
8556 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
8557 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
8558 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8559 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
8560 else
8561 ld_shlibs=no
8562 fi
8563 ;;
8564 esac
8565 ;;
8566
8567 sunos4*)
8568 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8569 wlarc=
8570 hardcode_direct=yes
8571 hardcode_shlibpath_var=no
8572 ;;
8573
8574 *)
8575 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
8576 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8577 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
8578 else
8579 ld_shlibs=no
8580 fi
8581 ;;
8582 esac
8583
8584 if test no = "$ld_shlibs"; then
8585 runpath_var=
8586 hardcode_libdir_flag_spec=
8587 export_dynamic_flag_spec=
8588 whole_archive_flag_spec=
8589 fi
8590 else
8591 # PORTME fill in a description of your system's linker (not GNU ld)
8592 case $host_os in
8593 aix3*)
8594 allow_undefined_flag=unsupported
8595 always_export_symbols=yes
8596 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'
8597 # Note: this linker hardcodes the directories in LIBPATH if there
8598 # are no directories specified by -L.
8599 hardcode_minus_L=yes
8600 if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
8601 # Neither direct hardcoding nor static linking is supported with a
8602 # broken collect2.
8603 hardcode_direct=unsupported
8604 fi
8605 ;;
8606
8607 aix[4-9]*)
8608 if test ia64 = "$host_cpu"; then
8609 # On IA64, the linker does run time linking by default, so we don't
8610 # have to do anything special.
8611 aix_use_runtimelinking=no
8612 exp_sym_flag='-Bexport'
8613 no_entry_flag=
8614 else
8615 # If we're using GNU nm, then we don't want the "-C" option.
8616 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
8617 # Without the "-l" option, or with the "-B" option, AIX nm treats
8618 # weak defined symbols like other global defined symbols, whereas
8619 # GNU nm marks them as "W".
8620 # While the 'weak' keyword is ignored in the Export File, we need
8621 # it in the Import File for the 'aix-soname' feature, so we have
8622 # to replace the "-B" option with "-P" for AIX nm.
8623 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
8624 export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
8625 else
8626 export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
8627 fi
8628 aix_use_runtimelinking=no
8629
8630 # Test if we are trying to use run time linking or normal
8631 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
8632 # have runtime linking enabled, and use it for executables.
8633 # For shared libraries, we enable/disable runtime linking
8634 # depending on the kind of the shared library created -
8635 # when "with_aix_soname,aix_use_runtimelinking" is:
8636 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
8637 # "aix,yes" lib.so shared, rtl:yes, for executables
8638 # lib.a static archive
8639 # "both,no" lib.so.V(shr.o) shared, rtl:yes
8640 # lib.a(lib.so.V) shared, rtl:no, for executables
8641 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
8642 # lib.a(lib.so.V) shared, rtl:no
8643 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
8644 # lib.a static archive
8645 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
8646 for ld_flag in $LDFLAGS; do
8647 if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
8648 aix_use_runtimelinking=yes
8649 break
8650 fi
8651 done
8652 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
8653 # With aix-soname=svr4, we create the lib.so.V shared archives only,
8654 # so we don't have lib.a shared libs to link our executables.
8655 # We have to force runtime linking in this case.
8656 aix_use_runtimelinking=yes
8657 LDFLAGS="$LDFLAGS -Wl,-brtl"
8658 fi
8659 ;;
8660 esac
8661
8662 exp_sym_flag='-bexport'
8663 no_entry_flag='-bnoentry'
8664 fi
8665
8666 # When large executables or shared objects are built, AIX ld can
8667 # have problems creating the table of contents. If linking a library
8668 # or program results in "error TOC overflow" add -mminimal-toc to
8669 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
8670 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
8671
8672 archive_cmds=''
8673 hardcode_direct=yes
8674 hardcode_direct_absolute=yes
8675 hardcode_libdir_separator=':'
8676 link_all_deplibs=yes
8677 file_list_spec='$wl-f,'
8678 case $with_aix_soname,$aix_use_runtimelinking in
8679 aix,*) ;; # traditional, no import file
8680 svr4,* | *,yes) # use import file
8681 # The Import File defines what to hardcode.
8682 hardcode_direct=no
8683 hardcode_direct_absolute=no
8684 ;;
8685 esac
8686
8687 if test yes = "$GCC"; then
8688 case $host_os in aix4.[012]|aix4.[012].*)
8689 # We only want to do this on AIX 4.2 and lower, the check
8690 # below for broken collect2 doesn't work under 4.3+
8691 collect2name=`$CC -print-prog-name=collect2`
8692 if test -f "$collect2name" &&
8693 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
8694 then
8695 # We have reworked collect2
8696 :
8697 else
8698 # We have old collect2
8699 hardcode_direct=unsupported
8700 # It fails to find uninstalled libraries when the uninstalled
8701 # path is not listed in the libpath. Setting hardcode_minus_L
8702 # to unsupported forces relinking
8703 hardcode_minus_L=yes
8704 hardcode_libdir_flag_spec='-L$libdir'
8705 hardcode_libdir_separator=
8706 fi
8707 ;;
8708 esac
8709 shared_flag='-shared'
8710 if test yes = "$aix_use_runtimelinking"; then
8711 shared_flag="$shared_flag "'$wl-G'
8712 fi
8713 # Need to ensure runtime linking is disabled for the traditional
8714 # shared library, or the linker may eventually find shared libraries
8715 # /with/ Import File - we do not want to mix them.
8716 shared_flag_aix='-shared'
8717 shared_flag_svr4='-shared $wl-G'
8718 else
8719 # not using gcc
8720 if test ia64 = "$host_cpu"; then
8721 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8722 # chokes on -Wl,-G. The following line is correct:
8723 shared_flag='-G'
8724 else
8725 if test yes = "$aix_use_runtimelinking"; then
8726 shared_flag='$wl-G'
8727 else
8728 shared_flag='$wl-bM:SRE'
8729 fi
8730 shared_flag_aix='$wl-bM:SRE'
8731 shared_flag_svr4='$wl-G'
8732 fi
8733 fi
8734
8735 export_dynamic_flag_spec='$wl-bexpall'
8736 # It seems that -bexpall does not export symbols beginning with
8737 # underscore (_), so it is better to generate a list of symbols to export.
8738 always_export_symbols=yes
8739 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
8740 # Warning - without using the other runtime loading flags (-brtl),
8741 # -berok will link without error, but may produce a broken library.
8742 allow_undefined_flag='-berok'
8743 # Determine the default libpath from the value encoded in an
8744 # empty executable.
8745 if test set = "${lt_cv_aix_libpath+set}"; then
8746 aix_libpath=$lt_cv_aix_libpath
8747 else
8748 if ${lt_cv_aix_libpath_+:} false; then :
8749 $as_echo_n "(cached) " >&6
8750 else
8751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8752 /* end confdefs.h. */
8753
8754 int
8755 main ()
8756 {
8757
8758 ;
8759 return 0;
8760 }
8761 _ACEOF
8762 if ac_fn_c_try_link "$LINENO"; then :
8763
8764 lt_aix_libpath_sed='
8765 /Import File Strings/,/^$/ {
8766 /^0/ {
8767 s/^0 *\([^ ]*\) *$/\1/
8768 p
8769 }
8770 }'
8771 lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8772 # Check for a 64-bit object if we didn't find anything.
8773 if test -z "$lt_cv_aix_libpath_"; then
8774 lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8775 fi
8776 fi
8777 rm -f core conftest.err conftest.$ac_objext \
8778 conftest$ac_exeext conftest.$ac_ext
8779 if test -z "$lt_cv_aix_libpath_"; then
8780 lt_cv_aix_libpath_=/usr/lib:/lib
8781 fi
8782
8783 fi
8784
8785 aix_libpath=$lt_cv_aix_libpath_
8786 fi
8787
8788 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
8789 archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
8790 else
8791 if test ia64 = "$host_cpu"; then
8792 hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
8793 allow_undefined_flag="-z nodefs"
8794 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"
8795 else
8796 # Determine the default libpath from the value encoded in an
8797 # empty executable.
8798 if test set = "${lt_cv_aix_libpath+set}"; then
8799 aix_libpath=$lt_cv_aix_libpath
8800 else
8801 if ${lt_cv_aix_libpath_+:} false; then :
8802 $as_echo_n "(cached) " >&6
8803 else
8804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8805 /* end confdefs.h. */
8806
8807 int
8808 main ()
8809 {
8810
8811 ;
8812 return 0;
8813 }
8814 _ACEOF
8815 if ac_fn_c_try_link "$LINENO"; then :
8816
8817 lt_aix_libpath_sed='
8818 /Import File Strings/,/^$/ {
8819 /^0/ {
8820 s/^0 *\([^ ]*\) *$/\1/
8821 p
8822 }
8823 }'
8824 lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8825 # Check for a 64-bit object if we didn't find anything.
8826 if test -z "$lt_cv_aix_libpath_"; then
8827 lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8828 fi
8829 fi
8830 rm -f core conftest.err conftest.$ac_objext \
8831 conftest$ac_exeext conftest.$ac_ext
8832 if test -z "$lt_cv_aix_libpath_"; then
8833 lt_cv_aix_libpath_=/usr/lib:/lib
8834 fi
8835
8836 fi
8837
8838 aix_libpath=$lt_cv_aix_libpath_
8839 fi
8840
8841 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
8842 # Warning - without using the other run time loading flags,
8843 # -berok will link without error, but may produce a broken library.
8844 no_undefined_flag=' $wl-bernotok'
8845 allow_undefined_flag=' $wl-berok'
8846 if test yes = "$with_gnu_ld"; then
8847 # We only use this code for GNU lds that support --whole-archive.
8848 whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
8849 else
8850 # Exported symbols can be pulled into shared objects from archives
8851 whole_archive_flag_spec='$convenience'
8852 fi
8853 archive_cmds_need_lc=yes
8854 archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
8855 # -brtl affects multiple linker settings, -berok does not and is overridden later
8856 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
8857 if test svr4 != "$with_aix_soname"; then
8858 # This is similar to how AIX traditionally builds its shared libraries.
8859 archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
8860 fi
8861 if test aix != "$with_aix_soname"; then
8862 archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
8863 else
8864 # used by -dlpreopen to get the symbols
8865 archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
8866 fi
8867 archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
8868 fi
8869 fi
8870 ;;
8871
8872 amigaos*)
8873 case $host_cpu in
8874 powerpc)
8875 # see comment about AmigaOS4 .so support
8876 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8877 archive_expsym_cmds=''
8878 ;;
8879 m68k)
8880 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)'
8881 hardcode_libdir_flag_spec='-L$libdir'
8882 hardcode_minus_L=yes
8883 ;;
8884 esac
8885 ;;
8886
8887 bsdi[45]*)
8888 export_dynamic_flag_spec=-rdynamic
8889 ;;
8890
8891 cygwin* | mingw* | pw32* | cegcc*)
8892 # When not using gcc, we currently assume that we are using
8893 # Microsoft Visual C++.
8894 # hardcode_libdir_flag_spec is actually meaningless, as there is
8895 # no search path for DLLs.
8896 case $cc_basename in
8897 cl*)
8898 # Native MSVC
8899 hardcode_libdir_flag_spec=' '
8900 allow_undefined_flag=unsupported
8901 always_export_symbols=yes
8902 file_list_spec='@'
8903 # Tell ltmain to make .lib files, not .a files.
8904 libext=lib
8905 # Tell ltmain to make .dll files, not .so files.
8906 shrext_cmds=.dll
8907 # FIXME: Setting linknames here is a bad hack.
8908 archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
8909 archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
8910 cp "$export_symbols" "$output_objdir/$soname.def";
8911 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
8912 else
8913 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
8914 fi~
8915 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
8916 linknames='
8917 # The linker will not automatically build a static lib if we build a DLL.
8918 # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
8919 enable_shared_with_static_runtimes=yes
8920 exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
8921 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
8922 # Don't use ranlib
8923 old_postinstall_cmds='chmod 644 $oldlib'
8924 postlink_cmds='lt_outputfile="@OUTPUT@"~
8925 lt_tool_outputfile="@TOOL_OUTPUT@"~
8926 case $lt_outputfile in
8927 *.exe|*.EXE) ;;
8928 *)
8929 lt_outputfile=$lt_outputfile.exe
8930 lt_tool_outputfile=$lt_tool_outputfile.exe
8931 ;;
8932 esac~
8933 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
8934 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
8935 $RM "$lt_outputfile.manifest";
8936 fi'
8937 ;;
8938 *)
8939 # Assume MSVC wrapper
8940 hardcode_libdir_flag_spec=' '
8941 allow_undefined_flag=unsupported
8942 # Tell ltmain to make .lib files, not .a files.
8943 libext=lib
8944 # Tell ltmain to make .dll files, not .so files.
8945 shrext_cmds=.dll
8946 # FIXME: Setting linknames here is a bad hack.
8947 archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
8948 # The linker will automatically build a .lib file if we build a DLL.
8949 old_archive_from_new_cmds='true'
8950 # FIXME: Should let the user specify the lib program.
8951 old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
8952 enable_shared_with_static_runtimes=yes
8953 ;;
8954 esac
8955 ;;
8956
8957 darwin* | rhapsody*)
8958
8959
8960 archive_cmds_need_lc=no
8961 hardcode_direct=no
8962 hardcode_automatic=yes
8963 hardcode_shlibpath_var=unsupported
8964 if test yes = "$lt_cv_ld_force_load"; then
8965 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\"`'
8966
8967 else
8968 whole_archive_flag_spec=''
8969 fi
8970 link_all_deplibs=yes
8971 allow_undefined_flag=$_lt_dar_allow_undefined
8972 case $cc_basename in
8973 ifort*|nagfor*) _lt_dar_can_shared=yes ;;
8974 *) _lt_dar_can_shared=$GCC ;;
8975 esac
8976 if test yes = "$_lt_dar_can_shared"; then
8977 output_verbose_link_cmd=func_echo_all
8978 archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
8979 module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
8980 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"
8981 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"
8982
8983 else
8984 ld_shlibs=no
8985 fi
8986
8987 ;;
8988
8989 dgux*)
8990 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8991 hardcode_libdir_flag_spec='-L$libdir'
8992 hardcode_shlibpath_var=no
8993 ;;
8994
8995 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
8996 # support. Future versions do this automatically, but an explicit c++rt0.o
8997 # does not break anything, and helps significantly (at the cost of a little
8998 # extra space).
8999 freebsd2.2*)
9000 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
9001 hardcode_libdir_flag_spec='-R$libdir'
9002 hardcode_direct=yes
9003 hardcode_shlibpath_var=no
9004 ;;
9005
9006 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
9007 freebsd2.*)
9008 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9009 hardcode_direct=yes
9010 hardcode_minus_L=yes
9011 hardcode_shlibpath_var=no
9012 ;;
9013
9014 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
9015 freebsd* | dragonfly*)
9016 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9017 hardcode_libdir_flag_spec='-R$libdir'
9018 hardcode_direct=yes
9019 hardcode_shlibpath_var=no
9020 ;;
9021
9022 hpux9*)
9023 if test yes = "$GCC"; then
9024 archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
9025 else
9026 archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
9027 fi
9028 hardcode_libdir_flag_spec='$wl+b $wl$libdir'
9029 hardcode_libdir_separator=:
9030 hardcode_direct=yes
9031
9032 # hardcode_minus_L: Not really in the search PATH,
9033 # but as the default location of the library.
9034 hardcode_minus_L=yes
9035 export_dynamic_flag_spec='$wl-E'
9036 ;;
9037
9038 hpux10*)
9039 if test yes,no = "$GCC,$with_gnu_ld"; then
9040 archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
9041 else
9042 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
9043 fi
9044 if test no = "$with_gnu_ld"; then
9045 hardcode_libdir_flag_spec='$wl+b $wl$libdir'
9046 hardcode_libdir_separator=:
9047 hardcode_direct=yes
9048 hardcode_direct_absolute=yes
9049 export_dynamic_flag_spec='$wl-E'
9050 # hardcode_minus_L: Not really in the search PATH,
9051 # but as the default location of the library.
9052 hardcode_minus_L=yes
9053 fi
9054 ;;
9055
9056 hpux11*)
9057 if test yes,no = "$GCC,$with_gnu_ld"; then
9058 case $host_cpu in
9059 hppa*64*)
9060 archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
9061 ;;
9062 ia64*)
9063 archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
9064 ;;
9065 *)
9066 archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
9067 ;;
9068 esac
9069 else
9070 case $host_cpu in
9071 hppa*64*)
9072 archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
9073 ;;
9074 ia64*)
9075 archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
9076 ;;
9077 *)
9078
9079 # Older versions of the 11.00 compiler do not understand -b yet
9080 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
9081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
9082 $as_echo_n "checking if $CC understands -b... " >&6; }
9083 if ${lt_cv_prog_compiler__b+:} false; then :
9084 $as_echo_n "(cached) " >&6
9085 else
9086 lt_cv_prog_compiler__b=no
9087 save_LDFLAGS=$LDFLAGS
9088 LDFLAGS="$LDFLAGS -b"
9089 echo "$lt_simple_link_test_code" > conftest.$ac_ext
9090 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
9091 # The linker can only warn and ignore the option if not recognized
9092 # So say no if there are warnings
9093 if test -s conftest.err; then
9094 # Append any errors to the config.log.
9095 cat conftest.err 1>&5
9096 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
9097 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
9098 if diff conftest.exp conftest.er2 >/dev/null; then
9099 lt_cv_prog_compiler__b=yes
9100 fi
9101 else
9102 lt_cv_prog_compiler__b=yes
9103 fi
9104 fi
9105 $RM -r conftest*
9106 LDFLAGS=$save_LDFLAGS
9107
9108 fi
9109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
9110 $as_echo "$lt_cv_prog_compiler__b" >&6; }
9111
9112 if test yes = "$lt_cv_prog_compiler__b"; then
9113 archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
9114 else
9115 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
9116 fi
9117
9118 ;;
9119 esac
9120 fi
9121 if test no = "$with_gnu_ld"; then
9122 hardcode_libdir_flag_spec='$wl+b $wl$libdir'
9123 hardcode_libdir_separator=:
9124
9125 case $host_cpu in
9126 hppa*64*|ia64*)
9127 hardcode_direct=no
9128 hardcode_shlibpath_var=no
9129 ;;
9130 *)
9131 hardcode_direct=yes
9132 hardcode_direct_absolute=yes
9133 export_dynamic_flag_spec='$wl-E'
9134
9135 # hardcode_minus_L: Not really in the search PATH,
9136 # but as the default location of the library.
9137 hardcode_minus_L=yes
9138 ;;
9139 esac
9140 fi
9141 ;;
9142
9143 irix5* | irix6* | nonstopux*)
9144 if test yes = "$GCC"; then
9145 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'
9146 # Try to use the -exported_symbol ld option, if it does not
9147 # work, assume that -exports_file does not work either and
9148 # implicitly export all symbols.
9149 # This should be the same for all languages, so no per-tag cache variable.
9150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
9151 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
9152 if ${lt_cv_irix_exported_symbol+:} false; then :
9153 $as_echo_n "(cached) " >&6
9154 else
9155 save_LDFLAGS=$LDFLAGS
9156 LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
9157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9158 /* end confdefs.h. */
9159 int foo (void) { return 0; }
9160 _ACEOF
9161 if ac_fn_c_try_link "$LINENO"; then :
9162 lt_cv_irix_exported_symbol=yes
9163 else
9164 lt_cv_irix_exported_symbol=no
9165 fi
9166 rm -f core conftest.err conftest.$ac_objext \
9167 conftest$ac_exeext conftest.$ac_ext
9168 LDFLAGS=$save_LDFLAGS
9169 fi
9170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
9171 $as_echo "$lt_cv_irix_exported_symbol" >&6; }
9172 if test yes = "$lt_cv_irix_exported_symbol"; then
9173 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'
9174 fi
9175 link_all_deplibs=no
9176 else
9177 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'
9178 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'
9179 fi
9180 archive_cmds_need_lc='no'
9181 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
9182 hardcode_libdir_separator=:
9183 inherit_rpath=yes
9184 link_all_deplibs=yes
9185 ;;
9186
9187 linux*)
9188 case $cc_basename in
9189 tcc*)
9190 # Fabrice Bellard et al's Tiny C Compiler
9191 ld_shlibs=yes
9192 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9193 ;;
9194 esac
9195 ;;
9196
9197 netbsd* | netbsdelf*-gnu)
9198 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
9199 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
9200 else
9201 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
9202 fi
9203 hardcode_libdir_flag_spec='-R$libdir'
9204 hardcode_direct=yes
9205 hardcode_shlibpath_var=no
9206 ;;
9207
9208 newsos6)
9209 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9210 hardcode_direct=yes
9211 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
9212 hardcode_libdir_separator=:
9213 hardcode_shlibpath_var=no
9214 ;;
9215
9216 *nto* | *qnx*)
9217 ;;
9218
9219 openbsd* | bitrig*)
9220 if test -f /usr/libexec/ld.so; then
9221 hardcode_direct=yes
9222 hardcode_shlibpath_var=no
9223 hardcode_direct_absolute=yes
9224 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
9225 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9226 archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
9227 hardcode_libdir_flag_spec='$wl-rpath,$libdir'
9228 export_dynamic_flag_spec='$wl-E'
9229 else
9230 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9231 hardcode_libdir_flag_spec='$wl-rpath,$libdir'
9232 fi
9233 else
9234 ld_shlibs=no
9235 fi
9236 ;;
9237
9238 os2*)
9239 hardcode_libdir_flag_spec='-L$libdir'
9240 hardcode_minus_L=yes
9241 allow_undefined_flag=unsupported
9242 shrext_cmds=.dll
9243 archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
9244 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
9245 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
9246 $ECHO EXPORTS >> $output_objdir/$libname.def~
9247 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
9248 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
9249 emximp -o $lib $output_objdir/$libname.def'
9250 archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
9251 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
9252 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
9253 $ECHO EXPORTS >> $output_objdir/$libname.def~
9254 prefix_cmds="$SED"~
9255 if test EXPORTS = "`$SED 1q $export_symbols`"; then
9256 prefix_cmds="$prefix_cmds -e 1d";
9257 fi~
9258 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
9259 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
9260 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
9261 emximp -o $lib $output_objdir/$libname.def'
9262 old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
9263 enable_shared_with_static_runtimes=yes
9264 ;;
9265
9266 osf3*)
9267 if test yes = "$GCC"; then
9268 allow_undefined_flag=' $wl-expect_unresolved $wl\*'
9269 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'
9270 else
9271 allow_undefined_flag=' -expect_unresolved \*'
9272 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'
9273 fi
9274 archive_cmds_need_lc='no'
9275 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
9276 hardcode_libdir_separator=:
9277 ;;
9278
9279 osf4* | osf5*) # as osf3* with the addition of -msym flag
9280 if test yes = "$GCC"; then
9281 allow_undefined_flag=' $wl-expect_unresolved $wl\*'
9282 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'
9283 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
9284 else
9285 allow_undefined_flag=' -expect_unresolved \*'
9286 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'
9287 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~
9288 $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'
9289
9290 # Both c and cxx compiler support -rpath directly
9291 hardcode_libdir_flag_spec='-rpath $libdir'
9292 fi
9293 archive_cmds_need_lc='no'
9294 hardcode_libdir_separator=:
9295 ;;
9296
9297 solaris*)
9298 no_undefined_flag=' -z defs'
9299 if test yes = "$GCC"; then
9300 wlarc='$wl'
9301 archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
9302 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
9303 $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'
9304 else
9305 case `$CC -V 2>&1` in
9306 *"Compilers 5.0"*)
9307 wlarc=''
9308 archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
9309 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
9310 $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
9311 ;;
9312 *)
9313 wlarc='$wl'
9314 archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
9315 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
9316 $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
9317 ;;
9318 esac
9319 fi
9320 hardcode_libdir_flag_spec='-R$libdir'
9321 hardcode_shlibpath_var=no
9322 case $host_os in
9323 solaris2.[0-5] | solaris2.[0-5].*) ;;
9324 *)
9325 # The compiler driver will combine and reorder linker options,
9326 # but understands '-z linker_flag'. GCC discards it without '$wl',
9327 # but is careful enough not to reorder.
9328 # Supported since Solaris 2.6 (maybe 2.5.1?)
9329 if test yes = "$GCC"; then
9330 whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
9331 else
9332 whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
9333 fi
9334 ;;
9335 esac
9336 link_all_deplibs=yes
9337 ;;
9338
9339 sunos4*)
9340 if test sequent = "$host_vendor"; then
9341 # Use $CC to link under sequent, because it throws in some extra .o
9342 # files that make .init and .fini sections work.
9343 archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
9344 else
9345 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
9346 fi
9347 hardcode_libdir_flag_spec='-L$libdir'
9348 hardcode_direct=yes
9349 hardcode_minus_L=yes
9350 hardcode_shlibpath_var=no
9351 ;;
9352
9353 sysv4)
9354 case $host_vendor in
9355 sni)
9356 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9357 hardcode_direct=yes # is this really true???
9358 ;;
9359 siemens)
9360 ## LD is ld it makes a PLAMLIB
9361 ## CC just makes a GrossModule.
9362 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
9363 reload_cmds='$CC -r -o $output$reload_objs'
9364 hardcode_direct=no
9365 ;;
9366 motorola)
9367 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9368 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
9369 ;;
9370 esac
9371 runpath_var='LD_RUN_PATH'
9372 hardcode_shlibpath_var=no
9373 ;;
9374
9375 sysv4.3*)
9376 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9377 hardcode_shlibpath_var=no
9378 export_dynamic_flag_spec='-Bexport'
9379 ;;
9380
9381 sysv4*MP*)
9382 if test -d /usr/nec; then
9383 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9384 hardcode_shlibpath_var=no
9385 runpath_var=LD_RUN_PATH
9386 hardcode_runpath_var=yes
9387 ld_shlibs=yes
9388 fi
9389 ;;
9390
9391 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
9392 no_undefined_flag='$wl-z,text'
9393 archive_cmds_need_lc=no
9394 hardcode_shlibpath_var=no
9395 runpath_var='LD_RUN_PATH'
9396
9397 if test yes = "$GCC"; then
9398 archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9399 archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9400 else
9401 archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9402 archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9403 fi
9404 ;;
9405
9406 sysv5* | sco3.2v5* | sco5v6*)
9407 # Note: We CANNOT use -z defs as we might desire, because we do not
9408 # link with -lc, and that would cause any symbols used from libc to
9409 # always be unresolved, which means just about no library would
9410 # ever link correctly. If we're not using GNU ld we use -z text
9411 # though, which does catch some bad symbols but isn't as heavy-handed
9412 # as -z defs.
9413 no_undefined_flag='$wl-z,text'
9414 allow_undefined_flag='$wl-z,nodefs'
9415 archive_cmds_need_lc=no
9416 hardcode_shlibpath_var=no
9417 hardcode_libdir_flag_spec='$wl-R,$libdir'
9418 hardcode_libdir_separator=':'
9419 link_all_deplibs=yes
9420 export_dynamic_flag_spec='$wl-Bexport'
9421 runpath_var='LD_RUN_PATH'
9422
9423 if test yes = "$GCC"; then
9424 archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9425 archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9426 else
9427 archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9428 archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9429 fi
9430 ;;
9431
9432 uts4*)
9433 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9434 hardcode_libdir_flag_spec='-L$libdir'
9435 hardcode_shlibpath_var=no
9436 ;;
9437
9438 *)
9439 ld_shlibs=no
9440 ;;
9441 esac
9442
9443 if test sni = "$host_vendor"; then
9444 case $host in
9445 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
9446 export_dynamic_flag_spec='$wl-Blargedynsym'
9447 ;;
9448 esac
9449 fi
9450 fi
9451
9452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
9453 $as_echo "$ld_shlibs" >&6; }
9454 test no = "$ld_shlibs" && can_build_shared=no
9455
9456 with_gnu_ld=$with_gnu_ld
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472 #
9473 # Do we need to explicitly link libc?
9474 #
9475 case "x$archive_cmds_need_lc" in
9476 x|xyes)
9477 # Assume -lc should be added
9478 archive_cmds_need_lc=yes
9479
9480 if test yes,yes = "$GCC,$enable_shared"; then
9481 case $archive_cmds in
9482 *'~'*)
9483 # FIXME: we may have to deal with multi-command sequences.
9484 ;;
9485 '$CC '*)
9486 # Test whether the compiler implicitly links with -lc since on some
9487 # systems, -lgcc has to come before -lc. If gcc already passes -lc
9488 # to ld, don't add -lc before -lgcc.
9489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
9490 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
9491 if ${lt_cv_archive_cmds_need_lc+:} false; then :
9492 $as_echo_n "(cached) " >&6
9493 else
9494 $RM conftest*
9495 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
9496
9497 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9498 (eval $ac_compile) 2>&5
9499 ac_status=$?
9500 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9501 test $ac_status = 0; } 2>conftest.err; then
9502 soname=conftest
9503 lib=conftest
9504 libobjs=conftest.$ac_objext
9505 deplibs=
9506 wl=$lt_prog_compiler_wl
9507 pic_flag=$lt_prog_compiler_pic
9508 compiler_flags=-v
9509 linker_flags=-v
9510 verstring=
9511 output_objdir=.
9512 libname=conftest
9513 lt_save_allow_undefined_flag=$allow_undefined_flag
9514 allow_undefined_flag=
9515 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
9516 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
9517 ac_status=$?
9518 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9519 test $ac_status = 0; }
9520 then
9521 lt_cv_archive_cmds_need_lc=no
9522 else
9523 lt_cv_archive_cmds_need_lc=yes
9524 fi
9525 allow_undefined_flag=$lt_save_allow_undefined_flag
9526 else
9527 cat conftest.err 1>&5
9528 fi
9529 $RM conftest*
9530
9531 fi
9532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
9533 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
9534 archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
9535 ;;
9536 esac
9537 fi
9538 ;;
9539 esac
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
9693 $as_echo_n "checking dynamic linker characteristics... " >&6; }
9694
9695 if test yes = "$GCC"; then
9696 case $host_os in
9697 darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
9698 *) lt_awk_arg='/^libraries:/' ;;
9699 esac
9700 case $host_os in
9701 mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
9702 *) lt_sed_strip_eq='s|=/|/|g' ;;
9703 esac
9704 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
9705 case $lt_search_path_spec in
9706 *\;*)
9707 # if the path contains ";" then we assume it to be the separator
9708 # otherwise default to the standard path separator (i.e. ":") - it is
9709 # assumed that no part of a normal pathname contains ";" but that should
9710 # okay in the real world where ";" in dirpaths is itself problematic.
9711 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
9712 ;;
9713 *)
9714 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
9715 ;;
9716 esac
9717 # Ok, now we have the path, separated by spaces, we can step through it
9718 # and add multilib dir if necessary...
9719 lt_tmp_lt_search_path_spec=
9720 lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
9721 # ...but if some path component already ends with the multilib dir we assume
9722 # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
9723 case "$lt_multi_os_dir; $lt_search_path_spec " in
9724 "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
9725 lt_multi_os_dir=
9726 ;;
9727 esac
9728 for lt_sys_path in $lt_search_path_spec; do
9729 if test -d "$lt_sys_path$lt_multi_os_dir"; then
9730 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
9731 elif test -n "$lt_multi_os_dir"; then
9732 test -d "$lt_sys_path" && \
9733 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
9734 fi
9735 done
9736 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
9737 BEGIN {RS = " "; FS = "/|\n";} {
9738 lt_foo = "";
9739 lt_count = 0;
9740 for (lt_i = NF; lt_i > 0; lt_i--) {
9741 if ($lt_i != "" && $lt_i != ".") {
9742 if ($lt_i == "..") {
9743 lt_count++;
9744 } else {
9745 if (lt_count == 0) {
9746 lt_foo = "/" $lt_i lt_foo;
9747 } else {
9748 lt_count--;
9749 }
9750 }
9751 }
9752 }
9753 if (lt_foo != "") { lt_freq[lt_foo]++; }
9754 if (lt_freq[lt_foo] == 1) { print lt_foo; }
9755 }'`
9756 # AWK program above erroneously prepends '/' to C:/dos/paths
9757 # for these hosts.
9758 case $host_os in
9759 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
9760 $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
9761 esac
9762 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
9763 else
9764 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
9765 fi
9766 library_names_spec=
9767 libname_spec='lib$name'
9768 soname_spec=
9769 shrext_cmds=.so
9770 postinstall_cmds=
9771 postuninstall_cmds=
9772 finish_cmds=
9773 finish_eval=
9774 shlibpath_var=
9775 shlibpath_overrides_runpath=unknown
9776 version_type=none
9777 dynamic_linker="$host_os ld.so"
9778 sys_lib_dlsearch_path_spec="/lib /usr/lib"
9779 need_lib_prefix=unknown
9780 hardcode_into_libs=no
9781
9782 # when you set need_version to no, make sure it does not cause -set_version
9783 # flags to be left without arguments
9784 need_version=unknown
9785
9786
9787
9788 case $host_os in
9789 aix3*)
9790 version_type=linux # correct to gnu/linux during the next big refactor
9791 library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
9792 shlibpath_var=LIBPATH
9793
9794 # AIX 3 has no versioning support, so we append a major version to the name.
9795 soname_spec='$libname$release$shared_ext$major'
9796 ;;
9797
9798 aix[4-9]*)
9799 version_type=linux # correct to gnu/linux during the next big refactor
9800 need_lib_prefix=no
9801 need_version=no
9802 hardcode_into_libs=yes
9803 if test ia64 = "$host_cpu"; then
9804 # AIX 5 supports IA64
9805 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
9806 shlibpath_var=LD_LIBRARY_PATH
9807 else
9808 # With GCC up to 2.95.x, collect2 would create an import file
9809 # for dependence libraries. The import file would start with
9810 # the line '#! .'. This would cause the generated library to
9811 # depend on '.', always an invalid library. This was fixed in
9812 # development snapshots of GCC prior to 3.0.
9813 case $host_os in
9814 aix4 | aix4.[01] | aix4.[01].*)
9815 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
9816 echo ' yes '
9817 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
9818 :
9819 else
9820 can_build_shared=no
9821 fi
9822 ;;
9823 esac
9824 # Using Import Files as archive members, it is possible to support
9825 # filename-based versioning of shared library archives on AIX. While
9826 # this would work for both with and without runtime linking, it will
9827 # prevent static linking of such archives. So we do filename-based
9828 # shared library versioning with .so extension only, which is used
9829 # when both runtime linking and shared linking is enabled.
9830 # Unfortunately, runtime linking may impact performance, so we do
9831 # not want this to be the default eventually. Also, we use the
9832 # versioned .so libs for executables only if there is the -brtl
9833 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
9834 # To allow for filename-based versioning support, we need to create
9835 # libNAME.so.V as an archive file, containing:
9836 # *) an Import File, referring to the versioned filename of the
9837 # archive as well as the shared archive member, telling the
9838 # bitwidth (32 or 64) of that shared object, and providing the
9839 # list of exported symbols of that shared object, eventually
9840 # decorated with the 'weak' keyword
9841 # *) the shared object with the F_LOADONLY flag set, to really avoid
9842 # it being seen by the linker.
9843 # At run time we better use the real file rather than another symlink,
9844 # but for link time we create the symlink libNAME.so -> libNAME.so.V
9845
9846 case $with_aix_soname,$aix_use_runtimelinking in
9847 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
9848 # soname into executable. Probably we can add versioning support to
9849 # collect2, so additional links can be useful in future.
9850 aix,yes) # traditional libtool
9851 dynamic_linker='AIX unversionable lib.so'
9852 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
9853 # instead of lib<name>.a to let people know that these are not
9854 # typical AIX shared libraries.
9855 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
9856 ;;
9857 aix,no) # traditional AIX only
9858 dynamic_linker='AIX lib.a(lib.so.V)'
9859 # We preserve .a as extension for shared libraries through AIX4.2
9860 # and later when we are not doing run time linking.
9861 library_names_spec='$libname$release.a $libname.a'
9862 soname_spec='$libname$release$shared_ext$major'
9863 ;;
9864 svr4,*) # full svr4 only
9865 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
9866 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
9867 # We do not specify a path in Import Files, so LIBPATH fires.
9868 shlibpath_overrides_runpath=yes
9869 ;;
9870 *,yes) # both, prefer svr4
9871 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
9872 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
9873 # unpreferred sharedlib libNAME.a needs extra handling
9874 postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
9875 postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
9876 # We do not specify a path in Import Files, so LIBPATH fires.
9877 shlibpath_overrides_runpath=yes
9878 ;;
9879 *,no) # both, prefer aix
9880 dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
9881 library_names_spec='$libname$release.a $libname.a'
9882 soname_spec='$libname$release$shared_ext$major'
9883 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
9884 postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
9885 postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
9886 ;;
9887 esac
9888 shlibpath_var=LIBPATH
9889 fi
9890 ;;
9891
9892 amigaos*)
9893 case $host_cpu in
9894 powerpc)
9895 # Since July 2007 AmigaOS4 officially supports .so libraries.
9896 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
9897 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
9898 ;;
9899 m68k)
9900 library_names_spec='$libname.ixlibrary $libname.a'
9901 # Create ${libname}_ixlibrary.a entries in /sys/libs.
9902 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $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'
9903 ;;
9904 esac
9905 ;;
9906
9907 beos*)
9908 library_names_spec='$libname$shared_ext'
9909 dynamic_linker="$host_os ld.so"
9910 shlibpath_var=LIBRARY_PATH
9911 ;;
9912
9913 bsdi[45]*)
9914 version_type=linux # correct to gnu/linux during the next big refactor
9915 need_version=no
9916 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
9917 soname_spec='$libname$release$shared_ext$major'
9918 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
9919 shlibpath_var=LD_LIBRARY_PATH
9920 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
9921 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
9922 # the default ld.so.conf also contains /usr/contrib/lib and
9923 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
9924 # libtool to hard-code these into programs
9925 ;;
9926
9927 cygwin* | mingw* | pw32* | cegcc*)
9928 version_type=windows
9929 shrext_cmds=.dll
9930 need_version=no
9931 need_lib_prefix=no
9932
9933 case $GCC,$cc_basename in
9934 yes,*)
9935 # gcc
9936 library_names_spec='$libname.dll.a'
9937 # DLL is installed to $(libdir)/../bin by postinstall_cmds
9938 postinstall_cmds='base_file=`basename \$file`~
9939 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
9940 dldir=$destdir/`dirname \$dlpath`~
9941 test -d \$dldir || mkdir -p \$dldir~
9942 $install_prog $dir/$dlname \$dldir/$dlname~
9943 chmod a+x \$dldir/$dlname~
9944 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
9945 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
9946 fi'
9947 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
9948 dlpath=$dir/\$dldll~
9949 $RM \$dlpath'
9950 shlibpath_overrides_runpath=yes
9951
9952 case $host_os in
9953 cygwin*)
9954 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
9955 soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
9956
9957 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
9958 ;;
9959 mingw* | cegcc*)
9960 # MinGW DLLs use traditional 'lib' prefix
9961 soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
9962 ;;
9963 pw32*)
9964 # pw32 DLLs use 'pw' prefix rather than 'lib'
9965 library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
9966 ;;
9967 esac
9968 dynamic_linker='Win32 ld.exe'
9969 ;;
9970
9971 *,cl*)
9972 # Native MSVC
9973 libname_spec='$name'
9974 soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
9975 library_names_spec='$libname.dll.lib'
9976
9977 case $build_os in
9978 mingw*)
9979 sys_lib_search_path_spec=
9980 lt_save_ifs=$IFS
9981 IFS=';'
9982 for lt_path in $LIB
9983 do
9984 IFS=$lt_save_ifs
9985 # Let DOS variable expansion print the short 8.3 style file name.
9986 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
9987 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
9988 done
9989 IFS=$lt_save_ifs
9990 # Convert to MSYS style.
9991 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
9992 ;;
9993 cygwin*)
9994 # Convert to unix form, then to dos form, then back to unix form
9995 # but this time dos style (no spaces!) so that the unix form looks
9996 # like /cygdrive/c/PROGRA~1:/cygdr...
9997 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
9998 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
9999 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
10000 ;;
10001 *)
10002 sys_lib_search_path_spec=$LIB
10003 if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
10004 # It is most probably a Windows format PATH.
10005 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
10006 else
10007 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
10008 fi
10009 # FIXME: find the short name or the path components, as spaces are
10010 # common. (e.g. "Program Files" -> "PROGRA~1")
10011 ;;
10012 esac
10013
10014 # DLL is installed to $(libdir)/../bin by postinstall_cmds
10015 postinstall_cmds='base_file=`basename \$file`~
10016 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
10017 dldir=$destdir/`dirname \$dlpath`~
10018 test -d \$dldir || mkdir -p \$dldir~
10019 $install_prog $dir/$dlname \$dldir/$dlname'
10020 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
10021 dlpath=$dir/\$dldll~
10022 $RM \$dlpath'
10023 shlibpath_overrides_runpath=yes
10024 dynamic_linker='Win32 link.exe'
10025 ;;
10026
10027 *)
10028 # Assume MSVC wrapper
10029 library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
10030 dynamic_linker='Win32 ld.exe'
10031 ;;
10032 esac
10033 # FIXME: first we should search . and the directory the executable is in
10034 shlibpath_var=PATH
10035 ;;
10036
10037 darwin* | rhapsody*)
10038 dynamic_linker="$host_os dyld"
10039 version_type=darwin
10040 need_lib_prefix=no
10041 need_version=no
10042 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
10043 soname_spec='$libname$release$major$shared_ext'
10044 shlibpath_overrides_runpath=yes
10045 shlibpath_var=DYLD_LIBRARY_PATH
10046 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
10047
10048 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
10049 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
10050 ;;
10051
10052 dgux*)
10053 version_type=linux # correct to gnu/linux during the next big refactor
10054 need_lib_prefix=no
10055 need_version=no
10056 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
10057 soname_spec='$libname$release$shared_ext$major'
10058 shlibpath_var=LD_LIBRARY_PATH
10059 ;;
10060
10061 freebsd* | dragonfly*)
10062 # DragonFly does not have aout. When/if they implement a new
10063 # versioning mechanism, adjust this.
10064 if test -x /usr/bin/objformat; then
10065 objformat=`/usr/bin/objformat`
10066 else
10067 case $host_os in
10068 freebsd[23].*) objformat=aout ;;
10069 *) objformat=elf ;;
10070 esac
10071 fi
10072 version_type=freebsd-$objformat
10073 case $version_type in
10074 freebsd-elf*)
10075 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
10076 soname_spec='$libname$release$shared_ext$major'
10077 need_version=no
10078 need_lib_prefix=no
10079 ;;
10080 freebsd-*)
10081 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
10082 need_version=yes
10083 ;;
10084 esac
10085 shlibpath_var=LD_LIBRARY_PATH
10086 case $host_os in
10087 freebsd2.*)
10088 shlibpath_overrides_runpath=yes
10089 ;;
10090 freebsd3.[01]* | freebsdelf3.[01]*)
10091 shlibpath_overrides_runpath=yes
10092 hardcode_into_libs=yes
10093 ;;
10094 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
10095 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
10096 shlibpath_overrides_runpath=no
10097 hardcode_into_libs=yes
10098 ;;
10099 *) # from 4.6 on, and DragonFly
10100 shlibpath_overrides_runpath=yes
10101 hardcode_into_libs=yes
10102 ;;
10103 esac
10104 ;;
10105
10106 haiku*)
10107 version_type=linux # correct to gnu/linux during the next big refactor
10108 need_lib_prefix=no
10109 need_version=no
10110 dynamic_linker="$host_os runtime_loader"
10111 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
10112 soname_spec='$libname$release$shared_ext$major'
10113 shlibpath_var=LIBRARY_PATH
10114 shlibpath_overrides_runpath=no
10115 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
10116 hardcode_into_libs=yes
10117 ;;
10118
10119 hpux9* | hpux10* | hpux11*)
10120 # Give a soname corresponding to the major version so that dld.sl refuses to
10121 # link against other versions.
10122 version_type=sunos
10123 need_lib_prefix=no
10124 need_version=no
10125 case $host_cpu in
10126 ia64*)
10127 shrext_cmds='.so'
10128 hardcode_into_libs=yes
10129 dynamic_linker="$host_os dld.so"
10130 shlibpath_var=LD_LIBRARY_PATH
10131 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
10132 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
10133 soname_spec='$libname$release$shared_ext$major'
10134 if test 32 = "$HPUX_IA64_MODE"; then
10135 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
10136 sys_lib_dlsearch_path_spec=/usr/lib/hpux32
10137 else
10138 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
10139 sys_lib_dlsearch_path_spec=/usr/lib/hpux64
10140 fi
10141 ;;
10142 hppa*64*)
10143 shrext_cmds='.sl'
10144 hardcode_into_libs=yes
10145 dynamic_linker="$host_os dld.sl"
10146 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
10147 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
10148 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
10149 soname_spec='$libname$release$shared_ext$major'
10150 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
10151 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
10152 ;;
10153 *)
10154 shrext_cmds='.sl'
10155 dynamic_linker="$host_os dld.sl"
10156 shlibpath_var=SHLIB_PATH
10157 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
10158 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
10159 soname_spec='$libname$release$shared_ext$major'
10160 ;;
10161 esac
10162 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
10163 postinstall_cmds='chmod 555 $lib'
10164 # or fails outright, so override atomically:
10165 install_override_mode=555
10166 ;;
10167
10168 interix[3-9]*)
10169 version_type=linux # correct to gnu/linux during the next big refactor
10170 need_lib_prefix=no
10171 need_version=no
10172 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
10173 soname_spec='$libname$release$shared_ext$major'
10174 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
10175 shlibpath_var=LD_LIBRARY_PATH
10176 shlibpath_overrides_runpath=no
10177 hardcode_into_libs=yes
10178 ;;
10179
10180 irix5* | irix6* | nonstopux*)
10181 case $host_os in
10182 nonstopux*) version_type=nonstopux ;;
10183 *)
10184 if test yes = "$lt_cv_prog_gnu_ld"; then
10185 version_type=linux # correct to gnu/linux during the next big refactor
10186 else
10187 version_type=irix
10188 fi ;;
10189 esac
10190 need_lib_prefix=no
10191 need_version=no
10192 soname_spec='$libname$release$shared_ext$major'
10193 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
10194 case $host_os in
10195 irix5* | nonstopux*)
10196 libsuff= shlibsuff=
10197 ;;
10198 *)
10199 case $LD in # libtool.m4 will add one of these switches to LD
10200 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
10201 libsuff= shlibsuff= libmagic=32-bit;;
10202 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
10203 libsuff=32 shlibsuff=N32 libmagic=N32;;
10204 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
10205 libsuff=64 shlibsuff=64 libmagic=64-bit;;
10206 *) libsuff= shlibsuff= libmagic=never-match;;
10207 esac
10208 ;;
10209 esac
10210 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
10211 shlibpath_overrides_runpath=no
10212 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
10213 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
10214 hardcode_into_libs=yes
10215 ;;
10216
10217 # No shared lib support for Linux oldld, aout, or coff.
10218 linux*oldld* | linux*aout* | linux*coff*)
10219 dynamic_linker=no
10220 ;;
10221
10222 linux*android*)
10223 version_type=none # Android doesn't support versioned libraries.
10224 need_lib_prefix=no
10225 need_version=no
10226 library_names_spec='$libname$release$shared_ext'
10227 soname_spec='$libname$release$shared_ext'
10228 finish_cmds=
10229 shlibpath_var=LD_LIBRARY_PATH
10230 shlibpath_overrides_runpath=yes
10231
10232 # This implies no fast_install, which is unacceptable.
10233 # Some rework will be needed to allow for fast_install
10234 # before this can be enabled.
10235 hardcode_into_libs=yes
10236
10237 dynamic_linker='Android linker'
10238 # Don't embed -rpath directories since the linker doesn't support them.
10239 hardcode_libdir_flag_spec='-L$libdir'
10240 ;;
10241
10242 # This must be glibc/ELF.
10243 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
10244 version_type=linux # correct to gnu/linux during the next big refactor
10245 need_lib_prefix=no
10246 need_version=no
10247 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
10248 soname_spec='$libname$release$shared_ext$major'
10249 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
10250 shlibpath_var=LD_LIBRARY_PATH
10251 shlibpath_overrides_runpath=no
10252
10253 # Some binutils ld are patched to set DT_RUNPATH
10254 if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
10255 $as_echo_n "(cached) " >&6
10256 else
10257 lt_cv_shlibpath_overrides_runpath=no
10258 save_LDFLAGS=$LDFLAGS
10259 save_libdir=$libdir
10260 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
10261 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
10262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10263 /* end confdefs.h. */
10264
10265 int
10266 main ()
10267 {
10268
10269 ;
10270 return 0;
10271 }
10272 _ACEOF
10273 if ac_fn_c_try_link "$LINENO"; then :
10274 if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
10275 lt_cv_shlibpath_overrides_runpath=yes
10276 fi
10277 fi
10278 rm -f core conftest.err conftest.$ac_objext \
10279 conftest$ac_exeext conftest.$ac_ext
10280 LDFLAGS=$save_LDFLAGS
10281 libdir=$save_libdir
10282
10283 fi
10284
10285 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
10286
10287 # This implies no fast_install, which is unacceptable.
10288 # Some rework will be needed to allow for fast_install
10289 # before this can be enabled.
10290 hardcode_into_libs=yes
10291
10292 # Ideally, we could use ldconfig to report *all* directores which are
10293 # searched for libraries, however this is still not possible. Aside from not
10294 # being certain /sbin/ldconfig is available, command
10295 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
10296 # even though it is searched at run-time. Try to do the best guess by
10297 # appending ld.so.conf contents (and includes) to the search path.
10298 if test -f /etc/ld.so.conf; then
10299 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' ' '`
10300 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
10301 fi
10302
10303 # We used to test for /lib/ld.so.1 and disable shared libraries on
10304 # powerpc, because MkLinux only supported shared libraries with the
10305 # GNU dynamic linker. Since this was broken with cross compilers,
10306 # most powerpc-linux boxes support dynamic linking these days and
10307 # people can always --disable-shared, the test was removed, and we
10308 # assume the GNU/Linux dynamic linker is in use.
10309 dynamic_linker='GNU/Linux ld.so'
10310 ;;
10311
10312 netbsdelf*-gnu)
10313 version_type=linux
10314 need_lib_prefix=no
10315 need_version=no
10316 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
10317 soname_spec='${libname}${release}${shared_ext}$major'
10318 shlibpath_var=LD_LIBRARY_PATH
10319 shlibpath_overrides_runpath=no
10320 hardcode_into_libs=yes
10321 dynamic_linker='NetBSD ld.elf_so'
10322 ;;
10323
10324 netbsd*)
10325 version_type=sunos
10326 need_lib_prefix=no
10327 need_version=no
10328 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
10329 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
10330 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
10331 dynamic_linker='NetBSD (a.out) ld.so'
10332 else
10333 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
10334 soname_spec='$libname$release$shared_ext$major'
10335 dynamic_linker='NetBSD ld.elf_so'
10336 fi
10337 shlibpath_var=LD_LIBRARY_PATH
10338 shlibpath_overrides_runpath=yes
10339 hardcode_into_libs=yes
10340 ;;
10341
10342 newsos6)
10343 version_type=linux # correct to gnu/linux during the next big refactor
10344 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
10345 shlibpath_var=LD_LIBRARY_PATH
10346 shlibpath_overrides_runpath=yes
10347 ;;
10348
10349 *nto* | *qnx*)
10350 version_type=qnx
10351 need_lib_prefix=no
10352 need_version=no
10353 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
10354 soname_spec='$libname$release$shared_ext$major'
10355 shlibpath_var=LD_LIBRARY_PATH
10356 shlibpath_overrides_runpath=no
10357 hardcode_into_libs=yes
10358 dynamic_linker='ldqnx.so'
10359 ;;
10360
10361 openbsd* | bitrig*)
10362 version_type=sunos
10363 sys_lib_dlsearch_path_spec=/usr/lib
10364 need_lib_prefix=no
10365 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
10366 need_version=no
10367 else
10368 need_version=yes
10369 fi
10370 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
10371 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
10372 shlibpath_var=LD_LIBRARY_PATH
10373 shlibpath_overrides_runpath=yes
10374 ;;
10375
10376 os2*)
10377 libname_spec='$name'
10378 version_type=windows
10379 shrext_cmds=.dll
10380 need_version=no
10381 need_lib_prefix=no
10382 # OS/2 can only load a DLL with a base name of 8 characters or less.
10383 soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
10384 v=$($ECHO $release$versuffix | tr -d .-);
10385 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
10386 $ECHO $n$v`$shared_ext'
10387 library_names_spec='${libname}_dll.$libext'
10388 dynamic_linker='OS/2 ld.exe'
10389 shlibpath_var=BEGINLIBPATH
10390 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
10391 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
10392 postinstall_cmds='base_file=`basename \$file`~
10393 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
10394 dldir=$destdir/`dirname \$dlpath`~
10395 test -d \$dldir || mkdir -p \$dldir~
10396 $install_prog $dir/$dlname \$dldir/$dlname~
10397 chmod a+x \$dldir/$dlname~
10398 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
10399 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
10400 fi'
10401 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
10402 dlpath=$dir/\$dldll~
10403 $RM \$dlpath'
10404 ;;
10405
10406 osf3* | osf4* | osf5*)
10407 version_type=osf
10408 need_lib_prefix=no
10409 need_version=no
10410 soname_spec='$libname$release$shared_ext$major'
10411 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
10412 shlibpath_var=LD_LIBRARY_PATH
10413 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
10414 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
10415 ;;
10416
10417 rdos*)
10418 dynamic_linker=no
10419 ;;
10420
10421 solaris*)
10422 version_type=linux # correct to gnu/linux during the next big refactor
10423 need_lib_prefix=no
10424 need_version=no
10425 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
10426 soname_spec='$libname$release$shared_ext$major'
10427 shlibpath_var=LD_LIBRARY_PATH
10428 shlibpath_overrides_runpath=yes
10429 hardcode_into_libs=yes
10430 # ldd complains unless libraries are executable
10431 postinstall_cmds='chmod +x $lib'
10432 ;;
10433
10434 sunos4*)
10435 version_type=sunos
10436 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
10437 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
10438 shlibpath_var=LD_LIBRARY_PATH
10439 shlibpath_overrides_runpath=yes
10440 if test yes = "$with_gnu_ld"; then
10441 need_lib_prefix=no
10442 fi
10443 need_version=yes
10444 ;;
10445
10446 sysv4 | sysv4.3*)
10447 version_type=linux # correct to gnu/linux during the next big refactor
10448 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
10449 soname_spec='$libname$release$shared_ext$major'
10450 shlibpath_var=LD_LIBRARY_PATH
10451 case $host_vendor in
10452 sni)
10453 shlibpath_overrides_runpath=no
10454 need_lib_prefix=no
10455 runpath_var=LD_RUN_PATH
10456 ;;
10457 siemens)
10458 need_lib_prefix=no
10459 ;;
10460 motorola)
10461 need_lib_prefix=no
10462 need_version=no
10463 shlibpath_overrides_runpath=no
10464 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
10465 ;;
10466 esac
10467 ;;
10468
10469 sysv4*MP*)
10470 if test -d /usr/nec; then
10471 version_type=linux # correct to gnu/linux during the next big refactor
10472 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
10473 soname_spec='$libname$shared_ext.$major'
10474 shlibpath_var=LD_LIBRARY_PATH
10475 fi
10476 ;;
10477
10478 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
10479 version_type=sco
10480 need_lib_prefix=no
10481 need_version=no
10482 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
10483 soname_spec='$libname$release$shared_ext$major'
10484 shlibpath_var=LD_LIBRARY_PATH
10485 shlibpath_overrides_runpath=yes
10486 hardcode_into_libs=yes
10487 if test yes = "$with_gnu_ld"; then
10488 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
10489 else
10490 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
10491 case $host_os in
10492 sco3.2v5*)
10493 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
10494 ;;
10495 esac
10496 fi
10497 sys_lib_dlsearch_path_spec='/usr/lib'
10498 ;;
10499
10500 tpf*)
10501 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
10502 version_type=linux # correct to gnu/linux during the next big refactor
10503 need_lib_prefix=no
10504 need_version=no
10505 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
10506 shlibpath_var=LD_LIBRARY_PATH
10507 shlibpath_overrides_runpath=no
10508 hardcode_into_libs=yes
10509 ;;
10510
10511 uts4*)
10512 version_type=linux # correct to gnu/linux during the next big refactor
10513 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
10514 soname_spec='$libname$release$shared_ext$major'
10515 shlibpath_var=LD_LIBRARY_PATH
10516 ;;
10517
10518 *)
10519 dynamic_linker=no
10520 ;;
10521 esac
10522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
10523 $as_echo "$dynamic_linker" >&6; }
10524 test no = "$dynamic_linker" && can_build_shared=no
10525
10526 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
10527 if test yes = "$GCC"; then
10528 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
10529 fi
10530
10531 if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
10532 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
10533 fi
10534
10535 if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
10536 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
10537 fi
10538
10539 # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
10540 configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
10541
10542 # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
10543 func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
10544
10545 # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
10546 configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
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
10602
10603
10604
10605
10606
10607
10608
10609
10610
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
10645 $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
10646 hardcode_action=
10647 if test -n "$hardcode_libdir_flag_spec" ||
10648 test -n "$runpath_var" ||
10649 test yes = "$hardcode_automatic"; then
10650
10651 # We can hardcode non-existent directories.
10652 if test no != "$hardcode_direct" &&
10653 # If the only mechanism to avoid hardcoding is shlibpath_var, we
10654 # have to relink, otherwise we might link with an installed library
10655 # when we should be linking with a yet-to-be-installed one
10656 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
10657 test no != "$hardcode_minus_L"; then
10658 # Linking always hardcodes the temporary library directory.
10659 hardcode_action=relink
10660 else
10661 # We can link without hardcoding, and we can hardcode nonexisting dirs.
10662 hardcode_action=immediate
10663 fi
10664 else
10665 # We cannot hardcode anything, or else we can only hardcode existing
10666 # directories.
10667 hardcode_action=unsupported
10668 fi
10669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
10670 $as_echo "$hardcode_action" >&6; }
10671
10672 if test relink = "$hardcode_action" ||
10673 test yes = "$inherit_rpath"; then
10674 # Fast installation is not supported
10675 enable_fast_install=no
10676 elif test yes = "$shlibpath_overrides_runpath" ||
10677 test no = "$enable_shared"; then
10678 # Fast installation is not necessary
10679 enable_fast_install=needless
10680 fi
10681
10682
10683
10684
10685
10686
10687 if test yes != "$enable_dlopen"; then
10688 enable_dlopen=unknown
10689 enable_dlopen_self=unknown
10690 enable_dlopen_self_static=unknown
10691 else
10692 lt_cv_dlopen=no
10693 lt_cv_dlopen_libs=
10694
10695 case $host_os in
10696 beos*)
10697 lt_cv_dlopen=load_add_on
10698 lt_cv_dlopen_libs=
10699 lt_cv_dlopen_self=yes
10700 ;;
10701
10702 mingw* | pw32* | cegcc*)
10703 lt_cv_dlopen=LoadLibrary
10704 lt_cv_dlopen_libs=
10705 ;;
10706
10707 cygwin*)
10708 lt_cv_dlopen=dlopen
10709 lt_cv_dlopen_libs=
10710 ;;
10711
10712 darwin*)
10713 # if libdl is installed we need to link against it
10714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
10715 $as_echo_n "checking for dlopen in -ldl... " >&6; }
10716 if ${ac_cv_lib_dl_dlopen+:} false; then :
10717 $as_echo_n "(cached) " >&6
10718 else
10719 ac_check_lib_save_LIBS=$LIBS
10720 LIBS="-ldl $LIBS"
10721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10722 /* end confdefs.h. */
10723
10724 /* Override any GCC internal prototype to avoid an error.
10725 Use char because int might match the return type of a GCC
10726 builtin and then its argument prototype would still apply. */
10727 #ifdef __cplusplus
10728 extern "C"
10729 #endif
10730 char dlopen ();
10731 int
10732 main ()
10733 {
10734 return dlopen ();
10735 ;
10736 return 0;
10737 }
10738 _ACEOF
10739 if ac_fn_c_try_link "$LINENO"; then :
10740 ac_cv_lib_dl_dlopen=yes
10741 else
10742 ac_cv_lib_dl_dlopen=no
10743 fi
10744 rm -f core conftest.err conftest.$ac_objext \
10745 conftest$ac_exeext conftest.$ac_ext
10746 LIBS=$ac_check_lib_save_LIBS
10747 fi
10748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
10749 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
10750 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
10751 lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
10752 else
10753
10754 lt_cv_dlopen=dyld
10755 lt_cv_dlopen_libs=
10756 lt_cv_dlopen_self=yes
10757
10758 fi
10759
10760 ;;
10761
10762 tpf*)
10763 # Don't try to run any link tests for TPF. We know it's impossible
10764 # because TPF is a cross-compiler, and we know how we open DSOs.
10765 lt_cv_dlopen=dlopen
10766 lt_cv_dlopen_libs=
10767 lt_cv_dlopen_self=no
10768 ;;
10769
10770 *)
10771 ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
10772 if test "x$ac_cv_func_shl_load" = xyes; then :
10773 lt_cv_dlopen=shl_load
10774 else
10775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
10776 $as_echo_n "checking for shl_load in -ldld... " >&6; }
10777 if ${ac_cv_lib_dld_shl_load+:} false; then :
10778 $as_echo_n "(cached) " >&6
10779 else
10780 ac_check_lib_save_LIBS=$LIBS
10781 LIBS="-ldld $LIBS"
10782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10783 /* end confdefs.h. */
10784
10785 /* Override any GCC internal prototype to avoid an error.
10786 Use char because int might match the return type of a GCC
10787 builtin and then its argument prototype would still apply. */
10788 #ifdef __cplusplus
10789 extern "C"
10790 #endif
10791 char shl_load ();
10792 int
10793 main ()
10794 {
10795 return shl_load ();
10796 ;
10797 return 0;
10798 }
10799 _ACEOF
10800 if ac_fn_c_try_link "$LINENO"; then :
10801 ac_cv_lib_dld_shl_load=yes
10802 else
10803 ac_cv_lib_dld_shl_load=no
10804 fi
10805 rm -f core conftest.err conftest.$ac_objext \
10806 conftest$ac_exeext conftest.$ac_ext
10807 LIBS=$ac_check_lib_save_LIBS
10808 fi
10809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
10810 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
10811 if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
10812 lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
10813 else
10814 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
10815 if test "x$ac_cv_func_dlopen" = xyes; then :
10816 lt_cv_dlopen=dlopen
10817 else
10818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
10819 $as_echo_n "checking for dlopen in -ldl... " >&6; }
10820 if ${ac_cv_lib_dl_dlopen+:} false; then :
10821 $as_echo_n "(cached) " >&6
10822 else
10823 ac_check_lib_save_LIBS=$LIBS
10824 LIBS="-ldl $LIBS"
10825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10826 /* end confdefs.h. */
10827
10828 /* Override any GCC internal prototype to avoid an error.
10829 Use char because int might match the return type of a GCC
10830 builtin and then its argument prototype would still apply. */
10831 #ifdef __cplusplus
10832 extern "C"
10833 #endif
10834 char dlopen ();
10835 int
10836 main ()
10837 {
10838 return dlopen ();
10839 ;
10840 return 0;
10841 }
10842 _ACEOF
10843 if ac_fn_c_try_link "$LINENO"; then :
10844 ac_cv_lib_dl_dlopen=yes
10845 else
10846 ac_cv_lib_dl_dlopen=no
10847 fi
10848 rm -f core conftest.err conftest.$ac_objext \
10849 conftest$ac_exeext conftest.$ac_ext
10850 LIBS=$ac_check_lib_save_LIBS
10851 fi
10852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
10853 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
10854 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
10855 lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
10856 else
10857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
10858 $as_echo_n "checking for dlopen in -lsvld... " >&6; }
10859 if ${ac_cv_lib_svld_dlopen+:} false; then :
10860 $as_echo_n "(cached) " >&6
10861 else
10862 ac_check_lib_save_LIBS=$LIBS
10863 LIBS="-lsvld $LIBS"
10864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10865 /* end confdefs.h. */
10866
10867 /* Override any GCC internal prototype to avoid an error.
10868 Use char because int might match the return type of a GCC
10869 builtin and then its argument prototype would still apply. */
10870 #ifdef __cplusplus
10871 extern "C"
10872 #endif
10873 char dlopen ();
10874 int
10875 main ()
10876 {
10877 return dlopen ();
10878 ;
10879 return 0;
10880 }
10881 _ACEOF
10882 if ac_fn_c_try_link "$LINENO"; then :
10883 ac_cv_lib_svld_dlopen=yes
10884 else
10885 ac_cv_lib_svld_dlopen=no
10886 fi
10887 rm -f core conftest.err conftest.$ac_objext \
10888 conftest$ac_exeext conftest.$ac_ext
10889 LIBS=$ac_check_lib_save_LIBS
10890 fi
10891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
10892 $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
10893 if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
10894 lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
10895 else
10896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
10897 $as_echo_n "checking for dld_link in -ldld... " >&6; }
10898 if ${ac_cv_lib_dld_dld_link+:} false; then :
10899 $as_echo_n "(cached) " >&6
10900 else
10901 ac_check_lib_save_LIBS=$LIBS
10902 LIBS="-ldld $LIBS"
10903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10904 /* end confdefs.h. */
10905
10906 /* Override any GCC internal prototype to avoid an error.
10907 Use char because int might match the return type of a GCC
10908 builtin and then its argument prototype would still apply. */
10909 #ifdef __cplusplus
10910 extern "C"
10911 #endif
10912 char dld_link ();
10913 int
10914 main ()
10915 {
10916 return dld_link ();
10917 ;
10918 return 0;
10919 }
10920 _ACEOF
10921 if ac_fn_c_try_link "$LINENO"; then :
10922 ac_cv_lib_dld_dld_link=yes
10923 else
10924 ac_cv_lib_dld_dld_link=no
10925 fi
10926 rm -f core conftest.err conftest.$ac_objext \
10927 conftest$ac_exeext conftest.$ac_ext
10928 LIBS=$ac_check_lib_save_LIBS
10929 fi
10930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
10931 $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
10932 if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
10933 lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
10934 fi
10935
10936
10937 fi
10938
10939
10940 fi
10941
10942
10943 fi
10944
10945
10946 fi
10947
10948
10949 fi
10950
10951 ;;
10952 esac
10953
10954 if test no = "$lt_cv_dlopen"; then
10955 enable_dlopen=no
10956 else
10957 enable_dlopen=yes
10958 fi
10959
10960 case $lt_cv_dlopen in
10961 dlopen)
10962 save_CPPFLAGS=$CPPFLAGS
10963 test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
10964
10965 save_LDFLAGS=$LDFLAGS
10966 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
10967
10968 save_LIBS=$LIBS
10969 LIBS="$lt_cv_dlopen_libs $LIBS"
10970
10971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
10972 $as_echo_n "checking whether a program can dlopen itself... " >&6; }
10973 if ${lt_cv_dlopen_self+:} false; then :
10974 $as_echo_n "(cached) " >&6
10975 else
10976 if test yes = "$cross_compiling"; then :
10977 lt_cv_dlopen_self=cross
10978 else
10979 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10980 lt_status=$lt_dlunknown
10981 cat > conftest.$ac_ext <<_LT_EOF
10982 #line $LINENO "configure"
10983 #include "confdefs.h"
10984
10985 #if HAVE_DLFCN_H
10986 #include <dlfcn.h>
10987 #endif
10988
10989 #include <stdio.h>
10990
10991 #ifdef RTLD_GLOBAL
10992 # define LT_DLGLOBAL RTLD_GLOBAL
10993 #else
10994 # ifdef DL_GLOBAL
10995 # define LT_DLGLOBAL DL_GLOBAL
10996 # else
10997 # define LT_DLGLOBAL 0
10998 # endif
10999 #endif
11000
11001 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
11002 find out it does not work in some platform. */
11003 #ifndef LT_DLLAZY_OR_NOW
11004 # ifdef RTLD_LAZY
11005 # define LT_DLLAZY_OR_NOW RTLD_LAZY
11006 # else
11007 # ifdef DL_LAZY
11008 # define LT_DLLAZY_OR_NOW DL_LAZY
11009 # else
11010 # ifdef RTLD_NOW
11011 # define LT_DLLAZY_OR_NOW RTLD_NOW
11012 # else
11013 # ifdef DL_NOW
11014 # define LT_DLLAZY_OR_NOW DL_NOW
11015 # else
11016 # define LT_DLLAZY_OR_NOW 0
11017 # endif
11018 # endif
11019 # endif
11020 # endif
11021 #endif
11022
11023 /* When -fvisibility=hidden is used, assume the code has been annotated
11024 correspondingly for the symbols needed. */
11025 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
11026 int fnord () __attribute__((visibility("default")));
11027 #endif
11028
11029 int fnord () { return 42; }
11030 int main ()
11031 {
11032 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
11033 int status = $lt_dlunknown;
11034
11035 if (self)
11036 {
11037 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
11038 else
11039 {
11040 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
11041 else puts (dlerror ());
11042 }
11043 /* dlclose (self); */
11044 }
11045 else
11046 puts (dlerror ());
11047
11048 return status;
11049 }
11050 _LT_EOF
11051 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
11052 (eval $ac_link) 2>&5
11053 ac_status=$?
11054 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11055 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
11056 (./conftest; exit; ) >&5 2>/dev/null
11057 lt_status=$?
11058 case x$lt_status in
11059 x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
11060 x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
11061 x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
11062 esac
11063 else :
11064 # compilation failed
11065 lt_cv_dlopen_self=no
11066 fi
11067 fi
11068 rm -fr conftest*
11069
11070
11071 fi
11072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
11073 $as_echo "$lt_cv_dlopen_self" >&6; }
11074
11075 if test yes = "$lt_cv_dlopen_self"; then
11076 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
11077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
11078 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
11079 if ${lt_cv_dlopen_self_static+:} false; then :
11080 $as_echo_n "(cached) " >&6
11081 else
11082 if test yes = "$cross_compiling"; then :
11083 lt_cv_dlopen_self_static=cross
11084 else
11085 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
11086 lt_status=$lt_dlunknown
11087 cat > conftest.$ac_ext <<_LT_EOF
11088 #line $LINENO "configure"
11089 #include "confdefs.h"
11090
11091 #if HAVE_DLFCN_H
11092 #include <dlfcn.h>
11093 #endif
11094
11095 #include <stdio.h>
11096
11097 #ifdef RTLD_GLOBAL
11098 # define LT_DLGLOBAL RTLD_GLOBAL
11099 #else
11100 # ifdef DL_GLOBAL
11101 # define LT_DLGLOBAL DL_GLOBAL
11102 # else
11103 # define LT_DLGLOBAL 0
11104 # endif
11105 #endif
11106
11107 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
11108 find out it does not work in some platform. */
11109 #ifndef LT_DLLAZY_OR_NOW
11110 # ifdef RTLD_LAZY
11111 # define LT_DLLAZY_OR_NOW RTLD_LAZY
11112 # else
11113 # ifdef DL_LAZY
11114 # define LT_DLLAZY_OR_NOW DL_LAZY
11115 # else
11116 # ifdef RTLD_NOW
11117 # define LT_DLLAZY_OR_NOW RTLD_NOW
11118 # else
11119 # ifdef DL_NOW
11120 # define LT_DLLAZY_OR_NOW DL_NOW
11121 # else
11122 # define LT_DLLAZY_OR_NOW 0
11123 # endif
11124 # endif
11125 # endif
11126 # endif
11127 #endif
11128
11129 /* When -fvisibility=hidden is used, assume the code has been annotated
11130 correspondingly for the symbols needed. */
11131 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
11132 int fnord () __attribute__((visibility("default")));
11133 #endif
11134
11135 int fnord () { return 42; }
11136 int main ()
11137 {
11138 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
11139 int status = $lt_dlunknown;
11140
11141 if (self)
11142 {
11143 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
11144 else
11145 {
11146 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
11147 else puts (dlerror ());
11148 }
11149 /* dlclose (self); */
11150 }
11151 else
11152 puts (dlerror ());
11153
11154 return status;
11155 }
11156 _LT_EOF
11157 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
11158 (eval $ac_link) 2>&5
11159 ac_status=$?
11160 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11161 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
11162 (./conftest; exit; ) >&5 2>/dev/null
11163 lt_status=$?
11164 case x$lt_status in
11165 x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
11166 x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
11167 x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
11168 esac
11169 else :
11170 # compilation failed
11171 lt_cv_dlopen_self_static=no
11172 fi
11173 fi
11174 rm -fr conftest*
11175
11176
11177 fi
11178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
11179 $as_echo "$lt_cv_dlopen_self_static" >&6; }
11180 fi
11181
11182 CPPFLAGS=$save_CPPFLAGS
11183 LDFLAGS=$save_LDFLAGS
11184 LIBS=$save_LIBS
11185 ;;
11186 esac
11187
11188 case $lt_cv_dlopen_self in
11189 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
11190 *) enable_dlopen_self=unknown ;;
11191 esac
11192
11193 case $lt_cv_dlopen_self_static in
11194 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
11195 *) enable_dlopen_self_static=unknown ;;
11196 esac
11197 fi
11198
11199
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215 striplib=
11216 old_striplib=
11217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
11218 $as_echo_n "checking whether stripping libraries is possible... " >&6; }
11219 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
11220 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
11221 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
11222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11223 $as_echo "yes" >&6; }
11224 else
11225 # FIXME - insert some real tests, host_os isn't really good enough
11226 case $host_os in
11227 darwin*)
11228 if test -n "$STRIP"; then
11229 striplib="$STRIP -x"
11230 old_striplib="$STRIP -S"
11231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11232 $as_echo "yes" >&6; }
11233 else
11234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11235 $as_echo "no" >&6; }
11236 fi
11237 ;;
11238 *)
11239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11240 $as_echo "no" >&6; }
11241 ;;
11242 esac
11243 fi
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256 # Report what library types will actually be built
11257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
11258 $as_echo_n "checking if libtool supports shared libraries... " >&6; }
11259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
11260 $as_echo "$can_build_shared" >&6; }
11261
11262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
11263 $as_echo_n "checking whether to build shared libraries... " >&6; }
11264 test no = "$can_build_shared" && enable_shared=no
11265
11266 # On AIX, shared libraries and static libraries use the same namespace, and
11267 # are all built from PIC.
11268 case $host_os in
11269 aix3*)
11270 test yes = "$enable_shared" && enable_static=no
11271 if test -n "$RANLIB"; then
11272 archive_cmds="$archive_cmds~\$RANLIB \$lib"
11273 postinstall_cmds='$RANLIB $lib'
11274 fi
11275 ;;
11276
11277 aix[4-9]*)
11278 if test ia64 != "$host_cpu"; then
11279 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
11280 yes,aix,yes) ;; # shared object as lib.so file only
11281 yes,svr4,*) ;; # shared object as lib.so archive member only
11282 yes,*) enable_static=no ;; # shared object in lib.a archive as well
11283 esac
11284 fi
11285 ;;
11286 esac
11287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
11288 $as_echo "$enable_shared" >&6; }
11289
11290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
11291 $as_echo_n "checking whether to build static libraries... " >&6; }
11292 # Make sure either enable_shared or enable_static is yes.
11293 test yes = "$enable_shared" || enable_static=yes
11294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
11295 $as_echo "$enable_static" >&6; }
11296
11297
11298
11299
11300 fi
11301 ac_ext=c
11302 ac_cpp='$CPP $CPPFLAGS'
11303 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11304 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11305 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11306
11307 CC=$lt_save_CC
11308
11309
11310
11311
11312
11313
11314
11315
11316
11317
11318
11319
11320
11321
11322
11323 ac_config_commands="$ac_config_commands libtool"
11324
11325
11326
11327
11328 # Only expand once:
11329
11330
11331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sqrt" >&5
11332 $as_echo_n "checking for library containing sqrt... " >&6; }
11333 if ${ac_cv_search_sqrt+:} false; then :
11334 $as_echo_n "(cached) " >&6
11335 else
11336 ac_func_search_save_LIBS=$LIBS
11337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11338 /* end confdefs.h. */
11339
11340 /* Override any GCC internal prototype to avoid an error.
11341 Use char because int might match the return type of a GCC
11342 builtin and then its argument prototype would still apply. */
11343 #ifdef __cplusplus
11344 extern "C"
11345 #endif
11346 char sqrt ();
11347 int
11348 main ()
11349 {
11350 return sqrt ();
11351 ;
11352 return 0;
11353 }
11354 _ACEOF
11355 for ac_lib in '' m; do
11356 if test -z "$ac_lib"; then
11357 ac_res="none required"
11358 else
11359 ac_res=-l$ac_lib
11360 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11361 fi
11362 if ac_fn_c_try_link "$LINENO"; then :
11363 ac_cv_search_sqrt=$ac_res
11364 fi
11365 rm -f core conftest.err conftest.$ac_objext \
11366 conftest$ac_exeext
11367 if ${ac_cv_search_sqrt+:} false; then :
11368 break
11369 fi
11370 done
11371 if ${ac_cv_search_sqrt+:} false; then :
11372
11373 else
11374 ac_cv_search_sqrt=no
11375 fi
11376 rm conftest.$ac_ext
11377 LIBS=$ac_func_search_save_LIBS
11378 fi
11379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sqrt" >&5
11380 $as_echo "$ac_cv_search_sqrt" >&6; }
11381 ac_res=$ac_cv_search_sqrt
11382 if test "$ac_res" != no; then :
11383 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11384
11385 fi
11386
11387
11388 am__api_version='1.16'
11389
11390 # Find a good install program. We prefer a C program (faster),
11391 # so one script is as good as another. But avoid the broken or
11392 # incompatible versions:
11393 # SysV /etc/install, /usr/sbin/install
11394 # SunOS /usr/etc/install
11395 # IRIX /sbin/install
11396 # AIX /bin/install
11397 # AmigaOS /C/install, which installs bootblocks on floppy discs
11398 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
11399 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
11400 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
11401 # OS/2's system install, which has a completely different semantic
11402 # ./install, which can be erroneously created by make from ./install.sh.
11403 # Reject install programs that cannot install multiple files.
11404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
11405 $as_echo_n "checking for a BSD-compatible install... " >&6; }
11406 if test -z "$INSTALL"; then
11407 if ${ac_cv_path_install+:} false; then :
11408 $as_echo_n "(cached) " >&6
11409 else
11410 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11411 for as_dir in $PATH
11412 do
11413 IFS=$as_save_IFS
11414 test -z "$as_dir" && as_dir=.
11415 # Account for people who put trailing slashes in PATH elements.
11416 case $as_dir/ in #((
11417 ./ | .// | /[cC]/* | \
11418 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
11419 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
11420 /usr/ucb/* ) ;;
11421 *)
11422 # OSF1 and SCO ODT 3.0 have their own names for install.
11423 # Don't use installbsd from OSF since it installs stuff as root
11424 # by default.
11425 for ac_prog in ginstall scoinst install; do
11426 for ac_exec_ext in '' $ac_executable_extensions; do
11427 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
11428 if test $ac_prog = install &&
11429 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
11430 # AIX install. It has an incompatible calling convention.
11431 :
11432 elif test $ac_prog = install &&
11433 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
11434 # program-specific install script used by HP pwplus--don't use.
11435 :
11436 else
11437 rm -rf conftest.one conftest.two conftest.dir
11438 echo one > conftest.one
11439 echo two > conftest.two
11440 mkdir conftest.dir
11441 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
11442 test -s conftest.one && test -s conftest.two &&
11443 test -s conftest.dir/conftest.one &&
11444 test -s conftest.dir/conftest.two
11445 then
11446 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
11447 break 3
11448 fi
11449 fi
11450 fi
11451 done
11452 done
11453 ;;
11454 esac
11455
11456 done
11457 IFS=$as_save_IFS
11458
11459 rm -rf conftest.one conftest.two conftest.dir
11460
11461 fi
11462 if test "${ac_cv_path_install+set}" = set; then
11463 INSTALL=$ac_cv_path_install
11464 else
11465 # As a last resort, use the slow shell script. Don't cache a
11466 # value for INSTALL within a source directory, because that will
11467 # break other packages using the cache if that directory is
11468 # removed, or if the value is a relative name.
11469 INSTALL=$ac_install_sh
11470 fi
11471 fi
11472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
11473 $as_echo "$INSTALL" >&6; }
11474
11475 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
11476 # It thinks the first close brace ends the variable substitution.
11477 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
11478
11479 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
11480
11481 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
11482
11483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
11484 $as_echo_n "checking whether build environment is sane... " >&6; }
11485 # Reject unsafe characters in $srcdir or the absolute working directory
11486 # name. Accept space and tab only in the latter.
11487 am_lf='
11488 '
11489 case `pwd` in
11490 *[\\\"\#\$\&\'\`$am_lf]*)
11491 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
11492 esac
11493 case $srcdir in
11494 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
11495 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
11496 esac
11497
11498 # Do 'set' in a subshell so we don't clobber the current shell's
11499 # arguments. Must try -L first in case configure is actually a
11500 # symlink; some systems play weird games with the mod time of symlinks
11501 # (eg FreeBSD returns the mod time of the symlink's containing
11502 # directory).
11503 if (
11504 am_has_slept=no
11505 for am_try in 1 2; do
11506 echo "timestamp, slept: $am_has_slept" > conftest.file
11507 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
11508 if test "$*" = "X"; then
11509 # -L didn't work.
11510 set X `ls -t "$srcdir/configure" conftest.file`
11511 fi
11512 if test "$*" != "X $srcdir/configure conftest.file" \
11513 && test "$*" != "X conftest.file $srcdir/configure"; then
11514
11515 # If neither matched, then we have a broken ls. This can happen
11516 # if, for instance, CONFIG_SHELL is bash and it inherits a
11517 # broken ls alias from the environment. This has actually
11518 # happened. Such a system could not be considered "sane".
11519 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
11520 alias in your environment" "$LINENO" 5
11521 fi
11522 if test "$2" = conftest.file || test $am_try -eq 2; then
11523 break
11524 fi
11525 # Just in case.
11526 sleep 1
11527 am_has_slept=yes
11528 done
11529 test "$2" = conftest.file
11530 )
11531 then
11532 # Ok.
11533 :
11534 else
11535 as_fn_error $? "newly created file is older than distributed files!
11536 Check your system clock" "$LINENO" 5
11537 fi
11538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11539 $as_echo "yes" >&6; }
11540 # If we didn't sleep, we still need to ensure time stamps of config.status and
11541 # generated files are strictly newer.
11542 am_sleep_pid=
11543 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
11544 ( sleep 1 ) &
11545 am_sleep_pid=$!
11546 fi
11547
11548 rm -f conftest.file
11549
11550 test "$program_prefix" != NONE &&
11551 program_transform_name="s&^&$program_prefix&;$program_transform_name"
11552 # Use a double $ so make ignores it.
11553 test "$program_suffix" != NONE &&
11554 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
11555 # Double any \ or $.
11556 # By default was `s,x,x', remove it if useless.
11557 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
11558 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
11559
11560 if test x"${MISSING+set}" != xset; then
11561 MISSING="\${SHELL} '$am_aux_dir/missing'"
11562 fi
11563 # Use eval to expand $SHELL
11564 if eval "$MISSING --is-lightweight"; then
11565 am_missing_run="$MISSING "
11566 else
11567 am_missing_run=
11568 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
11569 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
11570 fi
11571
11572 if test x"${install_sh+set}" != xset; then
11573 case $am_aux_dir in
11574 *\ * | *\ *)
11575 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
11576 *)
11577 install_sh="\${SHELL} $am_aux_dir/install-sh"
11578 esac
11579 fi
11580
11581 # Installed binaries are usually stripped using 'strip' when the user
11582 # run "make install-strip". However 'strip' might not be the right
11583 # tool to use in cross-compilation environments, therefore Automake
11584 # will honor the 'STRIP' environment variable to overrule this program.
11585 if test "$cross_compiling" != no; then
11586 if test -n "$ac_tool_prefix"; then
11587 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
11588 set dummy ${ac_tool_prefix}strip; ac_word=$2
11589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11590 $as_echo_n "checking for $ac_word... " >&6; }
11591 if ${ac_cv_prog_STRIP+:} false; then :
11592 $as_echo_n "(cached) " >&6
11593 else
11594 if test -n "$STRIP"; then
11595 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
11596 else
11597 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11598 for as_dir in $PATH
11599 do
11600 IFS=$as_save_IFS
11601 test -z "$as_dir" && as_dir=.
11602 for ac_exec_ext in '' $ac_executable_extensions; do
11603 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11604 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
11605 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11606 break 2
11607 fi
11608 done
11609 done
11610 IFS=$as_save_IFS
11611
11612 fi
11613 fi
11614 STRIP=$ac_cv_prog_STRIP
11615 if test -n "$STRIP"; then
11616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
11617 $as_echo "$STRIP" >&6; }
11618 else
11619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11620 $as_echo "no" >&6; }
11621 fi
11622
11623
11624 fi
11625 if test -z "$ac_cv_prog_STRIP"; then
11626 ac_ct_STRIP=$STRIP
11627 # Extract the first word of "strip", so it can be a program name with args.
11628 set dummy strip; ac_word=$2
11629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11630 $as_echo_n "checking for $ac_word... " >&6; }
11631 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
11632 $as_echo_n "(cached) " >&6
11633 else
11634 if test -n "$ac_ct_STRIP"; then
11635 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
11636 else
11637 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11638 for as_dir in $PATH
11639 do
11640 IFS=$as_save_IFS
11641 test -z "$as_dir" && as_dir=.
11642 for ac_exec_ext in '' $ac_executable_extensions; do
11643 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11644 ac_cv_prog_ac_ct_STRIP="strip"
11645 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11646 break 2
11647 fi
11648 done
11649 done
11650 IFS=$as_save_IFS
11651
11652 fi
11653 fi
11654 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
11655 if test -n "$ac_ct_STRIP"; then
11656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
11657 $as_echo "$ac_ct_STRIP" >&6; }
11658 else
11659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11660 $as_echo "no" >&6; }
11661 fi
11662
11663 if test "x$ac_ct_STRIP" = x; then
11664 STRIP=":"
11665 else
11666 case $cross_compiling:$ac_tool_warned in
11667 yes:)
11668 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11669 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11670 ac_tool_warned=yes ;;
11671 esac
11672 STRIP=$ac_ct_STRIP
11673 fi
11674 else
11675 STRIP="$ac_cv_prog_STRIP"
11676 fi
11677
11678 fi
11679 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
11680
11681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
11682 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
11683 if test -z "$MKDIR_P"; then
11684 if ${ac_cv_path_mkdir+:} false; then :
11685 $as_echo_n "(cached) " >&6
11686 else
11687 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11688 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
11689 do
11690 IFS=$as_save_IFS
11691 test -z "$as_dir" && as_dir=.
11692 for ac_prog in mkdir gmkdir; do
11693 for ac_exec_ext in '' $ac_executable_extensions; do
11694 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
11695 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
11696 'mkdir (GNU coreutils) '* | \
11697 'mkdir (coreutils) '* | \
11698 'mkdir (fileutils) '4.1*)
11699 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
11700 break 3;;
11701 esac
11702 done
11703 done
11704 done
11705 IFS=$as_save_IFS
11706
11707 fi
11708
11709 test -d ./--version && rmdir ./--version
11710 if test "${ac_cv_path_mkdir+set}" = set; then
11711 MKDIR_P="$ac_cv_path_mkdir -p"
11712 else
11713 # As a last resort, use the slow shell script. Don't cache a
11714 # value for MKDIR_P within a source directory, because that will
11715 # break other packages using the cache if that directory is
11716 # removed, or if the value is a relative name.
11717 MKDIR_P="$ac_install_sh -d"
11718 fi
11719 fi
11720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
11721 $as_echo "$MKDIR_P" >&6; }
11722
11723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
11724 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
11725 set x ${MAKE-make}
11726 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
11727 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
11728 $as_echo_n "(cached) " >&6
11729 else
11730 cat >conftest.make <<\_ACEOF
11731 SHELL = /bin/sh
11732 all:
11733 @echo '@@@%%%=$(MAKE)=@@@%%%'
11734 _ACEOF
11735 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
11736 case `${MAKE-make} -f conftest.make 2>/dev/null` in
11737 *@@@%%%=?*=@@@%%%*)
11738 eval ac_cv_prog_make_${ac_make}_set=yes;;
11739 *)
11740 eval ac_cv_prog_make_${ac_make}_set=no;;
11741 esac
11742 rm -f conftest.make
11743 fi
11744 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
11745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11746 $as_echo "yes" >&6; }
11747 SET_MAKE=
11748 else
11749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11750 $as_echo "no" >&6; }
11751 SET_MAKE="MAKE=${MAKE-make}"
11752 fi
11753
11754 rm -rf .tst 2>/dev/null
11755 mkdir .tst 2>/dev/null
11756 if test -d .tst; then
11757 am__leading_dot=.
11758 else
11759 am__leading_dot=_
11760 fi
11761 rmdir .tst 2>/dev/null
11762
11763 DEPDIR="${am__leading_dot}deps"
11764
11765 ac_config_commands="$ac_config_commands depfiles"
11766
11767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
11768 $as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; }
11769 cat > confinc.mk << 'END'
11770 am__doit:
11771 @echo this is the am__doit target >confinc.out
11772 .PHONY: am__doit
11773 END
11774 am__include="#"
11775 am__quote=
11776 # BSD make does it like this.
11777 echo '.include "confinc.mk" # ignored' > confmf.BSD
11778 # Other make implementations (GNU, Solaris 10, AIX) do it like this.
11779 echo 'include confinc.mk # ignored' > confmf.GNU
11780 _am_result=no
11781 for s in GNU BSD; do
11782 { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
11783 (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
11784 ac_status=$?
11785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11786 (exit $ac_status); }
11787 case $?:`cat confinc.out 2>/dev/null` in #(
11788 '0:this is the am__doit target') :
11789 case $s in #(
11790 BSD) :
11791 am__include='.include' am__quote='"' ;; #(
11792 *) :
11793 am__include='include' am__quote='' ;;
11794 esac ;; #(
11795 *) :
11796 ;;
11797 esac
11798 if test "$am__include" != "#"; then
11799 _am_result="yes ($s style)"
11800 break
11801 fi
11802 done
11803 rm -f confinc.* confmf.*
11804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
11805 $as_echo "${_am_result}" >&6; }
11806
11807 # Check whether --enable-dependency-tracking was given.
11808 if test "${enable_dependency_tracking+set}" = set; then :
11809 enableval=$enable_dependency_tracking;
11810 fi
11811
11812 if test "x$enable_dependency_tracking" != xno; then
11813 am_depcomp="$ac_aux_dir/depcomp"
11814 AMDEPBACKSLASH='\'
11815 am__nodep='_no'
11816 fi
11817 if test "x$enable_dependency_tracking" != xno; then
11818 AMDEP_TRUE=
11819 AMDEP_FALSE='#'
11820 else
11821 AMDEP_TRUE='#'
11822 AMDEP_FALSE=
11823 fi
11824
11825
11826 # Check whether --enable-silent-rules was given.
11827 if test "${enable_silent_rules+set}" = set; then :
11828 enableval=$enable_silent_rules;
11829 fi
11830
11831 case $enable_silent_rules in # (((
11832 yes) AM_DEFAULT_VERBOSITY=0;;
11833 no) AM_DEFAULT_VERBOSITY=1;;
11834 *) AM_DEFAULT_VERBOSITY=1;;
11835 esac
11836 am_make=${MAKE-make}
11837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
11838 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
11839 if ${am_cv_make_support_nested_variables+:} false; then :
11840 $as_echo_n "(cached) " >&6
11841 else
11842 if $as_echo 'TRUE=$(BAR$(V))
11843 BAR0=false
11844 BAR1=true
11845 V=1
11846 am__doit:
11847 @$(TRUE)
11848 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
11849 am_cv_make_support_nested_variables=yes
11850 else
11851 am_cv_make_support_nested_variables=no
11852 fi
11853 fi
11854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
11855 $as_echo "$am_cv_make_support_nested_variables" >&6; }
11856 if test $am_cv_make_support_nested_variables = yes; then
11857 AM_V='$(V)'
11858 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
11859 else
11860 AM_V=$AM_DEFAULT_VERBOSITY
11861 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
11862 fi
11863 AM_BACKSLASH='\'
11864
11865 if test "`cd $srcdir && pwd`" != "`pwd`"; then
11866 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
11867 # is not polluted with repeated "-I."
11868 am__isrc=' -I$(srcdir)'
11869 # test to see if srcdir already configured
11870 if test -f $srcdir/config.status; then
11871 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
11872 fi
11873 fi
11874
11875 # test whether we have cygpath
11876 if test -z "$CYGPATH_W"; then
11877 if (cygpath --version) >/dev/null 2>/dev/null; then
11878 CYGPATH_W='cygpath -w'
11879 else
11880 CYGPATH_W=echo
11881 fi
11882 fi
11883
11884
11885 # Define the identity of the package.
11886 PACKAGE='elektroid'
11887 VERSION='2.2'
11888
11889
11890 cat >>confdefs.h <<_ACEOF
11891 #define PACKAGE "$PACKAGE"
11892 _ACEOF
11893
11894
11895 cat >>confdefs.h <<_ACEOF
11896 #define VERSION "$VERSION"
11897 _ACEOF
11898
11899 # Some tools Automake needs.
11900
11901 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
11902
11903
11904 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
11905
11906
11907 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
11908
11909
11910 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
11911
11912
11913 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
11914
11915 # For better backward compatibility. To be removed once Automake 1.9.x
11916 # dies out for good. For more background, see:
11917 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
11918 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
11919 mkdir_p='$(MKDIR_P)'
11920
11921 # We need awk for the "check" target (and possibly the TAP driver). The
11922 # system "awk" is bad on some platforms.
11923 # Always define AMTAR for backward compatibility. Yes, it's still used
11924 # in the wild :-( We should find a proper way to deprecate it ...
11925 AMTAR='$${TAR-tar}'
11926
11927
11928 # We'll loop over all known methods to create a tar archive until one works.
11929 _am_tools='gnutar pax cpio none'
11930
11931 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
11932
11933
11934
11935
11936
11937 depcc="$CC" am_compiler_list=
11938
11939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
11940 $as_echo_n "checking dependency style of $depcc... " >&6; }
11941 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
11942 $as_echo_n "(cached) " >&6
11943 else
11944 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
11945 # We make a subdir and do the tests there. Otherwise we can end up
11946 # making bogus files that we don't know about and never remove. For
11947 # instance it was reported that on HP-UX the gcc test will end up
11948 # making a dummy file named 'D' -- because '-MD' means "put the output
11949 # in D".
11950 rm -rf conftest.dir
11951 mkdir conftest.dir
11952 # Copy depcomp to subdir because otherwise we won't find it if we're
11953 # using a relative directory.
11954 cp "$am_depcomp" conftest.dir
11955 cd conftest.dir
11956 # We will build objects and dependencies in a subdirectory because
11957 # it helps to detect inapplicable dependency modes. For instance
11958 # both Tru64's cc and ICC support -MD to output dependencies as a
11959 # side effect of compilation, but ICC will put the dependencies in
11960 # the current directory while Tru64 will put them in the object
11961 # directory.
11962 mkdir sub
11963
11964 am_cv_CC_dependencies_compiler_type=none
11965 if test "$am_compiler_list" = ""; then
11966 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
11967 fi
11968 am__universal=false
11969 case " $depcc " in #(
11970 *\ -arch\ *\ -arch\ *) am__universal=true ;;
11971 esac
11972
11973 for depmode in $am_compiler_list; do
11974 # Setup a source with many dependencies, because some compilers
11975 # like to wrap large dependency lists on column 80 (with \), and
11976 # we should not choose a depcomp mode which is confused by this.
11977 #
11978 # We need to recreate these files for each test, as the compiler may
11979 # overwrite some of them when testing with obscure command lines.
11980 # This happens at least with the AIX C compiler.
11981 : > sub/conftest.c
11982 for i in 1 2 3 4 5 6; do
11983 echo '#include "conftst'$i'.h"' >> sub/conftest.c
11984 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
11985 # Solaris 10 /bin/sh.
11986 echo '/* dummy */' > sub/conftst$i.h
11987 done
11988 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
11989
11990 # We check with '-c' and '-o' for the sake of the "dashmstdout"
11991 # mode. It turns out that the SunPro C++ compiler does not properly
11992 # handle '-M -o', and we need to detect this. Also, some Intel
11993 # versions had trouble with output in subdirs.
11994 am__obj=sub/conftest.${OBJEXT-o}
11995 am__minus_obj="-o $am__obj"
11996 case $depmode in
11997 gcc)
11998 # This depmode causes a compiler race in universal mode.
11999 test "$am__universal" = false || continue
12000 ;;
12001 nosideeffect)
12002 # After this tag, mechanisms are not by side-effect, so they'll
12003 # only be used when explicitly requested.
12004 if test "x$enable_dependency_tracking" = xyes; then
12005 continue
12006 else
12007 break
12008 fi
12009 ;;
12010 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
12011 # This compiler won't grok '-c -o', but also, the minuso test has
12012 # not run yet. These depmodes are late enough in the game, and
12013 # so weak that their functioning should not be impacted.
12014 am__obj=conftest.${OBJEXT-o}
12015 am__minus_obj=
12016 ;;
12017 none) break ;;
12018 esac
12019 if depmode=$depmode \
12020 source=sub/conftest.c object=$am__obj \
12021 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
12022 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
12023 >/dev/null 2>conftest.err &&
12024 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
12025 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
12026 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
12027 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
12028 # icc doesn't choke on unknown options, it will just issue warnings
12029 # or remarks (even with -Werror). So we grep stderr for any message
12030 # that says an option was ignored or not supported.
12031 # When given -MP, icc 7.0 and 7.1 complain thusly:
12032 # icc: Command line warning: ignoring option '-M'; no argument required
12033 # The diagnosis changed in icc 8.0:
12034 # icc: Command line remark: option '-MP' not supported
12035 if (grep 'ignoring option' conftest.err ||
12036 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
12037 am_cv_CC_dependencies_compiler_type=$depmode
12038 break
12039 fi
12040 fi
12041 done
12042
12043 cd ..
12044 rm -rf conftest.dir
12045 else
12046 am_cv_CC_dependencies_compiler_type=none
12047 fi
12048
12049 fi
12050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
12051 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
12052 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
12053
12054 if
12055 test "x$enable_dependency_tracking" != xno \
12056 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
12057 am__fastdepCC_TRUE=
12058 am__fastdepCC_FALSE='#'
12059 else
12060 am__fastdepCC_TRUE='#'
12061 am__fastdepCC_FALSE=
12062 fi
12063
12064
12065
12066 # POSIX will say in a future version that running "rm -f" with no argument
12067 # is OK; and we want to be able to make that assumption in our Makefile
12068 # recipes. So use an aggressive probe to check that the usage we want is
12069 # actually supported "in the wild" to an acceptable degree.
12070 # See automake bug#10828.
12071 # To make any issue more visible, cause the running configure to be aborted
12072 # by default if the 'rm' program in use doesn't match our expectations; the
12073 # user can still override this though.
12074 if rm -f && rm -fr && rm -rf; then : OK; else
12075 cat >&2 <<'END'
12076 Oops!
12077
12078 Your 'rm' program seems unable to run without file operands specified
12079 on the command line, even when the '-f' option is present. This is contrary
12080 to the behaviour of most rm programs out there, and not conforming with
12081 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
12082
12083 Please tell bug-automake@gnu.org about your system, including the value
12084 of your $PATH and any error possibly output before this message. This
12085 can help us improve future automake versions.
12086
12087 END
12088 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
12089 echo 'Configuration will proceed anyway, since you have set the' >&2
12090 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
12091 echo >&2
12092 else
12093 cat >&2 <<'END'
12094 Aborting the configuration process, to ensure you take notice of the issue.
12095
12096 You can download and install GNU coreutils to get an 'rm' implementation
12097 that behaves properly: <https://www.gnu.org/software/coreutils/>.
12098
12099 If you want to complete the configuration process using your problematic
12100 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
12101 to "yes", and re-run configure.
12102
12103 END
12104 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
12105 fi
12106 fi
12107
12108
12109 # Checks for programs.
12110 ac_ext=c
12111 ac_cpp='$CPP $CPPFLAGS'
12112 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12113 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12114 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12115 if test -n "$ac_tool_prefix"; then
12116 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
12117 set dummy ${ac_tool_prefix}gcc; ac_word=$2
12118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12119 $as_echo_n "checking for $ac_word... " >&6; }
12120 if ${ac_cv_prog_CC+:} false; then :
12121 $as_echo_n "(cached) " >&6
12122 else
12123 if test -n "$CC"; then
12124 ac_cv_prog_CC="$CC" # Let the user override the test.
12125 else
12126 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12127 for as_dir in $PATH
12128 do
12129 IFS=$as_save_IFS
12130 test -z "$as_dir" && as_dir=.
12131 for ac_exec_ext in '' $ac_executable_extensions; do
12132 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12133 ac_cv_prog_CC="${ac_tool_prefix}gcc"
12134 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12135 break 2
12136 fi
12137 done
12138 done
12139 IFS=$as_save_IFS
12140
12141 fi
12142 fi
12143 CC=$ac_cv_prog_CC
12144 if test -n "$CC"; then
12145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
12146 $as_echo "$CC" >&6; }
12147 else
12148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12149 $as_echo "no" >&6; }
12150 fi
12151
12152
12153 fi
12154 if test -z "$ac_cv_prog_CC"; then
12155 ac_ct_CC=$CC
12156 # Extract the first word of "gcc", so it can be a program name with args.
12157 set dummy gcc; ac_word=$2
12158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12159 $as_echo_n "checking for $ac_word... " >&6; }
12160 if ${ac_cv_prog_ac_ct_CC+:} false; then :
12161 $as_echo_n "(cached) " >&6
12162 else
12163 if test -n "$ac_ct_CC"; then
12164 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
12165 else
12166 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12167 for as_dir in $PATH
12168 do
12169 IFS=$as_save_IFS
12170 test -z "$as_dir" && as_dir=.
12171 for ac_exec_ext in '' $ac_executable_extensions; do
12172 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12173 ac_cv_prog_ac_ct_CC="gcc"
12174 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12175 break 2
12176 fi
12177 done
12178 done
12179 IFS=$as_save_IFS
12180
12181 fi
12182 fi
12183 ac_ct_CC=$ac_cv_prog_ac_ct_CC
12184 if test -n "$ac_ct_CC"; then
12185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
12186 $as_echo "$ac_ct_CC" >&6; }
12187 else
12188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12189 $as_echo "no" >&6; }
12190 fi
12191
12192 if test "x$ac_ct_CC" = x; then
12193 CC=""
12194 else
12195 case $cross_compiling:$ac_tool_warned in
12196 yes:)
12197 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12198 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12199 ac_tool_warned=yes ;;
12200 esac
12201 CC=$ac_ct_CC
12202 fi
12203 else
12204 CC="$ac_cv_prog_CC"
12205 fi
12206
12207 if test -z "$CC"; then
12208 if test -n "$ac_tool_prefix"; then
12209 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
12210 set dummy ${ac_tool_prefix}cc; ac_word=$2
12211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12212 $as_echo_n "checking for $ac_word... " >&6; }
12213 if ${ac_cv_prog_CC+:} false; then :
12214 $as_echo_n "(cached) " >&6
12215 else
12216 if test -n "$CC"; then
12217 ac_cv_prog_CC="$CC" # Let the user override the test.
12218 else
12219 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12220 for as_dir in $PATH
12221 do
12222 IFS=$as_save_IFS
12223 test -z "$as_dir" && as_dir=.
12224 for ac_exec_ext in '' $ac_executable_extensions; do
12225 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12226 ac_cv_prog_CC="${ac_tool_prefix}cc"
12227 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12228 break 2
12229 fi
12230 done
12231 done
12232 IFS=$as_save_IFS
12233
12234 fi
12235 fi
12236 CC=$ac_cv_prog_CC
12237 if test -n "$CC"; then
12238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
12239 $as_echo "$CC" >&6; }
12240 else
12241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12242 $as_echo "no" >&6; }
12243 fi
12244
12245
12246 fi
12247 fi
12248 if test -z "$CC"; then
12249 # Extract the first word of "cc", so it can be a program name with args.
12250 set dummy cc; ac_word=$2
12251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12252 $as_echo_n "checking for $ac_word... " >&6; }
12253 if ${ac_cv_prog_CC+:} false; then :
12254 $as_echo_n "(cached) " >&6
12255 else
12256 if test -n "$CC"; then
12257 ac_cv_prog_CC="$CC" # Let the user override the test.
12258 else
12259 ac_prog_rejected=no
12260 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12261 for as_dir in $PATH
12262 do
12263 IFS=$as_save_IFS
12264 test -z "$as_dir" && as_dir=.
12265 for ac_exec_ext in '' $ac_executable_extensions; do
12266 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12267 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
12268 ac_prog_rejected=yes
12269 continue
12270 fi
12271 ac_cv_prog_CC="cc"
12272 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12273 break 2
12274 fi
12275 done
12276 done
12277 IFS=$as_save_IFS
12278
12279 if test $ac_prog_rejected = yes; then
12280 # We found a bogon in the path, so make sure we never use it.
12281 set dummy $ac_cv_prog_CC
12282 shift
12283 if test $# != 0; then
12284 # We chose a different compiler from the bogus one.
12285 # However, it has the same basename, so the bogon will be chosen
12286 # first if we set CC to just the basename; use the full file name.
12287 shift
12288 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
12289 fi
12290 fi
12291 fi
12292 fi
12293 CC=$ac_cv_prog_CC
12294 if test -n "$CC"; then
12295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
12296 $as_echo "$CC" >&6; }
12297 else
12298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12299 $as_echo "no" >&6; }
12300 fi
12301
12302
12303 fi
12304 if test -z "$CC"; then
12305 if test -n "$ac_tool_prefix"; then
12306 for ac_prog in cl.exe
12307 do
12308 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
12309 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
12310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12311 $as_echo_n "checking for $ac_word... " >&6; }
12312 if ${ac_cv_prog_CC+:} false; then :
12313 $as_echo_n "(cached) " >&6
12314 else
12315 if test -n "$CC"; then
12316 ac_cv_prog_CC="$CC" # Let the user override the test.
12317 else
12318 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12319 for as_dir in $PATH
12320 do
12321 IFS=$as_save_IFS
12322 test -z "$as_dir" && as_dir=.
12323 for ac_exec_ext in '' $ac_executable_extensions; do
12324 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12325 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
12326 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12327 break 2
12328 fi
12329 done
12330 done
12331 IFS=$as_save_IFS
12332
12333 fi
12334 fi
12335 CC=$ac_cv_prog_CC
12336 if test -n "$CC"; then
12337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
12338 $as_echo "$CC" >&6; }
12339 else
12340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12341 $as_echo "no" >&6; }
12342 fi
12343
12344
12345 test -n "$CC" && break
12346 done
12347 fi
12348 if test -z "$CC"; then
12349 ac_ct_CC=$CC
12350 for ac_prog in cl.exe
12351 do
12352 # Extract the first word of "$ac_prog", so it can be a program name with args.
12353 set dummy $ac_prog; ac_word=$2
12354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12355 $as_echo_n "checking for $ac_word... " >&6; }
12356 if ${ac_cv_prog_ac_ct_CC+:} false; then :
12357 $as_echo_n "(cached) " >&6
12358 else
12359 if test -n "$ac_ct_CC"; then
12360 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
12361 else
12362 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12363 for as_dir in $PATH
12364 do
12365 IFS=$as_save_IFS
12366 test -z "$as_dir" && as_dir=.
12367 for ac_exec_ext in '' $ac_executable_extensions; do
12368 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12369 ac_cv_prog_ac_ct_CC="$ac_prog"
12370 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12371 break 2
12372 fi
12373 done
12374 done
12375 IFS=$as_save_IFS
12376
12377 fi
12378 fi
12379 ac_ct_CC=$ac_cv_prog_ac_ct_CC
12380 if test -n "$ac_ct_CC"; then
12381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
12382 $as_echo "$ac_ct_CC" >&6; }
12383 else
12384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12385 $as_echo "no" >&6; }
12386 fi
12387
12388
12389 test -n "$ac_ct_CC" && break
12390 done
12391
12392 if test "x$ac_ct_CC" = x; then
12393 CC=""
12394 else
12395 case $cross_compiling:$ac_tool_warned in
12396 yes:)
12397 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12398 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12399 ac_tool_warned=yes ;;
12400 esac
12401 CC=$ac_ct_CC
12402 fi
12403 fi
12404
12405 fi
12406
12407
12408 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12409 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12410 as_fn_error $? "no acceptable C compiler found in \$PATH
12411 See \`config.log' for more details" "$LINENO" 5; }
12412
12413 # Provide some information about the compiler.
12414 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
12415 set X $ac_compile
12416 ac_compiler=$2
12417 for ac_option in --version -v -V -qversion; do
12418 { { ac_try="$ac_compiler $ac_option >&5"
12419 case "(($ac_try" in
12420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12421 *) ac_try_echo=$ac_try;;
12422 esac
12423 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
12424 $as_echo "$ac_try_echo"; } >&5
12425 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
12426 ac_status=$?
12427 if test -s conftest.err; then
12428 sed '10a\
12429 ... rest of stderr output deleted ...
12430 10q' conftest.err >conftest.er1
12431 cat conftest.er1 >&5
12432 fi
12433 rm -f conftest.er1 conftest.err
12434 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12435 test $ac_status = 0; }
12436 done
12437
12438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
12439 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
12440 if ${ac_cv_c_compiler_gnu+:} false; then :
12441 $as_echo_n "(cached) " >&6
12442 else
12443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12444 /* end confdefs.h. */
12445
12446 int
12447 main ()
12448 {
12449 #ifndef __GNUC__
12450 choke me
12451 #endif
12452
12453 ;
12454 return 0;
12455 }
12456 _ACEOF
12457 if ac_fn_c_try_compile "$LINENO"; then :
12458 ac_compiler_gnu=yes
12459 else
12460 ac_compiler_gnu=no
12461 fi
12462 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12463 ac_cv_c_compiler_gnu=$ac_compiler_gnu
12464
12465 fi
12466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
12467 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
12468 if test $ac_compiler_gnu = yes; then
12469 GCC=yes
12470 else
12471 GCC=
12472 fi
12473 ac_test_CFLAGS=${CFLAGS+set}
12474 ac_save_CFLAGS=$CFLAGS
12475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
12476 $as_echo_n "checking whether $CC accepts -g... " >&6; }
12477 if ${ac_cv_prog_cc_g+:} false; then :
12478 $as_echo_n "(cached) " >&6
12479 else
12480 ac_save_c_werror_flag=$ac_c_werror_flag
12481 ac_c_werror_flag=yes
12482 ac_cv_prog_cc_g=no
12483 CFLAGS="-g"
12484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12485 /* end confdefs.h. */
12486
12487 int
12488 main ()
12489 {
12490
12491 ;
12492 return 0;
12493 }
12494 _ACEOF
12495 if ac_fn_c_try_compile "$LINENO"; then :
12496 ac_cv_prog_cc_g=yes
12497 else
12498 CFLAGS=""
12499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12500 /* end confdefs.h. */
12501
12502 int
12503 main ()
12504 {
12505
12506 ;
12507 return 0;
12508 }
12509 _ACEOF
12510 if ac_fn_c_try_compile "$LINENO"; then :
12511
12512 else
12513 ac_c_werror_flag=$ac_save_c_werror_flag
12514 CFLAGS="-g"
12515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12516 /* end confdefs.h. */
12517
12518 int
12519 main ()
12520 {
12521
12522 ;
12523 return 0;
12524 }
12525 _ACEOF
12526 if ac_fn_c_try_compile "$LINENO"; then :
12527 ac_cv_prog_cc_g=yes
12528 fi
12529 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12530 fi
12531 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12532 fi
12533 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12534 ac_c_werror_flag=$ac_save_c_werror_flag
12535 fi
12536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
12537 $as_echo "$ac_cv_prog_cc_g" >&6; }
12538 if test "$ac_test_CFLAGS" = set; then
12539 CFLAGS=$ac_save_CFLAGS
12540 elif test $ac_cv_prog_cc_g = yes; then
12541 if test "$GCC" = yes; then
12542 CFLAGS="-g -O2"
12543 else
12544 CFLAGS="-g"
12545 fi
12546 else
12547 if test "$GCC" = yes; then
12548 CFLAGS="-O2"
12549 else
12550 CFLAGS=
12551 fi
12552 fi
12553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
12554 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
12555 if ${ac_cv_prog_cc_c89+:} false; then :
12556 $as_echo_n "(cached) " >&6
12557 else
12558 ac_cv_prog_cc_c89=no
12559 ac_save_CC=$CC
12560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12561 /* end confdefs.h. */
12562 #include <stdarg.h>
12563 #include <stdio.h>
12564 struct stat;
12565 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
12566 struct buf { int x; };
12567 FILE * (*rcsopen) (struct buf *, struct stat *, int);
12568 static char *e (p, i)
12569 char **p;
12570 int i;
12571 {
12572 return p[i];
12573 }
12574 static char *f (char * (*g) (char **, int), char **p, ...)
12575 {
12576 char *s;
12577 va_list v;
12578 va_start (v,p);
12579 s = g (p, va_arg (v,int));
12580 va_end (v);
12581 return s;
12582 }
12583
12584 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
12585 function prototypes and stuff, but not '\xHH' hex character constants.
12586 These don't provoke an error unfortunately, instead are silently treated
12587 as 'x'. The following induces an error, until -std is added to get
12588 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
12589 array size at least. It's necessary to write '\x00'==0 to get something
12590 that's true only with -std. */
12591 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
12592
12593 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
12594 inside strings and character constants. */
12595 #define FOO(x) 'x'
12596 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
12597
12598 int test (int i, double x);
12599 struct s1 {int (*f) (int a);};
12600 struct s2 {int (*f) (double a);};
12601 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
12602 int argc;
12603 char **argv;
12604 int
12605 main ()
12606 {
12607 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
12608 ;
12609 return 0;
12610 }
12611 _ACEOF
12612 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
12613 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
12614 do
12615 CC="$ac_save_CC $ac_arg"
12616 if ac_fn_c_try_compile "$LINENO"; then :
12617 ac_cv_prog_cc_c89=$ac_arg
12618 fi
12619 rm -f core conftest.err conftest.$ac_objext
12620 test "x$ac_cv_prog_cc_c89" != "xno" && break
12621 done
12622 rm -f conftest.$ac_ext
12623 CC=$ac_save_CC
12624
12625 fi
12626 # AC_CACHE_VAL
12627 case "x$ac_cv_prog_cc_c89" in
12628 x)
12629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
12630 $as_echo "none needed" >&6; } ;;
12631 xno)
12632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
12633 $as_echo "unsupported" >&6; } ;;
12634 *)
12635 CC="$CC $ac_cv_prog_cc_c89"
12636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
12637 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
12638 esac
12639 if test "x$ac_cv_prog_cc_c89" != xno; then :
12640
12641 fi
12642
12643 ac_ext=c
12644 ac_cpp='$CPP $CPPFLAGS'
12645 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12646 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12647 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12648
12649 ac_ext=c
12650 ac_cpp='$CPP $CPPFLAGS'
12651 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12652 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12653 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
12655 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
12656 if ${am_cv_prog_cc_c_o+:} false; then :
12657 $as_echo_n "(cached) " >&6
12658 else
12659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12660 /* end confdefs.h. */
12661
12662 int
12663 main ()
12664 {
12665
12666 ;
12667 return 0;
12668 }
12669 _ACEOF
12670 # Make sure it works both with $CC and with simple cc.
12671 # Following AC_PROG_CC_C_O, we do the test twice because some
12672 # compilers refuse to overwrite an existing .o file with -o,
12673 # though they will create one.
12674 am_cv_prog_cc_c_o=yes
12675 for am_i in 1 2; do
12676 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
12677 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
12678 ac_status=$?
12679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12680 (exit $ac_status); } \
12681 && test -f conftest2.$ac_objext; then
12682 : OK
12683 else
12684 am_cv_prog_cc_c_o=no
12685 break
12686 fi
12687 done
12688 rm -f core conftest*
12689 unset am_i
12690 fi
12691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
12692 $as_echo "$am_cv_prog_cc_c_o" >&6; }
12693 if test "$am_cv_prog_cc_c_o" != yes; then
12694 # Losing compiler, so override with the script.
12695 # FIXME: It is wrong to rewrite CC.
12696 # But if we don't then we get into trouble of one sort or another.
12697 # A longer-term fix would be to have automake use am__CC in this case,
12698 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
12699 CC="$am_aux_dir/compile $CC"
12700 fi
12701 ac_ext=c
12702 ac_cpp='$CPP $CPPFLAGS'
12703 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12704 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12705 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12706
12707
12708
12709 # Define conditional prior to package checks
12710 if test "${CLI_ONLY}" == yes; then
12711 CLI_ONLY_TRUE=
12712 CLI_ONLY_FALSE='#'
12713 else
12714 CLI_ONLY_TRUE='#'
12715 CLI_ONLY_FALSE=
12716 fi
12717
12718 if test "${CLI_ONLY}" != yes; then
12719 GUI_TRUE=
12720 GUI_FALSE='#'
12721 else
12722 GUI_TRUE='#'
12723 GUI_FALSE=
12724 fi
12725
12726
12727 # Checks for libraries.
12728
12729
12730
12731
12732
12733
12734
12735 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
12736 if test -n "$ac_tool_prefix"; then
12737 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
12738 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
12739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12740 $as_echo_n "checking for $ac_word... " >&6; }
12741 if ${ac_cv_path_PKG_CONFIG+:} false; then :
12742 $as_echo_n "(cached) " >&6
12743 else
12744 case $PKG_CONFIG in
12745 [\\/]* | ?:[\\/]*)
12746 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12747 ;;
12748 *)
12749 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12750 for as_dir in $PATH
12751 do
12752 IFS=$as_save_IFS
12753 test -z "$as_dir" && as_dir=.
12754 for ac_exec_ext in '' $ac_executable_extensions; do
12755 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12756 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12757 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12758 break 2
12759 fi
12760 done
12761 done
12762 IFS=$as_save_IFS
12763
12764 ;;
12765 esac
12766 fi
12767 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
12768 if test -n "$PKG_CONFIG"; then
12769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
12770 $as_echo "$PKG_CONFIG" >&6; }
12771 else
12772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12773 $as_echo "no" >&6; }
12774 fi
12775
12776
12777 fi
12778 if test -z "$ac_cv_path_PKG_CONFIG"; then
12779 ac_pt_PKG_CONFIG=$PKG_CONFIG
12780 # Extract the first word of "pkg-config", so it can be a program name with args.
12781 set dummy pkg-config; ac_word=$2
12782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12783 $as_echo_n "checking for $ac_word... " >&6; }
12784 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
12785 $as_echo_n "(cached) " >&6
12786 else
12787 case $ac_pt_PKG_CONFIG in
12788 [\\/]* | ?:[\\/]*)
12789 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
12790 ;;
12791 *)
12792 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12793 for as_dir in $PATH
12794 do
12795 IFS=$as_save_IFS
12796 test -z "$as_dir" && as_dir=.
12797 for ac_exec_ext in '' $ac_executable_extensions; do
12798 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12799 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12800 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12801 break 2
12802 fi
12803 done
12804 done
12805 IFS=$as_save_IFS
12806
12807 ;;
12808 esac
12809 fi
12810 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
12811 if test -n "$ac_pt_PKG_CONFIG"; then
12812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
12813 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
12814 else
12815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12816 $as_echo "no" >&6; }
12817 fi
12818
12819 if test "x$ac_pt_PKG_CONFIG" = x; then
12820 PKG_CONFIG=""
12821 else
12822 case $cross_compiling:$ac_tool_warned in
12823 yes:)
12824 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12825 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12826 ac_tool_warned=yes ;;
12827 esac
12828 PKG_CONFIG=$ac_pt_PKG_CONFIG
12829 fi
12830 else
12831 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
12832 fi
12833
12834 fi
12835 if test -n "$PKG_CONFIG"; then
12836 _pkg_min_version=0.9.0
12837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
12838 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
12839 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
12840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12841 $as_echo "yes" >&6; }
12842 else
12843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12844 $as_echo "no" >&6; }
12845 PKG_CONFIG=""
12846 fi
12847 fi
12848
12849 pkg_failed=no
12850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alsa >= 1.1.3" >&5
12851 $as_echo_n "checking for alsa >= 1.1.3... " >&6; }
12852
12853 if test -n "$ALSA_CFLAGS"; then
12854 pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
12855 elif test -n "$PKG_CONFIG"; then
12856 if test -n "$PKG_CONFIG" && \
12857 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa >= 1.1.3\""; } >&5
12858 ($PKG_CONFIG --exists --print-errors "alsa >= 1.1.3") 2>&5
12859 ac_status=$?
12860 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12861 test $ac_status = 0; }; then
12862 pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa >= 1.1.3" 2>/dev/null`
12863 test "x$?" != "x0" && pkg_failed=yes
12864 else
12865 pkg_failed=yes
12866 fi
12867 else
12868 pkg_failed=untried
12869 fi
12870 if test -n "$ALSA_LIBS"; then
12871 pkg_cv_ALSA_LIBS="$ALSA_LIBS"
12872 elif test -n "$PKG_CONFIG"; then
12873 if test -n "$PKG_CONFIG" && \
12874 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa >= 1.1.3\""; } >&5
12875 ($PKG_CONFIG --exists --print-errors "alsa >= 1.1.3") 2>&5
12876 ac_status=$?
12877 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12878 test $ac_status = 0; }; then
12879 pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa >= 1.1.3" 2>/dev/null`
12880 test "x$?" != "x0" && pkg_failed=yes
12881 else
12882 pkg_failed=yes
12883 fi
12884 else
12885 pkg_failed=untried
12886 fi
12887
12888
12889
12890 if test $pkg_failed = yes; then
12891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12892 $as_echo "no" >&6; }
12893
12894 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
12895 _pkg_short_errors_supported=yes
12896 else
12897 _pkg_short_errors_supported=no
12898 fi
12899 if test $_pkg_short_errors_supported = yes; then
12900 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "alsa >= 1.1.3" 2>&1`
12901 else
12902 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "alsa >= 1.1.3" 2>&1`
12903 fi
12904 # Put the nasty error message in config.log where it belongs
12905 echo "$ALSA_PKG_ERRORS" >&5
12906
12907 as_fn_error $? "Package requirements (alsa >= 1.1.3) were not met:
12908
12909 $ALSA_PKG_ERRORS
12910
12911 Consider adjusting the PKG_CONFIG_PATH environment variable if you
12912 installed software in a non-standard prefix.
12913
12914 Alternatively, you may set the environment variables ALSA_CFLAGS
12915 and ALSA_LIBS to avoid the need to call pkg-config.
12916 See the pkg-config man page for more details." "$LINENO" 5
12917 elif test $pkg_failed = untried; then
12918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12919 $as_echo "no" >&6; }
12920 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12921 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12922 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
12923 is in your PATH or set the PKG_CONFIG environment variable to the full
12924 path to pkg-config.
12925
12926 Alternatively, you may set the environment variables ALSA_CFLAGS
12927 and ALSA_LIBS to avoid the need to call pkg-config.
12928 See the pkg-config man page for more details.
12929
12930 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
12931 See \`config.log' for more details" "$LINENO" 5; }
12932 else
12933 ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
12934 ALSA_LIBS=$pkg_cv_ALSA_LIBS
12935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12936 $as_echo "yes" >&6; }
12937
12938 fi
12939
12940 pkg_failed=no
12941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlib >= 1.1.8" >&5
12942 $as_echo_n "checking for zlib >= 1.1.8... " >&6; }
12943
12944 if test -n "$zlib_CFLAGS"; then
12945 pkg_cv_zlib_CFLAGS="$zlib_CFLAGS"
12946 elif test -n "$PKG_CONFIG"; then
12947 if test -n "$PKG_CONFIG" && \
12948 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib >= 1.1.8\""; } >&5
12949 ($PKG_CONFIG --exists --print-errors "zlib >= 1.1.8") 2>&5
12950 ac_status=$?
12951 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12952 test $ac_status = 0; }; then
12953 pkg_cv_zlib_CFLAGS=`$PKG_CONFIG --cflags "zlib >= 1.1.8" 2>/dev/null`
12954 test "x$?" != "x0" && pkg_failed=yes
12955 else
12956 pkg_failed=yes
12957 fi
12958 else
12959 pkg_failed=untried
12960 fi
12961 if test -n "$zlib_LIBS"; then
12962 pkg_cv_zlib_LIBS="$zlib_LIBS"
12963 elif test -n "$PKG_CONFIG"; then
12964 if test -n "$PKG_CONFIG" && \
12965 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib >= 1.1.8\""; } >&5
12966 ($PKG_CONFIG --exists --print-errors "zlib >= 1.1.8") 2>&5
12967 ac_status=$?
12968 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12969 test $ac_status = 0; }; then
12970 pkg_cv_zlib_LIBS=`$PKG_CONFIG --libs "zlib >= 1.1.8" 2>/dev/null`
12971 test "x$?" != "x0" && pkg_failed=yes
12972 else
12973 pkg_failed=yes
12974 fi
12975 else
12976 pkg_failed=untried
12977 fi
12978
12979
12980
12981 if test $pkg_failed = yes; then
12982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12983 $as_echo "no" >&6; }
12984
12985 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
12986 _pkg_short_errors_supported=yes
12987 else
12988 _pkg_short_errors_supported=no
12989 fi
12990 if test $_pkg_short_errors_supported = yes; then
12991 zlib_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "zlib >= 1.1.8" 2>&1`
12992 else
12993 zlib_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "zlib >= 1.1.8" 2>&1`
12994 fi
12995 # Put the nasty error message in config.log where it belongs
12996 echo "$zlib_PKG_ERRORS" >&5
12997
12998 as_fn_error $? "Package requirements (zlib >= 1.1.8) were not met:
12999
13000 $zlib_PKG_ERRORS
13001
13002 Consider adjusting the PKG_CONFIG_PATH environment variable if you
13003 installed software in a non-standard prefix.
13004
13005 Alternatively, you may set the environment variables zlib_CFLAGS
13006 and zlib_LIBS to avoid the need to call pkg-config.
13007 See the pkg-config man page for more details." "$LINENO" 5
13008 elif test $pkg_failed = untried; then
13009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13010 $as_echo "no" >&6; }
13011 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13012 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13013 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
13014 is in your PATH or set the PKG_CONFIG environment variable to the full
13015 path to pkg-config.
13016
13017 Alternatively, you may set the environment variables zlib_CFLAGS
13018 and zlib_LIBS to avoid the need to call pkg-config.
13019 See the pkg-config man page for more details.
13020
13021 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
13022 See \`config.log' for more details" "$LINENO" 5; }
13023 else
13024 zlib_CFLAGS=$pkg_cv_zlib_CFLAGS
13025 zlib_LIBS=$pkg_cv_zlib_LIBS
13026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13027 $as_echo "yes" >&6; }
13028
13029 fi
13030
13031 pkg_failed=no
13032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libzip >= 1.1.2" >&5
13033 $as_echo_n "checking for libzip >= 1.1.2... " >&6; }
13034
13035 if test -n "$libzip_CFLAGS"; then
13036 pkg_cv_libzip_CFLAGS="$libzip_CFLAGS"
13037 elif test -n "$PKG_CONFIG"; then
13038 if test -n "$PKG_CONFIG" && \
13039 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzip >= 1.1.2\""; } >&5
13040 ($PKG_CONFIG --exists --print-errors "libzip >= 1.1.2") 2>&5
13041 ac_status=$?
13042 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13043 test $ac_status = 0; }; then
13044 pkg_cv_libzip_CFLAGS=`$PKG_CONFIG --cflags "libzip >= 1.1.2" 2>/dev/null`
13045 test "x$?" != "x0" && pkg_failed=yes
13046 else
13047 pkg_failed=yes
13048 fi
13049 else
13050 pkg_failed=untried
13051 fi
13052 if test -n "$libzip_LIBS"; then
13053 pkg_cv_libzip_LIBS="$libzip_LIBS"
13054 elif test -n "$PKG_CONFIG"; then
13055 if test -n "$PKG_CONFIG" && \
13056 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzip >= 1.1.2\""; } >&5
13057 ($PKG_CONFIG --exists --print-errors "libzip >= 1.1.2") 2>&5
13058 ac_status=$?
13059 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13060 test $ac_status = 0; }; then
13061 pkg_cv_libzip_LIBS=`$PKG_CONFIG --libs "libzip >= 1.1.2" 2>/dev/null`
13062 test "x$?" != "x0" && pkg_failed=yes
13063 else
13064 pkg_failed=yes
13065 fi
13066 else
13067 pkg_failed=untried
13068 fi
13069
13070
13071
13072 if test $pkg_failed = yes; then
13073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13074 $as_echo "no" >&6; }
13075
13076 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
13077 _pkg_short_errors_supported=yes
13078 else
13079 _pkg_short_errors_supported=no
13080 fi
13081 if test $_pkg_short_errors_supported = yes; then
13082 libzip_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libzip >= 1.1.2" 2>&1`
13083 else
13084 libzip_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libzip >= 1.1.2" 2>&1`
13085 fi
13086 # Put the nasty error message in config.log where it belongs
13087 echo "$libzip_PKG_ERRORS" >&5
13088
13089 as_fn_error $? "Package requirements (libzip >= 1.1.2) were not met:
13090
13091 $libzip_PKG_ERRORS
13092
13093 Consider adjusting the PKG_CONFIG_PATH environment variable if you
13094 installed software in a non-standard prefix.
13095
13096 Alternatively, you may set the environment variables libzip_CFLAGS
13097 and libzip_LIBS to avoid the need to call pkg-config.
13098 See the pkg-config man page for more details." "$LINENO" 5
13099 elif test $pkg_failed = untried; then
13100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13101 $as_echo "no" >&6; }
13102 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13103 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13104 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
13105 is in your PATH or set the PKG_CONFIG environment variable to the full
13106 path to pkg-config.
13107
13108 Alternatively, you may set the environment variables libzip_CFLAGS
13109 and libzip_LIBS to avoid the need to call pkg-config.
13110 See the pkg-config man page for more details.
13111
13112 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
13113 See \`config.log' for more details" "$LINENO" 5; }
13114 else
13115 libzip_CFLAGS=$pkg_cv_libzip_CFLAGS
13116 libzip_LIBS=$pkg_cv_libzip_LIBS
13117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13118 $as_echo "yes" >&6; }
13119
13120 fi
13121 if test -z "$GUI_TRUE"; then :
13122
13123 pkg_failed=no
13124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gtk+-3.0" >&5
13125 $as_echo_n "checking for gtk+-3.0... " >&6; }
13126
13127 if test -n "$GTK_CFLAGS"; then
13128 pkg_cv_GTK_CFLAGS="$GTK_CFLAGS"
13129 elif test -n "$PKG_CONFIG"; then
13130 if test -n "$PKG_CONFIG" && \
13131 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0\""; } >&5
13132 ($PKG_CONFIG --exists --print-errors "gtk+-3.0") 2>&5
13133 ac_status=$?
13134 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13135 test $ac_status = 0; }; then
13136 pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-3.0" 2>/dev/null`
13137 test "x$?" != "x0" && pkg_failed=yes
13138 else
13139 pkg_failed=yes
13140 fi
13141 else
13142 pkg_failed=untried
13143 fi
13144 if test -n "$GTK_LIBS"; then
13145 pkg_cv_GTK_LIBS="$GTK_LIBS"
13146 elif test -n "$PKG_CONFIG"; then
13147 if test -n "$PKG_CONFIG" && \
13148 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0\""; } >&5
13149 ($PKG_CONFIG --exists --print-errors "gtk+-3.0") 2>&5
13150 ac_status=$?
13151 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13152 test $ac_status = 0; }; then
13153 pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "gtk+-3.0" 2>/dev/null`
13154 test "x$?" != "x0" && pkg_failed=yes
13155 else
13156 pkg_failed=yes
13157 fi
13158 else
13159 pkg_failed=untried
13160 fi
13161
13162
13163
13164 if test $pkg_failed = yes; then
13165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13166 $as_echo "no" >&6; }
13167
13168 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
13169 _pkg_short_errors_supported=yes
13170 else
13171 _pkg_short_errors_supported=no
13172 fi
13173 if test $_pkg_short_errors_supported = yes; then
13174 GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gtk+-3.0" 2>&1`
13175 else
13176 GTK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gtk+-3.0" 2>&1`
13177 fi
13178 # Put the nasty error message in config.log where it belongs
13179 echo "$GTK_PKG_ERRORS" >&5
13180
13181 as_fn_error $? "Package requirements (gtk+-3.0) were not met:
13182
13183 $GTK_PKG_ERRORS
13184
13185 Consider adjusting the PKG_CONFIG_PATH environment variable if you
13186 installed software in a non-standard prefix.
13187
13188 Alternatively, you may set the environment variables GTK_CFLAGS
13189 and GTK_LIBS to avoid the need to call pkg-config.
13190 See the pkg-config man page for more details." "$LINENO" 5
13191 elif test $pkg_failed = untried; then
13192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13193 $as_echo "no" >&6; }
13194 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13195 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13196 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
13197 is in your PATH or set the PKG_CONFIG environment variable to the full
13198 path to pkg-config.
13199
13200 Alternatively, you may set the environment variables GTK_CFLAGS
13201 and GTK_LIBS to avoid the need to call pkg-config.
13202 See the pkg-config man page for more details.
13203
13204 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
13205 See \`config.log' for more details" "$LINENO" 5; }
13206 else
13207 GTK_CFLAGS=$pkg_cv_GTK_CFLAGS
13208 GTK_LIBS=$pkg_cv_GTK_LIBS
13209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13210 $as_echo "yes" >&6; }
13211
13212 fi
13213 fi
13214
13215
13216 pkg_failed=no
13217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sndfile >= 1.0.2" >&5
13218 $as_echo_n "checking for sndfile >= 1.0.2... " >&6; }
13219
13220 if test -n "$SNDFILE_CFLAGS"; then
13221 pkg_cv_SNDFILE_CFLAGS="$SNDFILE_CFLAGS"
13222 elif test -n "$PKG_CONFIG"; then
13223 if test -n "$PKG_CONFIG" && \
13224 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sndfile >= 1.0.2\""; } >&5
13225 ($PKG_CONFIG --exists --print-errors "sndfile >= 1.0.2") 2>&5
13226 ac_status=$?
13227 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13228 test $ac_status = 0; }; then
13229 pkg_cv_SNDFILE_CFLAGS=`$PKG_CONFIG --cflags "sndfile >= 1.0.2" 2>/dev/null`
13230 test "x$?" != "x0" && pkg_failed=yes
13231 else
13232 pkg_failed=yes
13233 fi
13234 else
13235 pkg_failed=untried
13236 fi
13237 if test -n "$SNDFILE_LIBS"; then
13238 pkg_cv_SNDFILE_LIBS="$SNDFILE_LIBS"
13239 elif test -n "$PKG_CONFIG"; then
13240 if test -n "$PKG_CONFIG" && \
13241 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sndfile >= 1.0.2\""; } >&5
13242 ($PKG_CONFIG --exists --print-errors "sndfile >= 1.0.2") 2>&5
13243 ac_status=$?
13244 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13245 test $ac_status = 0; }; then
13246 pkg_cv_SNDFILE_LIBS=`$PKG_CONFIG --libs "sndfile >= 1.0.2" 2>/dev/null`
13247 test "x$?" != "x0" && pkg_failed=yes
13248 else
13249 pkg_failed=yes
13250 fi
13251 else
13252 pkg_failed=untried
13253 fi
13254
13255
13256
13257 if test $pkg_failed = yes; then
13258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13259 $as_echo "no" >&6; }
13260
13261 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
13262 _pkg_short_errors_supported=yes
13263 else
13264 _pkg_short_errors_supported=no
13265 fi
13266 if test $_pkg_short_errors_supported = yes; then
13267 SNDFILE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "sndfile >= 1.0.2" 2>&1`
13268 else
13269 SNDFILE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "sndfile >= 1.0.2" 2>&1`
13270 fi
13271 # Put the nasty error message in config.log where it belongs
13272 echo "$SNDFILE_PKG_ERRORS" >&5
13273
13274 ac_cv_sndfile=0
13275 elif test $pkg_failed = untried; then
13276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13277 $as_echo "no" >&6; }
13278 ac_cv_sndfile=0
13279 else
13280 SNDFILE_CFLAGS=$pkg_cv_SNDFILE_CFLAGS
13281 SNDFILE_LIBS=$pkg_cv_SNDFILE_LIBS
13282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13283 $as_echo "yes" >&6; }
13284 ac_cv_sndfile=1
13285 fi
13286
13287 cat >>confdefs.h <<_ACEOF
13288 #define HAVE_SNDFILE ${ac_cv_sndfile}
13289 _ACEOF
13290
13291
13292
13293
13294
13295 pkg_failed=no
13296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for samplerate >= 0.1.8" >&5
13297 $as_echo_n "checking for samplerate >= 0.1.8... " >&6; }
13298
13299 if test -n "$SAMPLERATE_CFLAGS"; then
13300 pkg_cv_SAMPLERATE_CFLAGS="$SAMPLERATE_CFLAGS"
13301 elif test -n "$PKG_CONFIG"; then
13302 if test -n "$PKG_CONFIG" && \
13303 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"samplerate >= 0.1.8\""; } >&5
13304 ($PKG_CONFIG --exists --print-errors "samplerate >= 0.1.8") 2>&5
13305 ac_status=$?
13306 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13307 test $ac_status = 0; }; then
13308 pkg_cv_SAMPLERATE_CFLAGS=`$PKG_CONFIG --cflags "samplerate >= 0.1.8" 2>/dev/null`
13309 test "x$?" != "x0" && pkg_failed=yes
13310 else
13311 pkg_failed=yes
13312 fi
13313 else
13314 pkg_failed=untried
13315 fi
13316 if test -n "$SAMPLERATE_LIBS"; then
13317 pkg_cv_SAMPLERATE_LIBS="$SAMPLERATE_LIBS"
13318 elif test -n "$PKG_CONFIG"; then
13319 if test -n "$PKG_CONFIG" && \
13320 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"samplerate >= 0.1.8\""; } >&5
13321 ($PKG_CONFIG --exists --print-errors "samplerate >= 0.1.8") 2>&5
13322 ac_status=$?
13323 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13324 test $ac_status = 0; }; then
13325 pkg_cv_SAMPLERATE_LIBS=`$PKG_CONFIG --libs "samplerate >= 0.1.8" 2>/dev/null`
13326 test "x$?" != "x0" && pkg_failed=yes
13327 else
13328 pkg_failed=yes
13329 fi
13330 else
13331 pkg_failed=untried
13332 fi
13333
13334
13335
13336 if test $pkg_failed = yes; then
13337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13338 $as_echo "no" >&6; }
13339
13340 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
13341 _pkg_short_errors_supported=yes
13342 else
13343 _pkg_short_errors_supported=no
13344 fi
13345 if test $_pkg_short_errors_supported = yes; then
13346 SAMPLERATE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "samplerate >= 0.1.8" 2>&1`
13347 else
13348 SAMPLERATE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "samplerate >= 0.1.8" 2>&1`
13349 fi
13350 # Put the nasty error message in config.log where it belongs
13351 echo "$SAMPLERATE_PKG_ERRORS" >&5
13352
13353 ac_cv_samplerate=0
13354 elif test $pkg_failed = untried; then
13355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13356 $as_echo "no" >&6; }
13357 ac_cv_samplerate=0
13358 else
13359 SAMPLERATE_CFLAGS=$pkg_cv_SAMPLERATE_CFLAGS
13360 SAMPLERATE_LIBS=$pkg_cv_SAMPLERATE_LIBS
13361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13362 $as_echo "yes" >&6; }
13363 ac_cv_samplerate=1
13364 fi
13365
13366 cat >>confdefs.h <<_ACEOF
13367 #define HAVE_SAMPLERATE ${ac_cv_samplerate}
13368 _ACEOF
13369
13370
13371
13372
13373 if test -z "$GUI_TRUE"; then :
13374
13375 pkg_failed=no
13376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libpulse >= 5.0" >&5
13377 $as_echo_n "checking for libpulse >= 5.0... " >&6; }
13378
13379 if test -n "$PULSEAUDIO_CFLAGS"; then
13380 pkg_cv_PULSEAUDIO_CFLAGS="$PULSEAUDIO_CFLAGS"
13381 elif test -n "$PKG_CONFIG"; then
13382 if test -n "$PKG_CONFIG" && \
13383 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpulse >= 5.0\""; } >&5
13384 ($PKG_CONFIG --exists --print-errors "libpulse >= 5.0") 2>&5
13385 ac_status=$?
13386 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13387 test $ac_status = 0; }; then
13388 pkg_cv_PULSEAUDIO_CFLAGS=`$PKG_CONFIG --cflags "libpulse >= 5.0" 2>/dev/null`
13389 test "x$?" != "x0" && pkg_failed=yes
13390 else
13391 pkg_failed=yes
13392 fi
13393 else
13394 pkg_failed=untried
13395 fi
13396 if test -n "$PULSEAUDIO_LIBS"; then
13397 pkg_cv_PULSEAUDIO_LIBS="$PULSEAUDIO_LIBS"
13398 elif test -n "$PKG_CONFIG"; then
13399 if test -n "$PKG_CONFIG" && \
13400 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpulse >= 5.0\""; } >&5
13401 ($PKG_CONFIG --exists --print-errors "libpulse >= 5.0") 2>&5
13402 ac_status=$?
13403 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13404 test $ac_status = 0; }; then
13405 pkg_cv_PULSEAUDIO_LIBS=`$PKG_CONFIG --libs "libpulse >= 5.0" 2>/dev/null`
13406 test "x$?" != "x0" && pkg_failed=yes
13407 else
13408 pkg_failed=yes
13409 fi
13410 else
13411 pkg_failed=untried
13412 fi
13413
13414
13415
13416 if test $pkg_failed = yes; then
13417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13418 $as_echo "no" >&6; }
13419
13420 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
13421 _pkg_short_errors_supported=yes
13422 else
13423 _pkg_short_errors_supported=no
13424 fi
13425 if test $_pkg_short_errors_supported = yes; then
13426 PULSEAUDIO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libpulse >= 5.0" 2>&1`
13427 else
13428 PULSEAUDIO_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libpulse >= 5.0" 2>&1`
13429 fi
13430 # Put the nasty error message in config.log where it belongs
13431 echo "$PULSEAUDIO_PKG_ERRORS" >&5
13432
13433 as_fn_error $? "Package requirements (libpulse >= 5.0) were not met:
13434
13435 $PULSEAUDIO_PKG_ERRORS
13436
13437 Consider adjusting the PKG_CONFIG_PATH environment variable if you
13438 installed software in a non-standard prefix.
13439
13440 Alternatively, you may set the environment variables PULSEAUDIO_CFLAGS
13441 and PULSEAUDIO_LIBS to avoid the need to call pkg-config.
13442 See the pkg-config man page for more details." "$LINENO" 5
13443 elif test $pkg_failed = untried; then
13444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13445 $as_echo "no" >&6; }
13446 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13447 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13448 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
13449 is in your PATH or set the PKG_CONFIG environment variable to the full
13450 path to pkg-config.
13451
13452 Alternatively, you may set the environment variables PULSEAUDIO_CFLAGS
13453 and PULSEAUDIO_LIBS to avoid the need to call pkg-config.
13454 See the pkg-config man page for more details.
13455
13456 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
13457 See \`config.log' for more details" "$LINENO" 5; }
13458 else
13459 PULSEAUDIO_CFLAGS=$pkg_cv_PULSEAUDIO_CFLAGS
13460 PULSEAUDIO_LIBS=$pkg_cv_PULSEAUDIO_LIBS
13461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13462 $as_echo "yes" >&6; }
13463
13464 fi
13465 fi
13466
13467
13468
13469
13470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
13471 $as_echo_n "checking whether NLS is requested... " >&6; }
13472 # Check whether --enable-nls was given.
13473 if test "${enable_nls+set}" = set; then :
13474 enableval=$enable_nls; USE_NLS=$enableval
13475 else
13476 USE_NLS=yes
13477 fi
13478
13479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
13480 $as_echo "$USE_NLS" >&6; }
13481
13482
13483
13484
13485 GETTEXT_MACRO_VERSION=0.19
13486
13487
13488
13489
13490 # Prepare PATH_SEPARATOR.
13491 # The user is always right.
13492 if test "${PATH_SEPARATOR+set}" != set; then
13493 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
13494 # contains only /bin. Note that ksh looks also at the FPATH variable,
13495 # so we have to set that as well for the test.
13496 PATH_SEPARATOR=:
13497 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
13498 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
13499 || PATH_SEPARATOR=';'
13500 }
13501 fi
13502
13503 # Find out how to test for executable files. Don't use a zero-byte file,
13504 # as systems may use methods other than mode bits to determine executability.
13505 cat >conf$$.file <<_ASEOF
13506 #! /bin/sh
13507 exit 0
13508 _ASEOF
13509 chmod +x conf$$.file
13510 if test -x conf$$.file >/dev/null 2>&1; then
13511 ac_executable_p="test -x"
13512 else
13513 ac_executable_p="test -f"
13514 fi
13515 rm -f conf$$.file
13516
13517 # Extract the first word of "msgfmt", so it can be a program name with args.
13518 set dummy msgfmt; ac_word=$2
13519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13520 $as_echo_n "checking for $ac_word... " >&6; }
13521 if ${ac_cv_path_MSGFMT+:} false; then :
13522 $as_echo_n "(cached) " >&6
13523 else
13524 case "$MSGFMT" in
13525 [\\/]* | ?:[\\/]*)
13526 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
13527 ;;
13528 *)
13529 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
13530 for ac_dir in $PATH; do
13531 IFS="$ac_save_IFS"
13532 test -z "$ac_dir" && ac_dir=.
13533 for ac_exec_ext in '' $ac_executable_extensions; do
13534 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
13535 echo "$as_me: trying $ac_dir/$ac_word..." >&5
13536 if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
13537 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
13538 ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
13539 break 2
13540 fi
13541 fi
13542 done
13543 done
13544 IFS="$ac_save_IFS"
13545 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
13546 ;;
13547 esac
13548 fi
13549 MSGFMT="$ac_cv_path_MSGFMT"
13550 if test "$MSGFMT" != ":"; then
13551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
13552 $as_echo "$MSGFMT" >&6; }
13553 else
13554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13555 $as_echo "no" >&6; }
13556 fi
13557
13558 # Extract the first word of "gmsgfmt", so it can be a program name with args.
13559 set dummy gmsgfmt; ac_word=$2
13560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13561 $as_echo_n "checking for $ac_word... " >&6; }
13562 if ${ac_cv_path_GMSGFMT+:} false; then :
13563 $as_echo_n "(cached) " >&6
13564 else
13565 case $GMSGFMT in
13566 [\\/]* | ?:[\\/]*)
13567 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
13568 ;;
13569 *)
13570 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13571 for as_dir in $PATH
13572 do
13573 IFS=$as_save_IFS
13574 test -z "$as_dir" && as_dir=.
13575 for ac_exec_ext in '' $ac_executable_extensions; do
13576 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13577 ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
13578 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13579 break 2
13580 fi
13581 done
13582 done
13583 IFS=$as_save_IFS
13584
13585 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
13586 ;;
13587 esac
13588 fi
13589 GMSGFMT=$ac_cv_path_GMSGFMT
13590 if test -n "$GMSGFMT"; then
13591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
13592 $as_echo "$GMSGFMT" >&6; }
13593 else
13594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13595 $as_echo "no" >&6; }
13596 fi
13597
13598
13599
13600 case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
13601 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
13602 *) MSGFMT_015=$MSGFMT ;;
13603 esac
13604
13605 case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
13606 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
13607 *) GMSGFMT_015=$GMSGFMT ;;
13608 esac
13609
13610
13611
13612 # Prepare PATH_SEPARATOR.
13613 # The user is always right.
13614 if test "${PATH_SEPARATOR+set}" != set; then
13615 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
13616 # contains only /bin. Note that ksh looks also at the FPATH variable,
13617 # so we have to set that as well for the test.
13618 PATH_SEPARATOR=:
13619 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
13620 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
13621 || PATH_SEPARATOR=';'
13622 }
13623 fi
13624
13625 # Find out how to test for executable files. Don't use a zero-byte file,
13626 # as systems may use methods other than mode bits to determine executability.
13627 cat >conf$$.file <<_ASEOF
13628 #! /bin/sh
13629 exit 0
13630 _ASEOF
13631 chmod +x conf$$.file
13632 if test -x conf$$.file >/dev/null 2>&1; then
13633 ac_executable_p="test -x"
13634 else
13635 ac_executable_p="test -f"
13636 fi
13637 rm -f conf$$.file
13638
13639 # Extract the first word of "xgettext", so it can be a program name with args.
13640 set dummy xgettext; ac_word=$2
13641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13642 $as_echo_n "checking for $ac_word... " >&6; }
13643 if ${ac_cv_path_XGETTEXT+:} false; then :
13644 $as_echo_n "(cached) " >&6
13645 else
13646 case "$XGETTEXT" in
13647 [\\/]* | ?:[\\/]*)
13648 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
13649 ;;
13650 *)
13651 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
13652 for ac_dir in $PATH; do
13653 IFS="$ac_save_IFS"
13654 test -z "$ac_dir" && ac_dir=.
13655 for ac_exec_ext in '' $ac_executable_extensions; do
13656 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
13657 echo "$as_me: trying $ac_dir/$ac_word..." >&5
13658 if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
13659 (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
13660 ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
13661 break 2
13662 fi
13663 fi
13664 done
13665 done
13666 IFS="$ac_save_IFS"
13667 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
13668 ;;
13669 esac
13670 fi
13671 XGETTEXT="$ac_cv_path_XGETTEXT"
13672 if test "$XGETTEXT" != ":"; then
13673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
13674 $as_echo "$XGETTEXT" >&6; }
13675 else
13676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13677 $as_echo "no" >&6; }
13678 fi
13679
13680 rm -f messages.po
13681
13682 case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
13683 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
13684 *) XGETTEXT_015=$XGETTEXT ;;
13685 esac
13686
13687
13688
13689 # Prepare PATH_SEPARATOR.
13690 # The user is always right.
13691 if test "${PATH_SEPARATOR+set}" != set; then
13692 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
13693 # contains only /bin. Note that ksh looks also at the FPATH variable,
13694 # so we have to set that as well for the test.
13695 PATH_SEPARATOR=:
13696 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
13697 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
13698 || PATH_SEPARATOR=';'
13699 }
13700 fi
13701
13702 # Find out how to test for executable files. Don't use a zero-byte file,
13703 # as systems may use methods other than mode bits to determine executability.
13704 cat >conf$$.file <<_ASEOF
13705 #! /bin/sh
13706 exit 0
13707 _ASEOF
13708 chmod +x conf$$.file
13709 if test -x conf$$.file >/dev/null 2>&1; then
13710 ac_executable_p="test -x"
13711 else
13712 ac_executable_p="test -f"
13713 fi
13714 rm -f conf$$.file
13715
13716 # Extract the first word of "msgmerge", so it can be a program name with args.
13717 set dummy msgmerge; ac_word=$2
13718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13719 $as_echo_n "checking for $ac_word... " >&6; }
13720 if ${ac_cv_path_MSGMERGE+:} false; then :
13721 $as_echo_n "(cached) " >&6
13722 else
13723 case "$MSGMERGE" in
13724 [\\/]* | ?:[\\/]*)
13725 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
13726 ;;
13727 *)
13728 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
13729 for ac_dir in $PATH; do
13730 IFS="$ac_save_IFS"
13731 test -z "$ac_dir" && ac_dir=.
13732 for ac_exec_ext in '' $ac_executable_extensions; do
13733 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
13734 echo "$as_me: trying $ac_dir/$ac_word..." >&5
13735 if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
13736 ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
13737 break 2
13738 fi
13739 fi
13740 done
13741 done
13742 IFS="$ac_save_IFS"
13743 test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
13744 ;;
13745 esac
13746 fi
13747 MSGMERGE="$ac_cv_path_MSGMERGE"
13748 if test "$MSGMERGE" != ":"; then
13749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
13750 $as_echo "$MSGMERGE" >&6; }
13751 else
13752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13753 $as_echo "no" >&6; }
13754 fi
13755
13756
13757 test -n "$localedir" || localedir='${datadir}/locale'
13758
13759
13760 test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
13761
13762
13763 ac_config_commands="$ac_config_commands po-directories"
13764
13765
13766
13767 if test "X$prefix" = "XNONE"; then
13768 acl_final_prefix="$ac_default_prefix"
13769 else
13770 acl_final_prefix="$prefix"
13771 fi
13772 if test "X$exec_prefix" = "XNONE"; then
13773 acl_final_exec_prefix='${prefix}'
13774 else
13775 acl_final_exec_prefix="$exec_prefix"
13776 fi
13777 acl_save_prefix="$prefix"
13778 prefix="$acl_final_prefix"
13779 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
13780 prefix="$acl_save_prefix"
13781
13782
13783
13784 # Check whether --with-gnu-ld was given.
13785 if test "${with_gnu_ld+set}" = set; then :
13786 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
13787 else
13788 with_gnu_ld=no
13789 fi
13790
13791 # Prepare PATH_SEPARATOR.
13792 # The user is always right.
13793 if test "${PATH_SEPARATOR+set}" != set; then
13794 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
13795 # contains only /bin. Note that ksh looks also at the FPATH variable,
13796 # so we have to set that as well for the test.
13797 PATH_SEPARATOR=:
13798 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
13799 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
13800 || PATH_SEPARATOR=';'
13801 }
13802 fi
13803
13804 ac_prog=ld
13805 if test "$GCC" = yes; then
13806 # Check if gcc -print-prog-name=ld gives a path.
13807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
13808 $as_echo_n "checking for ld used by $CC... " >&6; }
13809 case $host in
13810 *-*-mingw*)
13811 # gcc leaves a trailing carriage return which upsets mingw
13812 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
13813 *)
13814 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
13815 esac
13816 case $ac_prog in
13817 # Accept absolute paths.
13818 [\\/]* | ?:[\\/]*)
13819 re_direlt='/[^/][^/]*/\.\./'
13820 # Canonicalize the pathname of ld
13821 ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
13822 while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
13823 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
13824 done
13825 test -z "$LD" && LD="$ac_prog"
13826 ;;
13827 "")
13828 # If it fails, then pretend we aren't using GCC.
13829 ac_prog=ld
13830 ;;
13831 *)
13832 # If it is relative, then search for the first ld in PATH.
13833 with_gnu_ld=unknown
13834 ;;
13835 esac
13836 elif test "$with_gnu_ld" = yes; then
13837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
13838 $as_echo_n "checking for GNU ld... " >&6; }
13839 else
13840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
13841 $as_echo_n "checking for non-GNU ld... " >&6; }
13842 fi
13843 if ${acl_cv_path_LD+:} false; then :
13844 $as_echo_n "(cached) " >&6
13845 else
13846 if test -z "$LD"; then
13847 acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
13848 for ac_dir in $PATH; do
13849 IFS="$acl_save_ifs"
13850 test -z "$ac_dir" && ac_dir=.
13851 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
13852 acl_cv_path_LD="$ac_dir/$ac_prog"
13853 # Check to see if the program is GNU ld. I'd rather use --version,
13854 # but apparently some variants of GNU ld only accept -v.
13855 # Break only if it was the GNU/non-GNU ld that we prefer.
13856 case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
13857 *GNU* | *'with BFD'*)
13858 test "$with_gnu_ld" != no && break
13859 ;;
13860 *)
13861 test "$with_gnu_ld" != yes && break
13862 ;;
13863 esac
13864 fi
13865 done
13866 IFS="$acl_save_ifs"
13867 else
13868 acl_cv_path_LD="$LD" # Let the user override the test with a path.
13869 fi
13870 fi
13871
13872 LD="$acl_cv_path_LD"
13873 if test -n "$LD"; then
13874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
13875 $as_echo "$LD" >&6; }
13876 else
13877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13878 $as_echo "no" >&6; }
13879 fi
13880 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
13881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
13882 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
13883 if ${acl_cv_prog_gnu_ld+:} false; then :
13884 $as_echo_n "(cached) " >&6
13885 else
13886 # I'd rather use --version here, but apparently some GNU lds only accept -v.
13887 case `$LD -v 2>&1 </dev/null` in
13888 *GNU* | *'with BFD'*)
13889 acl_cv_prog_gnu_ld=yes
13890 ;;
13891 *)
13892 acl_cv_prog_gnu_ld=no
13893 ;;
13894 esac
13895 fi
13896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
13897 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
13898 with_gnu_ld=$acl_cv_prog_gnu_ld
13899
13900
13901
13902
13903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
13904 $as_echo_n "checking for shared library run path origin... " >&6; }
13905 if ${acl_cv_rpath+:} false; then :
13906 $as_echo_n "(cached) " >&6
13907 else
13908
13909 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
13910 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
13911 . ./conftest.sh
13912 rm -f ./conftest.sh
13913 acl_cv_rpath=done
13914
13915 fi
13916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
13917 $as_echo "$acl_cv_rpath" >&6; }
13918 wl="$acl_cv_wl"
13919 acl_libext="$acl_cv_libext"
13920 acl_shlibext="$acl_cv_shlibext"
13921 acl_libname_spec="$acl_cv_libname_spec"
13922 acl_library_names_spec="$acl_cv_library_names_spec"
13923 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
13924 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
13925 acl_hardcode_direct="$acl_cv_hardcode_direct"
13926 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
13927 # Check whether --enable-rpath was given.
13928 if test "${enable_rpath+set}" = set; then :
13929 enableval=$enable_rpath; :
13930 else
13931 enable_rpath=yes
13932 fi
13933
13934
13935
13936
13937 acl_libdirstem=lib
13938 acl_libdirstem2=
13939 case "$host_os" in
13940 solaris*)
13941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
13942 $as_echo_n "checking for 64-bit host... " >&6; }
13943 if ${gl_cv_solaris_64bit+:} false; then :
13944 $as_echo_n "(cached) " >&6
13945 else
13946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13947 /* end confdefs.h. */
13948
13949 #ifdef _LP64
13950 sixtyfour bits
13951 #endif
13952
13953 _ACEOF
13954 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13955 $EGREP "sixtyfour bits" >/dev/null 2>&1; then :
13956 gl_cv_solaris_64bit=yes
13957 else
13958 gl_cv_solaris_64bit=no
13959 fi
13960 rm -f conftest*
13961
13962
13963 fi
13964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
13965 $as_echo "$gl_cv_solaris_64bit" >&6; }
13966 if test $gl_cv_solaris_64bit = yes; then
13967 acl_libdirstem=lib/64
13968 case "$host_cpu" in
13969 sparc*) acl_libdirstem2=lib/sparcv9 ;;
13970 i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
13971 esac
13972 fi
13973 ;;
13974 *)
13975 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
13976 if test -n "$searchpath"; then
13977 acl_save_IFS="${IFS= }"; IFS=":"
13978 for searchdir in $searchpath; do
13979 if test -d "$searchdir"; then
13980 case "$searchdir" in
13981 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
13982 */../ | */.. )
13983 # Better ignore directories of this form. They are misleading.
13984 ;;
13985 *) searchdir=`cd "$searchdir" && pwd`
13986 case "$searchdir" in
13987 */lib64 ) acl_libdirstem=lib64 ;;
13988 esac ;;
13989 esac
13990 fi
13991 done
13992 IFS="$acl_save_IFS"
13993 fi
13994 ;;
13995 esac
13996 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
13997
13998
13999
14000
14001
14002
14003
14004
14005
14006
14007
14008
14009 use_additional=yes
14010
14011 acl_save_prefix="$prefix"
14012 prefix="$acl_final_prefix"
14013 acl_save_exec_prefix="$exec_prefix"
14014 exec_prefix="$acl_final_exec_prefix"
14015
14016 eval additional_includedir=\"$includedir\"
14017 eval additional_libdir=\"$libdir\"
14018
14019 exec_prefix="$acl_save_exec_prefix"
14020 prefix="$acl_save_prefix"
14021
14022
14023 # Check whether --with-libiconv-prefix was given.
14024 if test "${with_libiconv_prefix+set}" = set; then :
14025 withval=$with_libiconv_prefix;
14026 if test "X$withval" = "Xno"; then
14027 use_additional=no
14028 else
14029 if test "X$withval" = "X"; then
14030
14031 acl_save_prefix="$prefix"
14032 prefix="$acl_final_prefix"
14033 acl_save_exec_prefix="$exec_prefix"
14034 exec_prefix="$acl_final_exec_prefix"
14035
14036 eval additional_includedir=\"$includedir\"
14037 eval additional_libdir=\"$libdir\"
14038
14039 exec_prefix="$acl_save_exec_prefix"
14040 prefix="$acl_save_prefix"
14041
14042 else
14043 additional_includedir="$withval/include"
14044 additional_libdir="$withval/$acl_libdirstem"
14045 if test "$acl_libdirstem2" != "$acl_libdirstem" \
14046 && ! test -d "$withval/$acl_libdirstem"; then
14047 additional_libdir="$withval/$acl_libdirstem2"
14048 fi
14049 fi
14050 fi
14051
14052 fi
14053
14054 LIBICONV=
14055 LTLIBICONV=
14056 INCICONV=
14057 LIBICONV_PREFIX=
14058 HAVE_LIBICONV=
14059 rpathdirs=
14060 ltrpathdirs=
14061 names_already_handled=
14062 names_next_round='iconv '
14063 while test -n "$names_next_round"; do
14064 names_this_round="$names_next_round"
14065 names_next_round=
14066 for name in $names_this_round; do
14067 already_handled=
14068 for n in $names_already_handled; do
14069 if test "$n" = "$name"; then
14070 already_handled=yes
14071 break
14072 fi
14073 done
14074 if test -z "$already_handled"; then
14075 names_already_handled="$names_already_handled $name"
14076 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
14077 eval value=\"\$HAVE_LIB$uppername\"
14078 if test -n "$value"; then
14079 if test "$value" = yes; then
14080 eval value=\"\$LIB$uppername\"
14081 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
14082 eval value=\"\$LTLIB$uppername\"
14083 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
14084 else
14085 :
14086 fi
14087 else
14088 found_dir=
14089 found_la=
14090 found_so=
14091 found_a=
14092 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
14093 if test -n "$acl_shlibext"; then
14094 shrext=".$acl_shlibext" # typically: shrext=.so
14095 else
14096 shrext=
14097 fi
14098 if test $use_additional = yes; then
14099 dir="$additional_libdir"
14100 if test -n "$acl_shlibext"; then
14101 if test -f "$dir/$libname$shrext"; then
14102 found_dir="$dir"
14103 found_so="$dir/$libname$shrext"
14104 else
14105 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
14106 ver=`(cd "$dir" && \
14107 for f in "$libname$shrext".*; do echo "$f"; done \
14108 | sed -e "s,^$libname$shrext\\\\.,," \
14109 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
14110 | sed 1q ) 2>/dev/null`
14111 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
14112 found_dir="$dir"
14113 found_so="$dir/$libname$shrext.$ver"
14114 fi
14115 else
14116 eval library_names=\"$acl_library_names_spec\"
14117 for f in $library_names; do
14118 if test -f "$dir/$f"; then
14119 found_dir="$dir"
14120 found_so="$dir/$f"
14121 break
14122 fi
14123 done
14124 fi
14125 fi
14126 fi
14127 if test "X$found_dir" = "X"; then
14128 if test -f "$dir/$libname.$acl_libext"; then
14129 found_dir="$dir"
14130 found_a="$dir/$libname.$acl_libext"
14131 fi
14132 fi
14133 if test "X$found_dir" != "X"; then
14134 if test -f "$dir/$libname.la"; then
14135 found_la="$dir/$libname.la"
14136 fi
14137 fi
14138 fi
14139 if test "X$found_dir" = "X"; then
14140 for x in $LDFLAGS $LTLIBICONV; do
14141
14142 acl_save_prefix="$prefix"
14143 prefix="$acl_final_prefix"
14144 acl_save_exec_prefix="$exec_prefix"
14145 exec_prefix="$acl_final_exec_prefix"
14146 eval x=\"$x\"
14147 exec_prefix="$acl_save_exec_prefix"
14148 prefix="$acl_save_prefix"
14149
14150 case "$x" in
14151 -L*)
14152 dir=`echo "X$x" | sed -e 's/^X-L//'`
14153 if test -n "$acl_shlibext"; then
14154 if test -f "$dir/$libname$shrext"; then
14155 found_dir="$dir"
14156 found_so="$dir/$libname$shrext"
14157 else
14158 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
14159 ver=`(cd "$dir" && \
14160 for f in "$libname$shrext".*; do echo "$f"; done \
14161 | sed -e "s,^$libname$shrext\\\\.,," \
14162 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
14163 | sed 1q ) 2>/dev/null`
14164 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
14165 found_dir="$dir"
14166 found_so="$dir/$libname$shrext.$ver"
14167 fi
14168 else
14169 eval library_names=\"$acl_library_names_spec\"
14170 for f in $library_names; do
14171 if test -f "$dir/$f"; then
14172 found_dir="$dir"
14173 found_so="$dir/$f"
14174 break
14175 fi
14176 done
14177 fi
14178 fi
14179 fi
14180 if test "X$found_dir" = "X"; then
14181 if test -f "$dir/$libname.$acl_libext"; then
14182 found_dir="$dir"
14183 found_a="$dir/$libname.$acl_libext"
14184 fi
14185 fi
14186 if test "X$found_dir" != "X"; then
14187 if test -f "$dir/$libname.la"; then
14188 found_la="$dir/$libname.la"
14189 fi
14190 fi
14191 ;;
14192 esac
14193 if test "X$found_dir" != "X"; then
14194 break
14195 fi
14196 done
14197 fi
14198 if test "X$found_dir" != "X"; then
14199 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
14200 if test "X$found_so" != "X"; then
14201 if test "$enable_rpath" = no \
14202 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
14203 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
14204 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
14205 else
14206 haveit=
14207 for x in $ltrpathdirs; do
14208 if test "X$x" = "X$found_dir"; then
14209 haveit=yes
14210 break
14211 fi
14212 done
14213 if test -z "$haveit"; then
14214 ltrpathdirs="$ltrpathdirs $found_dir"
14215 fi
14216 if test "$acl_hardcode_direct" = yes; then
14217 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
14218 else
14219 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
14220 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
14221 haveit=
14222 for x in $rpathdirs; do
14223 if test "X$x" = "X$found_dir"; then
14224 haveit=yes
14225 break
14226 fi
14227 done
14228 if test -z "$haveit"; then
14229 rpathdirs="$rpathdirs $found_dir"
14230 fi
14231 else
14232 haveit=
14233 for x in $LDFLAGS $LIBICONV; do
14234
14235 acl_save_prefix="$prefix"
14236 prefix="$acl_final_prefix"
14237 acl_save_exec_prefix="$exec_prefix"
14238 exec_prefix="$acl_final_exec_prefix"
14239 eval x=\"$x\"
14240 exec_prefix="$acl_save_exec_prefix"
14241 prefix="$acl_save_prefix"
14242
14243 if test "X$x" = "X-L$found_dir"; then
14244 haveit=yes
14245 break
14246 fi
14247 done
14248 if test -z "$haveit"; then
14249 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
14250 fi
14251 if test "$acl_hardcode_minus_L" != no; then
14252 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
14253 else
14254 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
14255 fi
14256 fi
14257 fi
14258 fi
14259 else
14260 if test "X$found_a" != "X"; then
14261 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
14262 else
14263 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
14264 fi
14265 fi
14266 additional_includedir=
14267 case "$found_dir" in
14268 */$acl_libdirstem | */$acl_libdirstem/)
14269 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
14270 if test "$name" = 'iconv'; then
14271 LIBICONV_PREFIX="$basedir"
14272 fi
14273 additional_includedir="$basedir/include"
14274 ;;
14275 */$acl_libdirstem2 | */$acl_libdirstem2/)
14276 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
14277 if test "$name" = 'iconv'; then
14278 LIBICONV_PREFIX="$basedir"
14279 fi
14280 additional_includedir="$basedir/include"
14281 ;;
14282 esac
14283 if test "X$additional_includedir" != "X"; then
14284 if test "X$additional_includedir" != "X/usr/include"; then
14285 haveit=
14286 if test "X$additional_includedir" = "X/usr/local/include"; then
14287 if test -n "$GCC"; then
14288 case $host_os in
14289 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
14290 esac
14291 fi
14292 fi
14293 if test -z "$haveit"; then
14294 for x in $CPPFLAGS $INCICONV; do
14295
14296 acl_save_prefix="$prefix"
14297 prefix="$acl_final_prefix"
14298 acl_save_exec_prefix="$exec_prefix"
14299 exec_prefix="$acl_final_exec_prefix"
14300 eval x=\"$x\"
14301 exec_prefix="$acl_save_exec_prefix"
14302 prefix="$acl_save_prefix"
14303
14304 if test "X$x" = "X-I$additional_includedir"; then
14305 haveit=yes
14306 break
14307 fi
14308 done
14309 if test -z "$haveit"; then
14310 if test -d "$additional_includedir"; then
14311 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
14312 fi
14313 fi
14314 fi
14315 fi
14316 fi
14317 if test -n "$found_la"; then
14318 save_libdir="$libdir"
14319 case "$found_la" in
14320 */* | *\\*) . "$found_la" ;;
14321 *) . "./$found_la" ;;
14322 esac
14323 libdir="$save_libdir"
14324 for dep in $dependency_libs; do
14325 case "$dep" in
14326 -L*)
14327 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
14328 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
14329 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
14330 haveit=
14331 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
14332 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
14333 if test -n "$GCC"; then
14334 case $host_os in
14335 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
14336 esac
14337 fi
14338 fi
14339 if test -z "$haveit"; then
14340 haveit=
14341 for x in $LDFLAGS $LIBICONV; do
14342
14343 acl_save_prefix="$prefix"
14344 prefix="$acl_final_prefix"
14345 acl_save_exec_prefix="$exec_prefix"
14346 exec_prefix="$acl_final_exec_prefix"
14347 eval x=\"$x\"
14348 exec_prefix="$acl_save_exec_prefix"
14349 prefix="$acl_save_prefix"
14350
14351 if test "X$x" = "X-L$additional_libdir"; then
14352 haveit=yes
14353 break
14354 fi
14355 done
14356 if test -z "$haveit"; then
14357 if test -d "$additional_libdir"; then
14358 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
14359 fi
14360 fi
14361 haveit=
14362 for x in $LDFLAGS $LTLIBICONV; do
14363
14364 acl_save_prefix="$prefix"
14365 prefix="$acl_final_prefix"
14366 acl_save_exec_prefix="$exec_prefix"
14367 exec_prefix="$acl_final_exec_prefix"
14368 eval x=\"$x\"
14369 exec_prefix="$acl_save_exec_prefix"
14370 prefix="$acl_save_prefix"
14371
14372 if test "X$x" = "X-L$additional_libdir"; then
14373 haveit=yes
14374 break
14375 fi
14376 done
14377 if test -z "$haveit"; then
14378 if test -d "$additional_libdir"; then
14379 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
14380 fi
14381 fi
14382 fi
14383 fi
14384 ;;
14385 -R*)
14386 dir=`echo "X$dep" | sed -e 's/^X-R//'`
14387 if test "$enable_rpath" != no; then
14388 haveit=
14389 for x in $rpathdirs; do
14390 if test "X$x" = "X$dir"; then
14391 haveit=yes
14392 break
14393 fi
14394 done
14395 if test -z "$haveit"; then
14396 rpathdirs="$rpathdirs $dir"
14397 fi
14398 haveit=
14399 for x in $ltrpathdirs; do
14400 if test "X$x" = "X$dir"; then
14401 haveit=yes
14402 break
14403 fi
14404 done
14405 if test -z "$haveit"; then
14406 ltrpathdirs="$ltrpathdirs $dir"
14407 fi
14408 fi
14409 ;;
14410 -l*)
14411 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
14412 ;;
14413 *.la)
14414 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
14415 ;;
14416 *)
14417 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
14418 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
14419 ;;
14420 esac
14421 done
14422 fi
14423 else
14424 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
14425 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
14426 fi
14427 fi
14428 fi
14429 done
14430 done
14431 if test "X$rpathdirs" != "X"; then
14432 if test -n "$acl_hardcode_libdir_separator"; then
14433 alldirs=
14434 for found_dir in $rpathdirs; do
14435 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
14436 done
14437 acl_save_libdir="$libdir"
14438 libdir="$alldirs"
14439 eval flag=\"$acl_hardcode_libdir_flag_spec\"
14440 libdir="$acl_save_libdir"
14441 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
14442 else
14443 for found_dir in $rpathdirs; do
14444 acl_save_libdir="$libdir"
14445 libdir="$found_dir"
14446 eval flag=\"$acl_hardcode_libdir_flag_spec\"
14447 libdir="$acl_save_libdir"
14448 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
14449 done
14450 fi
14451 fi
14452 if test "X$ltrpathdirs" != "X"; then
14453 for found_dir in $ltrpathdirs; do
14454 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
14455 done
14456 fi
14457
14458
14459
14460
14461
14462
14463
14464 if test -z "$GUI_TRUE"; then :
14465
14466
14467
14468
14469
14470
14471
14472
14473
14474
14475
14476
14477
14478
14479
14480
14481
14482
14483
14484
14485
14486
14487
14488
14489
14490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
14491 $as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
14492 if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then :
14493 $as_echo_n "(cached) " >&6
14494 else
14495 gt_save_LIBS="$LIBS"
14496 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
14497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14498 /* end confdefs.h. */
14499 #include <CoreFoundation/CFPreferences.h>
14500 int
14501 main ()
14502 {
14503 CFPreferencesCopyAppValue(NULL, NULL)
14504 ;
14505 return 0;
14506 }
14507 _ACEOF
14508 if ac_fn_c_try_link "$LINENO"; then :
14509 gt_cv_func_CFPreferencesCopyAppValue=yes
14510 else
14511 gt_cv_func_CFPreferencesCopyAppValue=no
14512 fi
14513 rm -f core conftest.err conftest.$ac_objext \
14514 conftest$ac_exeext conftest.$ac_ext
14515 LIBS="$gt_save_LIBS"
14516 fi
14517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
14518 $as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
14519 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
14520
14521 $as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
14522
14523 fi
14524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
14525 $as_echo_n "checking for CFLocaleCopyCurrent... " >&6; }
14526 if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then :
14527 $as_echo_n "(cached) " >&6
14528 else
14529 gt_save_LIBS="$LIBS"
14530 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
14531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14532 /* end confdefs.h. */
14533 #include <CoreFoundation/CFLocale.h>
14534 int
14535 main ()
14536 {
14537 CFLocaleCopyCurrent();
14538 ;
14539 return 0;
14540 }
14541 _ACEOF
14542 if ac_fn_c_try_link "$LINENO"; then :
14543 gt_cv_func_CFLocaleCopyCurrent=yes
14544 else
14545 gt_cv_func_CFLocaleCopyCurrent=no
14546 fi
14547 rm -f core conftest.err conftest.$ac_objext \
14548 conftest$ac_exeext conftest.$ac_ext
14549 LIBS="$gt_save_LIBS"
14550 fi
14551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
14552 $as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
14553 if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
14554
14555 $as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
14556
14557 fi
14558 INTL_MACOSX_LIBS=
14559 if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
14560 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
14561 fi
14562
14563
14564
14565
14566
14567
14568 LIBINTL=
14569 LTLIBINTL=
14570 POSUB=
14571
14572 case " $gt_needs " in
14573 *" need-formatstring-macros "*) gt_api_version=3 ;;
14574 *" need-ngettext "*) gt_api_version=2 ;;
14575 *) gt_api_version=1 ;;
14576 esac
14577 gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
14578 gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
14579
14580 if test "$USE_NLS" = "yes"; then
14581 gt_use_preinstalled_gnugettext=no
14582
14583
14584 if test $gt_api_version -ge 3; then
14585 gt_revision_test_code='
14586 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
14587 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
14588 #endif
14589 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
14590 '
14591 else
14592 gt_revision_test_code=
14593 fi
14594 if test $gt_api_version -ge 2; then
14595 gt_expression_test_code=' + * ngettext ("", "", 0)'
14596 else
14597 gt_expression_test_code=
14598 fi
14599
14600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
14601 $as_echo_n "checking for GNU gettext in libc... " >&6; }
14602 if eval \${$gt_func_gnugettext_libc+:} false; then :
14603 $as_echo_n "(cached) " >&6
14604 else
14605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14606 /* end confdefs.h. */
14607
14608 #include <libintl.h>
14609 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
14610 extern int _nl_msg_cat_cntr;
14611 extern int *_nl_domain_bindings;
14612 #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings)
14613 #else
14614 #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
14615 #endif
14616 $gt_revision_test_code
14617
14618 int
14619 main ()
14620 {
14621
14622 bindtextdomain ("", "");
14623 return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
14624
14625 ;
14626 return 0;
14627 }
14628 _ACEOF
14629 if ac_fn_c_try_link "$LINENO"; then :
14630 eval "$gt_func_gnugettext_libc=yes"
14631 else
14632 eval "$gt_func_gnugettext_libc=no"
14633 fi
14634 rm -f core conftest.err conftest.$ac_objext \
14635 conftest$ac_exeext conftest.$ac_ext
14636 fi
14637 eval ac_res=\$$gt_func_gnugettext_libc
14638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
14639 $as_echo "$ac_res" >&6; }
14640
14641 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
14642
14643
14644
14645
14646
14647 am_save_CPPFLAGS="$CPPFLAGS"
14648
14649 for element in $INCICONV; do
14650 haveit=
14651 for x in $CPPFLAGS; do
14652
14653 acl_save_prefix="$prefix"
14654 prefix="$acl_final_prefix"
14655 acl_save_exec_prefix="$exec_prefix"
14656 exec_prefix="$acl_final_exec_prefix"
14657 eval x=\"$x\"
14658 exec_prefix="$acl_save_exec_prefix"
14659 prefix="$acl_save_prefix"
14660
14661 if test "X$x" = "X$element"; then
14662 haveit=yes
14663 break
14664 fi
14665 done
14666 if test -z "$haveit"; then
14667 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
14668 fi
14669 done
14670
14671
14672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
14673 $as_echo_n "checking for iconv... " >&6; }
14674 if ${am_cv_func_iconv+:} false; then :
14675 $as_echo_n "(cached) " >&6
14676 else
14677
14678 am_cv_func_iconv="no, consider installing GNU libiconv"
14679 am_cv_lib_iconv=no
14680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14681 /* end confdefs.h. */
14682
14683 #include <stdlib.h>
14684 #include <iconv.h>
14685
14686 int
14687 main ()
14688 {
14689 iconv_t cd = iconv_open("","");
14690 iconv(cd,NULL,NULL,NULL,NULL);
14691 iconv_close(cd);
14692 ;
14693 return 0;
14694 }
14695 _ACEOF
14696 if ac_fn_c_try_link "$LINENO"; then :
14697 am_cv_func_iconv=yes
14698 fi
14699 rm -f core conftest.err conftest.$ac_objext \
14700 conftest$ac_exeext conftest.$ac_ext
14701 if test "$am_cv_func_iconv" != yes; then
14702 am_save_LIBS="$LIBS"
14703 LIBS="$LIBS $LIBICONV"
14704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14705 /* end confdefs.h. */
14706
14707 #include <stdlib.h>
14708 #include <iconv.h>
14709
14710 int
14711 main ()
14712 {
14713 iconv_t cd = iconv_open("","");
14714 iconv(cd,NULL,NULL,NULL,NULL);
14715 iconv_close(cd);
14716 ;
14717 return 0;
14718 }
14719 _ACEOF
14720 if ac_fn_c_try_link "$LINENO"; then :
14721 am_cv_lib_iconv=yes
14722 am_cv_func_iconv=yes
14723 fi
14724 rm -f core conftest.err conftest.$ac_objext \
14725 conftest$ac_exeext conftest.$ac_ext
14726 LIBS="$am_save_LIBS"
14727 fi
14728
14729 fi
14730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
14731 $as_echo "$am_cv_func_iconv" >&6; }
14732 if test "$am_cv_func_iconv" = yes; then
14733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
14734 $as_echo_n "checking for working iconv... " >&6; }
14735 if ${am_cv_func_iconv_works+:} false; then :
14736 $as_echo_n "(cached) " >&6
14737 else
14738
14739 am_save_LIBS="$LIBS"
14740 if test $am_cv_lib_iconv = yes; then
14741 LIBS="$LIBS $LIBICONV"
14742 fi
14743 am_cv_func_iconv_works=no
14744 for ac_iconv_const in '' 'const'; do
14745 if test "$cross_compiling" = yes; then :
14746 case "$host_os" in
14747 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
14748 *) am_cv_func_iconv_works="guessing yes" ;;
14749 esac
14750 else
14751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14752 /* end confdefs.h. */
14753
14754 #include <iconv.h>
14755 #include <string.h>
14756
14757 #ifndef ICONV_CONST
14758 # define ICONV_CONST $ac_iconv_const
14759 #endif
14760
14761 int
14762 main ()
14763 {
14764 int result = 0;
14765 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
14766 returns. */
14767 {
14768 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
14769 if (cd_utf8_to_88591 != (iconv_t)(-1))
14770 {
14771 static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
14772 char buf[10];
14773 ICONV_CONST char *inptr = input;
14774 size_t inbytesleft = strlen (input);
14775 char *outptr = buf;
14776 size_t outbytesleft = sizeof (buf);
14777 size_t res = iconv (cd_utf8_to_88591,
14778 &inptr, &inbytesleft,
14779 &outptr, &outbytesleft);
14780 if (res == 0)
14781 result |= 1;
14782 iconv_close (cd_utf8_to_88591);
14783 }
14784 }
14785 /* Test against Solaris 10 bug: Failures are not distinguishable from
14786 successful returns. */
14787 {
14788 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
14789 if (cd_ascii_to_88591 != (iconv_t)(-1))
14790 {
14791 static ICONV_CONST char input[] = "\263";
14792 char buf[10];
14793 ICONV_CONST char *inptr = input;
14794 size_t inbytesleft = strlen (input);
14795 char *outptr = buf;
14796 size_t outbytesleft = sizeof (buf);
14797 size_t res = iconv (cd_ascii_to_88591,
14798 &inptr, &inbytesleft,
14799 &outptr, &outbytesleft);
14800 if (res == 0)
14801 result |= 2;
14802 iconv_close (cd_ascii_to_88591);
14803 }
14804 }
14805 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
14806 {
14807 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
14808 if (cd_88591_to_utf8 != (iconv_t)(-1))
14809 {
14810 static ICONV_CONST char input[] = "\304";
14811 static char buf[2] = { (char)0xDE, (char)0xAD };
14812 ICONV_CONST char *inptr = input;
14813 size_t inbytesleft = 1;
14814 char *outptr = buf;
14815 size_t outbytesleft = 1;
14816 size_t res = iconv (cd_88591_to_utf8,
14817 &inptr, &inbytesleft,
14818 &outptr, &outbytesleft);
14819 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
14820 result |= 4;
14821 iconv_close (cd_88591_to_utf8);
14822 }
14823 }
14824 #if 0 /* This bug could be worked around by the caller. */
14825 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
14826 {
14827 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
14828 if (cd_88591_to_utf8 != (iconv_t)(-1))
14829 {
14830 static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
14831 char buf[50];
14832 ICONV_CONST char *inptr = input;
14833 size_t inbytesleft = strlen (input);
14834 char *outptr = buf;
14835 size_t outbytesleft = sizeof (buf);
14836 size_t res = iconv (cd_88591_to_utf8,
14837 &inptr, &inbytesleft,
14838 &outptr, &outbytesleft);
14839 if ((int)res > 0)
14840 result |= 8;
14841 iconv_close (cd_88591_to_utf8);
14842 }
14843 }
14844 #endif
14845 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
14846 provided. */
14847 if (/* Try standardized names. */
14848 iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
14849 /* Try IRIX, OSF/1 names. */
14850 && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
14851 /* Try AIX names. */
14852 && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
14853 /* Try HP-UX names. */
14854 && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
14855 result |= 16;
14856 return result;
14857
14858 ;
14859 return 0;
14860 }
14861 _ACEOF
14862 if ac_fn_c_try_run "$LINENO"; then :
14863 am_cv_func_iconv_works=yes
14864 fi
14865 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14866 conftest.$ac_objext conftest.beam conftest.$ac_ext
14867 fi
14868
14869 test "$am_cv_func_iconv_works" = no || break
14870 done
14871 LIBS="$am_save_LIBS"
14872
14873 fi
14874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
14875 $as_echo "$am_cv_func_iconv_works" >&6; }
14876 case "$am_cv_func_iconv_works" in
14877 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
14878 *) am_func_iconv=yes ;;
14879 esac
14880 else
14881 am_func_iconv=no am_cv_lib_iconv=no
14882 fi
14883 if test "$am_func_iconv" = yes; then
14884
14885 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
14886
14887 fi
14888 if test "$am_cv_lib_iconv" = yes; then
14889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
14890 $as_echo_n "checking how to link with libiconv... " >&6; }
14891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
14892 $as_echo "$LIBICONV" >&6; }
14893 else
14894 CPPFLAGS="$am_save_CPPFLAGS"
14895 LIBICONV=
14896 LTLIBICONV=
14897 fi
14898
14899
14900
14901
14902
14903
14904
14905
14906
14907
14908
14909 use_additional=yes
14910
14911 acl_save_prefix="$prefix"
14912 prefix="$acl_final_prefix"
14913 acl_save_exec_prefix="$exec_prefix"
14914 exec_prefix="$acl_final_exec_prefix"
14915
14916 eval additional_includedir=\"$includedir\"
14917 eval additional_libdir=\"$libdir\"
14918
14919 exec_prefix="$acl_save_exec_prefix"
14920 prefix="$acl_save_prefix"
14921
14922
14923 # Check whether --with-libintl-prefix was given.
14924 if test "${with_libintl_prefix+set}" = set; then :
14925 withval=$with_libintl_prefix;
14926 if test "X$withval" = "Xno"; then
14927 use_additional=no
14928 else
14929 if test "X$withval" = "X"; then
14930
14931 acl_save_prefix="$prefix"
14932 prefix="$acl_final_prefix"
14933 acl_save_exec_prefix="$exec_prefix"
14934 exec_prefix="$acl_final_exec_prefix"
14935
14936 eval additional_includedir=\"$includedir\"
14937 eval additional_libdir=\"$libdir\"
14938
14939 exec_prefix="$acl_save_exec_prefix"
14940 prefix="$acl_save_prefix"
14941
14942 else
14943 additional_includedir="$withval/include"
14944 additional_libdir="$withval/$acl_libdirstem"
14945 if test "$acl_libdirstem2" != "$acl_libdirstem" \
14946 && ! test -d "$withval/$acl_libdirstem"; then
14947 additional_libdir="$withval/$acl_libdirstem2"
14948 fi
14949 fi
14950 fi
14951
14952 fi
14953
14954 LIBINTL=
14955 LTLIBINTL=
14956 INCINTL=
14957 LIBINTL_PREFIX=
14958 HAVE_LIBINTL=
14959 rpathdirs=
14960 ltrpathdirs=
14961 names_already_handled=
14962 names_next_round='intl '
14963 while test -n "$names_next_round"; do
14964 names_this_round="$names_next_round"
14965 names_next_round=
14966 for name in $names_this_round; do
14967 already_handled=
14968 for n in $names_already_handled; do
14969 if test "$n" = "$name"; then
14970 already_handled=yes
14971 break
14972 fi
14973 done
14974 if test -z "$already_handled"; then
14975 names_already_handled="$names_already_handled $name"
14976 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
14977 eval value=\"\$HAVE_LIB$uppername\"
14978 if test -n "$value"; then
14979 if test "$value" = yes; then
14980 eval value=\"\$LIB$uppername\"
14981 test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
14982 eval value=\"\$LTLIB$uppername\"
14983 test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
14984 else
14985 :
14986 fi
14987 else
14988 found_dir=
14989 found_la=
14990 found_so=
14991 found_a=
14992 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
14993 if test -n "$acl_shlibext"; then
14994 shrext=".$acl_shlibext" # typically: shrext=.so
14995 else
14996 shrext=
14997 fi
14998 if test $use_additional = yes; then
14999 dir="$additional_libdir"
15000 if test -n "$acl_shlibext"; then
15001 if test -f "$dir/$libname$shrext"; then
15002 found_dir="$dir"
15003 found_so="$dir/$libname$shrext"
15004 else
15005 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
15006 ver=`(cd "$dir" && \
15007 for f in "$libname$shrext".*; do echo "$f"; done \
15008 | sed -e "s,^$libname$shrext\\\\.,," \
15009 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
15010 | sed 1q ) 2>/dev/null`
15011 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
15012 found_dir="$dir"
15013 found_so="$dir/$libname$shrext.$ver"
15014 fi
15015 else
15016 eval library_names=\"$acl_library_names_spec\"
15017 for f in $library_names; do
15018 if test -f "$dir/$f"; then
15019 found_dir="$dir"
15020 found_so="$dir/$f"
15021 break
15022 fi
15023 done
15024 fi
15025 fi
15026 fi
15027 if test "X$found_dir" = "X"; then
15028 if test -f "$dir/$libname.$acl_libext"; then
15029 found_dir="$dir"
15030 found_a="$dir/$libname.$acl_libext"
15031 fi
15032 fi
15033 if test "X$found_dir" != "X"; then
15034 if test -f "$dir/$libname.la"; then
15035 found_la="$dir/$libname.la"
15036 fi
15037 fi
15038 fi
15039 if test "X$found_dir" = "X"; then
15040 for x in $LDFLAGS $LTLIBINTL; do
15041
15042 acl_save_prefix="$prefix"
15043 prefix="$acl_final_prefix"
15044 acl_save_exec_prefix="$exec_prefix"
15045 exec_prefix="$acl_final_exec_prefix"
15046 eval x=\"$x\"
15047 exec_prefix="$acl_save_exec_prefix"
15048 prefix="$acl_save_prefix"
15049
15050 case "$x" in
15051 -L*)
15052 dir=`echo "X$x" | sed -e 's/^X-L//'`
15053 if test -n "$acl_shlibext"; then
15054 if test -f "$dir/$libname$shrext"; then
15055 found_dir="$dir"
15056 found_so="$dir/$libname$shrext"
15057 else
15058 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
15059 ver=`(cd "$dir" && \
15060 for f in "$libname$shrext".*; do echo "$f"; done \
15061 | sed -e "s,^$libname$shrext\\\\.,," \
15062 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
15063 | sed 1q ) 2>/dev/null`
15064 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
15065 found_dir="$dir"
15066 found_so="$dir/$libname$shrext.$ver"
15067 fi
15068 else
15069 eval library_names=\"$acl_library_names_spec\"
15070 for f in $library_names; do
15071 if test -f "$dir/$f"; then
15072 found_dir="$dir"
15073 found_so="$dir/$f"
15074 break
15075 fi
15076 done
15077 fi
15078 fi
15079 fi
15080 if test "X$found_dir" = "X"; then
15081 if test -f "$dir/$libname.$acl_libext"; then
15082 found_dir="$dir"
15083 found_a="$dir/$libname.$acl_libext"
15084 fi
15085 fi
15086 if test "X$found_dir" != "X"; then
15087 if test -f "$dir/$libname.la"; then
15088 found_la="$dir/$libname.la"
15089 fi
15090 fi
15091 ;;
15092 esac
15093 if test "X$found_dir" != "X"; then
15094 break
15095 fi
15096 done
15097 fi
15098 if test "X$found_dir" != "X"; then
15099 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
15100 if test "X$found_so" != "X"; then
15101 if test "$enable_rpath" = no \
15102 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
15103 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
15104 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
15105 else
15106 haveit=
15107 for x in $ltrpathdirs; do
15108 if test "X$x" = "X$found_dir"; then
15109 haveit=yes
15110 break
15111 fi
15112 done
15113 if test -z "$haveit"; then
15114 ltrpathdirs="$ltrpathdirs $found_dir"
15115 fi
15116 if test "$acl_hardcode_direct" = yes; then
15117 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
15118 else
15119 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
15120 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
15121 haveit=
15122 for x in $rpathdirs; do
15123 if test "X$x" = "X$found_dir"; then
15124 haveit=yes
15125 break
15126 fi
15127 done
15128 if test -z "$haveit"; then
15129 rpathdirs="$rpathdirs $found_dir"
15130 fi
15131 else
15132 haveit=
15133 for x in $LDFLAGS $LIBINTL; do
15134
15135 acl_save_prefix="$prefix"
15136 prefix="$acl_final_prefix"
15137 acl_save_exec_prefix="$exec_prefix"
15138 exec_prefix="$acl_final_exec_prefix"
15139 eval x=\"$x\"
15140 exec_prefix="$acl_save_exec_prefix"
15141 prefix="$acl_save_prefix"
15142
15143 if test "X$x" = "X-L$found_dir"; then
15144 haveit=yes
15145 break
15146 fi
15147 done
15148 if test -z "$haveit"; then
15149 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
15150 fi
15151 if test "$acl_hardcode_minus_L" != no; then
15152 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
15153 else
15154 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
15155 fi
15156 fi
15157 fi
15158 fi
15159 else
15160 if test "X$found_a" != "X"; then
15161 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
15162 else
15163 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
15164 fi
15165 fi
15166 additional_includedir=
15167 case "$found_dir" in
15168 */$acl_libdirstem | */$acl_libdirstem/)
15169 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
15170 if test "$name" = 'intl'; then
15171 LIBINTL_PREFIX="$basedir"
15172 fi
15173 additional_includedir="$basedir/include"
15174 ;;
15175 */$acl_libdirstem2 | */$acl_libdirstem2/)
15176 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
15177 if test "$name" = 'intl'; then
15178 LIBINTL_PREFIX="$basedir"
15179 fi
15180 additional_includedir="$basedir/include"
15181 ;;
15182 esac
15183 if test "X$additional_includedir" != "X"; then
15184 if test "X$additional_includedir" != "X/usr/include"; then
15185 haveit=
15186 if test "X$additional_includedir" = "X/usr/local/include"; then
15187 if test -n "$GCC"; then
15188 case $host_os in
15189 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
15190 esac
15191 fi
15192 fi
15193 if test -z "$haveit"; then
15194 for x in $CPPFLAGS $INCINTL; do
15195
15196 acl_save_prefix="$prefix"
15197 prefix="$acl_final_prefix"
15198 acl_save_exec_prefix="$exec_prefix"
15199 exec_prefix="$acl_final_exec_prefix"
15200 eval x=\"$x\"
15201 exec_prefix="$acl_save_exec_prefix"
15202 prefix="$acl_save_prefix"
15203
15204 if test "X$x" = "X-I$additional_includedir"; then
15205 haveit=yes
15206 break
15207 fi
15208 done
15209 if test -z "$haveit"; then
15210 if test -d "$additional_includedir"; then
15211 INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
15212 fi
15213 fi
15214 fi
15215 fi
15216 fi
15217 if test -n "$found_la"; then
15218 save_libdir="$libdir"
15219 case "$found_la" in
15220 */* | *\\*) . "$found_la" ;;
15221 *) . "./$found_la" ;;
15222 esac
15223 libdir="$save_libdir"
15224 for dep in $dependency_libs; do
15225 case "$dep" in
15226 -L*)
15227 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
15228 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
15229 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
15230 haveit=
15231 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
15232 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
15233 if test -n "$GCC"; then
15234 case $host_os in
15235 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
15236 esac
15237 fi
15238 fi
15239 if test -z "$haveit"; then
15240 haveit=
15241 for x in $LDFLAGS $LIBINTL; do
15242
15243 acl_save_prefix="$prefix"
15244 prefix="$acl_final_prefix"
15245 acl_save_exec_prefix="$exec_prefix"
15246 exec_prefix="$acl_final_exec_prefix"
15247 eval x=\"$x\"
15248 exec_prefix="$acl_save_exec_prefix"
15249 prefix="$acl_save_prefix"
15250
15251 if test "X$x" = "X-L$additional_libdir"; then
15252 haveit=yes
15253 break
15254 fi
15255 done
15256 if test -z "$haveit"; then
15257 if test -d "$additional_libdir"; then
15258 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
15259 fi
15260 fi
15261 haveit=
15262 for x in $LDFLAGS $LTLIBINTL; do
15263
15264 acl_save_prefix="$prefix"
15265 prefix="$acl_final_prefix"
15266 acl_save_exec_prefix="$exec_prefix"
15267 exec_prefix="$acl_final_exec_prefix"
15268 eval x=\"$x\"
15269 exec_prefix="$acl_save_exec_prefix"
15270 prefix="$acl_save_prefix"
15271
15272 if test "X$x" = "X-L$additional_libdir"; then
15273 haveit=yes
15274 break
15275 fi
15276 done
15277 if test -z "$haveit"; then
15278 if test -d "$additional_libdir"; then
15279 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
15280 fi
15281 fi
15282 fi
15283 fi
15284 ;;
15285 -R*)
15286 dir=`echo "X$dep" | sed -e 's/^X-R//'`
15287 if test "$enable_rpath" != no; then
15288 haveit=
15289 for x in $rpathdirs; do
15290 if test "X$x" = "X$dir"; then
15291 haveit=yes
15292 break
15293 fi
15294 done
15295 if test -z "$haveit"; then
15296 rpathdirs="$rpathdirs $dir"
15297 fi
15298 haveit=
15299 for x in $ltrpathdirs; do
15300 if test "X$x" = "X$dir"; then
15301 haveit=yes
15302 break
15303 fi
15304 done
15305 if test -z "$haveit"; then
15306 ltrpathdirs="$ltrpathdirs $dir"
15307 fi
15308 fi
15309 ;;
15310 -l*)
15311 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
15312 ;;
15313 *.la)
15314 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
15315 ;;
15316 *)
15317 LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
15318 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
15319 ;;
15320 esac
15321 done
15322 fi
15323 else
15324 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
15325 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
15326 fi
15327 fi
15328 fi
15329 done
15330 done
15331 if test "X$rpathdirs" != "X"; then
15332 if test -n "$acl_hardcode_libdir_separator"; then
15333 alldirs=
15334 for found_dir in $rpathdirs; do
15335 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
15336 done
15337 acl_save_libdir="$libdir"
15338 libdir="$alldirs"
15339 eval flag=\"$acl_hardcode_libdir_flag_spec\"
15340 libdir="$acl_save_libdir"
15341 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
15342 else
15343 for found_dir in $rpathdirs; do
15344 acl_save_libdir="$libdir"
15345 libdir="$found_dir"
15346 eval flag=\"$acl_hardcode_libdir_flag_spec\"
15347 libdir="$acl_save_libdir"
15348 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
15349 done
15350 fi
15351 fi
15352 if test "X$ltrpathdirs" != "X"; then
15353 for found_dir in $ltrpathdirs; do
15354 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
15355 done
15356 fi
15357
15358
15359
15360
15361
15362
15363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
15364 $as_echo_n "checking for GNU gettext in libintl... " >&6; }
15365 if eval \${$gt_func_gnugettext_libintl+:} false; then :
15366 $as_echo_n "(cached) " >&6
15367 else
15368 gt_save_CPPFLAGS="$CPPFLAGS"
15369 CPPFLAGS="$CPPFLAGS $INCINTL"
15370 gt_save_LIBS="$LIBS"
15371 LIBS="$LIBS $LIBINTL"
15372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15373 /* end confdefs.h. */
15374
15375 #include <libintl.h>
15376 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
15377 extern int _nl_msg_cat_cntr;
15378 extern
15379 #ifdef __cplusplus
15380 "C"
15381 #endif
15382 const char *_nl_expand_alias (const char *);
15383 #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
15384 #else
15385 #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
15386 #endif
15387 $gt_revision_test_code
15388
15389 int
15390 main ()
15391 {
15392
15393 bindtextdomain ("", "");
15394 return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
15395
15396 ;
15397 return 0;
15398 }
15399 _ACEOF
15400 if ac_fn_c_try_link "$LINENO"; then :
15401 eval "$gt_func_gnugettext_libintl=yes"
15402 else
15403 eval "$gt_func_gnugettext_libintl=no"
15404 fi
15405 rm -f core conftest.err conftest.$ac_objext \
15406 conftest$ac_exeext conftest.$ac_ext
15407 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
15408 LIBS="$LIBS $LIBICONV"
15409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15410 /* end confdefs.h. */
15411
15412 #include <libintl.h>
15413 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
15414 extern int _nl_msg_cat_cntr;
15415 extern
15416 #ifdef __cplusplus
15417 "C"
15418 #endif
15419 const char *_nl_expand_alias (const char *);
15420 #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
15421 #else
15422 #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
15423 #endif
15424 $gt_revision_test_code
15425
15426 int
15427 main ()
15428 {
15429
15430 bindtextdomain ("", "");
15431 return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
15432
15433 ;
15434 return 0;
15435 }
15436 _ACEOF
15437 if ac_fn_c_try_link "$LINENO"; then :
15438 LIBINTL="$LIBINTL $LIBICONV"
15439 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
15440 eval "$gt_func_gnugettext_libintl=yes"
15441
15442 fi
15443 rm -f core conftest.err conftest.$ac_objext \
15444 conftest$ac_exeext conftest.$ac_ext
15445 fi
15446 CPPFLAGS="$gt_save_CPPFLAGS"
15447 LIBS="$gt_save_LIBS"
15448 fi
15449 eval ac_res=\$$gt_func_gnugettext_libintl
15450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15451 $as_echo "$ac_res" >&6; }
15452 fi
15453
15454 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
15455 || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
15456 && test "$PACKAGE" != gettext-runtime \
15457 && test "$PACKAGE" != gettext-tools; }; then
15458 gt_use_preinstalled_gnugettext=yes
15459 else
15460 LIBINTL=
15461 LTLIBINTL=
15462 INCINTL=
15463 fi
15464
15465
15466
15467 if test -n "$INTL_MACOSX_LIBS"; then
15468 if test "$gt_use_preinstalled_gnugettext" = "yes" \
15469 || test "$nls_cv_use_gnu_gettext" = "yes"; then
15470 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
15471 LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
15472 fi
15473 fi
15474
15475 if test "$gt_use_preinstalled_gnugettext" = "yes" \
15476 || test "$nls_cv_use_gnu_gettext" = "yes"; then
15477
15478 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
15479
15480 else
15481 USE_NLS=no
15482 fi
15483 fi
15484
15485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
15486 $as_echo_n "checking whether to use NLS... " >&6; }
15487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
15488 $as_echo "$USE_NLS" >&6; }
15489 if test "$USE_NLS" = "yes"; then
15490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
15491 $as_echo_n "checking where the gettext function comes from... " >&6; }
15492 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
15493 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
15494 gt_source="external libintl"
15495 else
15496 gt_source="libc"
15497 fi
15498 else
15499 gt_source="included intl directory"
15500 fi
15501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
15502 $as_echo "$gt_source" >&6; }
15503 fi
15504
15505 if test "$USE_NLS" = "yes"; then
15506
15507 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
15508 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
15509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
15510 $as_echo_n "checking how to link with libintl... " >&6; }
15511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
15512 $as_echo "$LIBINTL" >&6; }
15513
15514 for element in $INCINTL; do
15515 haveit=
15516 for x in $CPPFLAGS; do
15517
15518 acl_save_prefix="$prefix"
15519 prefix="$acl_final_prefix"
15520 acl_save_exec_prefix="$exec_prefix"
15521 exec_prefix="$acl_final_exec_prefix"
15522 eval x=\"$x\"
15523 exec_prefix="$acl_save_exec_prefix"
15524 prefix="$acl_save_prefix"
15525
15526 if test "X$x" = "X$element"; then
15527 haveit=yes
15528 break
15529 fi
15530 done
15531 if test -z "$haveit"; then
15532 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
15533 fi
15534 done
15535
15536 fi
15537
15538
15539 $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
15540
15541
15542 $as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h
15543
15544 fi
15545
15546 POSUB=po
15547 fi
15548
15549
15550
15551 INTLLIBS="$LIBINTL"
15552
15553
15554
15555
15556
15557
15558
15559
15560 fi
15561
15562 # Checks for header files.
15563 for ac_header in unistd.h limits.h
15564 do :
15565 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15566 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15567 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15568 cat >>confdefs.h <<_ACEOF
15569 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15570 _ACEOF
15571
15572 fi
15573
15574 done
15575
15576
15577 # Checks for typedefs, structures, and compiler characteristics.
15578
15579 # Checks for library functions.
15580 for ac_header in stdlib.h
15581 do :
15582 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
15583 if test "x$ac_cv_header_stdlib_h" = xyes; then :
15584 cat >>confdefs.h <<_ACEOF
15585 #define HAVE_STDLIB_H 1
15586 _ACEOF
15587
15588 fi
15589
15590 done
15591
15592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
15593 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
15594 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
15595 $as_echo_n "(cached) " >&6
15596 else
15597 if test "$cross_compiling" = yes; then :
15598 ac_cv_func_malloc_0_nonnull=no
15599 else
15600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15601 /* end confdefs.h. */
15602 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
15603 # include <stdlib.h>
15604 #else
15605 char *malloc ();
15606 #endif
15607
15608 int
15609 main ()
15610 {
15611 return ! malloc (0);
15612 ;
15613 return 0;
15614 }
15615 _ACEOF
15616 if ac_fn_c_try_run "$LINENO"; then :
15617 ac_cv_func_malloc_0_nonnull=yes
15618 else
15619 ac_cv_func_malloc_0_nonnull=no
15620 fi
15621 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15622 conftest.$ac_objext conftest.beam conftest.$ac_ext
15623 fi
15624
15625 fi
15626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
15627 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
15628 if test $ac_cv_func_malloc_0_nonnull = yes; then :
15629
15630 $as_echo "#define HAVE_MALLOC 1" >>confdefs.h
15631
15632 else
15633 $as_echo "#define HAVE_MALLOC 0" >>confdefs.h
15634
15635 case " $LIBOBJS " in
15636 *" malloc.$ac_objext "* ) ;;
15637 *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
15638 ;;
15639 esac
15640
15641
15642 $as_echo "#define malloc rpl_malloc" >>confdefs.h
15643
15644 fi
15645
15646
15647
15648 ac_config_files="$ac_config_files Makefile src/Makefile res/Makefile test/Makefile po/Makefile.in po/Makefile man/Makefile"
15649
15650 cat >confcache <<\_ACEOF
15651 # This file is a shell script that caches the results of configure
15652 # tests run on this system so they can be shared between configure
15653 # scripts and configure runs, see configure's option --config-cache.
15654 # It is not useful on other systems. If it contains results you don't
15655 # want to keep, you may remove or edit it.
15656 #
15657 # config.status only pays attention to the cache file if you give it
15658 # the --recheck option to rerun configure.
15659 #
15660 # `ac_cv_env_foo' variables (set or unset) will be overridden when
15661 # loading this file, other *unset* `ac_cv_foo' will be assigned the
15662 # following values.
15663
15664 _ACEOF
15665
15666 # The following way of writing the cache mishandles newlines in values,
15667 # but we know of no workaround that is simple, portable, and efficient.
15668 # So, we kill variables containing newlines.
15669 # Ultrix sh set writes to stderr and can't be redirected directly,
15670 # and sets the high bit in the cache file unless we assign to the vars.
15671 (
15672 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15673 eval ac_val=\$$ac_var
15674 case $ac_val in #(
15675 *${as_nl}*)
15676 case $ac_var in #(
15677 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15678 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
15679 esac
15680 case $ac_var in #(
15681 _ | IFS | as_nl) ;; #(
15682 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15683 *) { eval $ac_var=; unset $ac_var;} ;;
15684 esac ;;
15685 esac
15686 done
15687
15688 (set) 2>&1 |
15689 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15690 *${as_nl}ac_space=\ *)
15691 # `set' does not quote correctly, so add quotes: double-quote
15692 # substitution turns \\\\ into \\, and sed turns \\ into \.
15693 sed -n \
15694 "s/'/'\\\\''/g;
15695 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15696 ;; #(
15697 *)
15698 # `set' quotes correctly as required by POSIX, so do not add quotes.
15699 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
15700 ;;
15701 esac |
15702 sort
15703 ) |
15704 sed '
15705 /^ac_cv_env_/b end
15706 t clear
15707 :clear
15708 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15709 t end
15710 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15711 :end' >>confcache
15712 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15713 if test -w "$cache_file"; then
15714 if test "x$cache_file" != "x/dev/null"; then
15715 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15716 $as_echo "$as_me: updating cache $cache_file" >&6;}
15717 if test ! -f "$cache_file" || test -h "$cache_file"; then
15718 cat confcache >"$cache_file"
15719 else
15720 case $cache_file in #(
15721 */* | ?:*)
15722 mv -f confcache "$cache_file"$$ &&
15723 mv -f "$cache_file"$$ "$cache_file" ;; #(
15724 *)
15725 mv -f confcache "$cache_file" ;;
15726 esac
15727 fi
15728 fi
15729 else
15730 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15731 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
15732 fi
15733 fi
15734 rm -f confcache
15735
15736 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15737 # Let make expand exec_prefix.
15738 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15739
15740 DEFS=-DHAVE_CONFIG_H
15741
15742 ac_libobjs=
15743 ac_ltlibobjs=
15744 U=
15745 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15746 # 1. Remove the extension, and $U if already installed.
15747 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
15748 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
15749 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15750 # will be set to the directory where LIBOBJS objects are built.
15751 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15752 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
15753 done
15754 LIBOBJS=$ac_libobjs
15755
15756 LTLIBOBJS=$ac_ltlibobjs
15757
15758
15759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
15760 $as_echo_n "checking that generated files are newer than configure... " >&6; }
15761 if test -n "$am_sleep_pid"; then
15762 # Hide warnings about reused PIDs.
15763 wait $am_sleep_pid 2>/dev/null
15764 fi
15765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15766 $as_echo "done" >&6; }
15767 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
15768 as_fn_error $? "conditional \"AMDEP\" was never defined.
15769 Usually this means the macro was only invoked conditionally." "$LINENO" 5
15770 fi
15771 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
15772 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
15773 Usually this means the macro was only invoked conditionally." "$LINENO" 5
15774 fi
15775 if test -n "$EXEEXT"; then
15776 am__EXEEXT_TRUE=
15777 am__EXEEXT_FALSE='#'
15778 else
15779 am__EXEEXT_TRUE='#'
15780 am__EXEEXT_FALSE=
15781 fi
15782
15783 if test -z "${CLI_ONLY_TRUE}" && test -z "${CLI_ONLY_FALSE}"; then
15784 as_fn_error $? "conditional \"CLI_ONLY\" was never defined.
15785 Usually this means the macro was only invoked conditionally." "$LINENO" 5
15786 fi
15787 if test -z "${GUI_TRUE}" && test -z "${GUI_FALSE}"; then
15788 as_fn_error $? "conditional \"GUI\" was never defined.
15789 Usually this means the macro was only invoked conditionally." "$LINENO" 5
15790 fi
15791
15792 : "${CONFIG_STATUS=./config.status}"
15793 ac_write_fail=0
15794 ac_clean_files_save=$ac_clean_files
15795 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15796 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15797 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15798 as_write_fail=0
15799 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
15800 #! $SHELL
15801 # Generated by $as_me.
15802 # Run this file to recreate the current configuration.
15803 # Compiler output produced by configure, useful for debugging
15804 # configure, is in config.log if it exists.
15805
15806 debug=false
15807 ac_cs_recheck=false
15808 ac_cs_silent=false
15809
15810 SHELL=\${CONFIG_SHELL-$SHELL}
15811 export SHELL
15812 _ASEOF
15813 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15814 ## -------------------- ##
15815 ## M4sh Initialization. ##
15816 ## -------------------- ##
15817
15818 # Be more Bourne compatible
15819 DUALCASE=1; export DUALCASE # for MKS sh
15820 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
15821 emulate sh
15822 NULLCMD=:
15823 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
15824 # is contrary to our usage. Disable this feature.
15825 alias -g '${1+"$@"}'='"$@"'
15826 setopt NO_GLOB_SUBST
15827 else
15828 case `(set -o) 2>/dev/null` in #(
15829 *posix*) :
15830 set -o posix ;; #(
15831 *) :
15832 ;;
15833 esac
15834 fi
15835
15836
15837 as_nl='
15838 '
15839 export as_nl
15840 # Printing a long string crashes Solaris 7 /usr/bin/printf.
15841 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15842 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15843 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15844 # Prefer a ksh shell builtin over an external printf program on Solaris,
15845 # but without wasting forks for bash or zsh.
15846 if test -z "$BASH_VERSION$ZSH_VERSION" \
15847 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15848 as_echo='print -r --'
15849 as_echo_n='print -rn --'
15850 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15851 as_echo='printf %s\n'
15852 as_echo_n='printf %s'
15853 else
15854 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15855 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15856 as_echo_n='/usr/ucb/echo -n'
15857 else
15858 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15859 as_echo_n_body='eval
15860 arg=$1;
15861 case $arg in #(
15862 *"$as_nl"*)
15863 expr "X$arg" : "X\\(.*\\)$as_nl";
15864 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15865 esac;
15866 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15867 '
15868 export as_echo_n_body
15869 as_echo_n='sh -c $as_echo_n_body as_echo'
15870 fi
15871 export as_echo_body
15872 as_echo='sh -c $as_echo_body as_echo'
15873 fi
15874
15875 # The user is always right.
15876 if test "${PATH_SEPARATOR+set}" != set; then
15877 PATH_SEPARATOR=:
15878 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15879 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15880 PATH_SEPARATOR=';'
15881 }
15882 fi
15883
15884
15885 # IFS
15886 # We need space, tab and new line, in precisely that order. Quoting is
15887 # there to prevent editors from complaining about space-tab.
15888 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
15889 # splitting by setting IFS to empty value.)
15890 IFS=" "" $as_nl"
15891
15892 # Find who we are. Look in the path if we contain no directory separator.
15893 as_myself=
15894 case $0 in #((
15895 *[\\/]* ) as_myself=$0 ;;
15896 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15897 for as_dir in $PATH
15898 do
15899 IFS=$as_save_IFS
15900 test -z "$as_dir" && as_dir=.
15901 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15902 done
15903 IFS=$as_save_IFS
15904
15905 ;;
15906 esac
15907 # We did not find ourselves, most probably we were run as `sh COMMAND'
15908 # in which case we are not to be found in the path.
15909 if test "x$as_myself" = x; then
15910 as_myself=$0
15911 fi
15912 if test ! -f "$as_myself"; then
15913 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15914 exit 1
15915 fi
15916
15917 # Unset variables that we do not need and which cause bugs (e.g. in
15918 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15919 # suppresses any "Segmentation fault" message there. '((' could
15920 # trigger a bug in pdksh 5.2.14.
15921 for as_var in BASH_ENV ENV MAIL MAILPATH
15922 do eval test x\${$as_var+set} = xset \
15923 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
15924 done
15925 PS1='$ '
15926 PS2='> '
15927 PS4='+ '
15928
15929 # NLS nuisances.
15930 LC_ALL=C
15931 export LC_ALL
15932 LANGUAGE=C
15933 export LANGUAGE
15934
15935 # CDPATH.
15936 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15937
15938
15939 # as_fn_error STATUS ERROR [LINENO LOG_FD]
15940 # ----------------------------------------
15941 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15942 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
15943 # script with STATUS, using 1 if that was 0.
15944 as_fn_error ()
15945 {
15946 as_status=$1; test $as_status -eq 0 && as_status=1
15947 if test "$4"; then
15948 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15949 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
15950 fi
15951 $as_echo "$as_me: error: $2" >&2
15952 as_fn_exit $as_status
15953 } # as_fn_error
15954
15955
15956 # as_fn_set_status STATUS
15957 # -----------------------
15958 # Set $? to STATUS, without forking.
15959 as_fn_set_status ()
15960 {
15961 return $1
15962 } # as_fn_set_status
15963
15964 # as_fn_exit STATUS
15965 # -----------------
15966 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15967 as_fn_exit ()
15968 {
15969 set +e
15970 as_fn_set_status $1
15971 exit $1
15972 } # as_fn_exit
15973
15974 # as_fn_unset VAR
15975 # ---------------
15976 # Portably unset VAR.
15977 as_fn_unset ()
15978 {
15979 { eval $1=; unset $1;}
15980 }
15981 as_unset=as_fn_unset
15982 # as_fn_append VAR VALUE
15983 # ----------------------
15984 # Append the text in VALUE to the end of the definition contained in VAR. Take
15985 # advantage of any shell optimizations that allow amortized linear growth over
15986 # repeated appends, instead of the typical quadratic growth present in naive
15987 # implementations.
15988 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15989 eval 'as_fn_append ()
15990 {
15991 eval $1+=\$2
15992 }'
15993 else
15994 as_fn_append ()
15995 {
15996 eval $1=\$$1\$2
15997 }
15998 fi # as_fn_append
15999
16000 # as_fn_arith ARG...
16001 # ------------------
16002 # Perform arithmetic evaluation on the ARGs, and store the result in the
16003 # global $as_val. Take advantage of shells that can avoid forks. The arguments
16004 # must be portable across $(()) and expr.
16005 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16006 eval 'as_fn_arith ()
16007 {
16008 as_val=$(( $* ))
16009 }'
16010 else
16011 as_fn_arith ()
16012 {
16013 as_val=`expr "$@" || test $? -eq 1`
16014 }
16015 fi # as_fn_arith
16016
16017
16018 if expr a : '\(a\)' >/dev/null 2>&1 &&
16019 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16020 as_expr=expr
16021 else
16022 as_expr=false
16023 fi
16024
16025 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16026 as_basename=basename
16027 else
16028 as_basename=false
16029 fi
16030
16031 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16032 as_dirname=dirname
16033 else
16034 as_dirname=false
16035 fi
16036
16037 as_me=`$as_basename -- "$0" ||
16038 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16039 X"$0" : 'X\(//\)$' \| \
16040 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
16041 $as_echo X/"$0" |
16042 sed '/^.*\/\([^/][^/]*\)\/*$/{
16043 s//\1/
16044 q
16045 }
16046 /^X\/\(\/\/\)$/{
16047 s//\1/
16048 q
16049 }
16050 /^X\/\(\/\).*/{
16051 s//\1/
16052 q
16053 }
16054 s/.*/./; q'`
16055
16056 # Avoid depending upon Character Ranges.
16057 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16058 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16059 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16060 as_cr_digits='0123456789'
16061 as_cr_alnum=$as_cr_Letters$as_cr_digits
16062
16063 ECHO_C= ECHO_N= ECHO_T=
16064 case `echo -n x` in #(((((
16065 -n*)
16066 case `echo 'xy\c'` in
16067 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
16068 xy) ECHO_C='\c';;
16069 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16070 ECHO_T=' ';;
16071 esac;;
16072 *)
16073 ECHO_N='-n';;
16074 esac
16075
16076 rm -f conf$$ conf$$.exe conf$$.file
16077 if test -d conf$$.dir; then
16078 rm -f conf$$.dir/conf$$.file
16079 else
16080 rm -f conf$$.dir
16081 mkdir conf$$.dir 2>/dev/null
16082 fi
16083 if (echo >conf$$.file) 2>/dev/null; then
16084 if ln -s conf$$.file conf$$ 2>/dev/null; then
16085 as_ln_s='ln -s'
16086 # ... but there are two gotchas:
16087 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16088 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
16089 # In both cases, we have to default to `cp -pR'.
16090 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
16091 as_ln_s='cp -pR'
16092 elif ln conf$$.file conf$$ 2>/dev/null; then
16093 as_ln_s=ln
16094 else
16095 as_ln_s='cp -pR'
16096 fi
16097 else
16098 as_ln_s='cp -pR'
16099 fi
16100 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16101 rmdir conf$$.dir 2>/dev/null
16102
16103
16104 # as_fn_mkdir_p
16105 # -------------
16106 # Create "$as_dir" as a directory, including parents if necessary.
16107 as_fn_mkdir_p ()
16108 {
16109
16110 case $as_dir in #(
16111 -*) as_dir=./$as_dir;;
16112 esac
16113 test -d "$as_dir" || eval $as_mkdir_p || {
16114 as_dirs=
16115 while :; do
16116 case $as_dir in #(
16117 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16118 *) as_qdir=$as_dir;;
16119 esac
16120 as_dirs="'$as_qdir' $as_dirs"
16121 as_dir=`$as_dirname -- "$as_dir" ||
16122 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16123 X"$as_dir" : 'X\(//\)[^/]' \| \
16124 X"$as_dir" : 'X\(//\)$' \| \
16125 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16126 $as_echo X"$as_dir" |
16127 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16128 s//\1/
16129 q
16130 }
16131 /^X\(\/\/\)[^/].*/{
16132 s//\1/
16133 q
16134 }
16135 /^X\(\/\/\)$/{
16136 s//\1/
16137 q
16138 }
16139 /^X\(\/\).*/{
16140 s//\1/
16141 q
16142 }
16143 s/.*/./; q'`
16144 test -d "$as_dir" && break
16145 done
16146 test -z "$as_dirs" || eval "mkdir $as_dirs"
16147 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
16148
16149
16150 } # as_fn_mkdir_p
16151 if mkdir -p . 2>/dev/null; then
16152 as_mkdir_p='mkdir -p "$as_dir"'
16153 else
16154 test -d ./-p && rmdir ./-p
16155 as_mkdir_p=false
16156 fi
16157
16158
16159 # as_fn_executable_p FILE
16160 # -----------------------
16161 # Test if FILE is an executable regular file.
16162 as_fn_executable_p ()
16163 {
16164 test -f "$1" && test -x "$1"
16165 } # as_fn_executable_p
16166 as_test_x='test -x'
16167 as_executable_p=as_fn_executable_p
16168
16169 # Sed expression to map a string onto a valid CPP name.
16170 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
16171
16172 # Sed expression to map a string onto a valid variable name.
16173 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
16174
16175
16176 exec 6>&1
16177 ## ----------------------------------- ##
16178 ## Main body of $CONFIG_STATUS script. ##
16179 ## ----------------------------------- ##
16180 _ASEOF
16181 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
16182
16183 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16184 # Save the log message, to keep $0 and so on meaningful, and to
16185 # report actual input values of CONFIG_FILES etc. instead of their
16186 # values after options handling.
16187 ac_log="
16188 This file was extended by elektroid $as_me 2.2, which was
16189 generated by GNU Autoconf 2.69. Invocation command line was
16190
16191 CONFIG_FILES = $CONFIG_FILES
16192 CONFIG_HEADERS = $CONFIG_HEADERS
16193 CONFIG_LINKS = $CONFIG_LINKS
16194 CONFIG_COMMANDS = $CONFIG_COMMANDS
16195 $ $0 $@
16196
16197 on `(hostname || uname -n) 2>/dev/null | sed 1q`
16198 "
16199
16200 _ACEOF
16201
16202 case $ac_config_files in *"
16203 "*) set x $ac_config_files; shift; ac_config_files=$*;;
16204 esac
16205
16206 case $ac_config_headers in *"
16207 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16208 esac
16209
16210
16211 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16212 # Files that config.status was made for.
16213 config_files="$ac_config_files"
16214 config_headers="$ac_config_headers"
16215 config_commands="$ac_config_commands"
16216
16217 _ACEOF
16218
16219 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16220 ac_cs_usage="\
16221 \`$as_me' instantiates files and other configuration actions
16222 from templates according to the current configuration. Unless the files
16223 and actions are specified as TAGs, all are instantiated by default.
16224
16225 Usage: $0 [OPTION]... [TAG]...
16226
16227 -h, --help print this help, then exit
16228 -V, --version print version number and configuration settings, then exit
16229 --config print configuration, then exit
16230 -q, --quiet, --silent
16231 do not print progress messages
16232 -d, --debug don't remove temporary files
16233 --recheck update $as_me by reconfiguring in the same conditions
16234 --file=FILE[:TEMPLATE]
16235 instantiate the configuration file FILE
16236 --header=FILE[:TEMPLATE]
16237 instantiate the configuration header FILE
16238
16239 Configuration files:
16240 $config_files
16241
16242 Configuration headers:
16243 $config_headers
16244
16245 Configuration commands:
16246 $config_commands
16247
16248 Report bugs to <dagargo@gmail.com>."
16249
16250 _ACEOF
16251 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16252 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
16253 ac_cs_version="\\
16254 elektroid config.status 2.2
16255 configured by $0, generated by GNU Autoconf 2.69,
16256 with options \\"\$ac_cs_config\\"
16257
16258 Copyright (C) 2012 Free Software Foundation, Inc.
16259 This config.status script is free software; the Free Software Foundation
16260 gives unlimited permission to copy, distribute and modify it."
16261
16262 ac_pwd='$ac_pwd'
16263 srcdir='$srcdir'
16264 INSTALL='$INSTALL'
16265 MKDIR_P='$MKDIR_P'
16266 AWK='$AWK'
16267 test -n "\$AWK" || AWK=awk
16268 _ACEOF
16269
16270 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16271 # The default lists apply if the user does not specify any file.
16272 ac_need_defaults=:
16273 while test $# != 0
16274 do
16275 case $1 in
16276 --*=?*)
16277 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16278 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
16279 ac_shift=:
16280 ;;
16281 --*=)
16282 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16283 ac_optarg=
16284 ac_shift=:
16285 ;;
16286 *)
16287 ac_option=$1
16288 ac_optarg=$2
16289 ac_shift=shift
16290 ;;
16291 esac
16292
16293 case $ac_option in
16294 # Handling of the options.
16295 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16296 ac_cs_recheck=: ;;
16297 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
16298 $as_echo "$ac_cs_version"; exit ;;
16299 --config | --confi | --conf | --con | --co | --c )
16300 $as_echo "$ac_cs_config"; exit ;;
16301 --debug | --debu | --deb | --de | --d | -d )
16302 debug=: ;;
16303 --file | --fil | --fi | --f )
16304 $ac_shift
16305 case $ac_optarg in
16306 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16307 '') as_fn_error $? "missing file argument" ;;
16308 esac
16309 as_fn_append CONFIG_FILES " '$ac_optarg'"
16310 ac_need_defaults=false;;
16311 --header | --heade | --head | --hea )
16312 $ac_shift
16313 case $ac_optarg in
16314 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16315 esac
16316 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
16317 ac_need_defaults=false;;
16318 --he | --h)
16319 # Conflict between --help and --header
16320 as_fn_error $? "ambiguous option: \`$1'
16321 Try \`$0 --help' for more information.";;
16322 --help | --hel | -h )
16323 $as_echo "$ac_cs_usage"; exit ;;
16324 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16325 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16326 ac_cs_silent=: ;;
16327
16328 # This is an error.
16329 -*) as_fn_error $? "unrecognized option: \`$1'
16330 Try \`$0 --help' for more information." ;;
16331
16332 *) as_fn_append ac_config_targets " $1"
16333 ac_need_defaults=false ;;
16334
16335 esac
16336 shift
16337 done
16338
16339 ac_configure_extra_args=
16340
16341 if $ac_cs_silent; then
16342 exec 6>/dev/null
16343 ac_configure_extra_args="$ac_configure_extra_args --silent"
16344 fi
16345
16346 _ACEOF
16347 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16348 if \$ac_cs_recheck; then
16349 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
16350 shift
16351 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16352 CONFIG_SHELL='$SHELL'
16353 export CONFIG_SHELL
16354 exec "\$@"
16355 fi
16356
16357 _ACEOF
16358 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16359 exec 5>>config.log
16360 {
16361 echo
16362 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16363 ## Running $as_me. ##
16364 _ASBOX
16365 $as_echo "$ac_log"
16366 } >&5
16367
16368 _ACEOF
16369 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16370 #
16371 # INIT-COMMANDS
16372 #
16373
16374
16375 # The HP-UX ksh and POSIX shell print the target directory to stdout
16376 # if CDPATH is set.
16377 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16378
16379 sed_quote_subst='$sed_quote_subst'
16380 double_quote_subst='$double_quote_subst'
16381 delay_variable_subst='$delay_variable_subst'
16382 macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
16383 macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
16384 enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
16385 enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
16386 pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
16387 enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
16388 shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
16389 SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
16390 ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
16391 PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
16392 host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
16393 host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
16394 host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
16395 build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
16396 build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
16397 build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
16398 SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
16399 Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
16400 GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
16401 EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
16402 FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
16403 LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
16404 NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
16405 LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
16406 max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
16407 ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
16408 exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
16409 lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
16410 lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
16411 lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
16412 lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
16413 lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
16414 reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
16415 reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
16416 OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
16417 deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
16418 file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
16419 file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
16420 want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
16421 DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
16422 sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
16423 AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
16424 AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
16425 archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
16426 STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
16427 RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
16428 old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
16429 old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
16430 old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
16431 lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
16432 CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
16433 CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
16434 compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
16435 GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
16436 lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
16437 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
16438 lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
16439 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
16440 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"`'
16441 lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
16442 nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
16443 lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
16444 lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
16445 objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
16446 MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
16447 lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
16448 lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
16449 lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
16450 lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
16451 lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
16452 need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
16453 MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
16454 DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
16455 NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
16456 LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
16457 OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
16458 OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
16459 libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
16460 shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
16461 extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
16462 archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
16463 enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
16464 export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
16465 whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
16466 compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
16467 old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
16468 old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
16469 archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
16470 archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
16471 module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
16472 module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
16473 with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
16474 allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
16475 no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
16476 hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
16477 hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
16478 hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
16479 hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
16480 hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
16481 hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
16482 hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
16483 inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
16484 link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
16485 always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
16486 export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
16487 exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
16488 include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
16489 prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
16490 postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
16491 file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
16492 variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
16493 need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
16494 need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
16495 version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
16496 runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
16497 shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
16498 shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
16499 libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
16500 library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
16501 soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
16502 install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
16503 postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
16504 postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
16505 finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
16506 finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
16507 hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
16508 sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
16509 configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
16510 configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
16511 hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
16512 enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
16513 enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
16514 enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
16515 old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
16516 striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
16517
16518 LTCC='$LTCC'
16519 LTCFLAGS='$LTCFLAGS'
16520 compiler='$compiler_DEFAULT'
16521
16522 # A function that is used when there is no print builtin or printf.
16523 func_fallback_echo ()
16524 {
16525 eval 'cat <<_LTECHO_EOF
16526 \$1
16527 _LTECHO_EOF'
16528 }
16529
16530 # Quote evaled strings.
16531 for var in SHELL \
16532 ECHO \
16533 PATH_SEPARATOR \
16534 SED \
16535 GREP \
16536 EGREP \
16537 FGREP \
16538 LD \
16539 NM \
16540 LN_S \
16541 lt_SP2NL \
16542 lt_NL2SP \
16543 reload_flag \
16544 OBJDUMP \
16545 deplibs_check_method \
16546 file_magic_cmd \
16547 file_magic_glob \
16548 want_nocaseglob \
16549 DLLTOOL \
16550 sharedlib_from_linklib_cmd \
16551 AR \
16552 AR_FLAGS \
16553 archiver_list_spec \
16554 STRIP \
16555 RANLIB \
16556 CC \
16557 CFLAGS \
16558 compiler \
16559 lt_cv_sys_global_symbol_pipe \
16560 lt_cv_sys_global_symbol_to_cdecl \
16561 lt_cv_sys_global_symbol_to_import \
16562 lt_cv_sys_global_symbol_to_c_name_address \
16563 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
16564 lt_cv_nm_interface \
16565 nm_file_list_spec \
16566 lt_cv_truncate_bin \
16567 lt_prog_compiler_no_builtin_flag \
16568 lt_prog_compiler_pic \
16569 lt_prog_compiler_wl \
16570 lt_prog_compiler_static \
16571 lt_cv_prog_compiler_c_o \
16572 need_locks \
16573 MANIFEST_TOOL \
16574 DSYMUTIL \
16575 NMEDIT \
16576 LIPO \
16577 OTOOL \
16578 OTOOL64 \
16579 shrext_cmds \
16580 export_dynamic_flag_spec \
16581 whole_archive_flag_spec \
16582 compiler_needs_object \
16583 with_gnu_ld \
16584 allow_undefined_flag \
16585 no_undefined_flag \
16586 hardcode_libdir_flag_spec \
16587 hardcode_libdir_separator \
16588 exclude_expsyms \
16589 include_expsyms \
16590 file_list_spec \
16591 variables_saved_for_relink \
16592 libname_spec \
16593 library_names_spec \
16594 soname_spec \
16595 install_override_mode \
16596 finish_eval \
16597 old_striplib \
16598 striplib; do
16599 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
16600 *[\\\\\\\`\\"\\\$]*)
16601 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
16602 ;;
16603 *)
16604 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
16605 ;;
16606 esac
16607 done
16608
16609 # Double-quote double-evaled strings.
16610 for var in reload_cmds \
16611 old_postinstall_cmds \
16612 old_postuninstall_cmds \
16613 old_archive_cmds \
16614 extract_expsyms_cmds \
16615 old_archive_from_new_cmds \
16616 old_archive_from_expsyms_cmds \
16617 archive_cmds \
16618 archive_expsym_cmds \
16619 module_cmds \
16620 module_expsym_cmds \
16621 export_symbols_cmds \
16622 prelink_cmds \
16623 postlink_cmds \
16624 postinstall_cmds \
16625 postuninstall_cmds \
16626 finish_cmds \
16627 sys_lib_search_path_spec \
16628 configure_time_dlsearch_path \
16629 configure_time_lt_sys_library_path; do
16630 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
16631 *[\\\\\\\`\\"\\\$]*)
16632 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
16633 ;;
16634 *)
16635 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
16636 ;;
16637 esac
16638 done
16639
16640 ac_aux_dir='$ac_aux_dir'
16641
16642 # See if we are running on zsh, and set the options that allow our
16643 # commands through without removal of \ escapes INIT.
16644 if test -n "\${ZSH_VERSION+set}"; then
16645 setopt NO_GLOB_SUBST
16646 fi
16647
16648
16649 PACKAGE='$PACKAGE'
16650 VERSION='$VERSION'
16651 RM='$RM'
16652 ofile='$ofile'
16653
16654
16655
16656 AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
16657 # Capture the value of obsolete ALL_LINGUAS because we need it to compute
16658 # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
16659 # from automake < 1.5.
16660 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
16661 # Capture the value of LINGUAS because we need it to compute CATALOGS.
16662 LINGUAS="${LINGUAS-%UNSET%}"
16663
16664
16665 _ACEOF
16666
16667 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16668
16669 # Handling of arguments.
16670 for ac_config_target in $ac_config_targets
16671 do
16672 case $ac_config_target in
16673 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
16674 "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
16675 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
16676 "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
16677 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
16678 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
16679 "res/Makefile") CONFIG_FILES="$CONFIG_FILES res/Makefile" ;;
16680 "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
16681 "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
16682 "po/Makefile") CONFIG_FILES="$CONFIG_FILES po/Makefile" ;;
16683 "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
16684
16685 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
16686 esac
16687 done
16688
16689
16690 # If the user did not use the arguments to specify the items to instantiate,
16691 # then the envvar interface is used. Set only those that are not.
16692 # We use the long form for the default assignment because of an extremely
16693 # bizarre bug on SunOS 4.1.3.
16694 if $ac_need_defaults; then
16695 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16696 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16697 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16698 fi
16699
16700 # Have a temporary directory for convenience. Make it in the build tree
16701 # simply because there is no reason against having it here, and in addition,
16702 # creating and moving files from /tmp can sometimes cause problems.
16703 # Hook for its removal unless debugging.
16704 # Note that there is a small window in which the directory will not be cleaned:
16705 # after its creation but before its name has been assigned to `$tmp'.
16706 $debug ||
16707 {
16708 tmp= ac_tmp=
16709 trap 'exit_status=$?
16710 : "${ac_tmp:=$tmp}"
16711 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
16712 ' 0
16713 trap 'as_fn_exit 1' 1 2 13 15
16714 }
16715 # Create a (secure) tmp directory for tmp files.
16716
16717 {
16718 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
16719 test -d "$tmp"
16720 } ||
16721 {
16722 tmp=./conf$$-$RANDOM
16723 (umask 077 && mkdir "$tmp")
16724 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
16725 ac_tmp=$tmp
16726
16727 # Set up the scripts for CONFIG_FILES section.
16728 # No need to generate them if there are no CONFIG_FILES.
16729 # This happens for instance with `./config.status config.h'.
16730 if test -n "$CONFIG_FILES"; then
16731
16732
16733 ac_cr=`echo X | tr X '\015'`
16734 # On cygwin, bash can eat \r inside `` if the user requested igncr.
16735 # But we know of no other shell where ac_cr would be empty at this
16736 # point, so we can use a bashism as a fallback.
16737 if test "x$ac_cr" = x; then
16738 eval ac_cr=\$\'\\r\'
16739 fi
16740 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16741 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
16742 ac_cs_awk_cr='\\r'
16743 else
16744 ac_cs_awk_cr=$ac_cr
16745 fi
16746
16747 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
16748 _ACEOF
16749
16750
16751 {
16752 echo "cat >conf$$subs.awk <<_ACEOF" &&
16753 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16754 echo "_ACEOF"
16755 } >conf$$subs.sh ||
16756 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16757 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
16758 ac_delim='%!_!# '
16759 for ac_last_try in false false false false false :; do
16760 . ./conf$$subs.sh ||
16761 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16762
16763 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16764 if test $ac_delim_n = $ac_delim_num; then
16765 break
16766 elif $ac_last_try; then
16767 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16768 else
16769 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16770 fi
16771 done
16772 rm -f conf$$subs.sh
16773
16774 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16775 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
16776 _ACEOF
16777 sed -n '
16778 h
16779 s/^/S["/; s/!.*/"]=/
16780 p
16781 g
16782 s/^[^!]*!//
16783 :repl
16784 t repl
16785 s/'"$ac_delim"'$//
16786 t delim
16787 :nl
16788 h
16789 s/\(.\{148\}\)..*/\1/
16790 t more1
16791 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16792 p
16793 n
16794 b repl
16795 :more1
16796 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16797 p
16798 g
16799 s/.\{148\}//
16800 t nl
16801 :delim
16802 h
16803 s/\(.\{148\}\)..*/\1/
16804 t more2
16805 s/["\\]/\\&/g; s/^/"/; s/$/"/
16806 p
16807 b
16808 :more2
16809 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16810 p
16811 g
16812 s/.\{148\}//
16813 t delim
16814 ' <conf$$subs.awk | sed '
16815 /^[^""]/{
16816 N
16817 s/\n//
16818 }
16819 ' >>$CONFIG_STATUS || ac_write_fail=1
16820 rm -f conf$$subs.awk
16821 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16822 _ACAWK
16823 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
16824 for (key in S) S_is_set[key] = 1
16825 FS = ""
16826
16827 }
16828 {
16829 line = $ 0
16830 nfields = split(line, field, "@")
16831 substed = 0
16832 len = length(field[1])
16833 for (i = 2; i < nfields; i++) {
16834 key = field[i]
16835 keylen = length(key)
16836 if (S_is_set[key]) {
16837 value = S[key]
16838 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16839 len += length(value) + length(field[++i])
16840 substed = 1
16841 } else
16842 len += 1 + keylen
16843 }
16844
16845 print line
16846 }
16847
16848 _ACAWK
16849 _ACEOF
16850 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16851 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16852 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16853 else
16854 cat
16855 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
16856 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
16857 _ACEOF
16858
16859 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16860 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
16861 # trailing colons and then remove the whole line if VPATH becomes empty
16862 # (actually we leave an empty line to preserve line numbers).
16863 if test "x$srcdir" = x.; then
16864 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16865 h
16866 s///
16867 s/^/:/
16868 s/[ ]*$/:/
16869 s/:\$(srcdir):/:/g
16870 s/:\${srcdir}:/:/g
16871 s/:@srcdir@:/:/g
16872 s/^:*//
16873 s/:*$//
16874 x
16875 s/\(=[ ]*\).*/\1/
16876 G
16877 s/\n//
16878 s/^[^=]*=[ ]*$//
16879 }'
16880 fi
16881
16882 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16883 fi # test -n "$CONFIG_FILES"
16884
16885 # Set up the scripts for CONFIG_HEADERS section.
16886 # No need to generate them if there are no CONFIG_HEADERS.
16887 # This happens for instance with `./config.status Makefile'.
16888 if test -n "$CONFIG_HEADERS"; then
16889 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
16890 BEGIN {
16891 _ACEOF
16892
16893 # Transform confdefs.h into an awk script `defines.awk', embedded as
16894 # here-document in config.status, that substitutes the proper values into
16895 # config.h.in to produce config.h.
16896
16897 # Create a delimiter string that does not exist in confdefs.h, to ease
16898 # handling of long lines.
16899 ac_delim='%!_!# '
16900 for ac_last_try in false false :; do
16901 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16902 if test -z "$ac_tt"; then
16903 break
16904 elif $ac_last_try; then
16905 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
16906 else
16907 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16908 fi
16909 done
16910
16911 # For the awk script, D is an array of macro values keyed by name,
16912 # likewise P contains macro parameters if any. Preserve backslash
16913 # newline sequences.
16914
16915 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16916 sed -n '
16917 s/.\{148\}/&'"$ac_delim"'/g
16918 t rset
16919 :rset
16920 s/^[ ]*#[ ]*define[ ][ ]*/ /
16921 t def
16922 d
16923 :def
16924 s/\\$//
16925 t bsnl
16926 s/["\\]/\\&/g
16927 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16928 D["\1"]=" \3"/p
16929 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16930 d
16931 :bsnl
16932 s/["\\]/\\&/g
16933 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16934 D["\1"]=" \3\\\\\\n"\\/p
16935 t cont
16936 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16937 t cont
16938 d
16939 :cont
16940 n
16941 s/.\{148\}/&'"$ac_delim"'/g
16942 t clear
16943 :clear
16944 s/\\$//
16945 t bsnlc
16946 s/["\\]/\\&/g; s/^/"/; s/$/"/p
16947 d
16948 :bsnlc
16949 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16950 b cont
16951 ' <confdefs.h | sed '
16952 s/'"$ac_delim"'/"\\\
16953 "/g' >>$CONFIG_STATUS || ac_write_fail=1
16954
16955 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16956 for (key in D) D_is_set[key] = 1
16957 FS = ""
16958 }
16959 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16960 line = \$ 0
16961 split(line, arg, " ")
16962 if (arg[1] == "#") {
16963 defundef = arg[2]
16964 mac1 = arg[3]
16965 } else {
16966 defundef = substr(arg[1], 2)
16967 mac1 = arg[2]
16968 }
16969 split(mac1, mac2, "(") #)
16970 macro = mac2[1]
16971 prefix = substr(line, 1, index(line, defundef) - 1)
16972 if (D_is_set[macro]) {
16973 # Preserve the white space surrounding the "#".
16974 print prefix "define", macro P[macro] D[macro]
16975 next
16976 } else {
16977 # Replace #undef with comments. This is necessary, for example,
16978 # in the case of _POSIX_SOURCE, which is predefined and required
16979 # on some systems where configure will not decide to define it.
16980 if (defundef == "undef") {
16981 print "/*", prefix defundef, macro, "*/"
16982 next
16983 }
16984 }
16985 }
16986 { print }
16987 _ACAWK
16988 _ACEOF
16989 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16990 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
16991 fi # test -n "$CONFIG_HEADERS"
16992
16993
16994 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
16995 shift
16996 for ac_tag
16997 do
16998 case $ac_tag in
16999 :[FHLC]) ac_mode=$ac_tag; continue;;
17000 esac
17001 case $ac_mode$ac_tag in
17002 :[FHL]*:*);;
17003 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
17004 :[FH]-) ac_tag=-:-;;
17005 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17006 esac
17007 ac_save_IFS=$IFS
17008 IFS=:
17009 set x $ac_tag
17010 IFS=$ac_save_IFS
17011 shift
17012 ac_file=$1
17013 shift
17014
17015 case $ac_mode in
17016 :L) ac_source=$1;;
17017 :[FH])
17018 ac_file_inputs=
17019 for ac_f
17020 do
17021 case $ac_f in
17022 -) ac_f="$ac_tmp/stdin";;
17023 *) # Look for the file first in the build tree, then in the source tree
17024 # (if the path is not absolute). The absolute path cannot be DOS-style,
17025 # because $ac_f cannot contain `:'.
17026 test -f "$ac_f" ||
17027 case $ac_f in
17028 [\\/$]*) false;;
17029 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17030 esac ||
17031 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
17032 esac
17033 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17034 as_fn_append ac_file_inputs " '$ac_f'"
17035 done
17036
17037 # Let's still pretend it is `configure' which instantiates (i.e., don't
17038 # use $as_me), people would be surprised to read:
17039 # /* config.h. Generated by config.status. */
17040 configure_input='Generated from '`
17041 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17042 `' by configure.'
17043 if test x"$ac_file" != x-; then
17044 configure_input="$ac_file. $configure_input"
17045 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17046 $as_echo "$as_me: creating $ac_file" >&6;}
17047 fi
17048 # Neutralize special characters interpreted by sed in replacement strings.
17049 case $configure_input in #(
17050 *\&* | *\|* | *\\* )
17051 ac_sed_conf_input=`$as_echo "$configure_input" |
17052 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17053 *) ac_sed_conf_input=$configure_input;;
17054 esac
17055
17056 case $ac_tag in
17057 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17058 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
17059 esac
17060 ;;
17061 esac
17062
17063 ac_dir=`$as_dirname -- "$ac_file" ||
17064 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17065 X"$ac_file" : 'X\(//\)[^/]' \| \
17066 X"$ac_file" : 'X\(//\)$' \| \
17067 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
17068 $as_echo X"$ac_file" |
17069 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17070 s//\1/
17071 q
17072 }
17073 /^X\(\/\/\)[^/].*/{
17074 s//\1/
17075 q
17076 }
17077 /^X\(\/\/\)$/{
17078 s//\1/
17079 q
17080 }
17081 /^X\(\/\).*/{
17082 s//\1/
17083 q
17084 }
17085 s/.*/./; q'`
17086 as_dir="$ac_dir"; as_fn_mkdir_p
17087 ac_builddir=.
17088
17089 case "$ac_dir" in
17090 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17091 *)
17092 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17093 # A ".." for each directory in $ac_dir_suffix.
17094 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17095 case $ac_top_builddir_sub in
17096 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17097 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17098 esac ;;
17099 esac
17100 ac_abs_top_builddir=$ac_pwd
17101 ac_abs_builddir=$ac_pwd$ac_dir_suffix
17102 # for backward compatibility:
17103 ac_top_builddir=$ac_top_build_prefix
17104
17105 case $srcdir in
17106 .) # We are building in place.
17107 ac_srcdir=.
17108 ac_top_srcdir=$ac_top_builddir_sub
17109 ac_abs_top_srcdir=$ac_pwd ;;
17110 [\\/]* | ?:[\\/]* ) # Absolute name.
17111 ac_srcdir=$srcdir$ac_dir_suffix;
17112 ac_top_srcdir=$srcdir
17113 ac_abs_top_srcdir=$srcdir ;;
17114 *) # Relative name.
17115 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17116 ac_top_srcdir=$ac_top_build_prefix$srcdir
17117 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
17118 esac
17119 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
17120
17121
17122 case $ac_mode in
17123 :F)
17124 #
17125 # CONFIG_FILE
17126 #
17127
17128 case $INSTALL in
17129 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17130 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
17131 esac
17132 ac_MKDIR_P=$MKDIR_P
17133 case $MKDIR_P in
17134 [\\/$]* | ?:[\\/]* ) ;;
17135 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17136 esac
17137 _ACEOF
17138
17139 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17140 # If the template does not know about datarootdir, expand it.
17141 # FIXME: This hack should be removed a few years after 2.60.
17142 ac_datarootdir_hack=; ac_datarootdir_seen=
17143 ac_sed_dataroot='
17144 /datarootdir/ {
17145 p
17146 q
17147 }
17148 /@datadir@/p
17149 /@docdir@/p
17150 /@infodir@/p
17151 /@localedir@/p
17152 /@mandir@/p'
17153 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
17154 *datarootdir*) ac_datarootdir_seen=yes;;
17155 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
17156 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17157 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
17158 _ACEOF
17159 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17160 ac_datarootdir_hack='
17161 s&@datadir@&$datadir&g
17162 s&@docdir@&$docdir&g
17163 s&@infodir@&$infodir&g
17164 s&@localedir@&$localedir&g
17165 s&@mandir@&$mandir&g
17166 s&\\\${datarootdir}&$datarootdir&g' ;;
17167 esac
17168 _ACEOF
17169
17170 # Neutralize VPATH when `$srcdir' = `.'.
17171 # Shell code in configure.ac might set extrasub.
17172 # FIXME: do we really want to maintain this feature?
17173 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17174 ac_sed_extra="$ac_vpsub
17175 $extrasub
17176 _ACEOF
17177 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17178 :t
17179 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17180 s|@configure_input@|$ac_sed_conf_input|;t t
17181 s&@top_builddir@&$ac_top_builddir_sub&;t t
17182 s&@top_build_prefix@&$ac_top_build_prefix&;t t
17183 s&@srcdir@&$ac_srcdir&;t t
17184 s&@abs_srcdir@&$ac_abs_srcdir&;t t
17185 s&@top_srcdir@&$ac_top_srcdir&;t t
17186 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17187 s&@builddir@&$ac_builddir&;t t
17188 s&@abs_builddir@&$ac_abs_builddir&;t t
17189 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17190 s&@INSTALL@&$ac_INSTALL&;t t
17191 s&@MKDIR_P@&$ac_MKDIR_P&;t t
17192 $ac_datarootdir_hack
17193 "
17194 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17195 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17196
17197 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
17198 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17199 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17200 "$ac_tmp/out"`; test -z "$ac_out"; } &&
17201 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17202 which seems to be undefined. Please make sure it is defined" >&5
17203 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17204 which seems to be undefined. Please make sure it is defined" >&2;}
17205
17206 rm -f "$ac_tmp/stdin"
17207 case $ac_file in
17208 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17209 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
17210 esac \
17211 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17212 ;;
17213 :H)
17214 #
17215 # CONFIG_HEADER
17216 #
17217 if test x"$ac_file" != x-; then
17218 {
17219 $as_echo "/* $configure_input */" \
17220 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17221 } >"$ac_tmp/config.h" \
17222 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17223 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
17224 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17225 $as_echo "$as_me: $ac_file is unchanged" >&6;}
17226 else
17227 rm -f "$ac_file"
17228 mv "$ac_tmp/config.h" "$ac_file" \
17229 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17230 fi
17231 else
17232 $as_echo "/* $configure_input */" \
17233 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
17234 || as_fn_error $? "could not create -" "$LINENO" 5
17235 fi
17236 # Compute "$ac_file"'s index in $config_headers.
17237 _am_arg="$ac_file"
17238 _am_stamp_count=1
17239 for _am_header in $config_headers :; do
17240 case $_am_header in
17241 $_am_arg | $_am_arg:* )
17242 break ;;
17243 * )
17244 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
17245 esac
17246 done
17247 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
17248 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17249 X"$_am_arg" : 'X\(//\)[^/]' \| \
17250 X"$_am_arg" : 'X\(//\)$' \| \
17251 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
17252 $as_echo X"$_am_arg" |
17253 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17254 s//\1/
17255 q
17256 }
17257 /^X\(\/\/\)[^/].*/{
17258 s//\1/
17259 q
17260 }
17261 /^X\(\/\/\)$/{
17262 s//\1/
17263 q
17264 }
17265 /^X\(\/\).*/{
17266 s//\1/
17267 q
17268 }
17269 s/.*/./; q'`/stamp-h$_am_stamp_count
17270 ;;
17271
17272 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
17273 $as_echo "$as_me: executing $ac_file commands" >&6;}
17274 ;;
17275 esac
17276
17277
17278 case $ac_file$ac_mode in
17279 "libtool":C)
17280
17281 # See if we are running on zsh, and set the options that allow our
17282 # commands through without removal of \ escapes.
17283 if test -n "${ZSH_VERSION+set}"; then
17284 setopt NO_GLOB_SUBST
17285 fi
17286
17287 cfgfile=${ofile}T
17288 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
17289 $RM "$cfgfile"
17290
17291 cat <<_LT_EOF >> "$cfgfile"
17292 #! $SHELL
17293 # Generated automatically by $as_me ($PACKAGE) $VERSION
17294 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
17295
17296 # Provide generalized library-building support services.
17297 # Written by Gordon Matzigkeit, 1996
17298
17299 # Copyright (C) 2014 Free Software Foundation, Inc.
17300 # This is free software; see the source for copying conditions. There is NO
17301 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17302
17303 # GNU Libtool is free software; you can redistribute it and/or modify
17304 # it under the terms of the GNU General Public License as published by
17305 # the Free Software Foundation; either version 2 of of the License, or
17306 # (at your option) any later version.
17307 #
17308 # As a special exception to the GNU General Public License, if you
17309 # distribute this file as part of a program or library that is built
17310 # using GNU Libtool, you may include this file under the same
17311 # distribution terms that you use for the rest of that program.
17312 #
17313 # GNU Libtool is distributed in the hope that it will be useful, but
17314 # WITHOUT ANY WARRANTY; without even the implied warranty of
17315 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17316 # GNU General Public License for more details.
17317 #
17318 # You should have received a copy of the GNU General Public License
17319 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17320
17321
17322 # The names of the tagged configurations supported by this script.
17323 available_tags=''
17324
17325 # Configured defaults for sys_lib_dlsearch_path munging.
17326 : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
17327
17328 # ### BEGIN LIBTOOL CONFIG
17329
17330 # Which release of libtool.m4 was used?
17331 macro_version=$macro_version
17332 macro_revision=$macro_revision
17333
17334 # Whether or not to build shared libraries.
17335 build_libtool_libs=$enable_shared
17336
17337 # Whether or not to build static libraries.
17338 build_old_libs=$enable_static
17339
17340 # What type of objects to build.
17341 pic_mode=$pic_mode
17342
17343 # Whether or not to optimize for fast installation.
17344 fast_install=$enable_fast_install
17345
17346 # Shared archive member basename,for filename based shared library versioning on AIX.
17347 shared_archive_member_spec=$shared_archive_member_spec
17348
17349 # Shell to use when invoking shell scripts.
17350 SHELL=$lt_SHELL
17351
17352 # An echo program that protects backslashes.
17353 ECHO=$lt_ECHO
17354
17355 # The PATH separator for the build system.
17356 PATH_SEPARATOR=$lt_PATH_SEPARATOR
17357
17358 # The host system.
17359 host_alias=$host_alias
17360 host=$host
17361 host_os=$host_os
17362
17363 # The build system.
17364 build_alias=$build_alias
17365 build=$build
17366 build_os=$build_os
17367
17368 # A sed program that does not truncate output.
17369 SED=$lt_SED
17370
17371 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
17372 Xsed="\$SED -e 1s/^X//"
17373
17374 # A grep program that handles long lines.
17375 GREP=$lt_GREP
17376
17377 # An ERE matcher.
17378 EGREP=$lt_EGREP
17379
17380 # A literal string matcher.
17381 FGREP=$lt_FGREP
17382
17383 # A BSD- or MS-compatible name lister.
17384 NM=$lt_NM
17385
17386 # Whether we need soft or hard links.
17387 LN_S=$lt_LN_S
17388
17389 # What is the maximum length of a command?
17390 max_cmd_len=$max_cmd_len
17391
17392 # Object file suffix (normally "o").
17393 objext=$ac_objext
17394
17395 # Executable file suffix (normally "").
17396 exeext=$exeext
17397
17398 # whether the shell understands "unset".
17399 lt_unset=$lt_unset
17400
17401 # turn spaces into newlines.
17402 SP2NL=$lt_lt_SP2NL
17403
17404 # turn newlines into spaces.
17405 NL2SP=$lt_lt_NL2SP
17406
17407 # convert \$build file names to \$host format.
17408 to_host_file_cmd=$lt_cv_to_host_file_cmd
17409
17410 # convert \$build files to toolchain format.
17411 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
17412
17413 # An object symbol dumper.
17414 OBJDUMP=$lt_OBJDUMP
17415
17416 # Method to check whether dependent libraries are shared objects.
17417 deplibs_check_method=$lt_deplibs_check_method
17418
17419 # Command to use when deplibs_check_method = "file_magic".
17420 file_magic_cmd=$lt_file_magic_cmd
17421
17422 # How to find potential files when deplibs_check_method = "file_magic".
17423 file_magic_glob=$lt_file_magic_glob
17424
17425 # Find potential files using nocaseglob when deplibs_check_method = "file_magic".
17426 want_nocaseglob=$lt_want_nocaseglob
17427
17428 # DLL creation program.
17429 DLLTOOL=$lt_DLLTOOL
17430
17431 # Command to associate shared and link libraries.
17432 sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
17433
17434 # The archiver.
17435 AR=$lt_AR
17436
17437 # Flags to create an archive.
17438 AR_FLAGS=$lt_AR_FLAGS
17439
17440 # How to feed a file listing to the archiver.
17441 archiver_list_spec=$lt_archiver_list_spec
17442
17443 # A symbol stripping program.
17444 STRIP=$lt_STRIP
17445
17446 # Commands used to install an old-style archive.
17447 RANLIB=$lt_RANLIB
17448 old_postinstall_cmds=$lt_old_postinstall_cmds
17449 old_postuninstall_cmds=$lt_old_postuninstall_cmds
17450
17451 # Whether to use a lock for old archive extraction.
17452 lock_old_archive_extraction=$lock_old_archive_extraction
17453
17454 # A C compiler.
17455 LTCC=$lt_CC
17456
17457 # LTCC compiler flags.
17458 LTCFLAGS=$lt_CFLAGS
17459
17460 # Take the output of nm and produce a listing of raw symbols and C names.
17461 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
17462
17463 # Transform the output of nm in a proper C declaration.
17464 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
17465
17466 # Transform the output of nm into a list of symbols to manually relocate.
17467 global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
17468
17469 # Transform the output of nm in a C name address pair.
17470 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
17471
17472 # Transform the output of nm in a C name address pair when lib prefix is needed.
17473 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
17474
17475 # The name lister interface.
17476 nm_interface=$lt_lt_cv_nm_interface
17477
17478 # Specify filename containing input files for \$NM.
17479 nm_file_list_spec=$lt_nm_file_list_spec
17480
17481 # The root where to search for dependent libraries,and where our libraries should be installed.
17482 lt_sysroot=$lt_sysroot
17483
17484 # Command to truncate a binary pipe.
17485 lt_truncate_bin=$lt_lt_cv_truncate_bin
17486
17487 # The name of the directory that contains temporary libtool files.
17488 objdir=$objdir
17489
17490 # Used to examine libraries when file_magic_cmd begins with "file".
17491 MAGIC_CMD=$MAGIC_CMD
17492
17493 # Must we lock files when doing compilation?
17494 need_locks=$lt_need_locks
17495
17496 # Manifest tool.
17497 MANIFEST_TOOL=$lt_MANIFEST_TOOL
17498
17499 # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
17500 DSYMUTIL=$lt_DSYMUTIL
17501
17502 # Tool to change global to local symbols on Mac OS X.
17503 NMEDIT=$lt_NMEDIT
17504
17505 # Tool to manipulate fat objects and archives on Mac OS X.
17506 LIPO=$lt_LIPO
17507
17508 # ldd/readelf like tool for Mach-O binaries on Mac OS X.
17509 OTOOL=$lt_OTOOL
17510
17511 # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
17512 OTOOL64=$lt_OTOOL64
17513
17514 # Old archive suffix (normally "a").
17515 libext=$libext
17516
17517 # Shared library suffix (normally ".so").
17518 shrext_cmds=$lt_shrext_cmds
17519
17520 # The commands to extract the exported symbol list from a shared archive.
17521 extract_expsyms_cmds=$lt_extract_expsyms_cmds
17522
17523 # Variables whose values should be saved in libtool wrapper scripts and
17524 # restored at link time.
17525 variables_saved_for_relink=$lt_variables_saved_for_relink
17526
17527 # Do we need the "lib" prefix for modules?
17528 need_lib_prefix=$need_lib_prefix
17529
17530 # Do we need a version for libraries?
17531 need_version=$need_version
17532
17533 # Library versioning type.
17534 version_type=$version_type
17535
17536 # Shared library runtime path variable.
17537 runpath_var=$runpath_var
17538
17539 # Shared library path variable.
17540 shlibpath_var=$shlibpath_var
17541
17542 # Is shlibpath searched before the hard-coded library search path?
17543 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
17544
17545 # Format of library name prefix.
17546 libname_spec=$lt_libname_spec
17547
17548 # List of archive names. First name is the real one, the rest are links.
17549 # The last name is the one that the linker finds with -lNAME
17550 library_names_spec=$lt_library_names_spec
17551
17552 # The coded name of the library, if different from the real name.
17553 soname_spec=$lt_soname_spec
17554
17555 # Permission mode override for installation of shared libraries.
17556 install_override_mode=$lt_install_override_mode
17557
17558 # Command to use after installation of a shared archive.
17559 postinstall_cmds=$lt_postinstall_cmds
17560
17561 # Command to use after uninstallation of a shared archive.
17562 postuninstall_cmds=$lt_postuninstall_cmds
17563
17564 # Commands used to finish a libtool library installation in a directory.
17565 finish_cmds=$lt_finish_cmds
17566
17567 # As "finish_cmds", except a single script fragment to be evaled but
17568 # not shown.
17569 finish_eval=$lt_finish_eval
17570
17571 # Whether we should hardcode library paths into libraries.
17572 hardcode_into_libs=$hardcode_into_libs
17573
17574 # Compile-time system search path for libraries.
17575 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
17576
17577 # Detected run-time system search path for libraries.
17578 sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
17579
17580 # Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
17581 configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
17582
17583 # Whether dlopen is supported.
17584 dlopen_support=$enable_dlopen
17585
17586 # Whether dlopen of programs is supported.
17587 dlopen_self=$enable_dlopen_self
17588
17589 # Whether dlopen of statically linked programs is supported.
17590 dlopen_self_static=$enable_dlopen_self_static
17591
17592 # Commands to strip libraries.
17593 old_striplib=$lt_old_striplib
17594 striplib=$lt_striplib
17595
17596
17597 # The linker used to build libraries.
17598 LD=$lt_LD
17599
17600 # How to create reloadable object files.
17601 reload_flag=$lt_reload_flag
17602 reload_cmds=$lt_reload_cmds
17603
17604 # Commands used to build an old-style archive.
17605 old_archive_cmds=$lt_old_archive_cmds
17606
17607 # A language specific compiler.
17608 CC=$lt_compiler
17609
17610 # Is the compiler the GNU compiler?
17611 with_gcc=$GCC
17612
17613 # Compiler flag to turn off builtin functions.
17614 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
17615
17616 # Additional compiler flags for building library objects.
17617 pic_flag=$lt_lt_prog_compiler_pic
17618
17619 # How to pass a linker flag through the compiler.
17620 wl=$lt_lt_prog_compiler_wl
17621
17622 # Compiler flag to prevent dynamic linking.
17623 link_static_flag=$lt_lt_prog_compiler_static
17624
17625 # Does compiler simultaneously support -c and -o options?
17626 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
17627
17628 # Whether or not to add -lc for building shared libraries.
17629 build_libtool_need_lc=$archive_cmds_need_lc
17630
17631 # Whether or not to disallow shared libs when runtime libs are static.
17632 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
17633
17634 # Compiler flag to allow reflexive dlopens.
17635 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
17636
17637 # Compiler flag to generate shared objects directly from archives.
17638 whole_archive_flag_spec=$lt_whole_archive_flag_spec
17639
17640 # Whether the compiler copes with passing no objects directly.
17641 compiler_needs_object=$lt_compiler_needs_object
17642
17643 # Create an old-style archive from a shared archive.
17644 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
17645
17646 # Create a temporary old-style archive to link instead of a shared archive.
17647 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
17648
17649 # Commands used to build a shared archive.
17650 archive_cmds=$lt_archive_cmds
17651 archive_expsym_cmds=$lt_archive_expsym_cmds
17652
17653 # Commands used to build a loadable module if different from building
17654 # a shared archive.
17655 module_cmds=$lt_module_cmds
17656 module_expsym_cmds=$lt_module_expsym_cmds
17657
17658 # Whether we are building with GNU ld or not.
17659 with_gnu_ld=$lt_with_gnu_ld
17660
17661 # Flag that allows shared libraries with undefined symbols to be built.
17662 allow_undefined_flag=$lt_allow_undefined_flag
17663
17664 # Flag that enforces no undefined symbols.
17665 no_undefined_flag=$lt_no_undefined_flag
17666
17667 # Flag to hardcode \$libdir into a binary during linking.
17668 # This must work even if \$libdir does not exist
17669 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
17670
17671 # Whether we need a single "-rpath" flag with a separated argument.
17672 hardcode_libdir_separator=$lt_hardcode_libdir_separator
17673
17674 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
17675 # DIR into the resulting binary.
17676 hardcode_direct=$hardcode_direct
17677
17678 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
17679 # DIR into the resulting binary and the resulting library dependency is
17680 # "absolute",i.e impossible to change by setting \$shlibpath_var if the
17681 # library is relocated.
17682 hardcode_direct_absolute=$hardcode_direct_absolute
17683
17684 # Set to "yes" if using the -LDIR flag during linking hardcodes DIR
17685 # into the resulting binary.
17686 hardcode_minus_L=$hardcode_minus_L
17687
17688 # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
17689 # into the resulting binary.
17690 hardcode_shlibpath_var=$hardcode_shlibpath_var
17691
17692 # Set to "yes" if building a shared library automatically hardcodes DIR
17693 # into the library and all subsequent libraries and executables linked
17694 # against it.
17695 hardcode_automatic=$hardcode_automatic
17696
17697 # Set to yes if linker adds runtime paths of dependent libraries
17698 # to runtime path list.
17699 inherit_rpath=$inherit_rpath
17700
17701 # Whether libtool must link a program against all its dependency libraries.
17702 link_all_deplibs=$link_all_deplibs
17703
17704 # Set to "yes" if exported symbols are required.
17705 always_export_symbols=$always_export_symbols
17706
17707 # The commands to list exported symbols.
17708 export_symbols_cmds=$lt_export_symbols_cmds
17709
17710 # Symbols that should not be listed in the preloaded symbols.
17711 exclude_expsyms=$lt_exclude_expsyms
17712
17713 # Symbols that must always be exported.
17714 include_expsyms=$lt_include_expsyms
17715
17716 # Commands necessary for linking programs (against libraries) with templates.
17717 prelink_cmds=$lt_prelink_cmds
17718
17719 # Commands necessary for finishing linking programs.
17720 postlink_cmds=$lt_postlink_cmds
17721
17722 # Specify filename containing input files.
17723 file_list_spec=$lt_file_list_spec
17724
17725 # How to hardcode a shared library path into an executable.
17726 hardcode_action=$hardcode_action
17727
17728 # ### END LIBTOOL CONFIG
17729
17730 _LT_EOF
17731
17732 cat <<'_LT_EOF' >> "$cfgfile"
17733
17734 # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
17735
17736 # func_munge_path_list VARIABLE PATH
17737 # -----------------------------------
17738 # VARIABLE is name of variable containing _space_ separated list of
17739 # directories to be munged by the contents of PATH, which is string
17740 # having a format:
17741 # "DIR[:DIR]:"
17742 # string "DIR[ DIR]" will be prepended to VARIABLE
17743 # ":DIR[:DIR]"
17744 # string "DIR[ DIR]" will be appended to VARIABLE
17745 # "DIRP[:DIRP]::[DIRA:]DIRA"
17746 # string "DIRP[ DIRP]" will be prepended to VARIABLE and string
17747 # "DIRA[ DIRA]" will be appended to VARIABLE
17748 # "DIR[:DIR]"
17749 # VARIABLE will be replaced by "DIR[ DIR]"
17750 func_munge_path_list ()
17751 {
17752 case x$2 in
17753 x)
17754 ;;
17755 *:)
17756 eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
17757 ;;
17758 x:*)
17759 eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
17760 ;;
17761 *::*)
17762 eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
17763 eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
17764 ;;
17765 *)
17766 eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
17767 ;;
17768 esac
17769 }
17770
17771
17772 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
17773 func_cc_basename ()
17774 {
17775 for cc_temp in $*""; do
17776 case $cc_temp in
17777 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
17778 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
17779 \-*) ;;
17780 *) break;;
17781 esac
17782 done
17783 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
17784 }
17785
17786
17787 # ### END FUNCTIONS SHARED WITH CONFIGURE
17788
17789 _LT_EOF
17790
17791 case $host_os in
17792 aix3*)
17793 cat <<\_LT_EOF >> "$cfgfile"
17794 # AIX sometimes has problems with the GCC collect2 program. For some
17795 # reason, if we set the COLLECT_NAMES environment variable, the problems
17796 # vanish in a puff of smoke.
17797 if test set != "${COLLECT_NAMES+set}"; then
17798 COLLECT_NAMES=
17799 export COLLECT_NAMES
17800 fi
17801 _LT_EOF
17802 ;;
17803 esac
17804
17805
17806 ltmain=$ac_aux_dir/ltmain.sh
17807
17808
17809 # We use sed instead of cat because bash on DJGPP gets confused if
17810 # if finds mixed CR/LF and LF-only lines. Since sed operates in
17811 # text mode, it properly converts lines to CR/LF. This bash problem
17812 # is reportedly fixed, but why not run on old versions too?
17813 sed '$q' "$ltmain" >> "$cfgfile" \
17814 || (rm -f "$cfgfile"; exit 1)
17815
17816 mv -f "$cfgfile" "$ofile" ||
17817 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
17818 chmod +x "$ofile"
17819
17820 ;;
17821 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
17822 # Older Autoconf quotes --file arguments for eval, but not when files
17823 # are listed without --file. Let's play safe and only enable the eval
17824 # if we detect the quoting.
17825 # TODO: see whether this extra hack can be removed once we start
17826 # requiring Autoconf 2.70 or later.
17827 case $CONFIG_FILES in #(
17828 *\'*) :
17829 eval set x "$CONFIG_FILES" ;; #(
17830 *) :
17831 set x $CONFIG_FILES ;; #(
17832 *) :
17833 ;;
17834 esac
17835 shift
17836 # Used to flag and report bootstrapping failures.
17837 am_rc=0
17838 for am_mf
17839 do
17840 # Strip MF so we end up with the name of the file.
17841 am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'`
17842 # Check whether this is an Automake generated Makefile which includes
17843 # dependency-tracking related rules and includes.
17844 # Grep'ing the whole file directly is not great: AIX grep has a line
17845 # limit of 2048, but all sed's we know have understand at least 4000.
17846 sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
17847 || continue
17848 am_dirpart=`$as_dirname -- "$am_mf" ||
17849 $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17850 X"$am_mf" : 'X\(//\)[^/]' \| \
17851 X"$am_mf" : 'X\(//\)$' \| \
17852 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
17853 $as_echo X"$am_mf" |
17854 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17855 s//\1/
17856 q
17857 }
17858 /^X\(\/\/\)[^/].*/{
17859 s//\1/
17860 q
17861 }
17862 /^X\(\/\/\)$/{
17863 s//\1/
17864 q
17865 }
17866 /^X\(\/\).*/{
17867 s//\1/
17868 q
17869 }
17870 s/.*/./; q'`
17871 am_filepart=`$as_basename -- "$am_mf" ||
17872 $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
17873 X"$am_mf" : 'X\(//\)$' \| \
17874 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
17875 $as_echo X/"$am_mf" |
17876 sed '/^.*\/\([^/][^/]*\)\/*$/{
17877 s//\1/
17878 q
17879 }
17880 /^X\/\(\/\/\)$/{
17881 s//\1/
17882 q
17883 }
17884 /^X\/\(\/\).*/{
17885 s//\1/
17886 q
17887 }
17888 s/.*/./; q'`
17889 { echo "$as_me:$LINENO: cd "$am_dirpart" \
17890 && sed -e '/# am--include-marker/d' "$am_filepart" \
17891 | $MAKE -f - am--depfiles" >&5
17892 (cd "$am_dirpart" \
17893 && sed -e '/# am--include-marker/d' "$am_filepart" \
17894 | $MAKE -f - am--depfiles) >&5 2>&5
17895 ac_status=$?
17896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17897 (exit $ac_status); } || am_rc=$?
17898 done
17899 if test $am_rc -ne 0; then
17900 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17901 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17902 as_fn_error $? "Something went wrong bootstrapping makefile fragments
17903 for automatic dependency tracking. If GNU make was not used, consider
17904 re-running the configure script with MAKE=\"gmake\" (or whatever is
17905 necessary). You can also try re-running configure with the
17906 '--disable-dependency-tracking' option to at least be able to build
17907 the package (albeit without support for automatic dependency tracking).
17908 See \`config.log' for more details" "$LINENO" 5; }
17909 fi
17910 { am_dirpart=; unset am_dirpart;}
17911 { am_filepart=; unset am_filepart;}
17912 { am_mf=; unset am_mf;}
17913 { am_rc=; unset am_rc;}
17914 rm -f conftest-deps.mk
17915 }
17916 ;;
17917 "po-directories":C)
17918 for ac_file in $CONFIG_FILES; do
17919 # Support "outfile[:infile[:infile...]]"
17920 case "$ac_file" in
17921 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
17922 esac
17923 # PO directories have a Makefile.in generated from Makefile.in.in.
17924 case "$ac_file" in */Makefile.in)
17925 # Adjust a relative srcdir.
17926 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
17927 ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
17928 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
17929 # In autoconf-2.13 it is called $ac_given_srcdir.
17930 # In autoconf-2.50 it is called $srcdir.
17931 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
17932 case "$ac_given_srcdir" in
17933 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
17934 /*) top_srcdir="$ac_given_srcdir" ;;
17935 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
17936 esac
17937 # Treat a directory as a PO directory if and only if it has a
17938 # POTFILES.in file. This allows packages to have multiple PO
17939 # directories under different names or in different locations.
17940 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
17941 rm -f "$ac_dir/POTFILES"
17942 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
17943 gt_tab=`printf '\t'`
17944 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
17945 POMAKEFILEDEPS="POTFILES.in"
17946 # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
17947 # on $ac_dir but don't depend on user-specified configuration
17948 # parameters.
17949 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
17950 # The LINGUAS file contains the set of available languages.
17951 if test -n "$OBSOLETE_ALL_LINGUAS"; then
17952 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
17953 fi
17954 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
17955 # Hide the ALL_LINGUAS assignment from automake < 1.5.
17956 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
17957 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
17958 else
17959 # The set of available languages was given in configure.in.
17960 # Hide the ALL_LINGUAS assignment from automake < 1.5.
17961 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
17962 fi
17963 # Compute POFILES
17964 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
17965 # Compute UPDATEPOFILES
17966 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
17967 # Compute DUMMYPOFILES
17968 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
17969 # Compute GMOFILES
17970 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
17971 case "$ac_given_srcdir" in
17972 .) srcdirpre= ;;
17973 *) srcdirpre='$(srcdir)/' ;;
17974 esac
17975 POFILES=
17976 UPDATEPOFILES=
17977 DUMMYPOFILES=
17978 GMOFILES=
17979 for lang in $ALL_LINGUAS; do
17980 POFILES="$POFILES $srcdirpre$lang.po"
17981 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
17982 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
17983 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
17984 done
17985 # CATALOGS depends on both $ac_dir and the user's LINGUAS
17986 # environment variable.
17987 INST_LINGUAS=
17988 if test -n "$ALL_LINGUAS"; then
17989 for presentlang in $ALL_LINGUAS; do
17990 useit=no
17991 if test "%UNSET%" != "$LINGUAS"; then
17992 desiredlanguages="$LINGUAS"
17993 else
17994 desiredlanguages="$ALL_LINGUAS"
17995 fi
17996 for desiredlang in $desiredlanguages; do
17997 # Use the presentlang catalog if desiredlang is
17998 # a. equal to presentlang, or
17999 # b. a variant of presentlang (because in this case,
18000 # presentlang can be used as a fallback for messages
18001 # which are not translated in the desiredlang catalog).
18002 case "$desiredlang" in
18003 "$presentlang"*) useit=yes;;
18004 esac
18005 done
18006 if test $useit = yes; then
18007 INST_LINGUAS="$INST_LINGUAS $presentlang"
18008 fi
18009 done
18010 fi
18011 CATALOGS=
18012 if test -n "$INST_LINGUAS"; then
18013 for lang in $INST_LINGUAS; do
18014 CATALOGS="$CATALOGS $lang.gmo"
18015 done
18016 fi
18017 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
18018 sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
18019 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
18020 if test -f "$f"; then
18021 case "$f" in
18022 *.orig | *.bak | *~) ;;
18023 *) cat "$f" >> "$ac_dir/Makefile" ;;
18024 esac
18025 fi
18026 done
18027 fi
18028 ;;
18029 esac
18030 done ;;
18031
18032 esac
18033 done # for ac_tag
18034
18035
18036 as_fn_exit 0
18037 _ACEOF
18038 ac_clean_files=$ac_clean_files_save
18039
18040 test $ac_write_fail = 0 ||
18041 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
18042
18043
18044 # configure is writing to config.log, and then calls config.status.
18045 # config.status does its own redirection, appending to config.log.
18046 # Unfortunately, on DOS this fails, as config.log is still kept open
18047 # by configure, so config.status won't be able to write to it; its
18048 # output is simply discarded. So we exec the FD to /dev/null,
18049 # effectively closing config.log, so it can be properly (re)opened and
18050 # appended to by config.status. When coming back to configure, we
18051 # need to make the FD available again.
18052 if test "$no_create" != yes; then
18053 ac_cs_success=:
18054 ac_config_status_args=
18055 test "$silent" = yes &&
18056 ac_config_status_args="$ac_config_status_args --quiet"
18057 exec 5>/dev/null
18058 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
18059 exec 5>>config.log
18060 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18061 # would make configure fail if this is the last instruction.
18062 $ac_cs_success || as_fn_exit 1
18063 fi
18064 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18065 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18066 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
18067 fi
18068
11 # Process this file with autoconf to produce a configure script.
22
33 AC_PREREQ([2.69])
4 AC_INIT([elektroid],[2.1],[dagargo@gmail.com])
4 AC_INIT([elektroid],[2.2],[dagargo@gmail.com])
55 AC_CONFIG_SRCDIR([src])
66 AC_CONFIG_HEADERS([config.h])
7 AM_PROG_LIBTOOL
7 LT_INIT
88 AC_SEARCH_LIBS([sqrt], [m])
99 AC_CONFIG_MACRO_DIRS([m4])
10 AM_INIT_AUTOMAKE
10 AM_INIT_AUTOMAKE([subdir-objects])
1111
1212 # Checks for programs.
1313 AC_PROG_CC
+0
-16
debian/changelog less more
0 elektroid (1.2-1) unstable; urgency=medium
1
2 * New upstream version 1.2
3 * Fix cross building
4 * Bump dh-compat to 13
5 * Drop patches, applied by upstream
6 * Drop obsolete --as-needed build-flag
7 * d/upstream/metadata: Add archive and remove obsolete name field
8
9 -- Dennis Braun <d_braun@kabelmail.de> Mon, 25 May 2020 17:09:24 +0200
10
11 elektroid (1.1-1) unstable; urgency=medium
12
13 * Initial release (Closes: #953332)
14
15 -- Dennis Braun <d_braun@kabelmail.de> Wed, 08 Apr 2020 21:46:46 +0200
+0
-34
debian/control less more
0 Source: elektroid
1 Section: sound
2 Priority: optional
3 Maintainer: Debian Multimedia Maintainers <debian-multimedia@lists.debian.org>
4 Uploaders: Dennis Braun <d_braun@kabelmail.de>
5 Build-Depends: debhelper-compat (= 13),
6 libasound2-dev (>= 1.1.8),
7 libgtk-3-dev,
8 libpulse-dev,
9 libsndfile1-dev (>= 1.0.2),
10 libsamplerate0-dev (>= 0.1.9),
11 zlib1g-dev,
12 pkg-config
13 Homepage: https://github.com/dagargo/elektroid
14 Vcs-Browser: https://salsa.debian.org/multimedia-team/elektroid
15 Vcs-Git: https://salsa.debian.org/multimedia-team/elektroid.git
16 Standards-Version: 4.5.0
17 Rules-Requires-Root: no
18
19 Package: elektroid
20 Architecture: any
21 Depends: ${misc:Depends},
22 ${shlibs:Depends}
23 Description: Transfer application for Elektron devices
24 Elektroid is an transfer application for Elektron devices.
25 .
26 With Elektroid you can easily upload and download audio files, projects,
27 sounds and presets to and from Elektron devices. It can also be used to
28 send and receive MIDI SysEx files.
29 .
30 Elektroid has been reported to work with Model:Samples, Model:Cycles,
31 Digitakt, Digitone and Analog Rytm MKI and MKII.
32 .
33 This package provides both the GUI and CLI application of elektroid.
+0
-313
debian/copyright less more
0 Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
1 Upstream-Name: elektroid
2 Upstream-Contact: https://github.com/dagargo/elektroid
3 Source: https://github.com/dagargo/elektroid/releases
4 Comment:
5 This package was debianized by Dennis Braun <d_braun@kabelmail.de> on
6 Sun, 08 Mar 2020 01:05:20 +0100.
7
8 Files: *
9 Copyright:
10 2019-2020 David García Goñi <dagargo@gmail.com>
11 2019 Olivier Humbert <trebmuh@tuxfamily.org>
12 2020 Dennis Braun <d_braun@kabelmail.de>
13 License: GPL-3+
14
15 Files: debian/*
16 Copyright: 2020 Dennis Braun <d_braun@kabelmail.de>
17 License: GPL-3+
18
19 Files: res/elektroid.svg
20 Copyright: 2020 David García Goñi <dagargo@gmail.com>
21 License: CC-BY-SA-4.0
22
23 License: GPL-3+
24 This program is free software: you can redistribute it and/or modify
25 it under the terms of the GNU General Public License as published by
26 the Free Software Foundation, either version 3 of the License, or
27 (at your option) any later version.
28 .
29 This package 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 Comment:
34 On Debian systems, the complete text of the GNU General Public
35 License version 3 can be found in `/usr/share/common-licenses/GPL-3'.
36 .
37 You should have received a copy of the GNU General Public License
38 along with this program. If not, see <https://www.gnu.org/licenses/>.
39
40 License: CC-BY-SA-4.0
41 Creative Commons Attribution-ShareAlike 4.0 International Public License
42 .
43 By exercising the Licensed Rights (defined below), You accept and agree
44 to be bound by the terms and conditions of this Creative Commons
45 Attribution-ShareAlike 4.0 International Public License ("Public
46 License"). To the extent this Public License may be interpreted as a
47 contract, You are granted the Licensed Rights in consideration of Your
48 acceptance of these terms and conditions, and the Licensor grants You
49 such rights in consideration of benefits the Licensor receives from
50 making the Licensed Material available under these terms and
51 conditions.
52 .
53 Section 1 -- Definitions.
54 a. Adapted Material means material subject to Copyright and Similar
55 Rights that is derived from or based upon the Licensed Material
56 and in which the Licensed Material is translated, altered,
57 arranged, transformed, or otherwise modified in a manner requiring
58 permission under the Copyright and Similar Rights held by the
59 Licensor. For purposes of this Public License, where the Licensed
60 Material is a musical work, performance, or sound recording,
61 Adapted Material is always produced where the Licensed Material is
62 synched in timed relation with a moving image.
63 b. Adapter's License means the license You apply to Your Copyright
64 and Similar Rights in Your contributions to Adapted Material in
65 accordance with the terms and conditions of this Public License.
66 c. BY-SA Compatible License means a license listed at
67 creativecommons.org/compatiblelicenses, approved by Creative
68 Commons as essentially the equivalent of this Public License.
69 d. Copyright and Similar Rights means copyright and/or similar rights
70 closely related to copyright including, without limitation,
71 performance, broadcast, sound recording, and Sui Generis Database
72 Rights, without regard to how the rights are labeled or
73 categorized. For purposes of this Public License, the rights
74 specified in Section 2(b)(1)-(2) are not Copyright and Similar
75 Rights.
76 e. Effective Technological Measures means those measures that, in the
77 absence of proper authority, may not be circumvented under laws
78 fulfilling obligations under Article 11 of the WIPO Copyright
79 Treaty adopted on December 20, 1996, and/or similar international
80 agreements.
81 f. Exceptions and Limitations means fair use, fair dealing, and/or
82 any other exception or limitation to Copyright and Similar Rights
83 that applies to Your use of the Licensed Material.
84 g. License Elements means the license attributes listed in the name
85 of a Creative Commons Public License. The License Elements of this
86 Public License are Attribution and ShareAlike.
87 h. Licensed Material means the artistic or literary work, database,
88 or other material to which the Licensor applied this Public
89 License.
90 i. Licensed Rights means the rights granted to You subject to the
91 terms and conditions of this Public License, which are limited to
92 all Copyright and Similar Rights that apply to Your use of the
93 Licensed Material and that the Licensor has authority to license.
94 j. Licensor means the individual(s) or entity(ies) granting rights
95 under this Public License.
96 k. Share means to provide material to the public by any means or
97 process that requires permission under the Licensed Rights, such
98 as reproduction, public display, public performance, distribution,
99 dissemination, communication, or importation, and to make material
100 available to the public including in ways that members of the
101 public may access the material from a place and at a time
102 individually chosen by them.
103 l. Sui Generis Database Rights means rights other than copyright
104 resulting from Directive 96/9/EC of the European Parliament and of
105 the Council of 11 March 1996 on the legal protection of databases,
106 as amended and/or succeeded, as well as other essentially
107 equivalent rights anywhere in the world.
108 m. You means the individual or entity exercising the Licensed Rights
109 under this Public License. Your has a corresponding meaning.
110 .
111 Section 2 -- Scope.
112 a. License grant.
113 1. Subject to the terms and conditions of this Public License,
114 the Licensor hereby grants You a worldwide, royalty-free,
115 non-sublicensable, non-exclusive, irrevocable license to
116 exercise the Licensed Rights in the Licensed Material to:
117 a. reproduce and Share the Licensed Material, in whole or
118 in part; and
119 b. produce, reproduce, and Share Adapted Material.
120 2. Exceptions and Limitations. For the avoidance of doubt, where
121 Exceptions and Limitations apply to Your use, this Public
122 License does not apply, and You do not need to comply with
123 its terms and conditions.
124 3. Term. The term of this Public License is specified in Section
125 6(a).
126 4. Media and formats; technical modifications allowed. The
127 Licensor authorizes You to exercise the Licensed Rights in
128 all media and formats whether now known or hereafter created,
129 and to make technical modifications necessary to do so. The
130 Licensor waives and/or agrees not to assert any right or
131 authority to forbid You from making technical modifications
132 necessary to exercise the Licensed Rights, including
133 technical modifications necessary to circumvent Effective
134 Technological Measures. For purposes of this Public License,
135 simply making modifications authorized by this Section 2(a)
136 (4) never produces Adapted Material.
137 5. Downstream recipients.
138 a. Offer from the Licensor -- Licensed Material. Every
139 recipient of the Licensed Material automatically
140 receives an offer from the Licensor to exercise the
141 Licensed Rights under the terms and conditions of this
142 Public License.
143 b. Additional offer from the Licensor -- Adapted Material.
144 Every recipient of Adapted Material from You
145 automatically receives an offer from the Licensor to
146 exercise the Licensed Rights in the Adapted Material
147 under the conditions of the Adapter's License You apply.
148 c. No downstream restrictions. You may not offer or impose
149 any additional or different terms or conditions on, or
150 apply any Effective Technological Measures to, the
151 Licensed Material if doing so restricts exercise of the
152 Licensed Rights by any recipient of the Licensed
153 Material.
154 6. No endorsement. Nothing in this Public License constitutes or
155 may be construed as permission to assert or imply that You
156 are, or that Your use of the Licensed Material is, connected
157 with, or sponsored, endorsed, or granted official status by,
158 the Licensor or others designated to receive attribution as
159 provided in Section 3(a)(1)(A)(i).
160 b. Other rights.
161 1. Moral rights, such as the right of integrity, are not
162 licensed under this Public License, nor are publicity,
163 privacy, and/or other similar personality rights; however, to
164 the extent possible, the Licensor waives and/or agrees not to
165 assert any such rights held by the Licensor to the limited
166 extent necessary to allow You to exercise the Licensed
167 Rights, but not otherwise.
168 2. Patent and trademark rights are not licensed under this
169 Public License.
170 3. To the extent possible, the Licensor waives any right to
171 collect royalties from You for the exercise of the Licensed
172 Rights, whether directly or through a collecting society
173 under any voluntary or waivable statutory or compulsory
174 licensing scheme. In all other cases the Licensor expressly
175 reserves any right to collect such royalties.
176 .
177 Section 3 -- License Conditions.
178 Your exercise of the Licensed Rights is expressly made subject to the
179 following conditions.
180 a. Attribution.
181 1. If You Share the Licensed Material (including in modified
182 form), You must:
183 a. retain the following if it is supplied by the Licensor
184 with the Licensed Material:
185 i. identification of the creator(s) of the Licensed
186 Material and any others designated to receive
187 attribution, in any reasonable manner requested by
188 the Licensor (including by pseudonym if
189 designated);
190 ii. a copyright notice;
191 iii. a notice that refers to this Public License;
192 iv. a notice that refers to the disclaimer of
193 warranties;
194 v. a URI or hyperlink to the Licensed Material to the
195 extent reasonably practicable;
196 b. indicate if You modified the Licensed Material and
197 retain an indication of any previous modifications; and
198 c. indicate the Licensed Material is licensed under this
199 Public License, and include the text of, or the URI or
200 hyperlink to, this Public License.
201 2. You may satisfy the conditions in Section 3(a)(1) in any
202 reasonable manner based on the medium, means, and context in
203 which You Share the Licensed Material. For example, it may be
204 reasonable to satisfy the conditions by providing a URI or
205 hyperlink to a resource that includes the required
206 information.
207 3. If requested by the Licensor, You must remove any of the
208 information required by Section 3(a)(1)(A) to the extent
209 reasonably practicable.
210 b. ShareAlike.
211 In addition to the conditions in Section 3(a), if You Share
212 Adapted Material You produce, the following conditions also apply.
213 1. The Adapter's License You apply must be a Creative Commons
214 license with the same License Elements, this version or
215 later, or a BY-SA Compatible License.
216 2. You must include the text of, or the URI or hyperlink to, the
217 Adapter's License You apply. You may satisfy this condition
218 in any reasonable manner based on the medium, means, and
219 context in which You Share Adapted Material.
220 3. You may not offer or impose any additional or different terms
221 or conditions on, or apply any Effective Technological
222 Measures to, Adapted Material that restrict exercise of the
223 rights granted under the Adapter's License You apply.
224 .
225 Section 4 -- Sui Generis Database Rights.
226 Where the Licensed Rights include Sui Generis Database Rights that
227 apply to Your use of the Licensed Material:
228 a. for the avoidance of doubt, Section 2(a)(1) grants You the right
229 to extract, reuse, reproduce, and Share all or a substantial
230 portion of the contents of the database;
231 b. if You include all or a substantial portion of the database
232 contents in a database in which You have Sui Generis Database
233 Rights, then the database in which You have Sui Generis Database
234 Rights (but not its individual contents) is Adapted Material,
235 including for purposes of Section 3(b); and
236 c. You must comply with the conditions in Section 3(a) if You Share
237 all or a substantial portion of the contents of the database.
238 For the avoidance of doubt, this Section 4 supplements and does not
239 replace Your obligations under this Public License where the Licensed
240 Rights include other Copyright and Similar Rights.
241 .
242 Section 5 -- Disclaimer of Warranties and Limitation of Liability.
243 a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
244 EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
245 AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
246 ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
247 IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
248 WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
249 PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
250 ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
251 KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
252 ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
253 b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
254 TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
255 NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
256 INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
257 COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
258 USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
259 ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
260 DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
261 IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
262 c. The disclaimer of warranties and limitation of liability provided
263 above shall be interpreted in a manner that, to the extent
264 possible, most closely approximates an absolute disclaimer and
265 waiver of all liability.
266 .
267 Section 6 -- Term and Termination.
268 a. This Public License applies for the term of the Copyright and
269 Similar Rights licensed here. However, if You fail to comply with
270 this Public License, then Your rights under this Public License
271 terminate automatically.
272 b. Where Your right to use the Licensed Material has terminated under
273 Section 6(a), it reinstates:
274 1. automatically as of the date the violation is cured, provided
275 it is cured within 30 days of Your discovery of the
276 violation; or
277 2. upon express reinstatement by the Licensor.
278 For the avoidance of doubt, this Section 6(b) does not affect any
279 right the Licensor may have to seek remedies for Your violations
280 of this Public License.
281 c. For the avoidance of doubt, the Licensor may also offer the
282 Licensed Material under separate terms or conditions or stop
283 distributing the Licensed Material at any time; however, doing so
284 will not terminate this Public License.
285 d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
286 License.
287 .
288 Section 7 -- Other Terms and Conditions.
289 a. The Licensor shall not be bound by any additional or different
290 terms or conditions communicated by You unless expressly agreed.
291 b. Any arrangements, understandings, or agreements regarding the
292 Licensed Material not stated herein are separate from and
293 independent of the terms and conditions of this Public License.
294 .
295 Section 8 -- Interpretation.
296 a. For the avoidance of doubt, this Public License does not, and
297 shall not be interpreted to, reduce, limit, restrict, or impose
298 conditions on any use of the Licensed Material that could lawfully
299 be made without permission under this Public License.
300 b. To the extent possible, if any provision of this Public License is
301 deemed unenforceable, it shall be automatically reformed to the
302 minimum extent necessary to make it enforceable. If the provision
303 cannot be reformed, it shall be severed from this Public License
304 without affecting the enforceability of the remaining terms and
305 conditions.
306 c. No term or condition of this Public License will be waived and no
307 failure to comply consented to unless expressly agreed to by the
308 Licensor.
309 d. Nothing in this Public License constitutes or may be interpreted
310 as a limitation upon, or waiver of, any privileges and immunities
311 that apply to the Licensor or You, including from the legal
312 processes of any jurisdiction or authority.
+0
-17
debian/rules less more
0 #!/usr/bin/make -f
1
2 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
3
4 include /usr/share/dpkg/architecture.mk
5
6 # Fix cross building
7 ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
8 export ac_cv_func_malloc_0_nonnull=yes
9 endif
10
11 %:
12 dh $@ --with autoreconf
13
14 override_dh_auto_test:
15 # Don't enable tests, if no elektron device is connected
16 @echo "Tests disabled"
+0
-1
debian/source/format less more
0 3.0 (quilt)
+0
-5
debian/upstream/metadata less more
0 Archive: github
1 Bug-Database: https://github.com/dagargo/elektroid/issues
2 Bug-Submit: https://github.com/dagargo/elektroid/issues/new
3 Repository: https://github.com/dagargo/elektroid.git
4 Repository-Browse: https://github.com/dagargo/elektroid
+0
-3
debian/watch less more
0 version=4
1 opts=filenamemangle=s/.+\/v?(\d\S+)\.tar\.gz/elektroid-$1\.tar\.gz/ \
2 https://github.com/dagargo/elektroid/releases .*/v?(\d[\d\.]+)\.tar\.gz
0 #! /bin/sh
1 # depcomp - compile a program generating dependencies as side-effects
2
3 scriptversion=2018-03-07.03; # UTC
4
5 # Copyright (C) 1999-2020 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 <https://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 'before-save-hook 'time-stamp)
786 # time-stamp-start: "scriptversion="
787 # time-stamp-format: "%:y-%02m-%02d.%02H"
788 # time-stamp-time-zone: "UTC0"
789 # time-stamp-end: "; # UTC"
790 # End:
+0
-77
elektroid.spec less more
0 Name: elektroid
1 Version: 2.0
2 Release: 1%{?dist}
3 Summary: Transfer application for Elektron devices
4
5 License: GPLv3+
6 URL: https://github.com/dagargo/elektroid
7 Source0: https://github.com/dagargo/elektroid/archive/elektroid-%{version}.tar.gz
8
9 BuildRequires: autoconf
10 BuildRequires: libtool
11 BuildRequires: alsa-lib-devel
12 BuildRequires: zlib-devel
13 BuildRequires: libzip-devel
14 BuildRequires: gtk3-devel
15 BuildRequires: libsndfile-devel
16 BuildRequires: libsamplerate-devel
17 %if 0%{?suse_version}
18 BuildRequires: libpulse-devel
19 %else
20 %if 0%{?mgaversion}
21 BuildRequires: libpulseaudio-devel
22 %else
23 # RHEL, CentOS and Fedora use this name:
24 BuildRequires: pulseaudio-libs-devel
25 %endif
26 %endif
27 BuildRequires: gettext-devel
28 BuildRequires: json-glib-devel
29
30 %description
31 Elektroid is an transfer application for Elektron devices.
32 With Elektroid you can easily upload and download audio files, projects, sounds
33 and presets to and from Elektron devices. It can also be used to send and
34 receive MIDI SysEx files.
35 Elektroid has been reported to work with Model:Samples, Model:Cycles, Digitakt,
36 Digitone and Analog Rytm MKI and MKII.
37
38
39 %prep
40 %autosetup -p1
41 sed -i s/^include_HEADERS/noinst_HEADERS/ src/Makefile.am
42 aclocal
43 automake
44
45
46 %build
47 %configure
48 %make_build
49
50
51 %install
52 %make_install
53
54
55 %files
56 %{_bindir}/elektroid-cli
57 %{_bindir}/elektroid
58 %{_datadir}/applications/%{name}.desktop
59 %{_datadir}/%{name}/res/gui.css
60 %{_datadir}/%{name}/res/gui.glade
61 %{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
62 %{_datadir}/icons/hicolor/scalable/apps/%{name}-symbolic.svg
63 %{_datadir}/icons/hicolor/scalable/apps/%{name}-data-symbolic.svg
64 %{_datadir}/icons/hicolor/scalable/apps/%{name}-project-symbolic.svg
65 %{_datadir}/icons/hicolor/scalable/apps/%{name}-sound-symbolic.svg
66 %{_datadir}/icons/hicolor/scalable/apps/%{name}-wave-symbolic.svg
67 %{_datadir}/locale/*/LC_MESSAGES/%{name}.mo
68 %{_mandir}/man1/elektroid-cli.1.gz
69 %{_mandir}/man1/elektroid.1.gz
70 %{_metainfodir}/%{name}.appdata.xml
71 %license COPYING
72
73
74 %changelog
75 * Mon Feb 07 2022 Jonathan Wakely <jwakely@fedoraproject.org> - 2.0-1
76 - RPM package for Fedora
0 #!/bin/sh
1 # install - install a program, script, or datafile
2
3 scriptversion=2020-11-14.01; # 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 tab=' '
44 nl='
45 '
46 IFS=" $tab$nl"
47
48 # Set DOITPROG to "echo" to test this script.
49
50 doit=${DOITPROG-}
51 doit_exec=${doit:-exec}
52
53 # Put in absolute file names if you don't have them in your path;
54 # or use environment vars.
55
56 chgrpprog=${CHGRPPROG-chgrp}
57 chmodprog=${CHMODPROG-chmod}
58 chownprog=${CHOWNPROG-chown}
59 cmpprog=${CMPPROG-cmp}
60 cpprog=${CPPROG-cp}
61 mkdirprog=${MKDIRPROG-mkdir}
62 mvprog=${MVPROG-mv}
63 rmprog=${RMPROG-rm}
64 stripprog=${STRIPPROG-strip}
65
66 posix_mkdir=
67
68 # Desired mode of installed file.
69 mode=0755
70
71 # Create dirs (including intermediate dirs) using mode 755.
72 # This is like GNU 'install' as of coreutils 8.32 (2020).
73 mkdir_umask=22
74
75 backupsuffix=
76 chgrpcmd=
77 chmodcmd=$chmodprog
78 chowncmd=
79 mvcmd=$mvprog
80 rmcmd="$rmprog -f"
81 stripcmd=
82
83 src=
84 dst=
85 dir_arg=
86 dst_arg=
87
88 copy_on_change=false
89 is_target_a_directory=possibly
90
91 usage="\
92 Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
93 or: $0 [OPTION]... SRCFILES... DIRECTORY
94 or: $0 [OPTION]... -t DIRECTORY SRCFILES...
95 or: $0 [OPTION]... -d DIRECTORIES...
96
97 In the 1st form, copy SRCFILE to DSTFILE.
98 In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
99 In the 4th, create DIRECTORIES.
100
101 Options:
102 --help display this help and exit.
103 --version display version info and exit.
104
105 -c (ignored)
106 -C install only if different (preserve data modification time)
107 -d create directories instead of installing files.
108 -g GROUP $chgrpprog installed files to GROUP.
109 -m MODE $chmodprog installed files to MODE.
110 -o USER $chownprog installed files to USER.
111 -p pass -p to $cpprog.
112 -s $stripprog installed files.
113 -S SUFFIX attempt to back up existing files, with suffix SUFFIX.
114 -t DIRECTORY install into DIRECTORY.
115 -T report an error if DSTFILE is a directory.
116
117 Environment variables override the default commands:
118 CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
119 RMPROG STRIPPROG
120
121 By default, rm is invoked with -f; when overridden with RMPROG,
122 it's up to you to specify -f if you want it.
123
124 If -S is not specified, no backups are attempted.
125
126 Email bug reports to bug-automake@gnu.org.
127 Automake home page: https://www.gnu.org/software/automake/
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 *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
146 echo "$0: invalid mode: $mode" >&2
147 exit 1;;
148 esac
149 shift;;
150
151 -o) chowncmd="$chownprog $2"
152 shift;;
153
154 -p) cpprog="$cpprog -p";;
155
156 -s) stripcmd=$stripprog;;
157
158 -S) backupsuffix="$2"
159 shift;;
160
161 -t)
162 is_target_a_directory=always
163 dst_arg=$2
164 # Protect names problematic for 'test' and other utilities.
165 case $dst_arg in
166 -* | [=\(\)!]) dst_arg=./$dst_arg;;
167 esac
168 shift;;
169
170 -T) is_target_a_directory=never;;
171
172 --version) echo "$0 $scriptversion"; exit $?;;
173
174 --) shift
175 break;;
176
177 -*) echo "$0: invalid option: $1" >&2
178 exit 1;;
179
180 *) break;;
181 esac
182 shift
183 done
184
185 # We allow the use of options -d and -T together, by making -d
186 # take the precedence; this is for compatibility with GNU install.
187
188 if test -n "$dir_arg"; then
189 if test -n "$dst_arg"; then
190 echo "$0: target directory not allowed when installing a directory." >&2
191 exit 1
192 fi
193 fi
194
195 if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
196 # When -d is used, all remaining arguments are directories to create.
197 # When -t is used, the destination is already specified.
198 # Otherwise, the last argument is the destination. Remove it from $@.
199 for arg
200 do
201 if test -n "$dst_arg"; then
202 # $@ is not empty: it contains at least $arg.
203 set fnord "$@" "$dst_arg"
204 shift # fnord
205 fi
206 shift # arg
207 dst_arg=$arg
208 # Protect names problematic for 'test' and other utilities.
209 case $dst_arg in
210 -* | [=\(\)!]) dst_arg=./$dst_arg;;
211 esac
212 done
213 fi
214
215 if test $# -eq 0; then
216 if test -z "$dir_arg"; then
217 echo "$0: no input file specified." >&2
218 exit 1
219 fi
220 # It's OK to call 'install-sh -d' without argument.
221 # This can happen when creating conditional directories.
222 exit 0
223 fi
224
225 if test -z "$dir_arg"; then
226 if test $# -gt 1 || test "$is_target_a_directory" = always; then
227 if test ! -d "$dst_arg"; then
228 echo "$0: $dst_arg: Is not a directory." >&2
229 exit 1
230 fi
231 fi
232 fi
233
234 if test -z "$dir_arg"; then
235 do_exit='(exit $ret); exit $ret'
236 trap "ret=129; $do_exit" 1
237 trap "ret=130; $do_exit" 2
238 trap "ret=141; $do_exit" 13
239 trap "ret=143; $do_exit" 15
240
241 # Set umask so as not to create temps with too-generous modes.
242 # However, 'strip' requires both read and write access to temps.
243 case $mode in
244 # Optimize common cases.
245 *644) cp_umask=133;;
246 *755) cp_umask=22;;
247
248 *[0-7])
249 if test -z "$stripcmd"; then
250 u_plus_rw=
251 else
252 u_plus_rw='% 200'
253 fi
254 cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
255 *)
256 if test -z "$stripcmd"; then
257 u_plus_rw=
258 else
259 u_plus_rw=,u+rw
260 fi
261 cp_umask=$mode$u_plus_rw;;
262 esac
263 fi
264
265 for src
266 do
267 # Protect names problematic for 'test' and other utilities.
268 case $src in
269 -* | [=\(\)!]) src=./$src;;
270 esac
271
272 if test -n "$dir_arg"; then
273 dst=$src
274 dstdir=$dst
275 test -d "$dstdir"
276 dstdir_status=$?
277 # Don't chown directories that already exist.
278 if test $dstdir_status = 0; then
279 chowncmd=""
280 fi
281 else
282
283 # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
284 # might cause directories to be created, which would be especially bad
285 # if $src (and thus $dsttmp) contains '*'.
286 if test ! -f "$src" && test ! -d "$src"; then
287 echo "$0: $src does not exist." >&2
288 exit 1
289 fi
290
291 if test -z "$dst_arg"; then
292 echo "$0: no destination specified." >&2
293 exit 1
294 fi
295 dst=$dst_arg
296
297 # If destination is a directory, append the input filename.
298 if test -d "$dst"; then
299 if test "$is_target_a_directory" = never; then
300 echo "$0: $dst_arg: Is a directory" >&2
301 exit 1
302 fi
303 dstdir=$dst
304 dstbase=`basename "$src"`
305 case $dst in
306 */) dst=$dst$dstbase;;
307 *) dst=$dst/$dstbase;;
308 esac
309 dstdir_status=0
310 else
311 dstdir=`dirname "$dst"`
312 test -d "$dstdir"
313 dstdir_status=$?
314 fi
315 fi
316
317 case $dstdir in
318 */) dstdirslash=$dstdir;;
319 *) dstdirslash=$dstdir/;;
320 esac
321
322 obsolete_mkdir_used=false
323
324 if test $dstdir_status != 0; then
325 case $posix_mkdir in
326 '')
327 # With -d, create the new directory with the user-specified mode.
328 # Otherwise, rely on $mkdir_umask.
329 if test -n "$dir_arg"; then
330 mkdir_mode=-m$mode
331 else
332 mkdir_mode=
333 fi
334
335 posix_mkdir=false
336 # The $RANDOM variable is not portable (e.g., dash). Use it
337 # here however when possible just to lower collision chance.
338 tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
339
340 trap '
341 ret=$?
342 rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
343 exit $ret
344 ' 0
345
346 # Because "mkdir -p" follows existing symlinks and we likely work
347 # directly in world-writeable /tmp, make sure that the '$tmpdir'
348 # directory is successfully created first before we actually test
349 # 'mkdir -p'.
350 if (umask $mkdir_umask &&
351 $mkdirprog $mkdir_mode "$tmpdir" &&
352 exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
353 then
354 if test -z "$dir_arg" || {
355 # Check for POSIX incompatibilities with -m.
356 # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
357 # other-writable bit of parent directory when it shouldn't.
358 # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
359 test_tmpdir="$tmpdir/a"
360 ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
361 case $ls_ld_tmpdir in
362 d????-?r-*) different_mode=700;;
363 d????-?--*) different_mode=755;;
364 *) false;;
365 esac &&
366 $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
367 ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
368 test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
369 }
370 }
371 then posix_mkdir=:
372 fi
373 rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
374 else
375 # Remove any dirs left behind by ancient mkdir implementations.
376 rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
377 fi
378 trap '' 0;;
379 esac
380
381 if
382 $posix_mkdir && (
383 umask $mkdir_umask &&
384 $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
385 )
386 then :
387 else
388
389 # mkdir does not conform to POSIX,
390 # or it failed possibly due to a race condition. Create the
391 # directory the slow way, step by step, checking for races as we go.
392
393 case $dstdir in
394 /*) prefix='/';;
395 [-=\(\)!]*) prefix='./';;
396 *) prefix='';;
397 esac
398
399 oIFS=$IFS
400 IFS=/
401 set -f
402 set fnord $dstdir
403 shift
404 set +f
405 IFS=$oIFS
406
407 prefixes=
408
409 for d
410 do
411 test X"$d" = X && continue
412
413 prefix=$prefix$d
414 if test -d "$prefix"; then
415 prefixes=
416 else
417 if $posix_mkdir; then
418 (umask $mkdir_umask &&
419 $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
420 # Don't fail if two instances are running concurrently.
421 test -d "$prefix" || exit 1
422 else
423 case $prefix in
424 *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
425 *) qprefix=$prefix;;
426 esac
427 prefixes="$prefixes '$qprefix'"
428 fi
429 fi
430 prefix=$prefix/
431 done
432
433 if test -n "$prefixes"; then
434 # Don't fail if two instances are running concurrently.
435 (umask $mkdir_umask &&
436 eval "\$doit_exec \$mkdirprog $prefixes") ||
437 test -d "$dstdir" || exit 1
438 obsolete_mkdir_used=true
439 fi
440 fi
441 fi
442
443 if test -n "$dir_arg"; then
444 { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
445 { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
446 { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
447 test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
448 else
449
450 # Make a couple of temp file names in the proper directory.
451 dsttmp=${dstdirslash}_inst.$$_
452 rmtmp=${dstdirslash}_rm.$$_
453
454 # Trap to clean up those temp files at exit.
455 trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
456
457 # Copy the file name to the temp name.
458 (umask $cp_umask &&
459 { test -z "$stripcmd" || {
460 # Create $dsttmp read-write so that cp doesn't create it read-only,
461 # which would cause strip to fail.
462 if test -z "$doit"; then
463 : >"$dsttmp" # No need to fork-exec 'touch'.
464 else
465 $doit touch "$dsttmp"
466 fi
467 }
468 } &&
469 $doit_exec $cpprog "$src" "$dsttmp") &&
470
471 # and set any options; do chmod last to preserve setuid bits.
472 #
473 # If any of these fail, we abort the whole thing. If we want to
474 # ignore errors from any of these, just make sure not to ignore
475 # errors from the above "$doit $cpprog $src $dsttmp" command.
476 #
477 { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
478 { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
479 { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
480 { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
481
482 # If -C, don't bother to copy if it wouldn't change the file.
483 if $copy_on_change &&
484 old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
485 new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
486 set -f &&
487 set X $old && old=:$2:$4:$5:$6 &&
488 set X $new && new=:$2:$4:$5:$6 &&
489 set +f &&
490 test "$old" = "$new" &&
491 $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
492 then
493 rm -f "$dsttmp"
494 else
495 # If $backupsuffix is set, and the file being installed
496 # already exists, attempt a backup. Don't worry if it fails,
497 # e.g., if mv doesn't support -f.
498 if test -n "$backupsuffix" && test -f "$dst"; then
499 $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
500 fi
501
502 # Rename the file to the real destination.
503 $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
504
505 # The rename failed, perhaps because mv can't rename something else
506 # to itself, or perhaps because mv is so ancient that it does not
507 # support -f.
508 {
509 # Now remove or move aside any old file at destination location.
510 # We try this two ways since rm can't unlink itself on some
511 # systems and the destination file might be busy for other
512 # reasons. In this case, the final cleanup might fail but the new
513 # file should still install successfully.
514 {
515 test ! -f "$dst" ||
516 $doit $rmcmd "$dst" 2>/dev/null ||
517 { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
518 { $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
519 } ||
520 { echo "$0: cannot unlink or rename $dst" >&2
521 (exit 1); exit 1
522 }
523 } &&
524
525 # Now rename the file to the real destination.
526 $doit $mvcmd "$dsttmp" "$dst"
527 }
528 fi || exit 1
529
530 trap '' 0
531 fi
532 done
533
534 # Local variables:
535 # eval: (add-hook 'before-save-hook 'time-stamp)
536 # time-stamp-start: "scriptversion="
537 # time-stamp-format: "%:y-%02m-%02d.%02H"
538 # time-stamp-time-zone: "UTC0"
539 # time-stamp-end: "; # UTC"
540 # End:
0 #! /bin/sh
1 ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in
2 ## by inline-source v2014-01-03.01
3
4 # libtool (GNU libtool) 2.4.6
5 # Provide generalized library-building support services.
6 # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7
8 # Copyright (C) 1996-2015 Free Software Foundation, Inc.
9 # This is free software; see the source for copying conditions. There is NO
10 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11
12 # GNU Libtool is free software; you can redistribute it and/or modify
13 # it under the terms of the GNU General Public License as published by
14 # the Free Software Foundation; either version 2 of the License, or
15 # (at your option) any later version.
16 #
17 # As a special exception to the GNU General Public License,
18 # if you distribute this file as part of a program or library that
19 # is built using GNU Libtool, you may include this file under the
20 # same distribution terms that you use for the rest of that program.
21 #
22 # GNU Libtool is distributed in the hope that it will be useful, but
23 # WITHOUT ANY WARRANTY; without even the implied warranty of
24 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 # General Public License for more details.
26 #
27 # You should have received a copy of the GNU General Public License
28 # along with this program. If not, see <http://www.gnu.org/licenses/>.
29
30
31 PROGRAM=libtool
32 PACKAGE=libtool
33 VERSION="2.4.6 Debian-2.4.6-15"
34 package_revision=2.4.6
35
36
37 ## ------ ##
38 ## Usage. ##
39 ## ------ ##
40
41 # Run './libtool --help' for help with using this script from the
42 # command line.
43
44
45 ## ------------------------------- ##
46 ## User overridable command paths. ##
47 ## ------------------------------- ##
48
49 # After configure completes, it has a better idea of some of the
50 # shell tools we need than the defaults used by the functions shared
51 # with bootstrap, so set those here where they can still be over-
52 # ridden by the user, but otherwise take precedence.
53
54 : ${AUTOCONF="autoconf"}
55 : ${AUTOMAKE="automake"}
56
57
58 ## -------------------------- ##
59 ## Source external libraries. ##
60 ## -------------------------- ##
61
62 # Much of our low-level functionality needs to be sourced from external
63 # libraries, which are installed to $pkgauxdir.
64
65 # Set a version string for this script.
66 scriptversion=2015-01-20.17; # UTC
67
68 # General shell script boiler plate, and helper functions.
69 # Written by Gary V. Vaughan, 2004
70
71 # Copyright (C) 2004-2015 Free Software Foundation, Inc.
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 # This program is free software; you can redistribute it and/or modify
76 # it under the terms of the GNU General Public License as published by
77 # the Free Software Foundation; either version 3 of the License, or
78 # (at your option) any later version.
79
80 # As a special exception to the GNU General Public License, if you distribute
81 # this file as part of a program or library that is built using GNU Libtool,
82 # you may include this file under the same distribution terms that you use
83 # for the rest of that program.
84
85 # This program is distributed in the hope that it will be useful,
86 # but WITHOUT ANY WARRANTY; without even the implied warranty of
87 # MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU
88 # General Public License for more details.
89
90 # You should have received a copy of the GNU General Public License
91 # along with this program. If not, see <http://www.gnu.org/licenses/>.
92
93 # Please report bugs or propose patches to gary@gnu.org.
94
95
96 ## ------ ##
97 ## Usage. ##
98 ## ------ ##
99
100 # Evaluate this file near the top of your script to gain access to
101 # the functions and variables defined here:
102 #
103 # . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh
104 #
105 # If you need to override any of the default environment variable
106 # settings, do that before evaluating this file.
107
108
109 ## -------------------- ##
110 ## Shell normalisation. ##
111 ## -------------------- ##
112
113 # Some shells need a little help to be as Bourne compatible as possible.
114 # Before doing anything else, make sure all that help has been provided!
115
116 DUALCASE=1; export DUALCASE # for MKS sh
117 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
118 emulate sh
119 NULLCMD=:
120 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
121 # is contrary to our usage. Disable this feature.
122 alias -g '${1+"$@"}'='"$@"'
123 setopt NO_GLOB_SUBST
124 else
125 case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac
126 fi
127
128 # NLS nuisances: We save the old values in case they are required later.
129 _G_user_locale=
130 _G_safe_locale=
131 for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
132 do
133 eval "if test set = \"\${$_G_var+set}\"; then
134 save_$_G_var=\$$_G_var
135 $_G_var=C
136 export $_G_var
137 _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\"
138 _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\"
139 fi"
140 done
141
142 # CDPATH.
143 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
144
145 # Make sure IFS has a sensible default
146 sp=' '
147 nl='
148 '
149 IFS="$sp $nl"
150
151 # There are apparently some retarded systems that use ';' as a PATH separator!
152 if test "${PATH_SEPARATOR+set}" != set; then
153 PATH_SEPARATOR=:
154 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
155 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
156 PATH_SEPARATOR=';'
157 }
158 fi
159
160
161
162 ## ------------------------- ##
163 ## Locate command utilities. ##
164 ## ------------------------- ##
165
166
167 # func_executable_p FILE
168 # ----------------------
169 # Check that FILE is an executable regular file.
170 func_executable_p ()
171 {
172 test -f "$1" && test -x "$1"
173 }
174
175
176 # func_path_progs PROGS_LIST CHECK_FUNC [PATH]
177 # --------------------------------------------
178 # Search for either a program that responds to --version with output
179 # containing "GNU", or else returned by CHECK_FUNC otherwise, by
180 # trying all the directories in PATH with each of the elements of
181 # PROGS_LIST.
182 #
183 # CHECK_FUNC should accept the path to a candidate program, and
184 # set $func_check_prog_result if it truncates its output less than
185 # $_G_path_prog_max characters.
186 func_path_progs ()
187 {
188 _G_progs_list=$1
189 _G_check_func=$2
190 _G_PATH=${3-"$PATH"}
191
192 _G_path_prog_max=0
193 _G_path_prog_found=false
194 _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:}
195 for _G_dir in $_G_PATH; do
196 IFS=$_G_save_IFS
197 test -z "$_G_dir" && _G_dir=.
198 for _G_prog_name in $_G_progs_list; do
199 for _exeext in '' .EXE; do
200 _G_path_prog=$_G_dir/$_G_prog_name$_exeext
201 func_executable_p "$_G_path_prog" || continue
202 case `"$_G_path_prog" --version 2>&1` in
203 *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;;
204 *) $_G_check_func $_G_path_prog
205 func_path_progs_result=$func_check_prog_result
206 ;;
207 esac
208 $_G_path_prog_found && break 3
209 done
210 done
211 done
212 IFS=$_G_save_IFS
213 test -z "$func_path_progs_result" && {
214 echo "no acceptable sed could be found in \$PATH" >&2
215 exit 1
216 }
217 }
218
219
220 # We want to be able to use the functions in this file before configure
221 # has figured out where the best binaries are kept, which means we have
222 # to search for them ourselves - except when the results are already set
223 # where we skip the searches.
224
225 # Unless the user overrides by setting SED, search the path for either GNU
226 # sed, or the sed that truncates its output the least.
227 test -z "$SED" && {
228 _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
229 for _G_i in 1 2 3 4 5 6 7; do
230 _G_sed_script=$_G_sed_script$nl$_G_sed_script
231 done
232 echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed
233 _G_sed_script=
234
235 func_check_prog_sed ()
236 {
237 _G_path_prog=$1
238
239 _G_count=0
240 printf 0123456789 >conftest.in
241 while :
242 do
243 cat conftest.in conftest.in >conftest.tmp
244 mv conftest.tmp conftest.in
245 cp conftest.in conftest.nl
246 echo '' >> conftest.nl
247 "$_G_path_prog" -f conftest.sed <conftest.nl >conftest.out 2>/dev/null || break
248 diff conftest.out conftest.nl >/dev/null 2>&1 || break
249 _G_count=`expr $_G_count + 1`
250 if test "$_G_count" -gt "$_G_path_prog_max"; then
251 # Best one so far, save it but keep looking for a better one
252 func_check_prog_result=$_G_path_prog
253 _G_path_prog_max=$_G_count
254 fi
255 # 10*(2^10) chars as input seems more than enough
256 test 10 -lt "$_G_count" && break
257 done
258 rm -f conftest.in conftest.tmp conftest.nl conftest.out
259 }
260
261 func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin
262 rm -f conftest.sed
263 SED=$func_path_progs_result
264 }
265
266
267 # Unless the user overrides by setting GREP, search the path for either GNU
268 # grep, or the grep that truncates its output the least.
269 test -z "$GREP" && {
270 func_check_prog_grep ()
271 {
272 _G_path_prog=$1
273
274 _G_count=0
275 _G_path_prog_max=0
276 printf 0123456789 >conftest.in
277 while :
278 do
279 cat conftest.in conftest.in >conftest.tmp
280 mv conftest.tmp conftest.in
281 cp conftest.in conftest.nl
282 echo 'GREP' >> conftest.nl
283 "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' <conftest.nl >conftest.out 2>/dev/null || break
284 diff conftest.out conftest.nl >/dev/null 2>&1 || break
285 _G_count=`expr $_G_count + 1`
286 if test "$_G_count" -gt "$_G_path_prog_max"; then
287 # Best one so far, save it but keep looking for a better one
288 func_check_prog_result=$_G_path_prog
289 _G_path_prog_max=$_G_count
290 fi
291 # 10*(2^10) chars as input seems more than enough
292 test 10 -lt "$_G_count" && break
293 done
294 rm -f conftest.in conftest.tmp conftest.nl conftest.out
295 }
296
297 func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin
298 GREP=$func_path_progs_result
299 }
300
301
302 ## ------------------------------- ##
303 ## User overridable command paths. ##
304 ## ------------------------------- ##
305
306 # All uppercase variable names are used for environment variables. These
307 # variables can be overridden by the user before calling a script that
308 # uses them if a suitable command of that name is not already available
309 # in the command search PATH.
310
311 : ${CP="cp -f"}
312 : ${ECHO="printf %s\n"}
313 : ${EGREP="$GREP -E"}
314 : ${FGREP="$GREP -F"}
315 : ${LN_S="ln -s"}
316 : ${MAKE="make"}
317 : ${MKDIR="mkdir"}
318 : ${MV="mv -f"}
319 : ${RM="rm -f"}
320 : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
321
322
323 ## -------------------- ##
324 ## Useful sed snippets. ##
325 ## -------------------- ##
326
327 sed_dirname='s|/[^/]*$||'
328 sed_basename='s|^.*/||'
329
330 # Sed substitution that helps us do robust quoting. It backslashifies
331 # metacharacters that are still active within double-quoted strings.
332 sed_quote_subst='s|\([`"$\\]\)|\\\1|g'
333
334 # Same as above, but do not quote variable references.
335 sed_double_quote_subst='s/\(["`\\]\)/\\\1/g'
336
337 # Sed substitution that turns a string into a regex matching for the
338 # string literally.
339 sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g'
340
341 # Sed substitution that converts a w32 file name or path
342 # that contains forward slashes, into one that contains
343 # (escaped) backslashes. A very naive implementation.
344 sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
345
346 # Re-'\' parameter expansions in output of sed_double_quote_subst that
347 # were '\'-ed in input to the same. If an odd number of '\' preceded a
348 # '$' in input to sed_double_quote_subst, that '$' was protected from
349 # expansion. Since each input '\' is now two '\'s, look for any number
350 # of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'.
351 _G_bs='\\'
352 _G_bs2='\\\\'
353 _G_bs4='\\\\\\\\'
354 _G_dollar='\$'
355 sed_double_backslash="\
356 s/$_G_bs4/&\\
357 /g
358 s/^$_G_bs2$_G_dollar/$_G_bs&/
359 s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g
360 s/\n//g"
361
362
363 ## ----------------- ##
364 ## Global variables. ##
365 ## ----------------- ##
366
367 # Except for the global variables explicitly listed below, the following
368 # functions in the '^func_' namespace, and the '^require_' namespace
369 # variables initialised in the 'Resource management' section, sourcing
370 # this file will not pollute your global namespace with anything
371 # else. There's no portable way to scope variables in Bourne shell
372 # though, so actually running these functions will sometimes place
373 # results into a variable named after the function, and often use
374 # temporary variables in the '^_G_' namespace. If you are careful to
375 # avoid using those namespaces casually in your sourcing script, things
376 # should continue to work as you expect. And, of course, you can freely
377 # overwrite any of the functions or variables defined here before
378 # calling anything to customize them.
379
380 EXIT_SUCCESS=0
381 EXIT_FAILURE=1
382 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
383 EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
384
385 # Allow overriding, eg assuming that you follow the convention of
386 # putting '$debug_cmd' at the start of all your functions, you can get
387 # bash to show function call trace with:
388 #
389 # debug_cmd='echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
390 debug_cmd=${debug_cmd-":"}
391 exit_cmd=:
392
393 # By convention, finish your script with:
394 #
395 # exit $exit_status
396 #
397 # so that you can set exit_status to non-zero if you want to indicate
398 # something went wrong during execution without actually bailing out at
399 # the point of failure.
400 exit_status=$EXIT_SUCCESS
401
402 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
403 # is ksh but when the shell is invoked as "sh" and the current value of
404 # the _XPG environment variable is not equal to 1 (one), the special
405 # positional parameter $0, within a function call, is the name of the
406 # function.
407 progpath=$0
408
409 # The name of this program.
410 progname=`$ECHO "$progpath" |$SED "$sed_basename"`
411
412 # Make sure we have an absolute progpath for reexecution:
413 case $progpath in
414 [\\/]*|[A-Za-z]:\\*) ;;
415 *[\\/]*)
416 progdir=`$ECHO "$progpath" |$SED "$sed_dirname"`
417 progdir=`cd "$progdir" && pwd`
418 progpath=$progdir/$progname
419 ;;
420 *)
421 _G_IFS=$IFS
422 IFS=${PATH_SEPARATOR-:}
423 for progdir in $PATH; do
424 IFS=$_G_IFS
425 test -x "$progdir/$progname" && break
426 done
427 IFS=$_G_IFS
428 test -n "$progdir" || progdir=`pwd`
429 progpath=$progdir/$progname
430 ;;
431 esac
432
433
434 ## ----------------- ##
435 ## Standard options. ##
436 ## ----------------- ##
437
438 # The following options affect the operation of the functions defined
439 # below, and should be set appropriately depending on run-time para-
440 # meters passed on the command line.
441
442 opt_dry_run=false
443 opt_quiet=false
444 opt_verbose=false
445
446 # Categories 'all' and 'none' are always available. Append any others
447 # you will pass as the first argument to func_warning from your own
448 # code.
449 warning_categories=
450
451 # By default, display warnings according to 'opt_warning_types'. Set
452 # 'warning_func' to ':' to elide all warnings, or func_fatal_error to
453 # treat the next displayed warning as a fatal error.
454 warning_func=func_warn_and_continue
455
456 # Set to 'all' to display all warnings, 'none' to suppress all
457 # warnings, or a space delimited list of some subset of
458 # 'warning_categories' to display only the listed warnings.
459 opt_warning_types=all
460
461
462 ## -------------------- ##
463 ## Resource management. ##
464 ## -------------------- ##
465
466 # This section contains definitions for functions that each ensure a
467 # particular resource (a file, or a non-empty configuration variable for
468 # example) is available, and if appropriate to extract default values
469 # from pertinent package files. Call them using their associated
470 # 'require_*' variable to ensure that they are executed, at most, once.
471 #
472 # It's entirely deliberate that calling these functions can set
473 # variables that don't obey the namespace limitations obeyed by the rest
474 # of this file, in order that that they be as useful as possible to
475 # callers.
476
477
478 # require_term_colors
479 # -------------------
480 # Allow display of bold text on terminals that support it.
481 require_term_colors=func_require_term_colors
482 func_require_term_colors ()
483 {
484 $debug_cmd
485
486 test -t 1 && {
487 # COLORTERM and USE_ANSI_COLORS environment variables take
488 # precedence, because most terminfo databases neglect to describe
489 # whether color sequences are supported.
490 test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"}
491
492 if test 1 = "$USE_ANSI_COLORS"; then
493 # Standard ANSI escape sequences
494 tc_reset=''
495 tc_bold=''; tc_standout=''
496 tc_red=''; tc_green=''
497 tc_blue=''; tc_cyan=''
498 else
499 # Otherwise trust the terminfo database after all.
500 test -n "`tput sgr0 2>/dev/null`" && {
501 tc_reset=`tput sgr0`
502 test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold`
503 tc_standout=$tc_bold
504 test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso`
505 test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1`
506 test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2`
507 test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4`
508 test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5`
509 }
510 fi
511 }
512
513 require_term_colors=:
514 }
515
516
517 ## ----------------- ##
518 ## Function library. ##
519 ## ----------------- ##
520
521 # This section contains a variety of useful functions to call in your
522 # scripts. Take note of the portable wrappers for features provided by
523 # some modern shells, which will fall back to slower equivalents on
524 # less featureful shells.
525
526
527 # func_append VAR VALUE
528 # ---------------------
529 # Append VALUE onto the existing contents of VAR.
530
531 # We should try to minimise forks, especially on Windows where they are
532 # unreasonably slow, so skip the feature probes when bash or zsh are
533 # being used:
534 if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then
535 : ${_G_HAVE_ARITH_OP="yes"}
536 : ${_G_HAVE_XSI_OPS="yes"}
537 # The += operator was introduced in bash 3.1
538 case $BASH_VERSION in
539 [12].* | 3.0 | 3.0*) ;;
540 *)
541 : ${_G_HAVE_PLUSEQ_OP="yes"}
542 ;;
543 esac
544 fi
545
546 # _G_HAVE_PLUSEQ_OP
547 # Can be empty, in which case the shell is probed, "yes" if += is
548 # useable or anything else if it does not work.
549 test -z "$_G_HAVE_PLUSEQ_OP" \
550 && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \
551 && _G_HAVE_PLUSEQ_OP=yes
552
553 if test yes = "$_G_HAVE_PLUSEQ_OP"
554 then
555 # This is an XSI compatible shell, allowing a faster implementation...
556 eval 'func_append ()
557 {
558 $debug_cmd
559
560 eval "$1+=\$2"
561 }'
562 else
563 # ...otherwise fall back to using expr, which is often a shell builtin.
564 func_append ()
565 {
566 $debug_cmd
567
568 eval "$1=\$$1\$2"
569 }
570 fi
571
572
573 # func_append_quoted VAR VALUE
574 # ----------------------------
575 # Quote VALUE and append to the end of shell variable VAR, separated
576 # by a space.
577 if test yes = "$_G_HAVE_PLUSEQ_OP"; then
578 eval 'func_append_quoted ()
579 {
580 $debug_cmd
581
582 func_quote_for_eval "$2"
583 eval "$1+=\\ \$func_quote_for_eval_result"
584 }'
585 else
586 func_append_quoted ()
587 {
588 $debug_cmd
589
590 func_quote_for_eval "$2"
591 eval "$1=\$$1\\ \$func_quote_for_eval_result"
592 }
593 fi
594
595
596 # func_append_uniq VAR VALUE
597 # --------------------------
598 # Append unique VALUE onto the existing contents of VAR, assuming
599 # entries are delimited by the first character of VALUE. For example:
600 #
601 # func_append_uniq options " --another-option option-argument"
602 #
603 # will only append to $options if " --another-option option-argument "
604 # is not already present somewhere in $options already (note spaces at
605 # each end implied by leading space in second argument).
606 func_append_uniq ()
607 {
608 $debug_cmd
609
610 eval _G_current_value='`$ECHO $'$1'`'
611 _G_delim=`expr "$2" : '\(.\)'`
612
613 case $_G_delim$_G_current_value$_G_delim in
614 *"$2$_G_delim"*) ;;
615 *) func_append "$@" ;;
616 esac
617 }
618
619
620 # func_arith TERM...
621 # ------------------
622 # Set func_arith_result to the result of evaluating TERMs.
623 test -z "$_G_HAVE_ARITH_OP" \
624 && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \
625 && _G_HAVE_ARITH_OP=yes
626
627 if test yes = "$_G_HAVE_ARITH_OP"; then
628 eval 'func_arith ()
629 {
630 $debug_cmd
631
632 func_arith_result=$(( $* ))
633 }'
634 else
635 func_arith ()
636 {
637 $debug_cmd
638
639 func_arith_result=`expr "$@"`
640 }
641 fi
642
643
644 # func_basename FILE
645 # ------------------
646 # Set func_basename_result to FILE with everything up to and including
647 # the last / stripped.
648 if test yes = "$_G_HAVE_XSI_OPS"; then
649 # If this shell supports suffix pattern removal, then use it to avoid
650 # forking. Hide the definitions single quotes in case the shell chokes
651 # on unsupported syntax...
652 _b='func_basename_result=${1##*/}'
653 _d='case $1 in
654 */*) func_dirname_result=${1%/*}$2 ;;
655 * ) func_dirname_result=$3 ;;
656 esac'
657
658 else
659 # ...otherwise fall back to using sed.
660 _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`'
661 _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"`
662 if test "X$func_dirname_result" = "X$1"; then
663 func_dirname_result=$3
664 else
665 func_append func_dirname_result "$2"
666 fi'
667 fi
668
669 eval 'func_basename ()
670 {
671 $debug_cmd
672
673 '"$_b"'
674 }'
675
676
677 # func_dirname FILE APPEND NONDIR_REPLACEMENT
678 # -------------------------------------------
679 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
680 # otherwise set result to NONDIR_REPLACEMENT.
681 eval 'func_dirname ()
682 {
683 $debug_cmd
684
685 '"$_d"'
686 }'
687
688
689 # func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT
690 # --------------------------------------------------------
691 # Perform func_basename and func_dirname in a single function
692 # call:
693 # dirname: Compute the dirname of FILE. If nonempty,
694 # add APPEND to the result, otherwise set result
695 # to NONDIR_REPLACEMENT.
696 # value returned in "$func_dirname_result"
697 # basename: Compute filename of FILE.
698 # value retuned in "$func_basename_result"
699 # For efficiency, we do not delegate to the functions above but instead
700 # duplicate the functionality here.
701 eval 'func_dirname_and_basename ()
702 {
703 $debug_cmd
704
705 '"$_b"'
706 '"$_d"'
707 }'
708
709
710 # func_echo ARG...
711 # ----------------
712 # Echo program name prefixed message.
713 func_echo ()
714 {
715 $debug_cmd
716
717 _G_message=$*
718
719 func_echo_IFS=$IFS
720 IFS=$nl
721 for _G_line in $_G_message; do
722 IFS=$func_echo_IFS
723 $ECHO "$progname: $_G_line"
724 done
725 IFS=$func_echo_IFS
726 }
727
728
729 # func_echo_all ARG...
730 # --------------------
731 # Invoke $ECHO with all args, space-separated.
732 func_echo_all ()
733 {
734 $ECHO "$*"
735 }
736
737
738 # func_echo_infix_1 INFIX ARG...
739 # ------------------------------
740 # Echo program name, followed by INFIX on the first line, with any
741 # additional lines not showing INFIX.
742 func_echo_infix_1 ()
743 {
744 $debug_cmd
745
746 $require_term_colors
747
748 _G_infix=$1; shift
749 _G_indent=$_G_infix
750 _G_prefix="$progname: $_G_infix: "
751 _G_message=$*
752
753 # Strip color escape sequences before counting printable length
754 for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan"
755 do
756 test -n "$_G_tc" && {
757 _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"`
758 _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"`
759 }
760 done
761 _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes
762
763 func_echo_infix_1_IFS=$IFS
764 IFS=$nl
765 for _G_line in $_G_message; do
766 IFS=$func_echo_infix_1_IFS
767 $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2
768 _G_prefix=$_G_indent
769 done
770 IFS=$func_echo_infix_1_IFS
771 }
772
773
774 # func_error ARG...
775 # -----------------
776 # Echo program name prefixed message to standard error.
777 func_error ()
778 {
779 $debug_cmd
780
781 $require_term_colors
782
783 func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2
784 }
785
786
787 # func_fatal_error ARG...
788 # -----------------------
789 # Echo program name prefixed message to standard error, and exit.
790 func_fatal_error ()
791 {
792 $debug_cmd
793
794 func_error "$*"
795 exit $EXIT_FAILURE
796 }
797
798
799 # func_grep EXPRESSION FILENAME
800 # -----------------------------
801 # Check whether EXPRESSION matches any line of FILENAME, without output.
802 func_grep ()
803 {
804 $debug_cmd
805
806 $GREP "$1" "$2" >/dev/null 2>&1
807 }
808
809
810 # func_len STRING
811 # ---------------
812 # Set func_len_result to the length of STRING. STRING may not
813 # start with a hyphen.
814 test -z "$_G_HAVE_XSI_OPS" \
815 && (eval 'x=a/b/c;
816 test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
817 && _G_HAVE_XSI_OPS=yes
818
819 if test yes = "$_G_HAVE_XSI_OPS"; then
820 eval 'func_len ()
821 {
822 $debug_cmd
823
824 func_len_result=${#1}
825 }'
826 else
827 func_len ()
828 {
829 $debug_cmd
830
831 func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
832 }
833 fi
834
835
836 # func_mkdir_p DIRECTORY-PATH
837 # ---------------------------
838 # Make sure the entire path to DIRECTORY-PATH is available.
839 func_mkdir_p ()
840 {
841 $debug_cmd
842
843 _G_directory_path=$1
844 _G_dir_list=
845
846 if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then
847
848 # Protect directory names starting with '-'
849 case $_G_directory_path in
850 -*) _G_directory_path=./$_G_directory_path ;;
851 esac
852
853 # While some portion of DIR does not yet exist...
854 while test ! -d "$_G_directory_path"; do
855 # ...make a list in topmost first order. Use a colon delimited
856 # list incase some portion of path contains whitespace.
857 _G_dir_list=$_G_directory_path:$_G_dir_list
858
859 # If the last portion added has no slash in it, the list is done
860 case $_G_directory_path in */*) ;; *) break ;; esac
861
862 # ...otherwise throw away the child directory and loop
863 _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"`
864 done
865 _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'`
866
867 func_mkdir_p_IFS=$IFS; IFS=:
868 for _G_dir in $_G_dir_list; do
869 IFS=$func_mkdir_p_IFS
870 # mkdir can fail with a 'File exist' error if two processes
871 # try to create one of the directories concurrently. Don't
872 # stop in that case!
873 $MKDIR "$_G_dir" 2>/dev/null || :
874 done
875 IFS=$func_mkdir_p_IFS
876
877 # Bail out if we (or some other process) failed to create a directory.
878 test -d "$_G_directory_path" || \
879 func_fatal_error "Failed to create '$1'"
880 fi
881 }
882
883
884 # func_mktempdir [BASENAME]
885 # -------------------------
886 # Make a temporary directory that won't clash with other running
887 # libtool processes, and avoids race conditions if possible. If
888 # given, BASENAME is the basename for that directory.
889 func_mktempdir ()
890 {
891 $debug_cmd
892
893 _G_template=${TMPDIR-/tmp}/${1-$progname}
894
895 if test : = "$opt_dry_run"; then
896 # Return a directory name, but don't create it in dry-run mode
897 _G_tmpdir=$_G_template-$$
898 else
899
900 # If mktemp works, use that first and foremost
901 _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null`
902
903 if test ! -d "$_G_tmpdir"; then
904 # Failing that, at least try and use $RANDOM to avoid a race
905 _G_tmpdir=$_G_template-${RANDOM-0}$$
906
907 func_mktempdir_umask=`umask`
908 umask 0077
909 $MKDIR "$_G_tmpdir"
910 umask $func_mktempdir_umask
911 fi
912
913 # If we're not in dry-run mode, bomb out on failure
914 test -d "$_G_tmpdir" || \
915 func_fatal_error "cannot create temporary directory '$_G_tmpdir'"
916 fi
917
918 $ECHO "$_G_tmpdir"
919 }
920
921
922 # func_normal_abspath PATH
923 # ------------------------
924 # Remove doubled-up and trailing slashes, "." path components,
925 # and cancel out any ".." path components in PATH after making
926 # it an absolute path.
927 func_normal_abspath ()
928 {
929 $debug_cmd
930
931 # These SED scripts presuppose an absolute path with a trailing slash.
932 _G_pathcar='s|^/\([^/]*\).*$|\1|'
933 _G_pathcdr='s|^/[^/]*||'
934 _G_removedotparts=':dotsl
935 s|/\./|/|g
936 t dotsl
937 s|/\.$|/|'
938 _G_collapseslashes='s|/\{1,\}|/|g'
939 _G_finalslash='s|/*$|/|'
940
941 # Start from root dir and reassemble the path.
942 func_normal_abspath_result=
943 func_normal_abspath_tpath=$1
944 func_normal_abspath_altnamespace=
945 case $func_normal_abspath_tpath in
946 "")
947 # Empty path, that just means $cwd.
948 func_stripname '' '/' "`pwd`"
949 func_normal_abspath_result=$func_stripname_result
950 return
951 ;;
952 # The next three entries are used to spot a run of precisely
953 # two leading slashes without using negated character classes;
954 # we take advantage of case's first-match behaviour.
955 ///*)
956 # Unusual form of absolute path, do nothing.
957 ;;
958 //*)
959 # Not necessarily an ordinary path; POSIX reserves leading '//'
960 # and for example Cygwin uses it to access remote file shares
961 # over CIFS/SMB, so we conserve a leading double slash if found.
962 func_normal_abspath_altnamespace=/
963 ;;
964 /*)
965 # Absolute path, do nothing.
966 ;;
967 *)
968 # Relative path, prepend $cwd.
969 func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
970 ;;
971 esac
972
973 # Cancel out all the simple stuff to save iterations. We also want
974 # the path to end with a slash for ease of parsing, so make sure
975 # there is one (and only one) here.
976 func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
977 -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"`
978 while :; do
979 # Processed it all yet?
980 if test / = "$func_normal_abspath_tpath"; then
981 # If we ascended to the root using ".." the result may be empty now.
982 if test -z "$func_normal_abspath_result"; then
983 func_normal_abspath_result=/
984 fi
985 break
986 fi
987 func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
988 -e "$_G_pathcar"`
989 func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
990 -e "$_G_pathcdr"`
991 # Figure out what to do with it
992 case $func_normal_abspath_tcomponent in
993 "")
994 # Trailing empty path component, ignore it.
995 ;;
996 ..)
997 # Parent dir; strip last assembled component from result.
998 func_dirname "$func_normal_abspath_result"
999 func_normal_abspath_result=$func_dirname_result
1000 ;;
1001 *)
1002 # Actual path component, append it.
1003 func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent"
1004 ;;
1005 esac
1006 done
1007 # Restore leading double-slash if one was found on entry.
1008 func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
1009 }
1010
1011
1012 # func_notquiet ARG...
1013 # --------------------
1014 # Echo program name prefixed message only when not in quiet mode.
1015 func_notquiet ()
1016 {
1017 $debug_cmd
1018
1019 $opt_quiet || func_echo ${1+"$@"}
1020
1021 # A bug in bash halts the script if the last line of a function
1022 # fails when set -e is in force, so we need another command to
1023 # work around that:
1024 :
1025 }
1026
1027
1028 # func_relative_path SRCDIR DSTDIR
1029 # --------------------------------
1030 # Set func_relative_path_result to the relative path from SRCDIR to DSTDIR.
1031 func_relative_path ()
1032 {
1033 $debug_cmd
1034
1035 func_relative_path_result=
1036 func_normal_abspath "$1"
1037 func_relative_path_tlibdir=$func_normal_abspath_result
1038 func_normal_abspath "$2"
1039 func_relative_path_tbindir=$func_normal_abspath_result
1040
1041 # Ascend the tree starting from libdir
1042 while :; do
1043 # check if we have found a prefix of bindir
1044 case $func_relative_path_tbindir in
1045 $func_relative_path_tlibdir)
1046 # found an exact match
1047 func_relative_path_tcancelled=
1048 break
1049 ;;
1050 $func_relative_path_tlibdir*)
1051 # found a matching prefix
1052 func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
1053 func_relative_path_tcancelled=$func_stripname_result
1054 if test -z "$func_relative_path_result"; then
1055 func_relative_path_result=.
1056 fi
1057 break
1058 ;;
1059 *)
1060 func_dirname $func_relative_path_tlibdir
1061 func_relative_path_tlibdir=$func_dirname_result
1062 if test -z "$func_relative_path_tlibdir"; then
1063 # Have to descend all the way to the root!
1064 func_relative_path_result=../$func_relative_path_result
1065 func_relative_path_tcancelled=$func_relative_path_tbindir
1066 break
1067 fi
1068 func_relative_path_result=../$func_relative_path_result
1069 ;;
1070 esac
1071 done
1072
1073 # Now calculate path; take care to avoid doubling-up slashes.
1074 func_stripname '' '/' "$func_relative_path_result"
1075 func_relative_path_result=$func_stripname_result
1076 func_stripname '/' '/' "$func_relative_path_tcancelled"
1077 if test -n "$func_stripname_result"; then
1078 func_append func_relative_path_result "/$func_stripname_result"
1079 fi
1080
1081 # Normalisation. If bindir is libdir, return '.' else relative path.
1082 if test -n "$func_relative_path_result"; then
1083 func_stripname './' '' "$func_relative_path_result"
1084 func_relative_path_result=$func_stripname_result
1085 fi
1086
1087 test -n "$func_relative_path_result" || func_relative_path_result=.
1088
1089 :
1090 }
1091
1092
1093 # func_quote_for_eval ARG...
1094 # --------------------------
1095 # Aesthetically quote ARGs to be evaled later.
1096 # This function returns two values:
1097 # i) func_quote_for_eval_result
1098 # double-quoted, suitable for a subsequent eval
1099 # ii) func_quote_for_eval_unquoted_result
1100 # has all characters that are still active within double
1101 # quotes backslashified.
1102 func_quote_for_eval ()
1103 {
1104 $debug_cmd
1105
1106 func_quote_for_eval_unquoted_result=
1107 func_quote_for_eval_result=
1108 while test 0 -lt $#; do
1109 case $1 in
1110 *[\\\`\"\$]*)
1111 _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;;
1112 *)
1113 _G_unquoted_arg=$1 ;;
1114 esac
1115 if test -n "$func_quote_for_eval_unquoted_result"; then
1116 func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg"
1117 else
1118 func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg"
1119 fi
1120
1121 case $_G_unquoted_arg in
1122 # Double-quote args containing shell metacharacters to delay
1123 # word splitting, command substitution and variable expansion
1124 # for a subsequent eval.
1125 # Many Bourne shells cannot handle close brackets correctly
1126 # in scan sets, so we specify it separately.
1127 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1128 _G_quoted_arg=\"$_G_unquoted_arg\"
1129 ;;
1130 *)
1131 _G_quoted_arg=$_G_unquoted_arg
1132 ;;
1133 esac
1134
1135 if test -n "$func_quote_for_eval_result"; then
1136 func_append func_quote_for_eval_result " $_G_quoted_arg"
1137 else
1138 func_append func_quote_for_eval_result "$_G_quoted_arg"
1139 fi
1140 shift
1141 done
1142 }
1143
1144
1145 # func_quote_for_expand ARG
1146 # -------------------------
1147 # Aesthetically quote ARG to be evaled later; same as above,
1148 # but do not quote variable references.
1149 func_quote_for_expand ()
1150 {
1151 $debug_cmd
1152
1153 case $1 in
1154 *[\\\`\"]*)
1155 _G_arg=`$ECHO "$1" | $SED \
1156 -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;;
1157 *)
1158 _G_arg=$1 ;;
1159 esac
1160
1161 case $_G_arg in
1162 # Double-quote args containing shell metacharacters to delay
1163 # word splitting and command substitution for a subsequent eval.
1164 # Many Bourne shells cannot handle close brackets correctly
1165 # in scan sets, so we specify it separately.
1166 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1167 _G_arg=\"$_G_arg\"
1168 ;;
1169 esac
1170
1171 func_quote_for_expand_result=$_G_arg
1172 }
1173
1174
1175 # func_stripname PREFIX SUFFIX NAME
1176 # ---------------------------------
1177 # strip PREFIX and SUFFIX from NAME, and store in func_stripname_result.
1178 # PREFIX and SUFFIX must not contain globbing or regex special
1179 # characters, hashes, percent signs, but SUFFIX may contain a leading
1180 # dot (in which case that matches only a dot).
1181 if test yes = "$_G_HAVE_XSI_OPS"; then
1182 eval 'func_stripname ()
1183 {
1184 $debug_cmd
1185
1186 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
1187 # positional parameters, so assign one to ordinary variable first.
1188 func_stripname_result=$3
1189 func_stripname_result=${func_stripname_result#"$1"}
1190 func_stripname_result=${func_stripname_result%"$2"}
1191 }'
1192 else
1193 func_stripname ()
1194 {
1195 $debug_cmd
1196
1197 case $2 in
1198 .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;;
1199 *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;;
1200 esac
1201 }
1202 fi
1203
1204
1205 # func_show_eval CMD [FAIL_EXP]
1206 # -----------------------------
1207 # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is
1208 # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
1209 # is given, then evaluate it.
1210 func_show_eval ()
1211 {
1212 $debug_cmd
1213
1214 _G_cmd=$1
1215 _G_fail_exp=${2-':'}
1216
1217 func_quote_for_expand "$_G_cmd"
1218 eval "func_notquiet $func_quote_for_expand_result"
1219
1220 $opt_dry_run || {
1221 eval "$_G_cmd"
1222 _G_status=$?
1223 if test 0 -ne "$_G_status"; then
1224 eval "(exit $_G_status); $_G_fail_exp"
1225 fi
1226 }
1227 }
1228
1229
1230 # func_show_eval_locale CMD [FAIL_EXP]
1231 # ------------------------------------
1232 # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is
1233 # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
1234 # is given, then evaluate it. Use the saved locale for evaluation.
1235 func_show_eval_locale ()
1236 {
1237 $debug_cmd
1238
1239 _G_cmd=$1
1240 _G_fail_exp=${2-':'}
1241
1242 $opt_quiet || {
1243 func_quote_for_expand "$_G_cmd"
1244 eval "func_echo $func_quote_for_expand_result"
1245 }
1246
1247 $opt_dry_run || {
1248 eval "$_G_user_locale
1249 $_G_cmd"
1250 _G_status=$?
1251 eval "$_G_safe_locale"
1252 if test 0 -ne "$_G_status"; then
1253 eval "(exit $_G_status); $_G_fail_exp"
1254 fi
1255 }
1256 }
1257
1258
1259 # func_tr_sh
1260 # ----------
1261 # Turn $1 into a string suitable for a shell variable name.
1262 # Result is stored in $func_tr_sh_result. All characters
1263 # not in the set a-zA-Z0-9_ are replaced with '_'. Further,
1264 # if $1 begins with a digit, a '_' is prepended as well.
1265 func_tr_sh ()
1266 {
1267 $debug_cmd
1268
1269 case $1 in
1270 [0-9]* | *[!a-zA-Z0-9_]*)
1271 func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'`
1272 ;;
1273 * )
1274 func_tr_sh_result=$1
1275 ;;
1276 esac
1277 }
1278
1279
1280 # func_verbose ARG...
1281 # -------------------
1282 # Echo program name prefixed message in verbose mode only.
1283 func_verbose ()
1284 {
1285 $debug_cmd
1286
1287 $opt_verbose && func_echo "$*"
1288
1289 :
1290 }
1291
1292
1293 # func_warn_and_continue ARG...
1294 # -----------------------------
1295 # Echo program name prefixed warning message to standard error.
1296 func_warn_and_continue ()
1297 {
1298 $debug_cmd
1299
1300 $require_term_colors
1301
1302 func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2
1303 }
1304
1305
1306 # func_warning CATEGORY ARG...
1307 # ----------------------------
1308 # Echo program name prefixed warning message to standard error. Warning
1309 # messages can be filtered according to CATEGORY, where this function
1310 # elides messages where CATEGORY is not listed in the global variable
1311 # 'opt_warning_types'.
1312 func_warning ()
1313 {
1314 $debug_cmd
1315
1316 # CATEGORY must be in the warning_categories list!
1317 case " $warning_categories " in
1318 *" $1 "*) ;;
1319 *) func_internal_error "invalid warning category '$1'" ;;
1320 esac
1321
1322 _G_category=$1
1323 shift
1324
1325 case " $opt_warning_types " in
1326 *" $_G_category "*) $warning_func ${1+"$@"} ;;
1327 esac
1328 }
1329
1330
1331 # func_sort_ver VER1 VER2
1332 # -----------------------
1333 # 'sort -V' is not generally available.
1334 # Note this deviates from the version comparison in automake
1335 # in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a
1336 # but this should suffice as we won't be specifying old
1337 # version formats or redundant trailing .0 in bootstrap.conf.
1338 # If we did want full compatibility then we should probably
1339 # use m4_version_compare from autoconf.
1340 func_sort_ver ()
1341 {
1342 $debug_cmd
1343
1344 printf '%s\n%s\n' "$1" "$2" \
1345 | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n
1346 }
1347
1348 # func_lt_ver PREV CURR
1349 # ---------------------
1350 # Return true if PREV and CURR are in the correct order according to
1351 # func_sort_ver, otherwise false. Use it like this:
1352 #
1353 # func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..."
1354 func_lt_ver ()
1355 {
1356 $debug_cmd
1357
1358 test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q`
1359 }
1360
1361
1362 # Local variables:
1363 # mode: shell-script
1364 # sh-indentation: 2
1365 # eval: (add-hook 'before-save-hook 'time-stamp)
1366 # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
1367 # time-stamp-time-zone: "UTC"
1368 # End:
1369 #! /bin/sh
1370
1371 # Set a version string for this script.
1372 scriptversion=2015-10-07.11; # UTC
1373
1374 # A portable, pluggable option parser for Bourne shell.
1375 # Written by Gary V. Vaughan, 2010
1376
1377 # Copyright (C) 2010-2015 Free Software Foundation, Inc.
1378 # This is free software; see the source for copying conditions. There is NO
1379 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1380
1381 # This program is free software: you can redistribute it and/or modify
1382 # it under the terms of the GNU General Public License as published by
1383 # the Free Software Foundation, either version 3 of the License, or
1384 # (at your option) any later version.
1385
1386 # This program is distributed in the hope that it will be useful,
1387 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1388 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1389 # GNU General Public License for more details.
1390
1391 # You should have received a copy of the GNU General Public License
1392 # along with this program. If not, see <http://www.gnu.org/licenses/>.
1393
1394 # Please report bugs or propose patches to gary@gnu.org.
1395
1396
1397 ## ------ ##
1398 ## Usage. ##
1399 ## ------ ##
1400
1401 # This file is a library for parsing options in your shell scripts along
1402 # with assorted other useful supporting features that you can make use
1403 # of too.
1404 #
1405 # For the simplest scripts you might need only:
1406 #
1407 # #!/bin/sh
1408 # . relative/path/to/funclib.sh
1409 # . relative/path/to/options-parser
1410 # scriptversion=1.0
1411 # func_options ${1+"$@"}
1412 # eval set dummy "$func_options_result"; shift
1413 # ...rest of your script...
1414 #
1415 # In order for the '--version' option to work, you will need to have a
1416 # suitably formatted comment like the one at the top of this file
1417 # starting with '# Written by ' and ending with '# warranty; '.
1418 #
1419 # For '-h' and '--help' to work, you will also need a one line
1420 # description of your script's purpose in a comment directly above the
1421 # '# Written by ' line, like the one at the top of this file.
1422 #
1423 # The default options also support '--debug', which will turn on shell
1424 # execution tracing (see the comment above debug_cmd below for another
1425 # use), and '--verbose' and the func_verbose function to allow your script
1426 # to display verbose messages only when your user has specified
1427 # '--verbose'.
1428 #
1429 # After sourcing this file, you can plug processing for additional
1430 # options by amending the variables from the 'Configuration' section
1431 # below, and following the instructions in the 'Option parsing'
1432 # section further down.
1433
1434 ## -------------- ##
1435 ## Configuration. ##
1436 ## -------------- ##
1437
1438 # You should override these variables in your script after sourcing this
1439 # file so that they reflect the customisations you have added to the
1440 # option parser.
1441
1442 # The usage line for option parsing errors and the start of '-h' and
1443 # '--help' output messages. You can embed shell variables for delayed
1444 # expansion at the time the message is displayed, but you will need to
1445 # quote other shell meta-characters carefully to prevent them being
1446 # expanded when the contents are evaled.
1447 usage='$progpath [OPTION]...'
1448
1449 # Short help message in response to '-h' and '--help'. Add to this or
1450 # override it after sourcing this library to reflect the full set of
1451 # options your script accepts.
1452 usage_message="\
1453 --debug enable verbose shell tracing
1454 -W, --warnings=CATEGORY
1455 report the warnings falling in CATEGORY [all]
1456 -v, --verbose verbosely report processing
1457 --version print version information and exit
1458 -h, --help print short or long help message and exit
1459 "
1460
1461 # Additional text appended to 'usage_message' in response to '--help'.
1462 long_help_message="
1463 Warning categories include:
1464 'all' show all warnings
1465 'none' turn off all the warnings
1466 'error' warnings are treated as fatal errors"
1467
1468 # Help message printed before fatal option parsing errors.
1469 fatal_help="Try '\$progname --help' for more information."
1470
1471
1472
1473 ## ------------------------- ##
1474 ## Hook function management. ##
1475 ## ------------------------- ##
1476
1477 # This section contains functions for adding, removing, and running hooks
1478 # to the main code. A hook is just a named list of of function, that can
1479 # be run in order later on.
1480
1481 # func_hookable FUNC_NAME
1482 # -----------------------
1483 # Declare that FUNC_NAME will run hooks added with
1484 # 'func_add_hook FUNC_NAME ...'.
1485 func_hookable ()
1486 {
1487 $debug_cmd
1488
1489 func_append hookable_fns " $1"
1490 }
1491
1492
1493 # func_add_hook FUNC_NAME HOOK_FUNC
1494 # ---------------------------------
1495 # Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must
1496 # first have been declared "hookable" by a call to 'func_hookable'.
1497 func_add_hook ()
1498 {
1499 $debug_cmd
1500
1501 case " $hookable_fns " in
1502 *" $1 "*) ;;
1503 *) func_fatal_error "'$1' does not accept hook functions." ;;
1504 esac
1505
1506 eval func_append ${1}_hooks '" $2"'
1507 }
1508
1509
1510 # func_remove_hook FUNC_NAME HOOK_FUNC
1511 # ------------------------------------
1512 # Remove HOOK_FUNC from the list of functions called by FUNC_NAME.
1513 func_remove_hook ()
1514 {
1515 $debug_cmd
1516
1517 eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`'
1518 }
1519
1520
1521 # func_run_hooks FUNC_NAME [ARG]...
1522 # ---------------------------------
1523 # Run all hook functions registered to FUNC_NAME.
1524 # It is assumed that the list of hook functions contains nothing more
1525 # than a whitespace-delimited list of legal shell function names, and
1526 # no effort is wasted trying to catch shell meta-characters or preserve
1527 # whitespace.
1528 func_run_hooks ()
1529 {
1530 $debug_cmd
1531
1532 _G_rc_run_hooks=false
1533
1534 case " $hookable_fns " in
1535 *" $1 "*) ;;
1536 *) func_fatal_error "'$1' does not support hook funcions.n" ;;
1537 esac
1538
1539 eval _G_hook_fns=\$$1_hooks; shift
1540
1541 for _G_hook in $_G_hook_fns; do
1542 if eval $_G_hook '"$@"'; then
1543 # store returned options list back into positional
1544 # parameters for next 'cmd' execution.
1545 eval _G_hook_result=\$${_G_hook}_result
1546 eval set dummy "$_G_hook_result"; shift
1547 _G_rc_run_hooks=:
1548 fi
1549 done
1550
1551 $_G_rc_run_hooks && func_run_hooks_result=$_G_hook_result
1552 }
1553
1554
1555
1556 ## --------------- ##
1557 ## Option parsing. ##
1558 ## --------------- ##
1559
1560 # In order to add your own option parsing hooks, you must accept the
1561 # full positional parameter list in your hook function, you may remove/edit
1562 # any options that you action, and then pass back the remaining unprocessed
1563 # options in '<hooked_function_name>_result', escaped suitably for
1564 # 'eval'. In this case you also must return $EXIT_SUCCESS to let the
1565 # hook's caller know that it should pay attention to
1566 # '<hooked_function_name>_result'. Returning $EXIT_FAILURE signalizes that
1567 # arguments are left untouched by the hook and therefore caller will ignore the
1568 # result variable.
1569 #
1570 # Like this:
1571 #
1572 # my_options_prep ()
1573 # {
1574 # $debug_cmd
1575 #
1576 # # Extend the existing usage message.
1577 # usage_message=$usage_message'
1578 # -s, --silent don'\''t print informational messages
1579 # '
1580 # # No change in '$@' (ignored completely by this hook). There is
1581 # # no need to do the equivalent (but slower) action:
1582 # # func_quote_for_eval ${1+"$@"}
1583 # # my_options_prep_result=$func_quote_for_eval_result
1584 # false
1585 # }
1586 # func_add_hook func_options_prep my_options_prep
1587 #
1588 #
1589 # my_silent_option ()
1590 # {
1591 # $debug_cmd
1592 #
1593 # args_changed=false
1594 #
1595 # # Note that for efficiency, we parse as many options as we can
1596 # # recognise in a loop before passing the remainder back to the
1597 # # caller on the first unrecognised argument we encounter.
1598 # while test $# -gt 0; do
1599 # opt=$1; shift
1600 # case $opt in
1601 # --silent|-s) opt_silent=:
1602 # args_changed=:
1603 # ;;
1604 # # Separate non-argument short options:
1605 # -s*) func_split_short_opt "$_G_opt"
1606 # set dummy "$func_split_short_opt_name" \
1607 # "-$func_split_short_opt_arg" ${1+"$@"}
1608 # shift
1609 # args_changed=:
1610 # ;;
1611 # *) # Make sure the first unrecognised option "$_G_opt"
1612 # # is added back to "$@", we could need that later
1613 # # if $args_changed is true.
1614 # set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
1615 # esac
1616 # done
1617 #
1618 # if $args_changed; then
1619 # func_quote_for_eval ${1+"$@"}
1620 # my_silent_option_result=$func_quote_for_eval_result
1621 # fi
1622 #
1623 # $args_changed
1624 # }
1625 # func_add_hook func_parse_options my_silent_option
1626 #
1627 #
1628 # my_option_validation ()
1629 # {
1630 # $debug_cmd
1631 #
1632 # $opt_silent && $opt_verbose && func_fatal_help "\
1633 # '--silent' and '--verbose' options are mutually exclusive."
1634 #
1635 # false
1636 # }
1637 # func_add_hook func_validate_options my_option_validation
1638 #
1639 # You'll also need to manually amend $usage_message to reflect the extra
1640 # options you parse. It's preferable to append if you can, so that
1641 # multiple option parsing hooks can be added safely.
1642
1643
1644 # func_options_finish [ARG]...
1645 # ----------------------------
1646 # Finishing the option parse loop (call 'func_options' hooks ATM).
1647 func_options_finish ()
1648 {
1649 $debug_cmd
1650
1651 _G_func_options_finish_exit=false
1652 if func_run_hooks func_options ${1+"$@"}; then
1653 func_options_finish_result=$func_run_hooks_result
1654 _G_func_options_finish_exit=:
1655 fi
1656
1657 $_G_func_options_finish_exit
1658 }
1659
1660
1661 # func_options [ARG]...
1662 # ---------------------
1663 # All the functions called inside func_options are hookable. See the
1664 # individual implementations for details.
1665 func_hookable func_options
1666 func_options ()
1667 {
1668 $debug_cmd
1669
1670 _G_rc_options=false
1671
1672 for my_func in options_prep parse_options validate_options options_finish
1673 do
1674 if eval func_$my_func '${1+"$@"}'; then
1675 eval _G_res_var='$'"func_${my_func}_result"
1676 eval set dummy "$_G_res_var" ; shift
1677 _G_rc_options=:
1678 fi
1679 done
1680
1681 # Save modified positional parameters for caller. As a top-level
1682 # options-parser function we always need to set the 'func_options_result'
1683 # variable (regardless the $_G_rc_options value).
1684 if $_G_rc_options; then
1685 func_options_result=$_G_res_var
1686 else
1687 func_quote_for_eval ${1+"$@"}
1688 func_options_result=$func_quote_for_eval_result
1689 fi
1690
1691 $_G_rc_options
1692 }
1693
1694
1695 # func_options_prep [ARG]...
1696 # --------------------------
1697 # All initialisations required before starting the option parse loop.
1698 # Note that when calling hook functions, we pass through the list of
1699 # positional parameters. If a hook function modifies that list, and
1700 # needs to propagate that back to rest of this script, then the complete
1701 # modified list must be put in 'func_run_hooks_result' before
1702 # returning $EXIT_SUCCESS (otherwise $EXIT_FAILURE is returned).
1703 func_hookable func_options_prep
1704 func_options_prep ()
1705 {
1706 $debug_cmd
1707
1708 # Option defaults:
1709 opt_verbose=false
1710 opt_warning_types=
1711
1712 _G_rc_options_prep=false
1713 if func_run_hooks func_options_prep ${1+"$@"}; then
1714 _G_rc_options_prep=:
1715 # save modified positional parameters for caller
1716 func_options_prep_result=$func_run_hooks_result
1717 fi
1718
1719 $_G_rc_options_prep
1720 }
1721
1722
1723 # func_parse_options [ARG]...
1724 # ---------------------------
1725 # The main option parsing loop.
1726 func_hookable func_parse_options
1727 func_parse_options ()
1728 {
1729 $debug_cmd
1730
1731 func_parse_options_result=
1732
1733 _G_rc_parse_options=false
1734 # this just eases exit handling
1735 while test $# -gt 0; do
1736 # Defer to hook functions for initial option parsing, so they
1737 # get priority in the event of reusing an option name.
1738 if func_run_hooks func_parse_options ${1+"$@"}; then
1739 eval set dummy "$func_run_hooks_result"; shift
1740 _G_rc_parse_options=:
1741 fi
1742
1743 # Break out of the loop if we already parsed every option.
1744 test $# -gt 0 || break
1745
1746 _G_match_parse_options=:
1747 _G_opt=$1
1748 shift
1749 case $_G_opt in
1750 --debug|-x) debug_cmd='set -x'
1751 func_echo "enabling shell trace mode"
1752 $debug_cmd
1753 ;;
1754
1755 --no-warnings|--no-warning|--no-warn)
1756 set dummy --warnings none ${1+"$@"}
1757 shift
1758 ;;
1759
1760 --warnings|--warning|-W)
1761 if test $# = 0 && func_missing_arg $_G_opt; then
1762 _G_rc_parse_options=:
1763 break
1764 fi
1765 case " $warning_categories $1" in
1766 *" $1 "*)
1767 # trailing space prevents matching last $1 above
1768 func_append_uniq opt_warning_types " $1"
1769 ;;
1770 *all)
1771 opt_warning_types=$warning_categories
1772 ;;
1773 *none)
1774 opt_warning_types=none
1775 warning_func=:
1776 ;;
1777 *error)
1778 opt_warning_types=$warning_categories
1779 warning_func=func_fatal_error
1780 ;;
1781 *)
1782 func_fatal_error \
1783 "unsupported warning category: '$1'"
1784 ;;
1785 esac
1786 shift
1787 ;;
1788
1789 --verbose|-v) opt_verbose=: ;;
1790 --version) func_version ;;
1791 -\?|-h) func_usage ;;
1792 --help) func_help ;;
1793
1794 # Separate optargs to long options (plugins may need this):
1795 --*=*) func_split_equals "$_G_opt"
1796 set dummy "$func_split_equals_lhs" \
1797 "$func_split_equals_rhs" ${1+"$@"}
1798 shift
1799 ;;
1800
1801 # Separate optargs to short options:
1802 -W*)
1803 func_split_short_opt "$_G_opt"
1804 set dummy "$func_split_short_opt_name" \
1805 "$func_split_short_opt_arg" ${1+"$@"}
1806 shift
1807 ;;
1808
1809 # Separate non-argument short options:
1810 -\?*|-h*|-v*|-x*)
1811 func_split_short_opt "$_G_opt"
1812 set dummy "$func_split_short_opt_name" \
1813 "-$func_split_short_opt_arg" ${1+"$@"}
1814 shift
1815 ;;
1816
1817 --) _G_rc_parse_options=: ; break ;;
1818 -*) func_fatal_help "unrecognised option: '$_G_opt'" ;;
1819 *) set dummy "$_G_opt" ${1+"$@"}; shift
1820 _G_match_parse_options=false
1821 break
1822 ;;
1823 esac
1824
1825 $_G_match_parse_options && _G_rc_parse_options=:
1826 done
1827
1828
1829 if $_G_rc_parse_options; then
1830 # save modified positional parameters for caller
1831 func_quote_for_eval ${1+"$@"}
1832 func_parse_options_result=$func_quote_for_eval_result
1833 fi
1834
1835 $_G_rc_parse_options
1836 }
1837
1838
1839 # func_validate_options [ARG]...
1840 # ------------------------------
1841 # Perform any sanity checks on option settings and/or unconsumed
1842 # arguments.
1843 func_hookable func_validate_options
1844 func_validate_options ()
1845 {
1846 $debug_cmd
1847
1848 _G_rc_validate_options=false
1849
1850 # Display all warnings if -W was not given.
1851 test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
1852
1853 if func_run_hooks func_validate_options ${1+"$@"}; then
1854 # save modified positional parameters for caller
1855 func_validate_options_result=$func_run_hooks_result
1856 _G_rc_validate_options=:
1857 fi
1858
1859 # Bail if the options were screwed!
1860 $exit_cmd $EXIT_FAILURE
1861
1862 $_G_rc_validate_options
1863 }
1864
1865
1866
1867 ## ----------------- ##
1868 ## Helper functions. ##
1869 ## ----------------- ##
1870
1871 # This section contains the helper functions used by the rest of the
1872 # hookable option parser framework in ascii-betical order.
1873
1874
1875 # func_fatal_help ARG...
1876 # ----------------------
1877 # Echo program name prefixed message to standard error, followed by
1878 # a help hint, and exit.
1879 func_fatal_help ()
1880 {
1881 $debug_cmd
1882
1883 eval \$ECHO \""Usage: $usage"\"
1884 eval \$ECHO \""$fatal_help"\"
1885 func_error ${1+"$@"}
1886 exit $EXIT_FAILURE
1887 }
1888
1889
1890 # func_help
1891 # ---------
1892 # Echo long help message to standard output and exit.
1893 func_help ()
1894 {
1895 $debug_cmd
1896
1897 func_usage_message
1898 $ECHO "$long_help_message"
1899 exit 0
1900 }
1901
1902
1903 # func_missing_arg ARGNAME
1904 # ------------------------
1905 # Echo program name prefixed message to standard error and set global
1906 # exit_cmd.
1907 func_missing_arg ()
1908 {
1909 $debug_cmd
1910
1911 func_error "Missing argument for '$1'."
1912 exit_cmd=exit
1913 }
1914
1915
1916 # func_split_equals STRING
1917 # ------------------------
1918 # Set func_split_equals_lhs and func_split_equals_rhs shell variables after
1919 # splitting STRING at the '=' sign.
1920 test -z "$_G_HAVE_XSI_OPS" \
1921 && (eval 'x=a/b/c;
1922 test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
1923 && _G_HAVE_XSI_OPS=yes
1924
1925 if test yes = "$_G_HAVE_XSI_OPS"
1926 then
1927 # This is an XSI compatible shell, allowing a faster implementation...
1928 eval 'func_split_equals ()
1929 {
1930 $debug_cmd
1931
1932 func_split_equals_lhs=${1%%=*}
1933 func_split_equals_rhs=${1#*=}
1934 test "x$func_split_equals_lhs" = "x$1" \
1935 && func_split_equals_rhs=
1936 }'
1937 else
1938 # ...otherwise fall back to using expr, which is often a shell builtin.
1939 func_split_equals ()
1940 {
1941 $debug_cmd
1942
1943 func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'`
1944 func_split_equals_rhs=
1945 test "x$func_split_equals_lhs" = "x$1" \
1946 || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'`
1947 }
1948 fi #func_split_equals
1949
1950
1951 # func_split_short_opt SHORTOPT
1952 # -----------------------------
1953 # Set func_split_short_opt_name and func_split_short_opt_arg shell
1954 # variables after splitting SHORTOPT after the 2nd character.
1955 if test yes = "$_G_HAVE_XSI_OPS"
1956 then
1957 # This is an XSI compatible shell, allowing a faster implementation...
1958 eval 'func_split_short_opt ()
1959 {
1960 $debug_cmd
1961
1962 func_split_short_opt_arg=${1#??}
1963 func_split_short_opt_name=${1%"$func_split_short_opt_arg"}
1964 }'
1965 else
1966 # ...otherwise fall back to using expr, which is often a shell builtin.
1967 func_split_short_opt ()
1968 {
1969 $debug_cmd
1970
1971 func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'`
1972 func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'`
1973 }
1974 fi #func_split_short_opt
1975
1976
1977 # func_usage
1978 # ----------
1979 # Echo short help message to standard output and exit.
1980 func_usage ()
1981 {
1982 $debug_cmd
1983
1984 func_usage_message
1985 $ECHO "Run '$progname --help |${PAGER-more}' for full usage"
1986 exit 0
1987 }
1988
1989
1990 # func_usage_message
1991 # ------------------
1992 # Echo short help message to standard output.
1993 func_usage_message ()
1994 {
1995 $debug_cmd
1996
1997 eval \$ECHO \""Usage: $usage"\"
1998 echo
1999 $SED -n 's|^# ||
2000 /^Written by/{
2001 x;p;x
2002 }
2003 h
2004 /^Written by/q' < "$progpath"
2005 echo
2006 eval \$ECHO \""$usage_message"\"
2007 }
2008
2009
2010 # func_version
2011 # ------------
2012 # Echo version message to standard output and exit.
2013 func_version ()
2014 {
2015 $debug_cmd
2016
2017 printf '%s\n' "$progname $scriptversion"
2018 $SED -n '
2019 /(C)/!b go
2020 :more
2021 /\./!{
2022 N
2023 s|\n# | |
2024 b more
2025 }
2026 :go
2027 /^# Written by /,/# warranty; / {
2028 s|^# ||
2029 s|^# *$||
2030 s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2|
2031 p
2032 }
2033 /^# Written by / {
2034 s|^# ||
2035 p
2036 }
2037 /^warranty; /q' < "$progpath"
2038
2039 exit $?
2040 }
2041
2042
2043 # Local variables:
2044 # mode: shell-script
2045 # sh-indentation: 2
2046 # eval: (add-hook 'before-save-hook 'time-stamp)
2047 # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
2048 # time-stamp-time-zone: "UTC"
2049 # End:
2050
2051 # Set a version string.
2052 scriptversion='(GNU libtool) 2.4.6'
2053
2054
2055 # func_echo ARG...
2056 # ----------------
2057 # Libtool also displays the current mode in messages, so override
2058 # funclib.sh func_echo with this custom definition.
2059 func_echo ()
2060 {
2061 $debug_cmd
2062
2063 _G_message=$*
2064
2065 func_echo_IFS=$IFS
2066 IFS=$nl
2067 for _G_line in $_G_message; do
2068 IFS=$func_echo_IFS
2069 $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line"
2070 done
2071 IFS=$func_echo_IFS
2072 }
2073
2074
2075 # func_warning ARG...
2076 # -------------------
2077 # Libtool warnings are not categorized, so override funclib.sh
2078 # func_warning with this simpler definition.
2079 func_warning ()
2080 {
2081 $debug_cmd
2082
2083 $warning_func ${1+"$@"}
2084 }
2085
2086
2087 ## ---------------- ##
2088 ## Options parsing. ##
2089 ## ---------------- ##
2090
2091 # Hook in the functions to make sure our own options are parsed during
2092 # the option parsing loop.
2093
2094 usage='$progpath [OPTION]... [MODE-ARG]...'
2095
2096 # Short help message in response to '-h'.
2097 usage_message="Options:
2098 --config show all configuration variables
2099 --debug enable verbose shell tracing
2100 -n, --dry-run display commands without modifying any files
2101 --features display basic configuration information and exit
2102 --mode=MODE use operation mode MODE
2103 --no-warnings equivalent to '-Wnone'
2104 --preserve-dup-deps don't remove duplicate dependency libraries
2105 --quiet, --silent don't print informational messages
2106 --tag=TAG use configuration variables from tag TAG
2107 -v, --verbose print more informational messages than default
2108 --version print version information
2109 -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all]
2110 -h, --help, --help-all print short, long, or detailed help message
2111 "
2112
2113 # Additional text appended to 'usage_message' in response to '--help'.
2114 func_help ()
2115 {
2116 $debug_cmd
2117
2118 func_usage_message
2119 $ECHO "$long_help_message
2120
2121 MODE must be one of the following:
2122
2123 clean remove files from the build directory
2124 compile compile a source file into a libtool object
2125 execute automatically set library path, then run a program
2126 finish complete the installation of libtool libraries
2127 install install libraries or executables
2128 link create a library or an executable
2129 uninstall remove libraries from an installed directory
2130
2131 MODE-ARGS vary depending on the MODE. When passed as first option,
2132 '--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that.
2133 Try '$progname --help --mode=MODE' for a more detailed description of MODE.
2134
2135 When reporting a bug, please describe a test case to reproduce it and
2136 include the following information:
2137
2138 host-triplet: $host
2139 shell: $SHELL
2140 compiler: $LTCC
2141 compiler flags: $LTCFLAGS
2142 linker: $LD (gnu? $with_gnu_ld)
2143 version: $progname $scriptversion Debian-2.4.6-15
2144 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
2145 autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`
2146
2147 Report bugs to <bug-libtool@gnu.org>.
2148 GNU libtool home page: <http://www.gnu.org/s/libtool/>.
2149 General help using GNU software: <http://www.gnu.org/gethelp/>."
2150 exit 0
2151 }
2152
2153
2154 # func_lo2o OBJECT-NAME
2155 # ---------------------
2156 # Transform OBJECT-NAME from a '.lo' suffix to the platform specific
2157 # object suffix.
2158
2159 lo2o=s/\\.lo\$/.$objext/
2160 o2lo=s/\\.$objext\$/.lo/
2161
2162 if test yes = "$_G_HAVE_XSI_OPS"; then
2163 eval 'func_lo2o ()
2164 {
2165 case $1 in
2166 *.lo) func_lo2o_result=${1%.lo}.$objext ;;
2167 * ) func_lo2o_result=$1 ;;
2168 esac
2169 }'
2170
2171 # func_xform LIBOBJ-OR-SOURCE
2172 # ---------------------------
2173 # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise)
2174 # suffix to a '.lo' libtool-object suffix.
2175 eval 'func_xform ()
2176 {
2177 func_xform_result=${1%.*}.lo
2178 }'
2179 else
2180 # ...otherwise fall back to using sed.
2181 func_lo2o ()
2182 {
2183 func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"`
2184 }
2185
2186 func_xform ()
2187 {
2188 func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'`
2189 }
2190 fi
2191
2192
2193 # func_fatal_configuration ARG...
2194 # -------------------------------
2195 # Echo program name prefixed message to standard error, followed by
2196 # a configuration failure hint, and exit.
2197 func_fatal_configuration ()
2198 {
2199 func__fatal_error ${1+"$@"} \
2200 "See the $PACKAGE documentation for more information." \
2201 "Fatal configuration error."
2202 }
2203
2204
2205 # func_config
2206 # -----------
2207 # Display the configuration for all the tags in this script.
2208 func_config ()
2209 {
2210 re_begincf='^# ### BEGIN LIBTOOL'
2211 re_endcf='^# ### END LIBTOOL'
2212
2213 # Default configuration.
2214 $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
2215
2216 # Now print the configurations for the tags.
2217 for tagname in $taglist; do
2218 $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
2219 done
2220
2221 exit $?
2222 }
2223
2224
2225 # func_features
2226 # -------------
2227 # Display the features supported by this script.
2228 func_features ()
2229 {
2230 echo "host: $host"
2231 if test yes = "$build_libtool_libs"; then
2232 echo "enable shared libraries"
2233 else
2234 echo "disable shared libraries"
2235 fi
2236 if test yes = "$build_old_libs"; then
2237 echo "enable static libraries"
2238 else
2239 echo "disable static libraries"
2240 fi
2241
2242 exit $?
2243 }
2244
2245
2246 # func_enable_tag TAGNAME
2247 # -----------------------
2248 # Verify that TAGNAME is valid, and either flag an error and exit, or
2249 # enable the TAGNAME tag. We also add TAGNAME to the global $taglist
2250 # variable here.
2251 func_enable_tag ()
2252 {
2253 # Global variable:
2254 tagname=$1
2255
2256 re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
2257 re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
2258 sed_extractcf=/$re_begincf/,/$re_endcf/p
2259
2260 # Validate tagname.
2261 case $tagname in
2262 *[!-_A-Za-z0-9,/]*)
2263 func_fatal_error "invalid tag name: $tagname"
2264 ;;
2265 esac
2266
2267 # Don't test for the "default" C tag, as we know it's
2268 # there but not specially marked.
2269 case $tagname in
2270 CC) ;;
2271 *)
2272 if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
2273 taglist="$taglist $tagname"
2274
2275 # Evaluate the configuration. Be careful to quote the path
2276 # and the sed script, to avoid splitting on whitespace, but
2277 # also don't use non-portable quotes within backquotes within
2278 # quotes we have to do it in 2 steps:
2279 extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
2280 eval "$extractedcf"
2281 else
2282 func_error "ignoring unknown tag $tagname"
2283 fi
2284 ;;
2285 esac
2286 }
2287
2288
2289 # func_check_version_match
2290 # ------------------------
2291 # Ensure that we are using m4 macros, and libtool script from the same
2292 # release of libtool.
2293 func_check_version_match ()
2294 {
2295 if test "$package_revision" != "$macro_revision"; then
2296 if test "$VERSION" != "$macro_version"; then
2297 if test -z "$macro_version"; then
2298 cat >&2 <<_LT_EOF
2299 $progname: Version mismatch error. This is $PACKAGE $VERSION, but the
2300 $progname: definition of this LT_INIT comes from an older release.
2301 $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
2302 $progname: and run autoconf again.
2303 _LT_EOF
2304 else
2305 cat >&2 <<_LT_EOF
2306 $progname: Version mismatch error. This is $PACKAGE $VERSION, but the
2307 $progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
2308 $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
2309 $progname: and run autoconf again.
2310 _LT_EOF
2311 fi
2312 else
2313 cat >&2 <<_LT_EOF
2314 $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
2315 $progname: but the definition of this LT_INIT comes from revision $macro_revision.
2316 $progname: You should recreate aclocal.m4 with macros from revision $package_revision
2317 $progname: of $PACKAGE $VERSION and run autoconf again.
2318 _LT_EOF
2319 fi
2320
2321 exit $EXIT_MISMATCH
2322 fi
2323 }
2324
2325
2326 # libtool_options_prep [ARG]...
2327 # -----------------------------
2328 # Preparation for options parsed by libtool.
2329 libtool_options_prep ()
2330 {
2331 $debug_mode
2332
2333 # Option defaults:
2334 opt_config=false
2335 opt_dlopen=
2336 opt_dry_run=false
2337 opt_help=false
2338 opt_mode=
2339 opt_preserve_dup_deps=false
2340 opt_quiet=false
2341
2342 nonopt=
2343 preserve_args=
2344
2345 _G_rc_lt_options_prep=:
2346
2347 # Shorthand for --mode=foo, only valid as the first argument
2348 case $1 in
2349 clean|clea|cle|cl)
2350 shift; set dummy --mode clean ${1+"$@"}; shift
2351 ;;
2352 compile|compil|compi|comp|com|co|c)
2353 shift; set dummy --mode compile ${1+"$@"}; shift
2354 ;;
2355 execute|execut|execu|exec|exe|ex|e)
2356 shift; set dummy --mode execute ${1+"$@"}; shift
2357 ;;
2358 finish|finis|fini|fin|fi|f)
2359 shift; set dummy --mode finish ${1+"$@"}; shift
2360 ;;
2361 install|instal|insta|inst|ins|in|i)
2362 shift; set dummy --mode install ${1+"$@"}; shift
2363 ;;
2364 link|lin|li|l)
2365 shift; set dummy --mode link ${1+"$@"}; shift
2366 ;;
2367 uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
2368 shift; set dummy --mode uninstall ${1+"$@"}; shift
2369 ;;
2370 *)
2371 _G_rc_lt_options_prep=false
2372 ;;
2373 esac
2374
2375 if $_G_rc_lt_options_prep; then
2376 # Pass back the list of options.
2377 func_quote_for_eval ${1+"$@"}
2378 libtool_options_prep_result=$func_quote_for_eval_result
2379 fi
2380
2381 $_G_rc_lt_options_prep
2382 }
2383 func_add_hook func_options_prep libtool_options_prep
2384
2385
2386 # libtool_parse_options [ARG]...
2387 # ---------------------------------
2388 # Provide handling for libtool specific options.
2389 libtool_parse_options ()
2390 {
2391 $debug_cmd
2392
2393 _G_rc_lt_parse_options=false
2394
2395 # Perform our own loop to consume as many options as possible in
2396 # each iteration.
2397 while test $# -gt 0; do
2398 _G_match_lt_parse_options=:
2399 _G_opt=$1
2400 shift
2401 case $_G_opt in
2402 --dry-run|--dryrun|-n)
2403 opt_dry_run=:
2404 ;;
2405
2406 --config) func_config ;;
2407
2408 --dlopen|-dlopen)
2409 opt_dlopen="${opt_dlopen+$opt_dlopen
2410 }$1"
2411 shift
2412 ;;
2413
2414 --preserve-dup-deps)
2415 opt_preserve_dup_deps=: ;;
2416
2417 --features) func_features ;;
2418
2419 --finish) set dummy --mode finish ${1+"$@"}; shift ;;
2420
2421 --help) opt_help=: ;;
2422
2423 --help-all) opt_help=': help-all' ;;
2424
2425 --mode) test $# = 0 && func_missing_arg $_G_opt && break
2426 opt_mode=$1
2427 case $1 in
2428 # Valid mode arguments:
2429 clean|compile|execute|finish|install|link|relink|uninstall) ;;
2430
2431 # Catch anything else as an error
2432 *) func_error "invalid argument for $_G_opt"
2433 exit_cmd=exit
2434 break
2435 ;;
2436 esac
2437 shift
2438 ;;
2439
2440 --no-silent|--no-quiet)
2441 opt_quiet=false
2442 func_append preserve_args " $_G_opt"
2443 ;;
2444
2445 --no-warnings|--no-warning|--no-warn)
2446 opt_warning=false
2447 func_append preserve_args " $_G_opt"
2448 ;;
2449
2450 --no-verbose)
2451 opt_verbose=false
2452 func_append preserve_args " $_G_opt"
2453 ;;
2454
2455 --silent|--quiet)
2456 opt_quiet=:
2457 opt_verbose=false
2458 func_append preserve_args " $_G_opt"
2459 ;;
2460
2461 --tag) test $# = 0 && func_missing_arg $_G_opt && break
2462 opt_tag=$1
2463 func_append preserve_args " $_G_opt $1"
2464 func_enable_tag "$1"
2465 shift
2466 ;;
2467
2468 --verbose|-v) opt_quiet=false
2469 opt_verbose=:
2470 func_append preserve_args " $_G_opt"
2471 ;;
2472
2473 # An option not handled by this hook function:
2474 *) set dummy "$_G_opt" ${1+"$@"} ; shift
2475 _G_match_lt_parse_options=false
2476 break
2477 ;;
2478 esac
2479 $_G_match_lt_parse_options && _G_rc_lt_parse_options=:
2480 done
2481
2482 if $_G_rc_lt_parse_options; then
2483 # save modified positional parameters for caller
2484 func_quote_for_eval ${1+"$@"}
2485 libtool_parse_options_result=$func_quote_for_eval_result
2486 fi
2487
2488 $_G_rc_lt_parse_options
2489 }
2490 func_add_hook func_parse_options libtool_parse_options
2491
2492
2493
2494 # libtool_validate_options [ARG]...
2495 # ---------------------------------
2496 # Perform any sanity checks on option settings and/or unconsumed
2497 # arguments.
2498 libtool_validate_options ()
2499 {
2500 # save first non-option argument
2501 if test 0 -lt $#; then
2502 nonopt=$1
2503 shift
2504 fi
2505
2506 # preserve --debug
2507 test : = "$debug_cmd" || func_append preserve_args " --debug"
2508
2509 case $host in
2510 # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452
2511 # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788
2512 *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
2513 # don't eliminate duplications in $postdeps and $predeps
2514 opt_duplicate_compiler_generated_deps=:
2515 ;;
2516 *)
2517 opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
2518 ;;
2519 esac
2520
2521 $opt_help || {
2522 # Sanity checks first:
2523 func_check_version_match
2524
2525 test yes != "$build_libtool_libs" \
2526 && test yes != "$build_old_libs" \
2527 && func_fatal_configuration "not configured to build any kind of library"
2528
2529 # Darwin sucks
2530 eval std_shrext=\"$shrext_cmds\"
2531
2532 # Only execute mode is allowed to have -dlopen flags.
2533 if test -n "$opt_dlopen" && test execute != "$opt_mode"; then
2534 func_error "unrecognized option '-dlopen'"
2535 $ECHO "$help" 1>&2
2536 exit $EXIT_FAILURE
2537 fi
2538
2539 # Change the help message to a mode-specific one.
2540 generic_help=$help
2541 help="Try '$progname --help --mode=$opt_mode' for more information."
2542 }
2543
2544 # Pass back the unparsed argument list
2545 func_quote_for_eval ${1+"$@"}
2546 libtool_validate_options_result=$func_quote_for_eval_result
2547 }
2548 func_add_hook func_validate_options libtool_validate_options
2549
2550
2551 # Process options as early as possible so that --help and --version
2552 # can return quickly.
2553 func_options ${1+"$@"}
2554 eval set dummy "$func_options_result"; shift
2555
2556
2557
2558 ## ----------- ##
2559 ## Main. ##
2560 ## ----------- ##
2561
2562 magic='%%%MAGIC variable%%%'
2563 magic_exe='%%%MAGIC EXE variable%%%'
2564
2565 # Global variables.
2566 extracted_archives=
2567 extracted_serial=0
2568
2569 # If this variable is set in any of the actions, the command in it
2570 # will be execed at the end. This prevents here-documents from being
2571 # left over by shells.
2572 exec_cmd=
2573
2574
2575 # A function that is used when there is no print builtin or printf.
2576 func_fallback_echo ()
2577 {
2578 eval 'cat <<_LTECHO_EOF
2579 $1
2580 _LTECHO_EOF'
2581 }
2582
2583 # func_generated_by_libtool
2584 # True iff stdin has been generated by Libtool. This function is only
2585 # a basic sanity check; it will hardly flush out determined imposters.
2586 func_generated_by_libtool_p ()
2587 {
2588 $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
2589 }
2590
2591 # func_lalib_p file
2592 # True iff FILE is a libtool '.la' library or '.lo' object file.
2593 # This function is only a basic sanity check; it will hardly flush out
2594 # determined imposters.
2595 func_lalib_p ()
2596 {
2597 test -f "$1" &&
2598 $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p
2599 }
2600
2601 # func_lalib_unsafe_p file
2602 # True iff FILE is a libtool '.la' library or '.lo' object file.
2603 # This function implements the same check as func_lalib_p without
2604 # resorting to external programs. To this end, it redirects stdin and
2605 # closes it afterwards, without saving the original file descriptor.
2606 # As a safety measure, use it only where a negative result would be
2607 # fatal anyway. Works if 'file' does not exist.
2608 func_lalib_unsafe_p ()
2609 {
2610 lalib_p=no
2611 if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
2612 for lalib_p_l in 1 2 3 4
2613 do
2614 read lalib_p_line
2615 case $lalib_p_line in
2616 \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
2617 esac
2618 done
2619 exec 0<&5 5<&-
2620 fi
2621 test yes = "$lalib_p"
2622 }
2623
2624 # func_ltwrapper_script_p file
2625 # True iff FILE is a libtool wrapper script
2626 # This function is only a basic sanity check; it will hardly flush out
2627 # determined imposters.
2628 func_ltwrapper_script_p ()
2629 {
2630 test -f "$1" &&
2631 $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p
2632 }
2633
2634 # func_ltwrapper_executable_p file
2635 # True iff FILE is a libtool wrapper executable
2636 # This function is only a basic sanity check; it will hardly flush out
2637 # determined imposters.
2638 func_ltwrapper_executable_p ()
2639 {
2640 func_ltwrapper_exec_suffix=
2641 case $1 in
2642 *.exe) ;;
2643 *) func_ltwrapper_exec_suffix=.exe ;;
2644 esac
2645 $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
2646 }
2647
2648 # func_ltwrapper_scriptname file
2649 # Assumes file is an ltwrapper_executable
2650 # uses $file to determine the appropriate filename for a
2651 # temporary ltwrapper_script.
2652 func_ltwrapper_scriptname ()
2653 {
2654 func_dirname_and_basename "$1" "" "."
2655 func_stripname '' '.exe' "$func_basename_result"
2656 func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper
2657 }
2658
2659 # func_ltwrapper_p file
2660 # True iff FILE is a libtool wrapper script or wrapper executable
2661 # This function is only a basic sanity check; it will hardly flush out
2662 # determined imposters.
2663 func_ltwrapper_p ()
2664 {
2665 func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
2666 }
2667
2668
2669 # func_execute_cmds commands fail_cmd
2670 # Execute tilde-delimited COMMANDS.
2671 # If FAIL_CMD is given, eval that upon failure.
2672 # FAIL_CMD may read-access the current command in variable CMD!
2673 func_execute_cmds ()
2674 {
2675 $debug_cmd
2676
2677 save_ifs=$IFS; IFS='~'
2678 for cmd in $1; do
2679 IFS=$sp$nl
2680 eval cmd=\"$cmd\"
2681 IFS=$save_ifs
2682 func_show_eval "$cmd" "${2-:}"
2683 done
2684 IFS=$save_ifs
2685 }
2686
2687
2688 # func_source file
2689 # Source FILE, adding directory component if necessary.
2690 # Note that it is not necessary on cygwin/mingw to append a dot to
2691 # FILE even if both FILE and FILE.exe exist: automatic-append-.exe
2692 # behavior happens only for exec(3), not for open(2)! Also, sourcing
2693 # 'FILE.' does not work on cygwin managed mounts.
2694 func_source ()
2695 {
2696 $debug_cmd
2697
2698 case $1 in
2699 */* | *\\*) . "$1" ;;
2700 *) . "./$1" ;;
2701 esac
2702 }
2703
2704
2705 # func_resolve_sysroot PATH
2706 # Replace a leading = in PATH with a sysroot. Store the result into
2707 # func_resolve_sysroot_result
2708 func_resolve_sysroot ()
2709 {
2710 func_resolve_sysroot_result=$1
2711 case $func_resolve_sysroot_result in
2712 =*)
2713 func_stripname '=' '' "$func_resolve_sysroot_result"
2714 func_resolve_sysroot_result=$lt_sysroot$func_stripname_result
2715 ;;
2716 esac
2717 }
2718
2719 # func_replace_sysroot PATH
2720 # If PATH begins with the sysroot, replace it with = and
2721 # store the result into func_replace_sysroot_result.
2722 func_replace_sysroot ()
2723 {
2724 case $lt_sysroot:$1 in
2725 ?*:"$lt_sysroot"*)
2726 func_stripname "$lt_sysroot" '' "$1"
2727 func_replace_sysroot_result='='$func_stripname_result
2728 ;;
2729 *)
2730 # Including no sysroot.
2731 func_replace_sysroot_result=$1
2732 ;;
2733 esac
2734 }
2735
2736 # func_infer_tag arg
2737 # Infer tagged configuration to use if any are available and
2738 # if one wasn't chosen via the "--tag" command line option.
2739 # Only attempt this if the compiler in the base compile
2740 # command doesn't match the default compiler.
2741 # arg is usually of the form 'gcc ...'
2742 func_infer_tag ()
2743 {
2744 $debug_cmd
2745
2746 if test -n "$available_tags" && test -z "$tagname"; then
2747 CC_quoted=
2748 for arg in $CC; do
2749 func_append_quoted CC_quoted "$arg"
2750 done
2751 CC_expanded=`func_echo_all $CC`
2752 CC_quoted_expanded=`func_echo_all $CC_quoted`
2753 case $@ in
2754 # Blanks in the command may have been stripped by the calling shell,
2755 # but not from the CC environment variable when configure was run.
2756 " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
2757 " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;;
2758 # Blanks at the start of $base_compile will cause this to fail
2759 # if we don't check for them as well.
2760 *)
2761 for z in $available_tags; do
2762 if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
2763 # Evaluate the configuration.
2764 eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
2765 CC_quoted=
2766 for arg in $CC; do
2767 # Double-quote args containing other shell metacharacters.
2768 func_append_quoted CC_quoted "$arg"
2769 done
2770 CC_expanded=`func_echo_all $CC`
2771 CC_quoted_expanded=`func_echo_all $CC_quoted`
2772 case "$@ " in
2773 " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
2774 " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*)
2775 # The compiler in the base compile command matches
2776 # the one in the tagged configuration.
2777 # Assume this is the tagged configuration we want.
2778 tagname=$z
2779 break
2780 ;;
2781 esac
2782 fi
2783 done
2784 # If $tagname still isn't set, then no tagged configuration
2785 # was found and let the user know that the "--tag" command
2786 # line option must be used.
2787 if test -z "$tagname"; then
2788 func_echo "unable to infer tagged configuration"
2789 func_fatal_error "specify a tag with '--tag'"
2790 # else
2791 # func_verbose "using $tagname tagged configuration"
2792 fi
2793 ;;
2794 esac
2795 fi
2796 }
2797
2798
2799
2800 # func_write_libtool_object output_name pic_name nonpic_name
2801 # Create a libtool object file (analogous to a ".la" file),
2802 # but don't create it if we're doing a dry run.
2803 func_write_libtool_object ()
2804 {
2805 write_libobj=$1
2806 if test yes = "$build_libtool_libs"; then
2807 write_lobj=\'$2\'
2808 else
2809 write_lobj=none
2810 fi
2811
2812 if test yes = "$build_old_libs"; then
2813 write_oldobj=\'$3\'
2814 else
2815 write_oldobj=none
2816 fi
2817
2818 $opt_dry_run || {
2819 cat >${write_libobj}T <<EOF
2820 # $write_libobj - a libtool object file
2821 # Generated by $PROGRAM (GNU $PACKAGE) $VERSION
2822 #
2823 # Please DO NOT delete this file!
2824 # It is necessary for linking the library.
2825
2826 # Name of the PIC object.
2827 pic_object=$write_lobj
2828
2829 # Name of the non-PIC object
2830 non_pic_object=$write_oldobj
2831
2832 EOF
2833 $MV "${write_libobj}T" "$write_libobj"
2834 }
2835 }
2836
2837
2838 ##################################################
2839 # FILE NAME AND PATH CONVERSION HELPER FUNCTIONS #
2840 ##################################################
2841
2842 # func_convert_core_file_wine_to_w32 ARG
2843 # Helper function used by file name conversion functions when $build is *nix,
2844 # and $host is mingw, cygwin, or some other w32 environment. Relies on a
2845 # correctly configured wine environment available, with the winepath program
2846 # in $build's $PATH.
2847 #
2848 # ARG is the $build file name to be converted to w32 format.
2849 # Result is available in $func_convert_core_file_wine_to_w32_result, and will
2850 # be empty on error (or when ARG is empty)
2851 func_convert_core_file_wine_to_w32 ()
2852 {
2853 $debug_cmd
2854
2855 func_convert_core_file_wine_to_w32_result=$1
2856 if test -n "$1"; then
2857 # Unfortunately, winepath does not exit with a non-zero error code, so we
2858 # are forced to check the contents of stdout. On the other hand, if the
2859 # command is not found, the shell will set an exit code of 127 and print
2860 # *an error message* to stdout. So we must check for both error code of
2861 # zero AND non-empty stdout, which explains the odd construction:
2862 func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
2863 if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then
2864 func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
2865 $SED -e "$sed_naive_backslashify"`
2866 else
2867 func_convert_core_file_wine_to_w32_result=
2868 fi
2869 fi
2870 }
2871 # end: func_convert_core_file_wine_to_w32
2872
2873
2874 # func_convert_core_path_wine_to_w32 ARG
2875 # Helper function used by path conversion functions when $build is *nix, and
2876 # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
2877 # configured wine environment available, with the winepath program in $build's
2878 # $PATH. Assumes ARG has no leading or trailing path separator characters.
2879 #
2880 # ARG is path to be converted from $build format to win32.
2881 # Result is available in $func_convert_core_path_wine_to_w32_result.
2882 # Unconvertible file (directory) names in ARG are skipped; if no directory names
2883 # are convertible, then the result may be empty.
2884 func_convert_core_path_wine_to_w32 ()
2885 {
2886 $debug_cmd
2887
2888 # unfortunately, winepath doesn't convert paths, only file names
2889 func_convert_core_path_wine_to_w32_result=
2890 if test -n "$1"; then
2891 oldIFS=$IFS
2892 IFS=:
2893 for func_convert_core_path_wine_to_w32_f in $1; do
2894 IFS=$oldIFS
2895 func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
2896 if test -n "$func_convert_core_file_wine_to_w32_result"; then
2897 if test -z "$func_convert_core_path_wine_to_w32_result"; then
2898 func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result
2899 else
2900 func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
2901 fi
2902 fi
2903 done
2904 IFS=$oldIFS
2905 fi
2906 }
2907 # end: func_convert_core_path_wine_to_w32
2908
2909
2910 # func_cygpath ARGS...
2911 # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when
2912 # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2)
2913 # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or
2914 # (2), returns the Cygwin file name or path in func_cygpath_result (input
2915 # file name or path is assumed to be in w32 format, as previously converted
2916 # from $build's *nix or MSYS format). In case (3), returns the w32 file name
2917 # or path in func_cygpath_result (input file name or path is assumed to be in
2918 # Cygwin format). Returns an empty string on error.
2919 #
2920 # ARGS are passed to cygpath, with the last one being the file name or path to
2921 # be converted.
2922 #
2923 # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH
2924 # environment variable; do not put it in $PATH.
2925 func_cygpath ()
2926 {
2927 $debug_cmd
2928
2929 if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
2930 func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
2931 if test "$?" -ne 0; then
2932 # on failure, ensure result is empty
2933 func_cygpath_result=
2934 fi
2935 else
2936 func_cygpath_result=
2937 func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'"
2938 fi
2939 }
2940 #end: func_cygpath
2941
2942
2943 # func_convert_core_msys_to_w32 ARG
2944 # Convert file name or path ARG from MSYS format to w32 format. Return
2945 # result in func_convert_core_msys_to_w32_result.
2946 func_convert_core_msys_to_w32 ()
2947 {
2948 $debug_cmd
2949
2950 # awkward: cmd appends spaces to result
2951 func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
2952 $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"`
2953 }
2954 #end: func_convert_core_msys_to_w32
2955
2956
2957 # func_convert_file_check ARG1 ARG2
2958 # Verify that ARG1 (a file name in $build format) was converted to $host
2959 # format in ARG2. Otherwise, emit an error message, but continue (resetting
2960 # func_to_host_file_result to ARG1).
2961 func_convert_file_check ()
2962 {
2963 $debug_cmd
2964
2965 if test -z "$2" && test -n "$1"; then
2966 func_error "Could not determine host file name corresponding to"
2967 func_error " '$1'"
2968 func_error "Continuing, but uninstalled executables may not work."
2969 # Fallback:
2970 func_to_host_file_result=$1
2971 fi
2972 }
2973 # end func_convert_file_check
2974
2975
2976 # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH
2977 # Verify that FROM_PATH (a path in $build format) was converted to $host
2978 # format in TO_PATH. Otherwise, emit an error message, but continue, resetting
2979 # func_to_host_file_result to a simplistic fallback value (see below).
2980 func_convert_path_check ()
2981 {
2982 $debug_cmd
2983
2984 if test -z "$4" && test -n "$3"; then
2985 func_error "Could not determine the host path corresponding to"
2986 func_error " '$3'"
2987 func_error "Continuing, but uninstalled executables may not work."
2988 # Fallback. This is a deliberately simplistic "conversion" and
2989 # should not be "improved". See libtool.info.
2990 if test "x$1" != "x$2"; then
2991 lt_replace_pathsep_chars="s|$1|$2|g"
2992 func_to_host_path_result=`echo "$3" |
2993 $SED -e "$lt_replace_pathsep_chars"`
2994 else
2995 func_to_host_path_result=$3
2996 fi
2997 fi
2998 }
2999 # end func_convert_path_check
3000
3001
3002 # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG
3003 # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT
3004 # and appending REPL if ORIG matches BACKPAT.
3005 func_convert_path_front_back_pathsep ()
3006 {
3007 $debug_cmd
3008
3009 case $4 in
3010 $1 ) func_to_host_path_result=$3$func_to_host_path_result
3011 ;;
3012 esac
3013 case $4 in
3014 $2 ) func_append func_to_host_path_result "$3"
3015 ;;
3016 esac
3017 }
3018 # end func_convert_path_front_back_pathsep
3019
3020
3021 ##################################################
3022 # $build to $host FILE NAME CONVERSION FUNCTIONS #
3023 ##################################################
3024 # invoked via '$to_host_file_cmd ARG'
3025 #
3026 # In each case, ARG is the path to be converted from $build to $host format.
3027 # Result will be available in $func_to_host_file_result.
3028
3029
3030 # func_to_host_file ARG
3031 # Converts the file name ARG from $build format to $host format. Return result
3032 # in func_to_host_file_result.
3033 func_to_host_file ()
3034 {
3035 $debug_cmd
3036
3037 $to_host_file_cmd "$1"
3038 }
3039 # end func_to_host_file
3040
3041
3042 # func_to_tool_file ARG LAZY
3043 # converts the file name ARG from $build format to toolchain format. Return
3044 # result in func_to_tool_file_result. If the conversion in use is listed
3045 # in (the comma separated) LAZY, no conversion takes place.
3046 func_to_tool_file ()
3047 {
3048 $debug_cmd
3049
3050 case ,$2, in
3051 *,"$to_tool_file_cmd",*)
3052 func_to_tool_file_result=$1
3053 ;;
3054 *)
3055 $to_tool_file_cmd "$1"
3056 func_to_tool_file_result=$func_to_host_file_result
3057 ;;
3058 esac
3059 }
3060 # end func_to_tool_file
3061
3062
3063 # func_convert_file_noop ARG
3064 # Copy ARG to func_to_host_file_result.
3065 func_convert_file_noop ()
3066 {
3067 func_to_host_file_result=$1
3068 }
3069 # end func_convert_file_noop
3070
3071
3072 # func_convert_file_msys_to_w32 ARG
3073 # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic
3074 # conversion to w32 is not available inside the cwrapper. Returns result in
3075 # func_to_host_file_result.
3076 func_convert_file_msys_to_w32 ()
3077 {
3078 $debug_cmd
3079
3080 func_to_host_file_result=$1
3081 if test -n "$1"; then
3082 func_convert_core_msys_to_w32 "$1"
3083 func_to_host_file_result=$func_convert_core_msys_to_w32_result
3084 fi
3085 func_convert_file_check "$1" "$func_to_host_file_result"
3086 }
3087 # end func_convert_file_msys_to_w32
3088
3089
3090 # func_convert_file_cygwin_to_w32 ARG
3091 # Convert file name ARG from Cygwin to w32 format. Returns result in
3092 # func_to_host_file_result.
3093 func_convert_file_cygwin_to_w32 ()
3094 {
3095 $debug_cmd
3096
3097 func_to_host_file_result=$1
3098 if test -n "$1"; then
3099 # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
3100 # LT_CYGPATH in this case.
3101 func_to_host_file_result=`cygpath -m "$1"`
3102 fi
3103 func_convert_file_check "$1" "$func_to_host_file_result"
3104 }
3105 # end func_convert_file_cygwin_to_w32
3106
3107
3108 # func_convert_file_nix_to_w32 ARG
3109 # Convert file name ARG from *nix to w32 format. Requires a wine environment
3110 # and a working winepath. Returns result in func_to_host_file_result.
3111 func_convert_file_nix_to_w32 ()
3112 {
3113 $debug_cmd
3114
3115 func_to_host_file_result=$1
3116 if test -n "$1"; then
3117 func_convert_core_file_wine_to_w32 "$1"
3118 func_to_host_file_result=$func_convert_core_file_wine_to_w32_result
3119 fi
3120 func_convert_file_check "$1" "$func_to_host_file_result"
3121 }
3122 # end func_convert_file_nix_to_w32
3123
3124
3125 # func_convert_file_msys_to_cygwin ARG
3126 # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
3127 # Returns result in func_to_host_file_result.
3128 func_convert_file_msys_to_cygwin ()
3129 {
3130 $debug_cmd
3131
3132 func_to_host_file_result=$1
3133 if test -n "$1"; then
3134 func_convert_core_msys_to_w32 "$1"
3135 func_cygpath -u "$func_convert_core_msys_to_w32_result"
3136 func_to_host_file_result=$func_cygpath_result
3137 fi
3138 func_convert_file_check "$1" "$func_to_host_file_result"
3139 }
3140 # end func_convert_file_msys_to_cygwin
3141
3142
3143 # func_convert_file_nix_to_cygwin ARG
3144 # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed
3145 # in a wine environment, working winepath, and LT_CYGPATH set. Returns result
3146 # in func_to_host_file_result.
3147 func_convert_file_nix_to_cygwin ()
3148 {
3149 $debug_cmd
3150
3151 func_to_host_file_result=$1
3152 if test -n "$1"; then
3153 # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
3154 func_convert_core_file_wine_to_w32 "$1"
3155 func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
3156 func_to_host_file_result=$func_cygpath_result
3157 fi
3158 func_convert_file_check "$1" "$func_to_host_file_result"
3159 }
3160 # end func_convert_file_nix_to_cygwin
3161
3162
3163 #############################################
3164 # $build to $host PATH CONVERSION FUNCTIONS #
3165 #############################################
3166 # invoked via '$to_host_path_cmd ARG'
3167 #
3168 # In each case, ARG is the path to be converted from $build to $host format.
3169 # The result will be available in $func_to_host_path_result.
3170 #
3171 # Path separators are also converted from $build format to $host format. If
3172 # ARG begins or ends with a path separator character, it is preserved (but
3173 # converted to $host format) on output.
3174 #
3175 # All path conversion functions are named using the following convention:
3176 # file name conversion function : func_convert_file_X_to_Y ()
3177 # path conversion function : func_convert_path_X_to_Y ()
3178 # where, for any given $build/$host combination the 'X_to_Y' value is the
3179 # same. If conversion functions are added for new $build/$host combinations,
3180 # the two new functions must follow this pattern, or func_init_to_host_path_cmd
3181 # will break.
3182
3183
3184 # func_init_to_host_path_cmd
3185 # Ensures that function "pointer" variable $to_host_path_cmd is set to the
3186 # appropriate value, based on the value of $to_host_file_cmd.
3187 to_host_path_cmd=
3188 func_init_to_host_path_cmd ()
3189 {
3190 $debug_cmd
3191
3192 if test -z "$to_host_path_cmd"; then
3193 func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
3194 to_host_path_cmd=func_convert_path_$func_stripname_result
3195 fi
3196 }
3197
3198
3199 # func_to_host_path ARG
3200 # Converts the path ARG from $build format to $host format. Return result
3201 # in func_to_host_path_result.
3202 func_to_host_path ()
3203 {
3204 $debug_cmd
3205
3206 func_init_to_host_path_cmd
3207 $to_host_path_cmd "$1"
3208 }
3209 # end func_to_host_path
3210
3211
3212 # func_convert_path_noop ARG
3213 # Copy ARG to func_to_host_path_result.
3214 func_convert_path_noop ()
3215 {
3216 func_to_host_path_result=$1
3217 }
3218 # end func_convert_path_noop
3219
3220
3221 # func_convert_path_msys_to_w32 ARG
3222 # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic
3223 # conversion to w32 is not available inside the cwrapper. Returns result in
3224 # func_to_host_path_result.
3225 func_convert_path_msys_to_w32 ()
3226 {
3227 $debug_cmd
3228
3229 func_to_host_path_result=$1
3230 if test -n "$1"; then
3231 # Remove leading and trailing path separator characters from ARG. MSYS
3232 # behavior is inconsistent here; cygpath turns them into '.;' and ';.';
3233 # and winepath ignores them completely.
3234 func_stripname : : "$1"
3235 func_to_host_path_tmp1=$func_stripname_result
3236 func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
3237 func_to_host_path_result=$func_convert_core_msys_to_w32_result
3238 func_convert_path_check : ";" \
3239 "$func_to_host_path_tmp1" "$func_to_host_path_result"
3240 func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
3241 fi
3242 }
3243 # end func_convert_path_msys_to_w32
3244
3245
3246 # func_convert_path_cygwin_to_w32 ARG
3247 # Convert path ARG from Cygwin to w32 format. Returns result in
3248 # func_to_host_file_result.
3249 func_convert_path_cygwin_to_w32 ()
3250 {
3251 $debug_cmd
3252
3253 func_to_host_path_result=$1
3254 if test -n "$1"; then
3255 # See func_convert_path_msys_to_w32:
3256 func_stripname : : "$1"
3257 func_to_host_path_tmp1=$func_stripname_result
3258 func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"`
3259 func_convert_path_check : ";" \
3260 "$func_to_host_path_tmp1" "$func_to_host_path_result"
3261 func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
3262 fi
3263 }
3264 # end func_convert_path_cygwin_to_w32
3265
3266
3267 # func_convert_path_nix_to_w32 ARG
3268 # Convert path ARG from *nix to w32 format. Requires a wine environment and
3269 # a working winepath. Returns result in func_to_host_file_result.
3270 func_convert_path_nix_to_w32 ()
3271 {
3272 $debug_cmd
3273
3274 func_to_host_path_result=$1
3275 if test -n "$1"; then
3276 # See func_convert_path_msys_to_w32:
3277 func_stripname : : "$1"
3278 func_to_host_path_tmp1=$func_stripname_result
3279 func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
3280 func_to_host_path_result=$func_convert_core_path_wine_to_w32_result
3281 func_convert_path_check : ";" \
3282 "$func_to_host_path_tmp1" "$func_to_host_path_result"
3283 func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
3284 fi
3285 }
3286 # end func_convert_path_nix_to_w32
3287
3288
3289 # func_convert_path_msys_to_cygwin ARG
3290 # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
3291 # Returns result in func_to_host_file_result.
3292 func_convert_path_msys_to_cygwin ()
3293 {
3294 $debug_cmd
3295
3296 func_to_host_path_result=$1
3297 if test -n "$1"; then
3298 # See func_convert_path_msys_to_w32:
3299 func_stripname : : "$1"
3300 func_to_host_path_tmp1=$func_stripname_result
3301 func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
3302 func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
3303 func_to_host_path_result=$func_cygpath_result
3304 func_convert_path_check : : \
3305 "$func_to_host_path_tmp1" "$func_to_host_path_result"
3306 func_convert_path_front_back_pathsep ":*" "*:" : "$1"
3307 fi
3308 }
3309 # end func_convert_path_msys_to_cygwin
3310
3311
3312 # func_convert_path_nix_to_cygwin ARG
3313 # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a
3314 # a wine environment, working winepath, and LT_CYGPATH set. Returns result in
3315 # func_to_host_file_result.
3316 func_convert_path_nix_to_cygwin ()
3317 {
3318 $debug_cmd
3319
3320 func_to_host_path_result=$1
3321 if test -n "$1"; then
3322 # Remove leading and trailing path separator characters from
3323 # ARG. msys behavior is inconsistent here, cygpath turns them
3324 # into '.;' and ';.', and winepath ignores them completely.
3325 func_stripname : : "$1"
3326 func_to_host_path_tmp1=$func_stripname_result
3327 func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
3328 func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
3329 func_to_host_path_result=$func_cygpath_result
3330 func_convert_path_check : : \
3331 "$func_to_host_path_tmp1" "$func_to_host_path_result"
3332 func_convert_path_front_back_pathsep ":*" "*:" : "$1"
3333 fi
3334 }
3335 # end func_convert_path_nix_to_cygwin
3336
3337
3338 # func_dll_def_p FILE
3339 # True iff FILE is a Windows DLL '.def' file.
3340 # Keep in sync with _LT_DLL_DEF_P in libtool.m4
3341 func_dll_def_p ()
3342 {
3343 $debug_cmd
3344
3345 func_dll_def_p_tmp=`$SED -n \
3346 -e 's/^[ ]*//' \
3347 -e '/^\(;.*\)*$/d' \
3348 -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \
3349 -e q \
3350 "$1"`
3351 test DEF = "$func_dll_def_p_tmp"
3352 }
3353
3354
3355 # func_mode_compile arg...
3356 func_mode_compile ()
3357 {
3358 $debug_cmd
3359
3360 # Get the compilation command and the source file.
3361 base_compile=
3362 srcfile=$nonopt # always keep a non-empty value in "srcfile"
3363 suppress_opt=yes
3364 suppress_output=
3365 arg_mode=normal
3366 libobj=
3367 later=
3368 pie_flag=
3369
3370 for arg
3371 do
3372 case $arg_mode in
3373 arg )
3374 # do not "continue". Instead, add this to base_compile
3375 lastarg=$arg
3376 arg_mode=normal
3377 ;;
3378
3379 target )
3380 libobj=$arg
3381 arg_mode=normal
3382 continue
3383 ;;
3384
3385 normal )
3386 # Accept any command-line options.
3387 case $arg in
3388 -o)
3389 test -n "$libobj" && \
3390 func_fatal_error "you cannot specify '-o' more than once"
3391 arg_mode=target
3392 continue
3393 ;;
3394
3395 -pie | -fpie | -fPIE)
3396 func_append pie_flag " $arg"
3397 continue
3398 ;;
3399
3400 -shared | -static | -prefer-pic | -prefer-non-pic)
3401 func_append later " $arg"
3402 continue
3403 ;;
3404
3405 -no-suppress)
3406 suppress_opt=no
3407 continue
3408 ;;
3409
3410 -Xcompiler)
3411 arg_mode=arg # the next one goes into the "base_compile" arg list
3412 continue # The current "srcfile" will either be retained or
3413 ;; # replaced later. I would guess that would be a bug.
3414
3415 -Wc,*)
3416 func_stripname '-Wc,' '' "$arg"
3417 args=$func_stripname_result
3418 lastarg=
3419 save_ifs=$IFS; IFS=,
3420 for arg in $args; do
3421 IFS=$save_ifs
3422 func_append_quoted lastarg "$arg"
3423 done
3424 IFS=$save_ifs
3425 func_stripname ' ' '' "$lastarg"
3426 lastarg=$func_stripname_result
3427
3428 # Add the arguments to base_compile.
3429 func_append base_compile " $lastarg"
3430 continue
3431 ;;
3432
3433 *)
3434 # Accept the current argument as the source file.
3435 # The previous "srcfile" becomes the current argument.
3436 #
3437 lastarg=$srcfile
3438 srcfile=$arg
3439 ;;
3440 esac # case $arg
3441 ;;
3442 esac # case $arg_mode
3443
3444 # Aesthetically quote the previous argument.
3445 func_append_quoted base_compile "$lastarg"
3446 done # for arg
3447
3448 case $arg_mode in
3449 arg)
3450 func_fatal_error "you must specify an argument for -Xcompile"
3451 ;;
3452 target)
3453 func_fatal_error "you must specify a target with '-o'"
3454 ;;
3455 *)
3456 # Get the name of the library object.
3457 test -z "$libobj" && {
3458 func_basename "$srcfile"
3459 libobj=$func_basename_result
3460 }
3461 ;;
3462 esac
3463
3464 # Recognize several different file suffixes.
3465 # If the user specifies -o file.o, it is replaced with file.lo
3466 case $libobj in
3467 *.[cCFSifmso] | \
3468 *.ada | *.adb | *.ads | *.asm | \
3469 *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
3470 *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup)
3471 func_xform "$libobj"
3472 libobj=$func_xform_result
3473 ;;
3474 esac
3475
3476 case $libobj in
3477 *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
3478 *)
3479 func_fatal_error "cannot determine name of library object from '$libobj'"
3480 ;;
3481 esac
3482
3483 func_infer_tag $base_compile
3484
3485 for arg in $later; do
3486 case $arg in
3487 -shared)
3488 test yes = "$build_libtool_libs" \
3489 || func_fatal_configuration "cannot build a shared library"
3490 build_old_libs=no
3491 continue
3492 ;;
3493
3494 -static)
3495 build_libtool_libs=no
3496 build_old_libs=yes
3497 continue
3498 ;;
3499
3500 -prefer-pic)
3501 pic_mode=yes
3502 continue
3503 ;;
3504
3505 -prefer-non-pic)
3506 pic_mode=no
3507 continue
3508 ;;
3509 esac
3510 done
3511
3512 func_quote_for_eval "$libobj"
3513 test "X$libobj" != "X$func_quote_for_eval_result" \
3514 && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
3515 && func_warning "libobj name '$libobj' may not contain shell special characters."
3516 func_dirname_and_basename "$obj" "/" ""
3517 objname=$func_basename_result
3518 xdir=$func_dirname_result
3519 lobj=$xdir$objdir/$objname
3520
3521 test -z "$base_compile" && \
3522 func_fatal_help "you must specify a compilation command"
3523
3524 # Delete any leftover library objects.
3525 if test yes = "$build_old_libs"; then
3526 removelist="$obj $lobj $libobj ${libobj}T"
3527 else
3528 removelist="$lobj $libobj ${libobj}T"
3529 fi
3530
3531 # On Cygwin there's no "real" PIC flag so we must build both object types
3532 case $host_os in
3533 cygwin* | mingw* | pw32* | os2* | cegcc*)
3534 pic_mode=default
3535 ;;
3536 esac
3537 if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then
3538 # non-PIC code in shared libraries is not supported
3539 pic_mode=default
3540 fi
3541
3542 # Calculate the filename of the output object if compiler does
3543 # not support -o with -c
3544 if test no = "$compiler_c_o"; then
3545 output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext
3546 lockfile=$output_obj.lock
3547 else
3548 output_obj=
3549 need_locks=no
3550 lockfile=
3551 fi
3552
3553 # Lock this critical section if it is needed
3554 # We use this script file to make the link, it avoids creating a new file
3555 if test yes = "$need_locks"; then
3556 until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
3557 func_echo "Waiting for $lockfile to be removed"
3558 sleep 2
3559 done
3560 elif test warn = "$need_locks"; then
3561 if test -f "$lockfile"; then
3562 $ECHO "\
3563 *** ERROR, $lockfile exists and contains:
3564 `cat $lockfile 2>/dev/null`
3565
3566 This indicates that another process is trying to use the same
3567 temporary object file, and libtool could not work around it because
3568 your compiler does not support '-c' and '-o' together. If you
3569 repeat this compilation, it may succeed, by chance, but you had better
3570 avoid parallel builds (make -j) in this platform, or get a better
3571 compiler."
3572
3573 $opt_dry_run || $RM $removelist
3574 exit $EXIT_FAILURE
3575 fi
3576 func_append removelist " $output_obj"
3577 $ECHO "$srcfile" > "$lockfile"
3578 fi
3579
3580 $opt_dry_run || $RM $removelist
3581 func_append removelist " $lockfile"
3582 trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
3583
3584 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
3585 srcfile=$func_to_tool_file_result
3586 func_quote_for_eval "$srcfile"
3587 qsrcfile=$func_quote_for_eval_result
3588
3589 # Only build a PIC object if we are building libtool libraries.
3590 if test yes = "$build_libtool_libs"; then
3591 # Without this assignment, base_compile gets emptied.
3592 fbsd_hideous_sh_bug=$base_compile
3593
3594 if test no != "$pic_mode"; then
3595 command="$base_compile $qsrcfile $pic_flag"
3596 else
3597 # Don't build PIC code
3598 command="$base_compile $qsrcfile"
3599 fi
3600
3601 func_mkdir_p "$xdir$objdir"
3602
3603 if test -z "$output_obj"; then
3604 # Place PIC objects in $objdir
3605 func_append command " -o $lobj"
3606 fi
3607
3608 func_show_eval_locale "$command" \
3609 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
3610
3611 if test warn = "$need_locks" &&
3612 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
3613 $ECHO "\
3614 *** ERROR, $lockfile contains:
3615 `cat $lockfile 2>/dev/null`
3616
3617 but it should contain:
3618 $srcfile
3619
3620 This indicates that another process is trying to use the same
3621 temporary object file, and libtool could not work around it because
3622 your compiler does not support '-c' and '-o' together. If you
3623 repeat this compilation, it may succeed, by chance, but you had better
3624 avoid parallel builds (make -j) in this platform, or get a better
3625 compiler."
3626
3627 $opt_dry_run || $RM $removelist
3628 exit $EXIT_FAILURE
3629 fi
3630
3631 # Just move the object if needed, then go on to compile the next one
3632 if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
3633 func_show_eval '$MV "$output_obj" "$lobj"' \
3634 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
3635 fi
3636
3637 # Allow error messages only from the first compilation.
3638 if test yes = "$suppress_opt"; then
3639 suppress_output=' >/dev/null 2>&1'
3640 fi
3641 fi
3642
3643 # Only build a position-dependent object if we build old libraries.
3644 if test yes = "$build_old_libs"; then
3645 if test yes != "$pic_mode"; then
3646 # Don't build PIC code
3647 command="$base_compile $qsrcfile$pie_flag"
3648 else
3649 command="$base_compile $qsrcfile $pic_flag"
3650 fi
3651 if test yes = "$compiler_c_o"; then
3652 func_append command " -o $obj"
3653 fi
3654
3655 # Suppress compiler output if we already did a PIC compilation.
3656 func_append command "$suppress_output"
3657 func_show_eval_locale "$command" \
3658 '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
3659
3660 if test warn = "$need_locks" &&
3661 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
3662 $ECHO "\
3663 *** ERROR, $lockfile contains:
3664 `cat $lockfile 2>/dev/null`
3665
3666 but it should contain:
3667 $srcfile
3668
3669 This indicates that another process is trying to use the same
3670 temporary object file, and libtool could not work around it because
3671 your compiler does not support '-c' and '-o' together. If you
3672 repeat this compilation, it may succeed, by chance, but you had better
3673 avoid parallel builds (make -j) in this platform, or get a better
3674 compiler."
3675
3676 $opt_dry_run || $RM $removelist
3677 exit $EXIT_FAILURE
3678 fi
3679
3680 # Just move the object if needed
3681 if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
3682 func_show_eval '$MV "$output_obj" "$obj"' \
3683 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
3684 fi
3685 fi
3686
3687 $opt_dry_run || {
3688 func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
3689
3690 # Unlock the critical section if it was locked
3691 if test no != "$need_locks"; then
3692 removelist=$lockfile
3693 $RM "$lockfile"
3694 fi
3695 }
3696
3697 exit $EXIT_SUCCESS
3698 }
3699
3700 $opt_help || {
3701 test compile = "$opt_mode" && func_mode_compile ${1+"$@"}
3702 }
3703
3704 func_mode_help ()
3705 {
3706 # We need to display help for each of the modes.
3707 case $opt_mode in
3708 "")
3709 # Generic help is extracted from the usage comments
3710 # at the start of this file.
3711 func_help
3712 ;;
3713
3714 clean)
3715 $ECHO \
3716 "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
3717
3718 Remove files from the build directory.
3719
3720 RM is the name of the program to use to delete files associated with each FILE
3721 (typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed
3722 to RM.
3723
3724 If FILE is a libtool library, object or program, all the files associated
3725 with it are deleted. Otherwise, only FILE itself is deleted using RM."
3726 ;;
3727
3728 compile)
3729 $ECHO \
3730 "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
3731
3732 Compile a source file into a libtool library object.
3733
3734 This mode accepts the following additional options:
3735
3736 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
3737 -no-suppress do not suppress compiler output for multiple passes
3738 -prefer-pic try to build PIC objects only
3739 -prefer-non-pic try to build non-PIC objects only
3740 -shared do not build a '.o' file suitable for static linking
3741 -static only build a '.o' file suitable for static linking
3742 -Wc,FLAG pass FLAG directly to the compiler
3743
3744 COMPILE-COMMAND is a command to be used in creating a 'standard' object file
3745 from the given SOURCEFILE.
3746
3747 The output file name is determined by removing the directory component from
3748 SOURCEFILE, then substituting the C source code suffix '.c' with the
3749 library object suffix, '.lo'."
3750 ;;
3751
3752 execute)
3753 $ECHO \
3754 "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
3755
3756 Automatically set library path, then run a program.
3757
3758 This mode accepts the following additional options:
3759
3760 -dlopen FILE add the directory containing FILE to the library path
3761
3762 This mode sets the library path environment variable according to '-dlopen'
3763 flags.
3764
3765 If any of the ARGS are libtool executable wrappers, then they are translated
3766 into their corresponding uninstalled binary, and any of their required library
3767 directories are added to the library path.
3768
3769 Then, COMMAND is executed, with ARGS as arguments."
3770 ;;
3771
3772 finish)
3773 $ECHO \
3774 "Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
3775
3776 Complete the installation of libtool libraries.
3777
3778 Each LIBDIR is a directory that contains libtool libraries.
3779
3780 The commands that this mode executes may require superuser privileges. Use
3781 the '--dry-run' option if you just want to see what would be executed."
3782 ;;
3783
3784 install)
3785 $ECHO \
3786 "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
3787
3788 Install executables or libraries.
3789
3790 INSTALL-COMMAND is the installation command. The first component should be
3791 either the 'install' or 'cp' program.
3792
3793 The following components of INSTALL-COMMAND are treated specially:
3794
3795 -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation
3796
3797 The rest of the components are interpreted as arguments to that command (only
3798 BSD-compatible install options are recognized)."
3799 ;;
3800
3801 link)
3802 $ECHO \
3803 "Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
3804
3805 Link object files or libraries together to form another library, or to
3806 create an executable program.
3807
3808 LINK-COMMAND is a command using the C compiler that you would use to create
3809 a program from several object files.
3810
3811 The following components of LINK-COMMAND are treated specially:
3812
3813 -all-static do not do any dynamic linking at all
3814 -avoid-version do not add a version suffix if possible
3815 -bindir BINDIR specify path to binaries directory (for systems where
3816 libraries must be found in the PATH setting at runtime)
3817 -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime
3818 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
3819 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
3820 -export-symbols SYMFILE
3821 try to export only the symbols listed in SYMFILE
3822 -export-symbols-regex REGEX
3823 try to export only the symbols matching REGEX
3824 -LLIBDIR search LIBDIR for required installed libraries
3825 -lNAME OUTPUT-FILE requires the installed library libNAME
3826 -module build a library that can dlopened
3827 -no-fast-install disable the fast-install mode
3828 -no-install link a not-installable executable
3829 -no-undefined declare that a library does not refer to external symbols
3830 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
3831 -objectlist FILE use a list of object files found in FILE to specify objects
3832 -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes)
3833 -precious-files-regex REGEX
3834 don't remove output files matching REGEX
3835 -release RELEASE specify package release information
3836 -rpath LIBDIR the created library will eventually be installed in LIBDIR
3837 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
3838 -shared only do dynamic linking of libtool libraries
3839 -shrext SUFFIX override the standard shared library file extension
3840 -static do not do any dynamic linking of uninstalled libtool libraries
3841 -static-libtool-libs
3842 do not do any dynamic linking of libtool libraries
3843 -version-info CURRENT[:REVISION[:AGE]]
3844 specify library version info [each variable defaults to 0]
3845 -weak LIBNAME declare that the target provides the LIBNAME interface
3846 -Wc,FLAG
3847 -Xcompiler FLAG pass linker-specific FLAG directly to the compiler
3848 -Wl,FLAG
3849 -Xlinker FLAG pass linker-specific FLAG directly to the linker
3850 -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC)
3851
3852 All other options (arguments beginning with '-') are ignored.
3853
3854 Every other argument is treated as a filename. Files ending in '.la' are
3855 treated as uninstalled libtool libraries, other files are standard or library
3856 object files.
3857
3858 If the OUTPUT-FILE ends in '.la', then a libtool library is created,
3859 only library objects ('.lo' files) may be specified, and '-rpath' is
3860 required, except when creating a convenience library.
3861
3862 If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created
3863 using 'ar' and 'ranlib', or on Windows using 'lib'.
3864
3865 If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file
3866 is created, otherwise an executable program is created."
3867 ;;
3868
3869 uninstall)
3870 $ECHO \
3871 "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
3872
3873 Remove libraries from an installation directory.
3874
3875 RM is the name of the program to use to delete files associated with each FILE
3876 (typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed
3877 to RM.
3878
3879 If FILE is a libtool library, all the files associated with it are deleted.
3880 Otherwise, only FILE itself is deleted using RM."
3881 ;;
3882
3883 *)
3884 func_fatal_help "invalid operation mode '$opt_mode'"
3885 ;;
3886 esac
3887
3888 echo
3889 $ECHO "Try '$progname --help' for more information about other modes."
3890 }
3891
3892 # Now that we've collected a possible --mode arg, show help if necessary
3893 if $opt_help; then
3894 if test : = "$opt_help"; then
3895 func_mode_help
3896 else
3897 {
3898 func_help noexit
3899 for opt_mode in compile link execute install finish uninstall clean; do
3900 func_mode_help
3901 done
3902 } | $SED -n '1p; 2,$s/^Usage:/ or: /p'
3903 {
3904 func_help noexit
3905 for opt_mode in compile link execute install finish uninstall clean; do
3906 echo
3907 func_mode_help
3908 done
3909 } |
3910 $SED '1d
3911 /^When reporting/,/^Report/{
3912 H
3913 d
3914 }
3915 $x
3916 /information about other modes/d
3917 /more detailed .*MODE/d
3918 s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/'
3919 fi
3920 exit $?
3921 fi
3922
3923
3924 # func_mode_execute arg...
3925 func_mode_execute ()
3926 {
3927 $debug_cmd
3928
3929 # The first argument is the command name.
3930 cmd=$nonopt
3931 test -z "$cmd" && \
3932 func_fatal_help "you must specify a COMMAND"
3933
3934 # Handle -dlopen flags immediately.
3935 for file in $opt_dlopen; do
3936 test -f "$file" \
3937 || func_fatal_help "'$file' is not a file"
3938
3939 dir=
3940 case $file in
3941 *.la)
3942 func_resolve_sysroot "$file"
3943 file=$func_resolve_sysroot_result
3944
3945 # Check to see that this really is a libtool archive.
3946 func_lalib_unsafe_p "$file" \
3947 || func_fatal_help "'$lib' is not a valid libtool archive"
3948
3949 # Read the libtool library.
3950 dlname=
3951 library_names=
3952 func_source "$file"
3953
3954 # Skip this library if it cannot be dlopened.
3955 if test -z "$dlname"; then
3956 # Warn if it was a shared library.
3957 test -n "$library_names" && \
3958 func_warning "'$file' was not linked with '-export-dynamic'"
3959 continue
3960 fi
3961
3962 func_dirname "$file" "" "."
3963 dir=$func_dirname_result
3964
3965 if test -f "$dir/$objdir/$dlname"; then
3966 func_append dir "/$objdir"
3967 else
3968 if test ! -f "$dir/$dlname"; then
3969 func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'"
3970 fi
3971 fi
3972 ;;
3973
3974 *.lo)
3975 # Just add the directory containing the .lo file.
3976 func_dirname "$file" "" "."
3977 dir=$func_dirname_result
3978 ;;
3979
3980 *)
3981 func_warning "'-dlopen' is ignored for non-libtool libraries and objects"
3982 continue
3983 ;;
3984 esac
3985
3986 # Get the absolute pathname.
3987 absdir=`cd "$dir" && pwd`
3988 test -n "$absdir" && dir=$absdir
3989
3990 # Now add the directory to shlibpath_var.
3991 if eval "test -z \"\$$shlibpath_var\""; then
3992 eval "$shlibpath_var=\"\$dir\""
3993 else
3994 eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
3995 fi
3996 done
3997
3998 # This variable tells wrapper scripts just to set shlibpath_var
3999 # rather than running their programs.
4000 libtool_execute_magic=$magic
4001
4002 # Check if any of the arguments is a wrapper script.
4003 args=
4004 for file
4005 do
4006 case $file in
4007 -* | *.la | *.lo ) ;;
4008 *)
4009 # Do a test to see if this is really a libtool program.
4010 if func_ltwrapper_script_p "$file"; then
4011 func_source "$file"
4012 # Transform arg to wrapped name.
4013 file=$progdir/$program
4014 elif func_ltwrapper_executable_p "$file"; then
4015 func_ltwrapper_scriptname "$file"
4016 func_source "$func_ltwrapper_scriptname_result"
4017 # Transform arg to wrapped name.
4018 file=$progdir/$program
4019 fi
4020 ;;
4021 esac
4022 # Quote arguments (to preserve shell metacharacters).
4023 func_append_quoted args "$file"
4024 done
4025
4026 if $opt_dry_run; then
4027 # Display what would be done.
4028 if test -n "$shlibpath_var"; then
4029 eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
4030 echo "export $shlibpath_var"
4031 fi
4032 $ECHO "$cmd$args"
4033 exit $EXIT_SUCCESS
4034 else
4035 if test -n "$shlibpath_var"; then
4036 # Export the shlibpath_var.
4037 eval "export $shlibpath_var"
4038 fi
4039
4040 # Restore saved environment variables
4041 for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
4042 do
4043 eval "if test \"\${save_$lt_var+set}\" = set; then
4044 $lt_var=\$save_$lt_var; export $lt_var
4045 else
4046 $lt_unset $lt_var
4047 fi"
4048 done
4049
4050 # Now prepare to actually exec the command.
4051 exec_cmd=\$cmd$args
4052 fi
4053 }
4054
4055 test execute = "$opt_mode" && func_mode_execute ${1+"$@"}
4056
4057
4058 # func_mode_finish arg...
4059 func_mode_finish ()
4060 {
4061 $debug_cmd
4062
4063 libs=
4064 libdirs=
4065 admincmds=
4066
4067 for opt in "$nonopt" ${1+"$@"}
4068 do
4069 if test -d "$opt"; then
4070 func_append libdirs " $opt"
4071
4072 elif test -f "$opt"; then
4073 if func_lalib_unsafe_p "$opt"; then
4074 func_append libs " $opt"
4075 else
4076 func_warning "'$opt' is not a valid libtool archive"
4077 fi
4078
4079 else
4080 func_fatal_error "invalid argument '$opt'"
4081 fi
4082 done
4083
4084 if test -n "$libs"; then
4085 if test -n "$lt_sysroot"; then
4086 sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"`
4087 sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;"
4088 else
4089 sysroot_cmd=
4090 fi
4091
4092 # Remove sysroot references
4093 if $opt_dry_run; then
4094 for lib in $libs; do
4095 echo "removing references to $lt_sysroot and '=' prefixes from $lib"
4096 done
4097 else
4098 tmpdir=`func_mktempdir`
4099 for lib in $libs; do
4100 $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
4101 > $tmpdir/tmp-la
4102 mv -f $tmpdir/tmp-la $lib
4103 done
4104 ${RM}r "$tmpdir"
4105 fi
4106 fi
4107
4108 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
4109 for libdir in $libdirs; do
4110 if test -n "$finish_cmds"; then
4111 # Do each command in the finish commands.
4112 func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
4113 '"$cmd"'"'
4114 fi
4115 if test -n "$finish_eval"; then
4116 # Do the single finish_eval.
4117 eval cmds=\"$finish_eval\"
4118 $opt_dry_run || eval "$cmds" || func_append admincmds "
4119 $cmds"
4120 fi
4121 done
4122 fi
4123
4124 # Exit here if they wanted silent mode.
4125 $opt_quiet && exit $EXIT_SUCCESS
4126
4127 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
4128 echo "----------------------------------------------------------------------"
4129 echo "Libraries have been installed in:"
4130 for libdir in $libdirs; do
4131 $ECHO " $libdir"
4132 done
4133 echo
4134 echo "If you ever happen to want to link against installed libraries"
4135 echo "in a given directory, LIBDIR, you must either use libtool, and"
4136 echo "specify the full pathname of the library, or use the '-LLIBDIR'"
4137 echo "flag during linking and do at least one of the following:"
4138 if test -n "$shlibpath_var"; then
4139 echo " - add LIBDIR to the '$shlibpath_var' environment variable"
4140 echo " during execution"
4141 fi
4142 if test -n "$runpath_var"; then
4143 echo " - add LIBDIR to the '$runpath_var' environment variable"
4144 echo " during linking"
4145 fi
4146 if test -n "$hardcode_libdir_flag_spec"; then
4147 libdir=LIBDIR
4148 eval flag=\"$hardcode_libdir_flag_spec\"
4149
4150 $ECHO " - use the '$flag' linker flag"
4151 fi
4152 if test -n "$admincmds"; then
4153 $ECHO " - have your system administrator run these commands:$admincmds"
4154 fi
4155 if test -f /etc/ld.so.conf; then
4156 echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'"
4157 fi
4158 echo
4159
4160 echo "See any operating system documentation about shared libraries for"
4161 case $host in
4162 solaris2.[6789]|solaris2.1[0-9])
4163 echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
4164 echo "pages."
4165 ;;
4166 *)
4167 echo "more information, such as the ld(1) and ld.so(8) manual pages."
4168 ;;
4169 esac
4170 echo "----------------------------------------------------------------------"
4171 fi
4172 exit $EXIT_SUCCESS
4173 }
4174
4175 test finish = "$opt_mode" && func_mode_finish ${1+"$@"}
4176
4177
4178 # func_mode_install arg...
4179 func_mode_install ()
4180 {
4181 $debug_cmd
4182
4183 # There may be an optional sh(1) argument at the beginning of
4184 # install_prog (especially on Windows NT).
4185 if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" ||
4186 # Allow the use of GNU shtool's install command.
4187 case $nonopt in *shtool*) :;; *) false;; esac
4188 then
4189 # Aesthetically quote it.
4190 func_quote_for_eval "$nonopt"
4191 install_prog="$func_quote_for_eval_result "
4192 arg=$1
4193 shift
4194 else
4195 install_prog=
4196 arg=$nonopt
4197 fi
4198
4199 # The real first argument should be the name of the installation program.
4200 # Aesthetically quote it.
4201 func_quote_for_eval "$arg"
4202 func_append install_prog "$func_quote_for_eval_result"
4203 install_shared_prog=$install_prog
4204 case " $install_prog " in
4205 *[\\\ /]cp\ *) install_cp=: ;;
4206 *) install_cp=false ;;
4207 esac
4208
4209 # We need to accept at least all the BSD install flags.
4210 dest=
4211 files=
4212 opts=
4213 prev=
4214 install_type=
4215 isdir=false
4216 stripme=
4217 no_mode=:
4218 for arg
4219 do
4220 arg2=
4221 if test -n "$dest"; then
4222 func_append files " $dest"
4223 dest=$arg
4224 continue
4225 fi
4226
4227 case $arg in
4228 -d) isdir=: ;;
4229 -f)
4230 if $install_cp; then :; else
4231 prev=$arg
4232 fi
4233 ;;
4234 -g | -m | -o)
4235 prev=$arg
4236 ;;
4237 -s)
4238 stripme=" -s"
4239 continue
4240 ;;
4241 -*)
4242 ;;
4243 *)
4244 # If the previous option needed an argument, then skip it.
4245 if test -n "$prev"; then
4246 if test X-m = "X$prev" && test -n "$install_override_mode"; then
4247 arg2=$install_override_mode
4248 no_mode=false
4249 fi
4250 prev=
4251 else
4252 dest=$arg
4253 continue
4254 fi
4255 ;;
4256 esac
4257
4258 # Aesthetically quote the argument.
4259 func_quote_for_eval "$arg"
4260 func_append install_prog " $func_quote_for_eval_result"
4261 if test -n "$arg2"; then
4262 func_quote_for_eval "$arg2"
4263 fi
4264 func_append install_shared_prog " $func_quote_for_eval_result"
4265 done
4266
4267 test -z "$install_prog" && \
4268 func_fatal_help "you must specify an install program"
4269
4270 test -n "$prev" && \
4271 func_fatal_help "the '$prev' option requires an argument"
4272
4273 if test -n "$install_override_mode" && $no_mode; then
4274 if $install_cp; then :; else
4275 func_quote_for_eval "$install_override_mode"
4276 func_append install_shared_prog " -m $func_quote_for_eval_result"
4277 fi
4278 fi
4279
4280 if test -z "$files"; then
4281 if test -z "$dest"; then
4282 func_fatal_help "no file or destination specified"
4283 else
4284 func_fatal_help "you must specify a destination"
4285 fi
4286 fi
4287
4288 # Strip any trailing slash from the destination.
4289 func_stripname '' '/' "$dest"
4290 dest=$func_stripname_result
4291
4292 # Check to see that the destination is a directory.
4293 test -d "$dest" && isdir=:
4294 if $isdir; then
4295 destdir=$dest
4296 destname=
4297 else
4298 func_dirname_and_basename "$dest" "" "."
4299 destdir=$func_dirname_result
4300 destname=$func_basename_result
4301
4302 # Not a directory, so check to see that there is only one file specified.
4303 set dummy $files; shift
4304 test "$#" -gt 1 && \
4305 func_fatal_help "'$dest' is not a directory"
4306 fi
4307 case $destdir in
4308 [\\/]* | [A-Za-z]:[\\/]*) ;;
4309 *)
4310 for file in $files; do
4311 case $file in
4312 *.lo) ;;
4313 *)
4314 func_fatal_help "'$destdir' must be an absolute directory name"
4315 ;;
4316 esac
4317 done
4318 ;;
4319 esac
4320
4321 # This variable tells wrapper scripts just to set variables rather
4322 # than running their programs.
4323 libtool_install_magic=$magic
4324
4325 staticlibs=
4326 future_libdirs=
4327 current_libdirs=
4328 for file in $files; do
4329
4330 # Do each installation.
4331 case $file in
4332 *.$libext)
4333 # Do the static libraries later.
4334 func_append staticlibs " $file"
4335 ;;
4336
4337 *.la)
4338 func_resolve_sysroot "$file"
4339 file=$func_resolve_sysroot_result
4340
4341 # Check to see that this really is a libtool archive.
4342 func_lalib_unsafe_p "$file" \
4343 || func_fatal_help "'$file' is not a valid libtool archive"
4344
4345 library_names=
4346 old_library=
4347 relink_command=
4348 func_source "$file"
4349
4350 # Add the libdir to current_libdirs if it is the destination.
4351 if test "X$destdir" = "X$libdir"; then
4352 case "$current_libdirs " in
4353 *" $libdir "*) ;;
4354 *) func_append current_libdirs " $libdir" ;;
4355 esac
4356 else
4357 # Note the libdir as a future libdir.
4358 case "$future_libdirs " in
4359 *" $libdir "*) ;;
4360 *) func_append future_libdirs " $libdir" ;;
4361 esac
4362 fi
4363
4364 func_dirname "$file" "/" ""
4365 dir=$func_dirname_result
4366 func_append dir "$objdir"
4367
4368 if test -n "$relink_command"; then
4369 # Determine the prefix the user has applied to our future dir.
4370 inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
4371
4372 # Don't allow the user to place us outside of our expected
4373 # location b/c this prevents finding dependent libraries that
4374 # are installed to the same prefix.
4375 # At present, this check doesn't affect windows .dll's that
4376 # are installed into $libdir/../bin (currently, that works fine)
4377 # but it's something to keep an eye on.
4378 test "$inst_prefix_dir" = "$destdir" && \
4379 func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir"
4380
4381 if test -n "$inst_prefix_dir"; then
4382 # Stick the inst_prefix_dir data into the link command.
4383 relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
4384 else
4385 relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
4386 fi
4387
4388 func_warning "relinking '$file'"
4389 func_show_eval "$relink_command" \
4390 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"'
4391 fi
4392
4393 # See the names of the shared library.
4394 set dummy $library_names; shift
4395 if test -n "$1"; then
4396 realname=$1
4397 shift
4398
4399 srcname=$realname
4400 test -n "$relink_command" && srcname=${realname}T
4401
4402 # Install the shared library and build the symlinks.
4403 func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
4404 'exit $?'
4405 tstripme=$stripme
4406 case $host_os in
4407 cygwin* | mingw* | pw32* | cegcc*)
4408 case $realname in
4409 *.dll.a)
4410 tstripme=
4411 ;;
4412 esac
4413 ;;
4414 os2*)
4415 case $realname in
4416 *_dll.a)
4417 tstripme=
4418 ;;
4419 esac
4420 ;;
4421 esac
4422 if test -n "$tstripme" && test -n "$striplib"; then
4423 func_show_eval "$striplib $destdir/$realname" 'exit $?'
4424 fi
4425
4426 if test "$#" -gt 0; then
4427 # Delete the old symlinks, and create new ones.
4428 # Try 'ln -sf' first, because the 'ln' binary might depend on
4429 # the symlink we replace! Solaris /bin/ln does not understand -f,
4430 # so we also need to try rm && ln -s.
4431 for linkname
4432 do
4433 test "$linkname" != "$realname" \
4434 && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
4435 done
4436 fi
4437
4438 # Do each command in the postinstall commands.
4439 lib=$destdir/$realname
4440 func_execute_cmds "$postinstall_cmds" 'exit $?'
4441 fi
4442
4443 # Install the pseudo-library for information purposes.
4444 func_basename "$file"
4445 name=$func_basename_result
4446 instname=$dir/${name}i
4447 func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
4448
4449 # Maybe install the static library, too.
4450 test -n "$old_library" && func_append staticlibs " $dir/$old_library"
4451 ;;
4452
4453 *.lo)
4454 # Install (i.e. copy) a libtool object.
4455
4456 # Figure out destination file name, if it wasn't already specified.
4457 if test -n "$destname"; then
4458 destfile=$destdir/$destname
4459 else
4460 func_basename "$file"
4461 destfile=$func_basename_result
4462 destfile=$destdir/$destfile
4463 fi
4464
4465 # Deduce the name of the destination old-style object file.
4466 case $destfile in
4467 *.lo)
4468 func_lo2o "$destfile"
4469 staticdest=$func_lo2o_result
4470 ;;
4471 *.$objext)
4472 staticdest=$destfile
4473 destfile=
4474 ;;
4475 *)
4476 func_fatal_help "cannot copy a libtool object to '$destfile'"
4477 ;;
4478 esac
4479
4480 # Install the libtool object if requested.
4481 test -n "$destfile" && \
4482 func_show_eval "$install_prog $file $destfile" 'exit $?'
4483
4484 # Install the old object if enabled.
4485 if test yes = "$build_old_libs"; then
4486 # Deduce the name of the old-style object file.
4487 func_lo2o "$file"
4488 staticobj=$func_lo2o_result
4489 func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
4490 fi
4491 exit $EXIT_SUCCESS
4492 ;;
4493
4494 *)
4495 # Figure out destination file name, if it wasn't already specified.
4496 if test -n "$destname"; then
4497 destfile=$destdir/$destname
4498 else
4499 func_basename "$file"
4500 destfile=$func_basename_result
4501 destfile=$destdir/$destfile
4502 fi
4503
4504 # If the file is missing, and there is a .exe on the end, strip it
4505 # because it is most likely a libtool script we actually want to
4506 # install
4507 stripped_ext=
4508 case $file in
4509 *.exe)
4510 if test ! -f "$file"; then
4511 func_stripname '' '.exe' "$file"
4512 file=$func_stripname_result
4513 stripped_ext=.exe
4514 fi
4515 ;;
4516 esac
4517
4518 # Do a test to see if this is really a libtool program.
4519 case $host in
4520 *cygwin* | *mingw*)
4521 if func_ltwrapper_executable_p "$file"; then
4522 func_ltwrapper_scriptname "$file"
4523 wrapper=$func_ltwrapper_scriptname_result
4524 else
4525 func_stripname '' '.exe' "$file"
4526 wrapper=$func_stripname_result
4527 fi
4528 ;;
4529 *)
4530 wrapper=$file
4531 ;;
4532 esac
4533 if func_ltwrapper_script_p "$wrapper"; then
4534 notinst_deplibs=
4535 relink_command=
4536
4537 func_source "$wrapper"
4538
4539 # Check the variables that should have been set.
4540 test -z "$generated_by_libtool_version" && \
4541 func_fatal_error "invalid libtool wrapper script '$wrapper'"
4542
4543 finalize=:
4544 for lib in $notinst_deplibs; do
4545 # Check to see that each library is installed.
4546 libdir=
4547 if test -f "$lib"; then
4548 func_source "$lib"
4549 fi
4550 libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'`
4551 if test -n "$libdir" && test ! -f "$libfile"; then
4552 func_warning "'$lib' has not been installed in '$libdir'"
4553 finalize=false
4554 fi
4555 done
4556
4557 relink_command=
4558 func_source "$wrapper"
4559
4560 outputname=
4561 if test no = "$fast_install" && test -n "$relink_command"; then
4562 $opt_dry_run || {
4563 if $finalize; then
4564 tmpdir=`func_mktempdir`
4565 func_basename "$file$stripped_ext"
4566 file=$func_basename_result
4567 outputname=$tmpdir/$file
4568 # Replace the output file specification.
4569 relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
4570
4571 $opt_quiet || {
4572 func_quote_for_expand "$relink_command"
4573 eval "func_echo $func_quote_for_expand_result"
4574 }
4575 if eval "$relink_command"; then :
4576 else
4577 func_error "error: relink '$file' with the above command before installing it"
4578 $opt_dry_run || ${RM}r "$tmpdir"
4579 continue
4580 fi
4581 file=$outputname
4582 else
4583 func_warning "cannot relink '$file'"
4584 fi
4585 }
4586 else
4587 # Install the binary that we compiled earlier.
4588 file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"`
4589 fi
4590 fi
4591
4592 # remove .exe since cygwin /usr/bin/install will append another
4593 # one anyway
4594 case $install_prog,$host in
4595 */usr/bin/install*,*cygwin*)
4596 case $file:$destfile in
4597 *.exe:*.exe)
4598 # this is ok
4599 ;;
4600 *.exe:*)
4601 destfile=$destfile.exe
4602 ;;
4603 *:*.exe)
4604 func_stripname '' '.exe' "$destfile"
4605 destfile=$func_stripname_result
4606 ;;
4607 esac
4608 ;;
4609 esac
4610 func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
4611 $opt_dry_run || if test -n "$outputname"; then
4612 ${RM}r "$tmpdir"
4613 fi
4614 ;;
4615 esac
4616 done
4617
4618 for file in $staticlibs; do
4619 func_basename "$file"
4620 name=$func_basename_result
4621
4622 # Set up the ranlib parameters.
4623 oldlib=$destdir/$name
4624 func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
4625 tool_oldlib=$func_to_tool_file_result
4626
4627 func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
4628
4629 if test -n "$stripme" && test -n "$old_striplib"; then
4630 func_show_eval "$old_striplib $tool_oldlib" 'exit $?'
4631 fi
4632
4633 # Do each command in the postinstall commands.
4634 func_execute_cmds "$old_postinstall_cmds" 'exit $?'
4635 done
4636
4637 test -n "$future_libdirs" && \
4638 func_warning "remember to run '$progname --finish$future_libdirs'"
4639
4640 if test -n "$current_libdirs"; then
4641 # Maybe just do a dry run.
4642 $opt_dry_run && current_libdirs=" -n$current_libdirs"
4643 exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs'
4644 else
4645 exit $EXIT_SUCCESS
4646 fi
4647 }
4648
4649 test install = "$opt_mode" && func_mode_install ${1+"$@"}
4650
4651
4652 # func_generate_dlsyms outputname originator pic_p
4653 # Extract symbols from dlprefiles and create ${outputname}S.o with
4654 # a dlpreopen symbol table.
4655 func_generate_dlsyms ()
4656 {
4657 $debug_cmd
4658
4659 my_outputname=$1
4660 my_originator=$2
4661 my_pic_p=${3-false}
4662 my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'`
4663 my_dlsyms=
4664
4665 if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
4666 if test -n "$NM" && test -n "$global_symbol_pipe"; then
4667 my_dlsyms=${my_outputname}S.c
4668 else
4669 func_error "not configured to extract global symbols from dlpreopened files"
4670 fi
4671 fi
4672
4673 if test -n "$my_dlsyms"; then
4674 case $my_dlsyms in
4675 "") ;;
4676 *.c)
4677 # Discover the nlist of each of the dlfiles.
4678 nlist=$output_objdir/$my_outputname.nm
4679
4680 func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
4681
4682 # Parse the name list into a source file.
4683 func_verbose "creating $output_objdir/$my_dlsyms"
4684
4685 $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
4686 /* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */
4687 /* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */
4688
4689 #ifdef __cplusplus
4690 extern \"C\" {
4691 #endif
4692
4693 #if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
4694 #pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
4695 #endif
4696
4697 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
4698 #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
4699 /* DATA imports from DLLs on WIN32 can't be const, because runtime
4700 relocations are performed -- see ld's documentation on pseudo-relocs. */
4701 # define LT_DLSYM_CONST
4702 #elif defined __osf__
4703 /* This system does not cope well with relocations in const data. */
4704 # define LT_DLSYM_CONST
4705 #else
4706 # define LT_DLSYM_CONST const
4707 #endif
4708
4709 #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0)
4710
4711 /* External symbol declarations for the compiler. */\
4712 "
4713
4714 if test yes = "$dlself"; then
4715 func_verbose "generating symbol list for '$output'"
4716
4717 $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
4718
4719 # Add our own program objects to the symbol list.
4720 progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
4721 for progfile in $progfiles; do
4722 func_to_tool_file "$progfile" func_convert_file_msys_to_w32
4723 func_verbose "extracting global C symbols from '$func_to_tool_file_result'"
4724 $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"
4725 done
4726
4727 if test -n "$exclude_expsyms"; then
4728 $opt_dry_run || {
4729 eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
4730 eval '$MV "$nlist"T "$nlist"'
4731 }
4732 fi
4733
4734 if test -n "$export_symbols_regex"; then
4735 $opt_dry_run || {
4736 eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
4737 eval '$MV "$nlist"T "$nlist"'
4738 }
4739 fi
4740
4741 # Prepare the list of exported symbols
4742 if test -z "$export_symbols"; then
4743 export_symbols=$output_objdir/$outputname.exp
4744 $opt_dry_run || {
4745 $RM $export_symbols
4746 eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
4747 case $host in
4748 *cygwin* | *mingw* | *cegcc* )
4749 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
4750 eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
4751 ;;
4752 esac
4753 }
4754 else
4755 $opt_dry_run || {
4756 eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
4757 eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
4758 eval '$MV "$nlist"T "$nlist"'
4759 case $host in
4760 *cygwin* | *mingw* | *cegcc* )
4761 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
4762 eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
4763 ;;
4764 esac
4765 }
4766 fi
4767 fi
4768
4769 for dlprefile in $dlprefiles; do
4770 func_verbose "extracting global C symbols from '$dlprefile'"
4771 func_basename "$dlprefile"
4772 name=$func_basename_result
4773 case $host in
4774 *cygwin* | *mingw* | *cegcc* )
4775 # if an import library, we need to obtain dlname
4776 if func_win32_import_lib_p "$dlprefile"; then
4777 func_tr_sh "$dlprefile"
4778 eval "curr_lafile=\$libfile_$func_tr_sh_result"
4779 dlprefile_dlbasename=
4780 if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then
4781 # Use subshell, to avoid clobbering current variable values
4782 dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"`
4783 if test -n "$dlprefile_dlname"; then
4784 func_basename "$dlprefile_dlname"
4785 dlprefile_dlbasename=$func_basename_result
4786 else
4787 # no lafile. user explicitly requested -dlpreopen <import library>.
4788 $sharedlib_from_linklib_cmd "$dlprefile"
4789 dlprefile_dlbasename=$sharedlib_from_linklib_result
4790 fi
4791 fi
4792 $opt_dry_run || {
4793 if test -n "$dlprefile_dlbasename"; then
4794 eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"'
4795 else
4796 func_warning "Could not compute DLL name from $name"
4797 eval '$ECHO ": $name " >> "$nlist"'
4798 fi
4799 func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
4800 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
4801 $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'"
4802 }
4803 else # not an import lib
4804 $opt_dry_run || {
4805 eval '$ECHO ": $name " >> "$nlist"'
4806 func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
4807 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
4808 }
4809 fi
4810 ;;
4811 *)
4812 $opt_dry_run || {
4813 eval '$ECHO ": $name " >> "$nlist"'
4814 func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
4815 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
4816 }
4817 ;;
4818 esac
4819 done
4820
4821 $opt_dry_run || {
4822 # Make sure we have at least an empty file.
4823 test -f "$nlist" || : > "$nlist"
4824
4825 if test -n "$exclude_expsyms"; then
4826 $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
4827 $MV "$nlist"T "$nlist"
4828 fi
4829
4830 # Try sorting and uniquifying the output.
4831 if $GREP -v "^: " < "$nlist" |
4832 if sort -k 3 </dev/null >/dev/null 2>&1; then
4833 sort -k 3
4834 else
4835 sort +2
4836 fi |
4837 uniq > "$nlist"S; then
4838 :
4839 else
4840 $GREP -v "^: " < "$nlist" > "$nlist"S
4841 fi
4842
4843 if test -f "$nlist"S; then
4844 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
4845 else
4846 echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
4847 fi
4848
4849 func_show_eval '$RM "${nlist}I"'
4850 if test -n "$global_symbol_to_import"; then
4851 eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I'
4852 fi
4853
4854 echo >> "$output_objdir/$my_dlsyms" "\
4855
4856 /* The mapping between symbol names and symbols. */
4857 typedef struct {
4858 const char *name;
4859 void *address;
4860 } lt_dlsymlist;
4861 extern LT_DLSYM_CONST lt_dlsymlist
4862 lt_${my_prefix}_LTX_preloaded_symbols[];\
4863 "
4864
4865 if test -s "$nlist"I; then
4866 echo >> "$output_objdir/$my_dlsyms" "\
4867 static void lt_syminit(void)
4868 {
4869 LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols;
4870 for (; symbol->name; ++symbol)
4871 {"
4872 $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms"
4873 echo >> "$output_objdir/$my_dlsyms" "\
4874 }
4875 }"
4876 fi
4877 echo >> "$output_objdir/$my_dlsyms" "\
4878 LT_DLSYM_CONST lt_dlsymlist
4879 lt_${my_prefix}_LTX_preloaded_symbols[] =
4880 { {\"$my_originator\", (void *) 0},"
4881
4882 if test -s "$nlist"I; then
4883 echo >> "$output_objdir/$my_dlsyms" "\
4884 {\"@INIT@\", (void *) &lt_syminit},"
4885 fi
4886
4887 case $need_lib_prefix in
4888 no)
4889 eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
4890 ;;
4891 *)
4892 eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
4893 ;;
4894 esac
4895 echo >> "$output_objdir/$my_dlsyms" "\
4896 {0, (void *) 0}
4897 };
4898
4899 /* This works around a problem in FreeBSD linker */
4900 #ifdef FREEBSD_WORKAROUND
4901 static const void *lt_preloaded_setup() {
4902 return lt_${my_prefix}_LTX_preloaded_symbols;
4903 }
4904 #endif
4905
4906 #ifdef __cplusplus
4907 }
4908 #endif\
4909 "
4910 } # !$opt_dry_run
4911
4912 pic_flag_for_symtable=
4913 case "$compile_command " in
4914 *" -static "*) ;;
4915 *)
4916 case $host in
4917 # compiling the symbol table file with pic_flag works around
4918 # a FreeBSD bug that causes programs to crash when -lm is
4919 # linked before any other PIC object. But we must not use
4920 # pic_flag when linking with -static. The problem exists in
4921 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
4922 *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
4923 pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
4924 *-*-hpux*)
4925 pic_flag_for_symtable=" $pic_flag" ;;
4926 *)
4927 $my_pic_p && pic_flag_for_symtable=" $pic_flag"
4928 ;;
4929 esac
4930 ;;
4931 esac
4932 symtab_cflags=
4933 for arg in $LTCFLAGS; do
4934 case $arg in
4935 -pie | -fpie | -fPIE) ;;
4936 *) func_append symtab_cflags " $arg" ;;
4937 esac
4938 done
4939
4940 # Now compile the dynamic symbol file.
4941 func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
4942
4943 # Clean up the generated files.
4944 func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"'
4945
4946 # Transform the symbol file into the correct name.
4947 symfileobj=$output_objdir/${my_outputname}S.$objext
4948 case $host in
4949 *cygwin* | *mingw* | *cegcc* )
4950 if test -f "$output_objdir/$my_outputname.def"; then
4951 compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
4952 finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
4953 else
4954 compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
4955 finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
4956 fi
4957 ;;
4958 *)
4959 compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
4960 finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
4961 ;;
4962 esac
4963 ;;
4964 *)
4965 func_fatal_error "unknown suffix for '$my_dlsyms'"
4966 ;;
4967 esac
4968 else
4969 # We keep going just in case the user didn't refer to
4970 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
4971 # really was required.
4972
4973 # Nullify the symbol file.
4974 compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"`
4975 finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"`
4976 fi
4977 }
4978
4979 # func_cygming_gnu_implib_p ARG
4980 # This predicate returns with zero status (TRUE) if
4981 # ARG is a GNU/binutils-style import library. Returns
4982 # with nonzero status (FALSE) otherwise.
4983 func_cygming_gnu_implib_p ()
4984 {
4985 $debug_cmd
4986
4987 func_to_tool_file "$1" func_convert_file_msys_to_w32
4988 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
4989 test -n "$func_cygming_gnu_implib_tmp"
4990 }
4991
4992 # func_cygming_ms_implib_p ARG
4993 # This predicate returns with zero status (TRUE) if
4994 # ARG is an MS-style import library. Returns
4995 # with nonzero status (FALSE) otherwise.
4996 func_cygming_ms_implib_p ()
4997 {
4998 $debug_cmd
4999
5000 func_to_tool_file "$1" func_convert_file_msys_to_w32
5001 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
5002 test -n "$func_cygming_ms_implib_tmp"
5003 }
5004
5005 # func_win32_libid arg
5006 # return the library type of file 'arg'
5007 #
5008 # Need a lot of goo to handle *both* DLLs and import libs
5009 # Has to be a shell function in order to 'eat' the argument
5010 # that is supplied when $file_magic_command is called.
5011 # Despite the name, also deal with 64 bit binaries.
5012 func_win32_libid ()
5013 {
5014 $debug_cmd
5015
5016 win32_libid_type=unknown
5017 win32_fileres=`file -L $1 2>/dev/null`
5018 case $win32_fileres in
5019 *ar\ archive\ import\ library*) # definitely import
5020 win32_libid_type="x86 archive import"
5021 ;;
5022 *ar\ archive*) # could be an import, or static
5023 # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
5024 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
5025 $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
5026 case $nm_interface in
5027 "MS dumpbin")
5028 if func_cygming_ms_implib_p "$1" ||
5029 func_cygming_gnu_implib_p "$1"
5030 then
5031 win32_nmres=import
5032 else
5033 win32_nmres=
5034 fi
5035 ;;
5036 *)
5037 func_to_tool_file "$1" func_convert_file_msys_to_w32
5038 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
5039 $SED -n -e '
5040 1,100{
5041 / I /{
5042 s|.*|import|
5043 p
5044 q
5045 }
5046 }'`
5047 ;;
5048 esac
5049 case $win32_nmres in
5050 import*) win32_libid_type="x86 archive import";;
5051 *) win32_libid_type="x86 archive static";;
5052 esac
5053 fi
5054 ;;
5055 *DLL*)
5056 win32_libid_type="x86 DLL"
5057 ;;
5058 *executable*) # but shell scripts are "executable" too...
5059 case $win32_fileres in
5060 *MS\ Windows\ PE\ Intel*)
5061 win32_libid_type="x86 DLL"
5062 ;;
5063 esac
5064 ;;
5065 esac
5066 $ECHO "$win32_libid_type"
5067 }
5068
5069 # func_cygming_dll_for_implib ARG
5070 #
5071 # Platform-specific function to extract the
5072 # name of the DLL associated with the specified
5073 # import library ARG.
5074 # Invoked by eval'ing the libtool variable
5075 # $sharedlib_from_linklib_cmd
5076 # Result is available in the variable
5077 # $sharedlib_from_linklib_result
5078 func_cygming_dll_for_implib ()
5079 {
5080 $debug_cmd
5081
5082 sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
5083 }
5084
5085 # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs
5086 #
5087 # The is the core of a fallback implementation of a
5088 # platform-specific function to extract the name of the
5089 # DLL associated with the specified import library LIBNAME.
5090 #
5091 # SECTION_NAME is either .idata$6 or .idata$7, depending
5092 # on the platform and compiler that created the implib.
5093 #
5094 # Echos the name of the DLL associated with the
5095 # specified import library.
5096 func_cygming_dll_for_implib_fallback_core ()
5097 {
5098 $debug_cmd
5099
5100 match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
5101 $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
5102 $SED '/^Contents of section '"$match_literal"':/{
5103 # Place marker at beginning of archive member dllname section
5104 s/.*/====MARK====/
5105 p
5106 d
5107 }
5108 # These lines can sometimes be longer than 43 characters, but
5109 # are always uninteresting
5110 /:[ ]*file format pe[i]\{,1\}-/d
5111 /^In archive [^:]*:/d
5112 # Ensure marker is printed
5113 /^====MARK====/p
5114 # Remove all lines with less than 43 characters
5115 /^.\{43\}/!d
5116 # From remaining lines, remove first 43 characters
5117 s/^.\{43\}//' |
5118 $SED -n '
5119 # Join marker and all lines until next marker into a single line
5120 /^====MARK====/ b para
5121 H
5122 $ b para
5123 b
5124 :para
5125 x
5126 s/\n//g
5127 # Remove the marker
5128 s/^====MARK====//
5129 # Remove trailing dots and whitespace
5130 s/[\. \t]*$//
5131 # Print
5132 /./p' |
5133 # we now have a list, one entry per line, of the stringified
5134 # contents of the appropriate section of all members of the
5135 # archive that possess that section. Heuristic: eliminate
5136 # all those that have a first or second character that is
5137 # a '.' (that is, objdump's representation of an unprintable
5138 # character.) This should work for all archives with less than
5139 # 0x302f exports -- but will fail for DLLs whose name actually
5140 # begins with a literal '.' or a single character followed by
5141 # a '.'.
5142 #
5143 # Of those that remain, print the first one.
5144 $SED -e '/^\./d;/^.\./d;q'
5145 }
5146
5147 # func_cygming_dll_for_implib_fallback ARG
5148 # Platform-specific function to extract the
5149 # name of the DLL associated with the specified
5150 # import library ARG.
5151 #
5152 # This fallback implementation is for use when $DLLTOOL
5153 # does not support the --identify-strict option.
5154 # Invoked by eval'ing the libtool variable
5155 # $sharedlib_from_linklib_cmd
5156 # Result is available in the variable
5157 # $sharedlib_from_linklib_result
5158 func_cygming_dll_for_implib_fallback ()
5159 {
5160 $debug_cmd
5161
5162 if func_cygming_gnu_implib_p "$1"; then
5163 # binutils import library
5164 sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
5165 elif func_cygming_ms_implib_p "$1"; then
5166 # ms-generated import library
5167 sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
5168 else
5169 # unknown
5170 sharedlib_from_linklib_result=
5171 fi
5172 }
5173
5174
5175 # func_extract_an_archive dir oldlib
5176 func_extract_an_archive ()
5177 {
5178 $debug_cmd
5179
5180 f_ex_an_ar_dir=$1; shift
5181 f_ex_an_ar_oldlib=$1
5182 if test yes = "$lock_old_archive_extraction"; then
5183 lockfile=$f_ex_an_ar_oldlib.lock
5184 until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
5185 func_echo "Waiting for $lockfile to be removed"
5186 sleep 2
5187 done
5188 fi
5189 func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
5190 'stat=$?; rm -f "$lockfile"; exit $stat'
5191 if test yes = "$lock_old_archive_extraction"; then
5192 $opt_dry_run || rm -f "$lockfile"
5193 fi
5194 if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
5195 :
5196 else
5197 func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
5198 fi
5199 }
5200
5201
5202 # func_extract_archives gentop oldlib ...
5203 func_extract_archives ()
5204 {
5205 $debug_cmd
5206
5207 my_gentop=$1; shift
5208 my_oldlibs=${1+"$@"}
5209 my_oldobjs=
5210 my_xlib=
5211 my_xabs=
5212 my_xdir=
5213
5214 for my_xlib in $my_oldlibs; do
5215 # Extract the objects.
5216 case $my_xlib in
5217 [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;;
5218 *) my_xabs=`pwd`"/$my_xlib" ;;
5219 esac
5220 func_basename "$my_xlib"
5221 my_xlib=$func_basename_result
5222 my_xlib_u=$my_xlib
5223 while :; do
5224 case " $extracted_archives " in
5225 *" $my_xlib_u "*)
5226 func_arith $extracted_serial + 1
5227 extracted_serial=$func_arith_result
5228 my_xlib_u=lt$extracted_serial-$my_xlib ;;
5229 *) break ;;
5230 esac
5231 done
5232 extracted_archives="$extracted_archives $my_xlib_u"
5233 my_xdir=$my_gentop/$my_xlib_u
5234
5235 func_mkdir_p "$my_xdir"
5236
5237 case $host in
5238 *-darwin*)
5239 func_verbose "Extracting $my_xabs"
5240 # Do not bother doing anything if just a dry run
5241 $opt_dry_run || {
5242 darwin_orig_dir=`pwd`
5243 cd $my_xdir || exit $?
5244 darwin_archive=$my_xabs
5245 darwin_curdir=`pwd`
5246 func_basename "$darwin_archive"
5247 darwin_base_archive=$func_basename_result
5248 darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
5249 if test -n "$darwin_arches"; then
5250 darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
5251 darwin_arch=
5252 func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
5253 for darwin_arch in $darwin_arches; do
5254 func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch"
5255 $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive"
5256 cd "unfat-$$/$darwin_base_archive-$darwin_arch"
5257 func_extract_an_archive "`pwd`" "$darwin_base_archive"
5258 cd "$darwin_curdir"
5259 $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive"
5260 done # $darwin_arches
5261 ## Okay now we've a bunch of thin objects, gotta fatten them up :)
5262 darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u`
5263 darwin_file=
5264 darwin_files=
5265 for darwin_file in $darwin_filelist; do
5266 darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP`
5267 $LIPO -create -output "$darwin_file" $darwin_files
5268 done # $darwin_filelist
5269 $RM -rf unfat-$$
5270 cd "$darwin_orig_dir"
5271 else
5272 cd $darwin_orig_dir
5273 func_extract_an_archive "$my_xdir" "$my_xabs"
5274 fi # $darwin_arches
5275 } # !$opt_dry_run
5276 ;;
5277 *)
5278 func_extract_an_archive "$my_xdir" "$my_xabs"
5279 ;;
5280 esac
5281 my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
5282 done
5283
5284 func_extract_archives_result=$my_oldobjs
5285 }
5286
5287
5288 # func_emit_wrapper [arg=no]
5289 #
5290 # Emit a libtool wrapper script on stdout.
5291 # Don't directly open a file because we may want to
5292 # incorporate the script contents within a cygwin/mingw
5293 # wrapper executable. Must ONLY be called from within
5294 # func_mode_link because it depends on a number of variables
5295 # set therein.
5296 #
5297 # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
5298 # variable will take. If 'yes', then the emitted script
5299 # will assume that the directory where it is stored is
5300 # the $objdir directory. This is a cygwin/mingw-specific
5301 # behavior.
5302 func_emit_wrapper ()
5303 {
5304 func_emit_wrapper_arg1=${1-no}
5305
5306 $ECHO "\
5307 #! $SHELL
5308
5309 # $output - temporary wrapper script for $objdir/$outputname
5310 # Generated by $PROGRAM (GNU $PACKAGE) $VERSION
5311 #
5312 # The $output program cannot be directly executed until all the libtool
5313 # libraries that it depends on are installed.
5314 #
5315 # This wrapper script should never be moved out of the build directory.
5316 # If it is, it will not operate correctly.
5317
5318 # Sed substitution that helps us do robust quoting. It backslashifies
5319 # metacharacters that are still active within double-quoted strings.
5320 sed_quote_subst='$sed_quote_subst'
5321
5322 # Be Bourne compatible
5323 if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
5324 emulate sh
5325 NULLCMD=:
5326 # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
5327 # is contrary to our usage. Disable this feature.
5328 alias -g '\${1+\"\$@\"}'='\"\$@\"'
5329 setopt NO_GLOB_SUBST
5330 else
5331 case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
5332 fi
5333 BIN_SH=xpg4; export BIN_SH # for Tru64
5334 DUALCASE=1; export DUALCASE # for MKS sh
5335
5336 # The HP-UX ksh and POSIX shell print the target directory to stdout
5337 # if CDPATH is set.
5338 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5339
5340 relink_command=\"$relink_command\"
5341
5342 # This environment variable determines our operation mode.
5343 if test \"\$libtool_install_magic\" = \"$magic\"; then
5344 # install mode needs the following variables:
5345 generated_by_libtool_version='$macro_version'
5346 notinst_deplibs='$notinst_deplibs'
5347 else
5348 # When we are sourced in execute mode, \$file and \$ECHO are already set.
5349 if test \"\$libtool_execute_magic\" != \"$magic\"; then
5350 file=\"\$0\""
5351
5352 qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
5353 $ECHO "\
5354
5355 # A function that is used when there is no print builtin or printf.
5356 func_fallback_echo ()
5357 {
5358 eval 'cat <<_LTECHO_EOF
5359 \$1
5360 _LTECHO_EOF'
5361 }
5362 ECHO=\"$qECHO\"
5363 fi
5364
5365 # Very basic option parsing. These options are (a) specific to
5366 # the libtool wrapper, (b) are identical between the wrapper
5367 # /script/ and the wrapper /executable/ that is used only on
5368 # windows platforms, and (c) all begin with the string "--lt-"
5369 # (application programs are unlikely to have options that match
5370 # this pattern).
5371 #
5372 # There are only two supported options: --lt-debug and
5373 # --lt-dump-script. There is, deliberately, no --lt-help.
5374 #
5375 # The first argument to this parsing function should be the
5376 # script's $0 value, followed by "$@".
5377 lt_option_debug=
5378 func_parse_lt_options ()
5379 {
5380 lt_script_arg0=\$0
5381 shift
5382 for lt_opt
5383 do
5384 case \"\$lt_opt\" in
5385 --lt-debug) lt_option_debug=1 ;;
5386 --lt-dump-script)
5387 lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\`
5388 test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=.
5389 lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\`
5390 cat \"\$lt_dump_D/\$lt_dump_F\"
5391 exit 0
5392 ;;
5393 --lt-*)
5394 \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2
5395 exit 1
5396 ;;
5397 esac
5398 done
5399
5400 # Print the debug banner immediately:
5401 if test -n \"\$lt_option_debug\"; then
5402 echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2
5403 fi
5404 }
5405
5406 # Used when --lt-debug. Prints its arguments to stdout
5407 # (redirection is the responsibility of the caller)
5408 func_lt_dump_args ()
5409 {
5410 lt_dump_args_N=1;
5411 for lt_arg
5412 do
5413 \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\"
5414 lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
5415 done
5416 }
5417
5418 # Core function for launching the target application
5419 func_exec_program_core ()
5420 {
5421 "
5422 case $host in
5423 # Backslashes separate directories on plain windows
5424 *-*-mingw | *-*-os2* | *-cegcc*)
5425 $ECHO "\
5426 if test -n \"\$lt_option_debug\"; then
5427 \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2
5428 func_lt_dump_args \${1+\"\$@\"} 1>&2
5429 fi
5430 exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
5431 "
5432 ;;
5433
5434 *)
5435 $ECHO "\
5436 if test -n \"\$lt_option_debug\"; then
5437 \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2
5438 func_lt_dump_args \${1+\"\$@\"} 1>&2
5439 fi
5440 exec \"\$progdir/\$program\" \${1+\"\$@\"}
5441 "
5442 ;;
5443 esac
5444 $ECHO "\
5445 \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
5446 exit 1
5447 }
5448
5449 # A function to encapsulate launching the target application
5450 # Strips options in the --lt-* namespace from \$@ and
5451 # launches target application with the remaining arguments.
5452 func_exec_program ()
5453 {
5454 case \" \$* \" in
5455 *\\ --lt-*)
5456 for lt_wr_arg
5457 do
5458 case \$lt_wr_arg in
5459 --lt-*) ;;
5460 *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
5461 esac
5462 shift
5463 done ;;
5464 esac
5465 func_exec_program_core \${1+\"\$@\"}
5466 }
5467
5468 # Parse options
5469 func_parse_lt_options \"\$0\" \${1+\"\$@\"}
5470
5471 # Find the directory that this script lives in.
5472 thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\`
5473 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
5474
5475 # Follow symbolic links until we get to the real thisdir.
5476 file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\`
5477 while test -n \"\$file\"; do
5478 destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\`
5479
5480 # If there was a directory component, then change thisdir.
5481 if test \"x\$destdir\" != \"x\$file\"; then
5482 case \"\$destdir\" in
5483 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
5484 *) thisdir=\"\$thisdir/\$destdir\" ;;
5485 esac
5486 fi
5487
5488 file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\`
5489 file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
5490 done
5491
5492 # Usually 'no', except on cygwin/mingw when embedded into
5493 # the cwrapper.
5494 WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
5495 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
5496 # special case for '.'
5497 if test \"\$thisdir\" = \".\"; then
5498 thisdir=\`pwd\`
5499 fi
5500 # remove .libs from thisdir
5501 case \"\$thisdir\" in
5502 *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;;
5503 $objdir ) thisdir=. ;;
5504 esac
5505 fi
5506
5507 # Try to get the absolute directory name.
5508 absdir=\`cd \"\$thisdir\" && pwd\`
5509 test -n \"\$absdir\" && thisdir=\"\$absdir\"
5510 "
5511
5512 if test yes = "$fast_install"; then
5513 $ECHO "\
5514 program=lt-'$outputname'$exeext
5515 progdir=\"\$thisdir/$objdir\"
5516
5517 if test ! -f \"\$progdir/\$program\" ||
5518 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\
5519 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
5520
5521 file=\"\$\$-\$program\"
5522
5523 if test ! -d \"\$progdir\"; then
5524 $MKDIR \"\$progdir\"
5525 else
5526 $RM \"\$progdir/\$file\"
5527 fi"
5528
5529 $ECHO "\
5530
5531 # relink executable if necessary
5532 if test -n \"\$relink_command\"; then
5533 if relink_command_output=\`eval \$relink_command 2>&1\`; then :
5534 else
5535 \$ECHO \"\$relink_command_output\" >&2
5536 $RM \"\$progdir/\$file\"
5537 exit 1
5538 fi
5539 fi
5540
5541 $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
5542 { $RM \"\$progdir/\$program\";
5543 $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
5544 $RM \"\$progdir/\$file\"
5545 fi"
5546 else
5547 $ECHO "\
5548 program='$outputname'
5549 progdir=\"\$thisdir/$objdir\"
5550 "
5551 fi
5552
5553 $ECHO "\
5554
5555 if test -f \"\$progdir/\$program\"; then"
5556
5557 # fixup the dll searchpath if we need to.
5558 #
5559 # Fix the DLL searchpath if we need to. Do this before prepending
5560 # to shlibpath, because on Windows, both are PATH and uninstalled
5561 # libraries must come first.
5562 if test -n "$dllsearchpath"; then
5563 $ECHO "\
5564 # Add the dll search path components to the executable PATH
5565 PATH=$dllsearchpath:\$PATH
5566 "
5567 fi
5568
5569 # Export our shlibpath_var if we have one.
5570 if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
5571 $ECHO "\
5572 # Add our own library path to $shlibpath_var
5573 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
5574
5575 # Some systems cannot cope with colon-terminated $shlibpath_var
5576 # The second colon is a workaround for a bug in BeOS R4 sed
5577 $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\`
5578
5579 export $shlibpath_var
5580 "
5581 fi
5582
5583 $ECHO "\
5584 if test \"\$libtool_execute_magic\" != \"$magic\"; then
5585 # Run the actual program with our arguments.
5586 func_exec_program \${1+\"\$@\"}
5587 fi
5588 else
5589 # The program doesn't exist.
5590 \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2
5591 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
5592 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
5593 exit 1
5594 fi
5595 fi\
5596 "
5597 }
5598
5599
5600 # func_emit_cwrapperexe_src
5601 # emit the source code for a wrapper executable on stdout
5602 # Must ONLY be called from within func_mode_link because
5603 # it depends on a number of variable set therein.
5604 func_emit_cwrapperexe_src ()
5605 {
5606 cat <<EOF
5607
5608 /* $cwrappersource - temporary wrapper executable for $objdir/$outputname
5609 Generated by $PROGRAM (GNU $PACKAGE) $VERSION
5610
5611 The $output program cannot be directly executed until all the libtool
5612 libraries that it depends on are installed.
5613
5614 This wrapper executable should never be moved out of the build directory.
5615 If it is, it will not operate correctly.
5616 */
5617 EOF
5618 cat <<"EOF"
5619 #ifdef _MSC_VER
5620 # define _CRT_SECURE_NO_DEPRECATE 1
5621 #endif
5622 #include <stdio.h>
5623 #include <stdlib.h>
5624 #ifdef _MSC_VER
5625 # include <direct.h>
5626 # include <process.h>
5627 # include <io.h>
5628 #else
5629 # include <unistd.h>
5630 # include <stdint.h>
5631 # ifdef __CYGWIN__
5632 # include <io.h>
5633 # endif
5634 #endif
5635 #include <malloc.h>
5636 #include <stdarg.h>
5637 #include <assert.h>
5638 #include <string.h>
5639 #include <ctype.h>
5640 #include <errno.h>
5641 #include <fcntl.h>
5642 #include <sys/stat.h>
5643
5644 #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0)
5645
5646 /* declarations of non-ANSI functions */
5647 #if defined __MINGW32__
5648 # ifdef __STRICT_ANSI__
5649 int _putenv (const char *);
5650 # endif
5651 #elif defined __CYGWIN__
5652 # ifdef __STRICT_ANSI__
5653 char *realpath (const char *, char *);
5654 int putenv (char *);
5655 int setenv (const char *, const char *, int);
5656 # endif
5657 /* #elif defined other_platform || defined ... */
5658 #endif
5659
5660 /* portability defines, excluding path handling macros */
5661 #if defined _MSC_VER
5662 # define setmode _setmode
5663 # define stat _stat
5664 # define chmod _chmod
5665 # define getcwd _getcwd
5666 # define putenv _putenv
5667 # define S_IXUSR _S_IEXEC
5668 #elif defined __MINGW32__
5669 # define setmode _setmode
5670 # define stat _stat
5671 # define chmod _chmod
5672 # define getcwd _getcwd
5673 # define putenv _putenv
5674 #elif defined __CYGWIN__
5675 # define HAVE_SETENV
5676 # define FOPEN_WB "wb"
5677 /* #elif defined other platforms ... */
5678 #endif
5679
5680 #if defined PATH_MAX
5681 # define LT_PATHMAX PATH_MAX
5682 #elif defined MAXPATHLEN
5683 # define LT_PATHMAX MAXPATHLEN
5684 #else
5685 # define LT_PATHMAX 1024
5686 #endif
5687
5688 #ifndef S_IXOTH
5689 # define S_IXOTH 0
5690 #endif
5691 #ifndef S_IXGRP
5692 # define S_IXGRP 0
5693 #endif
5694
5695 /* path handling portability macros */
5696 #ifndef DIR_SEPARATOR
5697 # define DIR_SEPARATOR '/'
5698 # define PATH_SEPARATOR ':'
5699 #endif
5700
5701 #if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \
5702 defined __OS2__
5703 # define HAVE_DOS_BASED_FILE_SYSTEM
5704 # define FOPEN_WB "wb"
5705 # ifndef DIR_SEPARATOR_2
5706 # define DIR_SEPARATOR_2 '\\'
5707 # endif
5708 # ifndef PATH_SEPARATOR_2
5709 # define PATH_SEPARATOR_2 ';'
5710 # endif
5711 #endif
5712
5713 #ifndef DIR_SEPARATOR_2
5714 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
5715 #else /* DIR_SEPARATOR_2 */
5716 # define IS_DIR_SEPARATOR(ch) \
5717 (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
5718 #endif /* DIR_SEPARATOR_2 */
5719
5720 #ifndef PATH_SEPARATOR_2
5721 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
5722 #else /* PATH_SEPARATOR_2 */
5723 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
5724 #endif /* PATH_SEPARATOR_2 */
5725
5726 #ifndef FOPEN_WB
5727 # define FOPEN_WB "w"
5728 #endif
5729 #ifndef _O_BINARY
5730 # define _O_BINARY 0
5731 #endif
5732
5733 #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
5734 #define XFREE(stale) do { \
5735 if (stale) { free (stale); stale = 0; } \
5736 } while (0)
5737
5738 #if defined LT_DEBUGWRAPPER
5739 static int lt_debug = 1;
5740 #else
5741 static int lt_debug = 0;
5742 #endif
5743
5744 const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */
5745
5746 void *xmalloc (size_t num);
5747 char *xstrdup (const char *string);
5748 const char *base_name (const char *name);
5749 char *find_executable (const char *wrapper);
5750 char *chase_symlinks (const char *pathspec);
5751 int make_executable (const char *path);
5752 int check_executable (const char *path);
5753 char *strendzap (char *str, const char *pat);
5754 void lt_debugprintf (const char *file, int line, const char *fmt, ...);
5755 void lt_fatal (const char *file, int line, const char *message, ...);
5756 static const char *nonnull (const char *s);
5757 static const char *nonempty (const char *s);
5758 void lt_setenv (const char *name, const char *value);
5759 char *lt_extend_str (const char *orig_value, const char *add, int to_end);
5760 void lt_update_exe_path (const char *name, const char *value);
5761 void lt_update_lib_path (const char *name, const char *value);
5762 char **prepare_spawn (char **argv);
5763 void lt_dump_script (FILE *f);
5764 EOF
5765
5766 cat <<EOF
5767 #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
5768 # define externally_visible volatile
5769 #else
5770 # define externally_visible __attribute__((externally_visible)) volatile
5771 #endif
5772 externally_visible const char * MAGIC_EXE = "$magic_exe";
5773 const char * LIB_PATH_VARNAME = "$shlibpath_var";
5774 EOF
5775
5776 if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
5777 func_to_host_path "$temp_rpath"
5778 cat <<EOF
5779 const char * LIB_PATH_VALUE = "$func_to_host_path_result";
5780 EOF
5781 else
5782 cat <<"EOF"
5783 const char * LIB_PATH_VALUE = "";
5784 EOF
5785 fi
5786
5787 if test -n "$dllsearchpath"; then
5788 func_to_host_path "$dllsearchpath:"
5789 cat <<EOF
5790 const char * EXE_PATH_VARNAME = "PATH";
5791 const char * EXE_PATH_VALUE = "$func_to_host_path_result";
5792 EOF
5793 else
5794 cat <<"EOF"
5795 const char * EXE_PATH_VARNAME = "";
5796 const char * EXE_PATH_VALUE = "";
5797 EOF
5798 fi
5799
5800 if test yes = "$fast_install"; then
5801 cat <<EOF
5802 const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
5803 EOF
5804 else
5805 cat <<EOF
5806 const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
5807 EOF
5808 fi
5809
5810
5811 cat <<"EOF"
5812
5813 #define LTWRAPPER_OPTION_PREFIX "--lt-"
5814
5815 static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
5816 static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script";
5817 static const char *debug_opt = LTWRAPPER_OPTION_PREFIX "debug";
5818
5819 int
5820 main (int argc, char *argv[])
5821 {
5822 char **newargz;
5823 int newargc;
5824 char *tmp_pathspec;
5825 char *actual_cwrapper_path;
5826 char *actual_cwrapper_name;
5827 char *target_name;
5828 char *lt_argv_zero;
5829 int rval = 127;
5830
5831 int i;
5832
5833 program_name = (char *) xstrdup (base_name (argv[0]));
5834 newargz = XMALLOC (char *, (size_t) argc + 1);
5835
5836 /* very simple arg parsing; don't want to rely on getopt
5837 * also, copy all non cwrapper options to newargz, except
5838 * argz[0], which is handled differently
5839 */
5840 newargc=0;
5841 for (i = 1; i < argc; i++)
5842 {
5843 if (STREQ (argv[i], dumpscript_opt))
5844 {
5845 EOF
5846 case $host in
5847 *mingw* | *cygwin* )
5848 # make stdout use "unix" line endings
5849 echo " setmode(1,_O_BINARY);"
5850 ;;
5851 esac
5852
5853 cat <<"EOF"
5854 lt_dump_script (stdout);
5855 return 0;
5856 }
5857 if (STREQ (argv[i], debug_opt))
5858 {
5859 lt_debug = 1;
5860 continue;
5861 }
5862 if (STREQ (argv[i], ltwrapper_option_prefix))
5863 {
5864 /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
5865 namespace, but it is not one of the ones we know about and
5866 have already dealt with, above (inluding dump-script), then
5867 report an error. Otherwise, targets might begin to believe
5868 they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
5869 namespace. The first time any user complains about this, we'll
5870 need to make LTWRAPPER_OPTION_PREFIX a configure-time option
5871 or a configure.ac-settable value.
5872 */
5873 lt_fatal (__FILE__, __LINE__,
5874 "unrecognized %s option: '%s'",
5875 ltwrapper_option_prefix, argv[i]);
5876 }
5877 /* otherwise ... */
5878 newargz[++newargc] = xstrdup (argv[i]);
5879 }
5880 newargz[++newargc] = NULL;
5881
5882 EOF
5883 cat <<EOF
5884 /* The GNU banner must be the first non-error debug message */
5885 lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE) $VERSION\n");
5886 EOF
5887 cat <<"EOF"
5888 lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
5889 lt_debugprintf (__FILE__, __LINE__, "(main) program_name: %s\n", program_name);
5890
5891 tmp_pathspec = find_executable (argv[0]);
5892 if (tmp_pathspec == NULL)
5893 lt_fatal (__FILE__, __LINE__, "couldn't find %s", argv[0]);
5894 lt_debugprintf (__FILE__, __LINE__,
5895 "(main) found exe (before symlink chase) at: %s\n",
5896 tmp_pathspec);
5897
5898 actual_cwrapper_path = chase_symlinks (tmp_pathspec);
5899 lt_debugprintf (__FILE__, __LINE__,
5900 "(main) found exe (after symlink chase) at: %s\n",
5901 actual_cwrapper_path);
5902 XFREE (tmp_pathspec);
5903
5904 actual_cwrapper_name = xstrdup (base_name (actual_cwrapper_path));
5905 strendzap (actual_cwrapper_path, actual_cwrapper_name);
5906
5907 /* wrapper name transforms */
5908 strendzap (actual_cwrapper_name, ".exe");
5909 tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
5910 XFREE (actual_cwrapper_name);
5911 actual_cwrapper_name = tmp_pathspec;
5912 tmp_pathspec = 0;
5913
5914 /* target_name transforms -- use actual target program name; might have lt- prefix */
5915 target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
5916 strendzap (target_name, ".exe");
5917 tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
5918 XFREE (target_name);
5919 target_name = tmp_pathspec;
5920 tmp_pathspec = 0;
5921
5922 lt_debugprintf (__FILE__, __LINE__,
5923 "(main) libtool target name: %s\n",
5924 target_name);
5925 EOF
5926
5927 cat <<EOF
5928 newargz[0] =
5929 XMALLOC (char, (strlen (actual_cwrapper_path) +
5930 strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
5931 strcpy (newargz[0], actual_cwrapper_path);
5932 strcat (newargz[0], "$objdir");
5933 strcat (newargz[0], "/");
5934 EOF
5935
5936 cat <<"EOF"
5937 /* stop here, and copy so we don't have to do this twice */
5938 tmp_pathspec = xstrdup (newargz[0]);
5939
5940 /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
5941 strcat (newargz[0], actual_cwrapper_name);
5942
5943 /* DO want the lt- prefix here if it exists, so use target_name */
5944 lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
5945 XFREE (tmp_pathspec);
5946 tmp_pathspec = NULL;
5947 EOF
5948
5949 case $host_os in
5950 mingw*)
5951 cat <<"EOF"
5952 {
5953 char* p;
5954 while ((p = strchr (newargz[0], '\\')) != NULL)
5955 {
5956 *p = '/';
5957 }
5958 while ((p = strchr (lt_argv_zero, '\\')) != NULL)
5959 {
5960 *p = '/';
5961 }
5962 }
5963 EOF
5964 ;;
5965 esac
5966
5967 cat <<"EOF"
5968 XFREE (target_name);
5969 XFREE (actual_cwrapper_path);
5970 XFREE (actual_cwrapper_name);
5971
5972 lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
5973 lt_setenv ("DUALCASE", "1"); /* for MSK sh */
5974 /* Update the DLL searchpath. EXE_PATH_VALUE ($dllsearchpath) must
5975 be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath)
5976 because on Windows, both *_VARNAMEs are PATH but uninstalled
5977 libraries must come first. */
5978 lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
5979 lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
5980
5981 lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n",
5982 nonnull (lt_argv_zero));
5983 for (i = 0; i < newargc; i++)
5984 {
5985 lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n",
5986 i, nonnull (newargz[i]));
5987 }
5988
5989 EOF
5990
5991 case $host_os in
5992 mingw*)
5993 cat <<"EOF"
5994 /* execv doesn't actually work on mingw as expected on unix */
5995 newargz = prepare_spawn (newargz);
5996 rval = (int) _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
5997 if (rval == -1)
5998 {
5999 /* failed to start process */
6000 lt_debugprintf (__FILE__, __LINE__,
6001 "(main) failed to launch target \"%s\": %s\n",
6002 lt_argv_zero, nonnull (strerror (errno)));
6003 return 127;
6004 }
6005 return rval;
6006 EOF
6007 ;;
6008 *)
6009 cat <<"EOF"
6010 execv (lt_argv_zero, newargz);
6011 return rval; /* =127, but avoids unused variable warning */
6012 EOF
6013 ;;
6014 esac
6015
6016 cat <<"EOF"
6017 }
6018
6019 void *
6020 xmalloc (size_t num)
6021 {
6022 void *p = (void *) malloc (num);
6023 if (!p)
6024 lt_fatal (__FILE__, __LINE__, "memory exhausted");
6025
6026 return p;
6027 }
6028
6029 char *
6030 xstrdup (const char *string)
6031 {
6032 return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
6033 string) : NULL;
6034 }
6035
6036 const char *
6037 base_name (const char *name)
6038 {
6039 const char *base;
6040
6041 #if defined HAVE_DOS_BASED_FILE_SYSTEM
6042 /* Skip over the disk name in MSDOS pathnames. */
6043 if (isalpha ((unsigned char) name[0]) && name[1] == ':')
6044 name += 2;
6045 #endif
6046
6047 for (base = name; *name; name++)
6048 if (IS_DIR_SEPARATOR (*name))
6049 base = name + 1;
6050 return base;
6051 }
6052
6053 int
6054 check_executable (const char *path)
6055 {
6056 struct stat st;
6057
6058 lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n",
6059 nonempty (path));
6060 if ((!path) || (!*path))
6061 return 0;
6062
6063 if ((stat (path, &st) >= 0)
6064 && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
6065 return 1;
6066 else
6067 return 0;
6068 }
6069
6070 int
6071 make_executable (const char *path)
6072 {
6073 int rval = 0;
6074 struct stat st;
6075
6076 lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n",
6077 nonempty (path));
6078 if ((!path) || (!*path))
6079 return 0;
6080
6081 if (stat (path, &st) >= 0)
6082 {
6083 rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
6084 }
6085 return rval;
6086 }
6087
6088 /* Searches for the full path of the wrapper. Returns
6089 newly allocated full path name if found, NULL otherwise
6090 Does not chase symlinks, even on platforms that support them.
6091 */
6092 char *
6093 find_executable (const char *wrapper)
6094 {
6095 int has_slash = 0;
6096 const char *p;
6097 const char *p_next;
6098 /* static buffer for getcwd */
6099 char tmp[LT_PATHMAX + 1];
6100 size_t tmp_len;
6101 char *concat_name;
6102
6103 lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n",
6104 nonempty (wrapper));
6105
6106 if ((wrapper == NULL) || (*wrapper == '\0'))
6107 return NULL;
6108
6109 /* Absolute path? */
6110 #if defined HAVE_DOS_BASED_FILE_SYSTEM
6111 if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
6112 {
6113 concat_name = xstrdup (wrapper);
6114 if (check_executable (concat_name))
6115 return concat_name;
6116 XFREE (concat_name);
6117 }
6118 else
6119 {
6120 #endif
6121 if (IS_DIR_SEPARATOR (wrapper[0]))
6122 {
6123 concat_name = xstrdup (wrapper);
6124 if (check_executable (concat_name))
6125 return concat_name;
6126 XFREE (concat_name);
6127 }
6128 #if defined HAVE_DOS_BASED_FILE_SYSTEM
6129 }
6130 #endif
6131
6132 for (p = wrapper; *p; p++)
6133 if (*p == '/')
6134 {
6135 has_slash = 1;
6136 break;
6137 }
6138 if (!has_slash)
6139 {
6140 /* no slashes; search PATH */
6141 const char *path = getenv ("PATH");
6142 if (path != NULL)
6143 {
6144 for (p = path; *p; p = p_next)
6145 {
6146 const char *q;
6147 size_t p_len;
6148 for (q = p; *q; q++)
6149 if (IS_PATH_SEPARATOR (*q))
6150 break;
6151 p_len = (size_t) (q - p);
6152 p_next = (*q == '\0' ? q : q + 1);
6153 if (p_len == 0)
6154 {
6155 /* empty path: current directory */
6156 if (getcwd (tmp, LT_PATHMAX) == NULL)
6157 lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
6158 nonnull (strerror (errno)));
6159 tmp_len = strlen (tmp);
6160 concat_name =
6161 XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
6162 memcpy (concat_name, tmp, tmp_len);
6163 concat_name[tmp_len] = '/';
6164 strcpy (concat_name + tmp_len + 1, wrapper);
6165 }
6166 else
6167 {
6168 concat_name =
6169 XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
6170 memcpy (concat_name, p, p_len);
6171 concat_name[p_len] = '/';
6172 strcpy (concat_name + p_len + 1, wrapper);
6173 }
6174 if (check_executable (concat_name))
6175 return concat_name;
6176 XFREE (concat_name);
6177 }
6178 }
6179 /* not found in PATH; assume curdir */
6180 }
6181 /* Relative path | not found in path: prepend cwd */
6182 if (getcwd (tmp, LT_PATHMAX) == NULL)
6183 lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
6184 nonnull (strerror (errno)));
6185 tmp_len = strlen (tmp);
6186 concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
6187 memcpy (concat_name, tmp, tmp_len);
6188 concat_name[tmp_len] = '/';
6189 strcpy (concat_name + tmp_len + 1, wrapper);
6190
6191 if (check_executable (concat_name))
6192 return concat_name;
6193 XFREE (concat_name);
6194 return NULL;
6195 }
6196
6197 char *
6198 chase_symlinks (const char *pathspec)
6199 {
6200 #ifndef S_ISLNK
6201 return xstrdup (pathspec);
6202 #else
6203 char buf[LT_PATHMAX];
6204 struct stat s;
6205 char *tmp_pathspec = xstrdup (pathspec);
6206 char *p;
6207 int has_symlinks = 0;
6208 while (strlen (tmp_pathspec) && !has_symlinks)
6209 {
6210 lt_debugprintf (__FILE__, __LINE__,
6211 "checking path component for symlinks: %s\n",
6212 tmp_pathspec);
6213 if (lstat (tmp_pathspec, &s) == 0)
6214 {
6215 if (S_ISLNK (s.st_mode) != 0)
6216 {
6217 has_symlinks = 1;
6218 break;
6219 }
6220
6221 /* search backwards for last DIR_SEPARATOR */
6222 p = tmp_pathspec + strlen (tmp_pathspec) - 1;
6223 while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
6224 p--;
6225 if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
6226 {
6227 /* no more DIR_SEPARATORS left */
6228 break;
6229 }
6230 *p = '\0';
6231 }
6232 else
6233 {
6234 lt_fatal (__FILE__, __LINE__,
6235 "error accessing file \"%s\": %s",
6236 tmp_pathspec, nonnull (strerror (errno)));
6237 }
6238 }
6239 XFREE (tmp_pathspec);
6240
6241 if (!has_symlinks)
6242 {
6243 return xstrdup (pathspec);
6244 }
6245
6246 tmp_pathspec = realpath (pathspec, buf);
6247 if (tmp_pathspec == 0)
6248 {
6249 lt_fatal (__FILE__, __LINE__,
6250 "could not follow symlinks for %s", pathspec);
6251 }
6252 return xstrdup (tmp_pathspec);
6253 #endif
6254 }
6255
6256 char *
6257 strendzap (char *str, const char *pat)
6258 {
6259 size_t len, patlen;
6260
6261 assert (str != NULL);
6262 assert (pat != NULL);
6263
6264 len = strlen (str);
6265 patlen = strlen (pat);
6266
6267 if (patlen <= len)
6268 {
6269 str += len - patlen;
6270 if (STREQ (str, pat))
6271 *str = '\0';
6272 }
6273 return str;
6274 }
6275
6276 void
6277 lt_debugprintf (const char *file, int line, const char *fmt, ...)
6278 {
6279 va_list args;
6280 if (lt_debug)
6281 {
6282 (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line);
6283 va_start (args, fmt);
6284 (void) vfprintf (stderr, fmt, args);
6285 va_end (args);
6286 }
6287 }
6288
6289 static void
6290 lt_error_core (int exit_status, const char *file,
6291 int line, const char *mode,
6292 const char *message, va_list ap)
6293 {
6294 fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode);
6295 vfprintf (stderr, message, ap);
6296 fprintf (stderr, ".\n");
6297
6298 if (exit_status >= 0)
6299 exit (exit_status);
6300 }
6301
6302 void
6303 lt_fatal (const char *file, int line, const char *message, ...)
6304 {
6305 va_list ap;
6306 va_start (ap, message);
6307 lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap);
6308 va_end (ap);
6309 }
6310
6311 static const char *
6312 nonnull (const char *s)
6313 {
6314 return s ? s : "(null)";
6315 }
6316
6317 static const char *
6318 nonempty (const char *s)
6319 {
6320 return (s && !*s) ? "(empty)" : nonnull (s);
6321 }
6322
6323 void
6324 lt_setenv (const char *name, const char *value)
6325 {
6326 lt_debugprintf (__FILE__, __LINE__,
6327 "(lt_setenv) setting '%s' to '%s'\n",
6328 nonnull (name), nonnull (value));
6329 {
6330 #ifdef HAVE_SETENV
6331 /* always make a copy, for consistency with !HAVE_SETENV */
6332 char *str = xstrdup (value);
6333 setenv (name, str, 1);
6334 #else
6335 size_t len = strlen (name) + 1 + strlen (value) + 1;
6336 char *str = XMALLOC (char, len);
6337 sprintf (str, "%s=%s", name, value);
6338 if (putenv (str) != EXIT_SUCCESS)
6339 {
6340 XFREE (str);
6341 }
6342 #endif
6343 }
6344 }
6345
6346 char *
6347 lt_extend_str (const char *orig_value, const char *add, int to_end)
6348 {
6349 char *new_value;
6350 if (orig_value && *orig_value)
6351 {
6352 size_t orig_value_len = strlen (orig_value);
6353 size_t add_len = strlen (add);
6354 new_value = XMALLOC (char, add_len + orig_value_len + 1);
6355 if (to_end)
6356 {
6357 strcpy (new_value, orig_value);
6358 strcpy (new_value + orig_value_len, add);
6359 }
6360 else
6361 {
6362 strcpy (new_value, add);
6363 strcpy (new_value + add_len, orig_value);
6364 }
6365 }
6366 else
6367 {
6368 new_value = xstrdup (add);
6369 }
6370 return new_value;
6371 }
6372
6373 void
6374 lt_update_exe_path (const char *name, const char *value)
6375 {
6376 lt_debugprintf (__FILE__, __LINE__,
6377 "(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
6378 nonnull (name), nonnull (value));
6379
6380 if (name && *name && value && *value)
6381 {
6382 char *new_value = lt_extend_str (getenv (name), value, 0);
6383 /* some systems can't cope with a ':'-terminated path #' */
6384 size_t len = strlen (new_value);
6385 while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
6386 {
6387 new_value[--len] = '\0';
6388 }
6389 lt_setenv (name, new_value);
6390 XFREE (new_value);
6391 }
6392 }
6393
6394 void
6395 lt_update_lib_path (const char *name, const char *value)
6396 {
6397 lt_debugprintf (__FILE__, __LINE__,
6398 "(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
6399 nonnull (name), nonnull (value));
6400
6401 if (name && *name && value && *value)
6402 {
6403 char *new_value = lt_extend_str (getenv (name), value, 0);
6404 lt_setenv (name, new_value);
6405 XFREE (new_value);
6406 }
6407 }
6408
6409 EOF
6410 case $host_os in
6411 mingw*)
6412 cat <<"EOF"
6413
6414 /* Prepares an argument vector before calling spawn().
6415 Note that spawn() does not by itself call the command interpreter
6416 (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") :
6417 ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
6418 GetVersionEx(&v);
6419 v.dwPlatformId == VER_PLATFORM_WIN32_NT;
6420 }) ? "cmd.exe" : "command.com").
6421 Instead it simply concatenates the arguments, separated by ' ', and calls
6422 CreateProcess(). We must quote the arguments since Win32 CreateProcess()
6423 interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a
6424 special way:
6425 - Space and tab are interpreted as delimiters. They are not treated as
6426 delimiters if they are surrounded by double quotes: "...".
6427 - Unescaped double quotes are removed from the input. Their only effect is
6428 that within double quotes, space and tab are treated like normal
6429 characters.
6430 - Backslashes not followed by double quotes are not special.
6431 - But 2*n+1 backslashes followed by a double quote become
6432 n backslashes followed by a double quote (n >= 0):
6433 \" -> "
6434 \\\" -> \"
6435 \\\\\" -> \\"
6436 */
6437 #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
6438 #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
6439 char **
6440 prepare_spawn (char **argv)
6441 {
6442 size_t argc;
6443 char **new_argv;
6444 size_t i;
6445
6446 /* Count number of arguments. */
6447 for (argc = 0; argv[argc] != NULL; argc++)
6448 ;
6449
6450 /* Allocate new argument vector. */
6451 new_argv = XMALLOC (char *, argc + 1);
6452
6453 /* Put quoted arguments into the new argument vector. */
6454 for (i = 0; i < argc; i++)
6455 {
6456 const char *string = argv[i];
6457
6458 if (string[0] == '\0')
6459 new_argv[i] = xstrdup ("\"\"");
6460 else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL)
6461 {
6462 int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL);
6463 size_t length;
6464 unsigned int backslashes;
6465 const char *s;
6466 char *quoted_string;
6467 char *p;
6468
6469 length = 0;
6470 backslashes = 0;
6471 if (quote_around)
6472 length++;
6473 for (s = string; *s != '\0'; s++)
6474 {
6475 char c = *s;
6476 if (c == '"')
6477 length += backslashes + 1;
6478 length++;
6479 if (c == '\\')
6480 backslashes++;
6481 else
6482 backslashes = 0;
6483 }
6484 if (quote_around)
6485 length += backslashes + 1;
6486
6487 quoted_string = XMALLOC (char, length + 1);
6488
6489 p = quoted_string;
6490 backslashes = 0;
6491 if (quote_around)
6492 *p++ = '"';
6493 for (s = string; *s != '\0'; s++)
6494 {
6495 char c = *s;
6496 if (c == '"')
6497 {
6498 unsigned int j;
6499 for (j = backslashes + 1; j > 0; j--)
6500 *p++ = '\\';
6501 }
6502 *p++ = c;
6503 if (c == '\\')
6504 backslashes++;
6505 else
6506 backslashes = 0;
6507 }
6508 if (quote_around)
6509 {
6510 unsigned int j;
6511 for (j = backslashes; j > 0; j--)
6512 *p++ = '\\';
6513 *p++ = '"';
6514 }
6515 *p = '\0';
6516
6517 new_argv[i] = quoted_string;
6518 }
6519 else
6520 new_argv[i] = (char *) string;
6521 }
6522 new_argv[argc] = NULL;
6523
6524 return new_argv;
6525 }
6526 EOF
6527 ;;
6528 esac
6529
6530 cat <<"EOF"
6531 void lt_dump_script (FILE* f)
6532 {
6533 EOF
6534 func_emit_wrapper yes |
6535 $SED -n -e '
6536 s/^\(.\{79\}\)\(..*\)/\1\
6537 \2/
6538 h
6539 s/\([\\"]\)/\\\1/g
6540 s/$/\\n/
6541 s/\([^\n]*\).*/ fputs ("\1", f);/p
6542 g
6543 D'
6544 cat <<"EOF"
6545 }
6546 EOF
6547 }
6548 # end: func_emit_cwrapperexe_src
6549
6550 # func_win32_import_lib_p ARG
6551 # True if ARG is an import lib, as indicated by $file_magic_cmd
6552 func_win32_import_lib_p ()
6553 {
6554 $debug_cmd
6555
6556 case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
6557 *import*) : ;;
6558 *) false ;;
6559 esac
6560 }
6561
6562 # func_suncc_cstd_abi
6563 # !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!!
6564 # Several compiler flags select an ABI that is incompatible with the
6565 # Cstd library. Avoid specifying it if any are in CXXFLAGS.
6566 func_suncc_cstd_abi ()
6567 {
6568 $debug_cmd
6569
6570 case " $compile_command " in
6571 *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*)
6572 suncc_use_cstd_abi=no
6573 ;;
6574 *)
6575 suncc_use_cstd_abi=yes
6576 ;;
6577 esac
6578 }
6579
6580 # func_mode_link arg...
6581 func_mode_link ()
6582 {
6583 $debug_cmd
6584
6585 case $host in
6586 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
6587 # It is impossible to link a dll without this setting, and
6588 # we shouldn't force the makefile maintainer to figure out
6589 # what system we are compiling for in order to pass an extra
6590 # flag for every libtool invocation.
6591 # allow_undefined=no
6592
6593 # FIXME: Unfortunately, there are problems with the above when trying
6594 # to make a dll that has undefined symbols, in which case not
6595 # even a static library is built. For now, we need to specify
6596 # -no-undefined on the libtool link line when we can be certain
6597 # that all symbols are satisfied, otherwise we get a static library.
6598 allow_undefined=yes
6599 ;;
6600 *)
6601 allow_undefined=yes
6602 ;;
6603 esac
6604 libtool_args=$nonopt
6605 base_compile="$nonopt $@"
6606 compile_command=$nonopt
6607 finalize_command=$nonopt
6608
6609 compile_rpath=
6610 finalize_rpath=
6611 compile_shlibpath=
6612 finalize_shlibpath=
6613 convenience=
6614 old_convenience=
6615 deplibs=
6616 old_deplibs=
6617 compiler_flags=
6618 linker_flags=
6619 dllsearchpath=
6620 lib_search_path=`pwd`
6621 inst_prefix_dir=
6622 new_inherited_linker_flags=
6623
6624 avoid_version=no
6625 bindir=
6626 dlfiles=
6627 dlprefiles=
6628 dlself=no
6629 export_dynamic=no
6630 export_symbols=
6631 export_symbols_regex=
6632 generated=
6633 libobjs=
6634 ltlibs=
6635 module=no
6636 no_install=no
6637 objs=
6638 os2dllname=
6639 non_pic_objects=
6640 precious_files_regex=
6641 prefer_static_libs=no
6642 preload=false
6643 prev=
6644 prevarg=
6645 release=
6646 rpath=
6647 xrpath=
6648 perm_rpath=
6649 temp_rpath=
6650 thread_safe=no
6651 vinfo=
6652 vinfo_number=no
6653 weak_libs=
6654 single_module=$wl-single_module
6655 func_infer_tag $base_compile
6656
6657 # We need to know -static, to get the right output filenames.
6658 for arg
6659 do
6660 case $arg in
6661 -shared)
6662 test yes != "$build_libtool_libs" \
6663 && func_fatal_configuration "cannot build a shared library"
6664 build_old_libs=no
6665 break
6666 ;;
6667 -all-static | -static | -static-libtool-libs)
6668 case $arg in
6669 -all-static)
6670 if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then
6671 func_warning "complete static linking is impossible in this configuration"
6672 fi
6673 if test -n "$link_static_flag"; then
6674 dlopen_self=$dlopen_self_static
6675 fi
6676 prefer_static_libs=yes
6677 ;;
6678 -static)
6679 if test -z "$pic_flag" && test -n "$link_static_flag"; then
6680 dlopen_self=$dlopen_self_static
6681 fi
6682 prefer_static_libs=built
6683 ;;
6684 -static-libtool-libs)
6685 if test -z "$pic_flag" && test -n "$link_static_flag"; then
6686 dlopen_self=$dlopen_self_static
6687 fi
6688 prefer_static_libs=yes
6689 ;;
6690 esac
6691 build_libtool_libs=no
6692 build_old_libs=yes
6693 break
6694 ;;
6695 esac
6696 done
6697
6698 # See if our shared archives depend on static archives.
6699 test -n "$old_archive_from_new_cmds" && build_old_libs=yes
6700
6701 # Go through the arguments, transforming them on the way.
6702 while test "$#" -gt 0; do
6703 arg=$1
6704 shift
6705 func_quote_for_eval "$arg"
6706 qarg=$func_quote_for_eval_unquoted_result
6707 func_append libtool_args " $func_quote_for_eval_result"
6708
6709 # If the previous option needs an argument, assign it.
6710 if test -n "$prev"; then
6711 case $prev in
6712 output)
6713 func_append compile_command " @OUTPUT@"
6714 func_append finalize_command " @OUTPUT@"
6715 ;;
6716 esac
6717
6718 case $prev in
6719 bindir)
6720 bindir=$arg
6721 prev=
6722 continue
6723 ;;
6724 dlfiles|dlprefiles)
6725 $preload || {
6726 # Add the symbol object into the linking commands.
6727 func_append compile_command " @SYMFILE@"
6728 func_append finalize_command " @SYMFILE@"
6729 preload=:
6730 }
6731 case $arg in
6732 *.la | *.lo) ;; # We handle these cases below.
6733 force)
6734 if test no = "$dlself"; then
6735 dlself=needless
6736 export_dynamic=yes
6737 fi
6738 prev=
6739 continue
6740 ;;
6741 self)
6742 if test dlprefiles = "$prev"; then
6743 dlself=yes
6744 elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then
6745 dlself=yes
6746 else
6747 dlself=needless
6748 export_dynamic=yes
6749 fi
6750 prev=
6751 continue
6752 ;;
6753 *)
6754 if test dlfiles = "$prev"; then
6755 func_append dlfiles " $arg"
6756 else
6757 func_append dlprefiles " $arg"
6758 fi
6759 prev=
6760 continue
6761 ;;
6762 esac
6763 ;;
6764 expsyms)
6765 export_symbols=$arg
6766 test -f "$arg" \
6767 || func_fatal_error "symbol file '$arg' does not exist"
6768 prev=
6769 continue
6770 ;;
6771 expsyms_regex)
6772 export_symbols_regex=$arg
6773 prev=
6774 continue
6775 ;;
6776 framework)
6777 case $host in
6778 *-*-darwin*)
6779 case "$deplibs " in
6780 *" $qarg.ltframework "*) ;;
6781 *) func_append deplibs " $qarg.ltframework" # this is fixed later
6782 ;;
6783 esac
6784 ;;
6785 esac
6786 prev=
6787 continue
6788 ;;
6789 inst_prefix)
6790 inst_prefix_dir=$arg
6791 prev=
6792 continue
6793 ;;
6794 mllvm)
6795 # Clang does not use LLVM to link, so we can simply discard any
6796 # '-mllvm $arg' options when doing the link step.
6797 prev=
6798 continue
6799 ;;
6800 objectlist)
6801 if test -f "$arg"; then
6802 save_arg=$arg
6803 moreargs=
6804 for fil in `cat "$save_arg"`
6805 do
6806 # func_append moreargs " $fil"
6807 arg=$fil
6808 # A libtool-controlled object.
6809
6810 # Check to see that this really is a libtool object.
6811 if func_lalib_unsafe_p "$arg"; then
6812 pic_object=
6813 non_pic_object=
6814
6815 # Read the .lo file
6816 func_source "$arg"
6817
6818 if test -z "$pic_object" ||
6819 test -z "$non_pic_object" ||
6820 test none = "$pic_object" &&
6821 test none = "$non_pic_object"; then
6822 func_fatal_error "cannot find name of object for '$arg'"
6823 fi
6824
6825 # Extract subdirectory from the argument.
6826 func_dirname "$arg" "/" ""
6827 xdir=$func_dirname_result
6828
6829 if test none != "$pic_object"; then
6830 # Prepend the subdirectory the object is found in.
6831 pic_object=$xdir$pic_object
6832
6833 if test dlfiles = "$prev"; then
6834 if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then
6835 func_append dlfiles " $pic_object"
6836 prev=
6837 continue
6838 else
6839 # If libtool objects are unsupported, then we need to preload.
6840 prev=dlprefiles
6841 fi
6842 fi
6843
6844 # CHECK ME: I think I busted this. -Ossama
6845 if test dlprefiles = "$prev"; then
6846 # Preload the old-style object.
6847 func_append dlprefiles " $pic_object"
6848 prev=
6849 fi
6850
6851 # A PIC object.
6852 func_append libobjs " $pic_object"
6853 arg=$pic_object
6854 fi
6855
6856 # Non-PIC object.
6857 if test none != "$non_pic_object"; then
6858 # Prepend the subdirectory the object is found in.
6859 non_pic_object=$xdir$non_pic_object
6860
6861 # A standard non-PIC object
6862 func_append non_pic_objects " $non_pic_object"
6863 if test -z "$pic_object" || test none = "$pic_object"; then
6864 arg=$non_pic_object
6865 fi
6866 else
6867 # If the PIC object exists, use it instead.
6868 # $xdir was prepended to $pic_object above.
6869 non_pic_object=$pic_object
6870 func_append non_pic_objects " $non_pic_object"
6871 fi
6872 else
6873 # Only an error if not doing a dry-run.
6874 if $opt_dry_run; then
6875 # Extract subdirectory from the argument.
6876 func_dirname "$arg" "/" ""
6877 xdir=$func_dirname_result
6878
6879 func_lo2o "$arg"
6880 pic_object=$xdir$objdir/$func_lo2o_result
6881 non_pic_object=$xdir$func_lo2o_result
6882 func_append libobjs " $pic_object"
6883 func_append non_pic_objects " $non_pic_object"
6884 else
6885 func_fatal_error "'$arg' is not a valid libtool object"
6886 fi
6887 fi
6888 done
6889 else
6890 func_fatal_error "link input file '$arg' does not exist"
6891 fi
6892 arg=$save_arg
6893 prev=
6894 continue
6895 ;;
6896 os2dllname)
6897 os2dllname=$arg
6898 prev=
6899 continue
6900 ;;
6901 precious_regex)
6902 precious_files_regex=$arg
6903 prev=
6904 continue
6905 ;;
6906 release)
6907 release=-$arg
6908 prev=
6909 continue
6910 ;;
6911 rpath | xrpath)
6912 # We need an absolute path.
6913 case $arg in
6914 [\\/]* | [A-Za-z]:[\\/]*) ;;
6915 *)
6916 func_fatal_error "only absolute run-paths are allowed"
6917 ;;
6918 esac
6919 if test rpath = "$prev"; then
6920 case "$rpath " in
6921 *" $arg "*) ;;
6922 *) func_append rpath " $arg" ;;
6923 esac
6924 else
6925 case "$xrpath " in
6926 *" $arg "*) ;;
6927 *) func_append xrpath " $arg" ;;
6928 esac
6929 fi
6930 prev=
6931 continue
6932 ;;
6933 shrext)
6934 shrext_cmds=$arg
6935 prev=
6936 continue
6937 ;;
6938 weak)
6939 func_append weak_libs " $arg"
6940 prev=
6941 continue
6942 ;;
6943 xcclinker)
6944 func_append linker_flags " $qarg"
6945 func_append compiler_flags " $qarg"
6946 prev=
6947 func_append compile_command " $qarg"
6948 func_append finalize_command " $qarg"
6949 continue
6950 ;;
6951 xcompiler)
6952 func_append compiler_flags " $qarg"
6953 prev=
6954 func_append compile_command " $qarg"
6955 func_append finalize_command " $qarg"
6956 continue
6957 ;;
6958 xlinker)
6959 func_append linker_flags " $qarg"
6960 func_append compiler_flags " $wl$qarg"
6961 prev=
6962 func_append compile_command " $wl$qarg"
6963 func_append finalize_command " $wl$qarg"
6964 continue
6965 ;;
6966 *)
6967 eval "$prev=\"\$arg\""
6968 prev=
6969 continue
6970 ;;
6971 esac
6972 fi # test -n "$prev"
6973
6974 prevarg=$arg
6975
6976 case $arg in
6977 -all-static)
6978 if test -n "$link_static_flag"; then
6979 # See comment for -static flag below, for more details.
6980 func_append compile_command " $link_static_flag"
6981 func_append finalize_command " $link_static_flag"
6982 fi
6983 continue
6984 ;;
6985
6986 -allow-undefined)
6987 # FIXME: remove this flag sometime in the future.
6988 func_fatal_error "'-allow-undefined' must not be used because it is the default"
6989 ;;
6990
6991 -avoid-version)
6992 avoid_version=yes
6993 continue
6994 ;;
6995
6996 -bindir)
6997 prev=bindir
6998 continue
6999 ;;
7000
7001 -dlopen)
7002 prev=dlfiles
7003 continue
7004 ;;
7005
7006 -dlpreopen)
7007 prev=dlprefiles
7008 continue
7009 ;;
7010
7011 -export-dynamic)
7012 export_dynamic=yes
7013 continue
7014 ;;
7015
7016 -export-symbols | -export-symbols-regex)
7017 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
7018 func_fatal_error "more than one -exported-symbols argument is not allowed"
7019 fi
7020 if test X-export-symbols = "X$arg"; then
7021 prev=expsyms
7022 else
7023 prev=expsyms_regex
7024 fi
7025 continue
7026 ;;
7027
7028 -framework)
7029 prev=framework
7030 continue
7031 ;;
7032
7033 -inst-prefix-dir)
7034 prev=inst_prefix
7035 continue
7036 ;;
7037
7038 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
7039 # so, if we see these flags be careful not to treat them like -L
7040 -L[A-Z][A-Z]*:*)
7041 case $with_gcc/$host in
7042 no/*-*-irix* | /*-*-irix*)
7043 func_append compile_command " $arg"
7044 func_append finalize_command " $arg"
7045 ;;
7046 esac
7047 continue
7048 ;;
7049
7050 -L*)
7051 func_stripname "-L" '' "$arg"
7052 if test -z "$func_stripname_result"; then
7053 if test "$#" -gt 0; then
7054 func_fatal_error "require no space between '-L' and '$1'"
7055 else
7056 func_fatal_error "need path for '-L' option"
7057 fi
7058 fi
7059 func_resolve_sysroot "$func_stripname_result"
7060 dir=$func_resolve_sysroot_result
7061 # We need an absolute path.
7062 case $dir in
7063 [\\/]* | [A-Za-z]:[\\/]*) ;;
7064 *)
7065 absdir=`cd "$dir" && pwd`
7066 test -z "$absdir" && \
7067 func_fatal_error "cannot determine absolute directory name of '$dir'"
7068 dir=$absdir
7069 ;;
7070 esac
7071 case "$deplibs " in
7072 *" -L$dir "* | *" $arg "*)
7073 # Will only happen for absolute or sysroot arguments
7074 ;;
7075 *)
7076 # Preserve sysroot, but never include relative directories
7077 case $dir in
7078 [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;;
7079 *) func_append deplibs " -L$dir" ;;
7080 esac
7081 func_append lib_search_path " $dir"
7082 ;;
7083 esac
7084 case $host in
7085 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
7086 testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
7087 case :$dllsearchpath: in
7088 *":$dir:"*) ;;
7089 ::) dllsearchpath=$dir;;
7090 *) func_append dllsearchpath ":$dir";;
7091 esac
7092 case :$dllsearchpath: in
7093 *":$testbindir:"*) ;;
7094 ::) dllsearchpath=$testbindir;;
7095 *) func_append dllsearchpath ":$testbindir";;
7096 esac
7097 ;;
7098 esac
7099 continue
7100 ;;
7101
7102 -l*)
7103 if test X-lc = "X$arg" || test X-lm = "X$arg"; then
7104 case $host in
7105 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
7106 # These systems don't actually have a C or math library (as such)
7107 continue
7108 ;;
7109 *-*-os2*)
7110 # These systems don't actually have a C library (as such)
7111 test X-lc = "X$arg" && continue
7112 ;;
7113 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
7114 # Do not include libc due to us having libc/libc_r.
7115 test X-lc = "X$arg" && continue
7116 ;;
7117 *-*-rhapsody* | *-*-darwin1.[012])
7118 # Rhapsody C and math libraries are in the System framework
7119 func_append deplibs " System.ltframework"
7120 continue
7121 ;;
7122 *-*-sco3.2v5* | *-*-sco5v6*)
7123 # Causes problems with __ctype
7124 test X-lc = "X$arg" && continue
7125 ;;
7126 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
7127 # Compiler inserts libc in the correct place for threads to work
7128 test X-lc = "X$arg" && continue
7129 ;;
7130 esac
7131 elif test X-lc_r = "X$arg"; then
7132 case $host in
7133 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
7134 # Do not include libc_r directly, use -pthread flag.
7135 continue
7136 ;;
7137 esac
7138 fi
7139 func_append deplibs " $arg"
7140 continue
7141 ;;
7142
7143 -mllvm)
7144 prev=mllvm
7145 continue
7146 ;;
7147
7148 -module)
7149 module=yes
7150 continue
7151 ;;
7152
7153 # Tru64 UNIX uses -model [arg] to determine the layout of C++
7154 # classes, name mangling, and exception handling.
7155 # Darwin uses the -arch flag to determine output architecture.
7156 -model|-arch|-isysroot|--sysroot)
7157 func_append compiler_flags " $arg"
7158 func_append compile_command " $arg"
7159 func_append finalize_command " $arg"
7160 prev=xcompiler
7161 continue
7162 ;;
7163
7164 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
7165 |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
7166 func_append compiler_flags " $arg"
7167 func_append compile_command " $arg"
7168 func_append finalize_command " $arg"
7169 case "$new_inherited_linker_flags " in
7170 *" $arg "*) ;;
7171 * ) func_append new_inherited_linker_flags " $arg" ;;
7172 esac
7173 continue
7174 ;;
7175
7176 -multi_module)
7177 single_module=$wl-multi_module
7178 continue
7179 ;;
7180
7181 -no-fast-install)
7182 fast_install=no
7183 continue
7184 ;;
7185
7186 -no-install)
7187 case $host in
7188 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
7189 # The PATH hackery in wrapper scripts is required on Windows
7190 # and Darwin in order for the loader to find any dlls it needs.
7191 func_warning "'-no-install' is ignored for $host"
7192 func_warning "assuming '-no-fast-install' instead"
7193 fast_install=no
7194 ;;
7195 *) no_install=yes ;;
7196 esac
7197 continue
7198 ;;
7199
7200 -no-undefined)
7201 allow_undefined=no
7202 continue
7203 ;;
7204
7205 -objectlist)
7206 prev=objectlist
7207 continue
7208 ;;
7209
7210 -os2dllname)
7211 prev=os2dllname
7212 continue
7213 ;;
7214
7215 -o) prev=output ;;
7216
7217 -precious-files-regex)
7218 prev=precious_regex
7219 continue
7220 ;;
7221
7222 -release)
7223 prev=release
7224 continue
7225 ;;
7226
7227 -rpath)
7228 prev=rpath
7229 continue
7230 ;;
7231
7232 -R)
7233 prev=xrpath
7234 continue
7235 ;;
7236
7237 -R*)
7238 func_stripname '-R' '' "$arg"
7239 dir=$func_stripname_result
7240 # We need an absolute path.
7241 case $dir in
7242 [\\/]* | [A-Za-z]:[\\/]*) ;;
7243 =*)
7244 func_stripname '=' '' "$dir"
7245 dir=$lt_sysroot$func_stripname_result
7246 ;;
7247 *)
7248 func_fatal_error "only absolute run-paths are allowed"
7249 ;;
7250 esac
7251 case "$xrpath " in
7252 *" $dir "*) ;;
7253 *) func_append xrpath " $dir" ;;
7254 esac
7255 continue
7256 ;;
7257
7258 -shared)
7259 # The effects of -shared are defined in a previous loop.
7260 continue
7261 ;;
7262
7263 -shrext)
7264 prev=shrext
7265 continue
7266 ;;
7267
7268 -static | -static-libtool-libs)
7269 # The effects of -static are defined in a previous loop.
7270 # We used to do the same as -all-static on platforms that
7271 # didn't have a PIC flag, but the assumption that the effects
7272 # would be equivalent was wrong. It would break on at least
7273 # Digital Unix and AIX.
7274 continue
7275 ;;
7276
7277 -thread-safe)
7278 thread_safe=yes
7279 continue
7280 ;;
7281
7282 -version-info)
7283 prev=vinfo
7284 continue
7285 ;;
7286
7287 -version-number)
7288 prev=vinfo
7289 vinfo_number=yes
7290 continue
7291 ;;
7292
7293 -weak)
7294 prev=weak
7295 continue
7296 ;;
7297
7298 -Wc,*)
7299 func_stripname '-Wc,' '' "$arg"
7300 args=$func_stripname_result
7301 arg=
7302 save_ifs=$IFS; IFS=,
7303 for flag in $args; do
7304 IFS=$save_ifs
7305 func_quote_for_eval "$flag"
7306 func_append arg " $func_quote_for_eval_result"
7307 func_append compiler_flags " $func_quote_for_eval_result"
7308 done
7309 IFS=$save_ifs
7310 func_stripname ' ' '' "$arg"
7311 arg=$func_stripname_result
7312 ;;
7313
7314 -Wl,*)
7315 func_stripname '-Wl,' '' "$arg"
7316 args=$func_stripname_result
7317 arg=
7318 save_ifs=$IFS; IFS=,
7319 for flag in $args; do
7320 IFS=$save_ifs
7321 func_quote_for_eval "$flag"
7322 func_append arg " $wl$func_quote_for_eval_result"
7323 func_append compiler_flags " $wl$func_quote_for_eval_result"
7324 func_append linker_flags " $func_quote_for_eval_result"
7325 done
7326 IFS=$save_ifs
7327 func_stripname ' ' '' "$arg"
7328 arg=$func_stripname_result
7329 ;;
7330
7331 -Xcompiler)
7332 prev=xcompiler
7333 continue
7334 ;;
7335
7336 -Xlinker)
7337 prev=xlinker
7338 continue
7339 ;;
7340
7341 -XCClinker)
7342 prev=xcclinker
7343 continue
7344 ;;
7345
7346 # -msg_* for osf cc
7347 -msg_*)
7348 func_quote_for_eval "$arg"
7349 arg=$func_quote_for_eval_result
7350 ;;
7351
7352 # Flags to be passed through unchanged, with rationale:
7353 # -64, -mips[0-9] enable 64-bit mode for the SGI compiler
7354 # -r[0-9][0-9]* specify processor for the SGI compiler
7355 # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler
7356 # +DA*, +DD* enable 64-bit mode for the HP compiler
7357 # -q* compiler args for the IBM compiler
7358 # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
7359 # -F/path path to uninstalled frameworks, gcc on darwin
7360 # -p, -pg, --coverage, -fprofile-* profiling flags for GCC
7361 # -fstack-protector* stack protector flags for GCC
7362 # @file GCC response files
7363 # -tp=* Portland pgcc target processor selection
7364 # --sysroot=* for sysroot support
7365 # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
7366 # -specs=* GCC specs files
7367 # -stdlib=* select c++ std lib with clang
7368 # -fsanitize=* Clang/GCC memory and address sanitizer
7369 # -fuse-ld=* Linker select flags for GCC
7370 # -static-* direct GCC to link specific libraries statically
7371 # -fcilkplus Cilk Plus language extension features for C/C++
7372 -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
7373 -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
7374 -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
7375 -specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus)
7376 func_quote_for_eval "$arg"
7377 arg=$func_quote_for_eval_result
7378 func_append compile_command " $arg"
7379 func_append finalize_command " $arg"
7380 func_append compiler_flags " $arg"
7381 continue
7382 ;;
7383
7384 -Z*)
7385 if test os2 = "`expr $host : '.*\(os2\)'`"; then
7386 # OS/2 uses -Zxxx to specify OS/2-specific options
7387 compiler_flags="$compiler_flags $arg"
7388 func_append compile_command " $arg"
7389 func_append finalize_command " $arg"
7390 case $arg in
7391 -Zlinker | -Zstack)
7392 prev=xcompiler
7393 ;;
7394 esac
7395 continue
7396 else
7397 # Otherwise treat like 'Some other compiler flag' below
7398 func_quote_for_eval "$arg"
7399 arg=$func_quote_for_eval_result
7400 fi
7401 ;;
7402
7403 # Some other compiler flag.
7404 -* | +*)
7405 func_quote_for_eval "$arg"
7406 arg=$func_quote_for_eval_result
7407 ;;
7408
7409 *.$objext)
7410 # A standard object.
7411 func_append objs " $arg"
7412 ;;
7413
7414 *.lo)
7415 # A libtool-controlled object.
7416
7417 # Check to see that this really is a libtool object.
7418 if func_lalib_unsafe_p "$arg"; then
7419 pic_object=
7420 non_pic_object=
7421
7422 # Read the .lo file
7423 func_source "$arg"
7424
7425 if test -z "$pic_object" ||
7426 test -z "$non_pic_object" ||
7427 test none = "$pic_object" &&
7428 test none = "$non_pic_object"; then
7429 func_fatal_error "cannot find name of object for '$arg'"
7430 fi
7431
7432 # Extract subdirectory from the argument.
7433 func_dirname "$arg" "/" ""
7434 xdir=$func_dirname_result
7435
7436 test none = "$pic_object" || {
7437 # Prepend the subdirectory the object is found in.
7438 pic_object=$xdir$pic_object
7439
7440 if test dlfiles = "$prev"; then
7441 if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then
7442 func_append dlfiles " $pic_object"
7443 prev=
7444 continue
7445 else
7446 # If libtool objects are unsupported, then we need to preload.
7447 prev=dlprefiles
7448 fi
7449 fi
7450
7451 # CHECK ME: I think I busted this. -Ossama
7452 if test dlprefiles = "$prev"; then
7453 # Preload the old-style object.
7454 func_append dlprefiles " $pic_object"
7455 prev=
7456 fi
7457
7458 # A PIC object.
7459 func_append libobjs " $pic_object"
7460 arg=$pic_object
7461 }
7462
7463 # Non-PIC object.
7464 if test none != "$non_pic_object"; then
7465 # Prepend the subdirectory the object is found in.
7466 non_pic_object=$xdir$non_pic_object
7467
7468 # A standard non-PIC object
7469 func_append non_pic_objects " $non_pic_object"
7470 if test -z "$pic_object" || test none = "$pic_object"; then
7471 arg=$non_pic_object
7472 fi
7473 else
7474 # If the PIC object exists, use it instead.
7475 # $xdir was prepended to $pic_object above.
7476 non_pic_object=$pic_object
7477 func_append non_pic_objects " $non_pic_object"
7478 fi
7479 else
7480 # Only an error if not doing a dry-run.
7481 if $opt_dry_run; then
7482 # Extract subdirectory from the argument.
7483 func_dirname "$arg" "/" ""
7484 xdir=$func_dirname_result
7485
7486 func_lo2o "$arg"
7487 pic_object=$xdir$objdir/$func_lo2o_result
7488 non_pic_object=$xdir$func_lo2o_result
7489 func_append libobjs " $pic_object"
7490 func_append non_pic_objects " $non_pic_object"
7491 else
7492 func_fatal_error "'$arg' is not a valid libtool object"
7493 fi
7494 fi
7495 ;;
7496
7497 *.$libext)
7498 # An archive.
7499 func_append deplibs " $arg"
7500 func_append old_deplibs " $arg"
7501 continue
7502 ;;
7503
7504 *.la)
7505 # A libtool-controlled library.
7506
7507 func_resolve_sysroot "$arg"
7508 if test dlfiles = "$prev"; then
7509 # This library was specified with -dlopen.
7510 func_append dlfiles " $func_resolve_sysroot_result"
7511 prev=
7512 elif test dlprefiles = "$prev"; then
7513 # The library was specified with -dlpreopen.
7514 func_append dlprefiles " $func_resolve_sysroot_result"
7515 prev=
7516 else
7517 func_append deplibs " $func_resolve_sysroot_result"
7518 fi
7519 continue
7520 ;;
7521
7522 # Some other compiler argument.
7523 *)
7524 # Unknown arguments in both finalize_command and compile_command need
7525 # to be aesthetically quoted because they are evaled later.
7526 func_quote_for_eval "$arg"
7527 arg=$func_quote_for_eval_result
7528 ;;
7529 esac # arg
7530
7531 # Now actually substitute the argument into the commands.
7532 if test -n "$arg"; then
7533 func_append compile_command " $arg"
7534 func_append finalize_command " $arg"
7535 fi
7536 done # argument parsing loop
7537
7538 test -n "$prev" && \
7539 func_fatal_help "the '$prevarg' option requires an argument"
7540
7541 if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then
7542 eval arg=\"$export_dynamic_flag_spec\"
7543 func_append compile_command " $arg"
7544 func_append finalize_command " $arg"
7545 fi
7546
7547 oldlibs=
7548 # calculate the name of the file, without its directory
7549 func_basename "$output"
7550 outputname=$func_basename_result
7551 libobjs_save=$libobjs
7552
7553 if test -n "$shlibpath_var"; then
7554 # get the directories listed in $shlibpath_var
7555 eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\`
7556 else
7557 shlib_search_path=
7558 fi
7559 eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
7560 eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
7561
7562 # Definition is injected by LT_CONFIG during libtool generation.
7563 func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH"
7564
7565 func_dirname "$output" "/" ""
7566 output_objdir=$func_dirname_result$objdir
7567 func_to_tool_file "$output_objdir/"
7568 tool_output_objdir=$func_to_tool_file_result
7569 # Create the object directory.
7570 func_mkdir_p "$output_objdir"
7571
7572 # Determine the type of output
7573 case $output in
7574 "")
7575 func_fatal_help "you must specify an output file"
7576 ;;
7577 *.$libext) linkmode=oldlib ;;
7578 *.lo | *.$objext) linkmode=obj ;;
7579 *.la) linkmode=lib ;;
7580 *) linkmode=prog ;; # Anything else should be a program.
7581 esac
7582
7583 specialdeplibs=
7584
7585 libs=
7586 # Find all interdependent deplibs by searching for libraries
7587 # that are linked more than once (e.g. -la -lb -la)
7588 for deplib in $deplibs; do
7589 if $opt_preserve_dup_deps; then
7590 case "$libs " in
7591 *" $deplib "*) func_append specialdeplibs " $deplib" ;;
7592 esac
7593 fi
7594 func_append libs " $deplib"
7595 done
7596
7597 if test lib = "$linkmode"; then
7598 libs="$predeps $libs $compiler_lib_search_path $postdeps"
7599
7600 # Compute libraries that are listed more than once in $predeps
7601 # $postdeps and mark them as special (i.e., whose duplicates are
7602 # not to be eliminated).
7603 pre_post_deps=
7604 if $opt_duplicate_compiler_generated_deps; then
7605 for pre_post_dep in $predeps $postdeps; do
7606 case "$pre_post_deps " in
7607 *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;;
7608 esac
7609 func_append pre_post_deps " $pre_post_dep"
7610 done
7611 fi
7612 pre_post_deps=
7613 fi
7614
7615 deplibs=
7616 newdependency_libs=
7617 newlib_search_path=
7618 need_relink=no # whether we're linking any uninstalled libtool libraries
7619 notinst_deplibs= # not-installed libtool libraries
7620 notinst_path= # paths that contain not-installed libtool libraries
7621
7622 case $linkmode in
7623 lib)
7624 passes="conv dlpreopen link"
7625 for file in $dlfiles $dlprefiles; do
7626 case $file in
7627 *.la) ;;
7628 *)
7629 func_fatal_help "libraries can '-dlopen' only libtool libraries: $file"
7630 ;;
7631 esac
7632 done
7633 ;;
7634 prog)
7635 compile_deplibs=
7636 finalize_deplibs=
7637 alldeplibs=false
7638 newdlfiles=
7639 newdlprefiles=
7640 passes="conv scan dlopen dlpreopen link"
7641 ;;
7642 *) passes="conv"
7643 ;;
7644 esac
7645
7646 for pass in $passes; do
7647 # The preopen pass in lib mode reverses $deplibs; put it back here
7648 # so that -L comes before libs that need it for instance...
7649 if test lib,link = "$linkmode,$pass"; then
7650 ## FIXME: Find the place where the list is rebuilt in the wrong
7651 ## order, and fix it there properly
7652 tmp_deplibs=
7653 for deplib in $deplibs; do
7654 tmp_deplibs="$deplib $tmp_deplibs"
7655 done
7656 deplibs=$tmp_deplibs
7657 fi
7658
7659 if test lib,link = "$linkmode,$pass" ||
7660 test prog,scan = "$linkmode,$pass"; then
7661 libs=$deplibs
7662 deplibs=
7663 fi
7664 if test prog = "$linkmode"; then
7665 case $pass in
7666 dlopen) libs=$dlfiles ;;
7667 dlpreopen) libs=$dlprefiles ;;
7668 link)
7669 libs="$deplibs %DEPLIBS%"
7670 test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
7671 ;;
7672 esac
7673 fi
7674 if test lib,dlpreopen = "$linkmode,$pass"; then
7675 # Collect and forward deplibs of preopened libtool libs
7676 for lib in $dlprefiles; do
7677 # Ignore non-libtool-libs
7678 dependency_libs=
7679 func_resolve_sysroot "$lib"
7680 case $lib in
7681 *.la) func_source "$func_resolve_sysroot_result" ;;
7682 esac
7683
7684 # Collect preopened libtool deplibs, except any this library
7685 # has declared as weak libs
7686 for deplib in $dependency_libs; do
7687 func_basename "$deplib"
7688 deplib_base=$func_basename_result
7689 case " $weak_libs " in
7690 *" $deplib_base "*) ;;
7691 *) func_append deplibs " $deplib" ;;
7692 esac
7693 done
7694 done
7695 libs=$dlprefiles
7696 fi
7697 if test dlopen = "$pass"; then
7698 # Collect dlpreopened libraries
7699 save_deplibs=$deplibs
7700 deplibs=
7701 fi
7702
7703 for deplib in $libs; do
7704 lib=
7705 found=false
7706 case $deplib in
7707 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
7708 |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
7709 if test prog,link = "$linkmode,$pass"; then
7710 compile_deplibs="$deplib $compile_deplibs"
7711 finalize_deplibs="$deplib $finalize_deplibs"
7712 else
7713 func_append compiler_flags " $deplib"
7714 if test lib = "$linkmode"; then
7715 case "$new_inherited_linker_flags " in
7716 *" $deplib "*) ;;
7717 * ) func_append new_inherited_linker_flags " $deplib" ;;
7718 esac
7719 fi
7720 fi
7721 continue
7722 ;;
7723 -l*)
7724 if test lib != "$linkmode" && test prog != "$linkmode"; then
7725 func_warning "'-l' is ignored for archives/objects"
7726 continue
7727 fi
7728 func_stripname '-l' '' "$deplib"
7729 name=$func_stripname_result
7730 if test lib = "$linkmode"; then
7731 searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
7732 else
7733 searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
7734 fi
7735 for searchdir in $searchdirs; do
7736 for search_ext in .la $std_shrext .so .a; do
7737 # Search the libtool library
7738 lib=$searchdir/lib$name$search_ext
7739 if test -f "$lib"; then
7740 if test .la = "$search_ext"; then
7741 found=:
7742 else
7743 found=false
7744 fi
7745 break 2
7746 fi
7747 done
7748 done
7749 if $found; then
7750 # deplib is a libtool library
7751 # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
7752 # We need to do some special things here, and not later.
7753 if test yes = "$allow_libtool_libs_with_static_runtimes"; then
7754 case " $predeps $postdeps " in
7755 *" $deplib "*)
7756 if func_lalib_p "$lib"; then
7757 library_names=
7758 old_library=
7759 func_source "$lib"
7760 for l in $old_library $library_names; do
7761 ll=$l
7762 done
7763 if test "X$ll" = "X$old_library"; then # only static version available
7764 found=false
7765 func_dirname "$lib" "" "."
7766 ladir=$func_dirname_result
7767 lib=$ladir/$old_library
7768 if test prog,link = "$linkmode,$pass"; then
7769 compile_deplibs="$deplib $compile_deplibs"
7770 finalize_deplibs="$deplib $finalize_deplibs"
7771 else
7772 deplibs="$deplib $deplibs"
7773 test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs"
7774 fi
7775 continue
7776 fi
7777 fi
7778 ;;
7779 *) ;;
7780 esac
7781 fi
7782 else
7783 # deplib doesn't seem to be a libtool library
7784 if test prog,link = "$linkmode,$pass"; then
7785 compile_deplibs="$deplib $compile_deplibs"
7786 finalize_deplibs="$deplib $finalize_deplibs"
7787 else
7788 deplibs="$deplib $deplibs"
7789 test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs"
7790 fi
7791 continue
7792 fi
7793 ;; # -l
7794 *.ltframework)
7795 if test prog,link = "$linkmode,$pass"; then
7796 compile_deplibs="$deplib $compile_deplibs"
7797 finalize_deplibs="$deplib $finalize_deplibs"
7798 else
7799 deplibs="$deplib $deplibs"
7800 if test lib = "$linkmode"; then
7801 case "$new_inherited_linker_flags " in
7802 *" $deplib "*) ;;
7803 * ) func_append new_inherited_linker_flags " $deplib" ;;
7804 esac
7805 fi
7806 fi
7807 continue
7808 ;;
7809 -L*)
7810 case $linkmode in
7811 lib)
7812 deplibs="$deplib $deplibs"
7813 test conv = "$pass" && continue
7814 newdependency_libs="$deplib $newdependency_libs"
7815 func_stripname '-L' '' "$deplib"
7816 func_resolve_sysroot "$func_stripname_result"
7817 func_append newlib_search_path " $func_resolve_sysroot_result"
7818 ;;
7819 prog)
7820 if test conv = "$pass"; then
7821 deplibs="$deplib $deplibs"
7822 continue
7823 fi
7824 if test scan = "$pass"; then
7825 deplibs="$deplib $deplibs"
7826 else
7827 compile_deplibs="$deplib $compile_deplibs"
7828 finalize_deplibs="$deplib $finalize_deplibs"
7829 fi
7830 func_stripname '-L' '' "$deplib"
7831 func_resolve_sysroot "$func_stripname_result"
7832 func_append newlib_search_path " $func_resolve_sysroot_result"
7833 ;;
7834 *)
7835 func_warning "'-L' is ignored for archives/objects"
7836 ;;
7837 esac # linkmode
7838 continue
7839 ;; # -L
7840 -R*)
7841 if test link = "$pass"; then
7842 func_stripname '-R' '' "$deplib"
7843 func_resolve_sysroot "$func_stripname_result"
7844 dir=$func_resolve_sysroot_result
7845 # Make sure the xrpath contains only unique directories.
7846 case "$xrpath " in
7847 *" $dir "*) ;;
7848 *) func_append xrpath " $dir" ;;
7849 esac
7850 fi
7851 deplibs="$deplib $deplibs"
7852 continue
7853 ;;
7854 *.la)
7855 func_resolve_sysroot "$deplib"
7856 lib=$func_resolve_sysroot_result
7857 ;;
7858 *.$libext)
7859 if test conv = "$pass"; then
7860 deplibs="$deplib $deplibs"
7861 continue
7862 fi
7863 case $linkmode in
7864 lib)
7865 # Linking convenience modules into shared libraries is allowed,
7866 # but linking other static libraries is non-portable.
7867 case " $dlpreconveniencelibs " in
7868 *" $deplib "*) ;;
7869 *)
7870 valid_a_lib=false
7871 case $deplibs_check_method in
7872 match_pattern*)
7873 set dummy $deplibs_check_method; shift
7874 match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
7875 if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \
7876 | $EGREP "$match_pattern_regex" > /dev/null; then
7877 valid_a_lib=:
7878 fi
7879 ;;
7880 pass_all)
7881 valid_a_lib=:
7882 ;;
7883 esac
7884 if $valid_a_lib; then
7885 echo
7886 $ECHO "*** Warning: Linking the shared library $output against the"
7887 $ECHO "*** static library $deplib is not portable!"
7888 deplibs="$deplib $deplibs"
7889 else
7890 echo
7891 $ECHO "*** Warning: Trying to link with static lib archive $deplib."
7892 echo "*** I have the capability to make that library automatically link in when"
7893 echo "*** you link to this library. But I can only do this if you have a"
7894 echo "*** shared version of the library, which you do not appear to have"
7895 echo "*** because the file extensions .$libext of this argument makes me believe"
7896 echo "*** that it is just a static archive that I should not use here."
7897 fi
7898 ;;
7899 esac
7900 continue
7901 ;;
7902 prog)
7903 if test link != "$pass"; then
7904 deplibs="$deplib $deplibs"
7905 else
7906 compile_deplibs="$deplib $compile_deplibs"
7907 finalize_deplibs="$deplib $finalize_deplibs"
7908 fi
7909 continue
7910 ;;
7911 esac # linkmode
7912 ;; # *.$libext
7913 *.lo | *.$objext)
7914 if test conv = "$pass"; then
7915 deplibs="$deplib $deplibs"
7916 elif test prog = "$linkmode"; then
7917 if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then
7918 # If there is no dlopen support or we're linking statically,
7919 # we need to preload.
7920 func_append newdlprefiles " $deplib"
7921 compile_deplibs="$deplib $compile_deplibs"
7922 finalize_deplibs="$deplib $finalize_deplibs"
7923 else
7924 func_append newdlfiles " $deplib"
7925 fi
7926 fi
7927 continue
7928 ;;
7929 %DEPLIBS%)
7930 alldeplibs=:
7931 continue
7932 ;;
7933 esac # case $deplib
7934
7935 $found || test -f "$lib" \
7936 || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'"
7937
7938 # Check to see that this really is a libtool archive.
7939 func_lalib_unsafe_p "$lib" \
7940 || func_fatal_error "'$lib' is not a valid libtool archive"
7941
7942 func_dirname "$lib" "" "."
7943 ladir=$func_dirname_result
7944
7945 dlname=
7946 dlopen=
7947 dlpreopen=
7948 libdir=
7949 library_names=
7950 old_library=
7951 inherited_linker_flags=
7952 # If the library was installed with an old release of libtool,
7953 # it will not redefine variables installed, or shouldnotlink
7954 installed=yes
7955 shouldnotlink=no
7956 avoidtemprpath=
7957
7958
7959 # Read the .la file
7960 func_source "$lib"
7961
7962 # Convert "-framework foo" to "foo.ltframework"
7963 if test -n "$inherited_linker_flags"; then
7964 tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`
7965 for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
7966 case " $new_inherited_linker_flags " in
7967 *" $tmp_inherited_linker_flag "*) ;;
7968 *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";;
7969 esac
7970 done
7971 fi
7972 dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
7973 if test lib,link = "$linkmode,$pass" ||
7974 test prog,scan = "$linkmode,$pass" ||
7975 { test prog != "$linkmode" && test lib != "$linkmode"; }; then
7976 test -n "$dlopen" && func_append dlfiles " $dlopen"
7977 test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen"
7978 fi
7979
7980 if test conv = "$pass"; then
7981 # Only check for convenience libraries
7982 deplibs="$lib $deplibs"
7983 if test -z "$libdir"; then
7984 if test -z "$old_library"; then
7985 func_fatal_error "cannot find name of link library for '$lib'"
7986 fi
7987 # It is a libtool convenience library, so add in its objects.
7988 func_append convenience " $ladir/$objdir/$old_library"
7989 func_append old_convenience " $ladir/$objdir/$old_library"
7990 tmp_libs=
7991 for deplib in $dependency_libs; do
7992 deplibs="$deplib $deplibs"
7993 if $opt_preserve_dup_deps; then
7994 case "$tmp_libs " in
7995 *" $deplib "*) func_append specialdeplibs " $deplib" ;;
7996 esac
7997 fi
7998 func_append tmp_libs " $deplib"
7999 done
8000 elif test prog != "$linkmode" && test lib != "$linkmode"; then
8001 func_fatal_error "'$lib' is not a convenience library"
8002 fi
8003 continue
8004 fi # $pass = conv
8005
8006
8007 # Get the name of the library we link against.
8008 linklib=
8009 if test -n "$old_library" &&
8010 { test yes = "$prefer_static_libs" ||
8011 test built,no = "$prefer_static_libs,$installed"; }; then
8012 linklib=$old_library
8013 else
8014 for l in $old_library $library_names; do
8015 linklib=$l
8016 done
8017 fi
8018 if test -z "$linklib"; then
8019 func_fatal_error "cannot find name of link library for '$lib'"
8020 fi
8021
8022 # This library was specified with -dlopen.
8023 if test dlopen = "$pass"; then
8024 test -z "$libdir" \
8025 && func_fatal_error "cannot -dlopen a convenience library: '$lib'"
8026 if test -z "$dlname" ||
8027 test yes != "$dlopen_support" ||
8028 test no = "$build_libtool_libs"
8029 then
8030 # If there is no dlname, no dlopen support or we're linking
8031 # statically, we need to preload. We also need to preload any
8032 # dependent libraries so libltdl's deplib preloader doesn't
8033 # bomb out in the load deplibs phase.
8034 func_append dlprefiles " $lib $dependency_libs"
8035 else
8036 func_append newdlfiles " $lib"
8037 fi
8038 continue
8039 fi # $pass = dlopen
8040
8041 # We need an absolute path.
8042 case $ladir in
8043 [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;;
8044 *)
8045 abs_ladir=`cd "$ladir" && pwd`
8046 if test -z "$abs_ladir"; then
8047 func_warning "cannot determine absolute directory name of '$ladir'"
8048 func_warning "passing it literally to the linker, although it might fail"
8049 abs_ladir=$ladir
8050 fi
8051 ;;
8052 esac
8053 func_basename "$lib"
8054 laname=$func_basename_result
8055
8056 # Find the relevant object directory and library name.
8057 if test yes = "$installed"; then
8058 if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
8059 func_warning "library '$lib' was moved."
8060 dir=$ladir
8061 absdir=$abs_ladir
8062 libdir=$abs_ladir
8063 else
8064 dir=$lt_sysroot$libdir
8065 absdir=$lt_sysroot$libdir
8066 fi
8067 test yes = "$hardcode_automatic" && avoidtemprpath=yes
8068 else
8069 if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
8070 dir=$ladir
8071 absdir=$abs_ladir
8072 # Remove this search path later
8073 func_append notinst_path " $abs_ladir"
8074 else
8075 dir=$ladir/$objdir
8076 absdir=$abs_ladir/$objdir
8077 # Remove this search path later
8078 func_append notinst_path " $abs_ladir"
8079 fi
8080 fi # $installed = yes
8081 func_stripname 'lib' '.la' "$laname"
8082 name=$func_stripname_result
8083
8084 # This library was specified with -dlpreopen.
8085 if test dlpreopen = "$pass"; then
8086 if test -z "$libdir" && test prog = "$linkmode"; then
8087 func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'"
8088 fi
8089 case $host in
8090 # special handling for platforms with PE-DLLs.
8091 *cygwin* | *mingw* | *cegcc* )
8092 # Linker will automatically link against shared library if both
8093 # static and shared are present. Therefore, ensure we extract
8094 # symbols from the import library if a shared library is present
8095 # (otherwise, the dlopen module name will be incorrect). We do
8096 # this by putting the import library name into $newdlprefiles.
8097 # We recover the dlopen module name by 'saving' the la file
8098 # name in a special purpose variable, and (later) extracting the
8099 # dlname from the la file.
8100 if test -n "$dlname"; then
8101 func_tr_sh "$dir/$linklib"
8102 eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname"
8103 func_append newdlprefiles " $dir/$linklib"
8104 else
8105 func_append newdlprefiles " $dir/$old_library"
8106 # Keep a list of preopened convenience libraries to check
8107 # that they are being used correctly in the link pass.
8108 test -z "$libdir" && \
8109 func_append dlpreconveniencelibs " $dir/$old_library"
8110 fi
8111 ;;
8112 * )
8113 # Prefer using a static library (so that no silly _DYNAMIC symbols
8114 # are required to link).
8115 if test -n "$old_library"; then
8116 func_append newdlprefiles " $dir/$old_library"
8117 # Keep a list of preopened convenience libraries to check
8118 # that they are being used correctly in the link pass.
8119 test -z "$libdir" && \
8120 func_append dlpreconveniencelibs " $dir/$old_library"
8121 # Otherwise, use the dlname, so that lt_dlopen finds it.
8122 elif test -n "$dlname"; then
8123 func_append newdlprefiles " $dir/$dlname"
8124 else
8125 func_append newdlprefiles " $dir/$linklib"
8126 fi
8127 ;;
8128 esac
8129 fi # $pass = dlpreopen
8130
8131 if test -z "$libdir"; then
8132 # Link the convenience library
8133 if test lib = "$linkmode"; then
8134 deplibs="$dir/$old_library $deplibs"
8135 elif test prog,link = "$linkmode,$pass"; then
8136 compile_deplibs="$dir/$old_library $compile_deplibs"
8137 finalize_deplibs="$dir/$old_library $finalize_deplibs"
8138 else
8139 deplibs="$lib $deplibs" # used for prog,scan pass
8140 fi
8141 continue
8142 fi
8143
8144
8145 if test prog = "$linkmode" && test link != "$pass"; then
8146 func_append newlib_search_path " $ladir"
8147 deplibs="$lib $deplibs"
8148
8149 linkalldeplibs=false
8150 if test no != "$link_all_deplibs" || test -z "$library_names" ||
8151 test no = "$build_libtool_libs"; then
8152 linkalldeplibs=:
8153 fi
8154
8155 tmp_libs=
8156 for deplib in $dependency_libs; do
8157 case $deplib in
8158 -L*) func_stripname '-L' '' "$deplib"
8159 func_resolve_sysroot "$func_stripname_result"
8160 func_append newlib_search_path " $func_resolve_sysroot_result"
8161 ;;
8162 esac
8163 # Need to link against all dependency_libs?
8164 if $linkalldeplibs; then
8165 deplibs="$deplib $deplibs"
8166 else
8167 # Need to hardcode shared library paths
8168 # or/and link against static libraries
8169 newdependency_libs="$deplib $newdependency_libs"
8170 fi
8171 if $opt_preserve_dup_deps; then
8172 case "$tmp_libs " in
8173 *" $deplib "*) func_append specialdeplibs " $deplib" ;;
8174 esac
8175 fi
8176 func_append tmp_libs " $deplib"
8177 done # for deplib
8178 continue
8179 fi # $linkmode = prog...
8180
8181 if test prog,link = "$linkmode,$pass"; then
8182 if test -n "$library_names" &&
8183 { { test no = "$prefer_static_libs" ||
8184 test built,yes = "$prefer_static_libs,$installed"; } ||
8185 test -z "$old_library"; }; then
8186 # We need to hardcode the library path
8187 if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then
8188 # Make sure the rpath contains only unique directories.
8189 case $temp_rpath: in
8190 *"$absdir:"*) ;;
8191 *) func_append temp_rpath "$absdir:" ;;
8192 esac
8193 fi
8194
8195 # Hardcode the library path.
8196 # Skip directories that are in the system default run-time
8197 # search path.
8198 case " $sys_lib_dlsearch_path " in
8199 *" $absdir "*) ;;
8200 *)
8201 case "$compile_rpath " in
8202 *" $absdir "*) ;;
8203 *) func_append compile_rpath " $absdir" ;;
8204 esac
8205 ;;
8206 esac
8207 case " $sys_lib_dlsearch_path " in
8208 *" $libdir "*) ;;
8209 *)
8210 case "$finalize_rpath " in
8211 *" $libdir "*) ;;
8212 *) func_append finalize_rpath " $libdir" ;;
8213 esac
8214 ;;
8215 esac
8216 fi # $linkmode,$pass = prog,link...
8217
8218 if $alldeplibs &&
8219 { test pass_all = "$deplibs_check_method" ||
8220 { test yes = "$build_libtool_libs" &&
8221 test -n "$library_names"; }; }; then
8222 # We only need to search for static libraries
8223 continue
8224 fi
8225 fi
8226
8227 link_static=no # Whether the deplib will be linked statically
8228 use_static_libs=$prefer_static_libs
8229 if test built = "$use_static_libs" && test yes = "$installed"; then
8230 use_static_libs=no
8231 fi
8232 if test -n "$library_names" &&
8233 { test no = "$use_static_libs" || test -z "$old_library"; }; then
8234 case $host in
8235 *cygwin* | *mingw* | *cegcc* | *os2*)
8236 # No point in relinking DLLs because paths are not encoded
8237 func_append notinst_deplibs " $lib"
8238 need_relink=no
8239 ;;
8240 *)
8241 if test no = "$installed"; then
8242 func_append notinst_deplibs " $lib"
8243 need_relink=yes
8244 fi
8245 ;;
8246 esac
8247 # This is a shared library
8248
8249 # Warn about portability, can't link against -module's on some
8250 # systems (darwin). Don't bleat about dlopened modules though!
8251 dlopenmodule=
8252 for dlpremoduletest in $dlprefiles; do
8253 if test "X$dlpremoduletest" = "X$lib"; then
8254 dlopenmodule=$dlpremoduletest
8255 break
8256 fi
8257 done
8258 if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then
8259 echo
8260 if test prog = "$linkmode"; then
8261 $ECHO "*** Warning: Linking the executable $output against the loadable module"
8262 else
8263 $ECHO "*** Warning: Linking the shared library $output against the loadable module"
8264 fi
8265 $ECHO "*** $linklib is not portable!"
8266 fi
8267 if test lib = "$linkmode" &&
8268 test yes = "$hardcode_into_libs"; then
8269 # Hardcode the library path.
8270 # Skip directories that are in the system default run-time
8271 # search path.
8272 case " $sys_lib_dlsearch_path " in
8273 *" $absdir "*) ;;
8274 *)
8275 case "$compile_rpath " in
8276 *" $absdir "*) ;;
8277 *) func_append compile_rpath " $absdir" ;;
8278 esac
8279 ;;
8280 esac
8281 case " $sys_lib_dlsearch_path " in
8282 *" $libdir "*) ;;
8283 *)
8284 case "$finalize_rpath " in
8285 *" $libdir "*) ;;
8286 *) func_append finalize_rpath " $libdir" ;;
8287 esac
8288 ;;
8289 esac
8290 fi
8291
8292 if test -n "$old_archive_from_expsyms_cmds"; then
8293 # figure out the soname
8294 set dummy $library_names
8295 shift
8296 realname=$1
8297 shift
8298 libname=`eval "\\$ECHO \"$libname_spec\""`
8299 # use dlname if we got it. it's perfectly good, no?
8300 if test -n "$dlname"; then
8301 soname=$dlname
8302 elif test -n "$soname_spec"; then
8303 # bleh windows
8304 case $host in
8305 *cygwin* | mingw* | *cegcc* | *os2*)
8306 func_arith $current - $age
8307 major=$func_arith_result
8308 versuffix=-$major
8309 ;;
8310 esac
8311 eval soname=\"$soname_spec\"
8312 else
8313 soname=$realname
8314 fi
8315
8316 # Make a new name for the extract_expsyms_cmds to use
8317 soroot=$soname
8318 func_basename "$soroot"
8319 soname=$func_basename_result
8320 func_stripname 'lib' '.dll' "$soname"
8321 newlib=libimp-$func_stripname_result.a
8322
8323 # If the library has no export list, then create one now
8324 if test -f "$output_objdir/$soname-def"; then :
8325 else
8326 func_verbose "extracting exported symbol list from '$soname'"
8327 func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
8328 fi
8329
8330 # Create $newlib
8331 if test -f "$output_objdir/$newlib"; then :; else
8332 func_verbose "generating import library for '$soname'"
8333 func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
8334 fi
8335 # make sure the library variables are pointing to the new library
8336 dir=$output_objdir
8337 linklib=$newlib
8338 fi # test -n "$old_archive_from_expsyms_cmds"
8339
8340 if test prog = "$linkmode" || test relink != "$opt_mode"; then
8341 add_shlibpath=
8342 add_dir=
8343 add=
8344 lib_linked=yes
8345 case $hardcode_action in
8346 immediate | unsupported)
8347 if test no = "$hardcode_direct"; then
8348 add=$dir/$linklib
8349 case $host in
8350 *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;;
8351 *-*-sysv4*uw2*) add_dir=-L$dir ;;
8352 *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
8353 *-*-unixware7*) add_dir=-L$dir ;;
8354 *-*-darwin* )
8355 # if the lib is a (non-dlopened) module then we cannot
8356 # link against it, someone is ignoring the earlier warnings
8357 if /usr/bin/file -L $add 2> /dev/null |
8358 $GREP ": [^:]* bundle" >/dev/null; then
8359 if test "X$dlopenmodule" != "X$lib"; then
8360 $ECHO "*** Warning: lib $linklib is a module, not a shared library"
8361 if test -z "$old_library"; then
8362 echo
8363 echo "*** And there doesn't seem to be a static archive available"
8364 echo "*** The link will probably fail, sorry"
8365 else
8366 add=$dir/$old_library
8367 fi
8368 elif test -n "$old_library"; then
8369 add=$dir/$old_library
8370 fi
8371 fi
8372 esac
8373 elif test no = "$hardcode_minus_L"; then
8374 case $host in
8375 *-*-sunos*) add_shlibpath=$dir ;;
8376 esac
8377 add_dir=-L$dir
8378 add=-l$name
8379 elif test no = "$hardcode_shlibpath_var"; then
8380 add_shlibpath=$dir
8381 add=-l$name
8382 else
8383 lib_linked=no
8384 fi
8385 ;;
8386 relink)
8387 if test yes = "$hardcode_direct" &&
8388 test no = "$hardcode_direct_absolute"; then
8389 add=$dir/$linklib
8390 elif test yes = "$hardcode_minus_L"; then
8391 add_dir=-L$absdir
8392 # Try looking first in the location we're being installed to.
8393 if test -n "$inst_prefix_dir"; then
8394 case $libdir in
8395 [\\/]*)
8396 func_append add_dir " -L$inst_prefix_dir$libdir"
8397 ;;
8398 esac
8399 fi
8400 add=-l$name
8401 elif test yes = "$hardcode_shlibpath_var"; then
8402 add_shlibpath=$dir
8403 add=-l$name
8404 else
8405 lib_linked=no
8406 fi
8407 ;;
8408 *) lib_linked=no ;;
8409 esac
8410
8411 if test yes != "$lib_linked"; then
8412 func_fatal_configuration "unsupported hardcode properties"
8413 fi
8414
8415 if test -n "$add_shlibpath"; then
8416 case :$compile_shlibpath: in
8417 *":$add_shlibpath:"*) ;;
8418 *) func_append compile_shlibpath "$add_shlibpath:" ;;
8419 esac
8420 fi
8421 if test prog = "$linkmode"; then
8422 test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
8423 test -n "$add" && compile_deplibs="$add $compile_deplibs"
8424 else
8425 test -n "$add_dir" && deplibs="$add_dir $deplibs"
8426 test -n "$add" && deplibs="$add $deplibs"
8427 if test yes != "$hardcode_direct" &&
8428 test yes != "$hardcode_minus_L" &&
8429 test yes = "$hardcode_shlibpath_var"; then
8430 case :$finalize_shlibpath: in
8431 *":$libdir:"*) ;;
8432 *) func_append finalize_shlibpath "$libdir:" ;;
8433 esac
8434 fi
8435 fi
8436 fi
8437
8438 if test prog = "$linkmode" || test relink = "$opt_mode"; then
8439 add_shlibpath=
8440 add_dir=
8441 add=
8442 # Finalize command for both is simple: just hardcode it.
8443 if test yes = "$hardcode_direct" &&
8444 test no = "$hardcode_direct_absolute"; then
8445 add=$libdir/$linklib
8446 elif test yes = "$hardcode_minus_L"; then
8447 add_dir=-L$libdir
8448 add=-l$name
8449 elif test yes = "$hardcode_shlibpath_var"; then
8450 case :$finalize_shlibpath: in
8451 *":$libdir:"*) ;;
8452 *) func_append finalize_shlibpath "$libdir:" ;;
8453 esac
8454 add=-l$name
8455 elif test yes = "$hardcode_automatic"; then
8456 if test -n "$inst_prefix_dir" &&
8457 test -f "$inst_prefix_dir$libdir/$linklib"; then
8458 add=$inst_prefix_dir$libdir/$linklib
8459 else
8460 add=$libdir/$linklib
8461 fi
8462 else
8463 # We cannot seem to hardcode it, guess we'll fake it.
8464 add_dir=-L$libdir
8465 # Try looking first in the location we're being installed to.
8466 if test -n "$inst_prefix_dir"; then
8467 case $libdir in
8468 [\\/]*)
8469 func_append add_dir " -L$inst_prefix_dir$libdir"
8470 ;;
8471 esac
8472 fi
8473 add=-l$name
8474 fi
8475
8476 if test prog = "$linkmode"; then
8477 test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
8478 test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
8479 else
8480 test -n "$add_dir" && deplibs="$add_dir $deplibs"
8481 test -n "$add" && deplibs="$add $deplibs"
8482 fi
8483 fi
8484 elif test prog = "$linkmode"; then
8485 # Here we assume that one of hardcode_direct or hardcode_minus_L
8486 # is not unsupported. This is valid on all known static and
8487 # shared platforms.
8488 if test unsupported != "$hardcode_direct"; then
8489 test -n "$old_library" && linklib=$old_library
8490 compile_deplibs="$dir/$linklib $compile_deplibs"
8491 finalize_deplibs="$dir/$linklib $finalize_deplibs"
8492 else
8493 compile_deplibs="-l$name -L$dir $compile_deplibs"
8494 finalize_deplibs="-l$name -L$dir $finalize_deplibs"
8495 fi
8496 elif test yes = "$build_libtool_libs"; then
8497 # Not a shared library
8498 if test pass_all != "$deplibs_check_method"; then
8499 # We're trying link a shared library against a static one
8500 # but the system doesn't support it.
8501
8502 # Just print a warning and add the library to dependency_libs so
8503 # that the program can be linked against the static library.
8504 echo
8505 $ECHO "*** Warning: This system cannot link to static lib archive $lib."
8506 echo "*** I have the capability to make that library automatically link in when"
8507 echo "*** you link to this library. But I can only do this if you have a"
8508 echo "*** shared version of the library, which you do not appear to have."
8509 if test yes = "$module"; then
8510 echo "*** But as you try to build a module library, libtool will still create "
8511 echo "*** a static module, that should work as long as the dlopening application"
8512 echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
8513 if test -z "$global_symbol_pipe"; then
8514 echo
8515 echo "*** However, this would only work if libtool was able to extract symbol"
8516 echo "*** lists from a program, using 'nm' or equivalent, but libtool could"
8517 echo "*** not find such a program. So, this module is probably useless."
8518 echo "*** 'nm' from GNU binutils and a full rebuild may help."
8519 fi
8520 if test no = "$build_old_libs"; then
8521 build_libtool_libs=module
8522 build_old_libs=yes
8523 else
8524 build_libtool_libs=no
8525 fi
8526 fi
8527 else
8528 deplibs="$dir/$old_library $deplibs"
8529 link_static=yes
8530 fi
8531 fi # link shared/static library?
8532
8533 if test lib = "$linkmode"; then
8534 if test -n "$dependency_libs" &&
8535 { test yes != "$hardcode_into_libs" ||
8536 test yes = "$build_old_libs" ||
8537 test yes = "$link_static"; }; then
8538 # Extract -R from dependency_libs
8539 temp_deplibs=
8540 for libdir in $dependency_libs; do
8541 case $libdir in
8542 -R*) func_stripname '-R' '' "$libdir"
8543 temp_xrpath=$func_stripname_result
8544 case " $xrpath " in
8545 *" $temp_xrpath "*) ;;
8546 *) func_append xrpath " $temp_xrpath";;
8547 esac;;
8548 *) func_append temp_deplibs " $libdir";;
8549 esac
8550 done
8551 dependency_libs=$temp_deplibs
8552 fi
8553
8554 func_append newlib_search_path " $absdir"
8555 # Link against this library
8556 test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
8557 # ... and its dependency_libs
8558 tmp_libs=
8559 for deplib in $dependency_libs; do
8560 newdependency_libs="$deplib $newdependency_libs"
8561 case $deplib in
8562 -L*) func_stripname '-L' '' "$deplib"
8563 func_resolve_sysroot "$func_stripname_result";;
8564 *) func_resolve_sysroot "$deplib" ;;
8565 esac
8566 if $opt_preserve_dup_deps; then
8567 case "$tmp_libs " in
8568 *" $func_resolve_sysroot_result "*)
8569 func_append specialdeplibs " $func_resolve_sysroot_result" ;;
8570 esac
8571 fi
8572 func_append tmp_libs " $func_resolve_sysroot_result"
8573 done
8574
8575 if test no != "$link_all_deplibs"; then
8576 # Add the search paths of all dependency libraries
8577 for deplib in $dependency_libs; do
8578 path=
8579 case $deplib in
8580 -L*) path=$deplib ;;
8581 *.la)
8582 func_resolve_sysroot "$deplib"
8583 deplib=$func_resolve_sysroot_result
8584 func_dirname "$deplib" "" "."
8585 dir=$func_dirname_result
8586 # We need an absolute path.
8587 case $dir in
8588 [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;;
8589 *)
8590 absdir=`cd "$dir" && pwd`
8591 if test -z "$absdir"; then
8592 func_warning "cannot determine absolute directory name of '$dir'"
8593 absdir=$dir
8594 fi
8595 ;;
8596 esac
8597 if $GREP "^installed=no" $deplib > /dev/null; then
8598 case $host in
8599 *-*-darwin*)
8600 depdepl=
8601 eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
8602 if test -n "$deplibrary_names"; then
8603 for tmp in $deplibrary_names; do
8604 depdepl=$tmp
8605 done
8606 if test -f "$absdir/$objdir/$depdepl"; then
8607 depdepl=$absdir/$objdir/$depdepl
8608 darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
8609 if test -z "$darwin_install_name"; then
8610 darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
8611 fi
8612 func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl"
8613 func_append linker_flags " -dylib_file $darwin_install_name:$depdepl"
8614 path=
8615 fi
8616 fi
8617 ;;
8618 *)
8619 path=-L$absdir/$objdir
8620 ;;
8621 esac
8622 else
8623 eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
8624 test -z "$libdir" && \
8625 func_fatal_error "'$deplib' is not a valid libtool archive"
8626 test "$absdir" != "$libdir" && \
8627 func_warning "'$deplib' seems to be moved"
8628
8629 path=-L$absdir
8630 fi
8631 ;;
8632 esac
8633 case " $deplibs " in
8634 *" $path "*) ;;
8635 *) deplibs="$path $deplibs" ;;
8636 esac
8637 done
8638 fi # link_all_deplibs != no
8639 fi # linkmode = lib
8640 done # for deplib in $libs
8641 if test link = "$pass"; then
8642 if test prog = "$linkmode"; then
8643 compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
8644 finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
8645 else
8646 compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
8647 fi
8648 fi
8649 dependency_libs=$newdependency_libs
8650 if test dlpreopen = "$pass"; then
8651 # Link the dlpreopened libraries before other libraries
8652 for deplib in $save_deplibs; do
8653 deplibs="$deplib $deplibs"
8654 done
8655 fi
8656 if test dlopen != "$pass"; then
8657 test conv = "$pass" || {
8658 # Make sure lib_search_path contains only unique directories.
8659 lib_search_path=
8660 for dir in $newlib_search_path; do
8661 case "$lib_search_path " in
8662 *" $dir "*) ;;
8663 *) func_append lib_search_path " $dir" ;;
8664 esac
8665 done
8666 newlib_search_path=
8667 }
8668
8669 if test prog,link = "$linkmode,$pass"; then
8670 vars="compile_deplibs finalize_deplibs"
8671 else
8672 vars=deplibs
8673 fi
8674 for var in $vars dependency_libs; do
8675 # Add libraries to $var in reverse order
8676 eval tmp_libs=\"\$$var\"
8677 new_libs=
8678 for deplib in $tmp_libs; do
8679 # FIXME: Pedantically, this is the right thing to do, so
8680 # that some nasty dependency loop isn't accidentally
8681 # broken:
8682 #new_libs="$deplib $new_libs"
8683 # Pragmatically, this seems to cause very few problems in
8684 # practice:
8685 case $deplib in
8686 -L*) new_libs="$deplib $new_libs" ;;
8687 -R*) ;;
8688 *)
8689 # And here is the reason: when a library appears more
8690 # than once as an explicit dependence of a library, or
8691 # is implicitly linked in more than once by the
8692 # compiler, it is considered special, and multiple
8693 # occurrences thereof are not removed. Compare this
8694 # with having the same library being listed as a
8695 # dependency of multiple other libraries: in this case,
8696 # we know (pedantically, we assume) the library does not
8697 # need to be listed more than once, so we keep only the
8698 # last copy. This is not always right, but it is rare
8699 # enough that we require users that really mean to play
8700 # such unportable linking tricks to link the library
8701 # using -Wl,-lname, so that libtool does not consider it
8702 # for duplicate removal.
8703 case " $specialdeplibs " in
8704 *" $deplib "*) new_libs="$deplib $new_libs" ;;
8705 *)
8706 case " $new_libs " in
8707 *" $deplib "*) ;;
8708 *) new_libs="$deplib $new_libs" ;;
8709 esac
8710 ;;
8711 esac
8712 ;;
8713 esac
8714 done
8715 tmp_libs=
8716 for deplib in $new_libs; do
8717 case $deplib in
8718 -L*)
8719 case " $tmp_libs " in
8720 *" $deplib "*) ;;
8721 *) func_append tmp_libs " $deplib" ;;
8722 esac
8723 ;;
8724 *) func_append tmp_libs " $deplib" ;;
8725 esac
8726 done
8727 eval $var=\"$tmp_libs\"
8728 done # for var
8729 fi
8730
8731 # Add Sun CC postdeps if required:
8732 test CXX = "$tagname" && {
8733 case $host_os in
8734 linux*)
8735 case `$CC -V 2>&1 | sed 5q` in
8736 *Sun\ C*) # Sun C++ 5.9
8737 func_suncc_cstd_abi
8738
8739 if test no != "$suncc_use_cstd_abi"; then
8740 func_append postdeps ' -library=Cstd -library=Crun'
8741 fi
8742 ;;
8743 esac
8744 ;;
8745
8746 solaris*)
8747 func_cc_basename "$CC"
8748 case $func_cc_basename_result in
8749 CC* | sunCC*)
8750 func_suncc_cstd_abi
8751
8752 if test no != "$suncc_use_cstd_abi"; then
8753 func_append postdeps ' -library=Cstd -library=Crun'
8754 fi
8755 ;;
8756 esac
8757 ;;
8758 esac
8759 }
8760
8761 # Last step: remove runtime libs from dependency_libs
8762 # (they stay in deplibs)
8763 tmp_libs=
8764 for i in $dependency_libs; do
8765 case " $predeps $postdeps $compiler_lib_search_path " in
8766 *" $i "*)
8767 i=
8768 ;;
8769 esac
8770 if test -n "$i"; then
8771 func_append tmp_libs " $i"
8772 fi
8773 done
8774 dependency_libs=$tmp_libs
8775 done # for pass
8776 if test prog = "$linkmode"; then
8777 dlfiles=$newdlfiles
8778 fi
8779 if test prog = "$linkmode" || test lib = "$linkmode"; then
8780 dlprefiles=$newdlprefiles
8781 fi
8782
8783 case $linkmode in
8784 oldlib)
8785 if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
8786 func_warning "'-dlopen' is ignored for archives"
8787 fi
8788
8789 case " $deplibs" in
8790 *\ -l* | *\ -L*)
8791 func_warning "'-l' and '-L' are ignored for archives" ;;
8792 esac
8793
8794 test -n "$rpath" && \
8795 func_warning "'-rpath' is ignored for archives"
8796
8797 test -n "$xrpath" && \
8798 func_warning "'-R' is ignored for archives"
8799
8800 test -n "$vinfo" && \
8801 func_warning "'-version-info/-version-number' is ignored for archives"
8802
8803 test -n "$release" && \
8804 func_warning "'-release' is ignored for archives"
8805
8806 test -n "$export_symbols$export_symbols_regex" && \
8807 func_warning "'-export-symbols' is ignored for archives"
8808
8809 # Now set the variables for building old libraries.
8810 build_libtool_libs=no
8811 oldlibs=$output
8812 func_append objs "$old_deplibs"
8813 ;;
8814
8815 lib)
8816 # Make sure we only generate libraries of the form 'libNAME.la'.
8817 case $outputname in
8818 lib*)
8819 func_stripname 'lib' '.la' "$outputname"
8820 name=$func_stripname_result
8821 eval shared_ext=\"$shrext_cmds\"
8822 eval libname=\"$libname_spec\"
8823 ;;
8824 *)
8825 test no = "$module" \
8826 && func_fatal_help "libtool library '$output' must begin with 'lib'"
8827
8828 if test no != "$need_lib_prefix"; then
8829 # Add the "lib" prefix for modules if required
8830 func_stripname '' '.la' "$outputname"
8831 name=$func_stripname_result
8832 eval shared_ext=\"$shrext_cmds\"
8833 eval libname=\"$libname_spec\"
8834 else
8835 func_stripname '' '.la' "$outputname"
8836 libname=$func_stripname_result
8837 fi
8838 ;;
8839 esac
8840
8841 if test -n "$objs"; then
8842 if test pass_all != "$deplibs_check_method"; then
8843 func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs"
8844 else
8845 echo
8846 $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
8847 $ECHO "*** objects $objs is not portable!"
8848 func_append libobjs " $objs"
8849 fi
8850 fi
8851
8852 test no = "$dlself" \
8853 || func_warning "'-dlopen self' is ignored for libtool libraries"
8854
8855 set dummy $rpath
8856 shift
8857 test 1 -lt "$#" \
8858 && func_warning "ignoring multiple '-rpath's for a libtool library"
8859
8860 install_libdir=$1
8861
8862 oldlibs=
8863 if test -z "$rpath"; then
8864 if test yes = "$build_libtool_libs"; then
8865 # Building a libtool convenience library.
8866 # Some compilers have problems with a '.al' extension so
8867 # convenience libraries should have the same extension an
8868 # archive normally would.
8869 oldlibs="$output_objdir/$libname.$libext $oldlibs"
8870 build_libtool_libs=convenience
8871 build_old_libs=yes
8872 fi
8873
8874 test -n "$vinfo" && \
8875 func_warning "'-version-info/-version-number' is ignored for convenience libraries"
8876
8877 test -n "$release" && \
8878 func_warning "'-release' is ignored for convenience libraries"
8879 else
8880
8881 # Parse the version information argument.
8882 save_ifs=$IFS; IFS=:
8883 set dummy $vinfo 0 0 0
8884 shift
8885 IFS=$save_ifs
8886
8887 test -n "$7" && \
8888 func_fatal_help "too many parameters to '-version-info'"
8889
8890 # convert absolute version numbers to libtool ages
8891 # this retains compatibility with .la files and attempts
8892 # to make the code below a bit more comprehensible
8893
8894 case $vinfo_number in
8895 yes)
8896 number_major=$1
8897 number_minor=$2
8898 number_revision=$3
8899 #
8900 # There are really only two kinds -- those that
8901 # use the current revision as the major version
8902 # and those that subtract age and use age as
8903 # a minor version. But, then there is irix
8904 # that has an extra 1 added just for fun
8905 #
8906 case $version_type in
8907 # correct linux to gnu/linux during the next big refactor
8908 darwin|freebsd-elf|linux|osf|windows|none)
8909 func_arith $number_major + $number_minor
8910 current=$func_arith_result
8911 age=$number_minor
8912 revision=$number_revision
8913 ;;
8914 freebsd-aout|qnx|sunos)
8915 current=$number_major
8916 revision=$number_minor
8917 age=0
8918 ;;
8919 irix|nonstopux)
8920 func_arith $number_major + $number_minor
8921 current=$func_arith_result
8922 age=$number_minor
8923 revision=$number_minor
8924 lt_irix_increment=no
8925 ;;
8926 *)
8927 func_fatal_configuration "$modename: unknown library version type '$version_type'"
8928 ;;
8929 esac
8930 ;;
8931 no)
8932 current=$1
8933 revision=$2
8934 age=$3
8935 ;;
8936 esac
8937
8938 # Check that each of the things are valid numbers.
8939 case $current in
8940 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
8941 *)
8942 func_error "CURRENT '$current' must be a nonnegative integer"
8943 func_fatal_error "'$vinfo' is not valid version information"
8944 ;;
8945 esac
8946
8947 case $revision in
8948 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
8949 *)
8950 func_error "REVISION '$revision' must be a nonnegative integer"
8951 func_fatal_error "'$vinfo' is not valid version information"
8952 ;;
8953 esac
8954
8955 case $age in
8956 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
8957 *)
8958 func_error "AGE '$age' must be a nonnegative integer"
8959 func_fatal_error "'$vinfo' is not valid version information"
8960 ;;
8961 esac
8962
8963 if test "$age" -gt "$current"; then
8964 func_error "AGE '$age' is greater than the current interface number '$current'"
8965 func_fatal_error "'$vinfo' is not valid version information"
8966 fi
8967
8968 # Calculate the version variables.
8969 major=
8970 versuffix=
8971 verstring=
8972 case $version_type in
8973 none) ;;
8974
8975 darwin)
8976 # Like Linux, but with the current version available in
8977 # verstring for coding it into the library header
8978 func_arith $current - $age
8979 major=.$func_arith_result
8980 versuffix=$major.$age.$revision
8981 # Darwin ld doesn't like 0 for these options...
8982 func_arith $current + 1
8983 minor_current=$func_arith_result
8984 xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision"
8985 verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
8986 # On Darwin other compilers
8987 case $CC in
8988 nagfor*)
8989 verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision"
8990 ;;
8991 *)
8992 verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
8993 ;;
8994 esac
8995 ;;
8996
8997 freebsd-aout)
8998 major=.$current
8999 versuffix=.$current.$revision
9000 ;;
9001
9002 freebsd-elf)
9003 func_arith $current - $age
9004 major=.$func_arith_result
9005 versuffix=$major.$age.$revision
9006 ;;
9007
9008 irix | nonstopux)
9009 if test no = "$lt_irix_increment"; then
9010 func_arith $current - $age
9011 else
9012 func_arith $current - $age + 1
9013 fi
9014 major=$func_arith_result
9015
9016 case $version_type in
9017 nonstopux) verstring_prefix=nonstopux ;;
9018 *) verstring_prefix=sgi ;;
9019 esac
9020 verstring=$verstring_prefix$major.$revision
9021
9022 # Add in all the interfaces that we are compatible with.
9023 loop=$revision
9024 while test 0 -ne "$loop"; do
9025 func_arith $revision - $loop
9026 iface=$func_arith_result
9027 func_arith $loop - 1
9028 loop=$func_arith_result
9029 verstring=$verstring_prefix$major.$iface:$verstring
9030 done
9031
9032 # Before this point, $major must not contain '.'.
9033 major=.$major
9034 versuffix=$major.$revision
9035 ;;
9036
9037 linux) # correct to gnu/linux during the next big refactor
9038 func_arith $current - $age
9039 major=.$func_arith_result
9040 versuffix=$major.$age.$revision
9041 ;;
9042
9043 osf)
9044 func_arith $current - $age
9045 major=.$func_arith_result
9046 versuffix=.$current.$age.$revision
9047 verstring=$current.$age.$revision
9048
9049 # Add in all the interfaces that we are compatible with.
9050 loop=$age
9051 while test 0 -ne "$loop"; do
9052 func_arith $current - $loop
9053 iface=$func_arith_result
9054 func_arith $loop - 1
9055 loop=$func_arith_result
9056 verstring=$verstring:$iface.0
9057 done
9058
9059 # Make executables depend on our current version.
9060 func_append verstring ":$current.0"
9061 ;;
9062
9063 qnx)
9064 major=.$current
9065 versuffix=.$current
9066 ;;
9067
9068 sco)
9069 major=.$current
9070 versuffix=.$current
9071 ;;
9072
9073 sunos)
9074 major=.$current
9075 versuffix=.$current.$revision
9076 ;;
9077
9078 windows)
9079 # Use '-' rather than '.', since we only want one
9080 # extension on DOS 8.3 file systems.
9081 func_arith $current - $age
9082 major=$func_arith_result
9083 versuffix=-$major
9084 ;;
9085
9086 *)
9087 func_fatal_configuration "unknown library version type '$version_type'"
9088 ;;
9089 esac
9090
9091 # Clear the version info if we defaulted, and they specified a release.
9092 if test -z "$vinfo" && test -n "$release"; then
9093 major=
9094 case $version_type in
9095 darwin)
9096 # we can't check for "0.0" in archive_cmds due to quoting
9097 # problems, so we reset it completely
9098 verstring=
9099 ;;
9100 *)
9101 verstring=0.0
9102 ;;
9103 esac
9104 if test no = "$need_version"; then
9105 versuffix=
9106 else
9107 versuffix=.0.0
9108 fi
9109 fi
9110
9111 # Remove version info from name if versioning should be avoided
9112 if test yes,no = "$avoid_version,$need_version"; then
9113 major=
9114 versuffix=
9115 verstring=
9116 fi
9117
9118 # Check to see if the archive will have undefined symbols.
9119 if test yes = "$allow_undefined"; then
9120 if test unsupported = "$allow_undefined_flag"; then
9121 if test yes = "$build_old_libs"; then
9122 func_warning "undefined symbols not allowed in $host shared libraries; building static only"
9123 build_libtool_libs=no
9124 else
9125 func_fatal_error "can't build $host shared library unless -no-undefined is specified"
9126 fi
9127 fi
9128 else
9129 # Don't allow undefined symbols.
9130 allow_undefined_flag=$no_undefined_flag
9131 fi
9132
9133 fi
9134
9135 func_generate_dlsyms "$libname" "$libname" :
9136 func_append libobjs " $symfileobj"
9137 test " " = "$libobjs" && libobjs=
9138
9139 if test relink != "$opt_mode"; then
9140 # Remove our outputs, but don't remove object files since they
9141 # may have been created when compiling PIC objects.
9142 removelist=
9143 tempremovelist=`$ECHO "$output_objdir/*"`
9144 for p in $tempremovelist; do
9145 case $p in
9146 *.$objext | *.gcno)
9147 ;;
9148 $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*)
9149 if test -n "$precious_files_regex"; then
9150 if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
9151 then
9152 continue
9153 fi
9154 fi
9155 func_append removelist " $p"
9156 ;;
9157 *) ;;
9158 esac
9159 done
9160 test -n "$removelist" && \
9161 func_show_eval "${RM}r \$removelist"
9162 fi
9163
9164 # Now set the variables for building old libraries.
9165 if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then
9166 func_append oldlibs " $output_objdir/$libname.$libext"
9167
9168 # Transform .lo files to .o files.
9169 oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP`
9170 fi
9171
9172 # Eliminate all temporary directories.
9173 #for path in $notinst_path; do
9174 # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"`
9175 # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"`
9176 # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"`
9177 #done
9178
9179 if test -n "$xrpath"; then
9180 # If the user specified any rpath flags, then add them.
9181 temp_xrpath=
9182 for libdir in $xrpath; do
9183 func_replace_sysroot "$libdir"
9184 func_append temp_xrpath " -R$func_replace_sysroot_result"
9185 case "$finalize_rpath " in
9186 *" $libdir "*) ;;
9187 *) func_append finalize_rpath " $libdir" ;;
9188 esac
9189 done
9190 if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then
9191 dependency_libs="$temp_xrpath $dependency_libs"
9192 fi
9193 fi
9194
9195 # Make sure dlfiles contains only unique files that won't be dlpreopened
9196 old_dlfiles=$dlfiles
9197 dlfiles=
9198 for lib in $old_dlfiles; do
9199 case " $dlprefiles $dlfiles " in
9200 *" $lib "*) ;;
9201 *) func_append dlfiles " $lib" ;;
9202 esac
9203 done
9204
9205 # Make sure dlprefiles contains only unique files
9206 old_dlprefiles=$dlprefiles
9207 dlprefiles=
9208 for lib in $old_dlprefiles; do
9209 case "$dlprefiles " in
9210 *" $lib "*) ;;
9211 *) func_append dlprefiles " $lib" ;;
9212 esac
9213 done
9214
9215 if test yes = "$build_libtool_libs"; then
9216 if test -n "$rpath"; then
9217 case $host in
9218 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
9219 # these systems don't actually have a c library (as such)!
9220 ;;
9221 *-*-rhapsody* | *-*-darwin1.[012])
9222 # Rhapsody C library is in the System framework
9223 func_append deplibs " System.ltframework"
9224 ;;
9225 *-*-netbsd*)
9226 # Don't link with libc until the a.out ld.so is fixed.
9227 ;;
9228 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
9229 # Do not include libc due to us having libc/libc_r.
9230 ;;
9231 *-*-sco3.2v5* | *-*-sco5v6*)
9232 # Causes problems with __ctype
9233 ;;
9234 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
9235 # Compiler inserts libc in the correct place for threads to work
9236 ;;
9237 *)
9238 # Add libc to deplibs on all other systems if necessary.
9239 if test yes = "$build_libtool_need_lc"; then
9240 func_append deplibs " -lc"
9241 fi
9242 ;;
9243 esac
9244 fi
9245
9246 # Transform deplibs into only deplibs that can be linked in shared.
9247 name_save=$name
9248 libname_save=$libname
9249 release_save=$release
9250 versuffix_save=$versuffix
9251 major_save=$major
9252 # I'm not sure if I'm treating the release correctly. I think
9253 # release should show up in the -l (ie -lgmp5) so we don't want to
9254 # add it in twice. Is that correct?
9255 release=
9256 versuffix=
9257 major=
9258 newdeplibs=
9259 droppeddeps=no
9260 case $deplibs_check_method in
9261 pass_all)
9262 # Don't check for shared/static. Everything works.
9263 # This might be a little naive. We might want to check
9264 # whether the library exists or not. But this is on
9265 # osf3 & osf4 and I'm not really sure... Just
9266 # implementing what was already the behavior.
9267 newdeplibs=$deplibs
9268 ;;
9269 test_compile)
9270 # This code stresses the "libraries are programs" paradigm to its
9271 # limits. Maybe even breaks it. We compile a program, linking it
9272 # against the deplibs as a proxy for the library. Then we can check
9273 # whether they linked in statically or dynamically with ldd.
9274 $opt_dry_run || $RM conftest.c
9275 cat > conftest.c <<EOF
9276 int main() { return 0; }
9277 EOF
9278 $opt_dry_run || $RM conftest
9279 if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
9280 ldd_output=`ldd conftest`
9281 for i in $deplibs; do
9282 case $i in
9283 -l*)
9284 func_stripname -l '' "$i"
9285 name=$func_stripname_result
9286 if test yes = "$allow_libtool_libs_with_static_runtimes"; then
9287 case " $predeps $postdeps " in
9288 *" $i "*)
9289 func_append newdeplibs " $i"
9290 i=
9291 ;;
9292 esac
9293 fi
9294 if test -n "$i"; then
9295 libname=`eval "\\$ECHO \"$libname_spec\""`
9296 deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
9297 set dummy $deplib_matches; shift
9298 deplib_match=$1
9299 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then
9300 func_append newdeplibs " $i"
9301 else
9302 droppeddeps=yes
9303 echo
9304 $ECHO "*** Warning: dynamic linker does not accept needed library $i."
9305 echo "*** I have the capability to make that library automatically link in when"
9306 echo "*** you link to this library. But I can only do this if you have a"
9307 echo "*** shared version of the library, which I believe you do not have"
9308 echo "*** because a test_compile did reveal that the linker did not use it for"
9309 echo "*** its dynamic dependency list that programs get resolved with at runtime."
9310 fi
9311 fi
9312 ;;
9313 *)
9314 func_append newdeplibs " $i"
9315 ;;
9316 esac
9317 done
9318 else
9319 # Error occurred in the first compile. Let's try to salvage
9320 # the situation: Compile a separate program for each library.
9321 for i in $deplibs; do
9322 case $i in
9323 -l*)
9324 func_stripname -l '' "$i"
9325 name=$func_stripname_result
9326 $opt_dry_run || $RM conftest
9327 if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
9328 ldd_output=`ldd conftest`
9329 if test yes = "$allow_libtool_libs_with_static_runtimes"; then
9330 case " $predeps $postdeps " in
9331 *" $i "*)
9332 func_append newdeplibs " $i"
9333 i=
9334 ;;
9335 esac
9336 fi
9337 if test -n "$i"; then
9338 libname=`eval "\\$ECHO \"$libname_spec\""`
9339 deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
9340 set dummy $deplib_matches; shift
9341 deplib_match=$1
9342 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then
9343 func_append newdeplibs " $i"
9344 else
9345 droppeddeps=yes
9346 echo
9347 $ECHO "*** Warning: dynamic linker does not accept needed library $i."
9348 echo "*** I have the capability to make that library automatically link in when"
9349 echo "*** you link to this library. But I can only do this if you have a"
9350 echo "*** shared version of the library, which you do not appear to have"
9351 echo "*** because a test_compile did reveal that the linker did not use this one"
9352 echo "*** as a dynamic dependency that programs can get resolved with at runtime."
9353 fi
9354 fi
9355 else
9356 droppeddeps=yes
9357 echo
9358 $ECHO "*** Warning! Library $i is needed by this library but I was not able to"
9359 echo "*** make it link in! You will probably need to install it or some"
9360 echo "*** library that it depends on before this library will be fully"
9361 echo "*** functional. Installing it before continuing would be even better."
9362 fi
9363 ;;
9364 *)
9365 func_append newdeplibs " $i"
9366 ;;
9367 esac
9368 done
9369 fi
9370 ;;
9371 file_magic*)
9372 set dummy $deplibs_check_method; shift
9373 file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
9374 for a_deplib in $deplibs; do
9375 case $a_deplib in
9376 -l*)
9377 func_stripname -l '' "$a_deplib"
9378 name=$func_stripname_result
9379 if test yes = "$allow_libtool_libs_with_static_runtimes"; then
9380 case " $predeps $postdeps " in
9381 *" $a_deplib "*)
9382 func_append newdeplibs " $a_deplib"
9383 a_deplib=
9384 ;;
9385 esac
9386 fi
9387 if test -n "$a_deplib"; then
9388 libname=`eval "\\$ECHO \"$libname_spec\""`
9389 if test -n "$file_magic_glob"; then
9390 libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob`
9391 else
9392 libnameglob=$libname
9393 fi
9394 test yes = "$want_nocaseglob" && nocaseglob=`shopt -p nocaseglob`
9395 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
9396 if test yes = "$want_nocaseglob"; then
9397 shopt -s nocaseglob
9398 potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
9399 $nocaseglob
9400 else
9401 potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
9402 fi
9403 for potent_lib in $potential_libs; do
9404 # Follow soft links.
9405 if ls -lLd "$potent_lib" 2>/dev/null |
9406 $GREP " -> " >/dev/null; then
9407 continue
9408 fi
9409 # The statement above tries to avoid entering an
9410 # endless loop below, in case of cyclic links.
9411 # We might still enter an endless loop, since a link
9412 # loop can be closed while we follow links,
9413 # but so what?
9414 potlib=$potent_lib
9415 while test -h "$potlib" 2>/dev/null; do
9416 potliblink=`ls -ld $potlib | $SED 's/.* -> //'`
9417 case $potliblink in
9418 [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;;
9419 *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";;
9420 esac
9421 done
9422 if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
9423 $SED -e 10q |
9424 $EGREP "$file_magic_regex" > /dev/null; then
9425 func_append newdeplibs " $a_deplib"
9426 a_deplib=
9427 break 2
9428 fi
9429 done
9430 done
9431 fi
9432 if test -n "$a_deplib"; then
9433 droppeddeps=yes
9434 echo
9435 $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
9436 echo "*** I have the capability to make that library automatically link in when"
9437 echo "*** you link to this library. But I can only do this if you have a"
9438 echo "*** shared version of the library, which you do not appear to have"
9439 echo "*** because I did check the linker path looking for a file starting"
9440 if test -z "$potlib"; then
9441 $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
9442 else
9443 $ECHO "*** with $libname and none of the candidates passed a file format test"
9444 $ECHO "*** using a file magic. Last file checked: $potlib"
9445 fi
9446 fi
9447 ;;
9448 *)
9449 # Add a -L argument.
9450 func_append newdeplibs " $a_deplib"
9451 ;;
9452 esac
9453 done # Gone through all deplibs.
9454 ;;
9455 match_pattern*)
9456 set dummy $deplibs_check_method; shift
9457 match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
9458 for a_deplib in $deplibs; do
9459 case $a_deplib in
9460 -l*)
9461 func_stripname -l '' "$a_deplib"
9462 name=$func_stripname_result
9463 if test yes = "$allow_libtool_libs_with_static_runtimes"; then
9464 case " $predeps $postdeps " in
9465 *" $a_deplib "*)
9466 func_append newdeplibs " $a_deplib"
9467 a_deplib=
9468 ;;
9469 esac
9470 fi
9471 if test -n "$a_deplib"; then
9472 libname=`eval "\\$ECHO \"$libname_spec\""`
9473 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
9474 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
9475 for potent_lib in $potential_libs; do
9476 potlib=$potent_lib # see symlink-check above in file_magic test
9477 if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
9478 $EGREP "$match_pattern_regex" > /dev/null; then
9479 func_append newdeplibs " $a_deplib"
9480 a_deplib=
9481 break 2
9482 fi
9483 done
9484 done
9485 fi
9486 if test -n "$a_deplib"; then
9487 droppeddeps=yes
9488 echo
9489 $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
9490 echo "*** I have the capability to make that library automatically link in when"
9491 echo "*** you link to this library. But I can only do this if you have a"
9492 echo "*** shared version of the library, which you do not appear to have"
9493 echo "*** because I did check the linker path looking for a file starting"
9494 if test -z "$potlib"; then
9495 $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
9496 else
9497 $ECHO "*** with $libname and none of the candidates passed a file format test"
9498 $ECHO "*** using a regex pattern. Last file checked: $potlib"
9499 fi
9500 fi
9501 ;;
9502 *)
9503 # Add a -L argument.
9504 func_append newdeplibs " $a_deplib"
9505 ;;
9506 esac
9507 done # Gone through all deplibs.
9508 ;;
9509 none | unknown | *)
9510 newdeplibs=
9511 tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'`
9512 if test yes = "$allow_libtool_libs_with_static_runtimes"; then
9513 for i in $predeps $postdeps; do
9514 # can't use Xsed below, because $i might contain '/'
9515 tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"`
9516 done
9517 fi
9518 case $tmp_deplibs in
9519 *[!\ \ ]*)
9520 echo
9521 if test none = "$deplibs_check_method"; then
9522 echo "*** Warning: inter-library dependencies are not supported in this platform."
9523 else
9524 echo "*** Warning: inter-library dependencies are not known to be supported."
9525 fi
9526 echo "*** All declared inter-library dependencies are being dropped."
9527 droppeddeps=yes
9528 ;;
9529 esac
9530 ;;
9531 esac
9532 versuffix=$versuffix_save
9533 major=$major_save
9534 release=$release_save
9535 libname=$libname_save
9536 name=$name_save
9537
9538 case $host in
9539 *-*-rhapsody* | *-*-darwin1.[012])
9540 # On Rhapsody replace the C library with the System framework
9541 newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'`
9542 ;;
9543 esac
9544
9545 if test yes = "$droppeddeps"; then
9546 if test yes = "$module"; then
9547 echo
9548 echo "*** Warning: libtool could not satisfy all declared inter-library"
9549 $ECHO "*** dependencies of module $libname. Therefore, libtool will create"
9550 echo "*** a static module, that should work as long as the dlopening"
9551 echo "*** application is linked with the -dlopen flag."
9552 if test -z "$global_symbol_pipe"; then
9553 echo
9554 echo "*** However, this would only work if libtool was able to extract symbol"
9555 echo "*** lists from a program, using 'nm' or equivalent, but libtool could"
9556 echo "*** not find such a program. So, this module is probably useless."
9557 echo "*** 'nm' from GNU binutils and a full rebuild may help."
9558 fi
9559 if test no = "$build_old_libs"; then
9560 oldlibs=$output_objdir/$libname.$libext
9561 build_libtool_libs=module
9562 build_old_libs=yes
9563 else
9564 build_libtool_libs=no
9565 fi
9566 else
9567 echo "*** The inter-library dependencies that have been dropped here will be"
9568 echo "*** automatically added whenever a program is linked with this library"
9569 echo "*** or is declared to -dlopen it."
9570
9571 if test no = "$allow_undefined"; then
9572 echo
9573 echo "*** Since this library must not contain undefined symbols,"
9574 echo "*** because either the platform does not support them or"
9575 echo "*** it was explicitly requested with -no-undefined,"
9576 echo "*** libtool will only create a static version of it."
9577 if test no = "$build_old_libs"; then
9578 oldlibs=$output_objdir/$libname.$libext
9579 build_libtool_libs=module
9580 build_old_libs=yes
9581 else
9582 build_libtool_libs=no
9583 fi
9584 fi
9585 fi
9586 fi
9587 # Done checking deplibs!
9588 deplibs=$newdeplibs
9589 fi
9590 # Time to change all our "foo.ltframework" stuff back to "-framework foo"
9591 case $host in
9592 *-*-darwin*)
9593 newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
9594 new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
9595 deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
9596 ;;
9597 esac
9598
9599 # move library search paths that coincide with paths to not yet
9600 # installed libraries to the beginning of the library search list
9601 new_libs=
9602 for path in $notinst_path; do
9603 case " $new_libs " in
9604 *" -L$path/$objdir "*) ;;
9605 *)
9606 case " $deplibs " in
9607 *" -L$path/$objdir "*)
9608 func_append new_libs " -L$path/$objdir" ;;
9609 esac
9610 ;;
9611 esac
9612 done
9613 for deplib in $deplibs; do
9614 case $deplib in
9615 -L*)
9616 case " $new_libs " in
9617 *" $deplib "*) ;;
9618 *) func_append new_libs " $deplib" ;;
9619 esac
9620 ;;
9621 *) func_append new_libs " $deplib" ;;
9622 esac
9623 done
9624 deplibs=$new_libs
9625
9626 # All the library-specific variables (install_libdir is set above).
9627 library_names=
9628 old_library=
9629 dlname=
9630
9631 # Test again, we may have decided not to build it any more
9632 if test yes = "$build_libtool_libs"; then
9633 # Remove $wl instances when linking with ld.
9634 # FIXME: should test the right _cmds variable.
9635 case $archive_cmds in
9636 *\$LD\ *) wl= ;;
9637 esac
9638 if test yes = "$hardcode_into_libs"; then
9639 # Hardcode the library paths
9640 hardcode_libdirs=
9641 dep_rpath=
9642 rpath=$finalize_rpath
9643 test relink = "$opt_mode" || rpath=$compile_rpath$rpath
9644 for libdir in $rpath; do
9645 if test -n "$hardcode_libdir_flag_spec"; then
9646 if test -n "$hardcode_libdir_separator"; then
9647 func_replace_sysroot "$libdir"
9648 libdir=$func_replace_sysroot_result
9649 if test -z "$hardcode_libdirs"; then
9650 hardcode_libdirs=$libdir
9651 else
9652 # Just accumulate the unique libdirs.
9653 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
9654 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
9655 ;;
9656 *)
9657 func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
9658 ;;
9659 esac
9660 fi
9661 else
9662 eval flag=\"$hardcode_libdir_flag_spec\"
9663 func_append dep_rpath " $flag"
9664 fi
9665 elif test -n "$runpath_var"; then
9666 case "$perm_rpath " in
9667 *" $libdir "*) ;;
9668 *) func_append perm_rpath " $libdir" ;;
9669 esac
9670 fi
9671 done
9672 # Substitute the hardcoded libdirs into the rpath.
9673 if test -n "$hardcode_libdir_separator" &&
9674 test -n "$hardcode_libdirs"; then
9675 libdir=$hardcode_libdirs
9676 eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
9677 fi
9678 if test -n "$runpath_var" && test -n "$perm_rpath"; then
9679 # We should set the runpath_var.
9680 rpath=
9681 for dir in $perm_rpath; do
9682 func_append rpath "$dir:"
9683 done
9684 eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
9685 fi
9686 test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
9687 fi
9688
9689 shlibpath=$finalize_shlibpath
9690 test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath
9691 if test -n "$shlibpath"; then
9692 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
9693 fi
9694
9695 # Get the real and link names of the library.
9696 eval shared_ext=\"$shrext_cmds\"
9697 eval library_names=\"$library_names_spec\"
9698 set dummy $library_names
9699 shift
9700 realname=$1
9701 shift
9702
9703 if test -n "$soname_spec"; then
9704 eval soname=\"$soname_spec\"
9705 else
9706 soname=$realname
9707 fi
9708 if test -z "$dlname"; then
9709 dlname=$soname
9710 fi
9711
9712 lib=$output_objdir/$realname
9713 linknames=
9714 for link
9715 do
9716 func_append linknames " $link"
9717 done
9718
9719 # Use standard objects if they are pic
9720 test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP`
9721 test "X$libobjs" = "X " && libobjs=
9722
9723 delfiles=
9724 if test -n "$export_symbols" && test -n "$include_expsyms"; then
9725 $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
9726 export_symbols=$output_objdir/$libname.uexp
9727 func_append delfiles " $export_symbols"
9728 fi
9729
9730 orig_export_symbols=
9731 case $host_os in
9732 cygwin* | mingw* | cegcc*)
9733 if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
9734 # exporting using user supplied symfile
9735 func_dll_def_p "$export_symbols" || {
9736 # and it's NOT already a .def file. Must figure out
9737 # which of the given symbols are data symbols and tag
9738 # them as such. So, trigger use of export_symbols_cmds.
9739 # export_symbols gets reassigned inside the "prepare
9740 # the list of exported symbols" if statement, so the
9741 # include_expsyms logic still works.
9742 orig_export_symbols=$export_symbols
9743 export_symbols=
9744 always_export_symbols=yes
9745 }
9746 fi
9747 ;;
9748 esac
9749
9750 # Prepare the list of exported symbols
9751 if test -z "$export_symbols"; then
9752 if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then
9753 func_verbose "generating symbol list for '$libname.la'"
9754 export_symbols=$output_objdir/$libname.exp
9755 $opt_dry_run || $RM $export_symbols
9756 cmds=$export_symbols_cmds
9757 save_ifs=$IFS; IFS='~'
9758 for cmd1 in $cmds; do
9759 IFS=$save_ifs
9760 # Take the normal branch if the nm_file_list_spec branch
9761 # doesn't work or if tool conversion is not needed.
9762 case $nm_file_list_spec~$to_tool_file_cmd in
9763 *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*)
9764 try_normal_branch=yes
9765 eval cmd=\"$cmd1\"
9766 func_len " $cmd"
9767 len=$func_len_result
9768 ;;
9769 *)
9770 try_normal_branch=no
9771 ;;
9772 esac
9773 if test yes = "$try_normal_branch" \
9774 && { test "$len" -lt "$max_cmd_len" \
9775 || test "$max_cmd_len" -le -1; }
9776 then
9777 func_show_eval "$cmd" 'exit $?'
9778 skipped_export=false
9779 elif test -n "$nm_file_list_spec"; then
9780 func_basename "$output"
9781 output_la=$func_basename_result
9782 save_libobjs=$libobjs
9783 save_output=$output
9784 output=$output_objdir/$output_la.nm
9785 func_to_tool_file "$output"
9786 libobjs=$nm_file_list_spec$func_to_tool_file_result
9787 func_append delfiles " $output"
9788 func_verbose "creating $NM input file list: $output"
9789 for obj in $save_libobjs; do
9790 func_to_tool_file "$obj"
9791 $ECHO "$func_to_tool_file_result"
9792 done > "$output"
9793 eval cmd=\"$cmd1\"
9794 func_show_eval "$cmd" 'exit $?'
9795 output=$save_output
9796 libobjs=$save_libobjs
9797 skipped_export=false
9798 else
9799 # The command line is too long to execute in one step.
9800 func_verbose "using reloadable object file for export list..."
9801 skipped_export=:
9802 # Break out early, otherwise skipped_export may be
9803 # set to false by a later but shorter cmd.
9804 break
9805 fi
9806 done
9807 IFS=$save_ifs
9808 if test -n "$export_symbols_regex" && test : != "$skipped_export"; then
9809 func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
9810 func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
9811 fi
9812 fi
9813 fi
9814
9815 if test -n "$export_symbols" && test -n "$include_expsyms"; then
9816 tmp_export_symbols=$export_symbols
9817 test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols
9818 $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
9819 fi
9820
9821 if test : != "$skipped_export" && test -n "$orig_export_symbols"; then
9822 # The given exports_symbols file has to be filtered, so filter it.
9823 func_verbose "filter symbol list for '$libname.la' to tag DATA exports"
9824 # FIXME: $output_objdir/$libname.filter potentially contains lots of
9825 # 's' commands, which not all seds can handle. GNU sed should be fine
9826 # though. Also, the filter scales superlinearly with the number of
9827 # global variables. join(1) would be nice here, but unfortunately
9828 # isn't a blessed tool.
9829 $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
9830 func_append delfiles " $export_symbols $output_objdir/$libname.filter"
9831 export_symbols=$output_objdir/$libname.def
9832 $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
9833 fi
9834
9835 tmp_deplibs=
9836 for test_deplib in $deplibs; do
9837 case " $convenience " in
9838 *" $test_deplib "*) ;;
9839 *)
9840 func_append tmp_deplibs " $test_deplib"
9841 ;;
9842 esac
9843 done
9844 deplibs=$tmp_deplibs
9845
9846 if test -n "$convenience"; then
9847 if test -n "$whole_archive_flag_spec" &&
9848 test yes = "$compiler_needs_object" &&
9849 test -z "$libobjs"; then
9850 # extract the archives, so we have objects to list.
9851 # TODO: could optimize this to just extract one archive.
9852 whole_archive_flag_spec=
9853 fi
9854 if test -n "$whole_archive_flag_spec"; then
9855 save_libobjs=$libobjs
9856 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
9857 test "X$libobjs" = "X " && libobjs=
9858 else
9859 gentop=$output_objdir/${outputname}x
9860 func_append generated " $gentop"
9861
9862 func_extract_archives $gentop $convenience
9863 func_append libobjs " $func_extract_archives_result"
9864 test "X$libobjs" = "X " && libobjs=
9865 fi
9866 fi
9867
9868 if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then
9869 eval flag=\"$thread_safe_flag_spec\"
9870 func_append linker_flags " $flag"
9871 fi
9872
9873 # Make a backup of the uninstalled library when relinking
9874 if test relink = "$opt_mode"; then
9875 $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
9876 fi
9877
9878 # Do each of the archive commands.
9879 if test yes = "$module" && test -n "$module_cmds"; then
9880 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
9881 eval test_cmds=\"$module_expsym_cmds\"
9882 cmds=$module_expsym_cmds
9883 else
9884 eval test_cmds=\"$module_cmds\"
9885 cmds=$module_cmds
9886 fi
9887 else
9888 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
9889 eval test_cmds=\"$archive_expsym_cmds\"
9890 cmds=$archive_expsym_cmds
9891 else
9892 eval test_cmds=\"$archive_cmds\"
9893 cmds=$archive_cmds
9894 fi
9895 fi
9896
9897 if test : != "$skipped_export" &&
9898 func_len " $test_cmds" &&
9899 len=$func_len_result &&
9900 test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
9901 :
9902 else
9903 # The command line is too long to link in one step, link piecewise
9904 # or, if using GNU ld and skipped_export is not :, use a linker
9905 # script.
9906
9907 # Save the value of $output and $libobjs because we want to
9908 # use them later. If we have whole_archive_flag_spec, we
9909 # want to use save_libobjs as it was before
9910 # whole_archive_flag_spec was expanded, because we can't
9911 # assume the linker understands whole_archive_flag_spec.
9912 # This may have to be revisited, in case too many
9913 # convenience libraries get linked in and end up exceeding
9914 # the spec.
9915 if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
9916 save_libobjs=$libobjs
9917 fi
9918 save_output=$output
9919 func_basename "$output"
9920 output_la=$func_basename_result
9921
9922 # Clear the reloadable object creation command queue and
9923 # initialize k to one.
9924 test_cmds=
9925 concat_cmds=
9926 objlist=
9927 last_robj=
9928 k=1
9929
9930 if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then
9931 output=$output_objdir/$output_la.lnkscript
9932 func_verbose "creating GNU ld script: $output"
9933 echo 'INPUT (' > $output
9934 for obj in $save_libobjs
9935 do
9936 func_to_tool_file "$obj"
9937 $ECHO "$func_to_tool_file_result" >> $output
9938 done
9939 echo ')' >> $output
9940 func_append delfiles " $output"
9941 func_to_tool_file "$output"
9942 output=$func_to_tool_file_result
9943 elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then
9944 output=$output_objdir/$output_la.lnk
9945 func_verbose "creating linker input file list: $output"
9946 : > $output
9947 set x $save_libobjs
9948 shift
9949 firstobj=
9950 if test yes = "$compiler_needs_object"; then
9951 firstobj="$1 "
9952 shift
9953 fi
9954 for obj
9955 do
9956 func_to_tool_file "$obj"
9957 $ECHO "$func_to_tool_file_result" >> $output
9958 done
9959 func_append delfiles " $output"
9960 func_to_tool_file "$output"
9961 output=$firstobj\"$file_list_spec$func_to_tool_file_result\"
9962 else
9963 if test -n "$save_libobjs"; then
9964 func_verbose "creating reloadable object files..."
9965 output=$output_objdir/$output_la-$k.$objext
9966 eval test_cmds=\"$reload_cmds\"
9967 func_len " $test_cmds"
9968 len0=$func_len_result
9969 len=$len0
9970
9971 # Loop over the list of objects to be linked.
9972 for obj in $save_libobjs
9973 do
9974 func_len " $obj"
9975 func_arith $len + $func_len_result
9976 len=$func_arith_result
9977 if test -z "$objlist" ||
9978 test "$len" -lt "$max_cmd_len"; then
9979 func_append objlist " $obj"
9980 else
9981 # The command $test_cmds is almost too long, add a
9982 # command to the queue.
9983 if test 1 -eq "$k"; then
9984 # The first file doesn't have a previous command to add.
9985 reload_objs=$objlist
9986 eval concat_cmds=\"$reload_cmds\"
9987 else
9988 # All subsequent reloadable object files will link in
9989 # the last one created.
9990 reload_objs="$objlist $last_robj"
9991 eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"
9992 fi
9993 last_robj=$output_objdir/$output_la-$k.$objext
9994 func_arith $k + 1
9995 k=$func_arith_result
9996 output=$output_objdir/$output_la-$k.$objext
9997 objlist=" $obj"
9998 func_len " $last_robj"
9999 func_arith $len0 + $func_len_result
10000 len=$func_arith_result
10001 fi
10002 done
10003 # Handle the remaining objects by creating one last
10004 # reloadable object file. All subsequent reloadable object
10005 # files will link in the last one created.
10006 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
10007 reload_objs="$objlist $last_robj"
10008 eval concat_cmds=\"\$concat_cmds$reload_cmds\"
10009 if test -n "$last_robj"; then
10010 eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
10011 fi
10012 func_append delfiles " $output"
10013
10014 else
10015 output=
10016 fi
10017
10018 ${skipped_export-false} && {
10019 func_verbose "generating symbol list for '$libname.la'"
10020 export_symbols=$output_objdir/$libname.exp
10021 $opt_dry_run || $RM $export_symbols
10022 libobjs=$output
10023 # Append the command to create the export file.
10024 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
10025 eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
10026 if test -n "$last_robj"; then
10027 eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
10028 fi
10029 }
10030
10031 test -n "$save_libobjs" &&
10032 func_verbose "creating a temporary reloadable object file: $output"
10033
10034 # Loop through the commands generated above and execute them.
10035 save_ifs=$IFS; IFS='~'
10036 for cmd in $concat_cmds; do
10037 IFS=$save_ifs
10038 $opt_quiet || {
10039 func_quote_for_expand "$cmd"
10040 eval "func_echo $func_quote_for_expand_result"
10041 }
10042 $opt_dry_run || eval "$cmd" || {
10043 lt_exit=$?
10044
10045 # Restore the uninstalled library and exit
10046 if test relink = "$opt_mode"; then
10047 ( cd "$output_objdir" && \
10048 $RM "${realname}T" && \
10049 $MV "${realname}U" "$realname" )
10050 fi
10051
10052 exit $lt_exit
10053 }
10054 done
10055 IFS=$save_ifs
10056
10057 if test -n "$export_symbols_regex" && ${skipped_export-false}; then
10058 func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
10059 func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
10060 fi
10061 fi
10062
10063 ${skipped_export-false} && {
10064 if test -n "$export_symbols" && test -n "$include_expsyms"; then
10065 tmp_export_symbols=$export_symbols
10066 test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols
10067 $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
10068 fi
10069
10070 if test -n "$orig_export_symbols"; then
10071 # The given exports_symbols file has to be filtered, so filter it.
10072 func_verbose "filter symbol list for '$libname.la' to tag DATA exports"
10073 # FIXME: $output_objdir/$libname.filter potentially contains lots of
10074 # 's' commands, which not all seds can handle. GNU sed should be fine
10075 # though. Also, the filter scales superlinearly with the number of
10076 # global variables. join(1) would be nice here, but unfortunately
10077 # isn't a blessed tool.
10078 $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
10079 func_append delfiles " $export_symbols $output_objdir/$libname.filter"
10080 export_symbols=$output_objdir/$libname.def
10081 $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
10082 fi
10083 }
10084
10085 libobjs=$output
10086 # Restore the value of output.
10087 output=$save_output
10088
10089 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
10090 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
10091 test "X$libobjs" = "X " && libobjs=
10092 fi
10093 # Expand the library linking commands again to reset the
10094 # value of $libobjs for piecewise linking.
10095
10096 # Do each of the archive commands.
10097 if test yes = "$module" && test -n "$module_cmds"; then
10098 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
10099 cmds=$module_expsym_cmds
10100 else
10101 cmds=$module_cmds
10102 fi
10103 else
10104 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
10105 cmds=$archive_expsym_cmds
10106 else
10107 cmds=$archive_cmds
10108 fi
10109 fi
10110 fi
10111
10112 if test -n "$delfiles"; then
10113 # Append the command to remove temporary files to $cmds.
10114 eval cmds=\"\$cmds~\$RM $delfiles\"
10115 fi
10116
10117 # Add any objects from preloaded convenience libraries
10118 if test -n "$dlprefiles"; then
10119 gentop=$output_objdir/${outputname}x
10120 func_append generated " $gentop"
10121
10122 func_extract_archives $gentop $dlprefiles
10123 func_append libobjs " $func_extract_archives_result"
10124 test "X$libobjs" = "X " && libobjs=
10125 fi
10126
10127 save_ifs=$IFS; IFS='~'
10128 for cmd in $cmds; do
10129 IFS=$sp$nl
10130 eval cmd=\"$cmd\"
10131 IFS=$save_ifs
10132 $opt_quiet || {
10133 func_quote_for_expand "$cmd"
10134 eval "func_echo $func_quote_for_expand_result"
10135 }
10136 $opt_dry_run || eval "$cmd" || {
10137 lt_exit=$?
10138
10139 # Restore the uninstalled library and exit
10140 if test relink = "$opt_mode"; then
10141 ( cd "$output_objdir" && \
10142 $RM "${realname}T" && \
10143 $MV "${realname}U" "$realname" )
10144 fi
10145
10146 exit $lt_exit
10147 }
10148 done
10149 IFS=$save_ifs
10150
10151 # Restore the uninstalled library and exit
10152 if test relink = "$opt_mode"; then
10153 $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
10154
10155 if test -n "$convenience"; then
10156 if test -z "$whole_archive_flag_spec"; then
10157 func_show_eval '${RM}r "$gentop"'
10158 fi
10159 fi
10160
10161 exit $EXIT_SUCCESS
10162 fi
10163
10164 # Create links to the real library.
10165 for linkname in $linknames; do
10166 if test "$realname" != "$linkname"; then
10167 func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
10168 fi
10169 done
10170
10171 # If -module or -export-dynamic was specified, set the dlname.
10172 if test yes = "$module" || test yes = "$export_dynamic"; then
10173 # On all known operating systems, these are identical.
10174 dlname=$soname
10175 fi
10176 fi
10177 ;;
10178
10179 obj)
10180 if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
10181 func_warning "'-dlopen' is ignored for objects"
10182 fi
10183
10184 case " $deplibs" in
10185 *\ -l* | *\ -L*)
10186 func_warning "'-l' and '-L' are ignored for objects" ;;
10187 esac
10188
10189 test -n "$rpath" && \
10190 func_warning "'-rpath' is ignored for objects"
10191
10192 test -n "$xrpath" && \
10193 func_warning "'-R' is ignored for objects"
10194
10195 test -n "$vinfo" && \
10196 func_warning "'-version-info' is ignored for objects"
10197
10198 test -n "$release" && \
10199 func_warning "'-release' is ignored for objects"
10200
10201 case $output in
10202 *.lo)
10203 test -n "$objs$old_deplibs" && \
10204 func_fatal_error "cannot build library object '$output' from non-libtool objects"
10205
10206 libobj=$output
10207 func_lo2o "$libobj"
10208 obj=$func_lo2o_result
10209 ;;
10210 *)
10211 libobj=
10212 obj=$output
10213 ;;
10214 esac
10215
10216 # Delete the old objects.
10217 $opt_dry_run || $RM $obj $libobj
10218
10219 # Objects from convenience libraries. This assumes
10220 # single-version convenience libraries. Whenever we create
10221 # different ones for PIC/non-PIC, this we'll have to duplicate
10222 # the extraction.
10223 reload_conv_objs=
10224 gentop=
10225 # if reload_cmds runs $LD directly, get rid of -Wl from
10226 # whole_archive_flag_spec and hope we can get by with turning comma
10227 # into space.
10228 case $reload_cmds in
10229 *\$LD[\ \$]*) wl= ;;
10230 esac
10231 if test -n "$convenience"; then
10232 if test -n "$whole_archive_flag_spec"; then
10233 eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
10234 test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
10235 reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags
10236 else
10237 gentop=$output_objdir/${obj}x
10238 func_append generated " $gentop"
10239
10240 func_extract_archives $gentop $convenience
10241 reload_conv_objs="$reload_objs $func_extract_archives_result"
10242 fi
10243 fi
10244
10245 # If we're not building shared, we need to use non_pic_objs
10246 test yes = "$build_libtool_libs" || libobjs=$non_pic_objects
10247
10248 # Create the old-style object.
10249 reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs
10250
10251 output=$obj
10252 func_execute_cmds "$reload_cmds" 'exit $?'
10253
10254 # Exit if we aren't doing a library object file.
10255 if test -z "$libobj"; then
10256 if test -n "$gentop"; then
10257 func_show_eval '${RM}r "$gentop"'
10258 fi
10259
10260 exit $EXIT_SUCCESS
10261 fi
10262
10263 test yes = "$build_libtool_libs" || {
10264 if test -n "$gentop"; then
10265 func_show_eval '${RM}r "$gentop"'
10266 fi
10267
10268 # Create an invalid libtool object if no PIC, so that we don't
10269 # accidentally link it into a program.
10270 # $show "echo timestamp > $libobj"
10271 # $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
10272 exit $EXIT_SUCCESS
10273 }
10274
10275 if test -n "$pic_flag" || test default != "$pic_mode"; then
10276 # Only do commands if we really have different PIC objects.
10277 reload_objs="$libobjs $reload_conv_objs"
10278 output=$libobj
10279 func_execute_cmds "$reload_cmds" 'exit $?'
10280 fi
10281
10282 if test -n "$gentop"; then
10283 func_show_eval '${RM}r "$gentop"'
10284 fi
10285
10286 exit $EXIT_SUCCESS
10287 ;;
10288
10289 prog)
10290 case $host in
10291 *cygwin*) func_stripname '' '.exe' "$output"
10292 output=$func_stripname_result.exe;;
10293 esac
10294 test -n "$vinfo" && \
10295 func_warning "'-version-info' is ignored for programs"
10296
10297 test -n "$release" && \
10298 func_warning "'-release' is ignored for programs"
10299
10300 $preload \
10301 && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \
10302 && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support."
10303
10304 case $host in
10305 *-*-rhapsody* | *-*-darwin1.[012])
10306 # On Rhapsody replace the C library is the System framework
10307 compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'`
10308 finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'`
10309 ;;
10310 esac
10311
10312 case $host in
10313 *-*-darwin*)
10314 # Don't allow lazy linking, it breaks C++ global constructors
10315 # But is supposedly fixed on 10.4 or later (yay!).
10316 if test CXX = "$tagname"; then
10317 case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
10318 10.[0123])
10319 func_append compile_command " $wl-bind_at_load"
10320 func_append finalize_command " $wl-bind_at_load"
10321 ;;
10322 esac
10323 fi
10324 # Time to change all our "foo.ltframework" stuff back to "-framework foo"
10325 compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
10326 finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
10327 ;;
10328 esac
10329
10330
10331 # move library search paths that coincide with paths to not yet
10332 # installed libraries to the beginning of the library search list
10333 new_libs=
10334 for path in $notinst_path; do
10335 case " $new_libs " in
10336 *" -L$path/$objdir "*) ;;
10337 *)
10338 case " $compile_deplibs " in
10339 *" -L$path/$objdir "*)
10340 func_append new_libs " -L$path/$objdir" ;;
10341 esac
10342 ;;
10343 esac
10344 done
10345 for deplib in $compile_deplibs; do
10346 case $deplib in
10347 -L*)
10348 case " $new_libs " in
10349 *" $deplib "*) ;;
10350 *) func_append new_libs " $deplib" ;;
10351 esac
10352 ;;
10353 *) func_append new_libs " $deplib" ;;
10354 esac
10355 done
10356 compile_deplibs=$new_libs
10357
10358
10359 func_append compile_command " $compile_deplibs"
10360 func_append finalize_command " $finalize_deplibs"
10361
10362 if test -n "$rpath$xrpath"; then
10363 # If the user specified any rpath flags, then add them.
10364 for libdir in $rpath $xrpath; do
10365 # This is the magic to use -rpath.
10366 case "$finalize_rpath " in
10367 *" $libdir "*) ;;
10368 *) func_append finalize_rpath " $libdir" ;;
10369 esac
10370 done
10371 fi
10372
10373 # Now hardcode the library paths
10374 rpath=
10375 hardcode_libdirs=
10376 for libdir in $compile_rpath $finalize_rpath; do
10377 if test -n "$hardcode_libdir_flag_spec"; then
10378 if test -n "$hardcode_libdir_separator"; then
10379 if test -z "$hardcode_libdirs"; then
10380 hardcode_libdirs=$libdir
10381 else
10382 # Just accumulate the unique libdirs.
10383 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
10384 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
10385 ;;
10386 *)
10387 func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
10388 ;;
10389 esac
10390 fi
10391 else
10392 eval flag=\"$hardcode_libdir_flag_spec\"
10393 func_append rpath " $flag"
10394 fi
10395 elif test -n "$runpath_var"; then
10396 case "$perm_rpath " in
10397 *" $libdir "*) ;;
10398 *) func_append perm_rpath " $libdir" ;;
10399 esac
10400 fi
10401 case $host in
10402 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
10403 testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'`
10404 case :$dllsearchpath: in
10405 *":$libdir:"*) ;;
10406 ::) dllsearchpath=$libdir;;
10407 *) func_append dllsearchpath ":$libdir";;
10408 esac
10409 case :$dllsearchpath: in
10410 *":$testbindir:"*) ;;
10411 ::) dllsearchpath=$testbindir;;
10412 *) func_append dllsearchpath ":$testbindir";;
10413 esac
10414 ;;
10415 esac
10416 done
10417 # Substitute the hardcoded libdirs into the rpath.
10418 if test -n "$hardcode_libdir_separator" &&
10419 test -n "$hardcode_libdirs"; then
10420 libdir=$hardcode_libdirs
10421 eval rpath=\" $hardcode_libdir_flag_spec\"
10422 fi
10423 compile_rpath=$rpath
10424
10425 rpath=
10426 hardcode_libdirs=
10427 for libdir in $finalize_rpath; do
10428 if test -n "$hardcode_libdir_flag_spec"; then
10429 if test -n "$hardcode_libdir_separator"; then
10430 if test -z "$hardcode_libdirs"; then
10431 hardcode_libdirs=$libdir
10432 else
10433 # Just accumulate the unique libdirs.
10434 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
10435 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
10436 ;;
10437 *)
10438 func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
10439 ;;
10440 esac
10441 fi
10442 else
10443 eval flag=\"$hardcode_libdir_flag_spec\"
10444 func_append rpath " $flag"
10445 fi
10446 elif test -n "$runpath_var"; then
10447 case "$finalize_perm_rpath " in
10448 *" $libdir "*) ;;
10449 *) func_append finalize_perm_rpath " $libdir" ;;
10450 esac
10451 fi
10452 done
10453 # Substitute the hardcoded libdirs into the rpath.
10454 if test -n "$hardcode_libdir_separator" &&
10455 test -n "$hardcode_libdirs"; then
10456 libdir=$hardcode_libdirs
10457 eval rpath=\" $hardcode_libdir_flag_spec\"
10458 fi
10459 finalize_rpath=$rpath
10460
10461 if test -n "$libobjs" && test yes = "$build_old_libs"; then
10462 # Transform all the library objects into standard objects.
10463 compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
10464 finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
10465 fi
10466
10467 func_generate_dlsyms "$outputname" "@PROGRAM@" false
10468
10469 # template prelinking step
10470 if test -n "$prelink_cmds"; then
10471 func_execute_cmds "$prelink_cmds" 'exit $?'
10472 fi
10473
10474 wrappers_required=:
10475 case $host in
10476 *cegcc* | *mingw32ce*)
10477 # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
10478 wrappers_required=false
10479 ;;
10480 *cygwin* | *mingw* )
10481 test yes = "$build_libtool_libs" || wrappers_required=false
10482 ;;
10483 *)
10484 if test no = "$need_relink" || test yes != "$build_libtool_libs"; then
10485 wrappers_required=false
10486 fi
10487 ;;
10488 esac
10489 $wrappers_required || {
10490 # Replace the output file specification.
10491 compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
10492 link_command=$compile_command$compile_rpath
10493
10494 # We have no uninstalled library dependencies, so finalize right now.
10495 exit_status=0
10496 func_show_eval "$link_command" 'exit_status=$?'
10497
10498 if test -n "$postlink_cmds"; then
10499 func_to_tool_file "$output"
10500 postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
10501 func_execute_cmds "$postlink_cmds" 'exit $?'
10502 fi
10503
10504 # Delete the generated files.
10505 if test -f "$output_objdir/${outputname}S.$objext"; then
10506 func_show_eval '$RM "$output_objdir/${outputname}S.$objext"'
10507 fi
10508
10509 exit $exit_status
10510 }
10511
10512 if test -n "$compile_shlibpath$finalize_shlibpath"; then
10513 compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
10514 fi
10515 if test -n "$finalize_shlibpath"; then
10516 finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
10517 fi
10518
10519 compile_var=
10520 finalize_var=
10521 if test -n "$runpath_var"; then
10522 if test -n "$perm_rpath"; then
10523 # We should set the runpath_var.
10524 rpath=
10525 for dir in $perm_rpath; do
10526 func_append rpath "$dir:"
10527 done
10528 compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
10529 fi
10530 if test -n "$finalize_perm_rpath"; then
10531 # We should set the runpath_var.
10532 rpath=
10533 for dir in $finalize_perm_rpath; do
10534 func_append rpath "$dir:"
10535 done
10536 finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
10537 fi
10538 fi
10539
10540 if test yes = "$no_install"; then
10541 # We don't need to create a wrapper script.
10542 link_command=$compile_var$compile_command$compile_rpath
10543 # Replace the output file specification.
10544 link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
10545 # Delete the old output file.
10546 $opt_dry_run || $RM $output
10547 # Link the executable and exit
10548 func_show_eval "$link_command" 'exit $?'
10549
10550 if test -n "$postlink_cmds"; then
10551 func_to_tool_file "$output"
10552 postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
10553 func_execute_cmds "$postlink_cmds" 'exit $?'
10554 fi
10555
10556 exit $EXIT_SUCCESS
10557 fi
10558
10559 case $hardcode_action,$fast_install in
10560 relink,*)
10561 # Fast installation is not supported
10562 link_command=$compile_var$compile_command$compile_rpath
10563 relink_command=$finalize_var$finalize_command$finalize_rpath
10564
10565 func_warning "this platform does not like uninstalled shared libraries"
10566 func_warning "'$output' will be relinked during installation"
10567 ;;
10568 *,yes)
10569 link_command=$finalize_var$compile_command$finalize_rpath
10570 relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
10571 ;;
10572 *,no)
10573 link_command=$compile_var$compile_command$compile_rpath
10574 relink_command=$finalize_var$finalize_command$finalize_rpath
10575 ;;
10576 *,needless)
10577 link_command=$finalize_var$compile_command$finalize_rpath
10578 relink_command=
10579 ;;
10580 esac
10581
10582 # Replace the output file specification.
10583 link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
10584
10585 # Delete the old output files.
10586 $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
10587
10588 func_show_eval "$link_command" 'exit $?'
10589
10590 if test -n "$postlink_cmds"; then
10591 func_to_tool_file "$output_objdir/$outputname"
10592 postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
10593 func_execute_cmds "$postlink_cmds" 'exit $?'
10594 fi
10595
10596 # Now create the wrapper script.
10597 func_verbose "creating $output"
10598
10599 # Quote the relink command for shipping.
10600 if test -n "$relink_command"; then
10601 # Preserve any variables that may affect compiler behavior
10602 for var in $variables_saved_for_relink; do
10603 if eval test -z \"\${$var+set}\"; then
10604 relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
10605 elif eval var_value=\$$var; test -z "$var_value"; then
10606 relink_command="$var=; export $var; $relink_command"
10607 else
10608 func_quote_for_eval "$var_value"
10609 relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
10610 fi
10611 done
10612 relink_command="(cd `pwd`; $relink_command)"
10613 relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
10614 fi
10615
10616 # Only actually do things if not in dry run mode.
10617 $opt_dry_run || {
10618 # win32 will think the script is a binary if it has
10619 # a .exe suffix, so we strip it off here.
10620 case $output in
10621 *.exe) func_stripname '' '.exe' "$output"
10622 output=$func_stripname_result ;;
10623 esac
10624 # test for cygwin because mv fails w/o .exe extensions
10625 case $host in
10626 *cygwin*)
10627 exeext=.exe
10628 func_stripname '' '.exe' "$outputname"
10629 outputname=$func_stripname_result ;;
10630 *) exeext= ;;
10631 esac
10632 case $host in
10633 *cygwin* | *mingw* )
10634 func_dirname_and_basename "$output" "" "."
10635 output_name=$func_basename_result
10636 output_path=$func_dirname_result
10637 cwrappersource=$output_path/$objdir/lt-$output_name.c
10638 cwrapper=$output_path/$output_name.exe
10639 $RM $cwrappersource $cwrapper
10640 trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
10641
10642 func_emit_cwrapperexe_src > $cwrappersource
10643
10644 # The wrapper executable is built using the $host compiler,
10645 # because it contains $host paths and files. If cross-
10646 # compiling, it, like the target executable, must be
10647 # executed on the $host or under an emulation environment.
10648 $opt_dry_run || {
10649 $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
10650 $STRIP $cwrapper
10651 }
10652
10653 # Now, create the wrapper script for func_source use:
10654 func_ltwrapper_scriptname $cwrapper
10655 $RM $func_ltwrapper_scriptname_result
10656 trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
10657 $opt_dry_run || {
10658 # note: this script will not be executed, so do not chmod.
10659 if test "x$build" = "x$host"; then
10660 $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
10661 else
10662 func_emit_wrapper no > $func_ltwrapper_scriptname_result
10663 fi
10664 }
10665 ;;
10666 * )
10667 $RM $output
10668 trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
10669
10670 func_emit_wrapper no > $output
10671 chmod +x $output
10672 ;;
10673 esac
10674 }
10675 exit $EXIT_SUCCESS
10676 ;;
10677 esac
10678
10679 # See if we need to build an old-fashioned archive.
10680 for oldlib in $oldlibs; do
10681
10682 case $build_libtool_libs in
10683 convenience)
10684 oldobjs="$libobjs_save $symfileobj"
10685 addlibs=$convenience
10686 build_libtool_libs=no
10687 ;;
10688 module)
10689 oldobjs=$libobjs_save
10690 addlibs=$old_convenience
10691 build_libtool_libs=no
10692 ;;
10693 *)
10694 oldobjs="$old_deplibs $non_pic_objects"
10695 $preload && test -f "$symfileobj" \
10696 && func_append oldobjs " $symfileobj"
10697 addlibs=$old_convenience
10698 ;;
10699 esac
10700
10701 if test -n "$addlibs"; then
10702 gentop=$output_objdir/${outputname}x
10703 func_append generated " $gentop"
10704
10705 func_extract_archives $gentop $addlibs
10706 func_append oldobjs " $func_extract_archives_result"
10707 fi
10708
10709 # Do each command in the archive commands.
10710 if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then
10711 cmds=$old_archive_from_new_cmds
10712 else
10713
10714 # Add any objects from preloaded convenience libraries
10715 if test -n "$dlprefiles"; then
10716 gentop=$output_objdir/${outputname}x
10717 func_append generated " $gentop"
10718
10719 func_extract_archives $gentop $dlprefiles
10720 func_append oldobjs " $func_extract_archives_result"
10721 fi
10722
10723 # POSIX demands no paths to be encoded in archives. We have
10724 # to avoid creating archives with duplicate basenames if we
10725 # might have to extract them afterwards, e.g., when creating a
10726 # static archive out of a convenience library, or when linking
10727 # the entirety of a libtool archive into another (currently
10728 # not supported by libtool).
10729 if (for obj in $oldobjs
10730 do
10731 func_basename "$obj"
10732 $ECHO "$func_basename_result"
10733 done | sort | sort -uc >/dev/null 2>&1); then
10734 :
10735 else
10736 echo "copying selected object files to avoid basename conflicts..."
10737 gentop=$output_objdir/${outputname}x
10738 func_append generated " $gentop"
10739 func_mkdir_p "$gentop"
10740 save_oldobjs=$oldobjs
10741 oldobjs=
10742 counter=1
10743 for obj in $save_oldobjs
10744 do
10745 func_basename "$obj"
10746 objbase=$func_basename_result
10747 case " $oldobjs " in
10748 " ") oldobjs=$obj ;;
10749 *[\ /]"$objbase "*)
10750 while :; do
10751 # Make sure we don't pick an alternate name that also
10752 # overlaps.
10753 newobj=lt$counter-$objbase
10754 func_arith $counter + 1
10755 counter=$func_arith_result
10756 case " $oldobjs " in
10757 *[\ /]"$newobj "*) ;;
10758 *) if test ! -f "$gentop/$newobj"; then break; fi ;;
10759 esac
10760 done
10761 func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
10762 func_append oldobjs " $gentop/$newobj"
10763 ;;
10764 *) func_append oldobjs " $obj" ;;
10765 esac
10766 done
10767 fi
10768 func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
10769 tool_oldlib=$func_to_tool_file_result
10770 eval cmds=\"$old_archive_cmds\"
10771
10772 func_len " $cmds"
10773 len=$func_len_result
10774 if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
10775 cmds=$old_archive_cmds
10776 elif test -n "$archiver_list_spec"; then
10777 func_verbose "using command file archive linking..."
10778 for obj in $oldobjs
10779 do
10780 func_to_tool_file "$obj"
10781 $ECHO "$func_to_tool_file_result"
10782 done > $output_objdir/$libname.libcmd
10783 func_to_tool_file "$output_objdir/$libname.libcmd"
10784 oldobjs=" $archiver_list_spec$func_to_tool_file_result"
10785 cmds=$old_archive_cmds
10786 else
10787 # the command line is too long to link in one step, link in parts
10788 func_verbose "using piecewise archive linking..."
10789 save_RANLIB=$RANLIB
10790 RANLIB=:
10791 objlist=
10792 concat_cmds=
10793 save_oldobjs=$oldobjs
10794 oldobjs=
10795 # Is there a better way of finding the last object in the list?
10796 for obj in $save_oldobjs
10797 do
10798 last_oldobj=$obj
10799 done
10800 eval test_cmds=\"$old_archive_cmds\"
10801 func_len " $test_cmds"
10802 len0=$func_len_result
10803 len=$len0
10804 for obj in $save_oldobjs
10805 do
10806 func_len " $obj"
10807 func_arith $len + $func_len_result
10808 len=$func_arith_result
10809 func_append objlist " $obj"
10810 if test "$len" -lt "$max_cmd_len"; then
10811 :
10812 else
10813 # the above command should be used before it gets too long
10814 oldobjs=$objlist
10815 if test "$obj" = "$last_oldobj"; then
10816 RANLIB=$save_RANLIB
10817 fi
10818 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
10819 eval concat_cmds=\"\$concat_cmds$old_archive_cmds\"
10820 objlist=
10821 len=$len0
10822 fi
10823 done
10824 RANLIB=$save_RANLIB
10825 oldobjs=$objlist
10826 if test -z "$oldobjs"; then
10827 eval cmds=\"\$concat_cmds\"
10828 else
10829 eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
10830 fi
10831 fi
10832 fi
10833 func_execute_cmds "$cmds" 'exit $?'
10834 done
10835
10836 test -n "$generated" && \
10837 func_show_eval "${RM}r$generated"
10838
10839 # Now create the libtool archive.
10840 case $output in
10841 *.la)
10842 old_library=
10843 test yes = "$build_old_libs" && old_library=$libname.$libext
10844 func_verbose "creating $output"
10845
10846 # Preserve any variables that may affect compiler behavior
10847 for var in $variables_saved_for_relink; do
10848 if eval test -z \"\${$var+set}\"; then
10849 relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
10850 elif eval var_value=\$$var; test -z "$var_value"; then
10851 relink_command="$var=; export $var; $relink_command"
10852 else
10853 func_quote_for_eval "$var_value"
10854 relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
10855 fi
10856 done
10857 # Quote the link command for shipping.
10858 relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
10859 relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
10860 if test yes = "$hardcode_automatic"; then
10861 relink_command=
10862 fi
10863
10864 # Only create the output if not a dry run.
10865 $opt_dry_run || {
10866 for installed in no yes; do
10867 if test yes = "$installed"; then
10868 if test -z "$install_libdir"; then
10869 break
10870 fi
10871 output=$output_objdir/${outputname}i
10872 # Replace all uninstalled libtool libraries with the installed ones
10873 newdependency_libs=
10874 for deplib in $dependency_libs; do
10875 case $deplib in
10876 *.la)
10877 func_basename "$deplib"
10878 name=$func_basename_result
10879 func_resolve_sysroot "$deplib"
10880 eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
10881 test -z "$libdir" && \
10882 func_fatal_error "'$deplib' is not a valid libtool archive"
10883 func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
10884 ;;
10885 -L*)
10886 func_stripname -L '' "$deplib"
10887 func_replace_sysroot "$func_stripname_result"
10888 func_append newdependency_libs " -L$func_replace_sysroot_result"
10889 ;;
10890 -R*)
10891 func_stripname -R '' "$deplib"
10892 func_replace_sysroot "$func_stripname_result"
10893 func_append newdependency_libs " -R$func_replace_sysroot_result"
10894 ;;
10895 *) func_append newdependency_libs " $deplib" ;;
10896 esac
10897 done
10898 dependency_libs=$newdependency_libs
10899 newdlfiles=
10900
10901 for lib in $dlfiles; do
10902 case $lib in
10903 *.la)
10904 func_basename "$lib"
10905 name=$func_basename_result
10906 eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
10907 test -z "$libdir" && \
10908 func_fatal_error "'$lib' is not a valid libtool archive"
10909 func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name"
10910 ;;
10911 *) func_append newdlfiles " $lib" ;;
10912 esac
10913 done
10914 dlfiles=$newdlfiles
10915 newdlprefiles=
10916 for lib in $dlprefiles; do
10917 case $lib in
10918 *.la)
10919 # Only pass preopened files to the pseudo-archive (for
10920 # eventual linking with the app. that links it) if we
10921 # didn't already link the preopened objects directly into
10922 # the library:
10923 func_basename "$lib"
10924 name=$func_basename_result
10925 eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
10926 test -z "$libdir" && \
10927 func_fatal_error "'$lib' is not a valid libtool archive"
10928 func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name"
10929 ;;
10930 esac
10931 done
10932 dlprefiles=$newdlprefiles
10933 else
10934 newdlfiles=
10935 for lib in $dlfiles; do
10936 case $lib in
10937 [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;;
10938 *) abs=`pwd`"/$lib" ;;
10939 esac
10940 func_append newdlfiles " $abs"
10941 done
10942 dlfiles=$newdlfiles
10943 newdlprefiles=
10944 for lib in $dlprefiles; do
10945 case $lib in
10946 [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;;
10947 *) abs=`pwd`"/$lib" ;;
10948 esac
10949 func_append newdlprefiles " $abs"
10950 done
10951 dlprefiles=$newdlprefiles
10952 fi
10953 $RM $output
10954 # place dlname in correct position for cygwin
10955 # In fact, it would be nice if we could use this code for all target
10956 # systems that can't hard-code library paths into their executables
10957 # and that have no shared library path variable independent of PATH,
10958 # but it turns out we can't easily determine that from inspecting
10959 # libtool variables, so we have to hard-code the OSs to which it
10960 # applies here; at the moment, that means platforms that use the PE
10961 # object format with DLL files. See the long comment at the top of
10962 # tests/bindir.at for full details.
10963 tdlname=$dlname
10964 case $host,$output,$installed,$module,$dlname in
10965 *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
10966 # If a -bindir argument was supplied, place the dll there.
10967 if test -n "$bindir"; then
10968 func_relative_path "$install_libdir" "$bindir"
10969 tdlname=$func_relative_path_result/$dlname
10970 else
10971 # Otherwise fall back on heuristic.
10972 tdlname=../bin/$dlname
10973 fi
10974 ;;
10975 esac
10976 $ECHO > $output "\
10977 # $outputname - a libtool library file
10978 # Generated by $PROGRAM (GNU $PACKAGE) $VERSION
10979 #
10980 # Please DO NOT delete this file!
10981 # It is necessary for linking the library.
10982
10983 # The name that we can dlopen(3).
10984 dlname='$tdlname'
10985
10986 # Names of this library.
10987 library_names='$library_names'
10988
10989 # The name of the static archive.
10990 old_library='$old_library'
10991
10992 # Linker flags that cannot go in dependency_libs.
10993 inherited_linker_flags='$new_inherited_linker_flags'
10994
10995 # Libraries that this one depends upon.
10996 dependency_libs='$dependency_libs'
10997
10998 # Names of additional weak libraries provided by this library
10999 weak_library_names='$weak_libs'
11000
11001 # Version information for $libname.
11002 current=$current
11003 age=$age
11004 revision=$revision
11005
11006 # Is this an already installed library?
11007 installed=$installed
11008
11009 # Should we warn about portability when linking against -modules?
11010 shouldnotlink=$module
11011
11012 # Files to dlopen/dlpreopen
11013 dlopen='$dlfiles'
11014 dlpreopen='$dlprefiles'
11015
11016 # Directory that this library needs to be installed in:
11017 libdir='$install_libdir'"
11018 if test no,yes = "$installed,$need_relink"; then
11019 $ECHO >> $output "\
11020 relink_command=\"$relink_command\""
11021 fi
11022 done
11023 }
11024
11025 # Do a symbolic link so that the libtool archive can be found in
11026 # LD_LIBRARY_PATH before the program is installed.
11027 func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
11028 ;;
11029 esac
11030 exit $EXIT_SUCCESS
11031 }
11032
11033 if test link = "$opt_mode" || test relink = "$opt_mode"; then
11034 func_mode_link ${1+"$@"}
11035 fi
11036
11037
11038 # func_mode_uninstall arg...
11039 func_mode_uninstall ()
11040 {
11041 $debug_cmd
11042
11043 RM=$nonopt
11044 files=
11045 rmforce=false
11046 exit_status=0
11047
11048 # This variable tells wrapper scripts just to set variables rather
11049 # than running their programs.
11050 libtool_install_magic=$magic
11051
11052 for arg
11053 do
11054 case $arg in
11055 -f) func_append RM " $arg"; rmforce=: ;;
11056 -*) func_append RM " $arg" ;;
11057 *) func_append files " $arg" ;;
11058 esac
11059 done
11060
11061 test -z "$RM" && \
11062 func_fatal_help "you must specify an RM program"
11063
11064 rmdirs=
11065
11066 for file in $files; do
11067 func_dirname "$file" "" "."
11068 dir=$func_dirname_result
11069 if test . = "$dir"; then
11070 odir=$objdir
11071 else
11072 odir=$dir/$objdir
11073 fi
11074 func_basename "$file"
11075 name=$func_basename_result
11076 test uninstall = "$opt_mode" && odir=$dir
11077
11078 # Remember odir for removal later, being careful to avoid duplicates
11079 if test clean = "$opt_mode"; then
11080 case " $rmdirs " in
11081 *" $odir "*) ;;
11082 *) func_append rmdirs " $odir" ;;
11083 esac
11084 fi
11085
11086 # Don't error if the file doesn't exist and rm -f was used.
11087 if { test -L "$file"; } >/dev/null 2>&1 ||
11088 { test -h "$file"; } >/dev/null 2>&1 ||
11089 test -f "$file"; then
11090 :
11091 elif test -d "$file"; then
11092 exit_status=1
11093 continue
11094 elif $rmforce; then
11095 continue
11096 fi
11097
11098 rmfiles=$file
11099
11100 case $name in
11101 *.la)
11102 # Possibly a libtool archive, so verify it.
11103 if func_lalib_p "$file"; then
11104 func_source $dir/$name
11105
11106 # Delete the libtool libraries and symlinks.
11107 for n in $library_names; do
11108 func_append rmfiles " $odir/$n"
11109 done
11110 test -n "$old_library" && func_append rmfiles " $odir/$old_library"
11111
11112 case $opt_mode in
11113 clean)
11114 case " $library_names " in
11115 *" $dlname "*) ;;
11116 *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;;
11117 esac
11118 test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i"
11119 ;;
11120 uninstall)
11121 if test -n "$library_names"; then
11122 # Do each command in the postuninstall commands.
11123 func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1'
11124 fi
11125
11126 if test -n "$old_library"; then
11127 # Do each command in the old_postuninstall commands.
11128 func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1'
11129 fi
11130 # FIXME: should reinstall the best remaining shared library.
11131 ;;
11132 esac
11133 fi
11134 ;;
11135
11136 *.lo)
11137 # Possibly a libtool object, so verify it.
11138 if func_lalib_p "$file"; then
11139
11140 # Read the .lo file
11141 func_source $dir/$name
11142
11143 # Add PIC object to the list of files to remove.
11144 if test -n "$pic_object" && test none != "$pic_object"; then
11145 func_append rmfiles " $dir/$pic_object"
11146 fi
11147
11148 # Add non-PIC object to the list of files to remove.
11149 if test -n "$non_pic_object" && test none != "$non_pic_object"; then
11150 func_append rmfiles " $dir/$non_pic_object"
11151 fi
11152 fi
11153 ;;
11154
11155 *)
11156 if test clean = "$opt_mode"; then
11157 noexename=$name
11158 case $file in
11159 *.exe)
11160 func_stripname '' '.exe' "$file"
11161 file=$func_stripname_result
11162 func_stripname '' '.exe' "$name"
11163 noexename=$func_stripname_result
11164 # $file with .exe has already been added to rmfiles,
11165 # add $file without .exe
11166 func_append rmfiles " $file"
11167 ;;
11168 esac
11169 # Do a test to see if this is a libtool program.
11170 if func_ltwrapper_p "$file"; then
11171 if func_ltwrapper_executable_p "$file"; then
11172 func_ltwrapper_scriptname "$file"
11173 relink_command=
11174 func_source $func_ltwrapper_scriptname_result
11175 func_append rmfiles " $func_ltwrapper_scriptname_result"
11176 else
11177 relink_command=
11178 func_source $dir/$noexename
11179 fi
11180
11181 # note $name still contains .exe if it was in $file originally
11182 # as does the version of $file that was added into $rmfiles
11183 func_append rmfiles " $odir/$name $odir/${name}S.$objext"
11184 if test yes = "$fast_install" && test -n "$relink_command"; then
11185 func_append rmfiles " $odir/lt-$name"
11186 fi
11187 if test "X$noexename" != "X$name"; then
11188 func_append rmfiles " $odir/lt-$noexename.c"
11189 fi
11190 fi
11191 fi
11192 ;;
11193 esac
11194 func_show_eval "$RM $rmfiles" 'exit_status=1'
11195 done
11196
11197 # Try to remove the $objdir's in the directories where we deleted files
11198 for dir in $rmdirs; do
11199 if test -d "$dir"; then
11200 func_show_eval "rmdir $dir >/dev/null 2>&1"
11201 fi
11202 done
11203
11204 exit $exit_status
11205 }
11206
11207 if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then
11208 func_mode_uninstall ${1+"$@"}
11209 fi
11210
11211 test -z "$opt_mode" && {
11212 help=$generic_help
11213 func_fatal_help "you must specify a MODE"
11214 }
11215
11216 test -z "$exec_cmd" && \
11217 func_fatal_help "invalid operation mode '$opt_mode'"
11218
11219 if test -n "$exec_cmd"; then
11220 eval exec "$exec_cmd"
11221 exit $EXIT_FAILURE
11222 fi
11223
11224 exit $exit_status
11225
11226
11227 # The TAGs below are defined such that we never get into a situation
11228 # where we disable both kinds of libraries. Given conflicting
11229 # choices, we go for a static library, that is the most portable,
11230 # since we can't tell whether shared libraries were disabled because
11231 # the user asked for that or because the platform doesn't support
11232 # them. This is particularly important on AIX, because we don't
11233 # support having both static and shared libraries enabled at the same
11234 # time on that platform, so we default to a shared-only configuration.
11235 # If a disable-shared tag is given, we'll fallback to a static-only
11236 # configuration. But we'll never go from static-only to shared-only.
11237
11238 # ### BEGIN LIBTOOL TAG CONFIG: disable-shared
11239 build_libtool_libs=no
11240 build_old_libs=yes
11241 # ### END LIBTOOL TAG CONFIG: disable-shared
11242
11243 # ### BEGIN LIBTOOL TAG CONFIG: disable-static
11244 build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
11245 # ### END LIBTOOL TAG CONFIG: disable-static
11246
11247 # Local Variables:
11248 # mode:shell-script
11249 # sh-indentation:2
11250 # End:
0 # gettext.m4 serial 68 (gettext-0.19.8)
1 dnl Copyright (C) 1995-2014, 2016 Free Software Foundation, Inc.
2 dnl This file is free software; the Free Software Foundation
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5 dnl
6 dnl This file can be used in projects which are not available under
7 dnl the GNU General Public License or the GNU Library General Public
8 dnl License but which still want to provide support for the GNU gettext
9 dnl functionality.
10 dnl Please note that the actual code of the GNU gettext library is covered
11 dnl by the GNU Library General Public License, and the rest of the GNU
12 dnl gettext package is covered by the GNU General Public License.
13 dnl They are *not* in the public domain.
14
15 dnl Authors:
16 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
17 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006, 2008-2010.
18
19 dnl Macro to add for using GNU gettext.
20
21 dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
22 dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
23 dnl default (if it is not specified or empty) is 'no-libtool'.
24 dnl INTLSYMBOL should be 'external' for packages with no intl directory,
25 dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
26 dnl If INTLSYMBOL is 'use-libtool', then a libtool library
27 dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
28 dnl depending on --{enable,disable}-{shared,static} and on the presence of
29 dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
30 dnl $(top_builddir)/intl/libintl.a will be created.
31 dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
32 dnl implementations (in libc or libintl) without the ngettext() function
33 dnl will be ignored. If NEEDSYMBOL is specified and is
34 dnl 'need-formatstring-macros', then GNU gettext implementations that don't
35 dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
36 dnl INTLDIR is used to find the intl libraries. If empty,
37 dnl the value '$(top_builddir)/intl/' is used.
38 dnl
39 dnl The result of the configuration is one of three cases:
40 dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
41 dnl and used.
42 dnl Catalog format: GNU --> install in $(datadir)
43 dnl Catalog extension: .mo after installation, .gmo in source tree
44 dnl 2) GNU gettext has been found in the system's C library.
45 dnl Catalog format: GNU --> install in $(datadir)
46 dnl Catalog extension: .mo after installation, .gmo in source tree
47 dnl 3) No internationalization, always use English msgid.
48 dnl Catalog format: none
49 dnl Catalog extension: none
50 dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
51 dnl The use of .gmo is historical (it was needed to avoid overwriting the
52 dnl GNU format catalogs when building on a platform with an X/Open gettext),
53 dnl but we keep it in order not to force irrelevant filename changes on the
54 dnl maintainers.
55 dnl
56 AC_DEFUN([AM_GNU_GETTEXT],
57 [
58 dnl Argument checking.
59 ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
60 [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
61 ])])])])])
62 ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old],
63 [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])])
64 ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
65 [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
66 ])])])])
67 define([gt_included_intl],
68 ifelse([$1], [external],
69 ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
70 [yes]))
71 define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
72 gt_NEEDS_INIT
73 AM_GNU_GETTEXT_NEED([$2])
74
75 AC_REQUIRE([AM_PO_SUBDIRS])dnl
76 ifelse(gt_included_intl, yes, [
77 AC_REQUIRE([AM_INTL_SUBDIR])dnl
78 ])
79
80 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
81 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
82 AC_REQUIRE([AC_LIB_RPATH])
83
84 dnl Sometimes libintl requires libiconv, so first search for libiconv.
85 dnl Ideally we would do this search only after the
86 dnl if test "$USE_NLS" = "yes"; then
87 dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
88 dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
89 dnl the configure script would need to contain the same shell code
90 dnl again, outside any 'if'. There are two solutions:
91 dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
92 dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
93 dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
94 dnl documented, we avoid it.
95 ifelse(gt_included_intl, yes, , [
96 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
97 ])
98
99 dnl Sometimes, on Mac OS X, libintl requires linking with CoreFoundation.
100 gt_INTL_MACOSX
101
102 dnl Set USE_NLS.
103 AC_REQUIRE([AM_NLS])
104
105 ifelse(gt_included_intl, yes, [
106 BUILD_INCLUDED_LIBINTL=no
107 USE_INCLUDED_LIBINTL=no
108 ])
109 LIBINTL=
110 LTLIBINTL=
111 POSUB=
112
113 dnl Add a version number to the cache macros.
114 case " $gt_needs " in
115 *" need-formatstring-macros "*) gt_api_version=3 ;;
116 *" need-ngettext "*) gt_api_version=2 ;;
117 *) gt_api_version=1 ;;
118 esac
119 gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
120 gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
121
122 dnl If we use NLS figure out what method
123 if test "$USE_NLS" = "yes"; then
124 gt_use_preinstalled_gnugettext=no
125 ifelse(gt_included_intl, yes, [
126 AC_MSG_CHECKING([whether included gettext is requested])
127 AC_ARG_WITH([included-gettext],
128 [ --with-included-gettext use the GNU gettext library included here],
129 nls_cv_force_use_gnu_gettext=$withval,
130 nls_cv_force_use_gnu_gettext=no)
131 AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext])
132
133 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
134 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
135 ])
136 dnl User does not insist on using GNU NLS library. Figure out what
137 dnl to use. If GNU gettext is available we use this. Else we have
138 dnl to fall back to GNU NLS library.
139
140 if test $gt_api_version -ge 3; then
141 gt_revision_test_code='
142 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
143 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
144 #endif
145 changequote(,)dnl
146 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
147 changequote([,])dnl
148 '
149 else
150 gt_revision_test_code=
151 fi
152 if test $gt_api_version -ge 2; then
153 gt_expression_test_code=' + * ngettext ("", "", 0)'
154 else
155 gt_expression_test_code=
156 fi
157
158 AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
159 [AC_LINK_IFELSE(
160 [AC_LANG_PROGRAM(
161 [[
162 #include <libintl.h>
163 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
164 extern int _nl_msg_cat_cntr;
165 extern int *_nl_domain_bindings;
166 #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings)
167 #else
168 #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
169 #endif
170 $gt_revision_test_code
171 ]],
172 [[
173 bindtextdomain ("", "");
174 return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
175 ]])],
176 [eval "$gt_func_gnugettext_libc=yes"],
177 [eval "$gt_func_gnugettext_libc=no"])])
178
179 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
180 dnl Sometimes libintl requires libiconv, so first search for libiconv.
181 ifelse(gt_included_intl, yes, , [
182 AM_ICONV_LINK
183 ])
184 dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
185 dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
186 dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
187 dnl even if libiconv doesn't exist.
188 AC_LIB_LINKFLAGS_BODY([intl])
189 AC_CACHE_CHECK([for GNU gettext in libintl],
190 [$gt_func_gnugettext_libintl],
191 [gt_save_CPPFLAGS="$CPPFLAGS"
192 CPPFLAGS="$CPPFLAGS $INCINTL"
193 gt_save_LIBS="$LIBS"
194 LIBS="$LIBS $LIBINTL"
195 dnl Now see whether libintl exists and does not depend on libiconv.
196 AC_LINK_IFELSE(
197 [AC_LANG_PROGRAM(
198 [[
199 #include <libintl.h>
200 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
201 extern int _nl_msg_cat_cntr;
202 extern
203 #ifdef __cplusplus
204 "C"
205 #endif
206 const char *_nl_expand_alias (const char *);
207 #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
208 #else
209 #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
210 #endif
211 $gt_revision_test_code
212 ]],
213 [[
214 bindtextdomain ("", "");
215 return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
216 ]])],
217 [eval "$gt_func_gnugettext_libintl=yes"],
218 [eval "$gt_func_gnugettext_libintl=no"])
219 dnl Now see whether libintl exists and depends on libiconv.
220 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
221 LIBS="$LIBS $LIBICONV"
222 AC_LINK_IFELSE(
223 [AC_LANG_PROGRAM(
224 [[
225 #include <libintl.h>
226 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
227 extern int _nl_msg_cat_cntr;
228 extern
229 #ifdef __cplusplus
230 "C"
231 #endif
232 const char *_nl_expand_alias (const char *);
233 #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
234 #else
235 #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
236 #endif
237 $gt_revision_test_code
238 ]],
239 [[
240 bindtextdomain ("", "");
241 return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
242 ]])],
243 [LIBINTL="$LIBINTL $LIBICONV"
244 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
245 eval "$gt_func_gnugettext_libintl=yes"
246 ])
247 fi
248 CPPFLAGS="$gt_save_CPPFLAGS"
249 LIBS="$gt_save_LIBS"])
250 fi
251
252 dnl If an already present or preinstalled GNU gettext() is found,
253 dnl use it. But if this macro is used in GNU gettext, and GNU
254 dnl gettext is already preinstalled in libintl, we update this
255 dnl libintl. (Cf. the install rule in intl/Makefile.in.)
256 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
257 || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
258 && test "$PACKAGE" != gettext-runtime \
259 && test "$PACKAGE" != gettext-tools; }; then
260 gt_use_preinstalled_gnugettext=yes
261 else
262 dnl Reset the values set by searching for libintl.
263 LIBINTL=
264 LTLIBINTL=
265 INCINTL=
266 fi
267
268 ifelse(gt_included_intl, yes, [
269 if test "$gt_use_preinstalled_gnugettext" != "yes"; then
270 dnl GNU gettext is not found in the C library.
271 dnl Fall back on included GNU gettext library.
272 nls_cv_use_gnu_gettext=yes
273 fi
274 fi
275
276 if test "$nls_cv_use_gnu_gettext" = "yes"; then
277 dnl Mark actions used to generate GNU NLS library.
278 BUILD_INCLUDED_LIBINTL=yes
279 USE_INCLUDED_LIBINTL=yes
280 LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
281 LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
282 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
283 fi
284
285 CATOBJEXT=
286 if test "$gt_use_preinstalled_gnugettext" = "yes" \
287 || test "$nls_cv_use_gnu_gettext" = "yes"; then
288 dnl Mark actions to use GNU gettext tools.
289 CATOBJEXT=.gmo
290 fi
291 ])
292
293 if test -n "$INTL_MACOSX_LIBS"; then
294 if test "$gt_use_preinstalled_gnugettext" = "yes" \
295 || test "$nls_cv_use_gnu_gettext" = "yes"; then
296 dnl Some extra flags are needed during linking.
297 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
298 LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
299 fi
300 fi
301
302 if test "$gt_use_preinstalled_gnugettext" = "yes" \
303 || test "$nls_cv_use_gnu_gettext" = "yes"; then
304 AC_DEFINE([ENABLE_NLS], [1],
305 [Define to 1 if translation of program messages to the user's native language
306 is requested.])
307 else
308 USE_NLS=no
309 fi
310 fi
311
312 AC_MSG_CHECKING([whether to use NLS])
313 AC_MSG_RESULT([$USE_NLS])
314 if test "$USE_NLS" = "yes"; then
315 AC_MSG_CHECKING([where the gettext function comes from])
316 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
317 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
318 gt_source="external libintl"
319 else
320 gt_source="libc"
321 fi
322 else
323 gt_source="included intl directory"
324 fi
325 AC_MSG_RESULT([$gt_source])
326 fi
327
328 if test "$USE_NLS" = "yes"; then
329
330 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
331 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
332 AC_MSG_CHECKING([how to link with libintl])
333 AC_MSG_RESULT([$LIBINTL])
334 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
335 fi
336
337 dnl For backward compatibility. Some packages may be using this.
338 AC_DEFINE([HAVE_GETTEXT], [1],
339 [Define if the GNU gettext() function is already present or preinstalled.])
340 AC_DEFINE([HAVE_DCGETTEXT], [1],
341 [Define if the GNU dcgettext() function is already present or preinstalled.])
342 fi
343
344 dnl We need to process the po/ directory.
345 POSUB=po
346 fi
347
348 ifelse(gt_included_intl, yes, [
349 dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
350 dnl to 'yes' because some of the testsuite requires it.
351 if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
352 BUILD_INCLUDED_LIBINTL=yes
353 fi
354
355 dnl Make all variables we use known to autoconf.
356 AC_SUBST([BUILD_INCLUDED_LIBINTL])
357 AC_SUBST([USE_INCLUDED_LIBINTL])
358 AC_SUBST([CATOBJEXT])
359
360 dnl For backward compatibility. Some configure.ins may be using this.
361 nls_cv_header_intl=
362 nls_cv_header_libgt=
363
364 dnl For backward compatibility. Some Makefiles may be using this.
365 DATADIRNAME=share
366 AC_SUBST([DATADIRNAME])
367
368 dnl For backward compatibility. Some Makefiles may be using this.
369 INSTOBJEXT=.mo
370 AC_SUBST([INSTOBJEXT])
371
372 dnl For backward compatibility. Some Makefiles may be using this.
373 GENCAT=gencat
374 AC_SUBST([GENCAT])
375
376 dnl For backward compatibility. Some Makefiles may be using this.
377 INTLOBJS=
378 if test "$USE_INCLUDED_LIBINTL" = yes; then
379 INTLOBJS="\$(GETTOBJS)"
380 fi
381 AC_SUBST([INTLOBJS])
382
383 dnl Enable libtool support if the surrounding package wishes it.
384 INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
385 AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX])
386 ])
387
388 dnl For backward compatibility. Some Makefiles may be using this.
389 INTLLIBS="$LIBINTL"
390 AC_SUBST([INTLLIBS])
391
392 dnl Make all documented variables known to autoconf.
393 AC_SUBST([LIBINTL])
394 AC_SUBST([LTLIBINTL])
395 AC_SUBST([POSUB])
396 ])
397
398
399 dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
400 m4_define([gt_NEEDS_INIT],
401 [
402 m4_divert_text([DEFAULTS], [gt_needs=])
403 m4_define([gt_NEEDS_INIT], [])
404 ])
405
406
407 dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
408 AC_DEFUN([AM_GNU_GETTEXT_NEED],
409 [
410 m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
411 ])
412
413
414 dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
415 AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
416
417
418 dnl Usage: AM_GNU_GETTEXT_REQUIRE_VERSION([gettext-version])
419 AC_DEFUN([AM_GNU_GETTEXT_REQUIRE_VERSION], [])
0 # iconv.m4 serial 19 (gettext-0.18.2)
1 dnl Copyright (C) 2000-2002, 2007-2014, 2016 Free Software Foundation, Inc.
2 dnl This file is free software; the Free Software Foundation
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5
6 dnl From Bruno Haible.
7
8 AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
9 [
10 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
11 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
12 AC_REQUIRE([AC_LIB_RPATH])
13
14 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
15 dnl accordingly.
16 AC_LIB_LINKFLAGS_BODY([iconv])
17 ])
18
19 AC_DEFUN([AM_ICONV_LINK],
20 [
21 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
22 dnl those with the standalone portable GNU libiconv installed).
23 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
24
25 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
26 dnl accordingly.
27 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
28
29 dnl Add $INCICONV to CPPFLAGS before performing the following checks,
30 dnl because if the user has installed libiconv and not disabled its use
31 dnl via --without-libiconv-prefix, he wants to use it. The first
32 dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed.
33 am_save_CPPFLAGS="$CPPFLAGS"
34 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
35
36 AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
37 am_cv_func_iconv="no, consider installing GNU libiconv"
38 am_cv_lib_iconv=no
39 AC_LINK_IFELSE(
40 [AC_LANG_PROGRAM(
41 [[
42 #include <stdlib.h>
43 #include <iconv.h>
44 ]],
45 [[iconv_t cd = iconv_open("","");
46 iconv(cd,NULL,NULL,NULL,NULL);
47 iconv_close(cd);]])],
48 [am_cv_func_iconv=yes])
49 if test "$am_cv_func_iconv" != yes; then
50 am_save_LIBS="$LIBS"
51 LIBS="$LIBS $LIBICONV"
52 AC_LINK_IFELSE(
53 [AC_LANG_PROGRAM(
54 [[
55 #include <stdlib.h>
56 #include <iconv.h>
57 ]],
58 [[iconv_t cd = iconv_open("","");
59 iconv(cd,NULL,NULL,NULL,NULL);
60 iconv_close(cd);]])],
61 [am_cv_lib_iconv=yes]
62 [am_cv_func_iconv=yes])
63 LIBS="$am_save_LIBS"
64 fi
65 ])
66 if test "$am_cv_func_iconv" = yes; then
67 AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
68 dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11,
69 dnl Solaris 10.
70 am_save_LIBS="$LIBS"
71 if test $am_cv_lib_iconv = yes; then
72 LIBS="$LIBS $LIBICONV"
73 fi
74 am_cv_func_iconv_works=no
75 for ac_iconv_const in '' 'const'; do
76 AC_RUN_IFELSE(
77 [AC_LANG_PROGRAM(
78 [[
79 #include <iconv.h>
80 #include <string.h>
81
82 #ifndef ICONV_CONST
83 # define ICONV_CONST $ac_iconv_const
84 #endif
85 ]],
86 [[int result = 0;
87 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
88 returns. */
89 {
90 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
91 if (cd_utf8_to_88591 != (iconv_t)(-1))
92 {
93 static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
94 char buf[10];
95 ICONV_CONST char *inptr = input;
96 size_t inbytesleft = strlen (input);
97 char *outptr = buf;
98 size_t outbytesleft = sizeof (buf);
99 size_t res = iconv (cd_utf8_to_88591,
100 &inptr, &inbytesleft,
101 &outptr, &outbytesleft);
102 if (res == 0)
103 result |= 1;
104 iconv_close (cd_utf8_to_88591);
105 }
106 }
107 /* Test against Solaris 10 bug: Failures are not distinguishable from
108 successful returns. */
109 {
110 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
111 if (cd_ascii_to_88591 != (iconv_t)(-1))
112 {
113 static ICONV_CONST char input[] = "\263";
114 char buf[10];
115 ICONV_CONST char *inptr = input;
116 size_t inbytesleft = strlen (input);
117 char *outptr = buf;
118 size_t outbytesleft = sizeof (buf);
119 size_t res = iconv (cd_ascii_to_88591,
120 &inptr, &inbytesleft,
121 &outptr, &outbytesleft);
122 if (res == 0)
123 result |= 2;
124 iconv_close (cd_ascii_to_88591);
125 }
126 }
127 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
128 {
129 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
130 if (cd_88591_to_utf8 != (iconv_t)(-1))
131 {
132 static ICONV_CONST char input[] = "\304";
133 static char buf[2] = { (char)0xDE, (char)0xAD };
134 ICONV_CONST char *inptr = input;
135 size_t inbytesleft = 1;
136 char *outptr = buf;
137 size_t outbytesleft = 1;
138 size_t res = iconv (cd_88591_to_utf8,
139 &inptr, &inbytesleft,
140 &outptr, &outbytesleft);
141 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
142 result |= 4;
143 iconv_close (cd_88591_to_utf8);
144 }
145 }
146 #if 0 /* This bug could be worked around by the caller. */
147 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
148 {
149 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
150 if (cd_88591_to_utf8 != (iconv_t)(-1))
151 {
152 static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
153 char buf[50];
154 ICONV_CONST char *inptr = input;
155 size_t inbytesleft = strlen (input);
156 char *outptr = buf;
157 size_t outbytesleft = sizeof (buf);
158 size_t res = iconv (cd_88591_to_utf8,
159 &inptr, &inbytesleft,
160 &outptr, &outbytesleft);
161 if ((int)res > 0)
162 result |= 8;
163 iconv_close (cd_88591_to_utf8);
164 }
165 }
166 #endif
167 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
168 provided. */
169 if (/* Try standardized names. */
170 iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
171 /* Try IRIX, OSF/1 names. */
172 && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
173 /* Try AIX names. */
174 && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
175 /* Try HP-UX names. */
176 && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
177 result |= 16;
178 return result;
179 ]])],
180 [am_cv_func_iconv_works=yes], ,
181 [case "$host_os" in
182 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
183 *) am_cv_func_iconv_works="guessing yes" ;;
184 esac])
185 test "$am_cv_func_iconv_works" = no || break
186 done
187 LIBS="$am_save_LIBS"
188 ])
189 case "$am_cv_func_iconv_works" in
190 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
191 *) am_func_iconv=yes ;;
192 esac
193 else
194 am_func_iconv=no am_cv_lib_iconv=no
195 fi
196 if test "$am_func_iconv" = yes; then
197 AC_DEFINE([HAVE_ICONV], [1],
198 [Define if you have the iconv() function and it works.])
199 fi
200 if test "$am_cv_lib_iconv" = yes; then
201 AC_MSG_CHECKING([how to link with libiconv])
202 AC_MSG_RESULT([$LIBICONV])
203 else
204 dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
205 dnl either.
206 CPPFLAGS="$am_save_CPPFLAGS"
207 LIBICONV=
208 LTLIBICONV=
209 fi
210 AC_SUBST([LIBICONV])
211 AC_SUBST([LTLIBICONV])
212 ])
213
214 dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
215 dnl avoid warnings like
216 dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
217 dnl This is tricky because of the way 'aclocal' is implemented:
218 dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
219 dnl Otherwise aclocal's initial scan pass would miss the macro definition.
220 dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
221 dnl Otherwise aclocal would emit many "Use of uninitialized value $1"
222 dnl warnings.
223 m4_define([gl_iconv_AC_DEFUN],
224 m4_version_prereq([2.64],
225 [[AC_DEFUN_ONCE(
226 [$1], [$2])]],
227 [m4_ifdef([gl_00GNULIB],
228 [[AC_DEFUN_ONCE(
229 [$1], [$2])]],
230 [[AC_DEFUN(
231 [$1], [$2])]])]))
232 gl_iconv_AC_DEFUN([AM_ICONV],
233 [
234 AM_ICONV_LINK
235 if test "$am_cv_func_iconv" = yes; then
236 AC_MSG_CHECKING([for iconv declaration])
237 AC_CACHE_VAL([am_cv_proto_iconv], [
238 AC_COMPILE_IFELSE(
239 [AC_LANG_PROGRAM(
240 [[
241 #include <stdlib.h>
242 #include <iconv.h>
243 extern
244 #ifdef __cplusplus
245 "C"
246 #endif
247 #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
248 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
249 #else
250 size_t iconv();
251 #endif
252 ]],
253 [[]])],
254 [am_cv_proto_iconv_arg1=""],
255 [am_cv_proto_iconv_arg1="const"])
256 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
257 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
258 AC_MSG_RESULT([
259 $am_cv_proto_iconv])
260 AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
261 [Define as const if the declaration of iconv() needs const.])
262 dnl Also substitute ICONV_CONST in the gnulib generated <iconv.h>.
263 m4_ifdef([gl_ICONV_H_DEFAULTS],
264 [AC_REQUIRE([gl_ICONV_H_DEFAULTS])
265 if test -n "$am_cv_proto_iconv_arg1"; then
266 ICONV_CONST="const"
267 fi
268 ])
269 fi
270 ])
0 # intlmacosx.m4 serial 5 (gettext-0.18.2)
1 dnl Copyright (C) 2004-2014, 2016 Free Software Foundation, Inc.
2 dnl This file is free software; the Free Software Foundation
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5 dnl
6 dnl This file can be used in projects which are not available under
7 dnl the GNU General Public License or the GNU Library General Public
8 dnl License but which still want to provide support for the GNU gettext
9 dnl functionality.
10 dnl Please note that the actual code of the GNU gettext library is covered
11 dnl by the GNU Library General Public License, and the rest of the GNU
12 dnl gettext package is covered by the GNU General Public License.
13 dnl They are *not* in the public domain.
14
15 dnl Checks for special options needed on Mac OS X.
16 dnl Defines INTL_MACOSX_LIBS.
17 AC_DEFUN([gt_INTL_MACOSX],
18 [
19 dnl Check for API introduced in Mac OS X 10.2.
20 AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
21 [gt_cv_func_CFPreferencesCopyAppValue],
22 [gt_save_LIBS="$LIBS"
23 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
24 AC_LINK_IFELSE(
25 [AC_LANG_PROGRAM(
26 [[#include <CoreFoundation/CFPreferences.h>]],
27 [[CFPreferencesCopyAppValue(NULL, NULL)]])],
28 [gt_cv_func_CFPreferencesCopyAppValue=yes],
29 [gt_cv_func_CFPreferencesCopyAppValue=no])
30 LIBS="$gt_save_LIBS"])
31 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
32 AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
33 [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
34 fi
35 dnl Check for API introduced in Mac OS X 10.3.
36 AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
37 [gt_save_LIBS="$LIBS"
38 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
39 AC_LINK_IFELSE(
40 [AC_LANG_PROGRAM(
41 [[#include <CoreFoundation/CFLocale.h>]],
42 [[CFLocaleCopyCurrent();]])],
43 [gt_cv_func_CFLocaleCopyCurrent=yes],
44 [gt_cv_func_CFLocaleCopyCurrent=no])
45 LIBS="$gt_save_LIBS"])
46 if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
47 AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
48 [Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
49 fi
50 INTL_MACOSX_LIBS=
51 if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
52 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
53 fi
54 AC_SUBST([INTL_MACOSX_LIBS])
55 ])
0 # lib-ld.m4 serial 6
1 dnl Copyright (C) 1996-2003, 2009-2016 Free Software Foundation, Inc.
2 dnl This file is free software; the Free Software Foundation
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5
6 dnl Subroutines of libtool.m4,
7 dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid
8 dnl collision with libtool.m4.
9
10 dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no.
11 AC_DEFUN([AC_LIB_PROG_LD_GNU],
12 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
13 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
14 case `$LD -v 2>&1 </dev/null` in
15 *GNU* | *'with BFD'*)
16 acl_cv_prog_gnu_ld=yes
17 ;;
18 *)
19 acl_cv_prog_gnu_ld=no
20 ;;
21 esac])
22 with_gnu_ld=$acl_cv_prog_gnu_ld
23 ])
24
25 dnl From libtool-2.4. Sets the variable LD.
26 AC_DEFUN([AC_LIB_PROG_LD],
27 [AC_REQUIRE([AC_PROG_CC])dnl
28 AC_REQUIRE([AC_CANONICAL_HOST])dnl
29
30 AC_ARG_WITH([gnu-ld],
31 [AS_HELP_STRING([--with-gnu-ld],
32 [assume the C compiler uses GNU ld [default=no]])],
33 [test "$withval" = no || with_gnu_ld=yes],
34 [with_gnu_ld=no])dnl
35
36 # Prepare PATH_SEPARATOR.
37 # The user is always right.
38 if test "${PATH_SEPARATOR+set}" != set; then
39 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
40 # contains only /bin. Note that ksh looks also at the FPATH variable,
41 # so we have to set that as well for the test.
42 PATH_SEPARATOR=:
43 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
44 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
45 || PATH_SEPARATOR=';'
46 }
47 fi
48
49 ac_prog=ld
50 if test "$GCC" = yes; then
51 # Check if gcc -print-prog-name=ld gives a path.
52 AC_MSG_CHECKING([for ld used by $CC])
53 case $host in
54 *-*-mingw*)
55 # gcc leaves a trailing carriage return which upsets mingw
56 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
57 *)
58 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
59 esac
60 case $ac_prog in
61 # Accept absolute paths.
62 [[\\/]]* | ?:[[\\/]]*)
63 re_direlt='/[[^/]][[^/]]*/\.\./'
64 # Canonicalize the pathname of ld
65 ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
66 while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
67 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
68 done
69 test -z "$LD" && LD="$ac_prog"
70 ;;
71 "")
72 # If it fails, then pretend we aren't using GCC.
73 ac_prog=ld
74 ;;
75 *)
76 # If it is relative, then search for the first ld in PATH.
77 with_gnu_ld=unknown
78 ;;
79 esac
80 elif test "$with_gnu_ld" = yes; then
81 AC_MSG_CHECKING([for GNU ld])
82 else
83 AC_MSG_CHECKING([for non-GNU ld])
84 fi
85 AC_CACHE_VAL([acl_cv_path_LD],
86 [if test -z "$LD"; then
87 acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
88 for ac_dir in $PATH; do
89 IFS="$acl_save_ifs"
90 test -z "$ac_dir" && ac_dir=.
91 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
92 acl_cv_path_LD="$ac_dir/$ac_prog"
93 # Check to see if the program is GNU ld. I'd rather use --version,
94 # but apparently some variants of GNU ld only accept -v.
95 # Break only if it was the GNU/non-GNU ld that we prefer.
96 case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
97 *GNU* | *'with BFD'*)
98 test "$with_gnu_ld" != no && break
99 ;;
100 *)
101 test "$with_gnu_ld" != yes && break
102 ;;
103 esac
104 fi
105 done
106 IFS="$acl_save_ifs"
107 else
108 acl_cv_path_LD="$LD" # Let the user override the test with a path.
109 fi])
110 LD="$acl_cv_path_LD"
111 if test -n "$LD"; then
112 AC_MSG_RESULT([$LD])
113 else
114 AC_MSG_RESULT([no])
115 fi
116 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
117 AC_LIB_PROG_LD_GNU
118 ])
0 # lib-link.m4 serial 26 (gettext-0.18.2)
1 dnl Copyright (C) 2001-2016 Free Software Foundation, Inc.
2 dnl This file is free software; the Free Software Foundation
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5
6 dnl From Bruno Haible.
7
8 AC_PREREQ([2.54])
9
10 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
11 dnl the libraries corresponding to explicit and implicit dependencies.
12 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
13 dnl augments the CPPFLAGS variable.
14 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
15 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
16 AC_DEFUN([AC_LIB_LINKFLAGS],
17 [
18 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
19 AC_REQUIRE([AC_LIB_RPATH])
20 pushdef([Name],[m4_translit([$1],[./+-], [____])])
21 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
22 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
23 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
24 AC_LIB_LINKFLAGS_BODY([$1], [$2])
25 ac_cv_lib[]Name[]_libs="$LIB[]NAME"
26 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
27 ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
28 ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
29 ])
30 LIB[]NAME="$ac_cv_lib[]Name[]_libs"
31 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
32 INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
33 LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
34 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
35 AC_SUBST([LIB]NAME)
36 AC_SUBST([LTLIB]NAME)
37 AC_SUBST([LIB]NAME[_PREFIX])
38 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
39 dnl results of this search when this library appears as a dependency.
40 HAVE_LIB[]NAME=yes
41 popdef([NAME])
42 popdef([Name])
43 ])
44
45 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
46 dnl searches for libname and the libraries corresponding to explicit and
47 dnl implicit dependencies, together with the specified include files and
48 dnl the ability to compile and link the specified testcode. The missing-message
49 dnl defaults to 'no' and may contain additional hints for the user.
50 dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
51 dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
52 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
53 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
54 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
55 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
56 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
57 [
58 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
59 AC_REQUIRE([AC_LIB_RPATH])
60 pushdef([Name],[m4_translit([$1],[./+-], [____])])
61 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
62 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
63
64 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
65 dnl accordingly.
66 AC_LIB_LINKFLAGS_BODY([$1], [$2])
67
68 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
69 dnl because if the user has installed lib[]Name and not disabled its use
70 dnl via --without-lib[]Name-prefix, he wants to use it.
71 ac_save_CPPFLAGS="$CPPFLAGS"
72 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
73
74 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
75 ac_save_LIBS="$LIBS"
76 dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
77 dnl because these -l options might require -L options that are present in
78 dnl LIBS. -l options benefit only from the -L options listed before it.
79 dnl Otherwise, add it to the front of LIBS, because it may be a static
80 dnl library that depends on another static library that is present in LIBS.
81 dnl Static libraries benefit only from the static libraries listed after
82 dnl it.
83 case " $LIB[]NAME" in
84 *" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
85 *) LIBS="$LIB[]NAME $LIBS" ;;
86 esac
87 AC_LINK_IFELSE(
88 [AC_LANG_PROGRAM([[$3]], [[$4]])],
89 [ac_cv_lib[]Name=yes],
90 [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
91 LIBS="$ac_save_LIBS"
92 ])
93 if test "$ac_cv_lib[]Name" = yes; then
94 HAVE_LIB[]NAME=yes
95 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
96 AC_MSG_CHECKING([how to link with lib[]$1])
97 AC_MSG_RESULT([$LIB[]NAME])
98 else
99 HAVE_LIB[]NAME=no
100 dnl If $LIB[]NAME didn't lead to a usable library, we don't need
101 dnl $INC[]NAME either.
102 CPPFLAGS="$ac_save_CPPFLAGS"
103 LIB[]NAME=
104 LTLIB[]NAME=
105 LIB[]NAME[]_PREFIX=
106 fi
107 AC_SUBST([HAVE_LIB]NAME)
108 AC_SUBST([LIB]NAME)
109 AC_SUBST([LTLIB]NAME)
110 AC_SUBST([LIB]NAME[_PREFIX])
111 popdef([NAME])
112 popdef([Name])
113 ])
114
115 dnl Determine the platform dependent parameters needed to use rpath:
116 dnl acl_libext,
117 dnl acl_shlibext,
118 dnl acl_libname_spec,
119 dnl acl_library_names_spec,
120 dnl acl_hardcode_libdir_flag_spec,
121 dnl acl_hardcode_libdir_separator,
122 dnl acl_hardcode_direct,
123 dnl acl_hardcode_minus_L.
124 AC_DEFUN([AC_LIB_RPATH],
125 [
126 dnl Tell automake >= 1.10 to complain if config.rpath is missing.
127 m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
128 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
129 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
130 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
131 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
132 AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
133 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
134 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
135 . ./conftest.sh
136 rm -f ./conftest.sh
137 acl_cv_rpath=done
138 ])
139 wl="$acl_cv_wl"
140 acl_libext="$acl_cv_libext"
141 acl_shlibext="$acl_cv_shlibext"
142 acl_libname_spec="$acl_cv_libname_spec"
143 acl_library_names_spec="$acl_cv_library_names_spec"
144 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
145 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
146 acl_hardcode_direct="$acl_cv_hardcode_direct"
147 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
148 dnl Determine whether the user wants rpath handling at all.
149 AC_ARG_ENABLE([rpath],
150 [ --disable-rpath do not hardcode runtime library paths],
151 :, enable_rpath=yes)
152 ])
153
154 dnl AC_LIB_FROMPACKAGE(name, package)
155 dnl declares that libname comes from the given package. The configure file
156 dnl will then not have a --with-libname-prefix option but a
157 dnl --with-package-prefix option. Several libraries can come from the same
158 dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
159 dnl macro call that searches for libname.
160 AC_DEFUN([AC_LIB_FROMPACKAGE],
161 [
162 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
163 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
164 define([acl_frompackage_]NAME, [$2])
165 popdef([NAME])
166 pushdef([PACK],[$2])
167 pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
168 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
169 define([acl_libsinpackage_]PACKUP,
170 m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1])
171 popdef([PACKUP])
172 popdef([PACK])
173 ])
174
175 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
176 dnl the libraries corresponding to explicit and implicit dependencies.
177 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
178 dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
179 dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
180 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
181 [
182 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
183 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
184 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
185 pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
186 pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
187 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
188 pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
189 dnl Autoconf >= 2.61 supports dots in --with options.
190 pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)])
191 dnl By default, look in $includedir and $libdir.
192 use_additional=yes
193 AC_LIB_WITH_FINAL_PREFIX([
194 eval additional_includedir=\"$includedir\"
195 eval additional_libdir=\"$libdir\"
196 ])
197 AC_ARG_WITH(P_A_C_K[-prefix],
198 [[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib
199 --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]],
200 [
201 if test "X$withval" = "Xno"; then
202 use_additional=no
203 else
204 if test "X$withval" = "X"; then
205 AC_LIB_WITH_FINAL_PREFIX([
206 eval additional_includedir=\"$includedir\"
207 eval additional_libdir=\"$libdir\"
208 ])
209 else
210 additional_includedir="$withval/include"
211 additional_libdir="$withval/$acl_libdirstem"
212 if test "$acl_libdirstem2" != "$acl_libdirstem" \
213 && ! test -d "$withval/$acl_libdirstem"; then
214 additional_libdir="$withval/$acl_libdirstem2"
215 fi
216 fi
217 fi
218 ])
219 dnl Search the library and its dependencies in $additional_libdir and
220 dnl $LDFLAGS. Using breadth-first-seach.
221 LIB[]NAME=
222 LTLIB[]NAME=
223 INC[]NAME=
224 LIB[]NAME[]_PREFIX=
225 dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
226 dnl computed. So it has to be reset here.
227 HAVE_LIB[]NAME=
228 rpathdirs=
229 ltrpathdirs=
230 names_already_handled=
231 names_next_round='$1 $2'
232 while test -n "$names_next_round"; do
233 names_this_round="$names_next_round"
234 names_next_round=
235 for name in $names_this_round; do
236 already_handled=
237 for n in $names_already_handled; do
238 if test "$n" = "$name"; then
239 already_handled=yes
240 break
241 fi
242 done
243 if test -z "$already_handled"; then
244 names_already_handled="$names_already_handled $name"
245 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
246 dnl or AC_LIB_HAVE_LINKFLAGS call.
247 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
248 eval value=\"\$HAVE_LIB$uppername\"
249 if test -n "$value"; then
250 if test "$value" = yes; then
251 eval value=\"\$LIB$uppername\"
252 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
253 eval value=\"\$LTLIB$uppername\"
254 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
255 else
256 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
257 dnl that this library doesn't exist. So just drop it.
258 :
259 fi
260 else
261 dnl Search the library lib$name in $additional_libdir and $LDFLAGS
262 dnl and the already constructed $LIBNAME/$LTLIBNAME.
263 found_dir=
264 found_la=
265 found_so=
266 found_a=
267 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
268 if test -n "$acl_shlibext"; then
269 shrext=".$acl_shlibext" # typically: shrext=.so
270 else
271 shrext=
272 fi
273 if test $use_additional = yes; then
274 dir="$additional_libdir"
275 dnl The same code as in the loop below:
276 dnl First look for a shared library.
277 if test -n "$acl_shlibext"; then
278 if test -f "$dir/$libname$shrext"; then
279 found_dir="$dir"
280 found_so="$dir/$libname$shrext"
281 else
282 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
283 ver=`(cd "$dir" && \
284 for f in "$libname$shrext".*; do echo "$f"; done \
285 | sed -e "s,^$libname$shrext\\\\.,," \
286 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
287 | sed 1q ) 2>/dev/null`
288 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
289 found_dir="$dir"
290 found_so="$dir/$libname$shrext.$ver"
291 fi
292 else
293 eval library_names=\"$acl_library_names_spec\"
294 for f in $library_names; do
295 if test -f "$dir/$f"; then
296 found_dir="$dir"
297 found_so="$dir/$f"
298 break
299 fi
300 done
301 fi
302 fi
303 fi
304 dnl Then look for a static library.
305 if test "X$found_dir" = "X"; then
306 if test -f "$dir/$libname.$acl_libext"; then
307 found_dir="$dir"
308 found_a="$dir/$libname.$acl_libext"
309 fi
310 fi
311 if test "X$found_dir" != "X"; then
312 if test -f "$dir/$libname.la"; then
313 found_la="$dir/$libname.la"
314 fi
315 fi
316 fi
317 if test "X$found_dir" = "X"; then
318 for x in $LDFLAGS $LTLIB[]NAME; do
319 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
320 case "$x" in
321 -L*)
322 dir=`echo "X$x" | sed -e 's/^X-L//'`
323 dnl First look for a shared library.
324 if test -n "$acl_shlibext"; then
325 if test -f "$dir/$libname$shrext"; then
326 found_dir="$dir"
327 found_so="$dir/$libname$shrext"
328 else
329 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
330 ver=`(cd "$dir" && \
331 for f in "$libname$shrext".*; do echo "$f"; done \
332 | sed -e "s,^$libname$shrext\\\\.,," \
333 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
334 | sed 1q ) 2>/dev/null`
335 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
336 found_dir="$dir"
337 found_so="$dir/$libname$shrext.$ver"
338 fi
339 else
340 eval library_names=\"$acl_library_names_spec\"
341 for f in $library_names; do
342 if test -f "$dir/$f"; then
343 found_dir="$dir"
344 found_so="$dir/$f"
345 break
346 fi
347 done
348 fi
349 fi
350 fi
351 dnl Then look for a static library.
352 if test "X$found_dir" = "X"; then
353 if test -f "$dir/$libname.$acl_libext"; then
354 found_dir="$dir"
355 found_a="$dir/$libname.$acl_libext"
356 fi
357 fi
358 if test "X$found_dir" != "X"; then
359 if test -f "$dir/$libname.la"; then
360 found_la="$dir/$libname.la"
361 fi
362 fi
363 ;;
364 esac
365 if test "X$found_dir" != "X"; then
366 break
367 fi
368 done
369 fi
370 if test "X$found_dir" != "X"; then
371 dnl Found the library.
372 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
373 if test "X$found_so" != "X"; then
374 dnl Linking with a shared library. We attempt to hardcode its
375 dnl directory into the executable's runpath, unless it's the
376 dnl standard /usr/lib.
377 if test "$enable_rpath" = no \
378 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
379 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
380 dnl No hardcoding is needed.
381 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
382 else
383 dnl Use an explicit option to hardcode DIR into the resulting
384 dnl binary.
385 dnl Potentially add DIR to ltrpathdirs.
386 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
387 haveit=
388 for x in $ltrpathdirs; do
389 if test "X$x" = "X$found_dir"; then
390 haveit=yes
391 break
392 fi
393 done
394 if test -z "$haveit"; then
395 ltrpathdirs="$ltrpathdirs $found_dir"
396 fi
397 dnl The hardcoding into $LIBNAME is system dependent.
398 if test "$acl_hardcode_direct" = yes; then
399 dnl Using DIR/libNAME.so during linking hardcodes DIR into the
400 dnl resulting binary.
401 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
402 else
403 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
404 dnl Use an explicit option to hardcode DIR into the resulting
405 dnl binary.
406 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
407 dnl Potentially add DIR to rpathdirs.
408 dnl The rpathdirs will be appended to $LIBNAME at the end.
409 haveit=
410 for x in $rpathdirs; do
411 if test "X$x" = "X$found_dir"; then
412 haveit=yes
413 break
414 fi
415 done
416 if test -z "$haveit"; then
417 rpathdirs="$rpathdirs $found_dir"
418 fi
419 else
420 dnl Rely on "-L$found_dir".
421 dnl But don't add it if it's already contained in the LDFLAGS
422 dnl or the already constructed $LIBNAME
423 haveit=
424 for x in $LDFLAGS $LIB[]NAME; do
425 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
426 if test "X$x" = "X-L$found_dir"; then
427 haveit=yes
428 break
429 fi
430 done
431 if test -z "$haveit"; then
432 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
433 fi
434 if test "$acl_hardcode_minus_L" != no; then
435 dnl FIXME: Not sure whether we should use
436 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
437 dnl here.
438 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
439 else
440 dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
441 dnl here, because this doesn't fit in flags passed to the
442 dnl compiler. So give up. No hardcoding. This affects only
443 dnl very old systems.
444 dnl FIXME: Not sure whether we should use
445 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
446 dnl here.
447 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
448 fi
449 fi
450 fi
451 fi
452 else
453 if test "X$found_a" != "X"; then
454 dnl Linking with a static library.
455 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
456 else
457 dnl We shouldn't come here, but anyway it's good to have a
458 dnl fallback.
459 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
460 fi
461 fi
462 dnl Assume the include files are nearby.
463 additional_includedir=
464 case "$found_dir" in
465 */$acl_libdirstem | */$acl_libdirstem/)
466 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
467 if test "$name" = '$1'; then
468 LIB[]NAME[]_PREFIX="$basedir"
469 fi
470 additional_includedir="$basedir/include"
471 ;;
472 */$acl_libdirstem2 | */$acl_libdirstem2/)
473 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
474 if test "$name" = '$1'; then
475 LIB[]NAME[]_PREFIX="$basedir"
476 fi
477 additional_includedir="$basedir/include"
478 ;;
479 esac
480 if test "X$additional_includedir" != "X"; then
481 dnl Potentially add $additional_includedir to $INCNAME.
482 dnl But don't add it
483 dnl 1. if it's the standard /usr/include,
484 dnl 2. if it's /usr/local/include and we are using GCC on Linux,
485 dnl 3. if it's already present in $CPPFLAGS or the already
486 dnl constructed $INCNAME,
487 dnl 4. if it doesn't exist as a directory.
488 if test "X$additional_includedir" != "X/usr/include"; then
489 haveit=
490 if test "X$additional_includedir" = "X/usr/local/include"; then
491 if test -n "$GCC"; then
492 case $host_os in
493 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
494 esac
495 fi
496 fi
497 if test -z "$haveit"; then
498 for x in $CPPFLAGS $INC[]NAME; do
499 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
500 if test "X$x" = "X-I$additional_includedir"; then
501 haveit=yes
502 break
503 fi
504 done
505 if test -z "$haveit"; then
506 if test -d "$additional_includedir"; then
507 dnl Really add $additional_includedir to $INCNAME.
508 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
509 fi
510 fi
511 fi
512 fi
513 fi
514 dnl Look for dependencies.
515 if test -n "$found_la"; then
516 dnl Read the .la file. It defines the variables
517 dnl dlname, library_names, old_library, dependency_libs, current,
518 dnl age, revision, installed, dlopen, dlpreopen, libdir.
519 save_libdir="$libdir"
520 case "$found_la" in
521 */* | *\\*) . "$found_la" ;;
522 *) . "./$found_la" ;;
523 esac
524 libdir="$save_libdir"
525 dnl We use only dependency_libs.
526 for dep in $dependency_libs; do
527 case "$dep" in
528 -L*)
529 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
530 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
531 dnl But don't add it
532 dnl 1. if it's the standard /usr/lib,
533 dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
534 dnl 3. if it's already present in $LDFLAGS or the already
535 dnl constructed $LIBNAME,
536 dnl 4. if it doesn't exist as a directory.
537 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
538 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
539 haveit=
540 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
541 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
542 if test -n "$GCC"; then
543 case $host_os in
544 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
545 esac
546 fi
547 fi
548 if test -z "$haveit"; then
549 haveit=
550 for x in $LDFLAGS $LIB[]NAME; do
551 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
552 if test "X$x" = "X-L$additional_libdir"; then
553 haveit=yes
554 break
555 fi
556 done
557 if test -z "$haveit"; then
558 if test -d "$additional_libdir"; then
559 dnl Really add $additional_libdir to $LIBNAME.
560 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
561 fi
562 fi
563 haveit=
564 for x in $LDFLAGS $LTLIB[]NAME; do
565 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
566 if test "X$x" = "X-L$additional_libdir"; then
567 haveit=yes
568 break
569 fi
570 done
571 if test -z "$haveit"; then
572 if test -d "$additional_libdir"; then
573 dnl Really add $additional_libdir to $LTLIBNAME.
574 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
575 fi
576 fi
577 fi
578 fi
579 ;;
580 -R*)
581 dir=`echo "X$dep" | sed -e 's/^X-R//'`
582 if test "$enable_rpath" != no; then
583 dnl Potentially add DIR to rpathdirs.
584 dnl The rpathdirs will be appended to $LIBNAME at the end.
585 haveit=
586 for x in $rpathdirs; do
587 if test "X$x" = "X$dir"; then
588 haveit=yes
589 break
590 fi
591 done
592 if test -z "$haveit"; then
593 rpathdirs="$rpathdirs $dir"
594 fi
595 dnl Potentially add DIR to ltrpathdirs.
596 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
597 haveit=
598 for x in $ltrpathdirs; do
599 if test "X$x" = "X$dir"; then
600 haveit=yes
601 break
602 fi
603 done
604 if test -z "$haveit"; then
605 ltrpathdirs="$ltrpathdirs $dir"
606 fi
607 fi
608 ;;
609 -l*)
610 dnl Handle this in the next round.
611 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
612 ;;
613 *.la)
614 dnl Handle this in the next round. Throw away the .la's
615 dnl directory; it is already contained in a preceding -L
616 dnl option.
617 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
618 ;;
619 *)
620 dnl Most likely an immediate library name.
621 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
622 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
623 ;;
624 esac
625 done
626 fi
627 else
628 dnl Didn't find the library; assume it is in the system directories
629 dnl known to the linker and runtime loader. (All the system
630 dnl directories known to the linker should also be known to the
631 dnl runtime loader, otherwise the system is severely misconfigured.)
632 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
633 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
634 fi
635 fi
636 fi
637 done
638 done
639 if test "X$rpathdirs" != "X"; then
640 if test -n "$acl_hardcode_libdir_separator"; then
641 dnl Weird platform: only the last -rpath option counts, the user must
642 dnl pass all path elements in one option. We can arrange that for a
643 dnl single library, but not when more than one $LIBNAMEs are used.
644 alldirs=
645 for found_dir in $rpathdirs; do
646 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
647 done
648 dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
649 acl_save_libdir="$libdir"
650 libdir="$alldirs"
651 eval flag=\"$acl_hardcode_libdir_flag_spec\"
652 libdir="$acl_save_libdir"
653 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
654 else
655 dnl The -rpath options are cumulative.
656 for found_dir in $rpathdirs; do
657 acl_save_libdir="$libdir"
658 libdir="$found_dir"
659 eval flag=\"$acl_hardcode_libdir_flag_spec\"
660 libdir="$acl_save_libdir"
661 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
662 done
663 fi
664 fi
665 if test "X$ltrpathdirs" != "X"; then
666 dnl When using libtool, the option that works for both libraries and
667 dnl executables is -R. The -R options are cumulative.
668 for found_dir in $ltrpathdirs; do
669 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
670 done
671 fi
672 popdef([P_A_C_K])
673 popdef([PACKLIBS])
674 popdef([PACKUP])
675 popdef([PACK])
676 popdef([NAME])
677 ])
678
679 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
680 dnl unless already present in VAR.
681 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
682 dnl contains two or three consecutive elements that belong together.
683 AC_DEFUN([AC_LIB_APPENDTOVAR],
684 [
685 for element in [$2]; do
686 haveit=
687 for x in $[$1]; do
688 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
689 if test "X$x" = "X$element"; then
690 haveit=yes
691 break
692 fi
693 done
694 if test -z "$haveit"; then
695 [$1]="${[$1]}${[$1]:+ }$element"
696 fi
697 done
698 ])
699
700 dnl For those cases where a variable contains several -L and -l options
701 dnl referring to unknown libraries and directories, this macro determines the
702 dnl necessary additional linker options for the runtime path.
703 dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
704 dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
705 dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
706 dnl otherwise linking without libtool is assumed.
707 AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
708 [
709 AC_REQUIRE([AC_LIB_RPATH])
710 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
711 $1=
712 if test "$enable_rpath" != no; then
713 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
714 dnl Use an explicit option to hardcode directories into the resulting
715 dnl binary.
716 rpathdirs=
717 next=
718 for opt in $2; do
719 if test -n "$next"; then
720 dir="$next"
721 dnl No need to hardcode the standard /usr/lib.
722 if test "X$dir" != "X/usr/$acl_libdirstem" \
723 && test "X$dir" != "X/usr/$acl_libdirstem2"; then
724 rpathdirs="$rpathdirs $dir"
725 fi
726 next=
727 else
728 case $opt in
729 -L) next=yes ;;
730 -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
731 dnl No need to hardcode the standard /usr/lib.
732 if test "X$dir" != "X/usr/$acl_libdirstem" \
733 && test "X$dir" != "X/usr/$acl_libdirstem2"; then
734 rpathdirs="$rpathdirs $dir"
735 fi
736 next= ;;
737 *) next= ;;
738 esac
739 fi
740 done
741 if test "X$rpathdirs" != "X"; then
742 if test -n ""$3""; then
743 dnl libtool is used for linking. Use -R options.
744 for dir in $rpathdirs; do
745 $1="${$1}${$1:+ }-R$dir"
746 done
747 else
748 dnl The linker is used for linking directly.
749 if test -n "$acl_hardcode_libdir_separator"; then
750 dnl Weird platform: only the last -rpath option counts, the user
751 dnl must pass all path elements in one option.
752 alldirs=
753 for dir in $rpathdirs; do
754 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
755 done
756 acl_save_libdir="$libdir"
757 libdir="$alldirs"
758 eval flag=\"$acl_hardcode_libdir_flag_spec\"
759 libdir="$acl_save_libdir"
760 $1="$flag"
761 else
762 dnl The -rpath options are cumulative.
763 for dir in $rpathdirs; do
764 acl_save_libdir="$libdir"
765 libdir="$dir"
766 eval flag=\"$acl_hardcode_libdir_flag_spec\"
767 libdir="$acl_save_libdir"
768 $1="${$1}${$1:+ }$flag"
769 done
770 fi
771 fi
772 fi
773 fi
774 fi
775 AC_SUBST([$1])
776 ])
0 # lib-prefix.m4 serial 7 (gettext-0.18)
1 dnl Copyright (C) 2001-2005, 2008-2016 Free Software Foundation, Inc.
2 dnl This file is free software; the Free Software Foundation
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5
6 dnl From Bruno Haible.
7
8 dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
9 dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
10 dnl require excessive bracketing.
11 ifdef([AC_HELP_STRING],
12 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
13 [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
14
15 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
16 dnl to access previously installed libraries. The basic assumption is that
17 dnl a user will want packages to use other packages he previously installed
18 dnl with the same --prefix option.
19 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
20 dnl libraries, but is otherwise very convenient.
21 AC_DEFUN([AC_LIB_PREFIX],
22 [
23 AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
24 AC_REQUIRE([AC_PROG_CC])
25 AC_REQUIRE([AC_CANONICAL_HOST])
26 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
27 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
28 dnl By default, look in $includedir and $libdir.
29 use_additional=yes
30 AC_LIB_WITH_FINAL_PREFIX([
31 eval additional_includedir=\"$includedir\"
32 eval additional_libdir=\"$libdir\"
33 ])
34 AC_LIB_ARG_WITH([lib-prefix],
35 [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
36 --without-lib-prefix don't search for libraries in includedir and libdir],
37 [
38 if test "X$withval" = "Xno"; then
39 use_additional=no
40 else
41 if test "X$withval" = "X"; then
42 AC_LIB_WITH_FINAL_PREFIX([
43 eval additional_includedir=\"$includedir\"
44 eval additional_libdir=\"$libdir\"
45 ])
46 else
47 additional_includedir="$withval/include"
48 additional_libdir="$withval/$acl_libdirstem"
49 fi
50 fi
51 ])
52 if test $use_additional = yes; then
53 dnl Potentially add $additional_includedir to $CPPFLAGS.
54 dnl But don't add it
55 dnl 1. if it's the standard /usr/include,
56 dnl 2. if it's already present in $CPPFLAGS,
57 dnl 3. if it's /usr/local/include and we are using GCC on Linux,
58 dnl 4. if it doesn't exist as a directory.
59 if test "X$additional_includedir" != "X/usr/include"; then
60 haveit=
61 for x in $CPPFLAGS; do
62 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
63 if test "X$x" = "X-I$additional_includedir"; then
64 haveit=yes
65 break
66 fi
67 done
68 if test -z "$haveit"; then
69 if test "X$additional_includedir" = "X/usr/local/include"; then
70 if test -n "$GCC"; then
71 case $host_os in
72 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
73 esac
74 fi
75 fi
76 if test -z "$haveit"; then
77 if test -d "$additional_includedir"; then
78 dnl Really add $additional_includedir to $CPPFLAGS.
79 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
80 fi
81 fi
82 fi
83 fi
84 dnl Potentially add $additional_libdir to $LDFLAGS.
85 dnl But don't add it
86 dnl 1. if it's the standard /usr/lib,
87 dnl 2. if it's already present in $LDFLAGS,
88 dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
89 dnl 4. if it doesn't exist as a directory.
90 if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
91 haveit=
92 for x in $LDFLAGS; do
93 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
94 if test "X$x" = "X-L$additional_libdir"; then
95 haveit=yes
96 break
97 fi
98 done
99 if test -z "$haveit"; then
100 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
101 if test -n "$GCC"; then
102 case $host_os in
103 linux*) haveit=yes;;
104 esac
105 fi
106 fi
107 if test -z "$haveit"; then
108 if test -d "$additional_libdir"; then
109 dnl Really add $additional_libdir to $LDFLAGS.
110 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
111 fi
112 fi
113 fi
114 fi
115 fi
116 ])
117
118 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
119 dnl acl_final_exec_prefix, containing the values to which $prefix and
120 dnl $exec_prefix will expand at the end of the configure script.
121 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
122 [
123 dnl Unfortunately, prefix and exec_prefix get only finally determined
124 dnl at the end of configure.
125 if test "X$prefix" = "XNONE"; then
126 acl_final_prefix="$ac_default_prefix"
127 else
128 acl_final_prefix="$prefix"
129 fi
130 if test "X$exec_prefix" = "XNONE"; then
131 acl_final_exec_prefix='${prefix}'
132 else
133 acl_final_exec_prefix="$exec_prefix"
134 fi
135 acl_save_prefix="$prefix"
136 prefix="$acl_final_prefix"
137 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
138 prefix="$acl_save_prefix"
139 ])
140
141 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
142 dnl variables prefix and exec_prefix bound to the values they will have
143 dnl at the end of the configure script.
144 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
145 [
146 acl_save_prefix="$prefix"
147 prefix="$acl_final_prefix"
148 acl_save_exec_prefix="$exec_prefix"
149 exec_prefix="$acl_final_exec_prefix"
150 $1
151 exec_prefix="$acl_save_exec_prefix"
152 prefix="$acl_save_prefix"
153 ])
154
155 dnl AC_LIB_PREPARE_MULTILIB creates
156 dnl - a variable acl_libdirstem, containing the basename of the libdir, either
157 dnl "lib" or "lib64" or "lib/64",
158 dnl - a variable acl_libdirstem2, as a secondary possible value for
159 dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
160 dnl "lib/amd64".
161 AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
162 [
163 dnl There is no formal standard regarding lib and lib64.
164 dnl On glibc systems, the current practice is that on a system supporting
165 dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
166 dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
167 dnl the compiler's default mode by looking at the compiler's library search
168 dnl path. If at least one of its elements ends in /lib64 or points to a
169 dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
170 dnl Otherwise we use the default, namely "lib".
171 dnl On Solaris systems, the current practice is that on a system supporting
172 dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
173 dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
174 dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
175 AC_REQUIRE([AC_CANONICAL_HOST])
176 acl_libdirstem=lib
177 acl_libdirstem2=
178 case "$host_os" in
179 solaris*)
180 dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
181 dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
182 dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
183 dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
184 dnl symlink is missing, so we set acl_libdirstem2 too.
185 AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
186 [AC_EGREP_CPP([sixtyfour bits], [
187 #ifdef _LP64
188 sixtyfour bits
189 #endif
190 ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
191 ])
192 if test $gl_cv_solaris_64bit = yes; then
193 acl_libdirstem=lib/64
194 case "$host_cpu" in
195 sparc*) acl_libdirstem2=lib/sparcv9 ;;
196 i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
197 esac
198 fi
199 ;;
200 *)
201 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
202 if test -n "$searchpath"; then
203 acl_save_IFS="${IFS= }"; IFS=":"
204 for searchdir in $searchpath; do
205 if test -d "$searchdir"; then
206 case "$searchdir" in
207 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
208 */../ | */.. )
209 # Better ignore directories of this form. They are misleading.
210 ;;
211 *) searchdir=`cd "$searchdir" && pwd`
212 case "$searchdir" in
213 */lib64 ) acl_libdirstem=lib64 ;;
214 esac ;;
215 esac
216 fi
217 done
218 IFS="$acl_save_IFS"
219 fi
220 ;;
221 esac
222 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
223 ])
0 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1 #
2 # Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
3 # Written by Gordon Matzigkeit, 1996
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 m4_define([_LT_COPYING], [dnl
10 # Copyright (C) 2014 Free Software Foundation, Inc.
11 # This is free software; see the source for copying conditions. There is NO
12 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
14 # GNU Libtool is free software; you can redistribute it and/or modify
15 # it under the terms of the GNU General Public License as published by
16 # the Free Software Foundation; either version 2 of of the License, or
17 # (at your option) any later version.
18 #
19 # As a special exception to the GNU General Public License, if you
20 # distribute this file as part of a program or library that is built
21 # using GNU Libtool, you may include this file under the same
22 # distribution terms that you use for the rest of that program.
23 #
24 # GNU Libtool is distributed in the hope that it will be useful, but
25 # WITHOUT ANY WARRANTY; without even the implied warranty of
26 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 # GNU General Public License for more details.
28 #
29 # You should have received a copy of the GNU General Public License
30 # along with this program. If not, see <http://www.gnu.org/licenses/>.
31 ])
32
33 # serial 58 LT_INIT
34
35
36 # LT_PREREQ(VERSION)
37 # ------------------
38 # Complain and exit if this libtool version is less that VERSION.
39 m4_defun([LT_PREREQ],
40 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
41 [m4_default([$3],
42 [m4_fatal([Libtool version $1 or higher is required],
43 63)])],
44 [$2])])
45
46
47 # _LT_CHECK_BUILDDIR
48 # ------------------
49 # Complain if the absolute build directory name contains unusual characters
50 m4_defun([_LT_CHECK_BUILDDIR],
51 [case `pwd` in
52 *\ * | *\ *)
53 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
54 esac
55 ])
56
57
58 # LT_INIT([OPTIONS])
59 # ------------------
60 AC_DEFUN([LT_INIT],
61 [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
62 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
63 AC_BEFORE([$0], [LT_LANG])dnl
64 AC_BEFORE([$0], [LT_OUTPUT])dnl
65 AC_BEFORE([$0], [LTDL_INIT])dnl
66 m4_require([_LT_CHECK_BUILDDIR])dnl
67
68 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
69 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
70 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
71 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
72 dnl unless we require an AC_DEFUNed macro:
73 AC_REQUIRE([LTOPTIONS_VERSION])dnl
74 AC_REQUIRE([LTSUGAR_VERSION])dnl
75 AC_REQUIRE([LTVERSION_VERSION])dnl
76 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
77 m4_require([_LT_PROG_LTMAIN])dnl
78
79 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
80
81 dnl Parse OPTIONS
82 _LT_SET_OPTIONS([$0], [$1])
83
84 # This can be used to rebuild libtool when needed
85 LIBTOOL_DEPS=$ltmain
86
87 # Always use our own libtool.
88 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
89 AC_SUBST(LIBTOOL)dnl
90
91 _LT_SETUP
92
93 # Only expand once:
94 m4_define([LT_INIT])
95 ])# LT_INIT
96
97 # Old names:
98 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
99 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
100 dnl aclocal-1.4 backwards compatibility:
101 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
102 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
103
104
105 # _LT_PREPARE_CC_BASENAME
106 # -----------------------
107 m4_defun([_LT_PREPARE_CC_BASENAME], [
108 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
109 func_cc_basename ()
110 {
111 for cc_temp in @S|@*""; do
112 case $cc_temp in
113 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
114 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
115 \-*) ;;
116 *) break;;
117 esac
118 done
119 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
120 }
121 ])# _LT_PREPARE_CC_BASENAME
122
123
124 # _LT_CC_BASENAME(CC)
125 # -------------------
126 # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
127 # but that macro is also expanded into generated libtool script, which
128 # arranges for $SED and $ECHO to be set by different means.
129 m4_defun([_LT_CC_BASENAME],
130 [m4_require([_LT_PREPARE_CC_BASENAME])dnl
131 AC_REQUIRE([_LT_DECL_SED])dnl
132 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
133 func_cc_basename $1
134 cc_basename=$func_cc_basename_result
135 ])
136
137
138 # _LT_FILEUTILS_DEFAULTS
139 # ----------------------
140 # It is okay to use these file commands and assume they have been set
141 # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
142 m4_defun([_LT_FILEUTILS_DEFAULTS],
143 [: ${CP="cp -f"}
144 : ${MV="mv -f"}
145 : ${RM="rm -f"}
146 ])# _LT_FILEUTILS_DEFAULTS
147
148
149 # _LT_SETUP
150 # ---------
151 m4_defun([_LT_SETUP],
152 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
153 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
154 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
155 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
156
157 _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
158 dnl
159 _LT_DECL([], [host_alias], [0], [The host system])dnl
160 _LT_DECL([], [host], [0])dnl
161 _LT_DECL([], [host_os], [0])dnl
162 dnl
163 _LT_DECL([], [build_alias], [0], [The build system])dnl
164 _LT_DECL([], [build], [0])dnl
165 _LT_DECL([], [build_os], [0])dnl
166 dnl
167 AC_REQUIRE([AC_PROG_CC])dnl
168 AC_REQUIRE([LT_PATH_LD])dnl
169 AC_REQUIRE([LT_PATH_NM])dnl
170 dnl
171 AC_REQUIRE([AC_PROG_LN_S])dnl
172 test -z "$LN_S" && LN_S="ln -s"
173 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
174 dnl
175 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
176 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
177 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
178 dnl
179 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
180 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
181 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
182 m4_require([_LT_CMD_RELOAD])dnl
183 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
184 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
185 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
186 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
187 m4_require([_LT_WITH_SYSROOT])dnl
188 m4_require([_LT_CMD_TRUNCATE])dnl
189
190 _LT_CONFIG_LIBTOOL_INIT([
191 # See if we are running on zsh, and set the options that allow our
192 # commands through without removal of \ escapes INIT.
193 if test -n "\${ZSH_VERSION+set}"; then
194 setopt NO_GLOB_SUBST
195 fi
196 ])
197 if test -n "${ZSH_VERSION+set}"; then
198 setopt NO_GLOB_SUBST
199 fi
200
201 _LT_CHECK_OBJDIR
202
203 m4_require([_LT_TAG_COMPILER])dnl
204
205 case $host_os in
206 aix3*)
207 # AIX sometimes has problems with the GCC collect2 program. For some
208 # reason, if we set the COLLECT_NAMES environment variable, the problems
209 # vanish in a puff of smoke.
210 if test set != "${COLLECT_NAMES+set}"; then
211 COLLECT_NAMES=
212 export COLLECT_NAMES
213 fi
214 ;;
215 esac
216
217 # Global variables:
218 ofile=libtool
219 can_build_shared=yes
220
221 # All known linkers require a '.a' archive for static linking (except MSVC,
222 # which needs '.lib').
223 libext=a
224
225 with_gnu_ld=$lt_cv_prog_gnu_ld
226
227 old_CC=$CC
228 old_CFLAGS=$CFLAGS
229
230 # Set sane defaults for various variables
231 test -z "$CC" && CC=cc
232 test -z "$LTCC" && LTCC=$CC
233 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
234 test -z "$LD" && LD=ld
235 test -z "$ac_objext" && ac_objext=o
236
237 _LT_CC_BASENAME([$compiler])
238
239 # Only perform the check for file, if the check method requires it
240 test -z "$MAGIC_CMD" && MAGIC_CMD=file
241 case $deplibs_check_method in
242 file_magic*)
243 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
244 _LT_PATH_MAGIC
245 fi
246 ;;
247 esac
248
249 # Use C for the default configuration in the libtool script
250 LT_SUPPORTED_TAG([CC])
251 _LT_LANG_C_CONFIG
252 _LT_LANG_DEFAULT_CONFIG
253 _LT_CONFIG_COMMANDS
254 ])# _LT_SETUP
255
256
257 # _LT_PREPARE_SED_QUOTE_VARS
258 # --------------------------
259 # Define a few sed substitution that help us do robust quoting.
260 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
261 [# Backslashify metacharacters that are still active within
262 # double-quoted strings.
263 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
264
265 # Same as above, but do not quote variable references.
266 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
267
268 # Sed substitution to delay expansion of an escaped shell variable in a
269 # double_quote_subst'ed string.
270 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
271
272 # Sed substitution to delay expansion of an escaped single quote.
273 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
274
275 # Sed substitution to avoid accidental globbing in evaled expressions
276 no_glob_subst='s/\*/\\\*/g'
277 ])
278
279 # _LT_PROG_LTMAIN
280 # ---------------
281 # Note that this code is called both from 'configure', and 'config.status'
282 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
283 # 'config.status' has no value for ac_aux_dir unless we are using Automake,
284 # so we pass a copy along to make sure it has a sensible value anyway.
285 m4_defun([_LT_PROG_LTMAIN],
286 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
287 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
288 ltmain=$ac_aux_dir/ltmain.sh
289 ])# _LT_PROG_LTMAIN
290
291
292 ## ------------------------------------- ##
293 ## Accumulate code for creating libtool. ##
294 ## ------------------------------------- ##
295
296 # So that we can recreate a full libtool script including additional
297 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
298 # in macros and then make a single call at the end using the 'libtool'
299 # label.
300
301
302 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
303 # ----------------------------------------
304 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
305 m4_define([_LT_CONFIG_LIBTOOL_INIT],
306 [m4_ifval([$1],
307 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
308 [$1
309 ])])])
310
311 # Initialize.
312 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
313
314
315 # _LT_CONFIG_LIBTOOL([COMMANDS])
316 # ------------------------------
317 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
318 m4_define([_LT_CONFIG_LIBTOOL],
319 [m4_ifval([$1],
320 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
321 [$1
322 ])])])
323
324 # Initialize.
325 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
326
327
328 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
329 # -----------------------------------------------------
330 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
331 [_LT_CONFIG_LIBTOOL([$1])
332 _LT_CONFIG_LIBTOOL_INIT([$2])
333 ])
334
335
336 # _LT_FORMAT_COMMENT([COMMENT])
337 # -----------------------------
338 # Add leading comment marks to the start of each line, and a trailing
339 # full-stop to the whole comment if one is not present already.
340 m4_define([_LT_FORMAT_COMMENT],
341 [m4_ifval([$1], [
342 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
343 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
344 )])
345
346
347
348 ## ------------------------ ##
349 ## FIXME: Eliminate VARNAME ##
350 ## ------------------------ ##
351
352
353 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
354 # -------------------------------------------------------------------
355 # CONFIGNAME is the name given to the value in the libtool script.
356 # VARNAME is the (base) name used in the configure script.
357 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
358 # VARNAME. Any other value will be used directly.
359 m4_define([_LT_DECL],
360 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
361 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
362 [m4_ifval([$1], [$1], [$2])])
363 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
364 m4_ifval([$4],
365 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
366 lt_dict_add_subkey([lt_decl_dict], [$2],
367 [tagged?], [m4_ifval([$5], [yes], [no])])])
368 ])
369
370
371 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
372 # --------------------------------------------------------
373 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
374
375
376 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
377 # ------------------------------------------------
378 m4_define([lt_decl_tag_varnames],
379 [_lt_decl_filter([tagged?], [yes], $@)])
380
381
382 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
383 # ---------------------------------------------------------
384 m4_define([_lt_decl_filter],
385 [m4_case([$#],
386 [0], [m4_fatal([$0: too few arguments: $#])],
387 [1], [m4_fatal([$0: too few arguments: $#: $1])],
388 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
389 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
390 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
391 ])
392
393
394 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
395 # --------------------------------------------------
396 m4_define([lt_decl_quote_varnames],
397 [_lt_decl_filter([value], [1], $@)])
398
399
400 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
401 # ---------------------------------------------------
402 m4_define([lt_decl_dquote_varnames],
403 [_lt_decl_filter([value], [2], $@)])
404
405
406 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
407 # ---------------------------------------------------
408 m4_define([lt_decl_varnames_tagged],
409 [m4_assert([$# <= 2])dnl
410 _$0(m4_quote(m4_default([$1], [[, ]])),
411 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
412 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
413 m4_define([_lt_decl_varnames_tagged],
414 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
415
416
417 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
418 # ------------------------------------------------
419 m4_define([lt_decl_all_varnames],
420 [_$0(m4_quote(m4_default([$1], [[, ]])),
421 m4_if([$2], [],
422 m4_quote(lt_decl_varnames),
423 m4_quote(m4_shift($@))))[]dnl
424 ])
425 m4_define([_lt_decl_all_varnames],
426 [lt_join($@, lt_decl_varnames_tagged([$1],
427 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
428 ])
429
430
431 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
432 # ------------------------------------
433 # Quote a variable value, and forward it to 'config.status' so that its
434 # declaration there will have the same value as in 'configure'. VARNAME
435 # must have a single quote delimited value for this to work.
436 m4_define([_LT_CONFIG_STATUS_DECLARE],
437 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
438
439
440 # _LT_CONFIG_STATUS_DECLARATIONS
441 # ------------------------------
442 # We delimit libtool config variables with single quotes, so when
443 # we write them to config.status, we have to be sure to quote all
444 # embedded single quotes properly. In configure, this macro expands
445 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
446 #
447 # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
448 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
449 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
450 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
451
452
453 # _LT_LIBTOOL_TAGS
454 # ----------------
455 # Output comment and list of tags supported by the script
456 m4_defun([_LT_LIBTOOL_TAGS],
457 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
458 available_tags='_LT_TAGS'dnl
459 ])
460
461
462 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
463 # -----------------------------------
464 # Extract the dictionary values for VARNAME (optionally with TAG) and
465 # expand to a commented shell variable setting:
466 #
467 # # Some comment about what VAR is for.
468 # visible_name=$lt_internal_name
469 m4_define([_LT_LIBTOOL_DECLARE],
470 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
471 [description])))[]dnl
472 m4_pushdef([_libtool_name],
473 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
474 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
475 [0], [_libtool_name=[$]$1],
476 [1], [_libtool_name=$lt_[]$1],
477 [2], [_libtool_name=$lt_[]$1],
478 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
479 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
480 ])
481
482
483 # _LT_LIBTOOL_CONFIG_VARS
484 # -----------------------
485 # Produce commented declarations of non-tagged libtool config variables
486 # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
487 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
488 # section) are produced by _LT_LIBTOOL_TAG_VARS.
489 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
490 [m4_foreach([_lt_var],
491 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
492 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
493
494
495 # _LT_LIBTOOL_TAG_VARS(TAG)
496 # -------------------------
497 m4_define([_LT_LIBTOOL_TAG_VARS],
498 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
499 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
500
501
502 # _LT_TAGVAR(VARNAME, [TAGNAME])
503 # ------------------------------
504 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
505
506
507 # _LT_CONFIG_COMMANDS
508 # -------------------
509 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
510 # variables for single and double quote escaping we saved from calls
511 # to _LT_DECL, we can put quote escaped variables declarations
512 # into 'config.status', and then the shell code to quote escape them in
513 # for loops in 'config.status'. Finally, any additional code accumulated
514 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
515 m4_defun([_LT_CONFIG_COMMANDS],
516 [AC_PROVIDE_IFELSE([LT_OUTPUT],
517 dnl If the libtool generation code has been placed in $CONFIG_LT,
518 dnl instead of duplicating it all over again into config.status,
519 dnl then we will have config.status run $CONFIG_LT later, so it
520 dnl needs to know what name is stored there:
521 [AC_CONFIG_COMMANDS([libtool],
522 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
523 dnl If the libtool generation code is destined for config.status,
524 dnl expand the accumulated commands and init code now:
525 [AC_CONFIG_COMMANDS([libtool],
526 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
527 ])#_LT_CONFIG_COMMANDS
528
529
530 # Initialize.
531 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
532 [
533
534 # The HP-UX ksh and POSIX shell print the target directory to stdout
535 # if CDPATH is set.
536 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
537
538 sed_quote_subst='$sed_quote_subst'
539 double_quote_subst='$double_quote_subst'
540 delay_variable_subst='$delay_variable_subst'
541 _LT_CONFIG_STATUS_DECLARATIONS
542 LTCC='$LTCC'
543 LTCFLAGS='$LTCFLAGS'
544 compiler='$compiler_DEFAULT'
545
546 # A function that is used when there is no print builtin or printf.
547 func_fallback_echo ()
548 {
549 eval 'cat <<_LTECHO_EOF
550 \$[]1
551 _LTECHO_EOF'
552 }
553
554 # Quote evaled strings.
555 for var in lt_decl_all_varnames([[ \
556 ]], lt_decl_quote_varnames); do
557 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
558 *[[\\\\\\\`\\"\\\$]]*)
559 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
560 ;;
561 *)
562 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
563 ;;
564 esac
565 done
566
567 # Double-quote double-evaled strings.
568 for var in lt_decl_all_varnames([[ \
569 ]], lt_decl_dquote_varnames); do
570 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
571 *[[\\\\\\\`\\"\\\$]]*)
572 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
573 ;;
574 *)
575 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
576 ;;
577 esac
578 done
579
580 _LT_OUTPUT_LIBTOOL_INIT
581 ])
582
583 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
584 # ------------------------------------
585 # Generate a child script FILE with all initialization necessary to
586 # reuse the environment learned by the parent script, and make the
587 # file executable. If COMMENT is supplied, it is inserted after the
588 # '#!' sequence but before initialization text begins. After this
589 # macro, additional text can be appended to FILE to form the body of
590 # the child script. The macro ends with non-zero status if the
591 # file could not be fully written (such as if the disk is full).
592 m4_ifdef([AS_INIT_GENERATED],
593 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
594 [m4_defun([_LT_GENERATED_FILE_INIT],
595 [m4_require([AS_PREPARE])]dnl
596 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
597 [lt_write_fail=0
598 cat >$1 <<_ASEOF || lt_write_fail=1
599 #! $SHELL
600 # Generated by $as_me.
601 $2
602 SHELL=\${CONFIG_SHELL-$SHELL}
603 export SHELL
604 _ASEOF
605 cat >>$1 <<\_ASEOF || lt_write_fail=1
606 AS_SHELL_SANITIZE
607 _AS_PREPARE
608 exec AS_MESSAGE_FD>&1
609 _ASEOF
610 test 0 = "$lt_write_fail" && chmod +x $1[]dnl
611 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
612
613 # LT_OUTPUT
614 # ---------
615 # This macro allows early generation of the libtool script (before
616 # AC_OUTPUT is called), incase it is used in configure for compilation
617 # tests.
618 AC_DEFUN([LT_OUTPUT],
619 [: ${CONFIG_LT=./config.lt}
620 AC_MSG_NOTICE([creating $CONFIG_LT])
621 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
622 [# Run this file to recreate a libtool stub with the current configuration.])
623
624 cat >>"$CONFIG_LT" <<\_LTEOF
625 lt_cl_silent=false
626 exec AS_MESSAGE_LOG_FD>>config.log
627 {
628 echo
629 AS_BOX([Running $as_me.])
630 } >&AS_MESSAGE_LOG_FD
631
632 lt_cl_help="\
633 '$as_me' creates a local libtool stub from the current configuration,
634 for use in further configure time tests before the real libtool is
635 generated.
636
637 Usage: $[0] [[OPTIONS]]
638
639 -h, --help print this help, then exit
640 -V, --version print version number, then exit
641 -q, --quiet do not print progress messages
642 -d, --debug don't remove temporary files
643
644 Report bugs to <bug-libtool@gnu.org>."
645
646 lt_cl_version="\
647 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
648 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
649 configured by $[0], generated by m4_PACKAGE_STRING.
650
651 Copyright (C) 2011 Free Software Foundation, Inc.
652 This config.lt script is free software; the Free Software Foundation
653 gives unlimited permision to copy, distribute and modify it."
654
655 while test 0 != $[#]
656 do
657 case $[1] in
658 --version | --v* | -V )
659 echo "$lt_cl_version"; exit 0 ;;
660 --help | --h* | -h )
661 echo "$lt_cl_help"; exit 0 ;;
662 --debug | --d* | -d )
663 debug=: ;;
664 --quiet | --q* | --silent | --s* | -q )
665 lt_cl_silent=: ;;
666
667 -*) AC_MSG_ERROR([unrecognized option: $[1]
668 Try '$[0] --help' for more information.]) ;;
669
670 *) AC_MSG_ERROR([unrecognized argument: $[1]
671 Try '$[0] --help' for more information.]) ;;
672 esac
673 shift
674 done
675
676 if $lt_cl_silent; then
677 exec AS_MESSAGE_FD>/dev/null
678 fi
679 _LTEOF
680
681 cat >>"$CONFIG_LT" <<_LTEOF
682 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
683 _LTEOF
684
685 cat >>"$CONFIG_LT" <<\_LTEOF
686 AC_MSG_NOTICE([creating $ofile])
687 _LT_OUTPUT_LIBTOOL_COMMANDS
688 AS_EXIT(0)
689 _LTEOF
690 chmod +x "$CONFIG_LT"
691
692 # configure is writing to config.log, but config.lt does its own redirection,
693 # appending to config.log, which fails on DOS, as config.log is still kept
694 # open by configure. Here we exec the FD to /dev/null, effectively closing
695 # config.log, so it can be properly (re)opened and appended to by config.lt.
696 lt_cl_success=:
697 test yes = "$silent" &&
698 lt_config_lt_args="$lt_config_lt_args --quiet"
699 exec AS_MESSAGE_LOG_FD>/dev/null
700 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
701 exec AS_MESSAGE_LOG_FD>>config.log
702 $lt_cl_success || AS_EXIT(1)
703 ])# LT_OUTPUT
704
705
706 # _LT_CONFIG(TAG)
707 # ---------------
708 # If TAG is the built-in tag, create an initial libtool script with a
709 # default configuration from the untagged config vars. Otherwise add code
710 # to config.status for appending the configuration named by TAG from the
711 # matching tagged config vars.
712 m4_defun([_LT_CONFIG],
713 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
714 _LT_CONFIG_SAVE_COMMANDS([
715 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
716 m4_if(_LT_TAG, [C], [
717 # See if we are running on zsh, and set the options that allow our
718 # commands through without removal of \ escapes.
719 if test -n "${ZSH_VERSION+set}"; then
720 setopt NO_GLOB_SUBST
721 fi
722
723 cfgfile=${ofile}T
724 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
725 $RM "$cfgfile"
726
727 cat <<_LT_EOF >> "$cfgfile"
728 #! $SHELL
729 # Generated automatically by $as_me ($PACKAGE) $VERSION
730 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
731
732 # Provide generalized library-building support services.
733 # Written by Gordon Matzigkeit, 1996
734
735 _LT_COPYING
736 _LT_LIBTOOL_TAGS
737
738 # Configured defaults for sys_lib_dlsearch_path munging.
739 : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
740
741 # ### BEGIN LIBTOOL CONFIG
742 _LT_LIBTOOL_CONFIG_VARS
743 _LT_LIBTOOL_TAG_VARS
744 # ### END LIBTOOL CONFIG
745
746 _LT_EOF
747
748 cat <<'_LT_EOF' >> "$cfgfile"
749
750 # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
751
752 _LT_PREPARE_MUNGE_PATH_LIST
753 _LT_PREPARE_CC_BASENAME
754
755 # ### END FUNCTIONS SHARED WITH CONFIGURE
756
757 _LT_EOF
758
759 case $host_os in
760 aix3*)
761 cat <<\_LT_EOF >> "$cfgfile"
762 # AIX sometimes has problems with the GCC collect2 program. For some
763 # reason, if we set the COLLECT_NAMES environment variable, the problems
764 # vanish in a puff of smoke.
765 if test set != "${COLLECT_NAMES+set}"; then
766 COLLECT_NAMES=
767 export COLLECT_NAMES
768 fi
769 _LT_EOF
770 ;;
771 esac
772
773 _LT_PROG_LTMAIN
774
775 # We use sed instead of cat because bash on DJGPP gets confused if
776 # if finds mixed CR/LF and LF-only lines. Since sed operates in
777 # text mode, it properly converts lines to CR/LF. This bash problem
778 # is reportedly fixed, but why not run on old versions too?
779 sed '$q' "$ltmain" >> "$cfgfile" \
780 || (rm -f "$cfgfile"; exit 1)
781
782 mv -f "$cfgfile" "$ofile" ||
783 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
784 chmod +x "$ofile"
785 ],
786 [cat <<_LT_EOF >> "$ofile"
787
788 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
789 dnl in a comment (ie after a #).
790 # ### BEGIN LIBTOOL TAG CONFIG: $1
791 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
792 # ### END LIBTOOL TAG CONFIG: $1
793 _LT_EOF
794 ])dnl /m4_if
795 ],
796 [m4_if([$1], [], [
797 PACKAGE='$PACKAGE'
798 VERSION='$VERSION'
799 RM='$RM'
800 ofile='$ofile'], [])
801 ])dnl /_LT_CONFIG_SAVE_COMMANDS
802 ])# _LT_CONFIG
803
804
805 # LT_SUPPORTED_TAG(TAG)
806 # ---------------------
807 # Trace this macro to discover what tags are supported by the libtool
808 # --tag option, using:
809 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
810 AC_DEFUN([LT_SUPPORTED_TAG], [])
811
812
813 # C support is built-in for now
814 m4_define([_LT_LANG_C_enabled], [])
815 m4_define([_LT_TAGS], [])
816
817
818 # LT_LANG(LANG)
819 # -------------
820 # Enable libtool support for the given language if not already enabled.
821 AC_DEFUN([LT_LANG],
822 [AC_BEFORE([$0], [LT_OUTPUT])dnl
823 m4_case([$1],
824 [C], [_LT_LANG(C)],
825 [C++], [_LT_LANG(CXX)],
826 [Go], [_LT_LANG(GO)],
827 [Java], [_LT_LANG(GCJ)],
828 [Fortran 77], [_LT_LANG(F77)],
829 [Fortran], [_LT_LANG(FC)],
830 [Windows Resource], [_LT_LANG(RC)],
831 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
832 [_LT_LANG($1)],
833 [m4_fatal([$0: unsupported language: "$1"])])])dnl
834 ])# LT_LANG
835
836
837 # _LT_LANG(LANGNAME)
838 # ------------------
839 m4_defun([_LT_LANG],
840 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
841 [LT_SUPPORTED_TAG([$1])dnl
842 m4_append([_LT_TAGS], [$1 ])dnl
843 m4_define([_LT_LANG_]$1[_enabled], [])dnl
844 _LT_LANG_$1_CONFIG($1)])dnl
845 ])# _LT_LANG
846
847
848 m4_ifndef([AC_PROG_GO], [
849 ############################################################
850 # NOTE: This macro has been submitted for inclusion into #
851 # GNU Autoconf as AC_PROG_GO. When it is available in #
852 # a released version of Autoconf we should remove this #
853 # macro and use it instead. #
854 ############################################################
855 m4_defun([AC_PROG_GO],
856 [AC_LANG_PUSH(Go)dnl
857 AC_ARG_VAR([GOC], [Go compiler command])dnl
858 AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
859 _AC_ARG_VAR_LDFLAGS()dnl
860 AC_CHECK_TOOL(GOC, gccgo)
861 if test -z "$GOC"; then
862 if test -n "$ac_tool_prefix"; then
863 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
864 fi
865 fi
866 if test -z "$GOC"; then
867 AC_CHECK_PROG(GOC, gccgo, gccgo, false)
868 fi
869 ])#m4_defun
870 ])#m4_ifndef
871
872
873 # _LT_LANG_DEFAULT_CONFIG
874 # -----------------------
875 m4_defun([_LT_LANG_DEFAULT_CONFIG],
876 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
877 [LT_LANG(CXX)],
878 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
879
880 AC_PROVIDE_IFELSE([AC_PROG_F77],
881 [LT_LANG(F77)],
882 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
883
884 AC_PROVIDE_IFELSE([AC_PROG_FC],
885 [LT_LANG(FC)],
886 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
887
888 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
889 dnl pulling things in needlessly.
890 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
891 [LT_LANG(GCJ)],
892 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
893 [LT_LANG(GCJ)],
894 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
895 [LT_LANG(GCJ)],
896 [m4_ifdef([AC_PROG_GCJ],
897 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
898 m4_ifdef([A][M_PROG_GCJ],
899 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
900 m4_ifdef([LT_PROG_GCJ],
901 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
902
903 AC_PROVIDE_IFELSE([AC_PROG_GO],
904 [LT_LANG(GO)],
905 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
906
907 AC_PROVIDE_IFELSE([LT_PROG_RC],
908 [LT_LANG(RC)],
909 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
910 ])# _LT_LANG_DEFAULT_CONFIG
911
912 # Obsolete macros:
913 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
914 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
915 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
916 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
917 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
918 dnl aclocal-1.4 backwards compatibility:
919 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
920 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
921 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
922 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
923 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
924
925
926 # _LT_TAG_COMPILER
927 # ----------------
928 m4_defun([_LT_TAG_COMPILER],
929 [AC_REQUIRE([AC_PROG_CC])dnl
930
931 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
932 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
933 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
934 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
935
936 # If no C compiler was specified, use CC.
937 LTCC=${LTCC-"$CC"}
938
939 # If no C compiler flags were specified, use CFLAGS.
940 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
941
942 # Allow CC to be a program name with arguments.
943 compiler=$CC
944 ])# _LT_TAG_COMPILER
945
946
947 # _LT_COMPILER_BOILERPLATE
948 # ------------------------
949 # Check for compiler boilerplate output or warnings with
950 # the simple compiler test code.
951 m4_defun([_LT_COMPILER_BOILERPLATE],
952 [m4_require([_LT_DECL_SED])dnl
953 ac_outfile=conftest.$ac_objext
954 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
955 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
956 _lt_compiler_boilerplate=`cat conftest.err`
957 $RM conftest*
958 ])# _LT_COMPILER_BOILERPLATE
959
960
961 # _LT_LINKER_BOILERPLATE
962 # ----------------------
963 # Check for linker boilerplate output or warnings with
964 # the simple link test code.
965 m4_defun([_LT_LINKER_BOILERPLATE],
966 [m4_require([_LT_DECL_SED])dnl
967 ac_outfile=conftest.$ac_objext
968 echo "$lt_simple_link_test_code" >conftest.$ac_ext
969 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
970 _lt_linker_boilerplate=`cat conftest.err`
971 $RM -r conftest*
972 ])# _LT_LINKER_BOILERPLATE
973
974 # _LT_REQUIRED_DARWIN_CHECKS
975 # -------------------------
976 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
977 case $host_os in
978 rhapsody* | darwin*)
979 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
980 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
981 AC_CHECK_TOOL([LIPO], [lipo], [:])
982 AC_CHECK_TOOL([OTOOL], [otool], [:])
983 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
984 _LT_DECL([], [DSYMUTIL], [1],
985 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
986 _LT_DECL([], [NMEDIT], [1],
987 [Tool to change global to local symbols on Mac OS X])
988 _LT_DECL([], [LIPO], [1],
989 [Tool to manipulate fat objects and archives on Mac OS X])
990 _LT_DECL([], [OTOOL], [1],
991 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
992 _LT_DECL([], [OTOOL64], [1],
993 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
994
995 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
996 [lt_cv_apple_cc_single_mod=no
997 if test -z "$LT_MULTI_MODULE"; then
998 # By default we will add the -single_module flag. You can override
999 # by either setting the environment variable LT_MULTI_MODULE
1000 # non-empty at configure time, or by adding -multi_module to the
1001 # link flags.
1002 rm -rf libconftest.dylib*
1003 echo "int foo(void){return 1;}" > conftest.c
1004 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1005 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1006 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1007 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1008 _lt_result=$?
1009 # If there is a non-empty error log, and "single_module"
1010 # appears in it, assume the flag caused a linker warning
1011 if test -s conftest.err && $GREP single_module conftest.err; then
1012 cat conftest.err >&AS_MESSAGE_LOG_FD
1013 # Otherwise, if the output was created with a 0 exit code from
1014 # the compiler, it worked.
1015 elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
1016 lt_cv_apple_cc_single_mod=yes
1017 else
1018 cat conftest.err >&AS_MESSAGE_LOG_FD
1019 fi
1020 rm -rf libconftest.dylib*
1021 rm -f conftest.*
1022 fi])
1023
1024 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1025 [lt_cv_ld_exported_symbols_list],
1026 [lt_cv_ld_exported_symbols_list=no
1027 save_LDFLAGS=$LDFLAGS
1028 echo "_main" > conftest.sym
1029 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1030 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1031 [lt_cv_ld_exported_symbols_list=yes],
1032 [lt_cv_ld_exported_symbols_list=no])
1033 LDFLAGS=$save_LDFLAGS
1034 ])
1035
1036 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
1037 [lt_cv_ld_force_load=no
1038 cat > conftest.c << _LT_EOF
1039 int forced_loaded() { return 2;}
1040 _LT_EOF
1041 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
1042 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1043 echo "$AR cr libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1044 $AR cr libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1045 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
1046 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
1047 cat > conftest.c << _LT_EOF
1048 int main() { return 0;}
1049 _LT_EOF
1050 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
1051 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
1052 _lt_result=$?
1053 if test -s conftest.err && $GREP force_load conftest.err; then
1054 cat conftest.err >&AS_MESSAGE_LOG_FD
1055 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
1056 lt_cv_ld_force_load=yes
1057 else
1058 cat conftest.err >&AS_MESSAGE_LOG_FD
1059 fi
1060 rm -f conftest.err libconftest.a conftest conftest.c
1061 rm -rf conftest.dSYM
1062 ])
1063 case $host_os in
1064 rhapsody* | darwin1.[[012]])
1065 _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
1066 darwin1.*)
1067 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
1068 darwin*) # darwin 5.x on
1069 # if running on 10.5 or later, the deployment target defaults
1070 # to the OS version, if on x86, and 10.4, the deployment
1071 # target defaults to 10.4. Don't you love it?
1072 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1073 10.0,*86*-darwin8*|10.0,*-darwin[[912]]*)
1074 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
1075 10.[[012]][[,.]]*)
1076 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
1077 10.*|11.*)
1078 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
1079 esac
1080 ;;
1081 esac
1082 if test yes = "$lt_cv_apple_cc_single_mod"; then
1083 _lt_dar_single_mod='$single_module'
1084 fi
1085 if test yes = "$lt_cv_ld_exported_symbols_list"; then
1086 _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
1087 else
1088 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
1089 fi
1090 if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
1091 _lt_dsymutil='~$DSYMUTIL $lib || :'
1092 else
1093 _lt_dsymutil=
1094 fi
1095 ;;
1096 esac
1097 ])
1098
1099
1100 # _LT_DARWIN_LINKER_FEATURES([TAG])
1101 # ---------------------------------
1102 # Checks for linker and compiler features on darwin
1103 m4_defun([_LT_DARWIN_LINKER_FEATURES],
1104 [
1105 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1106 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1107 _LT_TAGVAR(hardcode_direct, $1)=no
1108 _LT_TAGVAR(hardcode_automatic, $1)=yes
1109 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1110 if test yes = "$lt_cv_ld_force_load"; then
1111 _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\"`'
1112 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
1113 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
1114 else
1115 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1116 fi
1117 _LT_TAGVAR(link_all_deplibs, $1)=yes
1118 _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
1119 case $cc_basename in
1120 ifort*|nagfor*) _lt_dar_can_shared=yes ;;
1121 *) _lt_dar_can_shared=$GCC ;;
1122 esac
1123 if test yes = "$_lt_dar_can_shared"; then
1124 output_verbose_link_cmd=func_echo_all
1125 _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"
1126 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
1127 _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"
1128 _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"
1129 m4_if([$1], [CXX],
1130 [ if test yes != "$lt_cv_apple_cc_single_mod"; then
1131 _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"
1132 _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"
1133 fi
1134 ],[])
1135 else
1136 _LT_TAGVAR(ld_shlibs, $1)=no
1137 fi
1138 ])
1139
1140 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1141 # ----------------------------------
1142 # Links a minimal program and checks the executable
1143 # for the system default hardcoded library path. In most cases,
1144 # this is /usr/lib:/lib, but when the MPI compilers are used
1145 # the location of the communication and MPI libs are included too.
1146 # If we don't find anything, use the default library path according
1147 # to the aix ld manual.
1148 # Store the results from the different compilers for each TAGNAME.
1149 # Allow to override them for all tags through lt_cv_aix_libpath.
1150 m4_defun([_LT_SYS_MODULE_PATH_AIX],
1151 [m4_require([_LT_DECL_SED])dnl
1152 if test set = "${lt_cv_aix_libpath+set}"; then
1153 aix_libpath=$lt_cv_aix_libpath
1154 else
1155 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1156 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1157 lt_aix_libpath_sed='[
1158 /Import File Strings/,/^$/ {
1159 /^0/ {
1160 s/^0 *\([^ ]*\) *$/\1/
1161 p
1162 }
1163 }]'
1164 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1165 # Check for a 64-bit object if we didn't find anything.
1166 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1167 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1168 fi],[])
1169 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1170 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
1171 fi
1172 ])
1173 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1174 fi
1175 ])# _LT_SYS_MODULE_PATH_AIX
1176
1177
1178 # _LT_SHELL_INIT(ARG)
1179 # -------------------
1180 m4_define([_LT_SHELL_INIT],
1181 [m4_divert_text([M4SH-INIT], [$1
1182 ])])# _LT_SHELL_INIT
1183
1184
1185
1186 # _LT_PROG_ECHO_BACKSLASH
1187 # -----------------------
1188 # Find how we can fake an echo command that does not interpret backslash.
1189 # In particular, with Autoconf 2.60 or later we add some code to the start
1190 # of the generated configure script that will find a shell with a builtin
1191 # printf (that we can use as an echo command).
1192 m4_defun([_LT_PROG_ECHO_BACKSLASH],
1193 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1194 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1195 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1196
1197 AC_MSG_CHECKING([how to print strings])
1198 # Test print first, because it will be a builtin if present.
1199 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
1200 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1201 ECHO='print -r --'
1202 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1203 ECHO='printf %s\n'
1204 else
1205 # Use this function as a fallback that always works.
1206 func_fallback_echo ()
1207 {
1208 eval 'cat <<_LTECHO_EOF
1209 $[]1
1210 _LTECHO_EOF'
1211 }
1212 ECHO='func_fallback_echo'
1213 fi
1214
1215 # func_echo_all arg...
1216 # Invoke $ECHO with all args, space-separated.
1217 func_echo_all ()
1218 {
1219 $ECHO "$*"
1220 }
1221
1222 case $ECHO in
1223 printf*) AC_MSG_RESULT([printf]) ;;
1224 print*) AC_MSG_RESULT([print -r]) ;;
1225 *) AC_MSG_RESULT([cat]) ;;
1226 esac
1227
1228 m4_ifdef([_AS_DETECT_SUGGESTED],
1229 [_AS_DETECT_SUGGESTED([
1230 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
1231 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1232 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1233 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1234 PATH=/empty FPATH=/empty; export PATH FPATH
1235 test "X`printf %s $ECHO`" = "X$ECHO" \
1236 || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
1237
1238 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1239 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
1240 ])# _LT_PROG_ECHO_BACKSLASH
1241
1242
1243 # _LT_WITH_SYSROOT
1244 # ----------------
1245 AC_DEFUN([_LT_WITH_SYSROOT],
1246 [AC_MSG_CHECKING([for sysroot])
1247 AC_ARG_WITH([sysroot],
1248 [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
1249 [Search for dependent libraries within DIR (or the compiler's sysroot
1250 if not specified).])],
1251 [], [with_sysroot=no])
1252
1253 dnl lt_sysroot will always be passed unquoted. We quote it here
1254 dnl in case the user passed a directory name.
1255 lt_sysroot=
1256 case $with_sysroot in #(
1257 yes)
1258 if test yes = "$GCC"; then
1259 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
1260 fi
1261 ;; #(
1262 /*)
1263 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
1264 ;; #(
1265 no|'')
1266 ;; #(
1267 *)
1268 AC_MSG_RESULT([$with_sysroot])
1269 AC_MSG_ERROR([The sysroot must be an absolute path.])
1270 ;;
1271 esac
1272
1273 AC_MSG_RESULT([${lt_sysroot:-no}])
1274 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
1275 [dependent libraries, and where our libraries should be installed.])])
1276
1277 # _LT_ENABLE_LOCK
1278 # ---------------
1279 m4_defun([_LT_ENABLE_LOCK],
1280 [AC_ARG_ENABLE([libtool-lock],
1281 [AS_HELP_STRING([--disable-libtool-lock],
1282 [avoid locking (might break parallel builds)])])
1283 test no = "$enable_libtool_lock" || enable_libtool_lock=yes
1284
1285 # Some flags need to be propagated to the compiler or linker for good
1286 # libtool support.
1287 case $host in
1288 ia64-*-hpux*)
1289 # Find out what ABI is being produced by ac_compile, and set mode
1290 # options accordingly.
1291 echo 'int i;' > conftest.$ac_ext
1292 if AC_TRY_EVAL(ac_compile); then
1293 case `/usr/bin/file conftest.$ac_objext` in
1294 *ELF-32*)
1295 HPUX_IA64_MODE=32
1296 ;;
1297 *ELF-64*)
1298 HPUX_IA64_MODE=64
1299 ;;
1300 esac
1301 fi
1302 rm -rf conftest*
1303 ;;
1304 *-*-irix6*)
1305 # Find out what ABI is being produced by ac_compile, and set linker
1306 # options accordingly.
1307 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1308 if AC_TRY_EVAL(ac_compile); then
1309 if test yes = "$lt_cv_prog_gnu_ld"; then
1310 case `/usr/bin/file conftest.$ac_objext` in
1311 *32-bit*)
1312 LD="${LD-ld} -melf32bsmip"
1313 ;;
1314 *N32*)
1315 LD="${LD-ld} -melf32bmipn32"
1316 ;;
1317 *64-bit*)
1318 LD="${LD-ld} -melf64bmip"
1319 ;;
1320 esac
1321 else
1322 case `/usr/bin/file conftest.$ac_objext` in
1323 *32-bit*)
1324 LD="${LD-ld} -32"
1325 ;;
1326 *N32*)
1327 LD="${LD-ld} -n32"
1328 ;;
1329 *64-bit*)
1330 LD="${LD-ld} -64"
1331 ;;
1332 esac
1333 fi
1334 fi
1335 rm -rf conftest*
1336 ;;
1337
1338 mips64*-*linux*)
1339 # Find out what ABI is being produced by ac_compile, and set linker
1340 # options accordingly.
1341 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1342 if AC_TRY_EVAL(ac_compile); then
1343 emul=elf
1344 case `/usr/bin/file conftest.$ac_objext` in
1345 *32-bit*)
1346 emul="${emul}32"
1347 ;;
1348 *64-bit*)
1349 emul="${emul}64"
1350 ;;
1351 esac
1352 case `/usr/bin/file conftest.$ac_objext` in
1353 *MSB*)
1354 emul="${emul}btsmip"
1355 ;;
1356 *LSB*)
1357 emul="${emul}ltsmip"
1358 ;;
1359 esac
1360 case `/usr/bin/file conftest.$ac_objext` in
1361 *N32*)
1362 emul="${emul}n32"
1363 ;;
1364 esac
1365 LD="${LD-ld} -m $emul"
1366 fi
1367 rm -rf conftest*
1368 ;;
1369
1370 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
1371 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1372 # Find out what ABI is being produced by ac_compile, and set linker
1373 # options accordingly. Note that the listed cases only cover the
1374 # situations where additional linker options are needed (such as when
1375 # doing 32-bit compilation for a host where ld defaults to 64-bit, or
1376 # vice versa); the common cases where no linker options are needed do
1377 # not appear in the list.
1378 echo 'int i;' > conftest.$ac_ext
1379 if AC_TRY_EVAL(ac_compile); then
1380 case `/usr/bin/file conftest.o` in
1381 *32-bit*)
1382 case $host in
1383 x86_64-*kfreebsd*-gnu)
1384 LD="${LD-ld} -m elf_i386_fbsd"
1385 ;;
1386 x86_64-*linux*)
1387 case `/usr/bin/file conftest.o` in
1388 *x86-64*)
1389 LD="${LD-ld} -m elf32_x86_64"
1390 ;;
1391 *)
1392 LD="${LD-ld} -m elf_i386"
1393 ;;
1394 esac
1395 ;;
1396 powerpc64le-*linux*)
1397 LD="${LD-ld} -m elf32lppclinux"
1398 ;;
1399 powerpc64-*linux*)
1400 LD="${LD-ld} -m elf32ppclinux"
1401 ;;
1402 s390x-*linux*)
1403 LD="${LD-ld} -m elf_s390"
1404 ;;
1405 sparc64-*linux*)
1406 LD="${LD-ld} -m elf32_sparc"
1407 ;;
1408 esac
1409 ;;
1410 *64-bit*)
1411 case $host in
1412 x86_64-*kfreebsd*-gnu)
1413 LD="${LD-ld} -m elf_x86_64_fbsd"
1414 ;;
1415 x86_64-*linux*)
1416 LD="${LD-ld} -m elf_x86_64"
1417 ;;
1418 powerpcle-*linux*)
1419 LD="${LD-ld} -m elf64lppc"
1420 ;;
1421 powerpc-*linux*)
1422 LD="${LD-ld} -m elf64ppc"
1423 ;;
1424 s390*-*linux*|s390*-*tpf*)
1425 LD="${LD-ld} -m elf64_s390"
1426 ;;
1427 sparc*-*linux*)
1428 LD="${LD-ld} -m elf64_sparc"
1429 ;;
1430 esac
1431 ;;
1432 esac
1433 fi
1434 rm -rf conftest*
1435 ;;
1436
1437 *-*-sco3.2v5*)
1438 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1439 SAVE_CFLAGS=$CFLAGS
1440 CFLAGS="$CFLAGS -belf"
1441 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1442 [AC_LANG_PUSH(C)
1443 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1444 AC_LANG_POP])
1445 if test yes != "$lt_cv_cc_needs_belf"; then
1446 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1447 CFLAGS=$SAVE_CFLAGS
1448 fi
1449 ;;
1450 *-*solaris*)
1451 # Find out what ABI is being produced by ac_compile, and set linker
1452 # options accordingly.
1453 echo 'int i;' > conftest.$ac_ext
1454 if AC_TRY_EVAL(ac_compile); then
1455 case `/usr/bin/file conftest.o` in
1456 *64-bit*)
1457 case $lt_cv_prog_gnu_ld in
1458 yes*)
1459 case $host in
1460 i?86-*-solaris*|x86_64-*-solaris*)
1461 LD="${LD-ld} -m elf_x86_64"
1462 ;;
1463 sparc*-*-solaris*)
1464 LD="${LD-ld} -m elf64_sparc"
1465 ;;
1466 esac
1467 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
1468 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
1469 LD=${LD-ld}_sol2
1470 fi
1471 ;;
1472 *)
1473 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1474 LD="${LD-ld} -64"
1475 fi
1476 ;;
1477 esac
1478 ;;
1479 esac
1480 fi
1481 rm -rf conftest*
1482 ;;
1483 esac
1484
1485 need_locks=$enable_libtool_lock
1486 ])# _LT_ENABLE_LOCK
1487
1488
1489 # _LT_PROG_AR
1490 # -----------
1491 m4_defun([_LT_PROG_AR],
1492 [AC_CHECK_TOOLS(AR, [ar], false)
1493 : ${AR=ar}
1494 : ${AR_FLAGS=cr}
1495 _LT_DECL([], [AR], [1], [The archiver])
1496 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
1497
1498 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
1499 [lt_cv_ar_at_file=no
1500 AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
1501 [echo conftest.$ac_objext > conftest.lst
1502 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
1503 AC_TRY_EVAL([lt_ar_try])
1504 if test 0 -eq "$ac_status"; then
1505 # Ensure the archiver fails upon bogus file names.
1506 rm -f conftest.$ac_objext libconftest.a
1507 AC_TRY_EVAL([lt_ar_try])
1508 if test 0 -ne "$ac_status"; then
1509 lt_cv_ar_at_file=@
1510 fi
1511 fi
1512 rm -f conftest.* libconftest.a
1513 ])
1514 ])
1515
1516 if test no = "$lt_cv_ar_at_file"; then
1517 archiver_list_spec=
1518 else
1519 archiver_list_spec=$lt_cv_ar_at_file
1520 fi
1521 _LT_DECL([], [archiver_list_spec], [1],
1522 [How to feed a file listing to the archiver])
1523 ])# _LT_PROG_AR
1524
1525
1526 # _LT_CMD_OLD_ARCHIVE
1527 # -------------------
1528 m4_defun([_LT_CMD_OLD_ARCHIVE],
1529 [_LT_PROG_AR
1530
1531 AC_CHECK_TOOL(STRIP, strip, :)
1532 test -z "$STRIP" && STRIP=:
1533 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
1534
1535 AC_CHECK_TOOL(RANLIB, ranlib, :)
1536 test -z "$RANLIB" && RANLIB=:
1537 _LT_DECL([], [RANLIB], [1],
1538 [Commands used to install an old-style archive])
1539
1540 # Determine commands to create old-style static archives.
1541 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1542 old_postinstall_cmds='chmod 644 $oldlib'
1543 old_postuninstall_cmds=
1544
1545 if test -n "$RANLIB"; then
1546 case $host_os in
1547 bitrig* | openbsd*)
1548 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
1549 ;;
1550 *)
1551 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
1552 ;;
1553 esac
1554 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
1555 fi
1556
1557 case $host_os in
1558 darwin*)
1559 lock_old_archive_extraction=yes ;;
1560 *)
1561 lock_old_archive_extraction=no ;;
1562 esac
1563 _LT_DECL([], [old_postinstall_cmds], [2])
1564 _LT_DECL([], [old_postuninstall_cmds], [2])
1565 _LT_TAGDECL([], [old_archive_cmds], [2],
1566 [Commands used to build an old-style archive])
1567 _LT_DECL([], [lock_old_archive_extraction], [0],
1568 [Whether to use a lock for old archive extraction])
1569 ])# _LT_CMD_OLD_ARCHIVE
1570
1571
1572 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1573 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1574 # ----------------------------------------------------------------
1575 # Check whether the given compiler option works
1576 AC_DEFUN([_LT_COMPILER_OPTION],
1577 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1578 m4_require([_LT_DECL_SED])dnl
1579 AC_CACHE_CHECK([$1], [$2],
1580 [$2=no
1581 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1582 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1583 lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment
1584 # Insert the option either (1) after the last *FLAGS variable, or
1585 # (2) before a word containing "conftest.", or (3) at the end.
1586 # Note that $ac_compile itself does not contain backslashes and begins
1587 # with a dollar sign (not a hyphen), so the echo should work correctly.
1588 # The option is referenced via a variable to avoid confusing sed.
1589 lt_compile=`echo "$ac_compile" | $SED \
1590 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1591 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1592 -e 's:$: $lt_compiler_flag:'`
1593 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1594 (eval "$lt_compile" 2>conftest.err)
1595 ac_status=$?
1596 cat conftest.err >&AS_MESSAGE_LOG_FD
1597 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1598 if (exit $ac_status) && test -s "$ac_outfile"; then
1599 # The compiler can only warn and ignore the option if not recognized
1600 # So say no if there are warnings other than the usual output.
1601 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
1602 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1603 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1604 $2=yes
1605 fi
1606 fi
1607 $RM conftest*
1608 ])
1609
1610 if test yes = "[$]$2"; then
1611 m4_if([$5], , :, [$5])
1612 else
1613 m4_if([$6], , :, [$6])
1614 fi
1615 ])# _LT_COMPILER_OPTION
1616
1617 # Old name:
1618 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1619 dnl aclocal-1.4 backwards compatibility:
1620 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1621
1622
1623 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1624 # [ACTION-SUCCESS], [ACTION-FAILURE])
1625 # ----------------------------------------------------
1626 # Check whether the given linker option works
1627 AC_DEFUN([_LT_LINKER_OPTION],
1628 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1629 m4_require([_LT_DECL_SED])dnl
1630 AC_CACHE_CHECK([$1], [$2],
1631 [$2=no
1632 save_LDFLAGS=$LDFLAGS
1633 LDFLAGS="$LDFLAGS $3"
1634 echo "$lt_simple_link_test_code" > conftest.$ac_ext
1635 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1636 # The linker can only warn and ignore the option if not recognized
1637 # So say no if there are warnings
1638 if test -s conftest.err; then
1639 # Append any errors to the config.log.
1640 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1641 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
1642 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1643 if diff conftest.exp conftest.er2 >/dev/null; then
1644 $2=yes
1645 fi
1646 else
1647 $2=yes
1648 fi
1649 fi
1650 $RM -r conftest*
1651 LDFLAGS=$save_LDFLAGS
1652 ])
1653
1654 if test yes = "[$]$2"; then
1655 m4_if([$4], , :, [$4])
1656 else
1657 m4_if([$5], , :, [$5])
1658 fi
1659 ])# _LT_LINKER_OPTION
1660
1661 # Old name:
1662 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1663 dnl aclocal-1.4 backwards compatibility:
1664 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1665
1666
1667 # LT_CMD_MAX_LEN
1668 #---------------
1669 AC_DEFUN([LT_CMD_MAX_LEN],
1670 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1671 # find the maximum length of command line arguments
1672 AC_MSG_CHECKING([the maximum length of command line arguments])
1673 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1674 i=0
1675 teststring=ABCD
1676
1677 case $build_os in
1678 msdosdjgpp*)
1679 # On DJGPP, this test can blow up pretty badly due to problems in libc
1680 # (any single argument exceeding 2000 bytes causes a buffer overrun
1681 # during glob expansion). Even if it were fixed, the result of this
1682 # check would be larger than it should be.
1683 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1684 ;;
1685
1686 gnu*)
1687 # Under GNU Hurd, this test is not required because there is
1688 # no limit to the length of command line arguments.
1689 # Libtool will interpret -1 as no limit whatsoever
1690 lt_cv_sys_max_cmd_len=-1;
1691 ;;
1692
1693 cygwin* | mingw* | cegcc*)
1694 # On Win9x/ME, this test blows up -- it succeeds, but takes
1695 # about 5 minutes as the teststring grows exponentially.
1696 # Worse, since 9x/ME are not pre-emptively multitasking,
1697 # you end up with a "frozen" computer, even though with patience
1698 # the test eventually succeeds (with a max line length of 256k).
1699 # Instead, let's just punt: use the minimum linelength reported by
1700 # all of the supported platforms: 8192 (on NT/2K/XP).
1701 lt_cv_sys_max_cmd_len=8192;
1702 ;;
1703
1704 mint*)
1705 # On MiNT this can take a long time and run out of memory.
1706 lt_cv_sys_max_cmd_len=8192;
1707 ;;
1708
1709 amigaos*)
1710 # On AmigaOS with pdksh, this test takes hours, literally.
1711 # So we just punt and use a minimum line length of 8192.
1712 lt_cv_sys_max_cmd_len=8192;
1713 ;;
1714
1715 bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
1716 # This has been around since 386BSD, at least. Likely further.
1717 if test -x /sbin/sysctl; then
1718 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1719 elif test -x /usr/sbin/sysctl; then
1720 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1721 else
1722 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1723 fi
1724 # And add a safety zone
1725 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1726 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1727 ;;
1728
1729 interix*)
1730 # We know the value 262144 and hardcode it with a safety zone (like BSD)
1731 lt_cv_sys_max_cmd_len=196608
1732 ;;
1733
1734 os2*)
1735 # The test takes a long time on OS/2.
1736 lt_cv_sys_max_cmd_len=8192
1737 ;;
1738
1739 osf*)
1740 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1741 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1742 # nice to cause kernel panics so lets avoid the loop below.
1743 # First set a reasonable default.
1744 lt_cv_sys_max_cmd_len=16384
1745 #
1746 if test -x /sbin/sysconfig; then
1747 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1748 *1*) lt_cv_sys_max_cmd_len=-1 ;;
1749 esac
1750 fi
1751 ;;
1752 sco3.2v5*)
1753 lt_cv_sys_max_cmd_len=102400
1754 ;;
1755 sysv5* | sco5v6* | sysv4.2uw2*)
1756 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1757 if test -n "$kargmax"; then
1758 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
1759 else
1760 lt_cv_sys_max_cmd_len=32768
1761 fi
1762 ;;
1763 *)
1764 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1765 if test -n "$lt_cv_sys_max_cmd_len" && \
1766 test undefined != "$lt_cv_sys_max_cmd_len"; then
1767 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1768 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1769 else
1770 # Make teststring a little bigger before we do anything with it.
1771 # a 1K string should be a reasonable start.
1772 for i in 1 2 3 4 5 6 7 8; do
1773 teststring=$teststring$teststring
1774 done
1775 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1776 # If test is not a shell built-in, we'll probably end up computing a
1777 # maximum length that is only half of the actual maximum length, but
1778 # we can't tell.
1779 while { test X`env echo "$teststring$teststring" 2>/dev/null` \
1780 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
1781 test 17 != "$i" # 1/2 MB should be enough
1782 do
1783 i=`expr $i + 1`
1784 teststring=$teststring$teststring
1785 done
1786 # Only check the string length outside the loop.
1787 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1788 teststring=
1789 # Add a significant safety factor because C++ compilers can tack on
1790 # massive amounts of additional arguments before passing them to the
1791 # linker. It appears as though 1/2 is a usable value.
1792 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1793 fi
1794 ;;
1795 esac
1796 ])
1797 if test -n "$lt_cv_sys_max_cmd_len"; then
1798 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1799 else
1800 AC_MSG_RESULT(none)
1801 fi
1802 max_cmd_len=$lt_cv_sys_max_cmd_len
1803 _LT_DECL([], [max_cmd_len], [0],
1804 [What is the maximum length of a command?])
1805 ])# LT_CMD_MAX_LEN
1806
1807 # Old name:
1808 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1809 dnl aclocal-1.4 backwards compatibility:
1810 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1811
1812
1813 # _LT_HEADER_DLFCN
1814 # ----------------
1815 m4_defun([_LT_HEADER_DLFCN],
1816 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1817 ])# _LT_HEADER_DLFCN
1818
1819
1820 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1821 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1822 # ----------------------------------------------------------------
1823 m4_defun([_LT_TRY_DLOPEN_SELF],
1824 [m4_require([_LT_HEADER_DLFCN])dnl
1825 if test yes = "$cross_compiling"; then :
1826 [$4]
1827 else
1828 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1829 lt_status=$lt_dlunknown
1830 cat > conftest.$ac_ext <<_LT_EOF
1831 [#line $LINENO "configure"
1832 #include "confdefs.h"
1833
1834 #if HAVE_DLFCN_H
1835 #include <dlfcn.h>
1836 #endif
1837
1838 #include <stdio.h>
1839
1840 #ifdef RTLD_GLOBAL
1841 # define LT_DLGLOBAL RTLD_GLOBAL
1842 #else
1843 # ifdef DL_GLOBAL
1844 # define LT_DLGLOBAL DL_GLOBAL
1845 # else
1846 # define LT_DLGLOBAL 0
1847 # endif
1848 #endif
1849
1850 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1851 find out it does not work in some platform. */
1852 #ifndef LT_DLLAZY_OR_NOW
1853 # ifdef RTLD_LAZY
1854 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1855 # else
1856 # ifdef DL_LAZY
1857 # define LT_DLLAZY_OR_NOW DL_LAZY
1858 # else
1859 # ifdef RTLD_NOW
1860 # define LT_DLLAZY_OR_NOW RTLD_NOW
1861 # else
1862 # ifdef DL_NOW
1863 # define LT_DLLAZY_OR_NOW DL_NOW
1864 # else
1865 # define LT_DLLAZY_OR_NOW 0
1866 # endif
1867 # endif
1868 # endif
1869 # endif
1870 #endif
1871
1872 /* When -fvisibility=hidden is used, assume the code has been annotated
1873 correspondingly for the symbols needed. */
1874 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
1875 int fnord () __attribute__((visibility("default")));
1876 #endif
1877
1878 int fnord () { return 42; }
1879 int main ()
1880 {
1881 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1882 int status = $lt_dlunknown;
1883
1884 if (self)
1885 {
1886 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1887 else
1888 {
1889 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1890 else puts (dlerror ());
1891 }
1892 /* dlclose (self); */
1893 }
1894 else
1895 puts (dlerror ());
1896
1897 return status;
1898 }]
1899 _LT_EOF
1900 if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
1901 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1902 lt_status=$?
1903 case x$lt_status in
1904 x$lt_dlno_uscore) $1 ;;
1905 x$lt_dlneed_uscore) $2 ;;
1906 x$lt_dlunknown|x*) $3 ;;
1907 esac
1908 else :
1909 # compilation failed
1910 $3
1911 fi
1912 fi
1913 rm -fr conftest*
1914 ])# _LT_TRY_DLOPEN_SELF
1915
1916
1917 # LT_SYS_DLOPEN_SELF
1918 # ------------------
1919 AC_DEFUN([LT_SYS_DLOPEN_SELF],
1920 [m4_require([_LT_HEADER_DLFCN])dnl
1921 if test yes != "$enable_dlopen"; then
1922 enable_dlopen=unknown
1923 enable_dlopen_self=unknown
1924 enable_dlopen_self_static=unknown
1925 else
1926 lt_cv_dlopen=no
1927 lt_cv_dlopen_libs=
1928
1929 case $host_os in
1930 beos*)
1931 lt_cv_dlopen=load_add_on
1932 lt_cv_dlopen_libs=
1933 lt_cv_dlopen_self=yes
1934 ;;
1935
1936 mingw* | pw32* | cegcc*)
1937 lt_cv_dlopen=LoadLibrary
1938 lt_cv_dlopen_libs=
1939 ;;
1940
1941 cygwin*)
1942 lt_cv_dlopen=dlopen
1943 lt_cv_dlopen_libs=
1944 ;;
1945
1946 darwin*)
1947 # if libdl is installed we need to link against it
1948 AC_CHECK_LIB([dl], [dlopen],
1949 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
1950 lt_cv_dlopen=dyld
1951 lt_cv_dlopen_libs=
1952 lt_cv_dlopen_self=yes
1953 ])
1954 ;;
1955
1956 tpf*)
1957 # Don't try to run any link tests for TPF. We know it's impossible
1958 # because TPF is a cross-compiler, and we know how we open DSOs.
1959 lt_cv_dlopen=dlopen
1960 lt_cv_dlopen_libs=
1961 lt_cv_dlopen_self=no
1962 ;;
1963
1964 *)
1965 AC_CHECK_FUNC([shl_load],
1966 [lt_cv_dlopen=shl_load],
1967 [AC_CHECK_LIB([dld], [shl_load],
1968 [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
1969 [AC_CHECK_FUNC([dlopen],
1970 [lt_cv_dlopen=dlopen],
1971 [AC_CHECK_LIB([dl], [dlopen],
1972 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
1973 [AC_CHECK_LIB([svld], [dlopen],
1974 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
1975 [AC_CHECK_LIB([dld], [dld_link],
1976 [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
1977 ])
1978 ])
1979 ])
1980 ])
1981 ])
1982 ;;
1983 esac
1984
1985 if test no = "$lt_cv_dlopen"; then
1986 enable_dlopen=no
1987 else
1988 enable_dlopen=yes
1989 fi
1990
1991 case $lt_cv_dlopen in
1992 dlopen)
1993 save_CPPFLAGS=$CPPFLAGS
1994 test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1995
1996 save_LDFLAGS=$LDFLAGS
1997 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1998
1999 save_LIBS=$LIBS
2000 LIBS="$lt_cv_dlopen_libs $LIBS"
2001
2002 AC_CACHE_CHECK([whether a program can dlopen itself],
2003 lt_cv_dlopen_self, [dnl
2004 _LT_TRY_DLOPEN_SELF(
2005 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2006 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2007 ])
2008
2009 if test yes = "$lt_cv_dlopen_self"; then
2010 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2011 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2012 lt_cv_dlopen_self_static, [dnl
2013 _LT_TRY_DLOPEN_SELF(
2014 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2015 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
2016 ])
2017 fi
2018
2019 CPPFLAGS=$save_CPPFLAGS
2020 LDFLAGS=$save_LDFLAGS
2021 LIBS=$save_LIBS
2022 ;;
2023 esac
2024
2025 case $lt_cv_dlopen_self in
2026 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2027 *) enable_dlopen_self=unknown ;;
2028 esac
2029
2030 case $lt_cv_dlopen_self_static in
2031 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2032 *) enable_dlopen_self_static=unknown ;;
2033 esac
2034 fi
2035 _LT_DECL([dlopen_support], [enable_dlopen], [0],
2036 [Whether dlopen is supported])
2037 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2038 [Whether dlopen of programs is supported])
2039 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2040 [Whether dlopen of statically linked programs is supported])
2041 ])# LT_SYS_DLOPEN_SELF
2042
2043 # Old name:
2044 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2045 dnl aclocal-1.4 backwards compatibility:
2046 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2047
2048
2049 # _LT_COMPILER_C_O([TAGNAME])
2050 # ---------------------------
2051 # Check to see if options -c and -o are simultaneously supported by compiler.
2052 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
2053 m4_defun([_LT_COMPILER_C_O],
2054 [m4_require([_LT_DECL_SED])dnl
2055 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2056 m4_require([_LT_TAG_COMPILER])dnl
2057 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2058 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2059 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2060 $RM -r conftest 2>/dev/null
2061 mkdir conftest
2062 cd conftest
2063 mkdir out
2064 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2065
2066 lt_compiler_flag="-o out/conftest2.$ac_objext"
2067 # Insert the option either (1) after the last *FLAGS variable, or
2068 # (2) before a word containing "conftest.", or (3) at the end.
2069 # Note that $ac_compile itself does not contain backslashes and begins
2070 # with a dollar sign (not a hyphen), so the echo should work correctly.
2071 lt_compile=`echo "$ac_compile" | $SED \
2072 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2073 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2074 -e 's:$: $lt_compiler_flag:'`
2075 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2076 (eval "$lt_compile" 2>out/conftest.err)
2077 ac_status=$?
2078 cat out/conftest.err >&AS_MESSAGE_LOG_FD
2079 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2080 if (exit $ac_status) && test -s out/conftest2.$ac_objext
2081 then
2082 # The compiler can only warn and ignore the option if not recognized
2083 # So say no if there are warnings
2084 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
2085 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2086 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2087 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2088 fi
2089 fi
2090 chmod u+w . 2>&AS_MESSAGE_LOG_FD
2091 $RM conftest*
2092 # SGI C++ compiler will create directory out/ii_files/ for
2093 # template instantiation
2094 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2095 $RM out/* && rmdir out
2096 cd ..
2097 $RM -r conftest
2098 $RM conftest*
2099 ])
2100 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2101 [Does compiler simultaneously support -c and -o options?])
2102 ])# _LT_COMPILER_C_O
2103
2104
2105 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
2106 # ----------------------------------
2107 # Check to see if we can do hard links to lock some files if needed
2108 m4_defun([_LT_COMPILER_FILE_LOCKS],
2109 [m4_require([_LT_ENABLE_LOCK])dnl
2110 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2111 _LT_COMPILER_C_O([$1])
2112
2113 hard_links=nottested
2114 if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
2115 # do not overwrite the value of need_locks provided by the user
2116 AC_MSG_CHECKING([if we can lock with hard links])
2117 hard_links=yes
2118 $RM conftest*
2119 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2120 touch conftest.a
2121 ln conftest.a conftest.b 2>&5 || hard_links=no
2122 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2123 AC_MSG_RESULT([$hard_links])
2124 if test no = "$hard_links"; then
2125 AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
2126 need_locks=warn
2127 fi
2128 else
2129 need_locks=no
2130 fi
2131 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2132 ])# _LT_COMPILER_FILE_LOCKS
2133
2134
2135 # _LT_CHECK_OBJDIR
2136 # ----------------
2137 m4_defun([_LT_CHECK_OBJDIR],
2138 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2139 [rm -f .libs 2>/dev/null
2140 mkdir .libs 2>/dev/null
2141 if test -d .libs; then
2142 lt_cv_objdir=.libs
2143 else
2144 # MS-DOS does not allow filenames that begin with a dot.
2145 lt_cv_objdir=_libs
2146 fi
2147 rmdir .libs 2>/dev/null])
2148 objdir=$lt_cv_objdir
2149 _LT_DECL([], [objdir], [0],
2150 [The name of the directory that contains temporary libtool files])dnl
2151 m4_pattern_allow([LT_OBJDIR])dnl
2152 AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
2153 [Define to the sub-directory where libtool stores uninstalled libraries.])
2154 ])# _LT_CHECK_OBJDIR
2155
2156
2157 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2158 # --------------------------------------
2159 # Check hardcoding attributes.
2160 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2161 [AC_MSG_CHECKING([how to hardcode library paths into programs])
2162 _LT_TAGVAR(hardcode_action, $1)=
2163 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2164 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2165 test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
2166
2167 # We can hardcode non-existent directories.
2168 if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
2169 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2170 # have to relink, otherwise we might link with an installed library
2171 # when we should be linking with a yet-to-be-installed one
2172 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
2173 test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
2174 # Linking always hardcodes the temporary library directory.
2175 _LT_TAGVAR(hardcode_action, $1)=relink
2176 else
2177 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2178 _LT_TAGVAR(hardcode_action, $1)=immediate
2179 fi
2180 else
2181 # We cannot hardcode anything, or else we can only hardcode existing
2182 # directories.
2183 _LT_TAGVAR(hardcode_action, $1)=unsupported
2184 fi
2185 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2186
2187 if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
2188 test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
2189 # Fast installation is not supported
2190 enable_fast_install=no
2191 elif test yes = "$shlibpath_overrides_runpath" ||
2192 test no = "$enable_shared"; then
2193 # Fast installation is not necessary
2194 enable_fast_install=needless
2195 fi
2196 _LT_TAGDECL([], [hardcode_action], [0],
2197 [How to hardcode a shared library path into an executable])
2198 ])# _LT_LINKER_HARDCODE_LIBPATH
2199
2200
2201 # _LT_CMD_STRIPLIB
2202 # ----------------
2203 m4_defun([_LT_CMD_STRIPLIB],
2204 [m4_require([_LT_DECL_EGREP])
2205 striplib=
2206 old_striplib=
2207 AC_MSG_CHECKING([whether stripping libraries is possible])
2208 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2209 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2210 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2211 AC_MSG_RESULT([yes])
2212 else
2213 # FIXME - insert some real tests, host_os isn't really good enough
2214 case $host_os in
2215 darwin*)
2216 if test -n "$STRIP"; then
2217 striplib="$STRIP -x"
2218 old_striplib="$STRIP -S"
2219 AC_MSG_RESULT([yes])
2220 else
2221 AC_MSG_RESULT([no])
2222 fi
2223 ;;
2224 *)
2225 AC_MSG_RESULT([no])
2226 ;;
2227 esac
2228 fi
2229 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2230 _LT_DECL([], [striplib], [1])
2231 ])# _LT_CMD_STRIPLIB
2232
2233
2234 # _LT_PREPARE_MUNGE_PATH_LIST
2235 # ---------------------------
2236 # Make sure func_munge_path_list() is defined correctly.
2237 m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
2238 [[# func_munge_path_list VARIABLE PATH
2239 # -----------------------------------
2240 # VARIABLE is name of variable containing _space_ separated list of
2241 # directories to be munged by the contents of PATH, which is string
2242 # having a format:
2243 # "DIR[:DIR]:"
2244 # string "DIR[ DIR]" will be prepended to VARIABLE
2245 # ":DIR[:DIR]"
2246 # string "DIR[ DIR]" will be appended to VARIABLE
2247 # "DIRP[:DIRP]::[DIRA:]DIRA"
2248 # string "DIRP[ DIRP]" will be prepended to VARIABLE and string
2249 # "DIRA[ DIRA]" will be appended to VARIABLE
2250 # "DIR[:DIR]"
2251 # VARIABLE will be replaced by "DIR[ DIR]"
2252 func_munge_path_list ()
2253 {
2254 case x@S|@2 in
2255 x)
2256 ;;
2257 *:)
2258 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
2259 ;;
2260 x:*)
2261 eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
2262 ;;
2263 *::*)
2264 eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
2265 eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
2266 ;;
2267 *)
2268 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
2269 ;;
2270 esac
2271 }
2272 ]])# _LT_PREPARE_PATH_LIST
2273
2274
2275 # _LT_SYS_DYNAMIC_LINKER([TAG])
2276 # -----------------------------
2277 # PORTME Fill in your ld.so characteristics
2278 m4_defun([_LT_SYS_DYNAMIC_LINKER],
2279 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2280 m4_require([_LT_DECL_EGREP])dnl
2281 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2282 m4_require([_LT_DECL_OBJDUMP])dnl
2283 m4_require([_LT_DECL_SED])dnl
2284 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2285 m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
2286 AC_MSG_CHECKING([dynamic linker characteristics])
2287 m4_if([$1],
2288 [], [
2289 if test yes = "$GCC"; then
2290 case $host_os in
2291 darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
2292 *) lt_awk_arg='/^libraries:/' ;;
2293 esac
2294 case $host_os in
2295 mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
2296 *) lt_sed_strip_eq='s|=/|/|g' ;;
2297 esac
2298 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
2299 case $lt_search_path_spec in
2300 *\;*)
2301 # if the path contains ";" then we assume it to be the separator
2302 # otherwise default to the standard path separator (i.e. ":") - it is
2303 # assumed that no part of a normal pathname contains ";" but that should
2304 # okay in the real world where ";" in dirpaths is itself problematic.
2305 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
2306 ;;
2307 *)
2308 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
2309 ;;
2310 esac
2311 # Ok, now we have the path, separated by spaces, we can step through it
2312 # and add multilib dir if necessary...
2313 lt_tmp_lt_search_path_spec=
2314 lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2315 # ...but if some path component already ends with the multilib dir we assume
2316 # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
2317 case "$lt_multi_os_dir; $lt_search_path_spec " in
2318 "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
2319 lt_multi_os_dir=
2320 ;;
2321 esac
2322 for lt_sys_path in $lt_search_path_spec; do
2323 if test -d "$lt_sys_path$lt_multi_os_dir"; then
2324 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
2325 elif test -n "$lt_multi_os_dir"; then
2326 test -d "$lt_sys_path" && \
2327 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2328 fi
2329 done
2330 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
2331 BEGIN {RS = " "; FS = "/|\n";} {
2332 lt_foo = "";
2333 lt_count = 0;
2334 for (lt_i = NF; lt_i > 0; lt_i--) {
2335 if ($lt_i != "" && $lt_i != ".") {
2336 if ($lt_i == "..") {
2337 lt_count++;
2338 } else {
2339 if (lt_count == 0) {
2340 lt_foo = "/" $lt_i lt_foo;
2341 } else {
2342 lt_count--;
2343 }
2344 }
2345 }
2346 }
2347 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2348 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2349 }'`
2350 # AWK program above erroneously prepends '/' to C:/dos/paths
2351 # for these hosts.
2352 case $host_os in
2353 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
2354 $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
2355 esac
2356 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
2357 else
2358 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2359 fi])
2360 library_names_spec=
2361 libname_spec='lib$name'
2362 soname_spec=
2363 shrext_cmds=.so
2364 postinstall_cmds=
2365 postuninstall_cmds=
2366 finish_cmds=
2367 finish_eval=
2368 shlibpath_var=
2369 shlibpath_overrides_runpath=unknown
2370 version_type=none
2371 dynamic_linker="$host_os ld.so"
2372 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2373 need_lib_prefix=unknown
2374 hardcode_into_libs=no
2375
2376 # when you set need_version to no, make sure it does not cause -set_version
2377 # flags to be left without arguments
2378 need_version=unknown
2379
2380 AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
2381 [User-defined run-time library search path.])
2382
2383 case $host_os in
2384 aix3*)
2385 version_type=linux # correct to gnu/linux during the next big refactor
2386 library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
2387 shlibpath_var=LIBPATH
2388
2389 # AIX 3 has no versioning support, so we append a major version to the name.
2390 soname_spec='$libname$release$shared_ext$major'
2391 ;;
2392
2393 aix[[4-9]]*)
2394 version_type=linux # correct to gnu/linux during the next big refactor
2395 need_lib_prefix=no
2396 need_version=no
2397 hardcode_into_libs=yes
2398 if test ia64 = "$host_cpu"; then
2399 # AIX 5 supports IA64
2400 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
2401 shlibpath_var=LD_LIBRARY_PATH
2402 else
2403 # With GCC up to 2.95.x, collect2 would create an import file
2404 # for dependence libraries. The import file would start with
2405 # the line '#! .'. This would cause the generated library to
2406 # depend on '.', always an invalid library. This was fixed in
2407 # development snapshots of GCC prior to 3.0.
2408 case $host_os in
2409 aix4 | aix4.[[01]] | aix4.[[01]].*)
2410 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2411 echo ' yes '
2412 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
2413 :
2414 else
2415 can_build_shared=no
2416 fi
2417 ;;
2418 esac
2419 # Using Import Files as archive members, it is possible to support
2420 # filename-based versioning of shared library archives on AIX. While
2421 # this would work for both with and without runtime linking, it will
2422 # prevent static linking of such archives. So we do filename-based
2423 # shared library versioning with .so extension only, which is used
2424 # when both runtime linking and shared linking is enabled.
2425 # Unfortunately, runtime linking may impact performance, so we do
2426 # not want this to be the default eventually. Also, we use the
2427 # versioned .so libs for executables only if there is the -brtl
2428 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
2429 # To allow for filename-based versioning support, we need to create
2430 # libNAME.so.V as an archive file, containing:
2431 # *) an Import File, referring to the versioned filename of the
2432 # archive as well as the shared archive member, telling the
2433 # bitwidth (32 or 64) of that shared object, and providing the
2434 # list of exported symbols of that shared object, eventually
2435 # decorated with the 'weak' keyword
2436 # *) the shared object with the F_LOADONLY flag set, to really avoid
2437 # it being seen by the linker.
2438 # At run time we better use the real file rather than another symlink,
2439 # but for link time we create the symlink libNAME.so -> libNAME.so.V
2440
2441 case $with_aix_soname,$aix_use_runtimelinking in
2442 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
2443 # soname into executable. Probably we can add versioning support to
2444 # collect2, so additional links can be useful in future.
2445 aix,yes) # traditional libtool
2446 dynamic_linker='AIX unversionable lib.so'
2447 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2448 # instead of lib<name>.a to let people know that these are not
2449 # typical AIX shared libraries.
2450 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2451 ;;
2452 aix,no) # traditional AIX only
2453 dynamic_linker='AIX lib.a[(]lib.so.V[)]'
2454 # We preserve .a as extension for shared libraries through AIX4.2
2455 # and later when we are not doing run time linking.
2456 library_names_spec='$libname$release.a $libname.a'
2457 soname_spec='$libname$release$shared_ext$major'
2458 ;;
2459 svr4,*) # full svr4 only
2460 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
2461 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
2462 # We do not specify a path in Import Files, so LIBPATH fires.
2463 shlibpath_overrides_runpath=yes
2464 ;;
2465 *,yes) # both, prefer svr4
2466 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
2467 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
2468 # unpreferred sharedlib libNAME.a needs extra handling
2469 postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
2470 postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
2471 # We do not specify a path in Import Files, so LIBPATH fires.
2472 shlibpath_overrides_runpath=yes
2473 ;;
2474 *,no) # both, prefer aix
2475 dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
2476 library_names_spec='$libname$release.a $libname.a'
2477 soname_spec='$libname$release$shared_ext$major'
2478 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
2479 postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
2480 postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
2481 ;;
2482 esac
2483 shlibpath_var=LIBPATH
2484 fi
2485 ;;
2486
2487 amigaos*)
2488 case $host_cpu in
2489 powerpc)
2490 # Since July 2007 AmigaOS4 officially supports .so libraries.
2491 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2492 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2493 ;;
2494 m68k)
2495 library_names_spec='$libname.ixlibrary $libname.a'
2496 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2497 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $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'
2498 ;;
2499 esac
2500 ;;
2501
2502 beos*)
2503 library_names_spec='$libname$shared_ext'
2504 dynamic_linker="$host_os ld.so"
2505 shlibpath_var=LIBRARY_PATH
2506 ;;
2507
2508 bsdi[[45]]*)
2509 version_type=linux # correct to gnu/linux during the next big refactor
2510 need_version=no
2511 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2512 soname_spec='$libname$release$shared_ext$major'
2513 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2514 shlibpath_var=LD_LIBRARY_PATH
2515 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2516 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2517 # the default ld.so.conf also contains /usr/contrib/lib and
2518 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2519 # libtool to hard-code these into programs
2520 ;;
2521
2522 cygwin* | mingw* | pw32* | cegcc*)
2523 version_type=windows
2524 shrext_cmds=.dll
2525 need_version=no
2526 need_lib_prefix=no
2527
2528 case $GCC,$cc_basename in
2529 yes,*)
2530 # gcc
2531 library_names_spec='$libname.dll.a'
2532 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2533 postinstall_cmds='base_file=`basename \$file`~
2534 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
2535 dldir=$destdir/`dirname \$dlpath`~
2536 test -d \$dldir || mkdir -p \$dldir~
2537 $install_prog $dir/$dlname \$dldir/$dlname~
2538 chmod a+x \$dldir/$dlname~
2539 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2540 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2541 fi'
2542 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2543 dlpath=$dir/\$dldll~
2544 $RM \$dlpath'
2545 shlibpath_overrides_runpath=yes
2546
2547 case $host_os in
2548 cygwin*)
2549 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2550 soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2551 m4_if([$1], [],[
2552 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
2553 ;;
2554 mingw* | cegcc*)
2555 # MinGW DLLs use traditional 'lib' prefix
2556 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2557 ;;
2558 pw32*)
2559 # pw32 DLLs use 'pw' prefix rather than 'lib'
2560 library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2561 ;;
2562 esac
2563 dynamic_linker='Win32 ld.exe'
2564 ;;
2565
2566 *,cl*)
2567 # Native MSVC
2568 libname_spec='$name'
2569 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2570 library_names_spec='$libname.dll.lib'
2571
2572 case $build_os in
2573 mingw*)
2574 sys_lib_search_path_spec=
2575 lt_save_ifs=$IFS
2576 IFS=';'
2577 for lt_path in $LIB
2578 do
2579 IFS=$lt_save_ifs
2580 # Let DOS variable expansion print the short 8.3 style file name.
2581 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
2582 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
2583 done
2584 IFS=$lt_save_ifs
2585 # Convert to MSYS style.
2586 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
2587 ;;
2588 cygwin*)
2589 # Convert to unix form, then to dos form, then back to unix form
2590 # but this time dos style (no spaces!) so that the unix form looks
2591 # like /cygdrive/c/PROGRA~1:/cygdr...
2592 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
2593 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
2594 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2595 ;;
2596 *)
2597 sys_lib_search_path_spec=$LIB
2598 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2599 # It is most probably a Windows format PATH.
2600 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2601 else
2602 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2603 fi
2604 # FIXME: find the short name or the path components, as spaces are
2605 # common. (e.g. "Program Files" -> "PROGRA~1")
2606 ;;
2607 esac
2608
2609 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2610 postinstall_cmds='base_file=`basename \$file`~
2611 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
2612 dldir=$destdir/`dirname \$dlpath`~
2613 test -d \$dldir || mkdir -p \$dldir~
2614 $install_prog $dir/$dlname \$dldir/$dlname'
2615 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2616 dlpath=$dir/\$dldll~
2617 $RM \$dlpath'
2618 shlibpath_overrides_runpath=yes
2619 dynamic_linker='Win32 link.exe'
2620 ;;
2621
2622 *)
2623 # Assume MSVC wrapper
2624 library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
2625 dynamic_linker='Win32 ld.exe'
2626 ;;
2627 esac
2628 # FIXME: first we should search . and the directory the executable is in
2629 shlibpath_var=PATH
2630 ;;
2631
2632 darwin* | rhapsody*)
2633 dynamic_linker="$host_os dyld"
2634 version_type=darwin
2635 need_lib_prefix=no
2636 need_version=no
2637 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
2638 soname_spec='$libname$release$major$shared_ext'
2639 shlibpath_overrides_runpath=yes
2640 shlibpath_var=DYLD_LIBRARY_PATH
2641 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2642 m4_if([$1], [],[
2643 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2644 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2645 ;;
2646
2647 dgux*)
2648 version_type=linux # correct to gnu/linux during the next big refactor
2649 need_lib_prefix=no
2650 need_version=no
2651 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2652 soname_spec='$libname$release$shared_ext$major'
2653 shlibpath_var=LD_LIBRARY_PATH
2654 ;;
2655
2656 freebsd* | dragonfly*)
2657 # DragonFly does not have aout. When/if they implement a new
2658 # versioning mechanism, adjust this.
2659 if test -x /usr/bin/objformat; then
2660 objformat=`/usr/bin/objformat`
2661 else
2662 case $host_os in
2663 freebsd[[23]].*) objformat=aout ;;
2664 *) objformat=elf ;;
2665 esac
2666 fi
2667 version_type=freebsd-$objformat
2668 case $version_type in
2669 freebsd-elf*)
2670 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2671 soname_spec='$libname$release$shared_ext$major'
2672 need_version=no
2673 need_lib_prefix=no
2674 ;;
2675 freebsd-*)
2676 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2677 need_version=yes
2678 ;;
2679 esac
2680 shlibpath_var=LD_LIBRARY_PATH
2681 case $host_os in
2682 freebsd2.*)
2683 shlibpath_overrides_runpath=yes
2684 ;;
2685 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2686 shlibpath_overrides_runpath=yes
2687 hardcode_into_libs=yes
2688 ;;
2689 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2690 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2691 shlibpath_overrides_runpath=no
2692 hardcode_into_libs=yes
2693 ;;
2694 *) # from 4.6 on, and DragonFly
2695 shlibpath_overrides_runpath=yes
2696 hardcode_into_libs=yes
2697 ;;
2698 esac
2699 ;;
2700
2701 haiku*)
2702 version_type=linux # correct to gnu/linux during the next big refactor
2703 need_lib_prefix=no
2704 need_version=no
2705 dynamic_linker="$host_os runtime_loader"
2706 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2707 soname_spec='$libname$release$shared_ext$major'
2708 shlibpath_var=LIBRARY_PATH
2709 shlibpath_overrides_runpath=no
2710 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
2711 hardcode_into_libs=yes
2712 ;;
2713
2714 hpux9* | hpux10* | hpux11*)
2715 # Give a soname corresponding to the major version so that dld.sl refuses to
2716 # link against other versions.
2717 version_type=sunos
2718 need_lib_prefix=no
2719 need_version=no
2720 case $host_cpu in
2721 ia64*)
2722 shrext_cmds='.so'
2723 hardcode_into_libs=yes
2724 dynamic_linker="$host_os dld.so"
2725 shlibpath_var=LD_LIBRARY_PATH
2726 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2727 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2728 soname_spec='$libname$release$shared_ext$major'
2729 if test 32 = "$HPUX_IA64_MODE"; then
2730 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2731 sys_lib_dlsearch_path_spec=/usr/lib/hpux32
2732 else
2733 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2734 sys_lib_dlsearch_path_spec=/usr/lib/hpux64
2735 fi
2736 ;;
2737 hppa*64*)
2738 shrext_cmds='.sl'
2739 hardcode_into_libs=yes
2740 dynamic_linker="$host_os dld.sl"
2741 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2742 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2743 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2744 soname_spec='$libname$release$shared_ext$major'
2745 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2746 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2747 ;;
2748 *)
2749 shrext_cmds='.sl'
2750 dynamic_linker="$host_os dld.sl"
2751 shlibpath_var=SHLIB_PATH
2752 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2753 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2754 soname_spec='$libname$release$shared_ext$major'
2755 ;;
2756 esac
2757 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
2758 postinstall_cmds='chmod 555 $lib'
2759 # or fails outright, so override atomically:
2760 install_override_mode=555
2761 ;;
2762
2763 interix[[3-9]]*)
2764 version_type=linux # correct to gnu/linux during the next big refactor
2765 need_lib_prefix=no
2766 need_version=no
2767 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2768 soname_spec='$libname$release$shared_ext$major'
2769 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2770 shlibpath_var=LD_LIBRARY_PATH
2771 shlibpath_overrides_runpath=no
2772 hardcode_into_libs=yes
2773 ;;
2774
2775 irix5* | irix6* | nonstopux*)
2776 case $host_os in
2777 nonstopux*) version_type=nonstopux ;;
2778 *)
2779 if test yes = "$lt_cv_prog_gnu_ld"; then
2780 version_type=linux # correct to gnu/linux during the next big refactor
2781 else
2782 version_type=irix
2783 fi ;;
2784 esac
2785 need_lib_prefix=no
2786 need_version=no
2787 soname_spec='$libname$release$shared_ext$major'
2788 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
2789 case $host_os in
2790 irix5* | nonstopux*)
2791 libsuff= shlibsuff=
2792 ;;
2793 *)
2794 case $LD in # libtool.m4 will add one of these switches to LD
2795 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2796 libsuff= shlibsuff= libmagic=32-bit;;
2797 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2798 libsuff=32 shlibsuff=N32 libmagic=N32;;
2799 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2800 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2801 *) libsuff= shlibsuff= libmagic=never-match;;
2802 esac
2803 ;;
2804 esac
2805 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2806 shlibpath_overrides_runpath=no
2807 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
2808 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
2809 hardcode_into_libs=yes
2810 ;;
2811
2812 # No shared lib support for Linux oldld, aout, or coff.
2813 linux*oldld* | linux*aout* | linux*coff*)
2814 dynamic_linker=no
2815 ;;
2816
2817 linux*android*)
2818 version_type=none # Android doesn't support versioned libraries.
2819 need_lib_prefix=no
2820 need_version=no
2821 library_names_spec='$libname$release$shared_ext'
2822 soname_spec='$libname$release$shared_ext'
2823 finish_cmds=
2824 shlibpath_var=LD_LIBRARY_PATH
2825 shlibpath_overrides_runpath=yes
2826
2827 # This implies no fast_install, which is unacceptable.
2828 # Some rework will be needed to allow for fast_install
2829 # before this can be enabled.
2830 hardcode_into_libs=yes
2831
2832 dynamic_linker='Android linker'
2833 # Don't embed -rpath directories since the linker doesn't support them.
2834 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2835 ;;
2836
2837 # This must be glibc/ELF.
2838 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
2839 version_type=linux # correct to gnu/linux during the next big refactor
2840 need_lib_prefix=no
2841 need_version=no
2842 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2843 soname_spec='$libname$release$shared_ext$major'
2844 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2845 shlibpath_var=LD_LIBRARY_PATH
2846 shlibpath_overrides_runpath=no
2847
2848 # Some binutils ld are patched to set DT_RUNPATH
2849 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
2850 [lt_cv_shlibpath_overrides_runpath=no
2851 save_LDFLAGS=$LDFLAGS
2852 save_libdir=$libdir
2853 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2854 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2855 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2856 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2857 [lt_cv_shlibpath_overrides_runpath=yes])])
2858 LDFLAGS=$save_LDFLAGS
2859 libdir=$save_libdir
2860 ])
2861 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
2862
2863 # This implies no fast_install, which is unacceptable.
2864 # Some rework will be needed to allow for fast_install
2865 # before this can be enabled.
2866 hardcode_into_libs=yes
2867
2868 # Ideally, we could use ldconfig to report *all* directores which are
2869 # searched for libraries, however this is still not possible. Aside from not
2870 # being certain /sbin/ldconfig is available, command
2871 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
2872 # even though it is searched at run-time. Try to do the best guess by
2873 # appending ld.so.conf contents (and includes) to the search path.
2874 if test -f /etc/ld.so.conf; then
2875 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' ' '`
2876 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2877 fi
2878
2879 # We used to test for /lib/ld.so.1 and disable shared libraries on
2880 # powerpc, because MkLinux only supported shared libraries with the
2881 # GNU dynamic linker. Since this was broken with cross compilers,
2882 # most powerpc-linux boxes support dynamic linking these days and
2883 # people can always --disable-shared, the test was removed, and we
2884 # assume the GNU/Linux dynamic linker is in use.
2885 dynamic_linker='GNU/Linux ld.so'
2886 ;;
2887
2888 netbsdelf*-gnu)
2889 version_type=linux
2890 need_lib_prefix=no
2891 need_version=no
2892 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2893 soname_spec='${libname}${release}${shared_ext}$major'
2894 shlibpath_var=LD_LIBRARY_PATH
2895 shlibpath_overrides_runpath=no
2896 hardcode_into_libs=yes
2897 dynamic_linker='NetBSD ld.elf_so'
2898 ;;
2899
2900 netbsd*)
2901 version_type=sunos
2902 need_lib_prefix=no
2903 need_version=no
2904 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2905 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2906 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2907 dynamic_linker='NetBSD (a.out) ld.so'
2908 else
2909 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2910 soname_spec='$libname$release$shared_ext$major'
2911 dynamic_linker='NetBSD ld.elf_so'
2912 fi
2913 shlibpath_var=LD_LIBRARY_PATH
2914 shlibpath_overrides_runpath=yes
2915 hardcode_into_libs=yes
2916 ;;
2917
2918 newsos6)
2919 version_type=linux # correct to gnu/linux during the next big refactor
2920 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2921 shlibpath_var=LD_LIBRARY_PATH
2922 shlibpath_overrides_runpath=yes
2923 ;;
2924
2925 *nto* | *qnx*)
2926 version_type=qnx
2927 need_lib_prefix=no
2928 need_version=no
2929 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2930 soname_spec='$libname$release$shared_ext$major'
2931 shlibpath_var=LD_LIBRARY_PATH
2932 shlibpath_overrides_runpath=no
2933 hardcode_into_libs=yes
2934 dynamic_linker='ldqnx.so'
2935 ;;
2936
2937 openbsd* | bitrig*)
2938 version_type=sunos
2939 sys_lib_dlsearch_path_spec=/usr/lib
2940 need_lib_prefix=no
2941 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
2942 need_version=no
2943 else
2944 need_version=yes
2945 fi
2946 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2947 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2948 shlibpath_var=LD_LIBRARY_PATH
2949 shlibpath_overrides_runpath=yes
2950 ;;
2951
2952 os2*)
2953 libname_spec='$name'
2954 version_type=windows
2955 shrext_cmds=.dll
2956 need_version=no
2957 need_lib_prefix=no
2958 # OS/2 can only load a DLL with a base name of 8 characters or less.
2959 soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
2960 v=$($ECHO $release$versuffix | tr -d .-);
2961 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
2962 $ECHO $n$v`$shared_ext'
2963 library_names_spec='${libname}_dll.$libext'
2964 dynamic_linker='OS/2 ld.exe'
2965 shlibpath_var=BEGINLIBPATH
2966 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2967 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2968 postinstall_cmds='base_file=`basename \$file`~
2969 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
2970 dldir=$destdir/`dirname \$dlpath`~
2971 test -d \$dldir || mkdir -p \$dldir~
2972 $install_prog $dir/$dlname \$dldir/$dlname~
2973 chmod a+x \$dldir/$dlname~
2974 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2975 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2976 fi'
2977 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
2978 dlpath=$dir/\$dldll~
2979 $RM \$dlpath'
2980 ;;
2981
2982 osf3* | osf4* | osf5*)
2983 version_type=osf
2984 need_lib_prefix=no
2985 need_version=no
2986 soname_spec='$libname$release$shared_ext$major'
2987 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2988 shlibpath_var=LD_LIBRARY_PATH
2989 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2990 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2991 ;;
2992
2993 rdos*)
2994 dynamic_linker=no
2995 ;;
2996
2997 solaris*)
2998 version_type=linux # correct to gnu/linux during the next big refactor
2999 need_lib_prefix=no
3000 need_version=no
3001 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3002 soname_spec='$libname$release$shared_ext$major'
3003 shlibpath_var=LD_LIBRARY_PATH
3004 shlibpath_overrides_runpath=yes
3005 hardcode_into_libs=yes
3006 # ldd complains unless libraries are executable
3007 postinstall_cmds='chmod +x $lib'
3008 ;;
3009
3010 sunos4*)
3011 version_type=sunos
3012 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
3013 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3014 shlibpath_var=LD_LIBRARY_PATH
3015 shlibpath_overrides_runpath=yes
3016 if test yes = "$with_gnu_ld"; then
3017 need_lib_prefix=no
3018 fi
3019 need_version=yes
3020 ;;
3021
3022 sysv4 | sysv4.3*)
3023 version_type=linux # correct to gnu/linux during the next big refactor
3024 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3025 soname_spec='$libname$release$shared_ext$major'
3026 shlibpath_var=LD_LIBRARY_PATH
3027 case $host_vendor in
3028 sni)
3029 shlibpath_overrides_runpath=no
3030 need_lib_prefix=no
3031 runpath_var=LD_RUN_PATH
3032 ;;
3033 siemens)
3034 need_lib_prefix=no
3035 ;;
3036 motorola)
3037 need_lib_prefix=no
3038 need_version=no
3039 shlibpath_overrides_runpath=no
3040 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3041 ;;
3042 esac
3043 ;;
3044
3045 sysv4*MP*)
3046 if test -d /usr/nec; then
3047 version_type=linux # correct to gnu/linux during the next big refactor
3048 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
3049 soname_spec='$libname$shared_ext.$major'
3050 shlibpath_var=LD_LIBRARY_PATH
3051 fi
3052 ;;
3053
3054 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3055 version_type=sco
3056 need_lib_prefix=no
3057 need_version=no
3058 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
3059 soname_spec='$libname$release$shared_ext$major'
3060 shlibpath_var=LD_LIBRARY_PATH
3061 shlibpath_overrides_runpath=yes
3062 hardcode_into_libs=yes
3063 if test yes = "$with_gnu_ld"; then
3064 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3065 else
3066 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3067 case $host_os in
3068 sco3.2v5*)
3069 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3070 ;;
3071 esac
3072 fi
3073 sys_lib_dlsearch_path_spec='/usr/lib'
3074 ;;
3075
3076 tpf*)
3077 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
3078 version_type=linux # correct to gnu/linux during the next big refactor
3079 need_lib_prefix=no
3080 need_version=no
3081 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3082 shlibpath_var=LD_LIBRARY_PATH
3083 shlibpath_overrides_runpath=no
3084 hardcode_into_libs=yes
3085 ;;
3086
3087 uts4*)
3088 version_type=linux # correct to gnu/linux during the next big refactor
3089 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3090 soname_spec='$libname$release$shared_ext$major'
3091 shlibpath_var=LD_LIBRARY_PATH
3092 ;;
3093
3094 *)
3095 dynamic_linker=no
3096 ;;
3097 esac
3098 AC_MSG_RESULT([$dynamic_linker])
3099 test no = "$dynamic_linker" && can_build_shared=no
3100
3101 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3102 if test yes = "$GCC"; then
3103 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3104 fi
3105
3106 if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
3107 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
3108 fi
3109
3110 if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
3111 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
3112 fi
3113
3114 # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
3115 configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
3116
3117 # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
3118 func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
3119
3120 # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
3121 configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
3122
3123 _LT_DECL([], [variables_saved_for_relink], [1],
3124 [Variables whose values should be saved in libtool wrapper scripts and
3125 restored at link time])
3126 _LT_DECL([], [need_lib_prefix], [0],
3127 [Do we need the "lib" prefix for modules?])
3128 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3129 _LT_DECL([], [version_type], [0], [Library versioning type])
3130 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
3131 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3132 _LT_DECL([], [shlibpath_overrides_runpath], [0],
3133 [Is shlibpath searched before the hard-coded library search path?])
3134 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3135 _LT_DECL([], [library_names_spec], [1],
3136 [[List of archive names. First name is the real one, the rest are links.
3137 The last name is the one that the linker finds with -lNAME]])
3138 _LT_DECL([], [soname_spec], [1],
3139 [[The coded name of the library, if different from the real name]])
3140 _LT_DECL([], [install_override_mode], [1],
3141 [Permission mode override for installation of shared libraries])
3142 _LT_DECL([], [postinstall_cmds], [2],
3143 [Command to use after installation of a shared archive])
3144 _LT_DECL([], [postuninstall_cmds], [2],
3145 [Command to use after uninstallation of a shared archive])
3146 _LT_DECL([], [finish_cmds], [2],
3147 [Commands used to finish a libtool library installation in a directory])
3148 _LT_DECL([], [finish_eval], [1],
3149 [[As "finish_cmds", except a single script fragment to be evaled but
3150 not shown]])
3151 _LT_DECL([], [hardcode_into_libs], [0],
3152 [Whether we should hardcode library paths into libraries])
3153 _LT_DECL([], [sys_lib_search_path_spec], [2],
3154 [Compile-time system search path for libraries])
3155 _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
3156 [Detected run-time system search path for libraries])
3157 _LT_DECL([], [configure_time_lt_sys_library_path], [2],
3158 [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
3159 ])# _LT_SYS_DYNAMIC_LINKER
3160
3161
3162 # _LT_PATH_TOOL_PREFIX(TOOL)
3163 # --------------------------
3164 # find a file program that can recognize shared library
3165 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3166 [m4_require([_LT_DECL_EGREP])dnl
3167 AC_MSG_CHECKING([for $1])
3168 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3169 [case $MAGIC_CMD in
3170 [[\\/*] | ?:[\\/]*])
3171 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
3172 ;;
3173 *)
3174 lt_save_MAGIC_CMD=$MAGIC_CMD
3175 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3176 dnl $ac_dummy forces splitting on constant user-supplied paths.
3177 dnl POSIX.2 word splitting is done only on the output of word expansions,
3178 dnl not every word. This closes a longstanding sh security hole.
3179 ac_dummy="m4_if([$2], , $PATH, [$2])"
3180 for ac_dir in $ac_dummy; do
3181 IFS=$lt_save_ifs
3182 test -z "$ac_dir" && ac_dir=.
3183 if test -f "$ac_dir/$1"; then
3184 lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
3185 if test -n "$file_magic_test_file"; then
3186 case $deplibs_check_method in
3187 "file_magic "*)
3188 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3189 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
3190 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3191 $EGREP "$file_magic_regex" > /dev/null; then
3192 :
3193 else
3194 cat <<_LT_EOF 1>&2
3195
3196 *** Warning: the command libtool uses to detect shared libraries,
3197 *** $file_magic_cmd, produces output that libtool cannot recognize.
3198 *** The result is that libtool may fail to recognize shared libraries
3199 *** as such. This will affect the creation of libtool libraries that
3200 *** depend on shared libraries, but programs linked with such libtool
3201 *** libraries will work regardless of this problem. Nevertheless, you
3202 *** may want to report the problem to your system manager and/or to
3203 *** bug-libtool@gnu.org
3204
3205 _LT_EOF
3206 fi ;;
3207 esac
3208 fi
3209 break
3210 fi
3211 done
3212 IFS=$lt_save_ifs
3213 MAGIC_CMD=$lt_save_MAGIC_CMD
3214 ;;
3215 esac])
3216 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
3217 if test -n "$MAGIC_CMD"; then
3218 AC_MSG_RESULT($MAGIC_CMD)
3219 else
3220 AC_MSG_RESULT(no)
3221 fi
3222 _LT_DECL([], [MAGIC_CMD], [0],
3223 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3224 ])# _LT_PATH_TOOL_PREFIX
3225
3226 # Old name:
3227 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3228 dnl aclocal-1.4 backwards compatibility:
3229 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3230
3231
3232 # _LT_PATH_MAGIC
3233 # --------------
3234 # find a file program that can recognize a shared library
3235 m4_defun([_LT_PATH_MAGIC],
3236 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3237 if test -z "$lt_cv_path_MAGIC_CMD"; then
3238 if test -n "$ac_tool_prefix"; then
3239 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3240 else
3241 MAGIC_CMD=:
3242 fi
3243 fi
3244 ])# _LT_PATH_MAGIC
3245
3246
3247 # LT_PATH_LD
3248 # ----------
3249 # find the pathname to the GNU or non-GNU linker
3250 AC_DEFUN([LT_PATH_LD],
3251 [AC_REQUIRE([AC_PROG_CC])dnl
3252 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3253 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3254 m4_require([_LT_DECL_SED])dnl
3255 m4_require([_LT_DECL_EGREP])dnl
3256 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
3257
3258 AC_ARG_WITH([gnu-ld],
3259 [AS_HELP_STRING([--with-gnu-ld],
3260 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
3261 [test no = "$withval" || with_gnu_ld=yes],
3262 [with_gnu_ld=no])dnl
3263
3264 ac_prog=ld
3265 if test yes = "$GCC"; then
3266 # Check if gcc -print-prog-name=ld gives a path.
3267 AC_MSG_CHECKING([for ld used by $CC])
3268 case $host in
3269 *-*-mingw*)
3270 # gcc leaves a trailing carriage return, which upsets mingw
3271 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3272 *)
3273 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3274 esac
3275 case $ac_prog in
3276 # Accept absolute paths.
3277 [[\\/]]* | ?:[[\\/]]*)
3278 re_direlt='/[[^/]][[^/]]*/\.\./'
3279 # Canonicalize the pathname of ld
3280 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3281 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3282 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3283 done
3284 test -z "$LD" && LD=$ac_prog
3285 ;;
3286 "")
3287 # If it fails, then pretend we aren't using GCC.
3288 ac_prog=ld
3289 ;;
3290 *)
3291 # If it is relative, then search for the first ld in PATH.
3292 with_gnu_ld=unknown
3293 ;;
3294 esac
3295 elif test yes = "$with_gnu_ld"; then
3296 AC_MSG_CHECKING([for GNU ld])
3297 else
3298 AC_MSG_CHECKING([for non-GNU ld])
3299 fi
3300 AC_CACHE_VAL(lt_cv_path_LD,
3301 [if test -z "$LD"; then
3302 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3303 for ac_dir in $PATH; do
3304 IFS=$lt_save_ifs
3305 test -z "$ac_dir" && ac_dir=.
3306 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3307 lt_cv_path_LD=$ac_dir/$ac_prog
3308 # Check to see if the program is GNU ld. I'd rather use --version,
3309 # but apparently some variants of GNU ld only accept -v.
3310 # Break only if it was the GNU/non-GNU ld that we prefer.
3311 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3312 *GNU* | *'with BFD'*)
3313 test no != "$with_gnu_ld" && break
3314 ;;
3315 *)
3316 test yes != "$with_gnu_ld" && break
3317 ;;
3318 esac
3319 fi
3320 done
3321 IFS=$lt_save_ifs
3322 else
3323 lt_cv_path_LD=$LD # Let the user override the test with a path.
3324 fi])
3325 LD=$lt_cv_path_LD
3326 if test -n "$LD"; then
3327 AC_MSG_RESULT($LD)
3328 else
3329 AC_MSG_RESULT(no)
3330 fi
3331 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3332 _LT_PATH_LD_GNU
3333 AC_SUBST([LD])
3334
3335 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3336 ])# LT_PATH_LD
3337
3338 # Old names:
3339 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3340 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3341 dnl aclocal-1.4 backwards compatibility:
3342 dnl AC_DEFUN([AM_PROG_LD], [])
3343 dnl AC_DEFUN([AC_PROG_LD], [])
3344
3345
3346 # _LT_PATH_LD_GNU
3347 #- --------------
3348 m4_defun([_LT_PATH_LD_GNU],
3349 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3350 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
3351 case `$LD -v 2>&1 </dev/null` in
3352 *GNU* | *'with BFD'*)
3353 lt_cv_prog_gnu_ld=yes
3354 ;;
3355 *)
3356 lt_cv_prog_gnu_ld=no
3357 ;;
3358 esac])
3359 with_gnu_ld=$lt_cv_prog_gnu_ld
3360 ])# _LT_PATH_LD_GNU
3361
3362
3363 # _LT_CMD_RELOAD
3364 # --------------
3365 # find reload flag for linker
3366 # -- PORTME Some linkers may need a different reload flag.
3367 m4_defun([_LT_CMD_RELOAD],
3368 [AC_CACHE_CHECK([for $LD option to reload object files],
3369 lt_cv_ld_reload_flag,
3370 [lt_cv_ld_reload_flag='-r'])
3371 reload_flag=$lt_cv_ld_reload_flag
3372 case $reload_flag in
3373 "" | " "*) ;;
3374 *) reload_flag=" $reload_flag" ;;
3375 esac
3376 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3377 case $host_os in
3378 cygwin* | mingw* | pw32* | cegcc*)
3379 if test yes != "$GCC"; then
3380 reload_cmds=false
3381 fi
3382 ;;
3383 darwin*)
3384 if test yes = "$GCC"; then
3385 reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
3386 else
3387 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3388 fi
3389 ;;
3390 esac
3391 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3392 _LT_TAGDECL([], [reload_cmds], [2])dnl
3393 ])# _LT_CMD_RELOAD
3394
3395
3396 # _LT_PATH_DD
3397 # -----------
3398 # find a working dd
3399 m4_defun([_LT_PATH_DD],
3400 [AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
3401 [printf 0123456789abcdef0123456789abcdef >conftest.i
3402 cat conftest.i conftest.i >conftest2.i
3403 : ${lt_DD:=$DD}
3404 AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
3405 [if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
3406 cmp -s conftest.i conftest.out \
3407 && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
3408 fi])
3409 rm -f conftest.i conftest2.i conftest.out])
3410 ])# _LT_PATH_DD
3411
3412
3413 # _LT_CMD_TRUNCATE
3414 # ----------------
3415 # find command to truncate a binary pipe
3416 m4_defun([_LT_CMD_TRUNCATE],
3417 [m4_require([_LT_PATH_DD])
3418 AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
3419 [printf 0123456789abcdef0123456789abcdef >conftest.i
3420 cat conftest.i conftest.i >conftest2.i
3421 lt_cv_truncate_bin=
3422 if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
3423 cmp -s conftest.i conftest.out \
3424 && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
3425 fi
3426 rm -f conftest.i conftest2.i conftest.out
3427 test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
3428 _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
3429 [Command to truncate a binary pipe])
3430 ])# _LT_CMD_TRUNCATE
3431
3432
3433 # _LT_CHECK_MAGIC_METHOD
3434 # ----------------------
3435 # how to check for library dependencies
3436 # -- PORTME fill in with the dynamic library characteristics
3437 m4_defun([_LT_CHECK_MAGIC_METHOD],
3438 [m4_require([_LT_DECL_EGREP])
3439 m4_require([_LT_DECL_OBJDUMP])
3440 AC_CACHE_CHECK([how to recognize dependent libraries],
3441 lt_cv_deplibs_check_method,
3442 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3443 lt_cv_file_magic_test_file=
3444 lt_cv_deplibs_check_method='unknown'
3445 # Need to set the preceding variable on all platforms that support
3446 # interlibrary dependencies.
3447 # 'none' -- dependencies not supported.
3448 # 'unknown' -- same as none, but documents that we really don't know.
3449 # 'pass_all' -- all dependencies passed with no checks.
3450 # 'test_compile' -- check by making test program.
3451 # 'file_magic [[regex]]' -- check by looking for files in library path
3452 # that responds to the $file_magic_cmd with a given extended regex.
3453 # If you have 'file' or equivalent on your system and you're not sure
3454 # whether 'pass_all' will *always* work, you probably want this one.
3455
3456 case $host_os in
3457 aix[[4-9]]*)
3458 lt_cv_deplibs_check_method=pass_all
3459 ;;
3460
3461 beos*)
3462 lt_cv_deplibs_check_method=pass_all
3463 ;;
3464
3465 bsdi[[45]]*)
3466 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3467 lt_cv_file_magic_cmd='/usr/bin/file -L'
3468 lt_cv_file_magic_test_file=/shlib/libc.so
3469 ;;
3470
3471 cygwin*)
3472 # func_win32_libid is a shell function defined in ltmain.sh
3473 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3474 lt_cv_file_magic_cmd='func_win32_libid'
3475 ;;
3476
3477 mingw* | pw32*)
3478 # Base MSYS/MinGW do not provide the 'file' command needed by
3479 # func_win32_libid shell function, so use a weaker test based on 'objdump',
3480 # unless we find 'file', for example because we are cross-compiling.
3481 if ( file / ) >/dev/null 2>&1; then
3482 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3483 lt_cv_file_magic_cmd='func_win32_libid'
3484 else
3485 # Keep this pattern in sync with the one in func_win32_libid.
3486 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
3487 lt_cv_file_magic_cmd='$OBJDUMP -f'
3488 fi
3489 ;;
3490
3491 cegcc*)
3492 # use the weaker test based on 'objdump'. See mingw*.
3493 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3494 lt_cv_file_magic_cmd='$OBJDUMP -f'
3495 ;;
3496
3497 darwin* | rhapsody*)
3498 lt_cv_deplibs_check_method=pass_all
3499 ;;
3500
3501 freebsd* | dragonfly*)
3502 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3503 case $host_cpu in
3504 i*86 )
3505 # Not sure whether the presence of OpenBSD here was a mistake.
3506 # Let's accept both of them until this is cleared up.
3507 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3508 lt_cv_file_magic_cmd=/usr/bin/file
3509 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3510 ;;
3511 esac
3512 else
3513 lt_cv_deplibs_check_method=pass_all
3514 fi
3515 ;;
3516
3517 haiku*)
3518 lt_cv_deplibs_check_method=pass_all
3519 ;;
3520
3521 hpux10.20* | hpux11*)
3522 lt_cv_file_magic_cmd=/usr/bin/file
3523 case $host_cpu in
3524 ia64*)
3525 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3526 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3527 ;;
3528 hppa*64*)
3529 [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]']
3530 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3531 ;;
3532 *)
3533 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
3534 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3535 ;;
3536 esac
3537 ;;
3538
3539 interix[[3-9]]*)
3540 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3541 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3542 ;;
3543
3544 irix5* | irix6* | nonstopux*)
3545 case $LD in
3546 *-32|*"-32 ") libmagic=32-bit;;
3547 *-n32|*"-n32 ") libmagic=N32;;
3548 *-64|*"-64 ") libmagic=64-bit;;
3549 *) libmagic=never-match;;
3550 esac
3551 lt_cv_deplibs_check_method=pass_all
3552 ;;
3553
3554 # This must be glibc/ELF.
3555 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
3556 lt_cv_deplibs_check_method=pass_all
3557 ;;
3558
3559 netbsd* | netbsdelf*-gnu)
3560 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3561 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3562 else
3563 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3564 fi
3565 ;;
3566
3567 newos6*)
3568 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3569 lt_cv_file_magic_cmd=/usr/bin/file
3570 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3571 ;;
3572
3573 *nto* | *qnx*)
3574 lt_cv_deplibs_check_method=pass_all
3575 ;;
3576
3577 openbsd* | bitrig*)
3578 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
3579 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3580 else
3581 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3582 fi
3583 ;;
3584
3585 osf3* | osf4* | osf5*)
3586 lt_cv_deplibs_check_method=pass_all
3587 ;;
3588
3589 rdos*)
3590 lt_cv_deplibs_check_method=pass_all
3591 ;;
3592
3593 solaris*)
3594 lt_cv_deplibs_check_method=pass_all
3595 ;;
3596
3597 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3598 lt_cv_deplibs_check_method=pass_all
3599 ;;
3600
3601 sysv4 | sysv4.3*)
3602 case $host_vendor in
3603 motorola)
3604 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]]'
3605 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3606 ;;
3607 ncr)
3608 lt_cv_deplibs_check_method=pass_all
3609 ;;
3610 sequent)
3611 lt_cv_file_magic_cmd='/bin/file'
3612 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3613 ;;
3614 sni)
3615 lt_cv_file_magic_cmd='/bin/file'
3616 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3617 lt_cv_file_magic_test_file=/lib/libc.so
3618 ;;
3619 siemens)
3620 lt_cv_deplibs_check_method=pass_all
3621 ;;
3622 pc)
3623 lt_cv_deplibs_check_method=pass_all
3624 ;;
3625 esac
3626 ;;
3627
3628 tpf*)
3629 lt_cv_deplibs_check_method=pass_all
3630 ;;
3631 os2*)
3632 lt_cv_deplibs_check_method=pass_all
3633 ;;
3634 esac
3635 ])
3636
3637 file_magic_glob=
3638 want_nocaseglob=no
3639 if test "$build" = "$host"; then
3640 case $host_os in
3641 mingw* | pw32*)
3642 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
3643 want_nocaseglob=yes
3644 else
3645 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
3646 fi
3647 ;;
3648 esac
3649 fi
3650
3651 file_magic_cmd=$lt_cv_file_magic_cmd
3652 deplibs_check_method=$lt_cv_deplibs_check_method
3653 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3654
3655 _LT_DECL([], [deplibs_check_method], [1],
3656 [Method to check whether dependent libraries are shared objects])
3657 _LT_DECL([], [file_magic_cmd], [1],
3658 [Command to use when deplibs_check_method = "file_magic"])
3659 _LT_DECL([], [file_magic_glob], [1],
3660 [How to find potential files when deplibs_check_method = "file_magic"])
3661 _LT_DECL([], [want_nocaseglob], [1],
3662 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
3663 ])# _LT_CHECK_MAGIC_METHOD
3664
3665
3666 # LT_PATH_NM
3667 # ----------
3668 # find the pathname to a BSD- or MS-compatible name lister
3669 AC_DEFUN([LT_PATH_NM],
3670 [AC_REQUIRE([AC_PROG_CC])dnl
3671 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3672 [if test -n "$NM"; then
3673 # Let the user override the test.
3674 lt_cv_path_NM=$NM
3675 else
3676 lt_nm_to_check=${ac_tool_prefix}nm
3677 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3678 lt_nm_to_check="$lt_nm_to_check nm"
3679 fi
3680 for lt_tmp_nm in $lt_nm_to_check; do
3681 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3682 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3683 IFS=$lt_save_ifs
3684 test -z "$ac_dir" && ac_dir=.
3685 tmp_nm=$ac_dir/$lt_tmp_nm
3686 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
3687 # Check to see if the nm accepts a BSD-compat flag.
3688 # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
3689 # nm: unknown option "B" ignored
3690 # Tru64's nm complains that /dev/null is an invalid object file
3691 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
3692 case $build_os in
3693 mingw*) lt_bad_file=conftest.nm/nofile ;;
3694 *) lt_bad_file=/dev/null ;;
3695 esac
3696 case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
3697 *$lt_bad_file* | *'Invalid file or object type'*)
3698 lt_cv_path_NM="$tmp_nm -B"
3699 break 2
3700 ;;
3701 *)
3702 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3703 */dev/null*)
3704 lt_cv_path_NM="$tmp_nm -p"
3705 break 2
3706 ;;
3707 *)
3708 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3709 continue # so that we can try to find one that supports BSD flags
3710 ;;
3711 esac
3712 ;;
3713 esac
3714 fi
3715 done
3716 IFS=$lt_save_ifs
3717 done
3718 : ${lt_cv_path_NM=no}
3719 fi])
3720 if test no != "$lt_cv_path_NM"; then
3721 NM=$lt_cv_path_NM
3722 else
3723 # Didn't find any BSD compatible name lister, look for dumpbin.
3724 if test -n "$DUMPBIN"; then :
3725 # Let the user override the test.
3726 else
3727 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
3728 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
3729 *COFF*)
3730 DUMPBIN="$DUMPBIN -symbols -headers"
3731 ;;
3732 *)
3733 DUMPBIN=:
3734 ;;
3735 esac
3736 fi
3737 AC_SUBST([DUMPBIN])
3738 if test : != "$DUMPBIN"; then
3739 NM=$DUMPBIN
3740 fi
3741 fi
3742 test -z "$NM" && NM=nm
3743 AC_SUBST([NM])
3744 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3745
3746 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3747 [lt_cv_nm_interface="BSD nm"
3748 echo "int some_variable = 0;" > conftest.$ac_ext
3749 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3750 (eval "$ac_compile" 2>conftest.err)
3751 cat conftest.err >&AS_MESSAGE_LOG_FD
3752 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3753 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3754 cat conftest.err >&AS_MESSAGE_LOG_FD
3755 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
3756 cat conftest.out >&AS_MESSAGE_LOG_FD
3757 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3758 lt_cv_nm_interface="MS dumpbin"
3759 fi
3760 rm -f conftest*])
3761 ])# LT_PATH_NM
3762
3763 # Old names:
3764 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3765 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3766 dnl aclocal-1.4 backwards compatibility:
3767 dnl AC_DEFUN([AM_PROG_NM], [])
3768 dnl AC_DEFUN([AC_PROG_NM], [])
3769
3770 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3771 # --------------------------------
3772 # how to determine the name of the shared library
3773 # associated with a specific link library.
3774 # -- PORTME fill in with the dynamic library characteristics
3775 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
3776 [m4_require([_LT_DECL_EGREP])
3777 m4_require([_LT_DECL_OBJDUMP])
3778 m4_require([_LT_DECL_DLLTOOL])
3779 AC_CACHE_CHECK([how to associate runtime and link libraries],
3780 lt_cv_sharedlib_from_linklib_cmd,
3781 [lt_cv_sharedlib_from_linklib_cmd='unknown'
3782
3783 case $host_os in
3784 cygwin* | mingw* | pw32* | cegcc*)
3785 # two different shell functions defined in ltmain.sh;
3786 # decide which one to use based on capabilities of $DLLTOOL
3787 case `$DLLTOOL --help 2>&1` in
3788 *--identify-strict*)
3789 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
3790 ;;
3791 *)
3792 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
3793 ;;
3794 esac
3795 ;;
3796 *)
3797 # fallback: assume linklib IS sharedlib
3798 lt_cv_sharedlib_from_linklib_cmd=$ECHO
3799 ;;
3800 esac
3801 ])
3802 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
3803 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
3804
3805 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
3806 [Command to associate shared and link libraries])
3807 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3808
3809
3810 # _LT_PATH_MANIFEST_TOOL
3811 # ----------------------
3812 # locate the manifest tool
3813 m4_defun([_LT_PATH_MANIFEST_TOOL],
3814 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
3815 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
3816 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
3817 [lt_cv_path_mainfest_tool=no
3818 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
3819 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
3820 cat conftest.err >&AS_MESSAGE_LOG_FD
3821 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
3822 lt_cv_path_mainfest_tool=yes
3823 fi
3824 rm -f conftest*])
3825 if test yes != "$lt_cv_path_mainfest_tool"; then
3826 MANIFEST_TOOL=:
3827 fi
3828 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
3829 ])# _LT_PATH_MANIFEST_TOOL
3830
3831
3832 # _LT_DLL_DEF_P([FILE])
3833 # ---------------------
3834 # True iff FILE is a Windows DLL '.def' file.
3835 # Keep in sync with func_dll_def_p in the libtool script
3836 AC_DEFUN([_LT_DLL_DEF_P],
3837 [dnl
3838 test DEF = "`$SED -n dnl
3839 -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace
3840 -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments
3841 -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl
3842 -e q dnl Only consider the first "real" line
3843 $1`" dnl
3844 ])# _LT_DLL_DEF_P
3845
3846
3847 # LT_LIB_M
3848 # --------
3849 # check for math library
3850 AC_DEFUN([LT_LIB_M],
3851 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3852 LIBM=
3853 case $host in
3854 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
3855 # These system don't have libm, or don't need it
3856 ;;
3857 *-ncr-sysv4.3*)
3858 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
3859 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3860 ;;
3861 *)
3862 AC_CHECK_LIB(m, cos, LIBM=-lm)
3863 ;;
3864 esac
3865 AC_SUBST([LIBM])
3866 ])# LT_LIB_M
3867
3868 # Old name:
3869 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3870 dnl aclocal-1.4 backwards compatibility:
3871 dnl AC_DEFUN([AC_CHECK_LIBM], [])
3872
3873
3874 # _LT_COMPILER_NO_RTTI([TAGNAME])
3875 # -------------------------------
3876 m4_defun([_LT_COMPILER_NO_RTTI],
3877 [m4_require([_LT_TAG_COMPILER])dnl
3878
3879 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3880
3881 if test yes = "$GCC"; then
3882 case $cc_basename in
3883 nvcc*)
3884 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
3885 *)
3886 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
3887 esac
3888
3889 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3890 lt_cv_prog_compiler_rtti_exceptions,
3891 [-fno-rtti -fno-exceptions], [],
3892 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3893 fi
3894 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3895 [Compiler flag to turn off builtin functions])
3896 ])# _LT_COMPILER_NO_RTTI
3897
3898
3899 # _LT_CMD_GLOBAL_SYMBOLS
3900 # ----------------------
3901 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3902 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3903 AC_REQUIRE([AC_PROG_CC])dnl
3904 AC_REQUIRE([AC_PROG_AWK])dnl
3905 AC_REQUIRE([LT_PATH_NM])dnl
3906 AC_REQUIRE([LT_PATH_LD])dnl
3907 m4_require([_LT_DECL_SED])dnl
3908 m4_require([_LT_DECL_EGREP])dnl
3909 m4_require([_LT_TAG_COMPILER])dnl
3910
3911 # Check for command to grab the raw symbol name followed by C symbol from nm.
3912 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3913 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3914 [
3915 # These are sane defaults that work on at least a few old systems.
3916 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
3917
3918 # Character class describing NM global symbol codes.
3919 symcode='[[BCDEGRST]]'
3920
3921 # Regexp to match symbols that can be accessed directly from C.
3922 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3923
3924 # Define system-specific variables.
3925 case $host_os in
3926 aix*)
3927 symcode='[[BCDT]]'
3928 ;;
3929 cygwin* | mingw* | pw32* | cegcc*)
3930 symcode='[[ABCDGISTW]]'
3931 ;;
3932 hpux*)
3933 if test ia64 = "$host_cpu"; then
3934 symcode='[[ABCDEGRST]]'
3935 fi
3936 ;;
3937 irix* | nonstopux*)
3938 symcode='[[BCDEGRST]]'
3939 ;;
3940 osf*)
3941 symcode='[[BCDEGQRST]]'
3942 ;;
3943 solaris*)
3944 symcode='[[BDRT]]'
3945 ;;
3946 sco3.2v5*)
3947 symcode='[[DT]]'
3948 ;;
3949 sysv4.2uw2*)
3950 symcode='[[DT]]'
3951 ;;
3952 sysv5* | sco5v6* | unixware* | OpenUNIX*)
3953 symcode='[[ABDT]]'
3954 ;;
3955 sysv4)
3956 symcode='[[DFNSTU]]'
3957 ;;
3958 esac
3959
3960 # If we're using GNU nm, then use its standard symbol codes.
3961 case `$NM -V 2>&1` in
3962 *GNU* | *'with BFD'*)
3963 symcode='[[ABCDGIRSTW]]' ;;
3964 esac
3965
3966 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3967 # Gets list of data symbols to import.
3968 lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
3969 # Adjust the below global symbol transforms to fixup imported variables.
3970 lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
3971 lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
3972 lt_c_name_lib_hook="\
3973 -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
3974 -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
3975 else
3976 # Disable hooks by default.
3977 lt_cv_sys_global_symbol_to_import=
3978 lt_cdecl_hook=
3979 lt_c_name_hook=
3980 lt_c_name_lib_hook=
3981 fi
3982
3983 # Transform an extracted symbol line into a proper C declaration.
3984 # Some systems (esp. on ia64) link data and code symbols differently,
3985 # so use this general approach.
3986 lt_cv_sys_global_symbol_to_cdecl="sed -n"\
3987 $lt_cdecl_hook\
3988 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
3989 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
3990
3991 # Transform an extracted symbol line into symbol name and symbol address
3992 lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
3993 $lt_c_name_hook\
3994 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
3995 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
3996
3997 # Transform an extracted symbol line into symbol name with lib prefix and
3998 # symbol address.
3999 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
4000 $lt_c_name_lib_hook\
4001 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
4002 " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
4003 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
4004
4005 # Handle CRLF in mingw tool chain
4006 opt_cr=
4007 case $build_os in
4008 mingw*)
4009 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4010 ;;
4011 esac
4012
4013 # Try without a prefix underscore, then with it.
4014 for ac_symprfx in "" "_"; do
4015
4016 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4017 symxfrm="\\1 $ac_symprfx\\2 \\2"
4018
4019 # Write the raw and C identifiers.
4020 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4021 # Fake it for dumpbin and say T for any non-static function,
4022 # D for any global variable and I for any imported variable.
4023 # Also find C++ and __fastcall symbols from MSVC++,
4024 # which start with @ or ?.
4025 lt_cv_sys_global_symbol_pipe="$AWK ['"\
4026 " {last_section=section; section=\$ 3};"\
4027 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
4028 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4029 " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
4030 " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
4031 " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
4032 " \$ 0!~/External *\|/{next};"\
4033 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4034 " {if(hide[section]) next};"\
4035 " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
4036 " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
4037 " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
4038 " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
4039 " ' prfx=^$ac_symprfx]"
4040 else
4041 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4042 fi
4043 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
4044
4045 # Check to see that the pipe works correctly.
4046 pipe_works=no
4047
4048 rm -f conftest*
4049 cat > conftest.$ac_ext <<_LT_EOF
4050 #ifdef __cplusplus
4051 extern "C" {
4052 #endif
4053 char nm_test_var;
4054 void nm_test_func(void);
4055 void nm_test_func(void){}
4056 #ifdef __cplusplus
4057 }
4058 #endif
4059 int main(){nm_test_var='a';nm_test_func();return(0);}
4060 _LT_EOF
4061
4062 if AC_TRY_EVAL(ac_compile); then
4063 # Now try to grab the symbols.
4064 nlist=conftest.nm
4065 $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD
4066 if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then
4067 # Try sorting and uniquifying the output.
4068 if sort "$nlist" | uniq > "$nlist"T; then
4069 mv -f "$nlist"T "$nlist"
4070 else
4071 rm -f "$nlist"T
4072 fi
4073
4074 # Make sure that we snagged all the symbols we need.
4075 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4076 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4077 cat <<_LT_EOF > conftest.$ac_ext
4078 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
4079 #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
4080 /* DATA imports from DLLs on WIN32 can't be const, because runtime
4081 relocations are performed -- see ld's documentation on pseudo-relocs. */
4082 # define LT@&t@_DLSYM_CONST
4083 #elif defined __osf__
4084 /* This system does not cope well with relocations in const data. */
4085 # define LT@&t@_DLSYM_CONST
4086 #else
4087 # define LT@&t@_DLSYM_CONST const
4088 #endif
4089
4090 #ifdef __cplusplus
4091 extern "C" {
4092 #endif
4093
4094 _LT_EOF
4095 # Now generate the symbol file.
4096 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4097
4098 cat <<_LT_EOF >> conftest.$ac_ext
4099
4100 /* The mapping between symbol names and symbols. */
4101 LT@&t@_DLSYM_CONST struct {
4102 const char *name;
4103 void *address;
4104 }
4105 lt__PROGRAM__LTX_preloaded_symbols[[]] =
4106 {
4107 { "@PROGRAM@", (void *) 0 },
4108 _LT_EOF
4109 $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4110 cat <<\_LT_EOF >> conftest.$ac_ext
4111 {0, (void *) 0}
4112 };
4113
4114 /* This works around a problem in FreeBSD linker */
4115 #ifdef FREEBSD_WORKAROUND
4116 static const void *lt_preloaded_setup() {
4117 return lt__PROGRAM__LTX_preloaded_symbols;
4118 }
4119 #endif
4120
4121 #ifdef __cplusplus
4122 }
4123 #endif
4124 _LT_EOF
4125 # Now try linking the two files.
4126 mv conftest.$ac_objext conftstm.$ac_objext
4127 lt_globsym_save_LIBS=$LIBS
4128 lt_globsym_save_CFLAGS=$CFLAGS
4129 LIBS=conftstm.$ac_objext
4130 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4131 if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
4132 pipe_works=yes
4133 fi
4134 LIBS=$lt_globsym_save_LIBS
4135 CFLAGS=$lt_globsym_save_CFLAGS
4136 else
4137 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4138 fi
4139 else
4140 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4141 fi
4142 else
4143 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4144 fi
4145 else
4146 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4147 cat conftest.$ac_ext >&5
4148 fi
4149 rm -rf conftest* conftst*
4150
4151 # Do not use the global_symbol_pipe unless it works.
4152 if test yes = "$pipe_works"; then
4153 break
4154 else
4155 lt_cv_sys_global_symbol_pipe=
4156 fi
4157 done
4158 ])
4159 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4160 lt_cv_sys_global_symbol_to_cdecl=
4161 fi
4162 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4163 AC_MSG_RESULT(failed)
4164 else
4165 AC_MSG_RESULT(ok)
4166 fi
4167
4168 # Response file support.
4169 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4170 nm_file_list_spec='@'
4171 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
4172 nm_file_list_spec='@'
4173 fi
4174
4175 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4176 [Take the output of nm and produce a listing of raw symbols and C names])
4177 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4178 [Transform the output of nm in a proper C declaration])
4179 _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
4180 [Transform the output of nm into a list of symbols to manually relocate])
4181 _LT_DECL([global_symbol_to_c_name_address],
4182 [lt_cv_sys_global_symbol_to_c_name_address], [1],
4183 [Transform the output of nm in a C name address pair])
4184 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4185 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4186 [Transform the output of nm in a C name address pair when lib prefix is needed])
4187 _LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
4188 [The name lister interface])
4189 _LT_DECL([], [nm_file_list_spec], [1],
4190 [Specify filename containing input files for $NM])
4191 ]) # _LT_CMD_GLOBAL_SYMBOLS
4192
4193
4194 # _LT_COMPILER_PIC([TAGNAME])
4195 # ---------------------------
4196 m4_defun([_LT_COMPILER_PIC],
4197 [m4_require([_LT_TAG_COMPILER])dnl
4198 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
4199 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4200 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4201
4202 m4_if([$1], [CXX], [
4203 # C++ specific cases for pic, static, wl, etc.
4204 if test yes = "$GXX"; then
4205 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4206 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4207
4208 case $host_os in
4209 aix*)
4210 # All AIX code is PIC.
4211 if test ia64 = "$host_cpu"; then
4212 # AIX 5 now supports IA64 processor
4213 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4214 fi
4215 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4216 ;;
4217
4218 amigaos*)
4219 case $host_cpu in
4220 powerpc)
4221 # see comment about AmigaOS4 .so support
4222 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4223 ;;
4224 m68k)
4225 # FIXME: we need at least 68020 code to build shared libraries, but
4226 # adding the '-m68020' flag to GCC prevents building anything better,
4227 # like '-m68040'.
4228 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4229 ;;
4230 esac
4231 ;;
4232
4233 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4234 # PIC is the default for these OSes.
4235 ;;
4236 mingw* | cygwin* | os2* | pw32* | cegcc*)
4237 # This hack is so that the source file can tell whether it is being
4238 # built for inclusion in a dll (and should export symbols for example).
4239 # Although the cygwin gcc ignores -fPIC, still need this for old-style
4240 # (--disable-auto-import) libraries
4241 m4_if([$1], [GCJ], [],
4242 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4243 case $host_os in
4244 os2*)
4245 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4246 ;;
4247 esac
4248 ;;
4249 darwin* | rhapsody*)
4250 # PIC is the default on this platform
4251 # Common symbols not allowed in MH_DYLIB files
4252 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4253 ;;
4254 *djgpp*)
4255 # DJGPP does not support shared libraries at all
4256 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4257 ;;
4258 haiku*)
4259 # PIC is the default for Haiku.
4260 # The "-static" flag exists, but is broken.
4261 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4262 ;;
4263 interix[[3-9]]*)
4264 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4265 # Instead, we relocate shared libraries at runtime.
4266 ;;
4267 sysv4*MP*)
4268 if test -d /usr/nec; then
4269 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4270 fi
4271 ;;
4272 hpux*)
4273 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4274 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4275 # sets the default TLS model and affects inlining.
4276 case $host_cpu in
4277 hppa*64*)
4278 ;;
4279 *)
4280 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4281 ;;
4282 esac
4283 ;;
4284 *qnx* | *nto*)
4285 # QNX uses GNU C++, but need to define -shared option too, otherwise
4286 # it will coredump.
4287 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4288 ;;
4289 *)
4290 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4291 ;;
4292 esac
4293 else
4294 case $host_os in
4295 aix[[4-9]]*)
4296 # All AIX code is PIC.
4297 if test ia64 = "$host_cpu"; then
4298 # AIX 5 now supports IA64 processor
4299 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4300 else
4301 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4302 fi
4303 ;;
4304 chorus*)
4305 case $cc_basename in
4306 cxch68*)
4307 # Green Hills C++ Compiler
4308 # _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"
4309 ;;
4310 esac
4311 ;;
4312 mingw* | cygwin* | os2* | pw32* | cegcc*)
4313 # This hack is so that the source file can tell whether it is being
4314 # built for inclusion in a dll (and should export symbols for example).
4315 m4_if([$1], [GCJ], [],
4316 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4317 ;;
4318 dgux*)
4319 case $cc_basename in
4320 ec++*)
4321 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4322 ;;
4323 ghcx*)
4324 # Green Hills C++ Compiler
4325 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4326 ;;
4327 *)
4328 ;;
4329 esac
4330 ;;
4331 freebsd* | dragonfly*)
4332 # FreeBSD uses GNU C++
4333 ;;
4334 hpux9* | hpux10* | hpux11*)
4335 case $cc_basename in
4336 CC*)
4337 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4338 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4339 if test ia64 != "$host_cpu"; then
4340 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4341 fi
4342 ;;
4343 aCC*)
4344 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4345 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4346 case $host_cpu in
4347 hppa*64*|ia64*)
4348 # +Z the default
4349 ;;
4350 *)
4351 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4352 ;;
4353 esac
4354 ;;
4355 *)
4356 ;;
4357 esac
4358 ;;
4359 interix*)
4360 # This is c89, which is MS Visual C++ (no shared libs)
4361 # Anyone wants to do a port?
4362 ;;
4363 irix5* | irix6* | nonstopux*)
4364 case $cc_basename in
4365 CC*)
4366 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4367 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4368 # CC pic flag -KPIC is the default.
4369 ;;
4370 *)
4371 ;;
4372 esac
4373 ;;
4374 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4375 case $cc_basename in
4376 KCC*)
4377 # KAI C++ Compiler
4378 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4379 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4380 ;;
4381 ecpc* )
4382 # old Intel C++ for x86_64, which still supported -KPIC.
4383 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4384 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4385 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4386 ;;
4387 icpc* )
4388 # Intel C++, used to be incompatible with GCC.
4389 # ICC 10 doesn't accept -KPIC any more.
4390 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4391 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4392 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4393 ;;
4394 pgCC* | pgcpp*)
4395 # Portland Group C++ compiler
4396 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4397 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4398 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4399 ;;
4400 cxx*)
4401 # Compaq C++
4402 # Make sure the PIC flag is empty. It appears that all Alpha
4403 # Linux and Compaq Tru64 Unix objects are PIC.
4404 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4405 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4406 ;;
4407 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
4408 # IBM XL 8.0, 9.0 on PPC and BlueGene
4409 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4410 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4411 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4412 ;;
4413 *)
4414 case `$CC -V 2>&1 | sed 5q` in
4415 *Sun\ C*)
4416 # Sun C++ 5.9
4417 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4418 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4419 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4420 ;;
4421 esac
4422 ;;
4423 esac
4424 ;;
4425 lynxos*)
4426 ;;
4427 m88k*)
4428 ;;
4429 mvs*)
4430 case $cc_basename in
4431 cxx*)
4432 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4433 ;;
4434 *)
4435 ;;
4436 esac
4437 ;;
4438 netbsd* | netbsdelf*-gnu)
4439 ;;
4440 *qnx* | *nto*)
4441 # QNX uses GNU C++, but need to define -shared option too, otherwise
4442 # it will coredump.
4443 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4444 ;;
4445 osf3* | osf4* | osf5*)
4446 case $cc_basename in
4447 KCC*)
4448 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4449 ;;
4450 RCC*)
4451 # Rational C++ 2.4.1
4452 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4453 ;;
4454 cxx*)
4455 # Digital/Compaq C++
4456 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4457 # Make sure the PIC flag is empty. It appears that all Alpha
4458 # Linux and Compaq Tru64 Unix objects are PIC.
4459 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4460 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4461 ;;
4462 *)
4463 ;;
4464 esac
4465 ;;
4466 psos*)
4467 ;;
4468 solaris*)
4469 case $cc_basename in
4470 CC* | sunCC*)
4471 # Sun C++ 4.2, 5.x and Centerline C++
4472 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4473 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4474 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4475 ;;
4476 gcx*)
4477 # Green Hills C++ Compiler
4478 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4479 ;;
4480 *)
4481 ;;
4482 esac
4483 ;;
4484 sunos4*)
4485 case $cc_basename in
4486 CC*)
4487 # Sun C++ 4.x
4488 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4489 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4490 ;;
4491 lcc*)
4492 # Lucid
4493 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4494 ;;
4495 *)
4496 ;;
4497 esac
4498 ;;
4499 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4500 case $cc_basename in
4501 CC*)
4502 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4503 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4504 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4505 ;;
4506 esac
4507 ;;
4508 tandem*)
4509 case $cc_basename in
4510 NCC*)
4511 # NonStop-UX NCC 3.20
4512 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4513 ;;
4514 *)
4515 ;;
4516 esac
4517 ;;
4518 vxworks*)
4519 ;;
4520 *)
4521 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4522 ;;
4523 esac
4524 fi
4525 ],
4526 [
4527 if test yes = "$GCC"; then
4528 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4529 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4530
4531 case $host_os in
4532 aix*)
4533 # All AIX code is PIC.
4534 if test ia64 = "$host_cpu"; then
4535 # AIX 5 now supports IA64 processor
4536 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4537 fi
4538 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4539 ;;
4540
4541 amigaos*)
4542 case $host_cpu in
4543 powerpc)
4544 # see comment about AmigaOS4 .so support
4545 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4546 ;;
4547 m68k)
4548 # FIXME: we need at least 68020 code to build shared libraries, but
4549 # adding the '-m68020' flag to GCC prevents building anything better,
4550 # like '-m68040'.
4551 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4552 ;;
4553 esac
4554 ;;
4555
4556 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4557 # PIC is the default for these OSes.
4558 ;;
4559
4560 mingw* | cygwin* | pw32* | os2* | cegcc*)
4561 # This hack is so that the source file can tell whether it is being
4562 # built for inclusion in a dll (and should export symbols for example).
4563 # Although the cygwin gcc ignores -fPIC, still need this for old-style
4564 # (--disable-auto-import) libraries
4565 m4_if([$1], [GCJ], [],
4566 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4567 case $host_os in
4568 os2*)
4569 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4570 ;;
4571 esac
4572 ;;
4573
4574 darwin* | rhapsody*)
4575 # PIC is the default on this platform
4576 # Common symbols not allowed in MH_DYLIB files
4577 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4578 ;;
4579
4580 haiku*)
4581 # PIC is the default for Haiku.
4582 # The "-static" flag exists, but is broken.
4583 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4584 ;;
4585
4586 hpux*)
4587 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4588 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4589 # sets the default TLS model and affects inlining.
4590 case $host_cpu in
4591 hppa*64*)
4592 # +Z the default
4593 ;;
4594 *)
4595 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4596 ;;
4597 esac
4598 ;;
4599
4600 interix[[3-9]]*)
4601 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4602 # Instead, we relocate shared libraries at runtime.
4603 ;;
4604
4605 msdosdjgpp*)
4606 # Just because we use GCC doesn't mean we suddenly get shared libraries
4607 # on systems that don't support them.
4608 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4609 enable_shared=no
4610 ;;
4611
4612 *nto* | *qnx*)
4613 # QNX uses GNU C++, but need to define -shared option too, otherwise
4614 # it will coredump.
4615 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4616 ;;
4617
4618 sysv4*MP*)
4619 if test -d /usr/nec; then
4620 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4621 fi
4622 ;;
4623
4624 *)
4625 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4626 ;;
4627 esac
4628
4629 case $cc_basename in
4630 nvcc*) # Cuda Compiler Driver 2.2
4631 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
4632 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4633 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
4634 fi
4635 ;;
4636 esac
4637 else
4638 # PORTME Check for flag to pass linker flags through the system compiler.
4639 case $host_os in
4640 aix*)
4641 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4642 if test ia64 = "$host_cpu"; then
4643 # AIX 5 now supports IA64 processor
4644 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4645 else
4646 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4647 fi
4648 ;;
4649
4650 darwin* | rhapsody*)
4651 # PIC is the default on this platform
4652 # Common symbols not allowed in MH_DYLIB files
4653 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4654 case $cc_basename in
4655 nagfor*)
4656 # NAG Fortran compiler
4657 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4658 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4659 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4660 ;;
4661 esac
4662 ;;
4663
4664 mingw* | cygwin* | pw32* | os2* | cegcc*)
4665 # This hack is so that the source file can tell whether it is being
4666 # built for inclusion in a dll (and should export symbols for example).
4667 m4_if([$1], [GCJ], [],
4668 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4669 case $host_os in
4670 os2*)
4671 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4672 ;;
4673 esac
4674 ;;
4675
4676 hpux9* | hpux10* | hpux11*)
4677 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4678 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4679 # not for PA HP-UX.
4680 case $host_cpu in
4681 hppa*64*|ia64*)
4682 # +Z the default
4683 ;;
4684 *)
4685 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4686 ;;
4687 esac
4688 # Is there a better lt_prog_compiler_static that works with the bundled CC?
4689 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4690 ;;
4691
4692 irix5* | irix6* | nonstopux*)
4693 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4694 # PIC (with -KPIC) is the default.
4695 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4696 ;;
4697
4698 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4699 case $cc_basename in
4700 # old Intel for x86_64, which still supported -KPIC.
4701 ecc*)
4702 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4703 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4704 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4705 ;;
4706 # flang / f18. f95 an alias for gfortran or flang on Debian
4707 flang* | f18* | f95*)
4708 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4709 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4710 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4711 ;;
4712 # icc used to be incompatible with GCC.
4713 # ICC 10 doesn't accept -KPIC any more.
4714 icc* | ifort*)
4715 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4716 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4717 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4718 ;;
4719 # Lahey Fortran 8.1.
4720 lf95*)
4721 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4722 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4723 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4724 ;;
4725 nagfor*)
4726 # NAG Fortran compiler
4727 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4728 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4729 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4730 ;;
4731 tcc*)
4732 # Fabrice Bellard et al's Tiny C Compiler
4733 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4734 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4735 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4736 ;;
4737 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
4738 # Portland Group compilers (*not* the Pentium gcc compiler,
4739 # which looks to be a dead project)
4740 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4741 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4742 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4743 ;;
4744 ccc*)
4745 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4746 # All Alpha code is PIC.
4747 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4748 ;;
4749 xl* | bgxl* | bgf* | mpixl*)
4750 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
4751 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4752 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4753 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4754 ;;
4755 *)
4756 case `$CC -V 2>&1 | sed 5q` in
4757 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
4758 # Sun Fortran 8.3 passes all unrecognized flags to the linker
4759 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4760 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4761 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4762 ;;
4763 *Sun\ F* | *Sun*Fortran*)
4764 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4765 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4766 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4767 ;;
4768 *Sun\ C*)
4769 # Sun C 5.9
4770 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4771 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4772 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4773 ;;
4774 *Intel*\ [[CF]]*Compiler*)
4775 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4776 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4777 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4778 ;;
4779 *Portland\ Group*)
4780 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4781 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4782 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4783 ;;
4784 esac
4785 ;;
4786 esac
4787 ;;
4788
4789 newsos6)
4790 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4791 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4792 ;;
4793
4794 *nto* | *qnx*)
4795 # QNX uses GNU C++, but need to define -shared option too, otherwise
4796 # it will coredump.
4797 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4798 ;;
4799
4800 osf3* | osf4* | osf5*)
4801 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4802 # All OSF/1 code is PIC.
4803 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4804 ;;
4805
4806 rdos*)
4807 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4808 ;;
4809
4810 solaris*)
4811 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4812 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4813 case $cc_basename in
4814 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
4815 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4816 *)
4817 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4818 esac
4819 ;;
4820
4821 sunos4*)
4822 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4823 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4824 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4825 ;;
4826
4827 sysv4 | sysv4.2uw2* | sysv4.3*)
4828 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4829 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4830 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4831 ;;
4832
4833 sysv4*MP*)
4834 if test -d /usr/nec; then
4835 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4836 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4837 fi
4838 ;;
4839
4840 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4841 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4842 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4843 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4844 ;;
4845
4846 unicos*)
4847 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4848 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4849 ;;
4850
4851 uts4*)
4852 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4853 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4854 ;;
4855
4856 *)
4857 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4858 ;;
4859 esac
4860 fi
4861 ])
4862 case $host_os in
4863 # For platforms that do not support PIC, -DPIC is meaningless:
4864 *djgpp*)
4865 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4866 ;;
4867 *)
4868 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4869 ;;
4870 esac
4871
4872 AC_CACHE_CHECK([for $compiler option to produce PIC],
4873 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
4874 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4875 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
4876
4877 #
4878 # Check to make sure the PIC flag actually works.
4879 #
4880 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4881 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4882 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4883 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4884 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4885 "" | " "*) ;;
4886 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4887 esac],
4888 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4889 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4890 fi
4891 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4892 [Additional compiler flags for building library objects])
4893
4894 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4895 [How to pass a linker flag through the compiler])
4896 #
4897 # Check to make sure the static flag actually works.
4898 #
4899 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4900 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4901 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4902 $lt_tmp_static_flag,
4903 [],
4904 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4905 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4906 [Compiler flag to prevent dynamic linking])
4907 ])# _LT_COMPILER_PIC
4908
4909
4910 # _LT_LINKER_SHLIBS([TAGNAME])
4911 # ----------------------------
4912 # See if the linker supports building shared libraries.
4913 m4_defun([_LT_LINKER_SHLIBS],
4914 [AC_REQUIRE([LT_PATH_LD])dnl
4915 AC_REQUIRE([LT_PATH_NM])dnl
4916 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
4917 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4918 m4_require([_LT_DECL_EGREP])dnl
4919 m4_require([_LT_DECL_SED])dnl
4920 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4921 m4_require([_LT_TAG_COMPILER])dnl
4922 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4923 m4_if([$1], [CXX], [
4924 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4925 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4926 case $host_os in
4927 aix[[4-9]]*)
4928 # If we're using GNU nm, then we don't want the "-C" option.
4929 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
4930 # Without the "-l" option, or with the "-B" option, AIX nm treats
4931 # weak defined symbols like other global defined symbols, whereas
4932 # GNU nm marks them as "W".
4933 # While the 'weak' keyword is ignored in the Export File, we need
4934 # it in the Import File for the 'aix-soname' feature, so we have
4935 # to replace the "-B" option with "-P" for AIX nm.
4936 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4937 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
4938 else
4939 _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
4940 fi
4941 ;;
4942 pw32*)
4943 _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
4944 ;;
4945 cygwin* | mingw* | cegcc*)
4946 case $cc_basename in
4947 cl*)
4948 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
4949 ;;
4950 *)
4951 _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'
4952 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4953 ;;
4954 esac
4955 ;;
4956 linux* | k*bsd*-gnu | gnu*)
4957 _LT_TAGVAR(link_all_deplibs, $1)=no
4958 ;;
4959 *)
4960 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4961 ;;
4962 esac
4963 ], [
4964 runpath_var=
4965 _LT_TAGVAR(allow_undefined_flag, $1)=
4966 _LT_TAGVAR(always_export_symbols, $1)=no
4967 _LT_TAGVAR(archive_cmds, $1)=
4968 _LT_TAGVAR(archive_expsym_cmds, $1)=
4969 _LT_TAGVAR(compiler_needs_object, $1)=no
4970 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4971 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4972 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4973 _LT_TAGVAR(hardcode_automatic, $1)=no
4974 _LT_TAGVAR(hardcode_direct, $1)=no
4975 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4976 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4977 _LT_TAGVAR(hardcode_libdir_separator, $1)=
4978 _LT_TAGVAR(hardcode_minus_L, $1)=no
4979 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4980 _LT_TAGVAR(inherit_rpath, $1)=no
4981 _LT_TAGVAR(link_all_deplibs, $1)=unknown
4982 _LT_TAGVAR(module_cmds, $1)=
4983 _LT_TAGVAR(module_expsym_cmds, $1)=
4984 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4985 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4986 _LT_TAGVAR(thread_safe_flag_spec, $1)=
4987 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4988 # include_expsyms should be a list of space-separated symbols to be *always*
4989 # included in the symbol list
4990 _LT_TAGVAR(include_expsyms, $1)=
4991 # exclude_expsyms can be an extended regexp of symbols to exclude
4992 # it will be wrapped by ' (' and ')$', so one must not match beginning or
4993 # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
4994 # as well as any symbol that contains 'd'.
4995 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4996 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4997 # platforms (ab)use it in PIC code, but their linkers get confused if
4998 # the symbol is explicitly referenced. Since portable code cannot
4999 # rely on this symbol name, it's probably fine to never include it in
5000 # preloaded symbol tables.
5001 # Exclude shared library initialization/finalization symbols.
5002 dnl Note also adjust exclude_expsyms for C++ above.
5003 extract_expsyms_cmds=
5004
5005 case $host_os in
5006 cygwin* | mingw* | pw32* | cegcc*)
5007 # FIXME: the MSVC++ port hasn't been tested in a loooong time
5008 # When not using gcc, we currently assume that we are using
5009 # Microsoft Visual C++.
5010 if test yes != "$GCC"; then
5011 with_gnu_ld=no
5012 fi
5013 ;;
5014 interix*)
5015 # we just hope/assume this is gcc and not c89 (= MSVC++)
5016 with_gnu_ld=yes
5017 ;;
5018 openbsd* | bitrig*)
5019 with_gnu_ld=no
5020 ;;
5021 linux* | k*bsd*-gnu | gnu*)
5022 _LT_TAGVAR(link_all_deplibs, $1)=no
5023 ;;
5024 esac
5025
5026 _LT_TAGVAR(ld_shlibs, $1)=yes
5027
5028 # On some targets, GNU ld is compatible enough with the native linker
5029 # that we're better off using the native interface for both.
5030 lt_use_gnu_ld_interface=no
5031 if test yes = "$with_gnu_ld"; then
5032 case $host_os in
5033 aix*)
5034 # The AIX port of GNU ld has always aspired to compatibility
5035 # with the native linker. However, as the warning in the GNU ld
5036 # block says, versions before 2.19.5* couldn't really create working
5037 # shared libraries, regardless of the interface used.
5038 case `$LD -v 2>&1` in
5039 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
5040 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
5041 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
5042 *)
5043 lt_use_gnu_ld_interface=yes
5044 ;;
5045 esac
5046 ;;
5047 *)
5048 lt_use_gnu_ld_interface=yes
5049 ;;
5050 esac
5051 fi
5052
5053 if test yes = "$lt_use_gnu_ld_interface"; then
5054 # If archive_cmds runs LD, not CC, wlarc should be empty
5055 wlarc='$wl'
5056
5057 # Set some defaults for GNU ld with shared library support. These
5058 # are reset later if shared libraries are not supported. Putting them
5059 # here allows them to be overridden if necessary.
5060 runpath_var=LD_RUN_PATH
5061 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5062 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
5063 # ancient GNU ld didn't support --whole-archive et. al.
5064 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5065 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
5066 else
5067 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5068 fi
5069 supports_anon_versioning=no
5070 case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
5071 *GNU\ gold*) supports_anon_versioning=yes ;;
5072 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5073 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5074 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5075 *\ 2.11.*) ;; # other 2.11 versions
5076 *) supports_anon_versioning=yes ;;
5077 esac
5078
5079 # See if GNU ld supports shared libraries.
5080 case $host_os in
5081 aix[[3-9]]*)
5082 # On AIX/PPC, the GNU linker is very broken
5083 if test ia64 != "$host_cpu"; then
5084 _LT_TAGVAR(ld_shlibs, $1)=no
5085 cat <<_LT_EOF 1>&2
5086
5087 *** Warning: the GNU linker, at least up to release 2.19, is reported
5088 *** to be unable to reliably create shared libraries on AIX.
5089 *** Therefore, libtool is disabling shared libraries support. If you
5090 *** really care for shared libraries, you may want to install binutils
5091 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
5092 *** You will then need to restart the configuration process.
5093
5094 _LT_EOF
5095 fi
5096 ;;
5097
5098 amigaos*)
5099 case $host_cpu in
5100 powerpc)
5101 # see comment about AmigaOS4 .so support
5102 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5103 _LT_TAGVAR(archive_expsym_cmds, $1)=''
5104 ;;
5105 m68k)
5106 _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)'
5107 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5108 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5109 ;;
5110 esac
5111 ;;
5112
5113 beos*)
5114 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5115 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5116 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5117 # support --undefined. This deserves some investigation. FIXME
5118 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5119 else
5120 _LT_TAGVAR(ld_shlibs, $1)=no
5121 fi
5122 ;;
5123
5124 cygwin* | mingw* | pw32* | cegcc*)
5125 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5126 # as there is no search path for DLLs.
5127 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5128 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
5129 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5130 _LT_TAGVAR(always_export_symbols, $1)=no
5131 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5132 _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'
5133 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5134
5135 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5136 _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'
5137 # If the export-symbols file already is a .def file, use it as
5138 # is; otherwise, prepend EXPORTS...
5139 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
5140 cp $export_symbols $output_objdir/$soname.def;
5141 else
5142 echo EXPORTS > $output_objdir/$soname.def;
5143 cat $export_symbols >> $output_objdir/$soname.def;
5144 fi~
5145 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5146 else
5147 _LT_TAGVAR(ld_shlibs, $1)=no
5148 fi
5149 ;;
5150
5151 haiku*)
5152 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5153 _LT_TAGVAR(link_all_deplibs, $1)=yes
5154 ;;
5155
5156 os2*)
5157 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5158 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5159 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5160 shrext_cmds=.dll
5161 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5162 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5163 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5164 $ECHO EXPORTS >> $output_objdir/$libname.def~
5165 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
5166 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5167 emximp -o $lib $output_objdir/$libname.def'
5168 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5169 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5170 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5171 $ECHO EXPORTS >> $output_objdir/$libname.def~
5172 prefix_cmds="$SED"~
5173 if test EXPORTS = "`$SED 1q $export_symbols`"; then
5174 prefix_cmds="$prefix_cmds -e 1d";
5175 fi~
5176 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
5177 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
5178 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5179 emximp -o $lib $output_objdir/$libname.def'
5180 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
5181 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5182 ;;
5183
5184 interix[[3-9]]*)
5185 _LT_TAGVAR(hardcode_direct, $1)=no
5186 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5187 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5188 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5189 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5190 # Instead, shared libraries are loaded at an image base (0x10000000 by
5191 # default) and relocated if they conflict, which is a slow very memory
5192 # consuming and fragmenting process. To avoid this, we pick a random,
5193 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5194 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
5195 _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'
5196 _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'
5197 ;;
5198
5199 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
5200 tmp_diet=no
5201 if test linux-dietlibc = "$host_os"; then
5202 case $cc_basename in
5203 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
5204 esac
5205 fi
5206 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5207 && test no = "$tmp_diet"
5208 then
5209 tmp_addflag=' $pic_flag'
5210 tmp_sharedflag='-shared'
5211 case $cc_basename,$host_cpu in
5212 pgcc*) # Portland Group C compiler
5213 _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'
5214 tmp_addflag=' $pic_flag'
5215 ;;
5216 pgf77* | pgf90* | pgf95* | pgfortran*)
5217 # Portland Group f77 and f90 compilers
5218 _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'
5219 tmp_addflag=' $pic_flag -Mnomain' ;;
5220 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
5221 tmp_addflag=' -i_dynamic' ;;
5222 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
5223 tmp_addflag=' -i_dynamic -nofor_main' ;;
5224 ifc* | ifort*) # Intel Fortran compiler
5225 tmp_addflag=' -nofor_main' ;;
5226 lf95*) # Lahey Fortran 8.1
5227 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5228 tmp_sharedflag='--shared' ;;
5229 nagfor*) # NAGFOR 5.3
5230 tmp_sharedflag='-Wl,-shared' ;;
5231 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
5232 tmp_sharedflag='-qmkshrobj'
5233 tmp_addflag= ;;
5234 nvcc*) # Cuda Compiler Driver 2.2
5235 _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'
5236 _LT_TAGVAR(compiler_needs_object, $1)=yes
5237 ;;
5238 esac
5239 case `$CC -V 2>&1 | sed 5q` in
5240 *Sun\ C*) # Sun C 5.9
5241 _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'
5242 _LT_TAGVAR(compiler_needs_object, $1)=yes
5243 tmp_sharedflag='-G' ;;
5244 *Sun\ F*) # Sun Fortran 8.3
5245 tmp_sharedflag='-G' ;;
5246 esac
5247 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5248
5249 if test yes = "$supports_anon_versioning"; then
5250 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5251 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5252 echo "local: *; };" >> $output_objdir/$libname.ver~
5253 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
5254 fi
5255
5256 case $cc_basename in
5257 tcc*)
5258 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
5259 ;;
5260 xlf* | bgf* | bgxlf* | mpixlf*)
5261 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5262 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5263 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5264 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
5265 if test yes = "$supports_anon_versioning"; then
5266 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5267 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5268 echo "local: *; };" >> $output_objdir/$libname.ver~
5269 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5270 fi
5271 ;;
5272 esac
5273 else
5274 _LT_TAGVAR(ld_shlibs, $1)=no
5275 fi
5276 ;;
5277
5278 netbsd* | netbsdelf*-gnu)
5279 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5280 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5281 wlarc=
5282 else
5283 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5284 _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'
5285 fi
5286 ;;
5287
5288 solaris*)
5289 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5290 _LT_TAGVAR(ld_shlibs, $1)=no
5291 cat <<_LT_EOF 1>&2
5292
5293 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5294 *** create shared libraries on Solaris systems. Therefore, libtool
5295 *** is disabling shared libraries support. We urge you to upgrade GNU
5296 *** binutils to release 2.9.1 or newer. Another option is to modify
5297 *** your PATH or compiler configuration so that the native linker is
5298 *** used, and then restart.
5299
5300 _LT_EOF
5301 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5302 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5303 _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'
5304 else
5305 _LT_TAGVAR(ld_shlibs, $1)=no
5306 fi
5307 ;;
5308
5309 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5310 case `$LD -v 2>&1` in
5311 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5312 _LT_TAGVAR(ld_shlibs, $1)=no
5313 cat <<_LT_EOF 1>&2
5314
5315 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
5316 *** reliably create shared libraries on SCO systems. Therefore, libtool
5317 *** is disabling shared libraries support. We urge you to upgrade GNU
5318 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
5319 *** your PATH or compiler configuration so that the native linker is
5320 *** used, and then restart.
5321
5322 _LT_EOF
5323 ;;
5324 *)
5325 # For security reasons, it is highly recommended that you always
5326 # use absolute paths for naming shared libraries, and exclude the
5327 # DT_RUNPATH tag from executables and libraries. But doing so
5328 # requires that you compile everything twice, which is a pain.
5329 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5330 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5331 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5332 _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'
5333 else
5334 _LT_TAGVAR(ld_shlibs, $1)=no
5335 fi
5336 ;;
5337 esac
5338 ;;
5339
5340 sunos4*)
5341 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5342 wlarc=
5343 _LT_TAGVAR(hardcode_direct, $1)=yes
5344 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5345 ;;
5346
5347 *)
5348 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5349 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5350 _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'
5351 else
5352 _LT_TAGVAR(ld_shlibs, $1)=no
5353 fi
5354 ;;
5355 esac
5356
5357 if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
5358 runpath_var=
5359 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5360 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5361 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5362 fi
5363 else
5364 # PORTME fill in a description of your system's linker (not GNU ld)
5365 case $host_os in
5366 aix3*)
5367 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5368 _LT_TAGVAR(always_export_symbols, $1)=yes
5369 _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'
5370 # Note: this linker hardcodes the directories in LIBPATH if there
5371 # are no directories specified by -L.
5372 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5373 if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
5374 # Neither direct hardcoding nor static linking is supported with a
5375 # broken collect2.
5376 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5377 fi
5378 ;;
5379
5380 aix[[4-9]]*)
5381 if test ia64 = "$host_cpu"; then
5382 # On IA64, the linker does run time linking by default, so we don't
5383 # have to do anything special.
5384 aix_use_runtimelinking=no
5385 exp_sym_flag='-Bexport'
5386 no_entry_flag=
5387 else
5388 # If we're using GNU nm, then we don't want the "-C" option.
5389 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
5390 # Without the "-l" option, or with the "-B" option, AIX nm treats
5391 # weak defined symbols like other global defined symbols, whereas
5392 # GNU nm marks them as "W".
5393 # While the 'weak' keyword is ignored in the Export File, we need
5394 # it in the Import File for the 'aix-soname' feature, so we have
5395 # to replace the "-B" option with "-P" for AIX nm.
5396 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5397 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
5398 else
5399 _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
5400 fi
5401 aix_use_runtimelinking=no
5402
5403 # Test if we are trying to use run time linking or normal
5404 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5405 # have runtime linking enabled, and use it for executables.
5406 # For shared libraries, we enable/disable runtime linking
5407 # depending on the kind of the shared library created -
5408 # when "with_aix_soname,aix_use_runtimelinking" is:
5409 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
5410 # "aix,yes" lib.so shared, rtl:yes, for executables
5411 # lib.a static archive
5412 # "both,no" lib.so.V(shr.o) shared, rtl:yes
5413 # lib.a(lib.so.V) shared, rtl:no, for executables
5414 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
5415 # lib.a(lib.so.V) shared, rtl:no
5416 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
5417 # lib.a static archive
5418 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5419 for ld_flag in $LDFLAGS; do
5420 if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
5421 aix_use_runtimelinking=yes
5422 break
5423 fi
5424 done
5425 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
5426 # With aix-soname=svr4, we create the lib.so.V shared archives only,
5427 # so we don't have lib.a shared libs to link our executables.
5428 # We have to force runtime linking in this case.
5429 aix_use_runtimelinking=yes
5430 LDFLAGS="$LDFLAGS -Wl,-brtl"
5431 fi
5432 ;;
5433 esac
5434
5435 exp_sym_flag='-bexport'
5436 no_entry_flag='-bnoentry'
5437 fi
5438
5439 # When large executables or shared objects are built, AIX ld can
5440 # have problems creating the table of contents. If linking a library
5441 # or program results in "error TOC overflow" add -mminimal-toc to
5442 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5443 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5444
5445 _LT_TAGVAR(archive_cmds, $1)=''
5446 _LT_TAGVAR(hardcode_direct, $1)=yes
5447 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5448 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5449 _LT_TAGVAR(link_all_deplibs, $1)=yes
5450 _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
5451 case $with_aix_soname,$aix_use_runtimelinking in
5452 aix,*) ;; # traditional, no import file
5453 svr4,* | *,yes) # use import file
5454 # The Import File defines what to hardcode.
5455 _LT_TAGVAR(hardcode_direct, $1)=no
5456 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5457 ;;
5458 esac
5459
5460 if test yes = "$GCC"; then
5461 case $host_os in aix4.[[012]]|aix4.[[012]].*)
5462 # We only want to do this on AIX 4.2 and lower, the check
5463 # below for broken collect2 doesn't work under 4.3+
5464 collect2name=`$CC -print-prog-name=collect2`
5465 if test -f "$collect2name" &&
5466 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5467 then
5468 # We have reworked collect2
5469 :
5470 else
5471 # We have old collect2
5472 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5473 # It fails to find uninstalled libraries when the uninstalled
5474 # path is not listed in the libpath. Setting hardcode_minus_L
5475 # to unsupported forces relinking
5476 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5477 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5478 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5479 fi
5480 ;;
5481 esac
5482 shared_flag='-shared'
5483 if test yes = "$aix_use_runtimelinking"; then
5484 shared_flag="$shared_flag "'$wl-G'
5485 fi
5486 # Need to ensure runtime linking is disabled for the traditional
5487 # shared library, or the linker may eventually find shared libraries
5488 # /with/ Import File - we do not want to mix them.
5489 shared_flag_aix='-shared'
5490 shared_flag_svr4='-shared $wl-G'
5491 else
5492 # not using gcc
5493 if test ia64 = "$host_cpu"; then
5494 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5495 # chokes on -Wl,-G. The following line is correct:
5496 shared_flag='-G'
5497 else
5498 if test yes = "$aix_use_runtimelinking"; then
5499 shared_flag='$wl-G'
5500 else
5501 shared_flag='$wl-bM:SRE'
5502 fi
5503 shared_flag_aix='$wl-bM:SRE'
5504 shared_flag_svr4='$wl-G'
5505 fi
5506 fi
5507
5508 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
5509 # It seems that -bexpall does not export symbols beginning with
5510 # underscore (_), so it is better to generate a list of symbols to export.
5511 _LT_TAGVAR(always_export_symbols, $1)=yes
5512 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
5513 # Warning - without using the other runtime loading flags (-brtl),
5514 # -berok will link without error, but may produce a broken library.
5515 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5516 # Determine the default libpath from the value encoded in an
5517 # empty executable.
5518 _LT_SYS_MODULE_PATH_AIX([$1])
5519 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
5520 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
5521 else
5522 if test ia64 = "$host_cpu"; then
5523 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
5524 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5525 _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"
5526 else
5527 # Determine the default libpath from the value encoded in an
5528 # empty executable.
5529 _LT_SYS_MODULE_PATH_AIX([$1])
5530 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
5531 # Warning - without using the other run time loading flags,
5532 # -berok will link without error, but may produce a broken library.
5533 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
5534 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
5535 if test yes = "$with_gnu_ld"; then
5536 # We only use this code for GNU lds that support --whole-archive.
5537 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
5538 else
5539 # Exported symbols can be pulled into shared objects from archives
5540 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5541 fi
5542 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5543 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
5544 # -brtl affects multiple linker settings, -berok does not and is overridden later
5545 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
5546 if test svr4 != "$with_aix_soname"; then
5547 # This is similar to how AIX traditionally builds its shared libraries.
5548 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
5549 fi
5550 if test aix != "$with_aix_soname"; then
5551 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
5552 else
5553 # used by -dlpreopen to get the symbols
5554 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
5555 fi
5556 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
5557 fi
5558 fi
5559 ;;
5560
5561 amigaos*)
5562 case $host_cpu in
5563 powerpc)
5564 # see comment about AmigaOS4 .so support
5565 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5566 _LT_TAGVAR(archive_expsym_cmds, $1)=''
5567 ;;
5568 m68k)
5569 _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)'
5570 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5571 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5572 ;;
5573 esac
5574 ;;
5575
5576 bsdi[[45]]*)
5577 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5578 ;;
5579
5580 cygwin* | mingw* | pw32* | cegcc*)
5581 # When not using gcc, we currently assume that we are using
5582 # Microsoft Visual C++.
5583 # hardcode_libdir_flag_spec is actually meaningless, as there is
5584 # no search path for DLLs.
5585 case $cc_basename in
5586 cl*)
5587 # Native MSVC
5588 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5589 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5590 _LT_TAGVAR(always_export_symbols, $1)=yes
5591 _LT_TAGVAR(file_list_spec, $1)='@'
5592 # Tell ltmain to make .lib files, not .a files.
5593 libext=lib
5594 # Tell ltmain to make .dll files, not .so files.
5595 shrext_cmds=.dll
5596 # FIXME: Setting linknames here is a bad hack.
5597 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
5598 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
5599 cp "$export_symbols" "$output_objdir/$soname.def";
5600 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
5601 else
5602 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
5603 fi~
5604 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5605 linknames='
5606 # The linker will not automatically build a static lib if we build a DLL.
5607 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5608 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5609 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5610 _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'
5611 # Don't use ranlib
5612 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
5613 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5614 lt_tool_outputfile="@TOOL_OUTPUT@"~
5615 case $lt_outputfile in
5616 *.exe|*.EXE) ;;
5617 *)
5618 lt_outputfile=$lt_outputfile.exe
5619 lt_tool_outputfile=$lt_tool_outputfile.exe
5620 ;;
5621 esac~
5622 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
5623 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5624 $RM "$lt_outputfile.manifest";
5625 fi'
5626 ;;
5627 *)
5628 # Assume MSVC wrapper
5629 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5630 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5631 # Tell ltmain to make .lib files, not .a files.
5632 libext=lib
5633 # Tell ltmain to make .dll files, not .so files.
5634 shrext_cmds=.dll
5635 # FIXME: Setting linknames here is a bad hack.
5636 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5637 # The linker will automatically build a .lib file if we build a DLL.
5638 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5639 # FIXME: Should let the user specify the lib program.
5640 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5641 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5642 ;;
5643 esac
5644 ;;
5645
5646 darwin* | rhapsody*)
5647 _LT_DARWIN_LINKER_FEATURES($1)
5648 ;;
5649
5650 dgux*)
5651 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5652 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5653 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5654 ;;
5655
5656 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5657 # support. Future versions do this automatically, but an explicit c++rt0.o
5658 # does not break anything, and helps significantly (at the cost of a little
5659 # extra space).
5660 freebsd2.2*)
5661 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5662 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5663 _LT_TAGVAR(hardcode_direct, $1)=yes
5664 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5665 ;;
5666
5667 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5668 freebsd2.*)
5669 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5670 _LT_TAGVAR(hardcode_direct, $1)=yes
5671 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5672 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5673 ;;
5674
5675 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5676 freebsd* | dragonfly*)
5677 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5678 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5679 _LT_TAGVAR(hardcode_direct, $1)=yes
5680 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5681 ;;
5682
5683 hpux9*)
5684 if test yes = "$GCC"; then
5685 _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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
5686 else
5687 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
5688 fi
5689 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5690 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5691 _LT_TAGVAR(hardcode_direct, $1)=yes
5692
5693 # hardcode_minus_L: Not really in the search PATH,
5694 # but as the default location of the library.
5695 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5696 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5697 ;;
5698
5699 hpux10*)
5700 if test yes,no = "$GCC,$with_gnu_ld"; then
5701 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5702 else
5703 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5704 fi
5705 if test no = "$with_gnu_ld"; then
5706 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5707 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5708 _LT_TAGVAR(hardcode_direct, $1)=yes
5709 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5710 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5711 # hardcode_minus_L: Not really in the search PATH,
5712 # but as the default location of the library.
5713 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5714 fi
5715 ;;
5716
5717 hpux11*)
5718 if test yes,no = "$GCC,$with_gnu_ld"; then
5719 case $host_cpu in
5720 hppa*64*)
5721 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
5722 ;;
5723 ia64*)
5724 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5725 ;;
5726 *)
5727 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5728 ;;
5729 esac
5730 else
5731 case $host_cpu in
5732 hppa*64*)
5733 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
5734 ;;
5735 ia64*)
5736 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5737 ;;
5738 *)
5739 m4_if($1, [], [
5740 # Older versions of the 11.00 compiler do not understand -b yet
5741 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
5742 _LT_LINKER_OPTION([if $CC understands -b],
5743 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
5744 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
5745 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
5746 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
5747 ;;
5748 esac
5749 fi
5750 if test no = "$with_gnu_ld"; then
5751 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5752 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5753
5754 case $host_cpu in
5755 hppa*64*|ia64*)
5756 _LT_TAGVAR(hardcode_direct, $1)=no
5757 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5758 ;;
5759 *)
5760 _LT_TAGVAR(hardcode_direct, $1)=yes
5761 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5762 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5763
5764 # hardcode_minus_L: Not really in the search PATH,
5765 # but as the default location of the library.
5766 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5767 ;;
5768 esac
5769 fi
5770 ;;
5771
5772 irix5* | irix6* | nonstopux*)
5773 if test yes = "$GCC"; then
5774 _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'
5775 # Try to use the -exported_symbol ld option, if it does not
5776 # work, assume that -exports_file does not work either and
5777 # implicitly export all symbols.
5778 # This should be the same for all languages, so no per-tag cache variable.
5779 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
5780 [lt_cv_irix_exported_symbol],
5781 [save_LDFLAGS=$LDFLAGS
5782 LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
5783 AC_LINK_IFELSE(
5784 [AC_LANG_SOURCE(
5785 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
5786 [C++], [[int foo (void) { return 0; }]],
5787 [Fortran 77], [[
5788 subroutine foo
5789 end]],
5790 [Fortran], [[
5791 subroutine foo
5792 end]])])],
5793 [lt_cv_irix_exported_symbol=yes],
5794 [lt_cv_irix_exported_symbol=no])
5795 LDFLAGS=$save_LDFLAGS])
5796 if test yes = "$lt_cv_irix_exported_symbol"; then
5797 _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'
5798 fi
5799 _LT_TAGVAR(link_all_deplibs, $1)=no
5800 else
5801 _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'
5802 _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'
5803 fi
5804 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5805 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5806 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5807 _LT_TAGVAR(inherit_rpath, $1)=yes
5808 _LT_TAGVAR(link_all_deplibs, $1)=yes
5809 ;;
5810
5811 linux*)
5812 case $cc_basename in
5813 tcc*)
5814 # Fabrice Bellard et al's Tiny C Compiler
5815 _LT_TAGVAR(ld_shlibs, $1)=yes
5816 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5817 ;;
5818 esac
5819 ;;
5820
5821 netbsd* | netbsdelf*-gnu)
5822 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5823 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
5824 else
5825 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
5826 fi
5827 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5828 _LT_TAGVAR(hardcode_direct, $1)=yes
5829 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5830 ;;
5831
5832 newsos6)
5833 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5834 _LT_TAGVAR(hardcode_direct, $1)=yes
5835 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5836 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5837 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5838 ;;
5839
5840 *nto* | *qnx*)
5841 ;;
5842
5843 openbsd* | bitrig*)
5844 if test -f /usr/libexec/ld.so; then
5845 _LT_TAGVAR(hardcode_direct, $1)=yes
5846 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5847 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5848 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
5849 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5850 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
5851 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5852 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5853 else
5854 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5855 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5856 fi
5857 else
5858 _LT_TAGVAR(ld_shlibs, $1)=no
5859 fi
5860 ;;
5861
5862 os2*)
5863 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5864 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5865 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5866 shrext_cmds=.dll
5867 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5868 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5869 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5870 $ECHO EXPORTS >> $output_objdir/$libname.def~
5871 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
5872 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5873 emximp -o $lib $output_objdir/$libname.def'
5874 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5875 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5876 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5877 $ECHO EXPORTS >> $output_objdir/$libname.def~
5878 prefix_cmds="$SED"~
5879 if test EXPORTS = "`$SED 1q $export_symbols`"; then
5880 prefix_cmds="$prefix_cmds -e 1d";
5881 fi~
5882 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
5883 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
5884 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5885 emximp -o $lib $output_objdir/$libname.def'
5886 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
5887 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5888 ;;
5889
5890 osf3*)
5891 if test yes = "$GCC"; then
5892 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
5893 _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'
5894 else
5895 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5896 _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'
5897 fi
5898 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5899 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5900 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5901 ;;
5902
5903 osf4* | osf5*) # as osf3* with the addition of -msym flag
5904 if test yes = "$GCC"; then
5905 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
5906 _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'
5907 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5908 else
5909 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5910 _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'
5911 _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~
5912 $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'
5913
5914 # Both c and cxx compiler support -rpath directly
5915 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5916 fi
5917 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5918 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5919 ;;
5920
5921 solaris*)
5922 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5923 if test yes = "$GCC"; then
5924 wlarc='$wl'
5925 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
5926 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5927 $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'
5928 else
5929 case `$CC -V 2>&1` in
5930 *"Compilers 5.0"*)
5931 wlarc=''
5932 _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
5933 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5934 $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5935 ;;
5936 *)
5937 wlarc='$wl'
5938 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5939 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5940 $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5941 ;;
5942 esac
5943 fi
5944 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5945 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5946 case $host_os in
5947 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5948 *)
5949 # The compiler driver will combine and reorder linker options,
5950 # but understands '-z linker_flag'. GCC discards it without '$wl',
5951 # but is careful enough not to reorder.
5952 # Supported since Solaris 2.6 (maybe 2.5.1?)
5953 if test yes = "$GCC"; then
5954 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
5955 else
5956 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5957 fi
5958 ;;
5959 esac
5960 _LT_TAGVAR(link_all_deplibs, $1)=yes
5961 ;;
5962
5963 sunos4*)
5964 if test sequent = "$host_vendor"; then
5965 # Use $CC to link under sequent, because it throws in some extra .o
5966 # files that make .init and .fini sections work.
5967 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5968 else
5969 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5970 fi
5971 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5972 _LT_TAGVAR(hardcode_direct, $1)=yes
5973 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5974 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5975 ;;
5976
5977 sysv4)
5978 case $host_vendor in
5979 sni)
5980 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5981 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5982 ;;
5983 siemens)
5984 ## LD is ld it makes a PLAMLIB
5985 ## CC just makes a GrossModule.
5986 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5987 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5988 _LT_TAGVAR(hardcode_direct, $1)=no
5989 ;;
5990 motorola)
5991 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5992 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5993 ;;
5994 esac
5995 runpath_var='LD_RUN_PATH'
5996 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5997 ;;
5998
5999 sysv4.3*)
6000 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6001 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6002 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6003 ;;
6004
6005 sysv4*MP*)
6006 if test -d /usr/nec; then
6007 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6008 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6009 runpath_var=LD_RUN_PATH
6010 hardcode_runpath_var=yes
6011 _LT_TAGVAR(ld_shlibs, $1)=yes
6012 fi
6013 ;;
6014
6015 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6016 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
6017 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6018 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6019 runpath_var='LD_RUN_PATH'
6020
6021 if test yes = "$GCC"; then
6022 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6023 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6024 else
6025 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6026 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6027 fi
6028 ;;
6029
6030 sysv5* | sco3.2v5* | sco5v6*)
6031 # Note: We CANNOT use -z defs as we might desire, because we do not
6032 # link with -lc, and that would cause any symbols used from libc to
6033 # always be unresolved, which means just about no library would
6034 # ever link correctly. If we're not using GNU ld we use -z text
6035 # though, which does catch some bad symbols but isn't as heavy-handed
6036 # as -z defs.
6037 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
6038 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
6039 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6040 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6041 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
6042 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6043 _LT_TAGVAR(link_all_deplibs, $1)=yes
6044 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
6045 runpath_var='LD_RUN_PATH'
6046
6047 if test yes = "$GCC"; then
6048 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6049 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6050 else
6051 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6052 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6053 fi
6054 ;;
6055
6056 uts4*)
6057 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6058 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6059 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6060 ;;
6061
6062 *)
6063 _LT_TAGVAR(ld_shlibs, $1)=no
6064 ;;
6065 esac
6066
6067 if test sni = "$host_vendor"; then
6068 case $host in
6069 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6070 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
6071 ;;
6072 esac
6073 fi
6074 fi
6075 ])
6076 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6077 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
6078
6079 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6080
6081 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6082 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6083 _LT_DECL([], [extract_expsyms_cmds], [2],
6084 [The commands to extract the exported symbol list from a shared archive])
6085
6086 #
6087 # Do we need to explicitly link libc?
6088 #
6089 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6090 x|xyes)
6091 # Assume -lc should be added
6092 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6093
6094 if test yes,yes = "$GCC,$enable_shared"; then
6095 case $_LT_TAGVAR(archive_cmds, $1) in
6096 *'~'*)
6097 # FIXME: we may have to deal with multi-command sequences.
6098 ;;
6099 '$CC '*)
6100 # Test whether the compiler implicitly links with -lc since on some
6101 # systems, -lgcc has to come before -lc. If gcc already passes -lc
6102 # to ld, don't add -lc before -lgcc.
6103 AC_CACHE_CHECK([whether -lc should be explicitly linked in],
6104 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
6105 [$RM conftest*
6106 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6107
6108 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6109 soname=conftest
6110 lib=conftest
6111 libobjs=conftest.$ac_objext
6112 deplibs=
6113 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6114 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6115 compiler_flags=-v
6116 linker_flags=-v
6117 verstring=
6118 output_objdir=.
6119 libname=conftest
6120 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6121 _LT_TAGVAR(allow_undefined_flag, $1)=
6122 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6123 then
6124 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6125 else
6126 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6127 fi
6128 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6129 else
6130 cat conftest.err 1>&5
6131 fi
6132 $RM conftest*
6133 ])
6134 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
6135 ;;
6136 esac
6137 fi
6138 ;;
6139 esac
6140
6141 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6142 [Whether or not to add -lc for building shared libraries])
6143 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6144 [enable_shared_with_static_runtimes], [0],
6145 [Whether or not to disallow shared libs when runtime libs are static])
6146 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6147 [Compiler flag to allow reflexive dlopens])
6148 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
6149 [Compiler flag to generate shared objects directly from archives])
6150 _LT_TAGDECL([], [compiler_needs_object], [1],
6151 [Whether the compiler copes with passing no objects directly])
6152 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6153 [Create an old-style archive from a shared archive])
6154 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6155 [Create a temporary old-style archive to link instead of a shared archive])
6156 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6157 _LT_TAGDECL([], [archive_expsym_cmds], [2])
6158 _LT_TAGDECL([], [module_cmds], [2],
6159 [Commands used to build a loadable module if different from building
6160 a shared archive.])
6161 _LT_TAGDECL([], [module_expsym_cmds], [2])
6162 _LT_TAGDECL([], [with_gnu_ld], [1],
6163 [Whether we are building with GNU ld or not])
6164 _LT_TAGDECL([], [allow_undefined_flag], [1],
6165 [Flag that allows shared libraries with undefined symbols to be built])
6166 _LT_TAGDECL([], [no_undefined_flag], [1],
6167 [Flag that enforces no undefined symbols])
6168 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6169 [Flag to hardcode $libdir into a binary during linking.
6170 This must work even if $libdir does not exist])
6171 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
6172 [Whether we need a single "-rpath" flag with a separated argument])
6173 _LT_TAGDECL([], [hardcode_direct], [0],
6174 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
6175 DIR into the resulting binary])
6176 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
6177 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
6178 DIR into the resulting binary and the resulting library dependency is
6179 "absolute", i.e impossible to change by setting $shlibpath_var if the
6180 library is relocated])
6181 _LT_TAGDECL([], [hardcode_minus_L], [0],
6182 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6183 into the resulting binary])
6184 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6185 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6186 into the resulting binary])
6187 _LT_TAGDECL([], [hardcode_automatic], [0],
6188 [Set to "yes" if building a shared library automatically hardcodes DIR
6189 into the library and all subsequent libraries and executables linked
6190 against it])
6191 _LT_TAGDECL([], [inherit_rpath], [0],
6192 [Set to yes if linker adds runtime paths of dependent libraries
6193 to runtime path list])
6194 _LT_TAGDECL([], [link_all_deplibs], [0],
6195 [Whether libtool must link a program against all its dependency libraries])
6196 _LT_TAGDECL([], [always_export_symbols], [0],
6197 [Set to "yes" if exported symbols are required])
6198 _LT_TAGDECL([], [export_symbols_cmds], [2],
6199 [The commands to list exported symbols])
6200 _LT_TAGDECL([], [exclude_expsyms], [1],
6201 [Symbols that should not be listed in the preloaded symbols])
6202 _LT_TAGDECL([], [include_expsyms], [1],
6203 [Symbols that must always be exported])
6204 _LT_TAGDECL([], [prelink_cmds], [2],
6205 [Commands necessary for linking programs (against libraries) with templates])
6206 _LT_TAGDECL([], [postlink_cmds], [2],
6207 [Commands necessary for finishing linking programs])
6208 _LT_TAGDECL([], [file_list_spec], [1],
6209 [Specify filename containing input files])
6210 dnl FIXME: Not yet implemented
6211 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6212 dnl [Compiler flag to generate thread safe objects])
6213 ])# _LT_LINKER_SHLIBS
6214
6215
6216 # _LT_LANG_C_CONFIG([TAG])
6217 # ------------------------
6218 # Ensure that the configuration variables for a C compiler are suitably
6219 # defined. These variables are subsequently used by _LT_CONFIG to write
6220 # the compiler configuration to 'libtool'.
6221 m4_defun([_LT_LANG_C_CONFIG],
6222 [m4_require([_LT_DECL_EGREP])dnl
6223 lt_save_CC=$CC
6224 AC_LANG_PUSH(C)
6225
6226 # Source file extension for C test sources.
6227 ac_ext=c
6228
6229 # Object file extension for compiled C test sources.
6230 objext=o
6231 _LT_TAGVAR(objext, $1)=$objext
6232
6233 # Code to be used in simple compile tests
6234 lt_simple_compile_test_code="int some_variable = 0;"
6235
6236 # Code to be used in simple link tests
6237 lt_simple_link_test_code='int main(){return(0);}'
6238
6239 _LT_TAG_COMPILER
6240 # Save the default compiler, since it gets overwritten when the other
6241 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6242 compiler_DEFAULT=$CC
6243
6244 # save warnings/boilerplate of simple test code
6245 _LT_COMPILER_BOILERPLATE
6246 _LT_LINKER_BOILERPLATE
6247
6248 ## CAVEAT EMPTOR:
6249 ## There is no encapsulation within the following macros, do not change
6250 ## the running order or otherwise move them around unless you know exactly
6251 ## what you are doing...
6252 if test -n "$compiler"; then
6253 _LT_COMPILER_NO_RTTI($1)
6254 _LT_COMPILER_PIC($1)
6255 _LT_COMPILER_C_O($1)
6256 _LT_COMPILER_FILE_LOCKS($1)
6257 _LT_LINKER_SHLIBS($1)
6258 _LT_SYS_DYNAMIC_LINKER($1)
6259 _LT_LINKER_HARDCODE_LIBPATH($1)
6260 LT_SYS_DLOPEN_SELF
6261 _LT_CMD_STRIPLIB
6262
6263 # Report what library types will actually be built
6264 AC_MSG_CHECKING([if libtool supports shared libraries])
6265 AC_MSG_RESULT([$can_build_shared])
6266
6267 AC_MSG_CHECKING([whether to build shared libraries])
6268 test no = "$can_build_shared" && enable_shared=no
6269
6270 # On AIX, shared libraries and static libraries use the same namespace, and
6271 # are all built from PIC.
6272 case $host_os in
6273 aix3*)
6274 test yes = "$enable_shared" && enable_static=no
6275 if test -n "$RANLIB"; then
6276 archive_cmds="$archive_cmds~\$RANLIB \$lib"
6277 postinstall_cmds='$RANLIB $lib'
6278 fi
6279 ;;
6280
6281 aix[[4-9]]*)
6282 if test ia64 != "$host_cpu"; then
6283 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
6284 yes,aix,yes) ;; # shared object as lib.so file only
6285 yes,svr4,*) ;; # shared object as lib.so archive member only
6286 yes,*) enable_static=no ;; # shared object in lib.a archive as well
6287 esac
6288 fi
6289 ;;
6290 esac
6291 AC_MSG_RESULT([$enable_shared])
6292
6293 AC_MSG_CHECKING([whether to build static libraries])
6294 # Make sure either enable_shared or enable_static is yes.
6295 test yes = "$enable_shared" || enable_static=yes
6296 AC_MSG_RESULT([$enable_static])
6297
6298 _LT_CONFIG($1)
6299 fi
6300 AC_LANG_POP
6301 CC=$lt_save_CC
6302 ])# _LT_LANG_C_CONFIG
6303
6304
6305 # _LT_LANG_CXX_CONFIG([TAG])
6306 # --------------------------
6307 # Ensure that the configuration variables for a C++ compiler are suitably
6308 # defined. These variables are subsequently used by _LT_CONFIG to write
6309 # the compiler configuration to 'libtool'.
6310 m4_defun([_LT_LANG_CXX_CONFIG],
6311 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6312 m4_require([_LT_DECL_EGREP])dnl
6313 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
6314 if test -n "$CXX" && ( test no != "$CXX" &&
6315 ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
6316 (test g++ != "$CXX"))); then
6317 AC_PROG_CXXCPP
6318 else
6319 _lt_caught_CXX_error=yes
6320 fi
6321
6322 AC_LANG_PUSH(C++)
6323 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6324 _LT_TAGVAR(allow_undefined_flag, $1)=
6325 _LT_TAGVAR(always_export_symbols, $1)=no
6326 _LT_TAGVAR(archive_expsym_cmds, $1)=
6327 _LT_TAGVAR(compiler_needs_object, $1)=no
6328 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6329 _LT_TAGVAR(hardcode_direct, $1)=no
6330 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6331 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6332 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6333 _LT_TAGVAR(hardcode_minus_L, $1)=no
6334 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6335 _LT_TAGVAR(hardcode_automatic, $1)=no
6336 _LT_TAGVAR(inherit_rpath, $1)=no
6337 _LT_TAGVAR(module_cmds, $1)=
6338 _LT_TAGVAR(module_expsym_cmds, $1)=
6339 _LT_TAGVAR(link_all_deplibs, $1)=unknown
6340 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6341 _LT_TAGVAR(reload_flag, $1)=$reload_flag
6342 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
6343 _LT_TAGVAR(no_undefined_flag, $1)=
6344 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6345 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6346
6347 # Source file extension for C++ test sources.
6348 ac_ext=cpp
6349
6350 # Object file extension for compiled C++ test sources.
6351 objext=o
6352 _LT_TAGVAR(objext, $1)=$objext
6353
6354 # No sense in running all these tests if we already determined that
6355 # the CXX compiler isn't working. Some variables (like enable_shared)
6356 # are currently assumed to apply to all compilers on this platform,
6357 # and will be corrupted by setting them based on a non-working compiler.
6358 if test yes != "$_lt_caught_CXX_error"; then
6359 # Code to be used in simple compile tests
6360 lt_simple_compile_test_code="int some_variable = 0;"
6361
6362 # Code to be used in simple link tests
6363 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6364
6365 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6366 _LT_TAG_COMPILER
6367
6368 # save warnings/boilerplate of simple test code
6369 _LT_COMPILER_BOILERPLATE
6370 _LT_LINKER_BOILERPLATE
6371
6372 # Allow CC to be a program name with arguments.
6373 lt_save_CC=$CC
6374 lt_save_CFLAGS=$CFLAGS
6375 lt_save_LD=$LD
6376 lt_save_GCC=$GCC
6377 GCC=$GXX
6378 lt_save_with_gnu_ld=$with_gnu_ld
6379 lt_save_path_LD=$lt_cv_path_LD
6380 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6381 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6382 else
6383 $as_unset lt_cv_prog_gnu_ld
6384 fi
6385 if test -n "${lt_cv_path_LDCXX+set}"; then
6386 lt_cv_path_LD=$lt_cv_path_LDCXX
6387 else
6388 $as_unset lt_cv_path_LD
6389 fi
6390 test -z "${LDCXX+set}" || LD=$LDCXX
6391 CC=${CXX-"c++"}
6392 CFLAGS=$CXXFLAGS
6393 compiler=$CC
6394 _LT_TAGVAR(compiler, $1)=$CC
6395 _LT_CC_BASENAME([$compiler])
6396
6397 if test -n "$compiler"; then
6398 # We don't want -fno-exception when compiling C++ code, so set the
6399 # no_builtin_flag separately
6400 if test yes = "$GXX"; then
6401 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6402 else
6403 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6404 fi
6405
6406 if test yes = "$GXX"; then
6407 # Set up default GNU C++ configuration
6408
6409 LT_PATH_LD
6410
6411 # Check if GNU C++ uses GNU ld as the underlying linker, since the
6412 # archiving commands below assume that GNU ld is being used.
6413 if test yes = "$with_gnu_ld"; then
6414 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
6415 _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'
6416
6417 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6418 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
6419
6420 # If archive_cmds runs LD, not CC, wlarc should be empty
6421 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6422 # investigate it a little bit more. (MM)
6423 wlarc='$wl'
6424
6425 # ancient GNU ld didn't support --whole-archive et. al.
6426 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6427 $GREP 'no-whole-archive' > /dev/null; then
6428 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
6429 else
6430 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6431 fi
6432 else
6433 with_gnu_ld=no
6434 wlarc=
6435
6436 # A generic and very simple default shared library creation
6437 # command for GNU C++ for the case where it uses the native
6438 # linker, instead of GNU ld. If possible, this setting should
6439 # overridden to take advantage of the native linker features on
6440 # the platform it is being used on.
6441 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6442 fi
6443
6444 # Commands to make compiler produce verbose output that lists
6445 # what "hidden" libraries, object files and flags are used when
6446 # linking a shared library.
6447 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
6448
6449 else
6450 GXX=no
6451 with_gnu_ld=no
6452 wlarc=
6453 fi
6454
6455 # PORTME: fill in a description of your system's C++ link characteristics
6456 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6457 _LT_TAGVAR(ld_shlibs, $1)=yes
6458 case $host_os in
6459 aix3*)
6460 # FIXME: insert proper C++ library support
6461 _LT_TAGVAR(ld_shlibs, $1)=no
6462 ;;
6463 aix[[4-9]]*)
6464 if test ia64 = "$host_cpu"; then
6465 # On IA64, the linker does run time linking by default, so we don't
6466 # have to do anything special.
6467 aix_use_runtimelinking=no
6468 exp_sym_flag='-Bexport'
6469 no_entry_flag=
6470 else
6471 aix_use_runtimelinking=no
6472
6473 # Test if we are trying to use run time linking or normal
6474 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6475 # have runtime linking enabled, and use it for executables.
6476 # For shared libraries, we enable/disable runtime linking
6477 # depending on the kind of the shared library created -
6478 # when "with_aix_soname,aix_use_runtimelinking" is:
6479 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
6480 # "aix,yes" lib.so shared, rtl:yes, for executables
6481 # lib.a static archive
6482 # "both,no" lib.so.V(shr.o) shared, rtl:yes
6483 # lib.a(lib.so.V) shared, rtl:no, for executables
6484 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
6485 # lib.a(lib.so.V) shared, rtl:no
6486 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
6487 # lib.a static archive
6488 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6489 for ld_flag in $LDFLAGS; do
6490 case $ld_flag in
6491 *-brtl*)
6492 aix_use_runtimelinking=yes
6493 break
6494 ;;
6495 esac
6496 done
6497 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
6498 # With aix-soname=svr4, we create the lib.so.V shared archives only,
6499 # so we don't have lib.a shared libs to link our executables.
6500 # We have to force runtime linking in this case.
6501 aix_use_runtimelinking=yes
6502 LDFLAGS="$LDFLAGS -Wl,-brtl"
6503 fi
6504 ;;
6505 esac
6506
6507 exp_sym_flag='-bexport'
6508 no_entry_flag='-bnoentry'
6509 fi
6510
6511 # When large executables or shared objects are built, AIX ld can
6512 # have problems creating the table of contents. If linking a library
6513 # or program results in "error TOC overflow" add -mminimal-toc to
6514 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6515 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6516
6517 _LT_TAGVAR(archive_cmds, $1)=''
6518 _LT_TAGVAR(hardcode_direct, $1)=yes
6519 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6520 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6521 _LT_TAGVAR(link_all_deplibs, $1)=yes
6522 _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
6523 case $with_aix_soname,$aix_use_runtimelinking in
6524 aix,*) ;; # no import file
6525 svr4,* | *,yes) # use import file
6526 # The Import File defines what to hardcode.
6527 _LT_TAGVAR(hardcode_direct, $1)=no
6528 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6529 ;;
6530 esac
6531
6532 if test yes = "$GXX"; then
6533 case $host_os in aix4.[[012]]|aix4.[[012]].*)
6534 # We only want to do this on AIX 4.2 and lower, the check
6535 # below for broken collect2 doesn't work under 4.3+
6536 collect2name=`$CC -print-prog-name=collect2`
6537 if test -f "$collect2name" &&
6538 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6539 then
6540 # We have reworked collect2
6541 :
6542 else
6543 # We have old collect2
6544 _LT_TAGVAR(hardcode_direct, $1)=unsupported
6545 # It fails to find uninstalled libraries when the uninstalled
6546 # path is not listed in the libpath. Setting hardcode_minus_L
6547 # to unsupported forces relinking
6548 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6549 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6550 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6551 fi
6552 esac
6553 shared_flag='-shared'
6554 if test yes = "$aix_use_runtimelinking"; then
6555 shared_flag=$shared_flag' $wl-G'
6556 fi
6557 # Need to ensure runtime linking is disabled for the traditional
6558 # shared library, or the linker may eventually find shared libraries
6559 # /with/ Import File - we do not want to mix them.
6560 shared_flag_aix='-shared'
6561 shared_flag_svr4='-shared $wl-G'
6562 else
6563 # not using gcc
6564 if test ia64 = "$host_cpu"; then
6565 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6566 # chokes on -Wl,-G. The following line is correct:
6567 shared_flag='-G'
6568 else
6569 if test yes = "$aix_use_runtimelinking"; then
6570 shared_flag='$wl-G'
6571 else
6572 shared_flag='$wl-bM:SRE'
6573 fi
6574 shared_flag_aix='$wl-bM:SRE'
6575 shared_flag_svr4='$wl-G'
6576 fi
6577 fi
6578
6579 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
6580 # It seems that -bexpall does not export symbols beginning with
6581 # underscore (_), so it is better to generate a list of symbols to
6582 # export.
6583 _LT_TAGVAR(always_export_symbols, $1)=yes
6584 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
6585 # Warning - without using the other runtime loading flags (-brtl),
6586 # -berok will link without error, but may produce a broken library.
6587 # The "-G" linker flag allows undefined symbols.
6588 _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
6589 # Determine the default libpath from the value encoded in an empty
6590 # executable.
6591 _LT_SYS_MODULE_PATH_AIX([$1])
6592 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
6593
6594 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
6595 else
6596 if test ia64 = "$host_cpu"; then
6597 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
6598 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6599 _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"
6600 else
6601 # Determine the default libpath from the value encoded in an
6602 # empty executable.
6603 _LT_SYS_MODULE_PATH_AIX([$1])
6604 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
6605 # Warning - without using the other run time loading flags,
6606 # -berok will link without error, but may produce a broken library.
6607 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
6608 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
6609 if test yes = "$with_gnu_ld"; then
6610 # We only use this code for GNU lds that support --whole-archive.
6611 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
6612 else
6613 # Exported symbols can be pulled into shared objects from archives
6614 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6615 fi
6616 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6617 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
6618 # -brtl affects multiple linker settings, -berok does not and is overridden later
6619 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
6620 if test svr4 != "$with_aix_soname"; then
6621 # This is similar to how AIX traditionally builds its shared
6622 # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
6623 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
6624 fi
6625 if test aix != "$with_aix_soname"; then
6626 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
6627 else
6628 # used by -dlpreopen to get the symbols
6629 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
6630 fi
6631 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
6632 fi
6633 fi
6634 ;;
6635
6636 beos*)
6637 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6638 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6639 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6640 # support --undefined. This deserves some investigation. FIXME
6641 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6642 else
6643 _LT_TAGVAR(ld_shlibs, $1)=no
6644 fi
6645 ;;
6646
6647 chorus*)
6648 case $cc_basename in
6649 *)
6650 # FIXME: insert proper C++ library support
6651 _LT_TAGVAR(ld_shlibs, $1)=no
6652 ;;
6653 esac
6654 ;;
6655
6656 cygwin* | mingw* | pw32* | cegcc*)
6657 case $GXX,$cc_basename in
6658 ,cl* | no,cl*)
6659 # Native MSVC
6660 # hardcode_libdir_flag_spec is actually meaningless, as there is
6661 # no search path for DLLs.
6662 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6663 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6664 _LT_TAGVAR(always_export_symbols, $1)=yes
6665 _LT_TAGVAR(file_list_spec, $1)='@'
6666 # Tell ltmain to make .lib files, not .a files.
6667 libext=lib
6668 # Tell ltmain to make .dll files, not .so files.
6669 shrext_cmds=.dll
6670 # FIXME: Setting linknames here is a bad hack.
6671 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
6672 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
6673 cp "$export_symbols" "$output_objdir/$soname.def";
6674 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
6675 else
6676 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
6677 fi~
6678 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6679 linknames='
6680 # The linker will not automatically build a static lib if we build a DLL.
6681 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6682 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6683 # Don't use ranlib
6684 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6685 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6686 lt_tool_outputfile="@TOOL_OUTPUT@"~
6687 case $lt_outputfile in
6688 *.exe|*.EXE) ;;
6689 *)
6690 lt_outputfile=$lt_outputfile.exe
6691 lt_tool_outputfile=$lt_tool_outputfile.exe
6692 ;;
6693 esac~
6694 func_to_tool_file "$lt_outputfile"~
6695 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
6696 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6697 $RM "$lt_outputfile.manifest";
6698 fi'
6699 ;;
6700 *)
6701 # g++
6702 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6703 # as there is no search path for DLLs.
6704 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6705 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
6706 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6707 _LT_TAGVAR(always_export_symbols, $1)=no
6708 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6709
6710 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6711 _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'
6712 # If the export-symbols file already is a .def file, use it as
6713 # is; otherwise, prepend EXPORTS...
6714 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
6715 cp $export_symbols $output_objdir/$soname.def;
6716 else
6717 echo EXPORTS > $output_objdir/$soname.def;
6718 cat $export_symbols >> $output_objdir/$soname.def;
6719 fi~
6720 $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'
6721 else
6722 _LT_TAGVAR(ld_shlibs, $1)=no
6723 fi
6724 ;;
6725 esac
6726 ;;
6727 darwin* | rhapsody*)
6728 _LT_DARWIN_LINKER_FEATURES($1)
6729 ;;
6730
6731 os2*)
6732 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6733 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6734 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6735 shrext_cmds=.dll
6736 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6737 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6738 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6739 $ECHO EXPORTS >> $output_objdir/$libname.def~
6740 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
6741 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6742 emximp -o $lib $output_objdir/$libname.def'
6743 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6744 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6745 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6746 $ECHO EXPORTS >> $output_objdir/$libname.def~
6747 prefix_cmds="$SED"~
6748 if test EXPORTS = "`$SED 1q $export_symbols`"; then
6749 prefix_cmds="$prefix_cmds -e 1d";
6750 fi~
6751 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
6752 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
6753 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6754 emximp -o $lib $output_objdir/$libname.def'
6755 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
6756 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6757 ;;
6758
6759 dgux*)
6760 case $cc_basename in
6761 ec++*)
6762 # FIXME: insert proper C++ library support
6763 _LT_TAGVAR(ld_shlibs, $1)=no
6764 ;;
6765 ghcx*)
6766 # Green Hills C++ Compiler
6767 # FIXME: insert proper C++ library support
6768 _LT_TAGVAR(ld_shlibs, $1)=no
6769 ;;
6770 *)
6771 # FIXME: insert proper C++ library support
6772 _LT_TAGVAR(ld_shlibs, $1)=no
6773 ;;
6774 esac
6775 ;;
6776
6777 freebsd2.*)
6778 # C++ shared libraries reported to be fairly broken before
6779 # switch to ELF
6780 _LT_TAGVAR(ld_shlibs, $1)=no
6781 ;;
6782
6783 freebsd-elf*)
6784 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6785 ;;
6786
6787 freebsd* | dragonfly*)
6788 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6789 # conventions
6790 _LT_TAGVAR(ld_shlibs, $1)=yes
6791 ;;
6792
6793 haiku*)
6794 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6795 _LT_TAGVAR(link_all_deplibs, $1)=yes
6796 ;;
6797
6798 hpux9*)
6799 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
6800 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6801 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6802 _LT_TAGVAR(hardcode_direct, $1)=yes
6803 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6804 # but as the default
6805 # location of the library.
6806
6807 case $cc_basename in
6808 CC*)
6809 # FIXME: insert proper C++ library support
6810 _LT_TAGVAR(ld_shlibs, $1)=no
6811 ;;
6812 aCC*)
6813 _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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
6814 # Commands to make compiler produce verbose output that lists
6815 # what "hidden" libraries, object files and flags are used when
6816 # linking a shared library.
6817 #
6818 # There doesn't appear to be a way to prevent this compiler from
6819 # explicitly linking system object files so we need to strip them
6820 # from the output so that they don't get included in the library
6821 # dependencies.
6822 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"'
6823 ;;
6824 *)
6825 if test yes = "$GXX"; then
6826 _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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
6827 else
6828 # FIXME: insert proper C++ library support
6829 _LT_TAGVAR(ld_shlibs, $1)=no
6830 fi
6831 ;;
6832 esac
6833 ;;
6834
6835 hpux10*|hpux11*)
6836 if test no = "$with_gnu_ld"; then
6837 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
6838 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6839
6840 case $host_cpu in
6841 hppa*64*|ia64*)
6842 ;;
6843 *)
6844 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6845 ;;
6846 esac
6847 fi
6848 case $host_cpu in
6849 hppa*64*|ia64*)
6850 _LT_TAGVAR(hardcode_direct, $1)=no
6851 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6852 ;;
6853 *)
6854 _LT_TAGVAR(hardcode_direct, $1)=yes
6855 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6856 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6857 # but as the default
6858 # location of the library.
6859 ;;
6860 esac
6861
6862 case $cc_basename in
6863 CC*)
6864 # FIXME: insert proper C++ library support
6865 _LT_TAGVAR(ld_shlibs, $1)=no
6866 ;;
6867 aCC*)
6868 case $host_cpu in
6869 hppa*64*)
6870 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6871 ;;
6872 ia64*)
6873 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6874 ;;
6875 *)
6876 _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'
6877 ;;
6878 esac
6879 # Commands to make compiler produce verbose output that lists
6880 # what "hidden" libraries, object files and flags are used when
6881 # linking a shared library.
6882 #
6883 # There doesn't appear to be a way to prevent this compiler from
6884 # explicitly linking system object files so we need to strip them
6885 # from the output so that they don't get included in the library
6886 # dependencies.
6887 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"'
6888 ;;
6889 *)
6890 if test yes = "$GXX"; then
6891 if test no = "$with_gnu_ld"; then
6892 case $host_cpu in
6893 hppa*64*)
6894 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6895 ;;
6896 ia64*)
6897 _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'
6898 ;;
6899 *)
6900 _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'
6901 ;;
6902 esac
6903 fi
6904 else
6905 # FIXME: insert proper C++ library support
6906 _LT_TAGVAR(ld_shlibs, $1)=no
6907 fi
6908 ;;
6909 esac
6910 ;;
6911
6912 interix[[3-9]]*)
6913 _LT_TAGVAR(hardcode_direct, $1)=no
6914 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6915 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6916 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6917 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6918 # Instead, shared libraries are loaded at an image base (0x10000000 by
6919 # default) and relocated if they conflict, which is a slow very memory
6920 # consuming and fragmenting process. To avoid this, we pick a random,
6921 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6922 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
6923 _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'
6924 _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'
6925 ;;
6926 irix5* | irix6*)
6927 case $cc_basename in
6928 CC*)
6929 # SGI C++
6930 _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'
6931
6932 # Archives containing C++ object files must be created using
6933 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
6934 # necessary to make sure instantiated templates are included
6935 # in the archive.
6936 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6937 ;;
6938 *)
6939 if test yes = "$GXX"; then
6940 if test no = "$with_gnu_ld"; then
6941 _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'
6942 else
6943 _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'
6944 fi
6945 fi
6946 _LT_TAGVAR(link_all_deplibs, $1)=yes
6947 ;;
6948 esac
6949 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6950 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6951 _LT_TAGVAR(inherit_rpath, $1)=yes
6952 ;;
6953
6954 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
6955 case $cc_basename in
6956 KCC*)
6957 # Kuck and Associates, Inc. (KAI) C++ Compiler
6958
6959 # KCC will only create a shared library if the output file
6960 # ends with ".so" (or ".sl" for HP-UX), so rename the library
6961 # to its proper name (with version) after linking.
6962 _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'
6963 _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'
6964 # Commands to make compiler produce verbose output that lists
6965 # what "hidden" libraries, object files and flags are used when
6966 # linking a shared library.
6967 #
6968 # There doesn't appear to be a way to prevent this compiler from
6969 # explicitly linking system object files so we need to strip them
6970 # from the output so that they don't get included in the library
6971 # dependencies.
6972 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"'
6973
6974 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6975 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
6976
6977 # Archives containing C++ object files must be created using
6978 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6979 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6980 ;;
6981 icpc* | ecpc* )
6982 # Intel C++
6983 with_gnu_ld=yes
6984 # version 8.0 and above of icpc choke on multiply defined symbols
6985 # if we add $predep_objects and $postdep_objects, however 7.1 and
6986 # earlier do not add the objects themselves.
6987 case `$CC -V 2>&1` in
6988 *"Version 7."*)
6989 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
6990 _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'
6991 ;;
6992 *) # Version 8.0 or newer
6993 tmp_idyn=
6994 case $host_cpu in
6995 ia64*) tmp_idyn=' -i_dynamic';;
6996 esac
6997 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6998 _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'
6999 ;;
7000 esac
7001 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7002 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7003 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7004 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
7005 ;;
7006 pgCC* | pgcpp*)
7007 # Portland Group C++ compiler
7008 case `$CC -V` in
7009 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
7010 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7011 rm -rf $tpldir~
7012 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7013 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
7014 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7015 rm -rf $tpldir~
7016 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7017 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
7018 $RANLIB $oldlib'
7019 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7020 rm -rf $tpldir~
7021 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7022 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7023 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7024 rm -rf $tpldir~
7025 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7026 $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'
7027 ;;
7028 *) # Version 6 and above use weak symbols
7029 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7030 _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'
7031 ;;
7032 esac
7033
7034 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
7035 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7036 _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'
7037 ;;
7038 cxx*)
7039 # Compaq C++
7040 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7041 _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'
7042
7043 runpath_var=LD_RUN_PATH
7044 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7045 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7046
7047 # Commands to make compiler produce verbose output that lists
7048 # what "hidden" libraries, object files and flags are used when
7049 # linking a shared library.
7050 #
7051 # There doesn't appear to be a way to prevent this compiler from
7052 # explicitly linking system object files so we need to strip them
7053 # from the output so that they don't get included in the library
7054 # dependencies.
7055 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'
7056 ;;
7057 xl* | mpixl* | bgxl*)
7058 # IBM XL 8.0 on PPC, with GNU ld
7059 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7060 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7061 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7062 if test yes = "$supports_anon_versioning"; then
7063 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7064 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7065 echo "local: *; };" >> $output_objdir/$libname.ver~
7066 $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
7067 fi
7068 ;;
7069 *)
7070 case `$CC -V 2>&1 | sed 5q` in
7071 *Sun\ C*)
7072 # Sun C++ 5.9
7073 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7074 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7075 _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'
7076 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7077 _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'
7078 _LT_TAGVAR(compiler_needs_object, $1)=yes
7079
7080 # Not sure whether something based on
7081 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7082 # would be better.
7083 output_verbose_link_cmd='func_echo_all'
7084
7085 # Archives containing C++ object files must be created using
7086 # "CC -xar", where "CC" is the Sun C++ compiler. This is
7087 # necessary to make sure instantiated templates are included
7088 # in the archive.
7089 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7090 ;;
7091 esac
7092 ;;
7093 esac
7094 ;;
7095
7096 lynxos*)
7097 # FIXME: insert proper C++ library support
7098 _LT_TAGVAR(ld_shlibs, $1)=no
7099 ;;
7100
7101 m88k*)
7102 # FIXME: insert proper C++ library support
7103 _LT_TAGVAR(ld_shlibs, $1)=no
7104 ;;
7105
7106 mvs*)
7107 case $cc_basename in
7108 cxx*)
7109 # FIXME: insert proper C++ library support
7110 _LT_TAGVAR(ld_shlibs, $1)=no
7111 ;;
7112 *)
7113 # FIXME: insert proper C++ library support
7114 _LT_TAGVAR(ld_shlibs, $1)=no
7115 ;;
7116 esac
7117 ;;
7118
7119 netbsd*)
7120 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7121 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7122 wlarc=
7123 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7124 _LT_TAGVAR(hardcode_direct, $1)=yes
7125 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7126 fi
7127 # Workaround some broken pre-1.5 toolchains
7128 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7129 ;;
7130
7131 *nto* | *qnx*)
7132 _LT_TAGVAR(ld_shlibs, $1)=yes
7133 ;;
7134
7135 openbsd* | bitrig*)
7136 if test -f /usr/libexec/ld.so; then
7137 _LT_TAGVAR(hardcode_direct, $1)=yes
7138 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7139 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7140 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7141 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7142 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
7143 _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'
7144 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
7145 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
7146 fi
7147 output_verbose_link_cmd=func_echo_all
7148 else
7149 _LT_TAGVAR(ld_shlibs, $1)=no
7150 fi
7151 ;;
7152
7153 osf3* | osf4* | osf5*)
7154 case $cc_basename in
7155 KCC*)
7156 # Kuck and Associates, Inc. (KAI) C++ Compiler
7157
7158 # KCC will only create a shared library if the output file
7159 # ends with ".so" (or ".sl" for HP-UX), so rename the library
7160 # to its proper name (with version) after linking.
7161 _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'
7162
7163 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7164 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7165
7166 # Archives containing C++ object files must be created using
7167 # the KAI C++ compiler.
7168 case $host in
7169 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7170 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7171 esac
7172 ;;
7173 RCC*)
7174 # Rational C++ 2.4.1
7175 # FIXME: insert proper C++ library support
7176 _LT_TAGVAR(ld_shlibs, $1)=no
7177 ;;
7178 cxx*)
7179 case $host in
7180 osf3*)
7181 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7182 _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'
7183 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7184 ;;
7185 *)
7186 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7187 _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'
7188 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7189 echo "-hidden">> $lib.exp~
7190 $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~
7191 $RM $lib.exp'
7192 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7193 ;;
7194 esac
7195
7196 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7197
7198 # Commands to make compiler produce verbose output that lists
7199 # what "hidden" libraries, object files and flags are used when
7200 # linking a shared library.
7201 #
7202 # There doesn't appear to be a way to prevent this compiler from
7203 # explicitly linking system object files so we need to strip them
7204 # from the output so that they don't get included in the library
7205 # dependencies.
7206 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"'
7207 ;;
7208 *)
7209 if test yes,no = "$GXX,$with_gnu_ld"; then
7210 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7211 case $host in
7212 osf3*)
7213 _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'
7214 ;;
7215 *)
7216 _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'
7217 ;;
7218 esac
7219
7220 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7221 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7222
7223 # Commands to make compiler produce verbose output that lists
7224 # what "hidden" libraries, object files and flags are used when
7225 # linking a shared library.
7226 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
7227
7228 else
7229 # FIXME: insert proper C++ library support
7230 _LT_TAGVAR(ld_shlibs, $1)=no
7231 fi
7232 ;;
7233 esac
7234 ;;
7235
7236 psos*)
7237 # FIXME: insert proper C++ library support
7238 _LT_TAGVAR(ld_shlibs, $1)=no
7239 ;;
7240
7241 sunos4*)
7242 case $cc_basename in
7243 CC*)
7244 # Sun C++ 4.x
7245 # FIXME: insert proper C++ library support
7246 _LT_TAGVAR(ld_shlibs, $1)=no
7247 ;;
7248 lcc*)
7249 # Lucid
7250 # FIXME: insert proper C++ library support
7251 _LT_TAGVAR(ld_shlibs, $1)=no
7252 ;;
7253 *)
7254 # FIXME: insert proper C++ library support
7255 _LT_TAGVAR(ld_shlibs, $1)=no
7256 ;;
7257 esac
7258 ;;
7259
7260 solaris*)
7261 case $cc_basename in
7262 CC* | sunCC*)
7263 # Sun C++ 4.2, 5.x and Centerline C++
7264 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7265 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7266 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7267 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7268 $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'
7269
7270 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7271 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7272 case $host_os in
7273 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7274 *)
7275 # The compiler driver will combine and reorder linker options,
7276 # but understands '-z linker_flag'.
7277 # Supported since Solaris 2.6 (maybe 2.5.1?)
7278 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7279 ;;
7280 esac
7281 _LT_TAGVAR(link_all_deplibs, $1)=yes
7282
7283 output_verbose_link_cmd='func_echo_all'
7284
7285 # Archives containing C++ object files must be created using
7286 # "CC -xar", where "CC" is the Sun C++ compiler. This is
7287 # necessary to make sure instantiated templates are included
7288 # in the archive.
7289 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7290 ;;
7291 gcx*)
7292 # Green Hills C++ Compiler
7293 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7294
7295 # The C++ compiler must be used to create the archive.
7296 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7297 ;;
7298 *)
7299 # GNU C++ compiler with Solaris linker
7300 if test yes,no = "$GXX,$with_gnu_ld"; then
7301 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
7302 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7303 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7304 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7305 $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7306
7307 # Commands to make compiler produce verbose output that lists
7308 # what "hidden" libraries, object files and flags are used when
7309 # linking a shared library.
7310 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
7311 else
7312 # g++ 2.7 appears to require '-G' NOT '-shared' on this
7313 # platform.
7314 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7315 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7316 $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7317
7318 # Commands to make compiler produce verbose output that lists
7319 # what "hidden" libraries, object files and flags are used when
7320 # linking a shared library.
7321 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
7322 fi
7323
7324 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
7325 case $host_os in
7326 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7327 *)
7328 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
7329 ;;
7330 esac
7331 fi
7332 ;;
7333 esac
7334 ;;
7335
7336 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7337 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
7338 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7339 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7340 runpath_var='LD_RUN_PATH'
7341
7342 case $cc_basename in
7343 CC*)
7344 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7345 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7346 ;;
7347 *)
7348 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7349 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7350 ;;
7351 esac
7352 ;;
7353
7354 sysv5* | sco3.2v5* | sco5v6*)
7355 # Note: We CANNOT use -z defs as we might desire, because we do not
7356 # link with -lc, and that would cause any symbols used from libc to
7357 # always be unresolved, which means just about no library would
7358 # ever link correctly. If we're not using GNU ld we use -z text
7359 # though, which does catch some bad symbols but isn't as heavy-handed
7360 # as -z defs.
7361 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
7362 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
7363 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7364 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7365 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
7366 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7367 _LT_TAGVAR(link_all_deplibs, $1)=yes
7368 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
7369 runpath_var='LD_RUN_PATH'
7370
7371 case $cc_basename in
7372 CC*)
7373 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7374 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7375 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
7376 '"$_LT_TAGVAR(old_archive_cmds, $1)"
7377 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
7378 '"$_LT_TAGVAR(reload_cmds, $1)"
7379 ;;
7380 *)
7381 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7382 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7383 ;;
7384 esac
7385 ;;
7386
7387 tandem*)
7388 case $cc_basename in
7389 NCC*)
7390 # NonStop-UX NCC 3.20
7391 # FIXME: insert proper C++ library support
7392 _LT_TAGVAR(ld_shlibs, $1)=no
7393 ;;
7394 *)
7395 # FIXME: insert proper C++ library support
7396 _LT_TAGVAR(ld_shlibs, $1)=no
7397 ;;
7398 esac
7399 ;;
7400
7401 vxworks*)
7402 # FIXME: insert proper C++ library support
7403 _LT_TAGVAR(ld_shlibs, $1)=no
7404 ;;
7405
7406 *)
7407 # FIXME: insert proper C++ library support
7408 _LT_TAGVAR(ld_shlibs, $1)=no
7409 ;;
7410 esac
7411
7412 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7413 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
7414
7415 _LT_TAGVAR(GCC, $1)=$GXX
7416 _LT_TAGVAR(LD, $1)=$LD
7417
7418 ## CAVEAT EMPTOR:
7419 ## There is no encapsulation within the following macros, do not change
7420 ## the running order or otherwise move them around unless you know exactly
7421 ## what you are doing...
7422 _LT_SYS_HIDDEN_LIBDEPS($1)
7423 _LT_COMPILER_PIC($1)
7424 _LT_COMPILER_C_O($1)
7425 _LT_COMPILER_FILE_LOCKS($1)
7426 _LT_LINKER_SHLIBS($1)
7427 _LT_SYS_DYNAMIC_LINKER($1)
7428 _LT_LINKER_HARDCODE_LIBPATH($1)
7429
7430 _LT_CONFIG($1)
7431 fi # test -n "$compiler"
7432
7433 CC=$lt_save_CC
7434 CFLAGS=$lt_save_CFLAGS
7435 LDCXX=$LD
7436 LD=$lt_save_LD
7437 GCC=$lt_save_GCC
7438 with_gnu_ld=$lt_save_with_gnu_ld
7439 lt_cv_path_LDCXX=$lt_cv_path_LD
7440 lt_cv_path_LD=$lt_save_path_LD
7441 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7442 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7443 fi # test yes != "$_lt_caught_CXX_error"
7444
7445 AC_LANG_POP
7446 ])# _LT_LANG_CXX_CONFIG
7447
7448
7449 # _LT_FUNC_STRIPNAME_CNF
7450 # ----------------------
7451 # func_stripname_cnf prefix suffix name
7452 # strip PREFIX and SUFFIX off of NAME.
7453 # PREFIX and SUFFIX must not contain globbing or regex special
7454 # characters, hashes, percent signs, but SUFFIX may contain a leading
7455 # dot (in which case that matches only a dot).
7456 #
7457 # This function is identical to the (non-XSI) version of func_stripname,
7458 # except this one can be used by m4 code that may be executed by configure,
7459 # rather than the libtool script.
7460 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
7461 AC_REQUIRE([_LT_DECL_SED])
7462 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
7463 func_stripname_cnf ()
7464 {
7465 case @S|@2 in
7466 .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
7467 *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
7468 esac
7469 } # func_stripname_cnf
7470 ])# _LT_FUNC_STRIPNAME_CNF
7471
7472
7473 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7474 # ---------------------------------
7475 # Figure out "hidden" library dependencies from verbose
7476 # compiler output when linking a shared library.
7477 # Parse the compiler output and extract the necessary
7478 # objects, libraries and library flags.
7479 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7480 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7481 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
7482 # Dependencies to place before and after the object being linked:
7483 _LT_TAGVAR(predep_objects, $1)=
7484 _LT_TAGVAR(postdep_objects, $1)=
7485 _LT_TAGVAR(predeps, $1)=
7486 _LT_TAGVAR(postdeps, $1)=
7487 _LT_TAGVAR(compiler_lib_search_path, $1)=
7488
7489 dnl we can't use the lt_simple_compile_test_code here,
7490 dnl because it contains code intended for an executable,
7491 dnl not a library. It's possible we should let each
7492 dnl tag define a new lt_????_link_test_code variable,
7493 dnl but it's only used here...
7494 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7495 int a;
7496 void foo (void) { a = 0; }
7497 _LT_EOF
7498 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7499 class Foo
7500 {
7501 public:
7502 Foo (void) { a = 0; }
7503 private:
7504 int a;
7505 };
7506 _LT_EOF
7507 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7508 subroutine foo
7509 implicit none
7510 integer*4 a
7511 a=0
7512 return
7513 end
7514 _LT_EOF
7515 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7516 subroutine foo
7517 implicit none
7518 integer a
7519 a=0
7520 return
7521 end
7522 _LT_EOF
7523 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7524 public class foo {
7525 private int a;
7526 public void bar (void) {
7527 a = 0;
7528 }
7529 };
7530 _LT_EOF
7531 ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
7532 package foo
7533 func foo() {
7534 }
7535 _LT_EOF
7536 ])
7537
7538 _lt_libdeps_save_CFLAGS=$CFLAGS
7539 case "$CC $CFLAGS " in #(
7540 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
7541 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
7542 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
7543 esac
7544
7545 dnl Parse the compiler output and extract the necessary
7546 dnl objects, libraries and library flags.
7547 if AC_TRY_EVAL(ac_compile); then
7548 # Parse the compiler output and extract the necessary
7549 # objects, libraries and library flags.
7550
7551 # Sentinel used to keep track of whether or not we are before
7552 # the conftest object file.
7553 pre_test_object_deps_done=no
7554
7555 for p in `eval "$output_verbose_link_cmd"`; do
7556 case $prev$p in
7557
7558 -L* | -R* | -l*)
7559 # Some compilers place space between "-{L,R}" and the path.
7560 # Remove the space.
7561 if test x-L = "$p" ||
7562 test x-R = "$p"; then
7563 prev=$p
7564 continue
7565 fi
7566
7567 # Expand the sysroot to ease extracting the directories later.
7568 if test -z "$prev"; then
7569 case $p in
7570 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
7571 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
7572 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
7573 esac
7574 fi
7575 case $p in
7576 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
7577 esac
7578 if test no = "$pre_test_object_deps_done"; then
7579 case $prev in
7580 -L | -R)
7581 # Internal compiler library paths should come after those
7582 # provided the user. The postdeps already come after the
7583 # user supplied libs so there is no need to process them.
7584 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7585 _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
7586 else
7587 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
7588 fi
7589 ;;
7590 # The "-l" case would never come before the object being
7591 # linked, so don't bother handling this case.
7592 esac
7593 else
7594 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7595 _LT_TAGVAR(postdeps, $1)=$prev$p
7596 else
7597 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
7598 fi
7599 fi
7600 prev=
7601 ;;
7602
7603 *.lto.$objext) ;; # Ignore GCC LTO objects
7604 *.$objext)
7605 # This assumes that the test object file only shows up
7606 # once in the compiler output.
7607 if test "$p" = "conftest.$objext"; then
7608 pre_test_object_deps_done=yes
7609 continue
7610 fi
7611
7612 if test no = "$pre_test_object_deps_done"; then
7613 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7614 _LT_TAGVAR(predep_objects, $1)=$p
7615 else
7616 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7617 fi
7618 else
7619 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7620 _LT_TAGVAR(postdep_objects, $1)=$p
7621 else
7622 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7623 fi
7624 fi
7625 ;;
7626
7627 *) ;; # Ignore the rest.
7628
7629 esac
7630 done
7631
7632 # Clean up.
7633 rm -f a.out a.exe
7634 else
7635 echo "libtool.m4: error: problem compiling $1 test program"
7636 fi
7637
7638 $RM -f confest.$objext
7639 CFLAGS=$_lt_libdeps_save_CFLAGS
7640
7641 # PORTME: override above test on systems where it is broken
7642 m4_if([$1], [CXX],
7643 [case $host_os in
7644 interix[[3-9]]*)
7645 # Interix 3.5 installs completely hosed .la files for C++, so rather than
7646 # hack all around it, let's just trust "g++" to DTRT.
7647 _LT_TAGVAR(predep_objects,$1)=
7648 _LT_TAGVAR(postdep_objects,$1)=
7649 _LT_TAGVAR(postdeps,$1)=
7650 ;;
7651 esac
7652 ])
7653
7654 case " $_LT_TAGVAR(postdeps, $1) " in
7655 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7656 esac
7657 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7658 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7659 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
7660 fi
7661 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7662 [The directories searched by this compiler when creating a shared library])
7663 _LT_TAGDECL([], [predep_objects], [1],
7664 [Dependencies to place before and after the objects being linked to
7665 create a shared library])
7666 _LT_TAGDECL([], [postdep_objects], [1])
7667 _LT_TAGDECL([], [predeps], [1])
7668 _LT_TAGDECL([], [postdeps], [1])
7669 _LT_TAGDECL([], [compiler_lib_search_path], [1],
7670 [The library search path used internally by the compiler when linking
7671 a shared library])
7672 ])# _LT_SYS_HIDDEN_LIBDEPS
7673
7674
7675 # _LT_LANG_F77_CONFIG([TAG])
7676 # --------------------------
7677 # Ensure that the configuration variables for a Fortran 77 compiler are
7678 # suitably defined. These variables are subsequently used by _LT_CONFIG
7679 # to write the compiler configuration to 'libtool'.
7680 m4_defun([_LT_LANG_F77_CONFIG],
7681 [AC_LANG_PUSH(Fortran 77)
7682 if test -z "$F77" || test no = "$F77"; then
7683 _lt_disable_F77=yes
7684 fi
7685
7686 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7687 _LT_TAGVAR(allow_undefined_flag, $1)=
7688 _LT_TAGVAR(always_export_symbols, $1)=no
7689 _LT_TAGVAR(archive_expsym_cmds, $1)=
7690 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7691 _LT_TAGVAR(hardcode_direct, $1)=no
7692 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7693 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7694 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7695 _LT_TAGVAR(hardcode_minus_L, $1)=no
7696 _LT_TAGVAR(hardcode_automatic, $1)=no
7697 _LT_TAGVAR(inherit_rpath, $1)=no
7698 _LT_TAGVAR(module_cmds, $1)=
7699 _LT_TAGVAR(module_expsym_cmds, $1)=
7700 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7701 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7702 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7703 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7704 _LT_TAGVAR(no_undefined_flag, $1)=
7705 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7706 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7707
7708 # Source file extension for f77 test sources.
7709 ac_ext=f
7710
7711 # Object file extension for compiled f77 test sources.
7712 objext=o
7713 _LT_TAGVAR(objext, $1)=$objext
7714
7715 # No sense in running all these tests if we already determined that
7716 # the F77 compiler isn't working. Some variables (like enable_shared)
7717 # are currently assumed to apply to all compilers on this platform,
7718 # and will be corrupted by setting them based on a non-working compiler.
7719 if test yes != "$_lt_disable_F77"; then
7720 # Code to be used in simple compile tests
7721 lt_simple_compile_test_code="\
7722 subroutine t
7723 return
7724 end
7725 "
7726
7727 # Code to be used in simple link tests
7728 lt_simple_link_test_code="\
7729 program t
7730 end
7731 "
7732
7733 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7734 _LT_TAG_COMPILER
7735
7736 # save warnings/boilerplate of simple test code
7737 _LT_COMPILER_BOILERPLATE
7738 _LT_LINKER_BOILERPLATE
7739
7740 # Allow CC to be a program name with arguments.
7741 lt_save_CC=$CC
7742 lt_save_GCC=$GCC
7743 lt_save_CFLAGS=$CFLAGS
7744 CC=${F77-"f77"}
7745 CFLAGS=$FFLAGS
7746 compiler=$CC
7747 _LT_TAGVAR(compiler, $1)=$CC
7748 _LT_CC_BASENAME([$compiler])
7749 GCC=$G77
7750 if test -n "$compiler"; then
7751 AC_MSG_CHECKING([if libtool supports shared libraries])
7752 AC_MSG_RESULT([$can_build_shared])
7753
7754 AC_MSG_CHECKING([whether to build shared libraries])
7755 test no = "$can_build_shared" && enable_shared=no
7756
7757 # On AIX, shared libraries and static libraries use the same namespace, and
7758 # are all built from PIC.
7759 case $host_os in
7760 aix3*)
7761 test yes = "$enable_shared" && enable_static=no
7762 if test -n "$RANLIB"; then
7763 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7764 postinstall_cmds='$RANLIB $lib'
7765 fi
7766 ;;
7767 aix[[4-9]]*)
7768 if test ia64 != "$host_cpu"; then
7769 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
7770 yes,aix,yes) ;; # shared object as lib.so file only
7771 yes,svr4,*) ;; # shared object as lib.so archive member only
7772 yes,*) enable_static=no ;; # shared object in lib.a archive as well
7773 esac
7774 fi
7775 ;;
7776 esac
7777 AC_MSG_RESULT([$enable_shared])
7778
7779 AC_MSG_CHECKING([whether to build static libraries])
7780 # Make sure either enable_shared or enable_static is yes.
7781 test yes = "$enable_shared" || enable_static=yes
7782 AC_MSG_RESULT([$enable_static])
7783
7784 _LT_TAGVAR(GCC, $1)=$G77
7785 _LT_TAGVAR(LD, $1)=$LD
7786
7787 ## CAVEAT EMPTOR:
7788 ## There is no encapsulation within the following macros, do not change
7789 ## the running order or otherwise move them around unless you know exactly
7790 ## what you are doing...
7791 _LT_COMPILER_PIC($1)
7792 _LT_COMPILER_C_O($1)
7793 _LT_COMPILER_FILE_LOCKS($1)
7794 _LT_LINKER_SHLIBS($1)
7795 _LT_SYS_DYNAMIC_LINKER($1)
7796 _LT_LINKER_HARDCODE_LIBPATH($1)
7797
7798 _LT_CONFIG($1)
7799 fi # test -n "$compiler"
7800
7801 GCC=$lt_save_GCC
7802 CC=$lt_save_CC
7803 CFLAGS=$lt_save_CFLAGS
7804 fi # test yes != "$_lt_disable_F77"
7805
7806 AC_LANG_POP
7807 ])# _LT_LANG_F77_CONFIG
7808
7809
7810 # _LT_LANG_FC_CONFIG([TAG])
7811 # -------------------------
7812 # Ensure that the configuration variables for a Fortran compiler are
7813 # suitably defined. These variables are subsequently used by _LT_CONFIG
7814 # to write the compiler configuration to 'libtool'.
7815 m4_defun([_LT_LANG_FC_CONFIG],
7816 [AC_LANG_PUSH(Fortran)
7817
7818 if test -z "$FC" || test no = "$FC"; then
7819 _lt_disable_FC=yes
7820 fi
7821
7822 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7823 _LT_TAGVAR(allow_undefined_flag, $1)=
7824 _LT_TAGVAR(always_export_symbols, $1)=no
7825 _LT_TAGVAR(archive_expsym_cmds, $1)=
7826 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7827 _LT_TAGVAR(hardcode_direct, $1)=no
7828 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7829 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7830 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7831 _LT_TAGVAR(hardcode_minus_L, $1)=no
7832 _LT_TAGVAR(hardcode_automatic, $1)=no
7833 _LT_TAGVAR(inherit_rpath, $1)=no
7834 _LT_TAGVAR(module_cmds, $1)=
7835 _LT_TAGVAR(module_expsym_cmds, $1)=
7836 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7837 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7838 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7839 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7840 _LT_TAGVAR(no_undefined_flag, $1)=
7841 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7842 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7843
7844 # Source file extension for fc test sources.
7845 ac_ext=${ac_fc_srcext-f}
7846
7847 # Object file extension for compiled fc test sources.
7848 objext=o
7849 _LT_TAGVAR(objext, $1)=$objext
7850
7851 # No sense in running all these tests if we already determined that
7852 # the FC compiler isn't working. Some variables (like enable_shared)
7853 # are currently assumed to apply to all compilers on this platform,
7854 # and will be corrupted by setting them based on a non-working compiler.
7855 if test yes != "$_lt_disable_FC"; then
7856 # Code to be used in simple compile tests
7857 lt_simple_compile_test_code="\
7858 subroutine t
7859 return
7860 end
7861 "
7862
7863 # Code to be used in simple link tests
7864 lt_simple_link_test_code="\
7865 program t
7866 end
7867 "
7868
7869 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7870 _LT_TAG_COMPILER
7871
7872 # save warnings/boilerplate of simple test code
7873 _LT_COMPILER_BOILERPLATE
7874 _LT_LINKER_BOILERPLATE
7875
7876 # Allow CC to be a program name with arguments.
7877 lt_save_CC=$CC
7878 lt_save_GCC=$GCC
7879 lt_save_CFLAGS=$CFLAGS
7880 CC=${FC-"f95"}
7881 CFLAGS=$FCFLAGS
7882 compiler=$CC
7883 GCC=$ac_cv_fc_compiler_gnu
7884
7885 _LT_TAGVAR(compiler, $1)=$CC
7886 _LT_CC_BASENAME([$compiler])
7887
7888 if test -n "$compiler"; then
7889 AC_MSG_CHECKING([if libtool supports shared libraries])
7890 AC_MSG_RESULT([$can_build_shared])
7891
7892 AC_MSG_CHECKING([whether to build shared libraries])
7893 test no = "$can_build_shared" && enable_shared=no
7894
7895 # On AIX, shared libraries and static libraries use the same namespace, and
7896 # are all built from PIC.
7897 case $host_os in
7898 aix3*)
7899 test yes = "$enable_shared" && enable_static=no
7900 if test -n "$RANLIB"; then
7901 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7902 postinstall_cmds='$RANLIB $lib'
7903 fi
7904 ;;
7905 aix[[4-9]]*)
7906 if test ia64 != "$host_cpu"; then
7907 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
7908 yes,aix,yes) ;; # shared object as lib.so file only
7909 yes,svr4,*) ;; # shared object as lib.so archive member only
7910 yes,*) enable_static=no ;; # shared object in lib.a archive as well
7911 esac
7912 fi
7913 ;;
7914 esac
7915 AC_MSG_RESULT([$enable_shared])
7916
7917 AC_MSG_CHECKING([whether to build static libraries])
7918 # Make sure either enable_shared or enable_static is yes.
7919 test yes = "$enable_shared" || enable_static=yes
7920 AC_MSG_RESULT([$enable_static])
7921
7922 _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
7923 _LT_TAGVAR(LD, $1)=$LD
7924
7925 ## CAVEAT EMPTOR:
7926 ## There is no encapsulation within the following macros, do not change
7927 ## the running order or otherwise move them around unless you know exactly
7928 ## what you are doing...
7929 _LT_SYS_HIDDEN_LIBDEPS($1)
7930 _LT_COMPILER_PIC($1)
7931 _LT_COMPILER_C_O($1)
7932 _LT_COMPILER_FILE_LOCKS($1)
7933 _LT_LINKER_SHLIBS($1)
7934 _LT_SYS_DYNAMIC_LINKER($1)
7935 _LT_LINKER_HARDCODE_LIBPATH($1)
7936
7937 _LT_CONFIG($1)
7938 fi # test -n "$compiler"
7939
7940 GCC=$lt_save_GCC
7941 CC=$lt_save_CC
7942 CFLAGS=$lt_save_CFLAGS
7943 fi # test yes != "$_lt_disable_FC"
7944
7945 AC_LANG_POP
7946 ])# _LT_LANG_FC_CONFIG
7947
7948
7949 # _LT_LANG_GCJ_CONFIG([TAG])
7950 # --------------------------
7951 # Ensure that the configuration variables for the GNU Java Compiler compiler
7952 # are suitably defined. These variables are subsequently used by _LT_CONFIG
7953 # to write the compiler configuration to 'libtool'.
7954 m4_defun([_LT_LANG_GCJ_CONFIG],
7955 [AC_REQUIRE([LT_PROG_GCJ])dnl
7956 AC_LANG_SAVE
7957
7958 # Source file extension for Java test sources.
7959 ac_ext=java
7960
7961 # Object file extension for compiled Java test sources.
7962 objext=o
7963 _LT_TAGVAR(objext, $1)=$objext
7964
7965 # Code to be used in simple compile tests
7966 lt_simple_compile_test_code="class foo {}"
7967
7968 # Code to be used in simple link tests
7969 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7970
7971 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7972 _LT_TAG_COMPILER
7973
7974 # save warnings/boilerplate of simple test code
7975 _LT_COMPILER_BOILERPLATE
7976 _LT_LINKER_BOILERPLATE
7977
7978 # Allow CC to be a program name with arguments.
7979 lt_save_CC=$CC
7980 lt_save_CFLAGS=$CFLAGS
7981 lt_save_GCC=$GCC
7982 GCC=yes
7983 CC=${GCJ-"gcj"}
7984 CFLAGS=$GCJFLAGS
7985 compiler=$CC
7986 _LT_TAGVAR(compiler, $1)=$CC
7987 _LT_TAGVAR(LD, $1)=$LD
7988 _LT_CC_BASENAME([$compiler])
7989
7990 # GCJ did not exist at the time GCC didn't implicitly link libc in.
7991 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7992
7993 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7994 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7995 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7996
7997 ## CAVEAT EMPTOR:
7998 ## There is no encapsulation within the following macros, do not change
7999 ## the running order or otherwise move them around unless you know exactly
8000 ## what you are doing...
8001 if test -n "$compiler"; then
8002 _LT_COMPILER_NO_RTTI($1)
8003 _LT_COMPILER_PIC($1)
8004 _LT_COMPILER_C_O($1)
8005 _LT_COMPILER_FILE_LOCKS($1)
8006 _LT_LINKER_SHLIBS($1)
8007 _LT_LINKER_HARDCODE_LIBPATH($1)
8008
8009 _LT_CONFIG($1)
8010 fi
8011
8012 AC_LANG_RESTORE
8013
8014 GCC=$lt_save_GCC
8015 CC=$lt_save_CC
8016 CFLAGS=$lt_save_CFLAGS
8017 ])# _LT_LANG_GCJ_CONFIG
8018
8019
8020 # _LT_LANG_GO_CONFIG([TAG])
8021 # --------------------------
8022 # Ensure that the configuration variables for the GNU Go compiler
8023 # are suitably defined. These variables are subsequently used by _LT_CONFIG
8024 # to write the compiler configuration to 'libtool'.
8025 m4_defun([_LT_LANG_GO_CONFIG],
8026 [AC_REQUIRE([LT_PROG_GO])dnl
8027 AC_LANG_SAVE
8028
8029 # Source file extension for Go test sources.
8030 ac_ext=go
8031
8032 # Object file extension for compiled Go test sources.
8033 objext=o
8034 _LT_TAGVAR(objext, $1)=$objext
8035
8036 # Code to be used in simple compile tests
8037 lt_simple_compile_test_code="package main; func main() { }"
8038
8039 # Code to be used in simple link tests
8040 lt_simple_link_test_code='package main; func main() { }'
8041
8042 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8043 _LT_TAG_COMPILER
8044
8045 # save warnings/boilerplate of simple test code
8046 _LT_COMPILER_BOILERPLATE
8047 _LT_LINKER_BOILERPLATE
8048
8049 # Allow CC to be a program name with arguments.
8050 lt_save_CC=$CC
8051 lt_save_CFLAGS=$CFLAGS
8052 lt_save_GCC=$GCC
8053 GCC=yes
8054 CC=${GOC-"gccgo"}
8055 CFLAGS=$GOFLAGS
8056 compiler=$CC
8057 _LT_TAGVAR(compiler, $1)=$CC
8058 _LT_TAGVAR(LD, $1)=$LD
8059 _LT_CC_BASENAME([$compiler])
8060
8061 # Go did not exist at the time GCC didn't implicitly link libc in.
8062 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8063
8064 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8065 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8066 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8067
8068 ## CAVEAT EMPTOR:
8069 ## There is no encapsulation within the following macros, do not change
8070 ## the running order or otherwise move them around unless you know exactly
8071 ## what you are doing...
8072 if test -n "$compiler"; then
8073 _LT_COMPILER_NO_RTTI($1)
8074 _LT_COMPILER_PIC($1)
8075 _LT_COMPILER_C_O($1)
8076 _LT_COMPILER_FILE_LOCKS($1)
8077 _LT_LINKER_SHLIBS($1)
8078 _LT_LINKER_HARDCODE_LIBPATH($1)
8079
8080 _LT_CONFIG($1)
8081 fi
8082
8083 AC_LANG_RESTORE
8084
8085 GCC=$lt_save_GCC
8086 CC=$lt_save_CC
8087 CFLAGS=$lt_save_CFLAGS
8088 ])# _LT_LANG_GO_CONFIG
8089
8090
8091 # _LT_LANG_RC_CONFIG([TAG])
8092 # -------------------------
8093 # Ensure that the configuration variables for the Windows resource compiler
8094 # are suitably defined. These variables are subsequently used by _LT_CONFIG
8095 # to write the compiler configuration to 'libtool'.
8096 m4_defun([_LT_LANG_RC_CONFIG],
8097 [AC_REQUIRE([LT_PROG_RC])dnl
8098 AC_LANG_SAVE
8099
8100 # Source file extension for RC test sources.
8101 ac_ext=rc
8102
8103 # Object file extension for compiled RC test sources.
8104 objext=o
8105 _LT_TAGVAR(objext, $1)=$objext
8106
8107 # Code to be used in simple compile tests
8108 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8109
8110 # Code to be used in simple link tests
8111 lt_simple_link_test_code=$lt_simple_compile_test_code
8112
8113 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8114 _LT_TAG_COMPILER
8115
8116 # save warnings/boilerplate of simple test code
8117 _LT_COMPILER_BOILERPLATE
8118 _LT_LINKER_BOILERPLATE
8119
8120 # Allow CC to be a program name with arguments.
8121 lt_save_CC=$CC
8122 lt_save_CFLAGS=$CFLAGS
8123 lt_save_GCC=$GCC
8124 GCC=
8125 CC=${RC-"windres"}
8126 CFLAGS=
8127 compiler=$CC
8128 _LT_TAGVAR(compiler, $1)=$CC
8129 _LT_CC_BASENAME([$compiler])
8130 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8131
8132 if test -n "$compiler"; then
8133 :
8134 _LT_CONFIG($1)
8135 fi
8136
8137 GCC=$lt_save_GCC
8138 AC_LANG_RESTORE
8139 CC=$lt_save_CC
8140 CFLAGS=$lt_save_CFLAGS
8141 ])# _LT_LANG_RC_CONFIG
8142
8143
8144 # LT_PROG_GCJ
8145 # -----------
8146 AC_DEFUN([LT_PROG_GCJ],
8147 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8148 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8149 [AC_CHECK_TOOL(GCJ, gcj,)
8150 test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
8151 AC_SUBST(GCJFLAGS)])])[]dnl
8152 ])
8153
8154 # Old name:
8155 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8156 dnl aclocal-1.4 backwards compatibility:
8157 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8158
8159
8160 # LT_PROG_GO
8161 # ----------
8162 AC_DEFUN([LT_PROG_GO],
8163 [AC_CHECK_TOOL(GOC, gccgo,)
8164 ])
8165
8166
8167 # LT_PROG_RC
8168 # ----------
8169 AC_DEFUN([LT_PROG_RC],
8170 [AC_CHECK_TOOL(RC, windres,)
8171 ])
8172
8173 # Old name:
8174 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8175 dnl aclocal-1.4 backwards compatibility:
8176 dnl AC_DEFUN([LT_AC_PROG_RC], [])
8177
8178
8179 # _LT_DECL_EGREP
8180 # --------------
8181 # If we don't have a new enough Autoconf to choose the best grep
8182 # available, choose the one first in the user's PATH.
8183 m4_defun([_LT_DECL_EGREP],
8184 [AC_REQUIRE([AC_PROG_EGREP])dnl
8185 AC_REQUIRE([AC_PROG_FGREP])dnl
8186 test -z "$GREP" && GREP=grep
8187 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8188 _LT_DECL([], [EGREP], [1], [An ERE matcher])
8189 _LT_DECL([], [FGREP], [1], [A literal string matcher])
8190 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8191 AC_SUBST([GREP])
8192 ])
8193
8194
8195 # _LT_DECL_OBJDUMP
8196 # --------------
8197 # If we don't have a new enough Autoconf to choose the best objdump
8198 # available, choose the one first in the user's PATH.
8199 m4_defun([_LT_DECL_OBJDUMP],
8200 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
8201 test -z "$OBJDUMP" && OBJDUMP=objdump
8202 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8203 AC_SUBST([OBJDUMP])
8204 ])
8205
8206 # _LT_DECL_DLLTOOL
8207 # ----------------
8208 # Ensure DLLTOOL variable is set.
8209 m4_defun([_LT_DECL_DLLTOOL],
8210 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8211 test -z "$DLLTOOL" && DLLTOOL=dlltool
8212 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
8213 AC_SUBST([DLLTOOL])
8214 ])
8215
8216 # _LT_DECL_SED
8217 # ------------
8218 # Check for a fully-functional sed program, that truncates
8219 # as few characters as possible. Prefer GNU sed if found.
8220 m4_defun([_LT_DECL_SED],
8221 [AC_PROG_SED
8222 test -z "$SED" && SED=sed
8223 Xsed="$SED -e 1s/^X//"
8224 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8225 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8226 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8227 ])# _LT_DECL_SED
8228
8229 m4_ifndef([AC_PROG_SED], [
8230 ############################################################
8231 # NOTE: This macro has been submitted for inclusion into #
8232 # GNU Autoconf as AC_PROG_SED. When it is available in #
8233 # a released version of Autoconf we should remove this #
8234 # macro and use it instead. #
8235 ############################################################
8236
8237 m4_defun([AC_PROG_SED],
8238 [AC_MSG_CHECKING([for a sed that does not truncate output])
8239 AC_CACHE_VAL(lt_cv_path_SED,
8240 [# Loop through the user's path and test for sed and gsed.
8241 # Then use that list of sed's as ones to test for truncation.
8242 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8243 for as_dir in $PATH
8244 do
8245 IFS=$as_save_IFS
8246 test -z "$as_dir" && as_dir=.
8247 for lt_ac_prog in sed gsed; do
8248 for ac_exec_ext in '' $ac_executable_extensions; do
8249 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8250 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8251 fi
8252 done
8253 done
8254 done
8255 IFS=$as_save_IFS
8256 lt_ac_max=0
8257 lt_ac_count=0
8258 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
8259 # along with /bin/sed that truncates output.
8260 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8261 test ! -f "$lt_ac_sed" && continue
8262 cat /dev/null > conftest.in
8263 lt_ac_count=0
8264 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8265 # Check for GNU sed and select it if it is found.
8266 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8267 lt_cv_path_SED=$lt_ac_sed
8268 break
8269 fi
8270 while true; do
8271 cat conftest.in conftest.in >conftest.tmp
8272 mv conftest.tmp conftest.in
8273 cp conftest.in conftest.nl
8274 echo >>conftest.nl
8275 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8276 cmp -s conftest.out conftest.nl || break
8277 # 10000 chars as input seems more than enough
8278 test 10 -lt "$lt_ac_count" && break
8279 lt_ac_count=`expr $lt_ac_count + 1`
8280 if test "$lt_ac_count" -gt "$lt_ac_max"; then
8281 lt_ac_max=$lt_ac_count
8282 lt_cv_path_SED=$lt_ac_sed
8283 fi
8284 done
8285 done
8286 ])
8287 SED=$lt_cv_path_SED
8288 AC_SUBST([SED])
8289 AC_MSG_RESULT([$SED])
8290 ])#AC_PROG_SED
8291 ])#m4_ifndef
8292
8293 # Old name:
8294 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8295 dnl aclocal-1.4 backwards compatibility:
8296 dnl AC_DEFUN([LT_AC_PROG_SED], [])
8297
8298
8299 # _LT_CHECK_SHELL_FEATURES
8300 # ------------------------
8301 # Find out whether the shell is Bourne or XSI compatible,
8302 # or has some other useful features.
8303 m4_defun([_LT_CHECK_SHELL_FEATURES],
8304 [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8305 lt_unset=unset
8306 else
8307 lt_unset=false
8308 fi
8309 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8310
8311 # test EBCDIC or ASCII
8312 case `echo X|tr X '\101'` in
8313 A) # ASCII based system
8314 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8315 lt_SP2NL='tr \040 \012'
8316 lt_NL2SP='tr \015\012 \040\040'
8317 ;;
8318 *) # EBCDIC based system
8319 lt_SP2NL='tr \100 \n'
8320 lt_NL2SP='tr \r\n \100\100'
8321 ;;
8322 esac
8323 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8324 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8325 ])# _LT_CHECK_SHELL_FEATURES
8326
8327
8328 # _LT_PATH_CONVERSION_FUNCTIONS
8329 # -----------------------------
8330 # Determine what file name conversion functions should be used by
8331 # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
8332 # for certain cross-compile configurations and native mingw.
8333 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
8334 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
8335 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
8336 AC_MSG_CHECKING([how to convert $build file names to $host format])
8337 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
8338 [case $host in
8339 *-*-mingw* )
8340 case $build in
8341 *-*-mingw* ) # actually msys
8342 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8343 ;;
8344 *-*-cygwin* )
8345 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8346 ;;
8347 * ) # otherwise, assume *nix
8348 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8349 ;;
8350 esac
8351 ;;
8352 *-*-cygwin* )
8353 case $build in
8354 *-*-mingw* ) # actually msys
8355 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8356 ;;
8357 *-*-cygwin* )
8358 lt_cv_to_host_file_cmd=func_convert_file_noop
8359 ;;
8360 * ) # otherwise, assume *nix
8361 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8362 ;;
8363 esac
8364 ;;
8365 * ) # unhandled hosts (and "normal" native builds)
8366 lt_cv_to_host_file_cmd=func_convert_file_noop
8367 ;;
8368 esac
8369 ])
8370 to_host_file_cmd=$lt_cv_to_host_file_cmd
8371 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
8372 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
8373 [0], [convert $build file names to $host format])dnl
8374
8375 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
8376 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
8377 [#assume ordinary cross tools, or native build.
8378 lt_cv_to_tool_file_cmd=func_convert_file_noop
8379 case $host in
8380 *-*-mingw* )
8381 case $build in
8382 *-*-mingw* ) # actually msys
8383 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8384 ;;
8385 esac
8386 ;;
8387 esac
8388 ])
8389 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
8390 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
8391 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
8392 [0], [convert $build files to toolchain format])dnl
8393 ])# _LT_PATH_CONVERSION_FUNCTIONS
0 # Helper functions for option handling. -*- Autoconf -*-
1 #
2 # Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
3 # Foundation, Inc.
4 # Written by Gary V. Vaughan, 2004
5 #
6 # This file is free software; the Free Software Foundation gives
7 # unlimited permission to copy and/or distribute it, with or without
8 # modifications, as long as this notice is preserved.
9
10 # serial 8 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 _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
85 [_LT_WITH_AIX_SONAME([aix])])
86 ])
87 ])# _LT_SET_OPTIONS
88
89
90 ## --------------------------------- ##
91 ## Macros to handle LT_INIT options. ##
92 ## --------------------------------- ##
93
94 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
95 # -----------------------------------------
96 m4_define([_LT_MANGLE_DEFUN],
97 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
98
99
100 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
101 # -----------------------------------------------
102 m4_define([LT_OPTION_DEFINE],
103 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
104 ])# LT_OPTION_DEFINE
105
106
107 # dlopen
108 # ------
109 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
110 ])
111
112 AU_DEFUN([AC_LIBTOOL_DLOPEN],
113 [_LT_SET_OPTION([LT_INIT], [dlopen])
114 AC_DIAGNOSE([obsolete],
115 [$0: Remove this warning and the call to _LT_SET_OPTION when you
116 put the 'dlopen' option into LT_INIT's first parameter.])
117 ])
118
119 dnl aclocal-1.4 backwards compatibility:
120 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
121
122
123 # win32-dll
124 # ---------
125 # Declare package support for building win32 dll's.
126 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
127 [enable_win32_dll=yes
128
129 case $host in
130 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
131 AC_CHECK_TOOL(AS, as, false)
132 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
133 AC_CHECK_TOOL(OBJDUMP, objdump, false)
134 ;;
135 esac
136
137 test -z "$AS" && AS=as
138 _LT_DECL([], [AS], [1], [Assembler program])dnl
139
140 test -z "$DLLTOOL" && DLLTOOL=dlltool
141 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
142
143 test -z "$OBJDUMP" && OBJDUMP=objdump
144 _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
145 ])# win32-dll
146
147 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
148 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
149 _LT_SET_OPTION([LT_INIT], [win32-dll])
150 AC_DIAGNOSE([obsolete],
151 [$0: Remove this warning and the call to _LT_SET_OPTION when you
152 put the 'win32-dll' option into LT_INIT's first parameter.])
153 ])
154
155 dnl aclocal-1.4 backwards compatibility:
156 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
157
158
159 # _LT_ENABLE_SHARED([DEFAULT])
160 # ----------------------------
161 # implement the --enable-shared flag, and supports the 'shared' and
162 # 'disable-shared' LT_INIT options.
163 # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
164 m4_define([_LT_ENABLE_SHARED],
165 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
166 AC_ARG_ENABLE([shared],
167 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
168 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
169 [p=${PACKAGE-default}
170 case $enableval in
171 yes) enable_shared=yes ;;
172 no) enable_shared=no ;;
173 *)
174 enable_shared=no
175 # Look at the argument we got. We use all the common list separators.
176 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
177 for pkg in $enableval; do
178 IFS=$lt_save_ifs
179 if test "X$pkg" = "X$p"; then
180 enable_shared=yes
181 fi
182 done
183 IFS=$lt_save_ifs
184 ;;
185 esac],
186 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
187
188 _LT_DECL([build_libtool_libs], [enable_shared], [0],
189 [Whether or not to build shared libraries])
190 ])# _LT_ENABLE_SHARED
191
192 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
193 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
194
195 # Old names:
196 AC_DEFUN([AC_ENABLE_SHARED],
197 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
198 ])
199
200 AC_DEFUN([AC_DISABLE_SHARED],
201 [_LT_SET_OPTION([LT_INIT], [disable-shared])
202 ])
203
204 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
205 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
206
207 dnl aclocal-1.4 backwards compatibility:
208 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
209 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
210
211
212
213 # _LT_ENABLE_STATIC([DEFAULT])
214 # ----------------------------
215 # implement the --enable-static flag, and support the 'static' and
216 # 'disable-static' LT_INIT options.
217 # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
218 m4_define([_LT_ENABLE_STATIC],
219 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
220 AC_ARG_ENABLE([static],
221 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
222 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
223 [p=${PACKAGE-default}
224 case $enableval in
225 yes) enable_static=yes ;;
226 no) enable_static=no ;;
227 *)
228 enable_static=no
229 # Look at the argument we got. We use all the common list separators.
230 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
231 for pkg in $enableval; do
232 IFS=$lt_save_ifs
233 if test "X$pkg" = "X$p"; then
234 enable_static=yes
235 fi
236 done
237 IFS=$lt_save_ifs
238 ;;
239 esac],
240 [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
241
242 _LT_DECL([build_old_libs], [enable_static], [0],
243 [Whether or not to build static libraries])
244 ])# _LT_ENABLE_STATIC
245
246 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
247 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
248
249 # Old names:
250 AC_DEFUN([AC_ENABLE_STATIC],
251 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
252 ])
253
254 AC_DEFUN([AC_DISABLE_STATIC],
255 [_LT_SET_OPTION([LT_INIT], [disable-static])
256 ])
257
258 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
259 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
260
261 dnl aclocal-1.4 backwards compatibility:
262 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
263 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
264
265
266
267 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
268 # ----------------------------------
269 # implement the --enable-fast-install flag, and support the 'fast-install'
270 # and 'disable-fast-install' LT_INIT options.
271 # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
272 m4_define([_LT_ENABLE_FAST_INSTALL],
273 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
274 AC_ARG_ENABLE([fast-install],
275 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
276 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
277 [p=${PACKAGE-default}
278 case $enableval in
279 yes) enable_fast_install=yes ;;
280 no) enable_fast_install=no ;;
281 *)
282 enable_fast_install=no
283 # Look at the argument we got. We use all the common list separators.
284 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
285 for pkg in $enableval; do
286 IFS=$lt_save_ifs
287 if test "X$pkg" = "X$p"; then
288 enable_fast_install=yes
289 fi
290 done
291 IFS=$lt_save_ifs
292 ;;
293 esac],
294 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
295
296 _LT_DECL([fast_install], [enable_fast_install], [0],
297 [Whether or not to optimize for fast installation])dnl
298 ])# _LT_ENABLE_FAST_INSTALL
299
300 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
301 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
302
303 # Old names:
304 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
305 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
306 AC_DIAGNOSE([obsolete],
307 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
308 the 'fast-install' option into LT_INIT's first parameter.])
309 ])
310
311 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
312 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
313 AC_DIAGNOSE([obsolete],
314 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
315 the 'disable-fast-install' option into LT_INIT's first parameter.])
316 ])
317
318 dnl aclocal-1.4 backwards compatibility:
319 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
320 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
321
322
323 # _LT_WITH_AIX_SONAME([DEFAULT])
324 # ----------------------------------
325 # implement the --with-aix-soname flag, and support the `aix-soname=aix'
326 # and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
327 # is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'.
328 m4_define([_LT_WITH_AIX_SONAME],
329 [m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
330 shared_archive_member_spec=
331 case $host,$enable_shared in
332 power*-*-aix[[5-9]]*,yes)
333 AC_MSG_CHECKING([which variant of shared library versioning to provide])
334 AC_ARG_WITH([aix-soname],
335 [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
336 [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
337 [case $withval in
338 aix|svr4|both)
339 ;;
340 *)
341 AC_MSG_ERROR([Unknown argument to --with-aix-soname])
342 ;;
343 esac
344 lt_cv_with_aix_soname=$with_aix_soname],
345 [AC_CACHE_VAL([lt_cv_with_aix_soname],
346 [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
347 with_aix_soname=$lt_cv_with_aix_soname])
348 AC_MSG_RESULT([$with_aix_soname])
349 if test aix != "$with_aix_soname"; then
350 # For the AIX way of multilib, we name the shared archive member
351 # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
352 # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
353 # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
354 # the AIX toolchain works better with OBJECT_MODE set (default 32).
355 if test 64 = "${OBJECT_MODE-32}"; then
356 shared_archive_member_spec=shr_64
357 else
358 shared_archive_member_spec=shr
359 fi
360 fi
361 ;;
362 *)
363 with_aix_soname=aix
364 ;;
365 esac
366
367 _LT_DECL([], [shared_archive_member_spec], [0],
368 [Shared archive member basename, for filename based shared library versioning on AIX])dnl
369 ])# _LT_WITH_AIX_SONAME
370
371 LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
372 LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
373 LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
374
375
376 # _LT_WITH_PIC([MODE])
377 # --------------------
378 # implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
379 # LT_INIT options.
380 # MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'.
381 m4_define([_LT_WITH_PIC],
382 [AC_ARG_WITH([pic],
383 [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
384 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
385 [lt_p=${PACKAGE-default}
386 case $withval in
387 yes|no) pic_mode=$withval ;;
388 *)
389 pic_mode=default
390 # Look at the argument we got. We use all the common list separators.
391 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
392 for lt_pkg in $withval; do
393 IFS=$lt_save_ifs
394 if test "X$lt_pkg" = "X$lt_p"; then
395 pic_mode=yes
396 fi
397 done
398 IFS=$lt_save_ifs
399 ;;
400 esac],
401 [pic_mode=m4_default([$1], [default])])
402
403 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
404 ])# _LT_WITH_PIC
405
406 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
407 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
408
409 # Old name:
410 AU_DEFUN([AC_LIBTOOL_PICMODE],
411 [_LT_SET_OPTION([LT_INIT], [pic-only])
412 AC_DIAGNOSE([obsolete],
413 [$0: Remove this warning and the call to _LT_SET_OPTION when you
414 put the 'pic-only' option into LT_INIT's first parameter.])
415 ])
416
417 dnl aclocal-1.4 backwards compatibility:
418 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
419
420 ## ----------------- ##
421 ## LTDL_INIT Options ##
422 ## ----------------- ##
423
424 m4_define([_LTDL_MODE], [])
425 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
426 [m4_define([_LTDL_MODE], [nonrecursive])])
427 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
428 [m4_define([_LTDL_MODE], [recursive])])
429 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
430 [m4_define([_LTDL_MODE], [subproject])])
431
432 m4_define([_LTDL_TYPE], [])
433 LT_OPTION_DEFINE([LTDL_INIT], [installable],
434 [m4_define([_LTDL_TYPE], [installable])])
435 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
436 [m4_define([_LTDL_TYPE], [convenience])])
0 # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
1 #
2 # Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
3 # Foundation, Inc.
4 # Written by Gary V. Vaughan, 2004
5 #
6 # This file is free software; the Free Software Foundation gives
7 # unlimited permission to copy and/or distribute it, with or without
8 # modifications, as long as this notice is preserved.
9
10 # serial 6 ltsugar.m4
11
12 # This is to help aclocal find these macros, as it can't see m4_define.
13 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
14
15
16 # lt_join(SEP, ARG1, [ARG2...])
17 # -----------------------------
18 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
19 # associated separator.
20 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
21 # versions in m4sugar had bugs.
22 m4_define([lt_join],
23 [m4_if([$#], [1], [],
24 [$#], [2], [[$2]],
25 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
26 m4_define([_lt_join],
27 [m4_if([$#$2], [2], [],
28 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
29
30
31 # lt_car(LIST)
32 # lt_cdr(LIST)
33 # ------------
34 # Manipulate m4 lists.
35 # These macros are necessary as long as will still need to support
36 # Autoconf-2.59, which quotes differently.
37 m4_define([lt_car], [[$1]])
38 m4_define([lt_cdr],
39 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
40 [$#], 1, [],
41 [m4_dquote(m4_shift($@))])])
42 m4_define([lt_unquote], $1)
43
44
45 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
46 # ------------------------------------------
47 # Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
48 # Note that neither SEPARATOR nor STRING are expanded; they are appended
49 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
50 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
51 # than defined and empty).
52 #
53 # This macro is needed until we can rely on Autoconf 2.62, since earlier
54 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
55 m4_define([lt_append],
56 [m4_define([$1],
57 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
58
59
60
61 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
62 # ----------------------------------------------------------
63 # Produce a SEP delimited list of all paired combinations of elements of
64 # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
65 # has the form PREFIXmINFIXSUFFIXn.
66 # Needed until we can rely on m4_combine added in Autoconf 2.62.
67 m4_define([lt_combine],
68 [m4_if(m4_eval([$# > 3]), [1],
69 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
70 [[m4_foreach([_Lt_prefix], [$2],
71 [m4_foreach([_Lt_suffix],
72 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
73 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
74
75
76 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
77 # -----------------------------------------------------------------------
78 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
79 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
80 m4_define([lt_if_append_uniq],
81 [m4_ifdef([$1],
82 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
83 [lt_append([$1], [$2], [$3])$4],
84 [$5])],
85 [lt_append([$1], [$2], [$3])$4])])
86
87
88 # lt_dict_add(DICT, KEY, VALUE)
89 # -----------------------------
90 m4_define([lt_dict_add],
91 [m4_define([$1($2)], [$3])])
92
93
94 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
95 # --------------------------------------------
96 m4_define([lt_dict_add_subkey],
97 [m4_define([$1($2:$3)], [$4])])
98
99
100 # lt_dict_fetch(DICT, KEY, [SUBKEY])
101 # ----------------------------------
102 m4_define([lt_dict_fetch],
103 [m4_ifval([$3],
104 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
105 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
106
107
108 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
109 # -----------------------------------------------------------------
110 m4_define([lt_if_dict_fetch],
111 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
112 [$5],
113 [$6])])
114
115
116 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
117 # --------------------------------------------------------------
118 m4_define([lt_dict_filter],
119 [m4_if([$5], [], [],
120 [lt_join(m4_quote(m4_default([$4], [[, ]])),
121 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
122 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
123 ])
0 # ltversion.m4 -- version numbers -*- Autoconf -*-
1 #
2 # Copyright (C) 2004, 2011-2015 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 4179 ltversion.m4
12 # This file is part of GNU Libtool
13
14 m4_define([LT_PACKAGE_VERSION], [2.4.6])
15 m4_define([LT_PACKAGE_REVISION], [2.4.6])
16
17 AC_DEFUN([LTVERSION_VERSION],
18 [macro_version='2.4.6'
19 macro_revision='2.4.6'
20 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
21 _LT_DECL(, macro_revision, 0)
22 ])
0 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
1 #
2 # Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
3 # Foundation, Inc.
4 # Written by Scott James Remnant, 2004.
5 #
6 # This file is free software; the Free Software Foundation gives
7 # unlimited permission to copy and/or distribute it, with or without
8 # modifications, as long as this notice is preserved.
9
10 # serial 5 lt~obsolete.m4
11
12 # These exist entirely to fool aclocal when bootstrapping libtool.
13 #
14 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
15 # which have later been changed to m4_define as they aren't part of the
16 # exported API, or moved to Autoconf or Automake where they belong.
17 #
18 # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
19 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
20 # using a macro with the same name in our local m4/libtool.m4 it'll
21 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
22 # and doesn't know about Autoconf macros at all.)
23 #
24 # So we provide this file, which has a silly filename so it's always
25 # included after everything else. This provides aclocal with the
26 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
27 # because those macros already exist, or will be overwritten later.
28 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
29 #
30 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
31 # Yes, that means every name once taken will need to remain here until
32 # we give up compatibility with versions before 1.7, at which point
33 # we need to keep only those names which we still refer to.
34
35 # This is to help aclocal find these macros, as it can't see m4_define.
36 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
37
38 m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
39 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
40 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
41 m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
42 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
43 m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
44 m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
45 m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
46 m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
47 m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
48 m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
49 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
50 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
51 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
52 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
53 m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
54 m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
55 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
56 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
57 m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
58 m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
59 m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
60 m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
61 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
62 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
63 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
64 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
65 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
66 m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
67 m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
68 m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
69 m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
70 m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
71 m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
72 m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
73 m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
74 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
75 m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
76 m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
77 m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
78 m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
79 m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
80 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
81 m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
82 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
83 m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
84 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
85 m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
86 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
87 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
88 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
89 m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
90 m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
91 m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
92 m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
93 m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
94 m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
95 m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
96 m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
97 m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
98 m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
0 # nls.m4 serial 5 (gettext-0.18)
1 dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016 Free Software
2 dnl Foundation, Inc.
3 dnl This file is free software; the Free Software Foundation
4 dnl gives unlimited permission to copy and/or distribute it,
5 dnl with or without modifications, as long as this notice is preserved.
6 dnl
7 dnl This file can be used in projects which are not available under
8 dnl the GNU General Public License or the GNU Library General Public
9 dnl License but which still want to provide support for the GNU gettext
10 dnl functionality.
11 dnl Please note that the actual code of the GNU gettext library is covered
12 dnl by the GNU Library General Public License, and the rest of the GNU
13 dnl gettext package is covered by the GNU General Public License.
14 dnl They are *not* in the public domain.
15
16 dnl Authors:
17 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
18 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
19
20 AC_PREREQ([2.50])
21
22 AC_DEFUN([AM_NLS],
23 [
24 AC_MSG_CHECKING([whether NLS is requested])
25 dnl Default is enabled NLS
26 AC_ARG_ENABLE([nls],
27 [ --disable-nls do not use Native Language Support],
28 USE_NLS=$enableval, USE_NLS=yes)
29 AC_MSG_RESULT([$USE_NLS])
30 AC_SUBST([USE_NLS])
31 ])
0 # po.m4 serial 24 (gettext-0.19)
1 dnl Copyright (C) 1995-2014, 2016 Free Software Foundation, Inc.
2 dnl This file is free software; the Free Software Foundation
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5 dnl
6 dnl This file can be used in projects which are not available under
7 dnl the GNU General Public License or the GNU Library General Public
8 dnl License but which still want to provide support for the GNU gettext
9 dnl functionality.
10 dnl Please note that the actual code of the GNU gettext library is covered
11 dnl by the GNU Library General Public License, and the rest of the GNU
12 dnl gettext package is covered by the GNU General Public License.
13 dnl They are *not* in the public domain.
14
15 dnl Authors:
16 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
17 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
18
19 AC_PREREQ([2.60])
20
21 dnl Checks for all prerequisites of the po subdirectory.
22 AC_DEFUN([AM_PO_SUBDIRS],
23 [
24 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
25 AC_REQUIRE([AC_PROG_INSTALL])dnl
26 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
27 AC_REQUIRE([AC_PROG_SED])dnl
28 AC_REQUIRE([AM_NLS])dnl
29
30 dnl Release version of the gettext macros. This is used to ensure that
31 dnl the gettext macros and po/Makefile.in.in are in sync.
32 AC_SUBST([GETTEXT_MACRO_VERSION], [0.19])
33
34 dnl Perform the following tests also if --disable-nls has been given,
35 dnl because they are needed for "make dist" to work.
36
37 dnl Search for GNU msgfmt in the PATH.
38 dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
39 dnl The second test excludes FreeBSD msgfmt.
40 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
41 [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
42 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
43 :)
44 AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT])
45
46 dnl Test whether it is GNU msgfmt >= 0.15.
47 changequote(,)dnl
48 case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
49 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
50 *) MSGFMT_015=$MSGFMT ;;
51 esac
52 changequote([,])dnl
53 AC_SUBST([MSGFMT_015])
54 changequote(,)dnl
55 case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
56 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
57 *) GMSGFMT_015=$GMSGFMT ;;
58 esac
59 changequote([,])dnl
60 AC_SUBST([GMSGFMT_015])
61
62 dnl Search for GNU xgettext 0.12 or newer in the PATH.
63 dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
64 dnl The second test excludes FreeBSD xgettext.
65 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
66 [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
67 (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
68 :)
69 dnl Remove leftover from FreeBSD xgettext call.
70 rm -f messages.po
71
72 dnl Test whether it is GNU xgettext >= 0.15.
73 changequote(,)dnl
74 case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
75 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
76 *) XGETTEXT_015=$XGETTEXT ;;
77 esac
78 changequote([,])dnl
79 AC_SUBST([XGETTEXT_015])
80
81 dnl Search for GNU msgmerge 0.11 or newer in the PATH.
82 AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
83 [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
84
85 dnl Installation directories.
86 dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
87 dnl have to define it here, so that it can be used in po/Makefile.
88 test -n "$localedir" || localedir='${datadir}/locale'
89 AC_SUBST([localedir])
90
91 dnl Support for AM_XGETTEXT_OPTION.
92 test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
93 AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
94
95 AC_CONFIG_COMMANDS([po-directories], [[
96 for ac_file in $CONFIG_FILES; do
97 # Support "outfile[:infile[:infile...]]"
98 case "$ac_file" in
99 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
100 esac
101 # PO directories have a Makefile.in generated from Makefile.in.in.
102 case "$ac_file" in */Makefile.in)
103 # Adjust a relative srcdir.
104 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
105 ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
106 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
107 # In autoconf-2.13 it is called $ac_given_srcdir.
108 # In autoconf-2.50 it is called $srcdir.
109 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
110 case "$ac_given_srcdir" in
111 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
112 /*) top_srcdir="$ac_given_srcdir" ;;
113 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
114 esac
115 # Treat a directory as a PO directory if and only if it has a
116 # POTFILES.in file. This allows packages to have multiple PO
117 # directories under different names or in different locations.
118 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
119 rm -f "$ac_dir/POTFILES"
120 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
121 gt_tab=`printf '\t'`
122 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
123 POMAKEFILEDEPS="POTFILES.in"
124 # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
125 # on $ac_dir but don't depend on user-specified configuration
126 # parameters.
127 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
128 # The LINGUAS file contains the set of available languages.
129 if test -n "$OBSOLETE_ALL_LINGUAS"; then
130 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
131 fi
132 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
133 # Hide the ALL_LINGUAS assignment from automake < 1.5.
134 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
135 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
136 else
137 # The set of available languages was given in configure.in.
138 # Hide the ALL_LINGUAS assignment from automake < 1.5.
139 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
140 fi
141 # Compute POFILES
142 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
143 # Compute UPDATEPOFILES
144 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
145 # Compute DUMMYPOFILES
146 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
147 # Compute GMOFILES
148 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
149 case "$ac_given_srcdir" in
150 .) srcdirpre= ;;
151 *) srcdirpre='$(srcdir)/' ;;
152 esac
153 POFILES=
154 UPDATEPOFILES=
155 DUMMYPOFILES=
156 GMOFILES=
157 for lang in $ALL_LINGUAS; do
158 POFILES="$POFILES $srcdirpre$lang.po"
159 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
160 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
161 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
162 done
163 # CATALOGS depends on both $ac_dir and the user's LINGUAS
164 # environment variable.
165 INST_LINGUAS=
166 if test -n "$ALL_LINGUAS"; then
167 for presentlang in $ALL_LINGUAS; do
168 useit=no
169 if test "%UNSET%" != "$LINGUAS"; then
170 desiredlanguages="$LINGUAS"
171 else
172 desiredlanguages="$ALL_LINGUAS"
173 fi
174 for desiredlang in $desiredlanguages; do
175 # Use the presentlang catalog if desiredlang is
176 # a. equal to presentlang, or
177 # b. a variant of presentlang (because in this case,
178 # presentlang can be used as a fallback for messages
179 # which are not translated in the desiredlang catalog).
180 case "$desiredlang" in
181 "$presentlang"*) useit=yes;;
182 esac
183 done
184 if test $useit = yes; then
185 INST_LINGUAS="$INST_LINGUAS $presentlang"
186 fi
187 done
188 fi
189 CATALOGS=
190 if test -n "$INST_LINGUAS"; then
191 for lang in $INST_LINGUAS; do
192 CATALOGS="$CATALOGS $lang.gmo"
193 done
194 fi
195 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
196 sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
197 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
198 if test -f "$f"; then
199 case "$f" in
200 *.orig | *.bak | *~) ;;
201 *) cat "$f" >> "$ac_dir/Makefile" ;;
202 esac
203 fi
204 done
205 fi
206 ;;
207 esac
208 done]],
209 [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
210 # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
211 # from automake < 1.5.
212 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
213 # Capture the value of LINGUAS because we need it to compute CATALOGS.
214 LINGUAS="${LINGUAS-%UNSET%}"
215 ])
216 ])
217
218 dnl Postprocesses a Makefile in a directory containing PO files.
219 AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
220 [
221 # When this code is run, in config.status, two variables have already been
222 # set:
223 # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
224 # - LINGUAS is the value of the environment variable LINGUAS at configure
225 # time.
226
227 changequote(,)dnl
228 # Adjust a relative srcdir.
229 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
230 ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
231 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
232 # In autoconf-2.13 it is called $ac_given_srcdir.
233 # In autoconf-2.50 it is called $srcdir.
234 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
235 case "$ac_given_srcdir" in
236 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
237 /*) top_srcdir="$ac_given_srcdir" ;;
238 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
239 esac
240
241 # Find a way to echo strings without interpreting backslash.
242 if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
243 gt_echo='echo'
244 else
245 if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
246 gt_echo='printf %s\n'
247 else
248 echo_func () {
249 cat <<EOT
250 $*
251 EOT
252 }
253 gt_echo='echo_func'
254 fi
255 fi
256
257 # A sed script that extracts the value of VARIABLE from a Makefile.
258 tab=`printf '\t'`
259 sed_x_variable='
260 # Test if the hold space is empty.
261 x
262 s/P/P/
263 x
264 ta
265 # Yes it was empty. Look if we have the expected variable definition.
266 /^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=/{
267 # Seen the first line of the variable definition.
268 s/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=//
269 ba
270 }
271 bd
272 :a
273 # Here we are processing a line from the variable definition.
274 # Remove comment, more precisely replace it with a space.
275 s/#.*$/ /
276 # See if the line ends in a backslash.
277 tb
278 :b
279 s/\\$//
280 # Print the line, without the trailing backslash.
281 p
282 tc
283 # There was no trailing backslash. The end of the variable definition is
284 # reached. Clear the hold space.
285 s/^.*$//
286 x
287 bd
288 :c
289 # A trailing backslash means that the variable definition continues in the
290 # next line. Put a nonempty string into the hold space to indicate this.
291 s/^.*$/P/
292 x
293 :d
294 '
295 changequote([,])dnl
296
297 # Set POTFILES to the value of the Makefile variable POTFILES.
298 sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
299 POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
300 # Compute POTFILES_DEPS as
301 # $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
302 POTFILES_DEPS=
303 for file in $POTFILES; do
304 POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
305 done
306 POMAKEFILEDEPS=""
307
308 if test -n "$OBSOLETE_ALL_LINGUAS"; then
309 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
310 fi
311 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
312 # The LINGUAS file contains the set of available languages.
313 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
314 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
315 else
316 # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
317 sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
318 ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
319 fi
320 # Hide the ALL_LINGUAS assignment from automake < 1.5.
321 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
322 # Compute POFILES
323 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
324 # Compute UPDATEPOFILES
325 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
326 # Compute DUMMYPOFILES
327 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
328 # Compute GMOFILES
329 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
330 # Compute PROPERTIESFILES
331 # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
332 # Compute CLASSFILES
333 # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
334 # Compute QMFILES
335 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
336 # Compute MSGFILES
337 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
338 # Compute RESOURCESDLLFILES
339 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
340 case "$ac_given_srcdir" in
341 .) srcdirpre= ;;
342 *) srcdirpre='$(srcdir)/' ;;
343 esac
344 POFILES=
345 UPDATEPOFILES=
346 DUMMYPOFILES=
347 GMOFILES=
348 PROPERTIESFILES=
349 CLASSFILES=
350 QMFILES=
351 MSGFILES=
352 RESOURCESDLLFILES=
353 for lang in $ALL_LINGUAS; do
354 POFILES="$POFILES $srcdirpre$lang.po"
355 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
356 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
357 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
358 PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
359 CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
360 QMFILES="$QMFILES $srcdirpre$lang.qm"
361 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
362 MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
363 frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
364 RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
365 done
366 # CATALOGS depends on both $ac_dir and the user's LINGUAS
367 # environment variable.
368 INST_LINGUAS=
369 if test -n "$ALL_LINGUAS"; then
370 for presentlang in $ALL_LINGUAS; do
371 useit=no
372 if test "%UNSET%" != "$LINGUAS"; then
373 desiredlanguages="$LINGUAS"
374 else
375 desiredlanguages="$ALL_LINGUAS"
376 fi
377 for desiredlang in $desiredlanguages; do
378 # Use the presentlang catalog if desiredlang is
379 # a. equal to presentlang, or
380 # b. a variant of presentlang (because in this case,
381 # presentlang can be used as a fallback for messages
382 # which are not translated in the desiredlang catalog).
383 case "$desiredlang" in
384 "$presentlang"*) useit=yes;;
385 esac
386 done
387 if test $useit = yes; then
388 INST_LINGUAS="$INST_LINGUAS $presentlang"
389 fi
390 done
391 fi
392 CATALOGS=
393 JAVACATALOGS=
394 QTCATALOGS=
395 TCLCATALOGS=
396 CSHARPCATALOGS=
397 if test -n "$INST_LINGUAS"; then
398 for lang in $INST_LINGUAS; do
399 CATALOGS="$CATALOGS $lang.gmo"
400 JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
401 QTCATALOGS="$QTCATALOGS $lang.qm"
402 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
403 TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
404 frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
405 CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
406 done
407 fi
408
409 sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
410 tab=`printf '\t'`
411 if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
412 # Add dependencies that cannot be formulated as a simple suffix rule.
413 for lang in $ALL_LINGUAS; do
414 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
415 cat >> "$ac_file.tmp" <<EOF
416 $frobbedlang.msg: $lang.po
417 ${tab}@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
418 ${tab}\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
419 EOF
420 done
421 fi
422 if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
423 # Add dependencies that cannot be formulated as a simple suffix rule.
424 for lang in $ALL_LINGUAS; do
425 frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
426 cat >> "$ac_file.tmp" <<EOF
427 $frobbedlang/\$(DOMAIN).resources.dll: $lang.po
428 ${tab}@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
429 ${tab}\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
430 EOF
431 done
432 fi
433 if test -n "$POMAKEFILEDEPS"; then
434 cat >> "$ac_file.tmp" <<EOF
435 Makefile: $POMAKEFILEDEPS
436 EOF
437 fi
438 mv "$ac_file.tmp" "$ac_file"
439 ])
440
441 dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
442 AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
443 [
444 XGETTEXT_EXTRA_OPTIONS=
445 ])
446
447 dnl Registers an option to be passed to xgettext in the po subdirectory.
448 AC_DEFUN([AM_XGETTEXT_OPTION],
449 [
450 AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
451 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
452 ])
0 # progtest.m4 serial 7 (gettext-0.18.2)
1 dnl Copyright (C) 1996-2003, 2005, 2008-2016 Free Software Foundation, Inc.
2 dnl This file is free software; the Free Software Foundation
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5 dnl
6 dnl This file can be used in projects which are not available under
7 dnl the GNU General Public License or the GNU Library General Public
8 dnl License but which still want to provide support for the GNU gettext
9 dnl functionality.
10 dnl Please note that the actual code of the GNU gettext library is covered
11 dnl by the GNU Library General Public License, and the rest of the GNU
12 dnl gettext package is covered by the GNU General Public License.
13 dnl They are *not* in the public domain.
14
15 dnl Authors:
16 dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
17
18 AC_PREREQ([2.50])
19
20 # Search path for a program which passes the given test.
21
22 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
23 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
24 AC_DEFUN([AM_PATH_PROG_WITH_TEST],
25 [
26 # Prepare PATH_SEPARATOR.
27 # The user is always right.
28 if test "${PATH_SEPARATOR+set}" != set; then
29 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
30 # contains only /bin. Note that ksh looks also at the FPATH variable,
31 # so we have to set that as well for the test.
32 PATH_SEPARATOR=:
33 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
34 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
35 || PATH_SEPARATOR=';'
36 }
37 fi
38
39 # Find out how to test for executable files. Don't use a zero-byte file,
40 # as systems may use methods other than mode bits to determine executability.
41 cat >conf$$.file <<_ASEOF
42 #! /bin/sh
43 exit 0
44 _ASEOF
45 chmod +x conf$$.file
46 if test -x conf$$.file >/dev/null 2>&1; then
47 ac_executable_p="test -x"
48 else
49 ac_executable_p="test -f"
50 fi
51 rm -f conf$$.file
52
53 # Extract the first word of "$2", so it can be a program name with args.
54 set dummy $2; ac_word=[$]2
55 AC_MSG_CHECKING([for $ac_word])
56 AC_CACHE_VAL([ac_cv_path_$1],
57 [case "[$]$1" in
58 [[\\/]]* | ?:[[\\/]]*)
59 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
60 ;;
61 *)
62 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
63 for ac_dir in ifelse([$5], , $PATH, [$5]); do
64 IFS="$ac_save_IFS"
65 test -z "$ac_dir" && ac_dir=.
66 for ac_exec_ext in '' $ac_executable_extensions; do
67 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
68 echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
69 if [$3]; then
70 ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
71 break 2
72 fi
73 fi
74 done
75 done
76 IFS="$ac_save_IFS"
77 dnl If no 4th arg is given, leave the cache variable unset,
78 dnl so AC_PATH_PROGS will keep looking.
79 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
80 ])dnl
81 ;;
82 esac])dnl
83 $1="$ac_cv_path_$1"
84 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
85 AC_MSG_RESULT([$][$1])
86 else
87 AC_MSG_RESULT([no])
88 fi
89 AC_SUBST([$1])dnl
90 ])
0 # Makefile.in generated by automake 1.16.3 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994-2020 Free Software Foundation, Inc.
4
5 # This Makefile.in is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 @SET_MAKE@
15 VPATH = @srcdir@
16 am__is_gnu_make = { \
17 if test -z '$(MAKELEVEL)'; then \
18 false; \
19 elif test -n '$(MAKE_HOST)'; then \
20 true; \
21 elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
22 true; \
23 else \
24 false; \
25 fi; \
26 }
27 am__make_running_with_option = \
28 case $${target_option-} in \
29 ?) ;; \
30 *) echo "am__make_running_with_option: internal error: invalid" \
31 "target option '$${target_option-}' specified" >&2; \
32 exit 1;; \
33 esac; \
34 has_opt=no; \
35 sane_makeflags=$$MAKEFLAGS; \
36 if $(am__is_gnu_make); then \
37 sane_makeflags=$$MFLAGS; \
38 else \
39 case $$MAKEFLAGS in \
40 *\\[\ \ ]*) \
41 bs=\\; \
42 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
43 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
44 esac; \
45 fi; \
46 skip_next=no; \
47 strip_trailopt () \
48 { \
49 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
50 }; \
51 for flg in $$sane_makeflags; do \
52 test $$skip_next = yes && { skip_next=no; continue; }; \
53 case $$flg in \
54 *=*|--*) continue;; \
55 -*I) strip_trailopt 'I'; skip_next=yes;; \
56 -*I?*) strip_trailopt 'I';; \
57 -*O) strip_trailopt 'O'; skip_next=yes;; \
58 -*O?*) strip_trailopt 'O';; \
59 -*l) strip_trailopt 'l'; skip_next=yes;; \
60 -*l?*) strip_trailopt 'l';; \
61 -[dEDm]) skip_next=yes;; \
62 -[JT]) skip_next=yes;; \
63 esac; \
64 case $$flg in \
65 *$$target_option*) has_opt=yes; break;; \
66 esac; \
67 done; \
68 test $$has_opt = yes
69 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
70 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
71 pkgdatadir = $(datadir)/@PACKAGE@
72 pkgincludedir = $(includedir)/@PACKAGE@
73 pkglibdir = $(libdir)/@PACKAGE@
74 pkglibexecdir = $(libexecdir)/@PACKAGE@
75 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
76 install_sh_DATA = $(install_sh) -c -m 644
77 install_sh_PROGRAM = $(install_sh) -c
78 install_sh_SCRIPT = $(install_sh) -c
79 INSTALL_HEADER = $(INSTALL_DATA)
80 transform = $(program_transform_name)
81 NORMAL_INSTALL = :
82 PRE_INSTALL = :
83 POST_INSTALL = :
84 NORMAL_UNINSTALL = :
85 PRE_UNINSTALL = :
86 POST_UNINSTALL = :
87 build_triplet = @build@
88 host_triplet = @host@
89 subdir = man
90 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
91 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
92 $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \
93 $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
94 $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
95 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
96 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
97 $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
98 $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac
99 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
100 $(ACLOCAL_M4)
101 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
102 mkinstalldirs = $(install_sh) -d
103 CONFIG_HEADER = $(top_builddir)/config.h
104 CONFIG_CLEAN_FILES =
105 CONFIG_CLEAN_VPATH_FILES =
106 AM_V_P = $(am__v_P_@AM_V@)
107 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
108 am__v_P_0 = false
109 am__v_P_1 = :
110 AM_V_GEN = $(am__v_GEN_@AM_V@)
111 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
112 am__v_GEN_0 = @echo " GEN " $@;
113 am__v_GEN_1 =
114 AM_V_at = $(am__v_at_@AM_V@)
115 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
116 am__v_at_0 = @
117 am__v_at_1 =
118 SOURCES =
119 DIST_SOURCES =
120 am__can_run_installinfo = \
121 case $$AM_UPDATE_INFO_DIR in \
122 n|no|NO) false;; \
123 *) (install-info --version) >/dev/null 2>&1;; \
124 esac
125 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
126 am__vpath_adj = case $$p in \
127 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
128 *) f=$$p;; \
129 esac;
130 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
131 am__install_max = 40
132 am__nobase_strip_setup = \
133 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
134 am__nobase_strip = \
135 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
136 am__nobase_list = $(am__nobase_strip_setup); \
137 for p in $$list; do echo "$$p $$p"; done | \
138 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
139 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
140 if (++n[$$2] == $(am__install_max)) \
141 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
142 END { for (dir in files) print dir, files[dir] }'
143 am__base_list = \
144 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
145 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
146 am__uninstall_files_from_dir = { \
147 test -z "$$files" \
148 || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
149 || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
150 $(am__cd) "$$dir" && rm -f $$files; }; \
151 }
152 man1dir = $(mandir)/man1
153 am__installdirs = "$(DESTDIR)$(man1dir)"
154 NROFF = nroff
155 MANS = $(dist_man1_MANS)
156 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
157 am__DIST_COMMON = $(dist_man1_MANS) $(srcdir)/Makefile.in
158 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
159 ACLOCAL = @ACLOCAL@
160 ALSA_CFLAGS = @ALSA_CFLAGS@
161 ALSA_LIBS = @ALSA_LIBS@
162 AMTAR = @AMTAR@
163 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
164 AR = @AR@
165 AUTOCONF = @AUTOCONF@
166 AUTOHEADER = @AUTOHEADER@
167 AUTOMAKE = @AUTOMAKE@
168 AWK = @AWK@
169 CC = @CC@
170 CCDEPMODE = @CCDEPMODE@
171 CFLAGS = @CFLAGS@
172 CPP = @CPP@
173 CPPFLAGS = @CPPFLAGS@
174 CYGPATH_W = @CYGPATH_W@
175 DEFS = @DEFS@
176 DEPDIR = @DEPDIR@
177 DLLTOOL = @DLLTOOL@
178 DSYMUTIL = @DSYMUTIL@
179 DUMPBIN = @DUMPBIN@
180 ECHO_C = @ECHO_C@
181 ECHO_N = @ECHO_N@
182 ECHO_T = @ECHO_T@
183 EGREP = @EGREP@
184 EXEEXT = @EXEEXT@
185 FGREP = @FGREP@
186 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
187 GMSGFMT = @GMSGFMT@
188 GMSGFMT_015 = @GMSGFMT_015@
189 GREP = @GREP@
190 GTK_CFLAGS = @GTK_CFLAGS@
191 GTK_LIBS = @GTK_LIBS@
192 INSTALL = @INSTALL@
193 INSTALL_DATA = @INSTALL_DATA@
194 INSTALL_PROGRAM = @INSTALL_PROGRAM@
195 INSTALL_SCRIPT = @INSTALL_SCRIPT@
196 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
197 INTLLIBS = @INTLLIBS@
198 INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
199 LD = @LD@
200 LDFLAGS = @LDFLAGS@
201 LIBICONV = @LIBICONV@
202 LIBINTL = @LIBINTL@
203 LIBOBJS = @LIBOBJS@
204 LIBS = @LIBS@
205 LIBTOOL = @LIBTOOL@
206 LIPO = @LIPO@
207 LN_S = @LN_S@
208 LTLIBICONV = @LTLIBICONV@
209 LTLIBINTL = @LTLIBINTL@
210 LTLIBOBJS = @LTLIBOBJS@
211 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
212 MAKEINFO = @MAKEINFO@
213 MANIFEST_TOOL = @MANIFEST_TOOL@
214 MKDIR_P = @MKDIR_P@
215 MSGFMT = @MSGFMT@
216 MSGFMT_015 = @MSGFMT_015@
217 MSGMERGE = @MSGMERGE@
218 NM = @NM@
219 NMEDIT = @NMEDIT@
220 OBJDUMP = @OBJDUMP@
221 OBJEXT = @OBJEXT@
222 OTOOL = @OTOOL@
223 OTOOL64 = @OTOOL64@
224 PACKAGE = @PACKAGE@
225 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
226 PACKAGE_NAME = @PACKAGE_NAME@
227 PACKAGE_STRING = @PACKAGE_STRING@
228 PACKAGE_TARNAME = @PACKAGE_TARNAME@
229 PACKAGE_URL = @PACKAGE_URL@
230 PACKAGE_VERSION = @PACKAGE_VERSION@
231 PATH_SEPARATOR = @PATH_SEPARATOR@
232 PKG_CONFIG = @PKG_CONFIG@
233 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
234 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
235 POSUB = @POSUB@
236 PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@
237 PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@
238 RANLIB = @RANLIB@
239 SAMPLERATE_CFLAGS = @SAMPLERATE_CFLAGS@
240 SAMPLERATE_LIBS = @SAMPLERATE_LIBS@
241 SED = @SED@
242 SET_MAKE = @SET_MAKE@
243 SHELL = @SHELL@
244 SNDFILE_CFLAGS = @SNDFILE_CFLAGS@
245 SNDFILE_LIBS = @SNDFILE_LIBS@
246 STRIP = @STRIP@
247 USE_NLS = @USE_NLS@
248 VERSION = @VERSION@
249 XGETTEXT = @XGETTEXT@
250 XGETTEXT_015 = @XGETTEXT_015@
251 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
252 abs_builddir = @abs_builddir@
253 abs_srcdir = @abs_srcdir@
254 abs_top_builddir = @abs_top_builddir@
255 abs_top_srcdir = @abs_top_srcdir@
256 ac_ct_AR = @ac_ct_AR@
257 ac_ct_CC = @ac_ct_CC@
258 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
259 am__include = @am__include@
260 am__leading_dot = @am__leading_dot@
261 am__quote = @am__quote@
262 am__tar = @am__tar@
263 am__untar = @am__untar@
264 bindir = @bindir@
265 build = @build@
266 build_alias = @build_alias@
267 build_cpu = @build_cpu@
268 build_os = @build_os@
269 build_vendor = @build_vendor@
270 builddir = @builddir@
271 datadir = @datadir@
272 datarootdir = @datarootdir@
273 docdir = @docdir@
274 dvidir = @dvidir@
275 exec_prefix = @exec_prefix@
276 host = @host@
277 host_alias = @host_alias@
278 host_cpu = @host_cpu@
279 host_os = @host_os@
280 host_vendor = @host_vendor@
281 htmldir = @htmldir@
282 includedir = @includedir@
283 infodir = @infodir@
284 install_sh = @install_sh@
285 libdir = @libdir@
286 libexecdir = @libexecdir@
287 libzip_CFLAGS = @libzip_CFLAGS@
288 libzip_LIBS = @libzip_LIBS@
289 localedir = @localedir@
290 localstatedir = @localstatedir@
291 mandir = @mandir@
292 mkdir_p = @mkdir_p@
293 oldincludedir = @oldincludedir@
294 pdfdir = @pdfdir@
295 prefix = @prefix@
296 program_transform_name = @program_transform_name@
297 psdir = @psdir@
298 runstatedir = @runstatedir@
299 sbindir = @sbindir@
300 sharedstatedir = @sharedstatedir@
301 srcdir = @srcdir@
302 sysconfdir = @sysconfdir@
303 target_alias = @target_alias@
304 top_build_prefix = @top_build_prefix@
305 top_builddir = @top_builddir@
306 top_srcdir = @top_srcdir@
307 zlib_CFLAGS = @zlib_CFLAGS@
308 zlib_LIBS = @zlib_LIBS@
309 @CLI_ONLY_FALSE@dist_man1_MANS = elektroid.1 elektroid-cli.1
310 @CLI_ONLY_TRUE@dist_man1_MANS = elektroid-cli.1
311 all: all-am
312
313 .SUFFIXES:
314 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
315 @for dep in $?; do \
316 case '$(am__configure_deps)' in \
317 *$$dep*) \
318 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
319 && { if test -f $@; then exit 0; else break; fi; }; \
320 exit 1;; \
321 esac; \
322 done; \
323 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu man/Makefile'; \
324 $(am__cd) $(top_srcdir) && \
325 $(AUTOMAKE) --gnu man/Makefile
326 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
327 @case '$?' in \
328 *config.status*) \
329 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
330 *) \
331 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
332 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
333 esac;
334
335 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
336 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
337
338 $(top_srcdir)/configure: $(am__configure_deps)
339 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
340 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
341 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
342 $(am__aclocal_m4_deps):
343
344 mostlyclean-libtool:
345 -rm -f *.lo
346
347 clean-libtool:
348 -rm -rf .libs _libs
349 install-man1: $(dist_man1_MANS)
350 @$(NORMAL_INSTALL)
351 @list1='$(dist_man1_MANS)'; \
352 list2=''; \
353 test -n "$(man1dir)" \
354 && test -n "`echo $$list1$$list2`" \
355 || exit 0; \
356 echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
357 $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
358 { for i in $$list1; do echo "$$i"; done; \
359 if test -n "$$list2"; then \
360 for i in $$list2; do echo "$$i"; done \
361 | sed -n '/\.1[a-z]*$$/p'; \
362 fi; \
363 } | while read p; do \
364 if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
365 echo "$$d$$p"; echo "$$p"; \
366 done | \
367 sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
368 -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
369 sed 'N;N;s,\n, ,g' | { \
370 list=; while read file base inst; do \
371 if test "$$base" = "$$inst"; then list="$$list $$file"; else \
372 echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
373 $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
374 fi; \
375 done; \
376 for i in $$list; do echo "$$i"; done | $(am__base_list) | \
377 while read files; do \
378 test -z "$$files" || { \
379 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
380 $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
381 done; }
382
383 uninstall-man1:
384 @$(NORMAL_UNINSTALL)
385 @list='$(dist_man1_MANS)'; test -n "$(man1dir)" || exit 0; \
386 files=`{ for i in $$list; do echo "$$i"; done; \
387 } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
388 -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
389 dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
390 tags TAGS:
391
392 ctags CTAGS:
393
394 cscope cscopelist:
395
396
397 distdir: $(BUILT_SOURCES)
398 $(MAKE) $(AM_MAKEFLAGS) distdir-am
399
400 distdir-am: $(DISTFILES)
401 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
402 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
403 list='$(DISTFILES)'; \
404 dist_files=`for file in $$list; do echo $$file; done | \
405 sed -e "s|^$$srcdirstrip/||;t" \
406 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
407 case $$dist_files in \
408 */*) $(MKDIR_P) `echo "$$dist_files" | \
409 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
410 sort -u` ;; \
411 esac; \
412 for file in $$dist_files; do \
413 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
414 if test -d $$d/$$file; then \
415 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
416 if test -d "$(distdir)/$$file"; then \
417 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
418 fi; \
419 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
420 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
421 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
422 fi; \
423 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
424 else \
425 test -f "$(distdir)/$$file" \
426 || cp -p $$d/$$file "$(distdir)/$$file" \
427 || exit 1; \
428 fi; \
429 done
430 check-am: all-am
431 check: check-am
432 all-am: Makefile $(MANS)
433 installdirs:
434 for dir in "$(DESTDIR)$(man1dir)"; do \
435 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
436 done
437 install: install-am
438 install-exec: install-exec-am
439 install-data: install-data-am
440 uninstall: uninstall-am
441
442 install-am: all-am
443 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
444
445 installcheck: installcheck-am
446 install-strip:
447 if test -z '$(STRIP)'; then \
448 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
449 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
450 install; \
451 else \
452 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
453 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
454 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
455 fi
456 mostlyclean-generic:
457
458 clean-generic:
459
460 distclean-generic:
461 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
462 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
463
464 maintainer-clean-generic:
465 @echo "This command is intended for maintainers to use"
466 @echo "it deletes files that may require special tools to rebuild."
467 clean: clean-am
468
469 clean-am: clean-generic clean-libtool mostlyclean-am
470
471 distclean: distclean-am
472 -rm -f Makefile
473 distclean-am: clean-am distclean-generic
474
475 dvi: dvi-am
476
477 dvi-am:
478
479 html: html-am
480
481 html-am:
482
483 info: info-am
484
485 info-am:
486
487 install-data-am: install-man
488
489 install-dvi: install-dvi-am
490
491 install-dvi-am:
492
493 install-exec-am:
494
495 install-html: install-html-am
496
497 install-html-am:
498
499 install-info: install-info-am
500
501 install-info-am:
502
503 install-man: install-man1
504
505 install-pdf: install-pdf-am
506
507 install-pdf-am:
508
509 install-ps: install-ps-am
510
511 install-ps-am:
512
513 installcheck-am:
514
515 maintainer-clean: maintainer-clean-am
516 -rm -f Makefile
517 maintainer-clean-am: distclean-am maintainer-clean-generic
518
519 mostlyclean: mostlyclean-am
520
521 mostlyclean-am: mostlyclean-generic mostlyclean-libtool
522
523 pdf: pdf-am
524
525 pdf-am:
526
527 ps: ps-am
528
529 ps-am:
530
531 uninstall-am: uninstall-man
532
533 uninstall-man: uninstall-man1
534
535 .MAKE: install-am install-strip
536
537 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
538 cscopelist-am ctags-am distclean distclean-generic \
539 distclean-libtool distdir dvi dvi-am html html-am info info-am \
540 install install-am install-data install-data-am install-dvi \
541 install-dvi-am install-exec install-exec-am install-html \
542 install-html-am install-info install-info-am install-man \
543 install-man1 install-pdf install-pdf-am install-ps \
544 install-ps-am install-strip installcheck installcheck-am \
545 installdirs maintainer-clean maintainer-clean-generic \
546 mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
547 ps ps-am tags-am uninstall uninstall-am uninstall-man \
548 uninstall-man1
549
550 .PRECIOUS: Makefile
551
552
553 # Tell versions [3.59,3.63) of GNU make to not export all variables.
554 # Otherwise a system limit (for SysV at least) may be exceeded.
555 .NOEXPORT:
0 #! /bin/sh
1 # Common wrapper for a few potentially missing GNU programs.
2
3 scriptversion=2018-03-07.03; # UTC
4
5 # Copyright (C) 1996-2020 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 <https://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=https://www.perl.org/
104 flex_URL=https://github.com/westes/flex
105 gnu_software_URL=https://www.gnu.org/software
106
107 program_details ()
108 {
109 case $1 in
110 aclocal|automake)
111 echo "The '$1' program is part of the GNU Automake package:"
112 echo "<$gnu_software_URL/automake>"
113 echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
114 echo "<$gnu_software_URL/autoconf>"
115 echo "<$gnu_software_URL/m4/>"
116 echo "<$perl_URL>"
117 ;;
118 autoconf|autom4te|autoheader)
119 echo "The '$1' program is part of the GNU Autoconf package:"
120 echo "<$gnu_software_URL/autoconf/>"
121 echo "It also requires GNU m4 and Perl in order to run:"
122 echo "<$gnu_software_URL/m4/>"
123 echo "<$perl_URL>"
124 ;;
125 esac
126 }
127
128 give_advice ()
129 {
130 # Normalize program name to check for.
131 normalized_program=`echo "$1" | sed '
132 s/^gnu-//; t
133 s/^gnu//; t
134 s/^g//; t'`
135
136 printf '%s\n' "'$1' is $msg."
137
138 configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
139 case $normalized_program in
140 autoconf*)
141 echo "You should only need it if you modified 'configure.ac',"
142 echo "or m4 files included by it."
143 program_details 'autoconf'
144 ;;
145 autoheader*)
146 echo "You should only need it if you modified 'acconfig.h' or"
147 echo "$configure_deps."
148 program_details 'autoheader'
149 ;;
150 automake*)
151 echo "You should only need it if you modified 'Makefile.am' or"
152 echo "$configure_deps."
153 program_details 'automake'
154 ;;
155 aclocal*)
156 echo "You should only need it if you modified 'acinclude.m4' or"
157 echo "$configure_deps."
158 program_details 'aclocal'
159 ;;
160 autom4te*)
161 echo "You might have modified some maintainer files that require"
162 echo "the 'autom4te' program to be rebuilt."
163 program_details 'autom4te'
164 ;;
165 bison*|yacc*)
166 echo "You should only need it if you modified a '.y' file."
167 echo "You may want to install the GNU Bison package:"
168 echo "<$gnu_software_URL/bison/>"
169 ;;
170 lex*|flex*)
171 echo "You should only need it if you modified a '.l' file."
172 echo "You may want to install the Fast Lexical Analyzer package:"
173 echo "<$flex_URL>"
174 ;;
175 help2man*)
176 echo "You should only need it if you modified a dependency" \
177 "of a man page."
178 echo "You may want to install the GNU Help2man package:"
179 echo "<$gnu_software_URL/help2man/>"
180 ;;
181 makeinfo*)
182 echo "You should only need it if you modified a '.texi' file, or"
183 echo "any other file indirectly affecting the aspect of the manual."
184 echo "You might want to install the Texinfo package:"
185 echo "<$gnu_software_URL/texinfo/>"
186 echo "The spurious makeinfo call might also be the consequence of"
187 echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
188 echo "want to install GNU make:"
189 echo "<$gnu_software_URL/make/>"
190 ;;
191 *)
192 echo "You might have modified some files without having the proper"
193 echo "tools for further handling them. Check the 'README' file, it"
194 echo "often tells you about the needed prerequisites for installing"
195 echo "this package. You may also peek at any GNU archive site, in"
196 echo "case some other package contains this missing '$1' program."
197 ;;
198 esac
199 }
200
201 give_advice "$1" | sed -e '1s/^/WARNING: /' \
202 -e '2,$s/^/ /' >&2
203
204 # Propagate the correct exit status (expected to be 127 for a program
205 # not found, 63 for a program that failed due to version mismatch).
206 exit $st
207
208 # Local variables:
209 # eval: (add-hook 'before-save-hook 'time-stamp)
210 # time-stamp-start: "scriptversion="
211 # time-stamp-format: "%:y-%02m-%02d.%02H"
212 # time-stamp-time-zone: "UTC0"
213 # time-stamp-end: "; # UTC"
214 # End:
0 # Makefile for PO directory in any package using GNU gettext.
1 # Copyright (C) 1995-1997, 2000-2007, 2009-2010 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
2 #
3 # This file can be copied and used freely without restrictions. It can
4 # be used in projects which are not available under the GNU General Public
5 # License but which still want to provide support for the GNU gettext
6 # functionality.
7 # Please note that the actual code of GNU gettext is covered by the GNU
8 # General Public License and is *not* in the public domain.
9 #
10 # Origin: gettext-0.19
11 GETTEXT_MACRO_VERSION = 0.19
12
13 PACKAGE = @PACKAGE@
14 VERSION = @VERSION@
15 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
16
17 SED = @SED@
18 SHELL = /bin/sh
19 @SET_MAKE@
20
21 srcdir = @srcdir@
22 top_srcdir = @top_srcdir@
23 VPATH = @srcdir@
24
25 prefix = @prefix@
26 exec_prefix = @exec_prefix@
27 datarootdir = @datarootdir@
28 datadir = @datadir@
29 localedir = @localedir@
30 gettextsrcdir = $(datadir)/gettext/po
31
32 INSTALL = @INSTALL@
33 INSTALL_DATA = @INSTALL_DATA@
34
35 # We use $(mkdir_p).
36 # In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
37 # "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
38 # @install_sh@ does not start with $(SHELL), so we add it.
39 # In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined
40 # either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
41 # versions, $(mkinstalldirs) and $(install_sh) are unused.
42 mkinstalldirs = $(SHELL) @install_sh@ -d
43 install_sh = $(SHELL) @install_sh@
44 MKDIR_P = @MKDIR_P@
45 mkdir_p = @mkdir_p@
46
47 GMSGFMT_ = @GMSGFMT@
48 GMSGFMT_no = @GMSGFMT@
49 GMSGFMT_yes = @GMSGFMT_015@
50 GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT))
51 MSGFMT_ = @MSGFMT@
52 MSGFMT_no = @MSGFMT@
53 MSGFMT_yes = @MSGFMT_015@
54 MSGFMT = $(MSGFMT_$(USE_MSGCTXT))
55 XGETTEXT_ = @XGETTEXT@
56 XGETTEXT_no = @XGETTEXT@
57 XGETTEXT_yes = @XGETTEXT_015@
58 XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT))
59 MSGMERGE = msgmerge
60 MSGMERGE_UPDATE = @MSGMERGE@ --update
61 MSGINIT = msginit
62 MSGCONV = msgconv
63 MSGFILTER = msgfilter
64
65 POFILES = @POFILES@
66 GMOFILES = @GMOFILES@
67 UPDATEPOFILES = @UPDATEPOFILES@
68 DUMMYPOFILES = @DUMMYPOFILES@
69 DISTFILES.common = Makefile.in.in remove-potcdate.sin \
70 $(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
71 DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
72 $(POFILES) $(GMOFILES) \
73 $(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
74
75 POTFILES = \
76
77 CATALOGS = @CATALOGS@
78
79 POFILESDEPS_ = $(srcdir)/$(DOMAIN).pot
80 POFILESDEPS_yes = $(POFILESDEPS_)
81 POFILESDEPS_no =
82 POFILESDEPS = $(POFILESDEPS_$(PO_DEPENDS_ON_POT))
83
84 DISTFILESDEPS_ = update-po
85 DISTFILESDEPS_yes = $(DISTFILESDEPS_)
86 DISTFILESDEPS_no =
87 DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO))
88
89 # Makevars gets inserted here. (Don't remove this line!)
90
91 .SUFFIXES:
92 .SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
93
94 .po.mo:
95 @echo "$(MSGFMT) -c -o $@ $<"; \
96 $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
97
98 .po.gmo:
99 @lang=`echo $* | sed -e 's,.*/,,'`; \
100 test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
101 echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \
102 cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
103
104 .sin.sed:
105 sed -e '/^#/d' $< > t-$@
106 mv t-$@ $@
107
108
109 all: all-@USE_NLS@
110
111 all-yes: stamp-po
112 all-no:
113
114 # Ensure that the gettext macros and this Makefile.in.in are in sync.
115 CHECK_MACRO_VERSION = \
116 test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \
117 || { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version @GETTEXT_MACRO_VERSION@" 1>&2; \
118 exit 1; \
119 }
120
121 # $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
122 # internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
123 # we don't want to bother translators with empty POT files). We assume that
124 # LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
125 # In this case, stamp-po is a nop (i.e. a phony target).
126
127 # stamp-po is a timestamp denoting the last time at which the CATALOGS have
128 # been loosely updated. Its purpose is that when a developer or translator
129 # checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
130 # "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
131 # invocations of "make" will do nothing. This timestamp would not be necessary
132 # if updating the $(CATALOGS) would always touch them; however, the rule for
133 # $(POFILES) has been designed to not touch files that don't need to be
134 # changed.
135 stamp-po: $(srcdir)/$(DOMAIN).pot
136 @$(CHECK_MACRO_VERSION)
137 test ! -f $(srcdir)/$(DOMAIN).pot || \
138 test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
139 @test ! -f $(srcdir)/$(DOMAIN).pot || { \
140 echo "touch stamp-po" && \
141 echo timestamp > stamp-poT && \
142 mv stamp-poT stamp-po; \
143 }
144
145 # Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
146 # otherwise packages like GCC can not be built if only parts of the source
147 # have been downloaded.
148
149 # This target rebuilds $(DOMAIN).pot; it is an expensive operation.
150 # Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
151 # The determination of whether the package xyz is a GNU one is based on the
152 # heuristic whether some file in the top level directory mentions "GNU xyz".
153 # If GNU 'find' is available, we avoid grepping through monster files.
154 $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
155 package_gnu="$(PACKAGE_GNU)"; \
156 test -n "$$package_gnu" || { \
157 if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \
158 LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f \
159 -size -10000000c -exec grep 'GNU @PACKAGE@' \
160 /dev/null '{}' ';' 2>/dev/null; \
161 else \
162 LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \
163 fi; \
164 } | grep -v 'libtool:' >/dev/null; then \
165 package_gnu=yes; \
166 else \
167 package_gnu=no; \
168 fi; \
169 }; \
170 if test "$$package_gnu" = "yes"; then \
171 package_prefix='GNU '; \
172 else \
173 package_prefix=''; \
174 fi; \
175 if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
176 msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
177 else \
178 msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
179 fi; \
180 case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
181 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \
182 $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
183 --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
184 --files-from=$(srcdir)/POTFILES.in \
185 --copyright-holder='$(COPYRIGHT_HOLDER)' \
186 --msgid-bugs-address="$$msgid_bugs_address" \
187 ;; \
188 *) \
189 $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
190 --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
191 --files-from=$(srcdir)/POTFILES.in \
192 --copyright-holder='$(COPYRIGHT_HOLDER)' \
193 --package-name="$${package_prefix}@PACKAGE@" \
194 --package-version='@VERSION@' \
195 --msgid-bugs-address="$$msgid_bugs_address" \
196 ;; \
197 esac
198 test ! -f $(DOMAIN).po || { \
199 if test -f $(srcdir)/$(DOMAIN).pot; then \
200 sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
201 sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
202 if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
203 rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
204 else \
205 rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
206 mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
207 fi; \
208 else \
209 mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
210 fi; \
211 }
212
213 # This rule has no dependencies: we don't need to update $(DOMAIN).pot at
214 # every "make" invocation, only create it when it is missing.
215 # Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
216 $(srcdir)/$(DOMAIN).pot:
217 $(MAKE) $(DOMAIN).pot-update
218
219 # This target rebuilds a PO file if $(DOMAIN).pot has changed.
220 # Note that a PO file is not touched if it doesn't need to be changed.
221 $(POFILES): $(POFILESDEPS)
222 @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
223 if test -f "$(srcdir)/$${lang}.po"; then \
224 test -f $(srcdir)/$(DOMAIN).pot || $(MAKE) $(srcdir)/$(DOMAIN).pot; \
225 test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
226 echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \
227 cd $(srcdir) \
228 && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
229 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
230 $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \
231 *) \
232 $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \
233 esac; \
234 }; \
235 else \
236 $(MAKE) $${lang}.po-create; \
237 fi
238
239
240 install: install-exec install-data
241 install-exec:
242 install-data: install-data-@USE_NLS@
243 if test "$(PACKAGE)" = "gettext-tools"; then \
244 $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
245 for file in $(DISTFILES.common) Makevars.template; do \
246 $(INSTALL_DATA) $(srcdir)/$$file \
247 $(DESTDIR)$(gettextsrcdir)/$$file; \
248 done; \
249 for file in Makevars; do \
250 rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
251 done; \
252 else \
253 : ; \
254 fi
255 install-data-no: all
256 install-data-yes: all
257 @catalogs='$(CATALOGS)'; \
258 for cat in $$catalogs; do \
259 cat=`basename $$cat`; \
260 lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
261 dir=$(localedir)/$$lang/LC_MESSAGES; \
262 $(mkdir_p) $(DESTDIR)$$dir; \
263 if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
264 $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
265 echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
266 for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
267 if test -n "$$lc"; then \
268 if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
269 link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
270 mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
271 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
272 (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
273 for file in *; do \
274 if test -f $$file; then \
275 ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
276 fi; \
277 done); \
278 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
279 else \
280 if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
281 :; \
282 else \
283 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
284 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
285 fi; \
286 fi; \
287 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
288 ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
289 ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
290 cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
291 echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
292 fi; \
293 done; \
294 done
295
296 install-strip: install
297
298 installdirs: installdirs-exec installdirs-data
299 installdirs-exec:
300 installdirs-data: installdirs-data-@USE_NLS@
301 if test "$(PACKAGE)" = "gettext-tools"; then \
302 $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
303 else \
304 : ; \
305 fi
306 installdirs-data-no:
307 installdirs-data-yes:
308 @catalogs='$(CATALOGS)'; \
309 for cat in $$catalogs; do \
310 cat=`basename $$cat`; \
311 lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
312 dir=$(localedir)/$$lang/LC_MESSAGES; \
313 $(mkdir_p) $(DESTDIR)$$dir; \
314 for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
315 if test -n "$$lc"; then \
316 if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
317 link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
318 mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
319 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
320 (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
321 for file in *; do \
322 if test -f $$file; then \
323 ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
324 fi; \
325 done); \
326 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
327 else \
328 if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
329 :; \
330 else \
331 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
332 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
333 fi; \
334 fi; \
335 fi; \
336 done; \
337 done
338
339 # Define this as empty until I found a useful application.
340 installcheck:
341
342 uninstall: uninstall-exec uninstall-data
343 uninstall-exec:
344 uninstall-data: uninstall-data-@USE_NLS@
345 if test "$(PACKAGE)" = "gettext-tools"; then \
346 for file in $(DISTFILES.common) Makevars.template; do \
347 rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
348 done; \
349 else \
350 : ; \
351 fi
352 uninstall-data-no:
353 uninstall-data-yes:
354 catalogs='$(CATALOGS)'; \
355 for cat in $$catalogs; do \
356 cat=`basename $$cat`; \
357 lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
358 for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
359 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
360 done; \
361 done
362
363 check: all
364
365 info dvi ps pdf html tags TAGS ctags CTAGS ID:
366
367 mostlyclean:
368 rm -f remove-potcdate.sed
369 rm -f stamp-poT
370 rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
371 rm -fr *.o
372
373 clean: mostlyclean
374
375 distclean: clean
376 rm -f Makefile Makefile.in POTFILES *.mo
377
378 maintainer-clean: distclean
379 @echo "This command is intended for maintainers to use;"
380 @echo "it deletes files that may require special tools to rebuild."
381 rm -f stamp-po $(GMOFILES)
382
383 distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
384 dist distdir:
385 test -z "$(DISTFILESDEPS)" || $(MAKE) $(DISTFILESDEPS)
386 @$(MAKE) dist2
387 # This is a separate target because 'update-po' must be executed before.
388 dist2: stamp-po $(DISTFILES)
389 dists="$(DISTFILES)"; \
390 if test "$(PACKAGE)" = "gettext-tools"; then \
391 dists="$$dists Makevars.template"; \
392 fi; \
393 if test -f $(srcdir)/$(DOMAIN).pot; then \
394 dists="$$dists $(DOMAIN).pot stamp-po"; \
395 fi; \
396 if test -f $(srcdir)/ChangeLog; then \
397 dists="$$dists ChangeLog"; \
398 fi; \
399 for i in 0 1 2 3 4 5 6 7 8 9; do \
400 if test -f $(srcdir)/ChangeLog.$$i; then \
401 dists="$$dists ChangeLog.$$i"; \
402 fi; \
403 done; \
404 if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
405 for file in $$dists; do \
406 if test -f $$file; then \
407 cp -p $$file $(distdir) || exit 1; \
408 else \
409 cp -p $(srcdir)/$$file $(distdir) || exit 1; \
410 fi; \
411 done
412
413 update-po: Makefile
414 $(MAKE) $(DOMAIN).pot-update
415 test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
416 $(MAKE) update-gmo
417
418 # General rule for creating PO files.
419
420 .nop.po-create:
421 @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
422 echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
423 exit 1
424
425 # General rule for updating PO files.
426
427 .nop.po-update:
428 @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
429 if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \
430 tmpdir=`pwd`; \
431 echo "$$lang:"; \
432 test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
433 echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
434 cd $(srcdir); \
435 if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
436 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
437 $(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
438 *) \
439 $(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
440 esac; \
441 }; then \
442 if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
443 rm -f $$tmpdir/$$lang.new.po; \
444 else \
445 if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
446 :; \
447 else \
448 echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
449 exit 1; \
450 fi; \
451 fi; \
452 else \
453 echo "msgmerge for $$lang.po failed!" 1>&2; \
454 rm -f $$tmpdir/$$lang.new.po; \
455 fi
456
457 $(DUMMYPOFILES):
458
459 update-gmo: Makefile $(GMOFILES)
460 @:
461
462 # Recreate Makefile by invoking config.status. Explicitly invoke the shell,
463 # because execution permission bits may not work on the current file system.
464 # Use @SHELL@, which is the shell determined by autoconf for the use by its
465 # scripts, not $(SHELL) which is hardwired to /bin/sh and may be deficient.
466 Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@
467 cd $(top_builddir) \
468 && @SHELL@ ./config.status $(subdir)/$@.in po-directories
469
470 force:
471
472 # Tell versions [3.59,3.63) of GNU make not to export all variables.
473 # Otherwise a system limit (for SysV at least) may be exceeded.
474 .NOEXPORT:
0 src/connector.c
01 src/elektroid.c
2 src/local.c
3 src/connectors/sds.c
14 res/gui.glade
0 # This file, Rules-quot, can be copied and used freely without restrictions.
1 # Special Makefile rules for English message catalogs with quotation marks.
2
3 DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot
4
5 .SUFFIXES: .insert-header .po-update-en
6
7 en@quot.po-create:
8 $(MAKE) en@quot.po-update
9 en@boldquot.po-create:
10 $(MAKE) en@boldquot.po-update
11
12 en@quot.po-update: en@quot.po-update-en
13 en@boldquot.po-update: en@boldquot.po-update-en
14
15 .insert-header.po-update-en:
16 @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \
17 if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \
18 tmpdir=`pwd`; \
19 echo "$$lang:"; \
20 ll=`echo $$lang | sed -e 's/@.*//'`; \
21 LC_ALL=C; export LC_ALL; \
22 cd $(srcdir); \
23 if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$lang -o - 2>/dev/null \
24 | $(SED) -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | \
25 { case `$(MSGFILTER) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
26 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-8] | 0.1[0-8].*) \
27 $(MSGFILTER) $(SED) -f `echo $$lang | sed -e 's/.*@//'`.sed \
28 ;; \
29 *) \
30 $(MSGFILTER) `echo $$lang | sed -e 's/.*@//'` \
31 ;; \
32 esac } 2>/dev/null > $$tmpdir/$$lang.new.po \
33 ; then \
34 if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
35 rm -f $$tmpdir/$$lang.new.po; \
36 else \
37 if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
38 :; \
39 else \
40 echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
41 exit 1; \
42 fi; \
43 fi; \
44 else \
45 echo "creation of $$lang.po failed!" 1>&2; \
46 rm -f $$tmpdir/$$lang.new.po; \
47 fi
48
49 en@quot.insert-header: insert-header.sin
50 sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header
51
52 en@boldquot.insert-header: insert-header.sin
53 sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header
54
55 mostlyclean: mostlyclean-quot
56 mostlyclean-quot:
57 rm -f *.insert-header
0 s/"\([^"]*\)"/“\1”/g
1 s/`\([^`']*\)'/‘\1’/g
2 s/ '\([^`']*\)' / ‘\1’ /g
3 s/ '\([^`']*\)'$/ ‘\1’/g
4 s/^'\([^`']*\)' /‘\1’ /g
5 s/“”/""/g
6 s/“/“/g
7 s/”/”/g
8 s/‘/‘/g
9 s/’/’/g
Binary diff not shown
+290
-234
po/ca.po less more
44 #
55 msgid ""
66 msgstr ""
7 "Project-Id-Version: elektroid 1.4\n"
7 "Project-Id-Version: elektroid 2.2\n"
88 "Report-Msgid-Bugs-To: dagargo@gmail.com\n"
9 "POT-Creation-Date: 2022-06-03 08:47+0200\n"
9 "POT-Creation-Date: 2022-11-20 21:30+0100\n"
1010 "PO-Revision-Date: 2020-04-26 13:00+0100\n"
1111 "Last-Translator: David García Goñi <dagargo@gmail.com>\n"
1212 "Language-Team: Catalan\n"
1616 "Content-Transfer-Encoding: 8bit\n"
1717 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
1818
19 #: src/elektroid.c:246
19 #: src/connector.c:41 src/connector.c:47
20 msgid "MIDI device"
21 msgstr "Dispositiu MIDI"
22
23 #: src/elektroid.c:528 src/elektroid.c:3999
24 msgid "Not connected"
25 msgstr "No connectat"
26
27 #: src/elektroid.c:678
28 msgid "Cancelling..."
29 msgstr "Cancel·lant..."
30
31 #: src/elektroid.c:699 src/elektroid.c:2570 src/elektroid.c:2779
32 #: src/elektroid.c:3405
33 msgid "Waiting..."
34 msgstr "Esperant..."
35
36 #: src/elektroid.c:702
37 msgid "Sending..."
38 msgstr "Enviant..."
39
40 #: src/elektroid.c:705
41 msgid "Receiving..."
42 msgstr "Rebent..."
43
44 #: src/elektroid.c:765
45 msgid "Receive SysEx"
46 msgstr "Rep SysEx"
47
48 #: src/elektroid.c:797
49 msgid "Save SysEx"
50 msgstr "Alça SysEx"
51
52 #: src/elektroid.c:800 src/elektroid.c:930 src/elektroid.c:1227
53 #: res/gui.glade:1631 res/gui.glade:1731
54 msgid "_Cancel"
55 msgstr "_Cancel·la"
56
57 #: src/elektroid.c:802 res/gui.glade:1645
58 msgid "_Save"
59 msgstr "_Alça"
60
61 #: src/elektroid.c:806
62 msgid "Received SysEx"
63 msgstr "SysEx rebut"
64
65 #: src/elektroid.c:811 src/elektroid.c:936
66 msgid "SysEx Files"
67 msgstr "Fitxers SysEx"
68
69 #: src/elektroid.c:845
70 #, c-format
71 msgid "Error while saving “%s”: %s."
72 msgstr "Error al guardar «%s»: %s."
73
74 #: src/elektroid.c:866
75 #, c-format
76 msgid "Error while loading “%s”: %s."
77 msgstr "Error al carregar «%s»: %s."
78
79 #: src/elektroid.c:927
80 msgid "Open SysEx"
81 msgstr "Obri SysEx"
82
83 #: src/elektroid.c:932
84 msgid "_Open"
85 msgstr "_Obri"
86
87 #: src/elektroid.c:948
88 msgid "Sending SysEx"
89 msgstr "Enviant SysEx"
90
91 #: src/elektroid.c:1023
92 msgid "minutes"
93 msgstr "minuts"
94
95 #: src/elektroid.c:1226
96 msgid "Are you sure you want to delete the selected items?"
97 msgstr "Està segur de que vol eliminar els elements seleccionats?"
98
99 #: src/elektroid.c:1228
100 msgid "_Delete"
101 msgstr "_Elimina"
102
103 #: src/elektroid.c:1245
104 msgid "Deleting Files"
105 msgstr "Eliminant fitxers"
106
107 #: src/elektroid.c:1246
108 msgid "Deleting..."
109 msgstr "Eliminant..."
110
111 #: src/elektroid.c:1279 res/gui.glade:123 res/gui.glade:214
112 msgid "Rename"
113 msgstr "Canvia el nom"
114
115 #: src/elektroid.c:1302
116 #, c-format
117 msgid "Error while renaming to “%s”: %s."
118 msgstr "Error al canviar el nom a «%s»: %s."
119
120 #: src/elektroid.c:1980 res/gui.glade:576 res/gui.glade:802
121 msgid "Add Directory"
122 msgstr "Afig directori"
123
124 #: src/elektroid.c:1998
125 #, c-format
126 msgid "Error while creating dir “%s”: %s."
127 msgstr "Error al crear el directori «%s»: %s."
128
129 #: src/elektroid.c:2070
130 msgid "Queued"
131 msgstr "A la cua"
132
133 #: src/elektroid.c:2072
134 msgid "Running"
135 msgstr "Executant"
136
137 #: src/elektroid.c:2074
138 msgid "Completed"
139 msgstr "Completada"
140
141 #: src/elektroid.c:2076
142 msgid "Completed with errors"
143 msgstr "Completada amb errors"
144
145 #: src/elektroid.c:2078
146 msgid "Canceled"
147 msgstr "Cancel·lada"
148
149 #: src/elektroid.c:2080 src/elektroid.c:2094
150 msgid "Undefined"
151 msgstr "Indefinit"
152
153 #: src/elektroid.c:2090
154 msgid "Upload"
155 msgstr "Càrrega"
156
157 #: src/elektroid.c:2092
158 msgid "Download"
159 msgstr "Descàrrega"
160
161 #: src/elektroid.c:2569 src/elektroid.c:2778 src/elektroid.c:3404
162 msgid "Preparing Tasks"
163 msgstr "Preparant tasques..."
164
165 #: src/elektroid.c:3120
166 msgid "Connecting to Device"
167 msgstr "Connectant amb el dispositiu"
168
169 #: src/elektroid.c:3121
170 msgid "Connecting..."
171 msgstr "Conectant..."
172
173 #: src/elektroid.c:3131
174 #, c-format
175 msgid "Device “%s” not recognized: %s"
176 msgstr "Dispositiu «%s» no reconegut: %s"
177
178 #: src/elektroid.c:3398
179 msgid "Moving Files"
180 msgstr "Movent fitxers"
181
182 #: src/elektroid.c:3399
183 msgid "Moving..."
184 msgstr "Movent..."
185
186 #: src/local.c:488
187 msgid "System"
188 msgstr "Sistema"
189
190 #: src/connectors/sds.c:1138 src/connectors/sds.c:1144
191 msgid "SDS sampler"
192 msgstr "Mostrador SDS"
193
194 #: res/gui.glade:72
195 msgid "Upload Selection"
196 msgstr "Carrega la selecció"
197
198 #: res/gui.glade:87 res/gui.glade:178
199 msgid "Play"
200 msgstr "Reproduïx"
201
202 #: res/gui.glade:101 res/gui.glade:192
203 msgid "Open With External Editor"
204 msgstr "Obri amb l'editor extern"
205
206 #: res/gui.glade:109 res/gui.glade:200
207 msgid "Show in File Manager"
208 msgstr "Mostra al navegador de fitxers"
209
210 #: res/gui.glade:132 res/gui.glade:223
211 msgid "Delete"
212 msgstr "Elimina"
213
214 #: res/gui.glade:163
215 msgid "Download Selection"
216 msgstr "Descarrega la selecció"
217
218 #: res/gui.glade:259
219 msgid "GNU/Linux transfer application for Elektron devices"
220 msgstr "Aplicació GNU/Linux de transferència per a dispositius Elektron"
221
222 #: res/gui.glade:262
223 msgid "translator-credits"
224 msgstr "David García Goñi <dagargo@gmail.com>"
225
226 #: res/gui.glade:310
227 msgid "_Receive SysEx"
228 msgstr "_Rep SysEx"
229
230 #: res/gui.glade:323
231 msgid "_Send SysEx"
232 msgstr "_Envia SysEx"
233
234 #: res/gui.glade:347
235 msgid "OS _Upgrade"
236 msgstr "_Actualitza el SO"
237
238 #: res/gui.glade:371
239 msgid "_About"
240 msgstr "_Quant a"
241
242 #: res/gui.glade:451
243 msgid "Refresh Devices"
244 msgstr "Actualitza els dispositius"
245
246 #: res/gui.glade:555 res/gui.glade:781
247 msgid "Go to Parent Directory"
248 msgstr "Ves al directori pare"
249
250 #: res/gui.glade:597 res/gui.glade:823
251 msgid "Refresh Directory"
252 msgstr "Actualitza el directori"
253
254 #: res/gui.glade:678 res/gui.glade:884 res/gui.glade:1676
255 msgid "Name"
256 msgstr "Nom"
257
258 #: res/gui.glade:692 res/gui.glade:898
259 msgid "Size"
260 msgstr "Mida"
261
262 #. It is recommended to split the text in two lines if it is too long
263 #: res/gui.glade:1001
264 msgid "Auto play"
265 msgstr ""
266 "Reproduïx\n"
267 "automàticament"
268
269 #: res/gui.glade:1041
270 msgid "Playing mix depends on the destination channels"
271 msgstr "La mescla per a reproducció depén dels canals de destinació"
272
273 #. It is recommended to split the text in two lines if it is too long
274 #: res/gui.glade:1043
275 msgid ""
276 "Mix depending\n"
277 "on destination"
278 msgstr ""
279 "Mescla segón\n"
280 "la destinació"
281
282 #: res/gui.glade:1233
20283 msgid "Samples"
21284 msgstr "Mostres"
22285
23 #: src/elektroid.c:248
24 msgid "Presets"
25 msgstr "Programes"
26
27 #: src/elektroid.c:250
28 msgid "Projects"
29 msgstr "Projectes"
30
31 #: src/elektroid.c:252
32 msgid "Sounds"
33 msgstr "Sos"
34
35 #: src/elektroid.c:254 src/elektroid.c:1689 src/elektroid.c:1703
36 msgid "Undefined"
37 msgstr "Indefinit"
38
39 #: src/elektroid.c:434
40 #, c-format
41 msgid "Connected to %s%s"
42 msgstr "Connectat a %s%s"
43
44 #: src/elektroid.c:442 src/elektroid.c:3256
45 msgid "Not connected"
46 msgstr "No connectat"
47
48 #: src/elektroid.c:585
49 msgid "Waiting..."
50 msgstr "Esperant..."
51
52 #: src/elektroid.c:588
53 msgid "Sending..."
54 msgstr "Enviant..."
55
56 #: src/elektroid.c:592
57 msgid "Receiving..."
58 msgstr "Rebent..."
59
60 #: src/elektroid.c:660
61 msgid "Receive SysEx"
62 msgstr "Rep SysEx"
63
64 #: src/elektroid.c:684
65 msgid "Save SysEx"
66 msgstr "Alça SysEx"
67
68 #: src/elektroid.c:687 src/elektroid.c:783 src/elektroid.c:951
69 #: res/gui.glade:1332 res/gui.glade:1432
70 msgid "_Cancel"
71 msgstr "_Cancel·la"
72
73 #: src/elektroid.c:689 res/gui.glade:1346
74 msgid "_Save"
75 msgstr "_Alça"
76
77 #: src/elektroid.c:693
78 msgid "Received SysEx"
79 msgstr "SysEx rebut"
80
81 #: src/elektroid.c:698 src/elektroid.c:789
82 msgid "SysEx Files"
83 msgstr "Fitxers SysEx"
84
85 #: src/elektroid.c:732
86 #, c-format
87 msgid "Error while saving “%s”: %s."
88 msgstr "Error al guardar «%s»: %s."
89
90 #: src/elektroid.c:780
91 msgid "Open SysEx"
92 msgstr "Obri SysEx"
93
94 #: src/elektroid.c:785
95 msgid "_Open"
96 msgstr "_Obri"
97
98 #: src/elektroid.c:806
99 #, c-format
100 msgid "Error while loading “%s”: %s."
101 msgstr "Error al carregar «%s»: %s."
102
103 #: src/elektroid.c:816
104 msgid "Send SysEx"
105 msgstr "Envia SysEx"
106
107 #: src/elektroid.c:918
108 #, c-format
109 msgid "Error while deleting “%s”: %s."
110 msgstr "Error al eliminar «%s»: %s."
111
112 #: src/elektroid.c:950
113 msgid "Are you sure you want to delete the selected items?"
114 msgstr "Està segur de que vol eliminar els elements seleccionats?"
115
116 #: src/elektroid.c:952
117 msgid "_Delete"
118 msgstr "_Elimina"
119
120 #: src/elektroid.c:1005 res/gui.glade:121 res/gui.glade:174
121 msgid "Rename"
122 msgstr "Canvia el nom"
123
124 #: src/elektroid.c:1023
125 #, c-format
126 msgid "Error while renaming to “%s”: %s."
127 msgstr "Error al canviar el nom a «%s»: %s."
128
129 #: src/elektroid.c:1589 res/gui.glade:436 res/gui.glade:606
130 msgid "Add Directory"
131 msgstr "Afig directori"
132
133 #: src/elektroid.c:1607
134 #, c-format
135 msgid "Error while creating dir “%s”: %s."
136 msgstr "Error al crear el directori «%s»: %s."
137
138 #: src/elektroid.c:1679
139 msgid "Queued"
140 msgstr "A la cua"
141
142 #: src/elektroid.c:1681
143 msgid "Running"
144 msgstr "Executant"
145
146 #: src/elektroid.c:1683
147 msgid "Completed"
148 msgstr "Completada"
149
150 #: src/elektroid.c:1685
151 msgid "Completed with errors"
152 msgstr "Completada amb errors"
153
154 #: src/elektroid.c:1687
155 msgid "Canceled"
156 msgstr "Cancel·lada"
157
158 #: src/elektroid.c:1699
159 msgid "Upload"
160 msgstr "Càrrega"
161
162 #: src/elektroid.c:1701
163 msgid "Download"
164 msgstr "Descàrrega"
165
166 #: src/elektroid.c:2560 src/elektroid.c:2601
167 #, c-format
168 msgid "Error while moving from “%s” to “%s”: %s."
169 msgstr "Error al moure de «%s» a «%s»: %s."
170
171 #: res/gui.glade:70
172 msgid "Upload Selection"
173 msgstr "Carrega la selecció"
174
175 #: res/gui.glade:85
176 msgid "Play"
177 msgstr "Reproduïx"
178
179 #: res/gui.glade:99
180 msgid "Open With External Editor"
181 msgstr "Obri amb l'editor extern"
182
183 #: res/gui.glade:107
184 msgid "Show in File Manager"
185 msgstr "Mostra al navegador de fitxers"
186
187 #: res/gui.glade:130 res/gui.glade:183
188 msgid "Delete"
189 msgstr "Elimina"
190
191 #: res/gui.glade:159
192 msgid "Download Selection"
193 msgstr "Descarrega la selecció"
194
195 #: res/gui.glade:219
196 msgid "GNU/Linux transfer application for Elektron devices"
197 msgstr "Aplicació GNU/Linux de transferència per a dispositius Elektron"
198
199 #: res/gui.glade:222
200 msgid "translator-credits"
201 msgstr "David García Goñi <dagargo@gmail.com>"
202
203 #: res/gui.glade:270
204 msgid "_Receive SysEx"
205 msgstr "_Rep SysEx"
206
207 #: res/gui.glade:283
208 msgid "_Send SysEx"
209 msgstr "_Envia SysEx"
210
211 #: res/gui.glade:307
212 msgid "OS _Upgrade"
213 msgstr "_Actualitza el SO"
214
215 #: res/gui.glade:331
216 msgid "_About"
217 msgstr "_Quant a"
218
219 #: res/gui.glade:415 res/gui.glade:585
220 msgid "Go to Parent Directory"
221 msgstr "Ves al directori pare"
222
223 #: res/gui.glade:457 res/gui.glade:627
224 msgid "Refresh Directory"
225 msgstr "Actualitza el directori"
226
227 #: res/gui.glade:514 res/gui.glade:694 res/gui.glade:1377
228 msgid "Name"
229 msgstr "Nom"
230
231 #: res/gui.glade:528 res/gui.glade:708
232 msgid "Size"
233 msgstr "Mida"
234
235 #: res/gui.glade:761
236 msgid "Refresh Devices"
237 msgstr "Actualitza els dispositius"
238
239 #. It is recommended to split the text in two lines if it is too long
240 #: res/gui.glade:879
241 msgid "Auto play"
242 msgstr ""
243 "Reproducció\n"
244 "automàtica"
245
246 #: res/gui.glade:1101
286 #: res/gui.glade:1247
287 msgid "Channels"
288 msgstr "Canals"
289
290 #: res/gui.glade:1261
291 msgid "Sample rate"
292 msgstr "Freqüència"
293
294 #: res/gui.glade:1275
295 msgid "Bit depth"
296 msgstr "Bits"
297
298 #: res/gui.glade:1333
299 msgid "Duration"
300 msgstr "Duració"
301
302 #: res/gui.glade:1399
247303 msgid "Status"
248304 msgstr "Estat"
249305
250 #: res/gui.glade:1112
306 #: res/gui.glade:1410
251307 msgid "Type"
252308 msgstr "Tipus"
253309
254 #: res/gui.glade:1133
310 #: res/gui.glade:1431
255311 msgid "Source"
256312 msgstr "Origen"
257313
258 #: res/gui.glade:1147
314 #: res/gui.glade:1445
259315 msgid "Destination"
260316 msgstr "Destinació"
261317
262 #: res/gui.glade:1162
318 #: res/gui.glade:1460
263319 msgid "Progress"
264320 msgstr "Progrés"
265321
266 #: res/gui.glade:1194
322 #: res/gui.glade:1492
267323 msgid "Cancel Tasks"
268324 msgstr "Cancel·la les tasques"
269325
270 #: res/gui.glade:1215
326 #: res/gui.glade:1513
271327 msgid "Remove Queued Tasks"
272328 msgstr "Elimina les tasques de la cua"
273329
274 #: res/gui.glade:1236
330 #: res/gui.glade:1534
275331 msgid "Clear Finished Tasks"
276332 msgstr "Neteja les tasques terminadas"
Binary diff not shown
+233
-177
po/de.po less more
00 # German translations for Elektroid package.
1 # Copyright (C) 2020 Dennis Braun
1 # Copyright (C) 2020-2022 Dennis Braun
22 # This file is distributed under the same license as the Elektroid package.
3 # Dennis Braun <d_braun@kabelmail.de>, 2020.
3 # Dennis Braun <d_braun@kabelmail.de>, 2022.
44 #
55 msgid ""
66 msgstr ""
7 "Project-Id-Version: elektroid 1.4\n"
7 "Project-Id-Version: elektroid 2.2\n"
88 "Report-Msgid-Bugs-To: dagargo@gmail.com\n"
9 "POT-Creation-Date: 2022-06-03 08:47+0200\n"
10 "PO-Revision-Date: 2021-01-11 22:00+0100\n"
9 "POT-Creation-Date: 2022-11-20 21:30+0100\n"
10 "PO-Revision-Date: 2022-11-01 21:47+0100\n"
1111 "Last-Translator: Dennis Braun <d_braun@kabelmail.de>\n"
1212 "Language-Team: German\n"
1313 "Language: de\n"
1616 "Content-Transfer-Encoding: 8bit\n"
1717 "Plural-Forms: nplurals=2; plural=(n > 1);\n"
1818
19 #: src/elektroid.c:246
20 msgid "Samples"
21 msgstr "Samples"
22
23 #: src/elektroid.c:248
24 msgid "Presets"
25 msgstr "Presets"
26
27 #: src/elektroid.c:250
28 msgid "Projects"
29 msgstr "Projekte"
30
31 #: src/elektroid.c:252
32 msgid "Sounds"
33 msgstr "Sounds"
34
35 #: src/elektroid.c:254 src/elektroid.c:1689 src/elektroid.c:1703
19 #: src/connector.c:41 src/connector.c:47
20 msgid "MIDI device"
21 msgstr "MIDI Gerät"
22
23 #: src/elektroid.c:528 src/elektroid.c:3999
24 msgid "Not connected"
25 msgstr "Nicht verbunden"
26
27 #: src/elektroid.c:678
28 msgid "Cancelling..."
29 msgstr "Abbrechen..."
30
31 #: src/elektroid.c:699 src/elektroid.c:2570 src/elektroid.c:2779
32 #: src/elektroid.c:3405
33 msgid "Waiting..."
34 msgstr "Warte..."
35
36 #: src/elektroid.c:702
37 msgid "Sending..."
38 msgstr "Sende..."
39
40 #: src/elektroid.c:705
41 msgid "Receiving..."
42 msgstr "Empfange..."
43
44 #: src/elektroid.c:765
45 msgid "Receive SysEx"
46 msgstr "Empfange SysEx"
47
48 #: src/elektroid.c:797
49 msgid "Save SysEx"
50 msgstr "Speichere SysEx"
51
52 #: src/elektroid.c:800 src/elektroid.c:930 src/elektroid.c:1227
53 #: res/gui.glade:1631 res/gui.glade:1731
54 msgid "_Cancel"
55 msgstr "_Abbrechen"
56
57 #: src/elektroid.c:802 res/gui.glade:1645
58 msgid "_Save"
59 msgstr "_Speichern"
60
61 #: src/elektroid.c:806
62 msgid "Received SysEx"
63 msgstr "SysEx empfangen"
64
65 #: src/elektroid.c:811 src/elektroid.c:936
66 msgid "SysEx Files"
67 msgstr "SysEx Dateien"
68
69 #: src/elektroid.c:845
70 #, c-format
71 msgid "Error while saving “%s”: %s."
72 msgstr "Fehler beim Löschen »%s«: %s."
73
74 #: src/elektroid.c:866
75 #, c-format
76 msgid "Error while loading “%s”: %s."
77 msgstr "Fehler beim Löschen »%s«: %s."
78
79 #: src/elektroid.c:927
80 msgid "Open SysEx"
81 msgstr "Öffne SysEx"
82
83 #: src/elektroid.c:932
84 msgid "_Open"
85 msgstr "_Öffnen"
86
87 #: src/elektroid.c:948
88 msgid "Sending SysEx"
89 msgstr "Sende SysEx"
90
91 #: src/elektroid.c:1023
92 msgid "minutes"
93 msgstr "Minuten"
94
95 #: src/elektroid.c:1226
96 msgid "Are you sure you want to delete the selected items?"
97 msgstr "Bist du sicher das du die ausgewählten Elemente löschen möchtest?"
98
99 #: src/elektroid.c:1228
100 msgid "_Delete"
101 msgstr "_Löschen"
102
103 #: src/elektroid.c:1245
104 msgid "Deleting Files"
105 msgstr "Entfernt Dateien"
106
107 #: src/elektroid.c:1246
108 msgid "Deleting..."
109 msgstr "Lösche..."
110
111 #: src/elektroid.c:1279 res/gui.glade:123 res/gui.glade:214
112 msgid "Rename"
113 msgstr "Umbenennen"
114
115 #: src/elektroid.c:1302
116 #, c-format
117 msgid "Error while renaming to “%s”: %s."
118 msgstr "Fehler beim Umbenennen von »%s«: %s."
119
120 #: src/elektroid.c:1980 res/gui.glade:576 res/gui.glade:802
121 msgid "Add Directory"
122 msgstr "Verzeichnis hinzufügen"
123
124 #: src/elektroid.c:1998
125 #, c-format
126 msgid "Error while creating dir “%s”: %s."
127 msgstr "Fehler beim Erstellen des Verzeichnisses »%s«: %s."
128
129 #: src/elektroid.c:2070
130 msgid "Queued"
131 msgstr "In der Warteschlange"
132
133 #: src/elektroid.c:2072
134 msgid "Running"
135 msgstr "Wird ausgeführt"
136
137 #: src/elektroid.c:2074
138 msgid "Completed"
139 msgstr "Fertig"
140
141 #: src/elektroid.c:2076
142 msgid "Completed with errors"
143 msgstr "Abgeschlossen mit Fehlern"
144
145 #: src/elektroid.c:2078
146 msgid "Canceled"
147 msgstr "Abgebrochen"
148
149 #: src/elektroid.c:2080 src/elektroid.c:2094
36150 msgid "Undefined"
37151 msgstr "Undefiniert"
38152
39 #: src/elektroid.c:434
40 #, c-format
41 msgid "Connected to %s%s"
42 msgstr "Verbunden mit %s%s"
43
44 #: src/elektroid.c:442 src/elektroid.c:3256
45 msgid "Not connected"
46 msgstr "Nicht verbunden"
47
48 #: src/elektroid.c:585
49 msgid "Waiting..."
50 msgstr "Warte..."
51
52 #: src/elektroid.c:588
53 msgid "Sending..."
54 msgstr "Sende..."
55
56 #: src/elektroid.c:592
57 msgid "Receiving..."
58 msgstr "Empfange..."
59
60 #: src/elektroid.c:660
61 msgid "Receive SysEx"
62 msgstr "Empfange SysEx"
63
64 #: src/elektroid.c:684
65 msgid "Save SysEx"
66 msgstr "Speichere SysEx"
67
68 #: src/elektroid.c:687 src/elektroid.c:783 src/elektroid.c:951
69 #: res/gui.glade:1332 res/gui.glade:1432
70 msgid "_Cancel"
71 msgstr "_Abbrechen"
72
73 #: src/elektroid.c:689 res/gui.glade:1346
74 msgid "_Save"
75 msgstr "_Speichern"
76
77 #: src/elektroid.c:693
78 msgid "Received SysEx"
79 msgstr "SysEx empfangen"
80
81 #: src/elektroid.c:698 src/elektroid.c:789
82 msgid "SysEx Files"
83 msgstr "SysEx Dateien"
84
85 #: src/elektroid.c:732
86 #, c-format
87 msgid "Error while saving “%s”: %s."
88 msgstr "Fehler beim Löschen »%s«: %s."
89
90 #: src/elektroid.c:780
91 msgid "Open SysEx"
92 msgstr "Öffne SysEx"
93
94 #: src/elektroid.c:785
95 msgid "_Open"
96 msgstr "_Öffnen"
97
98 #: src/elektroid.c:806
99 #, c-format
100 msgid "Error while loading “%s”: %s."
101 msgstr "Fehler beim Löschen »%s«: %s."
102
103 #: src/elektroid.c:816
104 msgid "Send SysEx"
105 msgstr "Sende SysEx"
106
107 #: src/elektroid.c:918
108 #, c-format
109 msgid "Error while deleting “%s”: %s."
110 msgstr "Fehler beim Löschen »%s«: %s."
111
112 #: src/elektroid.c:950
113 msgid "Are you sure you want to delete the selected items?"
114 msgstr "Bist du sicher das du die ausgewählten Elemente löschen möchtest?"
115
116 #: src/elektroid.c:952
117 msgid "_Delete"
118 msgstr "_Löschen"
119
120 #: src/elektroid.c:1005 res/gui.glade:121 res/gui.glade:174
121 msgid "Rename"
122 msgstr "Umbenennen"
123
124 #: src/elektroid.c:1023
125 #, c-format
126 msgid "Error while renaming to “%s”: %s."
127 msgstr "Fehler beim Umbenennen von »%s«: %s."
128
129 #: src/elektroid.c:1589 res/gui.glade:436 res/gui.glade:606
130 msgid "Add Directory"
131 msgstr "Verzeichnis hinzufügen"
132
133 #: src/elektroid.c:1607
134 #, c-format
135 msgid "Error while creating dir “%s”: %s."
136 msgstr "Fehler beim Erstellen des Verzeichnisses »%s«: %s."
137
138 #: src/elektroid.c:1679
139 msgid "Queued"
140 msgstr "In der Warteschlange"
141
142 #: src/elektroid.c:1681
143 msgid "Running"
144 msgstr "Wird ausgeführt"
145
146 #: src/elektroid.c:1683
147 msgid "Completed"
148 msgstr "Fertig"
149
150 #: src/elektroid.c:1685
151 msgid "Completed with errors"
152 msgstr "Abgeschlossen mit Fehlern"
153
154 #: src/elektroid.c:1687
155 msgid "Canceled"
156 msgstr "Abgebrochen"
157
158 #: src/elektroid.c:1699
153 #: src/elektroid.c:2090
159154 msgid "Upload"
160155 msgstr "Hochladen"
161156
162 #: src/elektroid.c:1701
157 #: src/elektroid.c:2092
163158 msgid "Download"
164159 msgstr "Herunterladen"
165160
166 #: src/elektroid.c:2560 src/elektroid.c:2601
167 #, c-format
168 msgid "Error while moving from “%s” to “%s”: %s."
169 msgstr "Fehler beim Verschieben von »%s« nach »%s«: %s."
170
171 #: res/gui.glade:70
161 #: src/elektroid.c:2569 src/elektroid.c:2778 src/elektroid.c:3404
162 msgid "Preparing Tasks"
163 msgstr "Aufgaben werden vorbereitet"
164
165 #: src/elektroid.c:3120
166 msgid "Connecting to Device"
167 msgstr "Verbindung zum Gerät wird hergestellt"
168
169 #: src/elektroid.c:3121
170 msgid "Connecting..."
171 msgstr "Verbinde..."
172
173 #: src/elektroid.c:3131
174 #, c-format
175 msgid "Device “%s” not recognized: %s"
176 msgstr "Gerät “%s” nicht erkannt: %s"
177
178 #: src/elektroid.c:3398
179 msgid "Moving Files"
180 msgstr "Verschiebe Dateien"
181
182 #: src/elektroid.c:3399
183 msgid "Moving..."
184 msgstr "Verschiebe..."
185
186 #: src/local.c:488
187 msgid "System"
188 msgstr ""
189
190 #: src/connectors/sds.c:1138 src/connectors/sds.c:1144
191 msgid "SDS sampler"
192 msgstr ""
193
194 #: res/gui.glade:72
172195 msgid "Upload Selection"
173196 msgstr "Upload Auswahl"
174197
175 #: res/gui.glade:85
198 #: res/gui.glade:87 res/gui.glade:178
176199 msgid "Play"
177200 msgstr "Abspielen"
178201
179 #: res/gui.glade:99
202 #: res/gui.glade:101 res/gui.glade:192
180203 msgid "Open With External Editor"
181204 msgstr "Öffnen mit externen Editor"
182205
183 #: res/gui.glade:107
206 #: res/gui.glade:109 res/gui.glade:200
184207 msgid "Show in File Manager"
185208 msgstr "Im Dateimanager _Anzeigen"
186209
187 #: res/gui.glade:130 res/gui.glade:183
210 #: res/gui.glade:132 res/gui.glade:223
188211 msgid "Delete"
189212 msgstr "Löschen"
190213
191 #: res/gui.glade:159
214 #: res/gui.glade:163
192215 msgid "Download Selection"
193216 msgstr "Download Auswahl"
194217
195 #: res/gui.glade:219
218 #: res/gui.glade:259
196219 msgid "GNU/Linux transfer application for Elektron devices"
197220 msgstr "GNU/Linux Transfer Anwendung für Elektron Instrumente"
198221
199 #: res/gui.glade:222
222 #: res/gui.glade:262
200223 msgid "translator-credits"
201224 msgstr "Dennis Braun <d_braun@kabelmail.de>"
202225
203 #: res/gui.glade:270
226 #: res/gui.glade:310
204227 msgid "_Receive SysEx"
205228 msgstr "_Empfange SysEx"
206229
207 #: res/gui.glade:283
230 #: res/gui.glade:323
208231 msgid "_Send SysEx"
209232 msgstr "_Sende SysEx"
210233
211 #: res/gui.glade:307
234 #: res/gui.glade:347
212235 msgid "OS _Upgrade"
213236 msgstr "OS _Aktualisierung"
214237
215 #: res/gui.glade:331
238 #: res/gui.glade:371
216239 msgid "_About"
217240 msgstr "_Info"
218241
219 #: res/gui.glade:415 res/gui.glade:585
242 #: res/gui.glade:451
243 msgid "Refresh Devices"
244 msgstr "Aktualisiere Geräte"
245
246 #: res/gui.glade:555 res/gui.glade:781
220247 msgid "Go to Parent Directory"
221248 msgstr "Gehe zum Überverzeichnis"
222249
223 #: res/gui.glade:457 res/gui.glade:627
250 #: res/gui.glade:597 res/gui.glade:823
224251 msgid "Refresh Directory"
225252 msgstr "Aktualisiere Verzeichnis"
226253
227 #: res/gui.glade:514 res/gui.glade:694 res/gui.glade:1377
254 #: res/gui.glade:678 res/gui.glade:884 res/gui.glade:1676
228255 msgid "Name"
229256 msgstr "Name"
230257
231 #: res/gui.glade:528 res/gui.glade:708
258 #: res/gui.glade:692 res/gui.glade:898
232259 msgid "Size"
233260 msgstr "Größe"
234261
235 #: res/gui.glade:761
236 msgid "Refresh Devices"
237 msgstr "Aktualisiere Geräte"
238
239262 #. It is recommended to split the text in two lines if it is too long
240 #: res/gui.glade:879
263 #: res/gui.glade:1001
241264 msgid "Auto play"
242265 msgstr "Auto Play"
243266
244 #: res/gui.glade:1101
267 #: res/gui.glade:1041
268 msgid "Playing mix depends on the destination channels"
269 msgstr "Das Abspielen vom Mix hängt von den Zielkanälen ab"
270
271 #. It is recommended to split the text in two lines if it is too long
272 #: res/gui.glade:1043
273 msgid ""
274 "Mix depending\n"
275 "on destination"
276 msgstr ""
277 "Mix hängt ab von\n"
278 "den Zielkanälen"
279
280 #: res/gui.glade:1233
281 msgid "Samples"
282 msgstr ""
283
284 #: res/gui.glade:1247
285 msgid "Channels"
286 msgstr "Kanäle"
287
288 #: res/gui.glade:1261
289 msgid "Sample rate"
290 msgstr "Sample Rate"
291
292 #: res/gui.glade:1275
293 msgid "Bit depth"
294 msgstr "Bit-Tiefe"
295
296 #: res/gui.glade:1333
297 msgid "Duration"
298 msgstr "Dauer"
299
300 #: res/gui.glade:1399
245301 msgid "Status"
246302 msgstr "Status"
247303
248 #: res/gui.glade:1112
304 #: res/gui.glade:1410
249305 msgid "Type"
250306 msgstr "Typ"
251307
252 #: res/gui.glade:1133
308 #: res/gui.glade:1431
253309 msgid "Source"
254310 msgstr "Quelle"
255311
256 #: res/gui.glade:1147
312 #: res/gui.glade:1445
257313 msgid "Destination"
258314 msgstr "Ziel"
259315
260 #: res/gui.glade:1162
316 #: res/gui.glade:1460
261317 msgid "Progress"
262318 msgstr "Fortschritt"
263319
264 #: res/gui.glade:1194
320 #: res/gui.glade:1492
265321 msgid "Cancel Tasks"
266322 msgstr "Aufgaben abbrechen"
267323
268 #: res/gui.glade:1215
324 #: res/gui.glade:1513
269325 msgid "Remove Queued Tasks"
270326 msgstr "Lösche Aufgaben in der Warteschlange"
271327
272 #: res/gui.glade:1236
328 #: res/gui.glade:1534
273329 msgid "Clear Finished Tasks"
274330 msgstr "Abgeschlossene Aufgaben aufräumen"
55 #, fuzzy
66 msgid ""
77 msgstr ""
8 "Project-Id-Version: elektroid 2.1\n"
8 "Project-Id-Version: elektroid 2.2\n"
99 "Report-Msgid-Bugs-To: dagargo@gmail.com\n"
10 "POT-Creation-Date: 2022-06-03 08:47+0200\n"
10 "POT-Creation-Date: 2022-11-20 21:30+0100\n"
1111 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1212 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1313 "Language-Team: LANGUAGE <LL@li.org>\n"
1616 "Content-Type: text/plain; charset=UTF-8\n"
1717 "Content-Transfer-Encoding: 8bit\n"
1818
19 #: src/elektroid.c:246
19 #: src/connector.c:41 src/connector.c:47
20 msgid "MIDI device"
21 msgstr ""
22
23 #: src/elektroid.c:528 src/elektroid.c:3999
24 msgid "Not connected"
25 msgstr ""
26
27 #: src/elektroid.c:678
28 msgid "Cancelling..."
29 msgstr ""
30
31 #: src/elektroid.c:699 src/elektroid.c:2570 src/elektroid.c:2779
32 #: src/elektroid.c:3405
33 msgid "Waiting..."
34 msgstr ""
35
36 #: src/elektroid.c:702
37 msgid "Sending..."
38 msgstr ""
39
40 #: src/elektroid.c:705
41 msgid "Receiving..."
42 msgstr ""
43
44 #: src/elektroid.c:765
45 msgid "Receive SysEx"
46 msgstr ""
47
48 #: src/elektroid.c:797
49 msgid "Save SysEx"
50 msgstr ""
51
52 #: src/elektroid.c:800 src/elektroid.c:930 src/elektroid.c:1227
53 #: res/gui.glade:1631 res/gui.glade:1731
54 msgid "_Cancel"
55 msgstr ""
56
57 #: src/elektroid.c:802 res/gui.glade:1645
58 msgid "_Save"
59 msgstr ""
60
61 #: src/elektroid.c:806
62 msgid "Received SysEx"
63 msgstr ""
64
65 #: src/elektroid.c:811 src/elektroid.c:936
66 msgid "SysEx Files"
67 msgstr ""
68
69 #: src/elektroid.c:845
70 #, c-format
71 msgid "Error while saving “%s”: %s."
72 msgstr ""
73
74 #: src/elektroid.c:866
75 #, c-format
76 msgid "Error while loading “%s”: %s."
77 msgstr ""
78
79 #: src/elektroid.c:927
80 msgid "Open SysEx"
81 msgstr ""
82
83 #: src/elektroid.c:932
84 msgid "_Open"
85 msgstr ""
86
87 #: src/elektroid.c:948
88 msgid "Sending SysEx"
89 msgstr ""
90
91 #: src/elektroid.c:1023
92 msgid "minutes"
93 msgstr ""
94
95 #: src/elektroid.c:1226
96 msgid "Are you sure you want to delete the selected items?"
97 msgstr ""
98
99 #: src/elektroid.c:1228
100 msgid "_Delete"
101 msgstr ""
102
103 #: src/elektroid.c:1245
104 msgid "Deleting Files"
105 msgstr ""
106
107 #: src/elektroid.c:1246
108 msgid "Deleting..."
109 msgstr ""
110
111 #: src/elektroid.c:1279 res/gui.glade:123 res/gui.glade:214
112 msgid "Rename"
113 msgstr ""
114
115 #: src/elektroid.c:1302
116 #, c-format
117 msgid "Error while renaming to “%s”: %s."
118 msgstr ""
119
120 #: src/elektroid.c:1980 res/gui.glade:576 res/gui.glade:802
121 msgid "Add Directory"
122 msgstr ""
123
124 #: src/elektroid.c:1998
125 #, c-format
126 msgid "Error while creating dir “%s”: %s."
127 msgstr ""
128
129 #: src/elektroid.c:2070
130 msgid "Queued"
131 msgstr ""
132
133 #: src/elektroid.c:2072
134 msgid "Running"
135 msgstr ""
136
137 #: src/elektroid.c:2074
138 msgid "Completed"
139 msgstr ""
140
141 #: src/elektroid.c:2076
142 msgid "Completed with errors"
143 msgstr ""
144
145 #: src/elektroid.c:2078
146 msgid "Canceled"
147 msgstr ""
148
149 #: src/elektroid.c:2080 src/elektroid.c:2094
150 msgid "Undefined"
151 msgstr ""
152
153 #: src/elektroid.c:2090
154 msgid "Upload"
155 msgstr ""
156
157 #: src/elektroid.c:2092
158 msgid "Download"
159 msgstr ""
160
161 #: src/elektroid.c:2569 src/elektroid.c:2778 src/elektroid.c:3404
162 msgid "Preparing Tasks"
163 msgstr ""
164
165 #: src/elektroid.c:3120
166 msgid "Connecting to Device"
167 msgstr ""
168
169 #: src/elektroid.c:3121
170 msgid "Connecting..."
171 msgstr ""
172
173 #: src/elektroid.c:3131
174 #, c-format
175 msgid "Device “%s” not recognized: %s"
176 msgstr ""
177
178 #: src/elektroid.c:3398
179 msgid "Moving Files"
180 msgstr ""
181
182 #: src/elektroid.c:3399
183 msgid "Moving..."
184 msgstr ""
185
186 #: src/local.c:488
187 msgid "System"
188 msgstr ""
189
190 #: src/connectors/sds.c:1138 src/connectors/sds.c:1144
191 msgid "SDS sampler"
192 msgstr ""
193
194 #: res/gui.glade:72
195 msgid "Upload Selection"
196 msgstr ""
197
198 #: res/gui.glade:87 res/gui.glade:178
199 msgid "Play"
200 msgstr ""
201
202 #: res/gui.glade:101 res/gui.glade:192
203 msgid "Open With External Editor"
204 msgstr ""
205
206 #: res/gui.glade:109 res/gui.glade:200
207 msgid "Show in File Manager"
208 msgstr ""
209
210 #: res/gui.glade:132 res/gui.glade:223
211 msgid "Delete"
212 msgstr ""
213
214 #: res/gui.glade:163
215 msgid "Download Selection"
216 msgstr ""
217
218 #: res/gui.glade:259
219 msgid "GNU/Linux transfer application for Elektron devices"
220 msgstr ""
221
222 #: res/gui.glade:262
223 msgid "translator-credits"
224 msgstr ""
225
226 #: res/gui.glade:310
227 msgid "_Receive SysEx"
228 msgstr ""
229
230 #: res/gui.glade:323
231 msgid "_Send SysEx"
232 msgstr ""
233
234 #: res/gui.glade:347
235 msgid "OS _Upgrade"
236 msgstr ""
237
238 #: res/gui.glade:371
239 msgid "_About"
240 msgstr ""
241
242 #: res/gui.glade:451
243 msgid "Refresh Devices"
244 msgstr ""
245
246 #: res/gui.glade:555 res/gui.glade:781
247 msgid "Go to Parent Directory"
248 msgstr ""
249
250 #: res/gui.glade:597 res/gui.glade:823
251 msgid "Refresh Directory"
252 msgstr ""
253
254 #: res/gui.glade:678 res/gui.glade:884 res/gui.glade:1676
255 msgid "Name"
256 msgstr ""
257
258 #: res/gui.glade:692 res/gui.glade:898
259 msgid "Size"
260 msgstr ""
261
262 #. It is recommended to split the text in two lines if it is too long
263 #: res/gui.glade:1001
264 msgid "Auto play"
265 msgstr ""
266
267 #: res/gui.glade:1041
268 msgid "Playing mix depends on the destination channels"
269 msgstr ""
270
271 #. It is recommended to split the text in two lines if it is too long
272 #: res/gui.glade:1043
273 msgid ""
274 "Mix depending\n"
275 "on destination"
276 msgstr ""
277
278 #: res/gui.glade:1233
20279 msgid "Samples"
21280 msgstr ""
22281
23 #: src/elektroid.c:248
24 msgid "Presets"
25 msgstr ""
26
27 #: src/elektroid.c:250
28 msgid "Projects"
29 msgstr ""
30
31 #: src/elektroid.c:252
32 msgid "Sounds"
33 msgstr ""
34
35 #: src/elektroid.c:254 src/elektroid.c:1689 src/elektroid.c:1703
36 msgid "Undefined"
37 msgstr ""
38
39 #: src/elektroid.c:434
40 #, c-format
41 msgid "Connected to %s%s"
42 msgstr ""
43
44 #: src/elektroid.c:442 src/elektroid.c:3256
45 msgid "Not connected"
46 msgstr ""
47
48 #: src/elektroid.c:585
49 msgid "Waiting..."
50 msgstr ""
51
52 #: src/elektroid.c:588
53 msgid "Sending..."
54 msgstr ""
55
56 #: src/elektroid.c:592
57 msgid "Receiving..."
58 msgstr ""
59
60 #: src/elektroid.c:660
61 msgid "Receive SysEx"
62 msgstr ""
63
64 #: src/elektroid.c:684
65 msgid "Save SysEx"
66 msgstr ""
67
68 #: src/elektroid.c:687 src/elektroid.c:783 src/elektroid.c:951
69 #: res/gui.glade:1332 res/gui.glade:1432
70 msgid "_Cancel"
71 msgstr ""
72
73 #: src/elektroid.c:689 res/gui.glade:1346
74 msgid "_Save"
75 msgstr ""
76
77 #: src/elektroid.c:693
78 msgid "Received SysEx"
79 msgstr ""
80
81 #: src/elektroid.c:698 src/elektroid.c:789
82 msgid "SysEx Files"
83 msgstr ""
84
85 #: src/elektroid.c:732
86 #, c-format
87 msgid "Error while saving “%s”: %s."
88 msgstr ""
89
90 #: src/elektroid.c:780
91 msgid "Open SysEx"
92 msgstr ""
93
94 #: src/elektroid.c:785
95 msgid "_Open"
96 msgstr ""
97
98 #: src/elektroid.c:806
99 #, c-format
100 msgid "Error while loading “%s”: %s."
101 msgstr ""
102
103 #: src/elektroid.c:816
104 msgid "Send SysEx"
105 msgstr ""
106
107 #: src/elektroid.c:918
108 #, c-format
109 msgid "Error while deleting “%s”: %s."
110 msgstr ""
111
112 #: src/elektroid.c:950
113 msgid "Are you sure you want to delete the selected items?"
114 msgstr ""
115
116 #: src/elektroid.c:952
117 msgid "_Delete"
118 msgstr ""
119
120 #: src/elektroid.c:1005 res/gui.glade:121 res/gui.glade:174
121 msgid "Rename"
122 msgstr ""
123
124 #: src/elektroid.c:1023
125 #, c-format
126 msgid "Error while renaming to “%s”: %s."
127 msgstr ""
128
129 #: src/elektroid.c:1589 res/gui.glade:436 res/gui.glade:606
130 msgid "Add Directory"
131 msgstr ""
132
133 #: src/elektroid.c:1607
134 #, c-format
135 msgid "Error while creating dir “%s”: %s."
136 msgstr ""
137
138 #: src/elektroid.c:1679
139 msgid "Queued"
140 msgstr ""
141
142 #: src/elektroid.c:1681
143 msgid "Running"
144 msgstr ""
145
146 #: src/elektroid.c:1683
147 msgid "Completed"
148 msgstr ""
149
150 #: src/elektroid.c:1685
151 msgid "Completed with errors"
152 msgstr ""
153
154 #: src/elektroid.c:1687
155 msgid "Canceled"
156 msgstr ""
157
158 #: src/elektroid.c:1699
159 msgid "Upload"
160 msgstr ""
161
162 #: src/elektroid.c:1701
163 msgid "Download"
164 msgstr ""
165
166 #: src/elektroid.c:2560 src/elektroid.c:2601
167 #, c-format
168 msgid "Error while moving from “%s” to “%s”: %s."
169 msgstr ""
170
171 #: res/gui.glade:70
172 msgid "Upload Selection"
173 msgstr ""
174
175 #: res/gui.glade:85
176 msgid "Play"
177 msgstr ""
178
179 #: res/gui.glade:99
180 msgid "Open With External Editor"
181 msgstr ""
182
183 #: res/gui.glade:107
184 msgid "Show in File Manager"
185 msgstr ""
186
187 #: res/gui.glade:130 res/gui.glade:183
188 msgid "Delete"
189 msgstr ""
190
191 #: res/gui.glade:159
192 msgid "Download Selection"
193 msgstr ""
194
195 #: res/gui.glade:219
196 msgid "GNU/Linux transfer application for Elektron devices"
197 msgstr ""
198
199 #: res/gui.glade:222
200 msgid "translator-credits"
201 msgstr ""
202
203 #: res/gui.glade:270
204 msgid "_Receive SysEx"
205 msgstr ""
206
207 #: res/gui.glade:283
208 msgid "_Send SysEx"
209 msgstr ""
210
211 #: res/gui.glade:307
212 msgid "OS _Upgrade"
213 msgstr ""
214
215 #: res/gui.glade:331
216 msgid "_About"
217 msgstr ""
218
219 #: res/gui.glade:415 res/gui.glade:585
220 msgid "Go to Parent Directory"
221 msgstr ""
222
223 #: res/gui.glade:457 res/gui.glade:627
224 msgid "Refresh Directory"
225 msgstr ""
226
227 #: res/gui.glade:514 res/gui.glade:694 res/gui.glade:1377
228 msgid "Name"
229 msgstr ""
230
231 #: res/gui.glade:528 res/gui.glade:708
232 msgid "Size"
233 msgstr ""
234
235 #: res/gui.glade:761
236 msgid "Refresh Devices"
237 msgstr ""
238
239 #. It is recommended to split the text in two lines if it is too long
240 #: res/gui.glade:879
241 msgid "Auto play"
242 msgstr ""
243
244 #: res/gui.glade:1101
282 #: res/gui.glade:1247
283 msgid "Channels"
284 msgstr ""
285
286 #: res/gui.glade:1261
287 msgid "Sample rate"
288 msgstr ""
289
290 #: res/gui.glade:1275
291 msgid "Bit depth"
292 msgstr ""
293
294 #: res/gui.glade:1333
295 msgid "Duration"
296 msgstr ""
297
298 #: res/gui.glade:1399
245299 msgid "Status"
246300 msgstr ""
247301
248 #: res/gui.glade:1112
302 #: res/gui.glade:1410
249303 msgid "Type"
250304 msgstr ""
251305
252 #: res/gui.glade:1133
306 #: res/gui.glade:1431
253307 msgid "Source"
254308 msgstr ""
255309
256 #: res/gui.glade:1147
310 #: res/gui.glade:1445
257311 msgid "Destination"
258312 msgstr ""
259313
260 #: res/gui.glade:1162
314 #: res/gui.glade:1460
261315 msgid "Progress"
262316 msgstr ""
263317
264 #: res/gui.glade:1194
318 #: res/gui.glade:1492
265319 msgid "Cancel Tasks"
266320 msgstr ""
267321
268 #: res/gui.glade:1215
322 #: res/gui.glade:1513
269323 msgid "Remove Queued Tasks"
270324 msgstr ""
271325
272 #: res/gui.glade:1236
326 #: res/gui.glade:1534
273327 msgid "Clear Finished Tasks"
274328 msgstr ""
Binary diff not shown
+288
-232
po/en.po less more
44 #
55 msgid ""
66 msgstr ""
7 "Project-Id-Version: elektroid 1.4\n"
7 "Project-Id-Version: elektroid 2.2\n"
88 "Report-Msgid-Bugs-To: dagargo@gmail.com\n"
9 "POT-Creation-Date: 2022-06-03 08:47+0200\n"
9 "POT-Creation-Date: 2022-11-20 21:30+0100\n"
1010 "PO-Revision-Date: 2020-04-26 13:00+0100\n"
1111 "Last-Translator: David García Goñi <dagargo@gmail.com>\n"
1212 "Language-Team: English\n"
1616 "Content-Transfer-Encoding: 8bit\n"
1717 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
1818
19 #: src/elektroid.c:246
19 #: src/connector.c:41 src/connector.c:47
20 msgid "MIDI device"
21 msgstr "MIDI device"
22
23 #: src/elektroid.c:528 src/elektroid.c:3999
24 msgid "Not connected"
25 msgstr "Not connected"
26
27 #: src/elektroid.c:678
28 msgid "Cancelling..."
29 msgstr "Cancelling..."
30
31 #: src/elektroid.c:699 src/elektroid.c:2570 src/elektroid.c:2779
32 #: src/elektroid.c:3405
33 msgid "Waiting..."
34 msgstr "Waiting..."
35
36 #: src/elektroid.c:702
37 msgid "Sending..."
38 msgstr "Sending..."
39
40 #: src/elektroid.c:705
41 msgid "Receiving..."
42 msgstr "Receiving..."
43
44 #: src/elektroid.c:765
45 msgid "Receive SysEx"
46 msgstr "Receive SysEx"
47
48 #: src/elektroid.c:797
49 msgid "Save SysEx"
50 msgstr "Save SysEx"
51
52 #: src/elektroid.c:800 src/elektroid.c:930 src/elektroid.c:1227
53 #: res/gui.glade:1631 res/gui.glade:1731
54 msgid "_Cancel"
55 msgstr "_Cancel"
56
57 #: src/elektroid.c:802 res/gui.glade:1645
58 msgid "_Save"
59 msgstr "_Save"
60
61 #: src/elektroid.c:806
62 msgid "Received SysEx"
63 msgstr "Received SysEx"
64
65 #: src/elektroid.c:811 src/elektroid.c:936
66 msgid "SysEx Files"
67 msgstr "SysEx Files"
68
69 #: src/elektroid.c:845
70 #, c-format
71 msgid "Error while saving “%s”: %s."
72 msgstr "Error while saving “%s”: %s."
73
74 #: src/elektroid.c:866
75 #, c-format
76 msgid "Error while loading “%s”: %s."
77 msgstr "Error while loading “%s”: %s."
78
79 #: src/elektroid.c:927
80 msgid "Open SysEx"
81 msgstr "Open SysEx"
82
83 #: src/elektroid.c:932
84 msgid "_Open"
85 msgstr "_Open"
86
87 #: src/elektroid.c:948
88 msgid "Sending SysEx"
89 msgstr "Sending SysEx"
90
91 #: src/elektroid.c:1023
92 msgid "minutes"
93 msgstr "minutes"
94
95 #: src/elektroid.c:1226
96 msgid "Are you sure you want to delete the selected items?"
97 msgstr "Are you sure you want to delete the selected items?"
98
99 #: src/elektroid.c:1228
100 msgid "_Delete"
101 msgstr "_Delete"
102
103 #: src/elektroid.c:1245
104 msgid "Deleting Files"
105 msgstr "Deleting Files"
106
107 #: src/elektroid.c:1246
108 msgid "Deleting..."
109 msgstr "Deleting..."
110
111 #: src/elektroid.c:1279 res/gui.glade:123 res/gui.glade:214
112 msgid "Rename"
113 msgstr "Rename"
114
115 #: src/elektroid.c:1302
116 #, c-format
117 msgid "Error while renaming to “%s”: %s."
118 msgstr "Error while renaming to “%s”: %s."
119
120 #: src/elektroid.c:1980 res/gui.glade:576 res/gui.glade:802
121 msgid "Add Directory"
122 msgstr "Add Directory"
123
124 #: src/elektroid.c:1998
125 #, c-format
126 msgid "Error while creating dir “%s”: %s."
127 msgstr "Error while creating dir “%s”: %s."
128
129 #: src/elektroid.c:2070
130 msgid "Queued"
131 msgstr "Queued"
132
133 #: src/elektroid.c:2072
134 msgid "Running"
135 msgstr "Running"
136
137 #: src/elektroid.c:2074
138 msgid "Completed"
139 msgstr "Completed"
140
141 #: src/elektroid.c:2076
142 msgid "Completed with errors"
143 msgstr "Completed with errors"
144
145 #: src/elektroid.c:2078
146 msgid "Canceled"
147 msgstr "Canceled"
148
149 #: src/elektroid.c:2080 src/elektroid.c:2094
150 msgid "Undefined"
151 msgstr "Undefined"
152
153 #: src/elektroid.c:2090
154 msgid "Upload"
155 msgstr "Upload"
156
157 #: src/elektroid.c:2092
158 msgid "Download"
159 msgstr "Download"
160
161 #: src/elektroid.c:2569 src/elektroid.c:2778 src/elektroid.c:3404
162 msgid "Preparing Tasks"
163 msgstr "Preparing Tasks"
164
165 #: src/elektroid.c:3120
166 msgid "Connecting to Device"
167 msgstr "Connecting to Device"
168
169 #: src/elektroid.c:3121
170 msgid "Connecting..."
171 msgstr "Connecting..."
172
173 #: src/elektroid.c:3131
174 #, c-format
175 msgid "Device “%s” not recognized: %s"
176 msgstr "Device “%s” not recognized: %s"
177
178 #: src/elektroid.c:3398
179 msgid "Moving Files"
180 msgstr "Moving Files"
181
182 #: src/elektroid.c:3399
183 msgid "Moving..."
184 msgstr "Moving..."
185
186 #: src/local.c:488
187 msgid "System"
188 msgstr "System"
189
190 #: src/connectors/sds.c:1138 src/connectors/sds.c:1144
191 msgid "SDS sampler"
192 msgstr "SDS sampler"
193
194 #: res/gui.glade:72
195 msgid "Upload Selection"
196 msgstr "Upload Selection"
197
198 #: res/gui.glade:87 res/gui.glade:178
199 msgid "Play"
200 msgstr "Play"
201
202 #: res/gui.glade:101 res/gui.glade:192
203 msgid "Open With External Editor"
204 msgstr "Open With External Editor"
205
206 #: res/gui.glade:109 res/gui.glade:200
207 msgid "Show in File Manager"
208 msgstr "Show in File Manager"
209
210 #: res/gui.glade:132 res/gui.glade:223
211 msgid "Delete"
212 msgstr "Delete"
213
214 #: res/gui.glade:163
215 msgid "Download Selection"
216 msgstr "Download selection"
217
218 #: res/gui.glade:259
219 msgid "GNU/Linux transfer application for Elektron devices"
220 msgstr "GNU/Linux transfer application for Elektron devices"
221
222 #: res/gui.glade:262
223 msgid "translator-credits"
224 msgstr "David García Goñi <dagargo@gmail.com>"
225
226 #: res/gui.glade:310
227 msgid "_Receive SysEx"
228 msgstr "_Receive SysEx"
229
230 #: res/gui.glade:323
231 msgid "_Send SysEx"
232 msgstr "_Send SysEx"
233
234 #: res/gui.glade:347
235 msgid "OS _Upgrade"
236 msgstr "OS _Upgrade"
237
238 #: res/gui.glade:371
239 msgid "_About"
240 msgstr "_About"
241
242 #: res/gui.glade:451
243 msgid "Refresh Devices"
244 msgstr "Refresh Devices"
245
246 #: res/gui.glade:555 res/gui.glade:781
247 msgid "Go to Parent Directory"
248 msgstr "Go to Parent Directory"
249
250 #: res/gui.glade:597 res/gui.glade:823
251 msgid "Refresh Directory"
252 msgstr "Refresh Directory"
253
254 #: res/gui.glade:678 res/gui.glade:884 res/gui.glade:1676
255 msgid "Name"
256 msgstr "Name"
257
258 #: res/gui.glade:692 res/gui.glade:898
259 msgid "Size"
260 msgstr "Size"
261
262 #. It is recommended to split the text in two lines if it is too long
263 #: res/gui.glade:1001
264 msgid "Auto play"
265 msgstr "Auto play"
266
267 #: res/gui.glade:1041
268 msgid "Playing mix depends on the destination channels"
269 msgstr "Playing mix depends on the destination channels"
270
271 #. It is recommended to split the text in two lines if it is too long
272 #: res/gui.glade:1043
273 msgid ""
274 "Mix depending\n"
275 "on destination"
276 msgstr ""
277 "Mix depending\n"
278 "on destination"
279
280 #: res/gui.glade:1233
20281 msgid "Samples"
21282 msgstr "Samples"
22283
23 #: src/elektroid.c:248
24 msgid "Presets"
25 msgstr "Presets"
26
27 #: src/elektroid.c:250
28 msgid "Projects"
29 msgstr "Projects"
30
31 #: src/elektroid.c:252
32 msgid "Sounds"
33 msgstr "Sounds"
34
35 #: src/elektroid.c:254 src/elektroid.c:1689 src/elektroid.c:1703
36 msgid "Undefined"
37 msgstr "Undefined"
38
39 #: src/elektroid.c:434
40 #, c-format
41 msgid "Connected to %s%s"
42 msgstr "Connected to %s%s"
43
44 #: src/elektroid.c:442 src/elektroid.c:3256
45 msgid "Not connected"
46 msgstr "Not connected"
47
48 #: src/elektroid.c:585
49 msgid "Waiting..."
50 msgstr "Waiting..."
51
52 #: src/elektroid.c:588
53 msgid "Sending..."
54 msgstr "Sending..."
55
56 #: src/elektroid.c:592
57 msgid "Receiving..."
58 msgstr "Receiving..."
59
60 #: src/elektroid.c:660
61 msgid "Receive SysEx"
62 msgstr "Receive SysEx"
63
64 #: src/elektroid.c:684
65 msgid "Save SysEx"
66 msgstr "Save SysEx"
67
68 #: src/elektroid.c:687 src/elektroid.c:783 src/elektroid.c:951
69 #: res/gui.glade:1332 res/gui.glade:1432
70 msgid "_Cancel"
71 msgstr "_Cancel"
72
73 #: src/elektroid.c:689 res/gui.glade:1346
74 msgid "_Save"
75 msgstr "_Save"
76
77 #: src/elektroid.c:693
78 msgid "Received SysEx"
79 msgstr "Received SysEx"
80
81 #: src/elektroid.c:698 src/elektroid.c:789
82 msgid "SysEx Files"
83 msgstr "SysEx Files"
84
85 #: src/elektroid.c:732
86 #, c-format
87 msgid "Error while saving “%s”: %s."
88 msgstr "Error while saving “%s”: %s."
89
90 #: src/elektroid.c:780
91 msgid "Open SysEx"
92 msgstr "Open SysEx"
93
94 #: src/elektroid.c:785
95 msgid "_Open"
96 msgstr "_Open"
97
98 #: src/elektroid.c:806
99 #, c-format
100 msgid "Error while loading “%s”: %s."
101 msgstr "Error while loading “%s”: %s."
102
103 #: src/elektroid.c:816
104 msgid "Send SysEx"
105 msgstr "Send SysEx"
106
107 #: src/elektroid.c:918
108 #, c-format
109 msgid "Error while deleting “%s”: %s."
110 msgstr "Error while deleting “%s”: %s."
111
112 #: src/elektroid.c:950
113 msgid "Are you sure you want to delete the selected items?"
114 msgstr "Are you sure you want to delete the selected items?"
115
116 #: src/elektroid.c:952
117 msgid "_Delete"
118 msgstr "_Delete"
119
120 #: src/elektroid.c:1005 res/gui.glade:121 res/gui.glade:174
121 msgid "Rename"
122 msgstr "Rename"
123
124 #: src/elektroid.c:1023
125 #, c-format
126 msgid "Error while renaming to “%s”: %s."
127 msgstr "Error while renaming to “%s”: %s."
128
129 #: src/elektroid.c:1589 res/gui.glade:436 res/gui.glade:606
130 msgid "Add Directory"
131 msgstr "Add Directory"
132
133 #: src/elektroid.c:1607
134 #, c-format
135 msgid "Error while creating dir “%s”: %s."
136 msgstr "Error while creating dir “%s”: %s."
137
138 #: src/elektroid.c:1679
139 msgid "Queued"
140 msgstr "Queued"
141
142 #: src/elektroid.c:1681
143 msgid "Running"
144 msgstr "Running"
145
146 #: src/elektroid.c:1683
147 msgid "Completed"
148 msgstr "Completed"
149
150 #: src/elektroid.c:1685
151 msgid "Completed with errors"
152 msgstr "Completed with errors"
153
154 #: src/elektroid.c:1687
155 msgid "Canceled"
156 msgstr "Canceled"
157
158 #: src/elektroid.c:1699
159 msgid "Upload"
160 msgstr "Upload"
161
162 #: src/elektroid.c:1701
163 msgid "Download"
164 msgstr "Download"
165
166 #: src/elektroid.c:2560 src/elektroid.c:2601
167 #, c-format
168 msgid "Error while moving from “%s” to “%s”: %s."
169 msgstr "Error while moving from “%s” to “%s”: %s."
170
171 #: res/gui.glade:70
172 msgid "Upload Selection"
173 msgstr "Upload Selection"
174
175 #: res/gui.glade:85
176 msgid "Play"
177 msgstr "Play"
178
179 #: res/gui.glade:99
180 msgid "Open With External Editor"
181 msgstr "Open With External Editor"
182
183 #: res/gui.glade:107
184 msgid "Show in File Manager"
185 msgstr "Show in File Manager"
186
187 #: res/gui.glade:130 res/gui.glade:183
188 msgid "Delete"
189 msgstr "Delete"
190
191 #: res/gui.glade:159
192 msgid "Download Selection"
193 msgstr "Download selection"
194
195 #: res/gui.glade:219
196 msgid "GNU/Linux transfer application for Elektron devices"
197 msgstr "GNU/Linux transfer application for Elektron devices"
198
199 #: res/gui.glade:222
200 msgid "translator-credits"
201 msgstr "David García Goñi <dagargo@gmail.com>"
202
203 #: res/gui.glade:270
204 msgid "_Receive SysEx"
205 msgstr "_Receive SysEx"
206
207 #: res/gui.glade:283
208 msgid "_Send SysEx"
209 msgstr "_Send SysEx"
210
211 #: res/gui.glade:307
212 msgid "OS _Upgrade"
213 msgstr "OS _Upgrade"
214
215 #: res/gui.glade:331
216 msgid "_About"
217 msgstr "_About"
218
219 #: res/gui.glade:415 res/gui.glade:585
220 msgid "Go to Parent Directory"
221 msgstr "Go to Parent Directory"
222
223 #: res/gui.glade:457 res/gui.glade:627
224 msgid "Refresh Directory"
225 msgstr "Refresh Directory"
226
227 #: res/gui.glade:514 res/gui.glade:694 res/gui.glade:1377
228 msgid "Name"
229 msgstr "Name"
230
231 #: res/gui.glade:528 res/gui.glade:708
232 msgid "Size"
233 msgstr "Size"
234
235 #: res/gui.glade:761
236 msgid "Refresh Devices"
237 msgstr "Refresh Devices"
238
239 #. It is recommended to split the text in two lines if it is too long
240 #: res/gui.glade:879
241 msgid "Auto play"
242 msgstr "Auto play"
243
244 #: res/gui.glade:1101
284 #: res/gui.glade:1247
285 msgid "Channels"
286 msgstr "Channels"
287
288 #: res/gui.glade:1261
289 msgid "Sample rate"
290 msgstr "Sample rate"
291
292 #: res/gui.glade:1275
293 msgid "Bit depth"
294 msgstr "Bit depth"
295
296 #: res/gui.glade:1333
297 msgid "Duration"
298 msgstr "Duration"
299
300 #: res/gui.glade:1399
245301 msgid "Status"
246302 msgstr "Status"
247303
248 #: res/gui.glade:1112
304 #: res/gui.glade:1410
249305 msgid "Type"
250306 msgstr "Type"
251307
252 #: res/gui.glade:1133
308 #: res/gui.glade:1431
253309 msgid "Source"
254310 msgstr "Source"
255311
256 #: res/gui.glade:1147
312 #: res/gui.glade:1445
257313 msgid "Destination"
258314 msgstr "Destination"
259315
260 #: res/gui.glade:1162
316 #: res/gui.glade:1460
261317 msgid "Progress"
262318 msgstr "Progress"
263319
264 #: res/gui.glade:1194
320 #: res/gui.glade:1492
265321 msgid "Cancel Tasks"
266322 msgstr "Cancel Tasks"
267323
268 #: res/gui.glade:1215
324 #: res/gui.glade:1513
269325 msgid "Remove Queued Tasks"
270326 msgstr "Remove Queued Tasks"
271327
272 #: res/gui.glade:1236
328 #: res/gui.glade:1534
273329 msgid "Clear Finished Tasks"
274330 msgstr "Clear Finished Tasks"
0 # All this catalog "translates" are quotation characters.
1 # The msgids must be ASCII and therefore cannot contain real quotation
2 # characters, only substitutes like grave accent (0x60), apostrophe (0x27)
3 # and double quote (0x22). These substitutes look strange; see
4 # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
5 #
6 # This catalog translates grave accent (0x60) and apostrophe (0x27) to
7 # left single quotation mark (U+2018) and right single quotation mark (U+2019).
8 # It also translates pairs of apostrophe (0x27) to
9 # left single quotation mark (U+2018) and right single quotation mark (U+2019)
10 # and pairs of quotation mark (0x22) to
11 # left double quotation mark (U+201C) and right double quotation mark (U+201D).
12 #
13 # When output to an UTF-8 terminal, the quotation characters appear perfectly.
14 # When output to an ISO-8859-1 terminal, the single quotation marks are
15 # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
16 # grave/acute accent (by libiconv), and the double quotation marks are
17 # transliterated to 0x22.
18 # When output to an ASCII terminal, the single quotation marks are
19 # transliterated to apostrophes, and the double quotation marks are
20 # transliterated to 0x22.
21 #
22 # This catalog furthermore displays the text between the quotation marks in
23 # bold face, assuming the VT100/XTerm escape sequences.
24 #
0 # All this catalog "translates" are quotation characters.
1 # The msgids must be ASCII and therefore cannot contain real quotation
2 # characters, only substitutes like grave accent (0x60), apostrophe (0x27)
3 # and double quote (0x22). These substitutes look strange; see
4 # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
5 #
6 # This catalog translates grave accent (0x60) and apostrophe (0x27) to
7 # left single quotation mark (U+2018) and right single quotation mark (U+2019).
8 # It also translates pairs of apostrophe (0x27) to
9 # left single quotation mark (U+2018) and right single quotation mark (U+2019)
10 # and pairs of quotation mark (0x22) to
11 # left double quotation mark (U+201C) and right double quotation mark (U+201D).
12 #
13 # When output to an UTF-8 terminal, the quotation characters appear perfectly.
14 # When output to an ISO-8859-1 terminal, the single quotation marks are
15 # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
16 # grave/acute accent (by libiconv), and the double quotation marks are
17 # transliterated to 0x22.
18 # When output to an ASCII terminal, the single quotation marks are
19 # transliterated to apostrophes, and the double quotation marks are
20 # transliterated to 0x22.
21 #
Binary diff not shown
+290
-234
po/es.po less more
44 #
55 msgid ""
66 msgstr ""
7 "Project-Id-Version: elektroid 1.4\n"
7 "Project-Id-Version: elektroid 2.2\n"
88 "Report-Msgid-Bugs-To: dagargo@gmail.com\n"
9 "POT-Creation-Date: 2022-06-03 08:47+0200\n"
9 "POT-Creation-Date: 2022-11-20 21:30+0100\n"
1010 "PO-Revision-Date: 2020-04-26 13:00+0100\n"
1111 "Last-Translator: David García Goñi <dagargo@gmail.com>\n"
1212 "Language-Team: Spanish\n"
1616 "Content-Transfer-Encoding: 8bit\n"
1717 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
1818
19 #: src/elektroid.c:246
19 #: src/connector.c:41 src/connector.c:47
20 msgid "MIDI device"
21 msgstr "Dispositivo MIDI"
22
23 #: src/elektroid.c:528 src/elektroid.c:3999
24 msgid "Not connected"
25 msgstr "No conectado"
26
27 #: src/elektroid.c:678
28 msgid "Cancelling..."
29 msgstr "Cancelando..."
30
31 #: src/elektroid.c:699 src/elektroid.c:2570 src/elektroid.c:2779
32 #: src/elektroid.c:3405
33 msgid "Waiting..."
34 msgstr "Esperando..."
35
36 #: src/elektroid.c:702
37 msgid "Sending..."
38 msgstr "Enviando..."
39
40 #: src/elektroid.c:705
41 msgid "Receiving..."
42 msgstr "Recibiendo..."
43
44 #: src/elektroid.c:765
45 msgid "Receive SysEx"
46 msgstr "Recibir SysEx"
47
48 #: src/elektroid.c:797
49 msgid "Save SysEx"
50 msgstr "Guardar SysEx"
51
52 #: src/elektroid.c:800 src/elektroid.c:930 src/elektroid.c:1227
53 #: res/gui.glade:1631 res/gui.glade:1731
54 msgid "_Cancel"
55 msgstr "_Cancelar"
56
57 #: src/elektroid.c:802 res/gui.glade:1645
58 msgid "_Save"
59 msgstr "_Guardar"
60
61 #: src/elektroid.c:806
62 msgid "Received SysEx"
63 msgstr "SysEx recibido"
64
65 #: src/elektroid.c:811 src/elektroid.c:936
66 msgid "SysEx Files"
67 msgstr "Archivos SysEx"
68
69 #: src/elektroid.c:845
70 #, c-format
71 msgid "Error while saving “%s”: %s."
72 msgstr "Error al guardar «%s»: %s."
73
74 #: src/elektroid.c:866
75 #, c-format
76 msgid "Error while loading “%s”: %s."
77 msgstr "Error al cargar «%s»: %s."
78
79 #: src/elektroid.c:927
80 msgid "Open SysEx"
81 msgstr "Abrir SysEx"
82
83 #: src/elektroid.c:932
84 msgid "_Open"
85 msgstr "_Abrir"
86
87 #: src/elektroid.c:948
88 msgid "Sending SysEx"
89 msgstr "Enviando SysEx"
90
91 #: src/elektroid.c:1023
92 msgid "minutes"
93 msgstr "minutos"
94
95 #: src/elektroid.c:1226
96 msgid "Are you sure you want to delete the selected items?"
97 msgstr "¿Está seguro de que quiere eliminar los elementos seleccionados?"
98
99 #: src/elektroid.c:1228
100 msgid "_Delete"
101 msgstr "_Eliminar"
102
103 #: src/elektroid.c:1245
104 msgid "Deleting Files"
105 msgstr "Eliminando archivos"
106
107 #: src/elektroid.c:1246
108 msgid "Deleting..."
109 msgstr "Eliminando..."
110
111 #: src/elektroid.c:1279 res/gui.glade:123 res/gui.glade:214
112 msgid "Rename"
113 msgstr "Renombrar"
114
115 #: src/elektroid.c:1302
116 #, c-format
117 msgid "Error while renaming to “%s”: %s."
118 msgstr "Error al renombrar a «%s»: %s."
119
120 #: src/elektroid.c:1980 res/gui.glade:576 res/gui.glade:802
121 msgid "Add Directory"
122 msgstr "Añadir directorio"
123
124 #: src/elektroid.c:1998
125 #, c-format
126 msgid "Error while creating dir “%s”: %s."
127 msgstr "Error al crear el directorio «%s»: %s."
128
129 #: src/elektroid.c:2070
130 msgid "Queued"
131 msgstr "Encolada"
132
133 #: src/elektroid.c:2072
134 msgid "Running"
135 msgstr "Ejecutando"
136
137 #: src/elektroid.c:2074
138 msgid "Completed"
139 msgstr "Completada"
140
141 #: src/elektroid.c:2076
142 msgid "Completed with errors"
143 msgstr "Completada con errores"
144
145 #: src/elektroid.c:2078
146 msgid "Canceled"
147 msgstr "Cancelada"
148
149 #: src/elektroid.c:2080 src/elektroid.c:2094
150 msgid "Undefined"
151 msgstr "Indefinido"
152
153 #: src/elektroid.c:2090
154 msgid "Upload"
155 msgstr "Carga"
156
157 #: src/elektroid.c:2092
158 msgid "Download"
159 msgstr "Descarga"
160
161 #: src/elektroid.c:2569 src/elektroid.c:2778 src/elektroid.c:3404
162 msgid "Preparing Tasks"
163 msgstr "Preparando tareas"
164
165 #: src/elektroid.c:3120
166 msgid "Connecting to Device"
167 msgstr "Conectando con el dispositivo"
168
169 #: src/elektroid.c:3121
170 msgid "Connecting..."
171 msgstr "Conectando..."
172
173 #: src/elektroid.c:3131
174 #, c-format
175 msgid "Device “%s” not recognized: %s"
176 msgstr "Dispositivo «%s» no reconocido: %s"
177
178 #: src/elektroid.c:3398
179 msgid "Moving Files"
180 msgstr "Moviendo archivos"
181
182 #: src/elektroid.c:3399
183 msgid "Moving..."
184 msgstr "Moviendo..."
185
186 #: src/local.c:488
187 msgid "System"
188 msgstr "Sistema"
189
190 #: src/connectors/sds.c:1138 src/connectors/sds.c:1144
191 msgid "SDS sampler"
192 msgstr "Sampler SDS"
193
194 #: res/gui.glade:72
195 msgid "Upload Selection"
196 msgstr "Cargar selección"
197
198 #: res/gui.glade:87 res/gui.glade:178
199 msgid "Play"
200 msgstr "Reproducir"
201
202 #: res/gui.glade:101 res/gui.glade:192
203 msgid "Open With External Editor"
204 msgstr "Abrir con editor externo"
205
206 #: res/gui.glade:109 res/gui.glade:200
207 msgid "Show in File Manager"
208 msgstr "Mostrar en gestor de archivos"
209
210 #: res/gui.glade:132 res/gui.glade:223
211 msgid "Delete"
212 msgstr "Eliminar"
213
214 #: res/gui.glade:163
215 msgid "Download Selection"
216 msgstr "Descargar selección"
217
218 #: res/gui.glade:259
219 msgid "GNU/Linux transfer application for Elektron devices"
220 msgstr "Aplicación GNU/Linux de transferencia para dispositivos Elektron"
221
222 #: res/gui.glade:262
223 msgid "translator-credits"
224 msgstr "David García Goñi <dagargo@gmail.com>"
225
226 #: res/gui.glade:310
227 msgid "_Receive SysEx"
228 msgstr "_Recibir SysEx"
229
230 #: res/gui.glade:323
231 msgid "_Send SysEx"
232 msgstr "_Enviar SysEx"
233
234 #: res/gui.glade:347
235 msgid "OS _Upgrade"
236 msgstr "Actualizar _SO"
237
238 #: res/gui.glade:371
239 msgid "_About"
240 msgstr "_Acerca de"
241
242 #: res/gui.glade:451
243 msgid "Refresh Devices"
244 msgstr "Actualizar dispositivos"
245
246 #: res/gui.glade:555 res/gui.glade:781
247 msgid "Go to Parent Directory"
248 msgstr "Ir al directorio padre"
249
250 #: res/gui.glade:597 res/gui.glade:823
251 msgid "Refresh Directory"
252 msgstr "Actualizar directorio"
253
254 #: res/gui.glade:678 res/gui.glade:884 res/gui.glade:1676
255 msgid "Name"
256 msgstr "Nombre"
257
258 #: res/gui.glade:692 res/gui.glade:898
259 msgid "Size"
260 msgstr "Tamaño"
261
262 #. It is recommended to split the text in two lines if it is too long
263 #: res/gui.glade:1001
264 msgid "Auto play"
265 msgstr ""
266 "Reproducir\n"
267 "automáticamente"
268
269 #: res/gui.glade:1041
270 msgid "Playing mix depends on the destination channels"
271 msgstr "La mezcla para reproducción depende de los canales de destino"
272
273 #. It is recommended to split the text in two lines if it is too long
274 #: res/gui.glade:1043
275 msgid ""
276 "Mix depending\n"
277 "on destination"
278 msgstr ""
279 "Mezclar según\n"
280 "destino"
281
282 #: res/gui.glade:1233
20283 msgid "Samples"
21284 msgstr "Muestras"
22285
23 #: src/elektroid.c:248
24 msgid "Presets"
25 msgstr "Programas"
26
27 #: src/elektroid.c:250
28 msgid "Projects"
29 msgstr "Proyectos"
30
31 #: src/elektroid.c:252
32 msgid "Sounds"
33 msgstr "Sonidos"
34
35 #: src/elektroid.c:254 src/elektroid.c:1689 src/elektroid.c:1703
36 msgid "Undefined"
37 msgstr "Indefinido"
38
39 #: src/elektroid.c:434
40 #, c-format
41 msgid "Connected to %s%s"
42 msgstr "Conectado a %s%s"
43
44 #: src/elektroid.c:442 src/elektroid.c:3256
45 msgid "Not connected"
46 msgstr "No conectado"
47
48 #: src/elektroid.c:585
49 msgid "Waiting..."
50 msgstr "Esperando..."
51
52 #: src/elektroid.c:588
53 msgid "Sending..."
54 msgstr "Enviando..."
55
56 #: src/elektroid.c:592
57 msgid "Receiving..."
58 msgstr "Recibiendo..."
59
60 #: src/elektroid.c:660
61 msgid "Receive SysEx"
62 msgstr "Recibir SysEx"
63
64 #: src/elektroid.c:684
65 msgid "Save SysEx"
66 msgstr "Guardar SysEx"
67
68 #: src/elektroid.c:687 src/elektroid.c:783 src/elektroid.c:951
69 #: res/gui.glade:1332 res/gui.glade:1432
70 msgid "_Cancel"
71 msgstr "_Cancelar"
72
73 #: src/elektroid.c:689 res/gui.glade:1346
74 msgid "_Save"
75 msgstr "_Guardar"
76
77 #: src/elektroid.c:693
78 msgid "Received SysEx"
79 msgstr "SysEx recibido"
80
81 #: src/elektroid.c:698 src/elektroid.c:789
82 msgid "SysEx Files"
83 msgstr "Archivos SysEx"
84
85 #: src/elektroid.c:732
86 #, c-format
87 msgid "Error while saving “%s”: %s."
88 msgstr "Error al guardar «%s»: %s."
89
90 #: src/elektroid.c:780
91 msgid "Open SysEx"
92 msgstr "Abrir SysEx"
93
94 #: src/elektroid.c:785
95 msgid "_Open"
96 msgstr "_Abrir"
97
98 #: src/elektroid.c:806
99 #, c-format
100 msgid "Error while loading “%s”: %s."
101 msgstr "Error al cargar «%s»: %s."
102
103 #: src/elektroid.c:816
104 msgid "Send SysEx"
105 msgstr "Enviar SysEx"
106
107 #: src/elektroid.c:918
108 #, c-format
109 msgid "Error while deleting “%s”: %s."
110 msgstr "Error al eliminar «%s»: %s."
111
112 #: src/elektroid.c:950
113 msgid "Are you sure you want to delete the selected items?"
114 msgstr "¿Está seguro de que quiere eliminar los elementos seleccionados?"
115
116 #: src/elektroid.c:952
117 msgid "_Delete"
118 msgstr "_Eliminar"
119
120 #: src/elektroid.c:1005 res/gui.glade:121 res/gui.glade:174
121 msgid "Rename"
122 msgstr "Renombrar"
123
124 #: src/elektroid.c:1023
125 #, c-format
126 msgid "Error while renaming to “%s”: %s."
127 msgstr "Error al renombrar a «%s»: %s."
128
129 #: src/elektroid.c:1589 res/gui.glade:436 res/gui.glade:606
130 msgid "Add Directory"
131 msgstr "Añadir directorio"
132
133 #: src/elektroid.c:1607
134 #, c-format
135 msgid "Error while creating dir “%s”: %s."
136 msgstr "Error al crear el directorio «%s»: %s."
137
138 #: src/elektroid.c:1679
139 msgid "Queued"
140 msgstr "Encolada"
141
142 #: src/elektroid.c:1681
143 msgid "Running"
144 msgstr "Ejecutando"
145
146 #: src/elektroid.c:1683
147 msgid "Completed"
148 msgstr "Completada"
149
150 #: src/elektroid.c:1685
151 msgid "Completed with errors"
152 msgstr "Completada con errores"
153
154 #: src/elektroid.c:1687
155 msgid "Canceled"
156 msgstr "Cancelada"
157
158 #: src/elektroid.c:1699
159 msgid "Upload"
160 msgstr "Carga"
161
162 #: src/elektroid.c:1701
163 msgid "Download"
164 msgstr "Descarga"
165
166 #: src/elektroid.c:2560 src/elektroid.c:2601
167 #, c-format
168 msgid "Error while moving from “%s” to “%s”: %s."
169 msgstr "Error al mover de «%s» a «%s»: %s."
170
171 #: res/gui.glade:70
172 msgid "Upload Selection"
173 msgstr "Cargar selección"
174
175 #: res/gui.glade:85
176 msgid "Play"
177 msgstr "Reproducir"
178
179 #: res/gui.glade:99
180 msgid "Open With External Editor"
181 msgstr "Abrir con editor externo"
182
183 #: res/gui.glade:107
184 msgid "Show in File Manager"
185 msgstr "Mostrar en gestor de archivos"
186
187 #: res/gui.glade:130 res/gui.glade:183
188 msgid "Delete"
189 msgstr "Eliminar"
190
191 #: res/gui.glade:159
192 msgid "Download Selection"
193 msgstr "Descargar selección"
194
195 #: res/gui.glade:219
196 msgid "GNU/Linux transfer application for Elektron devices"
197 msgstr "Aplicación GNU/Linux de transferencia para dispositivos Elektron"
198
199 #: res/gui.glade:222
200 msgid "translator-credits"
201 msgstr "David García Goñi <dagargo@gmail.com>"
202
203 #: res/gui.glade:270
204 msgid "_Receive SysEx"
205 msgstr "_Recibir SysEx"
206
207 #: res/gui.glade:283
208 msgid "_Send SysEx"
209 msgstr "_Enviar SysEx"
210
211 #: res/gui.glade:307
212 msgid "OS _Upgrade"
213 msgstr "Actualizar _SO"
214
215 #: res/gui.glade:331
216 msgid "_About"
217 msgstr "_Acerca de"
218
219 #: res/gui.glade:415 res/gui.glade:585
220 msgid "Go to Parent Directory"
221 msgstr "Ir al directorio padre"
222
223 #: res/gui.glade:457 res/gui.glade:627
224 msgid "Refresh Directory"
225 msgstr "Actualizar directorio"
226
227 #: res/gui.glade:514 res/gui.glade:694 res/gui.glade:1377
228 msgid "Name"
229 msgstr "Nombre"
230
231 #: res/gui.glade:528 res/gui.glade:708
232 msgid "Size"
233 msgstr "Tamaño"
234
235 #: res/gui.glade:761
236 msgid "Refresh Devices"
237 msgstr "Actualizar dispositivos"
238
239 #. It is recommended to split the text in two lines if it is too long
240 #: res/gui.glade:879
241 msgid "Auto play"
242 msgstr ""
243 "Reproducción\n"
244 "automática"
245
246 #: res/gui.glade:1101
286 #: res/gui.glade:1247
287 msgid "Channels"
288 msgstr "Canales"
289
290 #: res/gui.glade:1261
291 msgid "Sample rate"
292 msgstr "Frecuencia"
293
294 #: res/gui.glade:1275
295 msgid "Bit depth"
296 msgstr "Bits"
297
298 #: res/gui.glade:1333
299 msgid "Duration"
300 msgstr "Duración"
301
302 #: res/gui.glade:1399
247303 msgid "Status"
248304 msgstr "Estado"
249305
250 #: res/gui.glade:1112
306 #: res/gui.glade:1410
251307 msgid "Type"
252308 msgstr "Tipo"
253309
254 #: res/gui.glade:1133
310 #: res/gui.glade:1431
255311 msgid "Source"
256312 msgstr "Origen"
257313
258 #: res/gui.glade:1147
314 #: res/gui.glade:1445
259315 msgid "Destination"
260316 msgstr "Destino"
261317
262 #: res/gui.glade:1162
318 #: res/gui.glade:1460
263319 msgid "Progress"
264320 msgstr "Progreso"
265321
266 #: res/gui.glade:1194
322 #: res/gui.glade:1492
267323 msgid "Cancel Tasks"
268324 msgstr "Cancelar tareas"
269325
270 #: res/gui.glade:1215
326 #: res/gui.glade:1513
271327 msgid "Remove Queued Tasks"
272328 msgstr "Eliminar tareas encoladas"
273329
274 #: res/gui.glade:1236
330 #: res/gui.glade:1534
275331 msgid "Clear Finished Tasks"
276332 msgstr "Limpiar tareas terminadas"
Binary diff not shown
+235
-179
po/fr.po less more
00 # French GUI translation for Elektroid.
1 # Copyright (C) 2019-2021 Olivier Humbert
1 # Copyright (C) 2019-2022 Olivier Humbert
22 # This file is distributed under the same license as the Elektroid package.
3 # Olivier Humbert <trebmuh@tuxfamily.org>, 2019-2021.
3 # Olivier Humbert <trebmuh@tuxfamily.org>, 2019-2022.
44 #
55 msgid ""
66 msgstr ""
7 "Project-Id-Version: elektroid 2.0\n"
7 "Project-Id-Version: elektroid 2.2\n"
88 "Report-Msgid-Bugs-To: dagargo@gmail.com\n"
9 "POT-Creation-Date: 2022-06-03 08:47+0200\n"
10 "PO-Revision-Date: 2021-12-03 17:59+0100\n"
9 "POT-Creation-Date: 2022-11-20 21:30+0100\n"
10 "PO-Revision-Date: 2022-11-01 23:05+0100\n"
1111 "Last-Translator: Olivier Humbert <trebmuh@tuxfamily.org>\n"
1212 "Language-Team: French\n"
1313 "Language: fr\n"
1616 "Content-Transfer-Encoding: 8bit\n"
1717 "Plural-Forms: nplurals=2; plural=(n > 1);\n"
1818
19 #: src/elektroid.c:246
20 msgid "Samples"
21 msgstr "Échantillons"
22
23 #: src/elektroid.c:248
24 msgid "Presets"
25 msgstr "Préréglages"
26
27 #: src/elektroid.c:250
28 msgid "Projects"
29 msgstr "Projets"
30
31 #: src/elektroid.c:252
32 msgid "Sounds"
33 msgstr "Sons"
34
35 #: src/elektroid.c:254 src/elektroid.c:1689 src/elektroid.c:1703
19 #: src/connector.c:41 src/connector.c:47
20 msgid "MIDI device"
21 msgstr "Périphérique MIDI"
22
23 #: src/elektroid.c:528 src/elektroid.c:3999
24 msgid "Not connected"
25 msgstr "Non connecté"
26
27 #: src/elektroid.c:678
28 msgid "Cancelling..."
29 msgstr "Annulation..."
30
31 #: src/elektroid.c:699 src/elektroid.c:2570 src/elektroid.c:2779
32 #: src/elektroid.c:3405
33 msgid "Waiting..."
34 msgstr "En attente..."
35
36 #: src/elektroid.c:702
37 msgid "Sending..."
38 msgstr "Envoi en cours..."
39
40 #: src/elektroid.c:705
41 msgid "Receiving..."
42 msgstr "Réception en cours..."
43
44 #: src/elektroid.c:765
45 msgid "Receive SysEx"
46 msgstr "Réception de SysEx"
47
48 #: src/elektroid.c:797
49 msgid "Save SysEx"
50 msgstr "Sauvegarde de SysEx"
51
52 #: src/elektroid.c:800 src/elektroid.c:930 src/elektroid.c:1227
53 #: res/gui.glade:1631 res/gui.glade:1731
54 msgid "_Cancel"
55 msgstr "_Annuler"
56
57 #: src/elektroid.c:802 res/gui.glade:1645
58 msgid "_Save"
59 msgstr "_Sauvegarder"
60
61 #: src/elektroid.c:806
62 msgid "Received SysEx"
63 msgstr "SysEx reçu"
64
65 #: src/elektroid.c:811 src/elektroid.c:936
66 msgid "SysEx Files"
67 msgstr "Fichiers SysEx"
68
69 #: src/elektroid.c:845
70 #, c-format
71 msgid "Error while saving “%s”: %s."
72 msgstr "Erreur lors de la sauvegarde de « %s » : %s."
73
74 #: src/elektroid.c:866
75 #, c-format
76 msgid "Error while loading “%s”: %s."
77 msgstr "Erreur lors du chargement de « %s » : %s."
78
79 #: src/elektroid.c:927
80 msgid "Open SysEx"
81 msgstr "Ouvrir SysEx"
82
83 #: src/elektroid.c:932
84 msgid "_Open"
85 msgstr "_Ouvrir"
86
87 #: src/elektroid.c:948
88 msgid "Sending SysEx"
89 msgstr "Envoi SysEx"
90
91 #: src/elektroid.c:1023
92 msgid "minutes"
93 msgstr "minutes"
94
95 #: src/elektroid.c:1226
96 msgid "Are you sure you want to delete the selected items?"
97 msgstr "Souhaitez-vous vraiment supprimer les éléments sélectionnés ?"
98
99 #: src/elektroid.c:1228
100 msgid "_Delete"
101 msgstr "_Supprimer"
102
103 #: src/elektroid.c:1245
104 msgid "Deleting Files"
105 msgstr "Suppression des fichiers"
106
107 #: src/elektroid.c:1246
108 msgid "Deleting..."
109 msgstr "Suppression..."
110
111 #: src/elektroid.c:1279 res/gui.glade:123 res/gui.glade:214
112 msgid "Rename"
113 msgstr "Renommer"
114
115 #: src/elektroid.c:1302
116 #, c-format
117 msgid "Error while renaming to “%s”: %s."
118 msgstr "Erreur lors du renommage de « %s » : %s."
119
120 #: src/elektroid.c:1980 res/gui.glade:576 res/gui.glade:802
121 msgid "Add Directory"
122 msgstr "Ajout d'un répertoire"
123
124 #: src/elektroid.c:1998
125 #, c-format
126 msgid "Error while creating dir “%s”: %s."
127 msgstr "Erreur lors de la création du répertoire « %s » : %s."
128
129 #: src/elektroid.c:2070
130 msgid "Queued"
131 msgstr "Mise en file d'attente"
132
133 #: src/elektroid.c:2072
134 msgid "Running"
135 msgstr "En cours"
136
137 #: src/elektroid.c:2074
138 msgid "Completed"
139 msgstr "Terminé"
140
141 #: src/elektroid.c:2076
142 msgid "Completed with errors"
143 msgstr "Terminé avec des erreurs"
144
145 #: src/elektroid.c:2078
146 msgid "Canceled"
147 msgstr "Annulé"
148
149 #: src/elektroid.c:2080 src/elektroid.c:2094
36150 msgid "Undefined"
37151 msgstr "Indéfini"
38152
39 #: src/elektroid.c:434
40 #, c-format
41 msgid "Connected to %s%s"
42 msgstr "Connecté à %s%s"
43
44 #: src/elektroid.c:442 src/elektroid.c:3256
45 msgid "Not connected"
46 msgstr "Non connecté"
47
48 #: src/elektroid.c:585
49 msgid "Waiting..."
50 msgstr "En attente..."
51
52 #: src/elektroid.c:588
53 msgid "Sending..."
54 msgstr "Envoi en cours..."
55
56 #: src/elektroid.c:592
57 msgid "Receiving..."
58 msgstr "Réception en cours..."
59
60 #: src/elektroid.c:660
61 msgid "Receive SysEx"
62 msgstr "Réception de SysEx"
63
64 #: src/elektroid.c:684
65 msgid "Save SysEx"
66 msgstr "Sauvegarde de SysEx"
67
68 #: src/elektroid.c:687 src/elektroid.c:783 src/elektroid.c:951
69 #: res/gui.glade:1332 res/gui.glade:1432
70 msgid "_Cancel"
71 msgstr "_Annuler"
72
73 #: src/elektroid.c:689 res/gui.glade:1346
74 msgid "_Save"
75 msgstr "_Sauvegarder"
76
77 #: src/elektroid.c:693
78 msgid "Received SysEx"
79 msgstr "SysEx reçu"
80
81 #: src/elektroid.c:698 src/elektroid.c:789
82 msgid "SysEx Files"
83 msgstr "Fichiers SysEx"
84
85 #: src/elektroid.c:732
86 #, c-format
87 msgid "Error while saving “%s”: %s."
88 msgstr "Erreur lors de la sauvegarde de « %s » : %s."
89
90 #: src/elektroid.c:780
91 msgid "Open SysEx"
92 msgstr "Ouvrir SysEx"
93
94 #: src/elektroid.c:785
95 msgid "_Open"
96 msgstr "_Ouvrir"
97
98 #: src/elektroid.c:806
99 #, c-format
100 msgid "Error while loading “%s”: %s."
101 msgstr "Erreur lors du chargement de « %s » : %s."
102
103 #: src/elektroid.c:816
104 msgid "Send SysEx"
105 msgstr "Envoyer SysEx"
106
107 #: src/elektroid.c:918
108 #, c-format
109 msgid "Error while deleting “%s”: %s."
110 msgstr "Erreur lors de la suppression de « %s » : %s."
111
112 #: src/elektroid.c:950
113 msgid "Are you sure you want to delete the selected items?"
114 msgstr "Souhaitez-vous vraiment supprimer les éléments sélectionnés ?"
115
116 #: src/elektroid.c:952
117 msgid "_Delete"
118 msgstr "_Supprimer"
119
120 #: src/elektroid.c:1005 res/gui.glade:121 res/gui.glade:174
121 msgid "Rename"
122 msgstr "Renommer"
123
124 #: src/elektroid.c:1023
125 #, c-format
126 msgid "Error while renaming to “%s”: %s."
127 msgstr "Erreur lors du renommage de « %s » : %s."
128
129 #: src/elektroid.c:1589 res/gui.glade:436 res/gui.glade:606
130 msgid "Add Directory"
131 msgstr "Ajout d'un répertoire"
132
133 #: src/elektroid.c:1607
134 #, c-format
135 msgid "Error while creating dir “%s”: %s."
136 msgstr "Erreur lors de la création du répertoire « %s » : %s."
137
138 #: src/elektroid.c:1679
139 msgid "Queued"
140 msgstr "Mise en file d'attente"
141
142 #: src/elektroid.c:1681
143 msgid "Running"
144 msgstr "En cours"
145
146 #: src/elektroid.c:1683
147 msgid "Completed"
148 msgstr "Terminé"
149
150 #: src/elektroid.c:1685
151 msgid "Completed with errors"
152 msgstr "Terminé avec des erreurs"
153
154 #: src/elektroid.c:1687
155 msgid "Canceled"
156 msgstr "Annulé"
157
158 #: src/elektroid.c:1699
153 #: src/elektroid.c:2090
159154 msgid "Upload"
160155 msgstr "Téléversement"
161156
162 #: src/elektroid.c:1701
157 #: src/elektroid.c:2092
163158 msgid "Download"
164159 msgstr "Téléchargement"
165160
166 #: src/elektroid.c:2560 src/elektroid.c:2601
167 #, c-format
168 msgid "Error while moving from “%s” to “%s”: %s."
169 msgstr "Erreur lors du passage de « %s » à « %s » : %s."
170
171 #: res/gui.glade:70
161 #: src/elektroid.c:2569 src/elektroid.c:2778 src/elektroid.c:3404
162 msgid "Preparing Tasks"
163 msgstr "Préparation des tâches"
164
165 #: src/elektroid.c:3120
166 msgid "Connecting to Device"
167 msgstr "Connexion au périphérique"
168
169 #: src/elektroid.c:3121
170 msgid "Connecting..."
171 msgstr "Connexion..."
172
173 #: src/elektroid.c:3131
174 #, c-format
175 msgid "Device “%s” not recognized: %s"
176 msgstr "Périphérique “%s” non reconnu : %s"
177
178 #: src/elektroid.c:3398
179 msgid "Moving Files"
180 msgstr "Déplacement des fichiers"
181
182 #: src/elektroid.c:3399
183 msgid "Moving..."
184 msgstr "Déplacement..."
185
186 #: src/local.c:488
187 msgid "System"
188 msgstr "Système"
189
190 #: src/connectors/sds.c:1138 src/connectors/sds.c:1144
191 msgid "SDS sampler"
192 msgstr "échantillonneur SDS"
193
194 #: res/gui.glade:72
172195 msgid "Upload Selection"
173196 msgstr "Téléversement de la sélection"
174197
175 #: res/gui.glade:85
198 #: res/gui.glade:87 res/gui.glade:178
176199 msgid "Play"
177200 msgstr "Lecture"
178201
179 #: res/gui.glade:99
202 #: res/gui.glade:101 res/gui.glade:192
180203 msgid "Open With External Editor"
181204 msgstr "Ouvrir avec un éditeur externe"
182205
183 #: res/gui.glade:107
206 #: res/gui.glade:109 res/gui.glade:200
184207 msgid "Show in File Manager"
185208 msgstr "Afficher dans un ge_stionnaire de fichier"
186209
187 #: res/gui.glade:130 res/gui.glade:183
210 #: res/gui.glade:132 res/gui.glade:223
188211 msgid "Delete"
189212 msgstr "Supprimer"
190213
191 #: res/gui.glade:159
214 #: res/gui.glade:163
192215 msgid "Download Selection"
193216 msgstr "Téléchargement de la sélection"
194217
195 #: res/gui.glade:219
218 #: res/gui.glade:259
196219 msgid "GNU/Linux transfer application for Elektron devices"
197220 msgstr "Application GNU/Linux de transfert pour les périphériques Elektron"
198221
199 #: res/gui.glade:222
222 #: res/gui.glade:262
200223 msgid "translator-credits"
201224 msgstr "Olivier Humbert <trebmuh@tuxfamily.org>"
202225
203 #: res/gui.glade:270
226 #: res/gui.glade:310
204227 msgid "_Receive SysEx"
205228 msgstr "_Réception de SysEx"
206229
207 #: res/gui.glade:283
230 #: res/gui.glade:323
208231 msgid "_Send SysEx"
209232 msgstr "Envoi de _Sysex"
210233
211 #: res/gui.glade:307
234 #: res/gui.glade:347
212235 msgid "OS _Upgrade"
213236 msgstr "Mise à jo_ur SE"
214237
215 #: res/gui.glade:331
238 #: res/gui.glade:371
216239 msgid "_About"
217240 msgstr "À _propos"
218241
219 #: res/gui.glade:415 res/gui.glade:585
242 #: res/gui.glade:451
243 msgid "Refresh Devices"
244 msgstr "Rafraîchir les périphériques"
245
246 #: res/gui.glade:555 res/gui.glade:781
220247 msgid "Go to Parent Directory"
221248 msgstr "Aller au répertoire parent"
222249
223 #: res/gui.glade:457 res/gui.glade:627
250 #: res/gui.glade:597 res/gui.glade:823
224251 msgid "Refresh Directory"
225252 msgstr "Rafraîchir le répertoire"
226253
227 #: res/gui.glade:514 res/gui.glade:694 res/gui.glade:1377
254 #: res/gui.glade:678 res/gui.glade:884 res/gui.glade:1676
228255 msgid "Name"
229256 msgstr "Nom"
230257
231 #: res/gui.glade:528 res/gui.glade:708
258 #: res/gui.glade:692 res/gui.glade:898
232259 msgid "Size"
233260 msgstr "Taille"
234261
235 #: res/gui.glade:761
236 msgid "Refresh Devices"
237 msgstr "Rafraîchir les périphériques"
238
239262 #. It is recommended to split the text in two lines if it is too long
240 #: res/gui.glade:879
263 #: res/gui.glade:1001
241264 msgid "Auto play"
242265 msgstr ""
243266 "Lecture\n"
244267 "automatique"
245268
246 #: res/gui.glade:1101
269 #: res/gui.glade:1041
270 msgid "Playing mix depends on the destination channels"
271 msgstr "Le mixage de lecture dépend des canaux de destination"
272
273 #. It is recommended to split the text in two lines if it is too long
274 #: res/gui.glade:1043
275 msgid ""
276 "Mix depending\n"
277 "on destination"
278 msgstr ""
279 "Mélange selon\n"
280 "la destination"
281
282 #: res/gui.glade:1233
283 msgid "Samples"
284 msgstr "Échantillons"
285
286 #: res/gui.glade:1247
287 msgid "Channels"
288 msgstr "Canaux"
289
290 #: res/gui.glade:1261
291 msgid "Sample rate"
292 msgstr "Taux d'échantillonnage"
293
294 #: res/gui.glade:1275
295 msgid "Bit depth"
296 msgstr "Débit binaire"
297
298 #: res/gui.glade:1333
299 msgid "Duration"
300 msgstr "Durée"
301
302 #: res/gui.glade:1399
247303 msgid "Status"
248 msgstr "Statut"
249
250 #: res/gui.glade:1112
304 msgstr "État"
305
306 #: res/gui.glade:1410
251307 msgid "Type"
252308 msgstr "Type"
253309
254 #: res/gui.glade:1133
310 #: res/gui.glade:1431
255311 msgid "Source"
256312 msgstr "Source"
257313
258 #: res/gui.glade:1147
314 #: res/gui.glade:1445
259315 msgid "Destination"
260316 msgstr "Destination"
261317
262 #: res/gui.glade:1162
318 #: res/gui.glade:1460
263319 msgid "Progress"
264320 msgstr "Progrès"
265321
266 #: res/gui.glade:1194
322 #: res/gui.glade:1492
267323 msgid "Cancel Tasks"
268324 msgstr "Annuler les tâches"
269325
270 #: res/gui.glade:1215
326 #: res/gui.glade:1513
271327 msgid "Remove Queued Tasks"
272328 msgstr "Supprimer les tâches dans la file d'attente"
273329
274 #: res/gui.glade:1236
330 #: res/gui.glade:1534
275331 msgid "Clear Finished Tasks"
276332 msgstr "Nettoyer les tâches terminées"
0 # Sed script that inserts the file called HEADER before the header entry.
1 #
2 # At each occurrence of a line starting with "msgid ", we execute the following
3 # commands. At the first occurrence, insert the file. At the following
4 # occurrences, do nothing. The distinction between the first and the following
5 # occurrences is achieved by looking at the hold space.
6 /^msgid /{
7 x
8 # Test if the hold space is empty.
9 s/m/m/
10 ta
11 # Yes it was empty. First occurrence. Read the file.
12 r HEADER
13 # Output the file's contents by reading the next line. But don't lose the
14 # current line while doing this.
15 g
16 N
17 bb
18 :a
19 # The hold space was nonempty. Following occurrences. Do nothing.
20 x
21 :b
22 }
Binary diff not shown
44 #
55 msgid ""
66 msgstr ""
7 "Project-Id-Version: elektroid 1.4\n"
7 "Project-Id-Version: elektroid 2.2\n"
88 "Report-Msgid-Bugs-To: dagargo@gmail.com\n"
9 "POT-Creation-Date: 2022-06-03 08:47+0200\n"
10 "PO-Revision-Date: 2021-12-01 17:56-0300\n"
9 "POT-Creation-Date: 2022-11-20 21:30+0100\n"
10 "PO-Revision-Date: 2022-11-01 18:20-0300\n"
1111 "Last-Translator: Gustavo Costa <xfgusta@gmail.com>\n"
1212 "Language-Team: \n"
1313 "Language: pt_BR\n"
1414 "MIME-Version: 1.0\n"
1515 "Content-Type: text/plain; charset=UTF-8\n"
1616 "Content-Transfer-Encoding: 8bit\n"
17 "X-Generator: Poedit 3.0\n"
1817 "Plural-Forms: nplurals=2; plural=(n > 1);\n"
19
20 #: src/elektroid.c:246
21 msgid "Samples"
22 msgstr "Samples"
23
24 #: src/elektroid.c:248
25 msgid "Presets"
26 msgstr "Presets"
27
28 #: src/elektroid.c:250
29 msgid "Projects"
30 msgstr "Projects"
31
32 #: src/elektroid.c:252
33 msgid "Sounds"
34 msgstr "Sounds"
35
36 #: src/elektroid.c:254 src/elektroid.c:1689 src/elektroid.c:1703
18 "X-Generator: Poedit 3.1.1\n"
19
20 #: src/connector.c:41 src/connector.c:47
21 msgid "MIDI device"
22 msgstr "Dispositivo MIDI"
23
24 #: src/elektroid.c:528 src/elektroid.c:3999
25 msgid "Not connected"
26 msgstr "Não conectado"
27
28 #: src/elektroid.c:678
29 msgid "Cancelling..."
30 msgstr "Cancelando..."
31
32 #: src/elektroid.c:699 src/elektroid.c:2570 src/elektroid.c:2779
33 #: src/elektroid.c:3405
34 msgid "Waiting..."
35 msgstr "Esperando..."
36
37 #: src/elektroid.c:702
38 msgid "Sending..."
39 msgstr "Enviando..."
40
41 #: src/elektroid.c:705
42 msgid "Receiving..."
43 msgstr "Recebendo..."
44
45 #: src/elektroid.c:765
46 msgid "Receive SysEx"
47 msgstr "Receber SysEx"
48
49 #: src/elektroid.c:797
50 msgid "Save SysEx"
51 msgstr "Salvar SysEx"
52
53 #: src/elektroid.c:800 src/elektroid.c:930 src/elektroid.c:1227
54 #: res/gui.glade:1631 res/gui.glade:1731
55 msgid "_Cancel"
56 msgstr "_Cancelar"
57
58 #: src/elektroid.c:802 res/gui.glade:1645
59 msgid "_Save"
60 msgstr "_Salvar"
61
62 #: src/elektroid.c:806
63 msgid "Received SysEx"
64 msgstr "SysEx recebido"
65
66 #: src/elektroid.c:811 src/elektroid.c:936
67 msgid "SysEx Files"
68 msgstr "Arquivos SysEx"
69
70 #: src/elektroid.c:845
71 #, c-format
72 msgid "Error while saving “%s”: %s."
73 msgstr "Erro ao salvar \"%s\": %s."
74
75 #: src/elektroid.c:866
76 #, c-format
77 msgid "Error while loading “%s”: %s."
78 msgstr "Erro ao carregar \"%s\": %s."
79
80 #: src/elektroid.c:927
81 msgid "Open SysEx"
82 msgstr "Abrir SysEx"
83
84 #: src/elektroid.c:932
85 msgid "_Open"
86 msgstr "_Abrir"
87
88 #: src/elektroid.c:948
89 msgid "Sending SysEx"
90 msgstr "Enviando SysEx"
91
92 #: src/elektroid.c:1023
93 msgid "minutes"
94 msgstr "minutos"
95
96 #: src/elektroid.c:1226
97 msgid "Are you sure you want to delete the selected items?"
98 msgstr "Tem certeza de que deseja excluir os itens selecionados?"
99
100 #: src/elektroid.c:1228
101 msgid "_Delete"
102 msgstr "_Excluir"
103
104 #: src/elektroid.c:1245
105 msgid "Deleting Files"
106 msgstr "Excluindo arquivos"
107
108 #: src/elektroid.c:1246
109 msgid "Deleting..."
110 msgstr "Excluindo..."
111
112 #: src/elektroid.c:1279 res/gui.glade:123 res/gui.glade:214
113 msgid "Rename"
114 msgstr "Renomar"
115
116 #: src/elektroid.c:1302
117 #, c-format
118 msgid "Error while renaming to “%s”: %s."
119 msgstr "Erro ao renomear para \"%s\": %s."
120
121 #: src/elektroid.c:1980 res/gui.glade:576 res/gui.glade:802
122 msgid "Add Directory"
123 msgstr "Adicionar diretório"
124
125 #: src/elektroid.c:1998
126 #, c-format
127 msgid "Error while creating dir “%s”: %s."
128 msgstr "Erro ao criar diretório \"%s\": %s."
129
130 #: src/elektroid.c:2070
131 msgid "Queued"
132 msgstr "Na fila"
133
134 #: src/elektroid.c:2072
135 msgid "Running"
136 msgstr "Executando"
137
138 #: src/elektroid.c:2074
139 msgid "Completed"
140 msgstr "Completado"
141
142 #: src/elektroid.c:2076
143 msgid "Completed with errors"
144 msgstr "Completado com erros"
145
146 #: src/elektroid.c:2078
147 msgid "Canceled"
148 msgstr "Cancelado"
149
150 #: src/elektroid.c:2080 src/elektroid.c:2094
37151 msgid "Undefined"
38152 msgstr "Indefinido"
39153
40 #: src/elektroid.c:434
41 #, c-format
42 msgid "Connected to %s%s"
43 msgstr "Conectado a %s%s"
44
45 #: src/elektroid.c:442 src/elektroid.c:3256
46 msgid "Not connected"
47 msgstr "Não conectado"
48
49 #: src/elektroid.c:585
50 msgid "Waiting..."
51 msgstr "Esperando..."
52
53 #: src/elektroid.c:588
54 msgid "Sending..."
55 msgstr "Enviando..."
56
57 #: src/elektroid.c:592
58 msgid "Receiving..."
59 msgstr "Recebendo..."
60
61 #: src/elektroid.c:660
62 msgid "Receive SysEx"
63 msgstr "Receber SysEx"
64
65 #: src/elektroid.c:684
66 msgid "Save SysEx"
67 msgstr "Salvar SysEx"
68
69 #: src/elektroid.c:687 src/elektroid.c:783 src/elektroid.c:951
70 #: res/gui.glade:1332 res/gui.glade:1432
71 msgid "_Cancel"
72 msgstr "_Cancelar"
73
74 #: src/elektroid.c:689 res/gui.glade:1346
75 msgid "_Save"
76 msgstr "_Salvar"
77
78 #: src/elektroid.c:693
79 msgid "Received SysEx"
80 msgstr "SysEx recebido"
81
82 #: src/elektroid.c:698 src/elektroid.c:789
83 msgid "SysEx Files"
84 msgstr "Arquivos SysEx"
85
86 #: src/elektroid.c:732
87 #, c-format
88 msgid "Error while saving “%s”: %s."
89 msgstr "Erro ao excluir \"%s\": %s."
90
91 #: src/elektroid.c:780
92 msgid "Open SysEx"
93 msgstr "Abrir SysEx"
94
95 #: src/elektroid.c:785
96 msgid "_Open"
97 msgstr "_Abrir"
98
99 #: src/elektroid.c:806
100 #, c-format
101 msgid "Error while loading “%s”: %s."
102 msgstr "Erro ao excluir \"%s\": %s."
103
104 #: src/elektroid.c:816
105 msgid "Send SysEx"
106 msgstr "Enviar SysEx"
107
108 #: src/elektroid.c:918
109 #, c-format
110 msgid "Error while deleting “%s”: %s."
111 msgstr "Erro ao excluir \"%s\": %s."
112
113 #: src/elektroid.c:950
114 msgid "Are you sure you want to delete the selected items?"
115 msgstr "Tem certeza de que deseja excluir os itens selecionados?"
116
117 #: src/elektroid.c:952
118 msgid "_Delete"
119 msgstr "_Excluir"
120
121 #: src/elektroid.c:1005 res/gui.glade:121 res/gui.glade:174
122 msgid "Rename"
123 msgstr "Renomar"
124
125 #: src/elektroid.c:1023
126 #, c-format
127 msgid "Error while renaming to “%s”: %s."
128 msgstr "Erro ao renomear para \"%s\": %s."
129
130 #: src/elektroid.c:1589 res/gui.glade:436 res/gui.glade:606
131 msgid "Add Directory"
132 msgstr "Adicionar diretório"
133
134 #: src/elektroid.c:1607
135 #, c-format
136 msgid "Error while creating dir “%s”: %s."
137 msgstr "Erro ao criar diretório \"%s\": %s."
138
139 #: src/elektroid.c:1679
140 msgid "Queued"
141 msgstr "Na fila"
142
143 #: src/elektroid.c:1681
144 msgid "Running"
145 msgstr "Executando"
146
147 #: src/elektroid.c:1683
148 msgid "Completed"
149 msgstr "Completado"
150
151 #: src/elektroid.c:1685
152 msgid "Completed with errors"
153 msgstr "Completado com erros"
154
155 #: src/elektroid.c:1687
156 msgid "Canceled"
157 msgstr "Cancelado"
158
159 #: src/elektroid.c:1699
154 #: src/elektroid.c:2090
160155 msgid "Upload"
161156 msgstr "Upload"
162157
163 #: src/elektroid.c:1701
158 #: src/elektroid.c:2092
164159 msgid "Download"
165160 msgstr "Download"
166161
167 #: src/elektroid.c:2560 src/elektroid.c:2601
168 #, c-format
169 msgid "Error while moving from “%s” to “%s”: %s."
170 msgstr "Erro ao mover \"%s\" para \"%s\": %s."
171
172 #: res/gui.glade:70
162 #: src/elektroid.c:2569 src/elektroid.c:2778 src/elektroid.c:3404
163 msgid "Preparing Tasks"
164 msgstr "Preparando tarefas"
165
166 #: src/elektroid.c:3120
167 msgid "Connecting to Device"
168 msgstr "Conectando ao dispositivo"
169
170 #: src/elektroid.c:3121
171 msgid "Connecting..."
172 msgstr "Conectando..."
173
174 #: src/elektroid.c:3131
175 #, c-format
176 msgid "Device “%s” not recognized: %s"
177 msgstr "Dispositivo \"%s\" não reconhecido: %s"
178
179 #: src/elektroid.c:3398
180 msgid "Moving Files"
181 msgstr "Movendo arquivos"
182
183 #: src/elektroid.c:3399
184 msgid "Moving..."
185 msgstr "Movendo..."
186
187 #: src/local.c:488
188 msgid "System"
189 msgstr "Sistema"
190
191 #: src/connectors/sds.c:1138 src/connectors/sds.c:1144
192 msgid "SDS sampler"
193 msgstr "Sampler SDS"
194
195 #: res/gui.glade:72
173196 msgid "Upload Selection"
174197 msgstr "Seleção de upload"
175198
176 #: res/gui.glade:85
199 #: res/gui.glade:87 res/gui.glade:178
177200 msgid "Play"
178201 msgstr "Reproduzir"
179202
180 #: res/gui.glade:99
203 #: res/gui.glade:101 res/gui.glade:192
181204 msgid "Open With External Editor"
182205 msgstr "Abrir com um editor externo"
183206
184 #: res/gui.glade:107
207 #: res/gui.glade:109 res/gui.glade:200
185208 msgid "Show in File Manager"
186209 msgstr "Mostrar no gerenciador de arquivos"
187210
188 #: res/gui.glade:130 res/gui.glade:183
211 #: res/gui.glade:132 res/gui.glade:223
189212 msgid "Delete"
190213 msgstr "Excluir"
191214
192 #: res/gui.glade:159
215 #: res/gui.glade:163
193216 msgid "Download Selection"
194217 msgstr "Seleção de download"
195218
196 #: res/gui.glade:219
219 #: res/gui.glade:259
197220 msgid "GNU/Linux transfer application for Elektron devices"
198221 msgstr "Aplicativo GNU/Linux de transferência para dispositivos Elektron"
199222
200 #: res/gui.glade:222
223 #: res/gui.glade:262
201224 msgid "translator-credits"
202225 msgstr "Gustavo Costa <xfgusta@gmail.com>"
203226
204 #: res/gui.glade:270
227 #: res/gui.glade:310
205228 msgid "_Receive SysEx"
206229 msgstr "_Receber SysEx"
207230
208 #: res/gui.glade:283
231 #: res/gui.glade:323
209232 msgid "_Send SysEx"
210233 msgstr "_Enviar SysEx"
211234
212 #: res/gui.glade:307
235 #: res/gui.glade:347
213236 msgid "OS _Upgrade"
214237 msgstr "Atualizar _OS"
215238
216 #: res/gui.glade:331
239 #: res/gui.glade:371
217240 msgid "_About"
218241 msgstr "_Sobre"
219242
220 #: res/gui.glade:415 res/gui.glade:585
243 #: res/gui.glade:451
244 msgid "Refresh Devices"
245 msgstr "Atualizar dispositivos"
246
247 #: res/gui.glade:555 res/gui.glade:781
221248 msgid "Go to Parent Directory"
222249 msgstr "Ir para o diretório pai"
223250
224 #: res/gui.glade:457 res/gui.glade:627
251 #: res/gui.glade:597 res/gui.glade:823
225252 msgid "Refresh Directory"
226253 msgstr "Atualizar diretório"
227254
228 #: res/gui.glade:514 res/gui.glade:694 res/gui.glade:1377
255 #: res/gui.glade:678 res/gui.glade:884 res/gui.glade:1676
229256 msgid "Name"
230257 msgstr "Nome"
231258
232 #: res/gui.glade:528 res/gui.glade:708
259 #: res/gui.glade:692 res/gui.glade:898
233260 msgid "Size"
234261 msgstr "Tamanho"
235262
236 #: res/gui.glade:761
237 msgid "Refresh Devices"
238 msgstr "Atualizar dispositivos"
239
240263 #. It is recommended to split the text in two lines if it is too long
241 #: res/gui.glade:879
264 #: res/gui.glade:1001
242265 msgid "Auto play"
243 msgstr "Reprodução automática"
244
245 #: res/gui.glade:1101
266 msgstr ""
267 "Reprodução\n"
268 "automática"
269
270 #: res/gui.glade:1041
271 msgid "Playing mix depends on the destination channels"
272 msgstr "A reprodução de mixagem depende dos canais de destino"
273
274 #. It is recommended to split the text in two lines if it is too long
275 #: res/gui.glade:1043
276 msgid ""
277 "Mix depending\n"
278 "on destination"
279 msgstr "Mixagem dependendo do destino"
280
281 #: res/gui.glade:1233
282 msgid "Samples"
283 msgstr "Amostras"
284
285 #: res/gui.glade:1247
286 msgid "Channels"
287 msgstr "Canais"
288
289 #: res/gui.glade:1261
290 msgid "Sample rate"
291 msgstr "Taxa de amostragem"
292
293 #: res/gui.glade:1275
294 msgid "Bit depth"
295 msgstr "Profundidade de bit"
296
297 #: res/gui.glade:1333
298 msgid "Duration"
299 msgstr "Duração"
300
301 #: res/gui.glade:1399
246302 msgid "Status"
247303 msgstr "Status"
248304
249 #: res/gui.glade:1112
305 #: res/gui.glade:1410
250306 msgid "Type"
251307 msgstr "Tipo"
252308
253 #: res/gui.glade:1133
309 #: res/gui.glade:1431
254310 msgid "Source"
255311 msgstr "Origem"
256312
257 #: res/gui.glade:1147
313 #: res/gui.glade:1445
258314 msgid "Destination"
259315 msgstr "Destino"
260316
261 #: res/gui.glade:1162
317 #: res/gui.glade:1460
262318 msgid "Progress"
263319 msgstr "Progresso"
264320
265 #: res/gui.glade:1194
321 #: res/gui.glade:1492
266322 msgid "Cancel Tasks"
267323 msgstr "Cancelar tarefas"
268324
269 #: res/gui.glade:1215
325 #: res/gui.glade:1513
270326 msgid "Remove Queued Tasks"
271327 msgstr "Remover tarefas em fila"
272328
273 #: res/gui.glade:1236
329 #: res/gui.glade:1534
274330 msgid "Clear Finished Tasks"
275331 msgstr "Limpar tarefas concluídas"
0 s/"\([^"]*\)"/“\1”/g
1 s/`\([^`']*\)'/‘\1’/g
2 s/ '\([^`']*\)' / ‘\1’ /g
3 s/ '\([^`']*\)'$/ ‘\1’/g
4 s/^'\([^`']*\)' /‘\1’ /g
5 s/“”/""/g
0 # Sed script that remove the POT-Creation-Date line in the header entry
1 # from a POT file.
2 #
3 # The distinction between the first and the following occurrences of the
4 # pattern is achieved by looking at the hold space.
5 /^"POT-Creation-Date: .*"$/{
6 x
7 # Test if the hold space is empty.
8 s/P/P/
9 ta
10 # Yes it was empty. First occurrence. Remove the line.
11 g
12 d
13 bb
14 :a
15 # The hold space was nonempty. Following occurrences. Do nothing.
16 x
17 :b
18 }
0 timestamp
00 if CLI_ONLY
1 res_DATA = devices.json
1 res_DATA = elektron-devices.json
22 desktop_DATA =
33 metainfo_DATA =
44 svgicon_DATA =
55 else
6 res_DATA = gui.glade gui.css devices.json
6 res_DATA = gui.glade gui.css elektron-devices.json
77 desktop_DATA = elektroid.desktop
88 metainfo_DATA = elektroid.appdata.xml
9 svgicon_DATA = elektroid.svg elektroid-symbolic.svg elektroid-wave-symbolic.svg elektroid-data-symbolic.svg elektroid-project-symbolic.svg elektroid-sound-symbolic.svg
9 svgicon_DATA = elektroid.svg elektroid-symbolic.svg elektroid-wave-symbolic.svg elektroid-sequence-symbolic.svg elektroid-project-symbolic.svg elektroid-sound-symbolic.svg
1010 endif
1111
1212 resdir = $(datadir)/elektroid
0 # Makefile.in generated by automake 1.16.3 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994-2020 Free Software Foundation, Inc.
4
5 # This Makefile.in is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 @SET_MAKE@
15
16 VPATH = @srcdir@
17 am__is_gnu_make = { \
18 if test -z '$(MAKELEVEL)'; then \
19 false; \
20 elif test -n '$(MAKE_HOST)'; then \
21 true; \
22 elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
23 true; \
24 else \
25 false; \
26 fi; \
27 }
28 am__make_running_with_option = \
29 case $${target_option-} in \
30 ?) ;; \
31 *) echo "am__make_running_with_option: internal error: invalid" \
32 "target option '$${target_option-}' specified" >&2; \
33 exit 1;; \
34 esac; \
35 has_opt=no; \
36 sane_makeflags=$$MAKEFLAGS; \
37 if $(am__is_gnu_make); then \
38 sane_makeflags=$$MFLAGS; \
39 else \
40 case $$MAKEFLAGS in \
41 *\\[\ \ ]*) \
42 bs=\\; \
43 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
44 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
45 esac; \
46 fi; \
47 skip_next=no; \
48 strip_trailopt () \
49 { \
50 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
51 }; \
52 for flg in $$sane_makeflags; do \
53 test $$skip_next = yes && { skip_next=no; continue; }; \
54 case $$flg in \
55 *=*|--*) continue;; \
56 -*I) strip_trailopt 'I'; skip_next=yes;; \
57 -*I?*) strip_trailopt 'I';; \
58 -*O) strip_trailopt 'O'; skip_next=yes;; \
59 -*O?*) strip_trailopt 'O';; \
60 -*l) strip_trailopt 'l'; skip_next=yes;; \
61 -*l?*) strip_trailopt 'l';; \
62 -[dEDm]) skip_next=yes;; \
63 -[JT]) skip_next=yes;; \
64 esac; \
65 case $$flg in \
66 *$$target_option*) has_opt=yes; break;; \
67 esac; \
68 done; \
69 test $$has_opt = yes
70 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
71 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
72 pkgdatadir = $(datadir)/@PACKAGE@
73 pkgincludedir = $(includedir)/@PACKAGE@
74 pkglibdir = $(libdir)/@PACKAGE@
75 pkglibexecdir = $(libexecdir)/@PACKAGE@
76 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
77 install_sh_DATA = $(install_sh) -c -m 644
78 install_sh_PROGRAM = $(install_sh) -c
79 install_sh_SCRIPT = $(install_sh) -c
80 INSTALL_HEADER = $(INSTALL_DATA)
81 transform = $(program_transform_name)
82 NORMAL_INSTALL = :
83 PRE_INSTALL = :
84 POST_INSTALL = :
85 NORMAL_UNINSTALL = :
86 PRE_UNINSTALL = :
87 POST_UNINSTALL = :
88 build_triplet = @build@
89 host_triplet = @host@
90 subdir = res
91 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
92 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
93 $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \
94 $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
95 $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
96 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
97 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
98 $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
99 $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac
100 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
101 $(ACLOCAL_M4)
102 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
103 mkinstalldirs = $(install_sh) -d
104 CONFIG_HEADER = $(top_builddir)/config.h
105 CONFIG_CLEAN_FILES =
106 CONFIG_CLEAN_VPATH_FILES =
107 AM_V_P = $(am__v_P_@AM_V@)
108 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
109 am__v_P_0 = false
110 am__v_P_1 = :
111 AM_V_GEN = $(am__v_GEN_@AM_V@)
112 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
113 am__v_GEN_0 = @echo " GEN " $@;
114 am__v_GEN_1 =
115 AM_V_at = $(am__v_at_@AM_V@)
116 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
117 am__v_at_0 = @
118 am__v_at_1 =
119 SOURCES =
120 DIST_SOURCES =
121 am__can_run_installinfo = \
122 case $$AM_UPDATE_INFO_DIR in \
123 n|no|NO) false;; \
124 *) (install-info --version) >/dev/null 2>&1;; \
125 esac
126 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
127 am__vpath_adj = case $$p in \
128 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
129 *) f=$$p;; \
130 esac;
131 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
132 am__install_max = 40
133 am__nobase_strip_setup = \
134 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
135 am__nobase_strip = \
136 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
137 am__nobase_list = $(am__nobase_strip_setup); \
138 for p in $$list; do echo "$$p $$p"; done | \
139 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
140 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
141 if (++n[$$2] == $(am__install_max)) \
142 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
143 END { for (dir in files) print dir, files[dir] }'
144 am__base_list = \
145 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
146 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
147 am__uninstall_files_from_dir = { \
148 test -z "$$files" \
149 || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
150 || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
151 $(am__cd) "$$dir" && rm -f $$files; }; \
152 }
153 am__installdirs = "$(DESTDIR)$(desktopdir)" "$(DESTDIR)$(metainfodir)" \
154 "$(DESTDIR)$(resdir)" "$(DESTDIR)$(svgicondir)"
155 DATA = $(desktop_DATA) $(metainfo_DATA) $(res_DATA) $(svgicon_DATA)
156 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
157 am__DIST_COMMON = $(srcdir)/Makefile.in
158 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
159 ACLOCAL = @ACLOCAL@
160 ALSA_CFLAGS = @ALSA_CFLAGS@
161 ALSA_LIBS = @ALSA_LIBS@
162 AMTAR = @AMTAR@
163 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
164 AR = @AR@
165 AUTOCONF = @AUTOCONF@
166 AUTOHEADER = @AUTOHEADER@
167 AUTOMAKE = @AUTOMAKE@
168 AWK = @AWK@
169 CC = @CC@
170 CCDEPMODE = @CCDEPMODE@
171 CFLAGS = @CFLAGS@
172 CPP = @CPP@
173 CPPFLAGS = @CPPFLAGS@
174 CYGPATH_W = @CYGPATH_W@
175 DEFS = @DEFS@
176 DEPDIR = @DEPDIR@
177 DLLTOOL = @DLLTOOL@
178 DSYMUTIL = @DSYMUTIL@
179 DUMPBIN = @DUMPBIN@
180 ECHO_C = @ECHO_C@
181 ECHO_N = @ECHO_N@
182 ECHO_T = @ECHO_T@
183 EGREP = @EGREP@
184 EXEEXT = @EXEEXT@
185 FGREP = @FGREP@
186 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
187 GMSGFMT = @GMSGFMT@
188 GMSGFMT_015 = @GMSGFMT_015@
189 GREP = @GREP@
190 GTK_CFLAGS = @GTK_CFLAGS@
191 GTK_LIBS = @GTK_LIBS@
192 INSTALL = @INSTALL@
193 INSTALL_DATA = @INSTALL_DATA@
194 INSTALL_PROGRAM = @INSTALL_PROGRAM@
195 INSTALL_SCRIPT = @INSTALL_SCRIPT@
196 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
197 INTLLIBS = @INTLLIBS@
198 INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
199 LD = @LD@
200 LDFLAGS = @LDFLAGS@
201 LIBICONV = @LIBICONV@
202 LIBINTL = @LIBINTL@
203 LIBOBJS = @LIBOBJS@
204 LIBS = @LIBS@
205 LIBTOOL = @LIBTOOL@
206 LIPO = @LIPO@
207 LN_S = @LN_S@
208 LTLIBICONV = @LTLIBICONV@
209 LTLIBINTL = @LTLIBINTL@
210 LTLIBOBJS = @LTLIBOBJS@
211 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
212 MAKEINFO = @MAKEINFO@
213 MANIFEST_TOOL = @MANIFEST_TOOL@
214 MKDIR_P = @MKDIR_P@
215 MSGFMT = @MSGFMT@
216 MSGFMT_015 = @MSGFMT_015@
217 MSGMERGE = @MSGMERGE@
218 NM = @NM@
219 NMEDIT = @NMEDIT@
220 OBJDUMP = @OBJDUMP@
221 OBJEXT = @OBJEXT@
222 OTOOL = @OTOOL@
223 OTOOL64 = @OTOOL64@
224 PACKAGE = @PACKAGE@
225 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
226 PACKAGE_NAME = @PACKAGE_NAME@
227 PACKAGE_STRING = @PACKAGE_STRING@
228 PACKAGE_TARNAME = @PACKAGE_TARNAME@
229 PACKAGE_URL = @PACKAGE_URL@
230 PACKAGE_VERSION = @PACKAGE_VERSION@
231 PATH_SEPARATOR = @PATH_SEPARATOR@
232 PKG_CONFIG = @PKG_CONFIG@
233 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
234 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
235 POSUB = @POSUB@
236 PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@
237 PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@
238 RANLIB = @RANLIB@
239 SAMPLERATE_CFLAGS = @SAMPLERATE_CFLAGS@
240 SAMPLERATE_LIBS = @SAMPLERATE_LIBS@
241 SED = @SED@
242 SET_MAKE = @SET_MAKE@
243 SHELL = @SHELL@
244 SNDFILE_CFLAGS = @SNDFILE_CFLAGS@
245 SNDFILE_LIBS = @SNDFILE_LIBS@
246 STRIP = @STRIP@
247 USE_NLS = @USE_NLS@
248 VERSION = @VERSION@
249 XGETTEXT = @XGETTEXT@
250 XGETTEXT_015 = @XGETTEXT_015@
251 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
252 abs_builddir = @abs_builddir@
253 abs_srcdir = @abs_srcdir@
254 abs_top_builddir = @abs_top_builddir@
255 abs_top_srcdir = @abs_top_srcdir@
256 ac_ct_AR = @ac_ct_AR@
257 ac_ct_CC = @ac_ct_CC@
258 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
259 am__include = @am__include@
260 am__leading_dot = @am__leading_dot@
261 am__quote = @am__quote@
262 am__tar = @am__tar@
263 am__untar = @am__untar@
264 bindir = @bindir@
265 build = @build@
266 build_alias = @build_alias@
267 build_cpu = @build_cpu@
268 build_os = @build_os@
269 build_vendor = @build_vendor@
270 builddir = @builddir@
271 datadir = @datadir@
272 datarootdir = @datarootdir@
273 docdir = @docdir@
274 dvidir = @dvidir@
275 exec_prefix = @exec_prefix@
276 host = @host@
277 host_alias = @host_alias@
278 host_cpu = @host_cpu@
279 host_os = @host_os@
280 host_vendor = @host_vendor@
281 htmldir = @htmldir@
282 includedir = @includedir@
283 infodir = @infodir@
284 install_sh = @install_sh@
285 libdir = @libdir@
286 libexecdir = @libexecdir@
287 libzip_CFLAGS = @libzip_CFLAGS@
288 libzip_LIBS = @libzip_LIBS@
289 localedir = @localedir@
290 localstatedir = @localstatedir@
291 mandir = @mandir@
292 mkdir_p = @mkdir_p@
293 oldincludedir = @oldincludedir@
294 pdfdir = @pdfdir@
295 prefix = @prefix@
296 program_transform_name = @program_transform_name@
297 psdir = @psdir@
298 runstatedir = @runstatedir@
299 sbindir = @sbindir@
300 sharedstatedir = @sharedstatedir@
301 srcdir = @srcdir@
302 sysconfdir = @sysconfdir@
303 target_alias = @target_alias@
304 top_build_prefix = @top_build_prefix@
305 top_builddir = @top_builddir@
306 top_srcdir = @top_srcdir@
307 zlib_CFLAGS = @zlib_CFLAGS@
308 zlib_LIBS = @zlib_LIBS@
309 @CLI_ONLY_FALSE@res_DATA = gui.glade gui.css elektron-devices.json
310 @CLI_ONLY_TRUE@res_DATA = elektron-devices.json
311 @CLI_ONLY_FALSE@desktop_DATA = elektroid.desktop
312 @CLI_ONLY_TRUE@desktop_DATA =
313 @CLI_ONLY_FALSE@metainfo_DATA = elektroid.appdata.xml
314 @CLI_ONLY_TRUE@metainfo_DATA =
315 @CLI_ONLY_FALSE@svgicon_DATA = elektroid.svg elektroid-symbolic.svg elektroid-wave-symbolic.svg elektroid-sequence-symbolic.svg elektroid-project-symbolic.svg elektroid-sound-symbolic.svg
316 @CLI_ONLY_TRUE@svgicon_DATA =
317 resdir = $(datadir)/elektroid
318 desktopdir = $(datadir)/applications
319 metainfodir = $(datadir)/metainfo
320 svgicondir = $(datarootdir)/icons/hicolor/scalable/apps
321 gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datarootdir)/icons/hicolor
322 EXTRA_DIST = \
323 $(res_DATA) \
324 $(desktop_DATA) \
325 $(metainfo_DATA) \
326 $(svgicon_DATA)
327
328 all: all-am
329
330 .SUFFIXES:
331 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
332 @for dep in $?; do \
333 case '$(am__configure_deps)' in \
334 *$$dep*) \
335 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
336 && { if test -f $@; then exit 0; else break; fi; }; \
337 exit 1;; \
338 esac; \
339 done; \
340 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu res/Makefile'; \
341 $(am__cd) $(top_srcdir) && \
342 $(AUTOMAKE) --gnu res/Makefile
343 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
344 @case '$?' in \
345 *config.status*) \
346 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
347 *) \
348 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
349 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
350 esac;
351
352 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
353 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
354
355 $(top_srcdir)/configure: $(am__configure_deps)
356 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
357 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
358 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
359 $(am__aclocal_m4_deps):
360
361 mostlyclean-libtool:
362 -rm -f *.lo
363
364 clean-libtool:
365 -rm -rf .libs _libs
366 install-desktopDATA: $(desktop_DATA)
367 @$(NORMAL_INSTALL)
368 @list='$(desktop_DATA)'; test -n "$(desktopdir)" || list=; \
369 if test -n "$$list"; then \
370 echo " $(MKDIR_P) '$(DESTDIR)$(desktopdir)'"; \
371 $(MKDIR_P) "$(DESTDIR)$(desktopdir)" || exit 1; \
372 fi; \
373 for p in $$list; do \
374 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
375 echo "$$d$$p"; \
376 done | $(am__base_list) | \
377 while read files; do \
378 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(desktopdir)'"; \
379 $(INSTALL_DATA) $$files "$(DESTDIR)$(desktopdir)" || exit $$?; \
380 done
381
382 uninstall-desktopDATA:
383 @$(NORMAL_UNINSTALL)
384 @list='$(desktop_DATA)'; test -n "$(desktopdir)" || list=; \
385 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
386 dir='$(DESTDIR)$(desktopdir)'; $(am__uninstall_files_from_dir)
387 install-metainfoDATA: $(metainfo_DATA)
388 @$(NORMAL_INSTALL)
389 @list='$(metainfo_DATA)'; test -n "$(metainfodir)" || list=; \
390 if test -n "$$list"; then \
391 echo " $(MKDIR_P) '$(DESTDIR)$(metainfodir)'"; \
392 $(MKDIR_P) "$(DESTDIR)$(metainfodir)" || exit 1; \
393 fi; \
394 for p in $$list; do \
395 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
396 echo "$$d$$p"; \
397 done | $(am__base_list) | \
398 while read files; do \
399 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(metainfodir)'"; \
400 $(INSTALL_DATA) $$files "$(DESTDIR)$(metainfodir)" || exit $$?; \
401 done
402
403 uninstall-metainfoDATA:
404 @$(NORMAL_UNINSTALL)
405 @list='$(metainfo_DATA)'; test -n "$(metainfodir)" || list=; \
406 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
407 dir='$(DESTDIR)$(metainfodir)'; $(am__uninstall_files_from_dir)
408 install-resDATA: $(res_DATA)
409 @$(NORMAL_INSTALL)
410 @list='$(res_DATA)'; test -n "$(resdir)" || list=; \
411 if test -n "$$list"; then \
412 echo " $(MKDIR_P) '$(DESTDIR)$(resdir)'"; \
413 $(MKDIR_P) "$(DESTDIR)$(resdir)" || exit 1; \
414 fi; \
415 for p in $$list; do \
416 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
417 echo "$$d$$p"; \
418 done | $(am__base_list) | \
419 while read files; do \
420 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(resdir)'"; \
421 $(INSTALL_DATA) $$files "$(DESTDIR)$(resdir)" || exit $$?; \
422 done
423
424 uninstall-resDATA:
425 @$(NORMAL_UNINSTALL)
426 @list='$(res_DATA)'; test -n "$(resdir)" || list=; \
427 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
428 dir='$(DESTDIR)$(resdir)'; $(am__uninstall_files_from_dir)
429 install-svgiconDATA: $(svgicon_DATA)
430 @$(NORMAL_INSTALL)
431 @list='$(svgicon_DATA)'; test -n "$(svgicondir)" || list=; \
432 if test -n "$$list"; then \
433 echo " $(MKDIR_P) '$(DESTDIR)$(svgicondir)'"; \
434 $(MKDIR_P) "$(DESTDIR)$(svgicondir)" || exit 1; \
435 fi; \
436 for p in $$list; do \
437 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
438 echo "$$d$$p"; \
439 done | $(am__base_list) | \
440 while read files; do \
441 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(svgicondir)'"; \
442 $(INSTALL_DATA) $$files "$(DESTDIR)$(svgicondir)" || exit $$?; \
443 done
444
445 uninstall-svgiconDATA:
446 @$(NORMAL_UNINSTALL)
447 @list='$(svgicon_DATA)'; test -n "$(svgicondir)" || list=; \
448 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
449 dir='$(DESTDIR)$(svgicondir)'; $(am__uninstall_files_from_dir)
450 tags TAGS:
451
452 ctags CTAGS:
453
454 cscope cscopelist:
455
456
457 distdir: $(BUILT_SOURCES)
458 $(MAKE) $(AM_MAKEFLAGS) distdir-am
459
460 distdir-am: $(DISTFILES)
461 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
462 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
463 list='$(DISTFILES)'; \
464 dist_files=`for file in $$list; do echo $$file; done | \
465 sed -e "s|^$$srcdirstrip/||;t" \
466 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
467 case $$dist_files in \
468 */*) $(MKDIR_P) `echo "$$dist_files" | \
469 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
470 sort -u` ;; \
471 esac; \
472 for file in $$dist_files; do \
473 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
474 if test -d $$d/$$file; then \
475 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
476 if test -d "$(distdir)/$$file"; then \
477 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
478 fi; \
479 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
480 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
481 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
482 fi; \
483 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
484 else \
485 test -f "$(distdir)/$$file" \
486 || cp -p $$d/$$file "$(distdir)/$$file" \
487 || exit 1; \
488 fi; \
489 done
490 check-am: all-am
491 check: check-am
492 all-am: Makefile $(DATA)
493 installdirs:
494 for dir in "$(DESTDIR)$(desktopdir)" "$(DESTDIR)$(metainfodir)" "$(DESTDIR)$(resdir)" "$(DESTDIR)$(svgicondir)"; do \
495 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
496 done
497 install: install-am
498 install-exec: install-exec-am
499 install-data: install-data-am
500 uninstall: uninstall-am
501
502 install-am: all-am
503 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
504
505 installcheck: installcheck-am
506 install-strip:
507 if test -z '$(STRIP)'; then \
508 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
509 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
510 install; \
511 else \
512 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
513 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
514 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
515 fi
516 mostlyclean-generic:
517
518 clean-generic:
519
520 distclean-generic:
521 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
522 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
523
524 maintainer-clean-generic:
525 @echo "This command is intended for maintainers to use"
526 @echo "it deletes files that may require special tools to rebuild."
527 clean: clean-am
528
529 clean-am: clean-generic clean-libtool mostlyclean-am
530
531 distclean: distclean-am
532 -rm -f Makefile
533 distclean-am: clean-am distclean-generic
534
535 dvi: dvi-am
536
537 dvi-am:
538
539 html: html-am
540
541 html-am:
542
543 info: info-am
544
545 info-am:
546
547 install-data-am: install-desktopDATA install-metainfoDATA \
548 install-resDATA install-svgiconDATA
549 @$(NORMAL_INSTALL)
550 $(MAKE) $(AM_MAKEFLAGS) install-data-hook
551 install-dvi: install-dvi-am
552
553 install-dvi-am:
554
555 install-exec-am:
556
557 install-html: install-html-am
558
559 install-html-am:
560
561 install-info: install-info-am
562
563 install-info-am:
564
565 install-man:
566
567 install-pdf: install-pdf-am
568
569 install-pdf-am:
570
571 install-ps: install-ps-am
572
573 install-ps-am:
574
575 installcheck-am:
576
577 maintainer-clean: maintainer-clean-am
578 -rm -f Makefile
579 maintainer-clean-am: distclean-am maintainer-clean-generic
580
581 mostlyclean: mostlyclean-am
582
583 mostlyclean-am: mostlyclean-generic mostlyclean-libtool
584
585 pdf: pdf-am
586
587 pdf-am:
588
589 ps: ps-am
590
591 ps-am:
592
593 uninstall-am: uninstall-desktopDATA uninstall-metainfoDATA \
594 uninstall-resDATA uninstall-svgiconDATA
595 @$(NORMAL_INSTALL)
596 $(MAKE) $(AM_MAKEFLAGS) uninstall-hook
597 .MAKE: install-am install-data-am install-strip uninstall-am
598
599 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
600 cscopelist-am ctags-am distclean distclean-generic \
601 distclean-libtool distdir dvi dvi-am html html-am info info-am \
602 install install-am install-data install-data-am \
603 install-data-hook install-desktopDATA install-dvi \
604 install-dvi-am install-exec install-exec-am install-html \
605 install-html-am install-info install-info-am install-man \
606 install-metainfoDATA install-pdf install-pdf-am install-ps \
607 install-ps-am install-resDATA install-strip \
608 install-svgiconDATA installcheck installcheck-am installdirs \
609 maintainer-clean maintainer-clean-generic mostlyclean \
610 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
611 tags-am uninstall uninstall-am uninstall-desktopDATA \
612 uninstall-hook uninstall-metainfoDATA uninstall-resDATA \
613 uninstall-svgiconDATA
614
615 .PRECIOUS: Makefile
616
617
618 install-data-hook: update-icon-cache
619
620 uninstall-hook: update-icon-cache
621
622 update-icon-cache:
623 @-if test -z "$(DESTDIR)"; then \
624 echo "Updating Gtk icon cache."; \
625 $(gtk_update_icon_cache); \
626 else \
627 echo "*** Icon cache not updated. After (un)install, run this:"; \
628 echo "*** $(gtk_update_icon_cache)"; \
629 fi
630
631 # Tell versions [3.59,3.63) of GNU make to not export all variables.
632 # Otherwise a system limit (for SysV at least) may be exceeded.
633 .NOEXPORT:
+0
-79
res/devices.json less more
0 [{
1 "id": 4,
2 "name": "Analog Four",
3 "alias": "af",
4 "filesystems": 56,
5 "storage": 0
6 }, {
7 "id": 6,
8 "name": "Analog Keys",
9 "alias": "ak",
10 "filesystems": 56,
11 "storage": 0
12 }, {
13 "id": 8,
14 "name": "Analog Rytm",
15 "alias": "ar",
16 "filesystems": 57,
17 "storage": 3
18 }, {
19 "id": 10,
20 "name": "Analog Heat",
21 "alias": "ah",
22 "filesystems": 40,
23 "storage": 0
24 }, {
25 "id": 12,
26 "name": "Digitakt",
27 "alias": "dt",
28 "filesystems": 57,
29 "storage": 3
30 }, {
31 "id": 14,
32 "name": "Analog Four MKII",
33 "alias": "af",
34 "filesystems": 56,
35 "storage": 0
36 }, {
37 "id": 16,
38 "name": "Analog Rytm MKII",
39 "alias": "ar",
40 "filesystems": 57,
41 "storage": 3
42 }, {
43 "id": 20,
44 "name": "Digitone",
45 "alias": "dn",
46 "filesystems": 56,
47 "storage": 0
48 }, {
49 "id": 22,
50 "name": "Analog Heat MKII",
51 "alias": "ah",
52 "filesystems": 40,
53 "storage": 0
54 }, {
55 "id": 28,
56 "name": "Digitone Keys",
57 "alias": "dn",
58 "filesystems": 56,
59 "storage": 0
60 }, {
61 "id": 25,
62 "name": "Model:Samples",
63 "alias": "ms",
64 "filesystems": 57,
65 "storage": 3
66 }, {
67 "id": 27,
68 "name": "Model:Cycles",
69 "alias": "mc",
70 "filesystems": 30,
71 "storage": 1
72 }, {
73 "id": 30,
74 "name": "Syntakt",
75 "alias": "st",
76 "filesystems": 56,
77 "storage": 0
78 }]
+0
-198
res/elektroid-data-symbolic.svg less more
0 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
1 <!-- Created with Inkscape (http://www.inkscape.org/) -->
2
3 <svg
4 xmlns:dc="http://purl.org/dc/elements/1.1/"
5 xmlns:cc="http://creativecommons.org/ns#"
6 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
7 xmlns:svg="http://www.w3.org/2000/svg"
8 xmlns="http://www.w3.org/2000/svg"
9 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
10 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
11 width="16"
12 height="16"
13 viewBox="0 0 4.233333 4.2333333"
14 version="1.1"
15 id="svg924"
16 sodipodi:docname="elektroid-pattern-symbolic.svg"
17 inkscape:version="0.92.4 (5da689c313, 2019-01-14)">
18 <title
19 id="title2309">elektroid pattern symbolic</title>
20 <defs
21 id="defs918" />
22 <sodipodi:namedview
23 id="base"
24 pagecolor="#ffffff"
25 bordercolor="#666666"
26 borderopacity="1.0"
27 inkscape:pageopacity="0.0"
28 inkscape:pageshadow="2"
29 inkscape:zoom="32"
30 inkscape:cx="1.6142353"
31 inkscape:cy="7.0667158"
32 inkscape:document-units="px"
33 inkscape:current-layer="layer1"
34 showgrid="true"
35 inkscape:window-width="1680"
36 inkscape:window-height="1023"
37 inkscape:window-x="0"
38 inkscape:window-y="0"
39 inkscape:window-maximized="1"
40 inkscape:pagecheckerboard="false">
41 <inkscape:grid
42 type="xygrid"
43 id="grid1511" />
44 </sodipodi:namedview>
45 <metadata
46 id="metadata921">
47 <rdf:RDF>
48 <cc:Work
49 rdf:about="">
50 <dc:format>image/svg+xml</dc:format>
51 <dc:type
52 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
53 <dc:title>elektroid pattern symbolic</dc:title>
54 <cc:license
55 rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
56 <dc:creator>
57 <cc:Agent>
58 <dc:title>David García Goñi</dc:title>
59 </cc:Agent>
60 </dc:creator>
61 </cc:Work>
62 <cc:License
63 rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
64 <cc:permits
65 rdf:resource="http://creativecommons.org/ns#Reproduction" />
66 <cc:permits
67 rdf:resource="http://creativecommons.org/ns#Distribution" />
68 <cc:requires
69 rdf:resource="http://creativecommons.org/ns#Notice" />
70 <cc:requires
71 rdf:resource="http://creativecommons.org/ns#Attribution" />
72 <cc:permits
73 rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
74 <cc:requires
75 rdf:resource="http://creativecommons.org/ns#ShareAlike" />
76 </cc:License>
77 </rdf:RDF>
78 </metadata>
79 <g
80 inkscape:label="Capa 1"
81 inkscape:groupmode="layer"
82 id="layer1"
83 transform="translate(0,-292.76667)">
84 <rect
85 style="opacity:1;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.10001194;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
86 id="rect1509"
87 width="0.52916372"
88 height="0.52917469"
89 x="0.26458624"
90 y="293.03125" />
91 <rect
92 style="opacity:1;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.10001194;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
93 id="rect1509-6-5"
94 width="0.52916372"
95 height="0.52917469"
96 x="2.3812413"
97 y="294.0896" />
98 <rect
99 style="opacity:1;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.10001194;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
100 id="rect1509-6"
101 width="0.52916372"
102 height="0.52917469"
103 x="2.3812411"
104 y="293.03125" />
105 <rect
106 style="opacity:1;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.10001194;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
107 id="rect1509-61"
108 width="0.52916372"
109 height="0.52917469"
110 x="0.26458624"
111 y="294.0896" />
112 <rect
113 style="opacity:1;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.10001194;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
114 id="rect1509-6-5-2"
115 width="0.52916372"
116 height="0.52917469"
117 x="2.3812416"
118 y="296.20624" />
119 <rect
120 style="opacity:1;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.10001194;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
121 id="rect1509-61-9"
122 width="0.52916372"
123 height="0.52917469"
124 x="0.26458624"
125 y="296.20624" />
126 <rect
127 style="opacity:1;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.10001194;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
128 id="rect1509-3-2-7-2"
129 width="0.52916372"
130 height="0.52917469"
131 x="3.4395683"
132 y="296.20621" />
133 <rect
134 style="opacity:1;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.10001194;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
135 id="rect1509-3-2-7-2-3"
136 width="0.52916372"
137 height="0.52917469"
138 x="0.26458624"
139 y="295.14792" />
140 <rect
141 style="opacity:1;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.10001194;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
142 id="rect1509-3-2-7-2-6"
143 width="0.52916372"
144 height="0.52917469"
145 x="3.4395683"
146 y="293.03125" />
147 <rect
148 style="opacity:0.3;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.10001194;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
149 id="rect1509-3-2-7-2-7"
150 width="0.52916372"
151 height="0.52917469"
152 x="1.3229138"
153 y="293.03125" />
154 <rect
155 style="opacity:1;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.10001194;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
156 id="rect1509-3-2-7-2-5"
157 width="0.52916372"
158 height="0.52917469"
159 x="1.3229138"
160 y="295.14792" />
161 <rect
162 style="opacity:1;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.10001194;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
163 id="rect1509-61-7"
164 width="0.52916372"
165 height="0.52917469"
166 x="3.4395683"
167 y="295.14792" />
168 <rect
169 style="opacity:0.3;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.10001194;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
170 id="rect1509-3-2-7-2-7-6"
171 width="0.52916372"
172 height="0.52917469"
173 x="1.3229135"
174 y="294.08957" />
175 <rect
176 style="opacity:0.3;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.10001194;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
177 id="rect1509-3-2-7-2-7-2"
178 width="0.52916372"
179 height="0.52917469"
180 x="3.4395683"
181 y="294.08957" />
182 <rect
183 style="opacity:0.3;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.10001194;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
184 id="rect1509-3-2-7-2-7-9"
185 width="0.52916372"
186 height="0.52917469"
187 x="1.3229138"
188 y="296.20621" />
189 <rect
190 style="opacity:0.3;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.10001194;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
191 id="rect1509-3-2-7-2-7-1"
192 width="0.52916372"
193 height="0.52917469"
194 x="2.3812411"
195 y="295.14792" />
196 </g>
197 </svg>
0 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
1 <!-- Created with Inkscape (http://www.inkscape.org/) -->
2
3 <svg
4 xmlns:dc="http://purl.org/dc/elements/1.1/"
5 xmlns:cc="http://creativecommons.org/ns#"
6 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
7 xmlns:svg="http://www.w3.org/2000/svg"
8 xmlns="http://www.w3.org/2000/svg"
9 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
10 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
11 width="16"
12 height="16"
13 viewBox="0 0 4.233333 4.2333333"
14 version="1.1"
15 id="svg924"
16 sodipodi:docname="elektroid-sequence-symbolic.svg"
17 inkscape:version="0.92.4 (5da689c313, 2019-01-14)">
18 <title
19 id="title2309">elektroid sequence symbolic</title>
20 <defs
21 id="defs918" />
22 <sodipodi:namedview
23 id="base"
24 pagecolor="#ffffff"
25 bordercolor="#666666"
26 borderopacity="1.0"
27 inkscape:pageopacity="0.0"
28 inkscape:pageshadow="2"
29 inkscape:zoom="32"
30 inkscape:cx="1.6142353"
31 inkscape:cy="7.0667158"
32 inkscape:document-units="px"
33 inkscape:current-layer="layer1"
34 showgrid="true"
35 inkscape:window-width="1680"
36 inkscape:window-height="1023"
37 inkscape:window-x="0"
38 inkscape:window-y="0"
39 inkscape:window-maximized="1"
40 inkscape:pagecheckerboard="false">
41 <inkscape:grid
42 type="xygrid"
43 id="grid1511" />
44 </sodipodi:namedview>
45 <metadata
46 id="metadata921">
47 <rdf:RDF>
48 <cc:Work
49 rdf:about="">
50 <dc:format>image/svg+xml</dc:format>
51 <dc:type
52 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
53 <dc:title>elektroid sequence symbolic</dc:title>
54 <cc:license
55 rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
56 <dc:creator>
57 <cc:Agent>
58 <dc:title>David García Goñi</dc:title>
59 </cc:Agent>
60 </dc:creator>
61 </cc:Work>
62 <cc:License
63 rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
64 <cc:permits
65 rdf:resource="http://creativecommons.org/ns#Reproduction" />
66 <cc:permits
67 rdf:resource="http://creativecommons.org/ns#Distribution" />
68 <cc:requires
69 rdf:resource="http://creativecommons.org/ns#Notice" />
70 <cc:requires
71 rdf:resource="http://creativecommons.org/ns#Attribution" />
72 <cc:permits
73 rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
74 <cc:requires
75 rdf:resource="http://creativecommons.org/ns#ShareAlike" />
76 </cc:License>
77 </rdf:RDF>
78 </metadata>
79 <g
80 inkscape:label="Capa 1"
81 inkscape:groupmode="layer"
82 id="layer1"
83 transform="translate(0,-292.76667)">
84 <rect
85 style="opacity:1;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.10001194;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
86 id="rect1509"
87 width="0.52916372"
88 height="0.52917469"
89 x="0.26458624"
90 y="293.03125" />
91 <rect
92 style="opacity:1;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.10001194;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
93 id="rect1509-6-5"
94 width="0.52916372"
95 height="0.52917469"
96 x="2.3812413"
97 y="294.0896" />
98 <rect
99 style="opacity:1;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.10001194;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
100 id="rect1509-6"
101 width="0.52916372"
102 height="0.52917469"
103 x="2.3812411"
104 y="293.03125" />
105 <rect
106 style="opacity:1;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.10001194;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
107 id="rect1509-61"
108 width="0.52916372"
109 height="0.52917469"
110 x="0.26458624"
111 y="294.0896" />
112 <rect
113 style="opacity:1;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.10001194;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
114 id="rect1509-6-5-2"
115 width="0.52916372"
116 height="0.52917469"
117 x="2.3812416"
118 y="296.20624" />
119 <rect
120 style="opacity:1;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.10001194;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
121 id="rect1509-61-9"
122 width="0.52916372"
123 height="0.52917469"
124 x="0.26458624"
125 y="296.20624" />
126 <rect
127 style="opacity:1;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.10001194;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
128 id="rect1509-3-2-7-2"
129 width="0.52916372"
130 height="0.52917469"
131 x="3.4395683"
132 y="296.20621" />
133 <rect
134 style="opacity:1;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.10001194;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
135 id="rect1509-3-2-7-2-3"
136 width="0.52916372"
137 height="0.52917469"
138 x="0.26458624"
139 y="295.14792" />
140 <rect
141 style="opacity:1;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.10001194;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
142 id="rect1509-3-2-7-2-6"
143 width="0.52916372"
144 height="0.52917469"
145 x="3.4395683"
146 y="293.03125" />
147 <rect
148 style="opacity:0.3;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.10001194;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
149 id="rect1509-3-2-7-2-7"
150 width="0.52916372"
151 height="0.52917469"
152 x="1.3229138"
153 y="293.03125" />
154 <rect
155 style="opacity:1;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.10001194;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
156 id="rect1509-3-2-7-2-5"
157 width="0.52916372"
158 height="0.52917469"
159 x="1.3229138"
160 y="295.14792" />
161 <rect
162 style="opacity:1;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.10001194;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
163 id="rect1509-61-7"
164 width="0.52916372"
165 height="0.52917469"
166 x="3.4395683"
167 y="295.14792" />
168 <rect
169 style="opacity:0.3;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.10001194;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
170 id="rect1509-3-2-7-2-7-6"
171 width="0.52916372"
172 height="0.52917469"
173 x="1.3229135"
174 y="294.08957" />
175 <rect
176 style="opacity:0.3;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.10001194;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
177 id="rect1509-3-2-7-2-7-2"
178 width="0.52916372"
179 height="0.52917469"
180 x="3.4395683"
181 y="294.08957" />
182 <rect
183 style="opacity:0.3;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.10001194;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
184 id="rect1509-3-2-7-2-7-9"
185 width="0.52916372"
186 height="0.52917469"
187 x="1.3229138"
188 y="296.20621" />
189 <rect
190 style="opacity:0.3;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.10001194;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
191 id="rect1509-3-2-7-2-7-1"
192 width="0.52916372"
193 height="0.52917469"
194 x="2.3812411"
195 y="295.14792" />
196 </g>
197 </svg>
1414 sodipodi:docname="elektroid-sound-symbolic.svg"
1515 inkscape:version="1.0.2 (e86c870879, 2021-01-15)">
1616 <title
17 id="title2309">elektroid pattern symbolic</title>
17 id="title2309">elektroid sound symbolic</title>
1818 <defs
1919 id="defs918" />
2020 <sodipodi:namedview
2424 borderopacity="1.0"
2525 inkscape:pageopacity="0.0"
2626 inkscape:pageshadow="2"
27 inkscape:zoom="32"
28 inkscape:cx="7.0754366"
29 inkscape:cy="5.4255657"
27 inkscape:zoom="22.627418"
28 inkscape:cx="8.2300275"
29 inkscape:cy="9.7982109"
3030 inkscape:document-units="px"
3131 inkscape:current-layer="layer1"
3232 showgrid="true"
33 inkscape:window-width="1680"
34 inkscape:window-height="1013"
33 inkscape:window-width="1920"
34 inkscape:window-height="1043"
3535 inkscape:window-x="0"
3636 inkscape:window-y="0"
3737 inkscape:window-maximized="1"
4949 <dc:format>image/svg+xml</dc:format>
5050 <dc:type
5151 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
52 <dc:title>elektroid pattern symbolic</dc:title>
52 <dc:title>elektroid sound symbolic</dc:title>
5353 <cc:license
5454 rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
5555 <dc:creator>
8181 id="layer1"
8282 transform="translate(0,-292.76667)">
8383 <rect
84 style="fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.187104;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
85 id="rect1509-5-3-7-9-1"
86 width="0.26458329"
87 height="3.7041705"
88 x="-2.6577149e-07"
89 y="293.03125" />
90 <rect
91 style="fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.111814;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
92 id="rect1509-5-3-7-2-2"
93 width="1.3229165"
94 height="0.26457092"
95 x="0.26458332"
96 y="296.73541" />
97 <rect
98 style="fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.187103;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
99 id="rect1509-5-3-7-28-70"
84 style="opacity:0.5;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.150018;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
85 id="rect1509-3-2-7-2-7-6-2-7-5-8-64-19-2-9-9-0-6-4"
86 width="0.79376954"
87 height="0.79374981"
88 x="-1.3229316"
89 y="-293.82498"
90 transform="scale(-1)" />
91 <rect
92 style="fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.0866093;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
93 id="rect1509-5-3-7-2-8-1-54-7-2-5-6-1-7"
94 width="0.79374123"
95 height="0.26456764"
96 x="0.52916944"
97 y="-293.56042"
98 transform="scale(1,-1)" />
99 <rect
100 style="fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.0866115;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
101 id="rect1509-5-3-7-28-70-1-0-6-6-6"
100102 width="0.2645832"
101 height="3.7041516"
102 x="1.5874999"
103 y="293.03125" />
104 <rect
105 style="fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.111817;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
106 id="rect1509-5-3-7-97-9"
107 width="1.3229165"
108 height="0.26458609"
109 x="0.26458332"
110 y="292.76666" />
111 <rect
112 style="fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.244977;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
113 id="rect1509-5-3-7-97-3-36"
114 width="0.79374999"
115 height="2.1166649"
116 x="0.52916646"
117 y="294.0896" />
118 <rect
119 style="fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.187104;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
120 id="rect1509-5-3-7-9-3"
121 width="0.26458329"
122 height="3.7041705"
123 x="2.3812494"
124 y="293.03125" />
125 <rect
126 style="fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.111814;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
127 id="rect1509-5-3-7-2-6"
128 width="1.3229165"
129 height="0.26457092"
130 x="2.6458328"
131 y="296.73541" />
132 <rect
133 style="fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.187103;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
134 id="rect1509-5-3-7-28-7"
103 height="0.79374993"
104 x="0.79375684"
105 y="-293.82498"
106 transform="scale(1,-1)" />
107 <rect
108 style="opacity:0.5;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.150018;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
109 id="rect1509-3-2-7-2-7-6-2-7-5-8-64-19-2-9-9-0-6-6"
110 width="0.79376954"
111 height="0.79374981"
112 x="-3.7042093"
113 y="-295.14789"
114 transform="scale(-1)" />
115 <rect
116 style="fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.0866093;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
117 id="rect1509-5-3-7-2-8-1-54-7-2-5-6-1-9"
118 width="0.79374123"
119 height="0.26456764"
120 x="2.9104471"
121 y="-294.8833"
122 transform="scale(1,-1)" />
123 <rect
124 style="fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.0866115;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
125 id="rect1509-5-3-7-28-70-1-0-6-6-3"
135126 width="0.2645832"
136 height="3.7041516"
137 x="3.9687495"
138 y="293.03125" />
139 <rect
140 style="fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.111817;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
141 id="rect1509-5-3-7-97-5"
142 width="1.3229165"
143 height="0.26458609"
144 x="2.645833"
145 y="292.76666" />
146 <rect
147 style="fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.122488;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
148 id="rect1509-5-3-7-97-3-3"
149 width="0.79374999"
150 height="0.52916795"
151 x="2.9104161"
152 y="295.67709" />
153 <rect
154 style="fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.0500042;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
155 id="rect1509-5-3-7-2-8-1-54-7"
156 width="0.26458338"
127 height="0.79374993"
128 x="3.1750345"
129 y="-295.14789"
130 transform="scale(1,-1)" />
131 <rect
132 style="opacity:0.5;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.15813;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
133 id="rect1509-3-2-7-2-7-6-2-7-5-8-64-19-2-9-9-0-6-4-3-9"
134 width="2.6458304"
135 height="0.26458338"
136 x="-3.9687448"
137 y="-293.56042"
138 transform="scale(-1)" />
139 <rect
140 style="opacity:0.5;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.15813;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
141 id="rect1509-3-2-7-2-7-6-2-7-5-8-64-19-2-9-9-0-6-4-3-1"
142 width="2.6458244"
143 height="0.26458338"
144 x="-2.9104166"
145 y="-294.88333"
146 transform="scale(-1)" />
147 <rect
148 style="opacity:0.5;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.150018;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
149 id="rect1509-3-2-7-2-7-6-2-7-5-8-64-19-2-9-9-0-6-2"
150 width="0.79376954"
151 height="0.79374981"
152 x="-2.1166787"
153 y="-296.47083"
154 transform="scale(-1)" />
155 <rect
156 style="fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.0866093;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
157 id="rect1509-5-3-7-2-8-1-54-7-2-5-6-1-6"
158 width="0.79374123"
157159 height="0.26456764"
158 x="3.1749995"
159 y="296.20627" />
160 <rect
161 style="opacity:0.5;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.0500054;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
162 id="rect1509-3-2-7-2-7-6-2-7-5-8-64-19-2-9"
163 width="0.26458341"
164 height="0.26457989"
165 x="-3.1749992"
166 y="296.20624"
167 transform="scale(-1,1)" />
168 <rect
169 style="opacity:0.5;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.0500054;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
170 id="rect1509-3-2-7-2-7-6-2-7-5-8-64-19-2-2"
171 width="0.26458341"
172 height="0.26457989"
173 x="-3.7041659"
174 y="296.20624"
175 transform="scale(-1,1)" />
176 <rect
177 style="fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.0500042;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
178 id="rect1509-5-3-7-2-8-1-54-7-2"
179 width="0.26458338"
180 height="0.26456764"
181 x="0.79375052"
182 y="296.20627" />
183 <rect
184 style="opacity:0.5;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.0500054;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
185 id="rect1509-3-2-7-2-7-6-2-7-5-8-64-19-2-9-8"
186 width="0.26458341"
187 height="0.26457989"
188 x="-0.79375005"
189 y="296.20624"
190 transform="scale(-1,1)" />
191 <rect
192 style="opacity:0.5;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.0500054;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
193 id="rect1509-3-2-7-2-7-6-2-7-5-8-64-19-2-2-9"
194 width="0.26458341"
195 height="0.26457989"
196 x="-1.3229167"
197 y="296.20624"
198 transform="scale(-1,1)" />
199 <rect
200 style="opacity:0.5;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.0500054;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
201 id="rect1509-3-2-7-2-7-6-2-7-5-8-64-19-0-7"
202 width="0.26458341"
203 height="0.26457989"
204 x="-4.2333326"
205 y="296.73541"
206 transform="scale(-1,1)" />
207 <rect
208 style="opacity:0.5;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.0500054;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
209 id="rect1509-3-2-7-2-7-6-2-7-5-8-64-19-0-3"
210 width="0.26458341"
211 height="0.26457989"
212 x="-2.6458328"
213 y="296.73541"
214 transform="scale(-1,1)" />
215 <rect
216 style="opacity:0.5;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.0500054;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
217 id="rect1509-3-2-7-2-7-6-2-7-5-8-64-19-0-6"
218 width="0.26458341"
219 height="0.26457989"
220 x="-1.852083"
221 y="296.73541"
222 transform="scale(-1,1)" />
223 <rect
224 style="opacity:0.5;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.0500054;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
225 id="rect1509-3-2-7-2-7-6-2-7-5-8-64-19-0-1"
226 width="0.26458341"
227 height="0.26457989"
228 x="-0.26458284"
229 y="296.73541"
230 transform="scale(-1,1)" />
231 <rect
232 style="opacity:0.5;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.0500054;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
233 id="rect1509-3-2-7-2-7-6-2-7-5-8-64-19-0-2"
234 width="0.26458341"
235 height="0.26457989"
236 x="-0.26458284"
237 y="292.76666"
238 transform="scale(-1,1)" />
239 <rect
240 style="opacity:0.5;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.0500054;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
241 id="rect1509-3-2-7-2-7-6-2-7-5-8-64-19-0-9"
242 width="0.26458341"
243 height="0.26457989"
244 x="-1.852083"
245 y="292.76666"
246 transform="scale(-1,1)" />
247 <rect
248 style="opacity:0.5;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.0500054;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
249 id="rect1509-3-2-7-2-7-6-2-7-5-8-64-19-0-31"
250 width="0.26458341"
251 height="0.26457989"
252 x="-2.6458328"
253 y="292.76666"
254 transform="scale(-1,1)" />
255 <rect
256 style="opacity:0.5;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.0500054;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
257 id="rect1509-3-2-7-2-7-6-2-7-5-8-64-19-0-94"
258 width="0.26458341"
259 height="0.26457989"
260 x="-4.2333326"
261 y="292.76666"
262 transform="scale(-1,1)" />
263 <rect
264 style="fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.0500042;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
265 id="rect1509-5-3-7-2-8-1-54-7-2-3"
266 width="0.26458338"
267 height="0.26456764"
268 x="0.79374999"
269 y="293.82504" />
270 <rect
271 style="opacity:0.5;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.0500054;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
272 id="rect1509-3-2-7-2-7-6-2-7-5-8-64-19-2-9-8-6"
273 width="0.26458341"
274 height="0.26457989"
275 x="-0.79374951"
276 y="293.82501"
277 transform="scale(-1,1)" />
278 <rect
279 style="opacity:0.5;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.0500054;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
280 id="rect1509-3-2-7-2-7-6-2-7-5-8-64-19-2-2-9-7"
281 width="0.26458341"
282 height="0.26457989"
283 x="-1.3229162"
284 y="293.82501"
285 transform="scale(-1,1)" />
286 <rect
287 style="fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.0500042;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
288 id="rect1509-5-3-7-2-8-1-54-7-2-5"
289 width="0.26458338"
290 height="0.26456764"
291 x="3.1750004"
292 y="295.41254" />
293 <rect
294 style="opacity:0.5;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.0500054;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
295 id="rect1509-3-2-7-2-7-6-2-7-5-8-64-19-2-9-8-3"
296 width="0.26458341"
297 height="0.26457989"
298 x="-3.175"
299 y="295.41251"
300 transform="scale(-1,1)" />
301 <rect
302 style="opacity:0.5;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.0500054;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
303 id="rect1509-3-2-7-2-7-6-2-7-5-8-64-19-2-2-9-5"
304 width="0.26458341"
305 height="0.26457989"
306 x="-3.7041667"
307 y="295.41251"
308 transform="scale(-1,1)" />
309 <rect
310 style="opacity:0.5;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.0500054;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
311 id="rect1509-3-2-7-2-7-6-2-7-5-8-64-19-0-1-6"
312 width="0.26458341"
313 height="0.26457989"
314 x="-0.52916616"
315 y="296.47083"
316 transform="scale(-1,1)" />
317 <rect
318 style="opacity:0.5;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.0500054;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
319 id="rect1509-3-2-7-2-7-6-2-7-5-8-64-19-0-1-2"
320 width="0.26458341"
321 height="0.26457989"
322 x="-1.5874995"
323 y="296.47083"
324 transform="scale(-1,1)" />
325 <rect
326 style="opacity:0.5;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.0500054;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
327 id="rect1509-3-2-7-2-7-6-2-7-5-8-64-19-0-1-9"
328 width="0.26458341"
329 height="0.26457989"
330 x="-1.5874995"
331 y="293.03125"
332 transform="scale(-1,1)" />
333 <rect
334 style="opacity:0.5;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.0500054;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
335 id="rect1509-3-2-7-2-7-6-2-7-5-8-64-19-0-1-1"
336 width="0.26458341"
337 height="0.26457989"
338 x="-0.52916616"
339 y="293.03125"
340 transform="scale(-1,1)" />
341 <rect
342 style="opacity:0.5;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.0500054;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
343 id="rect1509-3-2-7-2-7-6-2-7-5-8-64-19-0-1-27"
344 width="0.26458341"
345 height="0.26457989"
346 x="-2.9104161"
347 y="293.03125"
348 transform="scale(-1,1)" />
349 <rect
350 style="opacity:0.5;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.0500054;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
351 id="rect1509-3-2-7-2-7-6-2-7-5-8-64-19-0-1-0"
352 width="0.26458341"
353 height="0.26457989"
354 x="-3.9687493"
355 y="293.03125"
356 transform="scale(-1,1)" />
357 <rect
358 style="opacity:0.5;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.0500054;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
359 id="rect1509-3-2-7-2-7-6-2-7-5-8-64-19-0-1-93"
360 width="0.26458341"
361 height="0.26457989"
362 x="-3.9687493"
363 y="296.47083"
364 transform="scale(-1,1)" />
365 <rect
366 style="opacity:0.5;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.0500054;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
367 id="rect1509-3-2-7-2-7-6-2-7-5-8-64-19-0-1-60"
368 width="0.26458341"
369 height="0.26457989"
370 x="-2.9104161"
371 y="296.47083"
372 transform="scale(-1,1)" />
160 x="1.3229166"
161 y="-296.20624"
162 transform="scale(1,-1)" />
163 <rect
164 style="fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.0866115;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
165 id="rect1509-5-3-7-28-70-1-0-6-6-1"
166 width="0.2645832"
167 height="0.79374993"
168 x="1.587504"
169 y="-296.47083"
170 transform="scale(1,-1)" />
171 <rect
172 style="opacity:0.5;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.1323;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
173 id="rect1509-3-2-7-2-7-6-2-7-5-8-64-19-2-9-9-0-6-4-3-0-7"
174 width="1.8520782"
175 height="0.26458338"
176 x="-3.9687448"
177 y="-296.20627"
178 transform="scale(-1)" />
179 <rect
180 style="opacity:0.5;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.0500053;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
181 id="rect1509-3-2-7-2-7-6-2-7-5-8-64-19-2-9-9-0-6-4-3-1-2"
182 width="0.26458585"
183 height="0.26458338"
184 x="-3.9687662"
185 y="-294.88333"
186 transform="scale(-1)" />
187 <rect
188 style="opacity:0.5;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.100011;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
189 id="rect1509-3-2-7-2-7-6-2-7-5-8-64-19-2-9-9-0-6-4-3-1-2-7"
190 width="1.0583394"
191 height="0.26458338"
192 x="-1.3229166"
193 y="-296.20627"
194 transform="scale(-1)" />
195 <rect
196 style="opacity:0.5;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.0500043;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
197 id="rect1509-3-2-7-2-7-6-2-7-5-8-64-19-2-9-9-0-6-4-3-1-28"
198 width="0.26457459"
199 height="0.26458338"
200 x="-0.52916944"
201 y="-293.56042"
202 transform="scale(-1)" />
373203 </g>
374204 </svg>
0 [{
1 "id": 4,
2 "name": "Analog Four",
3 "alias": "af",
4 "filesystems": 56,
5 "storage": 0
6 }, {
7 "id": 6,
8 "name": "Analog Keys",
9 "alias": "ak",
10 "filesystems": 56,
11 "storage": 0
12 }, {
13 "id": 8,
14 "name": "Analog Rytm",
15 "alias": "ar",
16 "filesystems": 57,
17 "storage": 3
18 }, {
19 "id": 10,
20 "name": "Analog Heat",
21 "alias": "ah",
22 "filesystems": 40,
23 "storage": 0
24 }, {
25 "id": 12,
26 "name": "Digitakt",
27 "alias": "dt",
28 "filesystems": 57,
29 "storage": 3
30 }, {
31 "id": 14,
32 "name": "Analog Four MKII",
33 "alias": "af",
34 "filesystems": 56,
35 "storage": 0
36 }, {
37 "id": 16,
38 "name": "Analog Rytm MKII",
39 "alias": "ar",
40 "filesystems": 57,
41 "storage": 3
42 }, {
43 "id": 20,
44 "name": "Digitone",
45 "alias": "dn",
46 "filesystems": 56,
47 "storage": 0
48 }, {
49 "id": 22,
50 "name": "Analog Heat MKII",
51 "alias": "ah",
52 "filesystems": 40,
53 "storage": 0
54 }, {
55 "id": 28,
56 "name": "Digitone Keys",
57 "alias": "dn",
58 "filesystems": 56,
59 "storage": 0
60 }, {
61 "id": 25,
62 "name": "Model:Samples",
63 "alias": "ms",
64 "filesystems": 57,
65 "storage": 3
66 }, {
67 "id": 27,
68 "name": "Model:Cycles",
69 "alias": "mc",
70 "filesystems": 30,
71 "storage": 1
72 }, {
73 "id": 30,
74 "name": "Syntakt",
75 "alias": "st",
76 "filesystems": 56,
77 "storage": 0
78 }]
00 @define-color local_color #3584e4;
11 @define-color local_color_dark #255c9f;
22 @define-color remote_color #e01b24;
3 @define-color remote_color_dark #9d1319;
34 @define-color disabled_color #7f7f7f;
45
56 .local {
67 color: @local_color;
78 }
89
9 #local_up_button, #local_add_dir_button, #local_refresh_button, #play_button, #stop_button, #loop_button, #upload_button {
10 .remote {
11 color: @remote_color;
12 }
13
14 .local_switch {
15 background-color: @local_color_dark;
16 }
17
18 .local_switch:checked, .local_switch:checked slider {
19 border-color: @local_color_dark;
20 background-color: @local_color;
21 }
22
23 .remote_switch {
24 background-color: @remote_color_dark;
25 }
26
27 .remote_switch:checked, .remote_switch:checked slider {
28 border-color: @remote_color_dark;
29 background-color: @remote_color;
30 }
31
32 #local_up_button, #local_add_dir_button, #local_refresh_button, #upload_button {
1033 color: @local_color;
1134 }
1235
13 #remote_up_button, #remote_add_dir_button, #remote_refresh_button, #refresh_devices_button, #download_button {
36 #remote_up_button, #remote_add_dir_button, #remote_refresh_button, #download_button, #refresh_devices_button {
1437 color: @remote_color
1538 }
1639
1841 color: @disabled_color;
1942 }
2043
21 #autoplay_switch:checked, #autoplay_switch:checked slider {
22 border-color: @local_color_dark;
23 }
24
25 #local_tree_view:selected, #autoplay_switch:checked {
44 #local_tree_view:selected {
2645 background-color: @local_color;
2746 }
2847
2727 <!-- interface-copyright David Garc\303\255a Go\303\261i -->
2828 <object class="GtkListStore" id="devices_list_store">
2929 <columns>
30 <!-- column-name card -->
31 <column type="guint"/>
30 <!-- column-name id -->
31 <column type="gchararray"/>
3232 <!-- column-name name -->
3333 <column type="gchararray"/>
3434 </columns>
5757 <column type="gint"/>
5858 <!-- column-name index -->
5959 <column type="gint"/>
60 <!-- column-name slot -->
61 <column type="gchararray"/>
6062 </columns>
6163 </object>
6264 <object class="GtkMenu" id="local_menu">
7274 </object>
7375 </child>
7476 <child>
75 <object class="GtkSeparatorMenuItem">
77 <object class="GtkSeparatorMenuItem" id="local_play_separator">
7678 <property name="visible">True</property>
7779 <property name="can-focus">False</property>
7880 </object>
146148 <column type="gint"/>
147149 <!-- column-name index -->
148150 <column type="gint"/>
151 <!-- column-name slot -->
152 <column type="gchararray"/>
149153 </columns>
150154 </object>
151155 <object class="GtkMenu" id="remote_menu">
161165 </object>
162166 </child>
163167 <child>
164 <object class="GtkSeparatorMenuItem">
168 <object class="GtkSeparatorMenuItem" id="remote_play_separator">
169 <property name="visible">True</property>
170 <property name="can-focus">False</property>
171 </object>
172 </child>
173 <child>
174 <object class="GtkMenuItem" id="remote_play_menuitem">
175 <property name="visible">True</property>
176 <property name="can-focus">False</property>
177 <property name="label" translatable="yes">Play</property>
178 <property name="use-underline">True</property>
179 </object>
180 </child>
181 <child>
182 <object class="GtkSeparatorMenuItem" id="remote_options_separator">
183 <property name="visible">True</property>
184 <property name="can-focus">False</property>
185 </object>
186 </child>
187 <child>
188 <object class="GtkMenuItem" id="remote_open_menuitem">
189 <property name="visible">True</property>
190 <property name="can-focus">False</property>
191 <property name="label" translatable="yes">Open With External Editor</property>
192 <property name="use-underline">True</property>
193 </object>
194 </child>
195 <child>
196 <object class="GtkMenuItem" id="remote_show_menuitem">
197 <property name="visible">True</property>
198 <property name="can-focus">False</property>
199 <property name="label" translatable="yes">Show in File Manager</property>
200 <property name="use-underline">True</property>
201 </object>
202 </child>
203 <child>
204 <object class="GtkSeparatorMenuItem" id="remote_actions_separator">
165205 <property name="visible">True</property>
166206 <property name="can-focus">False</property>
167207 </object>
382422 <object class="GtkBox">
383423 <property name="visible">True</property>
384424 <property name="can-focus">False</property>
385 <property name="hexpand">True</property>
386 <property name="vexpand">True</property>
387 <property name="orientation">vertical</property>
388 <property name="spacing">6</property>
389 <child>
390 <object class="GtkBox">
391 <property name="visible">True</property>
392 <property name="can-focus">False</property>
393 <property name="hexpand">True</property>
394 <property name="spacing">6</property>
395 <child>
396 <object class="GtkEntry" id="local_dir_entry">
397 <property name="visible">True</property>
398 <property name="can-focus">True</property>
399 <property name="hexpand">True</property>
400 <property name="editable">False</property>
401 </object>
402 <packing>
403 <property name="expand">False</property>
404 <property name="fill">True</property>
405 <property name="position">0</property>
406 </packing>
407 </child>
408 <child>
409 <object class="GtkButton" id="local_up_button">
410 <property name="name">local_up_button</property>
411 <property name="visible">True</property>
412 <property name="can-focus">True</property>
413 <property name="receives-default">True</property>
414 <property name="tooltip-text" translatable="yes">Go to Parent Directory</property>
415 <child>
416 <object class="GtkImage">
417 <property name="visible">True</property>
418 <property name="can-focus">False</property>
419 <property name="icon-name">go-up-symbolic</property>
420 </object>
421 </child>
422 </object>
423 <packing>
424 <property name="expand">False</property>
425 <property name="fill">True</property>
426 <property name="position">1</property>
427 </packing>
428 </child>
429 <child>
430 <object class="GtkButton" id="local_add_dir_button">
431 <property name="name">local_up_button</property>
432 <property name="visible">True</property>
433 <property name="can-focus">True</property>
434 <property name="receives-default">True</property>
435 <property name="tooltip-text" translatable="yes">Add Directory</property>
436 <child>
437 <object class="GtkImage">
438 <property name="visible">True</property>
439 <property name="can-focus">False</property>
440 <property name="icon-name">folder-new-symbolic</property>
441 </object>
442 </child>
443 </object>
444 <packing>
445 <property name="expand">False</property>
446 <property name="fill">True</property>
447 <property name="position">2</property>
448 </packing>
449 </child>
450 <child>
451 <object class="GtkButton" id="local_refresh_button">
452 <property name="name">local_refresh_button</property>
453 <property name="visible">True</property>
454 <property name="can-focus">True</property>
455 <property name="receives-default">True</property>
456 <property name="tooltip-text" translatable="yes">Refresh Directory</property>
457 <child>
458 <object class="GtkImage">
459 <property name="visible">True</property>
460 <property name="can-focus">False</property>
461 <property name="icon-name">view-refresh-symbolic</property>
462 </object>
463 </child>
464 </object>
465 <packing>
466 <property name="expand">False</property>
467 <property name="fill">True</property>
468 <property name="position">3</property>
469 </packing>
470 </child>
471 </object>
472 <packing>
473 <property name="expand">False</property>
474 <property name="fill">True</property>
475 <property name="position">0</property>
476 </packing>
477 </child>
478 <child>
479 <object class="GtkScrolledWindow">
480 <property name="width-request">400</property>
481 <property name="height-request">200</property>
482 <property name="visible">True</property>
483 <property name="can-focus">True</property>
484 <property name="hexpand">True</property>
485 <property name="vexpand">True</property>
486 <property name="shadow-type">in</property>
487 <child>
488 <object class="GtkTreeView" id="local_tree_view">
489 <property name="name">local_tree_view</property>
490 <property name="visible">True</property>
491 <property name="can-focus">True</property>
492 <property name="hexpand">True</property>
493 <property name="vexpand">True</property>
494 <property name="model">local_list_store</property>
495 <property name="search-column">1</property>
496 <child internal-child="selection">
497 <object class="GtkTreeSelection">
498 <property name="mode">multiple</property>
499 </object>
500 </child>
501 <child>
502 <object class="GtkTreeViewColumn">
503 <child>
504 <object class="GtkCellRendererPixbuf"/>
505 <attributes>
506 <attribute name="icon-name">0</attribute>
507 </attributes>
508 </child>
509 </object>
510 </child>
511 <child>
512 <object class="GtkTreeViewColumn">
513 <property name="title" translatable="yes">Name</property>
514 <property name="expand">True</property>
515 <child>
516 <object class="GtkCellRendererText">
517 <property name="ellipsize">middle</property>
518 </object>
519 <attributes>
520 <attribute name="text">1</attribute>
521 </attributes>
522 </child>
523 </object>
524 </child>
525 <child>
526 <object class="GtkTreeViewColumn">
527 <property name="title" translatable="yes">Size</property>
528 <child>
529 <object class="GtkCellRendererText"/>
530 <attributes>
531 <attribute name="text">3</attribute>
532 </attributes>
533 </child>
534 </object>
535 </child>
536 </object>
537 </child>
538 </object>
539 <packing>
540 <property name="expand">False</property>
541 <property name="fill">True</property>
542 <property name="position">1</property>
543 </packing>
544 </child>
545 </object>
546 <packing>
547 <property name="left-attach">0</property>
548 <property name="top-attach">1</property>
549 </packing>
550 </child>
551 <child>
552 <object class="GtkBox" id="remote_box">
553 <property name="visible">True</property>
554 <property name="can-focus">False</property>
555 <property name="hexpand">True</property>
556 <property name="vexpand">True</property>
557 <property name="orientation">vertical</property>
558 <property name="spacing">6</property>
559 <child>
560 <object class="GtkBox">
561 <property name="visible">True</property>
562 <property name="can-focus">False</property>
563 <property name="hexpand">True</property>
564 <property name="spacing">6</property>
565 <child>
566 <object class="GtkEntry" id="remote_dir_entry">
567 <property name="visible">True</property>
568 <property name="can-focus">True</property>
569 <property name="hexpand">True</property>
570 <property name="editable">False</property>
571 </object>
572 <packing>
573 <property name="expand">False</property>
574 <property name="fill">True</property>
575 <property name="position">0</property>
576 </packing>
577 </child>
578 <child>
579 <object class="GtkButton" id="remote_up_button">
580 <property name="name">remote_up_button</property>
581 <property name="visible">True</property>
582 <property name="can-focus">True</property>
583 <property name="receives-default">True</property>
584 <property name="tooltip-text" translatable="yes">Go to Parent Directory</property>
585 <child>
586 <object class="GtkImage">
587 <property name="visible">True</property>
588 <property name="can-focus">False</property>
589 <property name="icon-name">go-up-symbolic</property>
590 </object>
591 </child>
592 </object>
593 <packing>
594 <property name="expand">False</property>
595 <property name="fill">True</property>
596 <property name="position">1</property>
597 </packing>
598 </child>
599 <child>
600 <object class="GtkButton" id="remote_add_dir_button">
601 <property name="name">remote_up_button</property>
602 <property name="visible">True</property>
603 <property name="can-focus">True</property>
604 <property name="receives-default">True</property>
605 <property name="tooltip-text" translatable="yes">Add Directory</property>
606 <child>
607 <object class="GtkImage">
608 <property name="visible">True</property>
609 <property name="can-focus">False</property>
610 <property name="icon-name">folder-new-symbolic</property>
611 </object>
612 </child>
613 </object>
614 <packing>
615 <property name="expand">False</property>
616 <property name="fill">True</property>
617 <property name="position">2</property>
618 </packing>
619 </child>
620 <child>
621 <object class="GtkButton" id="remote_refresh_button">
622 <property name="name">remote_refresh_button</property>
623 <property name="visible">True</property>
624 <property name="can-focus">True</property>
625 <property name="receives-default">True</property>
626 <property name="tooltip-text" translatable="yes">Refresh Directory</property>
627 <child>
628 <object class="GtkImage">
629 <property name="visible">True</property>
630 <property name="can-focus">False</property>
631 <property name="icon-name">view-refresh-symbolic</property>
632 </object>
633 </child>
634 </object>
635 <packing>
636 <property name="expand">False</property>
637 <property name="fill">True</property>
638 <property name="position">3</property>
639 </packing>
640 </child>
641 </object>
642 <packing>
643 <property name="expand">False</property>
644 <property name="fill">True</property>
645 <property name="position">0</property>
646 </packing>
647 </child>
648 <child>
649 <object class="GtkScrolledWindow">
650 <property name="width-request">400</property>
651 <property name="height-request">200</property>
652 <property name="visible">True</property>
653 <property name="can-focus">True</property>
654 <property name="hexpand">True</property>
655 <property name="vexpand">True</property>
656 <property name="shadow-type">in</property>
657 <child>
658 <object class="GtkTreeView" id="remote_tree_view">
659 <property name="name">remote_tree_view</property>
660 <property name="visible">True</property>
661 <property name="can-focus">True</property>
662 <property name="hexpand">True</property>
663 <property name="vexpand">True</property>
664 <property name="model">remote_list_store</property>
665 <property name="search-column">1</property>
666 <child internal-child="selection">
667 <object class="GtkTreeSelection">
668 <property name="mode">multiple</property>
669 </object>
670 </child>
671 <child>
672 <object class="GtkTreeViewColumn">
673 <child>
674 <object class="GtkCellRendererPixbuf"/>
675 <attributes>
676 <attribute name="icon-name">0</attribute>
677 </attributes>
678 </child>
679 </object>
680 </child>
681 <child>
682 <object class="GtkTreeViewColumn" id="remote_tree_view_index_column">
683 <child>
684 <object class="GtkCellRendererText"/>
685 <attributes>
686 <attribute name="text">5</attribute>
687 </attributes>
688 </child>
689 </object>
690 </child>
691 <child>
692 <object class="GtkTreeViewColumn">
693 <property name="title" translatable="yes">Name</property>
694 <property name="expand">True</property>
695 <child>
696 <object class="GtkCellRendererText" id="remote_name_cell_renderer_text">
697 <property name="ellipsize">middle</property>
698 </object>
699 <attributes>
700 <attribute name="text">1</attribute>
701 </attributes>
702 </child>
703 </object>
704 </child>
705 <child>
706 <object class="GtkTreeViewColumn">
707 <property name="title" translatable="yes">Size</property>
708 <child>
709 <object class="GtkCellRendererText"/>
710 <attributes>
711 <attribute name="text">3</attribute>
712 </attributes>
713 </child>
714 </object>
715 </child>
716 </object>
717 </child>
718 </object>
719 <packing>
720 <property name="expand">False</property>
721 <property name="fill">True</property>
722 <property name="position">1</property>
723 </packing>
724 </child>
725 </object>
726 <packing>
727 <property name="left-attach">1</property>
728 <property name="top-attach">1</property>
729 </packing>
730 </child>
731 <child>
732 <object class="GtkBox">
733 <property name="visible">True</property>
734 <property name="can-focus">False</property>
735425 <property name="spacing">6</property>
736426 <child>
737427 <object class="GtkComboBox" id="devices_combo">
826516 <packing>
827517 <property name="left-attach">0</property>
828518 <property name="top-attach">0</property>
519 </packing>
520 </child>
521 <child>
522 <object class="GtkBox" id="remote_box">
523 <property name="visible">True</property>
524 <property name="can-focus">False</property>
525 <property name="hexpand">True</property>
526 <property name="vexpand">True</property>
527 <property name="orientation">vertical</property>
528 <property name="spacing">6</property>
529 <child>
530 <object class="GtkBox">
531 <property name="visible">True</property>
532 <property name="can-focus">False</property>
533 <property name="hexpand">True</property>
534 <property name="spacing">6</property>
535 <child>
536 <object class="GtkEntry" id="remote_dir_entry">
537 <property name="visible">True</property>
538 <property name="can-focus">True</property>
539 <property name="hexpand">True</property>
540 <property name="editable">False</property>
541 </object>
542 <packing>
543 <property name="expand">False</property>
544 <property name="fill">True</property>
545 <property name="position">0</property>
546 </packing>
547 </child>
548 <child>
549 <object class="GtkButton" id="remote_up_button">
550 <property name="name">remote_up_button</property>
551 <property name="visible">True</property>
552 <property name="can-focus">True</property>
553 <property name="receives-default">True</property>
554 <property name="tooltip-text" translatable="yes">Go to Parent Directory</property>
555 <child>
556 <object class="GtkImage">
557 <property name="visible">True</property>
558 <property name="can-focus">False</property>
559 <property name="icon-name">go-up-symbolic</property>
560 </object>
561 </child>
562 </object>
563 <packing>
564 <property name="expand">False</property>
565 <property name="fill">True</property>
566 <property name="position">1</property>
567 </packing>
568 </child>
569 <child>
570 <object class="GtkButton" id="remote_add_dir_button">
571 <property name="name">remote_up_button</property>
572 <property name="visible">True</property>
573 <property name="can-focus">True</property>
574 <property name="receives-default">True</property>
575 <property name="tooltip-text" translatable="yes">Add Directory</property>
576 <child>
577 <object class="GtkImage">
578 <property name="visible">True</property>
579 <property name="can-focus">False</property>
580 <property name="icon-name">folder-new-symbolic</property>
581 </object>
582 </child>
583 </object>
584 <packing>
585 <property name="expand">False</property>
586 <property name="fill">True</property>
587 <property name="position">2</property>
588 </packing>
589 </child>
590 <child>
591 <object class="GtkButton" id="remote_refresh_button">
592 <property name="name">remote_refresh_button</property>
593 <property name="visible">True</property>
594 <property name="can-focus">True</property>
595 <property name="receives-default">True</property>
596 <property name="tooltip-text" translatable="yes">Refresh Directory</property>
597 <child>
598 <object class="GtkImage">
599 <property name="visible">True</property>
600 <property name="can-focus">False</property>
601 <property name="icon-name">view-refresh-symbolic</property>
602 </object>
603 </child>
604 </object>
605 <packing>
606 <property name="expand">False</property>
607 <property name="fill">True</property>
608 <property name="position">3</property>
609 </packing>
610 </child>
611 </object>
612 <packing>
613 <property name="expand">False</property>
614 <property name="fill">True</property>
615 <property name="position">0</property>
616 </packing>
617 </child>
618 <child>
619 <object class="GtkStack" id="remote_stack">
620 <property name="visible">True</property>
621 <property name="can-focus">False</property>
622 <child>
623 <object class="GtkScrolledWindow">
624 <property name="width-request">400</property>
625 <property name="height-request">200</property>
626 <property name="visible">True</property>
627 <property name="can-focus">True</property>
628 <property name="hexpand">True</property>
629 <property name="vexpand">True</property>
630 <property name="shadow-type">in</property>
631 <child>
632 <object class="GtkTreeView" id="remote_tree_view">
633 <property name="name">remote_tree_view</property>
634 <property name="visible">True</property>
635 <property name="can-focus">True</property>
636 <property name="hexpand">True</property>
637 <property name="vexpand">True</property>
638 <property name="model">remote_list_store</property>
639 <property name="search-column">1</property>
640 <child internal-child="selection">
641 <object class="GtkTreeSelection">
642 <property name="mode">multiple</property>
643 </object>
644 </child>
645 <child>
646 <object class="GtkTreeViewColumn">
647 <child>
648 <object class="GtkCellRendererPixbuf"/>
649 <attributes>
650 <attribute name="icon-name">0</attribute>
651 </attributes>
652 </child>
653 </object>
654 </child>
655 <child>
656 <object class="GtkTreeViewColumn" id="remote_tree_view_index_column">
657 <child>
658 <object class="GtkCellRendererText"/>
659 <attributes>
660 <attribute name="text">5</attribute>
661 </attributes>
662 </child>
663 </object>
664 </child>
665 <child>
666 <object class="GtkTreeViewColumn" id="remote_tree_view_slot_column">
667 <child>
668 <object class="GtkCellRendererText"/>
669 <attributes>
670 <attribute name="text">6</attribute>
671 </attributes>
672 </child>
673 </object>
674 </child>
675 <child>
676 <object class="GtkTreeViewColumn">
677 <property name="title" translatable="yes">Name</property>
678 <property name="expand">True</property>
679 <child>
680 <object class="GtkCellRendererText" id="remote_name_cell_renderer_text">
681 <property name="ellipsize">middle</property>
682 </object>
683 <attributes>
684 <attribute name="text">1</attribute>
685 </attributes>
686 </child>
687 </object>
688 </child>
689 <child>
690 <object class="GtkTreeViewColumn">
691 <property name="title" translatable="yes">Size</property>
692 <child>
693 <object class="GtkCellRendererText"/>
694 <attributes>
695 <attribute name="text">3</attribute>
696 </attributes>
697 </child>
698 </object>
699 </child>
700 </object>
701 </child>
702 </object>
703 <packing>
704 <property name="name">list</property>
705 </packing>
706 </child>
707 <child>
708 <object class="GtkFrame">
709 <property name="visible">True</property>
710 <property name="can-focus">False</property>
711 <property name="label-xalign">0</property>
712 <child>
713 <object class="GtkAlignment">
714 <property name="visible">True</property>
715 <property name="can-focus">False</property>
716 <property name="left-padding">12</property>
717 <child>
718 <object class="GtkSpinner" id="remote_spinner">
719 <property name="visible">True</property>
720 <property name="can-focus">False</property>
721 </object>
722 </child>
723 </object>
724 </child>
725 <child type="label_item">
726 <placeholder/>
727 </child>
728 </object>
729 <packing>
730 <property name="name">spinner</property>
731 <property name="position">1</property>
732 </packing>
733 </child>
734 </object>
735 <packing>
736 <property name="expand">False</property>
737 <property name="fill">True</property>
738 <property name="position">1</property>
739 </packing>
740 </child>
741 </object>
742 <packing>
743 <property name="left-attach">1</property>
744 <property name="top-attach">1</property>
745 </packing>
746 </child>
747 <child>
748 <object class="GtkBox" id="local_box">
749 <property name="visible">True</property>
750 <property name="can-focus">False</property>
751 <property name="hexpand">True</property>
752 <property name="vexpand">True</property>
753 <property name="orientation">vertical</property>
754 <property name="spacing">6</property>
755 <child>
756 <object class="GtkBox">
757 <property name="visible">True</property>
758 <property name="can-focus">False</property>
759 <property name="hexpand">True</property>
760 <property name="spacing">6</property>
761 <child>
762 <object class="GtkEntry" id="local_dir_entry">
763 <property name="visible">True</property>
764 <property name="can-focus">True</property>
765 <property name="hexpand">True</property>
766 <property name="editable">False</property>
767 </object>
768 <packing>
769 <property name="expand">False</property>
770 <property name="fill">True</property>
771 <property name="position">0</property>
772 </packing>
773 </child>
774 <child>
775 <object class="GtkButton" id="local_up_button">
776 <property name="name">local_up_button</property>
777 <property name="visible">True</property>
778 <property name="can-focus">True</property>
779 <property name="receives-default">True</property>
780 <property name="tooltip-text" translatable="yes">Go to Parent Directory</property>
781 <child>
782 <object class="GtkImage">
783 <property name="visible">True</property>
784 <property name="can-focus">False</property>
785 <property name="icon-name">go-up-symbolic</property>
786 </object>
787 </child>
788 </object>
789 <packing>
790 <property name="expand">False</property>
791 <property name="fill">True</property>
792 <property name="position">1</property>
793 </packing>
794 </child>
795 <child>
796 <object class="GtkButton" id="local_add_dir_button">
797 <property name="name">local_up_button</property>
798 <property name="visible">True</property>
799 <property name="can-focus">True</property>
800 <property name="receives-default">True</property>
801 <property name="tooltip-text" translatable="yes">Add Directory</property>
802 <child>
803 <object class="GtkImage">
804 <property name="visible">True</property>
805 <property name="can-focus">False</property>
806 <property name="icon-name">folder-new-symbolic</property>
807 </object>
808 </child>
809 </object>
810 <packing>
811 <property name="expand">False</property>
812 <property name="fill">True</property>
813 <property name="position">2</property>
814 </packing>
815 </child>
816 <child>
817 <object class="GtkButton" id="local_refresh_button">
818 <property name="name">local_refresh_button</property>
819 <property name="visible">True</property>
820 <property name="can-focus">True</property>
821 <property name="receives-default">True</property>
822 <property name="tooltip-text" translatable="yes">Refresh Directory</property>
823 <child>
824 <object class="GtkImage">
825 <property name="visible">True</property>
826 <property name="can-focus">False</property>
827 <property name="icon-name">view-refresh-symbolic</property>
828 </object>
829 </child>
830 </object>
831 <packing>
832 <property name="expand">False</property>
833 <property name="fill">True</property>
834 <property name="position">3</property>
835 </packing>
836 </child>
837 </object>
838 <packing>
839 <property name="expand">False</property>
840 <property name="fill">True</property>
841 <property name="position">0</property>
842 </packing>
843 </child>
844 <child>
845 <object class="GtkStack" id="local_stack">
846 <property name="visible">True</property>
847 <property name="can-focus">False</property>
848 <child>
849 <object class="GtkScrolledWindow">
850 <property name="width-request">400</property>
851 <property name="height-request">200</property>
852 <property name="visible">True</property>
853 <property name="can-focus">True</property>
854 <property name="hexpand">True</property>
855 <property name="vexpand">True</property>
856 <property name="shadow-type">in</property>
857 <child>
858 <object class="GtkTreeView" id="local_tree_view">
859 <property name="name">local_tree_view</property>
860 <property name="visible">True</property>
861 <property name="can-focus">True</property>
862 <property name="hexpand">True</property>
863 <property name="vexpand">True</property>
864 <property name="model">local_list_store</property>
865 <property name="search-column">1</property>
866 <child internal-child="selection">
867 <object class="GtkTreeSelection">
868 <property name="mode">multiple</property>
869 </object>
870 </child>
871 <child>
872 <object class="GtkTreeViewColumn">
873 <child>
874 <object class="GtkCellRendererPixbuf"/>
875 <attributes>
876 <attribute name="icon-name">0</attribute>
877 </attributes>
878 </child>
879 </object>
880 </child>
881 <child>
882 <object class="GtkTreeViewColumn">
883 <property name="title" translatable="yes">Name</property>
884 <property name="expand">True</property>
885 <child>
886 <object class="GtkCellRendererText">
887 <property name="ellipsize">middle</property>
888 </object>
889 <attributes>
890 <attribute name="text">1</attribute>
891 </attributes>
892 </child>
893 </object>
894 </child>
895 <child>
896 <object class="GtkTreeViewColumn">
897 <property name="title" translatable="yes">Size</property>
898 <child>
899 <object class="GtkCellRendererText"/>
900 <attributes>
901 <attribute name="text">3</attribute>
902 </attributes>
903 </child>
904 </object>
905 </child>
906 </object>
907 </child>
908 </object>
909 <packing>
910 <property name="name">list</property>
911 </packing>
912 </child>
913 <child>
914 <object class="GtkFrame">
915 <property name="visible">True</property>
916 <property name="can-focus">False</property>
917 <property name="label-xalign">0</property>
918 <child>
919 <object class="GtkAlignment">
920 <property name="visible">True</property>
921 <property name="can-focus">False</property>
922 <property name="left-padding">12</property>
923 <child>
924 <object class="GtkSpinner" id="local_spinner">
925 <property name="visible">True</property>
926 <property name="can-focus">False</property>
927 </object>
928 </child>
929 </object>
930 </child>
931 <child type="label_item">
932 <placeholder/>
933 </child>
934 </object>
935 <packing>
936 <property name="name">spinner</property>
937 <property name="position">1</property>
938 </packing>
939 </child>
940 </object>
941 <packing>
942 <property name="expand">False</property>
943 <property name="fill">True</property>
944 <property name="position">1</property>
945 </packing>
946 </child>
947 </object>
948 <packing>
949 <property name="left-attach">0</property>
950 <property name="top-attach">1</property>
829951 </packing>
830952 </child>
831953 </object>
847969 <property name="visible">True</property>
848970 <property name="can-focus">False</property>
849971 <property name="halign">start</property>
850 <property name="valign">center</property>
972 <property name="valign">start</property>
851973 <property name="orientation">vertical</property>
852974 <property name="spacing">12</property>
853975 <child>
8891011 <property name="expand">False</property>
8901012 <property name="fill">True</property>
8911013 <property name="position">0</property>
1014 </packing>
1015 </child>
1016 <child>
1017 <object class="GtkBox">
1018 <property name="visible">True</property>
1019 <property name="can-focus">False</property>
1020 <property name="spacing">6</property>
1021 <child>
1022 <object class="GtkSwitch" id="mix_switch">
1023 <property name="name">autoplay_switch</property>
1024 <property name="visible">True</property>
1025 <property name="can-focus">True</property>
1026 <property name="halign">start</property>
1027 <property name="valign">center</property>
1028 <property name="active">True</property>
1029 </object>
1030 <packing>
1031 <property name="expand">False</property>
1032 <property name="fill">True</property>
1033 <property name="position">0</property>
1034 </packing>
1035 </child>
1036 <child>
1037 <object class="GtkLabel">
1038 <property name="visible">True</property>
1039 <property name="can-focus">False</property>
1040 <property name="tooltip-text" translatable="yes">Playing mix depends on the destination channels</property>
1041 <property name="valign">center</property>
1042 <property name="label" translatable="yes" comments="It is recommended to split the text in two lines if it is too long">Mix depending
1043 on destination</property>
1044 <property name="wrap">True</property>
1045 </object>
1046 <packing>
1047 <property name="expand">False</property>
1048 <property name="fill">True</property>
1049 <property name="position">1</property>
1050 </packing>
1051 </child>
1052 </object>
1053 <packing>
1054 <property name="expand">False</property>
1055 <property name="fill">True</property>
1056 <property name="position">1</property>
8921057 </packing>
8931058 </child>
8941059 <child>
10071172 <property name="relief">none</property>
10081173 </object>
10091174 </child>
1010 <style>
1011 <class name="local"/>
1012 </style>
10131175 </object>
10141176 <packing>
10151177 <property name="expand">False</property>
10211183 <packing>
10221184 <property name="expand">False</property>
10231185 <property name="fill">True</property>
1024 <property name="position">1</property>
1186 <property name="position">2</property>
10251187 </packing>
10261188 </child>
10271189 </object>
10351197 <object class="GtkFrame">
10361198 <property name="visible">True</property>
10371199 <property name="can-focus">False</property>
1200 <property name="vexpand">True</property>
10381201 <property name="label-xalign">0</property>
10391202 <child>
10401203 <object class="GtkDrawingArea" id="waveform_draw_area">
10411204 <property name="visible">True</property>
10421205 <property name="can-focus">False</property>
10431206 <property name="hexpand">True</property>
1044 <style>
1045 <class name="local"/>
1046 <class name="waveform"/>
1047 </style>
10481207 </object>
10491208 </child>
10501209 <child type="label_item">
10551214 <property name="expand">True</property>
10561215 <property name="fill">True</property>
10571216 <property name="position">1</property>
1217 </packing>
1218 </child>
1219 <child>
1220 <!-- n-columns=2 n-rows=5 -->
1221 <object class="GtkGrid" id="sample_info_box">
1222 <property name="visible">True</property>
1223 <property name="can-focus">False</property>
1224 <property name="row-spacing">6</property>
1225 <property name="column-spacing">6</property>
1226 <child>
1227 <object class="GtkLabel">
1228 <property name="visible">True</property>
1229 <property name="can-focus">False</property>
1230 <property name="halign">end</property>
1231 <property name="valign">center</property>
1232 <property name="label" translatable="yes">Samples</property>
1233 <property name="wrap">True</property>
1234 </object>
1235 <packing>
1236 <property name="left-attach">0</property>
1237 <property name="top-attach">0</property>
1238 </packing>
1239 </child>
1240 <child>
1241 <object class="GtkLabel">
1242 <property name="visible">True</property>
1243 <property name="can-focus">False</property>
1244 <property name="halign">end</property>
1245 <property name="valign">center</property>
1246 <property name="label" translatable="yes">Channels</property>
1247 <property name="wrap">True</property>
1248 </object>
1249 <packing>
1250 <property name="left-attach">0</property>
1251 <property name="top-attach">3</property>
1252 </packing>
1253 </child>
1254 <child>
1255 <object class="GtkLabel">
1256 <property name="visible">True</property>
1257 <property name="can-focus">False</property>
1258 <property name="halign">end</property>
1259 <property name="valign">center</property>
1260 <property name="label" translatable="yes">Sample rate</property>
1261 <property name="wrap">True</property>
1262 </object>
1263 <packing>
1264 <property name="left-attach">0</property>
1265 <property name="top-attach">2</property>
1266 </packing>
1267 </child>
1268 <child>
1269 <object class="GtkLabel">
1270 <property name="visible">True</property>
1271 <property name="can-focus">False</property>
1272 <property name="halign">end</property>
1273 <property name="valign">center</property>
1274 <property name="label" translatable="yes">Bit depth</property>
1275 <property name="wrap">True</property>
1276 </object>
1277 <packing>
1278 <property name="left-attach">0</property>
1279 <property name="top-attach">4</property>
1280 </packing>
1281 </child>
1282 <child>
1283 <object class="GtkLabel" id="sample_length">
1284 <property name="visible">True</property>
1285 <property name="can-focus">False</property>
1286 <property name="halign">start</property>
1287 </object>
1288 <packing>
1289 <property name="left-attach">1</property>
1290 <property name="top-attach">0</property>
1291 </packing>
1292 </child>
1293 <child>
1294 <object class="GtkLabel" id="sample_channels">
1295 <property name="visible">True</property>
1296 <property name="can-focus">False</property>
1297 <property name="halign">start</property>
1298 </object>
1299 <packing>
1300 <property name="left-attach">1</property>
1301 <property name="top-attach">3</property>
1302 </packing>
1303 </child>
1304 <child>
1305 <object class="GtkLabel" id="sample_samplerate">
1306 <property name="visible">True</property>
1307 <property name="can-focus">False</property>
1308 <property name="halign">start</property>
1309 </object>
1310 <packing>
1311 <property name="left-attach">1</property>
1312 <property name="top-attach">2</property>
1313 </packing>
1314 </child>
1315 <child>
1316 <object class="GtkLabel" id="sample_bitdepth">
1317 <property name="visible">True</property>
1318 <property name="can-focus">False</property>
1319 <property name="halign">start</property>
1320 </object>
1321 <packing>
1322 <property name="left-attach">1</property>
1323 <property name="top-attach">4</property>
1324 </packing>
1325 </child>
1326 <child>
1327 <object class="GtkLabel">
1328 <property name="visible">True</property>
1329 <property name="can-focus">False</property>
1330 <property name="halign">end</property>
1331 <property name="valign">center</property>
1332 <property name="label" translatable="yes">Duration</property>
1333 <property name="wrap">True</property>
1334 </object>
1335 <packing>
1336 <property name="left-attach">0</property>
1337 <property name="top-attach">1</property>
1338 </packing>
1339 </child>
1340 <child>
1341 <object class="GtkLabel" id="sample_duration">
1342 <property name="visible">True</property>
1343 <property name="can-focus">False</property>
1344 <property name="halign">start</property>
1345 </object>
1346 <packing>
1347 <property name="left-attach">1</property>
1348 <property name="top-attach">1</property>
1349 </packing>
1350 </child>
1351 </object>
1352 <packing>
1353 <property name="expand">False</property>
1354 <property name="fill">True</property>
1355 <property name="position">2</property>
10581356 </packing>
10591357 </child>
10601358 </object>
13121610 <property name="resizable">False</property>
13131611 <property name="modal">True</property>
13141612 <property name="type-hint">dialog</property>
1613 <property name="deletable">False</property>
13151614 <property name="transient-for">main_window</property>
13161615 <child internal-child="vbox">
13171616 <object class="GtkBox">
13871686 <property name="can-focus">True</property>
13881687 <property name="is-focus">True</property>
13891688 <property name="hexpand">True</property>
1390 <property name="max-length">32</property>
13911689 <property name="activates-default">True</property>
13921690 <property name="input-purpose">alpha</property>
13931691 </object>
14121710 <property name="resizable">False</property>
14131711 <property name="modal">True</property>
14141712 <property name="type-hint">dialog</property>
1713 <property name="deletable">False</property>
14151714 <property name="transient-for">main_window</property>
14161715 <child internal-child="vbox">
14171716 <object class="GtkBox">
00 PKG_CONFIG ?= pkg-config
11
2 GUI_LIBS = alsa gtk+-3.0 libpulse libpulse-mainloop-glib zlib json-glib-1.0 libzip
32 CLI_LIBS = alsa glib-2.0 zlib json-glib-1.0 libzip
3 GUI_LIBS = $(CLI_LIBS) gtk+-3.0 libpulse libpulse-mainloop-glib
44
55 elektroid_CFLAGS = -I$(top_srcdir)/src `$(PKG_CONFIG) --cflags $(GUI_LIBS)` $(SNDFILE_CFLAGS) $(SAMPLERATE_CFLAGS) -D_GNU_SOURCE
66 elektroid_LDFLAGS = `$(PKG_CONFIG) --libs $(GUI_LIBS)` $(SNDFILE_LIBS) $(SAMPLERATE_LIBS)
1313 bin_PROGRAMS = elektroid elektroid-cli
1414 endif
1515
16 elektroid_SOURCES = audio.c audio.h browser.c browser.h connector.c connector.h elektroid.c sample.c sample.h utils.c utils.h notifier.c notifier.h local.c local.h preferences.c preferences.h utils.h package.c package.h
17 elektroid_cli_SOURCES = connector.c connector.h elektroid-cli.c sample.c sample.h utils.c utils.h package.c package.h
16 elektroid_common_sources = local.c local.h connector.c connector.h \
17 sample.c sample.h utils.c utils.h backend.c backend.h \
18 connectors/common.c connectors/common.h \
19 connectors/elektron.c connectors/elektron.h connectors/package.c connectors/package.h \
20 connectors/microbrute.c connectors/microbrute.h \
21 connectors/cz.c connectors/cz.h \
22 connectors/sds.c connectors/sds.h \
23 connectors/efactor.c connectors/efactor.h
24
25 elektroid_cli_SOURCES = $(elektroid_common_sources) elektroid-cli.c
26
27 elektroid_SOURCES = $(elektroid_common_sources) audio.c audio.h \
28 browser.c browser.h notifier.c notifier.h \
29 preferences.c preferences.h elektroid.c
1830
1931 SNDFILE_CFLAGS = @SNDFILE_CFLAGS@
2032 SNDFILE_LIBS = @SNDFILE_LIBS@
0 # Makefile.in generated by automake 1.16.3 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994-2020 Free Software Foundation, Inc.
4
5 # This Makefile.in is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 @SET_MAKE@
15
16 VPATH = @srcdir@
17 am__is_gnu_make = { \
18 if test -z '$(MAKELEVEL)'; then \
19 false; \
20 elif test -n '$(MAKE_HOST)'; then \
21 true; \
22 elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
23 true; \
24 else \
25 false; \
26 fi; \
27 }
28 am__make_running_with_option = \
29 case $${target_option-} in \
30 ?) ;; \
31 *) echo "am__make_running_with_option: internal error: invalid" \
32 "target option '$${target_option-}' specified" >&2; \
33 exit 1;; \
34 esac; \
35 has_opt=no; \
36 sane_makeflags=$$MAKEFLAGS; \
37 if $(am__is_gnu_make); then \
38 sane_makeflags=$$MFLAGS; \
39 else \
40 case $$MAKEFLAGS in \
41 *\\[\ \ ]*) \
42 bs=\\; \
43 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
44 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
45 esac; \
46 fi; \
47 skip_next=no; \
48 strip_trailopt () \
49 { \
50 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
51 }; \
52 for flg in $$sane_makeflags; do \
53 test $$skip_next = yes && { skip_next=no; continue; }; \
54 case $$flg in \
55 *=*|--*) continue;; \
56 -*I) strip_trailopt 'I'; skip_next=yes;; \
57 -*I?*) strip_trailopt 'I';; \
58 -*O) strip_trailopt 'O'; skip_next=yes;; \
59 -*O?*) strip_trailopt 'O';; \
60 -*l) strip_trailopt 'l'; skip_next=yes;; \
61 -*l?*) strip_trailopt 'l';; \
62 -[dEDm]) skip_next=yes;; \
63 -[JT]) skip_next=yes;; \
64 esac; \
65 case $$flg in \
66 *$$target_option*) has_opt=yes; break;; \
67 esac; \
68 done; \
69 test $$has_opt = yes
70 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
71 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
72 pkgdatadir = $(datadir)/@PACKAGE@
73 pkgincludedir = $(includedir)/@PACKAGE@
74 pkglibdir = $(libdir)/@PACKAGE@
75 pkglibexecdir = $(libexecdir)/@PACKAGE@
76 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
77 install_sh_DATA = $(install_sh) -c -m 644
78 install_sh_PROGRAM = $(install_sh) -c
79 install_sh_SCRIPT = $(install_sh) -c
80 INSTALL_HEADER = $(INSTALL_DATA)
81 transform = $(program_transform_name)
82 NORMAL_INSTALL = :
83 PRE_INSTALL = :
84 POST_INSTALL = :
85 NORMAL_UNINSTALL = :
86 PRE_UNINSTALL = :
87 POST_UNINSTALL = :
88 build_triplet = @build@
89 host_triplet = @host@
90 @CLI_ONLY_FALSE@bin_PROGRAMS = elektroid$(EXEEXT) \
91 @CLI_ONLY_FALSE@ elektroid-cli$(EXEEXT)
92 @CLI_ONLY_TRUE@bin_PROGRAMS = elektroid-cli$(EXEEXT)
93 subdir = src
94 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
95 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
96 $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \
97 $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
98 $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
99 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
100 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
101 $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
102 $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac
103 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
104 $(ACLOCAL_M4)
105 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
106 mkinstalldirs = $(install_sh) -d
107 CONFIG_HEADER = $(top_builddir)/config.h
108 CONFIG_CLEAN_FILES =
109 CONFIG_CLEAN_VPATH_FILES =
110 am__installdirs = "$(DESTDIR)$(bindir)"
111 PROGRAMS = $(bin_PROGRAMS)
112 am__dirstamp = $(am__leading_dot)dirstamp
113 am__objects_1 = elektroid-local.$(OBJEXT) \
114 elektroid-connector.$(OBJEXT) elektroid-sample.$(OBJEXT) \
115 elektroid-utils.$(OBJEXT) elektroid-backend.$(OBJEXT) \
116 connectors/elektroid-common.$(OBJEXT) \
117 connectors/elektroid-elektron.$(OBJEXT) \
118 connectors/elektroid-package.$(OBJEXT) \
119 connectors/elektroid-microbrute.$(OBJEXT) \
120 connectors/elektroid-cz.$(OBJEXT) \
121 connectors/elektroid-sds.$(OBJEXT) \
122 connectors/elektroid-efactor.$(OBJEXT)
123 am_elektroid_OBJECTS = $(am__objects_1) elektroid-audio.$(OBJEXT) \
124 elektroid-browser.$(OBJEXT) elektroid-notifier.$(OBJEXT) \
125 elektroid-preferences.$(OBJEXT) elektroid-elektroid.$(OBJEXT)
126 elektroid_OBJECTS = $(am_elektroid_OBJECTS)
127 elektroid_LDADD = $(LDADD)
128 AM_V_lt = $(am__v_lt_@AM_V@)
129 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
130 am__v_lt_0 = --silent
131 am__v_lt_1 =
132 elektroid_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
133 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(elektroid_CFLAGS) \
134 $(CFLAGS) $(elektroid_LDFLAGS) $(LDFLAGS) -o $@
135 am__objects_2 = elektroid_cli-local.$(OBJEXT) \
136 elektroid_cli-connector.$(OBJEXT) \
137 elektroid_cli-sample.$(OBJEXT) elektroid_cli-utils.$(OBJEXT) \
138 elektroid_cli-backend.$(OBJEXT) \
139 connectors/elektroid_cli-common.$(OBJEXT) \
140 connectors/elektroid_cli-elektron.$(OBJEXT) \
141 connectors/elektroid_cli-package.$(OBJEXT) \
142 connectors/elektroid_cli-microbrute.$(OBJEXT) \
143 connectors/elektroid_cli-cz.$(OBJEXT) \
144 connectors/elektroid_cli-sds.$(OBJEXT) \
145 connectors/elektroid_cli-efactor.$(OBJEXT)
146 am_elektroid_cli_OBJECTS = $(am__objects_2) \
147 elektroid_cli-elektroid-cli.$(OBJEXT)
148 elektroid_cli_OBJECTS = $(am_elektroid_cli_OBJECTS)
149 elektroid_cli_LDADD = $(LDADD)
150 elektroid_cli_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
151 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(elektroid_cli_CFLAGS) \
152 $(CFLAGS) $(elektroid_cli_LDFLAGS) $(LDFLAGS) -o $@
153 AM_V_P = $(am__v_P_@AM_V@)
154 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
155 am__v_P_0 = false
156 am__v_P_1 = :
157 AM_V_GEN = $(am__v_GEN_@AM_V@)
158 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
159 am__v_GEN_0 = @echo " GEN " $@;
160 am__v_GEN_1 =
161 AM_V_at = $(am__v_at_@AM_V@)
162 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
163 am__v_at_0 = @
164 am__v_at_1 =
165 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
166 depcomp = $(SHELL) $(top_srcdir)/depcomp
167 am__maybe_remake_depfiles = depfiles
168 am__depfiles_remade = ./$(DEPDIR)/elektroid-audio.Po \
169 ./$(DEPDIR)/elektroid-backend.Po \
170 ./$(DEPDIR)/elektroid-browser.Po \
171 ./$(DEPDIR)/elektroid-connector.Po \
172 ./$(DEPDIR)/elektroid-elektroid.Po \
173 ./$(DEPDIR)/elektroid-local.Po \
174 ./$(DEPDIR)/elektroid-notifier.Po \
175 ./$(DEPDIR)/elektroid-preferences.Po \
176 ./$(DEPDIR)/elektroid-sample.Po ./$(DEPDIR)/elektroid-utils.Po \
177 ./$(DEPDIR)/elektroid_cli-backend.Po \
178 ./$(DEPDIR)/elektroid_cli-connector.Po \
179 ./$(DEPDIR)/elektroid_cli-elektroid-cli.Po \
180 ./$(DEPDIR)/elektroid_cli-local.Po \
181 ./$(DEPDIR)/elektroid_cli-sample.Po \
182 ./$(DEPDIR)/elektroid_cli-utils.Po \
183 connectors/$(DEPDIR)/elektroid-common.Po \
184 connectors/$(DEPDIR)/elektroid-cz.Po \
185 connectors/$(DEPDIR)/elektroid-efactor.Po \
186 connectors/$(DEPDIR)/elektroid-elektron.Po \
187 connectors/$(DEPDIR)/elektroid-microbrute.Po \
188 connectors/$(DEPDIR)/elektroid-package.Po \
189 connectors/$(DEPDIR)/elektroid-sds.Po \
190 connectors/$(DEPDIR)/elektroid_cli-common.Po \
191 connectors/$(DEPDIR)/elektroid_cli-cz.Po \
192 connectors/$(DEPDIR)/elektroid_cli-efactor.Po \
193 connectors/$(DEPDIR)/elektroid_cli-elektron.Po \
194 connectors/$(DEPDIR)/elektroid_cli-microbrute.Po \
195 connectors/$(DEPDIR)/elektroid_cli-package.Po \
196 connectors/$(DEPDIR)/elektroid_cli-sds.Po
197 am__mv = mv -f
198 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
199 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
200 LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
201 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
202 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
203 $(AM_CFLAGS) $(CFLAGS)
204 AM_V_CC = $(am__v_CC_@AM_V@)
205 am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
206 am__v_CC_0 = @echo " CC " $@;
207 am__v_CC_1 =
208 CCLD = $(CC)
209 LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
210 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
211 $(AM_LDFLAGS) $(LDFLAGS) -o $@
212 AM_V_CCLD = $(am__v_CCLD_@AM_V@)
213 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
214 am__v_CCLD_0 = @echo " CCLD " $@;
215 am__v_CCLD_1 =
216 SOURCES = $(elektroid_SOURCES) $(elektroid_cli_SOURCES)
217 DIST_SOURCES = $(elektroid_SOURCES) $(elektroid_cli_SOURCES)
218 am__can_run_installinfo = \
219 case $$AM_UPDATE_INFO_DIR in \
220 n|no|NO) false;; \
221 *) (install-info --version) >/dev/null 2>&1;; \
222 esac
223 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
224 # Read a list of newline-separated strings from the standard input,
225 # and print each of them once, without duplicates. Input order is
226 # *not* preserved.
227 am__uniquify_input = $(AWK) '\
228 BEGIN { nonempty = 0; } \
229 { items[$$0] = 1; nonempty = 1; } \
230 END { if (nonempty) { for (i in items) print i; }; } \
231 '
232 # Make sure the list of sources is unique. This is necessary because,
233 # e.g., the same source file might be shared among _SOURCES variables
234 # for different programs/libraries.
235 am__define_uniq_tagged_files = \
236 list='$(am__tagged_files)'; \
237 unique=`for i in $$list; do \
238 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
239 done | $(am__uniquify_input)`
240 ETAGS = etags
241 CTAGS = ctags
242 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
243 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
244 ACLOCAL = @ACLOCAL@
245 ALSA_CFLAGS = @ALSA_CFLAGS@
246 ALSA_LIBS = @ALSA_LIBS@
247 AMTAR = @AMTAR@
248 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
249 AR = @AR@
250 AUTOCONF = @AUTOCONF@
251 AUTOHEADER = @AUTOHEADER@
252 AUTOMAKE = @AUTOMAKE@
253 AWK = @AWK@
254 CC = @CC@
255 CCDEPMODE = @CCDEPMODE@
256 CFLAGS = @CFLAGS@
257 CPP = @CPP@
258 CPPFLAGS = @CPPFLAGS@
259 CYGPATH_W = @CYGPATH_W@
260 DEFS = @DEFS@
261 DEPDIR = @DEPDIR@
262 DLLTOOL = @DLLTOOL@
263 DSYMUTIL = @DSYMUTIL@
264 DUMPBIN = @DUMPBIN@
265 ECHO_C = @ECHO_C@
266 ECHO_N = @ECHO_N@
267 ECHO_T = @ECHO_T@
268 EGREP = @EGREP@
269 EXEEXT = @EXEEXT@
270 FGREP = @FGREP@
271 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
272 GMSGFMT = @GMSGFMT@
273 GMSGFMT_015 = @GMSGFMT_015@
274 GREP = @GREP@
275 GTK_CFLAGS = @GTK_CFLAGS@
276 GTK_LIBS = @GTK_LIBS@
277 INSTALL = @INSTALL@
278 INSTALL_DATA = @INSTALL_DATA@
279 INSTALL_PROGRAM = @INSTALL_PROGRAM@
280 INSTALL_SCRIPT = @INSTALL_SCRIPT@
281 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
282 INTLLIBS = @INTLLIBS@
283 INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
284 LD = @LD@
285 LDFLAGS = @LDFLAGS@
286 LIBICONV = @LIBICONV@
287 LIBINTL = @LIBINTL@
288 LIBOBJS = @LIBOBJS@
289 LIBS = @LIBS@
290 LIBTOOL = @LIBTOOL@
291 LIPO = @LIPO@
292 LN_S = @LN_S@
293 LTLIBICONV = @LTLIBICONV@
294 LTLIBINTL = @LTLIBINTL@
295 LTLIBOBJS = @LTLIBOBJS@
296 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
297 MAKEINFO = @MAKEINFO@
298 MANIFEST_TOOL = @MANIFEST_TOOL@
299 MKDIR_P = @MKDIR_P@
300 MSGFMT = @MSGFMT@
301 MSGFMT_015 = @MSGFMT_015@
302 MSGMERGE = @MSGMERGE@
303 NM = @NM@
304 NMEDIT = @NMEDIT@
305 OBJDUMP = @OBJDUMP@
306 OBJEXT = @OBJEXT@
307 OTOOL = @OTOOL@
308 OTOOL64 = @OTOOL64@
309 PACKAGE = @PACKAGE@
310 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
311 PACKAGE_NAME = @PACKAGE_NAME@
312 PACKAGE_STRING = @PACKAGE_STRING@
313 PACKAGE_TARNAME = @PACKAGE_TARNAME@
314 PACKAGE_URL = @PACKAGE_URL@
315 PACKAGE_VERSION = @PACKAGE_VERSION@
316 PATH_SEPARATOR = @PATH_SEPARATOR@
317 PKG_CONFIG = @PKG_CONFIG@
318 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
319 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
320 POSUB = @POSUB@
321 PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@
322 PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@
323 RANLIB = @RANLIB@
324 SAMPLERATE_CFLAGS = @SAMPLERATE_CFLAGS@
325 SAMPLERATE_LIBS = @SAMPLERATE_LIBS@
326 SED = @SED@
327 SET_MAKE = @SET_MAKE@
328 SHELL = @SHELL@
329 SNDFILE_CFLAGS = @SNDFILE_CFLAGS@
330 SNDFILE_LIBS = @SNDFILE_LIBS@
331 STRIP = @STRIP@
332 USE_NLS = @USE_NLS@
333 VERSION = @VERSION@
334 XGETTEXT = @XGETTEXT@
335 XGETTEXT_015 = @XGETTEXT_015@
336 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
337 abs_builddir = @abs_builddir@
338 abs_srcdir = @abs_srcdir@
339 abs_top_builddir = @abs_top_builddir@
340 abs_top_srcdir = @abs_top_srcdir@
341 ac_ct_AR = @ac_ct_AR@
342 ac_ct_CC = @ac_ct_CC@
343 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
344 am__include = @am__include@
345 am__leading_dot = @am__leading_dot@
346 am__quote = @am__quote@
347 am__tar = @am__tar@
348 am__untar = @am__untar@
349 bindir = @bindir@
350 build = @build@
351 build_alias = @build_alias@
352 build_cpu = @build_cpu@
353 build_os = @build_os@
354 build_vendor = @build_vendor@
355 builddir = @builddir@
356 datadir = @datadir@
357 datarootdir = @datarootdir@
358 docdir = @docdir@
359 dvidir = @dvidir@
360 exec_prefix = @exec_prefix@
361 host = @host@
362 host_alias = @host_alias@
363 host_cpu = @host_cpu@
364 host_os = @host_os@
365 host_vendor = @host_vendor@
366 htmldir = @htmldir@
367 includedir = @includedir@
368 infodir = @infodir@
369 install_sh = @install_sh@
370 libdir = @libdir@
371 libexecdir = @libexecdir@
372 libzip_CFLAGS = @libzip_CFLAGS@
373 libzip_LIBS = @libzip_LIBS@
374 localedir = @localedir@
375 localstatedir = @localstatedir@
376 mandir = @mandir@
377 mkdir_p = @mkdir_p@
378 oldincludedir = @oldincludedir@
379 pdfdir = @pdfdir@
380 prefix = @prefix@
381 program_transform_name = @program_transform_name@
382 psdir = @psdir@
383 runstatedir = @runstatedir@
384 sbindir = @sbindir@
385 sharedstatedir = @sharedstatedir@
386 srcdir = @srcdir@
387 sysconfdir = @sysconfdir@
388 target_alias = @target_alias@
389 top_build_prefix = @top_build_prefix@
390 top_builddir = @top_builddir@
391 top_srcdir = @top_srcdir@
392 zlib_CFLAGS = @zlib_CFLAGS@
393 zlib_LIBS = @zlib_LIBS@
394 CLI_LIBS = alsa glib-2.0 zlib json-glib-1.0 libzip
395 GUI_LIBS = $(CLI_LIBS) gtk+-3.0 libpulse libpulse-mainloop-glib
396 elektroid_CFLAGS = -I$(top_srcdir)/src `$(PKG_CONFIG) --cflags $(GUI_LIBS)` $(SNDFILE_CFLAGS) $(SAMPLERATE_CFLAGS) -D_GNU_SOURCE
397 elektroid_LDFLAGS = `$(PKG_CONFIG) --libs $(GUI_LIBS)` $(SNDFILE_LIBS) $(SAMPLERATE_LIBS)
398 elektroid_cli_CFLAGS = -I$(top_srcdir)/src `$(PKG_CONFIG) --cflags $(CLI_LIBS)` $(SNDFILE_CFLAGS) $(SAMPLERATE_CFLAGS) -D_GNU_SOURCE
399 elektroid_cli_LDFLAGS = `$(PKG_CONFIG) --libs $(CLI_LIBS)` $(SNDFILE_LIBS) $(SAMPLERATE_LIBS)
400 elektroid_common_sources = local.c local.h connector.c connector.h \
401 sample.c sample.h utils.c utils.h backend.c backend.h \
402 connectors/common.c connectors/common.h \
403 connectors/elektron.c connectors/elektron.h connectors/package.c connectors/package.h \
404 connectors/microbrute.c connectors/microbrute.h \
405 connectors/cz.c connectors/cz.h \
406 connectors/sds.c connectors/sds.h \
407 connectors/efactor.c connectors/efactor.h
408
409 elektroid_cli_SOURCES = $(elektroid_common_sources) elektroid-cli.c
410 elektroid_SOURCES = $(elektroid_common_sources) audio.c audio.h \
411 browser.c browser.h notifier.c notifier.h \
412 preferences.c preferences.h elektroid.c
413
414 AM_CPPFLAGS = -Wall -O3 -DDATADIR='"$(datadir)/$(PACKAGE)"' -DLOCALEDIR='"$(localedir)"'
415 all: all-am
416
417 .SUFFIXES:
418 .SUFFIXES: .c .lo .o .obj
419 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
420 @for dep in $?; do \
421 case '$(am__configure_deps)' in \
422 *$$dep*) \
423 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
424 && { if test -f $@; then exit 0; else break; fi; }; \
425 exit 1;; \
426 esac; \
427 done; \
428 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
429 $(am__cd) $(top_srcdir) && \
430 $(AUTOMAKE) --gnu src/Makefile
431 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
432 @case '$?' in \
433 *config.status*) \
434 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
435 *) \
436 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
437 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
438 esac;
439
440 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
441 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
442
443 $(top_srcdir)/configure: $(am__configure_deps)
444 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
445 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
446 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
447 $(am__aclocal_m4_deps):
448 install-binPROGRAMS: $(bin_PROGRAMS)
449 @$(NORMAL_INSTALL)
450 @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
451 if test -n "$$list"; then \
452 echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
453 $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
454 fi; \
455 for p in $$list; do echo "$$p $$p"; done | \
456 sed 's/$(EXEEXT)$$//' | \
457 while read p p1; do if test -f $$p \
458 || test -f $$p1 \
459 ; then echo "$$p"; echo "$$p"; else :; fi; \
460 done | \
461 sed -e 'p;s,.*/,,;n;h' \
462 -e 's|.*|.|' \
463 -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
464 sed 'N;N;N;s,\n, ,g' | \
465 $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
466 { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
467 if ($$2 == $$4) files[d] = files[d] " " $$1; \
468 else { print "f", $$3 "/" $$4, $$1; } } \
469 END { for (d in files) print "f", d, files[d] }' | \
470 while read type dir files; do \
471 if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
472 test -z "$$files" || { \
473 echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
474 $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
475 } \
476 ; done
477
478 uninstall-binPROGRAMS:
479 @$(NORMAL_UNINSTALL)
480 @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
481 files=`for p in $$list; do echo "$$p"; done | \
482 sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
483 -e 's/$$/$(EXEEXT)/' \
484 `; \
485 test -n "$$list" || exit 0; \
486 echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
487 cd "$(DESTDIR)$(bindir)" && rm -f $$files
488
489 clean-binPROGRAMS:
490 @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
491 echo " rm -f" $$list; \
492 rm -f $$list || exit $$?; \
493 test -n "$(EXEEXT)" || exit 0; \
494 list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
495 echo " rm -f" $$list; \
496 rm -f $$list
497 connectors/$(am__dirstamp):
498 @$(MKDIR_P) connectors
499 @: > connectors/$(am__dirstamp)
500 connectors/$(DEPDIR)/$(am__dirstamp):
501 @$(MKDIR_P) connectors/$(DEPDIR)
502 @: > connectors/$(DEPDIR)/$(am__dirstamp)
503 connectors/elektroid-common.$(OBJEXT): connectors/$(am__dirstamp) \
504 connectors/$(DEPDIR)/$(am__dirstamp)
505 connectors/elektroid-elektron.$(OBJEXT): connectors/$(am__dirstamp) \
506 connectors/$(DEPDIR)/$(am__dirstamp)
507 connectors/elektroid-package.$(OBJEXT): connectors/$(am__dirstamp) \
508 connectors/$(DEPDIR)/$(am__dirstamp)
509 connectors/elektroid-microbrute.$(OBJEXT): connectors/$(am__dirstamp) \
510 connectors/$(DEPDIR)/$(am__dirstamp)
511 connectors/elektroid-cz.$(OBJEXT): connectors/$(am__dirstamp) \
512 connectors/$(DEPDIR)/$(am__dirstamp)
513 connectors/elektroid-sds.$(OBJEXT): connectors/$(am__dirstamp) \
514 connectors/$(DEPDIR)/$(am__dirstamp)
515 connectors/elektroid-efactor.$(OBJEXT): connectors/$(am__dirstamp) \
516 connectors/$(DEPDIR)/$(am__dirstamp)
517
518 elektroid$(EXEEXT): $(elektroid_OBJECTS) $(elektroid_DEPENDENCIES) $(EXTRA_elektroid_DEPENDENCIES)
519 @rm -f elektroid$(EXEEXT)
520 $(AM_V_CCLD)$(elektroid_LINK) $(elektroid_OBJECTS) $(elektroid_LDADD) $(LIBS)
521 connectors/elektroid_cli-common.$(OBJEXT): connectors/$(am__dirstamp) \
522 connectors/$(DEPDIR)/$(am__dirstamp)
523 connectors/elektroid_cli-elektron.$(OBJEXT): \
524 connectors/$(am__dirstamp) \
525 connectors/$(DEPDIR)/$(am__dirstamp)
526 connectors/elektroid_cli-package.$(OBJEXT): \
527 connectors/$(am__dirstamp) \
528 connectors/$(DEPDIR)/$(am__dirstamp)
529 connectors/elektroid_cli-microbrute.$(OBJEXT): \
530 connectors/$(am__dirstamp) \
531 connectors/$(DEPDIR)/$(am__dirstamp)
532 connectors/elektroid_cli-cz.$(OBJEXT): connectors/$(am__dirstamp) \
533 connectors/$(DEPDIR)/$(am__dirstamp)
534 connectors/elektroid_cli-sds.$(OBJEXT): connectors/$(am__dirstamp) \
535 connectors/$(DEPDIR)/$(am__dirstamp)
536 connectors/elektroid_cli-efactor.$(OBJEXT): \
537 connectors/$(am__dirstamp) \
538 connectors/$(DEPDIR)/$(am__dirstamp)
539
540 elektroid-cli$(EXEEXT): $(elektroid_cli_OBJECTS) $(elektroid_cli_DEPENDENCIES) $(EXTRA_elektroid_cli_DEPENDENCIES)
541 @rm -f elektroid-cli$(EXEEXT)
542 $(AM_V_CCLD)$(elektroid_cli_LINK) $(elektroid_cli_OBJECTS) $(elektroid_cli_LDADD) $(LIBS)
543
544 mostlyclean-compile:
545 -rm -f *.$(OBJEXT)
546 -rm -f connectors/*.$(OBJEXT)
547
548 distclean-compile:
549 -rm -f *.tab.c
550
551 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elektroid-audio.Po@am__quote@ # am--include-marker
552 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elektroid-backend.Po@am__quote@ # am--include-marker
553 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elektroid-browser.Po@am__quote@ # am--include-marker
554 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elektroid-connector.Po@am__quote@ # am--include-marker
555 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elektroid-elektroid.Po@am__quote@ # am--include-marker
556 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elektroid-local.Po@am__quote@ # am--include-marker
557 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elektroid-notifier.Po@am__quote@ # am--include-marker
558 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elektroid-preferences.Po@am__quote@ # am--include-marker
559 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elektroid-sample.Po@am__quote@ # am--include-marker
560 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elektroid-utils.Po@am__quote@ # am--include-marker
561 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elektroid_cli-backend.Po@am__quote@ # am--include-marker
562 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elektroid_cli-connector.Po@am__quote@ # am--include-marker
563 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elektroid_cli-elektroid-cli.Po@am__quote@ # am--include-marker
564 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elektroid_cli-local.Po@am__quote@ # am--include-marker
565 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elektroid_cli-sample.Po@am__quote@ # am--include-marker
566 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elektroid_cli-utils.Po@am__quote@ # am--include-marker
567 @AMDEP_TRUE@@am__include@ @am__quote@connectors/$(DEPDIR)/elektroid-common.Po@am__quote@ # am--include-marker
568 @AMDEP_TRUE@@am__include@ @am__quote@connectors/$(DEPDIR)/elektroid-cz.Po@am__quote@ # am--include-marker
569 @AMDEP_TRUE@@am__include@ @am__quote@connectors/$(DEPDIR)/elektroid-efactor.Po@am__quote@ # am--include-marker
570 @AMDEP_TRUE@@am__include@ @am__quote@connectors/$(DEPDIR)/elektroid-elektron.Po@am__quote@ # am--include-marker
571 @AMDEP_TRUE@@am__include@ @am__quote@connectors/$(DEPDIR)/elektroid-microbrute.Po@am__quote@ # am--include-marker
572 @AMDEP_TRUE@@am__include@ @am__quote@connectors/$(DEPDIR)/elektroid-package.Po@am__quote@ # am--include-marker
573 @AMDEP_TRUE@@am__include@ @am__quote@connectors/$(DEPDIR)/elektroid-sds.Po@am__quote@ # am--include-marker
574 @AMDEP_TRUE@@am__include@ @am__quote@connectors/$(DEPDIR)/elektroid_cli-common.Po@am__quote@ # am--include-marker
575 @AMDEP_TRUE@@am__include@ @am__quote@connectors/$(DEPDIR)/elektroid_cli-cz.Po@am__quote@ # am--include-marker
576 @AMDEP_TRUE@@am__include@ @am__quote@connectors/$(DEPDIR)/elektroid_cli-efactor.Po@am__quote@ # am--include-marker
577 @AMDEP_TRUE@@am__include@ @am__quote@connectors/$(DEPDIR)/elektroid_cli-elektron.Po@am__quote@ # am--include-marker
578 @AMDEP_TRUE@@am__include@ @am__quote@connectors/$(DEPDIR)/elektroid_cli-microbrute.Po@am__quote@ # am--include-marker
579 @AMDEP_TRUE@@am__include@ @am__quote@connectors/$(DEPDIR)/elektroid_cli-package.Po@am__quote@ # am--include-marker
580 @AMDEP_TRUE@@am__include@ @am__quote@connectors/$(DEPDIR)/elektroid_cli-sds.Po@am__quote@ # am--include-marker
581
582 $(am__depfiles_remade):
583 @$(MKDIR_P) $(@D)
584 @echo '# dummy' >$@-t && $(am__mv) $@-t $@
585
586 am--depfiles: $(am__depfiles_remade)
587
588 .c.o:
589 @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
590 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
591 @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
592 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
593 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
594 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
595
596 .c.obj:
597 @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
598 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
599 @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
600 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
601 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
602 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
603
604 .c.lo:
605 @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
606 @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
607 @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
608 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
609 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
610 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
611
612 elektroid-local.o: local.c
613 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -MT elektroid-local.o -MD -MP -MF $(DEPDIR)/elektroid-local.Tpo -c -o elektroid-local.o `test -f 'local.c' || echo '$(srcdir)/'`local.c
614 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elektroid-local.Tpo $(DEPDIR)/elektroid-local.Po
615 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='local.c' object='elektroid-local.o' libtool=no @AMDEPBACKSLASH@
616 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
617 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -c -o elektroid-local.o `test -f 'local.c' || echo '$(srcdir)/'`local.c
618
619 elektroid-local.obj: local.c
620 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -MT elektroid-local.obj -MD -MP -MF $(DEPDIR)/elektroid-local.Tpo -c -o elektroid-local.obj `if test -f 'local.c'; then $(CYGPATH_W) 'local.c'; else $(CYGPATH_W) '$(srcdir)/local.c'; fi`
621 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elektroid-local.Tpo $(DEPDIR)/elektroid-local.Po
622 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='local.c' object='elektroid-local.obj' libtool=no @AMDEPBACKSLASH@
623 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
624 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -c -o elektroid-local.obj `if test -f 'local.c'; then $(CYGPATH_W) 'local.c'; else $(CYGPATH_W) '$(srcdir)/local.c'; fi`
625
626 elektroid-connector.o: connector.c
627 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -MT elektroid-connector.o -MD -MP -MF $(DEPDIR)/elektroid-connector.Tpo -c -o elektroid-connector.o `test -f 'connector.c' || echo '$(srcdir)/'`connector.c
628 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elektroid-connector.Tpo $(DEPDIR)/elektroid-connector.Po
629 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='connector.c' object='elektroid-connector.o' libtool=no @AMDEPBACKSLASH@
630 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
631 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -c -o elektroid-connector.o `test -f 'connector.c' || echo '$(srcdir)/'`connector.c
632
633 elektroid-connector.obj: connector.c
634 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -MT elektroid-connector.obj -MD -MP -MF $(DEPDIR)/elektroid-connector.Tpo -c -o elektroid-connector.obj `if test -f 'connector.c'; then $(CYGPATH_W) 'connector.c'; else $(CYGPATH_W) '$(srcdir)/connector.c'; fi`
635 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elektroid-connector.Tpo $(DEPDIR)/elektroid-connector.Po
636 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='connector.c' object='elektroid-connector.obj' libtool=no @AMDEPBACKSLASH@
637 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
638 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -c -o elektroid-connector.obj `if test -f 'connector.c'; then $(CYGPATH_W) 'connector.c'; else $(CYGPATH_W) '$(srcdir)/connector.c'; fi`
639
640 elektroid-sample.o: sample.c
641 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -MT elektroid-sample.o -MD -MP -MF $(DEPDIR)/elektroid-sample.Tpo -c -o elektroid-sample.o `test -f 'sample.c' || echo '$(srcdir)/'`sample.c
642 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elektroid-sample.Tpo $(DEPDIR)/elektroid-sample.Po
643 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sample.c' object='elektroid-sample.o' libtool=no @AMDEPBACKSLASH@
644 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
645 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -c -o elektroid-sample.o `test -f 'sample.c' || echo '$(srcdir)/'`sample.c
646
647 elektroid-sample.obj: sample.c
648 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -MT elektroid-sample.obj -MD -MP -MF $(DEPDIR)/elektroid-sample.Tpo -c -o elektroid-sample.obj `if test -f 'sample.c'; then $(CYGPATH_W) 'sample.c'; else $(CYGPATH_W) '$(srcdir)/sample.c'; fi`
649 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elektroid-sample.Tpo $(DEPDIR)/elektroid-sample.Po
650 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sample.c' object='elektroid-sample.obj' libtool=no @AMDEPBACKSLASH@
651 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
652 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -c -o elektroid-sample.obj `if test -f 'sample.c'; then $(CYGPATH_W) 'sample.c'; else $(CYGPATH_W) '$(srcdir)/sample.c'; fi`
653
654 elektroid-utils.o: utils.c
655 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -MT elektroid-utils.o -MD -MP -MF $(DEPDIR)/elektroid-utils.Tpo -c -o elektroid-utils.o `test -f 'utils.c' || echo '$(srcdir)/'`utils.c
656 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elektroid-utils.Tpo $(DEPDIR)/elektroid-utils.Po
657 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='utils.c' object='elektroid-utils.o' libtool=no @AMDEPBACKSLASH@
658 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
659 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -c -o elektroid-utils.o `test -f 'utils.c' || echo '$(srcdir)/'`utils.c
660
661 elektroid-utils.obj: utils.c
662 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -MT elektroid-utils.obj -MD -MP -MF $(DEPDIR)/elektroid-utils.Tpo -c -o elektroid-utils.obj `if test -f 'utils.c'; then $(CYGPATH_W) 'utils.c'; else $(CYGPATH_W) '$(srcdir)/utils.c'; fi`
663 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elektroid-utils.Tpo $(DEPDIR)/elektroid-utils.Po
664 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='utils.c' object='elektroid-utils.obj' libtool=no @AMDEPBACKSLASH@
665 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
666 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -c -o elektroid-utils.obj `if test -f 'utils.c'; then $(CYGPATH_W) 'utils.c'; else $(CYGPATH_W) '$(srcdir)/utils.c'; fi`
667
668 elektroid-backend.o: backend.c
669 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -MT elektroid-backend.o -MD -MP -MF $(DEPDIR)/elektroid-backend.Tpo -c -o elektroid-backend.o `test -f 'backend.c' || echo '$(srcdir)/'`backend.c
670 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elektroid-backend.Tpo $(DEPDIR)/elektroid-backend.Po
671 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='backend.c' object='elektroid-backend.o' libtool=no @AMDEPBACKSLASH@
672 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
673 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -c -o elektroid-backend.o `test -f 'backend.c' || echo '$(srcdir)/'`backend.c
674
675 elektroid-backend.obj: backend.c
676 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -MT elektroid-backend.obj -MD -MP -MF $(DEPDIR)/elektroid-backend.Tpo -c -o elektroid-backend.obj `if test -f 'backend.c'; then $(CYGPATH_W) 'backend.c'; else $(CYGPATH_W) '$(srcdir)/backend.c'; fi`
677 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elektroid-backend.Tpo $(DEPDIR)/elektroid-backend.Po
678 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='backend.c' object='elektroid-backend.obj' libtool=no @AMDEPBACKSLASH@
679 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
680 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -c -o elektroid-backend.obj `if test -f 'backend.c'; then $(CYGPATH_W) 'backend.c'; else $(CYGPATH_W) '$(srcdir)/backend.c'; fi`
681
682 connectors/elektroid-common.o: connectors/common.c
683 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -MT connectors/elektroid-common.o -MD -MP -MF connectors/$(DEPDIR)/elektroid-common.Tpo -c -o connectors/elektroid-common.o `test -f 'connectors/common.c' || echo '$(srcdir)/'`connectors/common.c
684 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) connectors/$(DEPDIR)/elektroid-common.Tpo connectors/$(DEPDIR)/elektroid-common.Po
685 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='connectors/common.c' object='connectors/elektroid-common.o' libtool=no @AMDEPBACKSLASH@
686 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
687 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -c -o connectors/elektroid-common.o `test -f 'connectors/common.c' || echo '$(srcdir)/'`connectors/common.c
688
689 connectors/elektroid-common.obj: connectors/common.c
690 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -MT connectors/elektroid-common.obj -MD -MP -MF connectors/$(DEPDIR)/elektroid-common.Tpo -c -o connectors/elektroid-common.obj `if test -f 'connectors/common.c'; then $(CYGPATH_W) 'connectors/common.c'; else $(CYGPATH_W) '$(srcdir)/connectors/common.c'; fi`
691 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) connectors/$(DEPDIR)/elektroid-common.Tpo connectors/$(DEPDIR)/elektroid-common.Po
692 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='connectors/common.c' object='connectors/elektroid-common.obj' libtool=no @AMDEPBACKSLASH@
693 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
694 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -c -o connectors/elektroid-common.obj `if test -f 'connectors/common.c'; then $(CYGPATH_W) 'connectors/common.c'; else $(CYGPATH_W) '$(srcdir)/connectors/common.c'; fi`
695
696 connectors/elektroid-elektron.o: connectors/elektron.c
697 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -MT connectors/elektroid-elektron.o -MD -MP -MF connectors/$(DEPDIR)/elektroid-elektron.Tpo -c -o connectors/elektroid-elektron.o `test -f 'connectors/elektron.c' || echo '$(srcdir)/'`connectors/elektron.c
698 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) connectors/$(DEPDIR)/elektroid-elektron.Tpo connectors/$(DEPDIR)/elektroid-elektron.Po
699 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='connectors/elektron.c' object='connectors/elektroid-elektron.o' libtool=no @AMDEPBACKSLASH@
700 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
701 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -c -o connectors/elektroid-elektron.o `test -f 'connectors/elektron.c' || echo '$(srcdir)/'`connectors/elektron.c
702
703 connectors/elektroid-elektron.obj: connectors/elektron.c
704 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -MT connectors/elektroid-elektron.obj -MD -MP -MF connectors/$(DEPDIR)/elektroid-elektron.Tpo -c -o connectors/elektroid-elektron.obj `if test -f 'connectors/elektron.c'; then $(CYGPATH_W) 'connectors/elektron.c'; else $(CYGPATH_W) '$(srcdir)/connectors/elektron.c'; fi`
705 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) connectors/$(DEPDIR)/elektroid-elektron.Tpo connectors/$(DEPDIR)/elektroid-elektron.Po
706 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='connectors/elektron.c' object='connectors/elektroid-elektron.obj' libtool=no @AMDEPBACKSLASH@
707 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
708 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -c -o connectors/elektroid-elektron.obj `if test -f 'connectors/elektron.c'; then $(CYGPATH_W) 'connectors/elektron.c'; else $(CYGPATH_W) '$(srcdir)/connectors/elektron.c'; fi`
709
710 connectors/elektroid-package.o: connectors/package.c
711 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -MT connectors/elektroid-package.o -MD -MP -MF connectors/$(DEPDIR)/elektroid-package.Tpo -c -o connectors/elektroid-package.o `test -f 'connectors/package.c' || echo '$(srcdir)/'`connectors/package.c
712 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) connectors/$(DEPDIR)/elektroid-package.Tpo connectors/$(DEPDIR)/elektroid-package.Po
713 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='connectors/package.c' object='connectors/elektroid-package.o' libtool=no @AMDEPBACKSLASH@
714 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
715 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -c -o connectors/elektroid-package.o `test -f 'connectors/package.c' || echo '$(srcdir)/'`connectors/package.c
716
717 connectors/elektroid-package.obj: connectors/package.c
718 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -MT connectors/elektroid-package.obj -MD -MP -MF connectors/$(DEPDIR)/elektroid-package.Tpo -c -o connectors/elektroid-package.obj `if test -f 'connectors/package.c'; then $(CYGPATH_W) 'connectors/package.c'; else $(CYGPATH_W) '$(srcdir)/connectors/package.c'; fi`
719 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) connectors/$(DEPDIR)/elektroid-package.Tpo connectors/$(DEPDIR)/elektroid-package.Po
720 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='connectors/package.c' object='connectors/elektroid-package.obj' libtool=no @AMDEPBACKSLASH@
721 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
722 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -c -o connectors/elektroid-package.obj `if test -f 'connectors/package.c'; then $(CYGPATH_W) 'connectors/package.c'; else $(CYGPATH_W) '$(srcdir)/connectors/package.c'; fi`
723
724 connectors/elektroid-microbrute.o: connectors/microbrute.c
725 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -MT connectors/elektroid-microbrute.o -MD -MP -MF connectors/$(DEPDIR)/elektroid-microbrute.Tpo -c -o connectors/elektroid-microbrute.o `test -f 'connectors/microbrute.c' || echo '$(srcdir)/'`connectors/microbrute.c
726 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) connectors/$(DEPDIR)/elektroid-microbrute.Tpo connectors/$(DEPDIR)/elektroid-microbrute.Po
727 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='connectors/microbrute.c' object='connectors/elektroid-microbrute.o' libtool=no @AMDEPBACKSLASH@
728 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
729 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -c -o connectors/elektroid-microbrute.o `test -f 'connectors/microbrute.c' || echo '$(srcdir)/'`connectors/microbrute.c
730
731 connectors/elektroid-microbrute.obj: connectors/microbrute.c
732 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -MT connectors/elektroid-microbrute.obj -MD -MP -MF connectors/$(DEPDIR)/elektroid-microbrute.Tpo -c -o connectors/elektroid-microbrute.obj `if test -f 'connectors/microbrute.c'; then $(CYGPATH_W) 'connectors/microbrute.c'; else $(CYGPATH_W) '$(srcdir)/connectors/microbrute.c'; fi`
733 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) connectors/$(DEPDIR)/elektroid-microbrute.Tpo connectors/$(DEPDIR)/elektroid-microbrute.Po
734 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='connectors/microbrute.c' object='connectors/elektroid-microbrute.obj' libtool=no @AMDEPBACKSLASH@
735 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
736 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -c -o connectors/elektroid-microbrute.obj `if test -f 'connectors/microbrute.c'; then $(CYGPATH_W) 'connectors/microbrute.c'; else $(CYGPATH_W) '$(srcdir)/connectors/microbrute.c'; fi`
737
738 connectors/elektroid-cz.o: connectors/cz.c
739 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -MT connectors/elektroid-cz.o -MD -MP -MF connectors/$(DEPDIR)/elektroid-cz.Tpo -c -o connectors/elektroid-cz.o `test -f 'connectors/cz.c' || echo '$(srcdir)/'`connectors/cz.c
740 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) connectors/$(DEPDIR)/elektroid-cz.Tpo connectors/$(DEPDIR)/elektroid-cz.Po
741 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='connectors/cz.c' object='connectors/elektroid-cz.o' libtool=no @AMDEPBACKSLASH@
742 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
743 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -c -o connectors/elektroid-cz.o `test -f 'connectors/cz.c' || echo '$(srcdir)/'`connectors/cz.c
744
745 connectors/elektroid-cz.obj: connectors/cz.c
746 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -MT connectors/elektroid-cz.obj -MD -MP -MF connectors/$(DEPDIR)/elektroid-cz.Tpo -c -o connectors/elektroid-cz.obj `if test -f 'connectors/cz.c'; then $(CYGPATH_W) 'connectors/cz.c'; else $(CYGPATH_W) '$(srcdir)/connectors/cz.c'; fi`
747 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) connectors/$(DEPDIR)/elektroid-cz.Tpo connectors/$(DEPDIR)/elektroid-cz.Po
748 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='connectors/cz.c' object='connectors/elektroid-cz.obj' libtool=no @AMDEPBACKSLASH@
749 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
750 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -c -o connectors/elektroid-cz.obj `if test -f 'connectors/cz.c'; then $(CYGPATH_W) 'connectors/cz.c'; else $(CYGPATH_W) '$(srcdir)/connectors/cz.c'; fi`
751
752 connectors/elektroid-sds.o: connectors/sds.c
753 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -MT connectors/elektroid-sds.o -MD -MP -MF connectors/$(DEPDIR)/elektroid-sds.Tpo -c -o connectors/elektroid-sds.o `test -f 'connectors/sds.c' || echo '$(srcdir)/'`connectors/sds.c
754 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) connectors/$(DEPDIR)/elektroid-sds.Tpo connectors/$(DEPDIR)/elektroid-sds.Po
755 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='connectors/sds.c' object='connectors/elektroid-sds.o' libtool=no @AMDEPBACKSLASH@
756 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
757 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -c -o connectors/elektroid-sds.o `test -f 'connectors/sds.c' || echo '$(srcdir)/'`connectors/sds.c
758
759 connectors/elektroid-sds.obj: connectors/sds.c
760 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -MT connectors/elektroid-sds.obj -MD -MP -MF connectors/$(DEPDIR)/elektroid-sds.Tpo -c -o connectors/elektroid-sds.obj `if test -f 'connectors/sds.c'; then $(CYGPATH_W) 'connectors/sds.c'; else $(CYGPATH_W) '$(srcdir)/connectors/sds.c'; fi`
761 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) connectors/$(DEPDIR)/elektroid-sds.Tpo connectors/$(DEPDIR)/elektroid-sds.Po
762 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='connectors/sds.c' object='connectors/elektroid-sds.obj' libtool=no @AMDEPBACKSLASH@
763 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
764 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -c -o connectors/elektroid-sds.obj `if test -f 'connectors/sds.c'; then $(CYGPATH_W) 'connectors/sds.c'; else $(CYGPATH_W) '$(srcdir)/connectors/sds.c'; fi`
765
766 connectors/elektroid-efactor.o: connectors/efactor.c
767 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -MT connectors/elektroid-efactor.o -MD -MP -MF connectors/$(DEPDIR)/elektroid-efactor.Tpo -c -o connectors/elektroid-efactor.o `test -f 'connectors/efactor.c' || echo '$(srcdir)/'`connectors/efactor.c
768 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) connectors/$(DEPDIR)/elektroid-efactor.Tpo connectors/$(DEPDIR)/elektroid-efactor.Po
769 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='connectors/efactor.c' object='connectors/elektroid-efactor.o' libtool=no @AMDEPBACKSLASH@
770 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
771 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -c -o connectors/elektroid-efactor.o `test -f 'connectors/efactor.c' || echo '$(srcdir)/'`connectors/efactor.c
772
773 connectors/elektroid-efactor.obj: connectors/efactor.c
774 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -MT connectors/elektroid-efactor.obj -MD -MP -MF connectors/$(DEPDIR)/elektroid-efactor.Tpo -c -o connectors/elektroid-efactor.obj `if test -f 'connectors/efactor.c'; then $(CYGPATH_W) 'connectors/efactor.c'; else $(CYGPATH_W) '$(srcdir)/connectors/efactor.c'; fi`
775 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) connectors/$(DEPDIR)/elektroid-efactor.Tpo connectors/$(DEPDIR)/elektroid-efactor.Po
776 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='connectors/efactor.c' object='connectors/elektroid-efactor.obj' libtool=no @AMDEPBACKSLASH@
777 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
778 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -c -o connectors/elektroid-efactor.obj `if test -f 'connectors/efactor.c'; then $(CYGPATH_W) 'connectors/efactor.c'; else $(CYGPATH_W) '$(srcdir)/connectors/efactor.c'; fi`
779
780 elektroid-audio.o: audio.c
781 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -MT elektroid-audio.o -MD -MP -MF $(DEPDIR)/elektroid-audio.Tpo -c -o elektroid-audio.o `test -f 'audio.c' || echo '$(srcdir)/'`audio.c
782 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elektroid-audio.Tpo $(DEPDIR)/elektroid-audio.Po
783 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='audio.c' object='elektroid-audio.o' libtool=no @AMDEPBACKSLASH@
784 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
785 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -c -o elektroid-audio.o `test -f 'audio.c' || echo '$(srcdir)/'`audio.c
786
787 elektroid-audio.obj: audio.c
788 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -MT elektroid-audio.obj -MD -MP -MF $(DEPDIR)/elektroid-audio.Tpo -c -o elektroid-audio.obj `if test -f 'audio.c'; then $(CYGPATH_W) 'audio.c'; else $(CYGPATH_W) '$(srcdir)/audio.c'; fi`
789 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elektroid-audio.Tpo $(DEPDIR)/elektroid-audio.Po
790 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='audio.c' object='elektroid-audio.obj' libtool=no @AMDEPBACKSLASH@
791 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
792 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -c -o elektroid-audio.obj `if test -f 'audio.c'; then $(CYGPATH_W) 'audio.c'; else $(CYGPATH_W) '$(srcdir)/audio.c'; fi`
793
794 elektroid-browser.o: browser.c
795 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -MT elektroid-browser.o -MD -MP -MF $(DEPDIR)/elektroid-browser.Tpo -c -o elektroid-browser.o `test -f 'browser.c' || echo '$(srcdir)/'`browser.c
796 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elektroid-browser.Tpo $(DEPDIR)/elektroid-browser.Po
797 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='browser.c' object='elektroid-browser.o' libtool=no @AMDEPBACKSLASH@
798 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
799 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -c -o elektroid-browser.o `test -f 'browser.c' || echo '$(srcdir)/'`browser.c
800
801 elektroid-browser.obj: browser.c
802 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -MT elektroid-browser.obj -MD -MP -MF $(DEPDIR)/elektroid-browser.Tpo -c -o elektroid-browser.obj `if test -f 'browser.c'; then $(CYGPATH_W) 'browser.c'; else $(CYGPATH_W) '$(srcdir)/browser.c'; fi`
803 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elektroid-browser.Tpo $(DEPDIR)/elektroid-browser.Po
804 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='browser.c' object='elektroid-browser.obj' libtool=no @AMDEPBACKSLASH@
805 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
806 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -c -o elektroid-browser.obj `if test -f 'browser.c'; then $(CYGPATH_W) 'browser.c'; else $(CYGPATH_W) '$(srcdir)/browser.c'; fi`
807
808 elektroid-notifier.o: notifier.c
809 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -MT elektroid-notifier.o -MD -MP -MF $(DEPDIR)/elektroid-notifier.Tpo -c -o elektroid-notifier.o `test -f 'notifier.c' || echo '$(srcdir)/'`notifier.c
810 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elektroid-notifier.Tpo $(DEPDIR)/elektroid-notifier.Po
811 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='notifier.c' object='elektroid-notifier.o' libtool=no @AMDEPBACKSLASH@
812 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
813 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -c -o elektroid-notifier.o `test -f 'notifier.c' || echo '$(srcdir)/'`notifier.c
814
815 elektroid-notifier.obj: notifier.c
816 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -MT elektroid-notifier.obj -MD -MP -MF $(DEPDIR)/elektroid-notifier.Tpo -c -o elektroid-notifier.obj `if test -f 'notifier.c'; then $(CYGPATH_W) 'notifier.c'; else $(CYGPATH_W) '$(srcdir)/notifier.c'; fi`
817 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elektroid-notifier.Tpo $(DEPDIR)/elektroid-notifier.Po
818 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='notifier.c' object='elektroid-notifier.obj' libtool=no @AMDEPBACKSLASH@
819 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
820 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -c -o elektroid-notifier.obj `if test -f 'notifier.c'; then $(CYGPATH_W) 'notifier.c'; else $(CYGPATH_W) '$(srcdir)/notifier.c'; fi`
821
822 elektroid-preferences.o: preferences.c
823 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -MT elektroid-preferences.o -MD -MP -MF $(DEPDIR)/elektroid-preferences.Tpo -c -o elektroid-preferences.o `test -f 'preferences.c' || echo '$(srcdir)/'`preferences.c
824 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elektroid-preferences.Tpo $(DEPDIR)/elektroid-preferences.Po
825 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='preferences.c' object='elektroid-preferences.o' libtool=no @AMDEPBACKSLASH@
826 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
827 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -c -o elektroid-preferences.o `test -f 'preferences.c' || echo '$(srcdir)/'`preferences.c
828
829 elektroid-preferences.obj: preferences.c
830 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -MT elektroid-preferences.obj -MD -MP -MF $(DEPDIR)/elektroid-preferences.Tpo -c -o elektroid-preferences.obj `if test -f 'preferences.c'; then $(CYGPATH_W) 'preferences.c'; else $(CYGPATH_W) '$(srcdir)/preferences.c'; fi`
831 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elektroid-preferences.Tpo $(DEPDIR)/elektroid-preferences.Po
832 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='preferences.c' object='elektroid-preferences.obj' libtool=no @AMDEPBACKSLASH@
833 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
834 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -c -o elektroid-preferences.obj `if test -f 'preferences.c'; then $(CYGPATH_W) 'preferences.c'; else $(CYGPATH_W) '$(srcdir)/preferences.c'; fi`
835
836 elektroid-elektroid.o: elektroid.c
837 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -MT elektroid-elektroid.o -MD -MP -MF $(DEPDIR)/elektroid-elektroid.Tpo -c -o elektroid-elektroid.o `test -f 'elektroid.c' || echo '$(srcdir)/'`elektroid.c
838 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elektroid-elektroid.Tpo $(DEPDIR)/elektroid-elektroid.Po
839 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elektroid.c' object='elektroid-elektroid.o' libtool=no @AMDEPBACKSLASH@
840 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
841 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -c -o elektroid-elektroid.o `test -f 'elektroid.c' || echo '$(srcdir)/'`elektroid.c
842
843 elektroid-elektroid.obj: elektroid.c
844 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -MT elektroid-elektroid.obj -MD -MP -MF $(DEPDIR)/elektroid-elektroid.Tpo -c -o elektroid-elektroid.obj `if test -f 'elektroid.c'; then $(CYGPATH_W) 'elektroid.c'; else $(CYGPATH_W) '$(srcdir)/elektroid.c'; fi`
845 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elektroid-elektroid.Tpo $(DEPDIR)/elektroid-elektroid.Po
846 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elektroid.c' object='elektroid-elektroid.obj' libtool=no @AMDEPBACKSLASH@
847 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
848 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_CFLAGS) $(CFLAGS) -c -o elektroid-elektroid.obj `if test -f 'elektroid.c'; then $(CYGPATH_W) 'elektroid.c'; else $(CYGPATH_W) '$(srcdir)/elektroid.c'; fi`
849
850 elektroid_cli-local.o: local.c
851 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -MT elektroid_cli-local.o -MD -MP -MF $(DEPDIR)/elektroid_cli-local.Tpo -c -o elektroid_cli-local.o `test -f 'local.c' || echo '$(srcdir)/'`local.c
852 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elektroid_cli-local.Tpo $(DEPDIR)/elektroid_cli-local.Po
853 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='local.c' object='elektroid_cli-local.o' libtool=no @AMDEPBACKSLASH@
854 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
855 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -c -o elektroid_cli-local.o `test -f 'local.c' || echo '$(srcdir)/'`local.c
856
857 elektroid_cli-local.obj: local.c
858 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -MT elektroid_cli-local.obj -MD -MP -MF $(DEPDIR)/elektroid_cli-local.Tpo -c -o elektroid_cli-local.obj `if test -f 'local.c'; then $(CYGPATH_W) 'local.c'; else $(CYGPATH_W) '$(srcdir)/local.c'; fi`
859 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elektroid_cli-local.Tpo $(DEPDIR)/elektroid_cli-local.Po
860 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='local.c' object='elektroid_cli-local.obj' libtool=no @AMDEPBACKSLASH@
861 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
862 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -c -o elektroid_cli-local.obj `if test -f 'local.c'; then $(CYGPATH_W) 'local.c'; else $(CYGPATH_W) '$(srcdir)/local.c'; fi`
863
864 elektroid_cli-connector.o: connector.c
865 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -MT elektroid_cli-connector.o -MD -MP -MF $(DEPDIR)/elektroid_cli-connector.Tpo -c -o elektroid_cli-connector.o `test -f 'connector.c' || echo '$(srcdir)/'`connector.c
866 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elektroid_cli-connector.Tpo $(DEPDIR)/elektroid_cli-connector.Po
867 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='connector.c' object='elektroid_cli-connector.o' libtool=no @AMDEPBACKSLASH@
868 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
869 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -c -o elektroid_cli-connector.o `test -f 'connector.c' || echo '$(srcdir)/'`connector.c
870
871 elektroid_cli-connector.obj: connector.c
872 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -MT elektroid_cli-connector.obj -MD -MP -MF $(DEPDIR)/elektroid_cli-connector.Tpo -c -o elektroid_cli-connector.obj `if test -f 'connector.c'; then $(CYGPATH_W) 'connector.c'; else $(CYGPATH_W) '$(srcdir)/connector.c'; fi`
873 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elektroid_cli-connector.Tpo $(DEPDIR)/elektroid_cli-connector.Po
874 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='connector.c' object='elektroid_cli-connector.obj' libtool=no @AMDEPBACKSLASH@
875 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
876 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -c -o elektroid_cli-connector.obj `if test -f 'connector.c'; then $(CYGPATH_W) 'connector.c'; else $(CYGPATH_W) '$(srcdir)/connector.c'; fi`
877
878 elektroid_cli-sample.o: sample.c
879 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -MT elektroid_cli-sample.o -MD -MP -MF $(DEPDIR)/elektroid_cli-sample.Tpo -c -o elektroid_cli-sample.o `test -f 'sample.c' || echo '$(srcdir)/'`sample.c
880 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elektroid_cli-sample.Tpo $(DEPDIR)/elektroid_cli-sample.Po
881 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sample.c' object='elektroid_cli-sample.o' libtool=no @AMDEPBACKSLASH@
882 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
883 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -c -o elektroid_cli-sample.o `test -f 'sample.c' || echo '$(srcdir)/'`sample.c
884
885 elektroid_cli-sample.obj: sample.c
886 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -MT elektroid_cli-sample.obj -MD -MP -MF $(DEPDIR)/elektroid_cli-sample.Tpo -c -o elektroid_cli-sample.obj `if test -f 'sample.c'; then $(CYGPATH_W) 'sample.c'; else $(CYGPATH_W) '$(srcdir)/sample.c'; fi`
887 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elektroid_cli-sample.Tpo $(DEPDIR)/elektroid_cli-sample.Po
888 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sample.c' object='elektroid_cli-sample.obj' libtool=no @AMDEPBACKSLASH@
889 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
890 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -c -o elektroid_cli-sample.obj `if test -f 'sample.c'; then $(CYGPATH_W) 'sample.c'; else $(CYGPATH_W) '$(srcdir)/sample.c'; fi`
891
892 elektroid_cli-utils.o: utils.c
893 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -MT elektroid_cli-utils.o -MD -MP -MF $(DEPDIR)/elektroid_cli-utils.Tpo -c -o elektroid_cli-utils.o `test -f 'utils.c' || echo '$(srcdir)/'`utils.c
894 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elektroid_cli-utils.Tpo $(DEPDIR)/elektroid_cli-utils.Po
895 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='utils.c' object='elektroid_cli-utils.o' libtool=no @AMDEPBACKSLASH@
896 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
897 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -c -o elektroid_cli-utils.o `test -f 'utils.c' || echo '$(srcdir)/'`utils.c
898
899 elektroid_cli-utils.obj: utils.c
900 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -MT elektroid_cli-utils.obj -MD -MP -MF $(DEPDIR)/elektroid_cli-utils.Tpo -c -o elektroid_cli-utils.obj `if test -f 'utils.c'; then $(CYGPATH_W) 'utils.c'; else $(CYGPATH_W) '$(srcdir)/utils.c'; fi`
901 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elektroid_cli-utils.Tpo $(DEPDIR)/elektroid_cli-utils.Po
902 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='utils.c' object='elektroid_cli-utils.obj' libtool=no @AMDEPBACKSLASH@
903 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
904 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -c -o elektroid_cli-utils.obj `if test -f 'utils.c'; then $(CYGPATH_W) 'utils.c'; else $(CYGPATH_W) '$(srcdir)/utils.c'; fi`
905
906 elektroid_cli-backend.o: backend.c
907 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -MT elektroid_cli-backend.o -MD -MP -MF $(DEPDIR)/elektroid_cli-backend.Tpo -c -o elektroid_cli-backend.o `test -f 'backend.c' || echo '$(srcdir)/'`backend.c
908 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elektroid_cli-backend.Tpo $(DEPDIR)/elektroid_cli-backend.Po
909 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='backend.c' object='elektroid_cli-backend.o' libtool=no @AMDEPBACKSLASH@
910 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
911 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -c -o elektroid_cli-backend.o `test -f 'backend.c' || echo '$(srcdir)/'`backend.c
912
913 elektroid_cli-backend.obj: backend.c
914 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -MT elektroid_cli-backend.obj -MD -MP -MF $(DEPDIR)/elektroid_cli-backend.Tpo -c -o elektroid_cli-backend.obj `if test -f 'backend.c'; then $(CYGPATH_W) 'backend.c'; else $(CYGPATH_W) '$(srcdir)/backend.c'; fi`
915 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elektroid_cli-backend.Tpo $(DEPDIR)/elektroid_cli-backend.Po
916 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='backend.c' object='elektroid_cli-backend.obj' libtool=no @AMDEPBACKSLASH@
917 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
918 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -c -o elektroid_cli-backend.obj `if test -f 'backend.c'; then $(CYGPATH_W) 'backend.c'; else $(CYGPATH_W) '$(srcdir)/backend.c'; fi`
919
920 connectors/elektroid_cli-common.o: connectors/common.c
921 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -MT connectors/elektroid_cli-common.o -MD -MP -MF connectors/$(DEPDIR)/elektroid_cli-common.Tpo -c -o connectors/elektroid_cli-common.o `test -f 'connectors/common.c' || echo '$(srcdir)/'`connectors/common.c
922 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) connectors/$(DEPDIR)/elektroid_cli-common.Tpo connectors/$(DEPDIR)/elektroid_cli-common.Po
923 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='connectors/common.c' object='connectors/elektroid_cli-common.o' libtool=no @AMDEPBACKSLASH@
924 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
925 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -c -o connectors/elektroid_cli-common.o `test -f 'connectors/common.c' || echo '$(srcdir)/'`connectors/common.c
926
927 connectors/elektroid_cli-common.obj: connectors/common.c
928 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -MT connectors/elektroid_cli-common.obj -MD -MP -MF connectors/$(DEPDIR)/elektroid_cli-common.Tpo -c -o connectors/elektroid_cli-common.obj `if test -f 'connectors/common.c'; then $(CYGPATH_W) 'connectors/common.c'; else $(CYGPATH_W) '$(srcdir)/connectors/common.c'; fi`
929 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) connectors/$(DEPDIR)/elektroid_cli-common.Tpo connectors/$(DEPDIR)/elektroid_cli-common.Po
930 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='connectors/common.c' object='connectors/elektroid_cli-common.obj' libtool=no @AMDEPBACKSLASH@
931 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
932 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -c -o connectors/elektroid_cli-common.obj `if test -f 'connectors/common.c'; then $(CYGPATH_W) 'connectors/common.c'; else $(CYGPATH_W) '$(srcdir)/connectors/common.c'; fi`
933
934 connectors/elektroid_cli-elektron.o: connectors/elektron.c
935 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -MT connectors/elektroid_cli-elektron.o -MD -MP -MF connectors/$(DEPDIR)/elektroid_cli-elektron.Tpo -c -o connectors/elektroid_cli-elektron.o `test -f 'connectors/elektron.c' || echo '$(srcdir)/'`connectors/elektron.c
936 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) connectors/$(DEPDIR)/elektroid_cli-elektron.Tpo connectors/$(DEPDIR)/elektroid_cli-elektron.Po
937 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='connectors/elektron.c' object='connectors/elektroid_cli-elektron.o' libtool=no @AMDEPBACKSLASH@
938 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
939 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -c -o connectors/elektroid_cli-elektron.o `test -f 'connectors/elektron.c' || echo '$(srcdir)/'`connectors/elektron.c
940
941 connectors/elektroid_cli-elektron.obj: connectors/elektron.c
942 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -MT connectors/elektroid_cli-elektron.obj -MD -MP -MF connectors/$(DEPDIR)/elektroid_cli-elektron.Tpo -c -o connectors/elektroid_cli-elektron.obj `if test -f 'connectors/elektron.c'; then $(CYGPATH_W) 'connectors/elektron.c'; else $(CYGPATH_W) '$(srcdir)/connectors/elektron.c'; fi`
943 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) connectors/$(DEPDIR)/elektroid_cli-elektron.Tpo connectors/$(DEPDIR)/elektroid_cli-elektron.Po
944 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='connectors/elektron.c' object='connectors/elektroid_cli-elektron.obj' libtool=no @AMDEPBACKSLASH@
945 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
946 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -c -o connectors/elektroid_cli-elektron.obj `if test -f 'connectors/elektron.c'; then $(CYGPATH_W) 'connectors/elektron.c'; else $(CYGPATH_W) '$(srcdir)/connectors/elektron.c'; fi`
947
948 connectors/elektroid_cli-package.o: connectors/package.c
949 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -MT connectors/elektroid_cli-package.o -MD -MP -MF connectors/$(DEPDIR)/elektroid_cli-package.Tpo -c -o connectors/elektroid_cli-package.o `test -f 'connectors/package.c' || echo '$(srcdir)/'`connectors/package.c
950 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) connectors/$(DEPDIR)/elektroid_cli-package.Tpo connectors/$(DEPDIR)/elektroid_cli-package.Po
951 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='connectors/package.c' object='connectors/elektroid_cli-package.o' libtool=no @AMDEPBACKSLASH@
952 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
953 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -c -o connectors/elektroid_cli-package.o `test -f 'connectors/package.c' || echo '$(srcdir)/'`connectors/package.c
954
955 connectors/elektroid_cli-package.obj: connectors/package.c
956 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -MT connectors/elektroid_cli-package.obj -MD -MP -MF connectors/$(DEPDIR)/elektroid_cli-package.Tpo -c -o connectors/elektroid_cli-package.obj `if test -f 'connectors/package.c'; then $(CYGPATH_W) 'connectors/package.c'; else $(CYGPATH_W) '$(srcdir)/connectors/package.c'; fi`
957 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) connectors/$(DEPDIR)/elektroid_cli-package.Tpo connectors/$(DEPDIR)/elektroid_cli-package.Po
958 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='connectors/package.c' object='connectors/elektroid_cli-package.obj' libtool=no @AMDEPBACKSLASH@
959 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
960 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -c -o connectors/elektroid_cli-package.obj `if test -f 'connectors/package.c'; then $(CYGPATH_W) 'connectors/package.c'; else $(CYGPATH_W) '$(srcdir)/connectors/package.c'; fi`
961
962 connectors/elektroid_cli-microbrute.o: connectors/microbrute.c
963 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -MT connectors/elektroid_cli-microbrute.o -MD -MP -MF connectors/$(DEPDIR)/elektroid_cli-microbrute.Tpo -c -o connectors/elektroid_cli-microbrute.o `test -f 'connectors/microbrute.c' || echo '$(srcdir)/'`connectors/microbrute.c
964 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) connectors/$(DEPDIR)/elektroid_cli-microbrute.Tpo connectors/$(DEPDIR)/elektroid_cli-microbrute.Po
965 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='connectors/microbrute.c' object='connectors/elektroid_cli-microbrute.o' libtool=no @AMDEPBACKSLASH@
966 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
967 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -c -o connectors/elektroid_cli-microbrute.o `test -f 'connectors/microbrute.c' || echo '$(srcdir)/'`connectors/microbrute.c
968
969 connectors/elektroid_cli-microbrute.obj: connectors/microbrute.c
970 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -MT connectors/elektroid_cli-microbrute.obj -MD -MP -MF connectors/$(DEPDIR)/elektroid_cli-microbrute.Tpo -c -o connectors/elektroid_cli-microbrute.obj `if test -f 'connectors/microbrute.c'; then $(CYGPATH_W) 'connectors/microbrute.c'; else $(CYGPATH_W) '$(srcdir)/connectors/microbrute.c'; fi`
971 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) connectors/$(DEPDIR)/elektroid_cli-microbrute.Tpo connectors/$(DEPDIR)/elektroid_cli-microbrute.Po
972 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='connectors/microbrute.c' object='connectors/elektroid_cli-microbrute.obj' libtool=no @AMDEPBACKSLASH@
973 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
974 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -c -o connectors/elektroid_cli-microbrute.obj `if test -f 'connectors/microbrute.c'; then $(CYGPATH_W) 'connectors/microbrute.c'; else $(CYGPATH_W) '$(srcdir)/connectors/microbrute.c'; fi`
975
976 connectors/elektroid_cli-cz.o: connectors/cz.c
977 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -MT connectors/elektroid_cli-cz.o -MD -MP -MF connectors/$(DEPDIR)/elektroid_cli-cz.Tpo -c -o connectors/elektroid_cli-cz.o `test -f 'connectors/cz.c' || echo '$(srcdir)/'`connectors/cz.c
978 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) connectors/$(DEPDIR)/elektroid_cli-cz.Tpo connectors/$(DEPDIR)/elektroid_cli-cz.Po
979 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='connectors/cz.c' object='connectors/elektroid_cli-cz.o' libtool=no @AMDEPBACKSLASH@
980 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
981 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -c -o connectors/elektroid_cli-cz.o `test -f 'connectors/cz.c' || echo '$(srcdir)/'`connectors/cz.c
982
983 connectors/elektroid_cli-cz.obj: connectors/cz.c
984 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -MT connectors/elektroid_cli-cz.obj -MD -MP -MF connectors/$(DEPDIR)/elektroid_cli-cz.Tpo -c -o connectors/elektroid_cli-cz.obj `if test -f 'connectors/cz.c'; then $(CYGPATH_W) 'connectors/cz.c'; else $(CYGPATH_W) '$(srcdir)/connectors/cz.c'; fi`
985 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) connectors/$(DEPDIR)/elektroid_cli-cz.Tpo connectors/$(DEPDIR)/elektroid_cli-cz.Po
986 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='connectors/cz.c' object='connectors/elektroid_cli-cz.obj' libtool=no @AMDEPBACKSLASH@
987 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
988 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -c -o connectors/elektroid_cli-cz.obj `if test -f 'connectors/cz.c'; then $(CYGPATH_W) 'connectors/cz.c'; else $(CYGPATH_W) '$(srcdir)/connectors/cz.c'; fi`
989
990 connectors/elektroid_cli-sds.o: connectors/sds.c
991 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -MT connectors/elektroid_cli-sds.o -MD -MP -MF connectors/$(DEPDIR)/elektroid_cli-sds.Tpo -c -o connectors/elektroid_cli-sds.o `test -f 'connectors/sds.c' || echo '$(srcdir)/'`connectors/sds.c
992 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) connectors/$(DEPDIR)/elektroid_cli-sds.Tpo connectors/$(DEPDIR)/elektroid_cli-sds.Po
993 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='connectors/sds.c' object='connectors/elektroid_cli-sds.o' libtool=no @AMDEPBACKSLASH@
994 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
995 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -c -o connectors/elektroid_cli-sds.o `test -f 'connectors/sds.c' || echo '$(srcdir)/'`connectors/sds.c
996
997 connectors/elektroid_cli-sds.obj: connectors/sds.c
998 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -MT connectors/elektroid_cli-sds.obj -MD -MP -MF connectors/$(DEPDIR)/elektroid_cli-sds.Tpo -c -o connectors/elektroid_cli-sds.obj `if test -f 'connectors/sds.c'; then $(CYGPATH_W) 'connectors/sds.c'; else $(CYGPATH_W) '$(srcdir)/connectors/sds.c'; fi`
999 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) connectors/$(DEPDIR)/elektroid_cli-sds.Tpo connectors/$(DEPDIR)/elektroid_cli-sds.Po
1000 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='connectors/sds.c' object='connectors/elektroid_cli-sds.obj' libtool=no @AMDEPBACKSLASH@
1001 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1002 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -c -o connectors/elektroid_cli-sds.obj `if test -f 'connectors/sds.c'; then $(CYGPATH_W) 'connectors/sds.c'; else $(CYGPATH_W) '$(srcdir)/connectors/sds.c'; fi`
1003
1004 connectors/elektroid_cli-efactor.o: connectors/efactor.c
1005 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -MT connectors/elektroid_cli-efactor.o -MD -MP -MF connectors/$(DEPDIR)/elektroid_cli-efactor.Tpo -c -o connectors/elektroid_cli-efactor.o `test -f 'connectors/efactor.c' || echo '$(srcdir)/'`connectors/efactor.c
1006 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) connectors/$(DEPDIR)/elektroid_cli-efactor.Tpo connectors/$(DEPDIR)/elektroid_cli-efactor.Po
1007 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='connectors/efactor.c' object='connectors/elektroid_cli-efactor.o' libtool=no @AMDEPBACKSLASH@
1008 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1009 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -c -o connectors/elektroid_cli-efactor.o `test -f 'connectors/efactor.c' || echo '$(srcdir)/'`connectors/efactor.c
1010
1011 connectors/elektroid_cli-efactor.obj: connectors/efactor.c
1012 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -MT connectors/elektroid_cli-efactor.obj -MD -MP -MF connectors/$(DEPDIR)/elektroid_cli-efactor.Tpo -c -o connectors/elektroid_cli-efactor.obj `if test -f 'connectors/efactor.c'; then $(CYGPATH_W) 'connectors/efactor.c'; else $(CYGPATH_W) '$(srcdir)/connectors/efactor.c'; fi`
1013 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) connectors/$(DEPDIR)/elektroid_cli-efactor.Tpo connectors/$(DEPDIR)/elektroid_cli-efactor.Po
1014 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='connectors/efactor.c' object='connectors/elektroid_cli-efactor.obj' libtool=no @AMDEPBACKSLASH@
1015 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1016 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -c -o connectors/elektroid_cli-efactor.obj `if test -f 'connectors/efactor.c'; then $(CYGPATH_W) 'connectors/efactor.c'; else $(CYGPATH_W) '$(srcdir)/connectors/efactor.c'; fi`
1017
1018 elektroid_cli-elektroid-cli.o: elektroid-cli.c
1019 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -MT elektroid_cli-elektroid-cli.o -MD -MP -MF $(DEPDIR)/elektroid_cli-elektroid-cli.Tpo -c -o elektroid_cli-elektroid-cli.o `test -f 'elektroid-cli.c' || echo '$(srcdir)/'`elektroid-cli.c
1020 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elektroid_cli-elektroid-cli.Tpo $(DEPDIR)/elektroid_cli-elektroid-cli.Po
1021 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elektroid-cli.c' object='elektroid_cli-elektroid-cli.o' libtool=no @AMDEPBACKSLASH@
1022 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1023 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -c -o elektroid_cli-elektroid-cli.o `test -f 'elektroid-cli.c' || echo '$(srcdir)/'`elektroid-cli.c
1024
1025 elektroid_cli-elektroid-cli.obj: elektroid-cli.c
1026 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -MT elektroid_cli-elektroid-cli.obj -MD -MP -MF $(DEPDIR)/elektroid_cli-elektroid-cli.Tpo -c -o elektroid_cli-elektroid-cli.obj `if test -f 'elektroid-cli.c'; then $(CYGPATH_W) 'elektroid-cli.c'; else $(CYGPATH_W) '$(srcdir)/elektroid-cli.c'; fi`
1027 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elektroid_cli-elektroid-cli.Tpo $(DEPDIR)/elektroid_cli-elektroid-cli.Po
1028 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elektroid-cli.c' object='elektroid_cli-elektroid-cli.obj' libtool=no @AMDEPBACKSLASH@
1029 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1030 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elektroid_cli_CFLAGS) $(CFLAGS) -c -o elektroid_cli-elektroid-cli.obj `if test -f 'elektroid-cli.c'; then $(CYGPATH_W) 'elektroid-cli.c'; else $(CYGPATH_W) '$(srcdir)/elektroid-cli.c'; fi`
1031
1032 mostlyclean-libtool:
1033 -rm -f *.lo
1034
1035 clean-libtool:
1036 -rm -rf .libs _libs
1037
1038 ID: $(am__tagged_files)
1039 $(am__define_uniq_tagged_files); mkid -fID $$unique
1040 tags: tags-am
1041 TAGS: tags
1042
1043 tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
1044 set x; \
1045 here=`pwd`; \
1046 $(am__define_uniq_tagged_files); \
1047 shift; \
1048 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
1049 test -n "$$unique" || unique=$$empty_fix; \
1050 if test $$# -gt 0; then \
1051 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
1052 "$$@" $$unique; \
1053 else \
1054 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
1055 $$unique; \
1056 fi; \
1057 fi
1058 ctags: ctags-am
1059
1060 CTAGS: ctags
1061 ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
1062 $(am__define_uniq_tagged_files); \
1063 test -z "$(CTAGS_ARGS)$$unique" \
1064 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
1065 $$unique
1066
1067 GTAGS:
1068 here=`$(am__cd) $(top_builddir) && pwd` \
1069 && $(am__cd) $(top_srcdir) \
1070 && gtags -i $(GTAGS_ARGS) "$$here"
1071 cscopelist: cscopelist-am
1072
1073 cscopelist-am: $(am__tagged_files)
1074 list='$(am__tagged_files)'; \
1075 case "$(srcdir)" in \
1076 [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
1077 *) sdir=$(subdir)/$(srcdir) ;; \
1078 esac; \
1079 for i in $$list; do \
1080 if test -f "$$i"; then \
1081 echo "$(subdir)/$$i"; \
1082 else \
1083 echo "$$sdir/$$i"; \
1084 fi; \
1085 done >> $(top_builddir)/cscope.files
1086
1087 distclean-tags:
1088 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
1089
1090 distdir: $(BUILT_SOURCES)
1091 $(MAKE) $(AM_MAKEFLAGS) distdir-am
1092
1093 distdir-am: $(DISTFILES)
1094 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
1095 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
1096 list='$(DISTFILES)'; \
1097 dist_files=`for file in $$list; do echo $$file; done | \
1098 sed -e "s|^$$srcdirstrip/||;t" \
1099 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
1100 case $$dist_files in \
1101 */*) $(MKDIR_P) `echo "$$dist_files" | \
1102 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
1103 sort -u` ;; \
1104 esac; \
1105 for file in $$dist_files; do \
1106 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
1107 if test -d $$d/$$file; then \
1108 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
1109 if test -d "$(distdir)/$$file"; then \
1110 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
1111 fi; \
1112 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
1113 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
1114 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
1115 fi; \
1116 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
1117 else \
1118 test -f "$(distdir)/$$file" \
1119 || cp -p $$d/$$file "$(distdir)/$$file" \
1120 || exit 1; \
1121 fi; \
1122 done
1123 check-am: all-am
1124 check: check-am
1125 all-am: Makefile $(PROGRAMS)
1126 installdirs:
1127 for dir in "$(DESTDIR)$(bindir)"; do \
1128 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
1129 done
1130 install: install-am
1131 install-exec: install-exec-am
1132 install-data: install-data-am
1133 uninstall: uninstall-am
1134
1135 install-am: all-am
1136 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
1137
1138 installcheck: installcheck-am
1139 install-strip:
1140 if test -z '$(STRIP)'; then \
1141 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
1142 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
1143 install; \
1144 else \
1145 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
1146 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
1147 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
1148 fi
1149 mostlyclean-generic:
1150
1151 clean-generic:
1152
1153 distclean-generic:
1154 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
1155 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
1156 -rm -f connectors/$(DEPDIR)/$(am__dirstamp)
1157 -rm -f connectors/$(am__dirstamp)
1158
1159 maintainer-clean-generic:
1160 @echo "This command is intended for maintainers to use"
1161 @echo "it deletes files that may require special tools to rebuild."
1162 clean: clean-am
1163
1164 clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
1165
1166 distclean: distclean-am
1167 -rm -f ./$(DEPDIR)/elektroid-audio.Po
1168 -rm -f ./$(DEPDIR)/elektroid-backend.Po
1169 -rm -f ./$(DEPDIR)/elektroid-browser.Po
1170 -rm -f ./$(DEPDIR)/elektroid-connector.Po
1171 -rm -f ./$(DEPDIR)/elektroid-elektroid.Po
1172 -rm -f ./$(DEPDIR)/elektroid-local.Po
1173 -rm -f ./$(DEPDIR)/elektroid-notifier.Po
1174 -rm -f ./$(DEPDIR)/elektroid-preferences.Po
1175 -rm -f ./$(DEPDIR)/elektroid-sample.Po
1176 -rm -f ./$(DEPDIR)/elektroid-utils.Po
1177 -rm -f ./$(DEPDIR)/elektroid_cli-backend.Po
1178 -rm -f ./$(DEPDIR)/elektroid_cli-connector.Po
1179 -rm -f ./$(DEPDIR)/elektroid_cli-elektroid-cli.Po
1180 -rm -f ./$(DEPDIR)/elektroid_cli-local.Po
1181 -rm -f ./$(DEPDIR)/elektroid_cli-sample.Po
1182 -rm -f ./$(DEPDIR)/elektroid_cli-utils.Po
1183 -rm -f connectors/$(DEPDIR)/elektroid-common.Po
1184 -rm -f connectors/$(DEPDIR)/elektroid-cz.Po
1185 -rm -f connectors/$(DEPDIR)/elektroid-efactor.Po
1186 -rm -f connectors/$(DEPDIR)/elektroid-elektron.Po
1187 -rm -f connectors/$(DEPDIR)/elektroid-microbrute.Po
1188 -rm -f connectors/$(DEPDIR)/elektroid-package.Po
1189 -rm -f connectors/$(DEPDIR)/elektroid-sds.Po
1190 -rm -f connectors/$(DEPDIR)/elektroid_cli-common.Po
1191 -rm -f connectors/$(DEPDIR)/elektroid_cli-cz.Po
1192 -rm -f connectors/$(DEPDIR)/elektroid_cli-efactor.Po
1193 -rm -f connectors/$(DEPDIR)/elektroid_cli-elektron.Po
1194 -rm -f connectors/$(DEPDIR)/elektroid_cli-microbrute.Po
1195 -rm -f connectors/$(DEPDIR)/elektroid_cli-package.Po
1196 -rm -f connectors/$(DEPDIR)/elektroid_cli-sds.Po
1197 -rm -f Makefile
1198 distclean-am: clean-am distclean-compile distclean-generic \
1199 distclean-tags
1200
1201 dvi: dvi-am
1202
1203 dvi-am:
1204
1205 html: html-am
1206
1207 html-am:
1208
1209 info: info-am
1210
1211 info-am:
1212
1213 install-data-am:
1214
1215 install-dvi: install-dvi-am
1216
1217 install-dvi-am:
1218
1219 install-exec-am: install-binPROGRAMS
1220
1221 install-html: install-html-am
1222
1223 install-html-am:
1224
1225 install-info: install-info-am
1226
1227 install-info-am:
1228
1229 install-man:
1230
1231 install-pdf: install-pdf-am
1232
1233 install-pdf-am:
1234
1235 install-ps: install-ps-am
1236
1237 install-ps-am:
1238
1239 installcheck-am:
1240
1241 maintainer-clean: maintainer-clean-am
1242 -rm -f ./$(DEPDIR)/elektroid-audio.Po
1243 -rm -f ./$(DEPDIR)/elektroid-backend.Po
1244 -rm -f ./$(DEPDIR)/elektroid-browser.Po
1245 -rm -f ./$(DEPDIR)/elektroid-connector.Po
1246 -rm -f ./$(DEPDIR)/elektroid-elektroid.Po
1247 -rm -f ./$(DEPDIR)/elektroid-local.Po
1248 -rm -f ./$(DEPDIR)/elektroid-notifier.Po
1249 -rm -f ./$(DEPDIR)/elektroid-preferences.Po
1250 -rm -f ./$(DEPDIR)/elektroid-sample.Po
1251 -rm -f ./$(DEPDIR)/elektroid-utils.Po
1252 -rm -f ./$(DEPDIR)/elektroid_cli-backend.Po
1253 -rm -f ./$(DEPDIR)/elektroid_cli-connector.Po
1254 -rm -f ./$(DEPDIR)/elektroid_cli-elektroid-cli.Po
1255 -rm -f ./$(DEPDIR)/elektroid_cli-local.Po
1256 -rm -f ./$(DEPDIR)/elektroid_cli-sample.Po
1257 -rm -f ./$(DEPDIR)/elektroid_cli-utils.Po
1258 -rm -f connectors/$(DEPDIR)/elektroid-common.Po
1259 -rm -f connectors/$(DEPDIR)/elektroid-cz.Po
1260 -rm -f connectors/$(DEPDIR)/elektroid-efactor.Po
1261 -rm -f connectors/$(DEPDIR)/elektroid-elektron.Po
1262 -rm -f connectors/$(DEPDIR)/elektroid-microbrute.Po
1263 -rm -f connectors/$(DEPDIR)/elektroid-package.Po
1264 -rm -f connectors/$(DEPDIR)/elektroid-sds.Po
1265 -rm -f connectors/$(DEPDIR)/elektroid_cli-common.Po
1266 -rm -f connectors/$(DEPDIR)/elektroid_cli-cz.Po
1267 -rm -f connectors/$(DEPDIR)/elektroid_cli-efactor.Po
1268 -rm -f connectors/$(DEPDIR)/elektroid_cli-elektron.Po
1269 -rm -f connectors/$(DEPDIR)/elektroid_cli-microbrute.Po
1270 -rm -f connectors/$(DEPDIR)/elektroid_cli-package.Po
1271 -rm -f connectors/$(DEPDIR)/elektroid_cli-sds.Po
1272 -rm -f Makefile
1273 maintainer-clean-am: distclean-am maintainer-clean-generic
1274
1275 mostlyclean: mostlyclean-am
1276
1277 mostlyclean-am: mostlyclean-compile mostlyclean-generic \
1278 mostlyclean-libtool
1279
1280 pdf: pdf-am
1281
1282 pdf-am:
1283
1284 ps: ps-am
1285
1286 ps-am:
1287
1288 uninstall-am: uninstall-binPROGRAMS
1289
1290 .MAKE: install-am install-strip
1291
1292 .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
1293 clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \
1294 ctags ctags-am distclean distclean-compile distclean-generic \
1295 distclean-libtool distclean-tags distdir dvi dvi-am html \
1296 html-am info info-am install install-am install-binPROGRAMS \
1297 install-data install-data-am install-dvi install-dvi-am \
1298 install-exec install-exec-am install-html install-html-am \
1299 install-info install-info-am install-man install-pdf \
1300 install-pdf-am install-ps install-ps-am install-strip \
1301 installcheck installcheck-am installdirs maintainer-clean \
1302 maintainer-clean-generic mostlyclean mostlyclean-compile \
1303 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
1304 tags tags-am uninstall uninstall-am uninstall-binPROGRAMS
1305
1306 .PRECIOUS: Makefile
1307
1308 PKG_CONFIG ?= pkg-config
1309
1310 # Tell versions [3.59,3.63) of GNU make to not export all variables.
1311 # Otherwise a system limit (for SysV at least) may be exceeded.
1312 .NOEXPORT:
2020 #include "../config.h"
2121 #include "audio.h"
2222
23 #define PA_BUFFER_LEN 4800
24 #define CHANNELS 1
23 #define AUDIO_PA_BUFFER_LEN (AUDIO_SAMPLE_RATE / 10)
24 #define AUDIO_CHANNELS 2
2525
2626 static const pa_buffer_attr buffer_attributes = {
2727 .maxlength = -1,
28 .tlength = PA_BUFFER_LEN * 2,
28 .tlength = AUDIO_PA_BUFFER_LEN * 2,
2929 .prebuf = 0,
3030 .minreq = -1
3131 };
3232
3333 static const pa_sample_spec sample_spec = {
3434 .format = PA_SAMPLE_S16LE,
35 .channels = CHANNELS,
36 .rate = 48000
35 .channels = AUDIO_CHANNELS,
36 .rate = AUDIO_SAMPLE_RATE
3737 };
3838
3939 static void
40 audio_success_cb (pa_stream * stream, int success, void *data)
41 {
42 struct audio *audio = data;
43 pa_threaded_mainloop_signal (audio->mainloop, 0);
44 }
45
46 static void
47 audio_wait_success (struct audio *audio, pa_operation * operation)
48 {
49 if (!operation)
50 {
51 debug_print (2, "No operation. Skipping wait...\n");
52 return;
53 }
54 while (pa_operation_get_state (operation) != PA_OPERATION_DONE)
55 {
56 pa_threaded_mainloop_wait (audio->mainloop);
57 }
58 }
59
60 static void
4061 audio_write_callback (pa_stream * stream, size_t size, void *data)
4162 {
4263 struct audio *audio = data;
43 guint req_frames;
64 guint32 req_frames;
4465 void *buffer;
45 gshort *v;
46 gint i;
47
48 if (audio->release_frames > PA_BUFFER_LEN)
66 gint16 *dst, *src;
67
68 if (audio->release_frames > AUDIO_PA_BUFFER_LEN)
4969 {
5070 pa_stream_cork (audio->stream, 1, NULL, NULL);
5171 return;
5272 }
5373
54 req_frames = size >> 1;
55 debug_print (2, "Writing %2d frames...\n", req_frames);
74 req_frames = size >> AUDIO_CHANNELS;
75
5676 pa_stream_begin_write (stream, &buffer, &size);
5777
5878 g_mutex_lock (&audio->control.mutex);
5979
60 if (!audio->sample->len)
80 debug_print (2, "Writing %d frames to %d channels...\n", req_frames,
81 audio->channels);
82
83 if (!audio->sample || !audio->sample->len)
6184 {
6285 g_mutex_unlock (&audio->control.mutex);
6386 pa_stream_cancel_write (stream);
64 debug_print (2, "Canceled\n");
65 return;
66 }
67
68 if (audio->pos == audio->sample->len >> 1 && !audio->loop)
69 {
70 g_mutex_unlock (&audio->control.mutex);
71 memset (buffer, 0, size);
87 debug_print (2, "Cancelled\n");
88 return;
89 }
90
91 memset (buffer, 0, size);
92
93 if ((audio->pos == audio->frames && !audio->loop) ||
94 audio->status == AUDIO_STATUS_PREPARING ||
95 audio->status == AUDIO_STATUS_STOPPING)
96 {
97 if (audio->status == AUDIO_STATUS_PREPARING)
98 {
99 audio->status = AUDIO_STATUS_PLAYING;
100 g_mutex_unlock (&audio->control.mutex);
101 }
102 else
103 {
104 g_mutex_unlock (&audio->control.mutex);
105 audio->release_frames += req_frames;
106 }
72107 pa_stream_write (stream, buffer, size, NULL, 0, PA_SEEK_RELATIVE);
73 audio->release_frames += req_frames;
74 return;
75 }
76
77 v = buffer;
78 for (i = 0; i < req_frames; i++)
79 {
80 if (audio->pos < audio->sample->len >> 1)
81 {
82 *v = ((short *) audio->sample->data)[audio->pos];
83 audio->pos++;
84 }
85 else
86 {
87 if (audio->loop)
88 {
89 audio->pos = 0;
90 *v = ((short *) audio->sample->data)[0];
91 }
92 else
108 return;
109 }
110
111 dst = buffer;
112 src = (gint16 *) & audio->sample->data[audio->pos << audio->channels];
113 for (gint i = 0; i < req_frames; i++)
114 {
115 if (audio->pos == audio->frames)
116 {
117 if (!audio->loop)
93118 {
94119 break;
95120 }
96 }
97 v++;
121 debug_print (2, "Sample reset\n");
122 audio->pos = 0;
123 src = (gint16 *) audio->sample->data;
124 }
125
126 *dst = *src;
127 dst++;
128 if (audio->channels == 2)
129 {
130 src++;
131 }
132 *dst = *src;
133 src++;
134 dst++;
135 audio->pos++;
98136 }
99137
100138 g_mutex_unlock (&audio->control.mutex);
101139
102 pa_stream_write (stream, buffer, i * 2, NULL, 0, PA_SEEK_RELATIVE);
140 pa_stream_write (stream, buffer, size, NULL, 0, PA_SEEK_RELATIVE);
103141 }
104142
105143 void
112150 return;
113151 }
114152
115 debug_print (1, "Stopping audio...\n");
116
117 pa_threaded_mainloop_lock (audio->mainloop);
118 if (flush)
119 {
120 operation = pa_stream_flush (audio->stream, NULL, NULL);
121 if (operation != NULL)
122 {
123 pa_operation_unref (operation);
124 }
125 }
126
127 operation = pa_stream_cork (audio->stream, 1, NULL, NULL);
128 if (operation != NULL)
129 {
130 pa_operation_unref (operation);
131 }
132 pa_threaded_mainloop_unlock (audio->mainloop);
153 g_mutex_lock (&audio->control.mutex);
154 if (audio->status == AUDIO_STATUS_PREPARING ||
155 audio->status == AUDIO_STATUS_PLAYING)
156 {
157 audio->status = AUDIO_STATUS_STOPPING;
158 g_mutex_unlock (&audio->control.mutex);
159
160 debug_print (1, "Stopping audio...\n");
161
162 pa_threaded_mainloop_lock (audio->mainloop);
163 if (flush)
164 {
165 operation =
166 pa_stream_flush (audio->stream, audio_success_cb, audio);
167 audio_wait_success (audio, operation);
168 }
169
170 operation = pa_stream_cork (audio->stream, 1, audio_success_cb, audio);
171 audio_wait_success (audio, operation);
172 pa_threaded_mainloop_unlock (audio->mainloop);
173
174 g_mutex_lock (&audio->control.mutex);
175 audio->status = AUDIO_STATUS_STOPPED;
176 g_mutex_unlock (&audio->control.mutex);
177 }
178 else
179 {
180 while (audio->status != AUDIO_STATUS_STOPPED)
181 {
182 g_mutex_unlock (&audio->control.mutex);
183 usleep (100000);
184 g_mutex_lock (&audio->control.mutex);
185 }
186 g_mutex_unlock (&audio->control.mutex);
187 }
133188 }
134189
135190 void
149204 g_mutex_lock (&audio->control.mutex);
150205 audio->pos = 0;
151206 audio->release_frames = 0;
207 audio->status = AUDIO_STATUS_PREPARING;
152208 g_mutex_unlock (&audio->control.mutex);
153209
154210 pa_threaded_mainloop_lock (audio->mainloop);
155 operation = pa_stream_cork (audio->stream, 0, NULL, NULL);
156 if (operation != NULL)
157 {
158 pa_operation_unref (operation);
159 }
211 operation = pa_stream_cork (audio->stream, 0, audio_success_cb, audio);
212 audio_wait_success (audio, operation);
160213 pa_threaded_mainloop_unlock (audio->mainloop);
161214 }
162215
169222 if (info && pa_cvolume_valid (&info->volume))
170223 {
171224 gdouble v = pa_sw_volume_to_linear (pa_cvolume_avg (&info->volume));
225 debug_print (1, "Setting volume to %f...\n", v);
172226 audio->volume_change_callback (v);
173227 }
174228 }
228282 pa_proplist_set (props,
229283 PA_PROP_APPLICATION_ICON_NAME,
230284 PACKAGE, sizeof (PACKAGE));
231 audio->stream =
232 pa_stream_new_with_proplist (context, PACKAGE, &sample_spec, NULL,
233 props);
285 audio->stream = pa_stream_new_with_proplist (context, PACKAGE,
286 &sample_spec, NULL, props);
234287 pa_proplist_free (props);
235288 pa_stream_set_state_callback (audio->stream, audio_connect_callback,
236289 audio);
237290 pa_stream_connect_playback (audio->stream, NULL, &buffer_attributes,
238291 stream_flags, NULL, NULL);
239292 pa_context_set_subscribe_callback (audio->context, audio_notify, audio);
240 operation =
241 pa_context_subscribe (audio->context,
242 PA_SUBSCRIPTION_MASK_SINK_INPUT, NULL, NULL);
293 operation = pa_context_subscribe (audio->context,
294 PA_SUBSCRIPTION_MASK_SINK_INPUT, NULL,
295 NULL);
243296 if (operation != NULL)
244297 {
245298 pa_operation_unref (operation);
247300 }
248301 }
249302
250 gint
303 void
251304 audio_init (struct audio *audio, void (*volume_change_callback) (gdouble),
252 void (*load_progress_callback) (gdouble))
253 {
254 pa_mainloop_api *api;
255 gint err = 0;
256
305 job_control_callback load_progress_callback)
306 {
257307 debug_print (1, "Initializing audio...\n");
258
259308 audio->sample = g_byte_array_new ();
260309 audio->frames = 0;
261310 audio->loop = FALSE;
262 audio->mainloop = pa_threaded_mainloop_new ();
263 api = pa_threaded_mainloop_get_api (audio->mainloop);
264 audio->context = pa_context_new (api, PACKAGE);
265311 audio->stream = NULL;
266312 audio->index = PA_INVALID_INDEX;
267313 audio->volume_change_callback = volume_change_callback;
268314 audio->control.callback = load_progress_callback;
269 audio->name = malloc (PATH_MAX);
270 audio->name[0] = 0;
315 audio->path[0] = 0;
316 audio->control.data = g_malloc (sizeof (struct sample_info));
317 audio->status = AUDIO_STATUS_STOPPED;
318 }
319
320 gint
321 audio_run (struct audio *audio)
322 {
323 pa_mainloop_api *api;
324 audio->mainloop = pa_threaded_mainloop_new ();
325 if (!audio->mainloop)
326 {
327 return -1;
328 }
329
330 api = pa_threaded_mainloop_get_api (audio->mainloop);
331 audio->context = pa_context_new (api, PACKAGE);
271332
272333 if (pa_context_connect (audio->context, NULL, PA_CONTEXT_NOFLAGS, NULL) < 0)
273334 {
274335 pa_context_unref (audio->context);
275336 pa_threaded_mainloop_free (audio->mainloop);
276337 audio->mainloop = NULL;
277 err = -1;
338 return -1;
278339 }
279340 else
280341 {
281342 pa_context_set_state_callback (audio->context, audio_context_callback,
282343 audio);
283344 pa_threaded_mainloop_start (audio->mainloop);
284
285
286 }
287
288 return err;
345 pa_threaded_mainloop_wait (audio->mainloop);
346 }
347
348 return 0;
289349 }
290350
291351 void
294354 debug_print (1, "Destroying audio...\n");
295355
296356 audio_stop (audio, TRUE);
297
298 g_byte_array_free (audio->sample, TRUE);
299 if (audio->stream)
300 {
301 pa_stream_unref (audio->stream);
302 audio->stream = NULL;
303 }
357 audio_reset_sample (audio);
358
359 g_mutex_lock (&audio->control.mutex);
304360
305361 if (audio->mainloop)
306362 {
363 pa_threaded_mainloop_stop (audio->mainloop);
364 pa_context_disconnect (audio->context);
307365 pa_context_unref (audio->context);
308 pa_threaded_mainloop_stop (audio->mainloop);
366 if (audio->stream)
367 {
368 pa_stream_unref (audio->stream);
369 audio->stream = NULL;
370 }
309371 pa_threaded_mainloop_free (audio->mainloop);
310372 audio->mainloop = NULL;
311373 }
312374
313 g_free (audio->name);
375 g_free (audio->control.data);
376 g_byte_array_free (audio->sample, TRUE);
377 audio->sample = NULL;
378
379 g_mutex_unlock (&audio->control.mutex);
314380 }
315381
316382 gboolean
323389 audio_reset_sample (struct audio *audio)
324390 {
325391 g_mutex_lock (&audio->control.mutex);
392 debug_print (1, "Resetting sample...\n");
326393 g_byte_array_set_size (audio->sample, 0);
327394 audio->frames = 0;
328395 audio->pos = 0;
396 audio->path[0] = 0;
397 audio->release_frames = AUDIO_PA_BUFFER_LEN;
398 audio->src = AUDIO_SRC_NONE;
399 audio->status = AUDIO_STATUS_STOPPED;
400 memset (audio->control.data, 0, sizeof (struct sample_info));
329401 g_mutex_unlock (&audio->control.mutex);
330402 }
331403
339411 {
340412 debug_print (1, "Setting volume to %f...\n", volume);
341413 v = pa_sw_volume_from_linear (volume);
342 pa_cvolume_set (&audio->volume, CHANNELS, v);
343
344 operation =
345 pa_context_set_sink_input_volume (audio->context, audio->index,
346 &audio->volume, NULL, NULL);
414 pa_cvolume_set (&audio->volume, AUDIO_CHANNELS, v);
415
416 operation = pa_context_set_sink_input_volume (audio->context,
417 audio->index,
418 &audio->volume, NULL,
419 NULL);
347420 if (operation != NULL)
348421 {
349422 pa_operation_unref (operation);
2121 #include <pulse/pulseaudio.h>
2222 #include "utils.h"
2323
24 enum audio_src
25 {
26 AUDIO_SRC_NONE,
27 AUDIO_SRC_LOCAL,
28 AUDIO_SRC_REMOTE
29 };
30
31 enum audio_status
32 {
33 AUDIO_STATUS_PREPARING,
34 AUDIO_STATUS_PLAYING,
35 AUDIO_STATUS_STOPPING,
36 AUDIO_STATUS_STOPPED
37 };
38
39
2440 struct audio
2541 {
2642 GByteArray *sample;
27 guint frames;
43 guint32 frames;
2844 gboolean loop;
2945 pa_threaded_mainloop *mainloop;
3046 pa_context *context;
3147 pa_stream *stream;
32 gint pos;
48 guint32 pos;
3349 pa_cvolume volume;
34 uint32_t index;
50 guint32 index;
3551 void (*volume_change_callback) (gdouble);
36 gint release_frames;
52 guint32 release_frames;
3753 struct job_control control;
38 gchar *name;
54 gchar path[PATH_MAX];
55 guint32 channels;
56 enum audio_src src;
57 enum audio_status status;
3958 };
4059
4160 void audio_play (struct audio *);
4463
4564 gboolean audio_check (struct audio *);
4665
47 gint audio_init (struct audio *, void (*)(gdouble), void (*)(gdouble));
66 void audio_init (struct audio *, void (*)(gdouble), job_control_callback);
67
68 gint audio_run (struct audio *);
4869
4970 void audio_destroy (struct audio *);
5071
0 /*
1 * backend.c
2 * Copyright (C) 2022 David García Goñi <dagargo@gmail.com>
3 *
4 * This file is part of Elektroid.
5 *
6 * Elektroid is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * Elektroid is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with Elektroid. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #include "backend.h"
21 #include "local.h"
22
23 #define BE_POLL_TIMEOUT_MS 20
24 #define BE_KB 1024
25 #define BE_MAX_TX_LEN BE_KB //With a higher value than 4 KB, functions behave erratically.
26 #define BE_INT_BUF_LEN (32 * BE_KB) //Max length of a SysEx message for Elektroid
27 #define BE_DEV_RING_BUF_LEN (256 * BE_KB)
28 #define BE_DEVICE_NAME "hw:%d,%d,%d"
29 #define BE_TMP_BUFF_LEN 256
30
31 //Identity Request Universal Sysex message
32 static const guint8 BE_MIDI_IDENTITY_REQUEST[] =
33 { 0xf0, 0x7e, 0x7f, 6, 1, 0xf7 };
34
35 gdouble
36 backend_get_storage_stats_percent (struct backend_storage_stats *statfs)
37 {
38 return (statfs->bsize - statfs->bfree) * 100.0 / statfs->bsize;
39 }
40
41 const struct fs_operations *
42 backend_get_fs_operations (struct backend *backend, gint fs,
43 const gchar * name)
44 {
45 const struct fs_operations **fs_operations = backend->fs_ops;
46 if (!fs_operations)
47 {
48 return NULL;
49 }
50 while (*fs_operations)
51 {
52 const struct fs_operations *ops = *fs_operations;
53 if (ops->fs == fs || (name && !strcmp (ops->name, name)))
54 {
55 return ops;
56 }
57 fs_operations++;
58 }
59 return NULL;
60 }
61
62 void
63 backend_enable_cache (struct backend *backend)
64 {
65 g_mutex_lock (&backend->mutex);
66 if (!backend->cache)
67 {
68 backend->cache = g_hash_table_new_full (g_bytes_hash, g_bytes_equal,
69 (GDestroyNotify) g_bytes_unref,
70 (GDestroyNotify) free_msg);
71 }
72 g_mutex_unlock (&backend->mutex);
73 }
74
75 void
76 backend_disable_cache (struct backend *backend)
77 {
78 g_mutex_lock (&backend->mutex);
79 if (backend->cache)
80 {
81 g_hash_table_destroy (backend->cache);
82 backend->cache = NULL;
83 }
84 g_mutex_unlock (&backend->mutex);
85 }
86
87 void
88 backend_destroy (struct backend *backend)
89 {
90 gint err;
91
92 debug_print (1, "Destroying backend...\n");
93
94 backend->device_desc.id = -1;
95 backend->device_desc.filesystems = 0;
96 backend->upgrade_os = NULL;
97 backend->get_storage_stats = NULL;
98 backend->type = BE_TYPE_NONE;
99
100 if (backend->inputp)
101 {
102 err = snd_rawmidi_close (backend->inputp);
103 if (err)
104 {
105 error_print ("Error while closing MIDI port: %s\n",
106 snd_strerror (err));
107 }
108 backend->inputp = NULL;
109 }
110
111 if (backend->outputp)
112 {
113 err = snd_rawmidi_close (backend->outputp);
114 if (err)
115 {
116 error_print ("Error while closing MIDI port: %s\n",
117 snd_strerror (err));
118 }
119 backend->outputp = NULL;
120 }
121
122 if (backend->buffer)
123 {
124 free (backend->buffer);
125 backend->buffer = NULL;
126 }
127
128 if (backend->pfds)
129 {
130 free (backend->pfds);
131 backend->pfds = NULL;
132 }
133
134 if (backend->destroy_data)
135 {
136 backend->destroy_data (backend);
137 }
138
139 backend_disable_cache (backend);
140 }
141
142 static void
143 backend_midi_handshake (struct backend *backend)
144 {
145 GByteArray *tx_msg;
146 GByteArray *rx_msg;
147 gint offset;
148
149 backend->device_desc.id = -1;
150 backend->device_desc.storage = 0;
151 backend->device_desc.name[0] = 0;
152 backend->device_desc.alias[0] = 0;
153 backend->device_name[0] = 0;
154 backend->fs_ops = NULL;
155 backend->destroy_data = NULL;
156 backend->upgrade_os = NULL;
157 backend->get_storage_stats = NULL;
158 memset (&backend->midi_info, 0, sizeof (struct backend_midi_info));
159
160 g_mutex_lock (&backend->mutex);
161 backend_rx_drain (backend);
162 g_mutex_unlock (&backend->mutex);
163
164 tx_msg = g_byte_array_sized_new (sizeof (BE_MIDI_IDENTITY_REQUEST));
165 g_byte_array_append (tx_msg, (guchar *) BE_MIDI_IDENTITY_REQUEST,
166 sizeof (BE_MIDI_IDENTITY_REQUEST));
167 rx_msg = backend_tx_and_rx_sysex (backend, tx_msg,
168 BE_SYSEX_TIMEOUT_GUESS_MS);
169 if (!rx_msg)
170 {
171 debug_print (1, "No MIDI identity reply\n");
172 return;
173 }
174
175 if (rx_msg->data[4] == 2)
176 {
177 if (rx_msg->len == 15 || rx_msg->len == 17)
178 {
179 offset = rx_msg->len - 15;
180 memset (backend->midi_info.company, 0, BE_COMPANY_LEN);
181 memcpy (backend->midi_info.company, &rx_msg->data[5],
182 rx_msg->len == 15 ? 1 : BE_COMPANY_LEN);
183 memcpy (backend->midi_info.family, &rx_msg->data[6 + offset],
184 BE_FAMILY_LEN);
185 memcpy (backend->midi_info.model, &rx_msg->data[8 + offset],
186 BE_MODEL_LEN);
187 memcpy (backend->midi_info.version, &rx_msg->data[10 + offset],
188 BE_VERSION_LEN);
189
190 snprintf (backend->device_name, LABEL_MAX,
191 "%02x-%02x-%02x %02x-%02x %02x-%02x %d.%d.%d.%d",
192 backend->midi_info.company[0],
193 backend->midi_info.company[1],
194 backend->midi_info.company[2],
195 backend->midi_info.family[0],
196 backend->midi_info.family[1],
197 backend->midi_info.model[0],
198 backend->midi_info.model[1],
199 backend->midi_info.version[0],
200 backend->midi_info.version[1],
201 backend->midi_info.version[2],
202 backend->midi_info.version[3]);
203 snprintf (backend->device_desc.name, LABEL_MAX,
204 backend->device_name);
205 debug_print (1, "Detected device: %s\n", backend->device_name);
206 }
207 else
208 {
209 debug_print (1, "Illegal MIDI identity reply length\n");
210 }
211 }
212 else
213 {
214 debug_print (1, "Illegal SUB-ID2\n");
215 }
216
217 free_msg (rx_msg);
218 }
219
220 gint
221 backend_init (struct backend *backend, const gchar * id)
222 {
223 snd_rawmidi_params_t *params;
224 gint err;
225
226 backend->inputp = NULL;
227 backend->outputp = NULL;
228 backend->pfds = NULL;
229 backend->rx_len = 0;
230 backend->cache = NULL;
231 backend->buffer = NULL;
232
233 if (!strcmp (id, BE_SYSTEM_ID))
234 {
235 backend->type = BE_TYPE_SYSTEM;
236 return 0;
237 }
238
239 backend->type = BE_TYPE_MIDI;
240 backend->buffer = g_malloc (sizeof (guint8) * BE_INT_BUF_LEN);
241
242 debug_print (1, "Initializing backend to '%s'...\n", id);
243
244 if ((err =
245 snd_rawmidi_open (&backend->inputp, &backend->outputp,
246 id, SND_RAWMIDI_NONBLOCK | SND_RAWMIDI_SYNC)) < 0)
247 {
248 error_print ("Error while opening MIDI port: %s\n", g_strerror (-err));
249 goto cleanup;
250 }
251
252 debug_print (1, "Setting blocking mode...\n");
253 if ((err = snd_rawmidi_nonblock (backend->outputp, 0)) < 0)
254 {
255 error_print ("Error while setting blocking mode\n");
256 goto cleanup;
257 }
258 if ((err = snd_rawmidi_nonblock (backend->inputp, 1)) < 0)
259 {
260 error_print ("Error while setting blocking mode\n");
261 goto cleanup;
262 }
263
264 debug_print (1, "Stopping device...\n");
265 if (snd_rawmidi_write (backend->outputp, "\xfc", 1) < 0)
266 {
267 error_print ("Error while stopping device\n");
268 }
269
270 backend->npfds = snd_rawmidi_poll_descriptors_count (backend->inputp);
271 backend->pfds = malloc (backend->npfds * sizeof (struct pollfd));
272
273 snd_rawmidi_poll_descriptors (backend->inputp, backend->pfds,
274 backend->npfds);
275 err = snd_rawmidi_params_malloc (&params);
276 if (err)
277 {
278 goto cleanup;
279 }
280
281 err = snd_rawmidi_params_current (backend->inputp, params);
282 if (err)
283 {
284 goto cleanup_params;
285 }
286
287 err =
288 snd_rawmidi_params_set_buffer_size (backend->inputp, params,
289 BE_DEV_RING_BUF_LEN);
290 if (err)
291 {
292 goto cleanup_params;
293 }
294
295 err = snd_rawmidi_params (backend->inputp, params);
296 if (err)
297 {
298 goto cleanup_params;
299 }
300
301 backend_midi_handshake (backend);
302
303 return 0;
304
305 cleanup_params:
306 snd_rawmidi_params_free (params);
307 cleanup:
308 backend_destroy (backend);
309 g_free (backend->buffer);
310 return err;
311 }
312
313 ssize_t
314 backend_tx_raw (struct backend *backend, const guint8 * data, guint len)
315 {
316 ssize_t tx_len;
317
318 if (!backend->outputp)
319 {
320 error_print ("Output port is NULL\n");
321 return -ENOTCONN;
322 }
323
324 snd_rawmidi_read (backend->inputp, NULL, 0); // trigger reading
325
326 tx_len = snd_rawmidi_write (backend->outputp, data, len);
327 if (tx_len < 0)
328 {
329 error_print ("Error while writing to device: %s\n",
330 snd_strerror (tx_len));
331 }
332 return tx_len;
333 }
334
335 static gint
336 backend_tx_sysex_with_state_update (struct backend *backend,
337 struct sysex_transfer *transfer,
338 gboolean update)
339 {
340 ssize_t tx_len;
341 guint total;
342 guint len;
343 guchar *b;
344
345 if (update)
346 {
347 transfer->err = 0;
348 transfer->active = TRUE;
349 transfer->status = SENDING;
350 }
351
352 b = transfer->raw->data;
353 total = 0;
354 while (total < transfer->raw->len && transfer->active)
355 {
356 len = transfer->raw->len - total;
357 if (len > BE_MAX_TX_LEN)
358 {
359 len = BE_MAX_TX_LEN;
360 }
361
362 tx_len = backend_tx_raw (backend, b, len);
363 if (tx_len < 0)
364 {
365 transfer->err = tx_len;
366 break;
367 }
368 b += len;
369 total += len;
370 }
371
372 if (!transfer->active)
373 {
374 transfer->err = -ECANCELED;
375 }
376
377 if (!transfer->err && debug_level >= 2)
378 {
379 gchar *text = debug_get_hex_data (debug_level, transfer->raw->data,
380 transfer->raw->len);
381 debug_print (2, "Raw message sent (%d): %s\n", transfer->raw->len,
382 text);
383 free (text);
384 }
385
386 if (update)
387 {
388 transfer->active = FALSE;
389 transfer->status = FINISHED;
390 }
391 return transfer->err;
392 }
393
394 gint
395 backend_tx_sysex_no_update (struct backend *backend,
396 struct sysex_transfer *transfer)
397 {
398 return backend_tx_sysex_with_state_update (backend, transfer, FALSE);
399 }
400
401 gint
402 backend_tx_sysex (struct backend *backend, struct sysex_transfer *transfer)
403 {
404 return backend_tx_sysex_with_state_update (backend, transfer, TRUE);
405 }
406
407 //Access to this function must be synchronized.
408
409 void
410 backend_rx_drain (struct backend *backend)
411 {
412 struct sysex_transfer transfer;
413 transfer.timeout = 1000;
414 transfer.batch = FALSE;
415
416 debug_print (2, "Draining buffers...\n");
417 backend->rx_len = 0;
418 snd_rawmidi_drain (backend->inputp);
419 while (!backend_rx_sysex (backend, &transfer))
420 {
421 free_msg (transfer.raw);
422 }
423 }
424
425 static inline gboolean
426 backend_is_byte_rt_msg (guint8 b)
427 {
428 return (b >= 0xf1 && b <= 0xf6) || (b >= 0xf8 && b <= 0xff);
429 }
430
431 static ssize_t
432 backend_rx_raw (struct backend *backend, struct sysex_transfer *transfer)
433 {
434 ssize_t rx_len, rx_len_msg;
435 unsigned short revents;
436 gint err;
437 gchar *text;
438 guint8 tmp[BE_TMP_BUFF_LEN];
439 guint8 *tmp_msg, *data = backend->buffer + backend->rx_len;
440
441 if (!backend->inputp)
442 {
443 error_print ("Input port is NULL\n");
444 return -ENOTCONN;
445 }
446
447 while (1)
448 {
449 if (!transfer->active)
450 {
451 return -ECANCELED;
452 }
453
454 debug_print (4, "Checking timeout (%d ms, %d ms, %s mode)...\n",
455 transfer->time, transfer->timeout,
456 transfer->batch ? "batch" : "single");
457 if (((transfer->batch && transfer->status == RECEIVING)
458 || !transfer->batch) && transfer->timeout > -1
459 && transfer->time >= transfer->timeout)
460 {
461 debug_print (1, "Timeout\n");
462 return -ETIMEDOUT;
463 }
464
465 debug_print (4, "Polling...\n");
466 err = poll (backend->pfds, backend->npfds, BE_POLL_TIMEOUT_MS);
467
468 if (err == 0)
469 {
470 if ((transfer->batch && transfer->status == RECEIVING)
471 || !transfer->batch)
472 {
473 transfer->time += BE_POLL_TIMEOUT_MS;
474 }
475 continue;
476 }
477
478 if (err < 0)
479 {
480 error_print ("Error while polling. %s.\n", g_strerror (errno));
481 if (errno == EINTR)
482 {
483 return -ECANCELED;
484 }
485 return err;
486 }
487
488 if ((err = snd_rawmidi_poll_descriptors_revents (backend->inputp,
489 backend->pfds,
490 backend->npfds,
491 &revents)) < 0)
492 {
493 error_print ("Error while getting poll events. %s.\n",
494 snd_strerror (err));
495 return err;
496 }
497
498 if (revents & (POLLERR | POLLHUP))
499 {
500 return -ENODATA;
501 }
502
503 if (!(revents & POLLIN))
504 {
505 continue;
506 }
507
508 debug_print (4, "Reading data...\n");
509 rx_len = snd_rawmidi_read (backend->inputp, tmp, BE_TMP_BUFF_LEN);
510
511 if (rx_len == -EAGAIN || rx_len == 0)
512 {
513 continue;
514 }
515
516 //Everything is skipped until a 0xf0 is found. This includes every RT MIDI message.
517 tmp_msg = tmp;
518 if (!backend->rx_len && tmp[0] != 0xf0)
519 {
520 if (debug_level >= 4)
521 {
522 gchar *text = debug_get_hex_data (debug_level, tmp, rx_len);
523 debug_print (4, "Skipping partial message (%ld): %s\n", rx_len,
524 text);
525 free (text);
526 }
527
528 tmp_msg++;
529 rx_len_msg = 1;
530 for (gint i = 1; i < rx_len; i++, tmp_msg++, rx_len_msg++)
531 {
532 if (*tmp_msg == 0xf0)
533 {
534 break;
535 }
536 }
537 rx_len -= rx_len_msg;
538 }
539
540 if (rx_len == 0)
541 {
542 transfer->time += BE_POLL_TIMEOUT_MS;
543 continue;
544 }
545
546 if (rx_len > 0)
547 {
548 memcpy (backend->buffer + backend->rx_len, tmp_msg, rx_len);
549 backend->rx_len += rx_len;
550 break;
551 }
552
553 if (rx_len < 0)
554 {
555 error_print ("Error while reading from device: %s\n",
556 snd_strerror (rx_len));
557 break;
558 }
559 }
560
561 if (debug_level >= 3)
562 {
563 text = debug_get_hex_data (debug_level, data, rx_len);
564 debug_print (3, "Queued data (%zu): %s\n", rx_len, text);
565 free (text);
566 }
567
568 return rx_len;
569 }
570
571 //Access to this function must be synchronized.
572
573 gint
574 backend_rx_sysex (struct backend *backend, struct sysex_transfer *transfer)
575 {
576 gint next_check, len, i;
577 guint8 *b;
578 ssize_t rx_len;
579
580 transfer->err = 0;
581 transfer->time = 0;
582 transfer->active = TRUE;
583 transfer->status = WAITING;
584 transfer->raw = g_byte_array_sized_new (BE_INT_BUF_LEN);
585
586 next_check = 0;
587 while (1)
588 {
589 if (backend->rx_len == next_check)
590 {
591 debug_print (4, "Reading from MIDI device...\n");
592 if (transfer->batch)
593 {
594 transfer->time = 0;
595 }
596 rx_len = backend_rx_raw (backend, transfer);
597
598 if (rx_len == -ENODATA || rx_len == -ETIMEDOUT
599 || rx_len == -ECANCELED)
600 {
601 if (transfer->batch)
602 {
603 break;
604 }
605 else
606 {
607 transfer->err = rx_len;
608 goto end;
609 }
610 }
611 else if (rx_len < 0)
612 {
613 transfer->err = -EIO;
614 goto end;
615 }
616 }
617 else
618 {
619 debug_print (4, "Reading from internal buffer...\n");
620 }
621
622 transfer->status = RECEIVING;
623 len = -1;
624 b = backend->buffer + next_check;
625 for (; next_check < backend->rx_len; next_check++, b++)
626 {
627 if (*b == 0xf7)
628 {
629 next_check++;
630 len = next_check;
631 break;
632 }
633 }
634
635 //We filter out whatever SysEx message not suitable for Elektroid.
636
637 if (len > 0)
638 {
639 debug_print (3, "Copying %d bytes...\n", len);
640
641 //Filter out RT messages
642 b = backend->buffer;
643 for (i = 0; i < len; i++, b++)
644 {
645 if (!backend_is_byte_rt_msg (*b))
646 {
647 g_byte_array_append (transfer->raw, b, 1);
648 }
649 }
650
651 backend->rx_len -= len;
652 memmove (backend->buffer, backend->buffer + next_check,
653 backend->rx_len);
654 transfer->err = 0;
655 next_check = 0;
656
657 //Filter empty message
658 if (transfer->raw->len == 2
659 && !memcmp (transfer->raw->data, "\xf0\xf7", 2))
660 {
661 debug_print (4, "Removing empty message...\n");
662 g_byte_array_remove_range (transfer->raw, 0, 2);
663 continue;
664 }
665
666 if (debug_level >= 4)
667 {
668 gchar *text =
669 debug_get_hex_data (debug_level, transfer->raw->data,
670 transfer->raw->len);
671 debug_print (4, "Queued data (%d): %s\n",
672 transfer->raw->len, text);
673 free (text);
674 }
675 }
676 else
677 {
678 debug_print (4, "No message in the queue. Continuing...\n");
679 }
680
681 if (transfer->raw->len && !transfer->batch)
682 {
683 break;
684 }
685 }
686
687 end:
688 if (!transfer->raw->len)
689 {
690 transfer->err = -ETIMEDOUT;
691 }
692 if (transfer->err)
693 {
694 free_msg (transfer->raw);
695 transfer->raw = NULL;
696 }
697 else
698 {
699 if (debug_level >= 2)
700 {
701 gchar *text = debug_get_hex_data (debug_level, transfer->raw->data,
702 transfer->raw->len);
703 debug_print (2, "Raw message received (%d): %s\n",
704 transfer->raw->len, text);
705 free (text);
706 }
707
708 }
709 transfer->active = FALSE;
710 transfer->status = FINISHED;
711 return transfer->err;
712 }
713
714 //Synchronized
715
716 gint
717 backend_tx (struct backend *backend, GByteArray * tx_msg)
718 {
719 struct sysex_transfer transfer;
720 transfer.raw = tx_msg;
721 g_mutex_lock (&backend->mutex);
722 backend_tx_sysex (backend, &transfer);
723 g_mutex_unlock (&backend->mutex);
724 free_msg (tx_msg);
725 return transfer.err;
726 }
727
728 //Not synchronized. Only meant to be called from backend_tx_and_rx_sysex_transfer.
729
730 static gint
731 backend_tx_and_rx_sysex_transfer_no_cache (struct backend *backend,
732 struct sysex_transfer *transfer,
733 gboolean free)
734 {
735 transfer->batch = FALSE;
736
737 backend_tx_sysex (backend, transfer);
738 if (free)
739 {
740 free_msg (transfer->raw);
741 transfer->raw = NULL;
742 }
743 if (!transfer->err)
744 {
745 backend_rx_sysex (backend, transfer);
746 }
747
748 return transfer->err;
749 }
750
751 //Synchronized
752
753 gint
754 backend_tx_and_rx_sysex_transfer (struct backend *backend,
755 struct sysex_transfer *transfer,
756 gboolean free)
757 {
758 GBytes *key;
759 GByteArray *rx_msg;
760 transfer->batch = FALSE;
761
762 g_mutex_lock (&backend->mutex);
763 if (backend->cache)
764 {
765 key = g_bytes_new (transfer->raw->data, transfer->raw->len);
766 rx_msg = g_hash_table_lookup (backend->cache, key);
767 if (rx_msg)
768 {
769 transfer->raw = g_byte_array_sized_new (rx_msg->len);
770 g_byte_array_append (transfer->raw, rx_msg->data, rx_msg->len);
771 transfer->err = 0;
772 g_bytes_unref (key);
773 goto end;
774 }
775
776 if (backend_tx_and_rx_sysex_transfer_no_cache (backend, transfer, free))
777 {
778 g_bytes_unref (key);
779 goto end;
780 }
781
782 rx_msg = g_byte_array_sized_new (transfer->raw->len);
783 g_byte_array_append (rx_msg, transfer->raw->data, transfer->raw->len);
784 g_hash_table_insert (backend->cache, key, rx_msg);
785 }
786 else
787 {
788 backend_tx_and_rx_sysex_transfer_no_cache (backend, transfer, free);
789 }
790
791 end:
792 g_mutex_unlock (&backend->mutex);
793 return transfer->err;
794 }
795
796 //Synchronized
797 //A timeout of 0 means infinity; a negative timeout means the default timeout.
798
799 GByteArray *
800 backend_tx_and_rx_sysex (struct backend *backend,
801 GByteArray * tx_msg, gint timeout)
802 {
803 struct sysex_transfer transfer;
804 transfer.raw = tx_msg;
805 transfer.timeout = timeout < 0 ? BE_SYSEX_TIMEOUT_MS : timeout;
806 backend_tx_and_rx_sysex_transfer (backend, &transfer, TRUE);
807 return transfer.raw;
808 }
809
810 gboolean
811 backend_check (struct backend *backend)
812 {
813 return backend->type == BE_TYPE_SYSTEM || (backend->type == BE_TYPE_MIDI
814 && backend->inputp
815 && backend->outputp);
816 }
817
818 static void
819 backend_get_system_subdevices (snd_ctl_t * ctl, int card, int device,
820 GArray * devices)
821 {
822 snd_rawmidi_info_t *info;
823 const gchar *name;
824 const gchar *sub_name;
825 int subs, subs_in, subs_out;
826 int sub;
827 int err;
828 struct backend_system_device *backend_system_device;
829
830 snd_rawmidi_info_alloca (&info);
831 snd_rawmidi_info_set_device (info, device);
832 snd_rawmidi_info_set_stream (info, SND_RAWMIDI_STREAM_INPUT);
833 err = snd_ctl_rawmidi_info (ctl, info);
834 if (err >= 0)
835 {
836 subs_in = snd_rawmidi_info_get_subdevices_count (info);
837 }
838 else
839 {
840 subs_in = 0;
841 }
842
843 snd_rawmidi_info_set_stream (info, SND_RAWMIDI_STREAM_OUTPUT);
844 err = snd_ctl_rawmidi_info (ctl, info);
845 if (err >= 0)
846 {
847 subs_out = snd_rawmidi_info_get_subdevices_count (info);
848 }
849 else
850 {
851 subs_out = 0;
852 }
853
854 subs = subs_in > subs_out ? subs_in : subs_out;
855 if (!subs)
856 {
857 return;
858 }
859
860 if (subs_in <= 0 || subs_out <= 0)
861 {
862 return;
863 }
864
865 for (sub = 0; sub < subs; sub++)
866 {
867 snd_rawmidi_info_set_subdevice (info, sub);
868
869 snd_rawmidi_info_set_stream (info, SND_RAWMIDI_STREAM_INPUT);
870 err = snd_ctl_rawmidi_info (ctl, info);
871 if (err < 0)
872 {
873 debug_print (1,
874 "Cannot get rawmidi input information %d:%d:%d: %s\n",
875 card, device, sub, snd_strerror (err));
876 continue;
877 }
878
879 snd_rawmidi_info_set_stream (info, SND_RAWMIDI_STREAM_OUTPUT);
880 err = snd_ctl_rawmidi_info (ctl, info);
881 if (err < 0)
882 {
883 debug_print (1,
884 "Cannot get rawmidi output information %d:%d:%d: %s\n",
885 card, device, sub, snd_strerror (err));
886 continue;
887 }
888
889 name = snd_rawmidi_info_get_name (info);
890 sub_name = snd_rawmidi_info_get_subdevice_name (info);
891
892 debug_print (1, "Adding hw:%d (name '%s', subname '%s')...\n", card,
893 name, sub_name);
894 backend_system_device = malloc (sizeof (struct backend_system_device));
895 snprintf (backend_system_device->id, LABEL_MAX, BE_DEVICE_NAME, card,
896 device, sub);
897 snprintf (backend_system_device->name, LABEL_MAX,
898 BE_DEVICE_NAME ": %s%s%s", card, device, sub, name,
899 strlen (sub_name) ? ", " : "", sub_name);
900
901 g_array_append_vals (devices, backend_system_device, 1);
902 }
903 }
904
905 static void
906 backend_fill_card_devices (gint card, GArray * devices)
907 {
908 snd_ctl_t *ctl;
909 gchar name[32];
910 gint device;
911 gint err;
912
913 sprintf (name, "hw:%d", card);
914 if ((err = snd_ctl_open (&ctl, name, 0)) < 0)
915 {
916 error_print ("Cannot open control for card %d: %s\n",
917 card, snd_strerror (err));
918 return;
919 }
920 device = -1;
921 while (!(err = snd_ctl_rawmidi_next_device (ctl, &device)) && device >= 0)
922 {
923 backend_get_system_subdevices (ctl, card, device, devices);
924 }
925 if (err < 0)
926 {
927 error_print ("Cannot determine device number: %s\n",
928 snd_strerror (err));
929 }
930 snd_ctl_close (ctl);
931 }
932
933 GArray *
934 backend_get_system_devices ()
935 {
936 gint card, err;
937 GArray *devices =
938 g_array_new (FALSE, FALSE, sizeof (struct backend_system_device));
939
940 card = -1;
941 while (!(err = snd_card_next (&card)) && card >= 0)
942 {
943 backend_fill_card_devices (card, devices);
944 }
945 if (err < 0)
946 {
947 error_print ("Cannot determine card number: %s\n", snd_strerror (err));
948 }
949
950 return devices;
951 }
952
953 gchar *
954 backend_get_fs_ext (const struct device_desc *desc,
955 const struct fs_operations *ops)
956 {
957 gchar *ext = malloc (LABEL_MAX);
958 snprintf (ext, LABEL_MAX, "%s", ops->type_ext);
959 return ext;
960 }
961
962 void
963 backend_destroy_data (struct backend *backend)
964 {
965 debug_print (1, "Destroying backend data...\n");
966 g_free (backend->data);
967 backend->data = NULL;
968 }
969
970 gint
971 backend_program_change (struct backend *backend, guint8 channel,
972 guint8 program)
973 {
974 ssize_t size;
975 guint8 msg[2];
976
977 msg[0] = 0xc0 | (channel & 0xf);
978 msg[1] = program & 0x7f;
979
980 if ((size = backend_tx_raw (backend, (guint8 *) msg, 2)) < 0)
981 {
982 return size;
983 }
984 return 0;
985 }
0 /*
1 * backend.h
2 * Copyright (C) 2022 David García Goñi <dagargo@gmail.com>
3 *
4 * This file is part of Elektroid.
5 *
6 * Elektroid is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * Elektroid is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with Elektroid. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #include <alsa/asoundlib.h>
21 #include "utils.h"
22
23 #ifndef BACKEND_H
24 #define BACKEND_H
25
26 #define BE_FILE_ICON_WAVE "elektroid-wave-symbolic"
27 #define BE_FILE_ICON_SEQ "elektroid-sequence-symbolic"
28 #define BE_FILE_ICON_PRJ "elektroid-project-symbolic"
29 #define BE_FILE_ICON_SND "elektroid-sound-symbolic"
30
31 #define BE_DUMP_TIMEOUT 5000 //With and E-Mu ESI-2000 it takes this more than 3 seconds to receive to receive some packets after the process has started.
32 #define BE_REST_TIME_US 50000
33 #define BE_SYSEX_TIMEOUT_MS 5000
34 #define BE_SYSEX_TIMEOUT_GUESS_MS 500 //When the request is not implemented, 5 s is too much.
35 #define BE_SAMPLE_ID_NAME_SEPARATOR ":"
36
37 #define BE_COMPANY_LEN 3
38 #define BE_FAMILY_LEN 2
39 #define BE_MODEL_LEN 2
40 #define BE_VERSION_LEN 4
41
42 #define BE_SYSTEM_ID "SYSTEM_ID"
43
44 struct backend_storage_stats
45 {
46 const gchar *name;
47 guint64 bsize;
48 guint64 bfree;
49 };
50
51 typedef void (*t_destroy_data) (struct backend *);
52
53 typedef gint (*t_get_storage_stats) (struct backend *, gint,
54 struct backend_storage_stats *);
55
56 struct backend_midi_info
57 {
58 gchar company[BE_COMPANY_LEN];
59 gchar family[BE_FAMILY_LEN];
60 gchar model[BE_MODEL_LEN];
61 gchar version[BE_VERSION_LEN];
62 };
63
64 enum backend_type
65 {
66 BE_TYPE_NONE,
67 BE_TYPE_SYSTEM,
68 BE_TYPE_MIDI
69 };
70
71 struct backend
72 {
73 enum backend_type type;
74 struct device_desc device_desc;
75 struct backend_midi_info midi_info;
76 snd_rawmidi_t *inputp;
77 snd_rawmidi_t *outputp;
78 GMutex mutex;
79 //Internal buffer
80 guint8 *buffer;
81 ssize_t rx_len;
82 //Linux
83 gint npfds;
84 struct pollfd *pfds;
85 gchar device_name[LABEL_MAX];
86 //Message cache
87 GHashTable *cache;
88 //These must be filled by the concrete backend.
89 const struct fs_operations **fs_ops;
90 t_destroy_data destroy_data;
91 t_sysex_transfer upgrade_os;
92 t_get_storage_stats get_storage_stats;
93 void *data;
94 };
95
96 struct backend_system_device
97 {
98 gchar name[LABEL_MAX];
99 gchar id[LABEL_MAX];
100 };
101
102 gint backend_init (struct backend *, const gchar *);
103
104 void backend_destroy (struct backend *);
105
106 ssize_t backend_tx_raw (struct backend *, const guint8 *, guint);
107
108 gint backend_tx_sysex_no_update (struct backend *, struct sysex_transfer *);
109
110 gint backend_tx_sysex (struct backend *, struct sysex_transfer *);
111
112 gint backend_rx_sysex (struct backend *, struct sysex_transfer *);
113
114 gint backend_tx (struct backend *, GByteArray *);
115
116 gint backend_tx_and_rx_sysex_transfer (struct backend *,
117 struct sysex_transfer *, gboolean);
118
119 GByteArray *backend_tx_and_rx_sysex (struct backend *, GByteArray *, gint);
120
121 void backend_rx_drain (struct backend *);
122
123 gboolean backend_check (struct backend *);
124
125 void backend_enable_cache (struct backend *);
126
127 void backend_disable_cache (struct backend *);
128
129 GArray *backend_get_system_devices ();
130
131 const struct fs_operations *backend_get_fs_operations (struct backend *, gint,
132 const char *);
133
134 const gchar *backend_get_fs_name (struct backend *, guint);
135
136 gchar *backend_get_fs_ext (const struct device_desc *,
137 const struct fs_operations *);
138
139 gdouble backend_get_storage_stats_percent (struct backend_storage_stats *);
140
141 void backend_destroy_data (struct backend *);
142
143 gint backend_program_change (struct backend *, guint8, guint8);
144
145 #endif
1818 */
1919
2020 #include "browser.h"
21 #include "backend.h"
22
23 static void
24 browser_widget_set_sensitive (gpointer widget, gpointer data)
25 {
26 gtk_widget_set_sensitive (GTK_WIDGET (widget), TRUE);
27 }
28
29 static void
30 browser_widget_set_insensitive (gpointer widget, gpointer data)
31 {
32 gtk_widget_set_sensitive (GTK_WIDGET (widget), FALSE);
33 }
2134
2235 gint
23 browser_sort_samples (GtkTreeModel * model,
36 browser_sort_by_name (GtkTreeModel * model,
2437 GtkTreeIter * a, GtkTreeIter * b, gpointer data)
2538 {
26 struct item *itema;
27 struct item *itemb;
39 struct item itema;
40 struct item itemb;
2841 gint ret = 0;
2942
30 itema = browser_get_item (model, a);
31 itemb = browser_get_item (model, b);
32
33 if (itema->type == itemb->type)
34 {
35 ret = g_utf8_collate (itema->name, itemb->name);
43 browser_set_item (model, a, &itema);
44 browser_set_item (model, b, &itemb);
45
46 if (itema.type == itemb.type)
47 {
48 ret = g_utf8_collate (itema.name, itemb.name);
3649 }
3750 else
3851 {
39 ret = itema->type > itemb->type;
40 }
41
42 browser_free_item (itema);
43 browser_free_item (itemb);
52 ret = itema.type > itemb.type;
53 }
4454
4555 return ret;
4656 }
4757
4858 gint
49 browser_sort_data (GtkTreeModel * model,
50 GtkTreeIter * a, GtkTreeIter * b, gpointer data)
51 {
52 struct item *itema;
53 struct item *itemb;
59 browser_sort_by_id (GtkTreeModel * model, GtkTreeIter * a, GtkTreeIter * b,
60 gpointer data)
61 {
62 struct item itema;
63 struct item itemb;
5464 gint ret = 0;
5565
56 itema = browser_get_item (model, a);
57 itemb = browser_get_item (model, b);
58
59 ret = itema->index > itemb->index;
60
61 browser_free_item (itema);
62 browser_free_item (itemb);
66 browser_set_item (model, a, &itema);
67 browser_set_item (model, b, &itemb);
68
69 ret = itema.id > itemb.id;
6370
6471 return ret;
6572 }
6673
67 struct item *
68 browser_get_item (GtkTreeModel * model, GtkTreeIter * iter)
69 {
70 struct item *item = malloc (sizeof (struct item));
71
74 void
75 browser_set_item (GtkTreeModel * model, GtkTreeIter * iter, struct item *item)
76 {
77 gchar *name;
7278 gtk_tree_model_get (model, iter, BROWSER_LIST_STORE_TYPE_FIELD, &item->type,
73 BROWSER_LIST_STORE_NAME_FIELD, &item->name,
79 BROWSER_LIST_STORE_NAME_FIELD, &name,
7480 BROWSER_LIST_STORE_SIZE_FIELD, &item->size,
75 BROWSER_LIST_STORE_INDEX_FIELD, &item->index, -1);
76
77 return item;
81 BROWSER_LIST_STORE_INDEX_FIELD, &item->id, -1);
82 snprintf (item->name, LABEL_MAX, "%s", name);
83 g_free (name);
7884 }
7985
8086 void
119125 void
120126 browser_go_up (GtkWidget * object, gpointer data)
121127 {
122 char *dup;
123 char *new_path;
124 struct browser *browser = data;
125
126 if (strcmp (browser->dir, "/") != 0)
127 {
128 dup = strdup (browser->dir);
129 new_path = dirname (dup);
130 strcpy (browser->dir, new_path);
131 free (dup);
132 if (browser->notify_dir_change)
128 struct browser *browser = data;
129
130 g_mutex_lock (&browser->mutex);
131 if (!browser->loading)
132 {
133 if (strcmp (browser->dir, "/"))
133134 {
134 browser->notify_dir_change (browser);
135 gchar *dup = strdup (browser->dir);
136 gchar *new_path = dirname (dup);
137 strcpy (browser->dir, new_path);
138 free (dup);
135139 }
136140 }
141 g_mutex_unlock (&browser->mutex);
137142
138143 g_idle_add (browser_load_dir, browser);
139144 }
143148 GtkTreeViewColumn * column, gpointer data)
144149 {
145150 GtkTreeIter iter;
146 struct item *item;
151 struct item item;
147152 struct browser *browser = data;
148153 GtkTreeModel *model = GTK_TREE_MODEL (gtk_tree_view_get_model
149154 (browser->view));
150155
151156 gtk_tree_model_get_iter (model, &iter, path);
152 item = browser_get_item (model, &iter);
153
154 if (item->type == ELEKTROID_DIR)
155 {
156 if (strcmp (browser->dir, "/") != 0)
157 browser_set_item (model, &iter, &item);
158
159 if (item.type == ELEKTROID_DIR)
160 {
161 if (strcmp (browser->dir, "/"))
157162 {
158163 strcat (browser->dir, "/");
159164 }
160 strcat (browser->dir, item->name);
165 strcat (browser->dir, item.name);
161166 browser_load_dir (browser);
162 if (browser->notify_dir_change)
163 {
164 browser->notify_dir_change (browser);
165 }
166 }
167
168 browser_free_item (item);
167 }
169168 }
170169
171170 gint
176175 return gtk_tree_selection_count_selected_rows (selection);
177176 }
178177
179 void
180 browser_free_item (struct item *item)
181 {
182 g_free (item->name);
183 g_free (item);
184 }
185
186178 gchar *
187179 browser_get_item_path (struct browser *browser, struct item *item)
188180 {
189181 gchar *path = chain_path (browser->dir, item->name);
190182 debug_print (1, "Using %s path for item %s (%d)...\n", path, item->name,
191 item->index);
183 item->id);
192184 return path;
193185 }
194186
195187 gchar *
196188 browser_get_item_id_path (struct browser *browser, struct item *item)
197189 {
198 gchar *id = browser->fs_ops->getid (item);
190 gchar *id = browser->fs_ops->get_id (item);
199191 gchar *path = chain_path (browser->dir, id);
200192 debug_print (1, "Using %s path for item %s (%d)...\n", path, item->name,
201 item->index);
193 item->id);
202194 g_free (id);
203195 return path;
204196 }
205197
206198 static void
207 local_add_dentry_item (struct browser *browser, struct item_iterator *iter)
208 {
209 gchar *hsize;
199 browser_add_dentry_item (struct browser *browser, struct item_iterator *iter)
200 {
201 gchar *hsize, *slot;
210202 GtkListStore *list_store =
211203 GTK_LIST_STORE (gtk_tree_view_get_model (browser->view));
212204
213205 hsize = iter->item.size ? get_human_size (iter->item.size, TRUE) : "";
206 slot = (browser->fs_ops->options & FS_OPTION_SLOT_STORAGE)
207 && browser->fs_ops->get_slot ? browser->fs_ops->get_slot (&iter->item,
208 browser->backend)
209 : "";
214210
215211 gtk_list_store_insert_with_values (list_store, NULL, -1,
216212 BROWSER_LIST_STORE_ICON_FIELD,
226222 BROWSER_LIST_STORE_TYPE_FIELD,
227223 iter->item.type,
228224 BROWSER_LIST_STORE_INDEX_FIELD,
229 iter->item.index, -1);
225 iter->item.id,
226 BROWSER_LIST_STORE_SLOT_FIELD, slot, -1);
230227 if (strlen (hsize))
231228 {
232229 g_free (hsize);
233230 }
231
232 if (strlen (slot))
233 {
234 g_free (slot);
235 }
234236 }
235237
236238 static gboolean
237 browser_file_match_extensions (struct browser *browser,
238 struct item_iterator *iter)
239 {
240 gboolean match;
241 const gchar *entry_ext;
242 gchar **ext = browser->extensions;
243
244 if (iter->item.type == ELEKTROID_DIR)
245 {
246 return TRUE;
247 }
248
249 if (!ext)
250 {
251 return TRUE;
252 }
253
254 entry_ext = get_ext (iter->item.name);
255
256 if (!entry_ext)
257 {
258 return FALSE;
259 }
260
261 match = FALSE;
262 while (*ext != NULL && !match)
263 {
264 match = !strcasecmp (entry_ext, *ext);
265 ext++;
266 }
267
268 return match;
239 browser_load_dir_runner_hide_spinner (gpointer data)
240 {
241 struct browser *browser = data;
242 g_slist_foreach (browser->sensitive_widgets, browser_widget_set_sensitive,
243 NULL);
244 gtk_spinner_stop (GTK_SPINNER (browser->spinner));
245 gtk_stack_set_visible_child_name (GTK_STACK (browser->stack), "list");
246 return FALSE;
247 }
248
249 static gboolean
250 browser_load_dir_runner_show_spinner (gpointer data)
251 {
252 struct browser *browser = data;
253 g_slist_foreach (browser->sensitive_widgets, browser_widget_set_insensitive,
254 NULL);
255 gtk_stack_set_visible_child_name (GTK_STACK (browser->stack), "spinner");
256 gtk_spinner_start (GTK_SPINNER (browser->spinner));
257 return FALSE;
258 }
259
260 static gboolean
261 browser_load_dir_runner_update_ui (gpointer data)
262 {
263 struct browser *browser = data;
264 gboolean active = !browser->backend
265 || browser->backend->type == BE_TYPE_SYSTEM;
266
267 notifier_set_active (browser->notifier, active);
268
269 if (browser->iter)
270 {
271 while (!next_item_iterator (browser->iter))
272 {
273 if (iter_matches_extensions (browser->iter, browser->extensions))
274 {
275 browser_add_dentry_item (browser, browser->iter);
276 }
277 }
278 free_item_iterator (browser->iter);
279 g_free (browser->iter);
280 browser->iter = NULL;
281 }
282
283 g_thread_join (browser->thread);
284 browser->thread = NULL;
285
286 if (browser->check_callback)
287 {
288 browser->check_callback ();
289 }
290 gtk_tree_view_columns_autosize (browser->view);
291
292 g_mutex_lock (&browser->mutex);
293 browser->loading = FALSE;
294 g_mutex_unlock (&browser->mutex);
295
296 return FALSE;
297 }
298
299 static gpointer
300 browser_load_dir_runner (gpointer data)
301 {
302 gint err;
303 struct browser *browser = data;
304
305 g_idle_add (browser_load_dir_runner_show_spinner, browser);
306 browser->iter = g_malloc (sizeof (struct item_iterator));
307 err = browser->fs_ops->readdir (browser->backend, browser->iter,
308 browser->dir);
309 g_idle_add (browser_load_dir_runner_hide_spinner, browser);
310 if (err)
311 {
312 error_print ("Error while opening '%s' dir\n", browser->dir);
313 g_free (browser->iter);
314 browser->iter = NULL;
315 }
316 g_idle_add (browser_load_dir_runner_update_ui, browser);
317 return NULL;
269318 }
270319
271320 gboolean
272321 browser_load_dir (gpointer data)
273322 {
274 struct item_iterator iter;
275 struct browser *browser = data;
323 struct browser *browser = data;
324
325 g_mutex_lock (&browser->mutex);
326 if (browser->loading)
327 {
328 debug_print (1, "Browser already loading. Skipping load...\n");
329 g_mutex_unlock (&browser->mutex);
330 return FALSE;
331 }
332 else
333 {
334 browser->loading = TRUE;
335 }
336 g_mutex_unlock (&browser->mutex);
276337
277338 browser_reset (browser);
278339
279 if (browser->fs_ops->readdir (&iter, browser->dir, browser->data))
280 {
281 error_print ("Error while opening %s dir\n", browser->dir);
282 goto end;
283 }
284
285 while (!next_item_iterator (&iter))
286 {
287 if (browser_file_match_extensions (browser, &iter))
288 {
289 local_add_dentry_item (browser, &iter);
290 }
291 }
292 free_item_iterator (&iter);
293
294 end:
295 if (browser->check_callback)
296 {
297 browser->check_callback ();
298 }
299 gtk_tree_view_columns_autosize (browser->view);
340 if (!browser->fs_ops || !browser->fs_ops->readdir)
341 {
342 return FALSE;
343 }
344
345 browser->thread = g_thread_new ("browser_thread", browser_load_dir_runner,
346 browser);
300347 return FALSE;
301348 }
349
350 void
351 browser_update_fs_options (struct browser *browser)
352 {
353 gtk_widget_set_visible (browser->add_dir_button,
354 browser->fs_ops && browser->fs_ops->mkdir != NULL);
355 gtk_widget_set_sensitive (browser->refresh_button,
356 browser->fs_ops
357 && browser->fs_ops->readdir != NULL);
358 gtk_widget_set_sensitive (browser->up_button, browser->fs_ops
359 && browser->fs_ops->readdir != NULL);
360 }
361
362 void
363 browser_init (struct browser *browser)
364 {
365 browser->notifier = g_malloc (sizeof (struct notifier));
366 notifier_init (browser->notifier, browser);
367 }
368
369 void
370 browser_destroy (struct browser *browser)
371 {
372 notifier_destroy (browser->notifier);
373 g_free (browser->notifier);
374 if (browser->thread)
375 {
376 g_thread_join (browser->thread);
377 }
378 g_slist_free (browser->sensitive_widgets);
379 }
380
381 void
382 browser_set_options (struct browser *browser)
383 {
384 GtkTreeSortable *sortable =
385 GTK_TREE_SORTABLE (gtk_tree_view_get_model (browser->view));
386
387 if (browser->fs_ops->options & FS_OPTION_SORT_BY_ID)
388 {
389 gtk_tree_sortable_set_sort_func (sortable,
390 BROWSER_LIST_STORE_INDEX_FIELD,
391 browser_sort_by_id, NULL, NULL);
392 gtk_tree_sortable_set_sort_column_id (sortable,
393 BROWSER_LIST_STORE_INDEX_FIELD,
394 GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID);
395 }
396 else if (browser->fs_ops->options & FS_OPTION_SORT_BY_NAME)
397 {
398 gtk_tree_sortable_set_sort_func (sortable,
399 BROWSER_LIST_STORE_NAME_FIELD,
400 browser_sort_by_name, NULL, NULL);
401 gtk_tree_sortable_set_sort_column_id (sortable,
402 BROWSER_LIST_STORE_NAME_FIELD,
403 GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID);
404 }
405 else
406 {
407 gtk_tree_sortable_set_sort_column_id (sortable,
408 GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID,
409 GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID);
410 }
411 }
2020 #include <gtk/gtk.h>
2121 #include <libgen.h>
2222 #include "utils.h"
23 #include "notifier.h"
2324
2425 #ifndef BROWSER_H
2526 #define BROWSER_H
2728 #define SIZE_LABEL_LEN 16
2829
2930 #define DIR_ICON "folder-visiting-symbolic"
30 #define FILE_ICON_WAVE "elektroid-wave-symbolic"
31 #define FILE_ICON_DATA "elektroid-data-symbolic"
32 #define FILE_ICON_PRJ "elektroid-project-symbolic"
33 #define FILE_ICON_SND "elektroid-sound-symbolic"
3431
3532 enum browser_list_field
3633 {
3936 BROWSER_LIST_STORE_SIZE_FIELD,
4037 BROWSER_LIST_STORE_SIZE_STR_FIELD,
4138 BROWSER_LIST_STORE_TYPE_FIELD,
42 BROWSER_LIST_STORE_INDEX_FIELD
39 BROWSER_LIST_STORE_INDEX_FIELD,
40 BROWSER_LIST_STORE_SLOT_FIELD //This is a human readable index
4341 };
4442
4543 struct browser
4644 {
45 const gchar *name;
4746 GSourceFunc check_selection;
4847 GtkTreeView *view;
4948 GtkWidget *up_button;
5655 GtkTreePath *dnd_motion_path;
5756 gint dnd_timeout_function_id;
5857 GString *dnd_data;
59 void (*notify_dir_change) (struct browser *);
6058 const gchar *file_icon;
6159 gchar **extensions;
6260 const struct fs_operations *fs_ops;
63 void *data;
61 struct backend *backend;
6462 gboolean (*check_callback) ();
63 struct notifier *notifier;
64 //Background loading members
65 GSList *sensitive_widgets;
66 GtkWidget *stack;
67 GtkWidget *spinner;
68 GThread *thread;
69 GMutex mutex;
70 gboolean loading;
71 struct item_iterator *iter;
6572 };
6673
67 gint browser_sort_samples (GtkTreeModel *, GtkTreeIter *, GtkTreeIter *,
68 gpointer);
69
70 gint browser_sort_data (GtkTreeModel *, GtkTreeIter *, GtkTreeIter *,
71 gpointer);
72
73 struct item *browser_get_item (GtkTreeModel *, GtkTreeIter *);
74
75 void browser_free_item (struct item *);
74 void browser_set_item (GtkTreeModel *, GtkTreeIter *, struct item *);
7675
7776 gint browser_get_selected_items_count (struct browser *);
7877
9594
9695 gboolean browser_load_dir (gpointer);
9796
97 void browser_update_fs_options (struct browser *);
98
99 void browser_init (struct browser *);
100
101 void browser_destroy (struct browser *);
102
103 void browser_set_options (struct browser *);
104
98105 #endif
1717 * along with Elektroid. If not, see <http://www.gnu.org/licenses/>.
1818 */
1919
20 #include <stdio.h>
21 #include <math.h>
22 #include <endian.h>
23 #include <poll.h>
24 #include <zlib.h>
25 #include <libgen.h>
20 #include <glib/gi18n.h>
21 #include "backend.h"
22 #include "local.h"
2623 #include "connector.h"
27 #include "utils.h"
28 #include "sample.h"
29 #include "package.h"
30 #include "../config.h"
24 #include "connectors/elektron.h"
25 #include "connectors/microbrute.h"
26 #include "connectors/cz.h"
27 #include "connectors/sds.h"
28 #include "connectors/efactor.h"
3129
32 #define KB 1024
33 #define BUFF_SIZE (4 * KB)
34 #define RING_BUFF_SIZE (256 * KB)
35 #define DATA_TRANSF_BLOCK_BYTES 0x2000
36 #define OS_TRANSF_BLOCK_BYTES 0x800
37 #define POLL_TIMEOUT 20
38 #define MAX_ZIP_SIZE (128 * 1024 * 1024)
39
40 #define FS_DATA_PRJ_PREFIX "/projects"
41 #define FS_DATA_SND_PREFIX "/soundbanks"
42 #define FS_SAMPLES_START_POS 5
43 #define FS_DATA_START_POS 18
44 #define FS_SAMPLES_SIZE_POS_W 21
45 #define FS_SAMPLES_LAST_FRAME_POS_W 33
46 #define FS_SAMPLES_PAD_RES 22
47 #define ELEKTRON_SAMPLE_INFO_PAD_I32_LEN 10
48
49 struct elektron_sample_info
30 static gint
31 default_handshake (struct backend *backend)
5032 {
51 guint32 type;
52 guint32 sample_len_bytes;
53 guint32 sample_rate;
54 guint32 loop_start;
55 guint32 loop_end;
56 guint32 loop_type;
57 guint32 padding[ELEKTRON_SAMPLE_INFO_PAD_I32_LEN];
58 };
59
60 typedef GByteArray *(*connector_msg_id_func) (guint);
61
62 typedef GByteArray *(*connector_msg_id_len_func) (guint, guint);
63
64 typedef GByteArray *(*connector_msg_path_func) (const gchar *);
65
66 typedef GByteArray *(*connector_msg_path_len_func) (const gchar *, guint);
67
68 typedef GByteArray *(*connector_msg_read_blk_func) (guint, guint, guint);
69
70 typedef GByteArray *(*connector_msg_write_blk_func) (guint, GByteArray *,
71 guint *, guint, void *);
72
73 typedef void (*connector_copy_array) (GByteArray *, GByteArray *);
74
75 typedef gint (*connector_path_func) (struct connector *, const gchar *);
76
77 typedef gint (*connector_src_dst_func) (struct connector *, const gchar *,
78 const gchar *);
79
80 static gint connector_delete_samples_dir (struct connector *, const gchar *);
81
82 static gint connector_read_samples_dir (struct item_iterator *, const gchar *,
83 void *);
84
85 static gint connector_create_samples_dir (const gchar *, void *);
86
87 static gint connector_delete_samples_item (const gchar *, void *);
88
89 static gint connector_move_samples_item (const gchar *, const gchar *,
90 void *);
91
92 static gint connector_download_sample (const gchar *, GByteArray *,
93 struct job_control *, void *);
94
95 static gint connector_upload_sample (const gchar *, GByteArray *,
96 struct job_control *, void *);
97
98 static gint connector_delete_raw_dir (struct connector *, const gchar *);
99
100 static gint connector_read_raw_dir (struct item_iterator *, const gchar *,
101 void *);
102
103 static gint connector_create_raw_dir (const gchar *, void *);
104
105 static gint connector_delete_raw_item (const gchar *, void *);
106
107 static gint connector_move_raw_item (const gchar *, const gchar *, void *);
108
109 static gint connector_download_raw (const gchar *, GByteArray *,
110 struct job_control *, void *);
111
112 static gint connector_upload_raw (const gchar *, GByteArray *,
113 struct job_control *, void *);
114
115 static gint connector_read_data_dir_any (struct item_iterator *,
116 const gchar *, void *);
117
118 static gint connector_read_data_dir_prj (struct item_iterator *,
119 const gchar *, void *);
120
121 static gint connector_read_data_dir_snd (struct item_iterator *,
122 const gchar *, void *);
123
124 static gint connector_move_data_item_any (const gchar *, const gchar *,
125 void *);
126 static gint connector_move_data_item_prj (const gchar *, const gchar *,
127 void *);
128 static gint connector_move_data_item_snd (const gchar *, const gchar *,
129 void *);
130
131 static gint connector_copy_data_item_any (const gchar *, const gchar *,
132 void *);
133
134 static gint connector_copy_data_item_prj (const gchar *, const gchar *,
135 void *);
136
137 static gint connector_copy_data_item_snd (const gchar *, const gchar *,
138 void *);
139
140 static gint connector_clear_data_item_any (const gchar *, void *);
141
142 static gint connector_clear_data_item_prj (const gchar *, void *);
143
144 static gint connector_clear_data_item_snd (const gchar *, void *);
145
146 static gint connector_swap_data_item_any (const gchar *, const gchar *,
147 void *);
148
149 static gint connector_swap_data_item_prj (const gchar *, const gchar *,
150 void *);
151
152 static gint connector_swap_data_item_snd (const gchar *, const gchar *,
153 void *);
154
155 static gint connector_download_data_any (const gchar *, GByteArray *,
156 struct job_control *, void *);
157
158 static gint connector_download_data_snd_pkg (const gchar *, GByteArray *,
159 struct job_control *, void *);
160
161 static gint connector_download_data_prj_pkg (const gchar *, GByteArray *,
162 struct job_control *, void *);
163
164 static gint connector_download_raw_pst_pkg (const gchar *, GByteArray *,
165 struct job_control *, void *);
166
167
168 static gint connector_upload_data_any (const gchar *, GByteArray *,
169 struct job_control *, void *);
170
171 static gint connector_upload_data_prj_pkg (const gchar *, GByteArray *,
172 struct job_control *, void *);
173
174 static gint connector_upload_data_snd_pkg (const gchar *, GByteArray *,
175 struct job_control *, void *);
176
177 static gint connector_upload_raw_pst_pkg (const gchar *, GByteArray *,
178 struct job_control *, void *);
179
180 static gint connector_copy_iterator (struct item_iterator *,
181 struct item_iterator *, gboolean);
182
183 static const guint8 MSG_HEADER[] = { 0xf0, 0, 0x20, 0x3c, 0x10, 0 };
184
185 static const guint8 PING_REQUEST[] = { 0x1 };
186 static const guint8 SOFTWARE_VERSION_REQUEST[] = { 0x2 };
187 static const guint8 DEVICEUID_REQUEST[] = { 0x3 };
188 static const guint8 STORAGEINFO_REQUEST[] = { 0x5 };
189
190 static const guint8 FS_SAMPLE_READ_DIR_REQUEST[] = { 0x10 };
191 static const guint8 FS_SAMPLE_CREATE_DIR_REQUEST[] = { 0x11 };
192 static const guint8 FS_SAMPLE_DELETE_DIR_REQUEST[] = { 0x12 };
193 static const guint8 FS_SAMPLE_DELETE_FILE_REQUEST[] = { 0x20 };
194 static const guint8 FS_SAMPLE_RENAME_FILE_REQUEST[] = { 0x21 };
195 static const guint8 FS_SAMPLE_GET_FILE_INFO_FROM_HASH_AND_SIZE_REQUEST[] =
196 { 0x23, 0, 0, 0, 0, 0, 0, 0, 0 };
197 static const guint8 FS_SAMPLE_OPEN_FILE_READER_REQUEST[] = { 0x30 };
198 static const guint8 FS_SAMPLE_CLOSE_FILE_READER_REQUEST[] = { 0x31 };
199 static const guint8 FS_SAMPLE_READ_FILE_REQUEST[] =
200 { 0x32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
201 static const guint8 FS_SAMPLE_OPEN_FILE_WRITER_REQUEST[] =
202 { 0x40, 0, 0, 0, 0 };
203 static const guint8 FS_SAMPLE_CLOSE_FILE_WRITER_REQUEST[] =
204 { 0x41, 0, 0, 0, 0, 0, 0, 0, 0 };
205 static const guint8 FS_SAMPLE_WRITE_FILE_REQUEST[] =
206 { 0x42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
207
208 static const guint8 FS_RAW_READ_DIR_REQUEST[] = { 0x14 };
209 static const guint8 FS_RAW_CREATE_DIR_REQUEST[] = { 0x15 };
210 static const guint8 FS_RAW_DELETE_DIR_REQUEST[] = { 0x16 };
211 static const guint8 FS_RAW_DELETE_FILE_REQUEST[] = { 0x24 };
212 static const guint8 FS_RAW_RENAME_FILE_REQUEST[] = { 0x25 };
213 static const guint8 FS_RAW_OPEN_FILE_READER_REQUEST[] = { 0x33 };
214 static const guint8 FS_RAW_CLOSE_FILE_READER_REQUEST[] = { 0x34 };
215 static const guint8 FS_RAW_READ_FILE_REQUEST[] =
216 { 0x35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
217 static const guint8 FS_RAW_OPEN_FILE_WRITER_REQUEST[] = { 0x43, 0, 0, 0, 0 };
218 static const guint8 FS_RAW_CLOSE_FILE_WRITER_REQUEST[] =
219 { 0x44, 0, 0, 0, 0, 0, 0, 0, 0 };
220 static const guint8 FS_RAW_WRITE_FILE_REQUEST[] =
221 { 0x45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
222
223 static const guint8 DATA_LIST_REQUEST[] = { 0x53 };
224 static const guint8 DATA_READ_OPEN_REQUEST[] = { 0x54 };
225 static const guint8 DATA_READ_PARTIAL_REQUEST[] = { 0x55 };
226 static const guint8 DATA_READ_CLOSE_REQUEST[] = { 0x56 };
227 static const guint8 DATA_WRITE_OPEN_REQUEST[] = { 0x57 };
228 static const guint8 DATA_WRITE_PARTIAL_REQUEST[] = { 0x58 };
229 static const guint8 DATA_WRITE_CLOSE_REQUEST[] = { 0x59 };
230 static const guint8 DATA_MOVE_REQUEST[] = { 0x5a };
231 static const guint8 DATA_COPY_REQUEST[] = { 0x5b };
232 static const guint8 DATA_CLEAR_REQUEST[] = { 0x5c };
233 static const guint8 DATA_SWAP_REQUEST[] = { 0x5d };
234 static const guint8 OS_UPGRADE_START_REQUEST[] =
235 { 0x50, 0, 0, 0, 0, 's', 'y', 's', 'e', 'x', '\0', 1 };
236 static const guint8 OS_UPGRADE_WRITE_RESPONSE[] =
237 { 0x51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
238
239 static const gchar *FS_TYPE_NAMES[] = { "+Drive", "RAM" };
240
241 static const struct fs_operations FS_SAMPLES_OPERATIONS = {
242 .fs = FS_SAMPLES,
243 .readdir = connector_read_samples_dir,
244 .mkdir = connector_create_samples_dir,
245 .delete = connector_delete_samples_item,
246 .rename = connector_move_samples_item,
247 .move = connector_move_samples_item,
248 .copy = NULL,
249 .clear = NULL,
250 .swap = NULL,
251 .download = connector_download_sample,
252 .upload = connector_upload_sample,
253 .getid = get_item_name,
254 .load = sample_load,
255 .save = sample_save,
256 .extension = "wav"
257 };
258
259 static const struct fs_operations FS_RAW_ANY_OPERATIONS = {
260 .fs = FS_RAW_ALL,
261 .readdir = connector_read_raw_dir,
262 .mkdir = connector_create_raw_dir,
263 .delete = connector_delete_raw_item,
264 .rename = connector_move_raw_item,
265 .move = connector_move_raw_item,
266 .copy = NULL,
267 .clear = NULL,
268 .swap = NULL,
269 .download = connector_download_raw,
270 .upload = connector_upload_raw,
271 .getid = get_item_name,
272 .load = load_file,
273 .save = save_file,
274 .extension = "raw"
275 };
276
277 static const struct fs_operations FS_RAW_PRESETS_OPERATIONS = {
278 .fs = FS_RAW_PRESETS,
279 .readdir = connector_read_raw_dir,
280 .mkdir = connector_create_raw_dir,
281 .delete = connector_delete_raw_item,
282 .rename = connector_move_raw_item,
283 .move = connector_move_raw_item,
284 .copy = NULL,
285 .clear = NULL,
286 .swap = NULL,
287 .download = connector_download_raw_pst_pkg,
288 .upload = connector_upload_raw_pst_pkg,
289 .getid = get_item_name,
290 .load = load_file,
291 .save = save_file,
292 .extension = "pst"
293 };
294
295 static const struct fs_operations FS_DATA_ANY_OPERATIONS = {
296 .fs = FS_DATA_ALL,
297 .readdir = connector_read_data_dir_any,
298 .mkdir = NULL,
299 .delete = connector_clear_data_item_any,
300 .rename = NULL,
301 .move = connector_move_data_item_any,
302 .copy = connector_copy_data_item_any,
303 .clear = connector_clear_data_item_any,
304 .swap = connector_swap_data_item_any,
305 .download = connector_download_data_any,
306 .upload = connector_upload_data_any,
307 .getid = get_item_index,
308 .load = load_file,
309 .save = save_file,
310 .extension = "data"
311 };
312
313 static const struct fs_operations FS_DATA_PRJ_OPERATIONS = {
314 .fs = FS_DATA_PRJ,
315 .readdir = connector_read_data_dir_prj,
316 .mkdir = NULL,
317 .delete = connector_clear_data_item_prj,
318 .rename = NULL,
319 .move = connector_move_data_item_prj,
320 .copy = connector_copy_data_item_prj,
321 .clear = connector_clear_data_item_prj,
322 .swap = connector_swap_data_item_prj,
323 .download = connector_download_data_prj_pkg,
324 .upload = connector_upload_data_prj_pkg,
325 .getid = get_item_index,
326 .load = load_file,
327 .save = save_file,
328 .extension = "prj"
329 };
330
331 static const struct fs_operations FS_DATA_SND_OPERATIONS = {
332 .fs = FS_DATA_SND,
333 .readdir = connector_read_data_dir_snd,
334 .mkdir = NULL,
335 .delete = connector_clear_data_item_snd,
336 .rename = NULL,
337 .move = connector_move_data_item_snd,
338 .copy = connector_copy_data_item_snd,
339 .clear = connector_clear_data_item_snd,
340 .swap = connector_swap_data_item_snd,
341 .download = connector_download_data_snd_pkg,
342 .upload = connector_upload_data_snd_pkg,
343 .getid = get_item_index,
344 .load = load_file,
345 .save = save_file,
346 .extension = "snd"
347 };
348
349 static const struct fs_operations *FS_OPERATIONS[] = {
350 &FS_SAMPLES_OPERATIONS, &FS_RAW_ANY_OPERATIONS, &FS_RAW_PRESETS_OPERATIONS,
351 &FS_DATA_ANY_OPERATIONS, &FS_DATA_PRJ_OPERATIONS, &FS_DATA_SND_OPERATIONS
352 };
353
354 static const int FS_OPERATIONS_N =
355 sizeof (FS_OPERATIONS) / sizeof (struct fs_operations *);
356
357 static enum item_type connector_get_path_type (struct connector *,
358 const gchar *,
359 fs_init_iter_func);
360
361 static void
362 connector_free_iterator_data (void *iter_data)
363 {
364 struct connector_iterator_data *data = iter_data;
365
366 if (!data->cached)
33 backend->type = BE_TYPE_MIDI;
34 backend->device_desc.filesystems = 0;
35 backend->fs_ops = NULL;
36 backend->destroy_data = backend_destroy_data;
37 if (strlen (backend->device_name))
36738 {
368 free_msg (data->msg);
369 }
370 g_free (data);
371 }
372
373 const struct fs_operations *
374 connector_get_fs_operations (enum connector_fs fs)
375 {
376 const struct fs_operations *fs_operations = NULL;
377 for (int i = 0; i < FS_OPERATIONS_N; i++)
378 {
379 if (FS_OPERATIONS[i]->fs == fs)
380 {
381 fs_operations = FS_OPERATIONS[i];
382 break;
383 }
384 }
385 return fs_operations;
386 }
387
388 static inline gchar *
389 connector_get_utf8 (const gchar * s)
390 {
391 return g_convert (s, -1, "UTF8", "CP1252", NULL, NULL, NULL);
392 }
393
394 static inline gchar *
395 connector_get_cp1252 (const gchar * s)
396 {
397 return g_convert (s, -1, "CP1252", "UTF8", NULL, NULL, NULL);
398 }
399
400 static inline guint8
401 connector_get_msg_status (const GByteArray * msg)
402 {
403 return msg->data[5];
404 }
405
406 static inline gchar *
407 connector_get_msg_string (const GByteArray * msg)
408 {
409 return (gchar *) & msg->data[6];
410 }
411
412 static guint
413 connector_next_smplrw_entry (struct item_iterator *iter)
414 {
415 guint32 *data32;
416 gchar *name_cp1252;
417 struct connector_iterator_data *data = iter->data;
418
419 if (iter->item.name != NULL)
420 {
421 g_free (iter->item.name);
422 }
423
424 if (data->pos == data->msg->len)
425 {
426 iter->item.name = NULL;
427 return -ENOENT;
39 gchar *device_name = strdup (backend->device_name);
40 snprintf (backend->device_name, LABEL_MAX, "%s %s", _("MIDI device"),
41 device_name);
42 g_free (device_name);
42843 }
42944 else
43045 {
431 data32 = (guint32 *) & data->msg->data[data->pos];
432 data->hash = be32toh (*data32);
433 data->pos += sizeof (guint32);
434
435 data32 = (guint32 *) & data->msg->data[data->pos];
436 iter->item.size = be32toh (*data32);
437 data->pos += sizeof (guint32);
438
439 data->pos++; //write_protected
440
441 iter->item.type = data->msg->data[data->pos];
442 data->pos++;
443
444 name_cp1252 = (gchar *) & data->msg->data[data->pos];
445 iter->item.name = connector_get_utf8 (name_cp1252);
446 if (data->fs == FS_RAW_ALL && iter->item.type == ELEKTROID_FILE)
447 {
448 //This eliminates the extension ".mc-snd" that the device provides.
449 iter->item.name[strlen (iter->item.name) - 7] = 0;
450 }
451 data->pos += strlen (name_cp1252) + 1;
452
453 iter->item.index = -1;
454
455 return 0;
46 snprintf (backend->device_name, LABEL_MAX, "%s", _("MIDI device"));
45647 }
457 }
458
459 static gint
460 connector_init_iterator (struct item_iterator *iter, GByteArray * msg,
461 iterator_next next, enum connector_fs fs,
462 gboolean cached)
463 {
464 struct connector_iterator_data *data =
465 malloc (sizeof (struct connector_iterator_data));
466
467 data->msg = msg;
468 data->pos = fs == FS_DATA_ALL ? FS_DATA_START_POS : FS_SAMPLES_START_POS;
469 data->fs = fs;
470 data->cached = cached;
471
472 iter->data = data;
473 iter->next = next;
474 iter->free = connector_free_iterator_data;
475 iter->copy = connector_copy_iterator;
476 iter->item.name = NULL;
477 iter->item.index = -1;
478
47948 return 0;
48049 }
48150
482 static gint
483 connector_copy_iterator (struct item_iterator *dst, struct item_iterator *src,
484 gboolean cached)
51 struct connector
48552 {
486 GByteArray *array;
487 struct connector_iterator_data *data = src->data;
488 if (cached)
53 gint (*handshake) (struct backend * backend);
54 const gchar *name;
55 };
56
57 static const struct connector CONNECTOR_ELEKTRON = {
58 .handshake = elektron_handshake,
59 .name = "elektron"
60 };
61
62 static const struct connector CONNECTOR_MICROBRUTE = {
63 .handshake = microbrute_handshake,
64 .name = "microbrute"
65 };
66
67 static const struct connector CONNECTOR_CZ = {
68 .handshake = cz_handshake,
69 .name = "cz"
70 };
71
72 static const struct connector CONNECTOR_SDS = {
73 .handshake = sds_handshake,
74 .name = "sds"
75 };
76
77 static const struct connector CONNECTOR_EFACTOR = {
78 .handshake = efactor_handshake,
79 .name = "efactor"
80 };
81
82 static const struct connector CONNECTOR_DEFAULT = {
83 .handshake = default_handshake,
84 .name = "default"
85 };
86
87 // To speed up detection, connectors that purely rely on the standard device inquiry should go first.
88
89 static const struct connector *CONNECTORS[] = {
90 &CONNECTOR_MICROBRUTE, &CONNECTOR_ELEKTRON, &CONNECTOR_CZ, &CONNECTOR_SDS,
91 &CONNECTOR_EFACTOR, &CONNECTOR_DEFAULT, NULL
92 };
93
94 // A handshake function might return these values:
95 // 0, the device matches the connector.
96 // -ENODEV, the device does not match the connector but we can continue with the next connector.
97 // Other negative errors are allowed but we will not continue with the remaining connectors.
98
99 gint
100 connector_init (struct backend *backend, const gchar * id,
101 const gchar * conn_name,
102 struct sysex_transfer *sysex_transfer)
103 {
104 gboolean active = TRUE;
105 const struct connector **connector;
106 int err = backend_init (backend, id);
107 if (err)
489108 {
490 array = data->msg;
491 }
492 else
493 {
494 array = g_byte_array_sized_new (data->msg->len);
495 g_byte_array_append (array, data->msg->data, data->msg->len);
496 }
497 return connector_init_iterator (dst, array, src->next, data->fs, cached);
498 }
499
500 static GByteArray *
501 connector_decode_payload (const GByteArray * src)
502 {
503 GByteArray *dst;
504 int i, j, k, dst_len;
505 unsigned int shift;
506
507 dst_len = src->len - ceill (src->len / 8.0);
508 dst = g_byte_array_new ();
509 g_byte_array_set_size (dst, dst_len);
510
511 for (i = 0, j = 0; i < src->len; i += 8, j += 7)
512 {
513 shift = 0x40;
514 for (k = 0; k < 7 && i + k + 1 < src->len; k++)
515 {
516 dst->data[j + k] =
517 src->data[i + k + 1] | (src->data[i] & shift ? 0x80 : 0);
518 shift = shift >> 1;
519 }
109 return err;
520110 }
521111
522 return dst;
523 }
112 backend_rx_drain (backend); //This is needed in case of timeout.
524113
525 static GByteArray *
526 connector_encode_payload (const GByteArray * src)
527 {
528 GByteArray *dst;
529 int i, j, k, dst_len;
530 unsigned int accum;
531
532 dst_len = src->len + ceill (src->len / 7.0);
533 dst = g_byte_array_new ();
534 g_byte_array_set_size (dst, dst_len);
535
536 for (i = 0, j = 0; j < src->len; i += 8, j += 7)
114 err = -ENODEV;
115 connector = CONNECTORS;
116 while (*connector)
537117 {
538 accum = 0;
539 for (k = 0; k < 7; k++)
118 if (sysex_transfer)
540119 {
541 accum = accum << 1;
542 if (j + k < src->len)
543 {
544 if (src->data[j + k] & 0x80)
545 {
546 accum |= 1;
547 }
548 dst->data[i + k + 1] = src->data[j + k] & 0x7f;
549 }
550 }
551 dst->data[i] = accum;
552 }
553
554 return dst;
555 }
556
557 static GByteArray *
558 connector_msg_to_raw (const GByteArray * msg)
559 {
560 GByteArray *encoded;
561 GByteArray *sysex = g_byte_array_new ();
562
563 g_byte_array_append (sysex, MSG_HEADER, sizeof (MSG_HEADER));
564 encoded = connector_encode_payload (msg);
565 g_byte_array_append (sysex, encoded->data, encoded->len);
566 free_msg (encoded);
567 g_byte_array_append (sysex, (guint8 *) "\xf7", 1);
568
569 return sysex;
570 }
571
572 static gint
573 connector_get_smplrw_info_from_msg (GByteArray * info_msg, guint32 * id,
574 guint * size)
575 {
576 if (connector_get_msg_status (info_msg))
577 {
578 if (id)
579 {
580 *id = be32toh (*((guint32 *) & info_msg->data[6]));
581 }
582 if (size)
583 {
584 *size = be32toh (*((guint32 *) & info_msg->data[10]));
585 }
586 }
587 else
588 {
589 if (id)
590 {
591 return -EIO;
592 }
593 }
594
595 return 0;
596 }
597
598 static GByteArray *
599 connector_new_msg (const guint8 * data, guint len)
600 {
601 GByteArray *msg = g_byte_array_new ();
602
603 g_byte_array_append (msg, (guchar *) "\0\0\0\0", 4);
604 g_byte_array_append (msg, data, len);
605
606 return msg;
607 }
608
609 static GByteArray *
610 connector_new_msg_uint8 (const guint8 * data, guint len, guint8 type)
611 {
612 GByteArray *msg = connector_new_msg (data, len);
613
614 g_byte_array_append (msg, &type, 1);
615
616 return msg;
617 }
618
619 static GByteArray *
620 connector_new_msg_path (const guint8 * data, guint len, const gchar * path)
621 {
622 GByteArray *msg;
623 gchar *path_cp1252 = connector_get_cp1252 (path);
624
625 if (!path_cp1252)
626 {
627 return NULL;
628 }
629
630 msg = connector_new_msg (data, len);
631 g_byte_array_append (msg, (guchar *) path_cp1252, strlen (path_cp1252) + 1);
632 g_free (path_cp1252);
633
634 return msg;
635 }
636
637 static GByteArray *
638 connector_new_msg_close_common_read (const guint8 * data, guint len, guint id)
639 {
640 guint32 aux32;
641 GByteArray *msg = connector_new_msg (data, len);
642
643 aux32 = htobe32 (id);
644 g_byte_array_append (msg, (guchar *) & aux32, sizeof (guint32));
645 return msg;
646 }
647
648 static GByteArray *
649 connector_new_msg_close_sample_read (guint id)
650 {
651 return
652 connector_new_msg_close_common_read (FS_SAMPLE_CLOSE_FILE_READER_REQUEST,
653 sizeof
654 (FS_SAMPLE_CLOSE_FILE_READER_REQUEST),
655 id);
656 }
657
658 static GByteArray *
659 connector_new_msg_close_raw_read (guint id)
660 {
661 return
662 connector_new_msg_close_common_read (FS_RAW_CLOSE_FILE_READER_REQUEST,
663 sizeof
664 (FS_RAW_CLOSE_FILE_READER_REQUEST),
665 id);
666 }
667
668 static GByteArray *
669 connector_new_msg_open_common_write (const guint8 * data, guint len,
670 const gchar * path, guint bytes)
671 {
672 guint32 aux32;
673 GByteArray *msg = connector_new_msg_path (data, len, path);
674
675 aux32 = htobe32 (bytes);
676 memcpy (&msg->data[5], &aux32, sizeof (guint32));
677
678 return msg;
679 }
680
681 static GByteArray *
682 connector_new_msg_open_sample_write (const gchar * path, guint bytes)
683 {
684 return
685 connector_new_msg_open_common_write (FS_SAMPLE_OPEN_FILE_WRITER_REQUEST,
686 sizeof
687 (FS_SAMPLE_OPEN_FILE_WRITER_REQUEST),
688 path,
689 bytes +
690 sizeof (struct
691 elektron_sample_info));
692 }
693
694 static GByteArray *
695 connector_new_msg_open_raw_write (const gchar * path, guint bytes)
696 {
697 return connector_new_msg_open_common_write (FS_RAW_OPEN_FILE_WRITER_REQUEST,
698 sizeof
699 (FS_RAW_OPEN_FILE_WRITER_REQUEST),
700 path, bytes);
701 }
702
703
704 static GByteArray *
705 connector_new_msg_list (const gchar * path, int32_t start_index,
706 int32_t end_index, gboolean all)
707 {
708 guint32 aux32;
709 guint8 aux8;
710 GByteArray *msg = connector_new_msg_path (DATA_LIST_REQUEST,
711 sizeof (DATA_LIST_REQUEST),
712 path);
713
714 aux32 = htobe32 (start_index);
715 g_byte_array_append (msg, (guchar *) & aux32, sizeof (guint32));
716 aux32 = htobe32 (end_index);
717 g_byte_array_append (msg, (guchar *) & aux32, sizeof (guint32));
718 aux8 = all;
719 g_byte_array_append (msg, (guchar *) & aux8, sizeof (guint8));
720
721 return msg;
722 }
723
724 static GByteArray *
725 connector_new_msg_write_sample_blk (guint id, GByteArray * sample,
726 guint * total, guint seq, void *data)
727 {
728 guint32 aux32;
729 guint16 aux16, *aux16p;
730 int i, consumed, bytes_blk;
731 struct sample_loop_data *sample_loop_data = data;
732 struct elektron_sample_info elektron_sample_info;
733 GByteArray *msg = connector_new_msg (FS_SAMPLE_WRITE_FILE_REQUEST,
734 sizeof (FS_SAMPLE_WRITE_FILE_REQUEST));
735
736
737 aux32 = htobe32 (id);
738 memcpy (&msg->data[5], &aux32, sizeof (guint32));
739 aux32 = htobe32 (DATA_TRANSF_BLOCK_BYTES * seq);
740 memcpy (&msg->data[13], &aux32, sizeof (guint32));
741
742 bytes_blk = DATA_TRANSF_BLOCK_BYTES;
743 consumed = 0;
744
745 if (seq == 0)
746 {
747 elektron_sample_info.type = 0;
748 elektron_sample_info.sample_len_bytes = htobe32 (sample->len);
749 elektron_sample_info.sample_rate = htobe32 (ELEKTRON_SAMPLE_RATE);
750 elektron_sample_info.loop_start = htobe32 (sample_loop_data->start);
751 elektron_sample_info.loop_end = htobe32 (sample_loop_data->end);
752 elektron_sample_info.loop_type = htobe32 (ELEKTRON_LOOP_TYPE);
753 memset (&elektron_sample_info.padding, 0,
754 sizeof (guint32) * ELEKTRON_SAMPLE_INFO_PAD_I32_LEN);
755
756 g_byte_array_append (msg, (guchar *) & elektron_sample_info,
757 sizeof (struct elektron_sample_info));
758
759 consumed = sizeof (struct elektron_sample_info);
760 bytes_blk -= consumed;
761 }
762
763 i = 0;
764 aux16p = (guint16 *) & sample->data[*total];
765 while (i < bytes_blk && *total < sample->len)
766 {
767 aux16 = htobe16 (*aux16p);
768 g_byte_array_append (msg, (guint8 *) & aux16, sizeof (guint16));
769 aux16p++;
770 (*total) += sizeof (guint16);
771 consumed += sizeof (guint16);
772 i += sizeof (guint16);
773 }
774
775 aux32 = htobe32 (consumed);
776 memcpy (&msg->data[9], &aux32, sizeof (guint32));
777
778 return msg;
779 }
780
781 static GByteArray *
782 connector_new_msg_write_raw_blk (guint id, GByteArray * raw, guint * total,
783 guint seq, void *data)
784 {
785 gint len;
786 guint32 aux32;
787 GByteArray *msg = connector_new_msg (FS_RAW_WRITE_FILE_REQUEST,
788 sizeof (FS_RAW_WRITE_FILE_REQUEST));
789
790 aux32 = htobe32 (id);
791 memcpy (&msg->data[5], &aux32, sizeof (guint32));
792 aux32 = htobe32 (DATA_TRANSF_BLOCK_BYTES * seq);
793 memcpy (&msg->data[13], &aux32, sizeof (guint32));
794
795 len = raw->len - *total;
796 len = len > DATA_TRANSF_BLOCK_BYTES ? DATA_TRANSF_BLOCK_BYTES : len;
797 g_byte_array_append (msg, &raw->data[*total], len);
798 (*total) += len;
799
800 aux32 = htobe32 (len);
801 memcpy (&msg->data[9], &aux32, sizeof (guint32));
802
803 return msg;
804 }
805
806 static GByteArray *
807 connector_new_msg_close_common_write (const guint8 * data, guint len,
808 guint id, guint bytes)
809 {
810 guint32 aux32;
811 GByteArray *msg = connector_new_msg (data, len);
812
813 aux32 = htobe32 (id);
814 memcpy (&msg->data[5], &aux32, sizeof (guint32));
815 aux32 = htobe32 (bytes);
816 memcpy (&msg->data[9], &aux32, sizeof (guint32));
817
818 return msg;
819 }
820
821 static GByteArray *
822 connector_new_msg_close_sample_write (guint id, guint bytes)
823 {
824 return
825 connector_new_msg_close_common_write (FS_SAMPLE_CLOSE_FILE_WRITER_REQUEST,
826 sizeof
827 (FS_SAMPLE_CLOSE_FILE_WRITER_REQUEST),
828 id,
829 bytes +
830 sizeof (struct
831 elektron_sample_info));
832 }
833
834 static GByteArray *
835 connector_new_msg_close_raw_write (guint id, guint bytes)
836 {
837 return
838 connector_new_msg_close_common_write (FS_RAW_CLOSE_FILE_WRITER_REQUEST,
839 sizeof
840 (FS_RAW_CLOSE_FILE_WRITER_REQUEST),
841 id, bytes);
842 }
843
844 static GByteArray *
845 connector_new_msg_read_common_blk (const guint8 * data, guint len, guint id,
846 guint start, guint size)
847 {
848 guint32 aux;
849 GByteArray *msg = connector_new_msg (data, len);
850
851 aux = htobe32 (id);
852 memcpy (&msg->data[5], &aux, sizeof (guint32));
853 aux = htobe32 (size);
854 memcpy (&msg->data[9], &aux, sizeof (guint32));
855 aux = htobe32 (start);
856 memcpy (&msg->data[13], &aux, sizeof (guint32));
857
858 return msg;
859 }
860
861 static GByteArray *
862 connector_new_msg_read_sample_blk (guint id, guint start, guint size)
863 {
864 return connector_new_msg_read_common_blk (FS_SAMPLE_READ_FILE_REQUEST,
865 sizeof
866 (FS_SAMPLE_READ_FILE_REQUEST), id,
867 start, size);
868 }
869
870 static GByteArray *
871 connector_new_msg_read_raw_blk (guint id, guint start, guint size)
872 {
873 return connector_new_msg_read_common_blk (FS_RAW_READ_FILE_REQUEST,
874 sizeof (FS_RAW_READ_FILE_REQUEST),
875 id, start, size);
876 }
877
878 static GByteArray *
879 connector_raw_to_msg (GByteArray * sysex)
880 {
881 GByteArray *msg;
882 GByteArray *payload;
883 gint len = sysex->len - sizeof (MSG_HEADER) - 1;
884
885 if (len > 0)
886 {
887 payload = g_byte_array_new ();
888 g_byte_array_append (payload, &sysex->data[sizeof (MSG_HEADER)], len);
889 msg = connector_decode_payload (payload);
890 free_msg (payload);
891 }
892 else
893 {
894 msg = NULL;
895 }
896
897 return msg;
898 }
899
900 static ssize_t
901 connector_tx_raw (struct connector *connector, const guint8 * data, guint len)
902 {
903 ssize_t tx_len;
904
905 if (!connector->outputp)
906 {
907 error_print ("Output port is NULL\n");
908 return -ENOTCONN;
909 }
910
911 snd_rawmidi_read (connector->inputp, NULL, 0); // trigger reading
912
913 tx_len = snd_rawmidi_write (connector->outputp, data, len);
914 if (tx_len < 0)
915 {
916 error_print ("Error while writing to device: %s\n",
917 snd_strerror (tx_len));
918 connector_destroy (connector);
919 }
920 return tx_len;
921 }
922
923 gint
924 connector_tx_sysex (struct connector *connector,
925 struct connector_sysex_transfer *transfer)
926 {
927 ssize_t tx_len;
928 guint total;
929 guint len;
930 guchar *b;
931 gint res = 0;
932
933 transfer->status = SENDING;
934
935 b = transfer->raw->data;
936 total = 0;
937 while (total < transfer->raw->len && transfer->active)
938 {
939 len = transfer->raw->len - total;
940 if (len > BUFF_SIZE)
941 {
942 len = BUFF_SIZE;
120 g_mutex_lock (&sysex_transfer->mutex);
121 active = sysex_transfer->active;
122 g_mutex_unlock (&sysex_transfer->mutex);
943123 }
944124
945 tx_len = connector_tx_raw (connector, b, len);
946 if (tx_len < 0)
125 if (!active)
947126 {
948 res = tx_len;
949 break;
950 }
951 b += len;
952 total += len;
953 }
954
955 transfer->active = FALSE;
956 transfer->status = FINISHED;
957 return res;
958 }
959
960 static gint
961 connector_tx (struct connector *connector, const GByteArray * msg)
962 {
963 gint res;
964 guint16 aux;
965 gchar *text;
966 struct connector_sysex_transfer transfer;
967
968 aux = htobe16 (connector->seq);
969 memcpy (msg->data, &aux, sizeof (guint16));
970 if (connector->seq == USHRT_MAX)
971 {
972 connector->seq = 0;
973 }
974 else
975 {
976 connector->seq++;
977 }
978
979 transfer.active = TRUE;
980 transfer.raw = connector_msg_to_raw (msg);
981
982 res = connector_tx_sysex (connector, &transfer);
983 if (!res)
984 {
985 if (debug_level > 1)
986 {
987 text = debug_get_hex_msg (transfer.raw);
988 debug_print (2, "Raw message sent (%d): %s\n", transfer.raw->len,
989 text);
990 free (text);
127 err = -ECANCELED;
128 goto end;
991129 }
992130
993 text = debug_get_hex_msg (msg);
994 debug_print (1, "Message sent (%d): %s\n", msg->len, text);
995 free (text);
996 }
997
998 free_msg (transfer.raw);
999 return res;
1000 }
1001
1002 void
1003 connector_rx_drain (struct connector *connector)
1004 {
1005 debug_print (2, "Draining buffer...\n");
1006 connector->rx_len = 0;
1007 snd_rawmidi_drain (connector->inputp);
1008 }
1009
1010 static gboolean
1011 connector_is_rt_msg (guint8 * data, guint len)
1012 {
1013 guint i;
1014 guint8 *b;
1015
1016 for (i = 0, b = data; i < len; i++, b++)
1017 {
1018 if (*b < 0xf8) //Not System Real-Time Messages
131 if (conn_name)
1019132 {
1020 return FALSE;
1021 }
1022 }
1023
1024 return TRUE;
1025 }
1026
1027 static ssize_t
1028 connector_rx_raw (struct connector *connector, guint8 * data, guint len,
1029 struct connector_sysex_transfer *transfer)
1030 {
1031 ssize_t rx_len;
1032 guint total_time;
1033 unsigned short revents;
1034 gint err;
1035 gchar *text;
1036
1037 if (!connector->inputp)
1038 {
1039 error_print ("Input port is NULL\n");
1040 return -ENOTCONN;
1041 }
1042
1043 total_time = 0;
1044
1045 while (1)
1046 {
1047 err = poll (connector->pfds, connector->npfds, POLL_TIMEOUT);
1048
1049 if (!transfer->active)
1050 {
1051 return -ENODATA;
1052 }
1053
1054 if (err == 0)
1055 {
1056 total_time += POLL_TIMEOUT;
1057 if (((transfer->batch && transfer->status == RECEIVING)
1058 || !transfer->batch) && transfer->timeout > -1
1059 && total_time >= transfer->timeout)
133 if (!strcmp (conn_name, (*connector)->name))
1060134 {
1061 debug_print (1, "Timeout!\n");
1062 return -ENODATA;
135 debug_print (1, "Testing %s connector...\n",
136 (*connector)->name);
137 err = (*connector)->handshake (backend);
138 if (!err)
139 {
140 debug_print (1, "Using %s connector...\n",
141 (*connector)->name);
142 }
143 return err;
1063144 }
1064 continue;
1065 }
1066
1067 if (err < 0)
1068 {
1069 error_print ("Error while polling. %s.\n", g_strerror (errno));
1070 connector_destroy (connector);
1071 return err;
1072 }
1073
1074 if ((err =
1075 snd_rawmidi_poll_descriptors_revents (connector->inputp,
1076 connector->pfds,
1077 connector->npfds,
1078 &revents)) < 0)
1079 {
1080 error_print ("Error while getting poll events. %s.\n",
1081 snd_strerror (err));
1082 connector_destroy (connector);
1083 return err;
1084 }
1085
1086 if (revents & (POLLERR | POLLHUP))
1087 {
1088 return -ENODATA;
1089 }
1090
1091 if (!(revents & POLLIN))
1092 {
1093 continue;
1094 }
1095
1096 rx_len = snd_rawmidi_read (connector->inputp, data, len);
1097
1098 if (rx_len == -EAGAIN || rx_len == 0)
1099 {
1100 continue;
1101 }
1102
1103 if (rx_len > 0)
1104 {
1105 if (connector_is_rt_msg (data, rx_len))
1106 {
1107 continue;
1108 }
1109 break;
1110 }
1111
1112 if (rx_len < 0)
1113 {
1114 error_print ("Error while reading from device: %s\n",
1115 snd_strerror (rx_len));
1116 connector_destroy (connector);
1117 break;
1118 }
1119
1120 }
1121
1122 if (debug_level > 1)
1123 {
1124 text = debug_get_hex_data (3, data, rx_len);
1125 debug_print (2, "Buffer content (%zu): %s\n", rx_len, text);
1126 free (text);
1127 }
1128
1129 return rx_len;
1130 }
1131
1132 gint
1133 connector_rx_sysex (struct connector *connector,
1134 struct connector_sysex_transfer *transfer)
1135 {
1136 gint i;
1137 guint8 *b;
1138 gint res = 0;
1139
1140 transfer->status = WAITING;
1141 transfer->raw = g_byte_array_new ();
1142
1143 i = 0;
1144 if (connector->rx_len < 0)
1145 {
1146 connector->rx_len = 0;
1147 }
1148 b = connector->buffer;
1149
1150 while (1)
1151 {
1152 if (i == connector->rx_len)
1153 {
1154 connector->rx_len =
1155 connector_rx_raw (connector, connector->buffer, BUFF_SIZE,
1156 transfer);
1157
1158 if (connector->rx_len == -ENODATA)
1159 {
1160 res = -ENODATA;
1161 goto error;
1162 }
1163
1164 if (connector->rx_len < 0)
1165 {
1166 res = -EIO;
1167 goto error;
1168 }
1169
1170 b = connector->buffer;
1171 i = 0;
1172 }
1173
1174 while (i < connector->rx_len && *b != 0xf0)
1175 {
1176 b++;
1177 i++;
1178 }
1179
1180 if (i < connector->rx_len)
1181 {
1182 break;
1183 }
1184 }
1185
1186 g_byte_array_append (transfer->raw, b, 1);
1187 b++;
1188 i++;
1189 transfer->status = RECEIVING;
1190
1191 while (1)
1192 {
1193 if (i == connector->rx_len)
1194 {
1195 connector->rx_len =
1196 connector_rx_raw (connector, connector->buffer, BUFF_SIZE,
1197 transfer);
1198
1199 if (connector->rx_len == -ENODATA && transfer->batch)
1200 {
1201 break;
1202 }
1203
1204 if (connector->rx_len < 0)
1205 {
1206 res = -EIO;
1207 goto error;
1208 }
1209
1210 b = connector->buffer;
1211 i = 0;
1212 }
1213
1214 while (i < connector->rx_len && (*b != 0xf7 || transfer->batch))
1215 {
1216 if (!connector_is_rt_msg (b, 1))
1217 {
1218 g_byte_array_append (transfer->raw, b, 1);
1219 }
1220 b++;
1221 i++;
1222 }
1223
1224 if (i < connector->rx_len)
1225 {
1226 g_byte_array_append (transfer->raw, b, 1);
1227 connector->rx_len = connector->rx_len - i - 1;
1228 if (connector->rx_len > 0)
1229 {
1230 memmove (connector->buffer, &connector->buffer[i + 1],
1231 connector->rx_len);
1232 }
1233 break;
1234 }
1235
1236 }
1237
1238 goto end;
1239
1240 error:
1241 free_msg (transfer->raw);
1242 transfer->raw = NULL;
1243 end:
1244 transfer->active = FALSE;
1245 transfer->status = FINISHED;
1246 return res;
1247 }
1248
1249 static GByteArray *
1250 connector_rx (struct connector *connector)
1251 {
1252 gchar *text;
1253 GByteArray *msg;
1254 struct connector_sysex_transfer transfer;
1255
1256 transfer.active = TRUE;
1257 transfer.timeout = SYSEX_TIMEOUT;
1258 transfer.batch = FALSE;
1259
1260 if (connector_rx_sysex (connector, &transfer))
1261 {
1262 return NULL;
1263 }
1264 while (transfer.raw->len < 12
1265 || (transfer.raw->len >= 12
1266 && (transfer.raw->data[0] != MSG_HEADER[0]
1267 || transfer.raw->data[1] != MSG_HEADER[1]
1268 || transfer.raw->data[2] != MSG_HEADER[2]
1269 || transfer.raw->data[3] != MSG_HEADER[3]
1270 || transfer.raw->data[4] != MSG_HEADER[4]
1271 || transfer.raw->data[5] != MSG_HEADER[5])))
1272 {
1273 if (debug_level > 1)
1274 {
1275 text = debug_get_hex_msg (transfer.raw);
1276 debug_print (2, "Message skipped (%d): %s\n", transfer.raw->len,
1277 text);
1278 free (text);
1279 }
1280 free_msg (transfer.raw);
1281
1282 transfer.active = TRUE;
1283 if (connector_rx_sysex (connector, &transfer))
1284 {
1285 return NULL;
1286 }
1287 }
1288
1289 if (debug_level > 1)
1290 {
1291 text = debug_get_hex_msg (transfer.raw);
1292 debug_print (2, "Raw message received (%d): %s\n", transfer.raw->len,
1293 text);
1294 free (text);
1295 }
1296
1297 msg = connector_raw_to_msg (transfer.raw);
1298 if (msg)
1299 {
1300 text = debug_get_hex_msg (msg);
1301 debug_print (1, "Message received (%d): %s\n", msg->len, text);
1302 free (text);
1303 }
1304
1305 free_msg (transfer.raw);
1306 return msg;
1307 }
1308
1309 static GByteArray *
1310 connector_tx_and_rx (struct connector *connector, GByteArray * tx_msg)
1311 {
1312 ssize_t len;
1313 GByteArray *rx_msg;
1314
1315 g_mutex_lock (&connector->mutex);
1316
1317 connector_rx_drain (connector);
1318
1319 len = connector_tx (connector, tx_msg);
1320 if (len < 0)
1321 {
1322 rx_msg = NULL;
1323 goto cleanup;
1324 }
1325
1326 rx_msg = connector_rx (connector);
1327
1328 cleanup:
1329 free_msg (tx_msg);
1330 g_mutex_unlock (&connector->mutex);
1331 return rx_msg;
1332 }
1333
1334 static gint
1335 connector_read_common_dir (struct item_iterator *iter, const gchar * dir,
1336 void *data, const guint8 msg[], int size,
1337 fs_init_iter_func init_iter, enum connector_fs fs)
1338 {
1339 gboolean cache;
1340 GByteArray *tx_msg;
1341 GByteArray *rx_msg;
1342 struct connector *connector = data;
1343
1344 g_mutex_lock (&connector->mutex);
1345 cache = connector->dir_cache != NULL;
1346 rx_msg = cache ? g_hash_table_lookup (connector->dir_cache, dir) : NULL;
1347 g_mutex_unlock (&connector->mutex);
1348
1349 if (!rx_msg)
1350 {
1351 tx_msg = connector_new_msg_path (msg, size, dir);
1352 if (!tx_msg)
1353 {
1354 return -EINVAL;
1355 }
1356
1357 rx_msg = connector_tx_and_rx (connector, tx_msg);
1358 if (!rx_msg)
1359 {
1360 return -EIO;
1361 }
1362
1363 g_mutex_lock (&connector->mutex);
1364 cache = connector->dir_cache != NULL;
1365 if (cache)
1366 {
1367 gchar *key = g_strdup (dir);
1368 g_hash_table_insert (connector->dir_cache, key, rx_msg);
1369 }
1370 g_mutex_unlock (&connector->mutex);
1371
1372 if (rx_msg->len == 5
1373 && connector_get_path_type (connector, dir,
1374 init_iter) != ELEKTROID_DIR)
1375 {
1376 if (!cache)
1377 {
1378 free_msg (rx_msg);
1379 }
1380 return -ENOTDIR;
1381 }
1382 }
1383
1384 return connector_init_iterator (iter, rx_msg, connector_next_smplrw_entry,
1385 fs, cache);
1386 }
1387
1388 static gint
1389 connector_read_samples_dir (struct item_iterator *iter, const gchar * dir,
1390 void *data)
1391 {
1392 return connector_read_common_dir (iter, dir, data,
1393 FS_SAMPLE_READ_DIR_REQUEST,
1394 sizeof (FS_SAMPLE_READ_DIR_REQUEST),
1395 connector_read_samples_dir, FS_SAMPLES);
1396 }
1397
1398 static gint
1399 connector_read_raw_dir (struct item_iterator *iter, const gchar * dir,
1400 void *data)
1401 {
1402 return connector_read_common_dir (iter, dir, data, FS_RAW_READ_DIR_REQUEST,
1403 sizeof (FS_RAW_READ_DIR_REQUEST),
1404 connector_read_raw_dir, FS_RAW_ALL);
1405 }
1406
1407 static enum item_type
1408 connector_get_path_type (struct connector *connector, const gchar * path,
1409 fs_init_iter_func init_iter)
1410 {
1411 gchar *name_copy;
1412 gchar *parent_copy;
1413 gchar *name;
1414 gchar *parent;
1415 enum item_type res;
1416 struct item_iterator iter;
1417
1418 if (strcmp (path, "/") == 0)
1419 {
1420 return ELEKTROID_DIR;
1421 }
1422
1423 name_copy = strdup (path);
1424 parent_copy = strdup (path);
1425 name = basename (name_copy);
1426 parent = dirname (parent_copy);
1427 res = ELEKTROID_NONE;
1428 if (!init_iter (&iter, parent, connector))
1429 {
1430 while (!next_item_iterator (&iter))
1431 {
1432 if (strcmp (name, iter.item.name) == 0)
1433 {
1434 res = iter.item.type;
1435 break;
1436 }
1437 }
1438 free_item_iterator (&iter);
1439 }
1440
1441 g_free (name_copy);
1442 g_free (parent_copy);
1443 return res;
1444 }
1445
1446 static gint
1447 connector_src_dst_common (struct connector *connector,
1448 const gchar * src, const gchar * dst,
1449 const guint8 * data, guint len)
1450 {
1451 gint res;
1452 GByteArray *rx_msg;
1453 GByteArray *tx_msg = connector_new_msg (data, len);
1454
1455 gchar *dst_cp1252 = connector_get_cp1252 (dst);
1456 if (!dst_cp1252)
1457 {
1458 return -EINVAL;
1459 }
1460
1461 gchar *src_cp1252 = connector_get_cp1252 (src);
1462 if (!src_cp1252)
1463 {
1464 g_free (dst_cp1252);
1465 return -EINVAL;
1466 }
1467
1468 g_byte_array_append (tx_msg, (guchar *) src_cp1252,
1469 strlen (src_cp1252) + 1);
1470 g_byte_array_append (tx_msg, (guchar *) dst_cp1252,
1471 strlen (dst_cp1252) + 1);
1472
1473 g_free (src_cp1252);
1474 g_free (dst_cp1252);
1475
1476 rx_msg = connector_tx_and_rx (connector, tx_msg);
1477 if (!rx_msg)
1478 {
1479 return -EIO;
1480 }
1481 //Response: x, x, x, x, 0xa1, [0 (error), 1 (success)]...
1482 if (connector_get_msg_status (rx_msg))
1483 {
1484 res = 0;
1485 }
1486 else
1487 {
1488 res = -EPERM;
1489 error_print ("%s (%s)\n", snd_strerror (res),
1490 connector_get_msg_string (rx_msg));
1491 }
1492 free_msg (rx_msg);
1493
1494 return res;
1495 }
1496
1497 static gint
1498 connector_rename_sample_file (struct connector *connector, const gchar * src,
1499 const gchar * dst)
1500 {
1501 return connector_src_dst_common (connector, src, dst,
1502 FS_SAMPLE_RENAME_FILE_REQUEST,
1503 sizeof (FS_SAMPLE_RENAME_FILE_REQUEST));
1504 }
1505
1506 static gint
1507 connector_rename_raw_file (struct connector *connector, const gchar * src,
1508 const gchar * dst)
1509 {
1510 return connector_src_dst_common (connector, src, dst,
1511 FS_RAW_RENAME_FILE_REQUEST,
1512 sizeof (FS_RAW_RENAME_FILE_REQUEST));
1513 }
1514
1515 static gint
1516 connector_move_common_item (const gchar * src, const gchar * dst, void *data,
1517 fs_init_iter_func init_iter,
1518 connector_src_dst_func mv, fs_path_func mkdir,
1519 connector_path_func rmdir)
1520 {
1521 enum item_type type;
1522 gint res;
1523 gchar *src_plus;
1524 gchar *dst_plus;
1525 struct item_iterator iter;
1526 struct connector *connector = data;
1527
1528 //Renaming is not implemented for directories so we need to implement it.
1529
1530 debug_print (1, "Renaming remotely from %s to %s...\n", src, dst);
1531
1532 type = connector_get_path_type (connector, src, init_iter);
1533 if (type == ELEKTROID_FILE)
1534 {
1535 return mv (connector, src, dst);
1536 }
1537 else if (type == ELEKTROID_DIR)
1538 {
1539 res = mkdir (dst, connector);
1540 if (res)
1541 {
1542 return res;
1543 }
1544 if (!init_iter (&iter, src, connector))
1545 {
1546 while (!next_item_iterator (&iter) && !res)
1547 {
1548 src_plus = chain_path (src, iter.item.name);
1549 dst_plus = chain_path (dst, iter.item.name);
1550 res =
1551 connector_move_common_item (src_plus, dst_plus, connector,
1552 init_iter, mv, mkdir, rmdir);
1553 free (src_plus);
1554 free (dst_plus);
1555 }
1556 free_item_iterator (&iter);
1557 }
1558 if (!res)
1559 {
1560 res = rmdir (connector, src);
1561 }
1562 return res;
1563 }
1564 else
1565 {
1566 return -EBADF;
1567 }
1568 }
1569
1570 static gint
1571 connector_path_common (struct connector *connector, const gchar * path,
1572 const guint8 * template, gint size)
1573 {
1574 gint res;
1575 GByteArray *rx_msg;
1576 GByteArray *tx_msg;
1577
1578 tx_msg = connector_new_msg_path (template, size, path);
1579 if (!tx_msg)
1580 {
1581 return -EINVAL;
1582 }
1583
1584 rx_msg = connector_tx_and_rx (connector, tx_msg);
1585 if (!rx_msg)
1586 {
1587 return -EIO;
1588 }
1589 //Response: x, x, x, x, 0xX0, [0 (error), 1 (success)]...
1590 if (connector_get_msg_status (rx_msg))
1591 {
1592 res = 0;
1593 }
1594 else
1595 {
1596 res = -EPERM;
1597 error_print ("%s (%s)\n", snd_strerror (res),
1598 connector_get_msg_string (rx_msg));
1599 }
1600 free_msg (rx_msg);
1601
1602 return res;
1603 }
1604
1605 static gint
1606 connector_delete_sample (struct connector *connector, const gchar * path)
1607 {
1608 return connector_path_common (connector, path,
1609 FS_SAMPLE_DELETE_FILE_REQUEST,
1610 sizeof (FS_SAMPLE_DELETE_FILE_REQUEST));
1611 }
1612
1613 static gint
1614 connector_delete_samples_dir (struct connector *connector, const gchar * path)
1615 {
1616 return connector_path_common (connector, path, FS_SAMPLE_DELETE_DIR_REQUEST,
1617 sizeof (FS_SAMPLE_DELETE_DIR_REQUEST));
1618 }
1619
1620 //This adds back the extension ".mc-snd" that the device provides.
1621 static gchar *
1622 connector_add_ext_to_mc_snd (const gchar * path)
1623 {
1624 gchar *path_with_ext = malloc (PATH_MAX);
1625 snprintf (path_with_ext, PATH_MAX, "%s%s", path, ".mc-snd");
1626 return path_with_ext;
1627 }
1628
1629 static gint
1630 connector_delete_raw (struct connector *connector, const gchar * path)
1631 {
1632 gint ret;
1633 gchar *path_with_ext = connector_add_ext_to_mc_snd (path);
1634 ret = connector_path_common (connector, path_with_ext,
1635 FS_RAW_DELETE_FILE_REQUEST,
1636 sizeof (FS_RAW_DELETE_FILE_REQUEST));
1637 g_free (path_with_ext);
1638 return ret;
1639 }
1640
1641 static gint
1642 connector_delete_raw_dir (struct connector *connector, const gchar * path)
1643 {
1644 return connector_path_common (connector, path, FS_RAW_DELETE_DIR_REQUEST,
1645 sizeof (FS_RAW_DELETE_DIR_REQUEST));
1646 }
1647
1648 static gint
1649 connector_move_samples_item (const gchar * src, const gchar * dst, void *data)
1650 {
1651 return connector_move_common_item (src, dst, data,
1652 connector_read_samples_dir,
1653 connector_rename_sample_file,
1654 connector_create_samples_dir,
1655 connector_delete_samples_dir);
1656 }
1657
1658 static gint
1659 connector_move_raw_item (const gchar * src, const gchar * dst, void *data)
1660 {
1661 gint ret;
1662 gchar *src_with_ext = connector_add_ext_to_mc_snd (src);
1663 ret = connector_move_common_item (src_with_ext, dst, data,
1664 connector_read_raw_dir,
1665 connector_rename_raw_file,
1666 connector_create_raw_dir,
1667 connector_delete_raw_dir);
1668 g_free (src_with_ext);
1669 return ret;
1670 }
1671
1672 static gint
1673 connector_delete_common_item (const gchar * path, void *data,
1674 fs_init_iter_func init_iter,
1675 connector_path_func rmdir,
1676 connector_path_func rm)
1677 {
1678 enum item_type type;
1679 gchar *new_path;
1680 struct item_iterator iter;
1681 struct connector *connector = data;
1682 gint res;
1683
1684 type = connector_get_path_type (connector, path, init_iter);
1685 if (type == ELEKTROID_FILE)
1686 {
1687 return rm (connector, path);
1688 }
1689 else if (type == ELEKTROID_DIR)
1690 {
1691 debug_print (1, "Deleting %s samples dir...\n", path);
1692
1693 if (init_iter (&iter, path, connector))
1694 {
1695 error_print ("Error while opening samples dir %s dir\n", path);
1696145 }
1697146 else
1698147 {
1699 res = 0;
1700 while (!res && !next_item_iterator (&iter))
148 debug_print (1, "Testing %s connector...\n", (*connector)->name);
149 err = (*connector)->handshake (backend);
150 if (err && err != -ENODEV)
1701151 {
1702 new_path = chain_path (path, iter.item.name);
1703 res = res
1704 || connector_delete_common_item (new_path, connector,
1705 init_iter, rmdir, rm);
1706 free (new_path);
152 return err;
1707153 }
1708 free_item_iterator (&iter);
154
155 if (!err)
156 {
157 debug_print (1, "Using %s connector...\n", (*connector)->name);
158 return 0;
159 }
160
161 backend_rx_drain (backend);
1709162 }
1710 return res || rmdir (connector, path);
1711 }
1712 else
1713 {
1714 return -EBADF;
1715 }
1716 }
1717
1718 static gint
1719 connector_delete_samples_item (const gchar * path, void *data)
1720 {
1721 return connector_delete_common_item (path, data,
1722 connector_read_samples_dir,
1723 connector_delete_samples_dir,
1724 connector_delete_sample);
1725 }
1726
1727 static gint
1728 connector_delete_raw_item (const gchar * path, void *data)
1729 {
1730 return connector_delete_common_item (path, data,
1731 connector_read_raw_dir,
1732 connector_delete_raw_dir,
1733 connector_delete_raw);
1734 }
1735
1736 static gint
1737 connector_upload_smplrw (const gchar * path, GByteArray * input,
1738 struct job_control *control, void *data,
1739 connector_msg_path_len_func new_msg_open_write,
1740 connector_msg_write_blk_func new_msg_write_blk,
1741 connector_msg_id_len_func new_msg_close_write)
1742 {
1743 struct connector *connector = data;
1744 GByteArray *tx_msg;
1745 GByteArray *rx_msg;
1746 guint transferred;
1747 guint32 id;
1748 int i;
1749 gboolean active;
1750 gint res = 0;
1751
1752 //If the file already exists the device makes no difference between creating a new file and creating an already existent file.
1753 //Also, the new file would be discarded if an upload is not completed.
1754
1755 tx_msg = new_msg_open_write (path, input->len);
1756 if (!tx_msg)
1757 {
1758 return -EINVAL;
163 connector++;
1759164 }
1760165
1761 rx_msg = connector_tx_and_rx (connector, tx_msg);
1762 if (!rx_msg)
1763 {
1764 return -EIO;
1765 }
1766
1767 //Response: x, x, x, x, 0xc0, [0 (error), 1 (success)], id, frames
1768 res = connector_get_smplrw_info_from_msg (rx_msg, &id, NULL);
1769 if (res)
1770 {
1771 error_print ("%s (%s)\n", snd_strerror (res),
1772 connector_get_msg_string (rx_msg));
1773 free_msg (rx_msg);
1774 return res;
1775 }
1776 free_msg (rx_msg);
1777
1778 transferred = 0;
1779 i = 0;
1780 if (control)
1781 {
1782 g_mutex_lock (&control->mutex);
1783 active = control->active;
1784 g_mutex_unlock (&control->mutex);
1785 }
1786 else
1787 {
1788 active = TRUE;
1789 }
1790
1791 while (transferred < input->len && active)
1792 {
1793 tx_msg = new_msg_write_blk (id, input, &transferred, i, control->data);
1794 rx_msg = connector_tx_and_rx (connector, tx_msg);
1795 if (!rx_msg)
1796 {
1797 return -EIO;
1798 }
1799 //Response: x, x, x, x, 0xc2, [0 (error), 1 (success)]...
1800 if (!connector_get_msg_status (rx_msg))
1801 {
1802 error_print ("Unexpected status\n");
1803 }
1804 free_msg (rx_msg);
1805 i++;
1806
1807 if (control)
1808 {
1809 set_job_control_progress (control,
1810 transferred / (double) input->len);
1811 g_mutex_lock (&control->mutex);
1812 active = control->active;
1813 g_mutex_unlock (&control->mutex);
1814 }
1815
1816 usleep (REST_TIME);
1817 }
1818
1819 debug_print (2, "%d bytes sent\n", transferred);
1820
1821 if (active)
1822 {
1823 tx_msg = new_msg_close_write (id, transferred);
1824 rx_msg = connector_tx_and_rx (connector, tx_msg);
1825 if (!rx_msg)
1826 {
1827 return -EIO;
1828 }
1829 //Response: x, x, x, x, 0xc1, [0 (error), 1 (success)]...
1830 if (!connector_get_msg_status (rx_msg))
1831 {
1832 error_print ("Unexpected status\n");
1833 }
1834 free_msg (rx_msg);
1835 }
1836
1837 return res;
1838 }
1839
1840 static gint
1841 connector_upload_sample_part (const gchar * path, GByteArray * sample,
1842 struct job_control *control, void *data)
1843 {
1844 return connector_upload_smplrw (path, sample, control, data,
1845 connector_new_msg_open_sample_write,
1846 connector_new_msg_write_sample_blk,
1847 connector_new_msg_close_sample_write);
1848 }
1849
1850 static gint
1851 connector_upload_sample (const gchar * path, GByteArray * output,
1852 struct job_control *control, void *data)
1853 {
1854 control->parts = 1;
1855 control->part = 0;
1856 return connector_upload_sample_part (path, output, control, data);
1857 }
1858
1859 static gint
1860 connector_upload_raw (const gchar * path, GByteArray * sample,
1861 struct job_control *control, void *data)
1862 {
1863 return connector_upload_smplrw (path, sample, control, data,
1864 connector_new_msg_open_raw_write,
1865 connector_new_msg_write_raw_blk,
1866 connector_new_msg_close_raw_write);
1867 }
1868
1869 static GByteArray *
1870 connector_new_msg_open_sample_read (const gchar * path)
1871 {
1872 return connector_new_msg_path (FS_SAMPLE_OPEN_FILE_READER_REQUEST,
1873 sizeof
1874 (FS_SAMPLE_OPEN_FILE_READER_REQUEST), path);
1875 }
1876
1877 static GByteArray *
1878 connector_new_msg_open_raw_read (const gchar * path)
1879 {
1880 return connector_new_msg_path (FS_RAW_OPEN_FILE_READER_REQUEST,
1881 sizeof
1882 (FS_RAW_OPEN_FILE_READER_REQUEST), path);
1883 }
1884
1885 static void
1886 connector_copy_sample_data (GByteArray * input, GByteArray * output)
1887 {
1888 gint i;
1889 gint16 v;
1890 gint16 *frame = (gint16 *) input->data;
1891
1892 for (i = 0; i < input->len; i += sizeof (gint16))
1893 {
1894 v = be16toh (*frame);
1895 g_byte_array_append (output, (guint8 *) & v, sizeof (gint16));
1896 frame++;
1897 }
1898 }
1899
1900 static void
1901 connector_copy_raw_data (GByteArray * input, GByteArray * output)
1902 {
1903 g_byte_array_append (output, input->data, input->len);
1904 }
1905
1906 static gint
1907 connector_download_smplrw (const gchar * path, GByteArray * output,
1908 struct job_control *control, void *data,
1909 connector_msg_path_func new_msg_open_read,
1910 guint read_offset,
1911 connector_msg_read_blk_func new_msg_read_blk,
1912 connector_msg_id_func new_msg_close_read,
1913 connector_copy_array copy_array)
1914 {
1915 struct connector *connector = data;
1916 struct sample_loop_data *sample_loop_data;
1917 struct elektron_sample_info *elektron_sample_info;
1918 GByteArray *tx_msg;
1919 GByteArray *rx_msg;
1920 GByteArray *array;
1921 guint32 id;
1922 guint frames;
1923 guint next_block_start;
1924 guint req_size;
1925 guint offset;
1926 gboolean active;
1927 gint res;
1928
1929 tx_msg = new_msg_open_read (path);
1930 if (!tx_msg)
1931 {
1932 return -EINVAL;
1933 }
1934
1935 rx_msg = connector_tx_and_rx (connector, tx_msg);
1936 if (!rx_msg)
1937 {
1938 return -EIO;
1939 }
1940 res = connector_get_smplrw_info_from_msg (rx_msg, &id, &frames);
1941 if (res)
1942 {
1943 error_print ("%s (%s)\n", snd_strerror (res),
1944 connector_get_msg_string (rx_msg));
1945 free_msg (rx_msg);
1946 return res;
1947 }
1948 free_msg (rx_msg);
1949
1950 debug_print (2, "%d frames to download\n", frames);
1951
1952 if (control)
1953 {
1954 g_mutex_lock (&control->mutex);
1955 active = control->active;
1956 g_mutex_unlock (&control->mutex);
1957 }
1958 else
1959 {
1960 active = TRUE;
1961 }
1962
1963 array = g_byte_array_new ();
1964 res = 0;
1965 next_block_start = 0;
1966 offset = read_offset;
1967 control->data = NULL;
1968 while (next_block_start < frames && active)
1969 {
1970 req_size =
1971 frames - next_block_start >
1972 DATA_TRANSF_BLOCK_BYTES ? DATA_TRANSF_BLOCK_BYTES : frames -
1973 next_block_start;
1974 tx_msg = new_msg_read_blk (id, next_block_start, req_size);
1975 rx_msg = connector_tx_and_rx (connector, tx_msg);
1976 if (!rx_msg)
1977 {
1978 res = -EIO;
1979 goto cleanup;
1980 }
1981 g_byte_array_append (array, &rx_msg->data[FS_SAMPLES_PAD_RES + offset],
1982 req_size - offset);
1983
1984 next_block_start += req_size;
1985 //Only in the first iteration. It has no effect for the raw filesystem (M:C) as offset is 0.
1986 if (offset)
1987 {
1988 offset = 0;
1989 elektron_sample_info =
1990 (struct elektron_sample_info *) &rx_msg->data[FS_SAMPLES_PAD_RES];
1991 sample_loop_data = malloc (sizeof (struct elektron_sample_info));
1992 sample_loop_data->start =
1993 be32toh (elektron_sample_info->loop_start);
1994 sample_loop_data->end = be32toh (elektron_sample_info->loop_end);
1995 control->data = sample_loop_data;
1996 debug_print (2, "Loop start at %d, loop end at %d\n",
1997 sample_loop_data->start, sample_loop_data->end);
1998 }
1999
2000 free_msg (rx_msg);
2001
2002 if (control)
2003 {
2004 set_job_control_progress (control,
2005 next_block_start / (double) frames);
2006 g_mutex_lock (&control->mutex);
2007 active = control->active;
2008 g_mutex_unlock (&control->mutex);
2009 }
2010
2011 usleep (REST_TIME);
2012 }
2013
2014 debug_print (2, "%d bytes received\n", next_block_start);
2015
2016 if (active)
2017 {
2018 copy_array (array, output);
2019 }
2020 else
2021 {
2022 res = -1;
2023 }
2024
2025 tx_msg = new_msg_close_read (id);
2026 rx_msg = connector_tx_and_rx (connector, tx_msg);
2027 if (!rx_msg)
2028 {
2029 res = -EIO;
2030 goto cleanup;
2031 }
2032 //Response: x, x, x, x, 0xb1, 00 00 00 0a 00 01 65 de (sample id and received bytes)
2033 free_msg (rx_msg);
2034
2035 cleanup:
2036 free_msg (array);
2037 if (res)
2038 {
2039 g_free (control->data);
2040 }
2041 return res;
2042 }
2043
2044 static gint
2045 connector_download_sample_part (const gchar * path, GByteArray * output,
2046 struct job_control *control, void *data)
2047 {
2048 return connector_download_smplrw (path, output, control, data,
2049 connector_new_msg_open_sample_read,
2050 sizeof
2051 (struct elektron_sample_info),
2052 connector_new_msg_read_sample_blk,
2053 connector_new_msg_close_sample_read,
2054 connector_copy_sample_data);
2055 }
2056
2057 static gint
2058 connector_download_sample (const gchar * path, GByteArray * output,
2059 struct job_control *control, void *data)
2060 {
2061 control->parts = 1;
2062 control->part = 0;
2063 return connector_download_sample_part (path, output, control, data);
2064 }
2065
2066 static gint
2067 connector_download_raw (const gchar * path, GByteArray * output,
2068 struct job_control *control, void *data)
2069 {
2070 gint ret;
2071 gchar *path_with_ext = connector_add_ext_to_mc_snd (path);
2072 ret = connector_download_smplrw (path_with_ext, output, control, data,
2073 connector_new_msg_open_raw_read,
2074 0,
2075 connector_new_msg_read_raw_blk,
2076 connector_new_msg_close_raw_read,
2077 connector_copy_raw_data);
2078 g_free (path_with_ext);
2079 return ret;
2080 }
2081
2082 static gint
2083 connector_create_samples_dir (const gchar * path, void *data)
2084 {
2085 struct connector *connector = data;
2086 return connector_path_common (connector, path, FS_SAMPLE_CREATE_DIR_REQUEST,
2087 sizeof (FS_SAMPLE_CREATE_DIR_REQUEST));
2088 }
2089
2090 static gint
2091 connector_create_raw_dir (const gchar * path, void *data)
2092 {
2093 struct connector *connector = data;
2094 return connector_path_common (connector, path, FS_RAW_CREATE_DIR_REQUEST,
2095 sizeof (FS_RAW_CREATE_DIR_REQUEST));
2096 }
2097
2098 static GByteArray *
2099 connector_new_msg_upgrade_os_start (guint size)
2100 {
2101 GByteArray *msg = connector_new_msg (OS_UPGRADE_START_REQUEST,
2102 sizeof (OS_UPGRADE_START_REQUEST));
2103
2104 memcpy (&msg->data[5], &size, sizeof (guint32));
2105
2106 return msg;
2107 }
2108
2109 static GByteArray *
2110 connector_new_msg_upgrade_os_write (GByteArray * os_data, gint * offset)
2111 {
2112 GByteArray *msg = connector_new_msg (OS_UPGRADE_WRITE_RESPONSE,
2113 sizeof (OS_UPGRADE_WRITE_RESPONSE));
2114 guint len;
2115 guint32 crc;
2116 guint32 aux32;
2117
2118 if (*offset + OS_TRANSF_BLOCK_BYTES < os_data->len)
2119 {
2120 len = OS_TRANSF_BLOCK_BYTES;
2121 }
2122 else
2123 {
2124 len = os_data->len - *offset;
2125 }
2126
2127 crc = crc32 (0xffffffff, &os_data->data[*offset], len);
2128
2129 debug_print (2, "CRC: %0x\n", crc);
2130
2131 aux32 = htobe32 (crc);
2132 memcpy (&msg->data[5], &aux32, sizeof (guint32));
2133 aux32 = htobe32 (len);
2134 memcpy (&msg->data[9], &aux32, sizeof (guint32));
2135 aux32 = htobe32 (*offset);
2136 memcpy (&msg->data[13], &aux32, sizeof (guint32));
2137
2138 g_byte_array_append (msg, &os_data->data[*offset], len);
2139
2140 *offset = *offset + len;
2141
2142 return msg;
2143 }
2144
2145 gint
2146 connector_upgrade_os (struct connector *connector,
2147 struct connector_sysex_transfer *transfer)
2148 {
2149 GByteArray *tx_msg;
2150 GByteArray *rx_msg;
2151 gint8 op;
2152 gint offset;
2153 gint res = 0;
2154
2155 transfer->status = SENDING;
2156
2157 tx_msg = connector_new_msg_upgrade_os_start (transfer->raw->len);
2158 rx_msg = connector_tx_and_rx (connector, tx_msg);
2159
2160 if (!rx_msg)
2161 {
2162 res = -EIO;
2163 goto end;
2164 }
2165 //Response: x, x, x, x, 0xd1, [0 (ok), 1 (error)]...
2166 op = connector_get_msg_status (rx_msg);
2167 if (op)
2168 {
2169 res = -EIO;
2170 error_print ("%s (%s)\n", snd_strerror (res),
2171 connector_get_msg_string (rx_msg));
2172 free_msg (rx_msg);
2173 goto end;
2174 }
2175
2176 free_msg (rx_msg);
2177
2178 offset = 0;
2179 while (offset < transfer->raw->len && transfer->active)
2180 {
2181 tx_msg = connector_new_msg_upgrade_os_write (transfer->raw, &offset);
2182 rx_msg = connector_tx_and_rx (connector, tx_msg);
2183
2184 if (!rx_msg)
2185 {
2186 res = -EIO;
2187 break;
2188 }
2189 //Response: x, x, x, x, 0xd1, int32, [0..3]...
2190 op = rx_msg->data[9];
2191 if (op == 1)
2192 {
2193 break;
2194 }
2195 else if (op > 1)
2196 {
2197 res = -EIO;
2198 error_print ("%s (%s)\n", snd_strerror (res),
2199 connector_get_msg_string (rx_msg));
2200 free_msg (rx_msg);
2201 break;
2202 }
2203
2204 free_msg (rx_msg);
2205
2206 usleep (REST_TIME);
2207 }
166 error_print ("No device recognized\n");
2208167
2209168 end:
2210 transfer->active = FALSE;
2211 transfer->status = FINISHED;
2212 return res;
2213 }
2214
2215 void
2216 connector_destroy (struct connector *connector)
2217 {
2218 int err;
2219
2220 debug_print (1, "Destroying connector...\n");
2221
2222 if (connector->inputp)
2223 {
2224 err = snd_rawmidi_close (connector->inputp);
2225 if (err)
2226 {
2227 error_print ("Error while closing MIDI port: %s\n",
2228 snd_strerror (err));
2229 }
2230 connector->inputp = NULL;
2231 }
2232
2233 if (connector->outputp)
2234 {
2235 err = snd_rawmidi_close (connector->outputp);
2236 if (err)
2237 {
2238 error_print ("Error while closing MIDI port: %s\n",
2239 snd_strerror (err));
2240 }
2241 connector->outputp = NULL;
2242 }
2243
2244 if (connector->device_name)
2245 {
2246 free (connector->device_name);
2247 free (connector->fw_version);
2248 free (connector->overbridge_name);
2249 connector->device_name = NULL;
2250 }
2251
2252 if (connector->buffer)
2253 {
2254 free (connector->buffer);
2255 connector->buffer = NULL;
2256 }
2257
2258 if (connector->pfds)
2259 {
2260 free (connector->pfds);
2261 connector->pfds = NULL;
2262 }
2263
2264 if (connector->dir_cache)
2265 {
2266 g_hash_table_destroy (connector->dir_cache);
2267 connector->dir_cache = NULL;
2268 }
2269
2270 if (connector->device_desc.name)
2271 {
2272 g_free (connector->device_desc.name);
2273 connector->device_desc.name = NULL;
2274 }
2275
2276 if (connector->device_desc.alias)
2277 {
2278 g_free (connector->device_desc.alias);
2279 connector->device_desc.alias = NULL;
2280 }
2281
2282 }
2283
2284 gint
2285 connector_get_storage_stats (struct connector *connector,
2286 enum connector_storage type,
2287 struct connector_storage_stats *statfs)
2288 {
2289 GByteArray *tx_msg;
2290 GByteArray *rx_msg;
2291 gint8 op;
2292 guint64 *data;
2293 int index;
2294 gint res = 0;
2295
2296 tx_msg = connector_new_msg_uint8 (STORAGEINFO_REQUEST,
2297 sizeof (STORAGEINFO_REQUEST), type);
2298 rx_msg = connector_tx_and_rx (connector, tx_msg);
2299 if (!rx_msg)
2300 {
2301 return -EIO;
2302 }
2303
2304 op = connector_get_msg_status (rx_msg);
2305 if (!op)
2306 {
2307 error_print ("%s (%s)\n", snd_strerror (-EIO),
2308 connector_get_msg_string (rx_msg));
2309 free_msg (rx_msg);
2310 return -EIO;
2311 }
2312
2313 index = 0;
2314 for (int i = 0, storage = STORAGE_PLUS_DRIVE; storage <= STORAGE_RAM;
2315 i++, storage <<= 1)
2316 {
2317 if (storage == type)
2318 {
2319 index = i;
2320 }
2321 }
2322
2323 statfs->name = FS_TYPE_NAMES[index];
2324 data = (guint64 *) & rx_msg->data[6];
2325 statfs->bfree = be64toh (*data);
2326 data = (guint64 *) & rx_msg->data[14];
2327 statfs->bsize = be64toh (*data);
2328
2329 free_msg (rx_msg);
2330
2331 return res;
2332 }
2333
2334 gdouble
2335 connector_get_storage_stats_percent (struct connector_storage_stats *statfs)
2336 {
2337 return (statfs->bsize - statfs->bfree) * 100.0 / statfs->bsize;
2338 }
2339
2340 gint
2341 connector_init (struct connector *connector, gint card,
2342 const char *device_filename)
2343 {
2344 gint err;
2345 guint8 id;
2346 GByteArray *tx_msg;
2347 GByteArray *rx_msg;
2348 snd_rawmidi_params_t *params;
2349 gchar name[32];
2350 sprintf (name, "hw:%d", card);
2351 connector->inputp = NULL;
2352 connector->outputp = NULL;
2353 connector->device_name = NULL;
2354 connector->buffer = NULL;
2355 connector->rx_len = 0;
2356 connector->pfds = NULL;
2357 connector->dir_cache = NULL;
2358 connector->device_desc.name = NULL;
2359 connector->device_desc.alias = NULL;
2360 if (card < 0)
2361 {
2362 debug_print (1, "Invalid card\n");
2363 err = -EINVAL;
2364 goto cleanup;
2365 }
2366
2367 debug_print (1, "Initializing connector to '%s'...\n", name);
2368 if ((err =
2369 snd_rawmidi_open (&connector->inputp, &connector->outputp,
2370 name, SND_RAWMIDI_NONBLOCK | SND_RAWMIDI_SYNC)) < 0)
2371 {
2372 error_print ("Error while opening MIDI port: %s\n", g_strerror (err));
2373 goto cleanup;
2374 }
2375
2376 debug_print (1, "Setting blocking mode...\n");
2377 if ((err = snd_rawmidi_nonblock (connector->outputp, 0)) < 0)
2378 {
2379 error_print ("Error while setting blocking mode\n");
2380 goto cleanup;
2381 }
2382 if ((err = snd_rawmidi_nonblock (connector->inputp, 1)) < 0)
2383 {
2384 error_print ("Error while setting blocking mode\n");
2385 goto cleanup;
2386 }
2387
2388 debug_print (1, "Stopping device...\n");
2389 if (snd_rawmidi_write (connector->outputp, "\xfc", 1) < 0)
2390 {
2391 error_print ("Error while stopping device\n");
2392 }
2393
2394 connector->seq = 0;
2395 connector->device_name = malloc (LABEL_MAX);
2396 if (!connector->device_name)
2397 {
2398 goto cleanup;
2399 }
2400
2401 connector->buffer = malloc (sizeof (guint8) * BUFF_SIZE);
2402 if (!connector->buffer)
2403 {
2404 goto cleanup;
2405 }
2406
2407 connector->npfds = snd_rawmidi_poll_descriptors_count (connector->inputp);
2408 connector->pfds = malloc (connector->npfds * sizeof (struct pollfd));
2409 if (!connector->buffer)
2410 {
2411 goto cleanup;
2412 }
2413 snd_rawmidi_poll_descriptors (connector->inputp, connector->pfds,
2414 connector->npfds);
2415 err = snd_rawmidi_params_malloc (&params);
2416 if (err)
2417 {
2418 goto cleanup;
2419 }
2420
2421 err = snd_rawmidi_params_current (connector->inputp, params);
2422 if (err)
2423 {
2424 goto cleanup_params;
2425 }
2426
2427 err =
2428 snd_rawmidi_params_set_buffer_size (connector->inputp, params,
2429 RING_BUFF_SIZE);
2430 if (err)
2431 {
2432 goto cleanup_params;
2433 }
2434
2435 err = snd_rawmidi_params (connector->inputp, params);
2436 if (err)
2437 {
2438 goto cleanup_params;
2439 }
2440
2441 tx_msg = connector_new_msg (PING_REQUEST, sizeof (PING_REQUEST));
2442 rx_msg = connector_tx_and_rx (connector, tx_msg);
2443 if (!rx_msg)
2444 {
2445 err = -EIO;
2446 goto cleanup_params;
2447 }
2448 connector->overbridge_name =
2449 strdup ((gchar *) & rx_msg->data[7 + rx_msg->data[6]]);
2450 id = rx_msg->data[5];
2451 free_msg (rx_msg);
2452 if (load_device_desc (&connector->device_desc, id, device_filename))
2453 {
2454 err = -ENODEV;
2455 goto cleanup_params;
2456 }
2457
2458 tx_msg =
2459 connector_new_msg (SOFTWARE_VERSION_REQUEST,
2460 sizeof (SOFTWARE_VERSION_REQUEST));
2461 rx_msg = connector_tx_and_rx (connector, tx_msg);
2462 if (!rx_msg)
2463 {
2464 err = -EIO;
2465 goto cleanup_params;
2466 }
2467 connector->fw_version = strdup ((gchar *) & rx_msg->data[10]);
2468 free_msg (rx_msg);
2469
2470 if (debug_level > 1)
2471 {
2472 tx_msg =
2473 connector_new_msg (DEVICEUID_REQUEST, sizeof (DEVICEUID_REQUEST));
2474 rx_msg = connector_tx_and_rx (connector, tx_msg);
2475 if (rx_msg)
2476 {
2477 debug_print (1, "UID: %x\n", *((guint32 *) & rx_msg->data[5]));
2478 free_msg (rx_msg);
2479 }
2480 }
2481
2482 snprintf (connector->device_name, LABEL_MAX, "%s %s (%s)",
2483 connector->device_desc.name,
2484 connector->fw_version, connector->overbridge_name);
2485 debug_print (1, "Connected to %s\n", connector->device_name);
2486 err = 0;
2487
2488 cleanup_params:
2489 snd_rawmidi_params_free (params);
2490 cleanup:
2491 if (err)
2492 {
2493 connector_destroy (connector);
2494 }
169 backend_destroy (backend);
2495170 return err;
2496171 }
2497
2498 gboolean
2499 connector_check (struct connector *connector)
2500 {
2501 return (connector->inputp && connector->outputp);
2502 }
2503
2504 static struct connector_system_device *
2505 connector_get_system_device (snd_ctl_t * ctl, int card, int device)
2506 {
2507 snd_rawmidi_info_t *info;
2508 const gchar *name;
2509 const gchar *sub_name;
2510 int subs, subs_in, subs_out;
2511 int sub;
2512 int err;
2513 struct connector_system_device *connector_system_device;
2514
2515 snd_rawmidi_info_alloca (&info);
2516 snd_rawmidi_info_set_device (info, device);
2517 snd_rawmidi_info_set_stream (info, SND_RAWMIDI_STREAM_INPUT);
2518 err = snd_ctl_rawmidi_info (ctl, info);
2519 if (err >= 0)
2520 {
2521 subs_in = snd_rawmidi_info_get_subdevices_count (info);
2522 }
2523 else
2524 {
2525 subs_in = 0;
2526 }
2527
2528 snd_rawmidi_info_set_stream (info, SND_RAWMIDI_STREAM_OUTPUT);
2529 err = snd_ctl_rawmidi_info (ctl, info);
2530 if (err >= 0)
2531 {
2532 subs_out = snd_rawmidi_info_get_subdevices_count (info);
2533 }
2534 else
2535 {
2536 subs_out = 0;
2537 }
2538
2539 subs = subs_in > subs_out ? subs_in : subs_out;
2540 if (!subs)
2541 {
2542 return NULL;
2543 }
2544
2545 if (subs_in <= 0 || subs_out <= 0)
2546 {
2547 return NULL;
2548 }
2549
2550 sub = 0;
2551 snd_rawmidi_info_set_stream (info, sub < subs_in ?
2552 SND_RAWMIDI_STREAM_INPUT :
2553 SND_RAWMIDI_STREAM_OUTPUT);
2554 snd_rawmidi_info_set_subdevice (info, sub);
2555 err = snd_ctl_rawmidi_info (ctl, info);
2556 if (err < 0)
2557 {
2558 error_print ("Cannot get rawmidi information %d:%d:%d: %s\n",
2559 card, device, sub, snd_strerror (err));
2560 return NULL;
2561 }
2562
2563 name = snd_rawmidi_info_get_name (info);
2564 sub_name = snd_rawmidi_info_get_subdevice_name (info);
2565 if (strncmp (sub_name, "Elektron", 8) == 0)
2566 {
2567 debug_print (1, "Adding hw:%d (%s) %s...\n", card, name, sub_name);
2568 connector_system_device =
2569 malloc (sizeof (struct connector_system_device));
2570 connector_system_device->card = card;
2571 connector_system_device->name = strdup (sub_name);
2572 return connector_system_device;
2573 }
2574 else
2575 {
2576 return NULL;
2577 }
2578 }
2579
2580 static void
2581 connector_fill_card_elektron_devices (gint card, GArray * devices)
2582 {
2583 snd_ctl_t *ctl;
2584 gchar name[32];
2585 gint device;
2586 gint err;
2587 struct connector_system_device *connector_system_device;
2588
2589 sprintf (name, "hw:%d", card);
2590 if ((err = snd_ctl_open (&ctl, name, 0)) < 0)
2591 {
2592 error_print ("Cannot open control for card %d: %s\n",
2593 card, snd_strerror (err));
2594 return;
2595 }
2596 device = -1;
2597 while (!(err = snd_ctl_rawmidi_next_device (ctl, &device)) && device >= 0)
2598 {
2599 connector_system_device =
2600 connector_get_system_device (ctl, card, device);
2601 if (connector_system_device)
2602 {
2603 g_array_append_vals (devices, connector_system_device, 1);
2604 }
2605 }
2606 if (err < 0)
2607 {
2608 error_print ("Cannot determine device number: %s\n",
2609 snd_strerror (err));
2610 }
2611 snd_ctl_close (ctl);
2612 }
2613
2614 GArray *
2615 connector_get_system_devices ()
2616 {
2617 gint card, err;
2618 GArray *devices =
2619 g_array_new (FALSE, FALSE, sizeof (struct connector_system_device));
2620
2621 card = -1;
2622 while (!(err = snd_card_next (&card)) && card >= 0)
2623 {
2624 connector_fill_card_elektron_devices (card, devices);
2625 }
2626 if (err < 0)
2627 {
2628 error_print ("Cannot determine card number: %s\n", snd_strerror (err));
2629 }
2630
2631 return devices;
2632 }
2633
2634 static guint
2635 connector_next_data_entry (struct item_iterator *iter)
2636 {
2637 gchar *name_cp1252;
2638 guint32 *data32;
2639 guint16 *data16;
2640 guint8 type;
2641 guint8 has_children;
2642 struct connector_iterator_data *data = iter->data;
2643
2644 if (iter->item.name != NULL)
2645 {
2646 g_free (iter->item.name);
2647 }
2648
2649 if (data->pos == data->msg->len)
2650 {
2651 iter->item.name = NULL;
2652 return -ENOENT;
2653 }
2654
2655 name_cp1252 = (gchar *) & data->msg->data[data->pos];
2656 iter->item.name = connector_get_utf8 (name_cp1252);
2657 data->pos += strlen (name_cp1252) + 1;
2658 has_children = data->msg->data[data->pos];
2659 data->pos++;
2660 type = data->msg->data[data->pos];
2661 data->pos++;
2662
2663 switch (type)
2664 {
2665 case 1:
2666 iter->item.type = ELEKTROID_DIR;
2667 data->pos += sizeof (guint32); // child entries
2668 iter->item.size = 0;
2669 iter->item.index = -1;
2670 data->operations = 0;
2671 data->has_valid_data = 0;
2672 data->has_metadata = 0;
2673 break;
2674 case 2:
2675 iter->item.type = has_children ? ELEKTROID_DIR : ELEKTROID_FILE;
2676
2677 data32 = (guint32 *) & data->msg->data[data->pos];
2678 iter->item.index = be32toh (*data32); //index
2679 data->pos += sizeof (gint32);
2680
2681 data32 = (guint32 *) & data->msg->data[data->pos];
2682 iter->item.size = be32toh (*data32);
2683 data->pos += sizeof (guint32);
2684
2685 data16 = (guint16 *) & data->msg->data[data->pos];
2686 data->operations = be16toh (*data16);
2687 data->pos += sizeof (guint16);
2688
2689 data->has_valid_data = data->msg->data[data->pos];
2690 data->pos++;
2691
2692 data->has_metadata = data->msg->data[data->pos];
2693 data->pos++;
2694
2695 break;
2696 default:
2697 error_print ("Unrecognized data entry: %d\n", iter->item.type);
2698 break;
2699 }
2700
2701 return 0;
2702 }
2703
2704 static gchar *
2705 connector_add_prefix_to_path (const gchar * dir, const gchar * prefix)
2706 {
2707 gchar *full = malloc (PATH_MAX);
2708
2709 if (prefix)
2710 {
2711 snprintf (full, PATH_MAX, "%s%s", prefix, dir);
2712 }
2713 else
2714 {
2715 strcpy (full, dir);
2716 }
2717
2718 return full;
2719 }
2720
2721 static gint
2722 connector_read_data_dir_prefix (struct item_iterator *iter, const gchar * dir,
2723 void *data, const char *prefix)
2724 {
2725 int res;
2726 GByteArray *tx_msg;
2727 GByteArray *rx_msg;
2728 struct connector *connector = data;
2729 gchar *dir_w_prefix = connector_add_prefix_to_path (dir, prefix);
2730
2731 tx_msg = connector_new_msg_list (dir_w_prefix, 0, 0, 1);
2732 g_free (dir_w_prefix);
2733 if (!tx_msg)
2734 {
2735 return -EINVAL;
2736 }
2737
2738 rx_msg = connector_tx_and_rx (connector, tx_msg);
2739 if (!rx_msg)
2740 {
2741 return -EIO;
2742 }
2743
2744 res = connector_get_msg_status (rx_msg);
2745 if (!res)
2746 {
2747 free_msg (rx_msg);
2748 return -ENOTDIR;
2749 }
2750
2751 return connector_init_iterator (iter, rx_msg, connector_next_data_entry,
2752 FS_DATA_ALL, FALSE);
2753 }
2754
2755 static gint
2756 connector_read_data_dir_any (struct item_iterator *iter, const gchar * dir,
2757 void *data)
2758 {
2759 return connector_read_data_dir_prefix (iter, dir, data, NULL);
2760 }
2761
2762 static gint
2763 connector_read_data_dir_prj (struct item_iterator *iter, const gchar * dir,
2764 void *data)
2765 {
2766 return connector_read_data_dir_prefix (iter, dir, data, FS_DATA_PRJ_PREFIX);
2767 }
2768
2769 static gint
2770 connector_read_data_dir_snd (struct item_iterator *iter, const gchar * dir,
2771 void *data)
2772 {
2773 return connector_read_data_dir_prefix (iter, dir, data, FS_DATA_SND_PREFIX);
2774 }
2775
2776 static gint
2777 connector_dst_src_data_prefix_common (const gchar * src, const gchar * dst,
2778 void *data, const char *prefix,
2779 const guint8 * op_data, guint len)
2780 {
2781 gint res;
2782 struct connector *connector = data;
2783 char *src_w_prefix = connector_add_prefix_to_path (src, prefix);
2784 char *dst_w_prefix = connector_add_prefix_to_path (dst, prefix);
2785
2786 res = connector_src_dst_common (connector, src_w_prefix, dst_w_prefix,
2787 op_data, len);
2788 g_free (src_w_prefix);
2789 g_free (dst_w_prefix);
2790
2791 return res;
2792 }
2793
2794 static gint
2795 connector_move_data_item_prefix (const gchar * src, const gchar * dst,
2796 void *data, const char *prefix)
2797 {
2798 return connector_dst_src_data_prefix_common (src, dst, data, prefix,
2799 DATA_MOVE_REQUEST,
2800 sizeof (DATA_MOVE_REQUEST));
2801 }
2802
2803 static gint
2804 connector_move_data_item_any (const gchar * src, const gchar * dst,
2805 void *data)
2806 {
2807 return connector_move_data_item_prefix (src, dst, data, NULL);
2808 }
2809
2810 static gint
2811 connector_move_data_item_prj (const gchar * src, const gchar * dst,
2812 void *data)
2813 {
2814 return connector_move_data_item_prefix (src, dst, data, FS_DATA_PRJ_PREFIX);
2815 }
2816
2817 static gint
2818 connector_move_data_item_snd (const gchar * src, const gchar * dst,
2819 void *data)
2820 {
2821 return connector_move_data_item_prefix (src, dst, data, FS_DATA_SND_PREFIX);
2822 }
2823
2824 static gint
2825 connector_copy_data_item_prefix (const gchar * src, const gchar * dst,
2826 void *data, const gchar * prefix)
2827 {
2828 return connector_dst_src_data_prefix_common (src, dst, data, prefix,
2829 DATA_COPY_REQUEST,
2830 sizeof (DATA_COPY_REQUEST));
2831 }
2832
2833 static gint
2834 connector_copy_data_item_any (const gchar * src, const gchar * dst,
2835 void *data)
2836 {
2837 return connector_copy_data_item_prefix (src, dst, data, NULL);
2838 }
2839
2840 static gint
2841 connector_copy_data_item_prj (const gchar * src, const gchar * dst,
2842 void *data)
2843 {
2844 return connector_copy_data_item_prefix (src, dst, data, FS_DATA_PRJ_PREFIX);
2845 }
2846
2847 static gint
2848 connector_copy_data_item_snd (const gchar * src, const gchar * dst,
2849 void *data)
2850 {
2851 return connector_copy_data_item_prefix (src, dst, data, FS_DATA_SND_PREFIX);
2852 }
2853
2854 static gint
2855 connector_path_data_prefix_common (const gchar * path,
2856 void *data, const char *prefix,
2857 const guint8 * op_data, guint len)
2858 {
2859 gint res;
2860 struct connector *connector = data;
2861 char *path_w_prefix = connector_add_prefix_to_path (path, prefix);
2862
2863 res = connector_path_common (connector, path_w_prefix, op_data, len);
2864 g_free (path_w_prefix);
2865
2866 return res;
2867 }
2868
2869 static gint
2870 connector_clear_data_item_prefix (const gchar * path, void *data,
2871 const gchar * prefix)
2872 {
2873 return connector_path_data_prefix_common (path, data, prefix,
2874 DATA_CLEAR_REQUEST,
2875 sizeof (DATA_CLEAR_REQUEST));
2876 }
2877
2878 static gint
2879 connector_clear_data_item_any (const gchar * path, void *data)
2880 {
2881 return connector_clear_data_item_prefix (path, data, NULL);
2882 }
2883
2884 static gint
2885 connector_clear_data_item_prj (const gchar * path, void *data)
2886 {
2887 return connector_clear_data_item_prefix (path, data, FS_DATA_PRJ_PREFIX);
2888 }
2889
2890 static gint
2891 connector_clear_data_item_snd (const gchar * path, void *data)
2892 {
2893 return connector_clear_data_item_prefix (path, data, FS_DATA_SND_PREFIX);
2894 }
2895
2896 static gint
2897 connector_swap_data_item_prefix (const gchar * src, const gchar * dst,
2898 void *data, const gchar * prefix)
2899 {
2900 return connector_dst_src_data_prefix_common (src, dst, data, prefix,
2901 DATA_SWAP_REQUEST,
2902 sizeof (DATA_SWAP_REQUEST));
2903 }
2904
2905 static gint
2906 connector_swap_data_item_any (const gchar * src, const gchar * dst,
2907 void *data)
2908 {
2909 return connector_swap_data_item_prefix (src, dst, data, NULL);
2910 }
2911
2912 static gint
2913 connector_swap_data_item_prj (const gchar * src, const gchar * dst,
2914 void *data)
2915 {
2916 return connector_swap_data_item_prefix (src, dst, data, FS_DATA_PRJ_PREFIX);
2917 }
2918
2919 static gint
2920 connector_swap_data_item_snd (const gchar * src, const gchar * dst,
2921 void *data)
2922 {
2923 return connector_swap_data_item_prefix (src, dst, data, FS_DATA_SND_PREFIX);
2924 }
2925
2926 static gint
2927 connector_open_datum (struct connector *connector, const gchar * path,
2928 guint32 * jid, gint mode, guint32 size)
2929 {
2930 guint32 *data32;
2931 guint32 sizebe;
2932 guint32 chunk_size;
2933 guint8 compression;
2934 GByteArray *rx_msg;
2935 GByteArray *tx_msg;
2936 const guint8 *data;
2937 guint len;
2938 gchar *path_cp1252;
2939 gint res = 0;
2940
2941 if (mode == O_RDONLY)
2942 {
2943 data = DATA_READ_OPEN_REQUEST;
2944 len = sizeof (DATA_READ_OPEN_REQUEST);
2945 }
2946 else if (mode == O_WRONLY)
2947 {
2948 data = DATA_WRITE_OPEN_REQUEST;
2949 len = sizeof (DATA_WRITE_OPEN_REQUEST);
2950 }
2951 else
2952 {
2953 return -EINVAL;
2954 }
2955
2956 tx_msg = connector_new_msg (data, len);
2957 if (!tx_msg)
2958 {
2959 return -ENOMEM;
2960 }
2961
2962 path_cp1252 = connector_get_cp1252 (path);
2963
2964 if (mode == O_RDONLY)
2965 {
2966 g_byte_array_append (tx_msg, (guint8 *) path_cp1252,
2967 strlen (path_cp1252) + 1);
2968 chunk_size = htobe32 (DATA_TRANSF_BLOCK_BYTES);
2969 g_byte_array_append (tx_msg, (guint8 *) & chunk_size, sizeof (guint32));
2970 compression = 1;
2971 g_byte_array_append (tx_msg, &compression, sizeof (guint8));
2972 }
2973
2974 if (mode == O_WRONLY)
2975 {
2976 sizebe = htobe32 (size);
2977 g_byte_array_append (tx_msg, (guint8 *) & sizebe, sizeof (guint32));
2978 g_byte_array_append (tx_msg, (guint8 *) path_cp1252,
2979 strlen (path_cp1252) + 1);
2980 }
2981
2982 rx_msg = connector_tx_and_rx (connector, tx_msg);
2983 if (!rx_msg)
2984 {
2985 res = -EIO;
2986 goto cleanup;
2987 }
2988
2989 if (!connector_get_msg_status (rx_msg))
2990 {
2991 res = -EPERM;
2992 error_print ("%s (%s)\n", snd_strerror (res),
2993 connector_get_msg_string (rx_msg));
2994 free_msg (rx_msg);
2995 goto cleanup;
2996 }
2997
2998 data32 = (guint32 *) & rx_msg->data[6];
2999 *jid = be32toh (*data32);
3000
3001 if (mode == O_RDONLY)
3002 {
3003 data32 = (guint32 *) & rx_msg->data[10];
3004 chunk_size = be32toh (*data32);
3005
3006 compression = rx_msg->data[14];
3007
3008 debug_print (1,
3009 "Open datum info: job id: %d; chunk size: %d; compression: %d\n",
3010 *jid, chunk_size, compression);
3011 }
3012
3013 if (mode == O_WRONLY)
3014 {
3015 debug_print (1, "Open datum info: job id: %d\n", *jid);
3016 }
3017
3018 free_msg (rx_msg);
3019
3020 cleanup:
3021 g_free (path_cp1252);
3022 return res;
3023 }
3024
3025 static gint
3026 connector_close_datum (struct connector *connector,
3027 guint32 jid, gint mode, guint32 wsize)
3028 {
3029 guint32 jidbe;
3030 guint32 wsizebe;
3031 guint32 r_jid;
3032 guint32 asize;
3033 guint32 *data32;
3034 GByteArray *rx_msg;
3035 GByteArray *tx_msg;
3036 const guint8 *data;
3037 guint len;
3038
3039 if (mode == O_RDONLY)
3040 {
3041 data = DATA_READ_CLOSE_REQUEST;
3042 len = sizeof (DATA_READ_CLOSE_REQUEST);
3043 }
3044 else if (mode == O_WRONLY)
3045 {
3046 data = DATA_WRITE_CLOSE_REQUEST;
3047 len = sizeof (DATA_WRITE_CLOSE_REQUEST);
3048 }
3049 else
3050 {
3051 return -EINVAL;
3052 }
3053
3054 tx_msg = connector_new_msg (data, len);
3055 if (!tx_msg)
3056 {
3057 return -ENOMEM;
3058 }
3059
3060 jidbe = htobe32 (jid);
3061 g_byte_array_append (tx_msg, (guchar *) & jidbe, sizeof (guint32));
3062
3063 if (mode == O_WRONLY)
3064 {
3065 wsizebe = htobe32 (wsize);
3066 g_byte_array_append (tx_msg, (guchar *) & wsizebe, sizeof (guint32));
3067 }
3068
3069 rx_msg = connector_tx_and_rx (connector, tx_msg);
3070 if (!rx_msg)
3071 {
3072 return -EIO;
3073 }
3074
3075 if (!connector_get_msg_status (rx_msg))
3076 {
3077 error_print ("%s (%s)\n", snd_strerror (-EPERM),
3078 connector_get_msg_string (rx_msg));
3079 free_msg (rx_msg);
3080 return -EPERM;
3081 }
3082
3083 data32 = (guint32 *) & rx_msg->data[6];
3084 r_jid = be32toh (*data32);
3085
3086 data32 = (guint32 *) & rx_msg->data[10];
3087 asize = be32toh (*data32);
3088
3089 debug_print (1, "Close datum info: job id: %d; size: %d\n", r_jid, asize);
3090
3091 free_msg (rx_msg);
3092
3093 if (mode == O_WRONLY && asize != wsize)
3094 {
3095 error_print
3096 ("Actual download bytes (%d) differs from expected ones (%d)\n",
3097 asize, wsize);
3098 return -EINVAL;
3099 }
3100
3101 return 0;
3102 }
3103
3104 static gint
3105 connector_download_data_prefix (const gchar * path, GByteArray * output,
3106 struct job_control *control, void *data,
3107 const gchar * prefix)
3108 {
3109 gint res;
3110 guint32 seq;
3111 guint32 seqbe;
3112 guint32 jid;
3113 guint32 r_jid;
3114 guint32 r_seq;
3115 guint32 status;
3116 guint8 last;
3117 guint32 hash;
3118 guint32 *data32;
3119 guint32 jidbe;
3120 guint32 data_size;
3121 gboolean active;
3122 GByteArray *rx_msg;
3123 GByteArray *tx_msg;
3124 gchar *path_w_prefix = connector_add_prefix_to_path (path, prefix);
3125 struct connector *connector = data;
3126
3127 res = connector_open_datum (connector, path_w_prefix, &jid, O_RDONLY, 0);
3128 g_free (path_w_prefix);
3129 if (res)
3130 {
3131 return -EIO;
3132 }
3133
3134 usleep (REST_TIME);
3135
3136 jidbe = htobe32 (jid);
3137
3138 res = 0;
3139 seq = 0;
3140 last = 0;
3141 control->data = NULL;
3142 if (control)
3143 {
3144 g_mutex_lock (&control->mutex);
3145 active = control->active;
3146 g_mutex_unlock (&control->mutex);
3147 }
3148 else
3149 {
3150 active = TRUE;
3151 }
3152 while (!last && active)
3153 {
3154 tx_msg =
3155 connector_new_msg (DATA_READ_PARTIAL_REQUEST,
3156 sizeof (DATA_READ_PARTIAL_REQUEST));
3157 g_byte_array_append (tx_msg, (guint8 *) & jidbe, sizeof (guint32));
3158 seqbe = htobe32 (seq);
3159 g_byte_array_append (tx_msg, (guint8 *) & seqbe, sizeof (guint32));
3160 rx_msg = connector_tx_and_rx (connector, tx_msg);
3161 if (!rx_msg)
3162 {
3163 res = -EIO;
3164 break;
3165 }
3166
3167 if (!connector_get_msg_status (rx_msg))
3168 {
3169 res = -EPERM;
3170 error_print ("%s (%s)\n", snd_strerror (res),
3171 connector_get_msg_string (rx_msg));
3172 free_msg (rx_msg);
3173 break;
3174 }
3175
3176 data32 = (guint32 *) & rx_msg->data[6];
3177 r_jid = be32toh (*data32);
3178
3179 data32 = (guint32 *) & rx_msg->data[10];
3180 r_seq = be32toh (*data32);
3181
3182 data32 = (guint32 *) & rx_msg->data[14];
3183 status = be32toh (*data32);
3184
3185 last = rx_msg->data[18];
3186
3187 data32 = (guint32 *) & rx_msg->data[19];
3188 hash = be32toh (*data32);
3189
3190 data32 = (guint32 *) & rx_msg->data[23];
3191 data_size = be32toh (*data32);
3192
3193 if (data_size)
3194 {
3195 debug_print (1,
3196 "Read datum info: job id: %d; last: %d; seq: %d; status: %d; hash: 0x%08x\n",
3197 r_jid, last, r_seq, status, hash);
3198
3199 g_byte_array_append (output, (guint8 *) & rx_msg->data[27],
3200 data_size);
3201 }
3202 else
3203 {
3204 // Sometimes, the first message returns 0 data size and the rest of the parameters are not initialized.
3205 debug_print (1,
3206 "Read datum info: job id: %d; last: %d, hash: 0x%08x\n",
3207 r_jid, last, hash);
3208 status = 0;
3209 }
3210
3211 free_msg (rx_msg);
3212 seq++;
3213
3214 if (control)
3215 {
3216 set_job_control_progress (control, status / 1000.0);
3217 g_mutex_lock (&control->mutex);
3218 active = control->active;
3219 g_mutex_unlock (&control->mutex);
3220 }
3221
3222 usleep (REST_TIME);
3223 }
3224
3225 return connector_close_datum (connector, jid, O_RDONLY, 0);
3226 }
3227
3228 static gint
3229 connector_download_data_any (const gchar * path, GByteArray * output,
3230 struct job_control *control, void *data)
3231 {
3232 control->parts = 1;
3233 control->part = 0;
3234 return connector_download_data_prefix (path, output, control, data, NULL);
3235 }
3236
3237 static gint
3238 connector_download_data_prj (const gchar * path, GByteArray * output,
3239 struct job_control *control, void *data)
3240 {
3241 return connector_download_data_prefix (path, output, control, data,
3242 FS_DATA_PRJ_PREFIX);
3243 }
3244
3245 static gint
3246 connector_download_data_snd (const gchar * path, GByteArray * output,
3247 struct job_control *control, void *data)
3248 {
3249 return connector_download_data_prefix (path, output, control, data,
3250 FS_DATA_SND_PREFIX);
3251 }
3252
3253 gchar *
3254 connector_get_sample_path_from_hash_size (struct connector *connector,
3255 guint32 hash, guint32 size)
3256 {
3257 guint32 aux32;
3258 gchar *path;
3259 GByteArray *rx_msg, *tx_msg =
3260 connector_new_msg (FS_SAMPLE_GET_FILE_INFO_FROM_HASH_AND_SIZE_REQUEST,
3261 sizeof
3262 (FS_SAMPLE_GET_FILE_INFO_FROM_HASH_AND_SIZE_REQUEST));
3263
3264 aux32 = htobe32 (hash);
3265 memcpy (&tx_msg->data[5], &aux32, sizeof (guint32));
3266 aux32 = htobe32 (size);
3267 memcpy (&tx_msg->data[9], &aux32, sizeof (guint32));
3268
3269 rx_msg = connector_tx_and_rx (connector, tx_msg);
3270 if (!rx_msg)
3271 {
3272 return NULL;
3273 }
3274
3275 if (connector_get_msg_status (rx_msg))
3276 {
3277 path = strdup ((gchar *) & rx_msg->data[14]);
3278 }
3279 else
3280 {
3281 path = NULL;
3282 }
3283 g_byte_array_free (rx_msg, TRUE);
3284 return path;
3285 }
3286
3287 static gint
3288 connector_download_pkg (const gchar * path, GByteArray * output,
3289 struct job_control *control, void *data,
3290 enum package_type type,
3291 const struct fs_operations *ops,
3292 fs_remote_file_op download)
3293 {
3294 gint ret;
3295 gchar *pkg_name;
3296 struct package pkg;
3297 struct connector *connector = data;
3298
3299 pkg_name = connector_get_download_name (connector, NULL, ops, path);
3300 if (!pkg_name)
3301 {
3302 return -1;
3303 }
3304
3305 if (package_begin
3306 (&pkg, pkg_name, connector->fw_version, &connector->device_desc, type))
3307 {
3308 g_free (pkg_name);
3309 return -1;
3310 }
3311
3312 ret =
3313 package_receive_pkg_resources (&pkg, path, control, connector, download,
3314 connector_download_sample_part);
3315 ret = ret || package_end (&pkg, output);
3316
3317 package_destroy (&pkg);
3318 return ret;
3319 }
3320
3321 static gint
3322 connector_download_data_snd_pkg (const gchar * path, GByteArray * output,
3323 struct job_control *control, void *data)
3324 {
3325 return connector_download_pkg (path, output, control, data,
3326 PKG_FILE_TYPE_SOUND,
3327 &FS_DATA_SND_OPERATIONS,
3328 connector_download_data_snd);
3329 }
3330
3331 static gint
3332 connector_download_data_prj_pkg (const gchar * path, GByteArray * output,
3333 struct job_control *control, void *data)
3334 {
3335 return connector_download_pkg (path, output, control, data,
3336 PKG_FILE_TYPE_PROJECT,
3337 &FS_DATA_PRJ_OPERATIONS,
3338 connector_download_data_prj);
3339 }
3340
3341 static gint
3342 connector_download_raw_pst_pkg (const gchar * path, GByteArray * output,
3343 struct job_control *control, void *data)
3344 {
3345 return connector_download_pkg (path, output, control, data,
3346 PKG_FILE_TYPE_PRESET,
3347 &FS_RAW_ANY_OPERATIONS,
3348 connector_download_raw);
3349 }
3350
3351 gchar *
3352 connector_get_upload_path (struct connector *connector,
3353 struct item_iterator *remote_iter,
3354 const struct fs_operations *ops,
3355 const gchar * dst_dir, const gchar * src_path,
3356 gint32 * next_index)
3357 {
3358 gchar *path, *indexs, *namec, *name, *aux;
3359 gboolean new;
3360
3361 if (ops->fs == FS_SAMPLES || ops->fs == FS_RAW_ALL
3362 || ops->fs == FS_RAW_PRESETS)
3363 {
3364 namec = strdup (src_path);
3365 name = basename (namec);
3366 remove_ext (name);
3367 aux = chain_path (dst_dir, name);
3368 g_free (namec);
3369
3370 if (ops->fs == FS_RAW_ALL || ops->fs == FS_RAW_PRESETS)
3371 {
3372 path = connector_add_ext_to_mc_snd (aux);
3373 g_free (aux);
3374 }
3375 else
3376 {
3377 path = aux;
3378 }
3379 return path;
3380 }
3381
3382 new = FALSE;
3383 if (!remote_iter)
3384 {
3385 new = TRUE;
3386 remote_iter = malloc (sizeof (struct item_iterator));
3387 if (ops->readdir (remote_iter, dst_dir, connector))
3388 {
3389 return strdup (dst_dir);
3390 }
3391 }
3392
3393 if (remote_iter->item.index == *next_index)
3394 {
3395 (*next_index)++;
3396 }
3397 else
3398 {
3399 while (!next_item_iterator (remote_iter))
3400 {
3401 if (remote_iter->item.index > *next_index)
3402 {
3403 break;
3404 }
3405 (*next_index)++;
3406 }
3407 }
3408
3409 if (new)
3410 {
3411 free_item_iterator (remote_iter);
3412 }
3413
3414 indexs = malloc (PATH_MAX);
3415 snprintf (indexs, PATH_MAX, "%d", *next_index);
3416 path = chain_path (dst_dir, indexs);
3417 g_free (indexs);
3418
3419 (*next_index)++;
3420
3421 return path;
3422 }
3423
3424 gchar *
3425 connector_get_download_name (struct connector *connector,
3426 struct item_iterator *remote_iter,
3427 const struct fs_operations *ops,
3428 const gchar * src_path)
3429 {
3430 gint32 id;
3431 const gchar *src_dir;
3432 gchar *namec, *name, *src_dirc;
3433 gint ret;
3434 gboolean new = FALSE;
3435
3436 namec = strdup (src_path);
3437 name = basename (namec);
3438
3439 if (ops->fs == FS_SAMPLES || ops->fs == FS_RAW_ALL
3440 || ops->fs == FS_RAW_PRESETS)
3441 {
3442 name = strdup (name);
3443 goto end;
3444 }
3445
3446 if (!remote_iter)
3447 {
3448 new = TRUE;
3449 remote_iter = malloc (sizeof (struct item_iterator));
3450 src_dirc = strdup (src_path);
3451 src_dir = dirname (src_dirc);
3452 ret = ops->readdir (remote_iter, src_dir, connector);
3453 g_free (src_dirc);
3454 if (ret)
3455 {
3456 name = NULL;
3457 goto cleanup;
3458 }
3459 }
3460
3461 id = atoi (name);
3462 name = NULL;
3463
3464 while (!next_item_iterator (remote_iter))
3465 {
3466 if (remote_iter->item.index == id)
3467 {
3468 name = get_item_name (&remote_iter->item);
3469 break;
3470 }
3471 }
3472
3473 cleanup:
3474 if (new)
3475 {
3476 free_item_iterator (remote_iter);
3477 }
3478 g_free (namec);
3479 end:
3480 return name;
3481 }
3482
3483 gchar *
3484 connector_get_download_path (struct connector *connector,
3485 struct item_iterator *remote_iter,
3486 const struct fs_operations *ops,
3487 const gchar * dst_dir, const gchar * src_path)
3488 {
3489 gchar *path, *src_pathc, *name, *dl_ext, *filename;
3490 const gchar *src_fpath, *md_ext, *ext = get_ext (src_path);
3491
3492 src_pathc = strdup (src_path);
3493 if (ext && strcmp (ext, "metadata") == 0 && ops->fs != FS_SAMPLES)
3494 {
3495 src_fpath = dirname (src_pathc);
3496 md_ext = ".metadata";
3497 }
3498 else
3499 {
3500 src_fpath = src_pathc;
3501 md_ext = "";
3502 }
3503
3504 name = connector_get_download_name (connector, remote_iter, ops, src_fpath);
3505 if (name)
3506 {
3507 dl_ext = connector_get_full_ext (&connector->device_desc, ops);
3508 filename = malloc (PATH_MAX);
3509 snprintf (filename, PATH_MAX, "%s.%s%s", name, dl_ext, md_ext);
3510 path = chain_path (dst_dir, filename);
3511 g_free (name);
3512 g_free (dl_ext);
3513 g_free (filename);
3514 }
3515 else
3516 {
3517 path = NULL;
3518 }
3519
3520 g_free (src_pathc);
3521 return path;
3522 }
3523
3524 static gint
3525 connector_upload_data_prefix (const gchar * path, GByteArray * array,
3526 struct job_control *control, void *data,
3527 const gchar * prefix)
3528 {
3529 gint res;
3530 guint32 seq;
3531 guint32 jid;
3532 guint32 crc;
3533 guint32 len;
3534 guint32 r_jid;
3535 guint32 r_seq;
3536 guint32 offset;
3537 guint32 *data32;
3538 guint32 jidbe;
3539 guint32 aux32;
3540 gboolean active;
3541 guint32 total;
3542 GByteArray *rx_msg;
3543 GByteArray *tx_msg;
3544 gchar *path_w_prefix = connector_add_prefix_to_path (path, prefix);
3545 struct connector *connector = data;
3546
3547 res =
3548 connector_open_datum (connector, path_w_prefix, &jid, O_WRONLY,
3549 array->len);
3550 g_free (path_w_prefix);
3551 if (res)
3552 {
3553 goto end;
3554 }
3555
3556 usleep (REST_TIME);
3557
3558 jidbe = htobe32 (jid);
3559
3560 seq = 0;
3561 offset = 0;
3562 control->data = NULL;
3563 if (control)
3564 {
3565 g_mutex_lock (&control->mutex);
3566 active = control->active;
3567 g_mutex_unlock (&control->mutex);
3568 }
3569 else
3570 {
3571 active = TRUE;
3572 }
3573
3574 while (offset < array->len && active)
3575 {
3576 tx_msg =
3577 connector_new_msg (DATA_WRITE_PARTIAL_REQUEST,
3578 sizeof (DATA_WRITE_PARTIAL_REQUEST));
3579 g_byte_array_append (tx_msg, (guint8 *) & jidbe, sizeof (guint32));
3580 aux32 = htobe32 (seq);
3581 g_byte_array_append (tx_msg, (guint8 *) & aux32, sizeof (guint32));
3582
3583 if (offset + DATA_TRANSF_BLOCK_BYTES < array->len)
3584 {
3585 len = DATA_TRANSF_BLOCK_BYTES;
3586 }
3587 else
3588 {
3589 len = array->len - offset;
3590 }
3591
3592 crc = crc32 (0xffffffff, &array->data[offset], len);
3593 aux32 = htobe32 (crc);
3594 g_byte_array_append (tx_msg, (guint8 *) & aux32, sizeof (guint32));
3595
3596 aux32 = htobe32 (len);
3597 g_byte_array_append (tx_msg, (guint8 *) & aux32, sizeof (guint32));
3598
3599 g_byte_array_append (tx_msg, &array->data[offset], len);
3600
3601 rx_msg = connector_tx_and_rx (connector, tx_msg);
3602 if (!rx_msg)
3603 {
3604 res = -EIO;
3605 goto end;
3606 }
3607
3608 usleep (REST_TIME);
3609
3610 if (!connector_get_msg_status (rx_msg))
3611 {
3612 res = -EPERM;
3613 error_print ("%s (%s)\n", snd_strerror (res),
3614 connector_get_msg_string (rx_msg));
3615 free_msg (rx_msg);
3616 break;
3617 }
3618
3619 data32 = (guint32 *) & rx_msg->data[6];
3620 r_jid = be32toh (*data32);
3621
3622 data32 = (guint32 *) & rx_msg->data[10];
3623 r_seq = be32toh (*data32);
3624
3625 data32 = (guint32 *) & rx_msg->data[14];
3626 total = be32toh (*data32);
3627
3628 free_msg (rx_msg);
3629
3630 debug_print (1,
3631 "Write datum info: job id: %d; seq: %d; total: %d\n",
3632 r_jid, r_seq, total);
3633
3634 seq++;
3635 offset += len;
3636
3637 if (total != offset)
3638 {
3639 error_print
3640 ("Actual upload bytes (%d) differs from expected ones (%d)\n",
3641 total, offset);
3642 }
3643
3644 if (control)
3645 {
3646 set_job_control_progress (control, offset / (gdouble) array->len);
3647 g_mutex_lock (&control->mutex);
3648 active = control->active;
3649 g_mutex_unlock (&control->mutex);
3650 }
3651 }
3652
3653 debug_print (2, "%d bytes sent\n", offset);
3654
3655 res = connector_close_datum (connector, jid, O_WRONLY, array->len);
3656
3657 end:
3658 return res;
3659 }
3660
3661 static gint
3662 connector_upload_data_any (const gchar * path, GByteArray * array,
3663 struct job_control *control, void *data)
3664 {
3665 control->parts = 1;
3666 control->part = 0;
3667 return connector_upload_data_prefix (path, array, control, data, NULL);
3668 }
3669
3670 static gint
3671 connector_upload_data_prj (const gchar * path, GByteArray * array,
3672 struct job_control *control, void *data)
3673 {
3674 return connector_upload_data_prefix (path, array, control, data,
3675 FS_DATA_PRJ_PREFIX);
3676 }
3677
3678 static gint
3679 connector_upload_data_snd (const gchar * path, GByteArray * array,
3680 struct job_control *control, void *data)
3681 {
3682 return connector_upload_data_prefix (path, array, control, data,
3683 FS_DATA_SND_PREFIX);
3684 }
3685
3686 static gint
3687 connector_upload_pkg (const gchar * path, GByteArray * input,
3688 struct job_control *control, void *data,
3689 guint8 type, const struct fs_operations *ops,
3690 fs_remote_file_op upload)
3691 {
3692 gint ret;
3693 struct package pkg;
3694 struct connector *connector = data;
3695
3696 ret = package_open (&pkg, input, &connector->device_desc);
3697 if (!ret)
3698 {
3699 ret = package_send_pkg_resources (&pkg, path, control, connector,
3700 upload, connector_upload_sample_part);
3701 package_close (&pkg);
3702 }
3703 return ret;
3704 }
3705
3706 static gint
3707 connector_upload_data_snd_pkg (const gchar * path, GByteArray * input,
3708 struct job_control *control, void *data)
3709 {
3710 return connector_upload_pkg (path, input, control, data,
3711 PKG_FILE_TYPE_SOUND,
3712 &FS_DATA_SND_OPERATIONS,
3713 connector_upload_data_snd);
3714 }
3715
3716 static gint
3717 connector_upload_data_prj_pkg (const gchar * path, GByteArray * input,
3718 struct job_control *control, void *data)
3719 {
3720 return connector_upload_pkg (path, input, control, data,
3721 PKG_FILE_TYPE_PROJECT,
3722 &FS_DATA_PRJ_OPERATIONS,
3723 connector_upload_data_prj);
3724 }
3725
3726 static gint
3727 connector_upload_raw_pst_pkg (const gchar * path, GByteArray * input,
3728 struct job_control *control, void *data)
3729 {
3730 return connector_upload_pkg (path, input, control, data,
3731 PKG_FILE_TYPE_PRESET,
3732 &FS_RAW_ANY_OPERATIONS, connector_upload_raw);
3733 }
3734
3735 gchar *
3736 connector_get_full_ext (const struct connector_device_desc *desc,
3737 const struct fs_operations *ops)
3738 {
3739 gchar *ext = malloc (LABEL_MAX);
3740 if (ops->fs == FS_SAMPLES)
3741 {
3742 snprintf (ext, LABEL_MAX, "%s", ops->extension);
3743 }
3744 else
3745 {
3746 snprintf (ext, LABEL_MAX, "%s%s", desc->alias, ops->extension);
3747 }
3748 return ext;
3749 }
3750
3751 void
3752 connector_enable_dir_cache (struct connector *connector)
3753 {
3754 g_mutex_lock (&connector->mutex);
3755 connector->dir_cache =
3756 g_hash_table_new_full (g_str_hash, g_str_equal, g_free, free_msg);
3757 g_mutex_unlock (&connector->mutex);
3758 }
3759
3760 void
3761 connector_disable_dir_cache (struct connector *connector)
3762 {
3763 g_mutex_lock (&connector->mutex);
3764 g_hash_table_destroy (connector->dir_cache);
3765 connector->dir_cache = NULL;
3766 g_mutex_unlock (&connector->mutex);
3767 }
1717 * along with Elektroid. If not, see <http://www.gnu.org/licenses/>.
1818 */
1919
20 #include <glib.h>
21 #include <alsa/asoundlib.h>
2220 #include "utils.h"
2321
2422 #ifndef CONNECTOR_H
2523 #define CONNECTOR_H
2624
27 #define SYSEX_TIMEOUT 5000
28 #define REST_TIME 50000
29
30 struct connector
31 {
32 struct connector_device_desc device_desc;
33 snd_rawmidi_t *inputp;
34 snd_rawmidi_t *outputp;
35 gchar *device_name;
36 gchar *overbridge_name;
37 gchar *fw_version;
38 gushort seq;
39 GMutex mutex;
40 ssize_t rx_len;
41 guint8 *buffer;
42 gint npfds;
43 struct pollfd *pfds;
44 GHashTable *dir_cache;
45 };
46
47 enum connector_fs
48 {
49 FS_SAMPLES = 0x1,
50 FS_RAW_ALL = 0x2,
51 FS_RAW_PRESETS = 0x4,
52 FS_DATA_ALL = 0x8,
53 FS_DATA_PRJ = 0x10,
54 FS_DATA_SND = 0x20,
55 };
56
57 struct connector_iterator_data
58 {
59 GByteArray *msg;
60 guint32 pos;
61 guint32 hash;
62 guint16 operations;
63 guint8 has_valid_data;
64 guint8 has_metadata;
65 enum connector_fs fs;
66 gboolean cached;
67 };
68
69 struct connector_system_device
70 {
71 gchar *name;
72 guint card;
73 };
74
75 enum connector_sysex_transfer_status
76 {
77 WAITING,
78 SENDING,
79 RECEIVING,
80 FINISHED
81 };
82
83 struct connector_sysex_transfer
84 {
85 gboolean active;
86 enum connector_sysex_transfer_status status;
87 gint timeout; //Measured in ms. -1 is infinite.
88 gboolean batch;
89 GMutex mutex;
90 GByteArray *raw;
91 };
92
93 enum connector_storage
94 {
95 STORAGE_PLUS_DRIVE = 0x1,
96 STORAGE_RAM = 0x2
97 };
98
99 struct connector_storage_stats
100 {
101 const gchar *name;
102 guint64 bsize;
103 guint64 bfree;
104 };
105
106 const struct fs_operations *connector_get_fs_operations (enum connector_fs);
107
108 gint connector_init (struct connector *, gint, const char *);
109
110 void connector_destroy (struct connector *);
111
112 gboolean connector_check (struct connector *);
113
114 GArray *connector_get_system_devices ();
115
116 gint connector_tx_sysex (struct connector *,
117 struct connector_sysex_transfer *);
118
119 gint connector_rx_sysex (struct connector *,
120 struct connector_sysex_transfer *);
121
122 void connector_rx_drain (struct connector *);
123
124 gint connector_upgrade_os (struct connector *,
125 struct connector_sysex_transfer *);
126
127 gint connector_get_storage_stats (struct connector *,
128 enum connector_storage,
129 struct connector_storage_stats *);
130
131 gdouble connector_get_storage_stats_percent (struct connector_storage_stats
132 *);
133
134 gchar *connector_get_upload_path (struct connector *, struct item_iterator *,
135 const struct fs_operations *, const gchar *,
136 const gchar *, gint32 *);
137
138 gchar *connector_get_download_name (struct connector *,
139 struct item_iterator *,
140 const struct fs_operations *,
141 const gchar *);
142
143 gchar *connector_get_download_path (struct connector *,
144 struct item_iterator *,
145 const struct fs_operations *,
146 const gchar *, const gchar *);
147
148
149 gchar *connector_get_full_ext (const struct connector_device_desc *,
150 const struct fs_operations *);
151
152 gchar *connector_get_sample_path_from_hash_size (struct connector *,
153 guint32, guint32);
154
155 void connector_enable_dir_cache (struct connector *);
156
157 void connector_disable_dir_cache (struct connector *);
25 gint connector_init (struct backend *backend, const gchar * midi_id,
26 const gchar * name,
27 struct sysex_transfer *sysex_transfer);
15828
15929 #endif
0 /*
1 * common.h
2 * Copyright (C) 2022 David García Goñi <dagargo@gmail.com>
3 *
4 * This file is part of Elektroid.
5 *
6 * Elektroid is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * Elektroid is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with Elektroid. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #include "common.h"
21
22 gchar *
23 common_slot_get_upload_path (struct backend *backend,
24 struct item_iterator *remote_iter,
25 const struct fs_operations *ops,
26 const gchar * dst_dir, const gchar * src_path,
27 gint32 * next_index)
28 {
29 //In SLOT mode, dst_dir includes the index, ':' and the item name.
30 return strdup (dst_dir);
31 }
32
33 int
34 common_slot_get_id_name_from_path (const char *path, guint * id,
35 gchar ** name)
36 {
37 gint err = 0;
38 gchar *path_copy, *index_name, *remainder;
39
40 path_copy = strdup (path);
41 index_name = basename (path_copy);
42 *id = (gint) strtol (index_name, &remainder, 10);
43 if (strncmp (remainder, BE_SAMPLE_ID_NAME_SEPARATOR,
44 strlen (BE_SAMPLE_ID_NAME_SEPARATOR)) == 0)
45 {
46 remainder++; //Skip ':'
47 }
48 else
49 {
50 if (name)
51 {
52 error_print ("Path name not provided properly\n");
53 err = -EINVAL;
54 goto end;
55 }
56 }
57
58 if (name)
59 {
60 if (*remainder)
61 {
62 *name = strdup (remainder);
63 }
64 else
65 {
66 *name = NULL;
67 }
68 }
69
70 end:
71 g_free (path_copy);
72 return err;
73 }
0 /*
1 * common.c
2 * Copyright (C) 2022 David García Goñi <dagargo@gmail.com>
3 *
4 * This file is part of Elektroid.
5 *
6 * Elektroid is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * Elektroid is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with Elektroid. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #include "backend.h"
21
22 gchar *common_slot_get_upload_path (struct backend *backend,
23 struct item_iterator *remote_iter,
24 const struct fs_operations *ops,
25 const gchar * dst_dir,
26 const gchar * src_path,
27 gint32 * next_index);
28
29 int common_slot_get_id_name_from_path (const char *path, guint * id,
30 gchar ** name);
0 /*
1 * cz.c
2 * Copyright (C) 2022 David García Goñi <dagargo@gmail.com>
3 *
4 * This file is part of Elektroid.
5 *
6 * Elektroid is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * Elektroid is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with Elektroid. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #include <libgen.h>
21 #include "cz.h"
22 #include "common.h"
23
24 #define CZ_PROGRAM_LEN 263
25 #define CZ_PROGRAM_LEN_FIXED 264
26 #define CZ_MAX_PROGRAMS 16
27 #define CZ_PRESET_PREFIX "CZ-101"
28 #define CZ_PROGRAM_HEADER_ID 6
29 #define CZ_PROGRAM_HEADER_OFFSET 6
30 #define CZ_MEM_TYPE_OFFSET 0x20
31 #define CZ_PANEL_ID 0x60
32 #define CZ_FIRST_CARTRIDGE_ID 0x40
33 #define CZ_PANEL_PATH "/panel"
34
35 static const char *CZ_MEM_TYPES[] =
36 { "preset", "internal", "cartridge", NULL };
37
38 static const guint8 CZ_PROGRAM_REQUEST[] =
39 { 0xf0, 0x44, 0x00, 0x00, 0x70, 0x10, 0x00, 0x70, 0x31, 0xf7 };
40
41 static const guint8 CZ_PROGRAM_HEADER[] =
42 { 0xf0, 0x44, 0x00, 0x00, 0x70, 0x20, 0x00 };
43
44 enum cz_fs
45 {
46 FS_PROGRAM_CZ = 1
47 };
48
49 struct cz_type_iterator_data
50 {
51 guint next;
52 gint type;
53 struct backend *backend;
54 };
55
56 static gchar *
57 cz_get_download_path (struct backend *backend,
58 struct item_iterator *remote_iter,
59 const struct fs_operations *ops, const gchar * dst_dir,
60 const gchar * src_path)
61 {
62 gchar *name = malloc (PATH_MAX);
63 if (strcmp (&src_path[1], "panel"))
64 {
65 gchar *src_path_copy = strdup (src_path);
66 gchar *src_dir_copy = strdup (src_path);
67 gchar *filename = basename (src_path_copy);
68 gchar *dir = dirname (src_dir_copy);
69 gint index = atoi (filename);
70 snprintf (name, PATH_MAX, "%s/%s %s %02d.syx", dst_dir,
71 CZ_PRESET_PREFIX, &dir[1], index);
72 g_free (src_path_copy);
73 g_free (src_dir_copy);
74 }
75 else
76 {
77 snprintf (name, PATH_MAX, "%s/%s panel.syx", dst_dir, CZ_PRESET_PREFIX);
78 }
79 return name;
80 }
81
82 static GByteArray *
83 cz_get_program_dump_msg (guint8 id)
84 {
85 GByteArray *tx_msg = g_byte_array_sized_new (sizeof (CZ_PROGRAM_REQUEST));
86 g_byte_array_append (tx_msg, CZ_PROGRAM_REQUEST,
87 sizeof (CZ_PROGRAM_REQUEST));
88 tx_msg->data[CZ_PROGRAM_HEADER_OFFSET] = id;
89 return tx_msg;
90 }
91
92 static guint
93 cz_next_dentry_root (struct item_iterator *iter)
94 {
95 struct cz_type_iterator_data *data = iter->data;
96
97 if (data->next < 3)
98 {
99 iter->item.id = 0x1000 + data->next; //Unique id
100 snprintf (iter->item.name, LABEL_MAX, "%s", CZ_MEM_TYPES[data->next]);
101 iter->item.type = ELEKTROID_DIR;
102 iter->item.size = -1;
103
104 if (data->next == 2)
105 {
106 GByteArray *tx_msg =
107 cz_get_program_dump_msg (CZ_FIRST_CARTRIDGE_ID);
108 GByteArray *rx_msg = backend_tx_and_rx_sysex (data->backend, tx_msg,
109 BE_SYSEX_TIMEOUT_GUESS_MS);
110 data->next++;
111 if (rx_msg)
112 {
113 free_msg (rx_msg);
114 return 0;
115 }
116 }
117 else
118 {
119 data->next++;
120 return 0;
121 }
122 }
123
124 if (data->next == 3)
125 {
126 iter->item.id = CZ_PANEL_ID;
127 snprintf (iter->item.name, LABEL_MAX, "panel");
128 iter->item.type = ELEKTROID_FILE;
129 iter->item.size = CZ_PROGRAM_LEN_FIXED;
130 data->next++;
131 return 0;
132 }
133 else
134 {
135 return -ENOENT;
136 }
137 }
138
139 static guint
140 cz_next_dentry (struct item_iterator *iter)
141 {
142 struct cz_type_iterator_data *data = iter->data;
143
144 if (data->next >= CZ_MAX_PROGRAMS)
145 {
146 return -ENOENT;
147 }
148
149 iter->item.id = data->next + data->type * CZ_MEM_TYPE_OFFSET;
150 snprintf (iter->item.name, LABEL_MAX, "%02d", data->next + 1);
151 iter->item.type = ELEKTROID_FILE;
152 iter->item.size = CZ_PROGRAM_LEN_FIXED;
153 data->next++;
154
155 return 0;
156 }
157
158 static gint
159 cz_copy_iterator (struct item_iterator *dst, struct item_iterator *src,
160 gboolean cached)
161 {
162 struct cz_type_iterator_data *data = src->data;
163 struct cz_type_iterator_data *ndata =
164 g_malloc (sizeof (struct cz_type_iterator_data));
165 ndata->next = 0;
166 ndata->type = data->type;
167 ndata->backend = data->backend;
168 dst->data = ndata;
169 dst->next = cz_next_dentry_root;
170 dst->free = g_free;
171 dst->copy = cz_copy_iterator;
172
173 return 0;
174 }
175
176 static gint
177 get_mem_type (const gchar * name)
178 {
179 const char **mem_type = CZ_MEM_TYPES;
180 for (int i = 0; *mem_type; i++, mem_type++)
181 {
182 if (!strcmp (*mem_type, name))
183 {
184 return i;
185 }
186 }
187 return -1;
188 }
189
190 static gint
191 cz_read_dir (struct backend *backend, struct item_iterator *iter,
192 const gchar * path)
193 {
194 gint mem_type;
195
196 if (!strcmp (path, "/"))
197 {
198 struct cz_type_iterator_data *data =
199 g_malloc (sizeof (struct cz_type_iterator_data));
200 data->next = 0;
201 data->type = -1;
202 data->backend = backend;
203 iter->data = data;
204 iter->next = cz_next_dentry_root;
205 iter->copy = cz_copy_iterator;
206 iter->free = g_free;
207 return 0;
208 }
209 else if ((mem_type = get_mem_type (&path[1])) >= 0)
210 {
211 struct cz_type_iterator_data *data =
212 g_malloc (sizeof (struct cz_type_iterator_data));
213 data->next = 0;
214 data->type = mem_type;
215 data->backend = backend;
216 iter->data = data;
217 iter->next = cz_next_dentry;
218 iter->copy = cz_copy_iterator;
219 iter->free = g_free;
220 return 0;
221 }
222 else
223 {
224 return -ENOTDIR;
225 }
226 }
227
228 static gint
229 cz_download (struct backend *backend, const gchar * path,
230 GByteArray * output, struct job_control *control)
231 {
232 guint8 id;
233 gboolean active;
234 gint len, type, err = 0;
235 GByteArray *tx_msg, *rx_msg;
236 gchar *dirname_copy, *dir, *basename_copy;
237
238 control->parts = 1;
239 control->part = 0;
240 set_job_control_progress (control, 0.0);
241
242 if (strcmp (path, CZ_PANEL_PATH))
243 {
244 dirname_copy = strdup (path);
245 dir = dirname (dirname_copy);
246 type = get_mem_type (&dir[1]);
247 g_free (dirname_copy);
248 if (type < 0)
249 {
250 err = -EINVAL;
251 goto end;
252 }
253
254 basename_copy = strdup (path);
255 id = atoi (basename (basename_copy)) - 1 + type * CZ_MEM_TYPE_OFFSET;
256 g_free (basename_copy);
257 }
258 else
259 {
260 id = CZ_PANEL_ID;
261 }
262
263 tx_msg = cz_get_program_dump_msg (id);
264 rx_msg = backend_tx_and_rx_sysex (backend, tx_msg, -1);
265 if (!rx_msg)
266 {
267 return -EIO;
268 }
269 len = rx_msg->len;
270 if (len != CZ_PROGRAM_LEN)
271 {
272 err = -EINVAL;
273 goto cleanup;
274 }
275
276 g_byte_array_append (output, CZ_PROGRAM_HEADER, sizeof (CZ_PROGRAM_HEADER));
277 g_byte_array_append (output, &rx_msg->data[CZ_PROGRAM_HEADER_OFFSET],
278 CZ_PROGRAM_LEN - CZ_PROGRAM_HEADER_OFFSET);
279 output->data[CZ_PROGRAM_HEADER_ID] = id;
280
281 g_mutex_lock (&control->mutex);
282 active = control->active;
283 g_mutex_unlock (&control->mutex);
284
285 if (active)
286 {
287 set_job_control_progress (control, 1.0);
288 }
289 else
290 {
291 err = -ECANCELED;
292 }
293
294 cleanup:
295 free_msg (rx_msg);
296 end:
297 return err;
298 }
299
300 static gint
301 cz_upload (struct backend *backend, const gchar * path, GByteArray * input,
302 struct job_control *control)
303 {
304 guint8 id;
305 gboolean active;
306 struct sysex_transfer transfer;
307 char *name_copy, *dir_copy, *dir;
308 gint mem_type, err = 0;
309
310 dir_copy = strdup (path);
311 dir = dirname (dir_copy);
312 mem_type = get_mem_type (&dir[1]);
313 if (mem_type >= 0)
314 {
315 name_copy = strdup (path);
316 id = atoi (basename (name_copy)) - 1 + mem_type * CZ_MEM_TYPE_OFFSET;
317 g_free (name_copy);
318 }
319 else
320 {
321 if (strncmp (path, CZ_PANEL_PATH, strlen (CZ_PANEL_PATH)))
322 {
323 err = -EIO;
324 goto cleanup;
325 }
326 else
327 {
328 id = CZ_PANEL_ID;
329 }
330 }
331
332 g_mutex_lock (&backend->mutex);
333
334 control->parts = 1;
335 control->part = 0;
336 set_job_control_progress (control, 0.0);
337
338 transfer.raw = g_byte_array_sized_new (input->len);
339 g_byte_array_append (transfer.raw, input->data, input->len);
340 transfer.raw->data[CZ_PROGRAM_HEADER_ID] = id;
341
342 err = backend_tx_sysex (backend, &transfer);
343 free_msg (transfer.raw);
344 if (err < 0)
345 {
346 goto cleanup;
347 }
348
349 g_mutex_lock (&control->mutex);
350 active = control->active;
351 g_mutex_unlock (&control->mutex);
352 if (active)
353 {
354 set_job_control_progress (control, 1.0);
355 }
356 else
357 {
358 err = -ECANCELED;
359 }
360
361 cleanup:
362 g_mutex_unlock (&backend->mutex);
363 g_free (dir_copy);
364 return err;
365 }
366
367 static void
368 cz_print (struct item_iterator *iter, struct backend *backend)
369 {
370 printf ("%c % 4ldB %s\n", iter->item.type, iter->item.size,
371 iter->item.name);
372 }
373
374 static const struct fs_operations FS_PROGRAM_CZ_OPERATIONS = {
375 .fs = FS_PROGRAM_CZ,
376 .options =
377 FS_OPTION_SINGLE_OP | FS_OPTION_SLOT_STORAGE | FS_OPTION_SORT_BY_NAME,
378 .name = "program",
379 .gui_name = "Programs",
380 .gui_icon = BE_FILE_ICON_SND,
381 .readdir = cz_read_dir,
382 .print_item = cz_print,
383 .download = cz_download,
384 .upload = cz_upload,
385 .get_id = get_item_name,
386 .load = load_file,
387 .save = save_file,
388 .get_ext = backend_get_fs_ext,
389 .get_upload_path = common_slot_get_upload_path,
390 .get_download_path = cz_get_download_path,
391 .type_ext = "syx"
392 };
393
394 static const struct fs_operations *FS_CZ_OPERATIONS[] = {
395 &FS_PROGRAM_CZ_OPERATIONS, NULL
396 };
397
398 gint
399 cz_handshake (struct backend *backend)
400 {
401 gint len, err = 0;
402 GByteArray *tx_msg, *rx_msg;
403
404 tx_msg = cz_get_program_dump_msg (CZ_PANEL_ID);
405 rx_msg = backend_tx_and_rx_sysex (backend, tx_msg,
406 BE_SYSEX_TIMEOUT_GUESS_MS);
407 if (!rx_msg)
408 {
409 return -ENODEV;
410 }
411 len = rx_msg->len;
412 if (len != CZ_PROGRAM_LEN)
413 {
414 err = -ENODEV;
415 goto end;
416 }
417
418 backend->device_desc.filesystems = FS_PROGRAM_CZ;
419 backend->fs_ops = FS_CZ_OPERATIONS;
420 snprintf (backend->device_name, LABEL_MAX, "Casio CZ-101");
421
422 end:
423 free_msg (rx_msg);
424 return err;
425 }
0 /*
1 * cz.h
2 * Copyright (C) 2022 David García Goñi <dagargo@gmail.com>
3 *
4 * This file is part of Elektroid.
5 *
6 * Elektroid is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * Elektroid is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with Elektroid. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #ifndef CZ_H
21 #define CZ_H
22
23 #include "backend.h"
24
25 gint cz_handshake (struct backend *);
26
27 #endif
0 /*
1 * efactor.c
2 * Copyright (C) 2022 David García Goñi <dagargo@gmail.com>
3 *
4 * This file is part of Elektroid.
5 *
6 * Elektroid is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * Elektroid is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with Elektroid. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #include "efactor.h"
21 #include "common.h"
22
23 #define EFACTOR_MSG_TYPE_OBJECT 0x31
24 #define EFACTOR_MSG_TYPE_VALUE 0x3b
25
26 #define EFACTOR_KEY_LEN 4
27
28 #define EFACTOR_FACTOR_SW_LEN 17
29 #define EFACTOR_H9_SW_LEN 18
30
31 #define EFACTOR_FACTOR_NAME_PREFIX "Eventide Factor"
32 #define EFACTOR_H9_NAME_PREFIX "Eventide H9"
33
34 #define EFACTOR_PRESET_LINE_SEPARATOR "\x0d\x0a"
35
36 #define EFACTOR_OP_PRESETS_WANT 0x48
37 #define EFACTOR_OP_PROGRAM_WANT 0x4e
38 #define EFACTOR_OP_PRESETS_DUMP 0x49
39
40 #define EFACTOR_PRESET_DUMP_OFFSET 5
41
42 #define EFACTOR_SINGLE_PRESET_MIN_LEN (sizeof(EFACTOR_REQUEST_HEADER) + 5) //The additional 5 bytes are the 2 square brackets and the preset number and the \0 and 0xf7 at the end.
43 #define EFACTOR_SINGLE_PRESET_MAX_LEN 256 //This is an empirical value. The maximum found value is 233 but we just add a few bytes just in case.
44 #define EFACTOR_MAX_ID_TAG_LEN 16 //The longest value is "[100]" plus the \0.
45
46 #define EFACTOR_TIMEOUT_TOTAL_PRESETS 20000 //This takes more than 10s for 100 presets.
47
48 #define EFACTOR_PEDAL_NAME(data) (data->type == EFACTOR_FACTOR ? EFACTOR_FACTOR_NAME_PREFIX : EFACTOR_H9_NAME_PREFIX)
49
50 static const guint8 EVENTIDE_ID[] = { 0x1c };
51 static const guint8 FAMILY_ID[] = { 0, 6 }; //This might not be the same value for all the Factor and H9 pedals.
52 static const guint8 MODEL_ID[] = { 0x11, 0 }; //This might not be the same value for all the Factor and H9 pedals.
53
54 //Identity Request Universal Sysex message. This is the same message used in the backend.
55 //We replicate this here because the compiler can't know the size of an external const array.
56 static const guint8 MIDI_IDENTITY_REQUEST[] =
57 { 0xf0, 0x7e, 0x7f, 6, 1, 0xf7 };
58
59 static const guint8 EFACTOR_REQUEST_HEADER[] = { 0xf0, 0x1c, 0x70, 0 };
60
61 enum efactor_type
62 {
63 EFACTOR_FACTOR,
64 EFACTOR_H9
65 };
66
67 struct efactor_data
68 {
69 guint id;
70 guint presets;
71 guint min;
72 enum efactor_type type;
73 //Readdir data is kept in memory so it can be used in other operations.
74 //In the efactor case, the only way to get a single preset is by getting the panel, which needs a preset to be loaded
75 // but won't work properly if there are preset mappings. So we read all the memory -we were reading it anyway- and
76 // use it to get the download data from there.
77 gchar **lines;
78 };
79
80 struct efactor_iter_data
81 {
82 guint next;
83 guint presets;
84 struct efactor_data *backend_data;
85 };
86
87 enum efactor_fs
88 {
89 FS_EFACTOR_PRESET = 1
90 };
91
92 static GByteArray *
93 efactor_new_op_msg (guint8 op)
94 {
95 GByteArray *tx_msg =
96 g_byte_array_sized_new (sizeof (EFACTOR_REQUEST_HEADER));
97 g_byte_array_append (tx_msg, EFACTOR_REQUEST_HEADER,
98 sizeof (EFACTOR_REQUEST_HEADER) + 2);
99 tx_msg->data[4] = op;
100 tx_msg->data[5] = 0xf7;
101 return tx_msg;
102 }
103
104 static GByteArray *
105 efactor_new_get_msg (guint8 type, const gchar * key)
106 {
107 GByteArray *tx_msg =
108 g_byte_array_sized_new (sizeof (EFACTOR_REQUEST_HEADER));
109 g_byte_array_append (tx_msg, EFACTOR_REQUEST_HEADER,
110 sizeof (EFACTOR_REQUEST_HEADER) + 6);
111 tx_msg->data[4] = type;
112 memcpy (&tx_msg->data[5], key, EFACTOR_KEY_LEN);
113 tx_msg->data[9] = 0xf7;
114 return tx_msg;
115 }
116
117 static gchar *
118 efactor_get_download_path (struct backend *backend,
119 struct item_iterator *remote_iter,
120 const struct fs_operations *ops,
121 const gchar * dst_dir, const gchar * src_path)
122 {
123 gchar *path, *name;
124 struct efactor_data *data = backend->data;
125 gchar *src_path_copy = strdup (src_path);
126 gint id = atoi (basename (src_path_copy));
127 g_free (src_path_copy);
128
129 name = NULL;
130 while (!next_item_iterator (remote_iter))
131 {
132 if (remote_iter->item.id == id)
133 {
134 name = get_item_name (&remote_iter->item);
135 break;
136 }
137 }
138
139 if (!name)
140 {
141 return NULL;
142 }
143
144 path = malloc (PATH_MAX);
145 snprintf (path, PATH_MAX, "%s/%s %s.syx", dst_dir,
146 EFACTOR_PEDAL_NAME (data), name);
147
148 return path;
149 }
150
151 static guint
152 efactor_next_dentry (struct item_iterator *iter)
153 {
154 struct efactor_iter_data *data = iter->data;
155 struct efactor_data *backend_data = data->backend_data;
156 gchar *preset_name;
157
158 if (data->next == data->presets)
159 {
160 return -ENOENT;
161 }
162
163 iter->item.id = data->next + backend_data->min;
164 preset_name = data->backend_data->lines[data->next * 7 + 6];
165 snprintf (iter->item.name, LABEL_MAX, "%s", preset_name);
166 iter->item.type = ELEKTROID_FILE;
167 iter->item.size = -1;
168 data->next++;
169
170 return 0;
171 }
172
173 static gint
174 efactor_read_dir (struct backend *backend, struct item_iterator *iter,
175 const gchar * path)
176 {
177 GByteArray *tx_msg;
178 GByteArray *rx_msg;
179 struct efactor_iter_data *iter_data;
180 struct efactor_data *data = backend->data;
181
182 if (strcmp (path, "/"))
183 {
184 return -ENOTDIR;
185 }
186
187 if (data->lines)
188 {
189 //Reading from the device switches off and on the internal relays.
190 //In case we call this function again just after calling it, we give the device some time to do it.
191 sleep (1);
192 }
193
194 tx_msg = efactor_new_op_msg (EFACTOR_OP_PRESETS_WANT);
195 rx_msg = backend_tx_and_rx_sysex (backend, tx_msg,
196 EFACTOR_TIMEOUT_TOTAL_PRESETS);
197 if (!rx_msg)
198 {
199 return -ETIMEDOUT;
200 }
201
202 iter_data = g_malloc (sizeof (struct efactor_iter_data));
203 iter_data->next = 0;
204 iter_data->presets = data->presets;
205 iter_data->backend_data = backend->data;
206 if (iter_data->backend_data->lines)
207 {
208 g_strfreev (iter_data->backend_data->lines);
209 }
210 data->lines =
211 g_strsplit ((gchar *) & rx_msg->data[EFACTOR_PRESET_DUMP_OFFSET],
212 EFACTOR_PRESET_LINE_SEPARATOR, -1);
213 free_msg (rx_msg);
214 iter->data = iter_data;
215 iter->next = efactor_next_dentry;
216 iter->free = g_free;
217
218 return 0;
219 }
220
221 static gint
222 efactor_download (struct backend *backend, const gchar * src_path,
223 GByteArray * output, struct job_control *control)
224 {
225 gint err = 0, id;
226 gchar *basename_copy;
227 gboolean active;
228 gchar **lines;
229 struct item_iterator iter;
230 struct efactor_data *data = backend->data;
231
232 control->parts = 1;
233 control->part = 0;
234 set_job_control_progress (control, 0.0);
235
236 if (!data->lines)
237 {
238 err = efactor_read_dir (backend, &iter, "/");
239 if (err)
240 {
241 return err;
242 }
243 free_item_iterator (&iter);
244 }
245
246 basename_copy = strdup (src_path);
247 id = atoi (basename (basename_copy));
248 g_free (basename_copy);
249 if (id < data->min || id >= data->presets)
250 {
251 return -EINVAL;
252 }
253
254 g_byte_array_append (output, EFACTOR_REQUEST_HEADER,
255 sizeof (EFACTOR_REQUEST_HEADER));
256 g_byte_array_append (output, (guint8 *) "\x49", 1); // EFACTOR_OP_PRESETS_DUMP
257 lines = &data->lines[(id - data->min) * 7];
258 for (gint i = 0; i < 7; i++, lines++)
259 {
260 g_byte_array_append (output, (guint8 *) * lines, strlen (*lines));
261 g_byte_array_append (output, (guint8 *) EFACTOR_PRESET_LINE_SEPARATOR,
262 strlen (EFACTOR_PRESET_LINE_SEPARATOR));
263 }
264 g_byte_array_append (output, (guint8 *) "\0\xf7", 2);
265
266 g_mutex_lock (&control->mutex);
267 active = control->active;
268 g_mutex_unlock (&control->mutex);
269
270 if (active)
271 {
272 set_job_control_progress (control, 1.0);
273 }
274 else
275 {
276 err = -ECANCELED;
277 }
278
279 sleep (1);
280
281 return err;
282 }
283
284 static gint
285 efactor_upload (struct backend *backend, const gchar * path,
286 GByteArray * input, struct job_control *control)
287 {
288 gint err = 0, i, id;
289 gchar *name, *b;
290 gboolean active;
291 GByteArray *tx_msg;
292 gchar id_tag[EFACTOR_MAX_ID_TAG_LEN];
293 struct efactor_data *data = backend->data;
294
295 name = strdup (path);
296 id = atoi (basename (name)); //This stops at the ':'.
297 g_free (name);
298
299 control->parts = 1;
300 control->part = 0;
301 set_job_control_progress (control, 0.0);
302
303 //The fourth header byte is the device number ID so it might be different than 0.
304 input->data[sizeof (EFACTOR_REQUEST_HEADER) - 1] = 0;
305 if (input->len > EFACTOR_SINGLE_PRESET_MAX_LEN
306 || input->len <= EFACTOR_SINGLE_PRESET_MIN_LEN
307 || memcmp (input->data, EFACTOR_REQUEST_HEADER,
308 sizeof (EFACTOR_REQUEST_HEADER))
309 || input->data[sizeof (EFACTOR_REQUEST_HEADER)] !=
310 EFACTOR_OP_PRESETS_DUMP)
311 {
312 error_print ("Bad preset\n");
313 err = -EBADMSG;
314 goto end;
315 }
316
317 tx_msg = g_byte_array_sized_new (input->len + 2); // With this we ensure there is enough space for all the digits of the preset number.
318 g_byte_array_append (tx_msg, input->data,
319 sizeof (EFACTOR_REQUEST_HEADER) + 1);
320 tx_msg->data[sizeof (EFACTOR_REQUEST_HEADER) - 1] = (guint8) data->id;
321 snprintf (id_tag, EFACTOR_MAX_ID_TAG_LEN, "[%d]", (id % 100) + 1); //1 based
322 g_byte_array_append (tx_msg, (guint8 *) id_tag, strlen (id_tag));
323
324 i = sizeof (EFACTOR_REQUEST_HEADER) + 1;
325 for (b = (gchar *) & input->data[i]; i < input->len; i++, b++)
326 {
327 if (*b == ' ')
328 {
329 break;
330 }
331 }
332
333 if (i == input->len)
334 {
335 free_msg (tx_msg);
336 err = -EBADMSG;
337 goto end;
338 }
339 g_byte_array_append (tx_msg, (guint8 *) b, input->len - i);
340
341 err = backend_tx (backend, tx_msg);
342
343 g_mutex_lock (&control->mutex);
344 active = control->active;
345 g_mutex_unlock (&control->mutex);
346
347 if (active)
348 {
349 set_job_control_progress (control, 1.0);
350 }
351 else
352 {
353 err = -ECANCELED;
354 }
355
356 end:
357 sleep (1);
358
359 return err;
360 }
361
362 static gint
363 efactor_rename (struct backend *backend, const gchar * src, const gchar * dst)
364 {
365 GByteArray *preset, *rx_msg;
366 guint id;
367 gint err;
368 struct job_control control;
369 gchar **lines, **line;
370 debug_print (1, "Sending rename request...\n");
371 err = common_slot_get_id_name_from_path (src, &id, NULL);
372 if (err)
373 {
374 return err;
375 }
376
377 preset = g_byte_array_new ();
378 //The control initialization is needed.
379 control.active = TRUE;
380 control.callback = NULL;
381 g_mutex_init (&control.mutex);
382 err = efactor_download (backend, src, preset, &control);
383 if (err)
384 {
385 return err;
386 }
387
388 lines = g_strsplit ((gchar *) & preset->data[EFACTOR_PRESET_DUMP_OFFSET],
389 EFACTOR_PRESET_LINE_SEPARATOR, -1);
390 g_free (lines[6]);
391 lines[6] = NULL;
392
393 line = lines;
394 g_byte_array_set_size (preset, EFACTOR_PRESET_DUMP_OFFSET);
395 while (*line)
396 {
397 g_byte_array_append (preset, (guint8 *) (*line), strlen (*line));
398 g_byte_array_append (preset, (guint8 *) EFACTOR_PRESET_LINE_SEPARATOR,
399 strlen (EFACTOR_PRESET_LINE_SEPARATOR));
400 line++;
401 }
402 g_byte_array_append (preset, (guint8 *) dst, strlen (dst));
403 g_byte_array_append (preset, (guint8 *) EFACTOR_PRESET_LINE_SEPARATOR,
404 strlen (EFACTOR_PRESET_LINE_SEPARATOR));
405 g_byte_array_append (preset, (guint8 *) "\0\xf7", 2);
406 g_strfreev (lines);
407
408 rx_msg = backend_tx_and_rx_sysex (backend, preset, 100); //There must be no response.
409 if (rx_msg)
410 {
411 err = -EIO;
412 free_msg (rx_msg);
413 }
414
415 sleep (1);
416
417 return err;
418 }
419
420 static gchar *
421 efactor_get_slot (struct item *item, struct backend *backend)
422 {
423 gchar *slot = malloc (LABEL_MAX);
424 struct efactor_data *data = backend->data;
425 if (data->type == EFACTOR_FACTOR)
426 {
427 snprintf (slot, LABEL_MAX, "[%d:%d]", (item->id / 2) + 1,
428 (item->id % 2) + 1);
429 }
430 else
431 {
432 snprintf (slot, LABEL_MAX, "%d", item->id + 1);
433 }
434 return slot;
435 }
436
437 static void
438 efactor_print (struct item_iterator *iter, struct backend *backend)
439 {
440 gchar *slot = efactor_get_slot (&iter->item, backend);
441 printf ("%c %s %s\n", iter->item.type, slot, iter->item.name);
442 g_free (slot);
443 }
444
445 static const struct fs_operations FS_EFACTOR_OPERATIONS = {
446 .fs = FS_EFACTOR_PRESET,
447 .options =
448 FS_OPTION_SINGLE_OP | FS_OPTION_SLOT_STORAGE | FS_OPTION_SORT_BY_ID,
449 .name = "preset",
450 .gui_name = "Presets",
451 .gui_icon = BE_FILE_ICON_SND,
452 .type_ext = "syx",
453 .max_name_len = 16,
454 .readdir = efactor_read_dir,
455 .print_item = efactor_print,
456 .rename = efactor_rename,
457 .download = efactor_download,
458 .upload = efactor_upload,
459 .get_id = get_item_index,
460 .get_slot = efactor_get_slot,
461 .load = load_file,
462 .save = save_file,
463 .get_ext = backend_get_fs_ext,
464 .get_upload_path = common_slot_get_upload_path,
465 .get_download_path = efactor_get_download_path
466 };
467
468 static const struct fs_operations *FS_EFACTOR_OPERATIONS_LIST[] = {
469 &FS_EFACTOR_OPERATIONS, NULL
470 };
471
472 void
473 efactor_destroy_data (struct backend *backend)
474 {
475 struct efactor_data *data = backend->data;
476 if (data->lines)
477 {
478 g_strfreev (data->lines);
479 }
480 backend_destroy_data (backend);
481 }
482
483 //We are replicanting the functionality in the backend because the request is standard but the response is not.
484 gint
485 efactor_handshake (struct backend *backend)
486 {
487 gint swlen, max, min, presets, id;
488 enum efactor_type type;
489 struct efactor_data *data;
490 GByteArray *tx_msg;
491 GByteArray *rx_msg;
492
493 //Sometimes it takes a lot of time to receive the response to the MIDI identity request.
494 //As the backend is already asking for it, we need to ensure that the input buffer is empty before continuing.
495 //With these two calls, the total timeout including the backend handshake is 2.5 s, which is empirically enough.
496 g_mutex_lock (&backend->mutex);
497 backend_rx_drain (backend);
498 backend_rx_drain (backend);
499 g_mutex_unlock (&backend->mutex);
500
501 tx_msg = g_byte_array_sized_new (sizeof (MIDI_IDENTITY_REQUEST));
502 g_byte_array_append (tx_msg, (guchar *) MIDI_IDENTITY_REQUEST,
503 sizeof (MIDI_IDENTITY_REQUEST));
504 rx_msg = backend_tx_and_rx_sysex (backend, tx_msg, -1);
505 if (!rx_msg)
506 {
507 return -ENODEV;
508 }
509
510 if (rx_msg->data[4] == 2)
511 {
512 if (rx_msg->len > 15)
513 {
514 memset (backend->midi_info.company, 0, BE_COMPANY_LEN);
515 memcpy (backend->midi_info.company, &rx_msg->data[5], 1);
516 memcpy (backend->midi_info.family, &rx_msg->data[6], BE_FAMILY_LEN);
517 memcpy (backend->midi_info.model, &rx_msg->data[8], BE_MODEL_LEN);
518 memcpy (backend->midi_info.version, &rx_msg->data[10],
519 BE_VERSION_LEN);
520
521 snprintf (backend->device_name, LABEL_MAX,
522 "%02x-%02x-%02x %02x-%02x %02x-%02x %d.%d.%d.%d",
523 backend->midi_info.company[0],
524 backend->midi_info.company[1],
525 backend->midi_info.company[2],
526 backend->midi_info.family[0],
527 backend->midi_info.family[1],
528 backend->midi_info.model[0],
529 backend->midi_info.model[1],
530 backend->midi_info.version[0],
531 backend->midi_info.version[1],
532 backend->midi_info.version[2],
533 backend->midi_info.version[3]);
534 snprintf (backend->device_desc.name, LABEL_MAX,
535 backend->device_name);
536 debug_print (1, "XML version:\n%s\n", &rx_msg->data[14]);
537 }
538 else
539 {
540 debug_print (1, "Illegal MIDI identity reply length\n");
541 }
542 }
543 else
544 {
545 debug_print (1, "Illegal SUB-ID2\n");
546 }
547
548 free_msg (rx_msg);
549
550 if (memcmp (backend->midi_info.company, EVENTIDE_ID, sizeof (EVENTIDE_ID))
551 || memcmp (backend->midi_info.family, FAMILY_ID, sizeof (FAMILY_ID))
552 || memcmp (backend->midi_info.model, MODEL_ID, sizeof (MODEL_ID)))
553 {
554 return -ENODEV;
555 }
556
557 tx_msg = efactor_new_get_msg (EFACTOR_MSG_TYPE_OBJECT, "0000"); //tj_version_key
558 rx_msg = backend_tx_and_rx_sysex (backend, tx_msg, -1);
559 id = rx_msg->data[sizeof (EFACTOR_REQUEST_HEADER) - 1];
560 debug_print (1, "Version: %s\n", &rx_msg->data[7]);
561 free_msg (rx_msg);
562
563 tx_msg = efactor_new_get_msg (EFACTOR_MSG_TYPE_VALUE, "0001"); //tj_switch_key
564 rx_msg = backend_tx_and_rx_sysex (backend, tx_msg, -1);
565 debug_print (1, "Switches: %s\n", &rx_msg->data[7]);
566 swlen = strlen ((gchar *) & rx_msg->data[7]) - 2; //Remove single quotes
567 free_msg (rx_msg);
568
569 tx_msg = efactor_new_get_msg (EFACTOR_MSG_TYPE_OBJECT, "0206"); //sp_num_banks_lo
570 rx_msg = backend_tx_and_rx_sysex (backend, tx_msg, -1);
571 debug_print (1, "Minimum value: %s\n", &rx_msg->data[7]);
572 min = atoi ((gchar *) & rx_msg->data[9]);
573 free_msg (rx_msg);
574
575 tx_msg = efactor_new_get_msg (EFACTOR_MSG_TYPE_OBJECT, "020A"); //sp_num_banks
576 rx_msg = backend_tx_and_rx_sysex (backend, tx_msg, -1);
577 debug_print (1, "Maximum value: %s\n", &rx_msg->data[7]);
578 max = atoi ((gchar *) & rx_msg->data[9]);
579 free_msg (rx_msg);
580
581 if (swlen == EFACTOR_FACTOR_SW_LEN)
582 {
583 debug_print (1, "Factor pedal detected\n");
584 min = 2 * min;
585 max = 2 * (max + 1);
586 type = EFACTOR_FACTOR;
587 }
588 else if (swlen == EFACTOR_H9_SW_LEN)
589 {
590 debug_print (1, "H9 pedal detected\n");
591 type = EFACTOR_H9;
592 }
593 else
594 {
595 error_print ("Illegal switches number %d\n", swlen);
596 return -ENODEV;
597 }
598
599 presets = max - min;
600 debug_print (1, "Total presets: %d [%d, %d]\n", presets, min, max - 1);
601
602 data = g_malloc (sizeof (struct efactor_data));
603 data->id = id;
604 data->presets = presets;
605 data->min = min;
606 data->type = type;
607 data->lines = NULL;
608
609 backend->device_desc.filesystems = FS_EFACTOR_PRESET;
610 backend->fs_ops = FS_EFACTOR_OPERATIONS_LIST;
611 backend->destroy_data = efactor_destroy_data;
612 backend->data = data;
613
614 snprintf (backend->device_name, LABEL_MAX, "%s %d.%d.%d.%d",
615 EFACTOR_PEDAL_NAME (data), backend->midi_info.version[0],
616 backend->midi_info.version[1], backend->midi_info.version[2],
617 backend->midi_info.version[3]);
618
619 return 0;
620 }
0 /*
1 * efactor.h
2 * Copyright (C) 2022 David García Goñi <dagargo@gmail.com>
3 *
4 * This file is part of Elektroid.
5 *
6 * Elektroid is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * Elektroid is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with Elektroid. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #ifndef EFACTOR_H
21 #define EFACTOR_H
22
23 #include "backend.h"
24
25 gint efactor_handshake (struct backend *);
26
27 #endif
0 /*
1 * elektron.c
2 * Copyright (C) 2019 David García Goñi <dagargo@gmail.com>
3 *
4 * This file is part of Elektroid.
5 *
6 * Elektroid is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * Elektroid is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with Elektroid. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #include <stdio.h>
21 #include <math.h>
22 #include <endian.h>
23 #include <poll.h>
24 #include <zlib.h>
25 #include <libgen.h>
26 #include "elektron.h"
27 #include "elektron.h"
28 #include "utils.h"
29 #include "sample.h"
30 #include "package.h"
31 #include "../config.h"
32
33 #define DEVICES_FILE "/elektron-devices.json"
34
35 #define DEV_TAG_ID "id"
36 #define DEV_TAG_NAME "name"
37 #define DEV_TAG_ALIAS "alias"
38 #define DEV_TAG_FILESYSTEMS "filesystems"
39 #define DEV_TAG_STORAGE "storage"
40
41 static const gchar *FS_TYPE_NAMES[] = { "+Drive", "RAM" };
42
43 #define DATA_TRANSF_BLOCK_BYTES 0x2000
44 #define OS_TRANSF_BLOCK_BYTES 0x800
45 #define MAX_ZIP_SIZE (128 * 1024 * 1024)
46
47 #define FS_DATA_PRJ_PREFIX "/projects"
48 #define FS_DATA_SND_PREFIX "/soundbanks"
49 #define FS_SAMPLES_START_POS 5
50 #define FS_DATA_START_POS 18
51 #define FS_SAMPLES_SIZE_POS_W 21
52 #define FS_SAMPLES_LAST_FRAME_POS_W 33
53 #define FS_SAMPLES_PAD_RES 22
54
55 #define ELEKTRON_NAME_MAX_LEN 32
56
57 #define ELEKTRON_SAMPLE_INFO_PAD_I32_LEN 10
58 #define ELEKTRON_LOOP_TYPE 0x7f
59
60 struct elektron_sample_header
61 {
62 guint32 type;
63 guint32 sample_len_bytes;
64 guint32 samplerate;
65 guint32 loopstart;
66 guint32 loopend;
67 guint32 looptype;
68 guint32 padding[ELEKTRON_SAMPLE_INFO_PAD_I32_LEN];
69 };
70
71 struct elektron_iterator_data
72 {
73 GByteArray *msg;
74 guint32 pos;
75 guint32 hash;
76 guint16 operations;
77 guint8 has_valid_data;
78 guint8 has_metadata;
79 guint32 fs;
80 gboolean cached;
81 };
82
83 enum elektron_storage
84 {
85 STORAGE_PLUS_DRIVE = 0x1,
86 STORAGE_RAM = 0x2
87 };
88
89 struct elektron_data
90 {
91 guint16 seq;
92 gchar fw_version[LABEL_MAX];
93 };
94
95 typedef GByteArray *(*elektron_msg_id_func) (guint);
96
97 typedef GByteArray *(*elektron_msg_id_len_func) (guint, guint);
98
99 typedef GByteArray *(*elektron_msg_path_func) (const gchar *);
100
101 typedef GByteArray *(*elektron_msg_path_len_func) (const gchar *, guint);
102
103 typedef GByteArray *(*elektron_msg_read_blk_func) (guint, guint, guint);
104
105 typedef GByteArray *(*elektron_msg_write_blk_func) (guint, GByteArray *,
106 guint *, guint, void *);
107
108 typedef void (*elektron_copy_array) (GByteArray *, GByteArray *);
109
110 typedef gint (*elektron_path_func) (struct backend *, const gchar *);
111
112 typedef gint (*elektron_src_dst_func) (struct backend *, const gchar *,
113 const gchar *);
114
115 static gint elektron_delete_samples_dir (struct backend *, const gchar *);
116 static gint elektron_read_samples_dir (struct backend *,
117 struct item_iterator *, const gchar *);
118 static gint elektron_create_samples_dir (struct backend *, const gchar *);
119 static gint elektron_delete_samples_item (struct backend *, const gchar *);
120 static gint elektron_move_samples_item (struct backend *, const gchar *,
121 const gchar *);
122 static gint elektron_download_sample (struct backend *, const gchar *,
123 GByteArray *, struct job_control *);
124 static gint elektron_upload_sample (struct backend *, const gchar *,
125 GByteArray *, struct job_control *);
126
127 static gint elektron_delete_raw_dir (struct backend *, const gchar *);
128 static gint elektron_read_raw_dir (struct backend *, struct item_iterator *,
129 const gchar *);
130 static gint elektron_create_raw_dir (struct backend *, const gchar *);
131 static gint elektron_delete_raw_item (struct backend *, const gchar *);
132 static gint elektron_move_raw_item (struct backend *, const gchar *,
133 const gchar *);
134 static gint elektron_download_raw (struct backend *, const gchar *,
135 GByteArray *, struct job_control *);
136 static gint elektron_upload_raw (struct backend *, const gchar *,
137 GByteArray *, struct job_control *);
138
139 static gint elektron_read_data_dir_any (struct backend *,
140 struct item_iterator *,
141 const gchar *);
142 static gint elektron_read_data_dir_prj (struct backend *,
143 struct item_iterator *,
144 const gchar *);
145 static gint elektron_read_data_dir_snd (struct backend *,
146 struct item_iterator *,
147 const gchar *);
148
149 static gint elektron_move_data_item_any (struct backend *, const gchar *,
150 const gchar *);
151 static gint elektron_move_data_item_prj (struct backend *, const gchar *,
152 const gchar *);
153 static gint elektron_move_data_item_snd (struct backend *, const gchar *,
154 const gchar *);
155
156 static gint elektron_copy_data_item_any (struct backend *, const gchar *,
157 const gchar *);
158 static gint elektron_copy_data_item_prj (struct backend *, const gchar *,
159 const gchar *);
160 static gint elektron_copy_data_item_snd (struct backend *, const gchar *,
161 const gchar *);
162
163 static gint elektron_clear_data_item_any (struct backend *, const gchar *);
164 static gint elektron_clear_data_item_prj (struct backend *, const gchar *);
165 static gint elektron_clear_data_item_snd (struct backend *, const gchar *);
166
167 static gint elektron_swap_data_item_any (struct backend *, const gchar *,
168 const gchar *);
169 static gint elektron_swap_data_item_prj (struct backend *, const gchar *,
170 const gchar *);
171 static gint elektron_swap_data_item_snd (struct backend *, const gchar *,
172 const gchar *);
173
174 static gint elektron_download_data_any (struct backend *, const gchar *,
175 GByteArray *, struct job_control *);
176 static gint elektron_download_data_snd_pkg (struct backend *, const gchar *,
177 GByteArray *,
178 struct job_control *);
179 static gint elektron_download_data_prj_pkg (struct backend *, const gchar *,
180 GByteArray *,
181 struct job_control *);
182 static gint elektron_download_raw_pst_pkg (struct backend *, const gchar *,
183 GByteArray *,
184 struct job_control *);
185
186 static gint elektron_upload_data_any (struct backend *, const gchar *,
187 GByteArray *, struct job_control *);
188 static gint elektron_upload_data_prj_pkg (struct backend *, const gchar *,
189 GByteArray *, struct job_control *);
190 static gint elektron_upload_data_snd_pkg (struct backend *, const gchar *,
191 GByteArray *, struct job_control *);
192 static gint elektron_upload_raw_pst_pkg (struct backend *, const gchar *,
193 GByteArray *, struct job_control *);
194
195 static gint elektron_copy_iterator (struct item_iterator *,
196 struct item_iterator *, gboolean);
197
198 static gchar *elektron_get_dev_and_fs_ext (const struct device_desc *,
199 const struct fs_operations *);
200
201 static gchar *elektron_get_upload_path_smplrw (struct backend *,
202 struct item_iterator *,
203 const struct fs_operations *,
204 const gchar *, const gchar *,
205 gint32 *);
206 static gchar *elektron_get_upload_path_data (struct backend *,
207 struct item_iterator *,
208 const struct fs_operations *,
209 const gchar *, const gchar *,
210 gint32 *);
211 static gchar *elektron_get_download_path (struct backend *,
212 struct item_iterator *,
213 const struct fs_operations *,
214 const gchar *, const gchar *);
215 static gchar *elektron_get_download_name (struct backend *,
216 struct item_iterator *,
217 const struct fs_operations *,
218 const gchar *);
219
220 static gint elektron_upgrade_os (struct backend *, struct sysex_transfer *);
221
222 static gint elektron_sample_load (const gchar *, GByteArray *,
223 struct job_control *);
224
225 static enum item_type elektron_get_path_type (struct backend *,
226 const gchar *,
227 fs_init_iter_func);
228
229 static void elektron_print_smplrw (struct item_iterator *, struct backend *);
230
231 static void elektron_print_data (struct item_iterator *, struct backend *);
232
233 static const guint8 MSG_HEADER[] = { 0xf0, 0, 0x20, 0x3c, 0x10, 0 };
234
235 static const guint8 PING_REQUEST[] = { 0x1 };
236 static const guint8 SOFTWARE_VERSION_REQUEST[] = { 0x2 };
237 static const guint8 DEVICEUID_REQUEST[] = { 0x3 };
238 static const guint8 STORAGEINFO_REQUEST[] = { 0x5 };
239
240 static const guint8 FS_SAMPLE_READ_DIR_REQUEST[] = { 0x10 };
241 static const guint8 FS_SAMPLE_CREATE_DIR_REQUEST[] = { 0x11 };
242 static const guint8 FS_SAMPLE_DELETE_DIR_REQUEST[] = { 0x12 };
243 static const guint8 FS_SAMPLE_DELETE_FILE_REQUEST[] = { 0x20 };
244 static const guint8 FS_SAMPLE_RENAME_FILE_REQUEST[] = { 0x21 };
245 static const guint8 FS_SAMPLE_GET_FILE_INFO_FROM_HASH_AND_SIZE_REQUEST[] =
246 { 0x23, 0, 0, 0, 0, 0, 0, 0, 0 };
247 static const guint8 FS_SAMPLE_OPEN_FILE_READER_REQUEST[] = { 0x30 };
248 static const guint8 FS_SAMPLE_CLOSE_FILE_READER_REQUEST[] = { 0x31 };
249 static const guint8 FS_SAMPLE_READ_FILE_REQUEST[] =
250 { 0x32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
251 static const guint8 FS_SAMPLE_OPEN_FILE_WRITER_REQUEST[] =
252 { 0x40, 0, 0, 0, 0 };
253 static const guint8 FS_SAMPLE_CLOSE_FILE_WRITER_REQUEST[] =
254 { 0x41, 0, 0, 0, 0, 0, 0, 0, 0 };
255 static const guint8 FS_SAMPLE_WRITE_FILE_REQUEST[] =
256 { 0x42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
257
258 static const guint8 FS_RAW_READ_DIR_REQUEST[] = { 0x14 };
259 static const guint8 FS_RAW_CREATE_DIR_REQUEST[] = { 0x15 };
260 static const guint8 FS_RAW_DELETE_DIR_REQUEST[] = { 0x16 };
261 static const guint8 FS_RAW_DELETE_FILE_REQUEST[] = { 0x24 };
262 static const guint8 FS_RAW_RENAME_FILE_REQUEST[] = { 0x25 };
263 static const guint8 FS_RAW_OPEN_FILE_READER_REQUEST[] = { 0x33 };
264 static const guint8 FS_RAW_CLOSE_FILE_READER_REQUEST[] = { 0x34 };
265 static const guint8 FS_RAW_READ_FILE_REQUEST[] =
266 { 0x35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
267 static const guint8 FS_RAW_OPEN_FILE_WRITER_REQUEST[] = { 0x43, 0, 0, 0, 0 };
268 static const guint8 FS_RAW_CLOSE_FILE_WRITER_REQUEST[] =
269 { 0x44, 0, 0, 0, 0, 0, 0, 0, 0 };
270 static const guint8 FS_RAW_WRITE_FILE_REQUEST[] =
271 { 0x45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
272
273 static const guint8 DATA_LIST_REQUEST[] = { 0x53 };
274 static const guint8 DATA_READ_OPEN_REQUEST[] = { 0x54 };
275 static const guint8 DATA_READ_PARTIAL_REQUEST[] = { 0x55 };
276 static const guint8 DATA_READ_CLOSE_REQUEST[] = { 0x56 };
277 static const guint8 DATA_WRITE_OPEN_REQUEST[] = { 0x57 };
278 static const guint8 DATA_WRITE_PARTIAL_REQUEST[] = { 0x58 };
279 static const guint8 DATA_WRITE_CLOSE_REQUEST[] = { 0x59 };
280 static const guint8 DATA_MOVE_REQUEST[] = { 0x5a };
281 static const guint8 DATA_COPY_REQUEST[] = { 0x5b };
282 static const guint8 DATA_CLEAR_REQUEST[] = { 0x5c };
283 static const guint8 DATA_SWAP_REQUEST[] = { 0x5d };
284 static const guint8 OS_UPGRADE_START_REQUEST[] =
285 { 0x50, 0, 0, 0, 0, 's', 'y', 's', 'e', 'x', '\0', 1 };
286 static const guint8 OS_UPGRADE_WRITE_RESPONSE[] =
287 { 0x51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
288
289 static const struct fs_operations FS_SAMPLES_OPERATIONS = {
290 .fs = FS_SAMPLES,
291 .options =
292 FS_OPTION_AUDIO_PLAYER | FS_OPTION_STEREO | FS_OPTION_SORT_BY_NAME,
293 .name = "sample",
294 .gui_name = "Samples",
295 .gui_icon = BE_FILE_ICON_WAVE,
296 .type_ext = "wav",
297 .max_name_len = ELEKTRON_NAME_MAX_LEN,
298 .readdir = elektron_read_samples_dir,
299 .print_item = elektron_print_smplrw,
300 .mkdir = elektron_create_samples_dir,
301 .delete = elektron_delete_samples_item,
302 .rename = elektron_move_samples_item,
303 .move = elektron_move_samples_item,
304 .download = elektron_download_sample,
305 .upload = elektron_upload_sample,
306 .get_id = get_item_name,
307 .load = elektron_sample_load,
308 .save = sample_save_from_array,
309 .get_ext = backend_get_fs_ext,
310 .get_upload_path = elektron_get_upload_path_smplrw,
311 .get_download_path = elektron_get_download_path
312 };
313
314 static const struct fs_operations FS_RAW_ANY_OPERATIONS = {
315 .fs = FS_RAW_ALL,
316 .options = 0,
317 .name = "raw",
318 .type_ext = "raw",
319 .max_name_len = ELEKTRON_NAME_MAX_LEN,
320 .readdir = elektron_read_raw_dir,
321 .print_item = elektron_print_smplrw,
322 .mkdir = elektron_create_raw_dir,
323 .delete = elektron_delete_raw_item,
324 .rename = elektron_move_raw_item,
325 .move = elektron_move_raw_item,
326 .download = elektron_download_raw,
327 .upload = elektron_upload_raw,
328 .get_id = get_item_name,
329 .load = load_file,
330 .save = save_file,
331 .get_ext = elektron_get_dev_and_fs_ext,
332 .get_upload_path = elektron_get_upload_path_smplrw,
333 .get_download_path = elektron_get_download_path
334 };
335
336 static const struct fs_operations FS_RAW_PRESETS_OPERATIONS = {
337 .fs = FS_RAW_PRESETS,
338 .options = 0,
339 .name = "preset",
340 .gui_name = "Presets",
341 .gui_icon = BE_FILE_ICON_SND,
342 .type_ext = "pst",
343 .max_name_len = ELEKTRON_NAME_MAX_LEN,
344 .readdir = elektron_read_raw_dir,
345 .print_item = elektron_print_smplrw,
346 .mkdir = elektron_create_raw_dir,
347 .delete = elektron_delete_raw_item,
348 .rename = elektron_move_raw_item,
349 .move = elektron_move_raw_item,
350 .download = elektron_download_raw_pst_pkg,
351 .upload = elektron_upload_raw_pst_pkg,
352 .get_id = get_item_name,
353 .load = load_file,
354 .save = save_file,
355 .get_ext = elektron_get_dev_and_fs_ext,
356 .get_upload_path = elektron_get_upload_path_smplrw,
357 .get_download_path = elektron_get_download_path
358 };
359
360 static const struct fs_operations FS_DATA_ANY_OPERATIONS = {
361 .fs = FS_DATA_ALL,
362 .options = FS_OPTION_SORT_BY_ID,
363 .name = "data",
364 .type_ext = "data",
365 .readdir = elektron_read_data_dir_any,
366 .print_item = elektron_print_data,
367 .delete = elektron_clear_data_item_any,
368 .move = elektron_move_data_item_any,
369 .copy = elektron_copy_data_item_any,
370 .clear = elektron_clear_data_item_any,
371 .swap = elektron_swap_data_item_any,
372 .download = elektron_download_data_any,
373 .upload = elektron_upload_data_any,
374 .get_id = get_item_index,
375 .load = load_file,
376 .save = save_file,
377 .get_ext = elektron_get_dev_and_fs_ext,
378 .get_upload_path = elektron_get_upload_path_data,
379 .get_download_path = elektron_get_download_path
380 };
381
382 static const struct fs_operations FS_DATA_PRJ_OPERATIONS = {
383 .fs = FS_DATA_PRJ,
384 .options = FS_OPTION_SORT_BY_ID,
385 .name = "project",
386 .gui_name = "Projects",
387 .gui_icon = BE_FILE_ICON_PRJ,
388 .type_ext = "prj",
389 .readdir = elektron_read_data_dir_prj,
390 .print_item = elektron_print_data,
391 .delete = elektron_clear_data_item_prj,
392 .move = elektron_move_data_item_prj,
393 .copy = elektron_copy_data_item_prj,
394 .clear = elektron_clear_data_item_prj,
395 .swap = elektron_swap_data_item_prj,
396 .download = elektron_download_data_prj_pkg,
397 .upload = elektron_upload_data_prj_pkg,
398 .get_id = get_item_index,
399 .load = load_file,
400 .save = save_file,
401 .get_ext = elektron_get_dev_and_fs_ext,
402 .get_upload_path = elektron_get_upload_path_data,
403 .get_download_path = elektron_get_download_path
404 };
405
406 static const struct fs_operations FS_DATA_SND_OPERATIONS = {
407 .fs = FS_DATA_SND,
408 .options = FS_OPTION_SORT_BY_ID,
409 .name = "sound",
410 .gui_name = "Sounds",
411 .gui_icon = BE_FILE_ICON_SND,
412 .type_ext = "snd",
413 .readdir = elektron_read_data_dir_snd,
414 .print_item = elektron_print_data,
415 .delete = elektron_clear_data_item_snd,
416 .move = elektron_move_data_item_snd,
417 .copy = elektron_copy_data_item_snd,
418 .clear = elektron_clear_data_item_snd,
419 .swap = elektron_swap_data_item_snd,
420 .download = elektron_download_data_snd_pkg,
421 .upload = elektron_upload_data_snd_pkg,
422 .get_id = get_item_index,
423 .load = load_file,
424 .save = save_file,
425 .get_ext = elektron_get_dev_and_fs_ext,
426 .get_upload_path = elektron_get_upload_path_data,
427 .get_download_path = elektron_get_download_path
428 };
429
430 static const struct fs_operations *FS_OPERATIONS[] = {
431 &FS_SAMPLES_OPERATIONS, &FS_RAW_ANY_OPERATIONS, &FS_RAW_PRESETS_OPERATIONS,
432 &FS_DATA_ANY_OPERATIONS, &FS_DATA_PRJ_OPERATIONS, &FS_DATA_SND_OPERATIONS,
433 NULL
434 };
435
436 static void
437 elektron_print_smplrw (struct item_iterator *iter, struct backend *backend)
438 {
439 gchar *hsize = get_human_size (iter->item.size, FALSE);
440 struct elektron_iterator_data *data = iter->data;
441
442 printf ("%c %10s %08x %s\n", iter->item.type,
443 hsize, data->hash, iter->item.name);
444 g_free (hsize);
445 }
446
447 static void
448 elektron_print_data (struct item_iterator *iter, struct backend *backend)
449 {
450 gchar *hsize = get_human_size (iter->item.size, FALSE);
451 struct elektron_iterator_data *data = iter->data;
452
453 printf ("%c %3d %04x %d %d %10s %s\n", iter->item.type,
454 iter->item.id, data->operations, data->has_valid_data,
455 data->has_metadata, hsize, iter->item.name);
456 g_free (hsize);
457 }
458
459 static void
460 elektron_free_iterator_data (void *iter_data)
461 {
462 struct elektron_iterator_data *data = iter_data;
463
464 if (!data->cached)
465 {
466 free_msg (data->msg);
467 }
468 g_free (data);
469 }
470
471 static inline void
472 elektron_get_utf8 (gchar * dst, const gchar * s)
473 {
474 gchar *aux = g_convert (s, -1, "UTF8", "CP1252", NULL, NULL, NULL);
475 snprintf (dst, LABEL_MAX, "%s", aux);
476 g_free (aux);
477 }
478
479 static inline gchar *
480 elektron_get_cp1252 (const gchar * s)
481 {
482 return g_convert (s, -1, "CP1252", "UTF8", NULL, NULL, NULL);
483 }
484
485 static inline guint8
486 elektron_get_msg_status (const GByteArray * msg)
487 {
488 return msg->data[5];
489 }
490
491 static inline gchar *
492 elektron_get_msg_string (const GByteArray * msg)
493 {
494 return (gchar *) & msg->data[6];
495 }
496
497 static guint
498 elektron_next_smplrw_entry (struct item_iterator *iter)
499 {
500 guint32 *data32;
501 gchar *name_cp1252;
502 struct elektron_iterator_data *data = iter->data;
503
504 if (data->pos == data->msg->len)
505 {
506 return -ENOENT;
507 }
508 else
509 {
510 data32 = (guint32 *) & data->msg->data[data->pos];
511 data->hash = be32toh (*data32);
512 data->pos += sizeof (guint32);
513
514 data32 = (guint32 *) & data->msg->data[data->pos];
515 iter->item.size = be32toh (*data32);
516 data->pos += sizeof (guint32);
517
518 data->pos++; //write_protected
519
520 iter->item.type = data->msg->data[data->pos];
521 data->pos++;
522
523 name_cp1252 = (gchar *) & data->msg->data[data->pos];
524 elektron_get_utf8 (iter->item.name, name_cp1252);
525 if (data->fs == FS_RAW_ALL && iter->item.type == ELEKTROID_FILE)
526 {
527 //This eliminates the extension ".mc-snd" that the device provides.
528 iter->item.name[strlen (iter->item.name) - 7] = 0;
529 }
530 data->pos += strlen (name_cp1252) + 1;
531
532 iter->item.id = -1;
533
534 return 0;
535 }
536 }
537
538 static gint elektron_copy_iterator (struct item_iterator *,
539 struct item_iterator *, gboolean);
540
541 static gint
542 elektron_init_iterator (struct item_iterator *iter, GByteArray * msg,
543 iterator_next next, enum elektron_fs fs,
544 gboolean cached)
545 {
546 struct elektron_iterator_data *data =
547 malloc (sizeof (struct elektron_iterator_data));
548
549 data->msg = msg;
550 data->pos = fs == FS_DATA_ALL ? FS_DATA_START_POS : FS_SAMPLES_START_POS;
551 data->fs = fs;
552 data->cached = cached;
553
554 iter->data = data;
555 iter->next = next;
556 iter->free = elektron_free_iterator_data;
557 iter->copy = elektron_copy_iterator;
558 iter->item.id = -1;
559
560 return 0;
561 }
562
563 static gint
564 elektron_copy_iterator (struct item_iterator *dst, struct item_iterator *src,
565 gboolean cached)
566 {
567 GByteArray *array;
568 struct elektron_iterator_data *data = src->data;
569 if (cached)
570 {
571 array = data->msg;
572 }
573 else
574 {
575 array = g_byte_array_sized_new (data->msg->len);
576 g_byte_array_append (array, data->msg->data, data->msg->len);
577 }
578 return elektron_init_iterator (dst, array, src->next, data->fs, cached);
579 }
580
581 static GByteArray *
582 elektron_decode_payload (const GByteArray * src)
583 {
584 GByteArray *dst;
585 int i, j, k, dst_len;
586 unsigned int shift;
587
588 dst_len = src->len - ceill (src->len / 8.0);
589 dst = g_byte_array_new ();
590 g_byte_array_set_size (dst, dst_len);
591
592 for (i = 0, j = 0; i < src->len; i += 8, j += 7)
593 {
594 shift = 0x40;
595 for (k = 0; k < 7 && i + k + 1 < src->len; k++)
596 {
597 dst->data[j + k] =
598 src->data[i + k + 1] | (src->data[i] & shift ? 0x80 : 0);
599 shift = shift >> 1;
600 }
601 }
602
603 return dst;
604 }
605
606 static GByteArray *
607 elektron_encode_payload (const GByteArray * src)
608 {
609 GByteArray *dst;
610 int i, j, k, dst_len;
611 unsigned int accum;
612
613 dst_len = src->len + ceill (src->len / 7.0);
614 dst = g_byte_array_new ();
615 g_byte_array_set_size (dst, dst_len);
616
617 for (i = 0, j = 0; j < src->len; i += 8, j += 7)
618 {
619 accum = 0;
620 for (k = 0; k < 7; k++)
621 {
622 accum = accum << 1;
623 if (j + k < src->len)
624 {
625 if (src->data[j + k] & 0x80)
626 {
627 accum |= 1;
628 }
629 dst->data[i + k + 1] = src->data[j + k] & 0x7f;
630 }
631 }
632 dst->data[i] = accum;
633 }
634
635 return dst;
636 }
637
638 static GByteArray *
639 elektron_msg_to_raw (const GByteArray * msg)
640 {
641 GByteArray *encoded;
642 GByteArray *sysex = g_byte_array_new ();
643
644 g_byte_array_append (sysex, MSG_HEADER, sizeof (MSG_HEADER));
645 encoded = elektron_encode_payload (msg);
646 g_byte_array_append (sysex, encoded->data, encoded->len);
647 free_msg (encoded);
648 g_byte_array_append (sysex, (guint8 *) "\xf7", 1);
649
650 return sysex;
651 }
652
653 static gint
654 elektron_get_smplrw_info_from_msg (GByteArray * info_msg, guint32 * id,
655 guint * size)
656 {
657 if (elektron_get_msg_status (info_msg))
658 {
659 if (id)
660 {
661 *id = be32toh (*((guint32 *) & info_msg->data[6]));
662 }
663 if (size)
664 {
665 *size = be32toh (*((guint32 *) & info_msg->data[10]));
666 }
667 }
668 else
669 {
670 if (id)
671 {
672 return -EIO;
673 }
674 }
675
676 return 0;
677 }
678
679 static GByteArray *
680 elektron_new_msg (const guint8 * data, guint len)
681 {
682 GByteArray *msg = g_byte_array_new ();
683
684 g_byte_array_append (msg, (guchar *) "\0\0\0\0", 4);
685 g_byte_array_append (msg, data, len);
686
687 return msg;
688 }
689
690 static GByteArray *
691 elektron_new_msg_uint8 (const guint8 * data, guint len, guint8 type)
692 {
693 GByteArray *msg = elektron_new_msg (data, len);
694
695 g_byte_array_append (msg, &type, 1);
696
697 return msg;
698 }
699
700 static GByteArray *
701 elektron_new_msg_path (const guint8 * data, guint len, const gchar * path)
702 {
703 GByteArray *msg;
704 gchar *path_cp1252 = elektron_get_cp1252 (path);
705
706 if (!path_cp1252)
707 {
708 return NULL;
709 }
710
711 msg = elektron_new_msg (data, len);
712 g_byte_array_append (msg, (guchar *) path_cp1252, strlen (path_cp1252) + 1);
713 g_free (path_cp1252);
714
715 return msg;
716 }
717
718 static GByteArray *
719 elektron_new_msg_close_common_read (const guint8 * data, guint len, guint id)
720 {
721 guint32 aux32;
722 GByteArray *msg = elektron_new_msg (data, len);
723
724 aux32 = htobe32 (id);
725 g_byte_array_append (msg, (guchar *) & aux32, sizeof (guint32));
726 return msg;
727 }
728
729 static GByteArray *
730 elektron_new_msg_close_sample_read (guint id)
731 {
732 return
733 elektron_new_msg_close_common_read (FS_SAMPLE_CLOSE_FILE_READER_REQUEST,
734 sizeof
735 (FS_SAMPLE_CLOSE_FILE_READER_REQUEST),
736 id);
737 }
738
739 static GByteArray *
740 elektron_new_msg_close_raw_read (guint id)
741 {
742 return
743 elektron_new_msg_close_common_read (FS_RAW_CLOSE_FILE_READER_REQUEST,
744 sizeof
745 (FS_RAW_CLOSE_FILE_READER_REQUEST),
746 id);
747 }
748
749 static GByteArray *
750 elektron_new_msg_open_common_write (const guint8 * data, guint len,
751 const gchar * path, guint bytes)
752 {
753 guint32 aux32;
754 GByteArray *msg = elektron_new_msg_path (data, len, path);
755
756 aux32 = htobe32 (bytes);
757 memcpy (&msg->data[5], &aux32, sizeof (guint32));
758
759 return msg;
760 }
761
762 static GByteArray *
763 elektron_new_msg_open_sample_write (const gchar * path, guint bytes)
764 {
765 return
766 elektron_new_msg_open_common_write (FS_SAMPLE_OPEN_FILE_WRITER_REQUEST,
767 sizeof
768 (FS_SAMPLE_OPEN_FILE_WRITER_REQUEST),
769 path,
770 bytes +
771 sizeof (struct
772 elektron_sample_header));
773 }
774
775 static GByteArray *
776 elektron_new_msg_open_raw_write (const gchar * path, guint bytes)
777 {
778 return elektron_new_msg_open_common_write (FS_RAW_OPEN_FILE_WRITER_REQUEST,
779 sizeof
780 (FS_RAW_OPEN_FILE_WRITER_REQUEST),
781 path, bytes);
782 }
783
784
785 static GByteArray *
786 elektron_new_msg_list (const gchar * path, int32_t start_index,
787 int32_t end_index, gboolean all)
788 {
789 guint32 aux32;
790 guint8 aux8;
791 GByteArray *msg = elektron_new_msg_path (DATA_LIST_REQUEST,
792 sizeof (DATA_LIST_REQUEST),
793 path);
794
795 aux32 = htobe32 (start_index);
796 g_byte_array_append (msg, (guchar *) & aux32, sizeof (guint32));
797 aux32 = htobe32 (end_index);
798 g_byte_array_append (msg, (guchar *) & aux32, sizeof (guint32));
799 aux8 = all;
800 g_byte_array_append (msg, (guchar *) & aux8, sizeof (guint8));
801
802 return msg;
803 }
804
805 static GByteArray *
806 elektron_new_msg_write_sample_blk (guint id, GByteArray * sample,
807 guint * total, guint seq, void *data)
808 {
809 guint32 aux32;
810 guint16 aux16, *aux16p;
811 int i, consumed, bytes_blk;
812 struct sample_info *sample_info = data;
813 struct elektron_sample_header elektron_sample_header;
814 GByteArray *msg = elektron_new_msg (FS_SAMPLE_WRITE_FILE_REQUEST,
815 sizeof (FS_SAMPLE_WRITE_FILE_REQUEST));
816
817
818 aux32 = htobe32 (id);
819 memcpy (&msg->data[5], &aux32, sizeof (guint32));
820 aux32 = htobe32 (DATA_TRANSF_BLOCK_BYTES * seq);
821 memcpy (&msg->data[13], &aux32, sizeof (guint32));
822
823 bytes_blk = DATA_TRANSF_BLOCK_BYTES;
824 consumed = 0;
825
826 if (seq == 0)
827 {
828 elektron_sample_header.type = 0;
829 elektron_sample_header.sample_len_bytes = htobe32 (sample->len);
830 elektron_sample_header.samplerate = htobe32 (ELEKTRON_SAMPLE_RATE);
831 elektron_sample_header.loopstart = htobe32 (sample_info->loopstart);
832 elektron_sample_header.loopend = htobe32 (sample_info->loopend);
833 elektron_sample_header.looptype = htobe32 (ELEKTRON_LOOP_TYPE);
834 memset (&elektron_sample_header.padding, 0,
835 sizeof (guint32) * ELEKTRON_SAMPLE_INFO_PAD_I32_LEN);
836
837 g_byte_array_append (msg, (guchar *) & elektron_sample_header,
838 sizeof (struct elektron_sample_header));
839
840 consumed = sizeof (struct elektron_sample_header);
841 bytes_blk -= consumed;
842 }
843
844 i = 0;
845 aux16p = (guint16 *) & sample->data[*total];
846 while (i < bytes_blk && *total < sample->len)
847 {
848 aux16 = htobe16 (*aux16p);
849 g_byte_array_append (msg, (guint8 *) & aux16, sizeof (guint16));
850 aux16p++;
851 (*total) += sizeof (guint16);
852 consumed += sizeof (guint16);
853 i += sizeof (guint16);
854 }
855
856 aux32 = htobe32 (consumed);
857 memcpy (&msg->data[9], &aux32, sizeof (guint32));
858
859 return msg;
860 }
861
862 static GByteArray *
863 elektron_new_msg_write_raw_blk (guint id, GByteArray * raw, guint * total,
864 guint seq, void *data)
865 {
866 gint len;
867 guint32 aux32;
868 GByteArray *msg = elektron_new_msg (FS_RAW_WRITE_FILE_REQUEST,
869 sizeof (FS_RAW_WRITE_FILE_REQUEST));
870
871 aux32 = htobe32 (id);
872 memcpy (&msg->data[5], &aux32, sizeof (guint32));
873 aux32 = htobe32 (DATA_TRANSF_BLOCK_BYTES * seq);
874 memcpy (&msg->data[13], &aux32, sizeof (guint32));
875
876 len = raw->len - *total;
877 len = len > DATA_TRANSF_BLOCK_BYTES ? DATA_TRANSF_BLOCK_BYTES : len;
878 g_byte_array_append (msg, &raw->data[*total], len);
879 (*total) += len;
880
881 aux32 = htobe32 (len);
882 memcpy (&msg->data[9], &aux32, sizeof (guint32));
883
884 return msg;
885 }
886
887 static GByteArray *
888 elektron_new_msg_close_common_write (const guint8 * data, guint len,
889 guint id, guint bytes)
890 {
891 guint32 aux32;
892 GByteArray *msg = elektron_new_msg (data, len);
893
894 aux32 = htobe32 (id);
895 memcpy (&msg->data[5], &aux32, sizeof (guint32));
896 aux32 = htobe32 (bytes);
897 memcpy (&msg->data[9], &aux32, sizeof (guint32));
898
899 return msg;
900 }
901
902 static GByteArray *
903 elektron_new_msg_close_sample_write (guint id, guint bytes)
904 {
905 return
906 elektron_new_msg_close_common_write (FS_SAMPLE_CLOSE_FILE_WRITER_REQUEST,
907 sizeof
908 (FS_SAMPLE_CLOSE_FILE_WRITER_REQUEST),
909 id,
910 bytes +
911 sizeof (struct
912 elektron_sample_header));
913 }
914
915 static GByteArray *
916 elektron_new_msg_close_raw_write (guint id, guint bytes)
917 {
918 return
919 elektron_new_msg_close_common_write (FS_RAW_CLOSE_FILE_WRITER_REQUEST,
920 sizeof
921 (FS_RAW_CLOSE_FILE_WRITER_REQUEST),
922 id, bytes);
923 }
924
925 static GByteArray *
926 elektron_new_msg_read_common_blk (const guint8 * data, guint len, guint id,
927 guint start, guint size)
928 {
929 guint32 aux;
930 GByteArray *msg = elektron_new_msg (data, len);
931
932 aux = htobe32 (id);
933 memcpy (&msg->data[5], &aux, sizeof (guint32));
934 aux = htobe32 (size);
935 memcpy (&msg->data[9], &aux, sizeof (guint32));
936 aux = htobe32 (start);
937 memcpy (&msg->data[13], &aux, sizeof (guint32));
938
939 return msg;
940 }
941
942 static GByteArray *
943 elektron_new_msg_read_sample_blk (guint id, guint start, guint size)
944 {
945 return elektron_new_msg_read_common_blk (FS_SAMPLE_READ_FILE_REQUEST,
946 sizeof
947 (FS_SAMPLE_READ_FILE_REQUEST), id,
948 start, size);
949 }
950
951 static GByteArray *
952 elektron_new_msg_read_raw_blk (guint id, guint start, guint size)
953 {
954 return elektron_new_msg_read_common_blk (FS_RAW_READ_FILE_REQUEST,
955 sizeof (FS_RAW_READ_FILE_REQUEST),
956 id, start, size);
957 }
958
959 static GByteArray *
960 elektron_raw_to_msg (GByteArray * sysex)
961 {
962 GByteArray *msg;
963 GByteArray *payload;
964 gint len = sysex->len - sizeof (MSG_HEADER) - 1;
965
966 if (len > 0)
967 {
968 payload = g_byte_array_new ();
969 g_byte_array_append (payload, &sysex->data[sizeof (MSG_HEADER)], len);
970 msg = elektron_decode_payload (payload);
971 free_msg (payload);
972 }
973 else
974 {
975 msg = NULL;
976 }
977
978 return msg;
979 }
980
981 static gint
982 elektron_tx (struct backend *backend, const GByteArray * msg)
983 {
984 gint res;
985 guint16 aux;
986 gchar *text;
987 struct sysex_transfer transfer;
988 struct elektron_data *data = backend->data;
989
990 aux = htobe16 (data->seq);
991 memcpy (msg->data, &aux, sizeof (guint16));
992 data->seq++;
993
994 transfer.raw = elektron_msg_to_raw (msg);
995 res = backend_tx_sysex (backend, &transfer);
996 if (!res)
997 {
998 text = debug_get_hex_msg (msg);
999 debug_print (1, "Message sent (%d): %s\n", msg->len, text);
1000 free (text);
1001 }
1002
1003 free_msg (transfer.raw);
1004 return res;
1005 }
1006
1007 static GByteArray *
1008 elektron_rx (struct backend *backend, gint timeout)
1009 {
1010 gchar *text;
1011 GByteArray *msg;
1012 struct sysex_transfer transfer;
1013
1014 transfer.timeout = timeout;
1015 transfer.batch = FALSE;
1016
1017 while (1)
1018 {
1019 if (backend_rx_sysex (backend, &transfer))
1020 {
1021 return NULL;
1022 }
1023
1024 if (transfer.raw->len >= 12
1025 && !memcmp (transfer.raw->data, MSG_HEADER, 6))
1026 {
1027 break;
1028 }
1029
1030 if (debug_level > 1)
1031 {
1032 text = debug_get_hex_msg (transfer.raw);
1033 debug_print (2, "Message skipped (%d): %s\n", transfer.raw->len,
1034 text);
1035 free (text);
1036 }
1037 free_msg (transfer.raw);
1038 }
1039
1040 msg = elektron_raw_to_msg (transfer.raw);
1041 if (msg)
1042 {
1043 text = debug_get_hex_msg (msg);
1044 debug_print (1, "Message received (%d): %s\n", msg->len, text);
1045 free (text);
1046 }
1047
1048 free_msg (transfer.raw);
1049 return msg;
1050 }
1051
1052 //Not synchronized. Only meant to be called from elektron_tx_and_rx_timeout.
1053
1054 static GByteArray *
1055 elektron_tx_and_rx_timeout_no_cache (struct backend *backend,
1056 GByteArray * tx_msg, gint timeout)
1057 {
1058 ssize_t len;
1059 GByteArray *rx_msg;
1060 guint msg_type = tx_msg->data[4] | 0x80;
1061
1062 len = elektron_tx (backend, tx_msg);
1063 if (len < 0)
1064 {
1065 rx_msg = NULL;
1066 goto cleanup;
1067 }
1068
1069 rx_msg = elektron_rx (backend, timeout < 0 ? BE_SYSEX_TIMEOUT_MS : timeout);
1070 if (rx_msg && rx_msg->data[4] != msg_type)
1071 {
1072 error_print ("Illegal message type in response\n");
1073 free_msg (rx_msg);
1074 rx_msg = NULL;
1075 goto cleanup;
1076 }
1077
1078 cleanup:
1079 free_msg (tx_msg);
1080 return rx_msg;
1081 }
1082
1083 //Synchronized
1084
1085 static GByteArray *
1086 elektron_tx_and_rx_timeout (struct backend *backend, GByteArray * tx_msg,
1087 gint timeout)
1088 {
1089 GBytes *key;
1090 GByteArray *rx_msg, *ret = NULL;
1091
1092 g_mutex_lock (&backend->mutex);
1093 if (backend->cache)
1094 {
1095 key = g_bytes_new (tx_msg->data, tx_msg->len);
1096 rx_msg = g_hash_table_lookup (backend->cache, key);
1097 if (rx_msg)
1098 {
1099 ret = g_byte_array_sized_new (rx_msg->len);
1100 g_byte_array_append (ret, rx_msg->data, rx_msg->len);
1101 g_bytes_unref (key);
1102 goto end;
1103 }
1104
1105 rx_msg = elektron_tx_and_rx_timeout_no_cache (backend, tx_msg, timeout);
1106 if (!rx_msg)
1107 {
1108 g_bytes_unref (key);
1109 goto end;
1110 }
1111
1112 ret = g_byte_array_sized_new (rx_msg->len);
1113 g_byte_array_append (ret, rx_msg->data, rx_msg->len);
1114 g_hash_table_insert (backend->cache, key, rx_msg);
1115 }
1116 else
1117 {
1118 ret = elektron_tx_and_rx_timeout_no_cache (backend, tx_msg, timeout);
1119 }
1120
1121 end:
1122 g_mutex_unlock (&backend->mutex);
1123 return ret;
1124 }
1125
1126 static GByteArray *
1127 elektron_tx_and_rx (struct backend *backend, GByteArray * tx_msg)
1128 {
1129 return elektron_tx_and_rx_timeout (backend, tx_msg, -1);
1130 }
1131
1132 static enum item_type
1133 elektron_get_path_type (struct backend *backend, const gchar * path,
1134 fs_init_iter_func init_iter)
1135 {
1136 gchar *name_copy;
1137 gchar *parent_copy;
1138 gchar *name;
1139 gchar *parent;
1140 enum item_type res;
1141 struct item_iterator iter;
1142
1143 if (strcmp (path, "/") == 0)
1144 {
1145 return ELEKTROID_DIR;
1146 }
1147
1148 name_copy = strdup (path);
1149 parent_copy = strdup (path);
1150 name = basename (name_copy);
1151 parent = dirname (parent_copy);
1152 res = ELEKTROID_NONE;
1153 if (!init_iter (backend, &iter, parent))
1154 {
1155 while (!next_item_iterator (&iter))
1156 {
1157 if (strcmp (name, iter.item.name) == 0)
1158 {
1159 res = iter.item.type;
1160 break;
1161 }
1162 }
1163 free_item_iterator (&iter);
1164 }
1165
1166 g_free (name_copy);
1167 g_free (parent_copy);
1168 return res;
1169 }
1170
1171 static gint
1172 elektron_read_common_dir (struct backend *backend,
1173 struct item_iterator *iter, const gchar * dir,
1174 const guint8 msg[], int size,
1175 fs_init_iter_func init_iter, enum elektron_fs fs)
1176 {
1177 gboolean cache = FALSE;
1178 GByteArray *tx_msg, *rx_msg = NULL;
1179
1180 tx_msg = elektron_new_msg_path (msg, size, dir);
1181 if (!tx_msg)
1182 {
1183 return -EINVAL;
1184 }
1185
1186 rx_msg = elektron_tx_and_rx (backend, tx_msg);
1187 if (!rx_msg)
1188 {
1189 return -EIO;
1190 }
1191
1192 if (rx_msg->len == 5 &&
1193 elektron_get_path_type (backend, dir, init_iter) != ELEKTROID_DIR)
1194 {
1195 free_msg (rx_msg);
1196 return -ENOTDIR;
1197 }
1198
1199 return elektron_init_iterator (iter, rx_msg, elektron_next_smplrw_entry,
1200 fs, cache);
1201 }
1202
1203 static gint
1204 elektron_read_samples_dir (struct backend *backend,
1205 struct item_iterator *iter, const gchar * dir)
1206 {
1207 return elektron_read_common_dir (backend, iter, dir,
1208 FS_SAMPLE_READ_DIR_REQUEST,
1209 sizeof (FS_SAMPLE_READ_DIR_REQUEST),
1210 elektron_read_samples_dir, FS_SAMPLES);
1211 }
1212
1213 static gint
1214 elektron_read_raw_dir (struct backend *backend, struct item_iterator *iter,
1215 const gchar * dir)
1216 {
1217 return elektron_read_common_dir (backend, iter, dir,
1218 FS_RAW_READ_DIR_REQUEST,
1219 sizeof (FS_RAW_READ_DIR_REQUEST),
1220 elektron_read_raw_dir, FS_RAW_ALL);
1221 }
1222
1223 static gint
1224 elektron_src_dst_common (struct backend *backend,
1225 const gchar * src, const gchar * dst,
1226 const guint8 * data, guint len)
1227 {
1228 gint res;
1229 GByteArray *rx_msg;
1230 GByteArray *tx_msg = elektron_new_msg (data, len);
1231
1232 gchar *dst_cp1252 = elektron_get_cp1252 (dst);
1233 if (!dst_cp1252)
1234 {
1235 return -EINVAL;
1236 }
1237
1238 gchar *src_cp1252 = elektron_get_cp1252 (src);
1239 if (!src_cp1252)
1240 {
1241 g_free (dst_cp1252);
1242 return -EINVAL;
1243 }
1244
1245 g_byte_array_append (tx_msg, (guchar *) src_cp1252,
1246 strlen (src_cp1252) + 1);
1247 g_byte_array_append (tx_msg, (guchar *) dst_cp1252,
1248 strlen (dst_cp1252) + 1);
1249
1250 g_free (src_cp1252);
1251 g_free (dst_cp1252);
1252
1253 rx_msg = elektron_tx_and_rx (backend, tx_msg);
1254 if (!rx_msg)
1255 {
1256 return -EIO;
1257 }
1258 //Response: x, x, x, x, 0xa1, [0 (error), 1 (success)]...
1259 if (elektron_get_msg_status (rx_msg))
1260 {
1261 res = 0;
1262 }
1263 else
1264 {
1265 res = -EPERM;
1266 error_print ("%s (%s)\n", snd_strerror (res),
1267 elektron_get_msg_string (rx_msg));
1268 }
1269 free_msg (rx_msg);
1270
1271 return res;
1272 }
1273
1274 static gint
1275 elektron_rename_sample_file (struct backend *backend, const gchar * src,
1276 const gchar * dst)
1277 {
1278 return elektron_src_dst_common (backend, src, dst,
1279 FS_SAMPLE_RENAME_FILE_REQUEST,
1280 sizeof (FS_SAMPLE_RENAME_FILE_REQUEST));
1281 }
1282
1283 static gint
1284 elektron_rename_raw_file (struct backend *backend, const gchar * src,
1285 const gchar * dst)
1286 {
1287 return elektron_src_dst_common (backend, src, dst,
1288 FS_RAW_RENAME_FILE_REQUEST,
1289 sizeof (FS_RAW_RENAME_FILE_REQUEST));
1290 }
1291
1292 static gint
1293 elektron_move_common_item (struct backend *backend, const gchar * src,
1294 const gchar * dst, fs_init_iter_func init_iter,
1295 elektron_src_dst_func mv, fs_path_func mkdir,
1296 elektron_path_func rmdir)
1297 {
1298 enum item_type type;
1299 gint res;
1300 gchar *src_plus;
1301 gchar *dst_plus;
1302 struct item_iterator iter;
1303
1304 //Renaming is not implemented for directories so we need to implement it.
1305
1306 debug_print (1, "Renaming remotely from %s to %s...\n", src, dst);
1307
1308 type = elektron_get_path_type (backend, src, init_iter);
1309 if (type == ELEKTROID_FILE)
1310 {
1311 return mv (backend, src, dst);
1312 }
1313 else if (type == ELEKTROID_DIR)
1314 {
1315 res = mkdir (backend, dst);
1316 if (res)
1317 {
1318 return res;
1319 }
1320 if (!init_iter (backend, &iter, src))
1321 {
1322 while (!next_item_iterator (&iter) && !res)
1323 {
1324 src_plus = chain_path (src, iter.item.name);
1325 dst_plus = chain_path (dst, iter.item.name);
1326 res = elektron_move_common_item (backend, src_plus, dst_plus,
1327 init_iter, mv, mkdir, rmdir);
1328 free (src_plus);
1329 free (dst_plus);
1330 }
1331 free_item_iterator (&iter);
1332 }
1333 if (!res)
1334 {
1335 res = rmdir (backend, src);
1336 }
1337 return res;
1338 }
1339 else
1340 {
1341 return -EBADF;
1342 }
1343 }
1344
1345 static gint
1346 elektron_path_common (struct backend *backend, const gchar * path,
1347 const guint8 * template, gint size)
1348 {
1349 gint res;
1350 GByteArray *rx_msg;
1351 GByteArray *tx_msg;
1352
1353 tx_msg = elektron_new_msg_path (template, size, path);
1354 if (!tx_msg)
1355 {
1356 return -EINVAL;
1357 }
1358
1359 rx_msg = elektron_tx_and_rx (backend, tx_msg);
1360 if (!rx_msg)
1361 {
1362 return -EIO;
1363 }
1364 //Response: x, x, x, x, 0xX0, [0 (error), 1 (success)]...
1365 if (elektron_get_msg_status (rx_msg))
1366 {
1367 res = 0;
1368 }
1369 else
1370 {
1371 res = -EPERM;
1372 error_print ("%s (%s)\n", snd_strerror (res),
1373 elektron_get_msg_string (rx_msg));
1374 }
1375 free_msg (rx_msg);
1376
1377 return res;
1378 }
1379
1380 static gint
1381 elektron_delete_sample (struct backend *backend, const gchar * path)
1382 {
1383 return elektron_path_common (backend, path,
1384 FS_SAMPLE_DELETE_FILE_REQUEST,
1385 sizeof (FS_SAMPLE_DELETE_FILE_REQUEST));
1386 }
1387
1388 static gint
1389 elektron_delete_samples_dir (struct backend *backend, const gchar * path)
1390 {
1391 return elektron_path_common (backend, path, FS_SAMPLE_DELETE_DIR_REQUEST,
1392 sizeof (FS_SAMPLE_DELETE_DIR_REQUEST));
1393 }
1394
1395 //This adds back the extension ".mc-snd" that the device provides.
1396 static gchar *
1397 elektron_add_ext_to_mc_snd (const gchar * path)
1398 {
1399 gchar *path_with_ext = malloc (PATH_MAX);
1400 snprintf (path_with_ext, PATH_MAX, "%s%s", path, ".mc-snd");
1401 return path_with_ext;
1402 }
1403
1404 static gint
1405 elektron_delete_raw (struct backend *backend, const gchar * path)
1406 {
1407 gint ret;
1408 gchar *path_with_ext = elektron_add_ext_to_mc_snd (path);
1409 ret = elektron_path_common (backend, path_with_ext,
1410 FS_RAW_DELETE_FILE_REQUEST,
1411 sizeof (FS_RAW_DELETE_FILE_REQUEST));
1412 g_free (path_with_ext);
1413 return ret;
1414 }
1415
1416 static gint
1417 elektron_delete_raw_dir (struct backend *backend, const gchar * path)
1418 {
1419 return elektron_path_common (backend, path, FS_RAW_DELETE_DIR_REQUEST,
1420 sizeof (FS_RAW_DELETE_DIR_REQUEST));
1421 }
1422
1423 static gint
1424 elektron_create_samples_dir (struct backend *backend, const gchar * path)
1425 {
1426 return elektron_path_common (backend, path, FS_SAMPLE_CREATE_DIR_REQUEST,
1427 sizeof (FS_SAMPLE_CREATE_DIR_REQUEST));
1428 }
1429
1430 static gint
1431 elektron_move_samples_item (struct backend *backend, const gchar * src,
1432 const gchar * dst)
1433 {
1434 return elektron_move_common_item (backend, src, dst,
1435 elektron_read_samples_dir,
1436 elektron_rename_sample_file,
1437 elektron_create_samples_dir,
1438 elektron_delete_samples_dir);
1439 }
1440
1441 static gint
1442 elektron_create_raw_dir (struct backend *backend, const gchar * path)
1443 {
1444 return elektron_path_common (backend, path, FS_RAW_CREATE_DIR_REQUEST,
1445 sizeof (FS_RAW_CREATE_DIR_REQUEST));
1446 }
1447
1448 static gint
1449 elektron_move_raw_item (struct backend *backend, const gchar * src,
1450 const gchar * dst)
1451 {
1452 gint ret;
1453 gchar *src_with_ext = elektron_add_ext_to_mc_snd (src);
1454 ret = elektron_move_common_item (backend, src_with_ext, dst,
1455 elektron_read_raw_dir,
1456 elektron_rename_raw_file,
1457 elektron_create_raw_dir,
1458 elektron_delete_raw_dir);
1459 g_free (src_with_ext);
1460 return ret;
1461 }
1462
1463 static gint
1464 elektron_delete_common_item (struct backend *backend, const gchar * path,
1465 fs_init_iter_func init_iter,
1466 elektron_path_func rmdir, elektron_path_func rm)
1467 {
1468 enum item_type type;
1469 gchar *new_path;
1470 struct item_iterator iter;
1471 gint res;
1472
1473 type = elektron_get_path_type (backend, path, init_iter);
1474 if (type == ELEKTROID_FILE)
1475 {
1476 return rm (backend, path);
1477 }
1478 else if (type == ELEKTROID_DIR)
1479 {
1480 debug_print (1, "Deleting %s samples dir...\n", path);
1481
1482 if (init_iter (backend, &iter, path))
1483 {
1484 error_print ("Error while opening samples dir %s dir\n", path);
1485 res = -EINVAL;
1486 }
1487 else
1488 {
1489 res = 0;
1490 while (!res && !next_item_iterator (&iter))
1491 {
1492 new_path = chain_path (path, iter.item.name);
1493 res = res
1494 || elektron_delete_common_item (backend, new_path,
1495 init_iter, rmdir, rm);
1496 free (new_path);
1497 }
1498 free_item_iterator (&iter);
1499 }
1500 return res || rmdir (backend, path);
1501 }
1502 else
1503 {
1504 return -EBADF;
1505 }
1506 }
1507
1508 static gint
1509 elektron_delete_samples_item (struct backend *backend, const gchar * path)
1510 {
1511 return elektron_delete_common_item (backend, path,
1512 elektron_read_samples_dir,
1513 elektron_delete_samples_dir,
1514 elektron_delete_sample);
1515 }
1516
1517 static gint
1518 elektron_delete_raw_item (struct backend *backend, const gchar * path)
1519 {
1520 return elektron_delete_common_item (backend, path,
1521 elektron_read_raw_dir,
1522 elektron_delete_raw_dir,
1523 elektron_delete_raw);
1524 }
1525
1526 static gint
1527 elektron_upload_smplrw (struct backend *backend, const gchar * path,
1528 GByteArray * input, struct job_control *control,
1529 elektron_msg_path_len_func new_msg_open_write,
1530 elektron_msg_write_blk_func new_msg_write_blk,
1531 elektron_msg_id_len_func new_msg_close_write)
1532 {
1533 GByteArray *tx_msg;
1534 GByteArray *rx_msg;
1535 guint transferred;
1536 guint32 id;
1537 int i;
1538 gboolean active;
1539 gint res = 0;
1540
1541 //If the file already exists the device makes no difference between creating a new file and creating an already existent file.
1542 //Also, the new file would be discarded if an upload is not completed.
1543
1544 tx_msg = new_msg_open_write (path, input->len);
1545 if (!tx_msg)
1546 {
1547 return -EINVAL;
1548 }
1549
1550 rx_msg = elektron_tx_and_rx (backend, tx_msg);
1551 if (!rx_msg)
1552 {
1553 return -EIO;
1554 }
1555
1556 //Response: x, x, x, x, 0xc0, [0 (error), 1 (success)], id, frames
1557 res = elektron_get_smplrw_info_from_msg (rx_msg, &id, NULL);
1558 if (res)
1559 {
1560 error_print ("%s (%s)\n", snd_strerror (res),
1561 elektron_get_msg_string (rx_msg));
1562 free_msg (rx_msg);
1563 return res;
1564 }
1565 free_msg (rx_msg);
1566
1567 transferred = 0;
1568 i = 0;
1569
1570 g_mutex_lock (&control->mutex);
1571 active = control->active;
1572 g_mutex_unlock (&control->mutex);
1573
1574 while (transferred < input->len && active)
1575 {
1576 tx_msg = new_msg_write_blk (id, input, &transferred, i, control->data);
1577 rx_msg = elektron_tx_and_rx (backend, tx_msg);
1578 if (!rx_msg)
1579 {
1580 return -EIO;
1581 }
1582 //Response: x, x, x, x, 0xc2, [0 (error), 1 (success)]...
1583 if (!elektron_get_msg_status (rx_msg))
1584 {
1585 error_print ("Unexpected status\n");
1586 }
1587 free_msg (rx_msg);
1588 i++;
1589
1590 set_job_control_progress (control, transferred / (double) input->len);
1591 g_mutex_lock (&control->mutex);
1592 active = control->active;
1593 g_mutex_unlock (&control->mutex);
1594
1595 usleep (BE_REST_TIME_US);
1596 }
1597
1598 debug_print (2, "%d bytes sent\n", transferred);
1599
1600 if (active)
1601 {
1602 tx_msg = new_msg_close_write (id, transferred);
1603 rx_msg = elektron_tx_and_rx (backend, tx_msg);
1604 if (!rx_msg)
1605 {
1606 return -EIO;
1607 }
1608 //Response: x, x, x, x, 0xc1, [0 (error), 1 (success)]...
1609 if (!elektron_get_msg_status (rx_msg))
1610 {
1611 error_print ("Unexpected status\n");
1612 }
1613 free_msg (rx_msg);
1614 }
1615
1616 return res;
1617 }
1618
1619 static gint
1620 elektron_upload_sample_part (struct backend *backend, const gchar * path,
1621 GByteArray * sample, struct job_control *control)
1622 {
1623 return elektron_upload_smplrw (backend, path, sample, control,
1624 elektron_new_msg_open_sample_write,
1625 elektron_new_msg_write_sample_blk,
1626 elektron_new_msg_close_sample_write);
1627 }
1628
1629 static gint
1630 elektron_upload_sample (struct backend *backend, const gchar * path,
1631 GByteArray * input, struct job_control *control)
1632 {
1633 control->parts = 1;
1634 control->part = 0;
1635 return elektron_upload_sample_part (backend, path, input, control);
1636 }
1637
1638 static gint
1639 elektron_upload_raw (struct backend *backend, const gchar * path,
1640 GByteArray * sample, struct job_control *control)
1641 {
1642 return elektron_upload_smplrw (backend, path, sample, control,
1643 elektron_new_msg_open_raw_write,
1644 elektron_new_msg_write_raw_blk,
1645 elektron_new_msg_close_raw_write);
1646 }
1647
1648 static GByteArray *
1649 elektron_new_msg_open_sample_read (const gchar * path)
1650 {
1651 return elektron_new_msg_path (FS_SAMPLE_OPEN_FILE_READER_REQUEST,
1652 sizeof
1653 (FS_SAMPLE_OPEN_FILE_READER_REQUEST), path);
1654 }
1655
1656 static GByteArray *
1657 elektron_new_msg_open_raw_read (const gchar * path)
1658 {
1659 return elektron_new_msg_path (FS_RAW_OPEN_FILE_READER_REQUEST,
1660 sizeof
1661 (FS_RAW_OPEN_FILE_READER_REQUEST), path);
1662 }
1663
1664 static void
1665 elektron_copy_sample_data (GByteArray * input, GByteArray * output)
1666 {
1667 gint i;
1668 gint16 v;
1669 gint16 *frame = (gint16 *) input->data;
1670
1671 for (i = 0; i < input->len; i += sizeof (gint16))
1672 {
1673 v = be16toh (*frame);
1674 g_byte_array_append (output, (guint8 *) & v, sizeof (gint16));
1675 frame++;
1676 }
1677 }
1678
1679 static void
1680 elektron_copy_raw_data (GByteArray * input, GByteArray * output)
1681 {
1682 g_byte_array_append (output, input->data, input->len);
1683 }
1684
1685 static gint
1686 elektron_download_smplrw (struct backend *backend, const gchar * path,
1687 GByteArray * output, struct job_control *control,
1688 elektron_msg_path_func new_msg_open_read,
1689 guint read_offset,
1690 elektron_msg_read_blk_func new_msg_read_blk,
1691 elektron_msg_id_func new_msg_close_read,
1692 elektron_copy_array copy_array)
1693 {
1694 struct sample_info *sample_info;
1695 struct elektron_sample_header *elektron_sample_header;
1696 GByteArray *tx_msg;
1697 GByteArray *rx_msg;
1698 GByteArray *array;
1699 guint32 id;
1700 guint frames;
1701 guint next_block_start;
1702 guint req_size;
1703 guint offset;
1704 gboolean active;
1705 gint res;
1706
1707 tx_msg = new_msg_open_read (path);
1708 if (!tx_msg)
1709 {
1710 return -EINVAL;
1711 }
1712
1713 rx_msg = elektron_tx_and_rx (backend, tx_msg);
1714 if (!rx_msg)
1715 {
1716 return -EIO;
1717 }
1718 res = elektron_get_smplrw_info_from_msg (rx_msg, &id, &frames);
1719 if (res)
1720 {
1721 error_print ("%s (%s)\n", snd_strerror (res),
1722 elektron_get_msg_string (rx_msg));
1723 free_msg (rx_msg);
1724 return res;
1725 }
1726 free_msg (rx_msg);
1727
1728 debug_print (2, "%d frames to download\n", frames);
1729
1730 g_mutex_lock (&control->mutex);
1731 active = control->active;
1732 g_mutex_unlock (&control->mutex);
1733
1734 array = g_byte_array_new ();
1735 res = 0;
1736 next_block_start = 0;
1737 offset = read_offset;
1738 control->data = NULL;
1739 while (next_block_start < frames && active)
1740 {
1741 req_size =
1742 frames - next_block_start >
1743 DATA_TRANSF_BLOCK_BYTES ? DATA_TRANSF_BLOCK_BYTES : frames -
1744 next_block_start;
1745 tx_msg = new_msg_read_blk (id, next_block_start, req_size);
1746 rx_msg = elektron_tx_and_rx (backend, tx_msg);
1747 if (!rx_msg)
1748 {
1749 res = -EIO;
1750 goto cleanup;
1751 }
1752 g_byte_array_append (array, &rx_msg->data[FS_SAMPLES_PAD_RES + offset],
1753 req_size - offset);
1754
1755 next_block_start += req_size;
1756 //Only in the first iteration. It has no effect for the raw filesystem (M:C) as offset is 0.
1757 if (offset)
1758 {
1759 offset = 0;
1760 elektron_sample_header =
1761 (struct elektron_sample_header *)
1762 &rx_msg->data[FS_SAMPLES_PAD_RES];
1763 sample_info = malloc (sizeof (struct elektron_sample_header));
1764 sample_info->loopstart =
1765 be32toh (elektron_sample_header->loopstart);
1766 sample_info->loopend = be32toh (elektron_sample_header->loopend);
1767 sample_info->looptype = be32toh (elektron_sample_header->looptype);
1768 sample_info->samplerate = be32toh (elektron_sample_header->samplerate); //In the case of the RAW filesystem is not used and it is harmless.
1769 sample_info->channels = 1;
1770 sample_info->bitdepth = 16;
1771 control->data = sample_info;
1772 debug_print (2, "Loop start at %d, loop end at %d\n",
1773 sample_info->loopstart, sample_info->loopend);
1774 }
1775
1776 free_msg (rx_msg);
1777
1778 set_job_control_progress (control, next_block_start / (double) frames);
1779 g_mutex_lock (&control->mutex);
1780 active = control->active;
1781 g_mutex_unlock (&control->mutex);
1782
1783 usleep (BE_REST_TIME_US);
1784 }
1785
1786 debug_print (2, "%d bytes received\n", next_block_start);
1787
1788 if (active)
1789 {
1790 copy_array (array, output);
1791 }
1792 else
1793 {
1794 res = -1;
1795 }
1796
1797 tx_msg = new_msg_close_read (id);
1798 rx_msg = elektron_tx_and_rx (backend, tx_msg);
1799 if (!rx_msg)
1800 {
1801 res = -EIO;
1802 goto cleanup;
1803 }
1804 //Response: x, x, x, x, 0xb1, 00 00 00 0a 00 01 65 de (sample id and received bytes)
1805 free_msg (rx_msg);
1806
1807 cleanup:
1808 free_msg (array);
1809 if (res)
1810 {
1811 g_free (control->data);
1812 }
1813 return res;
1814 }
1815
1816 static gint
1817 elektron_download_sample_part (struct backend *backend, const gchar * path,
1818 GByteArray * output,
1819 struct job_control *control)
1820 {
1821 return elektron_download_smplrw (backend, path, output, control,
1822 elektron_new_msg_open_sample_read,
1823 sizeof (struct elektron_sample_header),
1824 elektron_new_msg_read_sample_blk,
1825 elektron_new_msg_close_sample_read,
1826 elektron_copy_sample_data);
1827 }
1828
1829 static gint
1830 elektron_download_sample (struct backend *backend, const gchar * path,
1831 GByteArray * output, struct job_control *control)
1832 {
1833 control->parts = 1;
1834 control->part = 0;
1835 return elektron_download_sample_part (backend, path, output, control);
1836 }
1837
1838 static gint
1839 elektron_download_raw (struct backend *backend, const gchar * path,
1840 GByteArray * output, struct job_control *control)
1841 {
1842 gint ret;
1843 gchar *path_with_ext = elektron_add_ext_to_mc_snd (path);
1844 ret = elektron_download_smplrw (backend, path_with_ext, output, control,
1845 elektron_new_msg_open_raw_read,
1846 0, elektron_new_msg_read_raw_blk,
1847 elektron_new_msg_close_raw_read,
1848 elektron_copy_raw_data);
1849 g_free (path_with_ext);
1850 return ret;
1851 }
1852
1853 static GByteArray *
1854 elektron_new_msg_upgrade_os_start (guint size)
1855 {
1856 GByteArray *msg = elektron_new_msg (OS_UPGRADE_START_REQUEST,
1857 sizeof (OS_UPGRADE_START_REQUEST));
1858
1859 memcpy (&msg->data[5], &size, sizeof (guint32));
1860
1861 return msg;
1862 }
1863
1864 static GByteArray *
1865 elektron_new_msg_upgrade_os_write (GByteArray * os_data, gint * offset)
1866 {
1867 GByteArray *msg = elektron_new_msg (OS_UPGRADE_WRITE_RESPONSE,
1868 sizeof (OS_UPGRADE_WRITE_RESPONSE));
1869 guint len;
1870 guint32 crc;
1871 guint32 aux32;
1872
1873 if (*offset + OS_TRANSF_BLOCK_BYTES < os_data->len)
1874 {
1875 len = OS_TRANSF_BLOCK_BYTES;
1876 }
1877 else
1878 {
1879 len = os_data->len - *offset;
1880 }
1881
1882 crc = crc32 (0xffffffff, &os_data->data[*offset], len);
1883
1884 debug_print (2, "CRC: %0x\n", crc);
1885
1886 aux32 = htobe32 (crc);
1887 memcpy (&msg->data[5], &aux32, sizeof (guint32));
1888 aux32 = htobe32 (len);
1889 memcpy (&msg->data[9], &aux32, sizeof (guint32));
1890 aux32 = htobe32 (*offset);
1891 memcpy (&msg->data[13], &aux32, sizeof (guint32));
1892
1893 g_byte_array_append (msg, &os_data->data[*offset], len);
1894
1895 *offset = *offset + len;
1896
1897 return msg;
1898 }
1899
1900 static gint
1901 elektron_upgrade_os (struct backend *backend, struct sysex_transfer *transfer)
1902 {
1903 GByteArray *tx_msg;
1904 GByteArray *rx_msg;
1905 gint8 op;
1906 gint offset;
1907 gint res = 0;
1908
1909 tx_msg = elektron_new_msg_upgrade_os_start (transfer->raw->len);
1910 rx_msg = elektron_tx_and_rx (backend, tx_msg);
1911
1912 if (!rx_msg)
1913 {
1914 res = -EIO;
1915 goto end;
1916 }
1917 //Response: x, x, x, x, 0xd0, [0 (ok), 1 (error)]...
1918 op = elektron_get_msg_status (rx_msg);
1919 if (op)
1920 {
1921 res = -EIO;
1922 error_print ("%s (%s)\n", snd_strerror (res),
1923 elektron_get_msg_string (rx_msg));
1924 free_msg (rx_msg);
1925 goto end;
1926 }
1927
1928 free_msg (rx_msg);
1929
1930 offset = 0;
1931 while (offset < transfer->raw->len)
1932 {
1933 tx_msg = elektron_new_msg_upgrade_os_write (transfer->raw, &offset);
1934 rx_msg = elektron_tx_and_rx (backend, tx_msg);
1935
1936 if (!rx_msg)
1937 {
1938 res = -EIO;
1939 break;
1940 }
1941 //Response: x, x, x, x, 0xd1, int32, [0..3]...
1942 op = rx_msg->data[9];
1943 if (op == 1)
1944 {
1945 break;
1946 }
1947 else if (op > 1)
1948 {
1949 res = -EIO;
1950 error_print ("%s (%s)\n", snd_strerror (res),
1951 elektron_get_msg_string (rx_msg));
1952 free_msg (rx_msg);
1953 break;
1954 }
1955
1956 free_msg (rx_msg);
1957
1958 usleep (BE_REST_TIME_US);
1959 }
1960
1961 end:
1962 return res;
1963 }
1964
1965 static gint
1966 elektron_get_storage_stats (struct backend *backend, gint type,
1967 struct backend_storage_stats *statfs)
1968 {
1969 GByteArray *tx_msg, *rx_msg;
1970 gint8 op;
1971 guint64 *data;
1972 int index;
1973 gint res = 0;
1974
1975 tx_msg = elektron_new_msg_uint8 (STORAGEINFO_REQUEST,
1976 sizeof (STORAGEINFO_REQUEST), type);
1977 rx_msg = elektron_tx_and_rx (backend, tx_msg);
1978 if (!rx_msg)
1979 {
1980 return -EIO;
1981 }
1982
1983 op = elektron_get_msg_status (rx_msg);
1984 if (!op)
1985 {
1986 error_print ("%s (%s)\n", snd_strerror (-EIO),
1987 elektron_get_msg_string (rx_msg));
1988 free_msg (rx_msg);
1989 return -EIO;
1990 }
1991
1992 index = 0;
1993 for (int i = 0, storage = STORAGE_PLUS_DRIVE; storage <= STORAGE_RAM;
1994 i++, storage <<= 1)
1995 {
1996 if (storage == type)
1997 {
1998 index = i;
1999 }
2000 }
2001
2002 statfs->name = FS_TYPE_NAMES[index];
2003 data = (guint64 *) & rx_msg->data[6];
2004 statfs->bfree = be64toh (*data);
2005 data = (guint64 *) & rx_msg->data[14];
2006 statfs->bsize = be64toh (*data);
2007
2008 free_msg (rx_msg);
2009
2010 return res;
2011 }
2012
2013 gint
2014 elektron_load_device_desc (struct device_desc *device_desc, guint8 id)
2015 {
2016 gint err, devices;
2017 JsonParser *parser;
2018 JsonReader *reader;
2019 gchar *devices_filename;
2020 GError *error = NULL;
2021 const gchar *elektroid_elektron_json;
2022
2023 parser = json_parser_new ();
2024
2025 elektroid_elektron_json = getenv ("ELEKTROID_ELEKTRON_JSON");
2026
2027 if (elektroid_elektron_json)
2028 {
2029 devices_filename = strdup (elektroid_elektron_json);
2030 }
2031 else
2032 {
2033 devices_filename = get_expanded_dir (CONF_DIR DEVICES_FILE);
2034 }
2035
2036 if (!json_parser_load_from_file (parser, devices_filename, &error))
2037 {
2038 debug_print (1, "%s\n", error->message);
2039 g_clear_error (&error);
2040
2041 g_free (devices_filename);
2042 devices_filename = strdup (DATADIR DEVICES_FILE);
2043
2044 debug_print (1, "Falling back to %s...\n", devices_filename);
2045
2046 if (!json_parser_load_from_file (parser, devices_filename, &error))
2047 {
2048 error_print ("%s", error->message);
2049 g_clear_error (&error);
2050 err = -ENODEV;
2051 goto cleanup_parser;
2052 }
2053 }
2054
2055 reader = json_reader_new (json_parser_get_root (parser));
2056 if (!reader)
2057 {
2058 error_print ("Unable to read from parser");
2059 err = -ENODEV;
2060 goto cleanup_parser;
2061 }
2062
2063 if (!json_reader_is_array (reader))
2064 {
2065 error_print ("Not an array\n");
2066 err = -ENODEV;
2067 goto cleanup_reader;
2068 }
2069
2070 devices = json_reader_count_elements (reader);
2071 if (!devices)
2072 {
2073 debug_print (1, "No devices found\n");
2074 err = -ENODEV;
2075 goto cleanup_reader;
2076 }
2077
2078 err = -ENODEV;
2079 for (int i = 0; i < devices; i++)
2080 {
2081 if (!json_reader_read_element (reader, i))
2082 {
2083 error_print ("Cannot read element %d. Continuing...\n", i);
2084 continue;
2085 }
2086
2087 if (!json_reader_read_member (reader, DEV_TAG_ID))
2088 {
2089 error_print ("Cannot read member '%s'. Continuing...\n",
2090 DEV_TAG_ID);
2091 continue;
2092 }
2093 device_desc->id = json_reader_get_int_value (reader);
2094 json_reader_end_member (reader);
2095
2096 if (device_desc->id != id)
2097 {
2098 json_reader_end_element (reader);
2099 continue;
2100 }
2101
2102 err = 0;
2103 debug_print (1, "Device %d found\n", id);
2104
2105 if (!json_reader_read_member (reader, DEV_TAG_NAME))
2106 {
2107 error_print ("Cannot read member '%s'. Stopping...\n",
2108 DEV_TAG_NAME);
2109 json_reader_end_element (reader);
2110 err = -ENODEV;
2111 break;
2112 }
2113 snprintf (device_desc->name, LABEL_MAX, "%s",
2114 json_reader_get_string_value (reader));
2115 json_reader_end_member (reader);
2116
2117 if (!json_reader_read_member (reader, DEV_TAG_ALIAS))
2118 {
2119 error_print ("Cannot read member '%s'. Stopping...\n",
2120 DEV_TAG_ALIAS);
2121 json_reader_end_element (reader);
2122 err = -ENODEV;
2123 break;
2124 }
2125 snprintf (device_desc->alias, LABEL_MAX, "%s",
2126 json_reader_get_string_value (reader));
2127 json_reader_end_member (reader);
2128
2129 if (!json_reader_read_member (reader, DEV_TAG_FILESYSTEMS))
2130 {
2131 error_print ("Cannot read member '%s'. Stopping...\n",
2132 DEV_TAG_FILESYSTEMS);
2133 json_reader_end_element (reader);
2134 err = -ENODEV;
2135 break;
2136 }
2137 device_desc->filesystems = json_reader_get_int_value (reader);
2138 json_reader_end_member (reader);
2139
2140 if (!json_reader_read_member (reader, DEV_TAG_STORAGE))
2141 {
2142 error_print ("Cannot read member '%s'. Stopping...\n",
2143 DEV_TAG_STORAGE);
2144 json_reader_end_element (reader);
2145 err = -ENODEV;
2146 break;
2147 }
2148 device_desc->storage = json_reader_get_int_value (reader);
2149 json_reader_end_member (reader);
2150
2151 break;
2152 }
2153
2154 cleanup_reader:
2155 g_object_unref (reader);
2156 cleanup_parser:
2157 g_object_unref (parser);
2158 g_free (devices_filename);
2159 if (err)
2160 {
2161 device_desc->id = -1;
2162 }
2163 return err;
2164 }
2165
2166 GByteArray *
2167 elektron_ping (struct backend *backend)
2168 {
2169 GByteArray *tx_msg, *rx_msg;
2170 struct elektron_data *data = g_malloc (sizeof (struct elektron_data));
2171
2172 data->seq = 0;
2173 backend->data = data;
2174
2175 tx_msg = elektron_new_msg (PING_REQUEST, sizeof (PING_REQUEST));
2176 rx_msg = elektron_tx_and_rx_timeout (backend, tx_msg,
2177 BE_SYSEX_TIMEOUT_GUESS_MS);
2178 if (!rx_msg)
2179 {
2180 backend->data = NULL;
2181 g_free (data);
2182 }
2183
2184
2185 return rx_msg;
2186 }
2187
2188 gint
2189 elektron_handshake (struct backend *backend)
2190 {
2191 guint8 id;
2192 gchar *overbridge_name;
2193 GByteArray *tx_msg, *rx_msg;
2194 struct elektron_data *data;
2195
2196 rx_msg = elektron_ping (backend);
2197 if (!rx_msg)
2198 {
2199 return -ENODEV;
2200 }
2201
2202 data = backend->data;
2203
2204 overbridge_name = strdup ((gchar *) & rx_msg->data[7 + rx_msg->data[6]]);
2205 id = rx_msg->data[5];
2206 free_msg (rx_msg);
2207
2208 if (elektron_load_device_desc (&backend->device_desc, id))
2209 {
2210 backend->data = NULL;
2211 g_free (overbridge_name);
2212 g_free (data);
2213 return -ENODEV;
2214 }
2215
2216 tx_msg = elektron_new_msg (SOFTWARE_VERSION_REQUEST,
2217 sizeof (SOFTWARE_VERSION_REQUEST));
2218 rx_msg = elektron_tx_and_rx (backend, tx_msg);
2219 if (!rx_msg)
2220 {
2221 backend->data = NULL;
2222 g_free (overbridge_name);
2223 g_free (data);
2224 return -ENODEV;
2225 }
2226 if (snprintf (data->fw_version, LABEL_MAX, "%s",
2227 (gchar *) & rx_msg->data[10]) >= LABEL_MAX)
2228 {
2229 error_print ("Firmware version truncated\n");
2230 }
2231 free_msg (rx_msg);
2232
2233 if (debug_level > 1)
2234 {
2235 tx_msg = elektron_new_msg (DEVICEUID_REQUEST,
2236 sizeof (DEVICEUID_REQUEST));
2237 rx_msg = elektron_tx_and_rx (backend, tx_msg);
2238 if (rx_msg)
2239 {
2240 debug_print (1, "UID: %x\n", *((guint32 *) & rx_msg->data[5]));
2241 free_msg (rx_msg);
2242 }
2243 }
2244
2245 if (snprintf (backend->device_name, LABEL_MAX, "%s %s (%s)",
2246 backend->device_desc.name, data->fw_version,
2247 overbridge_name) >= LABEL_MAX)
2248 {
2249 error_print ("Device name truncated\n");
2250 }
2251 debug_print (1, "Connected to %s\n", backend->device_name);
2252
2253 g_free (overbridge_name);
2254
2255 backend->fs_ops = FS_OPERATIONS;
2256 backend->destroy_data = backend_destroy_data;
2257 backend->upgrade_os = elektron_upgrade_os;
2258 backend->get_storage_stats = elektron_get_storage_stats;
2259
2260 return 0;
2261 }
2262
2263 static guint
2264 elektron_next_data_entry (struct item_iterator *iter)
2265 {
2266 gchar *name_cp1252;
2267 guint32 *data32;
2268 guint16 *data16;
2269 guint8 type;
2270 guint8 has_children;
2271 struct elektron_iterator_data *data = iter->data;
2272
2273 if (data->pos == data->msg->len)
2274 {
2275 return -ENOENT;
2276 }
2277
2278 name_cp1252 = (gchar *) & data->msg->data[data->pos];
2279 elektron_get_utf8 (iter->item.name, name_cp1252);
2280 data->pos += strlen (name_cp1252) + 1;
2281 has_children = data->msg->data[data->pos];
2282 data->pos++;
2283 type = data->msg->data[data->pos];
2284 data->pos++;
2285
2286 switch (type)
2287 {
2288 case 1:
2289 iter->item.type = ELEKTROID_DIR;
2290 data->pos += sizeof (guint32); // child entries
2291 iter->item.size = 0;
2292 iter->item.id = -1;
2293 data->operations = 0;
2294 data->has_valid_data = 0;
2295 data->has_metadata = 0;
2296 break;
2297 case 2:
2298 iter->item.type = has_children ? ELEKTROID_DIR : ELEKTROID_FILE;
2299
2300 data32 = (guint32 *) & data->msg->data[data->pos];
2301 iter->item.id = be32toh (*data32); //index
2302 data->pos += sizeof (gint32);
2303
2304 data32 = (guint32 *) & data->msg->data[data->pos];
2305 iter->item.size = be32toh (*data32);
2306 data->pos += sizeof (guint32);
2307
2308 data16 = (guint16 *) & data->msg->data[data->pos];
2309 data->operations = be16toh (*data16);
2310 data->pos += sizeof (guint16);
2311
2312 data->has_valid_data = data->msg->data[data->pos];
2313 data->pos++;
2314
2315 data->has_metadata = data->msg->data[data->pos];
2316 data->pos++;
2317
2318 break;
2319 default:
2320 error_print ("Unrecognized data entry: %d\n", iter->item.type);
2321 break;
2322 }
2323
2324 return 0;
2325 }
2326
2327 static gchar *
2328 elektron_add_prefix_to_path (const gchar * dir, const gchar * prefix)
2329 {
2330 gchar *full = malloc (PATH_MAX);
2331
2332 if (prefix)
2333 {
2334 snprintf (full, PATH_MAX, "%s%s", prefix, dir);
2335 }
2336 else
2337 {
2338 strcpy (full, dir);
2339 }
2340
2341 return full;
2342 }
2343
2344 static gint
2345 elektron_read_data_dir_prefix (struct backend *backend,
2346 struct item_iterator *iter,
2347 const gchar * dir, const char *prefix)
2348 {
2349 int res;
2350 GByteArray *tx_msg;
2351 GByteArray *rx_msg;
2352 gchar *dir_w_prefix = elektron_add_prefix_to_path (dir, prefix);
2353
2354 tx_msg = elektron_new_msg_list (dir_w_prefix, 0, 0, 1);
2355 g_free (dir_w_prefix);
2356 if (!tx_msg)
2357 {
2358 return -EINVAL;
2359 }
2360
2361 rx_msg = elektron_tx_and_rx (backend, tx_msg);
2362 if (!rx_msg)
2363 {
2364 return -EIO;
2365 }
2366
2367 res = elektron_get_msg_status (rx_msg);
2368 if (!res)
2369 {
2370 free_msg (rx_msg);
2371 return -ENOTDIR;
2372 }
2373
2374 return elektron_init_iterator (iter, rx_msg, elektron_next_data_entry,
2375 FS_DATA_ALL, FALSE);
2376 }
2377
2378 static gint
2379 elektron_read_data_dir_any (struct backend *backend,
2380 struct item_iterator *iter, const gchar * dir)
2381 {
2382 return elektron_read_data_dir_prefix (backend, iter, dir, NULL);
2383 }
2384
2385 static gint
2386 elektron_read_data_dir_prj (struct backend *backend,
2387 struct item_iterator *iter, const gchar * dir)
2388 {
2389 return elektron_read_data_dir_prefix (backend, iter, dir,
2390 FS_DATA_PRJ_PREFIX);
2391 }
2392
2393 static gint
2394 elektron_read_data_dir_snd (struct backend *backend,
2395 struct item_iterator *iter, const gchar * dir)
2396 {
2397 return elektron_read_data_dir_prefix (backend, iter, dir,
2398 FS_DATA_SND_PREFIX);
2399 }
2400
2401 static gint
2402 elektron_dst_src_data_prefix_common (struct backend *backend,
2403 const gchar * src, const gchar * dst,
2404 const char *prefix,
2405 const guint8 * op_data, guint len)
2406 {
2407 gint res;
2408 char *src_w_prefix = elektron_add_prefix_to_path (src, prefix);
2409 char *dst_w_prefix = elektron_add_prefix_to_path (dst, prefix);
2410
2411 res = elektron_src_dst_common (backend, src_w_prefix, dst_w_prefix,
2412 op_data, len);
2413 g_free (src_w_prefix);
2414 g_free (dst_w_prefix);
2415
2416 return res;
2417 }
2418
2419 static gint
2420 elektron_move_data_item_prefix (struct backend *backend, const gchar * src,
2421 const gchar * dst, const char *prefix)
2422 {
2423 return elektron_dst_src_data_prefix_common (backend, src, dst, prefix,
2424 DATA_MOVE_REQUEST,
2425 sizeof (DATA_MOVE_REQUEST));
2426 }
2427
2428 static gint
2429 elektron_move_data_item_any (struct backend *backend, const gchar * src,
2430 const gchar * dst)
2431 {
2432 return elektron_move_data_item_prefix (backend, src, dst, NULL);
2433 }
2434
2435 static gint
2436 elektron_move_data_item_prj (struct backend *backend, const gchar * src,
2437 const gchar * dst)
2438 {
2439 return elektron_move_data_item_prefix (backend, src, dst,
2440 FS_DATA_PRJ_PREFIX);
2441 }
2442
2443 static gint
2444 elektron_move_data_item_snd (struct backend *backend, const gchar * src,
2445 const gchar * dst)
2446 {
2447 return elektron_move_data_item_prefix (backend, src, dst,
2448 FS_DATA_SND_PREFIX);
2449 }
2450
2451 static gint
2452 elektron_copy_data_item_prefix (struct backend *backend, const gchar * src,
2453 const gchar * dst, const gchar * prefix)
2454 {
2455 return elektron_dst_src_data_prefix_common (backend, src, dst, prefix,
2456 DATA_COPY_REQUEST,
2457 sizeof (DATA_COPY_REQUEST));
2458 }
2459
2460 static gint
2461 elektron_copy_data_item_any (struct backend *backend, const gchar * src,
2462 const gchar * dst)
2463 {
2464 return elektron_copy_data_item_prefix (backend, src, dst, NULL);
2465 }
2466
2467 static gint
2468 elektron_copy_data_item_prj (struct backend *backend, const gchar * src,
2469 const gchar * dst)
2470 {
2471 return elektron_copy_data_item_prefix (backend, src, dst,
2472 FS_DATA_PRJ_PREFIX);
2473 }
2474
2475 static gint
2476 elektron_copy_data_item_snd (struct backend *backend, const gchar * src,
2477 const gchar * dst)
2478 {
2479 return elektron_copy_data_item_prefix (backend, src, dst,
2480 FS_DATA_SND_PREFIX);
2481 }
2482
2483 static gint
2484 elektron_path_data_prefix_common (struct backend *backend,
2485 const gchar * path, const char *prefix,
2486 const guint8 * op_data, guint len)
2487 {
2488 gint res;
2489 char *path_w_prefix = elektron_add_prefix_to_path (path, prefix);
2490
2491 res = elektron_path_common (backend, path_w_prefix, op_data, len);
2492 g_free (path_w_prefix);
2493
2494 return res;
2495 }
2496
2497 static gint
2498 elektron_clear_data_item_prefix (struct backend *backend,
2499 const gchar * path, const gchar * prefix)
2500 {
2501 return elektron_path_data_prefix_common (backend, path, prefix,
2502 DATA_CLEAR_REQUEST,
2503 sizeof (DATA_CLEAR_REQUEST));
2504 }
2505
2506 static gint
2507 elektron_clear_data_item_any (struct backend *backend, const gchar * path)
2508 {
2509 return elektron_clear_data_item_prefix (backend, path, NULL);
2510 }
2511
2512 static gint
2513 elektron_clear_data_item_prj (struct backend *backend, const gchar * path)
2514 {
2515 return elektron_clear_data_item_prefix (backend, path, FS_DATA_PRJ_PREFIX);
2516 }
2517
2518 static gint
2519 elektron_clear_data_item_snd (struct backend *backend, const gchar * path)
2520 {
2521 return elektron_clear_data_item_prefix (backend, path, FS_DATA_SND_PREFIX);
2522 }
2523
2524 static gint
2525 elektron_swap_data_item_prefix (struct backend *backend, const gchar * src,
2526 const gchar * dst, const gchar * prefix)
2527 {
2528 return elektron_dst_src_data_prefix_common (backend, src, dst, prefix,
2529 DATA_SWAP_REQUEST,
2530 sizeof (DATA_SWAP_REQUEST));
2531 }
2532
2533 static gint
2534 elektron_swap_data_item_any (struct backend *backend, const gchar * src,
2535 const gchar * dst)
2536 {
2537 return elektron_swap_data_item_prefix (backend, src, dst, NULL);
2538 }
2539
2540 static gint
2541 elektron_swap_data_item_prj (struct backend *backend, const gchar * src,
2542 const gchar * dst)
2543 {
2544 return elektron_swap_data_item_prefix (backend, src, dst,
2545 FS_DATA_PRJ_PREFIX);
2546 }
2547
2548 static gint
2549 elektron_swap_data_item_snd (struct backend *backend, const gchar * src,
2550 const gchar * dst)
2551 {
2552 return elektron_swap_data_item_prefix (backend, src, dst,
2553 FS_DATA_SND_PREFIX);
2554 }
2555
2556 static gint
2557 elektron_open_datum (struct backend *backend, const gchar * path,
2558 guint32 * jid, gint mode, guint32 size)
2559 {
2560 guint32 *data32;
2561 guint32 sizebe;
2562 guint32 chunk_size;
2563 guint8 compression;
2564 GByteArray *rx_msg;
2565 GByteArray *tx_msg;
2566 const guint8 *data;
2567 guint len;
2568 gchar *path_cp1252;
2569 gint res = 0;
2570
2571 if (mode == O_RDONLY)
2572 {
2573 data = DATA_READ_OPEN_REQUEST;
2574 len = sizeof (DATA_READ_OPEN_REQUEST);
2575 }
2576 else if (mode == O_WRONLY)
2577 {
2578 data = DATA_WRITE_OPEN_REQUEST;
2579 len = sizeof (DATA_WRITE_OPEN_REQUEST);
2580 }
2581 else
2582 {
2583 return -EINVAL;
2584 }
2585
2586 tx_msg = elektron_new_msg (data, len);
2587 if (!tx_msg)
2588 {
2589 return -ENOMEM;
2590 }
2591
2592 path_cp1252 = elektron_get_cp1252 (path);
2593
2594 if (mode == O_RDONLY)
2595 {
2596 g_byte_array_append (tx_msg, (guint8 *) path_cp1252,
2597 strlen (path_cp1252) + 1);
2598 chunk_size = htobe32 (DATA_TRANSF_BLOCK_BYTES);
2599 g_byte_array_append (tx_msg, (guint8 *) & chunk_size, sizeof (guint32));
2600 compression = 1;
2601 g_byte_array_append (tx_msg, &compression, sizeof (guint8));
2602 }
2603
2604 if (mode == O_WRONLY)
2605 {
2606 sizebe = htobe32 (size);
2607 g_byte_array_append (tx_msg, (guint8 *) & sizebe, sizeof (guint32));
2608 g_byte_array_append (tx_msg, (guint8 *) path_cp1252,
2609 strlen (path_cp1252) + 1);
2610 }
2611
2612 rx_msg = elektron_tx_and_rx (backend, tx_msg);
2613 if (!rx_msg)
2614 {
2615 res = -EIO;
2616 goto cleanup;
2617 }
2618
2619 if (!elektron_get_msg_status (rx_msg))
2620 {
2621 res = -EPERM;
2622 error_print ("%s (%s)\n", snd_strerror (res),
2623 elektron_get_msg_string (rx_msg));
2624 free_msg (rx_msg);
2625 goto cleanup;
2626 }
2627
2628 data32 = (guint32 *) & rx_msg->data[6];
2629 *jid = be32toh (*data32);
2630
2631 if (mode == O_RDONLY)
2632 {
2633 data32 = (guint32 *) & rx_msg->data[10];
2634 chunk_size = be32toh (*data32);
2635
2636 compression = rx_msg->data[14];
2637
2638 debug_print (1,
2639 "Open datum info: job id: %d; chunk size: %d; compression: %d\n",
2640 *jid, chunk_size, compression);
2641 }
2642
2643 if (mode == O_WRONLY)
2644 {
2645 debug_print (1, "Open datum info: job id: %d\n", *jid);
2646 }
2647
2648 free_msg (rx_msg);
2649
2650 cleanup:
2651 g_free (path_cp1252);
2652 return res;
2653 }
2654
2655 static gint
2656 elektron_close_datum (struct backend *backend,
2657 guint32 jid, gint mode, guint32 wsize)
2658 {
2659 guint32 jidbe;
2660 guint32 wsizebe;
2661 guint32 r_jid;
2662 guint32 asize;
2663 guint32 *data32;
2664 GByteArray *rx_msg;
2665 GByteArray *tx_msg;
2666 const guint8 *data;
2667 guint len;
2668
2669 if (mode == O_RDONLY)
2670 {
2671 data = DATA_READ_CLOSE_REQUEST;
2672 len = sizeof (DATA_READ_CLOSE_REQUEST);
2673 }
2674 else if (mode == O_WRONLY)
2675 {
2676 data = DATA_WRITE_CLOSE_REQUEST;
2677 len = sizeof (DATA_WRITE_CLOSE_REQUEST);
2678 }
2679 else
2680 {
2681 return -EINVAL;
2682 }
2683
2684 tx_msg = elektron_new_msg (data, len);
2685 if (!tx_msg)
2686 {
2687 return -ENOMEM;
2688 }
2689
2690 jidbe = htobe32 (jid);
2691 g_byte_array_append (tx_msg, (guchar *) & jidbe, sizeof (guint32));
2692
2693 if (mode == O_WRONLY)
2694 {
2695 wsizebe = htobe32 (wsize);
2696 g_byte_array_append (tx_msg, (guchar *) & wsizebe, sizeof (guint32));
2697 }
2698
2699 rx_msg = elektron_tx_and_rx (backend, tx_msg);
2700 if (!rx_msg)
2701 {
2702 return -EIO;
2703 }
2704
2705 if (!elektron_get_msg_status (rx_msg))
2706 {
2707 error_print ("%s (%s)\n", snd_strerror (-EPERM),
2708 elektron_get_msg_string (rx_msg));
2709 free_msg (rx_msg);
2710 return -EPERM;
2711 }
2712
2713 data32 = (guint32 *) & rx_msg->data[6];
2714 r_jid = be32toh (*data32);
2715
2716 data32 = (guint32 *) & rx_msg->data[10];
2717 asize = be32toh (*data32);
2718
2719 debug_print (1, "Close datum info: job id: %d; size: %d\n", r_jid, asize);
2720
2721 free_msg (rx_msg);
2722
2723 if (mode == O_WRONLY && asize != wsize)
2724 {
2725 error_print
2726 ("Actual download bytes (%d) differs from expected ones (%d)\n",
2727 asize, wsize);
2728 return -EINVAL;
2729 }
2730
2731 return 0;
2732 }
2733
2734 static gint
2735 elektron_download_data_prefix (struct backend *backend, const gchar * path,
2736 GByteArray * output,
2737 struct job_control *control,
2738 const gchar * prefix)
2739 {
2740 gint res;
2741 guint32 seq;
2742 guint32 seqbe;
2743 guint32 jid;
2744 guint32 r_jid;
2745 guint32 r_seq;
2746 guint32 status;
2747 guint8 last;
2748 guint32 hash;
2749 guint32 *data32;
2750 guint32 jidbe;
2751 guint32 data_size;
2752 gboolean active;
2753 GByteArray *rx_msg;
2754 GByteArray *tx_msg;
2755 gchar *path_w_prefix = elektron_add_prefix_to_path (path, prefix);
2756
2757 res = elektron_open_datum (backend, path_w_prefix, &jid, O_RDONLY, 0);
2758 g_free (path_w_prefix);
2759 if (res)
2760 {
2761 return -EIO;
2762 }
2763
2764 usleep (BE_REST_TIME_US);
2765
2766 jidbe = htobe32 (jid);
2767
2768 res = 0;
2769 seq = 0;
2770 last = 0;
2771 control->data = NULL;
2772 g_mutex_lock (&control->mutex);
2773 active = control->active;
2774 g_mutex_unlock (&control->mutex);
2775 while (!last && active)
2776 {
2777 tx_msg =
2778 elektron_new_msg (DATA_READ_PARTIAL_REQUEST,
2779 sizeof (DATA_READ_PARTIAL_REQUEST));
2780 g_byte_array_append (tx_msg, (guint8 *) & jidbe, sizeof (guint32));
2781 seqbe = htobe32 (seq);
2782 g_byte_array_append (tx_msg, (guint8 *) & seqbe, sizeof (guint32));
2783 rx_msg = elektron_tx_and_rx (backend, tx_msg);
2784 if (!rx_msg)
2785 {
2786 res = -EIO;
2787 break;
2788 }
2789
2790 if (!elektron_get_msg_status (rx_msg))
2791 {
2792 res = -EPERM;
2793 error_print ("%s (%s)\n", snd_strerror (res),
2794 elektron_get_msg_string (rx_msg));
2795 free_msg (rx_msg);
2796 break;
2797 }
2798
2799 data32 = (guint32 *) & rx_msg->data[6];
2800 r_jid = be32toh (*data32);
2801
2802 data32 = (guint32 *) & rx_msg->data[10];
2803 r_seq = be32toh (*data32);
2804
2805 data32 = (guint32 *) & rx_msg->data[14];
2806 status = be32toh (*data32);
2807
2808 last = rx_msg->data[18];
2809
2810 data32 = (guint32 *) & rx_msg->data[19];
2811 hash = be32toh (*data32);
2812
2813 data32 = (guint32 *) & rx_msg->data[23];
2814 data_size = be32toh (*data32);
2815
2816 if (data_size)
2817 {
2818 debug_print (1,
2819 "Read datum info: job id: %d; last: %d; seq: %d; status: %d; hash: 0x%08x\n",
2820 r_jid, last, r_seq, status, hash);
2821
2822 g_byte_array_append (output, (guint8 *) & rx_msg->data[27],
2823 data_size);
2824 }
2825 else
2826 {
2827 // Sometimes, the first message returns 0 data size and the rest of the parameters are not initialized.
2828 debug_print (1,
2829 "Read datum info: job id: %d; last: %d, hash: 0x%08x\n",
2830 r_jid, last, hash);
2831 status = 0;
2832 }
2833
2834 free_msg (rx_msg);
2835 seq++;
2836
2837 if (control)
2838 {
2839 set_job_control_progress (control, status / 1000.0);
2840 g_mutex_lock (&control->mutex);
2841 active = control->active;
2842 g_mutex_unlock (&control->mutex);
2843 }
2844
2845 usleep (BE_REST_TIME_US);
2846 }
2847
2848 return elektron_close_datum (backend, jid, O_RDONLY, 0);
2849 }
2850
2851 static gint
2852 elektron_download_data_any (struct backend *backend, const gchar * path,
2853 GByteArray * output, struct job_control *control)
2854 {
2855 control->parts = 1;
2856 control->part = 0;
2857 return elektron_download_data_prefix (backend, path, output, control, NULL);
2858 }
2859
2860 static gint
2861 elektron_download_data_prj (struct backend *backend, const gchar * path,
2862 GByteArray * output, struct job_control *control)
2863 {
2864 return elektron_download_data_prefix (backend, path, output, control,
2865 FS_DATA_PRJ_PREFIX);
2866 }
2867
2868 static gint
2869 elektron_download_data_snd (struct backend *backend, const gchar * path,
2870 GByteArray * output, struct job_control *control)
2871 {
2872 return elektron_download_data_prefix (backend, path, output, control,
2873 FS_DATA_SND_PREFIX);
2874 }
2875
2876 static gchar *
2877 elektron_get_download_name (struct backend *backend,
2878 struct item_iterator *remote_iter,
2879 const struct fs_operations *ops,
2880 const gchar * src_path)
2881 {
2882 gint32 id;
2883 const gchar *src_dir;
2884 gchar *namec, *name, *src_dirc;
2885 gint ret;
2886 gboolean new = FALSE;
2887
2888 namec = strdup (src_path);
2889 name = basename (namec);
2890
2891 if (ops->fs == FS_SAMPLES || ops->fs == FS_RAW_ALL
2892 || ops->fs == FS_RAW_PRESETS)
2893 {
2894 name = strdup (name);
2895 goto end;
2896 }
2897
2898 if (!remote_iter)
2899 {
2900 new = TRUE;
2901 remote_iter = malloc (sizeof (struct item_iterator));
2902 src_dirc = strdup (src_path);
2903 src_dir = dirname (src_dirc);
2904 ret = ops->readdir (backend, remote_iter, src_dir);
2905 g_free (src_dirc);
2906 if (ret)
2907 {
2908 name = NULL;
2909 goto cleanup;
2910 }
2911 }
2912
2913 id = atoi (name);
2914 name = NULL;
2915
2916 while (!next_item_iterator (remote_iter))
2917 {
2918 if (remote_iter->item.id == id)
2919 {
2920 name = get_item_name (&remote_iter->item);
2921 break;
2922 }
2923 }
2924
2925 cleanup:
2926 if (new)
2927 {
2928 free_item_iterator (remote_iter);
2929 }
2930 g_free (namec);
2931 end:
2932 return name;
2933 }
2934
2935 static gint
2936 elektron_download_pkg (struct backend *backend, const gchar * path,
2937 GByteArray * output, struct job_control *control,
2938 enum package_type type,
2939 const struct fs_operations *ops,
2940 fs_remote_file_op download)
2941 {
2942 gint ret;
2943 gchar *pkg_name;
2944 struct package pkg;
2945 struct elektron_data *data = backend->data;
2946
2947 pkg_name = elektron_get_download_name (backend, NULL, ops, path);
2948 if (!pkg_name)
2949 {
2950 return -1;
2951 }
2952
2953 if (package_begin
2954 (&pkg, pkg_name, data->fw_version, &backend->device_desc, type))
2955 {
2956 g_free (pkg_name);
2957 return -1;
2958 }
2959
2960 ret =
2961 package_receive_pkg_resources (&pkg, path, control, backend, download,
2962 elektron_download_sample_part);
2963 ret = ret || package_end (&pkg, output);
2964
2965 package_destroy (&pkg);
2966 return ret;
2967 }
2968
2969 static gint
2970 elektron_download_data_snd_pkg (struct backend *backend,
2971 const gchar * path, GByteArray * output,
2972 struct job_control *control)
2973 {
2974 return elektron_download_pkg (backend, path, output, control,
2975 PKG_FILE_TYPE_SOUND,
2976 &FS_DATA_SND_OPERATIONS,
2977 elektron_download_data_snd);
2978 }
2979
2980 static gint
2981 elektron_download_data_prj_pkg (struct backend *backend,
2982 const gchar * path, GByteArray * output,
2983 struct job_control *control)
2984 {
2985 return elektron_download_pkg (backend, path, output, control,
2986 PKG_FILE_TYPE_PROJECT,
2987 &FS_DATA_PRJ_OPERATIONS,
2988 elektron_download_data_prj);
2989 }
2990
2991 static gint
2992 elektron_download_raw_pst_pkg (struct backend *backend, const gchar * path,
2993 GByteArray * output,
2994 struct job_control *control)
2995 {
2996 return elektron_download_pkg (backend, path, output, control,
2997 PKG_FILE_TYPE_PRESET,
2998 &FS_RAW_ANY_OPERATIONS,
2999 elektron_download_raw);
3000 }
3001
3002 static gchar *
3003 elektron_get_upload_path_smplrw (struct backend *backend,
3004 struct item_iterator *remote_iter,
3005 const struct fs_operations *ops,
3006 const gchar * dst_dir,
3007 const gchar * src_path, gint32 * next_index)
3008 {
3009 gchar *path, *namec, *name, *aux;
3010
3011 namec = strdup (src_path);
3012 name = basename (namec);
3013 remove_ext (name);
3014 aux = chain_path (dst_dir, name);
3015 g_free (namec);
3016
3017 if (ops->fs == FS_RAW_ALL || ops->fs == FS_RAW_PRESETS)
3018 {
3019 path = elektron_add_ext_to_mc_snd (aux);
3020 g_free (aux);
3021 }
3022 else
3023 {
3024 path = aux;
3025 }
3026 return path;
3027 }
3028
3029 static gchar *
3030 elektron_get_upload_path_data (struct backend *backend,
3031 struct item_iterator *remote_iter,
3032 const struct fs_operations *ops,
3033 const gchar * dst_dir,
3034 const gchar * src_path, gint32 * next_index)
3035 {
3036 gchar *indexs, *path;
3037 gboolean new = FALSE;
3038
3039 if (!remote_iter)
3040 {
3041 new = TRUE;
3042 remote_iter = malloc (sizeof (struct item_iterator));
3043 if (ops->readdir (backend, remote_iter, dst_dir))
3044 {
3045 return strdup (dst_dir);
3046 }
3047 }
3048
3049 if (remote_iter->item.id == *next_index)
3050 {
3051 (*next_index)++;
3052 }
3053 else
3054 {
3055 while (!next_item_iterator (remote_iter))
3056 {
3057 if (remote_iter->item.id > *next_index)
3058 {
3059 break;
3060 }
3061 (*next_index)++;
3062 }
3063 }
3064
3065 if (new)
3066 {
3067 free_item_iterator (remote_iter);
3068 }
3069
3070 indexs = malloc (PATH_MAX);
3071 snprintf (indexs, PATH_MAX, "%d", *next_index);
3072 path = chain_path (dst_dir, indexs);
3073 g_free (indexs);
3074
3075 (*next_index)++;
3076
3077 return path;
3078 }
3079
3080 static gchar *
3081 elektron_get_download_path (struct backend *backend,
3082 struct item_iterator *remote_iter,
3083 const struct fs_operations *ops,
3084 const gchar * dst_dir, const gchar * src_path)
3085 {
3086 gchar *path, *src_pathc, *name, *dl_ext, *filename;
3087 const gchar *src_fpath, *md_ext, *ext = get_ext (src_path);
3088
3089 // Examples:
3090 // 0:/soundbanks/A/1/.metadata
3091 // 0:/loops/sample
3092
3093 src_pathc = strdup (src_path);
3094 if (ext && strcmp (ext, "metadata") == 0)
3095 {
3096 src_fpath = dirname (src_pathc);
3097 md_ext = ".metadata";
3098 }
3099 else
3100 {
3101 src_fpath = src_pathc;
3102 md_ext = "";
3103 }
3104
3105 name = elektron_get_download_name (backend, remote_iter, ops, src_fpath);
3106 if (name)
3107 {
3108 dl_ext = ops->get_ext (&backend->device_desc, ops);
3109 filename = malloc (PATH_MAX);
3110 snprintf (filename, PATH_MAX, "%s.%s%s", name, dl_ext, md_ext);
3111 path = chain_path (dst_dir, filename);
3112 g_free (name);
3113 g_free (dl_ext);
3114 g_free (filename);
3115 }
3116 else
3117 {
3118 path = NULL;
3119 }
3120
3121 g_free (src_pathc);
3122 return path;
3123 }
3124
3125 static gint
3126 elektron_upload_data_prefix (struct backend *backend, const gchar * path,
3127 GByteArray * array,
3128 struct job_control *control,
3129 const gchar * prefix)
3130 {
3131 gint res;
3132 guint32 seq;
3133 guint32 jid;
3134 guint32 crc;
3135 guint32 len;
3136 guint32 r_jid;
3137 guint32 r_seq;
3138 guint32 offset;
3139 guint32 *data32;
3140 guint32 jidbe;
3141 guint32 aux32;
3142 gboolean active;
3143 guint32 total;
3144 GByteArray *rx_msg;
3145 GByteArray *tx_msg;
3146 gchar *path_w_prefix = elektron_add_prefix_to_path (path, prefix);
3147
3148 res =
3149 elektron_open_datum (backend, path_w_prefix, &jid, O_WRONLY, array->len);
3150 g_free (path_w_prefix);
3151 if (res)
3152 {
3153 goto end;
3154 }
3155
3156 usleep (BE_REST_TIME_US);
3157
3158 jidbe = htobe32 (jid);
3159
3160 seq = 0;
3161 offset = 0;
3162 control->data = NULL;
3163 if (control)
3164 {
3165 g_mutex_lock (&control->mutex);
3166 active = control->active;
3167 g_mutex_unlock (&control->mutex);
3168 }
3169 else
3170 {
3171 active = TRUE;
3172 }
3173
3174 while (offset < array->len && active)
3175 {
3176 tx_msg =
3177 elektron_new_msg (DATA_WRITE_PARTIAL_REQUEST,
3178 sizeof (DATA_WRITE_PARTIAL_REQUEST));
3179 g_byte_array_append (tx_msg, (guint8 *) & jidbe, sizeof (guint32));
3180 aux32 = htobe32 (seq);
3181 g_byte_array_append (tx_msg, (guint8 *) & aux32, sizeof (guint32));
3182
3183 if (offset + DATA_TRANSF_BLOCK_BYTES < array->len)
3184 {
3185 len = DATA_TRANSF_BLOCK_BYTES;
3186 }
3187 else
3188 {
3189 len = array->len - offset;
3190 }
3191
3192 crc = crc32 (0xffffffff, &array->data[offset], len);
3193 aux32 = htobe32 (crc);
3194 g_byte_array_append (tx_msg, (guint8 *) & aux32, sizeof (guint32));
3195
3196 aux32 = htobe32 (len);
3197 g_byte_array_append (tx_msg, (guint8 *) & aux32, sizeof (guint32));
3198
3199 g_byte_array_append (tx_msg, &array->data[offset], len);
3200
3201 rx_msg = elektron_tx_and_rx (backend, tx_msg);
3202 if (!rx_msg)
3203 {
3204 res = -EIO;
3205 goto end;
3206 }
3207
3208 usleep (BE_REST_TIME_US);
3209
3210 if (!elektron_get_msg_status (rx_msg))
3211 {
3212 res = -EPERM;
3213 error_print ("%s (%s)\n", snd_strerror (res),
3214 elektron_get_msg_string (rx_msg));
3215 free_msg (rx_msg);
3216 break;
3217 }
3218
3219 data32 = (guint32 *) & rx_msg->data[6];
3220 r_jid = be32toh (*data32);
3221
3222 data32 = (guint32 *) & rx_msg->data[10];
3223 r_seq = be32toh (*data32);
3224
3225 data32 = (guint32 *) & rx_msg->data[14];
3226 total = be32toh (*data32);
3227
3228 free_msg (rx_msg);
3229
3230 debug_print (1,
3231 "Write datum info: job id: %d; seq: %d; total: %d\n",
3232 r_jid, r_seq, total);
3233
3234 seq++;
3235 offset += len;
3236
3237 if (total != offset)
3238 {
3239 error_print
3240 ("Actual upload bytes (%d) differs from expected ones (%d)\n",
3241 total, offset);
3242 }
3243
3244 set_job_control_progress (control, offset / (gdouble) array->len);
3245 g_mutex_lock (&control->mutex);
3246 active = control->active;
3247 g_mutex_unlock (&control->mutex);
3248 }
3249
3250 debug_print (2, "%d bytes sent\n", offset);
3251
3252 res = elektron_close_datum (backend, jid, O_WRONLY, array->len);
3253
3254 end:
3255 return res;
3256 }
3257
3258 static gint
3259 elektron_upload_data_any (struct backend *backend, const gchar * path,
3260 GByteArray * array, struct job_control *control)
3261 {
3262 control->parts = 1;
3263 control->part = 0;
3264 return elektron_upload_data_prefix (backend, path, array, control, NULL);
3265 }
3266
3267 static gint
3268 elektron_upload_data_prj (struct backend *backend, const gchar * path,
3269 GByteArray * array, struct job_control *control)
3270 {
3271 return elektron_upload_data_prefix (backend, path, array, control,
3272 FS_DATA_PRJ_PREFIX);
3273 }
3274
3275 static gint
3276 elektron_upload_data_snd (struct backend *backend, const gchar * path,
3277 GByteArray * array, struct job_control *control)
3278 {
3279 return elektron_upload_data_prefix (backend, path, array, control,
3280 FS_DATA_SND_PREFIX);
3281 }
3282
3283 static gint
3284 elektron_upload_pkg (struct backend *backend, const gchar * path,
3285 GByteArray * input, struct job_control *control,
3286 guint8 type, const struct fs_operations *ops,
3287 fs_remote_file_op upload)
3288 {
3289 gint ret;
3290 struct package pkg;
3291
3292 ret = package_open (&pkg, input, &backend->device_desc);
3293 if (!ret)
3294 {
3295 ret = package_send_pkg_resources (&pkg, path, control, backend,
3296 upload, elektron_upload_sample_part);
3297 package_close (&pkg);
3298 }
3299 return ret;
3300 }
3301
3302 static gint
3303 elektron_upload_data_snd_pkg (struct backend *backend, const gchar * path,
3304 GByteArray * input, struct job_control *control)
3305 {
3306 return elektron_upload_pkg (backend, path, input, control,
3307 PKG_FILE_TYPE_SOUND,
3308 &FS_DATA_SND_OPERATIONS,
3309 elektron_upload_data_snd);
3310 }
3311
3312 static gint
3313 elektron_upload_data_prj_pkg (struct backend *backend, const gchar * path,
3314 GByteArray * input, struct job_control *control)
3315 {
3316 return elektron_upload_pkg (backend, path, input, control,
3317 PKG_FILE_TYPE_PROJECT,
3318 &FS_DATA_PRJ_OPERATIONS,
3319 elektron_upload_data_prj);
3320 }
3321
3322 static gint
3323 elektron_upload_raw_pst_pkg (struct backend *backend, const gchar * path,
3324 GByteArray * input, struct job_control *control)
3325 {
3326 return elektron_upload_pkg (backend, path, input, control,
3327 PKG_FILE_TYPE_PRESET,
3328 &FS_RAW_ANY_OPERATIONS, elektron_upload_raw);
3329 }
3330
3331 static gchar *
3332 elektron_get_dev_and_fs_ext (const struct device_desc *desc,
3333 const struct fs_operations *ops)
3334 {
3335 gchar *ext = malloc (LABEL_MAX);
3336 snprintf (ext, LABEL_MAX, "%s%s", desc->alias, ops->type_ext);
3337 return ext;
3338 }
3339
3340 gint
3341 elektron_sample_load (const gchar * path, GByteArray * sample,
3342 struct job_control *control)
3343 {
3344 guint frames;
3345 return sample_load_from_file (path, sample, control,
3346 &ELEKTRON_SAMPLE_PARAMS, &frames);
3347 }
3348
3349 gchar *
3350 elektron_get_sample_path_from_hash_size (struct backend *backend,
3351 guint32 hash, guint32 size)
3352 {
3353 guint32 aux32;
3354 gchar *path;
3355 GByteArray *rx_msg, *tx_msg =
3356 elektron_new_msg (FS_SAMPLE_GET_FILE_INFO_FROM_HASH_AND_SIZE_REQUEST,
3357 sizeof
3358 (FS_SAMPLE_GET_FILE_INFO_FROM_HASH_AND_SIZE_REQUEST));
3359
3360 aux32 = htobe32 (hash);
3361 memcpy (&tx_msg->data[5], &aux32, sizeof (guint32));
3362 aux32 = htobe32 (size);
3363 memcpy (&tx_msg->data[9], &aux32, sizeof (guint32));
3364
3365 rx_msg = elektron_tx_and_rx (backend, tx_msg);
3366 if (!rx_msg)
3367 {
3368 return NULL;
3369 }
3370
3371 if (elektron_get_msg_status (rx_msg))
3372 {
3373 path = strdup ((gchar *) & rx_msg->data[14]);
3374 }
3375 else
3376 {
3377 path = NULL;
3378 }
3379 g_byte_array_free (rx_msg, TRUE);
3380 return path;
3381 }
0 /*
1 * elektron.h
2 * Copyright (C) 2019 David García Goñi <dagargo@gmail.com>
3 *
4 * This file is part of Elektroid.
5 *
6 * Elektroid is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * Elektroid is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with Elektroid. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #ifndef ELEKTRON_H
21 #define ELEKTRON_H
22
23 #include "utils.h"
24 #include "backend.h"
25
26 enum elektron_fs
27 {
28 FS_SAMPLES = 0x1,
29 FS_RAW_ALL = 0x2,
30 FS_RAW_PRESETS = 0x4,
31 FS_DATA_ALL = 0x8,
32 FS_DATA_PRJ = 0x10,
33 FS_DATA_SND = 0x20
34 };
35
36 gchar *elektron_get_sample_path_from_hash_size (struct backend *, guint32,
37 guint32);
38
39 GByteArray *elektron_ping (struct backend *);
40
41 gint elektron_handshake (struct backend *);
42
43 #endif
0 /*
1 * microbrute.c
2 * Copyright (C) 2022 David García Goñi <dagargo@gmail.com>
3 *
4 * This file is part of Elektroid.
5 *
6 * Elektroid is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * Elektroid is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with Elektroid. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #include "microbrute.h"
21 #include "common.h"
22
23 #define MICROBRUTE_MAX_SEQ_STR_LEN 256
24
25 #define MICROBRUTE_MAX_SEQUENCES 8
26 #define MICROBRUTE_SEQUENCE_PREFIX "MicroBrute sequence"
27
28 #define MICROBRUTE_SEQUENCE_REQUEST_SEQ_POS 6
29 #define MICROBRUTE_SEQUENCE_REQUEST_ID_POS 9
30 #define MICROBRUTE_SEQUENCE_REQUEST_OFFSET_POS 10
31 #define MICROBRUTE_SEQUENCE_RESPONSE_LEN_POS 11
32 #define MICROBRUTE_SEQUENCE_RESPONSE_DATA_POS 12
33 #define MICROBRUTE_SEQUENCE_TXT_POS 2
34
35 static const guint8 ARTURIA_ID[] = { 0x0, 0x20, 0x6b };
36 static const guint8 FAMILY_ID[] = { 0x4, 0x0 };
37 static const guint8 MODEL_ID[] = { 0x2, 0x1 };
38
39 static const guint8 MICROBRUTE_SEQUENCE_REQUEST[] =
40 { 0xf0, 0x0, 0x20, 0x6B, 0x5, 0x1, 0x0, 0x03, 0x3B, 0x0, 0x0, 0x20, 0xf7 };
41
42 static const guint8 MICROBRUTE_SEQUENCE_MSG[] =
43 { 0xf0, 0x0, 0x20, 0x6b, 0x05, 0x01, 0x0, 0x23, 0x3a, 0x0, 0x0, 0x20,
44 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
45 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
46 0x0, 0x0, 0xf7
47 };
48
49 enum cz_fs
50 {
51 FS_MICROBRUTE_SEQUENCE = 1
52 };
53
54 static guint8
55 microbrute_get_seq (struct backend *backend)
56 {
57 guint8 *seq = backend->data;
58 guint8 value = *seq;
59 (*seq)++;
60 if (*seq == 0x80)
61 {
62 *seq = 0;
63 }
64 return value;
65 }
66
67 static gchar *
68 microbrute_get_download_path (struct backend *backend,
69 struct item_iterator *remote_iter,
70 const struct fs_operations *ops,
71 const gchar * dst_dir, const gchar * src_path)
72 {
73 gchar *name = malloc (PATH_MAX);
74 gchar *src_path_copy = strdup (src_path);
75 gchar *filename = basename (src_path_copy);
76 gint index = atoi (filename);
77 snprintf (name, PATH_MAX, "%s/%s %d.mbseq", dst_dir,
78 MICROBRUTE_SEQUENCE_PREFIX, index + 1);
79 g_free (src_path_copy);
80
81 return name;
82 }
83
84 static guint
85 microbrute_next_dentry (struct item_iterator *iter)
86 {
87 guint *next = iter->data;
88
89 if (*next >= MICROBRUTE_MAX_SEQUENCES)
90 {
91 return -ENOENT;
92 }
93
94 iter->item.id = *next;
95 snprintf (iter->item.name, LABEL_MAX, "%d", *next + 1);
96 iter->item.type = ELEKTROID_FILE;
97 iter->item.size = -1;
98 (*next)++;
99
100 return 0;
101 }
102
103 static gint
104 microbrute_read_dir (struct backend *backend, struct item_iterator *iter,
105 const gchar * path)
106 {
107 guint *next;
108
109 if (strcmp (path, "/"))
110 {
111 return -ENOTDIR;
112 }
113
114 next = g_malloc (sizeof (guint));
115 *next = 0;
116 iter->data = next;
117 iter->next = microbrute_next_dentry;
118 iter->free = g_free;
119
120 return 0;
121 }
122
123 static GByteArray *
124 microbrute_get_sequence_request_msg (struct backend *backend, guint8 id,
125 guint8 offset)
126 {
127 GByteArray *tx_msg =
128 g_byte_array_sized_new (sizeof (MICROBRUTE_SEQUENCE_REQUEST));
129 g_byte_array_append (tx_msg, MICROBRUTE_SEQUENCE_REQUEST,
130 sizeof (MICROBRUTE_SEQUENCE_REQUEST));
131 tx_msg->data[MICROBRUTE_SEQUENCE_REQUEST_SEQ_POS] =
132 microbrute_get_seq (backend);
133 tx_msg->data[MICROBRUTE_SEQUENCE_REQUEST_ID_POS] = id;
134 tx_msg->data[MICROBRUTE_SEQUENCE_REQUEST_OFFSET_POS] = offset;
135 return tx_msg;
136 }
137
138 static gint
139 microbrute_download_seq_data (struct backend *backend, guint seqnum,
140 guint offset, gchar * sequence)
141 {
142 GByteArray *tx_msg, *rx_msg;
143 gchar aux[LABEL_MAX];
144 gboolean first;
145 guint8 *step;
146
147 tx_msg = microbrute_get_sequence_request_msg (backend, seqnum, offset);
148 rx_msg = backend_tx_and_rx_sysex (backend, tx_msg, -1);
149 if (!rx_msg)
150 {
151 return -EIO;
152 }
153
154 first = offset ? FALSE : TRUE;
155 step = &rx_msg->data[MICROBRUTE_SEQUENCE_RESPONSE_DATA_POS];
156 while (*step && *step != 0xf7)
157 {
158 snprintf (aux, LABEL_MAX, "%s", first ? "" : " ");
159 strcat (sequence, aux);
160 first = FALSE;
161 if (*step == 0x7f)
162 {
163 strcat (sequence, "x");
164 }
165 else
166 {
167 snprintf (aux, LABEL_MAX, "%02d", *step);
168 strcat (sequence, aux);
169 }
170 step++;
171 }
172
173 free_msg (rx_msg);
174
175 return 0;
176 }
177
178 static gint
179 microbrute_download (struct backend *backend, const gchar * src_path,
180 GByteArray * output, struct job_control *control)
181 {
182 gchar sequence[MICROBRUTE_MAX_SEQ_STR_LEN];
183 gboolean active;
184 gchar *src_path_copy = strdup (src_path);
185 gchar *filename = basename (src_path_copy);
186 guint seqnum = atoi (filename);
187 gint err;
188
189 g_free (src_path_copy);
190
191 snprintf (sequence, MICROBRUTE_MAX_SEQ_STR_LEN, "%1d:", seqnum + 1);
192
193 control->parts = 1;
194 control->part = 0;
195 set_job_control_progress (control, 0.0);
196
197 err = microbrute_download_seq_data (backend, seqnum, 0, sequence);
198 if (err)
199 {
200 return err;
201 }
202
203 set_job_control_progress (control, 0.5);
204
205 err = microbrute_download_seq_data (backend, seqnum, 0x20, sequence);
206 if (err)
207 {
208 return err;
209 }
210
211 g_mutex_lock (&control->mutex);
212 active = control->active;
213 g_mutex_unlock (&control->mutex);
214 if (active)
215 {
216 set_job_control_progress (control, 1.0);
217 }
218 else
219 {
220 return -ECANCELED;
221 }
222
223 g_byte_array_append (output, (guint8 *) sequence, strlen (sequence));
224
225 return 0;
226 }
227
228 static GByteArray *
229 microbrute_set_sequence_request_msg (struct backend *backend, guint8 id,
230 guint8 offset)
231 {
232 GByteArray *tx_msg =
233 g_byte_array_sized_new (sizeof (MICROBRUTE_SEQUENCE_MSG));
234 g_byte_array_append (tx_msg, MICROBRUTE_SEQUENCE_MSG,
235 sizeof (MICROBRUTE_SEQUENCE_MSG));
236 tx_msg->data[MICROBRUTE_SEQUENCE_REQUEST_SEQ_POS] =
237 microbrute_get_seq (backend);
238 tx_msg->data[MICROBRUTE_SEQUENCE_REQUEST_ID_POS] = id;
239 tx_msg->data[MICROBRUTE_SEQUENCE_REQUEST_OFFSET_POS] = offset;
240 return tx_msg;
241 }
242
243 static gint
244 microbrute_send_seq_msg (struct backend *backend, guint8 seqnum,
245 guint8 offset, gchar ** tokens, gint * pos,
246 gint total)
247 {
248 struct sysex_transfer transfer;
249 guint8 steps = 0, id = seqnum;
250 gchar *token = *tokens;
251 gint err;
252 guint8 *step;
253
254 transfer.raw = microbrute_set_sequence_request_msg (backend, id, offset);
255
256 step = &transfer.raw->data[MICROBRUTE_SEQUENCE_RESPONSE_DATA_POS];
257 while (steps < 32 && *pos < total)
258 {
259 if (*token < 0x20)
260 {
261 error_print ("Invalid character\n");
262 token++;
263 (*pos)++;
264 continue;
265 }
266 else if (*token == ' ')
267 {
268 token++;
269 (*pos)++;
270 continue;
271 }
272 else if (token[0] == '0' && token[1] != ' ')
273 {
274 token++;
275 (*pos)++;
276 continue;
277 }
278 else if (*token == 'x' || *token == 'X')
279 {
280 *step = 0x7f;
281 token++;
282 (*pos)++;
283 debug_print (2, "Note: -\n");
284 }
285 else
286 {
287 gchar *rem;
288 glong note = strtol (token, &rem, 10);
289 *step = note >= 0x7f ? 0x7f : note;
290 *step = *step < 12 ? 0x7f : *step;
291 if (*step == 0 && token == rem)
292 {
293 error_print ("Error while reading note\n");
294 token++;
295 (*pos)++;
296 continue;
297 }
298 token = rem;
299 *pos += (*step >= 100) ? 3 : (*step >= 10) ? 2 : 1;
300 debug_print (2, "Note: 0x%02x (%d)\n", *step, *step);
301 }
302 steps++;
303 step++;
304 }
305 transfer.raw->data[MICROBRUTE_SEQUENCE_RESPONSE_LEN_POS] = steps;
306
307 //This doesn't need synchronized access as the caller provices this already.
308 err = backend_tx_sysex (backend, &transfer);
309 free_msg (transfer.raw);
310
311 *tokens = token;
312
313 return err < 0 ? err : steps;
314 }
315
316 static gint
317 microbrute_upload (struct backend *backend, const gchar * path,
318 GByteArray * input, struct job_control *control)
319 {
320 gchar *token = (gchar *) & input->data[MICROBRUTE_SEQUENCE_TXT_POS];
321 gint pos = MICROBRUTE_SEQUENCE_TXT_POS;
322 guint seqnum;
323 gint steps;
324
325 if (common_slot_get_id_name_from_path (path, &seqnum, NULL))
326 {
327 return -EBADSLT;
328 }
329
330 g_mutex_lock (&backend->mutex);
331
332 control->parts = 1;
333 control->part = 0;
334 set_job_control_progress (control, 0.0);
335
336 steps = microbrute_send_seq_msg (backend, seqnum, 0, &token, &pos,
337 input->len);
338 if (steps < 0)
339 {
340 goto end;
341 }
342 else if (pos < input->len)
343 {
344 set_job_control_progress (control, 0.5);
345 steps = microbrute_send_seq_msg (backend, seqnum, 0x20, &token, &pos,
346 input->len);
347 if (steps < 0)
348 {
349 goto end;
350 }
351 }
352
353 set_job_control_progress (control, 1.0);
354
355 end:
356 g_mutex_unlock (&backend->mutex);
357 return steps < 0 ? steps : 0;
358 }
359
360 static void
361 microbrute_print (struct item_iterator *iter, struct backend *backend)
362 {
363 printf ("%c %s\n", iter->item.type, iter->item.name);
364 }
365
366 static const struct fs_operations FS_MICROBRUTE_OPERATIONS = {
367 .fs = FS_MICROBRUTE_SEQUENCE,
368 .options =
369 FS_OPTION_SINGLE_OP | FS_OPTION_SLOT_STORAGE | FS_OPTION_SORT_BY_NAME,
370 .name = "sequence",
371 .gui_name = "Sequences",
372 .gui_icon = BE_FILE_ICON_SEQ,
373 .type_ext = "mbseq",
374 .readdir = microbrute_read_dir,
375 .print_item = microbrute_print,
376 .download = microbrute_download,
377 .upload = microbrute_upload,
378 .get_id = get_item_index,
379 .load = load_file,
380 .save = save_file,
381 .get_ext = backend_get_fs_ext,
382 .get_upload_path = common_slot_get_upload_path,
383 .get_download_path = microbrute_get_download_path
384 };
385
386 static const struct fs_operations *FS_MICROBRUTE_OPERATIONS_LIST[] = {
387 &FS_MICROBRUTE_OPERATIONS, NULL
388 };
389
390 gint
391 microbrute_handshake (struct backend *backend)
392 {
393 guint8 *seq;
394
395 if (memcmp (backend->midi_info.company, ARTURIA_ID, sizeof (ARTURIA_ID)) ||
396 memcmp (backend->midi_info.family, FAMILY_ID, sizeof (FAMILY_ID)) ||
397 memcmp (backend->midi_info.model, MODEL_ID, sizeof (MODEL_ID)))
398 {
399 return -ENODEV;
400 }
401
402 seq = malloc (sizeof (guint8));
403 *seq = 0;
404
405 backend->device_desc.filesystems = FS_MICROBRUTE_SEQUENCE;
406 backend->fs_ops = FS_MICROBRUTE_OPERATIONS_LIST;
407 backend->destroy_data = backend_destroy_data;
408 backend->data = seq;
409
410 snprintf (backend->device_name, LABEL_MAX, "Arturia MicroBrute %d.%d.%d.%d",
411 backend->midi_info.version[0], backend->midi_info.version[1],
412 backend->midi_info.version[2], backend->midi_info.version[3]);
413
414 return 0;
415 }
0 /*
1 * cz.h
2 * Copyright (C) 2022 David García Goñi <dagargo@gmail.com>
3 *
4 * This file is part of Elektroid.
5 *
6 * Elektroid is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * Elektroid is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with Elektroid. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #ifndef MICROBRUTE_H
21 #define MICROBRUTE_H
22
23 #include "backend.h"
24
25 gint microbrute_handshake (struct backend *);
26
27 #endif
0 /*
1 * package.c
2 * Copyright (C) 2021 David García Goñi <dagargo@gmail.com>
3 *
4 * This file is part of Elektroid.
5 *
6 * Elektroid is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * Elektroid is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with Elektroid. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #include <stdio.h>
21 #include <unistd.h>
22 #include <json-glib/json-glib.h>
23 #include "package.h"
24 #include "utils.h"
25 #include "sample.h"
26 #include "elektron.h"
27
28 #define PKG_TAG_FORMAT_VERSION "FormatVersion"
29 #define PKG_TAG_PRODUCT_TYPE "ProductType"
30 #define PKG_TAG_PAYLOAD "Payload"
31 #define PKG_TAG_FILE_TYPE "FileType"
32 #define PKG_TAG_FIRMWARE_VERSION "FirmwareVersion"
33 #define PKG_TAG_SAMPLES "Samples"
34 #define PKG_TAG_FILE_NAME "FileName"
35 #define PKG_TAG_FILE_SIZE "FileSize"
36 #define PKG_TAG_HASH "Hash"
37 #define PKG_VAL_FILE_TYPE_PRJ "Project"
38 #define PKG_VAL_FILE_TYPE_SND "Sound"
39 #define PKG_VAL_FILE_TYPE_UNK "Unknown"
40
41 #define MAN_TAG_SAMPLE_REFS "sample_references"
42 #define MAN_TAG_HASH "hash"
43 #define MAN_TAG_SIZE "size"
44
45 #define MAX_PACKAGE_LEN (64 * 1024 * 1024)
46 #define MAX_MANIFEST_LEN (128 * 1024)
47 #define MANIFEST_FILENAME "manifest.json"
48
49 const struct sample_params ELEKTRON_SAMPLE_PARAMS = {
50 .samplerate = ELEKTRON_SAMPLE_RATE,
51 .channels = ELEKTRON_SAMPLE_CHANNELS
52 };
53
54 static gint
55 package_add_resource (struct package *pkg,
56 struct package_resource *pkg_resource, gboolean new)
57 {
58 zip_source_t *sample_source;
59 zip_int64_t index;
60 zip_error_t zerror;
61
62 debug_print (1, "Adding file %s to zip (%d B)...\n", pkg_resource->path,
63 pkg_resource->data->len);
64 sample_source =
65 zip_source_buffer_create (pkg_resource->data->data,
66 pkg_resource->data->len, 0, &zerror);
67 if (!sample_source)
68 {
69 error_print ("Error while creating file source: %s\n",
70 zip_error_strerror (&zerror));
71 zip_error_fini (&zerror);
72 return -1;
73 }
74
75 index =
76 zip_file_add (pkg->zip, pkg_resource->path, sample_source,
77 ZIP_FL_OVERWRITE | ZIP_FL_ENC_UTF_8);
78 if (index < 0)
79 {
80 error_print ("Error while adding file: %s\n",
81 zip_error_strerror (zip_get_error (pkg->zip)));
82 zip_source_free (sample_source);
83 return -1;
84 }
85
86 if (new)
87 {
88 pkg->resources = g_list_append (pkg->resources, pkg_resource);
89 }
90
91 return 0;
92 }
93
94
95 gint
96 package_begin (struct package *pkg, gchar * name, const gchar * fw_version,
97 const struct device_desc *device_desc, enum package_type type)
98 {
99 zip_error_t zerror;
100 pkg->resources = NULL;
101 pkg->buff = g_malloc (MAX_PACKAGE_LEN);
102 pkg->name = name;
103 pkg->fw_version = strdup (fw_version);
104 pkg->device_desc = device_desc;
105 pkg->type = type;
106
107 debug_print (1, "Creating zip buffer...\n");
108
109 zip_error_init (&zerror);
110 pkg->zip_source =
111 zip_source_buffer_create (pkg->buff, MAX_PACKAGE_LEN, 0, &zerror);
112 if (!pkg->zip_source)
113 {
114 error_print ("Error while creating zip source: %s\n",
115 zip_error_strerror (&zerror));
116 zip_error_fini (&zerror);
117 g_free (pkg->buff);
118 return -1;
119 }
120
121 pkg->zip = zip_open_from_source (pkg->zip_source, ZIP_TRUNCATE, &zerror);
122 if (!pkg->zip)
123 {
124 error_print ("Error while creating in memory zip: %s\n",
125 zip_error_strerror (&zerror));
126 zip_error_fini (&zerror);
127 zip_source_free (pkg->zip_source);
128 g_free (pkg->buff);
129 return -1;
130 }
131
132 zip_source_keep (pkg->zip_source);
133
134 pkg->manifest = g_malloc (sizeof (struct package_resource));
135 pkg->manifest->type = PKG_RES_TYPE_MANIFEST;
136 pkg->manifest->data = g_byte_array_sized_new (MAX_MANIFEST_LEN); //We need this because we can not resize later.
137 pkg->manifest->path = strdup (MANIFEST_FILENAME);
138 package_add_resource (pkg, pkg->manifest, TRUE);
139
140 return 0;
141 }
142
143 static gint
144 package_add_manifest (struct package *pkg)
145 {
146 JsonBuilder *builder;
147 JsonGenerator *gen;
148 JsonNode *root;
149 gchar *json;
150 gint len;
151 gchar *val = g_malloc (LABEL_MAX);
152 GList *resource;
153 gboolean samples_found = FALSE;
154 struct package_resource *pkg_resource;
155
156 builder = json_builder_new ();
157
158 json_builder_begin_object (builder);
159
160 json_builder_set_member_name (builder, PKG_TAG_FORMAT_VERSION);
161 json_builder_add_string_value (builder, "1.0");
162
163 json_builder_set_member_name (builder, PKG_TAG_PRODUCT_TYPE);
164 json_builder_begin_array (builder);
165 snprintf (val, LABEL_MAX, "%d", pkg->device_desc->id);
166 json_builder_add_string_value (builder, val);
167 json_builder_end_array (builder);
168
169 json_builder_set_member_name (builder, PKG_TAG_PAYLOAD);
170 json_builder_add_string_value (builder, pkg->name);
171
172 json_builder_set_member_name (builder, PKG_TAG_FILE_TYPE);
173 json_builder_add_string_value (builder,
174 pkg->type & PKG_FILE_TYPE_SOUND ?
175 PKG_VAL_FILE_TYPE_SND : pkg->type &
176 PKG_FILE_TYPE_PROJECT ? PKG_VAL_FILE_TYPE_PRJ
177 : PKG_VAL_FILE_TYPE_UNK);
178
179 if (pkg->type != PKG_FILE_TYPE_PRESET)
180 {
181 json_builder_set_member_name (builder, PKG_TAG_FIRMWARE_VERSION);
182 json_builder_add_string_value (builder, pkg->fw_version);
183 }
184
185 if (pkg->device_desc->filesystems & FS_SAMPLES)
186 {
187 for (resource = pkg->resources; resource; resource = resource->next)
188 {
189 pkg_resource = resource->data;
190 if (pkg_resource->type == PKG_RES_TYPE_SAMPLE)
191 {
192 samples_found = TRUE;
193 break;
194 }
195 }
196 }
197
198 if (samples_found)
199 {
200 json_builder_set_member_name (builder, PKG_TAG_SAMPLES);
201 json_builder_begin_array (builder);
202 for (resource = pkg->resources; resource; resource = resource->next)
203 {
204 pkg_resource = resource->data;
205 if (pkg_resource->type == PKG_RES_TYPE_SAMPLE)
206 {
207 json_builder_begin_object (builder);
208
209 json_builder_set_member_name (builder, PKG_TAG_FILE_NAME);
210 json_builder_add_string_value (builder, pkg_resource->path);
211
212 json_builder_set_member_name (builder, PKG_TAG_FILE_SIZE);
213 json_builder_add_int_value (builder, pkg_resource->size);
214
215 json_builder_set_member_name (builder, PKG_TAG_HASH);
216 snprintf (val, LABEL_MAX, "%d", pkg_resource->hash);
217 json_builder_add_string_value (builder, val);
218
219 json_builder_end_object (builder);
220 }
221 }
222 json_builder_end_array (builder);
223 }
224
225 json_builder_end_object (builder);
226
227 gen = json_generator_new ();
228 g_object_set (gen, "pretty", TRUE, NULL);
229 root = json_builder_get_root (builder);
230 json_generator_set_root (gen, root);
231 json = json_generator_to_data (gen, NULL);
232
233 len = strlen (json);
234 memcpy (pkg->manifest->data->data, json, len);
235 pkg->manifest->data->len = len;
236 package_add_resource (pkg, pkg->manifest, FALSE);
237
238 g_free (json);
239 json_node_free (root);
240 g_object_unref (gen);
241 g_object_unref (builder);
242 g_free (val);
243
244 return 0;
245 }
246
247 gint
248 package_end (struct package *pkg, GByteArray * out)
249 {
250 int ret = 0;
251 zip_stat_t zstat;
252
253 ret = package_add_manifest (pkg);
254 if (ret)
255 {
256 error_print ("Error while formatting %s\n", MANIFEST_FILENAME);
257 return ret;
258 }
259
260 debug_print (1, "Writing zip to buffer...\n");
261 if (zip_close (pkg->zip))
262 {
263 error_print ("Error while creating in memory zip: %s\n",
264 zip_error_strerror (zip_get_error (pkg->zip)));
265 return -1;
266 }
267
268 zip_source_stat (pkg->zip_source, &zstat);
269 debug_print (1, "%ld B written to package\n", zstat.comp_size);
270
271 zip_source_open (pkg->zip_source);
272 g_byte_array_set_size (out, zstat.comp_size);
273 zip_source_read (pkg->zip_source, out->data, zstat.comp_size);
274 zip_source_close (pkg->zip_source);
275
276 return 0;
277 }
278
279 void
280 package_free_package_resource (gpointer data)
281 {
282 struct package_resource *pkg_resource = data;
283 g_byte_array_free (pkg_resource->data, TRUE);
284 g_free (pkg_resource);
285 }
286
287 void
288 package_destroy (struct package *pkg)
289 {
290 zip_source_free (pkg->zip_source);
291 g_free (pkg->buff);
292 g_free (pkg->name);
293 g_free (pkg->fw_version);
294 g_list_free_full (pkg->resources, package_free_package_resource);
295 }
296
297 gint
298 package_open (struct package *pkg, GByteArray * data,
299 const struct device_desc *device_desc)
300 {
301 gint ret;
302 zip_error_t zerror;
303 zip_file_t *manifest_file;
304 zip_stat_t zstat;
305
306 debug_print (1, "Opening zip stream...\n");
307
308 zip_error_init (&zerror);
309 pkg->zip_source =
310 zip_source_buffer_create (data->data, data->len, 0, &zerror);
311 if (!pkg->zip_source)
312 {
313 error_print ("Error while creating zip source: %s\n",
314 zip_error_strerror (&zerror));
315 zip_error_fini (&zerror);
316 return -1;
317 }
318
319 pkg->zip = zip_open_from_source (pkg->zip_source, ZIP_RDONLY, &zerror);
320 if (!pkg->zip)
321 {
322 error_print ("Error while creating in memory zip: %s\n",
323 zip_error_strerror (&zerror));
324 zip_error_fini (&zerror);
325 zip_source_free (pkg->zip_source);
326 return -1;
327 }
328
329 ret = zip_stat (pkg->zip, MANIFEST_FILENAME, ZIP_FL_ENC_STRICT, &zstat);
330 if (ret)
331 {
332 error_print ("Error while loading '%s': %s\n", MANIFEST_FILENAME,
333 zip_error_strerror (&zerror));
334 zip_error_fini (&zerror);
335 zip_source_free (pkg->zip_source);
336 zip_close (pkg->zip);
337 return -1;
338 }
339
340 pkg->manifest = g_malloc (sizeof (struct package_resource));
341 pkg->manifest->type = PKG_RES_TYPE_MANIFEST;
342 pkg->manifest->data = g_byte_array_sized_new (zstat.size);
343 pkg->manifest->path = strdup (MANIFEST_FILENAME);
344 manifest_file = zip_fopen (pkg->zip, MANIFEST_FILENAME, 0);
345 zip_fread (manifest_file, pkg->manifest->data->data, zstat.size);
346 pkg->manifest->data->len = zstat.size;
347 zip_fclose (manifest_file);
348
349 pkg->resources = NULL;
350 pkg->resources = g_list_append (pkg->resources, pkg->manifest);
351 pkg->buff = NULL;
352 pkg->name = NULL;
353 pkg->fw_version = NULL;
354 pkg->device_desc = device_desc;
355
356 return ret;
357 }
358
359 void
360 package_close (struct package *pkg)
361 {
362 zip_source_close (pkg->zip_source);
363 package_destroy (pkg);
364 }
365
366 gint
367 package_receive_pkg_resources (struct package *pkg,
368 const gchar * payload_path,
369 struct job_control *control,
370 struct backend *backend,
371 fs_remote_file_op download_data,
372 fs_remote_file_op download_sample)
373 {
374 gint ret, i, elements;
375 JsonParser *parser;
376 JsonReader *reader;
377 gint64 hash, size;
378 GError *error;
379 gchar *sample_path, *metadata_path;
380 struct package_resource *pkg_resource;
381 GByteArray *wave, *payload, *metadata, *sample;
382
383 metadata_path = chain_path (payload_path, ".metadata");
384 debug_print (1, "Getting metadata from %s...\n", metadata_path);
385 metadata = g_byte_array_new ();
386 control->parts = 130; // 128 sample slots, metadata and main.
387 control->part = 0;
388 set_job_control_progress (control, 0.0);
389 ret = download_data (backend, metadata_path, metadata, control);
390 if (ret)
391 {
392 debug_print (1, "Metadata file not available\n");
393 control->parts = 1;
394 goto get_payload;
395 }
396
397 control->part++;
398
399 parser = json_parser_new ();
400 if (!json_parser_load_from_data
401 (parser, (gchar *) metadata->data, metadata->len, &error))
402 {
403 error_print ("Unable to parse stream: %s. Continuing...",
404 error->message);
405 g_clear_error (&error);
406 control->parts = 2;
407 goto get_payload;
408 }
409
410 reader = json_reader_new (json_parser_get_root (parser));
411 if (!reader)
412 {
413 error_print ("Unable to read from parser. Continuing...");
414 control->parts = 2;
415 goto get_payload;
416 }
417
418 if (!json_reader_read_member (reader, MAN_TAG_SAMPLE_REFS))
419 {
420 debug_print (1, "Member '%s' not found\n", MAN_TAG_SAMPLE_REFS);
421 control->parts = 2;
422 goto get_payload;
423 }
424
425 if (!json_reader_is_array (reader))
426 {
427 error_print ("Member '%s' is not an array. Continuing...\n",
428 MAN_TAG_SAMPLE_REFS);
429 control->parts = 2;
430 goto cleanup_reader;
431 }
432
433 elements = json_reader_count_elements (reader);
434 if (!elements)
435 {
436 debug_print (1, "No samples found\n");
437 control->parts = 2;
438 goto cleanup_reader;
439 }
440
441 sample = g_byte_array_new ();
442 control->parts = 2 + elements;
443 set_job_control_progress (control, 0.0);
444 for (i = 0; i < elements; i++, control->part++)
445 {
446 if (!json_reader_read_element (reader, i))
447 {
448 error_print ("Cannot read element %d. Continuing...\n", i);
449 continue;
450 }
451 if (!json_reader_read_member (reader, MAN_TAG_HASH))
452 {
453 error_print ("Cannot read member '%s'. Continuing...\n",
454 MAN_TAG_HASH);
455 continue;
456 }
457 hash = json_reader_get_int_value (reader);
458 json_reader_end_element (reader);
459
460 if (!json_reader_read_member (reader, MAN_TAG_SIZE))
461 {
462 error_print ("Cannot read member '%s'. Continuing...\n",
463 MAN_TAG_SIZE);
464 continue;
465 }
466 size = json_reader_get_int_value (reader);
467 json_reader_end_element (reader);
468
469 json_reader_end_element (reader);
470
471 sample_path = elektron_get_sample_path_from_hash_size (backend, hash,
472 size);
473 if (!sample_path)
474 {
475 debug_print (1, "Sample not found. Skipping...\n");
476 continue;
477 }
478
479 debug_print (1, "Hash: %ld; size: %ld; path: %s\n", hash, size,
480 sample_path);
481 debug_print (1, "Getting sample %s...\n", sample_path);
482 g_byte_array_set_size (sample, 0);
483 if (download_sample (backend, sample_path, sample, control))
484 {
485 g_free (sample_path);
486 error_print ("Error while downloading sample. Continuing...\n");
487 continue;
488 }
489
490 wave = g_byte_array_new ();
491 ret = sample_get_wav_from_array (sample, wave, control);
492 if (ret)
493 {
494 error_print
495 ("Error while converting sample to wave file. Continuing...\n");
496 g_byte_array_free (wave, TRUE);
497 g_free (sample_path);
498 continue;
499 }
500
501 pkg_resource = g_malloc (sizeof (struct package_resource));
502 pkg_resource->type = PKG_RES_TYPE_SAMPLE;
503 pkg_resource->data = wave;
504 pkg_resource->hash = hash;
505 pkg_resource->size = size;
506 pkg_resource->path = g_malloc (PATH_MAX);
507 snprintf (pkg_resource->path, PATH_MAX, "%s%s.wav", PKG_TAG_SAMPLES,
508 sample_path);
509 if (package_add_resource (pkg, pkg_resource, TRUE))
510 {
511 package_free_package_resource (pkg_resource);
512 error_print ("Error while packaging sample\n");
513 continue;
514 }
515 }
516
517 g_byte_array_free (sample, TRUE);
518 cleanup_reader:
519 g_object_unref (reader);
520 g_object_unref (parser);
521 get_payload:
522 g_byte_array_free (metadata, TRUE);
523 debug_print (1, "Getting payload from %s...\n", payload_path);
524 payload = g_byte_array_new ();
525 ret = download_data (backend, payload_path, payload, control);
526 if (ret)
527 {
528 error_print ("Error while downloading payload\n");
529 ret = -1;
530 }
531 else
532 {
533 pkg_resource = g_malloc (sizeof (struct package_resource));
534 pkg_resource->type = PKG_RES_TYPE_PAYLOAD;
535 pkg_resource->data = payload;
536 pkg_resource->path = strdup (pkg->name);
537 if (package_add_resource (pkg, pkg_resource, TRUE))
538 {
539 package_free_package_resource (pkg_resource);
540 ret = -1;
541 }
542 }
543 return ret;
544 }
545
546 gint
547 package_send_pkg_resources (struct package *pkg,
548 const gchar * payload_path,
549 struct job_control *control,
550 struct backend *backend,
551 fs_remote_file_op upload_data,
552 fs_remote_file_op upload_sample)
553 {
554 gint elements, i, ret = 0;
555 const gchar *file_type, *sample_path;
556 gint64 product_type;
557 JsonParser *parser;
558 JsonReader *reader;
559 GError *error;
560 zip_stat_t zstat;
561 zip_error_t zerror;
562 zip_file_t *zip_file;
563 GByteArray *wave, *raw;
564 struct package_resource *pkg_resource;
565
566 zip_error_init (&zerror);
567
568 parser = json_parser_new ();
569 if (!json_parser_load_from_data
570 (parser, (gchar *) pkg->manifest->data->data, pkg->manifest->data->len,
571 &error))
572 {
573 error_print ("Unable to parse stream: %s", error->message);
574 g_clear_error (&error);
575 ret = -1;
576 goto cleanup_parser;
577 }
578
579 reader = json_reader_new (json_parser_get_root (parser));
580 if (!reader)
581 {
582 ret = -1;
583 goto cleanup_parser;
584 }
585
586 if (!json_reader_read_member (reader, PKG_TAG_PAYLOAD))
587 {
588 error_print ("No '%s' found\n", PKG_TAG_PAYLOAD);
589 ret = -1;
590 goto cleanup_reader;
591 }
592 pkg->name = strdup (json_reader_get_string_value (reader));
593 json_reader_end_element (reader);
594
595 if (zip_stat (pkg->zip, pkg->name, ZIP_FL_ENC_STRICT, &zstat))
596 {
597 error_print ("Error while loading '%s': %s\n", MANIFEST_FILENAME,
598 zip_error_strerror (&zerror));
599 zip_error_fini (&zerror);
600 ret = -1;
601 goto cleanup_reader;
602 }
603
604 pkg_resource = g_malloc (sizeof (struct package_resource));
605 pkg_resource->type = PKG_RES_TYPE_PAYLOAD;
606 pkg_resource->data = g_byte_array_sized_new (zstat.size);
607 pkg_resource->path = strdup (pkg->name);
608 zip_file = zip_fopen (pkg->zip, pkg->name, 0);
609 zip_fread (zip_file, pkg_resource->data->data, zstat.size);
610 pkg_resource->data->len = zstat.size;
611 zip_fclose (zip_file);
612
613 pkg->resources = g_list_append (pkg->resources, pkg_resource);
614
615 control->parts = 129; // 128 sample slots and main.
616 control->part = 0;
617 ret = upload_data (backend, payload_path, pkg_resource->data, control);
618 if (ret)
619 {
620 error_print ("Error while uploading payload to '%s'\n", payload_path);
621 goto cleanup_reader;
622 }
623 control->part++;
624
625 if (!json_reader_read_member (reader, PKG_TAG_FIRMWARE_VERSION))
626 {
627 error_print ("No '%s' found\n", PKG_TAG_FIRMWARE_VERSION);
628 ret = -1;
629 goto cleanup_reader;
630 }
631 pkg->fw_version = strdup (json_reader_get_string_value (reader));
632 json_reader_end_element (reader);
633
634 if (!json_reader_read_member (reader, PKG_TAG_FILE_TYPE))
635 {
636 error_print ("No '%s' found\n", PKG_TAG_FILE_TYPE);
637 ret = -1;
638 goto cleanup_reader;
639 }
640 file_type = json_reader_get_string_value (reader);
641 json_reader_end_element (reader);
642
643 if (strcmp (file_type, PKG_VAL_FILE_TYPE_SND) == 0)
644 {
645 pkg->type = PKG_FILE_TYPE_SOUND;
646 }
647 else if (strcmp (file_type, PKG_VAL_FILE_TYPE_PRJ) == 0)
648 {
649 pkg->type = PKG_FILE_TYPE_PROJECT;
650 }
651 else
652 {
653 pkg->type = PKG_FILE_TYPE_NONE;
654 debug_print (1, "Invalid '%s': %s\n", PKG_TAG_FILE_TYPE, file_type);
655 }
656
657 if (!json_reader_read_member (reader, PKG_TAG_PRODUCT_TYPE))
658 {
659 error_print ("No '%s' found\n", PKG_TAG_PRODUCT_TYPE);
660 ret = 0;
661 goto cleanup_reader;
662 }
663 if (!json_reader_is_array (reader))
664 {
665 error_print ("Member '%s' is not an array\n", PKG_TAG_PRODUCT_TYPE);
666 ret = -1;
667 goto cleanup_reader;
668 }
669 if (!json_reader_count_elements (reader))
670 {
671 error_print ("No product types found\n");
672 ret = 0;
673 goto cleanup_reader;
674 }
675 if (!json_reader_read_element (reader, 0))
676 {
677 ret = -1;
678 goto cleanup_reader;
679 }
680 product_type = atoi (json_reader_get_string_value (reader));
681 debug_print (1, "ProductType: %ld\n", product_type);
682 if (pkg->device_desc->id != product_type)
683 {
684 debug_print (1, "Incompatible product type. Continuing...\n");
685 }
686 json_reader_end_element (reader);
687 json_reader_end_element (reader);
688
689 if (!json_reader_read_member (reader, PKG_TAG_SAMPLES))
690 {
691 if (pkg->device_desc->filesystems & FS_SAMPLES)
692 {
693 debug_print (1, "No samples found\n");
694 }
695 control->parts = 1; // Only payload and it's done.
696 control->part = 0;
697 set_job_control_progress (control, 1.0);
698 goto cleanup_reader;
699 }
700
701 if (!json_reader_is_array (reader))
702 {
703 error_print ("Member '%s' is not an array. Skipping samples...\n",
704 PKG_TAG_SAMPLES);
705 ret = -1;
706 goto cleanup_reader;
707 }
708
709 wave = g_byte_array_sized_new (zstat.size);
710 raw = g_byte_array_sized_new (MAX_PACKAGE_LEN);
711 elements = json_reader_count_elements (reader);
712 control->parts = elements + 1;
713 control->part = 1;
714 for (i = 0; i < elements; i++, control->part++)
715 {
716 guint frames;
717
718 json_reader_read_element (reader, i);
719 json_reader_read_member (reader, PKG_TAG_FILE_NAME);
720 sample_path = json_reader_get_string_value (reader);
721 json_reader_end_element (reader);
722 json_reader_end_element (reader);
723
724 if (zip_stat (pkg->zip, sample_path, ZIP_FL_ENC_STRICT, &zstat))
725 {
726 error_print ("Error while loading '%s': %s\n",
727 MANIFEST_FILENAME, zip_error_strerror (&zerror));
728 zip_error_fini (&zerror);
729 ret = -1;
730 continue;
731 }
732
733 g_byte_array_set_size (wave, zstat.size);
734 zip_file = zip_fopen (pkg->zip, sample_path, 0);
735 zip_fread (zip_file, wave->data, zstat.size);
736 wave->len = zstat.size;
737 zip_fclose (zip_file);
738
739 raw->len = 0;
740 if (sample_load_from_array (wave, raw, control,
741 &ELEKTRON_SAMPLE_PARAMS, &frames))
742 {
743 error_print ("Error while loading '%s': %s\n",
744 sample_path, zip_error_strerror (&zerror));
745 continue;
746 }
747
748 pkg_resource = g_malloc (sizeof (struct package_resource));
749 pkg_resource->type = PKG_RES_TYPE_SAMPLE;
750 pkg_resource->data = g_byte_array_sized_new (raw->len);
751 pkg_resource->data->len = raw->len;
752 memcpy (pkg_resource->data->data, raw->data, raw->len);
753 pkg_resource->path = strdup (sample_path);
754
755 pkg->resources = g_list_append (pkg->resources, pkg_resource);
756
757 //We remove the "Samples" at the beggining of the full zip path.
758 ret = upload_sample (backend, &sample_path[7], pkg_resource->data,
759 control);
760 g_free (control->data);
761 control->data = NULL;
762 if (ret)
763 {
764 error_print ("Error while uploading sample to '%s'\n",
765 &sample_path[7]);
766 continue;
767 }
768 }
769
770 g_byte_array_free (wave, TRUE);
771 g_byte_array_free (raw, TRUE);
772
773 cleanup_reader:
774 g_object_unref (reader);
775 cleanup_parser:
776 g_object_unref (parser);
777 return ret;
778 }
0 /*
1 * package.h
2 * Copyright (C) 2021 David García Goñi <dagargo@gmail.com>
3 *
4 * This file is part of Elektroid.
5 *
6 * Elektroid is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * Elektroid is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with Elektroid. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #include <glib.h>
21 #include <zip.h>
22 #include "backend.h"
23
24 #ifndef PACKAGE_H
25 #define PACKAGE_H
26
27 #define ELEKTRON_SAMPLE_RATE 48000
28 #define ELEKTRON_SAMPLE_CHANNELS 1
29
30 enum package_resource_type
31 {
32 PKG_RES_TYPE_NONE,
33 PKG_RES_TYPE_PAYLOAD,
34 PKG_RES_TYPE_MANIFEST,
35 PKG_RES_TYPE_SAMPLE
36 };
37
38 struct package_resource
39 {
40 enum package_resource_type type;
41 guint32 hash;
42 guint32 size;
43 gchar *path;
44 GByteArray *data;
45 };
46
47 enum package_type
48 {
49 PKG_FILE_TYPE_NONE,
50 PKG_FILE_TYPE_SOUND,
51 PKG_FILE_TYPE_PROJECT,
52 PKG_FILE_TYPE_PRESET,
53 };
54
55 struct package
56 {
57 gchar *name;
58 enum package_type type;
59 gchar *fw_version;
60 const struct device_desc *device_desc;
61 gchar *buff;
62 zip_source_t *zip_source;
63 zip_t *zip;
64 GList *resources;
65 struct package_resource *manifest;
66 };
67
68 gint package_begin (struct package *, gchar *, const gchar *,
69 const struct device_desc *, enum package_type);
70
71 gint package_receive_pkg_resources (struct package *, const gchar *,
72 struct job_control *, struct backend *,
73 fs_remote_file_op, fs_remote_file_op);
74
75 gint package_end (struct package *, GByteArray *);
76
77 void package_destroy (struct package *);
78
79 gint package_open (struct package *, GByteArray *,
80 const struct device_desc *);
81
82 gint package_send_pkg_resources (struct package *,
83 const gchar *,
84 struct job_control *,
85 struct backend *, fs_remote_file_op,
86 fs_remote_file_op);
87
88 void package_close (struct package *);
89
90 extern const struct sample_params ELEKTRON_SAMPLE_PARAMS;
91
92 #endif
0 /*
1 * sds.c
2 * Copyright (C) 2022 David García Goñi <dagargo@gmail.com>
3 *
4 * This file is part of Elektroid.
5 *
6 * Elektroid is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * Elektroid is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with Elektroid. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #include <math.h>
21 #include <string.h>
22 #include <glib/gi18n.h>
23 #include "elektron.h"
24 #include "sample.h"
25 #include "sds.h"
26 #include "common.h"
27
28 #define SDS_SAMPLE_LIMIT 1000
29 #define SDS_DATA_PACKET_LEN 127
30 #define SDS_DATA_PACKET_PAYLOAD_LEN 120
31 #define SDS_DATA_PACKET_CKSUM_POS 125
32 #define SDS_DATA_PACKET_CKSUM_START 1
33 #define SDS_BYTES_PER_WORD 3
34 #define SDS_MAX_RETRIES 3
35 #define SDS_SPEC_TIMEOUT 20 //Timeout in the specs to consider no response when transmission is going on.
36 #define SDS_SPEC_TIMEOUT_HANDSHAKE 2000 //Timeout in the specs to consider no response during the handshake.
37 #define SDS_NO_SPEC_TIMEOUT 5000 //Timeout used when the specs indicate to wait indefinitely.
38 #define SDS_NO_SPEC_TIMEOUT_TRY 1500 //Timeout for SDS extensions that might not be implemented.
39 #define SDS_REST_TIME_DEFAULT 18000 //Rest time to not overwhelm the devices whn sending consecutive packets. Lower values cause an an E-Mu ESI-2000 to send corrupted packets.
40 #define SDS_NO_SPEC_OPEN_LOOP_REST_TIME 200000
41 #define SDS_SAMPLE_CHANNELS 1
42 #define SDS_SAMPLE_NAME_MAX_LEN 127
43
44 struct sds_data
45 {
46 gint rest_time;
47 gboolean name_extension;
48 };
49
50 static const guint8 SDS_SAMPLE_REQUEST[] = { 0xf0, 0x7e, 0, 0x3, 0, 0, 0xf7 };
51 static const guint8 SDS_ACK[] = { 0xf0, 0x7e, 0, 0x7f, 0, 0xf7 };
52 static const guint8 SDS_NAK[] = { 0xf0, 0x7e, 0, 0x7e, 0, 0xf7 };
53 static const guint8 SDS_CANCEL[] = { 0xf0, 0x7e, 0, 0x7d, 0, 0xf7 };
54 static const guint8 SDS_WAIT[] = { 0xf0, 0x7e, 0, 0x7c, 0, 0xf7 };
55 static const guint8 SDS_SAMPLE_NAME_REQUEST[] =
56 { 0xf0, 0x7e, 0, 0x5, 0x4, 0, 0, 0xf7 };
57 static const guint8 SDS_DATA_PACKET_HEADER[] = { 0xf0, 0x7e, 0, 0x2, 0 };
58 static const guint8 SDS_SAMPLE_NAME_HEADER[] =
59 { 0xf0, 0x7e, 0, 0x5, 0x3, 0, 0, 0 };
60 static const guint8 SDS_DUMP_HEADER[] =
61 { 0xf0, 0x7e, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xf7 };
62
63 static gchar *
64 sds_get_download_path (struct backend *backend,
65 struct item_iterator *remote_iter,
66 const struct fs_operations *ops, const gchar * dst_dir,
67 const gchar * src_path)
68 {
69 GByteArray *tx_msg, *rx_msg;
70 gchar *name = malloc (PATH_MAX);
71 gchar *src_path_copy = strdup (src_path);
72 gchar *filename = basename (src_path_copy);
73 gint index = atoi (filename);
74 gboolean use_id = TRUE;
75 struct sds_data *sds_data = backend->data;
76
77 if (sds_data->name_extension)
78 {
79 g_mutex_lock (&backend->mutex);
80 backend_rx_drain (backend);
81 g_mutex_unlock (&backend->mutex);
82
83 tx_msg = g_byte_array_new ();
84 g_byte_array_append (tx_msg, SDS_SAMPLE_NAME_REQUEST,
85 sizeof (SDS_SAMPLE_NAME_REQUEST));
86 tx_msg->data[5] = index % 0x80;
87 tx_msg->data[6] = index / 0x80;
88 rx_msg = backend_tx_and_rx_sysex (backend, tx_msg, SDS_NO_SPEC_TIMEOUT);
89 if (rx_msg)
90 {
91 snprintf (name, PATH_MAX, "%s/%s.wav", dst_dir, &rx_msg->data[5]);
92 free_msg (rx_msg);
93 use_id = FALSE;
94 }
95 }
96
97 if (use_id)
98 {
99 snprintf (name, PATH_MAX, "%s/%03d.wav", dst_dir, index);
100 }
101
102 g_free (src_path_copy);
103 return name;
104 }
105
106 static guint
107 sds_get_bytes_value_right_just (guint8 * data, gint length)
108 {
109 gint value = 0;
110 for (gint i = 0, shift = 0; i < length; i++, shift += 7)
111 {
112 value |= data[i] << shift;
113 }
114 return value;
115 }
116
117 static void
118 sds_set_bytes_value_right_just (guint8 * data, gint length, guint value)
119 {
120 for (gint i = 0, shift = 0; i < length; i++, shift += 7)
121 {
122 *data = 0x7f & (value >> shift);
123 data++;
124 }
125 }
126
127 static gint16
128 sds_get_gint16_value_left_just (guint8 * data, gint length, guint bits)
129 {
130 guint value = 0;
131 gint16 svalue;
132 for (gint i = length - 1, shift = 0; i >= 0; i--, shift += 7)
133 {
134 value |= (((guint) data[i]) << shift);
135 }
136 value >>= length * 7 - bits;
137 svalue = (gint16) (value - 0x8000);
138 return svalue;
139 }
140
141 static void
142 sds_set_gint16_value_left_just (guint8 * data, gint length, guint bits,
143 gint16 svalue)
144 {
145 gint value = svalue;
146 value += (guint) 0x8000;
147 value <<= length * 7 - bits;
148 for (gint i = length - 1, shift = 0; i >= 0; i--, shift += 7)
149 {
150 data[i] = (guint8) (0x7f & (value >> shift));
151 }
152 }
153
154 static guint8
155 sds_checksum (guint8 * data)
156 {
157 guint8 checksum = 0;
158 for (int i = SDS_DATA_PACKET_CKSUM_START; i < SDS_DATA_PACKET_CKSUM_POS;
159 i++)
160 {
161 checksum ^= data[i];
162 }
163 checksum &= 0x7F;
164 return checksum;
165 }
166
167 static gint
168 sds_get_bytes_per_word (gint32 bits, guint * word_size,
169 guint * bytes_per_word)
170 {
171 *word_size = (guint) ceil (bits / 8.0);
172 if (*word_size != 2)
173 {
174 error_print ("%d bits resolution not supported\n", bits);
175 return -1;
176 }
177
178 if (bits < 15)
179 {
180 *bytes_per_word = 2;
181 }
182 else
183 {
184 *bytes_per_word = 3;
185 }
186
187 return 0;
188 }
189
190 static gint
191 sds_tx (struct backend *backend, GByteArray * tx_msg)
192 {
193 struct sysex_transfer transfer;
194 transfer.raw = tx_msg;
195 g_mutex_lock (&backend->mutex);
196 backend_tx_sysex (backend, &transfer);
197 g_mutex_unlock (&backend->mutex);
198 free_msg (tx_msg);
199 return transfer.err;
200 }
201
202 static gint
203 sds_tx_handshake (struct backend *backend, const guint8 * msg, guint8 packet)
204 {
205 GByteArray *tx_msg = g_byte_array_sized_new (sizeof (SDS_ACK));
206 g_byte_array_append (tx_msg, msg, sizeof (SDS_ACK));
207 tx_msg->data[4] = packet;
208 return sds_tx (backend, tx_msg);
209 }
210
211 static guint
212 sds_get_download_info (GByteArray * header, struct sample_info *sample_info,
213 guint * words, guint * word_size,
214 guint * bytes_per_word)
215 {
216 sample_info->bitdepth = header->data[6];
217 if (sds_get_bytes_per_word (sample_info->bitdepth, word_size,
218 bytes_per_word))
219 {
220 return -1;
221 }
222 sample_info->samplerate =
223 1.0e9 / sds_get_bytes_value_right_just (&header->data[7],
224 SDS_BYTES_PER_WORD);
225 *words =
226 sds_get_bytes_value_right_just (&header->data[10], SDS_BYTES_PER_WORD);
227 sample_info->loopstart =
228 sds_get_bytes_value_right_just (&header->data[13], SDS_BYTES_PER_WORD);
229 sample_info->loopend =
230 sds_get_bytes_value_right_just (&header->data[16], SDS_BYTES_PER_WORD);
231 sample_info->looptype = header->data[19];
232 sample_info->channels = 1;
233 return 0;
234 }
235
236 static inline gboolean
237 sds_check_message_id (GByteArray * msg, guint id)
238 {
239 return (msg->data[4] == id % 0x80 && msg->data[5] == id / 0x80);
240 }
241
242 static inline void
243 sds_set_message_id (GByteArray * tx_msg, guint id)
244 {
245 tx_msg->data[4] = id % 0x80;
246 tx_msg->data[5] = id / 0x80;
247 }
248
249 static GByteArray *
250 sds_get_request_msg (guint id)
251 {
252 GByteArray *tx_msg = g_byte_array_sized_new (sizeof (SDS_SAMPLE_REQUEST));
253 g_byte_array_append (tx_msg, SDS_SAMPLE_REQUEST,
254 sizeof (SDS_SAMPLE_REQUEST));
255 sds_set_message_id (tx_msg, id);
256 return tx_msg;
257 }
258
259 static GByteArray *
260 sds_get_dump_msg (guint id, guint frames, struct sample_info *sample_info,
261 guint bits)
262 {
263 guint period;
264 GByteArray *tx_msg = g_byte_array_sized_new (sizeof (SDS_DUMP_HEADER));
265 g_byte_array_append (tx_msg, SDS_DUMP_HEADER, sizeof (SDS_DUMP_HEADER));
266 sds_set_message_id (tx_msg, id);
267
268 if (sample_info)
269 {
270 tx_msg->data[6] = (guint8) bits;
271 period = 1.0e9 / sample_info->samplerate;
272 sds_set_bytes_value_right_just (&tx_msg->data[7], SDS_BYTES_PER_WORD,
273 period);
274 sds_set_bytes_value_right_just (&tx_msg->data[10], SDS_BYTES_PER_WORD,
275 frames);
276 sds_set_bytes_value_right_just (&tx_msg->data[13], SDS_BYTES_PER_WORD,
277 sample_info->loopstart);
278 sds_set_bytes_value_right_just (&tx_msg->data[16], SDS_BYTES_PER_WORD,
279 sample_info->loopend);
280 tx_msg->data[19] = (sample_info->loopstart == sample_info->loopend
281 && sample_info->loopstart ==
282 frames - 1) ? 0x7f : sample_info->looptype;
283 }
284
285 return tx_msg;
286 }
287
288 static GByteArray *
289 sds_rx (struct backend *backend, gint timeout)
290 {
291 struct sysex_transfer transfer;
292 transfer.timeout = timeout;
293 transfer.batch = FALSE;
294 g_mutex_lock (&backend->mutex);
295 backend_rx_sysex (backend, &transfer);
296 g_mutex_unlock (&backend->mutex);
297 return transfer.raw;
298 }
299
300 static void
301 sds_download_inc_packet (gboolean * first, guint * packet)
302 {
303 if (*first)
304 {
305 *first = FALSE;
306 }
307 else
308 {
309 (*packet)++;
310 }
311 }
312
313 static void
314 sds_debug_print_sample_data (guint bitdepth, guint bytes_per_word,
315 guint word_size, guint sample_rate, guint words,
316 guint packets)
317 {
318 debug_print (1,
319 "Resolution: %d bits; %d bytes per word; word size %d bytes.\n",
320 bitdepth, bytes_per_word, word_size);
321 debug_print (1, "Sample rate: %d Hz\n", sample_rate);
322 debug_print (1, "Words: %d\n", words);
323 debug_print (1, "Packets: %d\n", packets);
324 }
325
326 static GByteArray *
327 sds_download_get_header (struct backend *backend, guint id)
328 {
329 GByteArray *tx_msg, *rx_msg;
330
331 tx_msg = sds_get_request_msg (id);
332 rx_msg = backend_tx_and_rx_sysex (backend, tx_msg, SDS_NO_SPEC_TIMEOUT);
333
334 if (rx_msg && rx_msg->len == sizeof (SDS_DUMP_HEADER)
335 && !memcmp (rx_msg->data, SDS_DUMP_HEADER, 4)
336 && sds_check_message_id (rx_msg, id))
337 {
338 return rx_msg;
339 }
340
341 debug_print (1, "Bad dump header\n");
342
343 return NULL;
344 }
345
346 static gint
347 sds_download_try (struct backend *backend, const gchar * path,
348 GByteArray * output, struct job_control *control)
349 {
350 guint id, words, word_size, read_bytes, bytes_per_word, total_words, err,
351 retries, packets, packet, exp_packet, rx_packets;
352 gint16 sample;
353 GByteArray *tx_msg, *rx_msg;
354 gchar *path_copy, *index;
355 guint8 *dataptr;
356 gboolean active, first;
357 gboolean last_packet_ack;
358 struct sample_info *sample_info;
359 struct sysex_transfer transfer;
360 struct sds_data *sds_data = backend->data;
361
362 path_copy = strdup (path);
363 index = basename (path_copy);
364 id = atoi (index);
365 g_free (path_copy);
366
367 debug_print (1, "Sending dump request...\n");
368 packet = 0;
369
370 g_mutex_lock (&backend->mutex);
371 backend_rx_drain (backend);
372 g_mutex_unlock (&backend->mutex);
373
374 rx_msg = sds_download_get_header (backend, id);
375 if (!rx_msg)
376 {
377 err = -EIO;
378 goto end;
379 }
380
381 usleep (sds_data->rest_time);
382
383 sample_info = malloc (sizeof (struct sample_info));
384 if (sds_get_download_info (rx_msg, sample_info, &words, &word_size,
385 &bytes_per_word))
386 {
387 free_msg (rx_msg);
388 g_free (sample_info);
389 err = -EINVAL;
390 goto end;
391 }
392
393 packets =
394 ceil (words / (double) (SDS_DATA_PACKET_PAYLOAD_LEN / bytes_per_word));
395 sds_debug_print_sample_data (sample_info->bitdepth, bytes_per_word,
396 word_size, sample_info->samplerate, words,
397 packets);
398
399 g_mutex_lock (&control->mutex);
400 active = control->active;
401 g_mutex_unlock (&control->mutex);
402 control->parts = 1;
403 control->part = 0;
404 set_job_control_progress (control, 0.0);
405 control->data = sample_info;
406
407 debug_print (1, "Receiving dump data...\n");
408
409 tx_msg = g_byte_array_new ();
410 total_words = 0;
411 retries = 0;
412 last_packet_ack = TRUE;
413 err = 0;
414 exp_packet = 0;
415 first = TRUE;
416 rx_packets = 0;
417 while (active && rx_packets <= packets)
418 {
419 if (retries == SDS_MAX_RETRIES)
420 {
421 debug_print (1, "Too many retries\n");
422 break;
423 }
424
425 g_byte_array_set_size (tx_msg, 0);
426 if (last_packet_ack)
427 {
428 g_byte_array_append (tx_msg, SDS_ACK, sizeof (SDS_ACK));
429 }
430 else
431 {
432 g_byte_array_append (tx_msg, SDS_NAK, sizeof (SDS_NAK));
433 }
434 tx_msg->data[4] = packet % 0x80;
435
436 if (rx_packets == packets)
437 {
438 err = sds_tx (backend, tx_msg);
439 goto end;
440 }
441 else
442 {
443 transfer.raw = tx_msg;
444 transfer.timeout = SDS_NO_SPEC_TIMEOUT;
445 err = backend_tx_and_rx_sysex_transfer (backend, &transfer, FALSE);
446 if (err == -ECANCELED)
447 {
448 break;
449 }
450 rx_msg = transfer.raw;
451 }
452
453 if (!rx_msg)
454 {
455 debug_print (2,
456 "Packet not received. Remaining packets: %d; remaining samples: %d\n",
457 packets - rx_packets, words - total_words);
458 //This is a hack to fix a downloading error with an E-Mu ESI-2000 as it never sends the last packet when there is only 1 sample.
459 if ((rx_packets == packets - 1) && (total_words == words - 1))
460 {
461 debug_print (2,
462 "Skipping last packet as it has only one sample...\n");
463 rx_packets++;
464 err = 0;
465 goto end;
466 }
467 err = (rx_packets == packets - 1) ? -EBADMSG : -EINVAL;
468 sds_download_inc_packet (&first, &packet);
469 break;
470 }
471
472 if (rx_msg->len != SDS_DATA_PACKET_LEN)
473 {
474 debug_print (2, "Invalid length. Stopping...\n");
475 free_msg (rx_msg);
476 err = -EBADMSG;
477 break;
478 }
479
480 guint exp_packet_id = exp_packet % 0x80;
481 if (rx_msg->data[4] != exp_packet_id)
482 {
483 debug_print (2, "Invalid packet number. Stopping...\n");
484 free_msg (rx_msg);
485 err = -EINVAL;
486 break;
487 }
488
489 if (last_packet_ack)
490 {
491 sds_download_inc_packet (&first, &packet);
492 }
493
494 if (sds_checksum (rx_msg->data) !=
495 rx_msg->data[SDS_DATA_PACKET_CKSUM_POS])
496 {
497 debug_print (2, "Invalid cksum. Retrying...\n");
498 free_msg (rx_msg);
499 last_packet_ack = FALSE;
500 usleep (sds_data->rest_time);
501 retries++;
502 continue;
503 }
504
505 exp_packet++;
506 rx_packets++;
507
508 last_packet_ack = TRUE;
509 retries = 0;
510
511 read_bytes = 0;
512 dataptr = &rx_msg->data[5];
513 while (read_bytes < SDS_DATA_PACKET_PAYLOAD_LEN && total_words < words)
514 {
515 sample = sds_get_gint16_value_left_just (dataptr,
516 bytes_per_word,
517 sample_info->bitdepth);
518 g_byte_array_append (output, (guint8 *) & sample, sizeof (sample));
519 dataptr += bytes_per_word;
520 read_bytes += bytes_per_word;
521 total_words++;
522 }
523
524 set_job_control_progress (control, rx_packets / (double) packets);
525
526 g_mutex_lock (&control->mutex);
527 active = control->active;
528 g_mutex_unlock (&control->mutex);
529
530 free_msg (rx_msg);
531
532 usleep (sds_data->rest_time);
533 }
534
535 free_msg (tx_msg);
536
537 end:
538 if (active && !err && rx_packets == packets)
539 {
540 debug_print (1, "%d frames received\n", total_words);
541 set_job_control_progress (control, 1.0);
542 }
543 else
544 {
545 debug_print (1, "Cancelling SDS download...\n");
546 usleep (sds_data->rest_time);
547 sds_tx_handshake (backend, SDS_CANCEL, packet % 0x80);
548 }
549
550 return err;
551 }
552
553 static gint
554 sds_download (struct backend *backend, const gchar * path,
555 GByteArray * output, struct job_control *control)
556 {
557 gint err;
558 for (gint i = 0; i < SDS_MAX_RETRIES; i++)
559 {
560 err = sds_download_try (backend, path, output, control);
561 if (err == -EBADMSG)
562 {
563 //We retry the whole download to fix a downloading error with an E-Mu ESI-2000 as it occasionally doesn't send the last packet.
564 debug_print (2, "Bug detected. Retrying download...\n");
565 g_byte_array_set_size (output, 0);
566 }
567 else
568 {
569 break;
570 }
571 }
572 return err;
573 }
574
575 static gint
576 sds_tx_and_wait_ack (struct backend *backend, GByteArray * tx_msg,
577 guint packet, gint timeout, gint timeout2)
578 {
579 gint err;
580 gint t;
581 guint rx_packet;
582 GByteArray *rx_msg;
583 gboolean waiting = FALSE;
584 rx_msg = backend_tx_and_rx_sysex (backend, tx_msg, timeout);
585 if (!rx_msg)
586 {
587 return -ETIMEDOUT; //Nothing was received
588 }
589
590 t = timeout2;
591 while (1)
592 {
593 rx_packet = rx_msg->data[4];
594 rx_msg->data[4] = 0;
595
596 if (!memcmp (rx_msg->data, SDS_WAIT, sizeof (SDS_WAIT)) && !waiting)
597 {
598 debug_print (2, "WAIT received. Waiting for an ACK...\n");
599 t = SDS_NO_SPEC_TIMEOUT;
600 waiting = TRUE;
601 }
602 else if (!memcmp (rx_msg->data, SDS_ACK, sizeof (SDS_ACK)))
603 {
604 err = 0;
605 break;
606 }
607 else if (!memcmp (rx_msg->data, SDS_NAK, sizeof (SDS_NAK)))
608 {
609 err = -EBADMSG;
610 break;
611 }
612 else if (!memcmp (rx_msg->data, SDS_CANCEL, sizeof (SDS_CANCEL)))
613 {
614 err = -ECANCELED;
615 break;
616 }
617 else if (rx_packet != packet)
618 {
619 err = -EINVAL; //Unexpected package number
620 break;
621 }
622 else
623 {
624 err = -EIO; //Message received but unrecognized
625 break;
626 }
627
628 free_msg (rx_msg);
629 rx_msg = sds_rx (backend, t);
630 if (!rx_msg)
631 {
632 return -ENOMSG;
633 }
634 }
635
636 free_msg (rx_msg);
637 return err;
638 }
639
640 static inline GByteArray *
641 sds_get_data_packet_msg (gint packet, guint words, guint * word,
642 gint16 ** frame, guint bits, guint bytes_per_word)
643 {
644 guint8 *data;
645 GByteArray *tx_msg = g_byte_array_sized_new (SDS_DATA_PACKET_LEN);
646 g_byte_array_append (tx_msg, SDS_DATA_PACKET_HEADER,
647 sizeof (SDS_DATA_PACKET_HEADER));
648 g_byte_array_set_size (tx_msg, SDS_DATA_PACKET_LEN);
649 tx_msg->data[4] = packet;
650 memset (&tx_msg->data[sizeof (SDS_DATA_PACKET_HEADER)], 0,
651 SDS_DATA_PACKET_PAYLOAD_LEN);
652 tx_msg->data[SDS_DATA_PACKET_LEN - 1] = 0xf7;
653 data = &tx_msg->data[sizeof (SDS_DATA_PACKET_HEADER)];
654 for (guint i = 0; i < SDS_DATA_PACKET_PAYLOAD_LEN; i += bytes_per_word)
655 {
656 if (*word < words)
657 {
658 sds_set_gint16_value_left_just (data, bytes_per_word, bits,
659 **frame);
660 data += bytes_per_word;
661 (*frame)++;
662 (*word)++;
663 }
664 }
665 tx_msg->data[SDS_DATA_PACKET_CKSUM_POS] = sds_checksum (tx_msg->data);
666 return tx_msg;
667 }
668
669 static inline GByteArray *
670 sds_get_rename_sample_msg (guint id, gchar * name)
671 {
672 GByteArray *tx_msg = g_byte_array_new ();
673 guint name_len = strlen (name);
674 name_len = name_len > 127 ? 127 : name_len;
675 g_byte_array_append (tx_msg, SDS_SAMPLE_NAME_HEADER,
676 sizeof (SDS_SAMPLE_NAME_HEADER));
677 tx_msg->data[5] = id % 0x80;
678 tx_msg->data[6] = id / 0x80;
679 g_byte_array_append (tx_msg, (guint8 *) & name_len, 1);
680 g_byte_array_append (tx_msg, (guint8 *) name, name_len);
681 g_byte_array_append (tx_msg, (guint8 *) "\xf7", 1);
682 return tx_msg;
683 }
684
685 static gint
686 sds_rename (struct backend *backend, const gchar * src, const gchar * dst)
687 {
688 GByteArray *tx_msg, *rx_msg;
689 guint id;
690 gint err;
691 gchar *name, *dstcpy;
692 debug_print (1, "Sending rename request...\n");
693 err = common_slot_get_id_name_from_path (src, &id, NULL);
694 if (err)
695 {
696 return err;
697 }
698
699 g_mutex_lock (&backend->mutex);
700 backend_rx_drain (backend);
701 g_mutex_unlock (&backend->mutex);
702
703 dstcpy = strdup (dst);
704 name = basename (dstcpy);
705 tx_msg = sds_get_rename_sample_msg (id, name);
706 err = -ENOSYS;
707 rx_msg = backend_tx_and_rx_sysex (backend, tx_msg, SDS_NO_SPEC_TIMEOUT);
708 if (rx_msg)
709 {
710 err = 0;
711 free_msg (rx_msg);
712 }
713
714 g_free (dstcpy);
715 return err;
716 }
717
718 static gint
719 sds_upload (struct backend *backend, const gchar * path, GByteArray * input,
720 struct job_control *control, guint bits)
721 {
722 gchar *name;
723 GByteArray *tx_msg;
724 gint16 *frame, *f;
725 gboolean active, open_loop = FALSE;
726 guint word, words, words_per_packet, id, packet = 0, packets, retries =
727 0, w, bytes_per_word;
728 gint err = 0, word_size;
729 struct sds_data *sds_data = backend->data;
730 struct sample_info *sample_info = control->data;
731
732 control->parts = 1;
733 control->part = 0;
734 set_job_control_progress (control, 0.0);
735
736 if (common_slot_get_id_name_from_path (path, &id, &name))
737 {
738 return -EBADSLT;
739 }
740
741 g_mutex_lock (&backend->mutex);
742 backend_rx_drain (backend);
743 g_mutex_unlock (&backend->mutex);
744
745 g_mutex_lock (&control->mutex);
746 active = control->active;
747 g_mutex_unlock (&control->mutex);
748
749 debug_print (1, "Sending dump header...\n");
750
751 words = input->len >> 1; //bytes to words (frames)
752 word_size = (gint) ceil (bits / 8.0);
753 bytes_per_word = (gint) ceil (bits / 7.0);
754 words_per_packet = SDS_DATA_PACKET_PAYLOAD_LEN / bytes_per_word;
755 packets = ceil (words / (double) words_per_packet);
756
757 tx_msg = sds_get_dump_msg (id, words, sample_info, bits);
758 //The first timeout should be SDS_SPEC_TIMEOUT_HANDSHAKE (2 s) buit it is not enough sometimes.
759 err = sds_tx_and_wait_ack (backend, tx_msg, 0, SDS_NO_SPEC_TIMEOUT,
760 SDS_NO_SPEC_TIMEOUT);
761 if (err == -ENOMSG)
762 {
763 debug_print (2, "No packet received after a WAIT. Continuing...\n");
764 }
765 else if (err == -ETIMEDOUT)
766 {
767 //In case of no response, we can assume an open loop.
768 debug_print (1, "Assuming open loop...\n");
769 open_loop = TRUE;
770 }
771 else if (err)
772 {
773 goto cleanup;
774 }
775
776 debug_print (1, "Sending dump data...\n");
777
778 word = 0;
779 sds_debug_print_sample_data (bits, bytes_per_word,
780 word_size, sample_info->samplerate, words,
781 packets);
782 frame = (gint16 *) input->data;
783 while (packet < packets && active)
784 {
785 if (retries == SDS_MAX_RETRIES)
786 {
787 debug_print (1, "Too many retries\n");
788 break;
789 }
790
791 f = frame;
792 w = word;
793 tx_msg = sds_get_data_packet_msg (packet % 0x80, words, &w, &f, bits,
794 bytes_per_word);
795 if (open_loop)
796 {
797 err = sds_tx (backend, tx_msg);
798 usleep (SDS_NO_SPEC_OPEN_LOOP_REST_TIME);
799 }
800 else
801 {
802 //SDS_SPEC_TIMEOUT is too low to be used here.
803 err = sds_tx_and_wait_ack (backend, tx_msg, packet % 0x80,
804 SDS_NO_SPEC_TIMEOUT,
805 SDS_NO_SPEC_TIMEOUT);
806 }
807
808 if (err == -EBADMSG)
809 {
810 debug_print (2, "NAK received. Retrying...\n");
811 retries++;
812 continue;
813 }
814 else if (err == -ENOMSG)
815 {
816 debug_print (2, "No packet received after a WAIT. Continuing...\n");
817 g_mutex_lock (&backend->mutex);
818 backend_rx_drain (backend);
819 g_mutex_unlock (&backend->mutex);
820 }
821 else if (err == -EINVAL)
822 {
823 debug_print (2, "Unexpectd packet number. Continuing...\n");
824 goto end;
825 }
826 else if (err == -ETIMEDOUT)
827 {
828 debug_print (2, "No response. Continuing in open loop...\n");
829 open_loop = TRUE;
830 err = 0;
831 }
832 else if (err == -ECANCELED)
833 {
834 debug_print (2, "Cancelled by device. Stopping...\n");
835 goto end;
836 }
837 else if (err)
838 {
839 error_print ("Unhandled error\n");
840 goto end;
841 }
842
843 set_job_control_progress (control, packet / (gdouble) packets);
844 g_mutex_lock (&control->mutex);
845 active = control->active;
846 g_mutex_unlock (&control->mutex);
847
848 word = w;
849 frame = f;
850 packet++;
851 retries = 0;
852 err = 0;
853
854 usleep (sds_data->rest_time);
855 }
856
857 if (active && sds_data->name_extension)
858 {
859 sds_rename (backend, path, name);
860 }
861
862 end:
863 if (active && packet == packets)
864 {
865 set_job_control_progress (control, 1.0);
866 }
867 else
868 {
869 debug_print (2, "Cancelling SDS upload...\n");
870 sds_tx_handshake (backend, SDS_CANCEL, packet % 0x80);
871 err = -ECANCELED;
872 }
873
874 cleanup:
875 g_free (name);
876 return err;
877 }
878
879 static gint
880 sds_upload_8b (struct backend *backend, const gchar * path,
881 GByteArray * input, struct job_control *control)
882 {
883 return sds_upload (backend, path, input, control, 8);
884 }
885
886 static gint
887 sds_upload_12b (struct backend *backend, const gchar * path,
888 GByteArray * input, struct job_control *control)
889 {
890 return sds_upload (backend, path, input, control, 12);
891 }
892
893 static gint
894 sds_upload_14b (struct backend *backend, const gchar * path,
895 GByteArray * input, struct job_control *control)
896 {
897 return sds_upload (backend, path, input, control, 14);
898 }
899
900 static gint
901 sds_upload_16b (struct backend *backend, const gchar * path,
902 GByteArray * input, struct job_control *control)
903 {
904 return sds_upload (backend, path, input, control, 16);
905 }
906
907 static void
908 sds_free_iterator_data (void *iter_data)
909 {
910 debug_print (2, "No packet received after a WAIT. Continuing...\n");
911 g_free (iter_data);
912 }
913
914 static guint
915 sds_next_dentry (struct item_iterator *iter)
916 {
917 gint next = *((gint *) iter->data);
918 if (next < SDS_SAMPLE_LIMIT)
919 {
920 iter->item.id = next;
921 snprintf (iter->item.name, LABEL_MAX, "%03d", next);
922 iter->item.type = ELEKTROID_FILE;
923 iter->item.size = -1;
924 (*((gint *) iter->data))++;
925 return 0;
926 }
927 else
928 {
929 return -ENOENT;
930 }
931 }
932
933 static gint
934 sds_read_dir (struct backend *backend, struct item_iterator *iter,
935 const gchar * path)
936 {
937 if (strcmp (path, "/"))
938 {
939 return -ENOTDIR;
940 }
941
942 iter->data = g_malloc (sizeof (guint));
943 *((gint *) iter->data) = 0;
944 iter->next = sds_next_dentry;
945 iter->free = sds_free_iterator_data;
946 return 0;
947 }
948
949 gint
950 sds_sample_load (const gchar * path, GByteArray * sample,
951 struct job_control *control)
952 {
953 guint frames;
954 struct sample_params sample_params;
955 sample_params.samplerate = 0; // Any sample rate is valid.
956 sample_params.channels = SDS_SAMPLE_CHANNELS;
957 return sample_load_from_file (path, sample, control, &sample_params,
958 &frames);
959 }
960
961 static void
962 sds_print (struct item_iterator *iter, struct backend *backend)
963 {
964 printf ("%c %s\n", iter->item.type, iter->item.name);
965 }
966
967 enum sds_fs
968 {
969 FS_SAMPLES_SDS_16_B = 0x1,
970 FS_SAMPLES_SDS_14_B = 0x2,
971 FS_SAMPLES_SDS_12_B = 0x4,
972 FS_SAMPLES_SDS_8_B = 0x8
973 };
974
975 static const struct fs_operations FS_SAMPLES_SDS_8B_OPERATIONS = {
976 .fs = FS_SAMPLES_SDS_8_B,
977 .options = FS_OPTION_AUDIO_PLAYER | FS_OPTION_SINGLE_OP |
978 FS_OPTION_SLOT_STORAGE | FS_OPTION_SORT_BY_ID,
979 .name = "mono8",
980 .gui_name = "Mono 8 bits",
981 .gui_icon = BE_FILE_ICON_WAVE,
982 .type_ext = "wav",
983 .max_name_len = SDS_SAMPLE_NAME_MAX_LEN,
984 .readdir = sds_read_dir,
985 .print_item = sds_print,
986 .rename = sds_rename,
987 .download = sds_download,
988 .upload = sds_upload_8b,
989 .get_id = get_item_index,
990 .load = sds_sample_load,
991 .save = sample_save_from_array,
992 .get_ext = backend_get_fs_ext,
993 .get_upload_path = common_slot_get_upload_path,
994 .get_download_path = sds_get_download_path
995 };
996
997 static const struct fs_operations FS_SAMPLES_SDS_12B_OPERATIONS = {
998 .fs = FS_SAMPLES_SDS_12_B,
999 .options = FS_OPTION_AUDIO_PLAYER | FS_OPTION_SINGLE_OP |
1000 FS_OPTION_SLOT_STORAGE | FS_OPTION_SORT_BY_ID,
1001 .name = "mono12",
1002 .gui_name = "Mono 12 bits",
1003 .gui_icon = BE_FILE_ICON_WAVE,
1004 .type_ext = "wav",
1005 .max_name_len = SDS_SAMPLE_NAME_MAX_LEN,
1006 .readdir = sds_read_dir,
1007 .print_item = sds_print,
1008 .rename = sds_rename,
1009 .download = sds_download,
1010 .upload = sds_upload_12b,
1011 .get_id = get_item_index,
1012 .load = sds_sample_load,
1013 .save = sample_save_from_array,
1014 .get_ext = backend_get_fs_ext,
1015 .get_upload_path = common_slot_get_upload_path,
1016 .get_download_path = sds_get_download_path
1017 };
1018
1019 static const struct fs_operations FS_SAMPLES_SDS_14B_OPERATIONS = {
1020 .fs = FS_SAMPLES_SDS_14_B,
1021 .options = FS_OPTION_AUDIO_PLAYER | FS_OPTION_SINGLE_OP |
1022 FS_OPTION_SLOT_STORAGE | FS_OPTION_SORT_BY_ID,
1023 .name = "mono14",
1024 .gui_name = "Mono 14 bits",
1025 .gui_icon = BE_FILE_ICON_WAVE,
1026 .type_ext = "wav",
1027 .max_name_len = SDS_SAMPLE_NAME_MAX_LEN,
1028 .readdir = sds_read_dir,
1029 .print_item = sds_print,
1030 .rename = sds_rename,
1031 .download = sds_download,
1032 .upload = sds_upload_14b,
1033 .get_id = get_item_index,
1034 .load = sds_sample_load,
1035 .save = sample_save_from_array,
1036 .get_ext = backend_get_fs_ext,
1037 .get_upload_path = common_slot_get_upload_path,
1038 .get_download_path = sds_get_download_path
1039 };
1040
1041 static const struct fs_operations FS_SAMPLES_SDS_16B_OPERATIONS = {
1042 .fs = FS_SAMPLES_SDS_16_B,
1043 .options = FS_OPTION_AUDIO_PLAYER | FS_OPTION_SINGLE_OP |
1044 FS_OPTION_SLOT_STORAGE | FS_OPTION_SORT_BY_ID,
1045 .name = "mono16",
1046 .gui_name = "Mono 16 bits",
1047 .gui_icon = BE_FILE_ICON_WAVE,
1048 .type_ext = "wav",
1049 .max_name_len = SDS_SAMPLE_NAME_MAX_LEN,
1050 .readdir = sds_read_dir,
1051 .print_item = sds_print,
1052 .rename = sds_rename,
1053 .download = sds_download,
1054 .upload = sds_upload_16b,
1055 .get_id = get_item_index,
1056 .load = sds_sample_load,
1057 .save = sample_save_from_array,
1058 .get_ext = backend_get_fs_ext,
1059 .get_upload_path = common_slot_get_upload_path,
1060 .get_download_path = sds_get_download_path
1061 };
1062
1063 static const struct fs_operations *FS_SDS_ALL_OPERATIONS[] = {
1064 &FS_SAMPLES_SDS_8B_OPERATIONS, &FS_SAMPLES_SDS_12B_OPERATIONS,
1065 &FS_SAMPLES_SDS_14B_OPERATIONS, &FS_SAMPLES_SDS_16B_OPERATIONS, NULL
1066 };
1067
1068 gint
1069 sds_handshake (struct backend *backend)
1070 {
1071 gint err;
1072 GByteArray *tx_msg, *rx_msg;
1073 struct sds_data *sds_data = g_malloc (sizeof (struct sds_data));
1074
1075 //Elektron devices support SDS so we need to be sure it is not.
1076 rx_msg = elektron_ping (backend);
1077 if (rx_msg)
1078 {
1079 free_msg (rx_msg);
1080 g_free (backend->data); //This is filled up by elektron_ping.
1081 return -ENODEV;
1082 }
1083
1084 g_mutex_lock (&backend->mutex);
1085 backend_rx_drain (backend);
1086 g_mutex_unlock (&backend->mutex);
1087
1088 //We send a dump header for a number higher than every device might allow. Hopefully, this will fail on every device.
1089 //Numbers higher than 1500 make an E-Mu ESI-2000 crash when entering into the 'MIDI SAMPLE DUMP' menu but the actual limit is unknown.
1090 tx_msg = sds_get_dump_msg (1000, 0, NULL, 16);
1091 //In case we receive an ACK, NAK or CANCEL, there is a MIDI SDS device listening.
1092 err = sds_tx_and_wait_ack (backend, tx_msg, 0, SDS_SPEC_TIMEOUT_HANDSHAKE,
1093 SDS_NO_SPEC_TIMEOUT_TRY);
1094
1095 if (err && err != -EBADMSG && err != -ECANCELED)
1096 {
1097 return -ENODEV;
1098 }
1099
1100 //We cancel the upload.
1101 usleep (SDS_REST_TIME_DEFAULT);
1102 sds_tx_handshake (backend, SDS_CANCEL, 0);
1103 usleep (SDS_REST_TIME_DEFAULT);
1104
1105 tx_msg = g_byte_array_new ();
1106 g_byte_array_append (tx_msg, SDS_SAMPLE_NAME_REQUEST,
1107 sizeof (SDS_SAMPLE_NAME_REQUEST));
1108 tx_msg->data[5] = 1;
1109 tx_msg->data[6] = 0;
1110 rx_msg = backend_tx_and_rx_sysex (backend, tx_msg, SDS_NO_SPEC_TIMEOUT_TRY);
1111 if (rx_msg)
1112 {
1113 sds_data->name_extension = TRUE;
1114 free_msg (rx_msg);
1115 }
1116 else
1117 {
1118 sds_data->name_extension = FALSE;
1119 }
1120 debug_print (1, "Name extension: %s\n",
1121 sds_data->name_extension ? "yes" : "no");
1122
1123 //The remaining code is meant to set up different devices. These are the default values.
1124
1125 sds_data->rest_time = SDS_REST_TIME_DEFAULT;
1126
1127 backend->device_desc.filesystems =
1128 FS_SAMPLES_SDS_8_B | FS_SAMPLES_SDS_12_B | FS_SAMPLES_SDS_14_B |
1129 FS_SAMPLES_SDS_16_B;
1130 backend->fs_ops = FS_SDS_ALL_OPERATIONS;
1131 backend->destroy_data = backend_destroy_data;
1132 backend->data = sds_data;
1133
1134 if (strlen (backend->device_name))
1135 {
1136 gchar *device_name = strdup (backend->device_name);
1137 snprintf (backend->device_name, LABEL_MAX, "%s %s", _("SDS sampler"),
1138 device_name);
1139 g_free (device_name);
1140 }
1141 else
1142 {
1143 snprintf (backend->device_name, LABEL_MAX, "%s", _("SDS sampler"));
1144 }
1145
1146 return 0;
1147 }
0 /*
1 * sds.h
2 * Copyright (C) 2022 David García Goñi <dagargo@gmail.com>
3 *
4 * This file is part of Elektroid.
5 *
6 * Elektroid is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * Elektroid is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with Elektroid. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #ifndef SDS_H
21 #define SDS_H
22
23 #include "backend.h"
24
25 gint sds_handshake (struct backend *);
26
27 #endif
2626 #include <stdint.h>
2727 #include <inttypes.h>
2828 #include <stddef.h>
29 #include "backend.h"
2930 #include "connector.h"
3031 #include "utils.h"
3132
3233 #define GET_FS_OPS_OFFSET(member) offsetof(struct fs_operations, member)
33 #define GET_FS_OPS_FUNC(type,fs,offset) (*(((type *) (((gchar *) connector_get_fs_operations(fs)) + offset))))
34 #define GET_FS_OPS_FUNC(type,fs,offset) (*(((type *) (((gchar *) fs) + offset))))
3435 #define CHECK_FS_OPS_FUNC(f) if (!(f)) {error_print ("Operation not implemented\n"); return EXIT_FAILURE;}
3536
36 static struct connector connector;
37 static struct backend backend;
3738 static struct job_control control;
38 static const char *devices_filename;
39
40 typedef void (*print_item) (struct item_iterator *);
41
42 static const gchar *CLI_FSS[] = {
43 "sample", "raw", "preset", "data", "project", "sound"
44 };
45
46 static void
47 print_smplrw (struct item_iterator *iter)
48 {
49 gchar *hsize = get_human_size (iter->item.size, FALSE);
50 struct connector_iterator_data *data = iter->data;
51
52 printf ("%c %10s %08x %s\n", iter->item.type,
53 hsize, data->hash, iter->item.name);
54 g_free (hsize);
55 }
56
57 static void
58 print_data (struct item_iterator *iter)
59 {
60 gchar *hsize = get_human_size (iter->item.size, FALSE);
61 struct connector_iterator_data *data = iter->data;
62
63 printf ("%c %3d %04x %d %d %10s %s\n", iter->item.type,
64 iter->item.index, data->operations, data->has_valid_data,
65 data->has_metadata, hsize, iter->item.name);
66 g_free (hsize);
67 }
68
69 static void
70 null_control_callback (gdouble foo)
71 {
72 }
39 static gchar *connector, *fs, *op;
40 const struct fs_operations *fs_ops;
7341
7442 static const gchar *
7543 cli_get_path (gchar * device_path)
7644 {
7745 gint len = strlen (device_path);
78 char *path = device_path;
46 gchar *path = device_path;
7947 gint i = 0;
8048
8149 while (path[0] != '/' && i < len)
9159 cli_ld ()
9260 {
9361 gint i;
94 struct connector_system_device device;
95 GArray *devices = connector_get_system_devices ();
62 struct backend_system_device device;
63 GArray *devices = backend_get_system_devices ();
9664
9765 for (i = 0; i < devices->len; i++)
9866 {
99 device = g_array_index (devices, struct connector_system_device, i);
100 printf ("%d %s\n", device.card, device.name);
67 device = g_array_index (devices, struct backend_system_device, i);
68 printf ("%d: %s %s\n", i, device.id, device.name);
10169 }
10270
10371 g_array_free (devices, TRUE);
10674 }
10775
10876 static gint
109 cli_connect (const char *device_path, enum connector_fs fs)
110 {
111 gint card = atoi (device_path);
112 gint ret = connector_init (&connector, card, devices_filename);
113 if (!ret && fs && !(connector.device_desc.filesystems & fs))
114 {
115 error_print ("Filesystem not supported for device '%s'\n",
116 connector.device_desc.name);
117 return 1;
118 }
119 return ret;
120 }
121
122 static int
123 cli_list (int argc, char *argv[], int optind, enum connector_fs fs,
124 print_item print)
77 cli_connect (const gchar * device_path)
78 {
79 gint err, id = (gint) atoi (device_path);
80 struct backend_system_device device;
81 GArray *devices = backend_get_system_devices ();
82
83 if (!devices->len)
84 {
85 error_print ("Invalid device %d\n", id);
86 return -ENODEV;
87 }
88
89 device = g_array_index (devices, struct backend_system_device, id);
90 err = connector_init (&backend, device.id, connector, NULL);
91 g_array_free (devices, TRUE);
92
93 if (!err && fs)
94 {
95 fs_ops = backend_get_fs_operations (&backend, 0, fs);
96 if (!fs_ops)
97 {
98 error_print ("Invalid filesystem '%s'\n", fs);
99 return -EINVAL;
100 }
101 }
102
103 return err;
104 }
105
106 static int
107 cli_list (int argc, gchar * argv[], int *optind)
125108 {
126109 const gchar *path;
127110 struct item_iterator iter;
128111 gchar *device_path;
129 const struct fs_operations *fs_ops = connector_get_fs_operations (fs);
130
131 if (optind == argc)
112
113 if (*optind == argc)
132114 {
133115 error_print ("Remote path missing\n");
134116 return EXIT_FAILURE;
135117 }
136118 else
137119 {
138 device_path = argv[optind];
139 }
140
141 if (cli_connect (device_path, fs))
120 device_path = argv[*optind];
121 (*optind)++;
122 }
123
124 if (cli_connect (device_path))
142125 {
143126 return EXIT_FAILURE;
144127 }
145128
146129 path = cli_get_path (device_path);
147130
148 if (fs_ops->readdir (&iter, path, &connector))
131 CHECK_FS_OPS_FUNC (fs_ops->readdir);
132 if (fs_ops->readdir (&backend, &iter, path))
149133 {
150134 return EXIT_FAILURE;
151135 }
152136
153137 while (!next_item_iterator (&iter))
154138 {
155 print (&iter);
139 fs_ops->print_item (&iter, &backend);
156140 }
157141
158142 free_item_iterator (&iter);
161145 }
162146
163147 static int
164 cli_command_path (int argc, char *argv[], int optind, enum connector_fs fs,
148 cli_command_path (int argc, gchar * argv[], int *optind,
165149 ssize_t member_offset)
166150 {
167151 const gchar *path;
169153 gint ret;
170154 fs_path_func f;
171155
172 if (optind == argc)
156 if (*optind == argc)
173157 {
174158 error_print ("Remote path missing\n");
175159 return EXIT_FAILURE;
176160 }
177161 else
178162 {
179 device_path = argv[optind];
180 }
181
182 if (cli_connect (device_path, fs))
163 device_path = argv[*optind];
164 (*optind)++;
165 }
166
167 if (cli_connect (device_path))
183168 {
184169 return EXIT_FAILURE;
185170 }
186171
187172 path = cli_get_path (device_path);
188173
189 f = GET_FS_OPS_FUNC (fs_path_func, fs, member_offset);
174 f = GET_FS_OPS_FUNC (fs_path_func, fs_ops, member_offset);
190175 CHECK_FS_OPS_FUNC (f);
191 ret = f (path, &connector);
176 ret = f (&backend, path);
192177 return ret ? EXIT_FAILURE : EXIT_SUCCESS;
193178 }
194179
195180 static int
196 cli_command_src_dst (int argc, char *argv[], int optind, enum connector_fs fs,
181 cli_command_src_dst (int argc, gchar * argv[], int *optind,
197182 ssize_t member_offset)
198183 {
199184 const gchar *src_path, *dst_path;
203188 int ret;
204189 fs_src_dst_func f;
205190
206 if (optind == argc)
191 if (*optind == argc)
207192 {
208193 error_print ("Remote path source missing\n");
209194 return EXIT_FAILURE;
210195 }
211196 else
212197 {
213 device_src_path = argv[optind];
214 optind++;
215 }
216
217 if (optind == argc)
198 device_src_path = argv[*optind];
199 (*optind)++;
200 }
201
202 if (*optind == argc)
218203 {
219204 error_print ("Remote path destination missing\n");
220205 return EXIT_FAILURE;
221206 }
222207 else
223208 {
224 device_dst_path = argv[optind];
209 device_dst_path = argv[*optind];
210 (*optind)++;
225211 }
226212
227213 src_card = atoi (device_src_path);
232218 return EXIT_FAILURE;
233219 }
234220
235 if (cli_connect (device_src_path, 0))
236 {
237 return EXIT_FAILURE;
238 }
239
240 f = GET_FS_OPS_FUNC (fs_src_dst_func, fs, member_offset);
221 if (cli_connect (device_src_path))
222 {
223 return EXIT_FAILURE;
224 }
225
226 f = GET_FS_OPS_FUNC (fs_src_dst_func, fs_ops, member_offset);
241227 CHECK_FS_OPS_FUNC (f);
242228 src_path = cli_get_path (device_src_path);
243229 dst_path = cli_get_path (device_dst_path);
244 ret = f (src_path, dst_path, &connector);
230 ret = f (&backend, src_path, dst_path);
245231 return ret ? EXIT_FAILURE : EXIT_SUCCESS;
246232 }
247233
248234 static int
249 cli_info (int argc, char *argv[], int optind)
235 cli_command_mv_rename (int argc, gchar * argv[], int *optind)
236 {
237 const gchar *src_path, *dst_path;
238 gchar *device_src_path, *device_dst_path;
239 gint src_card;
240 gint dst_card;
241 int ret;
242 fs_src_dst_func f;
243
244 if (*optind == argc)
245 {
246 error_print ("Remote path source missing\n");
247 return EXIT_FAILURE;
248 }
249 else
250 {
251 device_src_path = argv[*optind];
252 (*optind)++;
253 }
254
255 if (*optind == argc)
256 {
257 error_print ("Remote path destination missing\n");
258 return EXIT_FAILURE;
259 }
260 else
261 {
262 device_dst_path = argv[*optind];
263 (*optind)++;
264 }
265
266 if (cli_connect (device_src_path))
267 {
268 return EXIT_FAILURE;
269 }
270
271 src_card = atoi (device_src_path);
272 src_path = cli_get_path (device_src_path);
273
274 // If move is implemented, rename must behave the same way.
275 f = fs_ops->move;
276 if (f)
277 {
278 dst_card = atoi (device_dst_path);
279 if (src_card != dst_card)
280 {
281 error_print ("Source and destination device must be the same\n");
282 return EXIT_FAILURE;
283 }
284 dst_path = cli_get_path (device_dst_path);
285 }
286 else
287 {
288 f = fs_ops->rename;
289 dst_path = device_dst_path;
290 }
291
292 CHECK_FS_OPS_FUNC (f);
293 ret = f (&backend, src_path, dst_path);
294 return ret ? EXIT_FAILURE : EXIT_SUCCESS;
295 }
296
297 static int
298 cli_info (int argc, gchar * argv[], int *optind)
250299 {
251300 gchar *device_path;
252 gchar *comma;
253
254 if (optind == argc)
301 const gchar *name;
302
303 if (*optind == argc)
255304 {
256305 error_print ("Device missing\n");
257306 return EXIT_FAILURE;
258307 }
259308 else
260309 {
261 device_path = argv[optind];
262 }
263
264 if (cli_connect (device_path, 0))
265 {
266 return EXIT_FAILURE;
267 }
268
269 printf ("%s filesystems=", connector.device_name);
270 comma = "";
271 for (int fs = FS_SAMPLES, i = 0; fs <= FS_DATA_SND; fs <<= 1, i++)
272 {
273 if (connector.device_desc.filesystems & fs)
274 {
275 printf ("%s%s", comma, CLI_FSS[i]);
276 }
277 comma = ",";
310 device_path = argv[*optind];
311 (*optind)++;
312 }
313
314 if (cli_connect (device_path))
315 {
316 return EXIT_FAILURE;
317 }
318
319 printf ("%s; filesystems=", backend.device_name);
320
321 for (gint fs = 1; fs <= MAX_BACKEND_FSS; fs <<= 1)
322 {
323 if (backend.device_desc.filesystems & fs)
324 {
325 name = backend_get_fs_operations (&backend, fs, NULL)->name;
326 printf ("%s%s", fs == 1 ? "" : ",", name);
327 }
278328 }
279329 printf ("\n");
280330
282332 }
283333
284334 static int
285 cli_df (int argc, char *argv[], int optind)
335 cli_df (int argc, gchar * argv[], int *optind)
286336 {
287337 gchar *device_path;
288338 gchar *size;
289339 gchar *diff;
290340 gchar *free;
291 gint res;
292 struct connector_storage_stats statfs;
293 enum connector_storage storage;
294
295 if (optind == argc)
341 gint res, storage;
342 struct backend_storage_stats statfs;
343
344 if (*optind == argc)
296345 {
297346 error_print ("Device missing\n");
298347 return EXIT_FAILURE;
299348 }
300349 else
301350 {
302 device_path = argv[optind];
303 }
304
305 if (cli_connect (device_path, 0))
306 {
307 return EXIT_FAILURE;
308 }
309
310 if (!connector.device_desc.storage)
351 device_path = argv[*optind];
352 (*optind)++;
353 }
354
355 if (cli_connect (device_path))
356 {
357 return EXIT_FAILURE;
358 }
359
360 if (!backend.device_desc.storage || !backend.get_storage_stats)
311361 {
312362 return EXIT_FAILURE;
313363 }
316366 "Used", "Available", "Use%");
317367
318368 res = 0;
319 for (storage = STORAGE_PLUS_DRIVE; storage <= STORAGE_RAM; storage <<= 1)
320 {
321 if (connector.device_desc.storage & storage)
322 {
323 res |= connector_get_storage_stats (&connector, storage, &statfs);
369 for (storage = 1; storage < MAX_BACKEND_STORAGE; storage <<= 1)
370 {
371 if (backend.device_desc.storage & storage)
372 {
373 res |= backend.get_storage_stats (&backend, storage, &statfs);
324374 if (res)
325375 {
326376 continue;
330380 free = get_human_size (statfs.bfree, FALSE);
331381 printf ("%-10.10s%16s%16s%16s%10.2f%%\n",
332382 statfs.name, size, diff, free,
333 connector_get_storage_stats_percent (&statfs));
383 backend_get_storage_stats_percent (&statfs));
334384 g_free (size);
335385 g_free (diff);
336386 g_free (free);
341391 }
342392
343393 static int
344 cli_upgrade (int argc, char *argv[], int optind)
394 cli_upgrade_os (int argc, gchar * argv[], int *optind)
345395 {
346396 gint res;
347397 const gchar *src_path;
348398 const gchar *device_path;
349 struct connector_sysex_transfer sysex_transfer;
350
351 if (optind == argc)
399 struct sysex_transfer sysex_transfer;
400
401 if (*optind == argc)
352402 {
353403 error_print ("Local path missing\n");
354404 return EXIT_FAILURE;
355405 }
356406 else
357407 {
358 src_path = argv[optind];
359 optind++;
360 }
361
362 if (optind == argc)
408 src_path = argv[*optind];
409 (*optind)++;
410 }
411
412 if (*optind == argc)
363413 {
364414 error_print ("Remote path missing\n");
365415 return EXIT_FAILURE;
366416 }
367417 else
368418 {
369 device_path = argv[optind];
370 }
371
372 if (cli_connect (device_path, 0))
419 device_path = argv[*optind];
420 (*optind)++;
421 }
422
423 if (cli_connect (device_path))
373424 {
374425 return EXIT_FAILURE;
375426 }
383434 else
384435 {
385436 sysex_transfer.active = TRUE;
386 sysex_transfer.timeout = SYSEX_TIMEOUT;
387 res = connector_upgrade_os (&connector, &sysex_transfer);
437 sysex_transfer.timeout = BE_SYSEX_TIMEOUT_MS;
438 CHECK_FS_OPS_FUNC (backend.upgrade_os);
439 res = backend.upgrade_os (&backend, &sysex_transfer);
388440 }
389441
390442 g_byte_array_free (sysex_transfer.raw, TRUE);
392444 }
393445
394446 static int
395 cli_download (int argc, char *argv[], int optind, enum connector_fs fs)
396 {
397 const gchar *src_path;
447 cli_download (int argc, gchar * argv[], int *optind)
448 {
449 const gchar *src_path, *src_dir;
450 gchar *src_dirc;
451 struct item_iterator iter;
398452 gchar *device_src_path, *download_path;
399453 gint res;
400454 GByteArray *array;
401 const struct fs_operations *fs_ops;
402
403 if (optind == argc)
455
456 if (*optind == argc)
404457 {
405458 error_print ("Remote path missing\n");
406459 return EXIT_FAILURE;
407460 }
408461 else
409462 {
410 device_src_path = argv[optind];
411 }
412
413 if (cli_connect (device_src_path, fs))
414 {
415 return EXIT_FAILURE;
416 }
417
418 fs_ops = connector_get_fs_operations (fs);
463 device_src_path = argv[*optind];
464 (*optind)++;
465 }
466
467 if (cli_connect (device_src_path))
468 {
469 return EXIT_FAILURE;
470 }
471
419472 src_path = cli_get_path (device_src_path);
420473
421474 control.active = TRUE;
422 control.callback = null_control_callback;
423475 array = g_byte_array_new ();
424 res = fs_ops->download (src_path, array, &control, &connector);
476 res = fs_ops->download (&backend, src_path, array, &control);
425477 if (res)
426478 {
427479 goto end;
428480 }
429481
430 download_path = connector_get_download_path (&connector, NULL, fs_ops, ".",
431 src_path);
482 src_dirc = strdup (src_path);
483 src_dir = dirname (src_dirc);
484 res = fs_ops->readdir (&backend, &iter, src_dir);
485 g_free (src_dirc);
486 if (res)
487 {
488 goto end;
489 }
490
491 download_path = fs_ops->get_download_path (&backend, &iter, fs_ops, ".",
492 src_path);
432493 if (!download_path)
433494 {
434495 res = -1;
445506 }
446507
447508 static int
448 cli_upload (int argc, char *argv[], int optind, enum connector_fs fs)
509 cli_upload (int argc, gchar * argv[], int *optind)
449510 {
450511 const gchar *dst_dir;
451512 gchar *src_path, *device_dst_path, *upload_path;
452513 gint res;
453514 GByteArray *array;
454515 gint32 index = 1;
455 const struct fs_operations *fs_ops;
456
457 if (optind == argc)
516
517 if (*optind == argc)
458518 {
459519 error_print ("Local path missing\n");
460520 return EXIT_FAILURE;
461521 }
462522 else
463523 {
464 src_path = argv[optind];
465 optind++;
466 }
467
468 if (optind == argc)
524 src_path = argv[*optind];
525 (*optind)++;
526 }
527
528 if (*optind == argc)
469529 {
470530 error_print ("Remote path missing\n");
471531 return EXIT_FAILURE;
472532 }
473533 else
474534 {
475 device_dst_path = argv[optind];
476 }
477
478 if (cli_connect (device_dst_path, fs))
479 {
480 return EXIT_FAILURE;
481 }
482
483 fs_ops = connector_get_fs_operations (fs);
535 device_dst_path = argv[*optind];
536 (*optind)++;
537 }
538
539 if (cli_connect (device_dst_path))
540 {
541 return EXIT_FAILURE;
542 }
543
484544 dst_dir = cli_get_path (device_dst_path);
485545
486 upload_path = connector_get_upload_path (&connector, NULL, fs_ops,
487 dst_dir, src_path, &index);
546 upload_path = fs_ops->get_upload_path (&backend, NULL, fs_ops, dst_dir,
547 src_path, &index);
488548
489549 array = g_byte_array_new ();
490550 control.active = TRUE;
491 control.callback = null_control_callback;
492551 res = fs_ops->load (src_path, array, &control);
493552 if (res)
494553 {
495554 goto cleanup;
496555 }
497556
498 res = fs_ops->upload (upload_path, array, &control, &connector);
557 res = fs_ops->upload (&backend, upload_path, array, &control);
499558 g_free (control.data);
500559
501560 cleanup:
504563 return res ? EXIT_FAILURE : EXIT_SUCCESS;
505564 }
506565
507 static gint
508 get_fs_operations_from_type (const gchar * type)
509 {
510 if (!strlen (type))
511 {
512 return 0;
513 }
514
515 for (gint fs = FS_SAMPLES, i = 0; fs <= FS_DATA_SND; fs <<= 1, i++)
516 {
517 if (strcmp (type, CLI_FSS[i]) == 0)
518 {
519 return fs;
520 }
521 }
522
523 return -1;
524 }
525
526 static gint
527 get_op_type_from_command (const gchar * cmd, char *op, char *type)
528 {
529 gint i;
530 gchar *c;
531 gint len;
532
533 strncpy (op, cmd, LABEL_MAX);
534 op[LABEL_MAX - 1] = 0;
535 len = strlen (op);
536 c = op;
537 for (i = 0; i < LABEL_MAX && i < strlen (op); i++, c++)
538 {
539 if (*c == '-')
540 {
541 *c = 0;
542 break;
543 }
544 }
545 if (i < len - 1)
546 {
547 c++;
548 strncpy (type, c, LABEL_MAX);
549 type[LABEL_MAX - 1] = 0;
550 }
551 else
552 {
553 *type = 0;
554 }
555
556 return get_fs_operations_from_type (type);
566 static int
567 cli_send (int argc, gchar * argv[], int *optind)
568 {
569 gint err;
570 const gchar *device_dst_path, *src_file;
571 struct sysex_transfer sysex_transfer;
572
573 if (*optind == argc)
574 {
575 error_print ("Source file missing\n");
576 return EXIT_FAILURE;
577 }
578 else
579 {
580 src_file = argv[*optind];
581 (*optind)++;
582 }
583
584 if (*optind == argc)
585 {
586 error_print ("Remote device missing\n");
587 return EXIT_FAILURE;
588 }
589 else
590 {
591 device_dst_path = argv[*optind];
592 (*optind)++;
593 }
594
595 connector = "default";
596 if (cli_connect (device_dst_path))
597 {
598 return EXIT_FAILURE;
599 }
600
601 sysex_transfer.active = TRUE;
602 sysex_transfer.timeout = BE_DUMP_TIMEOUT;
603 sysex_transfer.raw = g_byte_array_new ();
604
605 err = load_file (src_file, sysex_transfer.raw, NULL);
606
607 if (!err)
608 {
609 err = backend_tx_sysex (&backend, &sysex_transfer);
610 }
611
612 free_msg (sysex_transfer.raw);
613
614 return err;
615 }
616
617 static int
618 cli_receive (int argc, gchar * argv[], int *optind)
619 {
620 gint err;
621 const gchar *device_src_path, *dst_file;
622 struct sysex_transfer sysex_transfer;
623
624 if (*optind == argc)
625 {
626 error_print ("Remote device missing\n");
627 return EXIT_FAILURE;
628 }
629 else
630 {
631 device_src_path = argv[*optind];
632 (*optind)++;
633 }
634
635 if (*optind == argc)
636 {
637 error_print ("Destination file missing\n");
638 return EXIT_FAILURE;
639 }
640 else
641 {
642 dst_file = argv[*optind];
643 (*optind)++;
644 }
645
646 connector = "default";
647 if (cli_connect (device_src_path))
648 {
649 return EXIT_FAILURE;
650 }
651
652 sysex_transfer.timeout = BE_DUMP_TIMEOUT;
653 sysex_transfer.batch = TRUE;
654
655 backend_rx_drain (&backend);
656 //This doesn't need to be synchronized because the CLI is not multithreaded.
657 err = backend_rx_sysex (&backend, &sysex_transfer);
658 if (!err)
659 {
660 err = save_file (dst_file, sysex_transfer.raw, NULL);
661 }
662
663 free_msg (sysex_transfer.raw);
664
665 return err;
666 }
667
668 gint
669 set_conn_fs_op_from_command (const gchar * cmd)
670 {
671 gchar *aux;
672
673 connector = strdup (cmd);
674 aux = strchr (connector, '-');
675 if (!aux)
676 {
677 g_free (connector);
678 return -1;
679 }
680 *aux = 0;
681 aux++;
682
683 fs = strdup (aux);
684 aux = strchr (fs, '-');
685 if (!aux)
686 {
687 g_free (connector);
688 g_free (fs);
689 return -1;
690 }
691
692 *aux = 0;
693 aux++;
694
695 op = strdup (aux);
696
697 return 0;
557698 }
558699
559700 static void
560701 cli_end (int sig)
561702 {
703 g_mutex_lock (&control.mutex);
562704 control.active = FALSE;
705 g_mutex_unlock (&control.mutex);
563706 }
564707
565708 int
566 main (int argc, char *argv[])
709 main (int argc, gchar * argv[])
567710 {
568711 gint c;
569712 gint res;
570713 gchar *command;
571714 gint vflg = 0, errflg = 0;
572 struct sigaction action, old_action;
573 gint fs;
574 char op[LABEL_MAX];
575 char type[LABEL_MAX];
715 struct sigaction action;
576716
577717 action.sa_handler = cli_end;
578718 sigemptyset (&action.sa_mask);
579719 action.sa_flags = 0;
580
581 sigaction (SIGTERM, NULL, &old_action);
582 if (old_action.sa_handler != SIG_IGN)
583 {
584 sigaction (SIGTERM, &action, NULL);
585 }
586
587 sigaction (SIGQUIT, NULL, &old_action);
588 if (old_action.sa_handler != SIG_IGN)
589 {
590 sigaction (SIGQUIT, &action, NULL);
591 }
592
593 sigaction (SIGINT, NULL, &old_action);
594 if (old_action.sa_handler != SIG_IGN)
595 {
596 sigaction (SIGINT, &action, NULL);
597 }
598
599 sigaction (SIGHUP, NULL, &old_action);
600 if (old_action.sa_handler != SIG_IGN)
601 {
602 sigaction (SIGHUP, &action, NULL);
603 }
604
605 devices_filename = NULL;
606
607 while ((c = getopt (argc, argv, "f:v")) != -1)
720 sigaction (SIGTERM, &action, NULL);
721 sigaction (SIGQUIT, &action, NULL);
722 sigaction (SIGINT, &action, NULL);
723 sigaction (SIGHUP, &action, NULL);
724
725 while ((c = getopt (argc, argv, "v")) != -1)
608726 {
609727 switch (c)
610728 {
611 case 'f':
612 devices_filename = optarg;
613 break;
614729 case 'v':
615730 vflg++;
616731 break;
637752 if (errflg > 0)
638753 {
639754 fprintf (stderr, "%s\n", PACKAGE_STRING);
640 char *exec_name = basename (argv[0]);
755 gchar *exec_name = basename (argv[0]);
641756 fprintf (stderr, "Usage: %s [options] command\n", exec_name);
642757 exit (EXIT_FAILURE);
643758 }
644759
645 fs = get_op_type_from_command (command, op, type);
646 debug_print (1, "Operation: '%s'; filesystem: '%s' (%d)\n", op, type, fs);
647 if (fs < 0)
648 {
649 error_print ("Filesystem '%s' not recognized\n", type);
650 res = EXIT_FAILURE;
651 goto end;
652 }
653
654 if (!fs)
655 {
656 if (strcmp (command, "ld") == 0
657 || strcmp (command, "list-devices") == 0)
658 {
659 res = cli_ld ();
660 }
661 else if (strcmp (op, "info") == 0
662 || strcmp (command, "info-devices") == 0)
663 {
664 res = cli_info (argc, argv, optind);
665 }
666 else if (strcmp (command, "df") == 0
667 || strcmp (command, "info-storage") == 0)
668 {
669 res = cli_df (argc, argv, optind);
670 }
671 else if (strcmp (command, "upgrade") == 0)
672 {
673 res = cli_upgrade (argc, argv, optind);
674 }
675 else if (strcmp (command, "ls") == 0)
676 {
677 res = cli_list (argc, argv, optind, FS_SAMPLES, print_smplrw);
678 }
679 else if (strcmp (command, "mkdir") == 0)
680 {
681 res =
682 cli_command_path (argc, argv, optind, FS_SAMPLES,
683 GET_FS_OPS_OFFSET (mkdir));
684 }
685 else if (strcmp (command, "mv") == 0)
686 {
687 res =
688 cli_command_src_dst (argc, argv, optind, FS_SAMPLES,
689 GET_FS_OPS_OFFSET (move));
690 }
691 else if (strcmp (command, "rm") == 0 || strcmp (command, "rmdir") == 0)
692 {
693 res =
694 cli_command_path (argc, argv, optind, FS_SAMPLES,
695 GET_FS_OPS_OFFSET (delete));
696 }
697 else if (strcmp (command, "download") == 0
698 || strcmp (command, "dl") == 0)
699 {
700 res = cli_download (argc, argv, optind, FS_SAMPLES);
701 }
702 else if (strcmp (command, "upload") == 0 || strcmp (command, "ul") == 0)
703 {
704 res = cli_upload (argc, argv, optind, FS_SAMPLES);
760 if (!strcmp (command, "ld") || !strcmp (command, "list-devices"))
761 {
762 res = cli_ld ();
763 }
764 else if (!strcmp (command, "info") || !strcmp (command, "info-device"))
765 {
766 res = cli_info (argc, argv, &optind);
767 }
768 else if (!strcmp (command, "df") || !strcmp (command, "info-storage"))
769 {
770 res = cli_df (argc, argv, &optind);
771 }
772 else if (!strcmp (command, "send"))
773 {
774 res = cli_send (argc, argv, &optind);
775 }
776 else if (!strcmp (command, "receive"))
777 {
778 res = cli_receive (argc, argv, &optind);
779 }
780 else if (!strcmp (command, "upgrade"))
781 {
782 res = cli_upgrade_os (argc, argv, &optind);
783 }
784 else
785 {
786 if (set_conn_fs_op_from_command (command))
787 {
788 exit (EXIT_FAILURE);
789 }
790
791 debug_print (1,
792 "Connector: \"%s\"; filesystem: \"%s\"; operation: \"%s\"\n",
793 connector, fs, op);
794
795 if (!strcmp (op, "ls") || !strcmp (op, "list"))
796 {
797 res = cli_list (argc, argv, &optind);
798 }
799 else if (!strcmp (op, "mkdir"))
800 {
801 res = cli_command_path (argc, argv, &optind,
802 GET_FS_OPS_OFFSET (mkdir));
803 }
804 else if (!strcmp (op, "rm") || !strcmp (op, "rmdir"))
805 {
806 res = cli_command_path (argc, argv, &optind,
807 GET_FS_OPS_OFFSET (delete));
808 }
809 else if (!strcmp (op, "download") || !strcmp (op, "dl"))
810 {
811 res = cli_download (argc, argv, &optind);
812 }
813 else if (!strcmp (op, "upload") || !strcmp (op, "ul"))
814 {
815 res = cli_upload (argc, argv, &optind);
816 }
817 else if (!strcmp (op, "cl"))
818 {
819 res = cli_command_path (argc, argv, &optind,
820 GET_FS_OPS_OFFSET (clear));
821 }
822 else if (!strcmp (op, "cp"))
823 {
824 res = cli_command_src_dst (argc, argv, &optind,
825 GET_FS_OPS_OFFSET (copy));
826 }
827 else if (!strcmp (op, "sw"))
828 {
829 res = cli_command_src_dst (argc, argv, &optind,
830 GET_FS_OPS_OFFSET (swap));
831 }
832 else if (!strcmp (op, "mv"))
833 {
834 res = cli_command_mv_rename (argc, argv, &optind);
705835 }
706836 else
707837 {
708838 error_print ("Command '%s' not recognized\n", command);
709839 res = EXIT_FAILURE;
710840 }
711 goto end;
712 }
713
714 if (strcmp (op, "ls") == 0 || strcmp (op, "list") == 0)
715 {
716 print_item print = (fs == FS_SAMPLES || fs == FS_RAW_ALL
717 || fs ==
718 FS_RAW_PRESETS) ? print_smplrw : print_data;
719 res = cli_list (argc, argv, optind, fs, print);
720 }
721 else if (strcmp (op, "mkdir") == 0)
722 {
723 res =
724 cli_command_path (argc, argv, optind, fs, GET_FS_OPS_OFFSET (mkdir));
725 }
726 else if (strcmp (op, "rm") == 0 || strcmp (op, "rmdir") == 0)
727 {
728 res =
729 cli_command_path (argc, argv, optind, fs, GET_FS_OPS_OFFSET (delete));
730 }
731 else if (strcmp (op, "download") == 0 || strcmp (op, "dl") == 0)
732 {
733 res = cli_download (argc, argv, optind, fs);
734 }
735 else if (strcmp (op, "upload") == 0 || strcmp (op, "ul") == 0)
736 {
737 res = cli_upload (argc, argv, optind, fs);
738 }
739 else if (strcmp (op, "cl") == 0)
740 {
741 res = cli_command_path (argc, argv, optind, fs,
742 GET_FS_OPS_OFFSET (clear));
743 }
744 else if (strcmp (op, "cp") == 0)
745 {
746 res = cli_command_src_dst (argc, argv, optind, fs,
747 GET_FS_OPS_OFFSET (copy));
748 }
749 else if (strcmp (op, "sw") == 0)
750 {
751 res = cli_command_src_dst (argc, argv, optind, fs,
752 GET_FS_OPS_OFFSET (swap));
753 }
754 else if (strcmp (op, "mv") == 0)
755 {
756 res = cli_command_src_dst (argc, argv, optind, fs,
757 GET_FS_OPS_OFFSET (move));
758 }
759 else
760 {
761 error_print ("Command '%s' not recognized\n", command);
762 res = EXIT_FAILURE;
763 }
764
765 end:
766 if (connector_check (&connector))
767 {
768 connector_destroy (&connector);
769 }
770
771 usleep (REST_TIME * 2);
841
842 if (backend_check (&backend))
843 {
844 backend_destroy (&backend);
845 }
846
847 g_free (connector);
848 g_free (fs);
849 g_free (op);
850 }
851
852
853 usleep (BE_REST_TIME_US * 2);
772854 return res;
773855 }
2525 #include <glib/gi18n.h>
2626 #include <glib/gprintf.h>
2727 #include <getopt.h>
28 #include "backend.h"
2829 #include "connector.h"
2930 #include "browser.h"
3031 #include "audio.h"
3132 #include "sample.h"
3233 #include "utils.h"
33 #include "notifier.h"
3434 #include "local.h"
3535 #include "preferences.h"
3636
37 #define PLAYER_VISIBLE (remote_browser.fs_ops->options & FS_OPTION_AUDIO_PLAYER ? TRUE : FALSE)
38 #define PLAYER_PREF_CHANNELS (!remote_browser.fs_ops || (remote_browser.fs_ops->options & FS_OPTION_STEREO) || !preferences.mix ? 2 : 1)
39 #define PLAYER_LOADED_CHANNELS (PLAYER_PREF_CHANNELS == 2 && sample_info->channels == 2 ? 2 : 1)
40 #define PLAYER_GET_SOURCE(browser) (browser == &local_browser ? AUDIO_SRC_LOCAL : AUDIO_SRC_REMOTE)
41 #define PLAYER_SOURCE_IS_BROWSER(browser) (PLAYER_GET_SOURCE(browser) == audio.src)
42
3743 #define MAX_DRAW_X 10000
3844
39 #define DUMP_TIMEOUT 2000
4045 #define DND_TIMEOUT 1000
4146
4247 #define TEXT_URI_LIST_STD "text/uri-list"
4348 #define TEXT_URI_LIST_ELEKTROID "text/uri-list-elektroid"
4449
45 #define GUI_FSS (FS_SAMPLES | FS_RAW_PRESETS | FS_DATA_PRJ | FS_DATA_SND)
46
4750 #define MSG_WARN_SAME_SRC_DST "Same source and destination path. Skipping...\n"
4851
4952 enum device_list_store_columns
5053 {
51 DEVICES_LIST_STORE_CARD_FIELD,
54 DEVICES_LIST_STORE_ID_FIELD,
5255 DEVICES_LIST_STORE_NAME_FIELD
5356 };
5457
101104 const struct fs_operations *fs_ops; //Contains the fs_operations to use in this transfer
102105 };
103106
104 struct elektroid_add_upload_task_data
105 {
106 struct item_iterator iter;
107 gint32 index;
108 };
109
110 typedef int (*connector_send_raw) (struct connector *,
111 struct connector_sysex_transfer *);
112
113107 static gpointer elektroid_upload_task (gpointer);
114108 static gpointer elektroid_download_task (gpointer);
115 static void elektroid_update_progress (gdouble);
109 static void elektroid_update_progress (struct job_control *);
110 static void elektroid_cancel_all_tasks (GtkWidget *, gpointer);
111 static void elektroid_reset_sample (struct browser *);
116112
117113 static const struct option ELEKTROID_OPTIONS[] = {
118114 {"local-directory", 1, NULL, 'l'},
121117 {NULL, 0, NULL, 0}
122118 };
123119
124 static const gchar *ELEKTROID_FS_ICONS[] = {
125 FILE_ICON_WAVE, FILE_ICON_DATA, FILE_ICON_SND, FILE_ICON_DATA,
126 FILE_ICON_PRJ, FILE_ICON_SND
127 };
128
129 static gchar *ELEKTROID_AUDIO_LOCAL_EXTS[] =
130 { "wav", "ogg", "aiff", "flac", NULL };
131
132 static GtkTargetEntry TARGET_ENTRIES_LOCAL_DST[] = {
120 static const GtkTargetEntry TARGET_ENTRIES_LOCAL_DST[] = {
133121 {TEXT_URI_LIST_ELEKTROID, GTK_TARGET_SAME_APP | GTK_TARGET_OTHER_WIDGET,
134122 TARGET_STRING},
135123 {TEXT_URI_LIST_STD, GTK_TARGET_SAME_APP | GTK_TARGET_SAME_WIDGET,
137125 {TEXT_URI_LIST_STD, GTK_TARGET_OTHER_APP, TARGET_STRING}
138126 };
139127
140 static GtkTargetEntry TARGET_ENTRIES_LOCAL_SRC[] = {
128 static const GtkTargetEntry TARGET_ENTRIES_LOCAL_SRC[] = {
141129 {TEXT_URI_LIST_STD, GTK_TARGET_SAME_APP | GTK_TARGET_OTHER_WIDGET,
142130 TARGET_STRING},
143131 {TEXT_URI_LIST_STD, GTK_TARGET_SAME_APP | GTK_TARGET_SAME_WIDGET,
145133 {TEXT_URI_LIST_STD, GTK_TARGET_OTHER_APP, TARGET_STRING}
146134 };
147135
148 static GtkTargetEntry TARGET_ENTRIES_REMOTE_DST[] = {
136 static const GtkTargetEntry TARGET_ENTRIES_REMOTE_DST[] = {
149137 {TEXT_URI_LIST_STD, GTK_TARGET_SAME_APP | GTK_TARGET_OTHER_WIDGET,
150138 TARGET_STRING},
151139 {TEXT_URI_LIST_ELEKTROID, GTK_TARGET_SAME_APP | GTK_TARGET_SAME_WIDGET,
153141 {TEXT_URI_LIST_STD, GTK_TARGET_OTHER_APP, TARGET_STRING}
154142 };
155143
156 static GtkTargetEntry TARGET_ENTRIES_REMOTE_SRC[] = {
144 static const GtkTargetEntry TARGET_ENTRIES_REMOTE_DST_SLOT[] = {
145 {TEXT_URI_LIST_STD, GTK_TARGET_SAME_APP | GTK_TARGET_OTHER_WIDGET,
146 TARGET_STRING},
147 {TEXT_URI_LIST_STD, GTK_TARGET_OTHER_APP, TARGET_STRING}
148 };
149
150 static const GtkTargetEntry TARGET_ENTRIES_REMOTE_SRC[] = {
157151 {TEXT_URI_LIST_ELEKTROID, GTK_TARGET_SAME_APP | GTK_TARGET_OTHER_WIDGET,
158152 TARGET_STRING},
159153 {TEXT_URI_LIST_ELEKTROID, GTK_TARGET_SAME_APP | GTK_TARGET_SAME_WIDGET,
160154 TARGET_STRING}
161155 };
162156
163 static GtkTargetEntry TARGET_ENTRIES_UP_BUTTON_DST[] = {
164 {TEXT_URI_LIST_STD, GTK_TARGET_SAME_APP,
165 TARGET_STRING},
166 {TEXT_URI_LIST_STD, GTK_TARGET_OTHER_APP,
167 TARGET_STRING},
168 {TEXT_URI_LIST_ELEKTROID, GTK_TARGET_SAME_APP,
169 TARGET_STRING}
157 static const GtkTargetEntry TARGET_ENTRIES_UP_BUTTON_DST[] = {
158 {TEXT_URI_LIST_STD, GTK_TARGET_SAME_APP, TARGET_STRING},
159 {TEXT_URI_LIST_STD, GTK_TARGET_OTHER_APP, TARGET_STRING},
160 {TEXT_URI_LIST_ELEKTROID, GTK_TARGET_SAME_APP, TARGET_STRING}
170161 };
171
172 static guint TARGET_ENTRIES_LOCAL_DST_N =
173 G_N_ELEMENTS (TARGET_ENTRIES_LOCAL_DST);
174 static guint TARGET_ENTRIES_LOCAL_SRC_N =
175 G_N_ELEMENTS (TARGET_ENTRIES_LOCAL_SRC);
176 static guint TARGET_ENTRIES_REMOTE_DST_N =
177 G_N_ELEMENTS (TARGET_ENTRIES_REMOTE_DST);
178 static guint TARGET_ENTRIES_REMOTE_SRC_N =
179 G_N_ELEMENTS (TARGET_ENTRIES_REMOTE_SRC);
180 static guint TARGET_ENTRIES_UP_BUTTON_DST_N =
181 G_N_ELEMENTS (TARGET_ENTRIES_UP_BUTTON_DST);
182162
183163 static struct browser remote_browser;
184164 static struct browser local_browser;
185165
186166 static struct audio audio;
187 static struct connector connector;
167 static struct backend backend;
188168 static struct preferences preferences;
189169
190170 static GThread *load_thread = NULL;
191171 static GThread *task_thread = NULL;
192172 static GThread *sysex_thread = NULL;
193173 static struct elektroid_transfer transfer;
194 static struct connector_sysex_transfer sysex_transfer;
195
196 static GThread *notifier_thread = NULL;
197 struct notifier notifier;
174 static struct sysex_transfer sysex_transfer;
198175
199176 static GtkWidget *main_window;
200177 static GtkAboutDialog *about_dialog;
209186 static GtkWidget *tx_sysex_button;
210187 static GtkWidget *os_upgrade_button;
211188 static GtkWidget *about_button;
189 static GtkWidget *local_box;
212190 static GtkWidget *remote_box;
213191 static GtkWidget *waveform_draw_area;
214192 static GtkStatusbar *status_bar;
215193 static GtkListStore *devices_list_store;
216 static GtkComboBox *devices_combo;
194 static GtkWidget *devices_combo;
195 static GtkWidget *local_audio_box;
217196 static GtkWidget *upload_menuitem;
218 static GtkWidget *local_audio_box;
197 static GtkWidget *local_play_separator;
219198 static GtkWidget *local_play_menuitem;
220199 static GtkWidget *local_open_menuitem;
221200 static GtkWidget *local_show_menuitem;
222201 static GtkWidget *local_rename_menuitem;
223202 static GtkWidget *local_delete_menuitem;
224203 static GtkWidget *download_menuitem;
204 static GtkWidget *remote_play_separator;
205 static GtkWidget *remote_play_menuitem;
206 static GtkWidget *remote_options_separator;
207 static GtkWidget *remote_open_menuitem;
208 static GtkWidget *remote_show_menuitem;
209 static GtkWidget *remote_actions_separator;
225210 static GtkWidget *remote_rename_menuitem;
226211 static GtkWidget *remote_delete_menuitem;
227212 static GtkWidget *play_button;
228213 static GtkWidget *stop_button;
214 static GtkWidget *loop_button;
215 static GtkWidget *autoplay_switch;
216 static GtkWidget *mix_switch;
229217 static GtkWidget *volume_button;
218 static gulong volume_changed_handler;
230219 static GtkListStore *task_list_store;
231220 static GtkWidget *task_tree_view;
232221 static GtkWidget *cancel_task_button;
233222 static GtkWidget *remove_tasks_button;
234223 static GtkWidget *clear_tasks_button;
235224 static GtkListStore *fs_list_store;
236 static GtkComboBox *fs_combo;
225 static GtkWidget *fs_combo;
237226 static GtkTreeViewColumn *remote_tree_view_index_column;
238
239 static const gchar *
240 elektroid_get_fs_name (enum connector_fs fs)
241 {
242 switch (fs)
243 {
244 case FS_SAMPLES:
245 return _("Samples");
246 case FS_RAW_PRESETS:
247 return _("Presets");
248 case FS_DATA_PRJ:
249 return _("Projects");
250 case FS_DATA_SND:
251 return _("Sounds");
252 default:
253 return _("Undefined");
254 }
255 }
256
257 static void
258 elektroid_set_file_extensions_for_fs (gchar ** extensions[],
259 enum connector_fs sel_fs)
260 {
261 const struct fs_operations *ops;
262 gchar *mp3_ext = NULL;
263
264 if (*extensions != NULL)
265 {
266 gchar **ext = *extensions;
267 while (*ext)
268 {
269 g_free (*ext);
270 ext++;
271 }
272 g_free (*extensions);
273 }
274
275 if (sel_fs == FS_SAMPLES)
276 {
277 gchar **ext = ELEKTROID_AUDIO_LOCAL_EXTS;
278 int known_ext = 0;
279 while (*ext)
280 {
281 known_ext++;
282 ext++;
283 }
284 known_ext++; //NULL included
285
286 int total_ext = known_ext;
287
288 if (sample_is_mp3_supported ())
289 {
290 mp3_ext = "mp3";
291 total_ext++;
292 }
293
294 *extensions = malloc (sizeof (gchar *) * total_ext);
295 ext = ELEKTROID_AUDIO_LOCAL_EXTS;
296 int i = 0;
297 while (*ext)
298 {
299 (*extensions)[i] = strdup (*ext);
300 ext++;
301 i++;
302 }
303 if (mp3_ext)
304 {
305 (*extensions)[i] = strdup (mp3_ext);
306 i++;
307 }
308 (*extensions)[i] = NULL;
309
227 static GtkTreeViewColumn *remote_tree_view_slot_column;
228 static GtkWidget *sample_info_box;
229 static GtkWidget *sample_length;
230 static GtkWidget *sample_duration;
231 static GtkWidget *sample_channels;
232 static GtkWidget *sample_samplerate;
233 static GtkWidget *sample_bitdepth;
234 static gchar **dnd_uris;
235 static gchar *dnd_type_name;
236
237 inline static const gchar *
238 elektroid_get_fs_name (guint fs)
239 {
240 return backend_get_fs_operations (&backend, fs, NULL)->gui_name;
241 }
242
243 static void
244 elektroid_clear_file_extensions (gchar *** extensions)
245 {
246 if (*extensions == NULL)
247 {
248 return;
249 }
250
251 gchar **ext = *extensions;
252 while (*ext)
253 {
254 g_free (*ext);
255 ext++;
256 }
257 g_free (*extensions);
258
259 *extensions = NULL;
260 }
261
262 static void
263 elektroid_set_file_extensions (gchar *** ext_dst, const gchar ** ext_src)
264 {
265 const gchar **ext = ext_src;
266 int ext_count = 0;
267 while (*ext)
268 {
269 ext_count++;
270 ext++;
271 }
272 ext_count++; //NULL included
273
274 *ext_dst = malloc (sizeof (gchar *) * ext_count);
275 ext = ext_src;
276 int i = 0;
277 while (*ext)
278 {
279 (*ext_dst)[i] = strdup (*ext);
280 ext++;
281 i++;
282 }
283 (*ext_dst)[i] = NULL;
284 }
285
286 static void
287 elektroid_set_file_extension (gchar *** ext_dst, gchar * ext)
288 {
289 *ext_dst = malloc (sizeof (gchar *) * 2);
290 (*ext_dst)[0] = ext;
291 (*ext_dst)[1] = NULL;
292 }
293
294 static void
295 elektroid_set_local_file_extensions (gint sel_fs)
296 {
297 const struct fs_operations *ops =
298 backend_get_fs_operations (&backend, sel_fs, NULL);
299
300 elektroid_clear_file_extensions (&local_browser.extensions);
301
302 if (!ops || (ops->options & FS_OPTION_AUDIO_PLAYER))
303 {
304 elektroid_set_file_extensions (&local_browser.extensions,
305 sample_get_sample_extensions ());
310306 }
311307 else
312308 {
313 ops = connector_get_fs_operations (sel_fs);
314 *extensions = malloc (sizeof (gchar *) * 2);
315 (*extensions)[0] = connector_get_full_ext (&connector.device_desc, ops);
316 (*extensions)[1] = NULL;
317 }
318 }
319
320 static const gchar *
321 elektroid_get_inventory_icon_for_fs (enum connector_fs sel_fs)
322 {
323 const gchar *icon = FILE_ICON_DATA;
324
325 for (int fs = FS_SAMPLES, i = 0; fs <= FS_DATA_SND; fs <<= 1, i++)
326 {
327 if (GUI_FSS & fs && sel_fs == fs)
328 {
329 icon = ELEKTROID_FS_ICONS[i];
330 break;
331 }
332 }
333 return icon;
309 elektroid_set_file_extension (&local_browser.extensions,
310 ops->get_ext (&backend.device_desc, ops));
311 }
312 }
313
314 static void
315 elektroid_set_remote_file_extensions (gint sel_fs)
316 {
317 const struct fs_operations *ops =
318 backend_get_fs_operations (&backend, sel_fs, NULL);
319
320 elektroid_clear_file_extensions (&remote_browser.extensions);
321
322 if (ops && backend.type == BE_TYPE_SYSTEM)
323 {
324 elektroid_set_file_extension (&remote_browser.extensions,
325 ops->get_ext (&backend.device_desc, ops));
326 }
334327 }
335328
336329 static void
354347 }
355348
356349 static void
350 elektroid_set_widget_source (GtkWidget * widget, enum audio_src audio_src)
351 {
352 const char *class;
353 GtkStyleContext *context = gtk_widget_get_style_context (widget);
354 GList *classes, *list = gtk_style_context_list_classes (context);
355
356 for (classes = list; classes != NULL; classes = g_list_next (classes))
357 {
358 gtk_style_context_remove_class (context, classes->data);
359 }
360 g_list_free (list);
361
362 if (audio_src == AUDIO_SRC_NONE)
363 {
364 return;
365 }
366
367 if (GTK_IS_SWITCH (widget))
368 {
369 class = audio_src == AUDIO_SRC_LOCAL ? "local_switch" : "remote_switch";
370 }
371 else
372 {
373 class = audio_src == AUDIO_SRC_LOCAL ? "local" : "remote";
374 }
375 gtk_style_context_add_class (context, class);
376 }
377
378 static void
379 elektroid_set_player_source (enum audio_src audio_src)
380 {
381 elektroid_set_widget_source (autoplay_switch, audio_src);
382 elektroid_set_widget_source (mix_switch, audio_src);
383 elektroid_set_widget_source (play_button, audio_src);
384 elektroid_set_widget_source (stop_button, audio_src);
385 elektroid_set_widget_source (loop_button, audio_src);
386 elektroid_set_widget_source (volume_button, audio_src);
387 elektroid_set_widget_source (waveform_draw_area, audio_src);
388 }
389
390 static gboolean
391 elektroid_load_remote_if_midi (gpointer data)
392 {
393 struct browser *browser = data;
394 if (browser == &remote_browser && backend.type == BE_TYPE_MIDI)
395 {
396 browser_load_dir (browser);
397 }
398 return FALSE;
399 }
400
401 static void
402 elektroid_update_upload_menuitem ()
403 {
404 gboolean slot = remote_browser.fs_ops &&
405 !(remote_browser.fs_ops->options & FS_OPTION_SLOT_STORAGE);
406
407 gtk_widget_set_visible (upload_menuitem, slot);
408 gtk_widget_set_visible (local_play_separator, slot);
409 }
410
411 static void
357412 elektroid_load_devices (gboolean auto_select)
358413 {
359414 gint i;
360415 gint device_index;
361 GArray *devices = connector_get_system_devices ();
362 struct connector_system_device device;
416 gchar hostname[LABEL_MAX];
417 GArray *devices = backend_get_system_devices ();
418 struct backend_system_device device;
363419
364420 debug_print (1, "Loading devices...\n");
365421
366422 gtk_list_store_clear (fs_list_store);
367423 gtk_list_store_clear (devices_list_store);
368424
425 gethostname (hostname, LABEL_MAX);
426 gtk_list_store_insert_with_values (devices_list_store, NULL, -1,
427 DEVICES_LIST_STORE_ID_FIELD,
428 BE_SYSTEM_ID,
429 DEVICES_LIST_STORE_NAME_FIELD,
430 hostname, -1);
431
369432 for (i = 0; i < devices->len; i++)
370433 {
371 device = g_array_index (devices, struct connector_system_device, i);
434 device = g_array_index (devices, struct backend_system_device, i);
372435 gtk_list_store_insert_with_values (devices_list_store, NULL, -1,
373 DEVICES_LIST_STORE_CARD_FIELD,
374 device.card,
436 DEVICES_LIST_STORE_ID_FIELD,
437 device.id,
375438 DEVICES_LIST_STORE_NAME_FIELD,
376439 device.name, -1);
377440 }
441 i++; //We add the system backend.
378442
379443 g_array_free (devices, TRUE);
380444
381445 device_index = auto_select && i == 1 ? 0 : -1;
382446 debug_print (1, "Selecting device %d...\n", device_index);
383 gtk_combo_box_set_active (devices_combo, device_index);
447 gtk_combo_box_set_active (GTK_COMBO_BOX (devices_combo), device_index);
384448
385449 if (device_index == -1)
386450 {
387 local_browser.file_icon =
388 elektroid_get_inventory_icon_for_fs (FS_SAMPLES);
389 elektroid_set_file_extensions_for_fs (&local_browser.extensions,
390 FS_SAMPLES);
391
451 local_browser.file_icon = BE_FILE_ICON_WAVE;
452 elektroid_set_local_file_extensions (0);
392453 gtk_widget_set_visible (local_audio_box, TRUE);
393454 gtk_tree_view_column_set_visible (remote_tree_view_index_column, FALSE);
394
455 gtk_tree_view_column_set_visible (remote_tree_view_slot_column, FALSE);
395456 browser_load_dir (&local_browser);
396 }
457 elektroid_update_upload_menuitem ();
458 }
459 }
460
461 static gboolean
462 elektroid_load_devices_bg (gpointer data)
463 {
464 gboolean visible;
465 GValue value = G_VALUE_INIT;
466
467 g_object_get_property (G_OBJECT (main_window), "visible", &value);
468 visible = g_value_get_boolean (&value);
469
470 if (visible)
471 {
472 elektroid_load_devices (TRUE); //This triggers a local browser reload due to the extensions and icons selected for the fs
473 return FALSE;
474 }
475
476 return TRUE;
397477 }
398478
399479 static void
401481 {
402482 gchar *status;
403483 gchar *statfss_str;
404 gint res;
405 enum connector_storage storage;
406 struct connector_storage_stats statfs;
484 struct backend_storage_stats statfs;
407485 GString *statfss;
408486
409487 gtk_statusbar_pop (status_bar, 0);
410488
411 if (connector_check (&connector))
489 if (backend_check (&backend))
412490 {
413491 statfss = g_string_new (NULL);
414
415 for (storage = STORAGE_PLUS_DRIVE; storage <= STORAGE_RAM;
416 storage <<= 1)
417 {
418 if (connector.device_desc.storage & storage)
492 if (backend.get_storage_stats)
493 {
494 for (gint i = 0, storage = 1; i < MAX_BACKEND_STORAGE;
495 i++, storage <<= 1)
419496 {
420 res =
421 connector_get_storage_stats (&connector, storage, &statfs);
422 if (!res)
497 if (backend.device_desc.storage & storage)
423498 {
424 g_string_append_printf (statfss, " %s %.2f%%",
425 statfs.name,
426 connector_get_storage_stats_percent
427 (&statfs));
499 if (!backend.get_storage_stats (&backend, storage, &statfs))
500 {
501 g_string_append_printf (statfss, " %s %.2f%%",
502 statfs.name,
503 backend_get_storage_stats_percent
504 (&statfs));
505 }
428506 }
429507 }
430508 }
509
431510 statfss_str = g_string_free (statfss, FALSE);
432 status = malloc (LABEL_MAX);
433 snprintf (status, LABEL_MAX, _("Connected to %s%s"),
434 connector.device_name, statfss_str);
511 status = g_malloc (LABEL_MAX);
512 if (strlen (backend.device_name))
513 {
514 snprintf (status, LABEL_MAX, "%s%s", backend.device_name,
515 statfss_str);
516 }
517 else
518 {
519 status[0] = 0;
520 }
435521 gtk_statusbar_push (status_bar, 0, status);
436522 free (status);
437523 g_free (statfss_str);
482568 }
483569
484570 static gboolean
485 elektroid_check_connector ()
571 elektroid_check_backend ()
486572 {
487573 GtkListStore *list_store;
488574 GtkTreeIter iter;
489 gboolean connected = connector_check (&connector);
490 gboolean queued =
491 elektroid_get_next_queued_task (&iter, NULL, NULL, NULL, NULL);
492
493 gtk_widget_set_sensitive (remote_box, connected);
575 gboolean remote_sensitive;
576 gboolean connected = backend_check (&backend);
577 gboolean queued = elektroid_get_next_queued_task (&iter, NULL, NULL, NULL,
578 NULL);
579
580 elektroid_update_upload_menuitem ();
581
582 if (!remote_browser.fs_ops
583 || remote_browser.fs_ops->options & FS_OPTION_SINGLE_OP)
584 {
585 remote_sensitive = connected && !queued;
586 }
587 else
588 {
589 remote_sensitive = connected;
590 }
591 gtk_widget_set_sensitive (remote_box, remote_sensitive);
592 gtk_widget_set_sensitive (upload_menuitem, remote_sensitive);
494593 gtk_widget_set_sensitive (rx_sysex_button, connected && !queued);
495594 gtk_widget_set_sensitive (tx_sysex_button, connected && !queued);
496 gtk_widget_set_sensitive (os_upgrade_button, connected && !queued);
595 gtk_widget_set_sensitive (os_upgrade_button, connected && !queued
596 && backend.upgrade_os);
497597
498598 if (!connected)
499599 {
501601 GTK_LIST_STORE (gtk_tree_view_get_model (remote_browser.view));
502602 gtk_entry_set_text (remote_browser.dir_entry, "");
503603 gtk_list_store_clear (list_store);
504
505604 elektroid_load_devices (FALSE);
506605 }
507606
511610 }
512611
513612 static gboolean
514 elektroid_check_connector_bg (gpointer data)
515 {
516 elektroid_check_connector ();
517
613 elektroid_check_backend_bg (gpointer data)
614 {
615 elektroid_check_backend ();
518616 return FALSE;
519617 }
520618
521619 static void
522 browser_refresh_devices (GtkWidget * object, gpointer data)
523 {
524 if (connector_check (&connector))
525 {
526 connector_destroy (&connector);
527 elektroid_check_connector ();
528 }
529 elektroid_load_devices (FALSE);
620 elektroid_cancel_all_tasks_and_wait ()
621 {
622 elektroid_cancel_all_tasks (NULL, NULL);
623 //In this case, the active waiting can not be avoided as the user has cancelled the operation.
624 while (transfer.status == RUNNING)
625 {
626 usleep (50000);
627 }
628 }
629
630 static void
631 elektroid_refresh_devices (GtkWidget * object, gpointer data)
632 {
633 if (backend_check (&backend))
634 {
635 elektroid_cancel_all_tasks_and_wait ();
636 backend_destroy (&backend);
637 elektroid_reset_sample (&remote_browser);
638 remote_browser.fs_ops = NULL;
639 }
640 elektroid_check_backend (); //This triggers the actual devices refresh if there is no backend
530641 }
531642
532643 static gpointer
561672 }
562673
563674 static void
564 elektroid_progress_dialog_end (gpointer data)
565 {
675 elektroid_progress_dialog_close (gpointer data)
676 {
677 gtk_label_set_text (GTK_LABEL (progress_label), _("Cancelling..."));
566678 elektroid_cancel_running_sysex (NULL, 0, NULL);
567679 gtk_dialog_response (GTK_DIALOG (progress_dialog), GTK_RESPONSE_CANCEL);
568680 }
572684 {
573685 gchar *text;
574686 gboolean active;
575 enum connector_sysex_transfer_status status;
687 enum sysex_transfer_status status;
688
689 gtk_progress_bar_pulse (GTK_PROGRESS_BAR (progress_bar));
576690
577691 g_mutex_lock (&sysex_transfer.mutex);
578692 status = sysex_transfer.status;
585699 break;
586700 case SENDING:
587701 text = _("Sending...");
588 gtk_progress_bar_pulse (GTK_PROGRESS_BAR (progress_bar));
589702 break;
590703 case RECEIVING:
591704 text = _("Receiving...");
592 gtk_progress_bar_pulse (GTK_PROGRESS_BAR (progress_bar));
593705 break;
594706 default:
595707 text = "";
611723
612724 sysex_transfer.status = WAITING;
613725 sysex_transfer.active = TRUE;
614 sysex_transfer.timeout = DUMP_TIMEOUT;
726 sysex_transfer.timeout = BE_DUMP_TIMEOUT;
615727 sysex_transfer.batch = TRUE;
616728
617729 g_timeout_add (100, elektroid_update_sysex_progress, NULL);
618730
619 connector_rx_drain (&connector);
620 *res = connector_rx_sysex (&connector, &sysex_transfer);
731 backend_rx_drain (&backend);
732 //This doesn't need to be synchronized because the GUI doesn't allow concurrent access when receiving SysEx in batch mode.
733 *res = backend_rx_sysex (&backend, &sysex_transfer);
621734 if (!*res)
622735 {
623736 text = debug_get_hex_msg (sysex_transfer.raw);
629742 gtk_dialog_response (GTK_DIALOG (progress_dialog), GTK_RESPONSE_ACCEPT);
630743
631744 return res;
632 }
633
634 static gboolean
635 elektroid_start_rx_thread (gpointer data)
636 {
637 debug_print (1, "Creating rx SysEx thread...\n");
638 sysex_thread =
639 g_thread_new ("sysex_thread", elektroid_rx_sysex_thread, NULL);
640
641 return FALSE;
642745 }
643746
644747 static void
654757 gint *res;
655758 GtkFileChooserAction action = GTK_FILE_CHOOSER_ACTION_SAVE;
656759
657 g_idle_add (elektroid_start_rx_thread, NULL);
760 debug_print (1, "Creating rx SysEx thread...\n");
761 sysex_thread = g_thread_new ("sysex_thread", elektroid_rx_sysex_thread,
762 NULL);
658763
659764 gtk_window_set_title (GTK_WINDOW (progress_dialog), _("Receive SysEx"));
660765 dres = gtk_dialog_run (GTK_DIALOG (progress_dialog));
766 g_mutex_lock (&sysex_transfer.mutex);
661767 sysex_transfer.active = FALSE;
768 g_mutex_unlock (&sysex_transfer.mutex);
662769 gtk_widget_hide (GTK_WIDGET (progress_dialog));
663770
664771 res = elektroid_join_sysex_thread ();
772
773 if (!res) //Signal captured while running the dialog.
774 {
775 g_byte_array_free (sysex_transfer.raw, TRUE);
776 return;
777 }
665778
666779 if (dres != GTK_RESPONSE_ACCEPT)
667780 {
675788
676789 if (*res)
677790 {
678 elektroid_check_connector ();
791 elektroid_check_backend ();
679792 g_free (res);
680793 return;
681794 }
729842 if (*res)
730843 {
731844 show_error_msg (_("Error while saving “%s”: %s."),
732 filename, g_strerror (*res));
845 filename, g_strerror (-*res));
733846 }
734847 g_byte_array_free (sysex_transfer.raw, TRUE);
735848 g_free (res);
739852 gtk_widget_destroy (dialog);
740853 }
741854
855 static gint
856 elektroid_send_sysex_file (const gchar * filename, t_sysex_transfer f)
857 {
858 gint err = load_file (filename, sysex_transfer.raw, NULL);
859 if (!err)
860 {
861 err = f (&backend, &sysex_transfer);
862 }
863 if (err && err != -ECANCELED)
864 {
865 show_error_msg (_("Error while loading “%s”: %s."),
866 filename, g_strerror (-err));
867 }
868 return err;
869 }
870
742871 static gpointer
743 elektroid_tx_sysex_thread (gpointer data)
744 {
745 gchar *text;
746 gint *res = malloc (sizeof (gint));
747 connector_send_raw f = data;
748
872 elektroid_tx_sysex_files_thread (gpointer data)
873 {
874 GSList *filenames = data;
875 gint *err = malloc (sizeof (gint));
876 sysex_transfer.raw = g_byte_array_new ();
749877 sysex_transfer.active = TRUE;
750 sysex_transfer.timeout = SYSEX_TIMEOUT;
878 sysex_transfer.status = SENDING;
751879
752880 g_timeout_add (100, elektroid_update_sysex_progress, NULL);
753881
754 *res = f (&connector, &sysex_transfer);
755 if (!*res)
756 {
757 text = debug_get_hex_msg (sysex_transfer.raw);
758 debug_print (1, "SysEx message sent (%d): %s\n",
759 sysex_transfer.raw->len, text);
760 free (text);
761 }
762
763 gtk_dialog_response (GTK_DIALOG (progress_dialog), GTK_RESPONSE_CANCEL);
764
765 return res;
766 }
767
768 static void
769 elektroid_tx_sysex_common (connector_send_raw f)
882 *err = 0;
883 while (*err != -ECANCELED && filenames)
884 {
885 g_byte_array_set_size (sysex_transfer.raw, 0);
886 *err = elektroid_send_sysex_file (filenames->data,
887 backend_tx_sysex_no_update);
888 filenames = filenames->next;
889 //The device may have sent some messages in response so we skip all these.
890 backend_rx_drain (&backend);
891 usleep (BE_REST_TIME_US);
892 }
893 gtk_dialog_response (GTK_DIALOG (progress_dialog), GTK_RESPONSE_CANCEL); //Any response is OK.
894
895 free_msg (sysex_transfer.raw);
896 return err;
897 }
898
899 static gpointer
900 elektroid_tx_upgrade_os_thread (gpointer data)
901 {
902 GSList *filenames = data;
903 gint *err = malloc (sizeof (gint));
904 sysex_transfer.raw = g_byte_array_new ();
905 sysex_transfer.timeout = BE_SYSEX_TIMEOUT_MS;
906
907 g_timeout_add (100, elektroid_update_sysex_progress, NULL);
908
909 *err = elektroid_send_sysex_file (filenames->data, backend.upgrade_os);
910 gtk_dialog_response (GTK_DIALOG (progress_dialog), GTK_RESPONSE_CANCEL); //Any response is OK.
911
912 free_msg (sysex_transfer.raw);
913
914 return err;
915 }
916
917 static void
918 elektroid_tx_sysex_common (GThreadFunc func, gboolean multiple)
770919 {
771920 GtkWidget *dialog;
772921 GtkFileChooser *chooser;
773922 GtkFileFilter *filter;
774 gint res, lres;
775 char *filename;
776 gint *response;
777 GtkFileChooserAction action = GTK_FILE_CHOOSER_ACTION_OPEN;
923 gint res, *err;
924 GSList *filenames;
778925
779926 dialog = gtk_file_chooser_dialog_new (_("Open SysEx"),
780927 GTK_WINDOW (main_window),
781 action,
928 GTK_FILE_CHOOSER_ACTION_OPEN,
782929 _("_Cancel"),
783930 GTK_RESPONSE_CANCEL,
784931 _("_Open"),
788935 gtk_file_filter_set_name (filter, _("SysEx Files"));
789936 gtk_file_filter_add_pattern (filter, "*.syx");
790937 gtk_file_chooser_add_filter (chooser, filter);
938 gtk_file_chooser_set_current_folder (chooser, preferences.local_dir);
939 gtk_file_chooser_set_select_multiple (chooser, multiple);
791940
792941 res = gtk_dialog_run (GTK_DIALOG (dialog));
793
794942 if (res == GTK_RESPONSE_ACCEPT)
795943 {
796 filename = gtk_file_chooser_get_filename (chooser);
797 gtk_widget_destroy (dialog);
798 debug_print (1, "Opening SysEx file...\n");
799
800 sysex_transfer.raw = g_byte_array_new ();
801
802 lres = load_file (filename, sysex_transfer.raw, NULL);
803 if (lres)
804 {
805 show_error_msg (_("Error while loading “%s”: %s."),
806 filename, g_strerror (lres));
807 response = NULL;
808 }
809 else
810 {
811 sysex_thread =
812 g_thread_new ("sysex_thread", elektroid_tx_sysex_thread, f);
813
814 gtk_window_set_title (GTK_WINDOW (progress_dialog),
815 _("Send SysEx"));
816 res = gtk_dialog_run (GTK_DIALOG (progress_dialog));
817
818 g_mutex_lock (&sysex_transfer.mutex);
819 sysex_transfer.active = FALSE;
820 g_mutex_unlock (&sysex_transfer.mutex);
821
822 gtk_widget_hide (GTK_WIDGET (progress_dialog));
823
824 response = elektroid_join_sysex_thread ();
825 }
826
827 g_byte_array_free (sysex_transfer.raw, TRUE);
828
829
830 if (*response < 0)
831 {
832 elektroid_check_connector ();
833 }
834
835 free (response);
836 }
837 else
838 {
839 gtk_widget_destroy (dialog);
840 }
944 gtk_widget_hide (GTK_WIDGET (dialog));
945 filenames = gtk_file_chooser_get_filenames (chooser);
946 sysex_thread = g_thread_new ("sysex_thread", func, filenames);
947 gtk_window_set_title (GTK_WINDOW (progress_dialog), _("Sending SysEx"));
948 gtk_dialog_run (GTK_DIALOG (progress_dialog));
949
950 //If the progress_dialog is closed, we end the transfer.
951 g_mutex_lock (&sysex_transfer.mutex);
952 sysex_transfer.active = FALSE;
953 g_mutex_unlock (&sysex_transfer.mutex);
954
955 gtk_widget_hide (GTK_WIDGET (progress_dialog));
956 err = elektroid_join_sysex_thread ();
957
958 g_slist_free_full (g_steal_pointer (&filenames), g_free);
959
960 if (!err) //Signal captured while running the dialog.
961 {
962 goto cleanup;
963 }
964
965 if (*err < 0)
966 {
967 elektroid_check_backend ();
968 }
969
970 g_free (err);
971 }
972
973 cleanup:
974 gtk_widget_destroy (dialog);
841975 }
842976
843977 static void
844978 elektroid_tx_sysex (GtkWidget * object, gpointer data)
845979 {
846 elektroid_tx_sysex_common (connector_tx_sysex);
980 elektroid_tx_sysex_common (elektroid_tx_sysex_files_thread, TRUE);
847981 }
848982
849983 static void
850984 elektroid_upgrade_os (GtkWidget * object, gpointer data)
851985 {
852 elektroid_tx_sysex_common (connector_upgrade_os);
853 connector_destroy (&connector);
854 elektroid_check_connector ();
986 elektroid_tx_sysex_common (elektroid_tx_upgrade_os_thread, FALSE);
987 backend_destroy (&backend);
988 elektroid_check_backend ();
855989 }
856990
857991 static void
862996 }
863997
864998 static void
865 elektroid_sample_controls_set_sensitive (gboolean sensitive)
866 {
867 gtk_widget_set_sensitive (local_play_menuitem, sensitive);
999 elektroid_set_sample_on_load (gboolean sensitive)
1000 {
1001 gchar label[LABEL_MAX];
1002 struct sample_info *sample_info = audio.control.data;
1003
1004 gtk_widget_set_sensitive (local_play_menuitem,
1005 audio.src == AUDIO_SRC_LOCAL);
1006 gtk_widget_set_sensitive (remote_play_menuitem,
1007 audio.src == AUDIO_SRC_REMOTE);
8681008 gtk_widget_set_sensitive (play_button, sensitive);
8691009 gtk_widget_set_sensitive (stop_button, sensitive);
1010
1011 if (sample_info->frames)
1012 {
1013 double time = sample_info->frames / (double) sample_info->samplerate;
1014
1015 gtk_widget_set_visible (sample_info_box, TRUE);
1016
1017 snprintf (label, LABEL_MAX, "%d", sample_info->frames);
1018 gtk_label_set_text (GTK_LABEL (sample_length), label);
1019
1020 if (time >= 60)
1021 {
1022 snprintf (label, LABEL_MAX, "%.2f %s", time / 60.0, _("minutes"));
1023 }
1024 else
1025 {
1026 snprintf (label, LABEL_MAX, "%.2f s", time);
1027 }
1028 gtk_label_set_text (GTK_LABEL (sample_duration), label);
1029
1030 snprintf (label, LABEL_MAX, "%.2f kHz",
1031 sample_info->samplerate / 1000.f);
1032 gtk_label_set_text (GTK_LABEL (sample_samplerate), label);
1033
1034 snprintf (label, LABEL_MAX, "%d", sample_info->channels);
1035 gtk_label_set_text (GTK_LABEL (sample_channels), label);
1036
1037 if (sample_info->bitdepth)
1038 {
1039 snprintf (label, LABEL_MAX, "%d", sample_info->bitdepth);
1040 gtk_label_set_text (GTK_LABEL (sample_bitdepth), label);
1041 }
1042 }
1043 else
1044 {
1045 gtk_widget_set_visible (sample_info_box, FALSE);
1046 }
8701047 }
8711048
8721049 static gboolean
8731050 elektroid_update_ui_on_load (gpointer data)
8741051 {
8751052 gboolean ready_to_play;
1053 struct sample_info *sample_info = audio.control.data;
8761054
8771055 g_mutex_lock (&audio.control.mutex);
8781056 ready_to_play = audio.frames >= LOAD_BUFFER_LEN || (!audio.control.active
8791057 && audio.frames > 0);
1058 audio.channels = PLAYER_LOADED_CHANNELS;
8801059 g_mutex_unlock (&audio.control.mutex);
8811060
8821061 if (ready_to_play)
8831062 {
8841063 if (audio_check (&audio))
8851064 {
886 elektroid_sample_controls_set_sensitive (TRUE);
1065 elektroid_set_sample_on_load (TRUE);
8871066 }
8881067 if (preferences.autoplay)
8891068 {
8951074 return TRUE;
8961075 }
8971076
898 static void
899 elektroid_delete_file (GtkTreeModel * model, GtkTreePath * tree_path,
900 struct browser *browser)
901 {
902 GtkTreeIter iter;
1077 static gboolean
1078 elektroid_update_basic_sysex_progress (gpointer data)
1079 {
1080 gboolean active;
1081
1082 g_mutex_lock (&sysex_transfer.mutex);
1083 active = sysex_transfer.active;
1084 g_mutex_unlock (&sysex_transfer.mutex);
1085
1086 gtk_progress_bar_pulse (GTK_PROGRESS_BAR (progress_bar));
1087
1088 return active;
1089 }
1090
1091 static gint
1092 elektroid_delete_file (struct browser *browser, gchar * dir,
1093 struct item *item)
1094 {
1095 gint err = 0;
9031096 gchar *path;
904 gchar *id_path;
905 gint err;
906 struct item *item;
907
908 gtk_tree_model_get_iter (model, &iter, tree_path);
909 item = browser_get_item (model, &iter);
910 path = browser_get_item_path (browser, item);
911 id_path = browser_get_item_id_path (browser, item);
912
913 debug_print (1, "Deleting %s...\n", id_path);
914 err = browser->fs_ops->delete (id_path, browser->data);
915 if (err)
916 {
917 show_error_msg (_("Error while deleting “%s”: %s."),
918 path, g_strerror (err));
919 }
920 else
921 {
922 gtk_list_store_remove (GTK_LIST_STORE (model), &iter);
923 }
924
1097
1098 path = chain_path (dir, item->name);
1099
1100 debug_print (1, "Deleting %s...\n", path);
1101
1102 if (item->type == ELEKTROID_FILE)
1103 {
1104 gchar *id = browser->fs_ops->get_id (item);
1105 gchar *id_path = chain_path (dir, id);
1106 g_free (id);
1107 err = browser->fs_ops->delete (browser->backend, id_path);
1108 if (err)
1109 {
1110 error_print ("Error while deleting “%s”: %s.", path,
1111 g_strerror (-err));
1112 }
1113 g_free (id_path);
1114 }
1115 else if (item->type == ELEKTROID_DIR)
1116 {
1117 gboolean active;
1118 struct item_iterator iter;
1119 if (browser->fs_ops->readdir (browser->backend, &iter, path))
1120 {
1121 err = -ENOTDIR;
1122 goto end;
1123 }
1124
1125 while (!next_item_iterator (&iter))
1126 {
1127 elektroid_delete_file (browser, path, &iter.item);
1128
1129 g_mutex_lock (&sysex_transfer.mutex);
1130 active = sysex_transfer.active;
1131 g_mutex_unlock (&sysex_transfer.mutex);
1132
1133 if (!active)
1134 {
1135 free_item_iterator (&iter);
1136 err = -ECANCELED;
1137 goto end;
1138 }
1139 }
1140
1141 browser->fs_ops->delete (browser->backend, path);
1142 free_item_iterator (&iter);
1143 }
1144
1145 end:
9251146 g_free (path);
926 g_free (id_path);
927 browser_free_item (item);
928 }
929
930 static void
931 elektroid_delete_files (GtkWidget * object, gpointer data)
932 {
933 GtkTreeRowReference *reference;
934 GList *list;
935 GtkTreePath *tree_path;
1147 return err;
1148 }
1149
1150 static gpointer
1151 elektroid_delete_files_runner (gpointer data)
1152 {
1153 GList *list, *tree_path_list, *ref_list;
9361154 GtkTreeSelection *selection;
9371155 GtkTreeModel *model;
938 GtkWidget *dialog;
939 GList *tree_path_list;
940 GList *ref_list;
1156 struct browser *browser = data;
1157
1158 g_timeout_add (100, elektroid_update_basic_sysex_progress, NULL);
1159
1160 selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (browser->view));
1161 model = GTK_TREE_MODEL (gtk_tree_view_get_model (browser->view));
1162 tree_path_list = gtk_tree_selection_get_selected_rows (selection, &model);
1163 ref_list = NULL;
1164
1165 //A GtkTreeModel object can NOT be modified while iterating over the selection.
1166 list = tree_path_list;
1167 while (list)
1168 {
1169 GtkTreeRowReference *ref = gtk_tree_row_reference_new (model,
1170 list->data);
1171 ref_list = g_list_append (ref_list, ref);
1172
1173 list = g_list_next (list);
1174 }
1175 g_list_free_full (tree_path_list, (GDestroyNotify) gtk_tree_path_free);
1176
1177 g_mutex_lock (&browser->mutex);
1178 list = ref_list;
1179 while (list)
1180 {
1181 gboolean active;
1182 GtkTreeIter iter;
1183 struct item item;
1184 GtkTreePath *tree_path = gtk_tree_row_reference_get_path (list->data);
1185
1186 gtk_tree_model_get_iter (model, &iter, tree_path);
1187 browser_set_item (model, &iter, &item);
1188
1189 if (!elektroid_delete_file (browser, browser->dir, &item) &&
1190 browser == &remote_browser &&
1191 browser->backend->type != BE_TYPE_SYSTEM)
1192 {
1193 gtk_list_store_remove (GTK_LIST_STORE (model), &iter);
1194 }
1195
1196 g_mutex_lock (&sysex_transfer.mutex);
1197 active = sysex_transfer.active;
1198 g_mutex_unlock (&sysex_transfer.mutex);
1199
1200 if (!active)
1201 {
1202 break;
1203 }
1204
1205 list = g_list_next (list);
1206 }
1207 g_list_free_full (ref_list, (GDestroyNotify) gtk_tree_row_reference_free);
1208 g_mutex_unlock (&browser->mutex);
1209
1210 sleep (1); //See elektroid_dnd_received_runner
1211 gtk_dialog_response (GTK_DIALOG (progress_dialog), GTK_RESPONSE_ACCEPT);
1212 return NULL;
1213 }
1214
1215 static void
1216 elektroid_delete_files (GtkWidget * object, gpointer data)
1217 {
9411218 gint confirmation;
942 struct browser *browser = data;
943
944 dialog =
945 gtk_message_dialog_new (GTK_WINDOW (main_window),
946 GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_MODAL,
947 GTK_MESSAGE_ERROR, GTK_BUTTONS_NONE,
948 _
949 ("Are you sure you want to delete the selected items?"));
1219 GtkWidget *dialog = gtk_message_dialog_new (GTK_WINDOW (main_window),
1220 GTK_DIALOG_DESTROY_WITH_PARENT |
1221 GTK_DIALOG_MODAL,
1222 GTK_MESSAGE_ERROR,
1223 GTK_BUTTONS_NONE,
1224 _
1225 ("Are you sure you want to delete the selected items?"));
9501226 gtk_dialog_add_buttons (GTK_DIALOG (dialog), _("_Cancel"),
9511227 GTK_RESPONSE_CANCEL, _("_Delete"),
9521228 GTK_RESPONSE_ACCEPT, NULL);
9581234 return;
9591235 }
9601236
961 selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (browser->view));
962 model = GTK_TREE_MODEL (gtk_tree_view_get_model (browser->view));
963 tree_path_list = gtk_tree_selection_get_selected_rows (selection, &model);
964 ref_list = NULL;
965
966 for (list = tree_path_list; list != NULL; list = g_list_next (list))
967 {
968 reference = gtk_tree_row_reference_new (model, list->data);
969 ref_list = g_list_append (ref_list, reference);
970 }
971 g_list_free_full (tree_path_list, (GDestroyNotify) gtk_tree_path_free);
972
973 for (list = ref_list; list != NULL; list = g_list_next (list))
974 {
975 tree_path = gtk_tree_row_reference_get_path (list->data);
976 elektroid_delete_file (model, tree_path, browser);
977 }
978 g_list_free_full (ref_list, (GDestroyNotify) gtk_tree_row_reference_free);
979
980 browser_load_dir (browser);
1237 g_mutex_lock (&sysex_transfer.mutex);
1238 sysex_transfer.active = TRUE;
1239 g_mutex_unlock (&sysex_transfer.mutex);
1240
1241 debug_print (1, "Creating SysEx thread...\n");
1242 sysex_thread = g_thread_new ("sysex_thread",
1243 elektroid_delete_files_runner, data);
1244 gtk_window_set_title (GTK_WINDOW (progress_dialog), _("Deleting Files"));
1245 gtk_label_set_text (GTK_LABEL (progress_label), _("Deleting..."));
1246 gtk_dialog_run (GTK_DIALOG (progress_dialog));
1247 gtk_widget_hide (GTK_WIDGET (progress_dialog));
1248
1249 elektroid_join_sysex_thread ();
1250
1251 g_mutex_lock (&sysex_transfer.mutex);
1252 sysex_transfer.active = FALSE;
1253 g_mutex_unlock (&sysex_transfer.mutex);
9811254 }
9821255
9831256 static void
9881261 int result;
9891262 gint err;
9901263 GtkTreeIter iter;
991 struct item *item;
1264 struct item item;
9921265 struct browser *browser = data;
9931266 GtkTreeModel *model =
9941267 GTK_TREE_MODEL (gtk_tree_view_get_model (browser->view));
9951268
9961269 browser_set_selected_row_iter (browser, &iter);
997 item = browser_get_item (model, &iter);
998 old_path = browser_get_item_id_path (browser, item);
999
1000 gtk_entry_set_text (name_dialog_entry, item->name);
1270 browser_set_item (model, &iter, &item);
1271 old_path = browser_get_item_id_path (browser, &item);
1272
1273 gtk_entry_set_text (name_dialog_entry, item.name);
1274 gtk_entry_set_max_length (name_dialog_entry, browser->fs_ops->max_name_len);
10011275 gtk_widget_grab_focus (GTK_WIDGET (name_dialog_entry));
10021276 gtk_widget_set_sensitive (name_dialog_accept_button, FALSE);
10031277
10121286
10131287 if (result == GTK_RESPONSE_ACCEPT)
10141288 {
1015 new_path =
1016 chain_path (browser->dir, gtk_entry_get_text (name_dialog_entry));
1017
1018 err = browser->fs_ops->move (old_path, new_path, &connector);
1019
1289 if (browser->fs_ops->options & FS_OPTION_SLOT_STORAGE)
1290 {
1291 new_path = strdup (gtk_entry_get_text (name_dialog_entry));
1292 }
1293 else
1294 {
1295 new_path = chain_path (browser->dir,
1296 gtk_entry_get_text (name_dialog_entry));
1297 }
1298 err = browser->fs_ops->rename (&backend, old_path, new_path);
10201299 if (err)
10211300 {
10221301 show_error_msg (_("Error while renaming to “%s”: %s."),
1023 new_path, g_strerror (err));
1302 new_path, g_strerror (-err));
10241303 }
10251304 else
10261305 {
1027 browser_load_dir (browser);
1306 elektroid_load_remote_if_midi (browser);
10281307 }
1029
10301308 free (new_path);
10311309 }
10321310 }
10331311
1034 browser_free_item (item);
10351312 g_free (old_path);
10361313 gtk_widget_hide (GTK_WIDGET (name_dialog));
10371314 }
10381315
10391316 static gboolean
1040 elektroid_drag_begin (GtkWidget * widget,
1041 GdkDragContext * context, gpointer data)
1317 elektroid_drag_begin (GtkWidget * widget, GdkDragContext * context,
1318 gpointer data)
10421319 {
10431320 GtkTreeIter iter;
10441321 GtkTreeSelection *selection;
10471324 GList *list;
10481325 gchar *uri;
10491326 gchar *path;
1050 struct item *item;
1327 struct item item;
10511328 struct browser *browser = data;
10521329
10531330 selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (widget));
10581335 for (list = tree_path_list; list != NULL; list = g_list_next (list))
10591336 {
10601337 gtk_tree_model_get_iter (model, &iter, list->data);
1061 item = browser_get_item (model, &iter);
1062 path = browser_get_item_id_path (browser, item);
1063 browser_free_item (item);
1338 browser_set_item (model, &iter, &item);
1339 path = browser_get_item_id_path (browser, &item);
10641340 if (widget == GTK_WIDGET (local_browser.view))
10651341 {
10661342 uri = g_filename_to_uri (path, NULL, NULL);
11201396 return FALSE;
11211397 }
11221398
1399 static void
1400 elektroid_button_press_update_menu (struct browser *browser,
1401 GtkTreeSelection * selection,
1402 GtkTreePath * path)
1403 {
1404 if (gtk_tree_selection_path_is_selected (selection, path))
1405 {
1406 if (browser_get_selected_items_count (browser) == 1 &&
1407 !PLAYER_SOURCE_IS_BROWSER (browser))
1408 {
1409 browser->check_selection (NULL);
1410 }
1411 }
1412 else
1413 {
1414 gtk_tree_selection_unselect_all (selection);
1415 gtk_tree_selection_select_path (selection, path);
1416 }
1417 }
1418
11231419 static gboolean
11241420 elektroid_button_press (GtkWidget * treeview, GdkEventButton * event,
11251421 gpointer data)
11491445 return FALSE;
11501446 }
11511447
1152 if (!gtk_tree_selection_path_is_selected (selection, path))
1153 {
1154 gtk_tree_selection_unselect_all (selection);
1155 gtk_tree_selection_select_path (selection, path);
1156 }
1448 elektroid_button_press_update_menu (browser, selection, path);
1449
11571450 gtk_tree_path_free (path);
11581451 gtk_tree_selection_set_select_function (selection,
11591452 elektroid_selection_function_false,
11731466 return FALSE;
11741467 }
11751468
1176 if (!gtk_tree_selection_path_is_selected (selection, path))
1177 {
1178 gtk_tree_selection_unselect_all (selection);
1179 gtk_tree_selection_select_path (selection, path);
1180 }
1469 elektroid_button_press_update_menu (browser, selection, path);
1470
11811471 gtk_tree_path_free (path);
11821472 gtk_menu_popup_at_pointer (browser->menu, (GdkEvent *) event);
11831473
12391529 }
12401530
12411531 static void
1242 elektroid_redraw_sample (gdouble percent)
1532 elektroid_redraw_sample (struct job_control *control)
12431533 {
12441534 g_idle_add (elektroid_queue_draw_waveform, NULL);
12451535 }
12461536
12471537 static gpointer
1248 elektroid_load_sample (gpointer path)
1249 {
1250 struct sample_loop_data *sample_loop_data;
1538 elektroid_load_sample (gpointer data)
1539 {
1540 struct sample_params sample_params;
1541 struct sample_info *sample_info = audio.control.data;
1542
1543 sample_params.samplerate = AUDIO_SAMPLE_RATE;
1544 sample_params.channels = PLAYER_PREF_CHANNELS;
1545
1546 g_timeout_add (100, elektroid_update_ui_on_load, NULL);
1547
12511548 g_mutex_lock (&audio.control.mutex);
12521549 audio.control.active = TRUE;
12531550 g_mutex_unlock (&audio.control.mutex);
12541551
1255 if (sample_load_with_frames
1256 (path, audio.sample, &audio.control, &audio.frames) >= 0)
1257 {
1258 sample_loop_data = (struct sample_loop_data *) audio.control.data;
1259 debug_print (1, "Loop start at %d, loop end at %d\n",
1260 sample_loop_data->start, sample_loop_data->end);
1261 g_free (audio.control.data);
1552 if (sample_load_from_file (audio.path, audio.sample, &audio.control,
1553 &sample_params, &audio.frames) >= 0)
1554 {
1555 debug_print (1,
1556 "Samples: %d (%d B); channels: %d; loop start at %d; loop end at %d; sample rate: %.2f kHz; bit depth: %d\n",
1557 audio.frames, audio.sample->len, sample_info->channels,
1558 sample_info->loopstart, sample_info->loopend,
1559 sample_info->samplerate / 1000.0, sample_info->bitdepth);
12621560 }
12631561
12641562 g_mutex_lock (&audio.control.mutex);
12651563 audio.control.active = FALSE;
12661564 g_mutex_unlock (&audio.control.mutex);
12671565
1268 free (path);
1269
12701566 return NULL;
12711567 }
12721568
12731569 static void
1274 elektroid_start_load_thread (gchar * path)
1570 elektroid_start_load_thread ()
12751571 {
12761572 debug_print (1, "Creating load thread...\n");
1277
1278 load_thread = g_thread_new ("load_sample", elektroid_load_sample, path);
1279
1280 g_timeout_add (100, elektroid_update_ui_on_load, NULL);
1573 load_thread = g_thread_new ("load_sample", elektroid_load_sample, NULL);
12811574 }
12821575
12831576 static void
13191612 elektroid_join_task_thread ();
13201613 }
13211614
1322 static gboolean
1323 elektroid_remote_check_selection (gpointer data)
1324 {
1325 gint count = browser_get_selected_items_count (&remote_browser);
1326 gboolean dl_impl = remote_browser.fs_ops->download ? TRUE : FALSE;
1327 gboolean move_impl = remote_browser.fs_ops->move ? TRUE : FALSE;
1328 gboolean del_impl = remote_browser.fs_ops->delete ? TRUE : FALSE;
1329
1330 gtk_widget_set_sensitive (download_menuitem, count > 0 && dl_impl);
1331 gtk_widget_set_sensitive (remote_rename_menuitem, count == 1 && move_impl);
1332 gtk_widget_set_sensitive (remote_delete_menuitem, count > 0 && del_impl);
1333
1334 return FALSE;
1335 }
1336
1337 static gboolean
1338 elektroid_local_check_selection (gpointer data)
1339 {
1340 GtkTreeIter iter;
1341 gchar *sample_path;
1342 GtkTreeModel *model;
1343 gboolean audio_controls;
1344 struct item *item = NULL;
1345 gint count = browser_get_selected_items_count (&local_browser);
1346
1347 if (count == 0)
1348 {
1349 audio.name[0] = 0;
1350 }
1351 else if (count == 1)
1352 {
1353 browser_set_selected_row_iter (&local_browser, &iter);
1354 model = GTK_TREE_MODEL (gtk_tree_view_get_model (local_browser.view));
1355 item = browser_get_item (model, &iter);
1356 if (!strcmp (audio.name, item->name))
1357 {
1358 goto end;
1359 }
1360 }
1361
1362 if (!remote_browser.fs_ops || remote_browser.fs_ops->fs == FS_SAMPLES)
1615 static void
1616 elektroid_audio_widgets_set_status ()
1617 {
1618 gtk_widget_set_sensitive (local_open_menuitem, FALSE);
1619 gtk_widget_set_sensitive (remote_open_menuitem, FALSE);
1620 gtk_widget_set_sensitive (local_play_menuitem, FALSE);
1621 gtk_widget_set_sensitive (remote_play_menuitem, FALSE);
1622 gtk_widget_set_sensitive (play_button, FALSE);
1623 gtk_widget_set_sensitive (stop_button, FALSE);
1624 gtk_widget_set_visible (sample_info_box, FALSE);
1625 }
1626
1627 static void
1628 elektroid_reset_sample (struct browser *browser)
1629 {
1630 if (PLAYER_SOURCE_IS_BROWSER (browser))
13631631 {
13641632 audio_stop (&audio, TRUE);
13651633 elektroid_stop_load_thread ();
13661634 audio_reset_sample (&audio);
13671635 gtk_widget_queue_draw (waveform_draw_area);
1368
1369 if (item && item->type == ELEKTROID_FILE
1370 && strcmp (item->name, audio.name))
1371 {
1372 sample_path = chain_path (local_browser.dir, item->name);
1373 elektroid_start_load_thread (sample_path);
1374 strcpy (audio.name, item->name);
1375 }
1376
1377 }
1378
1379 end:
1380 audio_controls = item && item->type == ELEKTROID_FILE && (!remote_browser.fs_ops || remote_browser.fs_ops->fs == FS_SAMPLES); //1 sample file
1381 elektroid_sample_controls_set_sensitive (audio_controls);
1382 gtk_widget_set_sensitive (local_open_menuitem, audio_controls);
1383
1384 if (item)
1385 {
1386 browser_free_item (item);
1387 }
1636 elektroid_set_player_source (AUDIO_SRC_NONE);
1637 elektroid_audio_widgets_set_status ();
1638 }
1639 }
1640
1641 static void
1642 elektroid_check_and_load_sample (struct browser *browser, gint count)
1643 {
1644 struct item item;
1645 GtkTreeIter iter;
1646 gchar *sample_path;
1647 GtkTreeModel *model;
1648 gboolean audio_fs = !remote_browser.fs_ops
1649 || (remote_browser.fs_ops->options & FS_OPTION_AUDIO_PLAYER);
1650
1651 if (count == 1)
1652 {
1653 browser_set_selected_row_iter (browser, &iter);
1654 model = GTK_TREE_MODEL (gtk_tree_view_get_model (browser->view));
1655 browser_set_item (model, &iter, &item);
1656
1657 gtk_widget_set_sensitive (browser ==
1658 &local_browser ? local_open_menuitem :
1659 remote_open_menuitem,
1660 item.type == ELEKTROID_FILE);
1661
1662 if (item.type == ELEKTROID_DIR)
1663 {
1664 elektroid_reset_sample (browser);
1665 }
1666 else
1667 {
1668 sample_path = chain_path (browser->dir, item.name);
1669
1670 if (strcmp (audio.path, sample_path)
1671 || PLAYER_GET_SOURCE (browser) != audio.src)
1672 {
1673 if (audio_fs)
1674 {
1675 audio_stop (&audio, TRUE);
1676 elektroid_stop_load_thread ();
1677 audio_reset_sample (&audio);
1678 strcpy (audio.path, sample_path);
1679 audio.src = PLAYER_GET_SOURCE (browser);
1680 elektroid_set_player_source (PLAYER_GET_SOURCE (browser));
1681 elektroid_start_load_thread ();
1682 }
1683 }
1684 g_free (sample_path);
1685 }
1686 }
1687 else
1688 {
1689 elektroid_reset_sample (browser);
1690 }
1691 }
1692
1693 static gboolean
1694 elektroid_remote_check_selection (gpointer data)
1695 {
1696 gint count = browser_get_selected_items_count (&remote_browser);
1697 gboolean dl_impl = remote_browser.fs_ops
1698 && remote_browser.fs_ops->download ? TRUE : FALSE;
1699 gboolean ren_impl = remote_browser.fs_ops
1700 && remote_browser.fs_ops->rename ? TRUE : FALSE;
1701 gboolean del_impl = remote_browser.fs_ops
1702 && remote_browser.fs_ops->delete ? TRUE : FALSE;
1703
1704 if (backend.type == BE_TYPE_SYSTEM)
1705 {
1706 elektroid_check_and_load_sample (&remote_browser, count);
1707 }
1708
1709 gtk_widget_set_sensitive (remote_show_menuitem, count <= 1);
1710 gtk_widget_set_sensitive (remote_rename_menuitem, count == 1 && ren_impl);
1711 gtk_widget_set_sensitive (remote_delete_menuitem, count > 0 && del_impl);
1712 gtk_widget_set_sensitive (download_menuitem, count > 0 && dl_impl);
1713
1714 return FALSE;
1715 }
1716
1717 static gboolean
1718 elektroid_local_check_selection (gpointer data)
1719 {
1720 gint count = browser_get_selected_items_count (&local_browser);
1721
1722 elektroid_check_and_load_sample (&local_browser, count);
13881723
13891724 gtk_widget_set_sensitive (local_show_menuitem, count <= 1);
13901725 gtk_widget_set_sensitive (local_rename_menuitem, count == 1);
14021737 guint width, height;
14031738 GdkRGBA color;
14041739 GtkStyleContext *context;
1405 int i, x_widget, x_sample;
1406 double x_ratio, mid_y, value;
1740 gint x_widget, x_sample;
1741 double x_ratio, mid_y1, mid_y2, value;
14071742 short *sample;
1743 double y_scale = 1.0 / (double) SHRT_MIN;
1744 double x_scale = 1.0 / (double) MAX_DRAW_X;
1745 struct sample_info *sample_info = audio.control.data;
1746 gboolean stereo = PLAYER_LOADED_CHANNELS == 2;
14081747
14091748 g_mutex_lock (&audio.control.mutex);
14101749
14111750 context = gtk_widget_get_style_context (widget);
1412 width = gtk_widget_get_allocated_width (widget);
1413 height = gtk_widget_get_allocated_height (widget);
1414 mid_y = height / 2.0;
1751 width = gtk_widget_get_allocated_width (widget) - 2;
1752 height = gtk_widget_get_allocated_height (widget) - 2;
1753 y_scale *= height;
1754 if (stereo)
1755 {
1756 mid_y1 = height * 0.25;
1757 mid_y2 = height * 0.75;
1758 y_scale *= 0.25;
1759 }
1760 else
1761 {
1762 mid_y1 = height * 0.50;
1763 y_scale *= 0.5;
1764 }
14151765 gtk_render_background (context, cr, 0, 0, width, height);
14161766 gtk_style_context_get_color (context, gtk_style_context_get_state (context),
14171767 &color);
14191769
14201770 sample = (short *) audio.sample->data;
14211771 x_ratio = audio.frames / (double) MAX_DRAW_X;
1422 for (i = 0; i < MAX_DRAW_X; i++)
1423 {
1424 x_sample = i * x_ratio;
1772 for (gint i = 0; i < MAX_DRAW_X; i++)
1773 {
1774 x_sample = i * x_ratio * (stereo ? 2 : 1);
1775 x_widget = i * width * x_scale;
14251776 if (x_sample < audio.sample->len >> 1)
14261777 {
1427 x_widget = i * ((double) width) / MAX_DRAW_X;
1428 value = mid_y - mid_y * (sample[x_sample] / (float) SHRT_MIN);
1429 cairo_move_to (cr, x_widget, mid_y);
1778 value = mid_y1 - sample[x_sample] * y_scale;
1779 cairo_move_to (cr, x_widget, mid_y1);
14301780 cairo_line_to (cr, x_widget, value);
14311781 cairo_stroke (cr);
1782 if (stereo)
1783 {
1784 value = mid_y2 - sample[x_sample + 1] * y_scale;
1785 cairo_move_to (cr, x_widget, mid_y2);
1786 cairo_line_to (cr, x_widget, value);
1787 cairo_stroke (cr);
1788 }
14321789 }
14331790 }
14341791
14471804 GVariantBuilder builder;
14481805 GFile *file;
14491806 GDBusProxy *proxy;
1450 struct item *item;
1807 struct item item;
14511808 gchar *path = NULL;
14521809 gboolean done = FALSE;
1453 gint count = browser_get_selected_items_count (&local_browser);
1810 struct browser *browser = data;
1811 gint count = browser_get_selected_items_count (browser);
14541812
14551813 if (count == 0)
14561814 {
1457 path = chain_path (local_browser.dir, NULL);
1815 path = chain_path (browser->dir, NULL);
14581816 }
14591817 else if (count == 1)
14601818 {
1461 browser_set_selected_row_iter (&local_browser, &iter);
1462 model = GTK_TREE_MODEL (gtk_tree_view_get_model (local_browser.view));
1463 item = browser_get_item (model, &iter);
1464 path = chain_path (local_browser.dir, item->name);
1465 browser_free_item (item);
1819 browser_set_selected_row_iter (browser, &iter);
1820 model = GTK_TREE_MODEL (gtk_tree_view_get_model (browser->view));
1821 browser_set_item (model, &iter, &item);
1822 path = chain_path (browser->dir, item.name);
14661823 }
14671824 else
14681825 {
14781835 G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS
14791836 |
14801837 G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES,
1481 NULL,
1482 "org.freedesktop.FileManager1",
1838 NULL, "org.freedesktop.FileManager1",
14831839 "/org/freedesktop/FileManager1",
1484 "org.freedesktop.FileManager1",
1485 NULL, NULL);
1840 "org.freedesktop.FileManager1", NULL,
1841 NULL);
14861842 if (proxy)
14871843 {
14881844 g_variant_builder_init (&builder, G_VARIANT_TYPE ("as"));
15191875 gchar *path;
15201876 gchar *uri;
15211877 GFile *file;
1522 struct item *item;
1523
1524 browser_set_selected_row_iter (&local_browser, &iter);
1525 model = GTK_TREE_MODEL (gtk_tree_view_get_model (local_browser.view));
1526 item = browser_get_item (model, &iter);
1527 path = chain_path (local_browser.dir, item->name);
1528 browser_free_item (item);
1878 struct item item;
1879 struct browser *browser = data;
1880
1881 browser_set_selected_row_iter (browser, &iter);
1882 model = GTK_TREE_MODEL (gtk_tree_view_get_model (browser->view));
1883 browser_set_item (model, &iter, &item);
1884 path = chain_path (browser->dir, item.name);
15291885
15301886 file = g_file_new_for_path (path);
15311887 g_free (path);
15611917 return FALSE;
15621918 }
15631919
1920 static gboolean
1921 elektroid_mix_clicked (GtkWidget * object, gboolean state, gpointer data)
1922 {
1923 gchar *path;
1924 enum audio_src audio_src = audio.src;
1925 preferences.mix = state;
1926 if (strlen (audio.path))
1927 {
1928 audio_stop (&audio, TRUE);
1929 elektroid_stop_load_thread ();
1930 path = strdup (audio.path);
1931 audio_reset_sample (&audio);
1932 strcpy (audio.path, path);
1933 g_free (path);
1934 audio.src = audio_src;
1935 elektroid_start_load_thread ();
1936 }
1937 return FALSE;
1938 }
1939
15641940 static void
15651941 elektroid_set_volume (GtkScaleButton * button, gdouble value, gpointer data)
15661942 {
15671943 audio_set_volume (&audio, value);
15681944 }
15691945
1946 static gboolean
1947 elektroid_set_volume_callback_bg (gpointer data)
1948 {
1949 gdouble *value = data;
1950 debug_print (1, "Setting volume to %f...\n", *value);
1951 g_signal_handler_block (volume_button, volume_changed_handler);
1952 gtk_scale_button_set_value (GTK_SCALE_BUTTON (volume_button), *value);
1953 g_signal_handler_unblock (volume_button, volume_changed_handler);
1954 g_free (data);
1955 return FALSE;
1956 }
1957
15701958 static void
15711959 elektroid_set_volume_callback (gdouble value)
15721960 {
1573 gtk_scale_button_set_value (GTK_SCALE_BUTTON (volume_button), value);
1961 gdouble *v = g_malloc (sizeof (gdouble));
1962 *v = value;
1963 g_idle_add (elektroid_set_volume_callback_bg, v);
15741964 }
15751965
15761966 static void
15821972 struct browser *browser = data;
15831973
15841974 gtk_entry_set_text (name_dialog_entry, "");
1975 gtk_entry_set_max_length (name_dialog_entry, browser->fs_ops->max_name_len);
15851976 gtk_widget_grab_focus (GTK_WIDGET (name_dialog_entry));
15861977 gtk_widget_set_sensitive (name_dialog_accept_button, FALSE);
15871978
15991990 pathname =
16001991 chain_path (browser->dir, gtk_entry_get_text (name_dialog_entry));
16011992
1602 err = browser->fs_ops->mkdir (pathname, &connector);
1993 err = browser->fs_ops->mkdir (&backend, pathname);
16031994
16041995 if (err)
16051996 {
16061997 show_error_msg (_("Error while creating dir “%s”: %s."),
1607 pathname, g_strerror (err));
1998 pathname, g_strerror (-err));
16081999 }
16092000 else
16102001 {
1611 browser_load_dir (browser);
2002 elektroid_load_remote_if_midi (browser);
16122003 }
16132004
16142005 free (pathname);
18822273
18832274 if (!transfer_active && found)
18842275 {
2276 if (remote_browser.fs_ops->options & FS_OPTION_SINGLE_OP)
2277 {
2278 gtk_widget_set_sensitive (remote_box, FALSE);
2279 gtk_widget_set_sensitive (upload_menuitem, FALSE);
2280 }
2281 gtk_widget_set_sensitive (rx_sysex_button, FALSE);
2282 gtk_widget_set_sensitive (tx_sysex_button, FALSE);
2283 gtk_widget_set_sensitive (os_upgrade_button, FALSE);
2284
18852285 gtk_list_store_set (task_list_store, &iter,
18862286 TASK_LIST_STORE_STATUS_FIELD, RUNNING,
18872287 TASK_LIST_STORE_STATUS_HUMAN_FIELD, status_human,
18912291 gtk_tree_view_set_cursor (GTK_TREE_VIEW (task_tree_view), path, NULL,
18922292 FALSE);
18932293 gtk_tree_path_free (path);
2294 transfer.status = RUNNING;
18942295 transfer.control.active = TRUE;
18952296 transfer.control.callback = elektroid_update_progress;
18962297 transfer.src = src;
18972298 transfer.dst = dst;
1898 transfer.fs_ops = connector_get_fs_operations (fs);
2299 transfer.fs_ops = backend_get_fs_operations (&backend, fs, NULL);
18992300 debug_print (1, "Running task type %d from %s to %s (%s)...\n", type,
19002301 transfer.src, transfer.dst, elektroid_get_fs_name (fs));
19012302
19142315 }
19152316 else
19162317 {
2318 gtk_widget_set_sensitive (remote_box, TRUE);
2319 gtk_widget_set_sensitive (upload_menuitem, TRUE);
19172320 gtk_widget_set_sensitive (rx_sysex_button, TRUE);
19182321 gtk_widget_set_sensitive (tx_sysex_button, TRUE);
1919 gtk_widget_set_sensitive (os_upgrade_button, TRUE);
2322 gtk_widget_set_sensitive (os_upgrade_button,
2323 backend.upgrade_os != NULL);
19202324 }
19212325
19222326 elektroid_check_task_buttons (NULL);
19272331 static gpointer
19282332 elektroid_upload_task (gpointer data)
19292333 {
1930 gchar *dst_path;
1931 gchar *dst_dir;
19322334 gint res;
19332335 GByteArray *array;
2336 gchar *dst_path, *dst_dir;
19342337
19352338 debug_print (1, "Local path: %s\n", transfer.src);
19362339 debug_print (1, "Remote path: %s\n", transfer.dst);
2340
2341 dst_path = strdup (transfer.dst);
2342 dst_dir = dirname (dst_path);
2343
2344 if (remote_browser.fs_ops->mkdir
2345 && remote_browser.fs_ops->mkdir (remote_browser.backend, dst_dir))
2346 {
2347 error_print ("Error while creating remote %s dir\n", dst_dir);
2348 transfer.status = COMPLETED_ERROR;
2349 goto end_nodir;
2350 }
19372351
19382352 array = g_byte_array_new ();
19392353
19482362 debug_print (1, "Writing from file %s (filesystem %s)...\n", transfer.src,
19492363 elektroid_get_fs_name (transfer.fs_ops->fs));
19502364
1951 res = transfer.fs_ops->upload (transfer.dst, array, &transfer.control,
1952 remote_browser.data);
2365 res = transfer.fs_ops->upload (remote_browser.backend, transfer.dst, array,
2366 &transfer.control);
19532367 g_free (transfer.control.data);
19542368 transfer.control.data = NULL;
1955 g_idle_add (elektroid_check_connector_bg, NULL);
2369 g_idle_add (elektroid_check_backend_bg, NULL);
19562370
19572371 if (res && transfer.control.active)
19582372 {
19752389
19762390 if (!res && transfer.fs_ops == remote_browser.fs_ops) //There is no need to refresh the local browser
19772391 {
1978 dst_path = strdup (transfer.dst);
1979 dst_dir = dirname (dst_path);
1980 if (strcmp (dst_dir, remote_browser.dir) == 0)
1981 {
1982 g_idle_add (browser_load_dir, &remote_browser);
1983 }
1984 g_free (dst_path);
2392 if (!strncmp (dst_dir, remote_browser.dir, strlen (remote_browser.dir)))
2393 {
2394 g_idle_add (elektroid_load_remote_if_midi, &remote_browser);
2395 }
19852396 }
19862397
19872398 end_cleanup:
19882399 g_byte_array_free (array, TRUE);
19892400 g_idle_add (elektroid_complete_running_task, NULL);
19902401 g_idle_add (elektroid_run_next_task, NULL);
1991
2402 end_nodir:
2403 g_free (dst_path);
19922404 return NULL;
19932405 }
19942406
19982410 {
19992411 const gchar *status_human = elektroid_get_human_task_status (QUEUED);
20002412 const gchar *type_human = elektroid_get_human_task_type (type);
2001 const gchar *icon = elektroid_get_inventory_icon_for_fs (remote_fs_id);
2002
2413 const gchar *icon =
2414 backend_get_fs_operations (&backend, remote_fs_id, NULL)->gui_icon;
20032415
20042416 gtk_list_store_insert_with_values (task_list_store, NULL, -1,
20052417 TASK_LIST_STORE_STATUS_FIELD, QUEUED,
20202432 }
20212433
20222434 static void
2023 elektroid_add_upload_task_path (const gchar * rel_path, const gchar * src_dir,
2435 elektroid_add_upload_task_path (const gchar * rel_path,
2436 const gchar * src_dir,
20242437 const gchar * dst_dir,
20252438 struct item_iterator *remote_dir_iter,
20262439 gint32 * next_idx)
20272440 {
20282441 gint32 children_next_idx;
2029 gchar *path;
2030 gchar *dst_abs_dir;
2031 gchar *upload_path;
2032 struct item_iterator iter;
2033 struct item_iterator children_remote_item_iterator;
2442 struct item_iterator iter, iter_copy;
2443 gchar *path, *dst_abs_dir, *upload_path;
20342444 gchar *dst_abs_path = chain_path (dst_dir, rel_path);
20352445 gchar *src_abs_path = chain_path (src_dir, rel_path);
20362446
2037 if (local_browser.fs_ops->readdir (&iter, src_abs_path, local_browser.data))
2447 //Check if the item is a dir. If error, it's not.
2448 if (local_browser.fs_ops->readdir (local_browser.backend, &iter,
2449 src_abs_path))
20382450 {
20392451 dst_abs_dir = dirname (dst_abs_path);
2040 upload_path =
2041 connector_get_upload_path (&connector, remote_dir_iter,
2042 remote_browser.fs_ops, dst_abs_dir,
2043 src_abs_path, next_idx);
2044 elektroid_add_task (UPLOAD, src_abs_path, upload_path,
2045 remote_browser.fs_ops->fs);
2046 goto cleanup_not_dir;
2047 }
2048
2049 if (remote_browser.fs_ops->mkdir)
2050 {
2051 if (remote_browser.fs_ops->mkdir (dst_abs_path, remote_browser.data))
2052 {
2053 error_print ("Error while creating remote %s dir\n", dst_abs_path);
2054 goto cleanup;
2055 }
2056
2057 if (!strchr (rel_path, '/'))
2058 {
2059 browser_load_dir (&remote_browser);
2060 }
2061 }
2062
2063 if (!remote_browser.fs_ops->readdir (&children_remote_item_iterator,
2064 dst_abs_path, remote_browser.data))
2065 {
2066 while (!next_item_iterator (&iter))
2067 {
2068 path = chain_path (rel_path, iter.item.name);
2069 elektroid_add_upload_task_path (path, src_dir, dst_dir,
2070 &children_remote_item_iterator,
2071 &children_next_idx);
2072 free (path);
2073 }
2074
2075 free_item_iterator (&children_remote_item_iterator);
2076 }
2077
2078
2452 upload_path = remote_browser.fs_ops->get_upload_path (&backend,
2453 remote_dir_iter,
2454 remote_browser.fs_ops,
2455 dst_abs_dir,
2456 src_abs_path,
2457 next_idx);
2458 if (file_matches_extensions (src_abs_path, local_browser.extensions))
2459 {
2460 elektroid_add_task (UPLOAD, src_abs_path, upload_path,
2461 remote_browser.fs_ops->fs);
2462 }
2463 g_free (upload_path);
2464 goto cleanup;
2465 }
2466
2467 if (!remote_browser.fs_ops->mkdir)
2468 { //No recursive case.
2469 goto cleanup;
2470 }
2471
2472 copy_item_iterator (&iter_copy, &iter, TRUE);
2473 while (!next_item_iterator (&iter))
2474 {
2475 path = chain_path (rel_path, iter.item.name);
2476 elektroid_add_upload_task_path (path, src_dir, dst_dir,
2477 &iter_copy, &children_next_idx);
2478 free (path);
2479 }
2480 free_item_iterator (&iter_copy);
2481
2482 free_item_iterator (&iter);
20792483 cleanup:
2080 free_item_iterator (&iter);
2081 cleanup_not_dir:
20822484 g_free (dst_abs_path);
20832485 g_free (src_abs_path);
20842486 }
20852487
2086 static void
2087 elektroid_add_upload_task (GtkTreeModel * model,
2088 GtkTreePath * path,
2089 GtkTreeIter * iter, gpointer userdata)
2090 {
2091 struct item *item = browser_get_item (model, iter);
2092 struct elektroid_add_upload_task_data *data = userdata;
2093 elektroid_add_upload_task_path (item->name, local_browser.dir,
2094 remote_browser.dir, &data->iter,
2095 &data->index);
2096 browser_free_item (item);
2097 }
2098
2099 static void
2100 elektroid_add_upload_tasks (GtkWidget * object, gpointer userdata)
2101 {
2102 gboolean queued;
2488 static gpointer
2489 elektroid_add_upload_tasks_runner (gpointer userdata)
2490 {
2491 gint32 next_idx;
21032492 GtkTreeIter iter;
2104 struct elektroid_add_upload_task_data data;
2493 GList *selected_rows;
2494 struct item_iterator item_iterator;
2495 gboolean queued_before, queued_after, active;
2496 GtkTreeModel *model;
2497 GtkTreeSelection *selection;
2498
2499 g_timeout_add (100, elektroid_update_basic_sysex_progress, NULL);
2500
2501 model = GTK_TREE_MODEL (gtk_tree_view_get_model (local_browser.view));
2502 selection =
2503 gtk_tree_view_get_selection (GTK_TREE_VIEW (local_browser.view));
2504
2505 queued_before = elektroid_get_next_queued_task (&iter, NULL, NULL, NULL,
2506 NULL);
2507
2508 local_browser.fs_ops->readdir (local_browser.backend, &item_iterator,
2509 local_browser.dir);
2510 next_idx = 1;
2511 selected_rows = gtk_tree_selection_get_selected_rows (selection, NULL);
2512 while (selected_rows)
2513 {
2514 struct item item;
2515 GtkTreeIter path_iter;
2516 GtkTreePath *path = selected_rows->data;
2517
2518 gtk_tree_model_get_iter (model, &path_iter, path);
2519 browser_set_item (model, &path_iter, &item);
2520 elektroid_add_upload_task_path (item.name, local_browser.dir,
2521 remote_browser.dir, &item_iterator,
2522 &next_idx);
2523
2524 g_mutex_lock (&sysex_transfer.mutex);
2525 active = sysex_transfer.active;
2526 g_mutex_unlock (&sysex_transfer.mutex);
2527
2528 if (!active)
2529 {
2530 break;
2531 }
2532
2533 selected_rows = g_list_next (selected_rows);
2534 }
2535 g_list_free_full (selected_rows, (GDestroyNotify) gtk_tree_path_free);
2536 free_item_iterator (&item_iterator);
2537
2538 queued_after = elektroid_get_next_queued_task (&iter, NULL, NULL, NULL,
2539 NULL);
2540 if (!queued_before && queued_after)
2541 {
2542 g_idle_add (elektroid_run_next_task, NULL);
2543 }
2544
2545 sleep (1); //See elektroid_dnd_received_runner
2546 gtk_dialog_response (GTK_DIALOG (progress_dialog), GTK_RESPONSE_ACCEPT);
2547 return NULL;
2548 }
2549
2550 static void
2551 elektroid_add_upload_tasks (GtkWidget * object, gpointer data)
2552 {
21052553 GtkTreeSelection *selection =
21062554 gtk_tree_view_get_selection (GTK_TREE_VIEW (local_browser.view));
21072555
21102558 return;
21112559 }
21122560
2113 queued = elektroid_get_next_queued_task (&iter, NULL, NULL, NULL, NULL);
2114
2115 data.index = 1;
2116 remote_browser.fs_ops->readdir (&data.iter, remote_browser.dir,
2117 remote_browser.data);
2118 gtk_tree_selection_selected_foreach (selection, elektroid_add_upload_task,
2119 &data);
2120 free_item_iterator (&data.iter);
2121
2122 gtk_widget_set_sensitive (rx_sysex_button, FALSE);
2123 gtk_widget_set_sensitive (tx_sysex_button, FALSE);
2124 gtk_widget_set_sensitive (os_upgrade_button, FALSE);
2125
2126 if (!queued)
2127 {
2128 elektroid_run_next_task (NULL);
2129 }
2561 g_mutex_lock (&sysex_transfer.mutex);
2562 sysex_transfer.active = TRUE;
2563 g_mutex_unlock (&sysex_transfer.mutex);
2564
2565 debug_print (1, "Creating SysEx thread...\n");
2566 sysex_thread = g_thread_new ("sysex_thread",
2567 elektroid_add_upload_tasks_runner, NULL);
2568 gtk_window_set_title (GTK_WINDOW (progress_dialog), _("Preparing Tasks"));
2569 gtk_label_set_text (GTK_LABEL (progress_label), _("Waiting..."));
2570 gtk_dialog_run (GTK_DIALOG (progress_dialog));
2571 gtk_widget_hide (GTK_WIDGET (progress_dialog));
2572
2573 elektroid_join_sysex_thread ();
2574
2575 g_mutex_lock (&sysex_transfer.mutex);
2576 sysex_transfer.active = FALSE;
2577 g_mutex_unlock (&sysex_transfer.mutex);
21302578 }
21312579
21322580 static gpointer
21342582 {
21352583 gint res;
21362584 GByteArray *array;
2137
2138 array = g_byte_array_new ();
2585 gchar *dst_path, *dst_dir;
21392586
21402587 debug_print (1, "Remote path: %s\n", transfer.src);
21412588 debug_print (1, "Local path: %s\n", transfer.dst);
21422589
2143 res =
2144 transfer.fs_ops->download (transfer.src, array,
2145 &transfer.control, remote_browser.data);
2146 g_idle_add (elektroid_check_connector_bg, NULL);
2590 dst_path = strdup (transfer.dst);
2591 dst_dir = dirname (dst_path);
2592
2593 if (local_browser.fs_ops->mkdir (local_browser.backend, dst_dir))
2594 {
2595 error_print ("Error while creating local %s dir\n", dst_dir);
2596 transfer.status = COMPLETED_ERROR;
2597 goto end_nodir;
2598 }
2599
2600 array = g_byte_array_new ();
2601
2602 res = transfer.fs_ops->download (remote_browser.backend,
2603 transfer.src, array, &transfer.control);
2604 g_idle_add (elektroid_check_backend_bg, NULL);
21472605
21482606 g_mutex_lock (&transfer.control.mutex);
21492607 if (res && transfer.control.active)
21802638 g_idle_add (elektroid_complete_running_task, NULL);
21812639 g_idle_add (elektroid_run_next_task, NULL);
21822640
2641 end_nodir:
2642 g_free (dst_path);
21832643 return NULL;
21842644 }
21852645
21902650 struct item_iterator *remote_dir_iter)
21912651 {
21922652 struct item_iterator iter, iter_copy;
2193 gchar *path, *id, *download_path, *dst_abs_dirc, *dst_abs_dir;
2653 gchar *path, *dst_abs_dir, *download_path, *id;
21942654 gchar *src_abs_path = chain_path (src_dir, rel_path);
21952655 gchar *dst_abs_path = chain_path (dst_dir, rel_path);
21962656
2197 if (remote_browser.
2198 fs_ops->readdir (&iter, src_abs_path, remote_browser.data))
2199 {
2200 dst_abs_dirc = strdup (dst_abs_path);
2201 dst_abs_dir = dirname (dst_abs_dirc);
2202 download_path =
2203 connector_get_download_path (&connector, remote_dir_iter,
2204 remote_browser.fs_ops, dst_abs_dir,
2205 src_abs_path);
2206 elektroid_add_task (DOWNLOAD, src_abs_path, download_path,
2207 remote_browser.fs_ops->fs);
2208 g_free (dst_abs_dirc);
2657 //Check if the item is a dir. If error, it's not.
2658 if (remote_browser.fs_ops->readdir (remote_browser.backend, &iter,
2659 src_abs_path))
2660 {
2661 dst_abs_dir = dirname (dst_abs_path);
2662 download_path = remote_browser.fs_ops->get_download_path (&backend,
2663 remote_dir_iter,
2664 remote_browser.fs_ops,
2665 dst_abs_dir,
2666 src_abs_path);
2667 if (file_matches_extensions (src_abs_path, remote_browser.extensions))
2668 {
2669 elektroid_add_task (DOWNLOAD, src_abs_path, download_path,
2670 remote_browser.fs_ops->fs);
2671 }
22092672 g_free (download_path);
2210 goto cleanup_not_dir;
2211 }
2212
2213 if (local_browser.fs_ops->mkdir (dst_abs_path, NULL))
2214 {
2215 error_print ("Error while creating local %s dir\n", dst_abs_path);
22162673 goto cleanup;
22172674 }
22182675
22192676 copy_item_iterator (&iter_copy, &iter, TRUE);
22202677 while (!next_item_iterator (&iter))
22212678 {
2222 id = remote_browser.fs_ops->getid (&iter.item);
2679 id = remote_browser.fs_ops->get_id (&iter.item);
22232680 path = chain_path (rel_path, id);
22242681 elektroid_add_download_task_path (path, src_dir, dst_dir, &iter_copy);
22252682 g_free (path);
22272684 }
22282685 free_item_iterator (&iter_copy);
22292686
2687 free_item_iterator (&iter);
22302688 cleanup:
2231 free_item_iterator (&iter);
2232 cleanup_not_dir:
22332689 free (dst_abs_path);
22342690 free (src_abs_path);
22352691 }
22362692
2237 static void
2238 elektroid_add_download_task (GtkTreeModel * model,
2239 GtkTreePath * path,
2240 GtkTreeIter * iter, gpointer data)
2241 {
2242 struct item *item = browser_get_item (model, iter);
2243 char *id = remote_browser.fs_ops->getid (item);
2244
2245 elektroid_add_download_task_path (id, remote_browser.dir,
2246 local_browser.dir, data);
2247 g_free (id);
2248 browser_free_item (item);
2693 static gpointer
2694 elektroid_add_download_tasks_runner (gpointer data)
2695 {
2696 GtkTreeIter iter;
2697 GList *selected_rows;
2698 struct item_iterator item_iterator;
2699 gboolean queued_before, queued_after, active;
2700 GtkTreeModel *model;
2701 GtkTreeSelection *selection;
2702
2703 g_timeout_add (100, elektroid_update_basic_sysex_progress, NULL);
2704
2705 model = GTK_TREE_MODEL (gtk_tree_view_get_model (remote_browser.view));
2706 selection =
2707 gtk_tree_view_get_selection (GTK_TREE_VIEW (remote_browser.view));
2708
2709 queued_before = elektroid_get_next_queued_task (&iter, NULL, NULL, NULL,
2710 NULL);
2711
2712 backend_enable_cache (remote_browser.backend);
2713
2714 remote_browser.fs_ops->readdir (remote_browser.backend, &item_iterator,
2715 remote_browser.dir);
2716 selected_rows = gtk_tree_selection_get_selected_rows (selection, NULL);
2717 while (selected_rows)
2718 {
2719 gchar *id;
2720 struct item item;
2721 GtkTreeIter path_iter;
2722 GtkTreePath *path = selected_rows->data;
2723
2724 gtk_tree_model_get_iter (model, &path_iter, path);
2725 browser_set_item (model, &path_iter, &item);
2726 id = remote_browser.fs_ops->get_id (&item);
2727 elektroid_add_download_task_path (id, remote_browser.dir,
2728 local_browser.dir, &item_iterator);
2729 g_free (id);
2730
2731 g_mutex_lock (&sysex_transfer.mutex);
2732 active = sysex_transfer.active;
2733 g_mutex_unlock (&sysex_transfer.mutex);
2734
2735 if (!active)
2736 {
2737 break;
2738 }
2739
2740 selected_rows = g_list_next (selected_rows);
2741 }
2742 g_list_free_full (selected_rows, (GDestroyNotify) gtk_tree_path_free);
2743 free_item_iterator (&item_iterator);
2744
2745 backend_disable_cache (remote_browser.backend);
2746
2747 queued_after = elektroid_get_next_queued_task (&iter, NULL, NULL, NULL,
2748 NULL);
2749 if (!queued_before && queued_after)
2750 {
2751 g_idle_add (elektroid_run_next_task, NULL);
2752 }
2753
2754 sleep (1); //See elektroid_dnd_received_runner
2755 gtk_dialog_response (GTK_DIALOG (progress_dialog), GTK_RESPONSE_ACCEPT);
2756 return NULL;
22492757 }
22502758
22512759 static void
22522760 elektroid_add_download_tasks (GtkWidget * object, gpointer data)
22532761 {
2254 gboolean queued;
2255 GtkTreeIter iter;
2256 struct item_iterator item_iterator;
22572762 GtkTreeSelection *selection =
22582763 gtk_tree_view_get_selection (GTK_TREE_VIEW (remote_browser.view));
22592764
22622767 return;
22632768 }
22642769
2265 queued = elektroid_get_next_queued_task (&iter, NULL, NULL, NULL, NULL);
2266
2267 remote_browser.fs_ops->readdir (&item_iterator, remote_browser.dir,
2268 remote_browser.data);
2269 gtk_tree_selection_selected_foreach (selection, elektroid_add_download_task,
2270 &item_iterator);
2271 free_item_iterator (&item_iterator);
2272
2273 gtk_widget_set_sensitive (rx_sysex_button, FALSE);
2274 gtk_widget_set_sensitive (tx_sysex_button, FALSE);
2275 gtk_widget_set_sensitive (os_upgrade_button, FALSE);
2276
2277 if (!queued)
2278 {
2279 elektroid_run_next_task (NULL);
2280 }
2770 g_mutex_lock (&sysex_transfer.mutex);
2771 sysex_transfer.active = TRUE;
2772 g_mutex_unlock (&sysex_transfer.mutex);
2773
2774 debug_print (1, "Creating SysEx thread...\n");
2775 sysex_thread = g_thread_new ("sysex_thread",
2776 elektroid_add_download_tasks_runner, NULL);
2777 gtk_window_set_title (GTK_WINDOW (progress_dialog), _("Preparing Tasks"));
2778 gtk_label_set_text (GTK_LABEL (progress_label), _("Waiting..."));
2779 gtk_dialog_run (GTK_DIALOG (progress_dialog));
2780 gtk_widget_hide (GTK_WIDGET (progress_dialog));
2781
2782 elektroid_join_sysex_thread ();
2783
2784 g_mutex_lock (&sysex_transfer.mutex);
2785 sysex_transfer.active = FALSE;
2786 g_mutex_unlock (&sysex_transfer.mutex);
22812787 }
22822788
22832789 static gboolean
22842790 elektroid_set_progress_value (gpointer data)
22852791 {
22862792 GtkTreeIter iter;
2287 gdouble *value = data;
2793 gdouble progress;
22882794
22892795 if (elektroid_get_running_task (&iter))
22902796 {
2797 g_mutex_lock (&transfer.control.mutex);
2798 progress = transfer.control.progress;
2799 g_mutex_unlock (&transfer.control.mutex);
2800
22912801 gtk_list_store_set (task_list_store, &iter,
22922802 TASK_LIST_STORE_PROGRESS_FIELD,
2293 100.0 * (*value), -1);
2803 100.0 * progress, -1);
22942804 }
22952805
22962806 free (data);
22992809 }
23002810
23012811 static void
2302 elektroid_update_progress (gdouble progress)
2303 {
2304 gdouble *value = malloc (sizeof (gdouble));
2305 *value = progress;
2306 g_idle_add (elektroid_set_progress_value, value);
2812 elektroid_update_progress (struct job_control *control)
2813 {
2814 g_idle_add (elektroid_set_progress_value, NULL);
23072815 }
23082816
23092817 static gboolean
23722880 elektroid_remote_key_press (GtkWidget * widget, GdkEventKey * event,
23732881 gpointer data)
23742882 {
2375 if (event->type == GDK_KEY_PRESS)
2376 {
2377 if (event->state & GDK_CONTROL_MASK && event->keyval == GDK_KEY_Left)
2378 {
2379 if (remote_browser.fs_ops->download)
2380 {
2381 struct connector *connector = remote_browser.data;
2382 connector_enable_dir_cache (connector);
2383 elektroid_add_download_tasks (NULL, NULL);
2384 connector_disable_dir_cache (connector);
2385 }
2386 return TRUE;
2387 }
2388 else
2389 {
2390 return elektroid_common_key_press (widget, event, data);
2391 }
2392 }
2393
2394 return FALSE;
2883 if (event->type != GDK_KEY_PRESS)
2884 {
2885 return FALSE;
2886 }
2887
2888 if (!(event->state & GDK_CONTROL_MASK) || event->keyval != GDK_KEY_Left)
2889 {
2890 return elektroid_common_key_press (widget, event, data);
2891 }
2892
2893 if (!remote_browser.fs_ops->download)
2894 {
2895 return FALSE;
2896 }
2897
2898 elektroid_add_download_tasks (NULL, NULL);
2899 return TRUE;
23952900 }
23962901
23972902 static gboolean
23982903 elektroid_local_key_press (GtkWidget * widget, GdkEventKey * event,
23992904 gpointer data)
24002905 {
2401 if (event->type == GDK_KEY_PRESS)
2402 {
2403 if (event->state & GDK_CONTROL_MASK && event->keyval == GDK_KEY_Right)
2404 {
2405 if (remote_browser.fs_ops->upload)
2906 if (event->type != GDK_KEY_PRESS)
2907 {
2908 return FALSE;
2909 }
2910
2911 if (!(event->state & GDK_CONTROL_MASK) || event->keyval != GDK_KEY_Right)
2912 {
2913 return elektroid_common_key_press (widget, event, data);
2914 }
2915
2916 if (remote_browser.fs_ops->options & FS_OPTION_SLOT_STORAGE)
2917 {
2918 //Slot mode needs a slot destination.
2919 return FALSE;
2920 }
2921
2922 if (!remote_browser.fs_ops->upload)
2923 {
2924 return FALSE;
2925 }
2926
2927 elektroid_add_upload_tasks (NULL, NULL);
2928 return TRUE;
2929 }
2930
2931 static void
2932 elektroid_set_fs (GtkWidget * object, gpointer data)
2933 {
2934 GtkTreeIter iter;
2935 GValue fsv = G_VALUE_INIT;
2936 gint fs;
2937
2938 if (!gtk_combo_box_get_active_iter (GTK_COMBO_BOX (fs_combo), &iter))
2939 {
2940 *remote_browser.dir = 0;
2941 remote_browser.fs_ops = NULL;
2942 browser_reset (&remote_browser);
2943 elektroid_set_local_file_extensions (0);
2944 browser_update_fs_options (&remote_browser);
2945 browser_load_dir (&local_browser);
2946 return;
2947 }
2948
2949 gtk_tree_model_get_value (GTK_TREE_MODEL (fs_list_store),
2950 &iter, FS_LIST_STORE_ID_FIELD, &fsv);
2951 fs = g_value_get_uint (&fsv);
2952
2953 remote_browser.fs_ops = backend_get_fs_operations (&backend, fs, NULL);
2954 remote_browser.file_icon = remote_browser.fs_ops->gui_icon;
2955
2956 strcpy (remote_browser.dir,
2957 backend.type == BE_TYPE_SYSTEM ? local_browser.dir : "/");
2958
2959 gtk_widget_set_visible (remote_play_separator,
2960 backend.type == BE_TYPE_SYSTEM);
2961 gtk_widget_set_visible (remote_play_menuitem,
2962 backend.type == BE_TYPE_SYSTEM);
2963 gtk_widget_set_visible (remote_options_separator,
2964 backend.type == BE_TYPE_SYSTEM);
2965 gtk_widget_set_visible (remote_open_menuitem,
2966 backend.type == BE_TYPE_SYSTEM);
2967 gtk_widget_set_visible (remote_show_menuitem,
2968 backend.type == BE_TYPE_SYSTEM);
2969 gtk_widget_set_visible (remote_actions_separator,
2970 backend.type == BE_TYPE_SYSTEM
2971 || remote_browser.fs_ops->rename != NULL
2972 || remote_browser.fs_ops->delete != NULL);
2973 gtk_widget_set_visible (remote_rename_menuitem,
2974 remote_browser.fs_ops->rename != NULL);
2975 gtk_widget_set_visible (remote_delete_menuitem,
2976 remote_browser.fs_ops->delete != NULL);
2977 gtk_widget_set_visible (local_audio_box, PLAYER_VISIBLE);
2978
2979 gtk_tree_view_column_set_visible (remote_tree_view_index_column,
2980 remote_browser.fs_ops->options &
2981 FS_OPTION_SHOW_INDEX_COLUMN);
2982 gtk_tree_view_column_set_visible (remote_tree_view_slot_column,
2983 (remote_browser.fs_ops->options &
2984 FS_OPTION_SLOT_STORAGE)
2985 && remote_browser.fs_ops->get_slot);
2986
2987 if (remote_browser.fs_ops->options & FS_OPTION_SLOT_STORAGE)
2988 {
2989 gtk_drag_dest_set ((GtkWidget *) remote_browser.view,
2990 GTK_DEST_DEFAULT_ALL, TARGET_ENTRIES_REMOTE_DST_SLOT,
2991 G_N_ELEMENTS (TARGET_ENTRIES_REMOTE_DST_SLOT),
2992 GDK_ACTION_COPY);
2993 }
2994 else
2995 {
2996 gtk_drag_dest_set ((GtkWidget *) remote_browser.view,
2997 GTK_DEST_DEFAULT_ALL, TARGET_ENTRIES_REMOTE_DST,
2998 G_N_ELEMENTS (TARGET_ENTRIES_REMOTE_DST),
2999 GDK_ACTION_COPY);
3000 }
3001
3002 if (PLAYER_VISIBLE)
3003 {
3004 audio_stop (&audio, TRUE);
3005 }
3006
3007 browser_set_options (&remote_browser);
3008
3009 elektroid_set_remote_file_extensions (fs);
3010 browser_update_fs_options (&remote_browser);
3011 local_browser.file_icon = remote_browser.file_icon;
3012 elektroid_set_local_file_extensions (fs);
3013
3014 browser_load_dir (&remote_browser);
3015 browser_load_dir (&local_browser);
3016 }
3017
3018 static gboolean
3019 elektroid_fill_fs_combo_bg (gpointer data)
3020 {
3021 const struct fs_operations *ops;
3022 gint fs, i;
3023
3024 gtk_list_store_clear (fs_list_store);
3025
3026 if (!backend.device_desc.filesystems)
3027 {
3028 elektroid_set_fs (NULL, NULL);
3029 return FALSE;
3030 }
3031
3032 for (fs = 1, i = 0; i < MAX_BACKEND_FSS; fs = fs << 1, i++)
3033 {
3034 if (backend.device_desc.filesystems & fs)
3035 {
3036 ops = backend_get_fs_operations (&backend, fs, NULL);
3037 if (ops->gui_name)
24063038 {
2407 elektroid_add_upload_tasks (NULL, NULL);
3039 gtk_list_store_insert_with_values (fs_list_store, NULL, -1,
3040 FS_LIST_STORE_ID_FIELD,
3041 fs,
3042 FS_LIST_STORE_ICON_FIELD,
3043 ops->gui_icon,
3044 FS_LIST_STORE_NAME_FIELD,
3045 elektroid_get_fs_name (fs),
3046 -1);
24083047 }
2409 return TRUE;
2410 }
2411 else
2412 {
2413 return elektroid_common_key_press (widget, event, data);
2414 }
2415 }
3048 }
3049 }
3050
3051 if (i)
3052 {
3053 debug_print (1, "Selecting first filesystem...\n");
3054 gtk_combo_box_set_active (GTK_COMBO_BOX (fs_combo), 0);
3055 }
3056 gtk_dialog_response (GTK_DIALOG (progress_dialog), GTK_RESPONSE_ACCEPT);
24163057
24173058 return FALSE;
24183059 }
24193060
2420 static void
2421 elektroid_set_fs (GtkWidget * object, gpointer data)
3061 static gpointer
3062 elektroid_set_device_thread (gpointer data)
3063 {
3064 gchar *id = data;
3065 g_timeout_add (100, elektroid_update_basic_sysex_progress, NULL);
3066 sysex_transfer.err = connector_init (&backend, id, NULL, &sysex_transfer);
3067
3068 // TODO: Until a better solution is found, this sleep is necessary.
3069 // The reason is that this thread might end before the dialog is showed, which leads to erratic dialog behaviour.
3070 // This wait has impact.
3071 sleep (1);
3072 gtk_dialog_response (GTK_DIALOG (progress_dialog),
3073 backend_check (&backend) ? GTK_RESPONSE_ACCEPT
3074 : GTK_RESPONSE_CANCEL);
3075 return NULL;
3076 }
3077
3078 static void
3079 elektroid_set_device (GtkWidget * object, gpointer data)
24223080 {
24233081 GtkTreeIter iter;
2424 GtkTreeSortable *sortable;
2425 GValue fsv = G_VALUE_INIT;
2426 enum connector_fs fs;
2427
2428 if (gtk_combo_box_get_active_iter (fs_combo, &iter) == TRUE)
2429 {
2430 gtk_tree_model_get_value (GTK_TREE_MODEL (fs_list_store),
2431 &iter, FS_LIST_STORE_ID_FIELD, &fsv);
2432 fs = g_value_get_uint (&fsv);
2433
2434 remote_browser.fs_ops = connector_get_fs_operations (fs);
2435 remote_browser.file_icon = elektroid_get_inventory_icon_for_fs (fs);
2436 strcpy (remote_browser.dir, "/");
2437 browser_load_dir (&remote_browser);
2438
2439 local_browser.file_icon = remote_browser.file_icon;
2440 elektroid_set_file_extensions_for_fs (&local_browser.extensions, fs);
2441 browser_load_dir (&local_browser);
2442
2443 gtk_widget_set_sensitive (remote_browser.up_button,
2444 remote_browser.fs_ops->readdir != NULL);
2445 gtk_widget_set_visible (remote_browser.add_dir_button,
2446 remote_browser.fs_ops->mkdir != NULL);
2447 gtk_widget_set_sensitive (remote_browser.refresh_button,
2448 remote_browser.fs_ops->readdir != NULL);
2449
2450 gtk_widget_set_visible (remote_rename_menuitem,
2451 remote_browser.fs_ops->rename != NULL);
2452 gtk_widget_set_visible (remote_delete_menuitem,
2453 remote_browser.fs_ops->delete != NULL);
2454 gtk_widget_set_visible (local_audio_box, fs == FS_SAMPLES);
2455 gtk_tree_view_column_set_visible (remote_tree_view_index_column,
2456 fs == FS_DATA_PRJ
2457 || fs == FS_DATA_SND);
2458
2459 if (fs != FS_SAMPLES)
2460 {
2461 audio_stop (&audio, TRUE);
2462 }
2463
2464 sortable =
2465 GTK_TREE_SORTABLE (gtk_tree_view_get_model (remote_browser.view));
2466
2467 if (fs == FS_SAMPLES || fs == FS_RAW_PRESETS)
2468 {
2469 gtk_tree_sortable_set_sort_func (sortable,
2470 BROWSER_LIST_STORE_NAME_FIELD,
2471 browser_sort_samples, NULL, NULL);
2472 gtk_tree_sortable_set_sort_column_id (sortable,
2473 BROWSER_LIST_STORE_NAME_FIELD,
2474 GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID);
2475 }
2476 else if (fs == FS_DATA_PRJ || fs == FS_DATA_SND)
2477 {
2478 gtk_tree_sortable_set_sort_func (sortable,
2479 BROWSER_LIST_STORE_INDEX_FIELD,
2480 browser_sort_data, NULL, NULL);
2481 gtk_tree_sortable_set_sort_column_id (sortable,
2482 BROWSER_LIST_STORE_INDEX_FIELD,
2483 GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID);
2484 }
2485 }
2486 }
2487
2488 static void
2489 elektroid_fill_fs_combo ()
2490 {
2491 gtk_list_store_clear (fs_list_store);
2492
2493 for (int fs = FS_SAMPLES, i = 0; fs <= FS_DATA_SND; fs = fs << 1, i++)
2494 {
2495 if (GUI_FSS & fs && connector.device_desc.filesystems & fs)
2496 {
2497 gtk_list_store_insert_with_values (fs_list_store, NULL, -1,
2498 FS_LIST_STORE_ID_FIELD,
2499 fs,
2500 FS_LIST_STORE_ICON_FIELD,
2501 ELEKTROID_FS_ICONS[i],
2502 FS_LIST_STORE_NAME_FIELD,
2503 elektroid_get_fs_name (fs), -1);
2504 }
2505 }
2506
2507 debug_print (1, "Selecting first filesystem...\n");
2508 gtk_combo_box_set_active (fs_combo, 0);
2509 }
2510
2511 static void
2512 elektroid_set_device (GtkWidget * object, gpointer data)
2513 {
2514 GtkTreeIter iter;
2515 GValue cardv = G_VALUE_INIT;
2516 guint card;
2517
2518 if (gtk_combo_box_get_active_iter (devices_combo, &iter) == TRUE)
2519 {
2520 if (connector_check (&connector))
2521 {
2522 connector_destroy (&connector);
2523 }
2524
2525 gtk_tree_model_get_value (GTK_TREE_MODEL (devices_list_store),
2526 &iter, DEVICES_LIST_STORE_CARD_FIELD, &cardv);
2527
2528 card = g_value_get_uint (&cardv);
2529
2530 if (connector_init (&connector, card, NULL) < 0)
2531 {
2532 error_print ("Error while connecting\n");
2533 }
2534
2535 if (elektroid_check_connector ())
2536 {
2537 elektroid_fill_fs_combo ();
2538 }
2539 }
2540 }
2541
2542 static void
2543 elektroid_dnd_received_local (const gchar * type_name, const gchar * dir,
2544 const gchar * name, const gchar * filename,
2545 struct item_iterator *remote_item_iterator)
3082 gchar *id, *name;
3083 gint dres;
3084
3085 sysex_transfer.active = TRUE;
3086
3087 elektroid_cancel_all_tasks_and_wait ();
3088
3089 if (!gtk_combo_box_get_active_iter (GTK_COMBO_BOX (devices_combo), &iter))
3090 {
3091 return;
3092 }
3093
3094 if (backend_check (&backend))
3095 {
3096 backend_destroy (&backend);
3097 }
3098
3099 gtk_tree_model_get (GTK_TREE_MODEL (devices_list_store), &iter,
3100 DEVICES_LIST_STORE_ID_FIELD, &id,
3101 DEVICES_LIST_STORE_NAME_FIELD, &name, -1);
3102
3103 if (!strcmp (id, BE_SYSTEM_ID) && !backend_init (&backend, id)
3104 && !system_handshake (&backend))
3105 {
3106 debug_print (1, "System backend detected\n");
3107 elektroid_fill_fs_combo_bg (NULL);
3108 elektroid_check_backend_bg (NULL);
3109 g_free (id);
3110 g_free (name);
3111 return;
3112 }
3113
3114 debug_print (1, "Creating SysEx thread...\n");
3115 sysex_thread = g_thread_new ("sysex_thread", elektroid_set_device_thread,
3116 id);
3117
3118 gtk_window_set_title (GTK_WINDOW (progress_dialog),
3119 _("Connecting to Device"));
3120 gtk_label_set_text (GTK_LABEL (progress_label), _("Connecting..."));
3121 dres = gtk_dialog_run (GTK_DIALOG (progress_dialog));
3122 gtk_widget_hide (GTK_WIDGET (progress_dialog));
3123
3124 elektroid_join_sysex_thread ();
3125
3126 if (sysex_transfer.err && sysex_transfer.err != -ECANCELED)
3127 {
3128 error_print ("Error while connecting: %s\n",
3129 g_strerror (-sysex_transfer.err));
3130 show_error_msg (_("Device “%s” not recognized: %s"), name,
3131 g_strerror (-sysex_transfer.err));
3132 }
3133
3134 g_free (id);
3135 g_free (name);
3136
3137 elektroid_check_backend_bg (NULL);
3138 if (dres == GTK_RESPONSE_ACCEPT)
3139 {
3140 elektroid_fill_fs_combo_bg (NULL);
3141 }
3142 else
3143 {
3144 gtk_combo_box_set_active (GTK_COMBO_BOX (devices_combo), -1);
3145 }
3146 }
3147
3148 static void
3149 elektroid_dnd_received_local (const gchar * dir, const gchar * name,
3150 const gchar * filename)
25463151 {
25473152 gchar *dst_path;
25483153 gint res;
25493154
2550 if (strcmp (type_name, TEXT_URI_LIST_STD) == 0)
2551 {
2552 if (strcmp (dir, local_browser.dir))
2553 {
2554 dst_path = chain_path (local_browser.dir, name);
2555 res = local_browser.fs_ops->move (filename, dst_path, NULL);
2556 if (res)
2557 {
2558 show_error_msg (_
2559 ("Error while moving from “%s” to “%s”: %s."),
2560 filename, dst_path, g_strerror (res));
2561 }
2562 g_free (dst_path);
2563 }
2564 else
2565 {
2566 debug_print (1, MSG_WARN_SAME_SRC_DST);
2567 }
2568 }
2569 else if (strcmp (type_name, TEXT_URI_LIST_ELEKTROID) == 0)
2570 {
2571 elektroid_add_download_task_path (name, dir, local_browser.dir,
2572 remote_item_iterator);
2573 }
2574 }
2575
2576 static void
2577 elektroid_dnd_received_remote (const gchar * type_name, const gchar * dir,
2578 const gchar * name, const gchar * filename,
3155 if (strcmp (dir, local_browser.dir))
3156 {
3157 dst_path = chain_path (local_browser.dir, name);
3158 res = local_browser.fs_ops->move (local_browser.backend, filename,
3159 dst_path);
3160 if (res)
3161 {
3162 error_print ("Error while moving from “%s” to “%s”: %s.",
3163 filename, dst_path, g_strerror (-res));
3164 }
3165 g_free (dst_path);
3166 }
3167 else
3168 {
3169 debug_print (1, MSG_WARN_SAME_SRC_DST);
3170 }
3171 }
3172
3173 static void
3174 elektroid_dnd_received_remote (const gchar * dir, const gchar * name,
3175 const gchar * filename,
25793176 struct item_iterator *remote_item_iterator,
25803177 gint32 * next_idx)
25813178 {
25823179 gchar *dst_path;
25833180 gint res;
25843181
2585 if (strcmp (type_name, TEXT_URI_LIST_ELEKTROID) == 0)
2586 {
2587 if (strcmp (dir, remote_browser.dir))
2588 {
2589 dst_path =
2590 connector_get_upload_path (&connector,
2591 remote_item_iterator,
2592 remote_browser.fs_ops,
2593 remote_browser.dir, name, next_idx);
2594 res =
2595 remote_browser.fs_ops->move (filename, dst_path,
2596 remote_browser.data);
2597 if (res)
3182 if (strcmp (dir, remote_browser.dir))
3183 {
3184 dst_path =
3185 remote_browser.fs_ops->get_upload_path (&backend,
3186 remote_item_iterator,
3187 remote_browser.fs_ops,
3188 remote_browser.dir, name,
3189 next_idx);
3190 res = remote_browser.fs_ops->move (remote_browser.backend, filename,
3191 dst_path);
3192 if (res)
3193 {
3194 error_print ("Error while moving from “%s” to “%s”: %s.",
3195 filename, dst_path, g_strerror (-res));
3196 }
3197 g_free (dst_path);
3198 g_idle_add (elektroid_load_remote_if_midi, &remote_browser);
3199 }
3200 else
3201 {
3202 debug_print (1, MSG_WARN_SAME_SRC_DST);
3203 }
3204 }
3205
3206 static void
3207 elektroid_add_upload_task_slot (const gchar * name,
3208 const gchar * src_file_path, gint slot)
3209 {
3210 GtkTreeIter iter;
3211 GtkTreeModel *model;
3212 struct item item;
3213 gchar *dst_file_path, *name_wo_ext;
3214
3215 model =
3216 GTK_TREE_MODEL (gtk_tree_view_get_model
3217 (GTK_TREE_VIEW (remote_browser.view)));
3218
3219 if (gtk_tree_model_get_iter (model, &iter, remote_browser.dnd_motion_path))
3220 {
3221 for (gint i = 0; i < slot; i++)
3222 {
3223 if (!gtk_tree_model_iter_next (model, &iter))
25983224 {
2599 show_error_msg (_
2600 ("Error while moving from “%s” to “%s”: %s."),
2601 filename, dst_path, g_strerror (res));
3225 return;
26023226 }
2603 g_free (dst_path);
2604 browser_load_dir (&remote_browser);
2605 }
2606 else
2607 {
2608 debug_print (1, MSG_WARN_SAME_SRC_DST);
2609 }
2610 }
2611 else if (strcmp (type_name, TEXT_URI_LIST_STD) == 0)
2612 {
2613 elektroid_add_upload_task_path (name, dir, remote_browser.dir,
2614 remote_item_iterator, next_idx);
2615 }
3227 }
3228
3229 browser_set_item (model, &iter, &item);
3230
3231 name_wo_ext = strdup (name);
3232 remove_ext (name_wo_ext);
3233 dst_file_path = g_malloc (PATH_MAX);
3234 snprintf (dst_file_path, PATH_MAX, "%s%s%d%s%s", remote_browser.dir,
3235 strcmp (remote_browser.dir, "/") ? "/" : "", item.id,
3236 BE_SAMPLE_ID_NAME_SEPARATOR, name_wo_ext);
3237 g_free (name_wo_ext);
3238
3239 elektroid_add_task (UPLOAD, src_file_path, dst_file_path,
3240 remote_browser.fs_ops->fs);
3241 }
3242 }
3243
3244 static gpointer
3245 elektroid_dnd_received_runner (gpointer data)
3246 {
3247 GtkWidget *widget = data;
3248 gint32 next_idx = 1;
3249 GtkTreeIter iter;
3250 struct item_iterator remote_item_iterator;
3251 gboolean queued_before, queued_after, load_remote, active;
3252
3253 g_timeout_add (100, elektroid_update_basic_sysex_progress, NULL);
3254
3255 queued_before = elektroid_get_next_queued_task (&iter, NULL, NULL, NULL,
3256 NULL);
3257
3258 if (widget == GTK_WIDGET (local_browser.view))
3259 {
3260 backend_enable_cache (&backend);
3261 }
3262
3263 load_remote = widget == GTK_WIDGET (remote_browser.view) ||
3264 strcmp (dnd_type_name, TEXT_URI_LIST_ELEKTROID) == 0;
3265
3266 if (load_remote)
3267 {
3268 remote_browser.fs_ops->readdir (remote_browser.backend,
3269 &remote_item_iterator,
3270 remote_browser.dir);
3271 }
3272
3273 for (gint i = 0; dnd_uris[i] != NULL; i++)
3274 {
3275 g_mutex_lock (&sysex_transfer.mutex);
3276 active = sysex_transfer.active;
3277 g_mutex_unlock (&sysex_transfer.mutex);
3278
3279 if (!active)
3280 {
3281 goto end;
3282 }
3283
3284 gchar *filename = g_filename_from_uri (dnd_uris[i], NULL, NULL);
3285 gchar *path_basename = strdup (filename);
3286 gchar *path_dirname = strdup (filename);
3287 gchar *name = basename (path_basename);
3288 gchar *dir = dirname (path_dirname);
3289
3290 if (widget == GTK_WIDGET (local_browser.view))
3291 {
3292 if (strcmp (dnd_type_name, TEXT_URI_LIST_STD) == 0)
3293 {
3294 elektroid_dnd_received_local (dir, name, filename);
3295 }
3296 else if (strcmp (dnd_type_name, TEXT_URI_LIST_ELEKTROID) == 0)
3297 {
3298 elektroid_add_download_task_path (name, dir, local_browser.dir,
3299 &remote_item_iterator);
3300 }
3301 }
3302 else if (widget == GTK_WIDGET (remote_browser.view))
3303 {
3304 if (strcmp (dnd_type_name, TEXT_URI_LIST_ELEKTROID) == 0)
3305 {
3306 elektroid_dnd_received_remote (dir, name, filename,
3307 &remote_item_iterator,
3308 &next_idx);
3309 }
3310 else if (strcmp (dnd_type_name, TEXT_URI_LIST_STD) == 0)
3311 {
3312 if (remote_browser.fs_ops->options & FS_OPTION_SLOT_STORAGE)
3313 {
3314 elektroid_add_upload_task_slot (name, filename, i);
3315 }
3316 else
3317 {
3318 elektroid_add_upload_task_path (name, dir,
3319 remote_browser.dir,
3320 &remote_item_iterator,
3321 &next_idx);
3322 }
3323 }
3324 }
3325
3326 g_free (path_basename);
3327 g_free (path_dirname);
3328 g_free (filename);
3329 }
3330
3331 end:
3332 if (load_remote)
3333 {
3334 free_item_iterator (&remote_item_iterator);
3335 }
3336
3337 if (widget == GTK_WIDGET (local_browser.view))
3338 {
3339 backend_disable_cache (&backend);
3340 }
3341
3342 queued_after = elektroid_get_next_queued_task (&iter, NULL, NULL, NULL,
3343 NULL);
3344 if (!queued_before && queued_after)
3345 {
3346 g_idle_add (elektroid_run_next_task, NULL);
3347 }
3348
3349 // TODO: Until a better solution is found, this sleep is necessary.
3350 // The reason is that this thread might end before the dialog is showed, which leads to erratic dialog behaviour.
3351 // As we start to run the next task before sleeping, this has no impact.
3352 sleep (1);
3353 gtk_dialog_response (GTK_DIALOG (progress_dialog), GTK_RESPONSE_ACCEPT);
3354 return NULL;
26163355 }
26173356
26183357 static void
26223361 guint info, guint time, gpointer userdata)
26233362 {
26243363 gchar *data;
2625 gchar **uris;
2626 gchar *filename;
2627 gchar *path_basename;
2628 gchar *path_dirname;
2629 gchar *name;
2630 gchar *dir;
2631 GtkTreeIter iter;
2632 gboolean queued;
26333364 GdkAtom type;
2634 gchar *type_name;
2635 gint32 next_idx = 1;
2636 struct item_iterator remote_item_iterator;
2637 struct connector *connector = remote_browser.data;
26383365
26393366 if (selection_data == NULL
26403367 || !gtk_selection_data_get_length (selection_data)
26413368 || info != TARGET_STRING)
26423369 {
2643 goto end;
3370 gtk_drag_finish (context, TRUE, TRUE, time);
3371 return;
26443372 }
26453373
26463374 type = gtk_selection_data_get_data_type (selection_data);
2647 type_name = gdk_atom_name (type);
3375 dnd_type_name = gdk_atom_name (type);
26483376
26493377 data = (gchar *) gtk_selection_data_get_data (selection_data);
2650 debug_print (1, "DND received data (%s):\n%s\n", type_name, data);
2651
2652 uris = g_uri_list_extract_uris (data);
2653 queued = elektroid_get_next_queued_task (&iter, NULL, NULL, NULL, NULL);
2654
2655 if (widget == GTK_WIDGET (local_browser.view))
2656 {
2657 connector_enable_dir_cache (connector);
2658 }
2659
2660 remote_browser.fs_ops->readdir (&remote_item_iterator, remote_browser.dir,
2661 connector);
2662
2663 for (int i = 0; uris[i] != NULL; i++)
2664 {
2665 filename = g_filename_from_uri (uris[i], NULL, NULL);
2666 path_basename = strdup (filename);
2667 path_dirname = strdup (filename);
2668 name = basename (path_basename);
2669 dir = dirname (path_dirname);
2670
2671 if (widget == GTK_WIDGET (local_browser.view))
2672 {
2673 elektroid_dnd_received_local (type_name, dir, name, filename,
2674 &remote_item_iterator);
2675 }
2676 else if (widget == GTK_WIDGET (remote_browser.view))
2677 {
2678 elektroid_dnd_received_remote (type_name, dir, name, filename,
2679 &remote_item_iterator, &next_idx);
2680 }
2681
2682 g_free (path_basename);
2683 g_free (path_dirname);
2684 g_free (filename);
2685 }
2686
2687 free_item_iterator (&remote_item_iterator);
2688
2689 if (widget == GTK_WIDGET (local_browser.view))
2690 {
2691 connector_disable_dir_cache (connector);
2692 }
2693
2694 if (!queued)
2695 {
2696 elektroid_run_next_task (NULL);
2697 }
2698
2699 g_strfreev (uris);
2700
2701 end:
3378 debug_print (1, "DND received data (%s):\n%s\n", dnd_type_name, data);
3379
3380 dnd_uris = g_uri_list_extract_uris (data);
3381
27023382 gtk_drag_finish (context, TRUE, TRUE, time);
3383
3384 g_mutex_lock (&sysex_transfer.mutex);
3385 sysex_transfer.active = TRUE;
3386 g_mutex_unlock (&sysex_transfer.mutex);
3387
3388 debug_print (1, "Creating SysEx thread...\n");
3389 sysex_thread = g_thread_new ("sysex_thread", elektroid_dnd_received_runner,
3390 widget);
3391
3392 if ((widget == GTK_WIDGET (local_browser.view)
3393 && !strcmp (dnd_type_name, TEXT_URI_LIST_STD)) ||
3394 (widget == GTK_WIDGET (remote_browser.view)
3395 && !strcmp (dnd_type_name, TEXT_URI_LIST_ELEKTROID)))
3396 {
3397 gtk_window_set_title (GTK_WINDOW (progress_dialog), _("Moving Files"));
3398 gtk_label_set_text (GTK_LABEL (progress_label), _("Moving..."));
3399 }
3400 else
3401 {
3402 gtk_window_set_title (GTK_WINDOW (progress_dialog),
3403 _("Preparing Tasks"));
3404 gtk_label_set_text (GTK_LABEL (progress_label), _("Waiting..."));
3405 }
3406 gtk_dialog_run (GTK_DIALOG (progress_dialog));
3407 gtk_widget_hide (GTK_WIDGET (progress_dialog));
3408
3409 g_mutex_lock (&sysex_transfer.mutex);
3410 sysex_transfer.active = FALSE;
3411 g_mutex_unlock (&sysex_transfer.mutex);
3412
3413 elektroid_join_sysex_thread ();
3414
3415 g_free (dnd_type_name);
3416 g_strfreev (dnd_uris);
27033417 }
27043418
27053419 static void
27643478 gchar *spath;
27653479 gint tx;
27663480 gint ty;
3481 gboolean slot;
27673482 GtkTreeSelection *selection;
2768 struct item *item;
3483 struct item item;
27693484 struct browser *browser = user_data;
3485
3486 slot = widget == GTK_WIDGET (remote_browser.view)
3487 && remote_browser.fs_ops->options & FS_OPTION_SLOT_STORAGE;
27703488
27713489 gtk_tree_view_convert_widget_to_bin_window_coords
27723490 (GTK_TREE_VIEW (widget), wx, wy, &tx, &ty);
27783496 debug_print (2, "Drag motion path: %s\n", spath);
27793497 g_free (spath);
27803498
2781 selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (browser->view));
2782 if (gtk_tree_selection_path_is_selected (selection, path))
2783 {
2784 if (browser->dnd_timeout_function_id)
3499 if (slot)
3500 {
3501 gtk_tree_view_set_drag_dest_row (remote_browser.view, path,
3502 GTK_TREE_VIEW_DROP_INTO_OR_BEFORE);
3503 }
3504 else
3505 {
3506 selection =
3507 gtk_tree_view_get_selection (GTK_TREE_VIEW (browser->view));
3508 if (gtk_tree_selection_path_is_selected (selection, path))
27853509 {
2786 g_source_remove (browser->dnd_timeout_function_id);
2787 browser->dnd_timeout_function_id = 0;
3510 if (browser->dnd_timeout_function_id)
3511 {
3512 g_source_remove (browser->dnd_timeout_function_id);
3513 browser->dnd_timeout_function_id = 0;
3514 }
3515 return TRUE;
27883516 }
2789 return TRUE;
27903517 }
27913518
27923519 model =
27933520 GTK_TREE_MODEL (gtk_tree_view_get_model (GTK_TREE_VIEW (widget)));
27943521 gtk_tree_model_get_iter (model, &iter, path);
2795 item = browser_get_item (model, &iter);
2796
2797 if (item->type == ELEKTROID_DIR && (!browser->dnd_motion_path
2798 || (browser->dnd_motion_path
2799 &&
2800 gtk_tree_path_compare
2801 (browser->dnd_motion_path,
2802 path))))
3522 browser_set_item (model, &iter, &item);
3523
3524 if (item.type == ELEKTROID_DIR && (!browser->dnd_motion_path
3525 || (browser->dnd_motion_path
3526 &&
3527 gtk_tree_path_compare
3528 (browser->dnd_motion_path,
3529 path))))
28033530 {
28043531 if (browser->dnd_timeout_function_id)
28053532 {
28093536 browser->dnd_timeout_function_id =
28103537 g_timeout_add (DND_TIMEOUT, elektroid_drag_list_timeout, browser);
28113538 }
2812
2813 browser_free_item (item);
28143539 }
28153540 else
28163541 {
28193544 g_source_remove (browser->dnd_timeout_function_id);
28203545 browser->dnd_timeout_function_id = 0;
28213546 }
2822
28233547 }
28243548
28253549 if (browser->dnd_motion_path)
28273551 gtk_tree_path_free (browser->dnd_motion_path);
28283552 browser->dnd_motion_path = NULL;
28293553 }
2830
28313554 browser->dnd_motion_path = path;
28323555
28333556 return TRUE;
28883611 }
28893612
28903613 static void
2891 elektroid_notify_local_dir_change (struct browser *browser)
2892 {
2893 notifier_set_dir (&notifier, browser->dir);
2894 }
2895
2896 static void
28973614 elektroid_quit ()
28983615 {
3616 gtk_dialog_response (GTK_DIALOG (progress_dialog), GTK_RESPONSE_CANCEL);
3617
28993618 elektroid_stop_sysex_thread ();
29003619 elektroid_stop_task_thread ();
29013620 elektroid_stop_load_thread ();
29023621
2903 notifier.running = 0;
2904 notifier_close (&notifier);
2905 g_thread_join (notifier_thread);
2906 notifier_free (&notifier);
3622 browser_destroy (&local_browser);
3623 browser_destroy (&remote_browser);
3624
3625 audio_destroy (&audio);
29073626
29083627 debug_print (1, "Quitting GTK+...\n");
29093628 gtk_main_quit ();
29213640 {
29223641 GtkBuilder *builder;
29233642 GtkCssProvider *css_provider;
2924 GtkTreeSortable *sortable;
29253643 GtkWidget *name_dialog_cancel_button;
29263644 GtkWidget *refresh_devices_button;
29273645 GtkWidget *hostname_label;
2928 GtkWidget *loop_button;
2929 GtkWidget *autoplay_switch;
2930 gchar *glade_file;
2931 gchar *css_file;
29323646 gchar hostname[LABEL_MAX];
2933
2934 glade_file = chain_path (DATADIR, "gui.glade");
2935 css_file = chain_path (DATADIR, "gui.css");
29363647
29373648 gtk_init (&argc, &argv);
29383649 builder = gtk_builder_new ();
2939 gtk_builder_add_from_file (builder, glade_file, NULL);
2940 free (glade_file);
3650 gtk_builder_add_from_file (builder, DATADIR "/gui.glade", NULL);
29413651
29423652 css_provider = gtk_css_provider_new ();
2943 gtk_css_provider_load_from_path (css_provider, css_file, NULL);
3653 gtk_css_provider_load_from_path (css_provider, DATADIR "/gui.css", NULL);
29443654 gtk_style_context_add_provider_for_screen (gdk_screen_get_default (),
29453655 GTK_STYLE_PROVIDER
29463656 (css_provider),
29473657 GTK_STYLE_PROVIDER_PRIORITY_USER);
2948 free (css_file);
29493658
29503659 main_window = GTK_WIDGET (gtk_builder_get_object (builder, "main_window"));
29513660 gtk_window_resize (GTK_WINDOW (main_window), 1, 1); //Compact window
29863695 hostname_label =
29873696 GTK_WIDGET (gtk_builder_get_object (builder, "hostname_label"));
29883697
3698 local_box = GTK_WIDGET (gtk_builder_get_object (builder, "local_box"));
29893699 remote_box = GTK_WIDGET (gtk_builder_get_object (builder, "remote_box"));
29903700 local_audio_box =
29913701 GTK_WIDGET (gtk_builder_get_object (builder, "local_audio_box"));
29963706 loop_button = GTK_WIDGET (gtk_builder_get_object (builder, "loop_button"));
29973707 autoplay_switch =
29983708 GTK_WIDGET (gtk_builder_get_object (builder, "autoplay_switch"));
3709 mix_switch = GTK_WIDGET (gtk_builder_get_object (builder, "mix_switch"));
29993710 volume_button =
30003711 GTK_WIDGET (gtk_builder_get_object (builder, "volume_button"));
30013712 status_bar = GTK_STATUSBAR (gtk_builder_get_object (builder, "status_bar"));
30043715 G_CALLBACK (elektroid_delete_window), NULL);
30053716
30063717 g_signal_connect (progress_dialog_cancel_button, "clicked",
3007 G_CALLBACK (elektroid_progress_dialog_end), NULL);
3718 G_CALLBACK (elektroid_progress_dialog_close), NULL);
30083719 g_signal_connect (progress_dialog, "response",
30093720 G_CALLBACK (elektroid_cancel_running_sysex), NULL);
30103721
30353746 G_CALLBACK (elektroid_loop_clicked), NULL);
30363747 g_signal_connect (autoplay_switch, "state-set",
30373748 G_CALLBACK (elektroid_autoplay_clicked), NULL);
3038 g_signal_connect (volume_button, "value_changed",
3039 G_CALLBACK (elektroid_set_volume), NULL);
3749 g_signal_connect (mix_switch, "state-set",
3750 G_CALLBACK (elektroid_mix_clicked), NULL);
3751 volume_changed_handler = g_signal_connect (volume_button, "value_changed",
3752 G_CALLBACK
3753 (elektroid_set_volume), NULL);
30403754
30413755 download_menuitem =
30423756 GTK_WIDGET (gtk_builder_get_object (builder, "download_menuitem"));
3757 remote_play_separator =
3758 GTK_WIDGET (gtk_builder_get_object (builder, "remote_play_separator"));
3759 remote_play_menuitem =
3760 GTK_WIDGET (gtk_builder_get_object (builder, "remote_play_menuitem"));
3761 remote_options_separator =
3762 GTK_WIDGET (gtk_builder_get_object (builder, "remote_options_separator"));
3763 remote_open_menuitem =
3764 GTK_WIDGET (gtk_builder_get_object (builder, "remote_open_menuitem"));
3765 remote_show_menuitem =
3766 GTK_WIDGET (gtk_builder_get_object (builder, "remote_show_menuitem"));
3767 remote_actions_separator =
3768 GTK_WIDGET (gtk_builder_get_object (builder, "remote_actions_separator"));
30433769 remote_rename_menuitem =
30443770 GTK_WIDGET (gtk_builder_get_object (builder, "remote_rename_menuitem"));
30453771 remote_delete_menuitem =
30463772 GTK_WIDGET (gtk_builder_get_object (builder, "remote_delete_menuitem"));
30473773 g_signal_connect (download_menuitem, "activate",
30483774 G_CALLBACK (elektroid_add_download_tasks), NULL);
3775 g_signal_connect (remote_play_menuitem, "activate",
3776 G_CALLBACK (elektroid_play_clicked), NULL);
3777 g_signal_connect (remote_open_menuitem, "activate",
3778 G_CALLBACK (elektroid_open_clicked), &remote_browser);
3779 g_signal_connect (remote_show_menuitem, "activate",
3780 G_CALLBACK (elektroid_show_clicked), &remote_browser);
30493781 g_signal_connect (remote_rename_menuitem, "activate",
30503782 G_CALLBACK (elektroid_rename_item), &remote_browser);
30513783 g_signal_connect (remote_delete_menuitem, "activate",
30533785
30543786 upload_menuitem =
30553787 GTK_WIDGET (gtk_builder_get_object (builder, "upload_menuitem"));
3788 local_play_separator =
3789 GTK_WIDGET (gtk_builder_get_object (builder, "local_play_separator"));
30563790 local_play_menuitem =
30573791 GTK_WIDGET (gtk_builder_get_object (builder, "local_play_menuitem"));
30583792 local_open_menuitem =
30683802 g_signal_connect (local_play_menuitem, "activate",
30693803 G_CALLBACK (elektroid_play_clicked), NULL);
30703804 g_signal_connect (local_open_menuitem, "activate",
3071 G_CALLBACK (elektroid_open_clicked), NULL);
3805 G_CALLBACK (elektroid_open_clicked), &local_browser);
30723806 g_signal_connect (local_show_menuitem, "activate",
3073 G_CALLBACK (elektroid_show_clicked), NULL);
3807 G_CALLBACK (elektroid_show_clicked), &local_browser);
30743808 g_signal_connect (local_rename_menuitem, "activate",
30753809 G_CALLBACK (elektroid_rename_item), &local_browser);
30763810 g_signal_connect (local_delete_menuitem, "activate",
30783812
30793813 remote_browser = (struct browser)
30803814 {
3815 .name = "remote",
30813816 .view =
30823817 GTK_TREE_VIEW (gtk_builder_get_object (builder, "remote_tree_view")),
30833818 .up_button =
30893824 .dir_entry =
30903825 GTK_ENTRY (gtk_builder_get_object (builder, "remote_dir_entry")),
30913826 .menu = GTK_MENU (gtk_builder_get_object (builder, "remote_menu")),
3092 .dir = malloc (PATH_MAX),
3827 .dir = g_malloc0 (PATH_MAX),
30933828 .check_selection = elektroid_remote_check_selection,
30943829 .file_icon = NULL,
3095 .fs_ops = connector_get_fs_operations (-1),
3096 .data = &connector,
3097 .notify_dir_change = NULL,
3098 .check_callback = elektroid_check_connector
3830 .fs_ops = NULL,
3831 .backend = &backend,
3832 .check_callback = elektroid_check_backend,
3833 .sensitive_widgets = NULL,
3834 .stack = GTK_WIDGET (gtk_builder_get_object (builder, "remote_stack")),
3835 .spinner = GTK_WIDGET (gtk_builder_get_object (builder, "remote_spinner"))
30993836 };
3837 browser_init (&remote_browser);
3838
31003839 remote_tree_view_index_column =
31013840 GTK_TREE_VIEW_COLUMN (gtk_builder_get_object
31023841 (builder, "remote_tree_view_index_column"));
3842 remote_tree_view_slot_column =
3843 GTK_TREE_VIEW_COLUMN (gtk_builder_get_object
3844 (builder, "remote_tree_view_slot_column"));
31033845
31043846 g_signal_connect (gtk_tree_view_get_selection (remote_browser.view),
31053847 "changed", G_CALLBACK (browser_selection_changed),
31363878 G_CALLBACK (elektroid_drag_leave_up), &remote_browser);
31373879
31383880 gtk_drag_source_set ((GtkWidget *) remote_browser.view, GDK_BUTTON1_MASK,
3139 TARGET_ENTRIES_REMOTE_SRC, TARGET_ENTRIES_REMOTE_SRC_N,
3881 TARGET_ENTRIES_REMOTE_SRC,
3882 G_N_ELEMENTS (TARGET_ENTRIES_REMOTE_SRC),
31403883 GDK_ACTION_COPY);
3141 gtk_drag_dest_set ((GtkWidget *) remote_browser.view, GTK_DEST_DEFAULT_ALL,
3142 TARGET_ENTRIES_REMOTE_DST, TARGET_ENTRIES_REMOTE_DST_N,
3143 GDK_ACTION_COPY);
31443884 gtk_drag_dest_set ((GtkWidget *) remote_browser.up_button,
31453885 GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_HIGHLIGHT,
31463886 TARGET_ENTRIES_UP_BUTTON_DST,
3147 TARGET_ENTRIES_UP_BUTTON_DST_N, GDK_ACTION_COPY);
3887 G_N_ELEMENTS (TARGET_ENTRIES_UP_BUTTON_DST),
3888 GDK_ACTION_COPY);
31483889
31493890 local_browser = (struct browser)
31503891 {
3892 .name = "local",
31513893 .view =
31523894 GTK_TREE_VIEW (gtk_builder_get_object (builder, "local_tree_view")),
31533895 .up_button =
31593901 .dir_entry =
31603902 GTK_ENTRY (gtk_builder_get_object (builder, "local_dir_entry")),
31613903 .menu = GTK_MENU (gtk_builder_get_object (builder, "local_menu")),
3162 .dir = malloc (PATH_MAX),
3904 .dir = preferences.local_dir,
31633905 .check_selection = elektroid_local_check_selection,
3164 .file_icon = elektroid_get_inventory_icon_for_fs (FS_SAMPLES),
3906 .file_icon = BE_FILE_ICON_WAVE,
31653907 .extensions = NULL,
31663908 .fs_ops = &FS_LOCAL_OPERATIONS,
3167 .data = NULL,
3168 .notify_dir_change = elektroid_notify_local_dir_change,
3169 .check_callback = NULL
3909 .backend = NULL,
3910 .check_callback = NULL,
3911 .sensitive_widgets = NULL,
3912 .stack = GTK_WIDGET (gtk_builder_get_object (builder, "local_stack")),
3913 .spinner = GTK_WIDGET (gtk_builder_get_object (builder, "local_spinner"))
31703914 };
3915 browser_init (&local_browser);
31713916
31723917 g_signal_connect (gtk_tree_view_get_selection (local_browser.view),
31733918 "changed", G_CALLBACK (browser_selection_changed),
32033948 g_signal_connect (local_browser.up_button, "drag-leave",
32043949 G_CALLBACK (elektroid_drag_leave_up), &local_browser);
32053950
3206 sortable = GTK_TREE_SORTABLE (gtk_tree_view_get_model (local_browser.view));
3207 gtk_tree_sortable_set_sort_func (sortable, BROWSER_LIST_STORE_NAME_FIELD,
3208 browser_sort_samples, NULL, NULL);
3209 gtk_tree_sortable_set_sort_column_id (sortable,
3210 BROWSER_LIST_STORE_NAME_FIELD,
3211 GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID);
3951 browser_set_options (&local_browser);
32123952
32133953 gtk_drag_source_set ((GtkWidget *) local_browser.view, GDK_BUTTON1_MASK,
3214 TARGET_ENTRIES_LOCAL_SRC, TARGET_ENTRIES_LOCAL_SRC_N,
3954 TARGET_ENTRIES_LOCAL_SRC,
3955 G_N_ELEMENTS (TARGET_ENTRIES_LOCAL_SRC),
32153956 GDK_ACTION_MOVE);
32163957 gtk_drag_dest_set ((GtkWidget *) local_browser.view, GTK_DEST_DEFAULT_ALL,
3217 TARGET_ENTRIES_LOCAL_DST, TARGET_ENTRIES_LOCAL_DST_N,
3958 TARGET_ENTRIES_LOCAL_DST,
3959 G_N_ELEMENTS (TARGET_ENTRIES_LOCAL_DST),
32183960 GDK_ACTION_COPY);
32193961 gtk_drag_dest_set ((GtkWidget *) local_browser.up_button,
32203962 GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_HIGHLIGHT,
32213963 TARGET_ENTRIES_UP_BUTTON_DST,
3222 TARGET_ENTRIES_UP_BUTTON_DST_N, GDK_ACTION_COPY);
3223
3224 audio_init (&audio, elektroid_set_volume_callback, elektroid_redraw_sample);
3964 G_N_ELEMENTS (TARGET_ENTRIES_UP_BUTTON_DST),
3965 GDK_ACTION_COPY);
32253966
32263967 devices_list_store =
32273968 GTK_LIST_STORE (gtk_builder_get_object (builder, "devices_list_store"));
32283969 devices_combo =
3229 GTK_COMBO_BOX (gtk_builder_get_object (builder, "devices_combo"));
3970 GTK_WIDGET (gtk_builder_get_object (builder, "devices_combo"));
32303971 refresh_devices_button =
32313972 GTK_WIDGET (gtk_builder_get_object (builder, "refresh_devices_button"));
32323973 g_signal_connect (devices_combo, "changed",
32333974 G_CALLBACK (elektroid_set_device), NULL);
32343975 g_signal_connect (refresh_devices_button, "clicked",
3235 G_CALLBACK (browser_refresh_devices), NULL);
3976 G_CALLBACK (elektroid_refresh_devices), NULL);
3977
3978 audio_init (&audio, elektroid_set_volume_callback, elektroid_redraw_sample);
32363979
32373980 task_list_store =
32383981 GTK_LIST_STORE (gtk_builder_get_object (builder, "task_list_store"));
32553998 gtk_statusbar_push (status_bar, 0, _("Not connected"));
32563999 elektroid_loop_clicked (loop_button, NULL);
32574000 gtk_switch_set_active (GTK_SWITCH (autoplay_switch), preferences.autoplay);
4001 gtk_switch_set_active (GTK_SWITCH (mix_switch), preferences.mix);
32584002
32594003 fs_list_store =
32604004 GTK_LIST_STORE (gtk_builder_get_object (builder, "fs_list_store"));
3261 fs_combo = GTK_COMBO_BOX (gtk_builder_get_object (builder, "fs_combo"));
4005 fs_combo = GTK_WIDGET (gtk_builder_get_object (builder, "fs_combo"));
32624006 g_signal_connect (fs_combo, "changed", G_CALLBACK (elektroid_set_fs), NULL);
4007
4008 sample_info_box =
4009 GTK_WIDGET (gtk_builder_get_object (builder, "sample_info_box"));
4010 sample_length =
4011 GTK_WIDGET (gtk_builder_get_object (builder, "sample_length"));
4012 sample_duration =
4013 GTK_WIDGET (gtk_builder_get_object (builder, "sample_duration"));
4014 sample_channels =
4015 GTK_WIDGET (gtk_builder_get_object (builder, "sample_channels"));
4016 sample_samplerate =
4017 GTK_WIDGET (gtk_builder_get_object (builder, "sample_samplerate"));
4018 sample_bitdepth =
4019 GTK_WIDGET (gtk_builder_get_object (builder, "sample_bitdepth"));
32634020
32644021 gtk_widget_set_sensitive (remote_box, FALSE);
32654022 gtk_widget_set_sensitive (rx_sysex_button, FALSE);
32664023 gtk_widget_set_sensitive (tx_sysex_button, FALSE);
32674024 gtk_widget_set_sensitive (os_upgrade_button, FALSE);
32684025
3269 local_browser.dir = preferences.local_dir;
3270 elektroid_load_devices (TRUE); //This triggers a local browser reload due to the extensions and icons selected for the fs
4026 elektroid_audio_widgets_set_status ();
32714027
32724028 gethostname (hostname, LABEL_MAX);
32734029 gtk_label_set_text (GTK_LABEL (hostname_label), hostname);
32744030
3275 debug_print (1, "Creating notifier thread...\n");
3276 notifier_init (&notifier, &local_browser);
3277 notifier_set_dir (&notifier, preferences.local_dir);
3278 notifier_thread = g_thread_new ("notifier_thread", notifier_run, &notifier);
3279
4031 local_browser.sensitive_widgets =
4032 g_slist_append (local_browser.sensitive_widgets, local_box);
4033 remote_browser.sensitive_widgets =
4034 g_slist_append (remote_browser.sensitive_widgets, devices_combo);
4035 remote_browser.sensitive_widgets =
4036 g_slist_append (remote_browser.sensitive_widgets, refresh_devices_button);
4037 remote_browser.sensitive_widgets =
4038 g_slist_append (remote_browser.sensitive_widgets, remote_box);
4039 remote_browser.sensitive_widgets =
4040 g_slist_append (remote_browser.sensitive_widgets, fs_combo);
4041
4042 g_idle_add (elektroid_load_devices_bg, NULL);
32804043 gtk_widget_show (main_window);
4044 audio_run (&audio);
4045
32814046 gtk_main ();
32824047
32834048 free (remote_browser.dir);
32844049
3285 if (connector_check (&connector))
3286 {
3287 connector_destroy (&connector);
3288 }
3289
3290 audio_destroy (&audio);
4050 if (backend_check (&backend))
4051 {
4052 backend_destroy (&backend);
4053 }
32914054
32924055 return EXIT_SUCCESS;
32934056 }
2323 #include <sys/types.h>
2424 #include <sys/stat.h>
2525 #include <unistd.h>
26 #include <glib/gi18n.h>
2627 #include "local.h"
27
28 static gint local_mkdir (const gchar *, void *);
29
30 static gint local_delete (const gchar *, void *);
31
32 static gint local_rename (const gchar *, const gchar *, void *);
33
34 static gint local_read_dir (struct item_iterator *, const gchar *, void *);
28 #include "sample.h"
29
30 struct local_iterator_data
31 {
32 DIR *dir;
33 gchar *path;
34 };
3535
3636 static gint local_copy_iterator (struct item_iterator *,
3737 struct item_iterator *, gboolean);
3838
39 static gint
40 local_download (struct backend *backend, const gchar * path,
41 GByteArray * output, struct job_control *control)
42 {
43 gint err;
44 gboolean active;
45
46 control->parts = 1;
47 control->part = 0;
48 set_job_control_progress (control, 0.0);
49
50 err = load_file (path, output, control);
51
52 g_mutex_lock (&control->mutex);
53 active = control->active;
54 g_mutex_unlock (&control->mutex);
55 if (active)
56 {
57 set_job_control_progress (control, 1.0);
58 }
59 else
60 {
61 err = -ECANCELED;
62 }
63
64 return err;
65 }
66
67 static gchar *
68 local_get_download_path (struct backend *backend,
69 struct item_iterator *remote_iter,
70 const struct fs_operations *ops,
71 const gchar * dst_dir, const gchar * src_path)
72 {
73 gchar *src_pathc = strdup (src_path);
74 gchar *path = malloc (PATH_MAX);
75 gchar *filename = basename (src_pathc);
76 remove_ext (filename);
77 snprintf (path, PATH_MAX, "%s/%s.wav", dst_dir, filename);
78 g_free (src_pathc);
79 return path;
80 }
81
82 static gchar *
83 local_get_upload_path (struct backend *backend,
84 struct item_iterator *remote_iter,
85 const struct fs_operations *ops,
86 const gchar * dst_dir,
87 const gchar * src_path, gint32 * next_index)
88 {
89 return local_get_download_path (backend, remote_iter, ops, dst_dir,
90 src_path);
91 }
92
93 gint
94 local_mkdir (struct backend *backend, const gchar * name)
95 {
96 DIR *dir;
97 gint res = 0;
98 gchar *dup;
99 gchar *parent;
100
101 dup = strdup (name);
102 parent = dirname (dup);
103
104 dir = opendir (parent);
105 if (dir)
106 {
107 closedir (dir);
108 }
109 else
110 {
111 res = local_mkdir (backend, parent);
112 if (res)
113 {
114 goto cleanup;
115 }
116 }
117
118 if (mkdir (name, 0755) == 0 || errno == EEXIST)
119 {
120 res = 0;
121 }
122 else
123 {
124 error_print ("Error while creating dir %s\n", name);
125 res = -errno;
126 }
127
128 cleanup:
129 g_free (dup);
130 return res;
131 }
132
133 static gint
134 local_delete (struct backend *backend, const gchar * path)
135 {
136 DIR *dir;
137 gchar *new_path;
138 struct dirent *dirent;
139
140 if ((dir = opendir (path)))
141 {
142 debug_print (1, "Deleting local %s dir...\n", path);
143
144 while ((dirent = readdir (dir)) != NULL)
145 {
146 if (strcmp (dirent->d_name, ".") == 0 ||
147 strcmp (dirent->d_name, "..") == 0)
148 {
149 continue;
150 }
151 new_path = chain_path (path, dirent->d_name);
152 local_delete (backend, new_path);
153 free (new_path);
154 }
155
156 closedir (dir);
157
158 return rmdir (path);
159 }
160 else
161 {
162 debug_print (1, "Deleting local %s file...\n", path);
163 return unlink (path);
164 }
165 }
166
167 static gint
168 local_rename (struct backend *backend, const gchar * old, const gchar * new)
169 {
170 debug_print (1, "Renaming locally from %s to %s...\n", old, new);
171 return rename (old, new);
172 }
173
174 static void
175 local_free_iterator_data (void *iter_data)
176 {
177 struct local_iterator_data *data = iter_data;
178 closedir (data->dir);
179 g_free (data->path);
180 g_free (data);
181 }
182
183 static guint
184 local_next_dentry (struct item_iterator *iter)
185 {
186 gchar *full_path;
187 struct dirent *dirent;
188 gboolean found;
189 struct stat st;
190 mode_t mode;
191 struct local_iterator_data *data = iter->data;
192
193 while ((dirent = readdir (data->dir)) != NULL)
194 {
195 if (dirent->d_name[0] == '.')
196 {
197 continue;
198 }
199
200 full_path = chain_path (data->path, dirent->d_name);
201 if (stat (full_path, &st))
202 {
203 free (full_path);
204 continue;
205 }
206
207 mode = st.st_mode & S_IFMT;
208 switch (mode)
209 {
210 case S_IFREG:
211 case S_IFDIR:
212 snprintf (iter->item.name, LABEL_MAX, "%s", dirent->d_name);
213 iter->item.type = mode == S_IFREG ? ELEKTROID_FILE : ELEKTROID_DIR;
214 iter->item.size = st.st_size;
215 found = TRUE;
216 break;
217 default:
218 error_print
219 ("stat mode neither file nor directory for %s\n", full_path);
220 found = FALSE;
221 }
222
223 free (full_path);
224
225 if (found)
226 {
227 return 0;
228 }
229 }
230
231 return -ENOENT;
232 }
233
234 static gint
235 local_init_iterator (struct item_iterator *iter, const gchar * path,
236 gboolean cached)
237 {
238 DIR *dir;
239 struct local_iterator_data *data;
240
241 if (!(dir = opendir (path)))
242 {
243 return -errno;
244 }
245
246 data = malloc (sizeof (struct local_iterator_data));
247 if (!data)
248 {
249 closedir (dir);
250 return -errno;
251 }
252
253 data->dir = dir;
254 data->path = strdup (path);
255
256 iter->data = data;
257 iter->next = local_next_dentry;
258 iter->free = local_free_iterator_data;
259 iter->copy = local_copy_iterator;
260
261 return 0;
262 }
263
264 static gint
265 local_read_dir (struct backend *backend, struct item_iterator *iter,
266 const gchar * path)
267 {
268 return local_init_iterator (iter, path, FALSE);
269 }
270
271 static gint
272 local_copy_iterator (struct item_iterator *dst, struct item_iterator *src,
273 gboolean cached)
274 {
275 struct local_iterator_data *data = src->data;
276 return local_init_iterator (dst, data->path, cached);
277 }
278
279 static gint
280 local_sample_load_custom (const gchar * path, GByteArray * sample,
281 struct job_control *control,
282 const struct sample_params *sample_params)
283 {
284 guint frames;
285 control->parts = 1;
286 control->part = 0;
287 gint err = sample_load_from_file (path, sample, control, sample_params,
288 &frames);
289 struct sample_info *sample_info = control->data;
290 sample_info->samplerate = sample_params->samplerate;
291 sample_info->channels =
292 sample_info->channels <
293 sample_params->channels ? sample_info->channels : sample_params->channels;
294 return err;
295 }
296
297 static gint
298 local_sample_load_48_16_stereo (const gchar * path, GByteArray * sample,
299 struct job_control *control)
300 {
301 struct sample_params sample_params;
302 sample_params.samplerate = 48000;
303 sample_params.channels = 2;
304 return local_sample_load_custom (path, sample, control, &sample_params);
305 }
306
307 static gint
308 local_sample_load_48_16_mono (const gchar * path, GByteArray * sample,
309 struct job_control *control)
310 {
311 struct sample_params sample_params;
312 sample_params.samplerate = 48000;
313 sample_params.channels = 1;
314 return local_sample_load_custom (path, sample, control, &sample_params);
315 }
316
317 static gint
318 local_upload (struct backend *backend, const gchar * path, GByteArray * input,
319 struct job_control *control)
320 {
321 return sample_save_from_array (path, input, control);
322 }
323
324 static gint
325 local_sample_load_441_16_stereo (const gchar * path, GByteArray * sample,
326 struct job_control *control)
327 {
328 struct sample_params sample_params;
329 sample_params.samplerate = 44100;
330 sample_params.channels = 2;
331 return local_sample_load_custom (path, sample, control, &sample_params);
332 }
333
334 static gint
335 local_sample_load_441_16_mono (const gchar * path, GByteArray * sample,
336 struct job_control *control)
337 {
338 struct sample_params sample_params;
339 sample_params.samplerate = 44100;
340 sample_params.channels = 1;
341 return local_sample_load_custom (path, sample, control, &sample_params);
342 }
343
39344 const struct fs_operations FS_LOCAL_OPERATIONS = {
40345 .fs = 0,
346 .options =
347 FS_OPTION_SORT_BY_NAME | FS_OPTION_AUDIO_PLAYER | FS_OPTION_STEREO,
348 .name = "local",
349 .gui_name = "localhost",
350 .gui_icon = BE_FILE_ICON_WAVE,
351 .readdir = local_read_dir,
352 .mkdir = local_mkdir,
353 .delete = local_delete,
354 .rename = local_rename,
355 .move = local_rename,
356 .get_id = get_item_name,
357 .get_ext = backend_get_fs_ext,
358 .type_ext = "wav",
359 .max_name_len = 255
360 };
361
362 enum sds_fs
363 {
364 FS_SAMPLES_LOCAL_48_16_STEREO = 0x1,
365 FS_SAMPLES_LOCAL_48_16_MONO = 0x2,
366 FS_SAMPLES_LOCAL_441_16_STEREO = 0x4,
367 FS_SAMPLES_LOCAL_441_16_MONO = 0x8
368 };
369
370 const struct fs_operations FS_SYSTEM_SAMPLES_48_16_STEREO_OPERATIONS = {
371 .fs = FS_SAMPLES_LOCAL_48_16_STEREO,
372 .options =
373 FS_OPTION_SORT_BY_NAME | FS_OPTION_AUDIO_PLAYER | FS_OPTION_STEREO,
374 .name = "wav4816s",
375 .gui_name = "WAV 48 KHz 16 bits stereo",
376 .gui_icon = BE_FILE_ICON_WAVE,
377 .readdir = local_read_dir,
378 .mkdir = local_mkdir,
379 .delete = local_delete,
380 .rename = local_rename,
381 .move = local_rename,
382 .download = local_download,
383 .upload = local_upload,
384 .get_id = get_item_name,
385 .load = local_sample_load_48_16_stereo,
386 .save = save_file,
387 .get_ext = backend_get_fs_ext,
388 .get_upload_path = local_get_upload_path,
389 .get_download_path = local_get_download_path,
390 .type_ext = "wav",
391 .max_name_len = 255
392 };
393
394 const struct fs_operations FS_SYSTEM_SAMPLES_48_16_MONO_OPERATIONS = {
395 .fs = FS_SAMPLES_LOCAL_48_16_MONO,
396 .options = FS_OPTION_SORT_BY_NAME | FS_OPTION_AUDIO_PLAYER,
397 .name = "wav4816m",
398 .gui_name = "WAV 48 KHz 16 bits mono",
399 .gui_icon = BE_FILE_ICON_WAVE,
400 .readdir = local_read_dir,
401 .mkdir = local_mkdir,
402 .delete = local_delete,
403 .rename = local_rename,
404 .move = local_rename,
405 .download = local_download,
406 .upload = local_upload,
407 .get_id = get_item_name,
408 .load = local_sample_load_48_16_mono,
409 .save = save_file,
410 .get_ext = backend_get_fs_ext,
411 .get_upload_path = local_get_upload_path,
412 .get_download_path = local_get_download_path,
413 .type_ext = "wav",
414 .max_name_len = 255
415 };
416
417 const struct fs_operations FS_SYSTEM_SAMPLES_441_16_STEREO_OPERATIONS = {
418 .fs = FS_SAMPLES_LOCAL_441_16_STEREO,
419 .options =
420 FS_OPTION_SORT_BY_NAME | FS_OPTION_AUDIO_PLAYER | FS_OPTION_STEREO,
421 .name = "wav44116s",
422 .gui_name = "WAV 44.1 KHz 16 bits stereo",
423 .gui_icon = BE_FILE_ICON_WAVE,
424 .readdir = local_read_dir,
425 .mkdir = local_mkdir,
426 .delete = local_delete,
427 .rename = local_rename,
428 .move = local_rename,
429 .download = local_download,
430 .upload = local_upload,
431 .get_id = get_item_name,
432 .load = local_sample_load_441_16_stereo,
433 .save = save_file,
434 .get_ext = backend_get_fs_ext,
435 .get_upload_path = local_get_upload_path,
436 .get_download_path = local_get_download_path,
437 .type_ext = "wav",
438 .max_name_len = 255
439 };
440
441 const struct fs_operations FS_SYSTEM_SAMPLES_441_16_MONO_OPERATIONS = {
442 .fs = FS_SAMPLES_LOCAL_441_16_MONO,
443 .options = FS_OPTION_SORT_BY_NAME | FS_OPTION_AUDIO_PLAYER,
444 .name = "wav44116m",
445 .gui_name = "WAV 44.1 KHz 16 bits mono",
446 .gui_icon = BE_FILE_ICON_WAVE,
41447 .readdir = local_read_dir,
42448 .mkdir = local_mkdir,
43449 .delete = local_delete,
46452 .copy = NULL,
47453 .clear = NULL,
48454 .swap = NULL,
49 .download = NULL,
50 .upload = NULL,
51 .getid = get_item_name,
52 .extension = NULL
455 .download = local_download,
456 .upload = local_upload,
457 .get_id = get_item_name,
458 .load = local_sample_load_441_16_mono,
459 .save = save_file,
460 .get_ext = backend_get_fs_ext,
461 .get_upload_path = local_get_upload_path,
462 .get_download_path = local_get_download_path,
463 .type_ext = "wav",
464 .max_name_len = 255
465 };
466
467 static const struct fs_operations *FS_SYSTEM_OPERATIONS[] = {
468 &FS_SYSTEM_SAMPLES_48_16_STEREO_OPERATIONS,
469 &FS_SYSTEM_SAMPLES_48_16_MONO_OPERATIONS,
470 &FS_SYSTEM_SAMPLES_441_16_STEREO_OPERATIONS,
471 &FS_SYSTEM_SAMPLES_441_16_MONO_OPERATIONS,
472 NULL
53473 };
54474
55475 gint
56 local_mkdir (const gchar * name, void *data)
57 {
58 DIR *dir;
59 gint res = 0;
60 gchar *dup;
61 gchar *parent;
62
63 dup = strdup (name);
64 parent = dirname (dup);
65
66 dir = opendir (parent);
67 if (dir)
68 {
69 closedir (dir);
70 }
71 else
72 {
73 res = local_mkdir (parent, data);
74 if (res)
75 {
76 goto cleanup;
77 }
78 }
79
80 if (mkdir (name, 0755) == 0 || errno == EEXIST)
81 {
82 res = 0;
83 }
84 else
85 {
86 error_print ("Error while creating dir %s\n", name);
87 res = -errno;
88 }
89
90 cleanup:
91 g_free (dup);
92 return res;
93 }
94
95 static gint
96 local_delete (const gchar * path, void *data)
97 {
98 DIR *dir;
99 gchar *new_path;
100 struct dirent *dirent;
101
102 if ((dir = opendir (path)))
103 {
104 debug_print (1, "Deleting local %s dir...\n", path);
105
106 while ((dirent = readdir (dir)) != NULL)
107 {
108 if (strcmp (dirent->d_name, ".") == 0 ||
109 strcmp (dirent->d_name, "..") == 0)
110 {
111 continue;
112 }
113 new_path = chain_path (path, dirent->d_name);
114 local_delete (new_path, data);
115 free (new_path);
116 }
117
118 closedir (dir);
119
120 return rmdir (path);
121 }
122 else
123 {
124 debug_print (1, "Deleting local %s file...\n", path);
125 return unlink (path);
126 }
127 }
128
129 static gint
130 local_rename (const gchar * old, const gchar * new, void *data)
131 {
132 debug_print (1, "Renaming locally from %s to %s...\n", old, new);
133 return rename (old, new);
134 }
135
136 static void
137 local_free_iterator_data (void *iter_data)
138 {
139 struct local_iterator_data *data = iter_data;
140 closedir (data->dir);
141 g_free (data->path);
142 g_free (data);
143 }
144
145 static guint
146 local_next_dentry (struct item_iterator *iter)
147 {
148 gchar *full_path;
149 struct dirent *dirent;
150 gboolean found;
151 struct stat st;
152 mode_t mode;
153
154 struct local_iterator_data *data = iter->data;
155
156 if (iter->item.name != NULL)
157 {
158 g_free (iter->item.name);
159 }
160
161 while ((dirent = readdir (data->dir)) != NULL)
162 {
163 if (dirent->d_name[0] == '.')
164 {
165 continue;
166 }
167
168 full_path = chain_path (data->path, dirent->d_name);
169 if (stat (full_path, &st))
170 {
171 free (full_path);
172 continue;
173 }
174
175 mode = st.st_mode & S_IFMT;
176 switch (mode)
177 {
178 case S_IFREG:
179 case S_IFDIR:
180 iter->item.name = strdup (dirent->d_name);
181 iter->item.type = mode == S_IFREG ? ELEKTROID_FILE : ELEKTROID_DIR;
182 iter->item.size = st.st_size;
183 found = TRUE;
184 break;
185 default:
186 error_print
187 ("stat mode neither file nor directory for %s\n", full_path);
188 found = FALSE;
189 }
190
191 free (full_path);
192
193 if (found)
194 {
195 return 0;
196 }
197 }
198
199 return -ENOENT;
200 }
201
202 static gint
203 local_init_iterator (struct item_iterator *iter, const gchar * path,
204 gboolean cached)
205 {
206 DIR *dir;
207 struct local_iterator_data *data;
208
209 if (!(dir = opendir (path)))
210 {
211 return -errno;
212 }
213
214 data = malloc (sizeof (struct local_iterator_data));
215 if (!data)
216 {
217 closedir (dir);
218 return -errno;
219 }
220
221 data->dir = dir;
222 data->path = strdup (path);
223
224 iter->data = data;
225 iter->next = local_next_dentry;
226 iter->free = local_free_iterator_data;
227 iter->copy = local_copy_iterator;
228 iter->item.name = NULL;
229
476 system_handshake (struct backend *backend)
477 {
478 if (backend->type != BE_TYPE_SYSTEM)
479 {
480 return -ENODEV;
481 }
482 backend->device_desc.filesystems =
483 FS_SAMPLES_LOCAL_48_16_STEREO | FS_SAMPLES_LOCAL_48_16_MONO |
484 FS_SAMPLES_LOCAL_441_16_STEREO | FS_SAMPLES_LOCAL_441_16_MONO;
485 backend->fs_ops = FS_SYSTEM_OPERATIONS;
486 backend->destroy_data = backend_destroy_data;
487 snprintf (backend->device_name, LABEL_MAX, "%s", _("System"));
230488 return 0;
231489 }
232
233 static gint
234 local_read_dir (struct item_iterator *iter, const gchar * path,
235 void *userdata)
236 {
237 return local_init_iterator (iter, path, FALSE);
238 }
239
240 static gint
241 local_copy_iterator (struct item_iterator *dst, struct item_iterator *src,
242 gboolean cached)
243 {
244 struct local_iterator_data *data = src->data;
245 return local_init_iterator (dst, data->path, cached);
246 }
1717 * along with Elektroid. If not, see <http://www.gnu.org/licenses/>.
1818 */
1919
20 #ifndef LOCAL_H
21 #define LOCAL_H
22
2023 #include <glib.h>
24 #include "backend.h"
2125 #include "utils.h"
2226
23 struct local_iterator_data
24 {
25 DIR *dir;
26 gchar *path;
27 };
27 extern const struct fs_operations FS_LOCAL_OPERATIONS;
2828
29 extern const struct fs_operations FS_LOCAL_OPERATIONS;
29 gint system_handshake (struct backend *);
30
31 #endif
2424 #include "notifier.h"
2525 #include "utils.h"
2626
27 void
28 notifier_init (struct notifier *notifier, struct browser *browser)
27 static void
28 notifier_set_dir (struct notifier *notifier)
2929 {
30 notifier->fd = inotify_init ();
31 notifier->wd = -1;
32 notifier->event_size = sizeof (struct inotify_event) + PATH_MAX;
33 notifier->event = malloc (notifier->event_size);
34 notifier->running = 1;
35 notifier->browser = browser;
36 }
37
38 void
39 notifier_set_dir (struct notifier *notifier, gchar * path)
40 {
41 debug_print (1, "Changing notifier path to %s...\n", path);
42 if (notifier->fd < 0)
30 debug_print (1, "Changing %s browser path to '%s'...\n",
31 notifier->browser->name, notifier->browser->dir);
32 if (!notifier->dir || strcmp (notifier->browser->dir, notifier->dir))
4333 {
44 return;
34 if (notifier->dir)
35 {
36 g_free (notifier->dir);
37 inotify_rm_watch (notifier->fd, notifier->wd);
38 g_thread_join (notifier->thread);
39 notifier->thread = NULL;
40 }
41 notifier->dir = strdup (notifier->browser->dir);
42 notifier->wd = inotify_add_watch (notifier->fd, notifier->dir,
43 IN_CREATE | IN_DELETE | IN_MOVED_FROM
44 | IN_DELETE_SELF | IN_MOVE_SELF
45 | IN_MOVED_TO | IN_IGNORED);
4546 }
46 if (notifier->wd >= 0)
47 {
48 inotify_rm_watch (notifier->fd, notifier->wd);
49 }
50 notifier->wd =
51 inotify_add_watch (notifier->fd, path,
52 IN_CREATE | IN_DELETE | IN_MOVED_FROM | IN_DELETE_SELF
53 | IN_MOVE_SELF | IN_MOVED_TO);
54 }
55
56 void
57 notifier_close (struct notifier *notifier)
58 {
59 if (notifier->fd < 0)
60 {
61 return;
62 }
63 if (notifier->wd >= 0)
64 {
65 inotify_rm_watch (notifier->fd, notifier->wd);
66 }
67 close (notifier->fd);
68 }
69
70 void
71 notifier_free (struct notifier *notifier)
72 {
73 free (notifier->event);
7447 }
7548
7649 static gboolean
8154 return FALSE;
8255 }
8356
84 gpointer
57 static gpointer
8558 notifier_run (gpointer data)
8659 {
8760 ssize_t size;
8861 struct notifier *notifier = data;
8962
90 while (notifier->running)
63 debug_print (1, "%s notifier running...\n", notifier->browser->name);
64
65 while (1)
9166 {
9267 size = read (notifier->fd, notifier->event, notifier->event_size);
93
94 if (size == 0 || size == EBADF)
68 if (size == 0)
9569 {
9670 break;
9771 }
98
99 if (size < 0)
72 if (size == -1)
10073 {
101 debug_print (2, "Error while reading notifier: %s\n",
102 g_strerror (errno));
103 continue;
74 if (errno != EBADF)
75 {
76 debug_print (2, "%s\n", g_strerror (errno));
77 }
78 break;
10479 }
10580
10681 if (notifier->event->mask & IN_CREATE
10883 || notifier->event->mask & IN_MOVED_FROM
10984 || notifier->event->mask & IN_MOVED_TO)
11085 {
111 debug_print (1, "Reloading local dir...\n");
86 debug_print (1, "Reloading dir...\n");
11287 g_idle_add (browser_load_dir, notifier->browser);
11388 }
11489 else if (notifier->event->mask & IN_DELETE_SELF
115 || notifier->event->mask & IN_MOVE_SELF ||
116 notifier->event->mask & IN_MOVED_TO)
90 || notifier->event->mask & IN_MOVE_SELF
91 || notifier->event->mask & IN_MOVED_TO)
11792 {
118 debug_print (1, "Loading local parent dir...\n");
93 debug_print (1, "Loading parent dir...\n");
11994 g_idle_add (notifier_go_up, notifier->browser);
95 break; //There is no directory to be nofified of.
96 }
97 else if ((notifier->event->mask & IN_IGNORED)) // inotify_rm_watch called
98 {
99 debug_print (1, "Finishing notifier...\n");
100 break;
120101 }
121102 else
122103 {
123 if (!(notifier->event->mask & IN_IGNORED))
124 {
125 error_print ("Unexpected event: %d\n", notifier->event->mask);
126 }
104 error_print ("Unexpected event: %d\n", notifier->event->mask);
127105 }
128106 }
129107
130108 return NULL;
131109 }
110
111 void
112 notifier_init (struct notifier *notifier, struct browser *browser)
113 {
114 notifier->fd = inotify_init ();
115 notifier->event_size = sizeof (struct inotify_event) + PATH_MAX;
116 notifier->event = malloc (notifier->event_size);
117 notifier->browser = browser;
118 notifier->thread = NULL;
119 notifier->dir = NULL;
120 g_mutex_init (&notifier->mutex);
121 }
122
123 void
124 notifier_set_active (struct notifier *notifier, gboolean active)
125 {
126 g_mutex_lock (&notifier->mutex);
127 if (active)
128 {
129 notifier_set_dir (notifier);
130 if (!notifier->thread)
131 {
132 debug_print (1, "Starting %s notifier...\n",
133 notifier->browser->name);
134 notifier->thread = g_thread_new ("notifier", notifier_run,
135 notifier);
136 }
137 }
138 else
139 {
140 if (notifier->thread)
141 {
142 debug_print (1, "Stopping %s notifier...\n",
143 notifier->browser->name);
144 inotify_rm_watch (notifier->fd, notifier->wd);
145 g_thread_join (notifier->thread);
146 notifier->thread = NULL;
147 close (notifier->fd);
148 }
149 }
150 g_mutex_unlock (&notifier->mutex);
151 }
152
153 void
154 notifier_destroy (struct notifier *notifier)
155 {
156 notifier_set_active (notifier, FALSE);
157 g_free (notifier->event);
158 }
1717 * along with Elektroid. If not, see <http://www.gnu.org/licenses/>.
1818 */
1919
20 #ifndef NOTIFIER_H
21 #define NOTIFIER_H
22
2023 #include <sys/inotify.h>
2124 #include <gtk/gtk.h>
2225 #include "browser.h"
2326
2427 struct notifier
2528 {
29 gchar *dir;
2630 gint fd;
2731 gint wd;
2832 size_t event_size;
2933 struct inotify_event *event;
30 gint running;
3134 struct browser *browser;
35 GThread *thread;
36 GMutex mutex;
3237 };
3338
3439 void notifier_init (struct notifier *, struct browser *);
3540
36 void notifier_set_dir (struct notifier *, gchar *);
41 void notifier_set_active (struct notifier *, gboolean);
3742
38 void notifier_close (struct notifier *);
43 void notifier_destroy (struct notifier *);
3944
40 void notifier_free (struct notifier *);
41
42 gpointer notifier_run (gpointer);
45 #endif
+0
-770
src/package.c less more
0 /*
1 * package.c
2 * Copyright (C) 2021 David García Goñi <dagargo@gmail.com>
3 *
4 * This file is part of Elektroid.
5 *
6 * Elektroid is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * Elektroid is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with Elektroid. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #include <stdio.h>
21 #include <unistd.h>
22 #include <json-glib/json-glib.h>
23 #include "package.h"
24 #include "utils.h"
25 #include "sample.h"
26
27 #define PKG_TAG_FORMAT_VERSION "FormatVersion"
28 #define PKG_TAG_PRODUCT_TYPE "ProductType"
29 #define PKG_TAG_PAYLOAD "Payload"
30 #define PKG_TAG_FILE_TYPE "FileType"
31 #define PKG_TAG_FIRMWARE_VERSION "FirmwareVersion"
32 #define PKG_TAG_SAMPLES "Samples"
33 #define PKG_TAG_FILE_NAME "FileName"
34 #define PKG_TAG_FILE_SIZE "FileSize"
35 #define PKG_TAG_HASH "Hash"
36 #define PKG_VAL_FILE_TYPE_PRJ "Project"
37 #define PKG_VAL_FILE_TYPE_SND "Sound"
38 #define PKG_VAL_FILE_TYPE_UNK "Unknown"
39
40 #define MAN_TAG_SAMPLE_REFS "sample_references"
41 #define MAN_TAG_HASH "hash"
42 #define MAN_TAG_SIZE "size"
43
44 #define MAX_PACKAGE_LEN (64 * 1024 * 1024)
45 #define MAX_MANIFEST_LEN (128 * 1024)
46 #define MANIFEST_FILENAME "manifest.json"
47
48 static gint
49 package_add_resource (struct package *pkg,
50 struct package_resource *pkg_resource, gboolean new)
51 {
52 zip_source_t *sample_source;
53 zip_int64_t index;
54 zip_error_t zerror;
55
56 debug_print (1, "Adding file %s to zip (%d B)...\n", pkg_resource->path,
57 pkg_resource->data->len);
58 sample_source =
59 zip_source_buffer_create (pkg_resource->data->data,
60 pkg_resource->data->len, 0, &zerror);
61 if (!sample_source)
62 {
63 error_print ("Error while creating file source: %s\n",
64 zip_error_strerror (&zerror));
65 zip_error_fini (&zerror);
66 return -1;
67 }
68
69 index =
70 zip_file_add (pkg->zip, pkg_resource->path, sample_source,
71 ZIP_FL_OVERWRITE | ZIP_FL_ENC_UTF_8);
72 if (index < 0)
73 {
74 error_print ("Error while adding file: %s\n",
75 zip_error_strerror (zip_get_error (pkg->zip)));
76 zip_source_free (sample_source);
77 return -1;
78 }
79
80 if (new)
81 {
82 pkg->resources = g_list_append (pkg->resources, pkg_resource);
83 }
84
85 return 0;
86 }
87
88
89 gint
90 package_begin (struct package *pkg, gchar * name, const gchar * fw_version,
91 const struct connector_device_desc *device_desc,
92 enum package_type type)
93 {
94 zip_error_t zerror;
95 pkg->resources = NULL;
96 pkg->buff = g_malloc (MAX_PACKAGE_LEN);
97 pkg->name = name;
98 pkg->fw_version = strdup (fw_version);
99 pkg->device_desc = device_desc;
100 pkg->type = type;
101
102 debug_print (1, "Creating zip buffer...\n");
103
104 zip_error_init (&zerror);
105 pkg->zip_source =
106 zip_source_buffer_create (pkg->buff, MAX_PACKAGE_LEN, 0, &zerror);
107 if (!pkg->zip_source)
108 {
109 error_print ("Error while creating zip source: %s\n",
110 zip_error_strerror (&zerror));
111 zip_error_fini (&zerror);
112 g_free (pkg->buff);
113 return -1;
114 }
115
116 pkg->zip = zip_open_from_source (pkg->zip_source, ZIP_TRUNCATE, &zerror);
117 if (!pkg->zip)
118 {
119 error_print ("Error while creating in memory zip: %s\n",
120 zip_error_strerror (&zerror));
121 zip_error_fini (&zerror);
122 zip_source_free (pkg->zip_source);
123 g_free (pkg->buff);
124 return -1;
125 }
126
127 zip_source_keep (pkg->zip_source);
128
129 pkg->manifest = g_malloc (sizeof (struct package_resource));
130 pkg->manifest->type = PKG_RES_TYPE_MANIFEST;
131 pkg->manifest->data = g_byte_array_sized_new (MAX_MANIFEST_LEN); //We need this because we can not resize later.
132 pkg->manifest->path = strdup (MANIFEST_FILENAME);
133 package_add_resource (pkg, pkg->manifest, TRUE);
134
135 return 0;
136 }
137
138 static gint
139 package_add_manifest (struct package *pkg)
140 {
141 JsonBuilder *builder;
142 JsonGenerator *gen;
143 JsonNode *root;
144 gchar *json;
145 gint len;
146 gchar *val = g_malloc (LABEL_MAX);
147 GList *resource;
148 gboolean samples_found = FALSE;
149 struct package_resource *pkg_resource;
150
151 builder = json_builder_new ();
152
153 json_builder_begin_object (builder);
154
155 json_builder_set_member_name (builder, PKG_TAG_FORMAT_VERSION);
156 json_builder_add_string_value (builder, "1.0");
157
158 json_builder_set_member_name (builder, PKG_TAG_PRODUCT_TYPE);
159 json_builder_begin_array (builder);
160 snprintf (val, LABEL_MAX, "%d", pkg->device_desc->id);
161 json_builder_add_string_value (builder, val);
162 json_builder_end_array (builder);
163
164 json_builder_set_member_name (builder, PKG_TAG_PAYLOAD);
165 json_builder_add_string_value (builder, pkg->name);
166
167 json_builder_set_member_name (builder, PKG_TAG_FILE_TYPE);
168 json_builder_add_string_value (builder,
169 pkg->type & PKG_FILE_TYPE_SOUND ?
170 PKG_VAL_FILE_TYPE_SND : pkg->type &
171 PKG_FILE_TYPE_PROJECT ? PKG_VAL_FILE_TYPE_PRJ
172 : PKG_VAL_FILE_TYPE_UNK);
173
174 if (pkg->type != PKG_FILE_TYPE_PRESET)
175 {
176 json_builder_set_member_name (builder, PKG_TAG_FIRMWARE_VERSION);
177 json_builder_add_string_value (builder, pkg->fw_version);
178 }
179
180 if (pkg->device_desc->filesystems & FS_SAMPLES)
181 {
182 for (resource = pkg->resources; resource; resource = resource->next)
183 {
184 pkg_resource = resource->data;
185 if (pkg_resource->type == PKG_RES_TYPE_SAMPLE)
186 {
187 samples_found = TRUE;
188 break;
189 }
190 }
191 }
192
193 if (samples_found)
194 {
195 json_builder_set_member_name (builder, PKG_TAG_SAMPLES);
196 json_builder_begin_array (builder);
197 for (resource = pkg->resources; resource; resource = resource->next)
198 {
199 pkg_resource = resource->data;
200 if (pkg_resource->type == PKG_RES_TYPE_SAMPLE)
201 {
202 json_builder_begin_object (builder);
203
204 json_builder_set_member_name (builder, PKG_TAG_FILE_NAME);
205 json_builder_add_string_value (builder, pkg_resource->path);
206
207 json_builder_set_member_name (builder, PKG_TAG_FILE_SIZE);
208 json_builder_add_int_value (builder, pkg_resource->size);
209
210 json_builder_set_member_name (builder, PKG_TAG_HASH);
211 snprintf (val, LABEL_MAX, "%d", pkg_resource->hash);
212 json_builder_add_string_value (builder, val);
213
214 json_builder_end_object (builder);
215 }
216 }
217 json_builder_end_array (builder);
218 }
219
220 json_builder_end_object (builder);
221
222 gen = json_generator_new ();
223 g_object_set (gen, "pretty", TRUE, NULL);
224 root = json_builder_get_root (builder);
225 json_generator_set_root (gen, root);
226 json = json_generator_to_data (gen, NULL);
227
228 len = strlen (json);
229 memcpy (pkg->manifest->data->data, json, len);
230 pkg->manifest->data->len = len;
231 package_add_resource (pkg, pkg->manifest, FALSE);
232
233 g_free (json);
234 json_node_free (root);
235 g_object_unref (gen);
236 g_object_unref (builder);
237 g_free (val);
238
239 return 0;
240 }
241
242 gint
243 package_end (struct package *pkg, GByteArray * out)
244 {
245 int ret = 0;
246 zip_stat_t zstat;
247
248 ret = package_add_manifest (pkg);
249 if (ret)
250 {
251 error_print ("Error while formatting %s\n", MANIFEST_FILENAME);
252 return ret;
253 }
254
255 debug_print (1, "Writing zip to buffer...\n");
256 if (zip_close (pkg->zip))
257 {
258 error_print ("Error while creating in memory zip: %s\n",
259 zip_error_strerror (zip_get_error (pkg->zip)));
260 return -1;
261 }
262
263 zip_source_stat (pkg->zip_source, &zstat);
264 debug_print (1, "%ld B written to package\n", zstat.comp_size);
265
266 zip_source_open (pkg->zip_source);
267 g_byte_array_set_size (out, zstat.comp_size);
268 zip_source_read (pkg->zip_source, out->data, zstat.comp_size);
269 zip_source_close (pkg->zip_source);
270
271 return 0;
272 }
273
274 void
275 package_free_package_resource (gpointer data)
276 {
277 struct package_resource *pkg_resource = data;
278 g_byte_array_free (pkg_resource->data, TRUE);
279 g_free (pkg_resource);
280 }
281
282 void
283 package_destroy (struct package *pkg)
284 {
285 zip_source_free (pkg->zip_source);
286 g_free (pkg->buff);
287 g_free (pkg->name);
288 g_free (pkg->fw_version);
289 g_list_free_full (pkg->resources, package_free_package_resource);
290 }
291
292 gint
293 package_open (struct package *pkg, GByteArray * data,
294 const struct connector_device_desc *device_desc)
295 {
296 gint ret;
297 zip_error_t zerror;
298 zip_file_t *manifest_file;
299 zip_stat_t zstat;
300
301 debug_print (1, "Opening zip stream...\n");
302
303 zip_error_init (&zerror);
304 pkg->zip_source =
305 zip_source_buffer_create (data->data, data->len, 0, &zerror);
306 if (!pkg->zip_source)
307 {
308 error_print ("Error while creating zip source: %s\n",
309 zip_error_strerror (&zerror));
310 zip_error_fini (&zerror);
311 return -1;
312 }
313
314 pkg->zip = zip_open_from_source (pkg->zip_source, ZIP_RDONLY, &zerror);
315 if (!pkg->zip)
316 {
317 error_print ("Error while creating in memory zip: %s\n",
318 zip_error_strerror (&zerror));
319 zip_error_fini (&zerror);
320 zip_source_free (pkg->zip_source);
321 return -1;
322 }
323
324 ret = zip_stat (pkg->zip, MANIFEST_FILENAME, ZIP_FL_ENC_STRICT, &zstat);
325 if (ret)
326 {
327 error_print ("Error while loading '%s': %s\n", MANIFEST_FILENAME,
328 zip_error_strerror (&zerror));
329 zip_error_fini (&zerror);
330 zip_source_free (pkg->zip_source);
331 zip_close (pkg->zip);
332 return -1;
333 }
334
335 pkg->manifest = g_malloc (sizeof (struct package_resource));
336 pkg->manifest->type = PKG_RES_TYPE_MANIFEST;
337 pkg->manifest->data = g_byte_array_sized_new (zstat.size);
338 pkg->manifest->path = strdup (MANIFEST_FILENAME);
339 manifest_file = zip_fopen (pkg->zip, MANIFEST_FILENAME, 0);
340 zip_fread (manifest_file, pkg->manifest->data->data, zstat.size);
341 pkg->manifest->data->len = zstat.size;
342 zip_fclose (manifest_file);
343
344 pkg->resources = NULL;
345 pkg->resources = g_list_append (pkg->resources, pkg->manifest);
346 pkg->buff = NULL;
347 pkg->name = NULL;
348 pkg->fw_version = NULL;
349 pkg->device_desc = device_desc;
350
351 return ret;
352 }
353
354 void
355 package_close (struct package *pkg)
356 {
357 zip_source_close (pkg->zip_source);
358 package_destroy (pkg);
359 }
360
361 gint
362 package_receive_pkg_resources (struct package *pkg,
363 const gchar * payload_path,
364 struct job_control *control,
365 struct connector *connector,
366 fs_remote_file_op download_data,
367 fs_remote_file_op download_sample)
368 {
369 gint ret, i, elements;
370 JsonParser *parser;
371 JsonReader *reader;
372 gint64 hash, size;
373 GError *error;
374 gchar *sample_path, *metadata_path;
375 struct package_resource *pkg_resource;
376 GByteArray *wave, *payload, *metadata, *sample;
377
378 metadata_path = chain_path (payload_path, ".metadata");
379 debug_print (1, "Getting metadata from %s...\n", metadata_path);
380 metadata = g_byte_array_new ();
381 control->parts = 130; // 128 sample slots, metadata and main.
382 control->part = 0;
383 set_job_control_progress (control, 0.0);
384 ret = download_data (metadata_path, metadata, control, connector);
385 if (ret)
386 {
387 debug_print (1, "Metadata file not available\n");
388 control->parts = 1;
389 goto get_payload;
390 }
391
392 control->part++;
393
394 parser = json_parser_new ();
395 if (!json_parser_load_from_data
396 (parser, (gchar *) metadata->data, metadata->len, &error))
397 {
398 error_print ("Unable to parse stream: %s. Continuing...",
399 error->message);
400 g_clear_error (&error);
401 control->parts = 2;
402 goto get_payload;
403 }
404
405 reader = json_reader_new (json_parser_get_root (parser));
406 if (!reader)
407 {
408 error_print ("Unable to read from parser. Continuing...");
409 control->parts = 2;
410 goto get_payload;
411 }
412
413 if (!json_reader_read_member (reader, MAN_TAG_SAMPLE_REFS))
414 {
415 debug_print (1, "Member '%s' not found\n", MAN_TAG_SAMPLE_REFS);
416 control->parts = 2;
417 goto get_payload;
418 }
419
420 if (!json_reader_is_array (reader))
421 {
422 error_print ("Member '%s' is not an array. Continuing...\n",
423 MAN_TAG_SAMPLE_REFS);
424 control->parts = 2;
425 goto cleanup_reader;
426 }
427
428 elements = json_reader_count_elements (reader);
429 if (!elements)
430 {
431 debug_print (1, "No samples found\n");
432 control->parts = 2;
433 goto cleanup_reader;
434 }
435
436 sample = g_byte_array_new ();
437 control->parts = 2 + elements;
438 set_job_control_progress (control, 0.0);
439 for (i = 0; i < elements; i++, control->part++)
440 {
441 if (!json_reader_read_element (reader, i))
442 {
443 error_print ("Cannot read element %d. Continuing...\n", i);
444 continue;
445 }
446 if (!json_reader_read_member (reader, MAN_TAG_HASH))
447 {
448 error_print ("Cannot read member '%s'. Continuing...\n",
449 MAN_TAG_HASH);
450 continue;
451 }
452 hash = json_reader_get_int_value (reader);
453 json_reader_end_element (reader);
454
455 if (!json_reader_read_member (reader, MAN_TAG_SIZE))
456 {
457 error_print ("Cannot read member '%s'. Continuing...\n",
458 MAN_TAG_SIZE);
459 continue;
460 }
461 size = json_reader_get_int_value (reader);
462 json_reader_end_element (reader);
463
464 json_reader_end_element (reader);
465
466 sample_path =
467 connector_get_sample_path_from_hash_size (connector, hash, size);
468 if (!sample_path)
469 {
470 debug_print (1, "Sample not found. Skipping...\n");
471 continue;
472 }
473
474 debug_print (1, "Hash: %ld; size: %ld; path: %s\n", hash, size,
475 sample_path);
476 debug_print (1, "Getting sample %s...\n", sample_path);
477 g_byte_array_set_size (sample, 0);
478 if (download_sample (sample_path, sample, control, connector))
479 {
480 g_free (sample_path);
481 error_print ("Error while downloading sample. Continuing...\n");
482 continue;
483 }
484
485 wave = g_byte_array_new ();
486 if (sample_wave (sample, wave, control))
487 {
488 error_print
489 ("Error while converting sample to wave file. Continuing...\n");
490 g_byte_array_free (wave, TRUE);
491 g_free (sample_path);
492 continue;
493 }
494 g_free (control->data);
495 control->data = NULL;
496
497 pkg_resource = g_malloc (sizeof (struct package_resource));
498 pkg_resource->type = PKG_RES_TYPE_SAMPLE;
499 pkg_resource->data = wave;
500 pkg_resource->hash = hash;
501 pkg_resource->size = size;
502 pkg_resource->path = g_malloc (PATH_MAX);
503 snprintf (pkg_resource->path, PATH_MAX, "%s%s.wav", PKG_TAG_SAMPLES,
504 sample_path);
505 if (package_add_resource (pkg, pkg_resource, TRUE))
506 {
507 package_free_package_resource (pkg_resource);
508 error_print ("Error while packaging sample\n");
509 continue;
510 }
511 }
512
513 g_byte_array_free (sample, TRUE);
514 cleanup_reader:
515 g_object_unref (reader);
516 g_object_unref (parser);
517 get_payload:
518 g_byte_array_free (metadata, TRUE);
519 debug_print (1, "Getting payload from %s...\n", payload_path);
520 payload = g_byte_array_new ();
521 ret = download_data (payload_path, payload, control, connector);
522 if (ret)
523 {
524 error_print ("Error while downloading payload\n");
525 ret = -1;
526 }
527 else
528 {
529 pkg_resource = g_malloc (sizeof (struct package_resource));
530 pkg_resource->type = PKG_RES_TYPE_PAYLOAD;
531 pkg_resource->data = payload;
532 pkg_resource->path = strdup (pkg->name);
533 if (package_add_resource (pkg, pkg_resource, TRUE))
534 {
535 package_free_package_resource (pkg_resource);
536 ret = -1;
537 }
538 }
539 return ret;
540 }
541
542 gint
543 package_send_pkg_resources (struct package *pkg,
544 const gchar * payload_path,
545 struct job_control *control,
546 struct connector *connector,
547 fs_remote_file_op upload_data,
548 fs_remote_file_op upload_sample)
549 {
550 gint elements, i, ret = 0;
551 const gchar *file_type, *sample_path;
552 gint64 product_type;
553 JsonParser *parser;
554 JsonReader *reader;
555 GError *error;
556 zip_stat_t zstat;
557 zip_error_t zerror;
558 zip_file_t *zip_file;
559 GByteArray *wave, *raw;
560 struct package_resource *pkg_resource;
561
562 zip_error_init (&zerror);
563
564 parser = json_parser_new ();
565 if (!json_parser_load_from_data
566 (parser, (gchar *) pkg->manifest->data->data, pkg->manifest->data->len,
567 &error))
568 {
569 error_print ("Unable to parse stream: %s", error->message);
570 g_clear_error (&error);
571 ret = -1;
572 goto cleanup_parser;
573 }
574
575 reader = json_reader_new (json_parser_get_root (parser));
576 if (!reader)
577 {
578 ret = -1;
579 goto cleanup_parser;
580 }
581
582 if (!json_reader_read_member (reader, PKG_TAG_PAYLOAD))
583 {
584 error_print ("No '%s' found\n", PKG_TAG_PAYLOAD);
585 ret = -1;
586 goto cleanup_reader;
587 }
588 pkg->name = strdup (json_reader_get_string_value (reader));
589 json_reader_end_element (reader);
590
591 if (zip_stat (pkg->zip, pkg->name, ZIP_FL_ENC_STRICT, &zstat))
592 {
593 error_print ("Error while loading '%s': %s\n", MANIFEST_FILENAME,
594 zip_error_strerror (&zerror));
595 zip_error_fini (&zerror);
596 ret = -1;
597 goto cleanup_reader;
598 }
599
600 pkg_resource = g_malloc (sizeof (struct package_resource));
601 pkg_resource->type = PKG_RES_TYPE_PAYLOAD;
602 pkg_resource->data = g_byte_array_sized_new (zstat.size);
603 pkg_resource->path = strdup (pkg->name);
604 zip_file = zip_fopen (pkg->zip, pkg->name, 0);
605 zip_fread (zip_file, pkg_resource->data->data, zstat.size);
606 pkg_resource->data->len = zstat.size;
607 zip_fclose (zip_file);
608
609 pkg->resources = g_list_append (pkg->resources, pkg_resource);
610
611 control->parts = 129; // 128 sample slots and main.
612 control->part = 0;
613 ret = upload_data (payload_path, pkg_resource->data, control, connector);
614 if (ret)
615 {
616 error_print ("Error while uploading payload to '%s'\n", payload_path);
617 goto cleanup_reader;
618 }
619 control->part++;
620
621 if (!json_reader_read_member (reader, PKG_TAG_FIRMWARE_VERSION))
622 {
623 error_print ("No '%s' found\n", PKG_TAG_FIRMWARE_VERSION);
624 ret = -1;
625 goto cleanup_reader;
626 }
627 pkg->fw_version = strdup (json_reader_get_string_value (reader));
628 json_reader_end_element (reader);
629
630 if (!json_reader_read_member (reader, PKG_TAG_FILE_TYPE))
631 {
632 error_print ("No '%s' found\n", PKG_TAG_FILE_TYPE);
633 ret = -1;
634 goto cleanup_reader;
635 }
636 file_type = json_reader_get_string_value (reader);
637 json_reader_end_element (reader);
638
639 if (strcmp (file_type, PKG_VAL_FILE_TYPE_SND) == 0)
640 {
641 pkg->type = PKG_FILE_TYPE_SOUND;
642 }
643 else if (strcmp (file_type, PKG_VAL_FILE_TYPE_PRJ) == 0)
644 {
645 pkg->type = PKG_FILE_TYPE_PROJECT;
646 }
647 else
648 {
649 pkg->type = PKG_FILE_TYPE_NONE;
650 debug_print (1, "Invalid '%s': %s\n", PKG_TAG_FILE_TYPE, file_type);
651 }
652
653 if (!json_reader_read_member (reader, PKG_TAG_PRODUCT_TYPE))
654 {
655 error_print ("No '%s' found\n", PKG_TAG_PRODUCT_TYPE);
656 ret = 0;
657 goto cleanup_reader;
658 }
659 if (!json_reader_is_array (reader))
660 {
661 error_print ("Member '%s' is not an array\n", PKG_TAG_PRODUCT_TYPE);
662 ret = -1;
663 goto cleanup_reader;
664 }
665 if (!json_reader_count_elements (reader))
666 {
667 error_print ("No product types found\n");
668 ret = 0;
669 goto cleanup_reader;
670 }
671 if (!json_reader_read_element (reader, 0))
672 {
673 ret = -1;
674 goto cleanup_reader;
675 }
676 product_type = atoi (json_reader_get_string_value (reader));
677 debug_print (1, "ProductType: %ld\n", product_type);
678 if (pkg->device_desc->id != product_type)
679 {
680 debug_print (1, "Incompatible product type. Continuing...\n");
681 }
682 json_reader_end_element (reader);
683 json_reader_end_element (reader);
684
685 if (!json_reader_read_member (reader, PKG_TAG_SAMPLES))
686 {
687 if (pkg->device_desc->filesystems & FS_SAMPLES)
688 {
689 debug_print (1, "No samples found\n");
690 }
691 control->parts = 1; // Only payload and it's done.
692 control->part = 0;
693 set_job_control_progress (control, 1.0);
694 goto cleanup_reader;
695 }
696
697 if (!json_reader_is_array (reader))
698 {
699 error_print ("Member '%s' is not an array. Skipping samples...\n",
700 PKG_TAG_SAMPLES);
701 ret = -1;
702 goto cleanup_reader;
703 }
704
705 wave = g_byte_array_sized_new (zstat.size);
706 raw = g_byte_array_sized_new (MAX_PACKAGE_LEN);
707 elements = json_reader_count_elements (reader);
708 control->parts = elements + 1;
709 for (i = 0; i < elements; i++, control->parts++)
710 {
711 json_reader_read_element (reader, i);
712 json_reader_read_member (reader, PKG_TAG_FILE_NAME);
713 sample_path = json_reader_get_string_value (reader);
714 json_reader_end_element (reader);
715 json_reader_end_element (reader);
716
717 if (zip_stat (pkg->zip, sample_path, ZIP_FL_ENC_STRICT, &zstat))
718 {
719 error_print ("Error while loading '%s': %s\n",
720 MANIFEST_FILENAME, zip_error_strerror (&zerror));
721 zip_error_fini (&zerror);
722 ret = -1;
723 continue;
724 }
725
726 g_byte_array_set_size (wave, zstat.size);
727 zip_file = zip_fopen (pkg->zip, sample_path, 0);
728 zip_fread (zip_file, wave->data, zstat.size);
729 wave->len = zstat.size;
730 zip_fclose (zip_file);
731
732 raw->len = 0;
733 if (sample_raw (wave, raw, control))
734 {
735 continue;
736 }
737
738 pkg_resource = g_malloc (sizeof (struct package_resource));
739 pkg_resource->type = PKG_RES_TYPE_SAMPLE;
740 pkg_resource->data = g_byte_array_sized_new (raw->len);
741 pkg_resource->data->len = raw->len;
742 memcpy (pkg_resource->data->data, raw->data, raw->len);
743 pkg_resource->path = strdup (sample_path);
744
745 pkg->resources = g_list_append (pkg->resources, pkg_resource);
746
747 //We remove the "Samples" at the beggining of the full zip path.
748 ret =
749 upload_sample (&sample_path[7], pkg_resource->data, control,
750 connector);
751 g_free (control->data);
752 control->data = NULL;
753 if (ret)
754 {
755 error_print ("Error while uploading sample to '%s'\n",
756 &sample_path[7]);
757 continue;
758 }
759 }
760
761 g_byte_array_free (wave, TRUE);
762 g_byte_array_free (raw, TRUE);
763
764 cleanup_reader:
765 g_object_unref (reader);
766 cleanup_parser:
767 g_object_unref (parser);
768 return ret;
769 }
+0
-83
src/package.h less more
0 /*
1 * package.h
2 * Copyright (C) 2021 David García Goñi <dagargo@gmail.com>
3 *
4 * This file is part of Elektroid.
5 *
6 * Elektroid is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * Elektroid is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with Elektroid. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #include <glib.h>
21 #include <zip.h>
22 #include "connector.h"
23
24 enum package_resource_type
25 {
26 PKG_RES_TYPE_NONE,
27 PKG_RES_TYPE_PAYLOAD,
28 PKG_RES_TYPE_MANIFEST,
29 PKG_RES_TYPE_SAMPLE
30 };
31
32 struct package_resource
33 {
34 enum package_resource_type type;
35 guint32 hash;
36 guint32 size;
37 gchar *path;
38 GByteArray *data;
39 };
40
41 enum package_type
42 {
43 PKG_FILE_TYPE_NONE,
44 PKG_FILE_TYPE_SOUND,
45 PKG_FILE_TYPE_PROJECT,
46 PKG_FILE_TYPE_PRESET,
47 };
48
49 struct package
50 {
51 gchar *name;
52 enum package_type type;
53 gchar *fw_version;
54 const struct connector_device_desc *device_desc;
55 gchar *buff;
56 zip_source_t *zip_source;
57 zip_t *zip;
58 GList *resources;
59 struct package_resource *manifest;
60 };
61
62 gint package_begin (struct package *, gchar *, const gchar *,
63 const struct connector_device_desc *, enum package_type);
64
65 gint package_receive_pkg_resources (struct package *, const gchar *,
66 struct job_control *, struct connector *,
67 fs_remote_file_op, fs_remote_file_op);
68
69 gint package_end (struct package *, GByteArray *);
70
71 void package_destroy (struct package *);
72
73 gint package_open (struct package *, GByteArray *,
74 const struct connector_device_desc *);
75
76 gint package_send_pkg_resources (struct package *,
77 const gchar *,
78 struct job_control *,
79 struct connector *, fs_remote_file_op,
80 fs_remote_file_op);
81
82 void package_close (struct package *);
2727 #define PREFERENCES_FILE "/preferences.json"
2828
2929 #define MEMBER_AUTOPLAY "autoplay"
30 #define MEMBER_MIX "mix"
3031 #define MEMBER_LOCALDIR "localDir"
3132
3233 gint
6162 json_builder_set_member_name (builder, MEMBER_AUTOPLAY);
6263 json_builder_add_boolean_value (builder, preferences->autoplay);
6364
65 json_builder_set_member_name (builder, MEMBER_MIX);
66 json_builder_add_boolean_value (builder, preferences->mix);
67
6468 json_builder_set_member_name (builder, MEMBER_LOCALDIR);
6569 json_builder_add_string_value (builder, preferences->local_dir);
6670
8589 gint
8690 preferences_load (struct preferences *preferences)
8791 {
88 size_t n;
8992 GError *error;
9093 JsonReader *reader;
9194 JsonParser *parser = json_parser_new ();
99102 CONF_DIR PREFERENCES_FILE, error->message);
100103 g_error_free (error);
101104 g_object_unref (parser);
105 g_free (preferences_file);
102106 preferences->autoplay = TRUE;
107 preferences->mix = TRUE;
103108 preferences->local_dir = get_expanded_dir ("~");
104109 return 0;
105110 }
116121 }
117122 json_reader_end_member (reader);
118123
119 if (json_reader_read_member (reader, MEMBER_LOCALDIR))
124 if (json_reader_read_member (reader, MEMBER_MIX))
125 {
126 preferences->mix = json_reader_get_boolean_value (reader);
127 }
128 else
129 {
130 preferences->mix = TRUE;
131 }
132 json_reader_end_member (reader);
133
134 if (json_reader_read_member (reader, MEMBER_LOCALDIR) &&
135 g_file_test (json_reader_get_string_value (reader),
136 (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR)))
120137 {
121138 preferences->local_dir = malloc (PATH_MAX);
122 n = PATH_MAX - 1;
123 strncpy (preferences->local_dir, json_reader_get_string_value (reader),
124 n);
125 preferences->local_dir[PATH_MAX - 1] = 0;
139 strcpy (preferences->local_dir, json_reader_get_string_value (reader));
126140 }
127141 else
128142 {
2222 struct preferences
2323 {
2424 gboolean autoplay;
25 gboolean mix;
2526 gchar *local_dir;
2627 };
2728
2121 #include <sndfile.h>
2222 #include <samplerate.h>
2323 #include <inttypes.h>
24 #include <math.h>
2425 #include "sample.h"
2526
2627 #define JUNK_CHUNK_ID "JUNK"
2728 #define SMPL_CHUNK_ID "smpl"
29
30 static const gchar *ELEKTROID_AUDIO_LOCAL_EXTS[] =
31 { "wav", "ogg", "aiff", "flac", NULL };
32
33 static const gchar *ELEKTROID_AUDIO_LOCAL_EXTS_MP3[] =
34 { "wav", "ogg", "aiff", "flac", "mp3", NULL };
2835
2936 struct smpl_chunk_data
3037 {
6168 0, 0, 0, 0
6269 };
6370
64 static sf_count_t get_filelen_byte_array_io (void *);
65 static sf_count_t seek_byte_array_io (sf_count_t, int, void *);
66 static sf_count_t read_byte_array_io (void *, sf_count_t, void *);
67 static sf_count_t write_byte_array_io (const void *, sf_count_t, void *);
68 static sf_count_t tell_byte_array_io (void *);
69
70 static SF_VIRTUAL_IO G_BYTE_ARRAY_IO = {
71 .get_filelen = get_filelen_byte_array_io,
72 .seek = seek_byte_array_io,
73 .read = read_byte_array_io,
74 .write = write_byte_array_io,
75 .tell = tell_byte_array_io
76 };
77
7871 static sf_count_t
7972 get_filelen_byte_array_io (void *user_data)
8073 {
148141 return data->pos;
149142 }
150143
144 static SF_VIRTUAL_IO G_BYTE_ARRAY_IO = {
145 .get_filelen = get_filelen_byte_array_io,
146 .seek = seek_byte_array_io,
147 .read = read_byte_array_io,
148 .write = write_byte_array_io,
149 .tell = tell_byte_array_io
150 };
151
152 static sf_count_t
153 get_filelen_file_io (void *user_data)
154 {
155 long fileSize, position;
156 FILE *file = user_data;
157 position = fseek (file, 0, SEEK_END);
158 fileSize = ftell (file);
159 fseek (file, position, SEEK_SET);
160 return fileSize;
161 }
162
163 static sf_count_t
164 seek_file_io (sf_count_t offset, int whence, void *user_data)
165 {
166 FILE *file = user_data;
167 return fseek (file, offset, whence);
168 }
169
170 static sf_count_t
171 read_file_io (void *ptr, sf_count_t count, void *user_data)
172 {
173 FILE *file = user_data;
174 return fread (ptr, 1, count, file);
175 }
176
177 static sf_count_t
178 write_file_io (const void *ptr, sf_count_t count, void *user_data)
179 {
180 FILE *file = user_data;
181 return fwrite (ptr, 1, count, file);
182 }
183
184 static sf_count_t
185 tell_file_io (void *user_data)
186 {
187 FILE *file = user_data;
188 return ftell (file);
189 }
190
191 static SF_VIRTUAL_IO FILE_IO = {
192 .get_filelen = get_filelen_file_io,
193 .seek = seek_file_io,
194 .read = read_file_io,
195 .write = write_file_io,
196 .tell = tell_file_io
197 };
198
151199 static gint
152 sample_wave_data (GByteArray * sample,
153 struct job_control *control,
154 struct g_byte_array_io_data *wave)
200 sample_get_wave_data (GByteArray * sample, struct job_control *control,
201 struct g_byte_array_io_data *wave)
155202 {
156203 SF_INFO sf_info;
157204 SNDFILE *sndfile;
159206 struct SF_CHUNK_INFO junk_chunk_info;
160207 struct SF_CHUNK_INFO smpl_chunk_info;
161208 struct smpl_chunk_data smpl_chunk_data;
162 struct sample_loop_data *sample_loop_data = control->data;
209 struct sample_info *sample_info = control->data;
163210
164211 g_byte_array_set_size (wave->array, sample->len + 1024); //We need space for the headers.
165212 wave->array->len = 0;
166213
214 frames = sample->len >> sample_info->channels;
215 debug_print (1, "Frames: %ld; sample rate: %d; channels: %d\n", frames,
216 sample_info->samplerate, sample_info->channels);
167217 debug_print (1, "Loop start at %d; loop end at %d\n",
168 sample_loop_data->start, sample_loop_data->end);
218 sample_info->loopstart, sample_info->loopend);
169219
170220 memset (&sf_info, 0, sizeof (sf_info));
171 sf_info.samplerate = ELEKTRON_SAMPLE_RATE;
172 sf_info.channels = 1;
221 sf_info.samplerate = sample_info->samplerate;
222 sf_info.channels = sample_info->channels;
173223 sf_info.format = SF_FORMAT_WAV | SF_FORMAT_PCM_16;
174224 sndfile = sf_open_virtual (&G_BYTE_ARRAY_IO, SFM_WRITE, &sf_info, wave);
175225 if (!sndfile)
189239
190240 smpl_chunk_data.manufacturer = 0;
191241 smpl_chunk_data.product = 0;
192 smpl_chunk_data.sample_period = 1000000000 / ELEKTRON_SAMPLE_RATE;
242 smpl_chunk_data.sample_period = 1e9 / sample_info->samplerate;
193243 smpl_chunk_data.midi_unity_note = 60;
194244 smpl_chunk_data.midi_pitch_fraction = 0;
195245 smpl_chunk_data.smpte_format = 0;
197247 smpl_chunk_data.num_sampler_loops = 1;
198248 smpl_chunk_data.sampler_data = 0;
199249 smpl_chunk_data.sample_loop.cue_point_id = 0;
200 smpl_chunk_data.sample_loop.type = ELEKTRON_LOOP_TYPE;
201 smpl_chunk_data.sample_loop.start = sample_loop_data->start;
202 smpl_chunk_data.sample_loop.end = sample_loop_data->end;
250 smpl_chunk_data.sample_loop.type = sample_info->looptype;
251 smpl_chunk_data.sample_loop.start = sample_info->loopstart;
252 smpl_chunk_data.sample_loop.end = sample_info->loopend;
203253 smpl_chunk_data.sample_loop.fraction = 0;
204254 smpl_chunk_data.sample_loop.play_count = 0;
205255
212262 error_print ("%s\n", sf_strerror (sndfile));
213263 }
214264
215 frames = sample->len >> 1;
216 total = sf_write_short (sndfile, (gint16 *) sample->data, frames);
217
265 total = sf_writef_short (sndfile, (gint16 *) sample->data, frames);
218266 sf_close (sndfile);
219267
220268 if (total != frames)
221269 {
222 error_print ("Unexpected frames while writing to sample (%ld != %ld)\n",
270 error_print ("Unexpected frames while writing to file (%ld != %ld)\n",
223271 total, frames);
224272 return -1;
225273 }
228276 }
229277
230278 gint
231 sample_wave (GByteArray * sample, GByteArray * wave,
232 struct job_control *control)
279 sample_get_wav_from_array (GByteArray * sample, GByteArray * wave,
280 struct job_control *control)
233281 {
234282 struct g_byte_array_io_data data;
235283 data.pos = 0;
236284 data.array = wave;
237 return sample_wave_data (sample, control, &data);
285 return sample_get_wave_data (sample, control, &data);
238286 }
239287
240288 gint
241 sample_save (const gchar * path, GByteArray * sample,
242 struct job_control *control)
289 sample_save_from_array (const gchar * path, GByteArray * sample,
290 struct job_control *control)
243291 {
244292 GByteArray *wave = g_byte_array_new ();
245 gint ret = sample_wave (sample, wave, control);
293 gint ret = sample_get_wav_from_array (sample, wave, control);
246294 if (!ret)
247295 {
248296 ret = save_file (path, wave, control);
271319 }
272320 }
273321
322 // If control->data is NULL, then a new struct sample_info * is created and control->data points to it.
323 // In case of failure, if control->data is NULL is freed.
324 // Franes is the amount of frames after resampling. This value is set before the loading has terminated.
325
274326 static gint
275 sample_raw_data (struct g_byte_array_io_data *wave,
327 sample_load_raw (void *data, SF_VIRTUAL_IO * sf_virtual_io,
276328 struct job_control *control, GByteArray * sample,
277 guint * frames)
329 const struct sample_params *sample_params, guint * frames)
278330 {
279331 SF_INFO sf_info;
280332 SNDFILE *sndfile;
287339 gint16 *buffer_input_mono;
288340 gint16 *buffer_s;
289341 gfloat *buffer_f;
290 gint err;
291 gint resampled_buffer_len;
292 gint f, frames_read;
342 gint err, resampled_buffer_len, f, frames_read, channels, samplerate;
293343 gboolean active;
294 struct sample_loop_data *sample_loop_data;
344 gdouble ratio;
345 struct sample_info *sample_info;
295346 struct smpl_chunk_data smpl_chunk_data;
347 gboolean disable_loop = FALSE;
296348
297349 if (control)
298350 {
305357 }
306358
307359 sf_info.format = 0;
308 sndfile = sf_open_virtual (&G_BYTE_ARRAY_IO, SFM_READ, &sf_info, wave);
360 sndfile = sf_open_virtual (sf_virtual_io, SFM_READ, &sf_info, data);
309361 if (!sndfile)
310362 {
311363 error_print ("%s\n", sf_strerror (sndfile));
315367 strcpy (chunk_info.id, SMPL_CHUNK_ID);
316368 chunk_info.id_size = strlen (SMPL_CHUNK_ID);
317369 chunk_iter = sf_get_chunk_iterator (sndfile, &chunk_info);
318 sample_loop_data = malloc (sizeof (struct sample_loop_data));
370 sample_info = control->data;
371 if (!control->data)
372 {
373 sample_info = g_malloc (sizeof (struct sample_info));
374 }
375
376 channels = sample_params->channels == 2 && sf_info.channels == 2 ? 2 : 1;
377 samplerate =
378 sample_params->samplerate ? sample_params->
379 samplerate : sf_info.samplerate;
380
381 if (control)
382 {
383 g_mutex_lock (&control->mutex);
384 }
385 sample_info->channels = sf_info.channels;
386 sample_info->samplerate = sf_info.samplerate;
387 sample_info->frames = sf_info.frames;
388 if (control)
389 {
390 g_mutex_unlock (&control->mutex);
391 }
392
319393 if (chunk_iter)
320394 {
321395 chunk_info.datalen = sizeof (struct smpl_chunk_data);
396 memset (&smpl_chunk_data, 0, chunk_info.datalen);
322397 chunk_info.data = &smpl_chunk_data;
323398 sf_get_chunk_data (chunk_iter, &chunk_info);
324399
325 sample_loop_data->start = le32toh (smpl_chunk_data.sample_loop.start);
326 sample_loop_data->end = le32toh (smpl_chunk_data.sample_loop.end);
400 if ((sf_info.format & SF_FORMAT_TYPEMASK) == SF_FORMAT_WAV)
401 {
402 switch (sf_info.format & SF_FORMAT_SUBMASK)
403 {
404 case SF_FORMAT_PCM_S8:
405 sample_info->bitdepth = 8;
406 break;
407 case SF_FORMAT_PCM_16:
408 sample_info->bitdepth = 16;
409 break;
410 case SF_FORMAT_PCM_24:
411 sample_info->bitdepth = 24;
412 break;
413 case SF_FORMAT_PCM_32:
414 sample_info->bitdepth = 32;
415 break;
416 default:
417 sample_info->bitdepth = 0;
418 }
419 }
420 else
421 {
422 sample_info->bitdepth = 0;
423 }
424 sample_info->loopstart = le32toh (smpl_chunk_data.sample_loop.start);
425 sample_info->loopend = le32toh (smpl_chunk_data.sample_loop.end);
426 sample_info->looptype = le32toh (smpl_chunk_data.sample_loop.type);
427 if (sample_info->loopstart >= sf_info.frames)
428 {
429 debug_print (2, "Bad loop start\n");
430 disable_loop = TRUE;
431 }
432 if (sample_info->loopend >= sf_info.frames)
433 {
434 debug_print (2, "Bad loop end\n");
435 disable_loop = TRUE;
436 }
327437 }
328438 else
329439 {
330 sample_loop_data->start = 0;
331 sample_loop_data->end = 0;
332 }
333
334 control->data = sample_loop_data;
440 disable_loop = TRUE;
441 }
442 if (disable_loop)
443 {
444 sample_info->loopstart = sf_info.frames - 1;
445 sample_info->loopend = sample_info->loopstart;
446 sample_info->looptype = 0;
447 }
448 sample_info->bitdepth = 16;
335449
336450 //Set scale factor. See http://www.mega-nerd.com/libsndfile/api.html#note2
337451 if ((sf_info.format & SF_FORMAT_FLOAT) == SF_FORMAT_FLOAT ||
346460 malloc (LOAD_BUFFER_LEN * sf_info.channels * sizeof (gint16));
347461 buffer_input_mono = malloc (LOAD_BUFFER_LEN * sizeof (gint16));
348462
349 buffer_f = malloc (LOAD_BUFFER_LEN * sizeof (gfloat));
463 buffer_f = malloc (LOAD_BUFFER_LEN * channels * sizeof (gfloat));
350464 src_data.data_in = buffer_f;
351 src_data.src_ratio = ((double) ELEKTRON_SAMPLE_RATE) / sf_info.samplerate;
352
353 resampled_buffer_len = LOAD_BUFFER_LEN * src_data.src_ratio;
465 ratio = samplerate / (double) sf_info.samplerate;
466 src_data.src_ratio = ratio;
467
468 src_data.output_frames = ceil (LOAD_BUFFER_LEN * src_data.src_ratio);
469 resampled_buffer_len = src_data.output_frames * channels;
354470 buffer_s = malloc (resampled_buffer_len * sizeof (gint16));
355471 src_data.data_out = malloc (resampled_buffer_len * sizeof (gfloat));
356472
357 src_state = src_new (SRC_SINC_BEST_QUALITY, 1, &err);
473 src_state = src_new (SRC_SINC_BEST_QUALITY, channels, &err);
358474 if (err)
359475 {
360476 goto cleanup;
361477 }
362478
363 if (frames)
364 {
365 *frames = sf_info.frames * src_data.src_ratio;
366 }
367
368 if (ELEKTRON_SAMPLE_RATE != sf_info.samplerate)
479 *frames = sf_info.frames * src_data.src_ratio;
480
481 if (samplerate != sf_info.samplerate)
369482 {
370483 debug_print (2, "Loop start at %d, loop end at %d before resampling\n",
371 sample_loop_data->start, sample_loop_data->end);
372 sample_loop_data->start *= src_data.src_ratio;
373 sample_loop_data->end *= src_data.src_ratio;
484 sample_info->loopstart, sample_info->loopend);
485 sample_info->loopstart = round (sample_info->loopstart * ratio);
486 sample_info->loopend = round (sample_info->loopend * ratio);
374487 debug_print (2, "Loop start at %d, loop end at %d after resampling\n",
375 sample_loop_data->start, sample_loop_data->end);
488 sample_info->loopstart, sample_info->loopend);
376489 }
377490
378491 debug_print (2, "Loading sample (%" PRId64 " frames)...\n", sf_info.frames);
379492
380 f = 0;
381493 if (control)
382494 {
383495 g_mutex_lock (&control->mutex);
389501 active = TRUE;
390502 }
391503
504 f = 0;
392505 while (f < sf_info.frames && active)
393506 {
394 debug_print (2, "Loading buffer...\n");
395
396 frames_read =
397 sf_readf_short (sndfile, buffer_input_multi, LOAD_BUFFER_LEN);
398
399 if (frames_read < LOAD_BUFFER_LEN)
400 {
401 src_data.end_of_input = SF_TRUE;
402 }
403 else
404 {
405 src_data.end_of_input = 0;
406 }
407 src_data.input_frames = frames_read;
507 debug_print (2, "Loading %d channels buffer...\n", channels);
508 frames_read = sf_readf_short (sndfile, buffer_input_multi,
509 LOAD_BUFFER_LEN);
408510 f += frames_read;
409511
410 if (sf_info.channels == 1)
512 if (channels == sf_info.channels) // 1 <= channels <= 2
411513 {
412514 buffer_input = buffer_input_multi;
413515 }
418520 buffer_input = buffer_input_mono;
419521 }
420522
421 if (sf_info.samplerate == ELEKTRON_SAMPLE_RATE)
523 if (samplerate == sf_info.samplerate)
422524 {
423525 if (control)
424526 {
425527 g_mutex_lock (&control->mutex);
426528 }
427529 g_byte_array_append (sample, (guint8 *) buffer_input,
428 frames_read << 1);
530 frames_read << channels);
429531 if (control)
430532 {
431533 g_mutex_unlock (&control->mutex);
433535 }
434536 else
435537 {
436 src_short_to_float_array (buffer_input, buffer_f, frames_read);
437 src_data.output_frames = src_data.input_frames * src_data.src_ratio;
538 src_data.end_of_input = frames_read < LOAD_BUFFER_LEN ? SF_TRUE : 0;
539 src_data.input_frames = frames_read;
540
541 src_short_to_float_array (buffer_input, buffer_f,
542 frames_read * channels);
543 debug_print (2, "Resampling %d channels with ratio %f...\n",
544 channels, src_data.src_ratio);
438545 err = src_process (src_state, &src_data);
439 debug_print (2, "Resampling...\n");
440546 if (err)
441547 {
442 debug_print (2, "Error %s\n", src_strerror (err));
548 g_byte_array_set_size (sample, 0);
549 error_print ("Error while resampling: %s\n",
550 src_strerror (err));
443551 break;
444552 }
445553 src_float_to_short_array (src_data.data_out, buffer_s,
446 src_data.output_frames_gen);
554 src_data.output_frames_gen * channels);
447555 if (control)
448556 {
449557 g_mutex_lock (&control->mutex);
450558 }
451559 g_byte_array_append (sample, (guint8 *) buffer_s,
452 src_data.output_frames_gen << 1);
560 src_data.output_frames_gen << channels);
453561 if (control)
454562 {
455563 g_mutex_unlock (&control->mutex);
458566
459567 if (control)
460568 {
461 control->callback (f * 1.0 / sf_info.frames);
462569 g_mutex_lock (&control->mutex);
570 set_job_control_progress_no_sync (control,
571 f * 1.0 / sf_info.frames);
463572 active = control->active;
464573 g_mutex_unlock (&control->mutex);
465574 }
467576
468577 src_delete (src_state);
469578
470 if (err)
471 {
472 error_print ("Error while preparing resampling: %s\n",
473 src_strerror (err));
474 }
475
476579 if (control)
477580 {
478581 g_mutex_lock (&control->mutex);
479582
480583 if (control->active)
481584 {
482 control->callback (1.0);
585 set_job_control_progress_no_sync (control, 1.0);
483586 }
484587 else
485588 {
498601
499602 sf_close (sndfile);
500603
501 if (!sample->len)
502 {
503 g_free (control->data);
504 }
505
506 return sample->len > 0 ? 0 : -1;
507 }
508
509 static gint
510 sample_raw_frames (GByteArray * wave, GByteArray * sample,
511 struct job_control *control, guint * frames)
604 if (sample->len)
605 {
606 if (!control->data)
607 {
608 control->data = sample_info;
609 }
610 // This removes the additional samples added by the resampler due to rounding.
611 g_byte_array_set_size (sample, *frames << channels);
612 return 0;
613 }
614 else
615 {
616 if (!control->data)
617 {
618 g_free (sample_info);
619 }
620 return -1;
621 }
622 }
623
624 gint
625 sample_load_from_array (GByteArray * wave, GByteArray * sample,
626 struct job_control *control,
627 const struct sample_params *sample_params,
628 guint * frames)
512629 {
513630 struct g_byte_array_io_data data;
514631 data.pos = 0;
515632 data.array = wave;
516 return sample_raw_data (&data, control, sample, frames);
633 return sample_load_raw (&data, &G_BYTE_ARRAY_IO, control, sample,
634 sample_params, frames);
517635 }
518636
519637 gint
520 sample_raw (GByteArray * wave, GByteArray * sample,
521 struct job_control *control)
522 {
523 return sample_raw_frames (wave, sample, control, NULL);
524 }
525
526 gint
527 sample_load_with_frames (const gchar * path, GByteArray * sample,
528 struct job_control *control, guint * frames)
529 {
530 GByteArray *wave = g_byte_array_new ();
531
532 debug_print (1, "Loading file %s...\n", path);
533
534 int ret = load_file (path, wave, control);
535 if (!ret)
536 {
537 ret = sample_raw_frames (wave, sample, control, frames);
538 }
539 g_byte_array_free (wave, TRUE);
540 return ret;
541 }
542
543 gint
544 sample_load (const gchar * path, GByteArray * sample,
545 struct job_control *control)
546 {
547 return sample_load_with_frames (path, sample, control, NULL);
548 }
549
550 gboolean
638 sample_load_from_file (const gchar * path, GByteArray * sample,
639 struct job_control *control,
640 const struct sample_params *sample_params,
641 guint * frames)
642 {
643 FILE *file = fopen (path, "rb");
644 if (!file)
645 {
646 return errno;
647 }
648 gint err = sample_load_raw (file, &FILE_IO, control, sample, sample_params,
649 frames);
650 fclose (file);
651 return err;
652 }
653
654 static gboolean
551655 sample_is_mp3_supported ()
552656 {
553657 static char buffer[LABEL_MAX];
561665
562666 return FALSE;
563667 }
668
669 const gchar **
670 sample_get_sample_extensions ()
671 {
672 if (sample_is_mp3_supported ())
673 {
674 return ELEKTROID_AUDIO_LOCAL_EXTS_MP3;
675 }
676 return ELEKTROID_AUDIO_LOCAL_EXTS;
677 }
2525 #ifndef SAMPLE_H
2626 #define SAMPLE_H
2727
28 #define LOAD_BUFFER_LEN 4800 // In guint16 frames; 9600 B; 0.1 ms
28 #define LOAD_BUFFER_LEN 9600 // In guint16 frames; 0.2 ms
2929
30 gint sample_wave (GByteArray *, GByteArray *, struct job_control *);
30 gint sample_get_wav_from_array (GByteArray *, GByteArray *,
31 struct job_control *);
3132
32 gint sample_raw (GByteArray *, GByteArray *, struct job_control *);
33 gint sample_save_from_array (const gchar *, GByteArray *,
34 struct job_control *);
3335
34 gint sample_save (const gchar *, GByteArray *, struct job_control *);
36 gint sample_load_from_array (GByteArray *, GByteArray *, struct job_control *,
37 const struct sample_params *, guint *);
3538
36 gint sample_load (const gchar *, GByteArray *, struct job_control *);
39 gint sample_load_from_file (const gchar *, GByteArray *, struct job_control *,
40 const struct sample_params *, guint *);
3741
38 gint sample_load_with_frames (const gchar *, GByteArray *,
39 struct job_control *, guint *);
40
41 gboolean sample_is_mp3_supported ();
42 const gchar **sample_get_sample_extensions ();
4243
4344 #endif
2323 #include "utils.h"
2424
2525 #define DEBUG_SHORT_HEX_LEN 64
26 #define DEBUG_FULL_HEX_THRES 3
26 #define DEBUG_FULL_HEX_THRES 5
2727
2828 #define KIB 1024
29
30 #define DEVICES_FILE "/devices.json"
31
32 #define DEV_TAG_ID "id"
33 #define DEV_TAG_NAME "name"
34 #define DEV_TAG_ALIAS "alias"
35 #define DEV_TAG_FILESYSTEMS "filesystems"
36 #define DEV_TAG_STORAGE "storage"
3729
3830 gint debug_level;
3931
137129 remove_ext (char *name)
138130 {
139131 gint namelen = strlen (name);
140 gchar *dot = &name[namelen];
141 gint i = namelen;
142
143 while (*dot != '.' && i > 0)
144 {
132 gchar *dot = &name[namelen - 1];
133 gint i = namelen - 1;
134
135 while (i > 0)
136 {
137 if (*dot == '.')
138 {
139 *dot = 0;
140 break;
141 }
145142 dot--;
146143 i--;
147144 }
148 *dot = 0;
149145 }
150146
151147 const gchar *
241237 else
242238 {
243239 index = malloc (LABEL_MAX);
244 snprintf (index, LABEL_MAX, "%d", item->index);
240 snprintf (index, LABEL_MAX, "%d", item->id);
245241 }
246242
247243 return index;
262258 }
263259 }
264260
265 gint
261 inline gint
266262 copy_item_iterator (struct item_iterator *dst, struct item_iterator *src,
267263 gboolean cached)
268264 {
353349 }
354350
355351 gchar *
356 get_human_size (guint size, gboolean with_space)
352 get_human_size (gint64 size, gboolean with_space)
357353 {
358354 gchar *label = malloc (LABEL_MAX);
359355 gchar *space = with_space ? " " : "";
360356
361 if (size < KIB)
362 {
363 snprintf (label, LABEL_MAX, "%d%sB", size, space);
357 if (size < 0)
358 {
359 label = strdup ("");
360 }
361 else if (size < KIB)
362 {
363 snprintf (label, LABEL_MAX, "%ld%sB", size, space);
364364 }
365365 else if (size < KIB * KIB)
366366 {
380380 return label;
381381 }
382382
383 static inline void
384 set_job_control_progress_value (struct job_control *control, gdouble p)
385 {
386 control->progress =
387 (control->part / (double) control->parts) + (p / (double) control->parts);
388 }
389
383390 void
384391 set_job_control_progress (struct job_control *control, gdouble p)
385392 {
386 gdouble v = (double) control->part / control->parts + p / control->parts;
387 control->callback (v);
388 }
389
390 gint
391 load_device_desc (struct connector_device_desc *device_desc, guint8 id,
392 const char *devices_filename_)
393 {
394 gint err, devices;
395 JsonParser *parser;
396 JsonReader *reader;
397 gchar *devices_filename;
398 GError *error = NULL;
399
400 parser = json_parser_new ();
401
402 if (devices_filename_)
403 {
404 devices_filename = strdup (devices_filename_);
405
406 if (!json_parser_load_from_file (parser, devices_filename, &error))
407 {
408 error_print ("%s", error->message);
409 g_clear_error (&error);
410 err = -ENODEV;
411 goto cleanup_parser;
412 }
413 }
414 else
415 {
416 devices_filename = get_expanded_dir (CONF_DIR DEVICES_FILE);
417
418 if (!json_parser_load_from_file (parser, devices_filename, &error))
419 {
420 debug_print (1, "%s\n", error->message);
421 g_clear_error (&error);
422
423 g_free (devices_filename);
424 devices_filename = strdup (DATADIR DEVICES_FILE);
425
426 debug_print (1, "Falling back to %s...\n", devices_filename);
427
428 if (!json_parser_load_from_file (parser, devices_filename, &error))
429 {
430 error_print ("%s", error->message);
431 g_clear_error (&error);
432 err = -ENODEV;
433 goto cleanup_parser;
434 }
435 }
436 }
437
438 reader = json_reader_new (json_parser_get_root (parser));
439 if (!reader)
440 {
441 error_print ("Unable to read from parser");
442 err = -ENODEV;
443 goto cleanup_parser;
444 }
445
446 if (!json_reader_is_array (reader))
447 {
448 error_print ("Not an array\n");
449 err = -ENODEV;
450 goto cleanup_reader;
451 }
452
453 devices = json_reader_count_elements (reader);
454 if (!devices)
455 {
456 debug_print (1, "No devices found\n");
457 err = -ENODEV;
458 goto cleanup_reader;
459 }
460
461 err = -ENODEV;
462 for (int i = 0; i < devices; i++)
463 {
464 if (!json_reader_read_element (reader, i))
465 {
466 error_print ("Cannot read element %d. Continuing...\n", i);
467 continue;
468 }
469
470 if (!json_reader_read_member (reader, DEV_TAG_ID))
471 {
472 error_print ("Cannot read member '%s'. Continuing...\n",
473 DEV_TAG_ID);
474 continue;
475 }
476 device_desc->id = json_reader_get_int_value (reader);
477 json_reader_end_member (reader);
478
479 if (device_desc->id != id)
480 {
481 json_reader_end_element (reader);
482 continue;
483 }
484
485 err = 0;
486 debug_print (1, "Device %d found\n", id);
487
488 if (!json_reader_read_member (reader, DEV_TAG_NAME))
489 {
490 error_print ("Cannot read member '%s'. Stopping...\n",
491 DEV_TAG_NAME);
492 json_reader_end_element (reader);
493 err = -ENODEV;
494 break;
495 }
496 device_desc->name = strdup (json_reader_get_string_value (reader));
497 json_reader_end_member (reader);
498
499 if (!json_reader_read_member (reader, DEV_TAG_ALIAS))
500 {
501 error_print ("Cannot read member '%s'. Stopping...\n",
502 DEV_TAG_ALIAS);
503 json_reader_end_element (reader);
504 err = -ENODEV;
505 break;
506 }
507 device_desc->alias = strdup (json_reader_get_string_value (reader));
508 json_reader_end_member (reader);
509
510 if (!json_reader_read_member (reader, DEV_TAG_FILESYSTEMS))
511 {
512 error_print ("Cannot read member '%s'. Stopping...\n",
513 DEV_TAG_FILESYSTEMS);
514 json_reader_end_element (reader);
515 err = -ENODEV;
516 break;
517 }
518 device_desc->filesystems = json_reader_get_int_value (reader);
519 json_reader_end_member (reader);
520
521 if (!json_reader_read_member (reader, DEV_TAG_STORAGE))
522 {
523 error_print ("Cannot read member '%s'. Stopping...\n",
524 DEV_TAG_STORAGE);
525 json_reader_end_element (reader);
526 err = -ENODEV;
527 break;
528 }
529 device_desc->storage = json_reader_get_int_value (reader);
530 json_reader_end_member (reader);
531
532 break;
533 }
534
535 cleanup_reader:
536 g_object_unref (reader);
537 cleanup_parser:
538 g_object_unref (parser);
539 g_free (devices_filename);
540 return err;
541 }
393 g_mutex_lock (&control->mutex);
394 set_job_control_progress_value (control, p);
395 g_mutex_unlock (&control->mutex);
396
397 if (control->callback)
398 {
399 control->callback (control);
400 }
401 }
402
403 void
404 set_job_control_progress_no_sync (struct job_control *control, gdouble p)
405 {
406 set_job_control_progress_value (control, p);
407
408 if (control->callback)
409 {
410 control->callback (control);
411 }
412 }
413
414 gboolean
415 file_matches_extensions (const gchar * name, gchar ** extensions)
416 {
417 const gchar *extension;
418 gchar **e = extensions;
419
420 if (!e)
421 {
422 return TRUE;
423 }
424
425 extension = get_ext (name);
426 if (!extension)
427 {
428 return FALSE;
429 }
430
431 while (*e)
432 {
433 if (!strcasecmp (extension, *e))
434 {
435 return TRUE;
436 }
437 e++;
438 }
439
440 return FALSE;
441 }
442
443 gboolean
444 iter_matches_extensions (struct item_iterator *iter, gchar ** extensions)
445 {
446 if (iter->item.type == ELEKTROID_DIR)
447 {
448 return TRUE;
449 }
450
451 return file_matches_extensions (iter->item.name, extensions);
452 }
2828
2929 #define CONF_DIR "~/.config/" PACKAGE
3030
31 #define LABEL_MAX 128
32
33 #define ELEKTRON_LOOP_TYPE 0x7f
34 #define ELEKTRON_SAMPLE_RATE 48000
31 #define LABEL_MAX 256
32
33 #define AUDIO_SAMPLE_RATE 48000
34
35 #define MAX_BACKEND_FSS (sizeof (gint32) * 8)
36 #define MAX_BACKEND_STORAGE MAX_BACKEND_FSS
3537
3638 #define debug_print(level, format, ...) if (level <= debug_level) fprintf(stderr, "DEBUG:" __FILE__ ":%d:(%s): " format, __LINE__, __FUNCTION__, ## __VA_ARGS__)
3739 #define error_print(format, ...) fprintf(stderr, "%sERROR:" __FILE__ ":%d:(%s): " format "%s", isatty(fileno(stderr)) ? "\x1b[31m" : "", __LINE__, __FUNCTION__, ## __VA_ARGS__, isatty(fileno(stderr)) ? "\x1b[m" : "")
4345 ELEKTROID_DIR = 'D'
4446 };
4547
48 struct backend;
49
4650 struct item_iterator;
4751
4852 typedef guint (*iterator_next) (struct item_iterator *);
4953
5054 typedef void (*iterator_free) (void *);
5155
52 typedef gint (*iterator_copy) (struct item_iterator *,
53 struct item_iterator *, gboolean);
56 typedef gint (*iterator_copy) (struct item_iterator *, struct item_iterator *,
57 gboolean);
5458
5559 struct item
5660 {
57 gchar *name;
58 guint32 size;
59 gint32 index;
61 gint32 id;
62 gint64 size;
6063 enum item_type type;
64 gchar name[LABEL_MAX];
6165 };
6266
6367 struct item_iterator
6468 {
6569 iterator_next next;
6670 iterator_free free;
71 //copy is only needed when the FS supports directories. This does not mean that mkdir is supported, as dirs could be just a way to show the data.
6772 iterator_copy copy;
6873 void *data;
6974 struct item item;
7075 };
7176
72 typedef void (*job_control_callback) (gdouble);
77 typedef void (*fs_print_item) (struct item_iterator *, struct backend *);
78
79 struct job_control;
80
81 typedef void (*job_control_callback) (struct job_control *);
7382
7483 struct job_control
7584 {
7887 job_control_callback callback;
7988 gint parts;
8089 gint part;
90 gdouble progress;
8191 void *data;
8292 };
8393
84 struct sample_loop_data
85 {
86 gint32 start;
87 gint32 end;
88 };
89
90 typedef gint (*fs_init_iter_func) (struct item_iterator *, const gchar *,
91 void *);
92
93 typedef gint (*fs_path_func) (const gchar *, void *);
94
95 typedef gint (*fs_src_dst_func) (const gchar *, const gchar *, void *);
96
97 typedef gint (*fs_remote_file_op) (const gchar *, GByteArray *,
98 struct job_control *, void *);
94 // This contains information taken from from the sample data.
95 struct sample_info
96 {
97 guint32 loopstart;
98 guint32 loopend;
99 guint32 looptype;
100 guint32 samplerate;
101 guint32 bitdepth;
102 guint32 channels;
103 guint32 frames;
104 };
105
106 // This contains the format in which data must be load.
107 struct sample_params
108 {
109 guint32 channels;
110 guint32 samplerate;
111 };
112
113 struct device_desc
114 {
115 guint32 id;
116 gchar name[LABEL_MAX];
117 gchar alias[LABEL_MAX];
118 guint32 filesystems;
119 guint32 storage;
120 };
121
122 enum sysex_transfer_status
123 {
124 WAITING,
125 SENDING,
126 RECEIVING,
127 FINISHED
128 };
129
130 struct sysex_transfer
131 {
132 gboolean active;
133 GMutex mutex;
134 enum sysex_transfer_status status;
135 gint timeout; //Measured in ms. -1 is infinite.
136 gint time;
137 gboolean batch;
138 GByteArray *raw;
139 gint err;
140 };
141
142 struct fs_operations;
143
144 typedef gint (*fs_init_iter_func) (struct backend *, struct item_iterator *,
145 const gchar *);
146
147 typedef gint (*fs_path_func) (struct backend *, const gchar *);
148
149 typedef gint (*fs_src_dst_func) (struct backend *, const gchar *,
150 const gchar *);
151
152 typedef gint (*fs_remote_file_op) (struct backend *, const gchar *,
153 GByteArray *, struct job_control *);
99154
100155 typedef gchar *(*fs_get_item_id) (struct item *);
156
157 typedef gchar *(*fs_get_item_slot) (struct item *, struct backend *);
101158
102159 typedef gint (*fs_local_file_op) (const gchar *, GByteArray *,
103160 struct job_control *);
104161
162 typedef gchar *(*fs_get_ext) (const struct device_desc *,
163 const struct fs_operations *);
164
165 typedef gchar *(*t_get_upload_path) (struct backend *, struct item_iterator *,
166 const struct fs_operations *,
167 const gchar *, const gchar *, gint32 *);
168
169 typedef gchar *(*t_get_download_path) (struct backend *,
170 struct item_iterator *,
171 const struct fs_operations *,
172 const gchar *, const gchar *);
173
174 typedef gint (*t_sysex_transfer) (struct backend *, struct sysex_transfer *);
175
176 // All the function members that return gint should return 0 if no error and a negative number in case of error.
177 // errno values are recommended as will provide the user with a meaningful message. In particular,
178 // ENOSYS could be used when a particular device does not support a feature that other devices implementing the same filesystem do.
179
180 // rename and move are different operations. If move is implemented, rename must behave the same way. However, t's perfectly
181 // possible to implement rename without implementing move. This is the case in slot mode filesystems.
182
105183 struct fs_operations
106184 {
107 gint fs;
185 gint32 fs;
186 guint32 options;
187 const gchar *name;
188 const gchar *gui_name;
189 const gchar *gui_icon;
190 const gchar *type_ext;
191 guint32 max_name_len;
108192 fs_init_iter_func readdir;
193 fs_print_item print_item;
109194 fs_path_func mkdir;
110195 fs_path_func delete;
111196 fs_src_dst_func rename;
115200 fs_src_dst_func swap;
116201 fs_remote_file_op download;
117202 fs_remote_file_op upload;
118 fs_get_item_id getid;
203 fs_get_item_id get_id;
204 fs_get_item_slot get_slot;
119205 fs_local_file_op save;
120206 fs_local_file_op load;
121 const gchar *extension;
122 };
123
124 struct connector_device_desc
125 {
126 guint32 id;
127 gchar *name;
128 gchar *alias;
129 guint8 filesystems;
130 guint8 storage;
207 fs_get_ext get_ext;
208 t_get_upload_path get_upload_path;
209 t_get_download_path get_download_path;
210 };
211
212 enum fs_options
213 {
214 FS_OPTION_AUDIO_PLAYER = 0x1,
215 FS_OPTION_STEREO = 0x2,
216 FS_OPTION_SHOW_INDEX_COLUMN = 0x4,
217 FS_OPTION_SINGLE_OP = 0x8,
218 FS_OPTION_SLOT_STORAGE = 0x10, //In SLOT mode, dst_dir passed to t_get_upload_path includes the index, ':' and the item name.
219 FS_OPTION_SORT_BY_ID = 0x20,
220 FS_OPTION_SORT_BY_NAME = 0x40
131221 };
132222
133223 extern int debug_level;
144234
145235 gchar get_type_from_inventory_icon (const gchar *);
146236
147 gchar *get_expanded_dir (const char *);
237 gchar *get_expanded_dir (const gchar *);
148238
149239 gchar *get_local_startup_path (const gchar *);
150240
167257
168258 gint save_file_char (const gchar *, const guint8 *, ssize_t);
169259
170 gchar *get_human_size (guint, gboolean);
260 gchar *get_human_size (gint64, gboolean);
171261
172262 void set_job_control_progress (struct job_control *, gdouble);
173263
174 gint load_device_desc (struct connector_device_desc *, guint8, const char *);
264 void set_job_control_progress_no_sync (struct job_control *, gdouble);
265
266 gboolean file_matches_extensions (const gchar *, gchar **);
267
268 gboolean iter_matches_extensions (struct item_iterator *, gchar **);
175269
176270 #endif
0 TESTS = sample_fs_tests.sh data_fs_tests.sh
0 TESTS = test.sh
11
22 EXTRA_DIST = \
33 $(TESTS) \
44 res/square.wav \
55 res/square_loop.wav \
66 res/SOUND.dtdata \
7 res/devices.json
7 res/devices.json \
8 res/sequence.mbseq \
9 res/sequence_back.mbseq
810
911 AM_TESTS_ENVIRONMENT = \
10 ecli='$(abs_top_builddir)/src/elektroid-cli -f $(srcdir)/res/devices.json'; \
12 ecli='$(abs_top_builddir)/src/elektroid-cli'; \
1113 export ecli;
0 # Makefile.in generated by automake 1.16.3 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994-2020 Free Software Foundation, Inc.
4
5 # This Makefile.in is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 @SET_MAKE@
15 VPATH = @srcdir@
16 am__is_gnu_make = { \
17 if test -z '$(MAKELEVEL)'; then \
18 false; \
19 elif test -n '$(MAKE_HOST)'; then \
20 true; \
21 elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
22 true; \
23 else \
24 false; \
25 fi; \
26 }
27 am__make_running_with_option = \
28 case $${target_option-} in \
29 ?) ;; \
30 *) echo "am__make_running_with_option: internal error: invalid" \
31 "target option '$${target_option-}' specified" >&2; \
32 exit 1;; \
33 esac; \
34 has_opt=no; \
35 sane_makeflags=$$MAKEFLAGS; \
36 if $(am__is_gnu_make); then \
37 sane_makeflags=$$MFLAGS; \
38 else \
39 case $$MAKEFLAGS in \
40 *\\[\ \ ]*) \
41 bs=\\; \
42 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
43 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
44 esac; \
45 fi; \
46 skip_next=no; \
47 strip_trailopt () \
48 { \
49 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
50 }; \
51 for flg in $$sane_makeflags; do \
52 test $$skip_next = yes && { skip_next=no; continue; }; \
53 case $$flg in \
54 *=*|--*) continue;; \
55 -*I) strip_trailopt 'I'; skip_next=yes;; \
56 -*I?*) strip_trailopt 'I';; \
57 -*O) strip_trailopt 'O'; skip_next=yes;; \
58 -*O?*) strip_trailopt 'O';; \
59 -*l) strip_trailopt 'l'; skip_next=yes;; \
60 -*l?*) strip_trailopt 'l';; \
61 -[dEDm]) skip_next=yes;; \
62 -[JT]) skip_next=yes;; \
63 esac; \
64 case $$flg in \
65 *$$target_option*) has_opt=yes; break;; \
66 esac; \
67 done; \
68 test $$has_opt = yes
69 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
70 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
71 pkgdatadir = $(datadir)/@PACKAGE@
72 pkgincludedir = $(includedir)/@PACKAGE@
73 pkglibdir = $(libdir)/@PACKAGE@
74 pkglibexecdir = $(libexecdir)/@PACKAGE@
75 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
76 install_sh_DATA = $(install_sh) -c -m 644
77 install_sh_PROGRAM = $(install_sh) -c
78 install_sh_SCRIPT = $(install_sh) -c
79 INSTALL_HEADER = $(INSTALL_DATA)
80 transform = $(program_transform_name)
81 NORMAL_INSTALL = :
82 PRE_INSTALL = :
83 POST_INSTALL = :
84 NORMAL_UNINSTALL = :
85 PRE_UNINSTALL = :
86 POST_UNINSTALL = :
87 build_triplet = @build@
88 host_triplet = @host@
89 subdir = test
90 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
91 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
92 $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \
93 $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
94 $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
95 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
96 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
97 $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
98 $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac
99 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
100 $(ACLOCAL_M4)
101 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
102 mkinstalldirs = $(install_sh) -d
103 CONFIG_HEADER = $(top_builddir)/config.h
104 CONFIG_CLEAN_FILES =
105 CONFIG_CLEAN_VPATH_FILES =
106 AM_V_P = $(am__v_P_@AM_V@)
107 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
108 am__v_P_0 = false
109 am__v_P_1 = :
110 AM_V_GEN = $(am__v_GEN_@AM_V@)
111 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
112 am__v_GEN_0 = @echo " GEN " $@;
113 am__v_GEN_1 =
114 AM_V_at = $(am__v_at_@AM_V@)
115 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
116 am__v_at_0 = @
117 am__v_at_1 =
118 SOURCES =
119 DIST_SOURCES =
120 am__can_run_installinfo = \
121 case $$AM_UPDATE_INFO_DIR in \
122 n|no|NO) false;; \
123 *) (install-info --version) >/dev/null 2>&1;; \
124 esac
125 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
126 am__tty_colors_dummy = \
127 mgn= red= grn= lgn= blu= brg= std=; \
128 am__color_tests=no
129 am__tty_colors = { \
130 $(am__tty_colors_dummy); \
131 if test "X$(AM_COLOR_TESTS)" = Xno; then \
132 am__color_tests=no; \
133 elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
134 am__color_tests=yes; \
135 elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
136 am__color_tests=yes; \
137 fi; \
138 if test $$am__color_tests = yes; then \
139 red=''; \
140 grn=''; \
141 lgn=''; \
142 blu=''; \
143 mgn=''; \
144 brg=''; \
145 std=''; \
146 fi; \
147 }
148 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
149 am__vpath_adj = case $$p in \
150 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
151 *) f=$$p;; \
152 esac;
153 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
154 am__install_max = 40
155 am__nobase_strip_setup = \
156 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
157 am__nobase_strip = \
158 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
159 am__nobase_list = $(am__nobase_strip_setup); \
160 for p in $$list; do echo "$$p $$p"; done | \
161 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
162 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
163 if (++n[$$2] == $(am__install_max)) \
164 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
165 END { for (dir in files) print dir, files[dir] }'
166 am__base_list = \
167 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
168 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
169 am__uninstall_files_from_dir = { \
170 test -z "$$files" \
171 || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
172 || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
173 $(am__cd) "$$dir" && rm -f $$files; }; \
174 }
175 am__recheck_rx = ^[ ]*:recheck:[ ]*
176 am__global_test_result_rx = ^[ ]*:global-test-result:[ ]*
177 am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]*
178 # A command that, given a newline-separated list of test names on the
179 # standard input, print the name of the tests that are to be re-run
180 # upon "make recheck".
181 am__list_recheck_tests = $(AWK) '{ \
182 recheck = 1; \
183 while ((rc = (getline line < ($$0 ".trs"))) != 0) \
184 { \
185 if (rc < 0) \
186 { \
187 if ((getline line2 < ($$0 ".log")) < 0) \
188 recheck = 0; \
189 break; \
190 } \
191 else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
192 { \
193 recheck = 0; \
194 break; \
195 } \
196 else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
197 { \
198 break; \
199 } \
200 }; \
201 if (recheck) \
202 print $$0; \
203 close ($$0 ".trs"); \
204 close ($$0 ".log"); \
205 }'
206 # A command that, given a newline-separated list of test names on the
207 # standard input, create the global log from their .trs and .log files.
208 am__create_global_log = $(AWK) ' \
209 function fatal(msg) \
210 { \
211 print "fatal: making $@: " msg | "cat >&2"; \
212 exit 1; \
213 } \
214 function rst_section(header) \
215 { \
216 print header; \
217 len = length(header); \
218 for (i = 1; i <= len; i = i + 1) \
219 printf "="; \
220 printf "\n\n"; \
221 } \
222 { \
223 copy_in_global_log = 1; \
224 global_test_result = "RUN"; \
225 while ((rc = (getline line < ($$0 ".trs"))) != 0) \
226 { \
227 if (rc < 0) \
228 fatal("failed to read from " $$0 ".trs"); \
229 if (line ~ /$(am__global_test_result_rx)/) \
230 { \
231 sub("$(am__global_test_result_rx)", "", line); \
232 sub("[ ]*$$", "", line); \
233 global_test_result = line; \
234 } \
235 else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
236 copy_in_global_log = 0; \
237 }; \
238 if (copy_in_global_log) \
239 { \
240 rst_section(global_test_result ": " $$0); \
241 while ((rc = (getline line < ($$0 ".log"))) != 0) \
242 { \
243 if (rc < 0) \
244 fatal("failed to read from " $$0 ".log"); \
245 print line; \
246 }; \
247 printf "\n"; \
248 }; \
249 close ($$0 ".trs"); \
250 close ($$0 ".log"); \
251 }'
252 # Restructured Text title.
253 am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
254 # Solaris 10 'make', and several other traditional 'make' implementations,
255 # pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
256 # by disabling -e (using the XSI extension "set +e") if it's set.
257 am__sh_e_setup = case $$- in *e*) set +e;; esac
258 # Default flags passed to test drivers.
259 am__common_driver_flags = \
260 --color-tests "$$am__color_tests" \
261 --enable-hard-errors "$$am__enable_hard_errors" \
262 --expect-failure "$$am__expect_failure"
263 # To be inserted before the command running the test. Creates the
264 # directory for the log if needed. Stores in $dir the directory
265 # containing $f, in $tst the test, in $log the log. Executes the
266 # developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
267 # passes TESTS_ENVIRONMENT. Set up options for the wrapper that
268 # will run the test scripts (or their associated LOG_COMPILER, if
269 # thy have one).
270 am__check_pre = \
271 $(am__sh_e_setup); \
272 $(am__vpath_adj_setup) $(am__vpath_adj) \
273 $(am__tty_colors); \
274 srcdir=$(srcdir); export srcdir; \
275 case "$@" in \
276 */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
277 *) am__odir=.;; \
278 esac; \
279 test "x$$am__odir" = x"." || test -d "$$am__odir" \
280 || $(MKDIR_P) "$$am__odir" || exit $$?; \
281 if test -f "./$$f"; then dir=./; \
282 elif test -f "$$f"; then dir=; \
283 else dir="$(srcdir)/"; fi; \
284 tst=$$dir$$f; log='$@'; \
285 if test -n '$(DISABLE_HARD_ERRORS)'; then \
286 am__enable_hard_errors=no; \
287 else \
288 am__enable_hard_errors=yes; \
289 fi; \
290 case " $(XFAIL_TESTS) " in \
291 *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
292 am__expect_failure=yes;; \
293 *) \
294 am__expect_failure=no;; \
295 esac; \
296 $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
297 # A shell command to get the names of the tests scripts with any registered
298 # extension removed (i.e., equivalently, the names of the test logs, with
299 # the '.log' extension removed). The result is saved in the shell variable
300 # '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly,
301 # we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
302 # since that might cause problem with VPATH rewrites for suffix-less tests.
303 # See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
304 am__set_TESTS_bases = \
305 bases='$(TEST_LOGS)'; \
306 bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
307 bases=`echo $$bases`
308 AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)'
309 RECHECK_LOGS = $(TEST_LOGS)
310 AM_RECURSIVE_TARGETS = check recheck
311 TEST_SUITE_LOG = test-suite.log
312 TEST_EXTENSIONS = @EXEEXT@ .test
313 LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
314 LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
315 am__set_b = \
316 case '$@' in \
317 */*) \
318 case '$*' in \
319 */*) b='$*';; \
320 *) b=`echo '$@' | sed 's/\.log$$//'`; \
321 esac;; \
322 *) \
323 b='$*';; \
324 esac
325 am__test_logs1 = $(TESTS:=.log)
326 am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
327 TEST_LOGS = $(am__test_logs2:.test.log=.log)
328 TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
329 TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
330 $(TEST_LOG_FLAGS)
331 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/test-driver
332 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
333 ACLOCAL = @ACLOCAL@
334 ALSA_CFLAGS = @ALSA_CFLAGS@
335 ALSA_LIBS = @ALSA_LIBS@
336 AMTAR = @AMTAR@
337 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
338 AR = @AR@
339 AUTOCONF = @AUTOCONF@
340 AUTOHEADER = @AUTOHEADER@
341 AUTOMAKE = @AUTOMAKE@
342 AWK = @AWK@
343 CC = @CC@
344 CCDEPMODE = @CCDEPMODE@
345 CFLAGS = @CFLAGS@
346 CPP = @CPP@
347 CPPFLAGS = @CPPFLAGS@
348 CYGPATH_W = @CYGPATH_W@
349 DEFS = @DEFS@
350 DEPDIR = @DEPDIR@
351 DLLTOOL = @DLLTOOL@
352 DSYMUTIL = @DSYMUTIL@
353 DUMPBIN = @DUMPBIN@
354 ECHO_C = @ECHO_C@
355 ECHO_N = @ECHO_N@
356 ECHO_T = @ECHO_T@
357 EGREP = @EGREP@
358 EXEEXT = @EXEEXT@
359 FGREP = @FGREP@
360 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
361 GMSGFMT = @GMSGFMT@
362 GMSGFMT_015 = @GMSGFMT_015@
363 GREP = @GREP@
364 GTK_CFLAGS = @GTK_CFLAGS@
365 GTK_LIBS = @GTK_LIBS@
366 INSTALL = @INSTALL@
367 INSTALL_DATA = @INSTALL_DATA@
368 INSTALL_PROGRAM = @INSTALL_PROGRAM@
369 INSTALL_SCRIPT = @INSTALL_SCRIPT@
370 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
371 INTLLIBS = @INTLLIBS@
372 INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
373 LD = @LD@
374 LDFLAGS = @LDFLAGS@
375 LIBICONV = @LIBICONV@
376 LIBINTL = @LIBINTL@
377 LIBOBJS = @LIBOBJS@
378 LIBS = @LIBS@
379 LIBTOOL = @LIBTOOL@
380 LIPO = @LIPO@
381 LN_S = @LN_S@
382 LTLIBICONV = @LTLIBICONV@
383 LTLIBINTL = @LTLIBINTL@
384 LTLIBOBJS = @LTLIBOBJS@
385 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
386 MAKEINFO = @MAKEINFO@
387 MANIFEST_TOOL = @MANIFEST_TOOL@
388 MKDIR_P = @MKDIR_P@
389 MSGFMT = @MSGFMT@
390 MSGFMT_015 = @MSGFMT_015@
391 MSGMERGE = @MSGMERGE@
392 NM = @NM@
393 NMEDIT = @NMEDIT@
394 OBJDUMP = @OBJDUMP@
395 OBJEXT = @OBJEXT@
396 OTOOL = @OTOOL@
397 OTOOL64 = @OTOOL64@
398 PACKAGE = @PACKAGE@
399 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
400 PACKAGE_NAME = @PACKAGE_NAME@
401 PACKAGE_STRING = @PACKAGE_STRING@
402 PACKAGE_TARNAME = @PACKAGE_TARNAME@
403 PACKAGE_URL = @PACKAGE_URL@
404 PACKAGE_VERSION = @PACKAGE_VERSION@
405 PATH_SEPARATOR = @PATH_SEPARATOR@
406 PKG_CONFIG = @PKG_CONFIG@
407 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
408 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
409 POSUB = @POSUB@
410 PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@
411 PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@
412 RANLIB = @RANLIB@
413 SAMPLERATE_CFLAGS = @SAMPLERATE_CFLAGS@
414 SAMPLERATE_LIBS = @SAMPLERATE_LIBS@
415 SED = @SED@
416 SET_MAKE = @SET_MAKE@
417 SHELL = @SHELL@
418 SNDFILE_CFLAGS = @SNDFILE_CFLAGS@
419 SNDFILE_LIBS = @SNDFILE_LIBS@
420 STRIP = @STRIP@
421 USE_NLS = @USE_NLS@
422 VERSION = @VERSION@
423 XGETTEXT = @XGETTEXT@
424 XGETTEXT_015 = @XGETTEXT_015@
425 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
426 abs_builddir = @abs_builddir@
427 abs_srcdir = @abs_srcdir@
428 abs_top_builddir = @abs_top_builddir@
429 abs_top_srcdir = @abs_top_srcdir@
430 ac_ct_AR = @ac_ct_AR@
431 ac_ct_CC = @ac_ct_CC@
432 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
433 am__include = @am__include@
434 am__leading_dot = @am__leading_dot@
435 am__quote = @am__quote@
436 am__tar = @am__tar@
437 am__untar = @am__untar@
438 bindir = @bindir@
439 build = @build@
440 build_alias = @build_alias@
441 build_cpu = @build_cpu@
442 build_os = @build_os@
443 build_vendor = @build_vendor@
444 builddir = @builddir@
445 datadir = @datadir@
446 datarootdir = @datarootdir@
447 docdir = @docdir@
448 dvidir = @dvidir@
449 exec_prefix = @exec_prefix@
450 host = @host@
451 host_alias = @host_alias@
452 host_cpu = @host_cpu@
453 host_os = @host_os@
454 host_vendor = @host_vendor@
455 htmldir = @htmldir@
456 includedir = @includedir@
457 infodir = @infodir@
458 install_sh = @install_sh@
459 libdir = @libdir@
460 libexecdir = @libexecdir@
461 libzip_CFLAGS = @libzip_CFLAGS@
462 libzip_LIBS = @libzip_LIBS@
463 localedir = @localedir@
464 localstatedir = @localstatedir@
465 mandir = @mandir@
466 mkdir_p = @mkdir_p@
467 oldincludedir = @oldincludedir@
468 pdfdir = @pdfdir@
469 prefix = @prefix@
470 program_transform_name = @program_transform_name@
471 psdir = @psdir@
472 runstatedir = @runstatedir@
473 sbindir = @sbindir@
474 sharedstatedir = @sharedstatedir@
475 srcdir = @srcdir@
476 sysconfdir = @sysconfdir@
477 target_alias = @target_alias@
478 top_build_prefix = @top_build_prefix@
479 top_builddir = @top_builddir@
480 top_srcdir = @top_srcdir@
481 zlib_CFLAGS = @zlib_CFLAGS@
482 zlib_LIBS = @zlib_LIBS@
483 TESTS = test.sh
484 EXTRA_DIST = \
485 $(TESTS) \
486 res/square.wav \
487 res/square_loop.wav \
488 res/SOUND.dtdata \
489 res/devices.json \
490 res/sequence.mbseq \
491 res/sequence_back.mbseq
492
493 AM_TESTS_ENVIRONMENT = \
494 ecli='$(abs_top_builddir)/src/elektroid-cli'; \
495 export ecli;
496
497 all: all-am
498
499 .SUFFIXES:
500 .SUFFIXES: .log .test .test$(EXEEXT) .trs
501 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
502 @for dep in $?; do \
503 case '$(am__configure_deps)' in \
504 *$$dep*) \
505 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
506 && { if test -f $@; then exit 0; else break; fi; }; \
507 exit 1;; \
508 esac; \
509 done; \
510 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/Makefile'; \
511 $(am__cd) $(top_srcdir) && \
512 $(AUTOMAKE) --gnu test/Makefile
513 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
514 @case '$?' in \
515 *config.status*) \
516 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
517 *) \
518 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
519 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
520 esac;
521
522 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
523 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
524
525 $(top_srcdir)/configure: $(am__configure_deps)
526 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
527 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
528 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
529 $(am__aclocal_m4_deps):
530
531 mostlyclean-libtool:
532 -rm -f *.lo
533
534 clean-libtool:
535 -rm -rf .libs _libs
536 tags TAGS:
537
538 ctags CTAGS:
539
540 cscope cscopelist:
541
542
543 # Recover from deleted '.trs' file; this should ensure that
544 # "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
545 # both 'foo.log' and 'foo.trs'. Break the recipe in two subshells
546 # to avoid problems with "make -n".
547 .log.trs:
548 rm -f $< $@
549 $(MAKE) $(AM_MAKEFLAGS) $<
550
551 # Leading 'am--fnord' is there to ensure the list of targets does not
552 # expand to empty, as could happen e.g. with make check TESTS=''.
553 am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
554 am--force-recheck:
555 @:
556
557 $(TEST_SUITE_LOG): $(TEST_LOGS)
558 @$(am__set_TESTS_bases); \
559 am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
560 redo_bases=`for i in $$bases; do \
561 am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
562 done`; \
563 if test -n "$$redo_bases"; then \
564 redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
565 redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
566 if $(am__make_dryrun); then :; else \
567 rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
568 fi; \
569 fi; \
570 if test -n "$$am__remaking_logs"; then \
571 echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
572 "recursion detected" >&2; \
573 elif test -n "$$redo_logs"; then \
574 am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
575 fi; \
576 if $(am__make_dryrun); then :; else \
577 st=0; \
578 errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
579 for i in $$redo_bases; do \
580 test -f $$i.trs && test -r $$i.trs \
581 || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
582 test -f $$i.log && test -r $$i.log \
583 || { echo "$$errmsg $$i.log" >&2; st=1; }; \
584 done; \
585 test $$st -eq 0 || exit 1; \
586 fi
587 @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
588 ws='[ ]'; \
589 results=`for b in $$bases; do echo $$b.trs; done`; \
590 test -n "$$results" || results=/dev/null; \
591 all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
592 pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
593 fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
594 skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
595 xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
596 xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
597 error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
598 if test `expr $$fail + $$xpass + $$error` -eq 0; then \
599 success=true; \
600 else \
601 success=false; \
602 fi; \
603 br='==================='; br=$$br$$br$$br$$br; \
604 result_count () \
605 { \
606 if test x"$$1" = x"--maybe-color"; then \
607 maybe_colorize=yes; \
608 elif test x"$$1" = x"--no-color"; then \
609 maybe_colorize=no; \
610 else \
611 echo "$@: invalid 'result_count' usage" >&2; exit 4; \
612 fi; \
613 shift; \
614 desc=$$1 count=$$2; \
615 if test $$maybe_colorize = yes && test $$count -gt 0; then \
616 color_start=$$3 color_end=$$std; \
617 else \
618 color_start= color_end=; \
619 fi; \
620 echo "$${color_start}# $$desc $$count$${color_end}"; \
621 }; \
622 create_testsuite_report () \
623 { \
624 result_count $$1 "TOTAL:" $$all "$$brg"; \
625 result_count $$1 "PASS: " $$pass "$$grn"; \
626 result_count $$1 "SKIP: " $$skip "$$blu"; \
627 result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
628 result_count $$1 "FAIL: " $$fail "$$red"; \
629 result_count $$1 "XPASS:" $$xpass "$$red"; \
630 result_count $$1 "ERROR:" $$error "$$mgn"; \
631 }; \
632 { \
633 echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
634 $(am__rst_title); \
635 create_testsuite_report --no-color; \
636 echo; \
637 echo ".. contents:: :depth: 2"; \
638 echo; \
639 for b in $$bases; do echo $$b; done \
640 | $(am__create_global_log); \
641 } >$(TEST_SUITE_LOG).tmp || exit 1; \
642 mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
643 if $$success; then \
644 col="$$grn"; \
645 else \
646 col="$$red"; \
647 test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
648 fi; \
649 echo "$${col}$$br$${std}"; \
650 echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \
651 echo "$${col}$$br$${std}"; \
652 create_testsuite_report --maybe-color; \
653 echo "$$col$$br$$std"; \
654 if $$success; then :; else \
655 echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
656 if test -n "$(PACKAGE_BUGREPORT)"; then \
657 echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
658 fi; \
659 echo "$$col$$br$$std"; \
660 fi; \
661 $$success || exit 1
662
663 check-TESTS:
664 @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
665 @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
666 @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
667 @set +e; $(am__set_TESTS_bases); \
668 log_list=`for i in $$bases; do echo $$i.log; done`; \
669 trs_list=`for i in $$bases; do echo $$i.trs; done`; \
670 log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
671 $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
672 exit $$?;
673 recheck: all
674 @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
675 @set +e; $(am__set_TESTS_bases); \
676 bases=`for i in $$bases; do echo $$i; done \
677 | $(am__list_recheck_tests)` || exit 1; \
678 log_list=`for i in $$bases; do echo $$i.log; done`; \
679 log_list=`echo $$log_list`; \
680 $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
681 am__force_recheck=am--force-recheck \
682 TEST_LOGS="$$log_list"; \
683 exit $$?
684 test.sh.log: test.sh
685 @p='test.sh'; \
686 b='test.sh'; \
687 $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
688 --log-file $$b.log --trs-file $$b.trs \
689 $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
690 "$$tst" $(AM_TESTS_FD_REDIRECT)
691 .test.log:
692 @p='$<'; \
693 $(am__set_b); \
694 $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
695 --log-file $$b.log --trs-file $$b.trs \
696 $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
697 "$$tst" $(AM_TESTS_FD_REDIRECT)
698 @am__EXEEXT_TRUE@.test$(EXEEXT).log:
699 @am__EXEEXT_TRUE@ @p='$<'; \
700 @am__EXEEXT_TRUE@ $(am__set_b); \
701 @am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
702 @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
703 @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
704 @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
705
706 distdir: $(BUILT_SOURCES)
707 $(MAKE) $(AM_MAKEFLAGS) distdir-am
708
709 distdir-am: $(DISTFILES)
710 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
711 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
712 list='$(DISTFILES)'; \
713 dist_files=`for file in $$list; do echo $$file; done | \
714 sed -e "s|^$$srcdirstrip/||;t" \
715 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
716 case $$dist_files in \
717 */*) $(MKDIR_P) `echo "$$dist_files" | \
718 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
719 sort -u` ;; \
720 esac; \
721 for file in $$dist_files; do \
722 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
723 if test -d $$d/$$file; then \
724 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
725 if test -d "$(distdir)/$$file"; then \
726 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
727 fi; \
728 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
729 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
730 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
731 fi; \
732 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
733 else \
734 test -f "$(distdir)/$$file" \
735 || cp -p $$d/$$file "$(distdir)/$$file" \
736 || exit 1; \
737 fi; \
738 done
739 check-am: all-am
740 $(MAKE) $(AM_MAKEFLAGS) check-TESTS
741 check: check-am
742 all-am: Makefile
743 installdirs:
744 install: install-am
745 install-exec: install-exec-am
746 install-data: install-data-am
747 uninstall: uninstall-am
748
749 install-am: all-am
750 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
751
752 installcheck: installcheck-am
753 install-strip:
754 if test -z '$(STRIP)'; then \
755 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
756 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
757 install; \
758 else \
759 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
760 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
761 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
762 fi
763 mostlyclean-generic:
764 -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
765 -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
766 -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
767
768 clean-generic:
769
770 distclean-generic:
771 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
772 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
773
774 maintainer-clean-generic:
775 @echo "This command is intended for maintainers to use"
776 @echo "it deletes files that may require special tools to rebuild."
777 clean: clean-am
778
779 clean-am: clean-generic clean-libtool mostlyclean-am
780
781 distclean: distclean-am
782 -rm -f Makefile
783 distclean-am: clean-am distclean-generic
784
785 dvi: dvi-am
786
787 dvi-am:
788
789 html: html-am
790
791 html-am:
792
793 info: info-am
794
795 info-am:
796
797 install-data-am:
798
799 install-dvi: install-dvi-am
800
801 install-dvi-am:
802
803 install-exec-am:
804
805 install-html: install-html-am
806
807 install-html-am:
808
809 install-info: install-info-am
810
811 install-info-am:
812
813 install-man:
814
815 install-pdf: install-pdf-am
816
817 install-pdf-am:
818
819 install-ps: install-ps-am
820
821 install-ps-am:
822
823 installcheck-am:
824
825 maintainer-clean: maintainer-clean-am
826 -rm -f Makefile
827 maintainer-clean-am: distclean-am maintainer-clean-generic
828
829 mostlyclean: mostlyclean-am
830
831 mostlyclean-am: mostlyclean-generic mostlyclean-libtool
832
833 pdf: pdf-am
834
835 pdf-am:
836
837 ps: ps-am
838
839 ps-am:
840
841 uninstall-am:
842
843 .MAKE: check-am install-am install-strip
844
845 .PHONY: all all-am check check-TESTS check-am clean clean-generic \
846 clean-libtool cscopelist-am ctags-am distclean \
847 distclean-generic distclean-libtool distdir dvi dvi-am html \
848 html-am info info-am install install-am install-data \
849 install-data-am install-dvi install-dvi-am install-exec \
850 install-exec-am install-html install-html-am install-info \
851 install-info-am install-man install-pdf install-pdf-am \
852 install-ps install-ps-am install-strip installcheck \
853 installcheck-am installdirs maintainer-clean \
854 maintainer-clean-generic mostlyclean mostlyclean-generic \
855 mostlyclean-libtool pdf pdf-am ps ps-am recheck tags-am \
856 uninstall uninstall-am
857
858 .PRECIOUS: Makefile
859
860
861 # Tell versions [3.59,3.63) of GNU make to not export all variables.
862 # Otherwise a system limit (for SysV at least) may be exceeded.
863 .NOEXPORT:
+0
-98
test/data_fs_tests.sh less more
0 #!/usr/bin/env bash
1
2 function cleanupAndExitWithError () {
3 $ecli cl-data $DEVICE:/soundbanks/H/1
4 $ecli cl-data $DEVICE:/soundbanks/H/62
5 $ecli cl-data $DEVICE:/soundbanks/H/63
6 $ecli cl-data $DEVICE:/soundbanks/H/64
7 $ecli cl-data $DEVICE:/soundbanks/H/256
8 exit 1
9 }
10
11 function get_sound_n_with_id () {
12 s="sound$1"
13 echo "${!s}" | sed "s/^F $1 0012/F $2 007e/"
14 }
15
16 echo "Getting devices..."
17 DEVICE=$($ecli ld | head -n 1 | awk '{print $1}')
18 [ -z "$DEVICE" ] && echo "No device found" && exit 0
19 echo "Using device $DEVICE..."
20
21 sound1=$($ecli ls-data $DEVICE:/soundbanks/A | grep "^F 1")
22 nsound1=$(get_sound_n_with_id 1 64)
23
24 sound2=$($ecli ls-data $DEVICE:/soundbanks/A | grep "^F 2")
25
26 echo "Testing data copy..."
27 $ecli cp-data $DEVICE:/soundbanks/A/1 $DEVICE:/soundbanks/H/64
28 [ $? -ne 0 ] && cleanupAndExitWithError
29 $ecli cp-data $DEVICE:/soundbanks/A/2 $DEVICE:/soundbanks/H/63
30 [ $? -ne 0 ] && cleanupAndExitWithError
31 output=$($ecli ls-data $DEVICE:/soundbanks/H)
32 actual=$(echo "$output" | grep "^F 64")
33 expected=$(get_sound_n_with_id 1 64)
34 [ "$actual" != "$expected" ] && cleanupAndExitWithError
35 actual=$(echo "$output" | grep "^F 63")
36 expected=$(get_sound_n_with_id 2 63)
37 [ "$actual" != "$expected" ] && cleanupAndExitWithError
38
39 echo "Testing data move..."
40 $ecli mv-data $DEVICE:/soundbanks/H/64 $DEVICE:/soundbanks/H/62
41 [ $? -ne 0 ] && cleanupAndExitWithError
42 output=$($ecli ls-data $DEVICE:/soundbanks/H)
43 actual=$(echo "$output" | grep "^F 62")
44 expected=$(get_sound_n_with_id 1 62)
45 [ "$actual" != "$expected" ] && cleanupAndExitWithError
46 actual=$(echo "$output" | grep "^F 64")
47 [ -n "$actual" ] && cleanupAndExitWithError
48
49 echo "Testing data swap..."
50 $ecli sw-data $DEVICE:/soundbanks/H/62 $DEVICE:/soundbanks/H/63
51 [ $? -ne 0 ] && cleanupAndExitWithError
52 output=$($ecli ls-data $DEVICE:/soundbanks/H)
53 actual=$(echo "$output" | grep "^F 62")
54 expected=$(get_sound_n_with_id 2 62)
55 [ "$actual" != "$expected" ] && cleanupAndExitWithError
56 actual=$(echo "$output" | grep "^F 63")
57 expected=$(get_sound_n_with_id 1 63)
58 [ "$actual" != "$expected" ] && cleanupAndExitWithError
59
60 echo "Testing data clear..."
61 $ecli cl-data $DEVICE:/soundbanks/H/63
62 [ $? -ne 0 ] && cleanupAndExitWithError
63 $ecli cl-data $DEVICE:/soundbanks/H/62
64 [ $? -ne 0 ] && cleanupAndExitWithError
65 output=$($ecli ls-data $DEVICE:/soundbanks/H)
66 [ $(echo "$output" | grep "^F 62" | wc -l) -ne 0 ] && cleanupAndExitWithError
67 [ $(echo "$output" | grep "^F 63" | wc -l) -ne 0 ] && cleanupAndExitWithError
68
69 echo "Testing upload..."
70 $ecli ul-data $srcdir/res/SOUND.dtdata $DEVICE:/soundbanks/H
71 [ $? -ne 0 ] && cleanupAndExitWithError
72 id=$($ecli ls-data $DEVICE:/soundbanks/H | grep 'SOUND$' | awk '{print $2}')
73
74 echo "Testing download..."
75 $ecli dl-data $DEVICE:/soundbanks/H/$id
76 [ $? -ne 0 ] && cleanupAndExitWithError
77 ls "SOUND.dtdata"
78 cksum SOUND.dtdata
79 cksum $srcdir/res/SOUND.dtdata
80 actual_cksum="$(cksum SOUND.dtdata | awk '{print $1}')"
81 [ "$actual_cksum" != "$(cksum $srcdir/res/SOUND.dtdata | awk '{print $1}')" ] && cleanupAndExitWithError
82 rm SOUND.dtdata
83 [ $? -ne 0 ] && cleanupAndExitWithError
84 $ecli cl-data $DEVICE:/soundbanks/H/$id
85 [ $? -ne 0 ] && cleanupAndExitWithError
86
87 echo "Testing upload..."
88 $ecli ul-data $srcdir/res/SOUND.dtdata $DEVICE:/soundbanks/H/256
89 [ $? -ne 0 ] && cleanupAndExitWithError
90 id=$($ecli ls-data $DEVICE:/soundbanks/H | grep 'SOUND$' | awk '{print $2}')
91 [ $id != 256 ] && cleanupAndExitWithError
92
93 echo "Testing data clear..."
94 $ecli cl-data $DEVICE:/soundbanks/H/256
95 [ $? -ne 0 ] && cleanupAndExitWithError
96
97 exit 0
Binary diff not shown
0 1: 60 00 0 01 2xx 6200 000120 x12 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60
1 60
0 1:60 x x x x x x x 120 x 12 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60
+0
-106
test/sample_fs_tests.sh less more
0 #!/usr/bin/env bash
1
2 TEST_NAME=auto-test
3
4 echo "Getting devices..."
5 DEVICE=$($ecli ld | head -n 1 | awk '{print $1}')
6 [ -z "$DEVICE" ] && echo "No device found" && exit 0
7 echo "Using device $DEVICE..."
8
9 echo "Testing info..."
10 $ecli info $DEVICE:/
11 [ $? -ne 0 ] && exit 1
12
13 echo "Testing df..."
14 $ecli df $DEVICE:/
15 [ $? -ne 0 ] && exit 1
16
17 echo "Testing ls..."
18 $ecli ls $DEVICE:/
19 [ $? -ne 0 ] && exit 1
20
21 echo "Testing mkdir..."
22 $ecli mkdir $DEVICE:/$TEST_NAME
23 [ $? -ne 0 ] && exit 1
24
25 $ecli ls $DEVICE:/$TEST_NAME
26 [ $? -ne 0 ] && exit 1
27
28 echo "Testing upload..."
29 $ecli ul-sample $srcdir/res/square.wav $DEVICE:/$TEST_NAME
30 [ $? -ne 0 ] && exit 1
31
32 echo "Testing upload (loop)..."
33 $ecli ul-sample $srcdir/res/square_loop.wav $DEVICE:/$TEST_NAME
34 [ $? -ne 0 ] && exit 1
35
36 output=$($ecli ls $DEVICE:/$TEST_NAME)
37 echo "$output"
38 type=$(echo "$output" | head -n 1 | awk '{print $1}')
39 size=$(echo "$output" | head -n 1 | awk '{print $2}')
40 name=$(echo "$output" | head -n 1 | awk '{print $4}')
41 [ "$type" != "F" ] || [ "$size" != "93.81KiB" ] || [ "$name" != "square" ] && exit 1
42
43 echo "Testing upload (nonexistent source)..."
44 $ecli ul-sample $srcdir/res/foo $DEVICE:/$TEST_NAME
45 [ $? -eq 0 ] && exit 1
46
47 echo "Testing download..."
48 $ecli -v download $DEVICE:/$TEST_NAME/square
49 [ $? -ne 0 ] && exit 1
50 actual_cksum="$(cksum square.wav | awk '{print $1}')"
51 rm square.wav
52 [ "$actual_cksum" != "$(cksum $srcdir/res/square.wav | awk '{print $1}')" ] && exit 1
53
54 echo "Testing download (loop)..."
55 $ecli -v dl-sample $DEVICE:/$TEST_NAME/square_loop
56 [ $? -ne 0 ] && exit 1
57 actual_cksum="$(cksum square_loop.wav | awk '{print $1}')"
58 rm square_loop.wav
59 [ "$actual_cksum" != "$(cksum $srcdir/res/square_loop.wav | awk '{print $1}')" ] && exit 1
60
61 echo "Testing download (nonexistent source)..."
62 $ecli dl-sample $DEVICE:/$TEST_NAME/foo
63 [ $? -eq 0 ] && exit 1
64
65 echo "Testing mv..."
66 $ecli mv $DEVICE:/$TEST_NAME/square $DEVICE:/$TEST_NAME/sample
67 [ $? -ne 0 ] && exit 1
68
69 echo "Testing mv..."
70 $ecli mv $DEVICE:/$TEST_NAME/foo $DEVICE:/$TEST_NAME/sample
71 [ $? -eq 0 ] && exit 1
72
73 echo "Testing rm..."
74 $ecli rm $DEVICE:/$TEST_NAME/sample
75 [ $? -ne 0 ] && exit 1
76
77 echo "Testing rm (nonexistent file)..."
78 $ecli rm $DEVICE:/$TEST_NAME/sample
79 [ $? -eq 0 ] && exit 1
80
81 echo "Testing rmdir..."
82 $ecli rmdir $DEVICE:/$TEST_NAME
83 [ $? -ne 0 ] && exit 1
84
85 echo "Testing rmdir (nonexistent dir)..."
86 $ecli rmdir $DEVICE:/$TEST_NAME
87 [ $? -eq 0 ] && exit 1
88
89 echo "Testing recursive mkdir..."
90 $ecli mkdir $DEVICE:/$TEST_NAME/foo
91 [ $? -ne 0 ] && exit 1
92
93 echo "Testing recursive rmdir..."
94 $ecli rmdir $DEVICE:/$TEST_NAME
95 [ $? -ne 0 ] && exit 1
96
97 echo "Testing ls (nonexistent dir)..."
98 $ecli ls $DEVICE:/$TEST_NAME
99 [ $? -eq 0 ] && exit 1
100
101 echo "Testing ls (nonexistent dir inside nonexistent dir)..."
102 $ecli ls $DEVICE:/$TEST_NAME/foo
103 [ $? -eq 0 ] && exit 1
104
105 exit 0
0 #!/usr/bin/env bash
1
2 [ -z "$TEST_DEVICE" ] && echo "Environment variable TEST_DEVICE not set. Nothing to run." && exit 0
3 [ -z "$TEST_CONNECTOR_FILESYSTEM" ] && echo "Environment variable TEST_CONNECTOR_FILESYSTEM not set. Nothing to run." && exit 0
4
5 ./${TEST_CONNECTOR_FILESYSTEM}_fs_tests.sh
6
7 exit $?
0 #! /bin/sh
1 # test-driver - basic testsuite driver script.
2
3 scriptversion=2018-03-07.03; # UTC
4
5 # Copyright (C) 2011-2020 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 <https://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 # This file is maintained in Automake, please report
26 # bugs to <bug-automake@gnu.org> or send patches to
27 # <automake-patches@gnu.org>.
28
29 # Make unconditional expansion of undefined variables an error. This
30 # helps a lot in preventing typo-related bugs.
31 set -u
32
33 usage_error ()
34 {
35 echo "$0: $*" >&2
36 print_usage >&2
37 exit 2
38 }
39
40 print_usage ()
41 {
42 cat <<END
43 Usage:
44 test-driver --test-name NAME --log-file PATH --trs-file PATH
45 [--expect-failure {yes|no}] [--color-tests {yes|no}]
46 [--enable-hard-errors {yes|no}] [--]
47 TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS]
48
49 The '--test-name', '--log-file' and '--trs-file' options are mandatory.
50 See the GNU Automake documentation for information.
51 END
52 }
53
54 test_name= # Used for reporting.
55 log_file= # Where to save the output of the test script.
56 trs_file= # Where to save the metadata of the test run.
57 expect_failure=no
58 color_tests=no
59 enable_hard_errors=yes
60 while test $# -gt 0; do
61 case $1 in
62 --help) print_usage; exit $?;;
63 --version) echo "test-driver $scriptversion"; exit $?;;
64 --test-name) test_name=$2; shift;;
65 --log-file) log_file=$2; shift;;
66 --trs-file) trs_file=$2; shift;;
67 --color-tests) color_tests=$2; shift;;
68 --expect-failure) expect_failure=$2; shift;;
69 --enable-hard-errors) enable_hard_errors=$2; shift;;
70 --) shift; break;;
71 -*) usage_error "invalid option: '$1'";;
72 *) break;;
73 esac
74 shift
75 done
76
77 missing_opts=
78 test x"$test_name" = x && missing_opts="$missing_opts --test-name"
79 test x"$log_file" = x && missing_opts="$missing_opts --log-file"
80 test x"$trs_file" = x && missing_opts="$missing_opts --trs-file"
81 if test x"$missing_opts" != x; then
82 usage_error "the following mandatory options are missing:$missing_opts"
83 fi
84
85 if test $# -eq 0; then
86 usage_error "missing argument"
87 fi
88
89 if test $color_tests = yes; then
90 # Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
91 red='' # Red.
92 grn='' # Green.
93 lgn='' # Light green.
94 blu='' # Blue.
95 mgn='' # Magenta.
96 std='' # No color.
97 else
98 red= grn= lgn= blu= mgn= std=
99 fi
100
101 do_exit='rm -f $log_file $trs_file; (exit $st); exit $st'
102 trap "st=129; $do_exit" 1
103 trap "st=130; $do_exit" 2
104 trap "st=141; $do_exit" 13
105 trap "st=143; $do_exit" 15
106
107 # Test script is run here.
108 "$@" >$log_file 2>&1
109 estatus=$?
110
111 if test $enable_hard_errors = no && test $estatus -eq 99; then
112 tweaked_estatus=1
113 else
114 tweaked_estatus=$estatus
115 fi
116
117 case $tweaked_estatus:$expect_failure in
118 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
119 0:*) col=$grn res=PASS recheck=no gcopy=no;;
120 77:*) col=$blu res=SKIP recheck=no gcopy=yes;;
121 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;;
122 *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;;
123 *:*) col=$red res=FAIL recheck=yes gcopy=yes;;
124 esac
125
126 # Report the test outcome and exit status in the logs, so that one can
127 # know whether the test passed or failed simply by looking at the '.log'
128 # file, without the need of also peaking into the corresponding '.trs'
129 # file (automake bug#11814).
130 echo "$res $test_name (exit status: $estatus)" >>$log_file
131
132 # Report outcome to console.
133 echo "${col}${res}${std}: $test_name"
134
135 # Register the test result, and other relevant metadata.
136 echo ":test-result: $res" > $trs_file
137 echo ":global-test-result: $res" >> $trs_file
138 echo ":recheck: $recheck" >> $trs_file
139 echo ":copy-in-global-log: $gcopy" >> $trs_file
140
141 # Local Variables:
142 # mode: shell-script
143 # sh-indentation: 2
144 # eval: (add-hook 'before-save-hook 'time-stamp)
145 # time-stamp-start: "scriptversion="
146 # time-stamp-format: "%:y-%02m-%02d.%02H"
147 # time-stamp-time-zone: "UTC0"
148 # time-stamp-end: "; # UTC"
149 # End: