aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDavid M. Syzdek <david@syzdek.net>2009-02-07 18:46:24 -0900
committerDavid M. Syzdek <david@syzdek.net>2009-02-07 18:46:24 -0900
commit5bc2a4978e2d0617c987ac24c88c376371e58b9d (patch)
tree6b9fc260035729a2e23cce627ed0b2d8fce513f6
parent71c0036951ecd0a8b0f77897b3985826ac1f3c4d (diff)
downloaddmstools-5bc2a4978e2d0617c987ac24c88c376371e58b9d.tar.gz
dmstools-5bc2a4978e2d0617c987ac24c88c376371e58b9d.tar.bz2
dmstools-5bc2a4978e2d0617c987ac24c88c376371e58b9d.tar.xz
dmstools-5bc2a4978e2d0617c987ac24c88c376371e58b9d.zip
Adding support for GNU gettext support.
-rw-r--r--ABOUT-NLS1068
-rw-r--r--ChangeLog1
-rw-r--r--Makefile.am8
-rwxr-xr-xbuild-aux/config.rpath666
-rw-r--r--configure.ac4
-rw-r--r--m4/gettext.m4381
-rw-r--r--m4/iconv.m4180
-rw-r--r--m4/lib-ld.m4110
-rw-r--r--m4/lib-link.m4709
-rw-r--r--m4/lib-prefix.m4185
-rw-r--r--m4/nls.m431
-rw-r--r--m4/po.m4449
-rw-r--r--m4/progtest.m492
-rw-r--r--po/ChangeLog12
-rw-r--r--po/Makefile.in.in429
-rw-r--r--po/Makevars41
-rw-r--r--po/Makevars.template41
-rw-r--r--po/POTFILES.in2
-rw-r--r--po/Rules-quot47
-rw-r--r--po/boldquot.sed10
-rw-r--r--po/dmstools.pot185
-rw-r--r--po/en@boldquot.header25
-rw-r--r--po/en@quot.header22
-rw-r--r--po/insert-header.sin23
-rw-r--r--po/quot.sed6
-rw-r--r--po/remove-potcdate.sin19
-rw-r--r--src/codetagger.c152
27 files changed, 4834 insertions, 64 deletions
diff --git a/ABOUT-NLS b/ABOUT-NLS
new file mode 100644
index 0000000..83bc72e
--- /dev/null
+++ b/ABOUT-NLS
@@ -0,0 +1,1068 @@
11 Notes on the Free Translation Project
2***************************************
3
4Free software is going international! The Free Translation Project is
5a way to get maintainers of free software, translators, and users all
6together, so that free software will gradually become able to speak many
7languages. A few packages already provide translations for their
8messages.
9
10 If you found this `ABOUT-NLS' file inside a distribution, you may
11assume that the distributed package does use GNU `gettext' internally,
12itself available at your nearest GNU archive site. But you do _not_
13need to install GNU `gettext' prior to configuring, installing or using
14this package with messages translated.
15
16 Installers will find here some useful hints. These notes also
17explain how users should proceed for getting the programs to use the
18available translations. They tell how people wanting to contribute and
19work on translations can contact the appropriate team.
20
21 When reporting bugs in the `intl/' directory or bugs which may be
22related to internationalization, you should tell about the version of
23`gettext' which is used. The information can be found in the
24`intl/VERSION' file, in internationalized packages.
25
261.1 Quick configuration advice
27==============================
28
29If you want to exploit the full power of internationalization, you
30should configure it using
31
32 ./configure --with-included-gettext
33
34to force usage of internationalizing routines provided within this
35package, despite the existence of internationalizing capabilities in the
36operating system where this package is being installed. So far, only
37the `gettext' implementation in the GNU C library version 2 provides as
38many features (such as locale alias, message inheritance, automatic
39charset conversion or plural form handling) as the implementation here.
40It is also not possible to offer this additional functionality on top
41of a `catgets' implementation. Future versions of GNU `gettext' will
42very likely convey even more functionality. So it might be a good idea
43to change to GNU `gettext' as soon as possible.
44
45 So you need _not_ provide this option if you are using GNU libc 2 or
46you have installed a recent copy of the GNU gettext package with the
47included `libintl'.
48
491.2 INSTALL Matters
50===================
51
52Some packages are "localizable" when properly installed; the programs
53they contain can be made to speak your own native language. Most such
54packages use GNU `gettext'. Other packages have their own ways to
55internationalization, predating GNU `gettext'.
56
57 By default, this package will be installed to allow translation of
58messages. It will automatically detect whether the system already
59provides the GNU `gettext' functions. If not, the included GNU
60`gettext' library will be used. This library is wholly contained
61within this package, usually in the `intl/' subdirectory, so prior
62installation of the GNU `gettext' package is _not_ required.
63Installers may use special options at configuration time for changing
64the default behaviour. The commands:
65
66 ./configure --with-included-gettext
67 ./configure --disable-nls
68
69will, respectively, bypass any pre-existing `gettext' to use the
70internationalizing routines provided within this package, or else,
71_totally_ disable translation of messages.
72
73 When you already have GNU `gettext' installed on your system and run
74configure without an option for your new package, `configure' will
75probably detect the previously built and installed `libintl.a' file and
76will decide to use this. This might not be desirable. You should use
77the more recent version of the GNU `gettext' library. I.e. if the file
78`intl/VERSION' shows that the library which comes with this package is
79more recent, you should use
80
81 ./configure --with-included-gettext
82
83to prevent auto-detection.
84
85 The configuration process will not test for the `catgets' function
86and therefore it will not be used. The reason is that even an
87emulation of `gettext' on top of `catgets' could not provide all the
88extensions of the GNU `gettext' library.
89
90 Internationalized packages usually have many `po/LL.po' files, where
91LL gives an ISO 639 two-letter code identifying the language. Unless
92translations have been forbidden at `configure' time by using the
93`--disable-nls' switch, all available translations are installed
94together with the package. However, the environment variable `LINGUAS'
95may be set, prior to configuration, to limit the installed set.
96`LINGUAS' should then contain a space separated list of two-letter
97codes, stating which languages are allowed.
98
991.3 Using This Package
100======================
101
102As a user, if your language has been installed for this package, you
103only have to set the `LANG' environment variable to the appropriate
104`LL_CC' combination. If you happen to have the `LC_ALL' or some other
105`LC_xxx' environment variables set, you should unset them before
106setting `LANG', otherwise the setting of `LANG' will not have the
107desired effect. Here `LL' is an ISO 639 two-letter language code, and
108`CC' is an ISO 3166 two-letter country code. For example, let's
109suppose that you speak German and live in Germany. At the shell
110prompt, merely execute `setenv LANG de_DE' (in `csh'),
111`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
112This can be done from your `.login' or `.profile' file, once and for
113all.
114
115 You might think that the country code specification is redundant.
116But in fact, some languages have dialects in different countries. For
117example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The
118country code serves to distinguish the dialects.
119
120 The locale naming convention of `LL_CC', with `LL' denoting the
121language and `CC' denoting the country, is the one use on systems based
122on GNU libc. On other systems, some variations of this scheme are
123used, such as `LL' or `LL_CC.ENCODING'. You can get the list of
124locales supported by your system for your language by running the
125command `locale -a | grep '^LL''.
126
127 Not all programs have translations for all languages. By default, an
128English message is shown in place of a nonexistent translation. If you
129understand other languages, you can set up a priority list of languages.
130This is done through a different environment variable, called
131`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG'
132for the purpose of message handling, but you still need to have `LANG'
133set to the primary language; this is required by other parts of the
134system libraries. For example, some Swedish users who would rather
135read translations in German than English for when Swedish is not
136available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
137
138 Special advice for Norwegian users: The language code for Norwegian
139bokma*l changed from `no' to `nb' recently (in 2003). During the
140transition period, while some message catalogs for this language are
141installed under `nb' and some older ones under `no', it's recommended
142for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and
143older translations are used.
144
145 In the `LANGUAGE' environment variable, but not in the `LANG'
146environment variable, `LL_CC' combinations can be abbreviated as `LL'
147to denote the language's main dialect. For example, `de' is equivalent
148to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
149(Portuguese as spoken in Portugal) in this context.
150
1511.4 Translating Teams
152=====================
153
154For the Free Translation Project to be a success, we need interested
155people who like their own language and write it well, and who are also
156able to synergize with other translators speaking the same language.
157Each translation team has its own mailing list. The up-to-date list of
158teams can be found at the Free Translation Project's homepage,
159`http://translationproject.org/', in the "Teams" area.
160
161 If you'd like to volunteer to _work_ at translating messages, you
162should become a member of the translating team for your own language.
163The subscribing address is _not_ the same as the list itself, it has
164`-request' appended. For example, speakers of Swedish can send a
165message to `sv-request@li.org', having this message body:
166
167 subscribe
168
169 Keep in mind that team members are expected to participate
170_actively_ in translations, or at solving translational difficulties,
171rather than merely lurking around. If your team does not exist yet and
172you want to start one, or if you are unsure about what to do or how to
173get started, please write to `coordinator@translationproject.org' to
174reach the coordinator for all translator teams.
175
176 The English team is special. It works at improving and uniformizing
177the terminology in use. Proven linguistic skills are praised more than
178programming skills, here.
179
1801.5 Available Packages
181======================
182
183Languages are not equally supported in all packages. The following
184matrix shows the current state of internationalization, as of November
1852007. The matrix shows, in regard of each package, for which languages
186PO files have been submitted to translation coordination, with a
187translation percentage of at least 50%.
188
189 Ready PO files af am ar az be bg bs ca cs cy da de el en en_GB eo
190 +----------------------------------------------------+
191 Compendium | [] [] [] [] |
192 a2ps | [] [] [] [] [] |
193 aegis | () |
194 ant-phone | () |
195 anubis | [] |
196 ap-utils | |
197 aspell | [] [] [] [] [] |
198 bash | [] |
199 bfd | |
200 bibshelf | [] |
201 binutils | |
202 bison | [] [] |
203 bison-runtime | [] |
204 bluez-pin | [] [] [] [] [] |
205 cflow | [] |
206 clisp | [] [] [] |
207 console-tools | [] [] |
208 coreutils | [] [] [] [] |
209 cpio | |
210 cpplib | [] [] [] |
211 cryptonit | [] |
212 dialog | |
213 diffutils | [] [] [] [] [] [] |
214 doodle | [] |
215 e2fsprogs | [] [] |
216 enscript | [] [] [] [] |
217 fetchmail | [] [] () [] [] |
218 findutils | [] |
219 findutils_stable | [] [] [] |
220 flex | [] [] [] |
221 fslint | |
222 gas | |
223 gawk | [] [] [] |
224 gcal | [] |
225 gcc | [] |
226 gettext-examples | [] [] [] [] [] |
227 gettext-runtime | [] [] [] [] [] |
228 gettext-tools | [] [] |
229 gip | [] |
230 gliv | [] [] |
231 glunarclock | [] |
232 gmult | [] [] |
233 gnubiff | () |
234 gnucash | [] [] () () [] |
235 gnuedu | |
236 gnulib | [] |
237 gnunet | |
238 gnunet-gtk | |
239 gnutls | [] |
240 gpe-aerial | [] [] |
241 gpe-beam | [] [] |
242 gpe-calendar | |
243 gpe-clock | [] [] |
244 gpe-conf | [] [] |
245 gpe-contacts | |
246 gpe-edit | [] |
247 gpe-filemanager | |
248 gpe-go | [] |
249 gpe-login | [] [] |
250 gpe-ownerinfo | [] [] |
251 gpe-package | |
252 gpe-sketchbook | [] [] |
253 gpe-su | [] [] |
254 gpe-taskmanager | [] [] |
255 gpe-timesheet | [] |
256 gpe-today | [] [] |
257 gpe-todo | |
258 gphoto2 | [] [] [] [] |
259 gprof | [] [] |
260 gpsdrive | |
261 gramadoir | [] [] |
262 grep | [] [] |
263 gretl | () |
264 gsasl | |
265 gss | |
266 gst-plugins-bad | [] [] |
267 gst-plugins-base | [] [] |
268 gst-plugins-good | [] [] [] |
269 gst-plugins-ugly | [] [] |
270 gstreamer | [] [] [] [] [] [] [] |
271 gtick | () |
272 gtkam | [] [] [] [] |
273 gtkorphan | [] [] |
274 gtkspell | [] [] [] [] |
275 gutenprint | [] |
276 hello | [] [] [] [] [] |
277 herrie | [] |
278 hylafax | |
279 idutils | [] [] |
280 indent | [] [] [] [] |
281 iso_15924 | |
282 iso_3166 | [] [] [] [] [] [] [] [] [] [] [] |
283 iso_3166_2 | |
284 iso_4217 | [] [] [] |
285 iso_639 | [] [] [] [] |
286 jpilot | [] |
287 jtag | |
288 jwhois | |
289 kbd | [] [] [] [] |
290 keytouch | [] [] |
291 keytouch-editor | [] |
292 keytouch-keyboa... | [] |
293 latrine | () |
294 ld | [] |
295 leafpad | [] [] [] [] [] |
296 libc | [] [] [] [] |
297 libexif | [] |
298 libextractor | [] |
299 libgpewidget | [] [] [] |
300 libgpg-error | [] |
301 libgphoto2 | [] [] |
302 libgphoto2_port | [] [] |
303 libgsasl | |
304 libiconv | [] [] |
305 libidn | [] [] [] |
306 lifelines | [] () |
307 lilypond | [] |
308 lingoteach | |
309 lprng | |
310 lynx | [] [] [] [] |
311 m4 | [] [] [] [] |
312 mailfromd | |
313 mailutils | [] |
314 make | [] [] |
315 man-db | [] [] [] |
316 minicom | [] [] [] |
317 nano | [] [] [] |
318 opcodes | [] |
319 parted | [] [] |
320 pilot-qof | |
321 popt | [] [] [] |
322 psmisc | [] |
323 pwdutils | |
324 qof | |
325 radius | [] |
326 recode | [] [] [] [] [] [] |
327 rpm | [] |
328 screem | |
329 scrollkeeper | [] [] [] [] [] [] [] [] |
330 sed | [] [] [] |
331 shared-mime-info | [] [] [] [] () [] [] [] |
332 sharutils | [] [] [] [] [] [] |
333 shishi | |
334 skencil | [] () |
335 solfege | |
336 soundtracker | [] [] |
337 sp | [] |
338 system-tools-ba... | [] [] [] [] [] [] [] [] [] |
339 tar | [] [] |
340 texinfo | [] [] [] |
341 tin | () () |
342 tuxpaint | [] [] [] [] [] [] |
343 unicode-han-tra... | |
344 unicode-transla... | |
345 util-linux | [] [] [] [] |
346 util-linux-ng | [] [] [] [] |
347 vorbis-tools | [] |
348 wastesedge | () |
349 wdiff | [] [] [] [] |
350 wget | [] [] [] |
351 xchat | [] [] [] [] [] [] [] |
352 xkeyboard-config | [] |
353 xpad | [] [] [] |
354 +----------------------------------------------------+
355 af am ar az be bg bs ca cs cy da de el en en_GB eo
356 6 0 2 1 8 26 2 40 48 2 56 88 15 1 15 18
357
358 es et eu fa fi fr ga gl gu he hi hr hu id is it
359 +--------------------------------------------------+
360 Compendium | [] [] [] [] [] |
361 a2ps | [] [] [] () |
362 aegis | |
363 ant-phone | [] |
364 anubis | [] |
365 ap-utils | [] [] |
366 aspell | [] [] [] |
367 bash | [] |
368 bfd | [] [] |
369 bibshelf | [] [] [] |
370 binutils | [] [] [] |
371 bison | [] [] [] [] [] [] |
372 bison-runtime | [] [] [] [] [] |
373 bluez-pin | [] [] [] [] [] |
374 cflow | [] |
375 clisp | [] [] |
376 console-tools | |
377 coreutils | [] [] [] [] [] [] |
378 cpio | [] [] [] |
379 cpplib | [] [] |
380 cryptonit | [] |
381 dialog | [] [] [] |
382 diffutils | [] [] [] [] [] [] [] [] [] |
383 doodle | [] [] |
384 e2fsprogs | [] [] [] |
385 enscript | [] [] [] |
386 fetchmail | [] |
387 findutils | [] [] [] |
388 findutils_stable | [] [] [] [] |
389 flex | [] [] [] |
390 fslint | |
391 gas | [] [] |
392 gawk | [] [] [] [] () |
393 gcal | [] [] |
394 gcc | [] |
395 gettext-examples | [] [] [] [] [] [] [] |
396 gettext-runtime | [] [] [] [] [] [] |
397 gettext-tools | [] [] [] [] |
398 gip | [] [] [] [] |
399 gliv | () |
400 glunarclock | [] [] [] |
401 gmult | [] [] [] |
402 gnubiff | () () |
403 gnucash | () () () |
404 gnuedu | [] |
405 gnulib | [] [] [] |
406 gnunet | |
407 gnunet-gtk | |
408 gnutls | |
409 gpe-aerial | [] [] |
410 gpe-beam | [] [] |
411 gpe-calendar | |
412 gpe-clock | [] [] [] [] |
413 gpe-conf | [] |
414 gpe-contacts | [] [] |
415 gpe-edit | [] [] [] [] |
416 gpe-filemanager | [] |
417 gpe-go | [] [] [] |
418 gpe-login | [] [] [] |
419 gpe-ownerinfo | [] [] [] [] [] |
420 gpe-package | [] |
421 gpe-sketchbook | [] [] |
422 gpe-su | [] [] [] [] |
423 gpe-taskmanager | [] [] [] |
424 gpe-timesheet | [] [] [] [] |
425 gpe-today | [] [] [] [] |
426 gpe-todo | [] |
427 gphoto2 | [] [] [] [] [] |
428 gprof | [] [] [] [] [] |
429 gpsdrive | [] |
430 gramadoir | [] [] |
431 grep | [] [] [] |
432 gretl | [] [] [] () |
433 gsasl | [] [] |
434 gss | [] [] |
435 gst-plugins-bad | [] [] [] [] |
436 gst-plugins-base | [] [] [] [] |
437 gst-plugins-good | [] [] [] [] [] |
438 gst-plugins-ugly | [] [] [] [] |
439 gstreamer | [] [] [] |
440 gtick | [] [] [] |
441 gtkam | [] [] [] [] |
442 gtkorphan | [] [] |
443 gtkspell | [] [] [] [] [] [] [] |
444 gutenprint | [] |
445 hello | [] [] [] [] [] [] [] [] [] [] [] [] [] |
446 herrie | [] |
447 hylafax | |
448 idutils | [] [] [] [] [] |
449 indent | [] [] [] [] [] [] [] [] [] [] |
450 iso_15924 | [] |
451 iso_3166 | [] [] [] [] [] [] [] [] [] [] [] [] [] |
452 iso_3166_2 | [] |
453 iso_4217 | [] [] [] [] [] [] |
454 iso_639 | [] [] [] [] [] [] |
455 jpilot | [] [] |
456 jtag | [] |
457 jwhois | [] [] [] [] [] |
458 kbd | [] [] |
459 keytouch | [] [] [] |
460 keytouch-editor | [] |
461 keytouch-keyboa... | [] [] |
462 latrine | [] [] |
463 ld | [] [] [] [] |
464 leafpad | [] [] [] [] [] [] |
465 libc | [] [] [] [] [] |
466 libexif | [] |
467 libextractor | [] |
468 libgpewidget | [] [] [] [] [] |
469 libgpg-error | [] |
470 libgphoto2 | [] [] [] |
471 libgphoto2_port | [] [] |
472 libgsasl | [] [] |
473 libiconv | [] [] [] |
474 libidn | [] [] |
475 lifelines | () |
476 lilypond | [] [] [] |
477 lingoteach | [] [] [] |
478 lprng | |
479 lynx | [] [] [] |
480 m4 | [] [] [] [] |
481 mailfromd | |
482 mailutils | [] [] |
483 make | [] [] [] [] [] [] [] [] |
484 man-db | [] |
485 minicom | [] [] [] [] |
486 nano | [] [] [] [] [] [] [] |
487 opcodes | [] [] [] [] |
488 parted | [] [] [] |
489 pilot-qof | |
490 popt | [] [] [] [] |
491 psmisc | [] [] |
492 pwdutils | |
493 qof | [] |
494 radius | [] [] |
495 recode | [] [] [] [] [] [] [] [] |
496 rpm | [] [] |
497 screem | |
498 scrollkeeper | [] [] [] |
499 sed | [] [] [] [] [] |
500 shared-mime-info | [] [] [] [] [] [] |
501 sharutils | [] [] [] [] [] [] [] [] |
502 shishi | [] |
503 skencil | [] [] |
504 solfege | [] |
505 soundtracker | [] [] [] |
506 sp | [] |
507 system-tools-ba... | [] [] [] [] [] [] [] [] [] |
508 tar | [] [] [] [] [] |
509 texinfo | [] [] [] |
510 tin | [] () |
511 tuxpaint | [] [] |
512 unicode-han-tra... | |
513 unicode-transla... | [] [] |
514 util-linux | [] [] [] [] [] [] [] |
515 util-linux-ng | [] [] [] [] [] [] [] |
516 vorbis-tools | |
517 wastesedge | () |
518 wdiff | [] [] [] [] [] [] [] [] |
519 wget | [] [] [] [] [] [] [] [] |
520 xchat | [] [] [] [] [] [] [] |
521 xkeyboard-config | [] [] [] [] |
522 xpad | [] [] [] |
523 +--------------------------------------------------+
524 es et eu fa fi fr ga gl gu he hi hr hu id is it
525 85 22 14 2 48 101 61 12 2 8 2 6 53 29 1 52
526
527 ja ka ko ku ky lg lt lv mk mn ms mt nb ne nl nn
528 +--------------------------------------------------+
529 Compendium | [] |
530 a2ps | () [] [] |
531 aegis | () |
532 ant-phone | [] |
533 anubis | [] [] [] |
534 ap-utils | [] |
535 aspell | [] [] |
536 bash | [] |
537 bfd | |
538 bibshelf | [] |
539 binutils | |
540 bison | [] [] [] |
541 bison-runtime | [] [] [] |
542 bluez-pin | [] [] [] |
543 cflow | |
544 clisp | [] |
545 console-tools | |
546 coreutils | [] |
547 cpio | [] |
548 cpplib | [] |
549 cryptonit | [] |
550 dialog | [] [] |
551 diffutils | [] [] [] |
552 doodle | |
553 e2fsprogs | [] |
554 enscript | [] |
555 fetchmail | [] [] |
556 findutils | [] |
557 findutils_stable | [] |
558 flex | [] [] |
559 fslint | |
560 gas | |
561 gawk | [] [] |
562 gcal | |
563 gcc | |
564 gettext-examples | [] [] [] |
565 gettext-runtime | [] [] [] |
566 gettext-tools | [] [] |
567 gip | [] [] |
568 gliv | [] |
569 glunarclock | [] [] |
570 gmult | [] [] [] |
571 gnubiff | |
572 gnucash | () () () |
573 gnuedu | |
574 gnulib | [] [] |
575 gnunet | |
576 gnunet-gtk | |
577 gnutls | [] |
578 gpe-aerial | [] |
579 gpe-beam | [] |
580 gpe-calendar | [] |
581 gpe-clock | [] [] [] |
582 gpe-conf | [] [] [] |
583 gpe-contacts | [] |
584 gpe-edit | [] [] [] |
585 gpe-filemanager | [] [] |
586 gpe-go | [] [] [] |
587 gpe-login | [] [] [] |
588 gpe-ownerinfo | [] [] |
589 gpe-package | [] [] |
590 gpe-sketchbook | [] [] |
591 gpe-su | [] [] [] |
592 gpe-taskmanager | [] [] [] [] |
593 gpe-timesheet | [] |
594 gpe-today | [] [] |
595 gpe-todo | [] |
596 gphoto2 | [] [] |
597 gprof | [] |
598 gpsdrive | [] |
599 gramadoir | () |
600 grep | [] [] |
601 gretl | |
602 gsasl | [] |
603 gss | |
604 gst-plugins-bad | [] |
605 gst-plugins-base | [] |
606 gst-plugins-good | [] |
607 gst-plugins-ugly | [] |
608 gstreamer | [] |
609 gtick | [] |
610 gtkam | [] [] |
611 gtkorphan | [] |
612 gtkspell | [] [] |
613 gutenprint | [] |
614 hello | [] [] [] [] [] [] [] |
615 herrie | [] |
616 hylafax | |
617 idutils | [] |
618 indent | [] [] |
619 iso_15924 | [] |
620 iso_3166 | [] [] [] [] [] [] [] [] |
621 iso_3166_2 | [] |
622 iso_4217 | [] [] [] |
623 iso_639 | [] [] [] [] |
624 jpilot | () () |
625 jtag | |
626 jwhois | [] |
627 kbd | [] |
628 keytouch | [] |
629 keytouch-editor | [] |
630 keytouch-keyboa... | |
631 latrine | [] |
632 ld | |
633 leafpad | [] [] |
634 libc | [] [] [] |
635 libexif | |
636 libextractor | |
637 libgpewidget | [] |
638 libgpg-error | |
639 libgphoto2 | [] |
640 libgphoto2_port | [] |
641 libgsasl | [] |
642 libiconv | [] |
643 libidn | [] [] |
644 lifelines | [] |
645 lilypond | [] |
646 lingoteach | [] |
647 lprng | |
648 lynx | [] [] |
649 m4 | [] [] |
650 mailfromd | |
651 mailutils | |
652 make | [] [] [] |
653 man-db | |
654 minicom | [] |
655 nano | [] [] [] |
656 opcodes | [] |
657 parted | [] [] |
658 pilot-qof | |
659 popt | [] [] [] |
660 psmisc | [] [] [] |
661 pwdutils | |
662 qof | |
663 radius | |
664 recode | [] |
665 rpm | [] [] |
666 screem | [] |
667 scrollkeeper | [] [] [] [] |
668 sed | [] [] |
669 shared-mime-info | [] [] [] [] [] [] [] |
670 sharutils | [] [] |
671 shishi | |
672 skencil | |
673 solfege | () () |
674 soundtracker | |
675 sp | () |
676 system-tools-ba... | [] [] [] [] |
677 tar | [] [] [] |
678 texinfo | [] [] |
679 tin | |
680 tuxpaint | () [] [] |
681 unicode-han-tra... | |
682 unicode-transla... | |
683 util-linux | [] [] |
684 util-linux-ng | [] [] |
685 vorbis-tools | |
686 wastesedge | [] |
687 wdiff | [] [] |
688 wget | [] [] |
689 xchat | [] [] [] [] |
690 xkeyboard-config | [] [] [] |
691 xpad | [] [] [] |
692 +--------------------------------------------------+
693 ja ka ko ku ky lg lt lv mk mn ms mt nb ne nl nn
694 51 2 25 3 2 0 6 0 2 2 20 0 11 1 103 6
695
696 or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv ta
697 +--------------------------------------------------+
698 Compendium | [] [] [] [] [] |
699 a2ps | () [] [] [] [] [] [] |
700 aegis | () () |
701 ant-phone | [] [] |
702 anubis | [] [] [] |
703 ap-utils | () |
704 aspell | [] [] [] |
705 bash | [] [] |
706 bfd | |
707 bibshelf | [] |
708 binutils | [] [] |
709 bison | [] [] [] [] [] |
710 bison-runtime | [] [] [] [] [] |
711 bluez-pin | [] [] [] [] [] [] [] [] [] |
712 cflow | [] |
713 clisp | [] |
714 console-tools | [] |
715 coreutils | [] [] [] [] |
716 cpio | [] [] [] |
717 cpplib | [] |
718 cryptonit | [] [] |
719 dialog | [] |
720 diffutils | [] [] [] [] [] [] |
721 doodle | [] [] |
722 e2fsprogs | [] [] |
723 enscript | [] [] [] [] [] |
724 fetchmail | [] [] [] |
725 findutils | [] [] [] |
726 findutils_stable | [] [] [] [] [] [] |
727 flex | [] [] [] [] [] |
728 fslint | [] |
729 gas | |
730 gawk | [] [] [] [] |
731 gcal | [] |
732 gcc | [] [] |
733 gettext-examples | [] [] [] [] [] [] [] [] |
734 gettext-runtime | [] [] [] [] [] [] [] [] |
735 gettext-tools | [] [] [] [] [] [] [] |
736 gip | [] [] [] [] |
737 gliv | [] [] [] [] [] [] |
738 glunarclock | [] [] [] [] [] [] |
739 gmult | [] [] [] [] |
740 gnubiff | () [] |
741 gnucash | () [] |
742 gnuedu | |
743 gnulib | [] [] [] |
744 gnunet | |
745 gnunet-gtk | [] |
746 gnutls | [] [] |
747 gpe-aerial | [] [] [] [] [] [] [] |
748 gpe-beam | [] [] [] [] [] [] [] |
749 gpe-calendar | [] [] [] [] |
750 gpe-clock | [] [] [] [] [] [] [] [] |
751 gpe-conf | [] [] [] [] [] [] [] |
752 gpe-contacts | [] [] [] [] [] |
753 gpe-edit | [] [] [] [] [] [] [] [] [] |
754 gpe-filemanager | [] [] |
755 gpe-go | [] [] [] [] [] [] [] [] |
756 gpe-login | [] [] [] [] [] [] [] [] |
757 gpe-ownerinfo | [] [] [] [] [] [] [] [] |
758 gpe-package | [] [] |
759 gpe-sketchbook | [] [] [] [] [] [] [] [] |
760 gpe-su | [] [] [] [] [] [] [] [] |
761 gpe-taskmanager | [] [] [] [] [] [] [] [] |
762 gpe-timesheet | [] [] [] [] [] [] [] [] |
763 gpe-today | [] [] [] [] [] [] [] [] |
764 gpe-todo | [] [] [] [] |
765 gphoto2 | [] [] [] [] [] [] |
766 gprof | [] [] [] |
767 gpsdrive | [] [] |
768 gramadoir | [] [] |
769 grep | [] [] [] [] |
770 gretl | [] [] [] |
771 gsasl | [] [] [] |
772 gss | [] [] [] [] |
773 gst-plugins-bad | [] [] [] |
774 gst-plugins-base | [] [] |
775 gst-plugins-good | [] [] |
776 gst-plugins-ugly | [] [] [] |
777 gstreamer | [] [] [] [] |
778 gtick | [] |
779 gtkam | [] [] [] [] [] |
780 gtkorphan | [] |
781 gtkspell | [] [] [] [] [] [] [] [] |
782 gutenprint | [] |
783 hello | [] [] [] [] [] [] [] [] |
784 herrie | [] [] [] |
785 hylafax | |
786 idutils | [] [] [] [] [] |
787 indent | [] [] [] [] [] [] [] |
788 iso_15924 | |
789 iso_3166 | [] [] [] [] [] [] [] [] [] [] [] [] [] |
790 iso_3166_2 | |
791 iso_4217 | [] [] [] [] [] [] [] |
792 iso_639 | [] [] [] [] [] [] [] |
793 jpilot | |
794 jtag | [] |
795 jwhois | [] [] [] [] |
796 kbd | [] [] [] |
797 keytouch | [] |
798 keytouch-editor | [] |
799 keytouch-keyboa... | [] |
800 latrine | |
801 ld | [] |
802 leafpad | [] [] [] [] [] [] |
803 libc | [] [] [] [] |
804 libexif | [] [] |
805 libextractor | [] [] |
806 libgpewidget | [] [] [] [] [] [] [] [] |
807 libgpg-error | [] [] [] |
808 libgphoto2 | [] |
809 libgphoto2_port | [] [] [] |
810 libgsasl | [] [] [] [] |
811 libiconv | [] [] [] |
812 libidn | [] [] () |
813 lifelines | [] [] |
814 lilypond | |
815 lingoteach | [] |
816 lprng | [] |
817 lynx | [] [] [] |
818 m4 | [] [] [] [] [] |
819 mailfromd | [] |
820 mailutils | [] [] [] |
821 make | [] [] [] [] |
822 man-db | [] [] [] [] |
823 minicom | [] [] [] [] [] |
824 nano | [] [] [] [] |
825 opcodes | [] [] |
826 parted | [] |
827 pilot-qof | |
828 popt | [] [] [] [] |
829 psmisc | [] [] |
830 pwdutils | [] [] |
831 qof | [] [] |
832 radius | [] [] |
833 recode | [] [] [] [] [] [] [] |
834 rpm | [] [] [] [] |
835 screem | |
836 scrollkeeper | [] [] [] [] [] [] [] |
837 sed | [] [] [] [] [] [] [] [] [] |
838 shared-mime-info | [] [] [] [] [] [] |
839 sharutils | [] [] [] [] |
840 shishi | [] |
841 skencil | [] [] [] |
842 solfege | [] |
843 soundtracker | [] [] |
844 sp | |
845 system-tools-ba... | [] [] [] [] [] [] [] [] [] |
846 tar | [] [] [] [] |
847 texinfo | [] [] [] [] |
848 tin | () |
849 tuxpaint | [] [] [] [] [] [] |
850 unicode-han-tra... | |
851 unicode-transla... | |
852 util-linux | [] [] [] [] |
853 util-linux-ng | [] [] [] [] |
854 vorbis-tools | [] |
855 wastesedge | |
856 wdiff | [] [] [] [] [] [] [] |
857 wget | [] [] [] [] |
858 xchat | [] [] [] [] [] [] [] |
859 xkeyboard-config | [] [] [] |
860 xpad | [] [] [] |
861 +--------------------------------------------------+
862 or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv ta
863 0 5 77 31 53 4 58 72 3 45 46 9 45 122 3
864
865 tg th tk tr uk ven vi wa xh zh_CN zh_HK zh_TW zu
866 +---------------------------------------------------+
867 Compendium | [] [] [] [] | 19
868 a2ps | [] [] [] | 19
869 aegis | [] | 1
870 ant-phone | [] [] | 6
871 anubis | [] [] [] | 11
872 ap-utils | () [] | 4
873 aspell | [] [] [] | 16
874 bash | [] | 6
875 bfd | | 2
876 bibshelf | [] | 7
877 binutils | [] [] [] [] | 9
878 bison | [] [] [] [] | 20
879 bison-runtime | [] [] [] [] | 18
880 bluez-pin | [] [] [] [] [] [] | 28
881 cflow | [] [] | 5
882 clisp | | 9
883 console-tools | [] [] | 5
884 coreutils | [] [] [] | 18
885 cpio | [] [] [] [] | 11
886 cpplib | [] [] [] [] [] | 12
887 cryptonit | [] | 6
888 dialog | [] [] [] | 9
889 diffutils | [] [] [] [] [] | 29
890 doodle | [] | 6
891 e2fsprogs | [] [] | 10
892 enscript | [] [] [] | 16
893 fetchmail | [] [] | 12
894 findutils | [] [] [] | 11
895 findutils_stable | [] [] [] [] | 18
896 flex | [] [] | 15
897 fslint | [] | 2
898 gas | [] | 3
899 gawk | [] [] [] | 16
900 gcal | [] | 5
901 gcc | [] [] [] | 7
902 gettext-examples | [] [] [] [] [] [] | 29
903 gettext-runtime | [] [] [] [] [] [] | 28
904 gettext-tools | [] [] [] [] [] | 20
905 gip | [] [] | 13
906 gliv | [] [] | 11
907 glunarclock | [] [] [] | 15
908 gmult | [] [] [] [] | 16
909 gnubiff | [] | 2
910 gnucash | () [] | 5
911 gnuedu | [] | 2
912 gnulib | [] | 10
913 gnunet | | 0
914 gnunet-gtk | [] [] | 3
915 gnutls | | 4
916 gpe-aerial | [] [] | 14
917 gpe-beam | [] [] | 14
918 gpe-calendar | [] [] | 7
919 gpe-clock | [] [] [] [] | 21
920 gpe-conf | [] [] [] | 16
921 gpe-contacts | [] [] | 10
922 gpe-edit | [] [] [] [] [] | 22
923 gpe-filemanager | [] [] | 7
924 gpe-go | [] [] [] [] | 19
925 gpe-login | [] [] [] [] [] | 21
926 gpe-ownerinfo | [] [] [] [] | 21
927 gpe-package | [] | 6
928 gpe-sketchbook | [] [] | 16
929 gpe-su | [] [] [] [] | 21
930 gpe-taskmanager | [] [] [] [] | 21
931 gpe-timesheet | [] [] [] [] | 18
932 gpe-today | [] [] [] [] [] | 21
933 gpe-todo | [] [] | 8
934 gphoto2 | [] [] [] [] | 21
935 gprof | [] [] | 13
936 gpsdrive | [] | 5
937 gramadoir | [] | 7
938 grep | [] | 12
939 gretl | | 6
940 gsasl | [] [] [] | 9
941 gss | [] | 7
942 gst-plugins-bad | [] [] [] | 13
943 gst-plugins-base | [] [] | 11
944 gst-plugins-good | [] [] [] [] [] | 16
945 gst-plugins-ugly | [] [] [] | 13
946 gstreamer | [] [] [] | 18
947 gtick | [] [] | 7
948 gtkam | [] | 16
949 gtkorphan | [] | 7
950 gtkspell | [] [] [] [] [] [] | 27
951 gutenprint | | 4
952 hello | [] [] [] [] [] | 38
953 herrie | [] [] | 8
954 hylafax | | 0
955 idutils | [] [] | 15
956 indent | [] [] [] [] [] | 28
957 iso_15924 | [] [] | 4
958 iso_3166 | [] [] [] [] [] [] [] [] [] | 54
959 iso_3166_2 | [] [] | 4
960 iso_4217 | [] [] [] [] [] | 24
961 iso_639 | [] [] [] [] [] | 26
962 jpilot | [] [] [] [] | 7
963 jtag | [] | 3
964 jwhois | [] [] [] | 13
965 kbd | [] [] [] | 13
966 keytouch | [] | 8
967 keytouch-editor | [] | 5
968 keytouch-keyboa... | [] | 5
969 latrine | [] [] | 5
970 ld | [] [] [] [] | 10
971 leafpad | [] [] [] [] [] | 24
972 libc | [] [] [] | 19
973 libexif | [] | 5
974 libextractor | [] | 5
975 libgpewidget | [] [] [] | 20
976 libgpg-error | [] | 6
977 libgphoto2 | [] [] | 9
978 libgphoto2_port | [] [] [] | 11
979 libgsasl | [] | 8
980 libiconv | [] [] | 11
981 libidn | [] [] | 11
982 lifelines | | 4
983 lilypond | [] | 6
984 lingoteach | [] | 6
985 lprng | [] | 2
986 lynx | [] [] [] | 15
987 m4 | [] [] [] | 18
988 mailfromd | [] [] | 3
989 mailutils | [] [] | 8
990 make | [] [] [] | 20
991 man-db | [] | 9
992 minicom | [] | 14
993 nano | [] [] [] | 20
994 opcodes | [] [] | 10
995 parted | [] [] [] | 11
996 pilot-qof | [] | 1
997 popt | [] [] [] [] | 18
998 psmisc | [] [] | 10
999 pwdutils | [] | 3
1000 qof | [] | 4
1001 radius | [] [] | 7
1002 recode | [] [] [] | 25
1003 rpm | [] [] [] [] | 13
1004 screem | [] | 2
1005 scrollkeeper | [] [] [] [] | 26
1006 sed | [] [] [] [] | 23
1007 shared-mime-info | [] [] [] | 29
1008 sharutils | [] [] [] | 23
1009 shishi | [] | 3
1010 skencil | [] | 7
1011 solfege | [] | 3
1012 soundtracker | [] [] | 9
1013 sp | [] | 3
1014 system-tools-ba... | [] [] [] [] [] [] [] | 38
1015 tar | [] [] [] | 17
1016 texinfo | [] [] [] | 15
1017 tin | | 1
1018 tuxpaint | [] [] [] | 19
1019 unicode-han-tra... | | 0
1020 unicode-transla... | | 2
1021 util-linux | [] [] [] | 20
1022 util-linux-ng | [] [] [] | 20
1023 vorbis-tools | [] [] | 4
1024 wastesedge | | 1
1025 wdiff | [] [] | 23
1026 wget | [] [] [] | 20
1027 xchat | [] [] [] [] | 29
1028 xkeyboard-config | [] [] [] | 14
1029 xpad | [] [] [] | 15
1030 +---------------------------------------------------+
1031 76 teams tg th tk tr uk ven vi wa xh zh_CN zh_HK zh_TW zu
1032 163 domains 0 3 1 74 51 0 143 21 1 57 7 45 0 2036
1033
1034 Some counters in the preceding matrix are higher than the number of
1035visible blocks let us expect. This is because a few extra PO files are
1036used for implementing regional variants of languages, or language
1037dialects.
1038
1039 For a PO file in the matrix above to be effective, the package to
1040which it applies should also have been internationalized and
1041distributed as such by its maintainer. There might be an observable
1042lag between the mere existence a PO file and its wide availability in a
1043distribution.
1044
1045 If November 2007 seems to be old, you may fetch a more recent copy
1046of this `ABOUT-NLS' file on most GNU archive sites. The most
1047up-to-date matrix with full percentage details can be found at
1048`http://translationproject.org/extra/matrix.html'.
1049
10501.6 Using `gettext' in new packages
1051===================================
1052
1053If you are writing a freely available program and want to
1054internationalize it you are welcome to use GNU `gettext' in your
1055package. Of course you have to respect the GNU Library General Public
1056License which covers the use of the GNU `gettext' library. This means
1057in particular that even non-free programs can use `libintl' as a shared
1058library, whereas only free software can use `libintl' as a static
1059library or use modified versions of `libintl'.
1060
1061 Once the sources are changed appropriately and the setup can handle
1062the use of `gettext' the only thing missing are the translations. The
1063Free Translation Project is also available for packages which are not
1064developed inside the GNU project. Therefore the information given above
1065applies also for every other Free Software Project. Contact
1066`coordinator@translationproject.org' to make the `.pot' files available
1067to the translation teams.
1068
diff --git a/ChangeLog b/ChangeLog
index db7e89b..2a82bc2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,7 @@ Copyright (C) 2008 David M. Syzdek <david@syzdek.net>
6 - re-branded package as dmstools. (syzdek) 6 - re-branded package as dmstools. (syzdek)
7 - migrated from CVS to Git. (syzdek) 7 - migrated from CVS to Git. (syzdek)
8 - derived package version from the git repository. (syzdek) 8 - derived package version from the git repository. (syzdek)
9 - adding support for GNU gettext support (syzdek)
9 10
100.0.4 2008/06/29 110.0.4 2008/06/29
11 - added the Xcode wrapper Makefile-xcode to the distribution (syzdek) 12 - added the Xcode wrapper Makefile-xcode to the distribution (syzdek)
diff --git a/Makefile.am b/Makefile.am
index 18a7f88..995e626 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -23,8 +23,8 @@
23# 23#
24 24
25# Sub directories 25# Sub directories
26SUBDIRS = 26SUBDIRS = po
27DIST_SUBDIRS = 27DIST_SUBDIRS = po
28 28
29 29
30# Global flags 30# Global flags
@@ -34,6 +34,7 @@ AM_CFLAGS = -O2 -W -Wall -Werror
34AM_CXXFLAGS = -O2 -W -Wall -Werror 34AM_CXXFLAGS = -O2 -W -Wall -Werror
35AM_OBJCFLAGS = -O2 -W -Wall -Werror 35AM_OBJCFLAGS = -O2 -W -Wall -Werror
36AM_CPPFLAGS = -O2 -W -Wall -Werror -DHAVE_COMMON_H=1 36AM_CPPFLAGS = -O2 -W -Wall -Werror -DHAVE_COMMON_H=1
37ACLOCAL_AMFLAGS = -I m4
37 38
38 39
39# automake targets 40# automake targets
@@ -81,7 +82,8 @@ src_recurse_SOURCES = $(noinst_HEADERS) \
81# lists 82# lists
82TESTS = 83TESTS =
83XFAIL_TESTS = 84XFAIL_TESTS =
84EXTRA_DIST = build-aux/git-package-version \ 85EXTRA_DIST = build-aux/config.rpath \
86 build-aux/git-package-version \
85 $(srcdir)/dmstools.tags \ 87 $(srcdir)/dmstools.tags \
86 $(srcdir)/doc/Doxyfile \ 88 $(srcdir)/doc/Doxyfile \
87 $(srcdir)/doc/codetagger.1.in \ 89 $(srcdir)/doc/codetagger.1.in \
diff --git a/build-aux/config.rpath b/build-aux/config.rpath
new file mode 100755
index 0000000..c547c68
--- /dev/null
+++ b/build-aux/config.rpath
@@ -0,0 +1,666 @@
1#! /bin/sh
2# Output a system dependent set of variables, describing how to set the
3# run time search path of shared libraries in an executable.
4#
5# Copyright 1996-2007 Free Software Foundation, Inc.
6# Taken from GNU libtool, 2001
7# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
8#
9# This file is free software; the Free Software Foundation gives
10# unlimited permission to copy and/or distribute it, with or without
11# modifications, as long as this notice is preserved.
12#
13# The first argument passed to this file is the canonical host specification,
14# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
15# or
16# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
17# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
18# should be set by the caller.
19#
20# The set of defined variables is at the end of this script.
21
22# Known limitations:
23# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
24# than 256 bytes, otherwise the compiler driver will dump core. The only
25# known workaround is to choose shorter directory names for the build
26# directory and/or the installation directory.
27
28# All known linkers require a `.a' archive for static linking (except MSVC,
29# which needs '.lib').
30libext=a
31shrext=.so
32
33host="$1"
34host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
35host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
36host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
37
38# Code taken from libtool.m4's _LT_CC_BASENAME.
39
40for cc_temp in $CC""; do
41 case $cc_temp in
42 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
43 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
44 \-*) ;;
45 *) break;;
46 esac
47done
48cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
49
50# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
51
52wl=
53if test "$GCC" = yes; then
54 wl='-Wl,'
55else
56 case "$host_os" in
57 aix*)
58 wl='-Wl,'
59 ;;
60 darwin*)
61 case $cc_basename in
62 xlc*)
63 wl='-Wl,'
64 ;;
65 esac
66 ;;
67 mingw* | cygwin* | pw32* | os2*)
68 ;;
69 hpux9* | hpux10* | hpux11*)
70 wl='-Wl,'
71 ;;
72 irix5* | irix6* | nonstopux*)
73 wl='-Wl,'
74 ;;
75 newsos6)
76 ;;
77 linux* | k*bsd*-gnu)
78 case $cc_basename in
79 icc* | ecc*)
80 wl='-Wl,'
81 ;;
82 pgcc | pgf77 | pgf90)
83 wl='-Wl,'
84 ;;
85 ccc*)
86 wl='-Wl,'
87 ;;
88 como)
89 wl='-lopt='
90 ;;
91 *)
92 case `$CC -V 2>&1 | sed 5q` in
93 *Sun\ C*)
94 wl='-Wl,'
95 ;;
96 esac
97 ;;
98 esac
99 ;;
100 osf3* | osf4* | osf5*)
101 wl='-Wl,'
102 ;;
103 rdos*)
104 ;;
105 solaris*)
106 wl='-Wl,'
107 ;;
108 sunos4*)
109 wl='-Qoption ld '
110 ;;
111 sysv4 | sysv4.2uw2* | sysv4.3*)
112 wl='-Wl,'
113 ;;
114 sysv4*MP*)
115 ;;
116 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
117 wl='-Wl,'
118 ;;
119 unicos*)
120 wl='-Wl,'
121 ;;
122 uts4*)
123 ;;
124 esac
125fi
126
127# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS.
128
129hardcode_libdir_flag_spec=
130hardcode_libdir_separator=
131hardcode_direct=no
132hardcode_minus_L=no
133
134case "$host_os" in
135 cygwin* | mingw* | pw32*)
136 # FIXME: the MSVC++ port hasn't been tested in a loooong time
137 # When not using gcc, we currently assume that we are using
138 # Microsoft Visual C++.
139 if test "$GCC" != yes; then
140 with_gnu_ld=no
141 fi
142 ;;
143 interix*)
144 # we just hope/assume this is gcc and not c89 (= MSVC++)
145 with_gnu_ld=yes
146 ;;
147 openbsd*)
148 with_gnu_ld=no
149 ;;
150esac
151
152ld_shlibs=yes
153if test "$with_gnu_ld" = yes; then
154 # Set some defaults for GNU ld with shared library support. These
155 # are reset later if shared libraries are not supported. Putting them
156 # here allows them to be overridden if necessary.
157 # Unlike libtool, we use -rpath here, not --rpath, since the documented
158 # option of GNU ld is called -rpath, not --rpath.
159 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
160 case "$host_os" in
161 aix3* | aix4* | aix5*)
162 # On AIX/PPC, the GNU linker is very broken
163 if test "$host_cpu" != ia64; then
164 ld_shlibs=no
165 fi
166 ;;
167 amigaos*)
168 hardcode_libdir_flag_spec='-L$libdir'
169 hardcode_minus_L=yes
170 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
171 # that the semantics of dynamic libraries on AmigaOS, at least up
172 # to version 4, is to share data among multiple programs linked
173 # with the same dynamic library. Since this doesn't match the
174 # behavior of shared libraries on other platforms, we cannot use
175 # them.
176 ld_shlibs=no
177 ;;
178 beos*)
179 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
180 :
181 else
182 ld_shlibs=no
183 fi
184 ;;
185 cygwin* | mingw* | pw32*)
186 # hardcode_libdir_flag_spec is actually meaningless, as there is
187 # no search path for DLLs.
188 hardcode_libdir_flag_spec='-L$libdir'
189 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
190 :
191 else
192 ld_shlibs=no
193 fi
194 ;;
195 interix[3-9]*)
196 hardcode_direct=no
197 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
198 ;;
199 gnu* | linux* | k*bsd*-gnu)
200 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
201 :
202 else
203 ld_shlibs=no
204 fi
205 ;;
206 netbsd*)
207 ;;
208 solaris*)
209 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
210 ld_shlibs=no
211 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
212 :
213 else
214 ld_shlibs=no
215 fi
216 ;;
217 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
218 case `$LD -v 2>&1` in
219 *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
220 ld_shlibs=no
221 ;;
222 *)
223 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
224 hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
225 else
226 ld_shlibs=no
227 fi
228 ;;
229 esac
230 ;;
231 sunos4*)
232 hardcode_direct=yes
233 ;;
234 *)
235 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
236 :
237 else
238 ld_shlibs=no
239 fi
240 ;;
241 esac
242 if test "$ld_shlibs" = no; then
243 hardcode_libdir_flag_spec=
244 fi
245else
246 case "$host_os" in
247 aix3*)
248 # Note: this linker hardcodes the directories in LIBPATH if there
249 # are no directories specified by -L.
250 hardcode_minus_L=yes
251 if test "$GCC" = yes; then
252 # Neither direct hardcoding nor static linking is supported with a
253 # broken collect2.
254 hardcode_direct=unsupported
255 fi
256 ;;
257 aix4* | aix5*)
258 if test "$host_cpu" = ia64; then
259 # On IA64, the linker does run time linking by default, so we don't
260 # have to do anything special.
261 aix_use_runtimelinking=no
262 else
263 aix_use_runtimelinking=no
264 # Test if we are trying to use run time linking or normal
265 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
266 # need to do runtime linking.
267 case $host_os in aix4.[23]|aix4.[23].*|aix5*)
268 for ld_flag in $LDFLAGS; do
269 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
270 aix_use_runtimelinking=yes
271 break
272 fi
273 done
274 ;;
275 esac
276 fi
277 hardcode_direct=yes
278 hardcode_libdir_separator=':'
279 if test "$GCC" = yes; then
280 case $host_os in aix4.[012]|aix4.[012].*)
281 collect2name=`${CC} -print-prog-name=collect2`
282 if test -f "$collect2name" && \
283 strings "$collect2name" | grep resolve_lib_name >/dev/null
284 then
285 # We have reworked collect2
286 :
287 else
288 # We have old collect2
289 hardcode_direct=unsupported
290 hardcode_minus_L=yes
291 hardcode_libdir_flag_spec='-L$libdir'
292 hardcode_libdir_separator=
293 fi
294 ;;
295 esac
296 fi
297 # Begin _LT_AC_SYS_LIBPATH_AIX.
298 echo 'int main () { return 0; }' > conftest.c
299 ${CC} ${LDFLAGS} conftest.c -o conftest
300 aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
301}'`
302 if test -z "$aix_libpath"; then
303 aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
304}'`
305 fi
306 if test -z "$aix_libpath"; then
307 aix_libpath="/usr/lib:/lib"
308 fi
309 rm -f conftest.c conftest
310 # End _LT_AC_SYS_LIBPATH_AIX.
311 if test "$aix_use_runtimelinking" = yes; then
312 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
313 else
314 if test "$host_cpu" = ia64; then
315 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
316 else
317 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
318 fi
319 fi
320 ;;
321 amigaos*)
322 hardcode_libdir_flag_spec='-L$libdir'
323 hardcode_minus_L=yes
324 # see comment about different semantics on the GNU ld section
325 ld_shlibs=no
326 ;;
327 bsdi[45]*)
328 ;;
329 cygwin* | mingw* | pw32*)
330 # When not using gcc, we currently assume that we are using
331 # Microsoft Visual C++.
332 # hardcode_libdir_flag_spec is actually meaningless, as there is
333 # no search path for DLLs.
334 hardcode_libdir_flag_spec=' '
335 libext=lib
336 ;;
337 darwin* | rhapsody*)
338 hardcode_direct=no
339 if test "$GCC" = yes ; then
340 :
341 else
342 case $cc_basename in
343 xlc*)
344 ;;
345 *)
346 ld_shlibs=no
347 ;;
348 esac
349 fi
350 ;;
351 dgux*)
352 hardcode_libdir_flag_spec='-L$libdir'
353 ;;
354 freebsd1*)
355 ld_shlibs=no
356 ;;
357 freebsd2.2*)
358 hardcode_libdir_flag_spec='-R$libdir'
359 hardcode_direct=yes
360 ;;
361 freebsd2*)
362 hardcode_direct=yes
363 hardcode_minus_L=yes
364 ;;
365 freebsd* | dragonfly*)
366 hardcode_libdir_flag_spec='-R$libdir'
367 hardcode_direct=yes
368 ;;
369 hpux9*)
370 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
371 hardcode_libdir_separator=:
372 hardcode_direct=yes
373 # hardcode_minus_L: Not really in the search PATH,
374 # but as the default location of the library.
375 hardcode_minus_L=yes
376 ;;
377 hpux10*)
378 if test "$with_gnu_ld" = no; then
379 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
380 hardcode_libdir_separator=:
381 hardcode_direct=yes
382 # hardcode_minus_L: Not really in the search PATH,
383 # but as the default location of the library.
384 hardcode_minus_L=yes
385 fi
386 ;;
387 hpux11*)
388 if test "$with_gnu_ld" = no; then
389 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
390 hardcode_libdir_separator=:
391 case $host_cpu in
392 hppa*64*|ia64*)
393 hardcode_direct=no
394 ;;
395 *)
396 hardcode_direct=yes
397 # hardcode_minus_L: Not really in the search PATH,
398 # but as the default location of the library.
399 hardcode_minus_L=yes
400 ;;
401 esac
402 fi
403 ;;
404 irix5* | irix6* | nonstopux*)
405 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
406 hardcode_libdir_separator=:
407 ;;
408 netbsd*)
409 hardcode_libdir_flag_spec='-R$libdir'
410 hardcode_direct=yes
411 ;;
412 newsos6)
413 hardcode_direct=yes
414 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
415 hardcode_libdir_separator=:
416 ;;
417 openbsd*)
418 if test -f /usr/libexec/ld.so; then
419 hardcode_direct=yes
420 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
421 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
422 else
423 case "$host_os" in
424 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
425 hardcode_libdir_flag_spec='-R$libdir'
426 ;;
427 *)
428 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
429 ;;
430 esac
431 fi
432 else
433 ld_shlibs=no
434 fi
435 ;;
436 os2*)
437 hardcode_libdir_flag_spec='-L$libdir'
438 hardcode_minus_L=yes
439 ;;
440 osf3*)
441 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
442 hardcode_libdir_separator=:
443 ;;
444 osf4* | osf5*)
445 if test "$GCC" = yes; then
446 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
447 else
448 # Both cc and cxx compiler support -rpath directly
449 hardcode_libdir_flag_spec='-rpath $libdir'
450 fi
451 hardcode_libdir_separator=:
452 ;;
453 solaris*)
454 hardcode_libdir_flag_spec='-R$libdir'
455 ;;
456 sunos4*)
457 hardcode_libdir_flag_spec='-L$libdir'
458 hardcode_direct=yes
459 hardcode_minus_L=yes
460 ;;
461 sysv4)
462 case $host_vendor in
463 sni)
464 hardcode_direct=yes # is this really true???
465 ;;
466 siemens)
467 hardcode_direct=no
468 ;;
469 motorola)
470 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
471 ;;
472 esac
473 ;;
474 sysv4.3*)
475 ;;
476 sysv4*MP*)
477 if test -d /usr/nec; then
478 ld_shlibs=yes
479 fi
480 ;;
481 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
482 ;;
483 sysv5* | sco3.2v5* | sco5v6*)
484 hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
485 hardcode_libdir_separator=':'
486 ;;
487 uts4*)
488 hardcode_libdir_flag_spec='-L$libdir'
489 ;;
490 *)
491 ld_shlibs=no
492 ;;
493 esac
494fi
495
496# Check dynamic linker characteristics
497# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER.
498# Unlike libtool.m4, here we don't care about _all_ names of the library, but
499# only about the one the linker finds when passed -lNAME. This is the last
500# element of library_names_spec in libtool.m4, or possibly two of them if the
501# linker has special search rules.
502library_names_spec= # the last element of library_names_spec in libtool.m4
503libname_spec='lib$name'
504case "$host_os" in
505 aix3*)
506 library_names_spec='$libname.a'
507 ;;
508 aix4* | aix5*)
509 library_names_spec='$libname$shrext'
510 ;;
511 amigaos*)
512 library_names_spec='$libname.a'
513 ;;
514 beos*)
515 library_names_spec='$libname$shrext'
516 ;;
517 bsdi[45]*)
518 library_names_spec='$libname$shrext'
519 ;;
520 cygwin* | mingw* | pw32*)
521 shrext=.dll
522 library_names_spec='$libname.dll.a $libname.lib'
523 ;;
524 darwin* | rhapsody*)
525 shrext=.dylib
526 library_names_spec='$libname$shrext'
527 ;;
528 dgux*)
529 library_names_spec='$libname$shrext'
530 ;;
531 freebsd1*)
532 ;;
533 freebsd* | dragonfly*)
534 case "$host_os" in
535 freebsd[123]*)
536 library_names_spec='$libname$shrext$versuffix' ;;
537 *)
538 library_names_spec='$libname$shrext' ;;
539 esac
540 ;;
541 gnu*)
542 library_names_spec='$libname$shrext'
543 ;;
544 hpux9* | hpux10* | hpux11*)
545 case $host_cpu in
546 ia64*)
547 shrext=.so
548 ;;
549 hppa*64*)
550 shrext=.sl
551 ;;
552 *)
553 shrext=.sl
554 ;;
555 esac
556 library_names_spec='$libname$shrext'
557 ;;
558 interix[3-9]*)
559 library_names_spec='$libname$shrext'
560 ;;
561 irix5* | irix6* | nonstopux*)
562 library_names_spec='$libname$shrext'
563 case "$host_os" in
564 irix5* | nonstopux*)
565 libsuff= shlibsuff=
566 ;;
567 *)
568 case $LD in
569 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
570 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
571 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
572 *) libsuff= shlibsuff= ;;
573 esac
574 ;;
575 esac
576 ;;
577 linux*oldld* | linux*aout* | linux*coff*)
578 ;;
579 linux* | k*bsd*-gnu)
580 library_names_spec='$libname$shrext'
581 ;;
582 knetbsd*-gnu)
583 library_names_spec='$libname$shrext'
584 ;;
585 netbsd*)
586 library_names_spec='$libname$shrext'
587 ;;
588 newsos6)
589 library_names_spec='$libname$shrext'
590 ;;
591 nto-qnx*)
592 library_names_spec='$libname$shrext'
593 ;;
594 openbsd*)
595 library_names_spec='$libname$shrext$versuffix'
596 ;;
597 os2*)
598 libname_spec='$name'
599 shrext=.dll
600 library_names_spec='$libname.a'
601 ;;
602 osf3* | osf4* | osf5*)
603 library_names_spec='$libname$shrext'
604 ;;
605 rdos*)
606 ;;
607 solaris*)
608 library_names_spec='$libname$shrext'
609 ;;
610 sunos4*)
611 library_names_spec='$libname$shrext$versuffix'
612 ;;
613 sysv4 | sysv4.3*)
614 library_names_spec='$libname$shrext'
615 ;;
616 sysv4*MP*)
617 library_names_spec='$libname$shrext'
618 ;;
619 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
620 library_names_spec='$libname$shrext'
621 ;;
622 uts4*)
623 library_names_spec='$libname$shrext'
624 ;;
625esac
626
627sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
628escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
629shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
630escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
631escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
632escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
633
634LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
635
636# How to pass a linker flag through the compiler.
637wl="$escaped_wl"
638
639# Static library suffix (normally "a").
640libext="$libext"
641
642# Shared library suffix (normally "so").
643shlibext="$shlibext"
644
645# Format of library name prefix.
646libname_spec="$escaped_libname_spec"
647
648# Library names that the linker finds when passed -lNAME.
649library_names_spec="$escaped_library_names_spec"
650
651# Flag to hardcode \$libdir into a binary during linking.
652# This must work even if \$libdir does not exist.
653hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
654
655# Whether we need a single -rpath flag with a separated argument.
656hardcode_libdir_separator="$hardcode_libdir_separator"
657
658# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
659# resulting binary.
660hardcode_direct="$hardcode_direct"
661
662# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
663# resulting binary.
664hardcode_minus_L="$hardcode_minus_L"
665
666EOF
diff --git a/configure.ac b/configure.ac
index 388f2b8..21902ed 100644
--- a/configure.ac
+++ b/configure.ac
@@ -84,12 +84,12 @@ AC_LIBTOOL_WIN32_DLL
84AC_PROG_LIBTOOL 84AC_PROG_LIBTOOL
85 85
86# GNU gettext support 86# GNU gettext support
87#AM_GNU_GETTEXT([external]) 87AM_GNU_GETTEXT([external])
88 88
89AC_SYZDEK_GIT_PACKAGE_VERSION 89AC_SYZDEK_GIT_PACKAGE_VERSION
90 90
91# Creates outputs 91# Creates outputs
92AC_CONFIG_FILES([Makefile]) 92AC_CONFIG_FILES([Makefile po/Makefile.in])
93AC_OUTPUT 93AC_OUTPUT
94 94
95# Show local config 95# Show local config
diff --git a/m4/gettext.m4 b/m4/gettext.m4
new file mode 100644
index 0000000..c9ae1f7
--- /dev/null
+++ b/m4/gettext.m4
@@ -0,0 +1,381 @@
1# gettext.m4 serial 60 (gettext-0.17)
2dnl Copyright (C) 1995-2007 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6dnl
7dnl This file can can be used in projects which are not available under
8dnl the GNU General Public License or the GNU Library General Public
9dnl License but which still want to provide support for the GNU gettext
10dnl functionality.
11dnl Please note that the actual code of the GNU gettext library is covered
12dnl by the GNU Library General Public License, and the rest of the GNU
13dnl gettext package package is covered by the GNU General Public License.
14dnl They are *not* in the public domain.
15
16dnl Authors:
17dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
18dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006.
19
20dnl Macro to add for using GNU gettext.
21
22dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
23dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
24dnl default (if it is not specified or empty) is 'no-libtool'.
25dnl INTLSYMBOL should be 'external' for packages with no intl directory,
26dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
27dnl If INTLSYMBOL is 'use-libtool', then a libtool library
28dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
29dnl depending on --{enable,disable}-{shared,static} and on the presence of
30dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
31dnl $(top_builddir)/intl/libintl.a will be created.
32dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
33dnl implementations (in libc or libintl) without the ngettext() function
34dnl will be ignored. If NEEDSYMBOL is specified and is
35dnl 'need-formatstring-macros', then GNU gettext implementations that don't
36dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
37dnl INTLDIR is used to find the intl libraries. If empty,
38dnl the value `$(top_builddir)/intl/' is used.
39dnl
40dnl The result of the configuration is one of three cases:
41dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
42dnl and used.
43dnl Catalog format: GNU --> install in $(datadir)
44dnl Catalog extension: .mo after installation, .gmo in source tree
45dnl 2) GNU gettext has been found in the system's C library.
46dnl Catalog format: GNU --> install in $(datadir)
47dnl Catalog extension: .mo after installation, .gmo in source tree
48dnl 3) No internationalization, always use English msgid.
49dnl Catalog format: none
50dnl Catalog extension: none
51dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
52dnl The use of .gmo is historical (it was needed to avoid overwriting the
53dnl GNU format catalogs when building on a platform with an X/Open gettext),
54dnl but we keep it in order not to force irrelevant filename changes on the
55dnl maintainers.
56dnl
57AC_DEFUN([AM_GNU_GETTEXT],
58[
59 dnl Argument checking.
60 ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
61 [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
62])])])])])
63 ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
64 [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
65])])])])
66 define([gt_included_intl],
67 ifelse([$1], [external],
68 ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
69 [yes]))
70 define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
71 gt_NEEDS_INIT
72 AM_GNU_GETTEXT_NEED([$2])
73
74 AC_REQUIRE([AM_PO_SUBDIRS])dnl
75 ifelse(gt_included_intl, yes, [
76 AC_REQUIRE([AM_INTL_SUBDIR])dnl
77 ])
78
79 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
80 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
81 AC_REQUIRE([AC_LIB_RPATH])
82
83 dnl Sometimes libintl requires libiconv, so first search for libiconv.
84 dnl Ideally we would do this search only after the
85 dnl if test "$USE_NLS" = "yes"; then
86 dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
87 dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
88 dnl the configure script would need to contain the same shell code
89 dnl again, outside any 'if'. There are two solutions:
90 dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
91 dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
92 dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
93 dnl documented, we avoid it.
94 ifelse(gt_included_intl, yes, , [
95 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
96 ])
97
98 dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
99 gt_INTL_MACOSX
100
101 dnl Set USE_NLS.
102 AC_REQUIRE([AM_NLS])
103
104 ifelse(gt_included_intl, yes, [
105 BUILD_INCLUDED_LIBINTL=no
106 USE_INCLUDED_LIBINTL=no
107 ])
108 LIBINTL=
109 LTLIBINTL=
110 POSUB=
111
112 dnl Add a version number to the cache macros.
113 case " $gt_needs " in
114 *" need-formatstring-macros "*) gt_api_version=3 ;;
115 *" need-ngettext "*) gt_api_version=2 ;;
116 *) gt_api_version=1 ;;
117 esac
118 gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
119 gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
120
121 dnl If we use NLS figure out what method
122 if test "$USE_NLS" = "yes"; then
123 gt_use_preinstalled_gnugettext=no
124 ifelse(gt_included_intl, yes, [
125 AC_MSG_CHECKING([whether included gettext is requested])
126 AC_ARG_WITH(included-gettext,
127 [ --with-included-gettext use the GNU gettext library included here],
128 nls_cv_force_use_gnu_gettext=$withval,
129 nls_cv_force_use_gnu_gettext=no)
130 AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
131
132 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
133 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
134 ])
135 dnl User does not insist on using GNU NLS library. Figure out what
136 dnl to use. If GNU gettext is available we use this. Else we have
137 dnl to fall back to GNU NLS library.
138
139 if test $gt_api_version -ge 3; then
140 gt_revision_test_code='
141#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
142#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
143#endif
144changequote(,)dnl
145typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
146changequote([,])dnl
147'
148 else
149 gt_revision_test_code=
150 fi
151 if test $gt_api_version -ge 2; then
152 gt_expression_test_code=' + * ngettext ("", "", 0)'
153 else
154 gt_expression_test_code=
155 fi
156
157 AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
158 [AC_TRY_LINK([#include <libintl.h>
159$gt_revision_test_code
160extern int _nl_msg_cat_cntr;
161extern int *_nl_domain_bindings;],
162 [bindtextdomain ("", "");
163return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings],
164 [eval "$gt_func_gnugettext_libc=yes"],
165 [eval "$gt_func_gnugettext_libc=no"])])
166
167 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
168 dnl Sometimes libintl requires libiconv, so first search for libiconv.
169 ifelse(gt_included_intl, yes, , [
170 AM_ICONV_LINK
171 ])
172 dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
173 dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
174 dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
175 dnl even if libiconv doesn't exist.
176 AC_LIB_LINKFLAGS_BODY([intl])
177 AC_CACHE_CHECK([for GNU gettext in libintl],
178 [$gt_func_gnugettext_libintl],
179 [gt_save_CPPFLAGS="$CPPFLAGS"
180 CPPFLAGS="$CPPFLAGS $INCINTL"
181 gt_save_LIBS="$LIBS"
182 LIBS="$LIBS $LIBINTL"
183 dnl Now see whether libintl exists and does not depend on libiconv.
184 AC_TRY_LINK([#include <libintl.h>
185$gt_revision_test_code
186extern int _nl_msg_cat_cntr;
187extern
188#ifdef __cplusplus
189"C"
190#endif
191const char *_nl_expand_alias (const char *);],
192 [bindtextdomain ("", "");
193return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
194 [eval "$gt_func_gnugettext_libintl=yes"],
195 [eval "$gt_func_gnugettext_libintl=no"])
196 dnl Now see whether libintl exists and depends on libiconv.
197 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
198 LIBS="$LIBS $LIBICONV"
199 AC_TRY_LINK([#include <libintl.h>
200$gt_revision_test_code
201extern int _nl_msg_cat_cntr;
202extern
203#ifdef __cplusplus
204"C"
205#endif
206const char *_nl_expand_alias (const char *);],
207 [bindtextdomain ("", "");
208return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
209 [LIBINTL="$LIBINTL $LIBICONV"
210 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
211 eval "$gt_func_gnugettext_libintl=yes"
212 ])
213 fi
214 CPPFLAGS="$gt_save_CPPFLAGS"
215 LIBS="$gt_save_LIBS"])
216 fi
217
218 dnl If an already present or preinstalled GNU gettext() is found,
219 dnl use it. But if this macro is used in GNU gettext, and GNU
220 dnl gettext is already preinstalled in libintl, we update this
221 dnl libintl. (Cf. the install rule in intl/Makefile.in.)
222 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
223 || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
224 && test "$PACKAGE" != gettext-runtime \
225 && test "$PACKAGE" != gettext-tools; }; then
226 gt_use_preinstalled_gnugettext=yes
227 else
228 dnl Reset the values set by searching for libintl.
229 LIBINTL=
230 LTLIBINTL=
231 INCINTL=
232 fi
233
234 ifelse(gt_included_intl, yes, [
235 if test "$gt_use_preinstalled_gnugettext" != "yes"; then
236 dnl GNU gettext is not found in the C library.
237 dnl Fall back on included GNU gettext library.
238 nls_cv_use_gnu_gettext=yes
239 fi
240 fi
241
242 if test "$nls_cv_use_gnu_gettext" = "yes"; then
243 dnl Mark actions used to generate GNU NLS library.
244 BUILD_INCLUDED_LIBINTL=yes
245 USE_INCLUDED_LIBINTL=yes
246 LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
247 LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
248 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
249 fi
250
251 CATOBJEXT=
252 if test "$gt_use_preinstalled_gnugettext" = "yes" \
253 || test "$nls_cv_use_gnu_gettext" = "yes"; then
254 dnl Mark actions to use GNU gettext tools.
255 CATOBJEXT=.gmo
256 fi
257 ])
258
259 if test -n "$INTL_MACOSX_LIBS"; then
260 if test "$gt_use_preinstalled_gnugettext" = "yes" \
261 || test "$nls_cv_use_gnu_gettext" = "yes"; then
262 dnl Some extra flags are needed during linking.
263 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
264 LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
265 fi
266 fi
267
268 if test "$gt_use_preinstalled_gnugettext" = "yes" \
269 || test "$nls_cv_use_gnu_gettext" = "yes"; then
270 AC_DEFINE(ENABLE_NLS, 1,
271 [Define to 1 if translation of program messages to the user's native language
272 is requested.])
273 else
274 USE_NLS=no
275 fi
276 fi
277
278 AC_MSG_CHECKING([whether to use NLS])
279 AC_MSG_RESULT([$USE_NLS])
280 if test "$USE_NLS" = "yes"; then
281 AC_MSG_CHECKING([where the gettext function comes from])
282 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
283 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
284 gt_source="external libintl"
285 else
286 gt_source="libc"
287 fi
288 else
289 gt_source="included intl directory"
290 fi
291 AC_MSG_RESULT([$gt_source])
292 fi
293
294 if test "$USE_NLS" = "yes"; then
295
296 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
297 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
298 AC_MSG_CHECKING([how to link with libintl])
299 AC_MSG_RESULT([$LIBINTL])
300 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
301 fi
302
303 dnl For backward compatibility. Some packages may be using this.
304 AC_DEFINE(HAVE_GETTEXT, 1,
305 [Define if the GNU gettext() function is already present or preinstalled.])
306 AC_DEFINE(HAVE_DCGETTEXT, 1,
307 [Define if the GNU dcgettext() function is already present or preinstalled.])
308 fi
309
310 dnl We need to process the po/ directory.
311 POSUB=po
312 fi
313
314 ifelse(gt_included_intl, yes, [
315 dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
316 dnl to 'yes' because some of the testsuite requires it.
317 if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
318 BUILD_INCLUDED_LIBINTL=yes
319 fi
320
321 dnl Make all variables we use known to autoconf.
322 AC_SUBST(BUILD_INCLUDED_LIBINTL)
323 AC_SUBST(USE_INCLUDED_LIBINTL)
324 AC_SUBST(CATOBJEXT)
325
326 dnl For backward compatibility. Some configure.ins may be using this.
327 nls_cv_header_intl=
328 nls_cv_header_libgt=
329
330 dnl For backward compatibility. Some Makefiles may be using this.
331 DATADIRNAME=share
332 AC_SUBST(DATADIRNAME)
333
334 dnl For backward compatibility. Some Makefiles may be using this.
335 INSTOBJEXT=.mo
336 AC_SUBST(INSTOBJEXT)
337
338 dnl For backward compatibility. Some Makefiles may be using this.
339 GENCAT=gencat
340 AC_SUBST(GENCAT)
341
342 dnl For backward compatibility. Some Makefiles may be using this.
343 INTLOBJS=
344 if test "$USE_INCLUDED_LIBINTL" = yes; then
345 INTLOBJS="\$(GETTOBJS)"
346 fi
347 AC_SUBST(INTLOBJS)
348
349 dnl Enable libtool support if the surrounding package wishes it.
350 INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
351 AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
352 ])
353
354 dnl For backward compatibility. Some Makefiles may be using this.
355 INTLLIBS="$LIBINTL"
356 AC_SUBST(INTLLIBS)
357
358 dnl Make all documented variables known to autoconf.
359 AC_SUBST(LIBINTL)
360 AC_SUBST(LTLIBINTL)
361 AC_SUBST(POSUB)
362])
363
364
365dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
366m4_define([gt_NEEDS_INIT],
367[
368 m4_divert_text([DEFAULTS], [gt_needs=])
369 m4_define([gt_NEEDS_INIT], [])
370])
371
372
373dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
374AC_DEFUN([AM_GNU_GETTEXT_NEED],
375[
376 m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
377])
378
379
380dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
381AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
diff --git a/m4/iconv.m4 b/m4/iconv.m4
new file mode 100644
index 0000000..66bc76f
--- /dev/null
+++ b/m4/iconv.m4
@@ -0,0 +1,180 @@
1# iconv.m4 serial AM6 (gettext-0.17)
2dnl Copyright (C) 2000-2002, 2007 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6
7dnl From Bruno Haible.
8
9AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
10[
11 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
12 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
13 AC_REQUIRE([AC_LIB_RPATH])
14
15 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
16 dnl accordingly.
17 AC_LIB_LINKFLAGS_BODY([iconv])
18])
19
20AC_DEFUN([AM_ICONV_LINK],
21[
22 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
23 dnl those with the standalone portable GNU libiconv installed).
24 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
25
26 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
27 dnl accordingly.
28 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
29
30 dnl Add $INCICONV to CPPFLAGS before performing the following checks,
31 dnl because if the user has installed libiconv and not disabled its use
32 dnl via --without-libiconv-prefix, he wants to use it. The first
33 dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
34 am_save_CPPFLAGS="$CPPFLAGS"
35 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
36
37 AC_CACHE_CHECK([for iconv], am_cv_func_iconv, [
38 am_cv_func_iconv="no, consider installing GNU libiconv"
39 am_cv_lib_iconv=no
40 AC_TRY_LINK([#include <stdlib.h>
41#include <iconv.h>],
42 [iconv_t cd = iconv_open("","");
43 iconv(cd,NULL,NULL,NULL,NULL);
44 iconv_close(cd);],
45 am_cv_func_iconv=yes)
46 if test "$am_cv_func_iconv" != yes; then
47 am_save_LIBS="$LIBS"
48 LIBS="$LIBS $LIBICONV"
49 AC_TRY_LINK([#include <stdlib.h>
50#include <iconv.h>],
51 [iconv_t cd = iconv_open("","");
52 iconv(cd,NULL,NULL,NULL,NULL);
53 iconv_close(cd);],
54 am_cv_lib_iconv=yes
55 am_cv_func_iconv=yes)
56 LIBS="$am_save_LIBS"
57 fi
58 ])
59 if test "$am_cv_func_iconv" = yes; then
60 AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [
61 dnl This tests against bugs in AIX 5.1 and HP-UX 11.11.
62 am_save_LIBS="$LIBS"
63 if test $am_cv_lib_iconv = yes; then
64 LIBS="$LIBS $LIBICONV"
65 fi
66 AC_TRY_RUN([
67#include <iconv.h>
68#include <string.h>
69int main ()
70{
71 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
72 returns. */
73 {
74 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
75 if (cd_utf8_to_88591 != (iconv_t)(-1))
76 {
77 static const char input[] = "\342\202\254"; /* EURO SIGN */
78 char buf[10];
79 const char *inptr = input;
80 size_t inbytesleft = strlen (input);
81 char *outptr = buf;
82 size_t outbytesleft = sizeof (buf);
83 size_t res = iconv (cd_utf8_to_88591,
84 (char **) &inptr, &inbytesleft,
85 &outptr, &outbytesleft);
86 if (res == 0)
87 return 1;
88 }
89 }
90#if 0 /* This bug could be worked around by the caller. */
91 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
92 {
93 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
94 if (cd_88591_to_utf8 != (iconv_t)(-1))
95 {
96 static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
97 char buf[50];
98 const char *inptr = input;
99 size_t inbytesleft = strlen (input);
100 char *outptr = buf;
101 size_t outbytesleft = sizeof (buf);
102 size_t res = iconv (cd_88591_to_utf8,
103 (char **) &inptr, &inbytesleft,
104 &outptr, &outbytesleft);
105 if ((int)res > 0)
106 return 1;
107 }
108 }
109#endif
110 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
111 provided. */
112 if (/* Try standardized names. */
113 iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
114 /* Try IRIX, OSF/1 names. */
115 && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
116 /* Try AIX names. */
117 && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
118 /* Try HP-UX names. */
119 && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
120 return 1;
121 return 0;
122}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
123 [case "$host_os" in
124 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
125 *) am_cv_func_iconv_works="guessing yes" ;;
126 esac])
127 LIBS="$am_save_LIBS"
128 ])
129 case "$am_cv_func_iconv_works" in
130 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
131 *) am_func_iconv=yes ;;
132 esac
133 else
134 am_func_iconv=no am_cv_lib_iconv=no
135 fi
136 if test "$am_func_iconv" = yes; then
137 AC_DEFINE(HAVE_ICONV, 1,
138 [Define if you have the iconv() function and it works.])
139 fi
140 if test "$am_cv_lib_iconv" = yes; then
141 AC_MSG_CHECKING([how to link with libiconv])
142 AC_MSG_RESULT([$LIBICONV])
143 else
144 dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
145 dnl either.
146 CPPFLAGS="$am_save_CPPFLAGS"
147 LIBICONV=
148 LTLIBICONV=
149 fi
150 AC_SUBST(LIBICONV)
151 AC_SUBST(LTLIBICONV)
152])
153
154AC_DEFUN([AM_ICONV],
155[
156 AM_ICONV_LINK
157 if test "$am_cv_func_iconv" = yes; then
158 AC_MSG_CHECKING([for iconv declaration])
159 AC_CACHE_VAL(am_cv_proto_iconv, [
160 AC_TRY_COMPILE([
161#include <stdlib.h>
162#include <iconv.h>
163extern
164#ifdef __cplusplus
165"C"
166#endif
167#if defined(__STDC__) || defined(__cplusplus)
168size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
169#else
170size_t iconv();
171#endif
172], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
173 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);"])
174 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
175 AC_MSG_RESULT([$]{ac_t:-
176 }[$]am_cv_proto_iconv)
177 AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
178 [Define as const if the declaration of iconv() needs const.])
179 fi
180])
diff --git a/m4/lib-ld.m4 b/m4/lib-ld.m4
new file mode 100644
index 0000000..96c4e2c
--- /dev/null
+++ b/m4/lib-ld.m4
@@ -0,0 +1,110 @@
1# lib-ld.m4 serial 3 (gettext-0.13)
2dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6
7dnl Subroutines of libtool.m4,
8dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
9dnl with libtool.m4.
10
11dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
12AC_DEFUN([AC_LIB_PROG_LD_GNU],
13[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
14[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
15case `$LD -v 2>&1 </dev/null` in
16*GNU* | *'with BFD'*)
17 acl_cv_prog_gnu_ld=yes ;;
18*)
19 acl_cv_prog_gnu_ld=no ;;
20esac])
21with_gnu_ld=$acl_cv_prog_gnu_ld
22])
23
24dnl From libtool-1.4. Sets the variable LD.
25AC_DEFUN([AC_LIB_PROG_LD],
26[AC_ARG_WITH(gnu-ld,
27[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
28test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
29AC_REQUIRE([AC_PROG_CC])dnl
30AC_REQUIRE([AC_CANONICAL_HOST])dnl
31# Prepare PATH_SEPARATOR.
32# The user is always right.
33if test "${PATH_SEPARATOR+set}" != set; then
34 echo "#! /bin/sh" >conf$$.sh
35 echo "exit 0" >>conf$$.sh
36 chmod +x conf$$.sh
37 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
38 PATH_SEPARATOR=';'
39 else
40 PATH_SEPARATOR=:
41 fi
42 rm -f conf$$.sh
43fi
44ac_prog=ld
45if test "$GCC" = yes; then
46 # Check if gcc -print-prog-name=ld gives a path.
47 AC_MSG_CHECKING([for ld used by GCC])
48 case $host in
49 *-*-mingw*)
50 # gcc leaves a trailing carriage return which upsets mingw
51 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
52 *)
53 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
54 esac
55 case $ac_prog in
56 # Accept absolute paths.
57 [[\\/]* | [A-Za-z]:[\\/]*)]
58 [re_direlt='/[^/][^/]*/\.\./']
59 # Canonicalize the path of ld
60 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
61 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
62 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
63 done
64 test -z "$LD" && LD="$ac_prog"
65 ;;
66 "")
67 # If it fails, then pretend we aren't using GCC.
68 ac_prog=ld
69 ;;
70 *)
71 # If it is relative, then search for the first ld in PATH.
72 with_gnu_ld=unknown
73 ;;
74 esac
75elif test "$with_gnu_ld" = yes; then
76 AC_MSG_CHECKING([for GNU ld])
77else
78 AC_MSG_CHECKING([for non-GNU ld])
79fi
80AC_CACHE_VAL(acl_cv_path_LD,
81[if test -z "$LD"; then
82 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
83 for ac_dir in $PATH; do
84 test -z "$ac_dir" && ac_dir=.
85 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
86 acl_cv_path_LD="$ac_dir/$ac_prog"
87 # Check to see if the program is GNU ld. I'd rather use --version,
88 # but apparently some GNU ld's only accept -v.
89 # Break only if it was the GNU/non-GNU ld that we prefer.
90 case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
91 *GNU* | *'with BFD'*)
92 test "$with_gnu_ld" != no && break ;;
93 *)
94 test "$with_gnu_ld" != yes && break ;;
95 esac
96 fi
97 done
98 IFS="$ac_save_ifs"
99else
100 acl_cv_path_LD="$LD" # Let the user override the test with a path.
101fi])
102LD="$acl_cv_path_LD"
103if test -n "$LD"; then
104 AC_MSG_RESULT($LD)
105else
106 AC_MSG_RESULT(no)
107fi
108test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
109AC_LIB_PROG_LD_GNU
110])
diff --git a/m4/lib-link.m4 b/m4/lib-link.m4
new file mode 100644
index 0000000..e3d26fc
--- /dev/null
+++ b/m4/lib-link.m4
@@ -0,0 +1,709 @@
1# lib-link.m4 serial 13 (gettext-0.17)
2dnl Copyright (C) 2001-2007 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6
7dnl From Bruno Haible.
8
9AC_PREREQ(2.54)
10
11dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
12dnl the libraries corresponding to explicit and implicit dependencies.
13dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
14dnl augments the CPPFLAGS variable.
15dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
16dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
17AC_DEFUN([AC_LIB_LINKFLAGS],
18[
19 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
20 AC_REQUIRE([AC_LIB_RPATH])
21 define([Name],[translit([$1],[./-], [___])])
22 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
23 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
24 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
25 AC_LIB_LINKFLAGS_BODY([$1], [$2])
26 ac_cv_lib[]Name[]_libs="$LIB[]NAME"
27 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
28 ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
29 ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
30 ])
31 LIB[]NAME="$ac_cv_lib[]Name[]_libs"
32 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
33 INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
34 LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
35 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
36 AC_SUBST([LIB]NAME)
37 AC_SUBST([LTLIB]NAME)
38 AC_SUBST([LIB]NAME[_PREFIX])
39 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
40 dnl results of this search when this library appears as a dependency.
41 HAVE_LIB[]NAME=yes
42 undefine([Name])
43 undefine([NAME])
44])
45
46dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
47dnl searches for libname and the libraries corresponding to explicit and
48dnl implicit dependencies, together with the specified include files and
49dnl the ability to compile and link the specified testcode. If found, it
50dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
51dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
52dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
53dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
54dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
55dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
56AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
57[
58 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
59 AC_REQUIRE([AC_LIB_RPATH])
60 define([Name],[translit([$1],[./-], [___])])
61 define([NAME],[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 LIBS="$LIBS $LIB[]NAME"
77 AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
78 LIBS="$ac_save_LIBS"
79 ])
80 if test "$ac_cv_lib[]Name" = yes; then
81 HAVE_LIB[]NAME=yes
82 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
83 AC_MSG_CHECKING([how to link with lib[]$1])
84 AC_MSG_RESULT([$LIB[]NAME])
85 else
86 HAVE_LIB[]NAME=no
87 dnl If $LIB[]NAME didn't lead to a usable library, we don't need
88 dnl $INC[]NAME either.
89 CPPFLAGS="$ac_save_CPPFLAGS"
90 LIB[]NAME=
91 LTLIB[]NAME=
92 LIB[]NAME[]_PREFIX=
93 fi
94 AC_SUBST([HAVE_LIB]NAME)
95 AC_SUBST([LIB]NAME)
96 AC_SUBST([LTLIB]NAME)
97 AC_SUBST([LIB]NAME[_PREFIX])
98 undefine([Name])
99 undefine([NAME])
100])
101
102dnl Determine the platform dependent parameters needed to use rpath:
103dnl acl_libext,
104dnl acl_shlibext,
105dnl acl_hardcode_libdir_flag_spec,
106dnl acl_hardcode_libdir_separator,
107dnl acl_hardcode_direct,
108dnl acl_hardcode_minus_L.
109AC_DEFUN([AC_LIB_RPATH],
110[
111 dnl Tell automake >= 1.10 to complain if config.rpath is missing.
112 m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
113 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
114 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
115 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
116 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
117 AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
118 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
119 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
120 . ./conftest.sh
121 rm -f ./conftest.sh
122 acl_cv_rpath=done
123 ])
124 wl="$acl_cv_wl"
125 acl_libext="$acl_cv_libext"
126 acl_shlibext="$acl_cv_shlibext"
127 acl_libname_spec="$acl_cv_libname_spec"
128 acl_library_names_spec="$acl_cv_library_names_spec"
129 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
130 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
131 acl_hardcode_direct="$acl_cv_hardcode_direct"
132 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
133 dnl Determine whether the user wants rpath handling at all.
134 AC_ARG_ENABLE(rpath,
135 [ --disable-rpath do not hardcode runtime library paths],
136 :, enable_rpath=yes)
137])
138
139dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
140dnl the libraries corresponding to explicit and implicit dependencies.
141dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
142dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
143dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
144AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
145[
146 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
147 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
148 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
149 dnl Autoconf >= 2.61 supports dots in --with options.
150 define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])])
151 dnl By default, look in $includedir and $libdir.
152 use_additional=yes
153 AC_LIB_WITH_FINAL_PREFIX([
154 eval additional_includedir=\"$includedir\"
155 eval additional_libdir=\"$libdir\"
156 ])
157 AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix],
158[ --with-lib]N_A_M_E[-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
159 --without-lib]N_A_M_E[-prefix don't search for lib$1 in includedir and libdir],
160[
161 if test "X$withval" = "Xno"; then
162 use_additional=no
163 else
164 if test "X$withval" = "X"; then
165 AC_LIB_WITH_FINAL_PREFIX([
166 eval additional_includedir=\"$includedir\"
167 eval additional_libdir=\"$libdir\"
168 ])
169 else
170 additional_includedir="$withval/include"
171 additional_libdir="$withval/$acl_libdirstem"
172 fi
173 fi
174])
175 dnl Search the library and its dependencies in $additional_libdir and
176 dnl $LDFLAGS. Using breadth-first-seach.
177 LIB[]NAME=
178 LTLIB[]NAME=
179 INC[]NAME=
180 LIB[]NAME[]_PREFIX=
181 rpathdirs=
182 ltrpathdirs=
183 names_already_handled=
184 names_next_round='$1 $2'
185 while test -n "$names_next_round"; do
186 names_this_round="$names_next_round"
187 names_next_round=
188 for name in $names_this_round; do
189 already_handled=
190 for n in $names_already_handled; do
191 if test "$n" = "$name"; then
192 already_handled=yes
193 break
194 fi
195 done
196 if test -z "$already_handled"; then
197 names_already_handled="$names_already_handled $name"
198 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
199 dnl or AC_LIB_HAVE_LINKFLAGS call.
200 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
201 eval value=\"\$HAVE_LIB$uppername\"
202 if test -n "$value"; then
203 if test "$value" = yes; then
204 eval value=\"\$LIB$uppername\"
205 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
206 eval value=\"\$LTLIB$uppername\"
207 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
208 else
209 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
210 dnl that this library doesn't exist. So just drop it.
211 :
212 fi
213 else
214 dnl Search the library lib$name in $additional_libdir and $LDFLAGS
215 dnl and the already constructed $LIBNAME/$LTLIBNAME.
216 found_dir=
217 found_la=
218 found_so=
219 found_a=
220 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
221 if test -n "$acl_shlibext"; then
222 shrext=".$acl_shlibext" # typically: shrext=.so
223 else
224 shrext=
225 fi
226 if test $use_additional = yes; then
227 dir="$additional_libdir"
228 dnl The same code as in the loop below:
229 dnl First look for a shared library.
230 if test -n "$acl_shlibext"; then
231 if test -f "$dir/$libname$shrext"; then
232 found_dir="$dir"
233 found_so="$dir/$libname$shrext"
234 else
235 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
236 ver=`(cd "$dir" && \
237 for f in "$libname$shrext".*; do echo "$f"; done \
238 | sed -e "s,^$libname$shrext\\\\.,," \
239 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
240 | sed 1q ) 2>/dev/null`
241 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
242 found_dir="$dir"
243 found_so="$dir/$libname$shrext.$ver"
244 fi
245 else
246 eval library_names=\"$acl_library_names_spec\"
247 for f in $library_names; do
248 if test -f "$dir/$f"; then
249 found_dir="$dir"
250 found_so="$dir/$f"
251 break
252 fi
253 done
254 fi
255 fi
256 fi
257 dnl Then look for a static library.
258 if test "X$found_dir" = "X"; then
259 if test -f "$dir/$libname.$acl_libext"; then
260 found_dir="$dir"
261 found_a="$dir/$libname.$acl_libext"
262 fi
263 fi
264 if test "X$found_dir" != "X"; then
265 if test -f "$dir/$libname.la"; then
266 found_la="$dir/$libname.la"
267 fi
268 fi
269 fi
270 if test "X$found_dir" = "X"; then
271 for x in $LDFLAGS $LTLIB[]NAME; do
272 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
273 case "$x" in
274 -L*)
275 dir=`echo "X$x" | sed -e 's/^X-L//'`
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 ;;
317 esac
318 if test "X$found_dir" != "X"; then
319 break
320 fi
321 done
322 fi
323 if test "X$found_dir" != "X"; then
324 dnl Found the library.
325 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
326 if test "X$found_so" != "X"; then
327 dnl Linking with a shared library. We attempt to hardcode its
328 dnl directory into the executable's runpath, unless it's the
329 dnl standard /usr/lib.
330 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
331 dnl No hardcoding is needed.
332 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
333 else
334 dnl Use an explicit option to hardcode DIR into the resulting
335 dnl binary.
336 dnl Potentially add DIR to ltrpathdirs.
337 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
338 haveit=
339 for x in $ltrpathdirs; do
340 if test "X$x" = "X$found_dir"; then
341 haveit=yes
342 break
343 fi
344 done
345 if test -z "$haveit"; then
346 ltrpathdirs="$ltrpathdirs $found_dir"
347 fi
348 dnl The hardcoding into $LIBNAME is system dependent.
349 if test "$acl_hardcode_direct" = yes; then
350 dnl Using DIR/libNAME.so during linking hardcodes DIR into the
351 dnl resulting binary.
352 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
353 else
354 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
355 dnl Use an explicit option to hardcode DIR into the resulting
356 dnl binary.
357 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
358 dnl Potentially add DIR to rpathdirs.
359 dnl The rpathdirs will be appended to $LIBNAME at the end.
360 haveit=
361 for x in $rpathdirs; do
362 if test "X$x" = "X$found_dir"; then
363 haveit=yes
364 break
365 fi
366 done
367 if test -z "$haveit"; then
368 rpathdirs="$rpathdirs $found_dir"
369 fi
370 else
371 dnl Rely on "-L$found_dir".
372 dnl But don't add it if it's already contained in the LDFLAGS
373 dnl or the already constructed $LIBNAME
374 haveit=
375 for x in $LDFLAGS $LIB[]NAME; do
376 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
377 if test "X$x" = "X-L$found_dir"; then
378 haveit=yes
379 break
380 fi
381 done
382 if test -z "$haveit"; then
383 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
384 fi
385 if test "$acl_hardcode_minus_L" != no; then
386 dnl FIXME: Not sure whether we should use
387 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
388 dnl here.
389 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
390 else
391 dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
392 dnl here, because this doesn't fit in flags passed to the
393 dnl compiler. So give up. No hardcoding. This affects only
394 dnl very old systems.
395 dnl FIXME: Not sure whether we should use
396 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
397 dnl here.
398 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
399 fi
400 fi
401 fi
402 fi
403 else
404 if test "X$found_a" != "X"; then
405 dnl Linking with a static library.
406 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
407 else
408 dnl We shouldn't come here, but anyway it's good to have a
409 dnl fallback.
410 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
411 fi
412 fi
413 dnl Assume the include files are nearby.
414 additional_includedir=
415 case "$found_dir" in
416 */$acl_libdirstem | */$acl_libdirstem/)
417 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
418 LIB[]NAME[]_PREFIX="$basedir"
419 additional_includedir="$basedir/include"
420 ;;
421 esac
422 if test "X$additional_includedir" != "X"; then
423 dnl Potentially add $additional_includedir to $INCNAME.
424 dnl But don't add it
425 dnl 1. if it's the standard /usr/include,
426 dnl 2. if it's /usr/local/include and we are using GCC on Linux,
427 dnl 3. if it's already present in $CPPFLAGS or the already
428 dnl constructed $INCNAME,
429 dnl 4. if it doesn't exist as a directory.
430 if test "X$additional_includedir" != "X/usr/include"; then
431 haveit=
432 if test "X$additional_includedir" = "X/usr/local/include"; then
433 if test -n "$GCC"; then
434 case $host_os in
435 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
436 esac
437 fi
438 fi
439 if test -z "$haveit"; then
440 for x in $CPPFLAGS $INC[]NAME; do
441 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
442 if test "X$x" = "X-I$additional_includedir"; then
443 haveit=yes
444 break
445 fi
446 done
447 if test -z "$haveit"; then
448 if test -d "$additional_includedir"; then
449 dnl Really add $additional_includedir to $INCNAME.
450 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
451 fi
452 fi
453 fi
454 fi
455 fi
456 dnl Look for dependencies.
457 if test -n "$found_la"; then
458 dnl Read the .la file. It defines the variables
459 dnl dlname, library_names, old_library, dependency_libs, current,
460 dnl age, revision, installed, dlopen, dlpreopen, libdir.
461 save_libdir="$libdir"
462 case "$found_la" in
463 */* | *\\*) . "$found_la" ;;
464 *) . "./$found_la" ;;
465 esac
466 libdir="$save_libdir"
467 dnl We use only dependency_libs.
468 for dep in $dependency_libs; do
469 case "$dep" in
470 -L*)
471 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
472 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
473 dnl But don't add it
474 dnl 1. if it's the standard /usr/lib,
475 dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
476 dnl 3. if it's already present in $LDFLAGS or the already
477 dnl constructed $LIBNAME,
478 dnl 4. if it doesn't exist as a directory.
479 if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
480 haveit=
481 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
482 if test -n "$GCC"; then
483 case $host_os in
484 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
485 esac
486 fi
487 fi
488 if test -z "$haveit"; then
489 haveit=
490 for x in $LDFLAGS $LIB[]NAME; do
491 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
492 if test "X$x" = "X-L$additional_libdir"; then
493 haveit=yes
494 break
495 fi
496 done
497 if test -z "$haveit"; then
498 if test -d "$additional_libdir"; then
499 dnl Really add $additional_libdir to $LIBNAME.
500 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
501 fi
502 fi
503 haveit=
504 for x in $LDFLAGS $LTLIB[]NAME; do
505 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
506 if test "X$x" = "X-L$additional_libdir"; then
507 haveit=yes
508 break
509 fi
510 done
511 if test -z "$haveit"; then
512 if test -d "$additional_libdir"; then
513 dnl Really add $additional_libdir to $LTLIBNAME.
514 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
515 fi
516 fi
517 fi
518 fi
519 ;;
520 -R*)
521 dir=`echo "X$dep" | sed -e 's/^X-R//'`
522 if test "$enable_rpath" != no; then
523 dnl Potentially add DIR to rpathdirs.
524 dnl The rpathdirs will be appended to $LIBNAME at the end.
525 haveit=
526 for x in $rpathdirs; do
527 if test "X$x" = "X$dir"; then
528 haveit=yes
529 break
530 fi
531 done
532 if test -z "$haveit"; then
533 rpathdirs="$rpathdirs $dir"
534 fi
535 dnl Potentially add DIR to ltrpathdirs.
536 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
537 haveit=
538 for x in $ltrpathdirs; do
539 if test "X$x" = "X$dir"; then
540 haveit=yes
541 break
542 fi
543 done
544 if test -z "$haveit"; then
545 ltrpathdirs="$ltrpathdirs $dir"
546 fi
547 fi
548 ;;
549 -l*)
550 dnl Handle this in the next round.
551 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
552 ;;
553 *.la)
554 dnl Handle this in the next round. Throw away the .la's
555 dnl directory; it is already contained in a preceding -L
556 dnl option.
557 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
558 ;;
559 *)
560 dnl Most likely an immediate library name.
561 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
562 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
563 ;;
564 esac
565 done
566 fi
567 else
568 dnl Didn't find the library; assume it is in the system directories
569 dnl known to the linker and runtime loader. (All the system
570 dnl directories known to the linker should also be known to the
571 dnl runtime loader, otherwise the system is severely misconfigured.)
572 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
573 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
574 fi
575 fi
576 fi
577 done
578 done
579 if test "X$rpathdirs" != "X"; then
580 if test -n "$acl_hardcode_libdir_separator"; then
581 dnl Weird platform: only the last -rpath option counts, the user must
582 dnl pass all path elements in one option. We can arrange that for a
583 dnl single library, but not when more than one $LIBNAMEs are used.
584 alldirs=
585 for found_dir in $rpathdirs; do
586 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
587 done
588 dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
589 acl_save_libdir="$libdir"
590 libdir="$alldirs"
591 eval flag=\"$acl_hardcode_libdir_flag_spec\"
592 libdir="$acl_save_libdir"
593 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
594 else
595 dnl The -rpath options are cumulative.
596 for found_dir in $rpathdirs; do
597 acl_save_libdir="$libdir"
598 libdir="$found_dir"
599 eval flag=\"$acl_hardcode_libdir_flag_spec\"
600 libdir="$acl_save_libdir"
601 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
602 done
603 fi
604 fi
605 if test "X$ltrpathdirs" != "X"; then
606 dnl When using libtool, the option that works for both libraries and
607 dnl executables is -R. The -R options are cumulative.
608 for found_dir in $ltrpathdirs; do
609 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
610 done
611 fi
612])
613
614dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
615dnl unless already present in VAR.
616dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
617dnl contains two or three consecutive elements that belong together.
618AC_DEFUN([AC_LIB_APPENDTOVAR],
619[
620 for element in [$2]; do
621 haveit=
622 for x in $[$1]; do
623 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
624 if test "X$x" = "X$element"; then
625 haveit=yes
626 break
627 fi
628 done
629 if test -z "$haveit"; then
630 [$1]="${[$1]}${[$1]:+ }$element"
631 fi
632 done
633])
634
635dnl For those cases where a variable contains several -L and -l options
636dnl referring to unknown libraries and directories, this macro determines the
637dnl necessary additional linker options for the runtime path.
638dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
639dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
640dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
641dnl otherwise linking without libtool is assumed.
642AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
643[
644 AC_REQUIRE([AC_LIB_RPATH])
645 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
646 $1=
647 if test "$enable_rpath" != no; then
648 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
649 dnl Use an explicit option to hardcode directories into the resulting
650 dnl binary.
651 rpathdirs=
652 next=
653 for opt in $2; do
654 if test -n "$next"; then
655 dir="$next"
656 dnl No need to hardcode the standard /usr/lib.
657 if test "X$dir" != "X/usr/$acl_libdirstem"; then
658 rpathdirs="$rpathdirs $dir"
659 fi
660 next=
661 else
662 case $opt in
663 -L) next=yes ;;
664 -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
665 dnl No need to hardcode the standard /usr/lib.
666 if test "X$dir" != "X/usr/$acl_libdirstem"; then
667 rpathdirs="$rpathdirs $dir"
668 fi
669 next= ;;
670 *) next= ;;
671 esac
672 fi
673 done
674 if test "X$rpathdirs" != "X"; then
675 if test -n ""$3""; then
676 dnl libtool is used for linking. Use -R options.
677 for dir in $rpathdirs; do
678 $1="${$1}${$1:+ }-R$dir"
679 done
680 else
681 dnl The linker is used for linking directly.
682 if test -n "$acl_hardcode_libdir_separator"; then
683 dnl Weird platform: only the last -rpath option counts, the user
684 dnl must pass all path elements in one option.
685 alldirs=
686 for dir in $rpathdirs; do
687 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
688 done
689 acl_save_libdir="$libdir"
690 libdir="$alldirs"
691 eval flag=\"$acl_hardcode_libdir_flag_spec\"
692 libdir="$acl_save_libdir"
693 $1="$flag"
694 else
695 dnl The -rpath options are cumulative.
696 for dir in $rpathdirs; do
697 acl_save_libdir="$libdir"
698 libdir="$dir"
699 eval flag=\"$acl_hardcode_libdir_flag_spec\"
700 libdir="$acl_save_libdir"
701 $1="${$1}${$1:+ }$flag"
702 done
703 fi
704 fi
705 fi
706 fi
707 fi
708 AC_SUBST([$1])
709])
diff --git a/m4/lib-prefix.m4 b/m4/lib-prefix.m4
new file mode 100644
index 0000000..a8684e1
--- /dev/null
+++ b/m4/lib-prefix.m4
@@ -0,0 +1,185 @@
1# lib-prefix.m4 serial 5 (gettext-0.15)
2dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6
7dnl From Bruno Haible.
8
9dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
10dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
11dnl require excessive bracketing.
12ifdef([AC_HELP_STRING],
13[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
14[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
15
16dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
17dnl to access previously installed libraries. The basic assumption is that
18dnl a user will want packages to use other packages he previously installed
19dnl with the same --prefix option.
20dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
21dnl libraries, but is otherwise very convenient.
22AC_DEFUN([AC_LIB_PREFIX],
23[
24 AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
25 AC_REQUIRE([AC_PROG_CC])
26 AC_REQUIRE([AC_CANONICAL_HOST])
27 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
28 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
29 dnl By default, look in $includedir and $libdir.
30 use_additional=yes
31 AC_LIB_WITH_FINAL_PREFIX([
32 eval additional_includedir=\"$includedir\"
33 eval additional_libdir=\"$libdir\"
34 ])
35 AC_LIB_ARG_WITH([lib-prefix],
36[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
37 --without-lib-prefix don't search for libraries in includedir and libdir],
38[
39 if test "X$withval" = "Xno"; then
40 use_additional=no
41 else
42 if test "X$withval" = "X"; then
43 AC_LIB_WITH_FINAL_PREFIX([
44 eval additional_includedir=\"$includedir\"
45 eval additional_libdir=\"$libdir\"
46 ])
47 else
48 additional_includedir="$withval/include"
49 additional_libdir="$withval/$acl_libdirstem"
50 fi
51 fi
52])
53 if test $use_additional = yes; then
54 dnl Potentially add $additional_includedir to $CPPFLAGS.
55 dnl But don't add it
56 dnl 1. if it's the standard /usr/include,
57 dnl 2. if it's already present in $CPPFLAGS,
58 dnl 3. if it's /usr/local/include and we are using GCC on Linux,
59 dnl 4. if it doesn't exist as a directory.
60 if test "X$additional_includedir" != "X/usr/include"; then
61 haveit=
62 for x in $CPPFLAGS; do
63 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
64 if test "X$x" = "X-I$additional_includedir"; then
65 haveit=yes
66 break
67 fi
68 done
69 if test -z "$haveit"; then
70 if test "X$additional_includedir" = "X/usr/local/include"; then
71 if test -n "$GCC"; then
72 case $host_os in
73 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
74 esac
75 fi
76 fi
77 if test -z "$haveit"; then
78 if test -d "$additional_includedir"; then
79 dnl Really add $additional_includedir to $CPPFLAGS.
80 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
81 fi
82 fi
83 fi
84 fi
85 dnl Potentially add $additional_libdir to $LDFLAGS.
86 dnl But don't add it
87 dnl 1. if it's the standard /usr/lib,
88 dnl 2. if it's already present in $LDFLAGS,
89 dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
90 dnl 4. if it doesn't exist as a directory.
91 if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
92 haveit=
93 for x in $LDFLAGS; do
94 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
95 if test "X$x" = "X-L$additional_libdir"; then
96 haveit=yes
97 break
98 fi
99 done
100 if test -z "$haveit"; then
101 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
102 if test -n "$GCC"; then
103 case $host_os in
104 linux*) haveit=yes;;
105 esac
106 fi
107 fi
108 if test -z "$haveit"; then
109 if test -d "$additional_libdir"; then
110 dnl Really add $additional_libdir to $LDFLAGS.
111 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
112 fi
113 fi
114 fi
115 fi
116 fi
117])
118
119dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
120dnl acl_final_exec_prefix, containing the values to which $prefix and
121dnl $exec_prefix will expand at the end of the configure script.
122AC_DEFUN([AC_LIB_PREPARE_PREFIX],
123[
124 dnl Unfortunately, prefix and exec_prefix get only finally determined
125 dnl at the end of configure.
126 if test "X$prefix" = "XNONE"; then
127 acl_final_prefix="$ac_default_prefix"
128 else
129 acl_final_prefix="$prefix"
130 fi
131 if test "X$exec_prefix" = "XNONE"; then
132 acl_final_exec_prefix='${prefix}'
133 else
134 acl_final_exec_prefix="$exec_prefix"
135 fi
136 acl_save_prefix="$prefix"
137 prefix="$acl_final_prefix"
138 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
139 prefix="$acl_save_prefix"
140])
141
142dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
143dnl variables prefix and exec_prefix bound to the values they will have
144dnl at the end of the configure script.
145AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
146[
147 acl_save_prefix="$prefix"
148 prefix="$acl_final_prefix"
149 acl_save_exec_prefix="$exec_prefix"
150 exec_prefix="$acl_final_exec_prefix"
151 $1
152 exec_prefix="$acl_save_exec_prefix"
153 prefix="$acl_save_prefix"
154])
155
156dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing
157dnl the basename of the libdir, either "lib" or "lib64".
158AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
159[
160 dnl There is no formal standard regarding lib and lib64. The current
161 dnl practice is that on a system supporting 32-bit and 64-bit instruction
162 dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit
163 dnl libraries go under $prefix/lib. We determine the compiler's default
164 dnl mode by looking at the compiler's library search path. If at least
165 dnl of its elements ends in /lib64 or points to a directory whose absolute
166 dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the
167 dnl default, namely "lib".
168 acl_libdirstem=lib
169 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
170 if test -n "$searchpath"; then
171 acl_save_IFS="${IFS= }"; IFS=":"
172 for searchdir in $searchpath; do
173 if test -d "$searchdir"; then
174 case "$searchdir" in
175 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
176 *) searchdir=`cd "$searchdir" && pwd`
177 case "$searchdir" in
178 */lib64 ) acl_libdirstem=lib64 ;;
179 esac ;;
180 esac
181 fi
182 done
183 IFS="$acl_save_IFS"
184 fi
185])
diff --git a/m4/nls.m4 b/m4/nls.m4
new file mode 100644
index 0000000..7967cc2
--- /dev/null
+++ b/m4/nls.m4
@@ -0,0 +1,31 @@
1# nls.m4 serial 3 (gettext-0.15)
2dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6dnl
7dnl This file can can be used in projects which are not available under
8dnl the GNU General Public License or the GNU Library General Public
9dnl License but which still want to provide support for the GNU gettext
10dnl functionality.
11dnl Please note that the actual code of the GNU gettext library is covered
12dnl by the GNU Library General Public License, and the rest of the GNU
13dnl gettext package package is covered by the GNU General Public License.
14dnl They are *not* in the public domain.
15
16dnl Authors:
17dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
18dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
19
20AC_PREREQ(2.50)
21
22AC_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])
diff --git a/m4/po.m4 b/m4/po.m4
new file mode 100644
index 0000000..0734762
--- /dev/null
+++ b/m4/po.m4
@@ -0,0 +1,449 @@
1# po.m4 serial 15 (gettext-0.17)
2dnl Copyright (C) 1995-2007 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6dnl
7dnl This file can can be used in projects which are not available under
8dnl the GNU General Public License or the GNU Library General Public
9dnl License but which still want to provide support for the GNU gettext
10dnl functionality.
11dnl Please note that the actual code of the GNU gettext library is covered
12dnl by the GNU Library General Public License, and the rest of the GNU
13dnl gettext package package is covered by the GNU General Public License.
14dnl They are *not* in the public domain.
15
16dnl Authors:
17dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
18dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
19
20AC_PREREQ(2.50)
21
22dnl Checks for all prerequisites of the po subdirectory.
23AC_DEFUN([AM_PO_SUBDIRS],
24[
25 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
26 AC_REQUIRE([AC_PROG_INSTALL])dnl
27 AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
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.17])
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.
47changequote(,)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
52changequote([,])dnl
53 AC_SUBST([MSGFMT_015])
54changequote(,)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
59changequote([,])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.
73changequote(,)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
78changequote([,])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 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
122 POMAKEFILEDEPS="POTFILES.in"
123 # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
124 # on $ac_dir but don't depend on user-specified configuration
125 # parameters.
126 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
127 # The LINGUAS file contains the set of available languages.
128 if test -n "$OBSOLETE_ALL_LINGUAS"; then
129 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
130 fi
131 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
132 # Hide the ALL_LINGUAS assigment from automake < 1.5.
133 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
134 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
135 else
136 # The set of available languages was given in configure.in.
137 # Hide the ALL_LINGUAS assigment from automake < 1.5.
138 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
139 fi
140 # Compute POFILES
141 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
142 # Compute UPDATEPOFILES
143 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
144 # Compute DUMMYPOFILES
145 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
146 # Compute GMOFILES
147 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
148 case "$ac_given_srcdir" in
149 .) srcdirpre= ;;
150 *) srcdirpre='$(srcdir)/' ;;
151 esac
152 POFILES=
153 UPDATEPOFILES=
154 DUMMYPOFILES=
155 GMOFILES=
156 for lang in $ALL_LINGUAS; do
157 POFILES="$POFILES $srcdirpre$lang.po"
158 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
159 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
160 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
161 done
162 # CATALOGS depends on both $ac_dir and the user's LINGUAS
163 # environment variable.
164 INST_LINGUAS=
165 if test -n "$ALL_LINGUAS"; then
166 for presentlang in $ALL_LINGUAS; do
167 useit=no
168 if test "%UNSET%" != "$LINGUAS"; then
169 desiredlanguages="$LINGUAS"
170 else
171 desiredlanguages="$ALL_LINGUAS"
172 fi
173 for desiredlang in $desiredlanguages; do
174 # Use the presentlang catalog if desiredlang is
175 # a. equal to presentlang, or
176 # b. a variant of presentlang (because in this case,
177 # presentlang can be used as a fallback for messages
178 # which are not translated in the desiredlang catalog).
179 case "$desiredlang" in
180 "$presentlang"*) useit=yes;;
181 esac
182 done
183 if test $useit = yes; then
184 INST_LINGUAS="$INST_LINGUAS $presentlang"
185 fi
186 done
187 fi
188 CATALOGS=
189 if test -n "$INST_LINGUAS"; then
190 for lang in $INST_LINGUAS; do
191 CATALOGS="$CATALOGS $lang.gmo"
192 done
193 fi
194 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
195 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"
196 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
197 if test -f "$f"; then
198 case "$f" in
199 *.orig | *.bak | *~) ;;
200 *) cat "$f" >> "$ac_dir/Makefile" ;;
201 esac
202 fi
203 done
204 fi
205 ;;
206 esac
207 done]],
208 [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
209 # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
210 # from automake < 1.5.
211 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
212 # Capture the value of LINGUAS because we need it to compute CATALOGS.
213 LINGUAS="${LINGUAS-%UNSET%}"
214 ])
215])
216
217dnl Postprocesses a Makefile in a directory containing PO files.
218AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
219[
220 # When this code is run, in config.status, two variables have already been
221 # set:
222 # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
223 # - LINGUAS is the value of the environment variable LINGUAS at configure
224 # time.
225
226changequote(,)dnl
227 # Adjust a relative srcdir.
228 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
229 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
230 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
231 # In autoconf-2.13 it is called $ac_given_srcdir.
232 # In autoconf-2.50 it is called $srcdir.
233 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
234 case "$ac_given_srcdir" in
235 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
236 /*) top_srcdir="$ac_given_srcdir" ;;
237 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
238 esac
239
240 # Find a way to echo strings without interpreting backslash.
241 if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
242 gt_echo='echo'
243 else
244 if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
245 gt_echo='printf %s\n'
246 else
247 echo_func () {
248 cat <<EOT
249$*
250EOT
251 }
252 gt_echo='echo_func'
253 fi
254 fi
255
256 # A sed script that extracts the value of VARIABLE from a Makefile.
257 sed_x_variable='
258# Test if the hold space is empty.
259x
260s/P/P/
261x
262ta
263# Yes it was empty. Look if we have the expected variable definition.
264/^[ ]*VARIABLE[ ]*=/{
265 # Seen the first line of the variable definition.
266 s/^[ ]*VARIABLE[ ]*=//
267 ba
268}
269bd
270:a
271# Here we are processing a line from the variable definition.
272# Remove comment, more precisely replace it with a space.
273s/#.*$/ /
274# See if the line ends in a backslash.
275tb
276:b
277s/\\$//
278# Print the line, without the trailing backslash.
279p
280tc
281# There was no trailing backslash. The end of the variable definition is
282# reached. Clear the hold space.
283s/^.*$//
284x
285bd
286:c
287# A trailing backslash means that the variable definition continues in the
288# next line. Put a nonempty string into the hold space to indicate this.
289s/^.*$/P/
290x
291:d
292'
293changequote([,])dnl
294
295 # Set POTFILES to the value of the Makefile variable POTFILES.
296 sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
297 POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
298 # Compute POTFILES_DEPS as
299 # $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
300 POTFILES_DEPS=
301 for file in $POTFILES; do
302 POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
303 done
304 POMAKEFILEDEPS=""
305
306 if test -n "$OBSOLETE_ALL_LINGUAS"; then
307 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
308 fi
309 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
310 # The LINGUAS file contains the set of available languages.
311 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
312 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
313 else
314 # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
315 sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
316 ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
317 fi
318 # Hide the ALL_LINGUAS assigment from automake < 1.5.
319 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
320 # Compute POFILES
321 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
322 # Compute UPDATEPOFILES
323 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
324 # Compute DUMMYPOFILES
325 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
326 # Compute GMOFILES
327 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
328 # Compute PROPERTIESFILES
329 # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
330 # Compute CLASSFILES
331 # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
332 # Compute QMFILES
333 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
334 # Compute MSGFILES
335 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
336 # Compute RESOURCESDLLFILES
337 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
338 case "$ac_given_srcdir" in
339 .) srcdirpre= ;;
340 *) srcdirpre='$(srcdir)/' ;;
341 esac
342 POFILES=
343 UPDATEPOFILES=
344 DUMMYPOFILES=
345 GMOFILES=
346 PROPERTIESFILES=
347 CLASSFILES=
348 QMFILES=
349 MSGFILES=
350 RESOURCESDLLFILES=
351 for lang in $ALL_LINGUAS; do
352 POFILES="$POFILES $srcdirpre$lang.po"
353 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
354 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
355 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
356 PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
357 CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
358 QMFILES="$QMFILES $srcdirpre$lang.qm"
359 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
360 MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
361 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/'`
362 RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
363 done
364 # CATALOGS depends on both $ac_dir and the user's LINGUAS
365 # environment variable.
366 INST_LINGUAS=
367 if test -n "$ALL_LINGUAS"; then
368 for presentlang in $ALL_LINGUAS; do
369 useit=no
370 if test "%UNSET%" != "$LINGUAS"; then
371 desiredlanguages="$LINGUAS"
372 else
373 desiredlanguages="$ALL_LINGUAS"
374 fi
375 for desiredlang in $desiredlanguages; do
376 # Use the presentlang catalog if desiredlang is
377 # a. equal to presentlang, or
378 # b. a variant of presentlang (because in this case,
379 # presentlang can be used as a fallback for messages
380 # which are not translated in the desiredlang catalog).
381 case "$desiredlang" in
382 "$presentlang"*) useit=yes;;
383 esac
384 done
385 if test $useit = yes; then
386 INST_LINGUAS="$INST_LINGUAS $presentlang"
387 fi
388 done
389 fi
390 CATALOGS=
391 JAVACATALOGS=
392 QTCATALOGS=
393 TCLCATALOGS=
394 CSHARPCATALOGS=
395 if test -n "$INST_LINGUAS"; then
396 for lang in $INST_LINGUAS; do
397 CATALOGS="$CATALOGS $lang.gmo"
398 JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
399 QTCATALOGS="$QTCATALOGS $lang.qm"
400 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
401 TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
402 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/'`
403 CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
404 done
405 fi
406
407 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"
408 if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
409 # Add dependencies that cannot be formulated as a simple suffix rule.
410 for lang in $ALL_LINGUAS; do
411 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
412 cat >> "$ac_file.tmp" <<EOF
413$frobbedlang.msg: $lang.po
414 @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
415 \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
416EOF
417 done
418 fi
419 if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
420 # Add dependencies that cannot be formulated as a simple suffix rule.
421 for lang in $ALL_LINGUAS; do
422 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/'`
423 cat >> "$ac_file.tmp" <<EOF
424$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
425 @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
426 \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
427EOF
428 done
429 fi
430 if test -n "$POMAKEFILEDEPS"; then
431 cat >> "$ac_file.tmp" <<EOF
432Makefile: $POMAKEFILEDEPS
433EOF
434 fi
435 mv "$ac_file.tmp" "$ac_file"
436])
437
438dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
439AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
440[
441 XGETTEXT_EXTRA_OPTIONS=
442])
443
444dnl Registers an option to be passed to xgettext in the po subdirectory.
445AC_DEFUN([AM_XGETTEXT_OPTION],
446[
447 AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
448 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
449])
diff --git a/m4/progtest.m4 b/m4/progtest.m4
new file mode 100644
index 0000000..a56365c
--- /dev/null
+++ b/m4/progtest.m4
@@ -0,0 +1,92 @@
1# progtest.m4 serial 4 (gettext-0.14.2)
2dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6dnl
7dnl This file can can be used in projects which are not available under
8dnl the GNU General Public License or the GNU Library General Public
9dnl License but which still want to provide support for the GNU gettext
10dnl functionality.
11dnl Please note that the actual code of the GNU gettext library is covered
12dnl by the GNU Library General Public License, and the rest of the GNU
13dnl gettext package package is covered by the GNU General Public License.
14dnl They are *not* in the public domain.
15
16dnl Authors:
17dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
18
19AC_PREREQ(2.50)
20
21# Search path for a program which passes the given test.
22
23dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
24dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
25AC_DEFUN([AM_PATH_PROG_WITH_TEST],
26[
27# Prepare PATH_SEPARATOR.
28# The user is always right.
29if test "${PATH_SEPARATOR+set}" != set; then
30 echo "#! /bin/sh" >conf$$.sh
31 echo "exit 0" >>conf$$.sh
32 chmod +x conf$$.sh
33 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
34 PATH_SEPARATOR=';'
35 else
36 PATH_SEPARATOR=:
37 fi
38 rm -f conf$$.sh
39fi
40
41# Find out how to test for executable files. Don't use a zero-byte file,
42# as systems may use methods other than mode bits to determine executability.
43cat >conf$$.file <<_ASEOF
44#! /bin/sh
45exit 0
46_ASEOF
47chmod +x conf$$.file
48if test -x conf$$.file >/dev/null 2>&1; then
49 ac_executable_p="test -x"
50else
51 ac_executable_p="test -f"
52fi
53rm -f conf$$.file
54
55# Extract the first word of "$2", so it can be a program name with args.
56set dummy $2; ac_word=[$]2
57AC_MSG_CHECKING([for $ac_word])
58AC_CACHE_VAL(ac_cv_path_$1,
59[case "[$]$1" in
60 [[\\/]]* | ?:[[\\/]]*)
61 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
62 ;;
63 *)
64 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
65 for ac_dir in ifelse([$5], , $PATH, [$5]); do
66 IFS="$ac_save_IFS"
67 test -z "$ac_dir" && ac_dir=.
68 for ac_exec_ext in '' $ac_executable_extensions; do
69 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
70 echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
71 if [$3]; then
72 ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
73 break 2
74 fi
75 fi
76 done
77 done
78 IFS="$ac_save_IFS"
79dnl If no 4th arg is given, leave the cache variable unset,
80dnl so AC_PATH_PROGS will keep looking.
81ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
82])dnl
83 ;;
84esac])dnl
85$1="$ac_cv_path_$1"
86if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
87 AC_MSG_RESULT([$]$1)
88else
89 AC_MSG_RESULT(no)
90fi
91AC_SUBST($1)dnl
92])
diff --git a/po/ChangeLog b/po/ChangeLog
new file mode 100644
index 0000000..7947a4c
--- /dev/null
+++ b/po/ChangeLog
@@ -0,0 +1,12 @@
12009-02-07 gettextize <bug-gnu-gettext@gnu.org>
2
3 * Makefile.in.in: New file, from gettext-0.17.
4 * Rules-quot: New file, from gettext-0.17.
5 * boldquot.sed: New file, from gettext-0.17.
6 * en@boldquot.header: New file, from gettext-0.17.
7 * en@quot.header: New file, from gettext-0.17.
8 * insert-header.sin: New file, from gettext-0.17.
9 * quot.sed: New file, from gettext-0.17.
10 * remove-potcdate.sin: New file, from gettext-0.17.
11 * POTFILES.in: New file.
12
diff --git a/po/Makefile.in.in b/po/Makefile.in.in
new file mode 100644
index 0000000..fecf500
--- /dev/null
+++ b/po/Makefile.in.in
@@ -0,0 +1,429 @@
1# Makefile for PO directory in any package using GNU gettext.
2# Copyright (C) 1995-1997, 2000-2007 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
3#
4# This file can be copied and used freely without restrictions. It can
5# be used in projects which are not available under the GNU General Public
6# License but which still want to provide support for the GNU gettext
7# functionality.
8# Please note that the actual code of GNU gettext is covered by the GNU
9# General Public License and is *not* in the public domain.
10#
11# Origin: gettext-0.17
12GETTEXT_MACRO_VERSION = 0.17
13
14PACKAGE = @PACKAGE@
15VERSION = @VERSION@
16PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
17
18SHELL = /bin/sh
19@SET_MAKE@
20
21srcdir = @srcdir@
22top_srcdir = @top_srcdir@
23VPATH = @srcdir@
24
25prefix = @prefix@
26exec_prefix = @exec_prefix@
27datarootdir = @datarootdir@
28datadir = @datadir@
29localedir = @localedir@
30gettextsrcdir = $(datadir)/gettext/po
31
32INSTALL = @INSTALL@
33INSTALL_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.
42mkinstalldirs = $(SHELL) @install_sh@ -d
43install_sh = $(SHELL) @install_sh@
44MKDIR_P = @MKDIR_P@
45mkdir_p = @mkdir_p@
46
47GMSGFMT_ = @GMSGFMT@
48GMSGFMT_no = @GMSGFMT@
49GMSGFMT_yes = @GMSGFMT_015@
50GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT))
51MSGFMT_ = @MSGFMT@
52MSGFMT_no = @MSGFMT@
53MSGFMT_yes = @MSGFMT_015@
54MSGFMT = $(MSGFMT_$(USE_MSGCTXT))
55XGETTEXT_ = @XGETTEXT@
56XGETTEXT_no = @XGETTEXT@
57XGETTEXT_yes = @XGETTEXT_015@
58XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT))
59MSGMERGE = msgmerge
60MSGMERGE_UPDATE = @MSGMERGE@ --update
61MSGINIT = msginit
62MSGCONV = msgconv
63MSGFILTER = msgfilter
64
65POFILES = @POFILES@
66GMOFILES = @GMOFILES@
67UPDATEPOFILES = @UPDATEPOFILES@
68DUMMYPOFILES = @DUMMYPOFILES@
69DISTFILES.common = Makefile.in.in remove-potcdate.sin \
70$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
71DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
72$(POFILES) $(GMOFILES) \
73$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
74
75POTFILES = \
76
77CATALOGS = @CATALOGS@
78
79# Makevars gets inserted here. (Don't remove this line!)
80
81.SUFFIXES:
82.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
83
84.po.mo:
85 @echo "$(MSGFMT) -c -o $@ $<"; \
86 $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
87
88.po.gmo:
89 @lang=`echo $* | sed -e 's,.*/,,'`; \
90 test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
91 echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \
92 cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
93
94.sin.sed:
95 sed -e '/^#/d' $< > t-$@
96 mv t-$@ $@
97
98
99all: check-macro-version all-@USE_NLS@
100
101all-yes: stamp-po
102all-no:
103
104# Ensure that the gettext macros and this Makefile.in.in are in sync.
105check-macro-version:
106 @test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \
107 || { 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; \
108 exit 1; \
109 }
110
111# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
112# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
113# we don't want to bother translators with empty POT files). We assume that
114# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
115# In this case, stamp-po is a nop (i.e. a phony target).
116
117# stamp-po is a timestamp denoting the last time at which the CATALOGS have
118# been loosely updated. Its purpose is that when a developer or translator
119# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
120# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
121# invocations of "make" will do nothing. This timestamp would not be necessary
122# if updating the $(CATALOGS) would always touch them; however, the rule for
123# $(POFILES) has been designed to not touch files that don't need to be
124# changed.
125stamp-po: $(srcdir)/$(DOMAIN).pot
126 test ! -f $(srcdir)/$(DOMAIN).pot || \
127 test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
128 @test ! -f $(srcdir)/$(DOMAIN).pot || { \
129 echo "touch stamp-po" && \
130 echo timestamp > stamp-poT && \
131 mv stamp-poT stamp-po; \
132 }
133
134# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
135# otherwise packages like GCC can not be built if only parts of the source
136# have been downloaded.
137
138# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
139# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
140$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
141 if LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null | grep -v 'libtool:' >/dev/null; then \
142 package_gnu='GNU '; \
143 else \
144 package_gnu=''; \
145 fi; \
146 if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
147 msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
148 else \
149 msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
150 fi; \
151 case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
152 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \
153 $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
154 --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
155 --files-from=$(srcdir)/POTFILES.in \
156 --copyright-holder='$(COPYRIGHT_HOLDER)' \
157 --msgid-bugs-address="$$msgid_bugs_address" \
158 ;; \
159 *) \
160 $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
161 --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
162 --files-from=$(srcdir)/POTFILES.in \
163 --copyright-holder='$(COPYRIGHT_HOLDER)' \
164 --package-name="$${package_gnu}@PACKAGE@" \
165 --package-version='@VERSION@' \
166 --msgid-bugs-address="$$msgid_bugs_address" \
167 ;; \
168 esac
169 test ! -f $(DOMAIN).po || { \
170 if test -f $(srcdir)/$(DOMAIN).pot; then \
171 sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
172 sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
173 if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
174 rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
175 else \
176 rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
177 mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
178 fi; \
179 else \
180 mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
181 fi; \
182 }
183
184# This rule has no dependencies: we don't need to update $(DOMAIN).pot at
185# every "make" invocation, only create it when it is missing.
186# Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
187$(srcdir)/$(DOMAIN).pot:
188 $(MAKE) $(DOMAIN).pot-update
189
190# This target rebuilds a PO file if $(DOMAIN).pot has changed.
191# Note that a PO file is not touched if it doesn't need to be changed.
192$(POFILES): $(srcdir)/$(DOMAIN).pot
193 @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
194 if test -f "$(srcdir)/$${lang}.po"; then \
195 test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
196 echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
197 cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \
198 else \
199 $(MAKE) $${lang}.po-create; \
200 fi
201
202
203install: install-exec install-data
204install-exec:
205install-data: install-data-@USE_NLS@
206 if test "$(PACKAGE)" = "gettext-tools"; then \
207 $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
208 for file in $(DISTFILES.common) Makevars.template; do \
209 $(INSTALL_DATA) $(srcdir)/$$file \
210 $(DESTDIR)$(gettextsrcdir)/$$file; \
211 done; \
212 for file in Makevars; do \
213 rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
214 done; \
215 else \
216 : ; \
217 fi
218install-data-no: all
219install-data-yes: all
220 $(mkdir_p) $(DESTDIR)$(datadir)
221 @catalogs='$(CATALOGS)'; \
222 for cat in $$catalogs; do \
223 cat=`basename $$cat`; \
224 lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
225 dir=$(localedir)/$$lang/LC_MESSAGES; \
226 $(mkdir_p) $(DESTDIR)$$dir; \
227 if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
228 $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
229 echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
230 for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
231 if test -n "$$lc"; then \
232 if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
233 link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
234 mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
235 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
236 (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
237 for file in *; do \
238 if test -f $$file; then \
239 ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
240 fi; \
241 done); \
242 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
243 else \
244 if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
245 :; \
246 else \
247 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
248 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
249 fi; \
250 fi; \
251 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
252 ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
253 ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
254 cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
255 echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
256 fi; \
257 done; \
258 done
259
260install-strip: install
261
262installdirs: installdirs-exec installdirs-data
263installdirs-exec:
264installdirs-data: installdirs-data-@USE_NLS@
265 if test "$(PACKAGE)" = "gettext-tools"; then \
266 $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
267 else \
268 : ; \
269 fi
270installdirs-data-no:
271installdirs-data-yes:
272 $(mkdir_p) $(DESTDIR)$(datadir)
273 @catalogs='$(CATALOGS)'; \
274 for cat in $$catalogs; do \
275 cat=`basename $$cat`; \
276 lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
277 dir=$(localedir)/$$lang/LC_MESSAGES; \
278 $(mkdir_p) $(DESTDIR)$$dir; \
279 for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
280 if test -n "$$lc"; then \
281 if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
282 link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
283 mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
284 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
285 (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
286 for file in *; do \
287 if test -f $$file; then \
288 ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
289 fi; \
290 done); \
291 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
292 else \
293 if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
294 :; \
295 else \
296 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
297 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
298 fi; \
299 fi; \
300 fi; \
301 done; \
302 done
303
304# Define this as empty until I found a useful application.
305installcheck:
306
307uninstall: uninstall-exec uninstall-data
308uninstall-exec:
309uninstall-data: uninstall-data-@USE_NLS@
310 if test "$(PACKAGE)" = "gettext-tools"; then \
311 for file in $(DISTFILES.common) Makevars.template; do \
312 rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
313 done; \
314 else \
315 : ; \
316 fi
317uninstall-data-no:
318uninstall-data-yes:
319 catalogs='$(CATALOGS)'; \
320 for cat in $$catalogs; do \
321 cat=`basename $$cat`; \
322 lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
323 for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
324 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
325 done; \
326 done
327
328check: all
329
330info dvi ps pdf html tags TAGS ctags CTAGS ID:
331
332mostlyclean:
333 rm -f remove-potcdate.sed
334 rm -f stamp-poT
335 rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
336 rm -fr *.o
337
338clean: mostlyclean
339
340distclean: clean
341 rm -f Makefile Makefile.in POTFILES *.mo
342
343maintainer-clean: distclean
344 @echo "This command is intended for maintainers to use;"
345 @echo "it deletes files that may require special tools to rebuild."
346 rm -f stamp-po $(GMOFILES)
347
348distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
349dist distdir:
350 $(MAKE) update-po
351 @$(MAKE) dist2
352# This is a separate target because 'update-po' must be executed before.
353dist2: stamp-po $(DISTFILES)
354 dists="$(DISTFILES)"; \
355 if test "$(PACKAGE)" = "gettext-tools"; then \
356 dists="$$dists Makevars.template"; \
357 fi; \
358 if test -f $(srcdir)/$(DOMAIN).pot; then \
359 dists="$$dists $(DOMAIN).pot stamp-po"; \
360 fi; \
361 if test -f $(srcdir)/ChangeLog; then \
362 dists="$$dists ChangeLog"; \
363 fi; \
364 for i in 0 1 2 3 4 5 6 7 8 9; do \
365 if test -f $(srcdir)/ChangeLog.$$i; then \
366 dists="$$dists ChangeLog.$$i"; \
367 fi; \
368 done; \
369 if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
370 for file in $$dists; do \
371 if test -f $$file; then \
372 cp -p $$file $(distdir) || exit 1; \
373 else \
374 cp -p $(srcdir)/$$file $(distdir) || exit 1; \
375 fi; \
376 done
377
378update-po: Makefile
379 $(MAKE) $(DOMAIN).pot-update
380 test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
381 $(MAKE) update-gmo
382
383# General rule for creating PO files.
384
385.nop.po-create:
386 @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
387 echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
388 exit 1
389
390# General rule for updating PO files.
391
392.nop.po-update:
393 @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
394 if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \
395 tmpdir=`pwd`; \
396 echo "$$lang:"; \
397 test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
398 echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
399 cd $(srcdir); \
400 if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \
401 if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
402 rm -f $$tmpdir/$$lang.new.po; \
403 else \
404 if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
405 :; \
406 else \
407 echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
408 exit 1; \
409 fi; \
410 fi; \
411 else \
412 echo "msgmerge for $$lang.po failed!" 1>&2; \
413 rm -f $$tmpdir/$$lang.new.po; \
414 fi
415
416$(DUMMYPOFILES):
417
418update-gmo: Makefile $(GMOFILES)
419 @:
420
421Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@
422 cd $(top_builddir) \
423 && $(SHELL) ./config.status $(subdir)/$@.in po-directories
424
425force:
426
427# Tell versions [3.59,3.63) of GNU make not to export all variables.
428# Otherwise a system limit (for SysV at least) may be exceeded.
429.NOEXPORT:
diff --git a/po/Makevars b/po/Makevars
new file mode 100644
index 0000000..32692ab
--- /dev/null
+++ b/po/Makevars
@@ -0,0 +1,41 @@
1# Makefile variables for PO directory in any package using GNU gettext.
2
3# Usually the message domain is the same as the package name.
4DOMAIN = $(PACKAGE)
5
6# These two variables depend on the location of this directory.
7subdir = po
8top_builddir = ..
9
10# These options get passed to xgettext.
11XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
12
13# This is the copyright holder that gets inserted into the header of the
14# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
15# package. (Note that the msgstr strings, extracted from the package's
16# sources, belong to the copyright holder of the package.) Translators are
17# expected to transfer the copyright for their translations to this person
18# or entity, or to disclaim their copyright. The empty string stands for
19# the public domain; in this case the translators are expected to disclaim
20# their copyright.
21COPYRIGHT_HOLDER = Free Software Foundation, Inc.
22
23# This is the email address or URL to which the translators shall report
24# bugs in the untranslated strings:
25# - Strings which are not entire sentences, see the maintainer guidelines
26# in the GNU gettext documentation, section 'Preparing Strings'.
27# - Strings which use unclear terms or require additional context to be
28# understood.
29# - Strings which make invalid assumptions about notation of date, time or
30# money.
31# - Pluralisation problems.
32# - Incorrect English spelling.
33# - Incorrect formatting.
34# It can be your email address, or a mailing list address where translators
35# can write to without being subscribed, or the URL of a web page through
36# which the translators can contact you.
37MSGID_BUGS_ADDRESS =
38
39# This is the list of locale categories, beyond LC_MESSAGES, for which the
40# message catalogs shall be used. It is usually empty.
41EXTRA_LOCALE_CATEGORIES =
diff --git a/po/Makevars.template b/po/Makevars.template
new file mode 100644
index 0000000..32692ab
--- /dev/null
+++ b/po/Makevars.template
@@ -0,0 +1,41 @@
1# Makefile variables for PO directory in any package using GNU gettext.
2
3# Usually the message domain is the same as the package name.
4DOMAIN = $(PACKAGE)
5
6# These two variables depend on the location of this directory.
7subdir = po
8top_builddir = ..
9
10# These options get passed to xgettext.
11XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
12
13# This is the copyright holder that gets inserted into the header of the
14# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
15# package. (Note that the msgstr strings, extracted from the package's
16# sources, belong to the copyright holder of the package.) Translators are
17# expected to transfer the copyright for their translations to this person
18# or entity, or to disclaim their copyright. The empty string stands for
19# the public domain; in this case the translators are expected to disclaim
20# their copyright.
21COPYRIGHT_HOLDER = Free Software Foundation, Inc.
22
23# This is the email address or URL to which the translators shall report
24# bugs in the untranslated strings:
25# - Strings which are not entire sentences, see the maintainer guidelines
26# in the GNU gettext documentation, section 'Preparing Strings'.
27# - Strings which use unclear terms or require additional context to be
28# understood.
29# - Strings which make invalid assumptions about notation of date, time or
30# money.
31# - Pluralisation problems.
32# - Incorrect English spelling.
33# - Incorrect formatting.
34# It can be your email address, or a mailing list address where translators
35# can write to without being subscribed, or the URL of a web page through
36# which the translators can contact you.
37MSGID_BUGS_ADDRESS =
38
39# This is the list of locale categories, beyond LC_MESSAGES, for which the
40# message catalogs shall be used. It is usually empty.
41EXTRA_LOCALE_CATEGORIES =
diff --git a/po/POTFILES.in b/po/POTFILES.in
new file mode 100644
index 0000000..61e722e
--- /dev/null
+++ b/po/POTFILES.in
@@ -0,0 +1,2 @@
1# List of source files which contain translatable strings.
2src/codetagger.c
diff --git a/po/Rules-quot b/po/Rules-quot
new file mode 100644
index 0000000..9c2a995
--- /dev/null
+++ b/po/Rules-quot
@@ -0,0 +1,47 @@
1# Special Makefile rules for English message catalogs with quotation marks.
2
3DISTFILES.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
7en@quot.po-create:
8 $(MAKE) en@quot.po-update
9en@boldquot.po-create:
10 $(MAKE) en@boldquot.po-update
11
12en@quot.po-update: en@quot.po-update-en
13en@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"; 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 $$ll -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \
24 if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
25 rm -f $$tmpdir/$$lang.new.po; \
26 else \
27 if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
28 :; \
29 else \
30 echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
31 exit 1; \
32 fi; \
33 fi; \
34 else \
35 echo "creation of $$lang.po failed!" 1>&2; \
36 rm -f $$tmpdir/$$lang.new.po; \
37 fi
38
39en@quot.insert-header: insert-header.sin
40 sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header
41
42en@boldquot.insert-header: insert-header.sin
43 sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header
44
45mostlyclean: mostlyclean-quot
46mostlyclean-quot:
47 rm -f *.insert-header
diff --git a/po/boldquot.sed b/po/boldquot.sed
new file mode 100644
index 0000000..4b937aa
--- /dev/null
+++ b/po/boldquot.sed
@@ -0,0 +1,10 @@
1s/"\([^"]*\)"/“\1”/g
2s/`\([^`']*\)'/‘\1’/g
3s/ '\([^`']*\)' / ‘\1’ /g
4s/ '\([^`']*\)'$/ ‘\1’/g
5s/^'\([^`']*\)' /‘\1’ /g
6s/“”/""/g
7s/“/“/g
8s/”/”/g
9s/‘/‘/g
10s/’/’/g
diff --git a/po/dmstools.pot b/po/dmstools.pot
new file mode 100644
index 0000000..8a6a3d5
--- /dev/null
+++ b/po/dmstools.pot
@@ -0,0 +1,185 @@
1# SOME DESCRIPTIVE TITLE.
2# Copyright (C) YEAR Free Software Foundation, Inc.
3# This file is distributed under the same license as the PACKAGE package.
4# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5#
6#, fuzzy
7msgid ""
8msgstr ""
9"Project-Id-Version: dmstools 0.0.5.16.g71c0\n"
10"Report-Msgid-Bugs-To: david@syzdek.net\n"
11"POT-Creation-Date: 2009-02-07 18:21-0900\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"
15"MIME-Version: 1.0\n"
16"Content-Type: text/plain; charset=CHARSET\n"
17"Content-Transfer-Encoding: 8bit\n"
18
19#: src/codetagger.c:328 src/codetagger.c:1032
20msgid " compiling regular expression\n"
21msgstr ""
22
23#: src/codetagger.c:341 src/codetagger.c:673
24#, c-format
25msgid " compiled regular expression \"%s\"\n"
26msgstr ""
27
28#: src/codetagger.c:347
29msgid " expanding tags\n"
30msgstr ""
31
32#: src/codetagger.c:367
33#, c-format
34msgid " inserting tag \"%s\" (line %i)\n"
35msgstr ""
36
37#: src/codetagger.c:382
38#, c-format
39msgid "%s: missing end @%sEND@ in %s\n"
40msgstr ""
41
42#: src/codetagger.c:559
43#, c-format
44msgid " retrieving tag \"%s\"\n"
45msgstr ""
46
47#: src/codetagger.c:565
48#, c-format
49msgid ": %s: %i: unknown tag \"%s\"\n"
50msgstr ""
51
52#: src/codetagger.c:599
53#, c-format
54msgid " freeing tag \"%s\"\n"
55msgstr ""
56
57#: src/codetagger.c:602
58msgid " freeing unknown tag\n"
59msgstr ""
60
61#: src/codetagger.c:626
62msgid "freeing tag index\n"
63msgstr ""
64
65#: src/codetagger.c:662
66msgid " compiling regular expression for tags\n"
67msgstr ""
68
69#: src/codetagger.c:676
70#, c-format
71msgid "creating tag index from \"%s\"\n"
72msgstr ""
73
74#: src/codetagger.c:695
75msgid " freeing file buffer\n"
76msgstr ""
77
78#: src/codetagger.c:697
79msgid " freeing regular expressions\n"
80msgstr ""
81
82#: src/codetagger.c:719
83#, c-format
84msgid "processing file \"%s\"\n"
85msgstr ""
86
87#: src/codetagger.c:722
88msgid " inspecting file\n"
89msgstr ""
90
91#: src/codetagger.c:730
92msgid " opening file\n"
93msgstr ""
94
95#: src/codetagger.c:738
96msgid " allocating memory for file buffer\n"
97msgstr ""
98
99#: src/codetagger.c:747
100msgid " reading file\n"
101msgstr ""
102
103#: src/codetagger.c:757
104msgid " closing file\n"
105msgstr ""
106
107#: src/codetagger.c:761
108msgid " analyzing file contents\n"
109msgstr ""
110
111#: src/codetagger.c:773
112msgid " allocating memory for file index\n"
113msgstr ""
114
115#: src/codetagger.c:783
116msgid " indexing file's contents\n"
117msgstr ""
118
119#: src/codetagger.c:875
120#, c-format
121msgid "Try `%s --help' for more information.\n"
122msgstr ""
123
124#: src/codetagger.c:878
125#, c-format
126msgid ""
127"%s: unrecognized option `--%c'\n"
128"Try `%s --help' for more information.\n"
129msgstr ""
130
131#: src/codetagger.c:894
132#, c-format
133msgid ""
134"%s: missing required option `-f'\n"
135"Try `%s --help' for more information.\n"
136msgstr ""
137
138#: src/codetagger.c:906
139#, c-format
140msgid ": no tag definitions were found in \"%s\"\n"
141msgstr ""
142
143#. TRANSLATORS: The following strings provide usage for command. These
144#. strings are displayed if the program is passed `--help' on the command
145#. line. The two strings referenced are: PROGRAM_NAME, and
146#. PACKAGE_BUGREPORT
147#: src/codetagger.c:929
148#, c-format
149msgid ""
150"Usage: %s [OPTIONS] files\n"
151" -f file file containing tags\n"
152" -h, --help print this help and exit\n"
153" -l str left enclosing string for tags\n"
154" -r str right enclosing string for tags\n"
155" -t, --test show what would be done\n"
156" -v, --verbose print verbose messages\n"
157" -V, --version print version number and exit\n"
158"\n"
159"Report bugs to <%s>.\n"
160msgstr ""
161
162#. TRANSLATORS: The following strings provide version and copyright
163#. information if the program is passed --version on the command line.
164#. The three strings referenced are: PROGRAM_NAME, PACKAGE_NAME,
165#. PACKAGE_VERSION.
166#: src/codetagger.c:952
167#, c-format
168msgid ""
169"%s (%s) %s\n"
170"Written by David M. Syzdek.\n"
171"\n"
172"%s\n"
173"This is free software; see the source for copying conditions. There is NO\n"
174"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
175msgstr ""
176
177#: src/codetagger.c:996
178#, c-format
179msgid " indexing tag \"%s\"\n"
180msgstr ""
181
182#: src/codetagger.c:1007 src/codetagger.c:1015 src/codetagger.c:1026
183#, c-format
184msgid ": out of virtual memory\n"
185msgstr ""
diff --git a/po/en@boldquot.header b/po/en@boldquot.header
new file mode 100644
index 0000000..fedb6a0
--- /dev/null
+++ b/po/en@boldquot.header
@@ -0,0 +1,25 @@
1# All this catalog "translates" are quotation characters.
2# The msgids must be ASCII and therefore cannot contain real quotation
3# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
4# and double quote (0x22). These substitutes look strange; see
5# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
6#
7# This catalog translates grave accent (0x60) and apostrophe (0x27) to
8# left single quotation mark (U+2018) and right single quotation mark (U+2019).
9# It also translates pairs of apostrophe (0x27) to
10# left single quotation mark (U+2018) and right single quotation mark (U+2019)
11# and pairs of quotation mark (0x22) to
12# left double quotation mark (U+201C) and right double quotation mark (U+201D).
13#
14# When output to an UTF-8 terminal, the quotation characters appear perfectly.
15# When output to an ISO-8859-1 terminal, the single quotation marks are
16# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
17# grave/acute accent (by libiconv), and the double quotation marks are
18# transliterated to 0x22.
19# When output to an ASCII terminal, the single quotation marks are
20# transliterated to apostrophes, and the double quotation marks are
21# transliterated to 0x22.
22#
23# This catalog furthermore displays the text between the quotation marks in
24# bold face, assuming the VT100/XTerm escape sequences.
25#
diff --git a/po/en@quot.header b/po/en@quot.header
new file mode 100644
index 0000000..a9647fc
--- /dev/null
+++ b/po/en@quot.header
@@ -0,0 +1,22 @@
1# All this catalog "translates" are quotation characters.
2# The msgids must be ASCII and therefore cannot contain real quotation
3# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
4# and double quote (0x22). These substitutes look strange; see
5# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
6#
7# This catalog translates grave accent (0x60) and apostrophe (0x27) to
8# left single quotation mark (U+2018) and right single quotation mark (U+2019).
9# It also translates pairs of apostrophe (0x27) to
10# left single quotation mark (U+2018) and right single quotation mark (U+2019)
11# and pairs of quotation mark (0x22) to
12# left double quotation mark (U+201C) and right double quotation mark (U+201D).
13#
14# When output to an UTF-8 terminal, the quotation characters appear perfectly.
15# When output to an ISO-8859-1 terminal, the single quotation marks are
16# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
17# grave/acute accent (by libiconv), and the double quotation marks are
18# transliterated to 0x22.
19# When output to an ASCII terminal, the single quotation marks are
20# transliterated to apostrophes, and the double quotation marks are
21# transliterated to 0x22.
22#
diff --git a/po/insert-header.sin b/po/insert-header.sin
new file mode 100644
index 0000000..b26de01
--- /dev/null
+++ b/po/insert-header.sin
@@ -0,0 +1,23 @@
1# Sed script that inserts the file called HEADER before the header entry.
2#
3# At each occurrence of a line starting with "msgid ", we execute the following
4# commands. At the first occurrence, insert the file. At the following
5# occurrences, do nothing. The distinction between the first and the following
6# occurrences is achieved by looking at the hold space.
7/^msgid /{
8x
9# Test if the hold space is empty.
10s/m/m/
11ta
12# Yes it was empty. First occurrence. Read the file.
13r HEADER
14# Output the file's contents by reading the next line. But don't lose the
15# current line while doing this.
16g
17N
18bb
19:a
20# The hold space was nonempty. Following occurrences. Do nothing.
21x
22:b
23}
diff --git a/po/quot.sed b/po/quot.sed
new file mode 100644
index 0000000..0122c46
--- /dev/null
+++ b/po/quot.sed
@@ -0,0 +1,6 @@
1s/"\([^"]*\)"/“\1”/g
2s/`\([^`']*\)'/‘\1’/g
3s/ '\([^`']*\)' / ‘\1’ /g
4s/ '\([^`']*\)'$/ ‘\1’/g
5s/^'\([^`']*\)' /‘\1’ /g
6s/“”/""/g
diff --git a/po/remove-potcdate.sin b/po/remove-potcdate.sin
new file mode 100644
index 0000000..2436c49
--- /dev/null
+++ b/po/remove-potcdate.sin
@@ -0,0 +1,19 @@
1# Sed script that remove the POT-Creation-Date line in the header entry
2# from a POT file.
3#
4# The distinction between the first and the following occurrences of the
5# pattern is achieved by looking at the hold space.
6/^"POT-Creation-Date: .*"$/{
7x
8# Test if the hold space is empty.
9s/P/P/
10ta
11# Yes it was empty. First occurrence. Remove the line.
12g
13d
14bb
15:a
16# The hold space was nonempty. Following occurrences. Do nothing.
17x
18:b
19}
diff --git a/src/codetagger.c b/src/codetagger.c
index ca8f0ef..fd3de3d 100644
--- a/src/codetagger.c
+++ b/src/codetagger.c
@@ -84,6 +84,26 @@
84 84
85/////////////////// 85///////////////////
86// // 86// //
87// i18l Support //
88// //
89///////////////////
90
91#ifdef HAVE_GETTEXT
92# include <gettext.h>
93# include <libintl.h>
94# define _(String) gettext (String)
95# define gettext_noop(String) String
96# define N_(String) gettext_noop (String)
97#else
98# define _(String) (String)
99# define N_(String) String
100# define textdomain(Domain)
101# define bindtextdomain(Package, Directory)
102#endif
103
104
105///////////////////
106// //
87// Definitions // 107// Definitions //
88// // 108// //
89/////////////////// 109///////////////////
@@ -305,7 +325,7 @@ int expand_tags(const char * filename, Config * cnf)
305 }; 325 };
306 326
307 /* compiles regex used to locate tags */ 327 /* compiles regex used to locate tags */
308 debug_printf(5, " compiling regular expression\n"); 328 debug_printf(5, _(" compiling regular expression\n"));
309 strncat(regstr, "(.*)", STR_LEN); 329 strncat(regstr, "(.*)", STR_LEN);
310 escape_string(regstr, cnf->leftTagString, STR_LEN); 330 escape_string(regstr, cnf->leftTagString, STR_LEN);
311 strncat(regstr, "([_[:blank:][:alnum:]]+)START", STR_LEN); 331 strncat(regstr, "([_[:blank:][:alnum:]]+)START", STR_LEN);
@@ -318,13 +338,13 @@ int expand_tags(const char * filename, Config * cnf)
318 free_filedata(data); 338 free_filedata(data);
319 return(0); 339 return(0);
320 }; 340 };
321 debug_printf(8, " compiled regular expression \"%s\"\n", regstr); 341 debug_printf(8, _(" compiled regular expression \"%s\"\n"), regstr);
322 342
323 /* counts lines in data */ 343 /* counts lines in data */
324 for(data_len = 0; data[data_len]; data_len++); 344 for(data_len = 0; data[data_len]; data_len++);
325 345
326 /* loops through file */ 346 /* loops through file */
327 debug_printf(5, " expanding tags\n"); 347 debug_printf(5, _(" expanding tags\n"));
328 for(data_pos = 0; data_pos < data_len; data_pos++) 348 for(data_pos = 0; data_pos < data_len; data_pos++)
329 { 349 {
330 /* copies the old file into the new file */ 350 /* copies the old file into the new file */
@@ -344,7 +364,7 @@ int expand_tags(const char * filename, Config * cnf)
344 if ((tag = find_tag(tagName, cnf->tagList, filename, data_pos+1))) 364 if ((tag = find_tag(tagName, cnf->tagList, filename, data_pos+1)))
345 { 365 {
346 /* writes contents of the tag */ 366 /* writes contents of the tag */
347 debug_printf(3, " inserting tag \"%s\" (line %i)\n", tagName, data_pos); 367 debug_printf(3, _(" inserting tag \"%s\" (line %i)\n"), tagName, data_pos);
348 for(tag_pos = 0; tag->contents[tag_pos]; tag_pos++) 368 for(tag_pos = 0; tag->contents[tag_pos]; tag_pos++)
349 file_printf(fdout, "%s%s\n", margin, tag->contents[tag_pos]); 369 file_printf(fdout, "%s%s\n", margin, tag->contents[tag_pos]);
350 370
@@ -359,7 +379,7 @@ int expand_tags(const char * filename, Config * cnf)
359 /* exits with error if end tag is not found */ 379 /* exits with error if end tag is not found */
360 if (err) 380 if (err)
361 { 381 {
362 fprintf(stderr, "%s: missing end @%sEND@ in %s\n", PROGRAM_NAME, tagName, filename); 382 fprintf(stderr, _("%s: missing end @%sEND@ in %s\n"), PROGRAM_NAME, tagName, filename);
363 file_link(fdout, NULL, tmpfile); 383 file_link(fdout, NULL, tmpfile);
364 free_filedata(data); 384 free_filedata(data);
365 return(-1); 385 return(-1);
@@ -536,13 +556,13 @@ TagData * find_tag(const char * tagName, TagData ** tagList,
536 if (!(fileName)) 556 if (!(fileName))
537 return(NULL); 557 return(NULL);
538 558
539 debug_printf(5, " retrieving tag \"%s\"\n", tagName); 559 debug_printf(5, _(" retrieving tag \"%s\"\n"), tagName);
540 560
541 for(i = 0; tagList[i]; i++) 561 for(i = 0; tagList[i]; i++)
542 if (!(strcasecmp(tagName, tagList[i]->name))) 562 if (!(strcasecmp(tagName, tagList[i]->name)))
543 return(tagList[i]); 563 return(tagList[i]);
544 564
545 debug_printf(1, PROGRAM_NAME ": %s: %i: unknown tag \"%s\"\n", fileName, lineNumber, tagName); 565 debug_printf(1, _(PROGRAM_NAME ": %s: %i: unknown tag \"%s\"\n"), fileName, lineNumber, tagName);
546 566
547 return(NULL); 567 return(NULL);
548} 568}
@@ -576,10 +596,10 @@ void free_tag(TagData * tag)
576 596
577 if (tag->name) 597 if (tag->name)
578 { 598 {
579 debug_printf(7, " freeing tag \"%s\"\n", tag->name); 599 debug_printf(7, _(" freeing tag \"%s\"\n"), tag->name);
580 free(tag->name); 600 free(tag->name);
581 } else { 601 } else {
582 debug_printf(7, " freeing unknown tag\n"); 602 debug_printf(7, _(" freeing unknown tag\n"));
583 }; 603 };
584 604
585 if (tag->contents) 605 if (tag->contents)
@@ -603,7 +623,7 @@ void free_taglist(TagData ** taglist)
603 int i; 623 int i;
604 if (!(taglist)) 624 if (!(taglist))
605 return; 625 return;
606 debug_printf(7, "freeing tag index\n"); 626 debug_printf(7, _("freeing tag index\n"));
607 for(i = 0; taglist[i]; i++) 627 for(i = 0; taglist[i]; i++)
608 free_tag(taglist[i]); 628 free_tag(taglist[i]);
609 free(taglist); 629 free(taglist);
@@ -639,7 +659,7 @@ int generate_taglist(Config * cnf)
639 for(lineCount = 0; data[lineCount]; lineCount++); 659 for(lineCount = 0; data[lineCount]; lineCount++);
640 660
641 /* compiles regex used to locate tags */ 661 /* compiles regex used to locate tags */
642 debug_printf(5, " compiling regular expression for tags\n"); 662 debug_printf(5, _(" compiling regular expression for tags\n"));
643 strncat(regstr, "^", STR_LEN); 663 strncat(regstr, "^", STR_LEN);
644 escape_string(regstr, cnf->leftTagString, STR_LEN); 664 escape_string(regstr, cnf->leftTagString, STR_LEN);
645 strncat(regstr, "([_[:blank:][:alnum:]]+)START", STR_LEN); 665 strncat(regstr, "([_[:blank:][:alnum:]]+)START", STR_LEN);
@@ -650,10 +670,10 @@ int generate_taglist(Config * cnf)
650 printf("regex error: %s\n", errmsg); 670 printf("regex error: %s\n", errmsg);
651 return(-1); 671 return(-1);
652 }; 672 };
653 debug_printf(8, " compiled regular expression \"%s\"\n", regstr); 673 debug_printf(8, _(" compiled regular expression \"%s\"\n"), regstr);
654 674
655 /* loops through looking for tags */ 675 /* loops through looking for tags */
656 debug_printf(3, "creating tag index from \"%s\"\n", cnf->tagFile); 676 debug_printf(3, _("creating tag index from \"%s\"\n"), cnf->tagFile);
657 for(i = 0; i < lineCount; i++) 677 for(i = 0; i < lineCount; i++)
658 { 678 {
659 if (!(err = regexec(&regex, data[i], 5, match, 0))) 679 if (!(err = regexec(&regex, data[i], 5, match, 0)))
@@ -672,9 +692,9 @@ int generate_taglist(Config * cnf)
672 }; 692 };
673 693
674 /* frees resources */ 694 /* frees resources */
675 debug_printf(7, " freeing file buffer\n"); 695 debug_printf(7, _(" freeing file buffer\n"));
676 free_filedata(data); 696 free_filedata(data);
677 debug_printf(7, " freeing regular expressions\n"); 697 debug_printf(7, _(" freeing regular expressions\n"));
678 regfree(&regex); 698 regfree(&regex);
679 699
680 /* ends function */ 700 /* ends function */
@@ -696,10 +716,10 @@ char ** get_file_contents(const char * file)
696 struct stat sb; 716 struct stat sb;
697 717
698 /* prints debug information */ 718 /* prints debug information */
699 debug_printf(2, "processing file \"%s\"\n", file); 719 debug_printf(2, _("processing file \"%s\"\n"), file);
700 720
701 /* stat file */ 721 /* stat file */
702 debug_printf(6, " inspecting file\n"); 722 debug_printf(6, _(" inspecting file\n"));
703 if ((stat(file, &sb)) == -1) 723 if ((stat(file, &sb)) == -1)
704 { 724 {
705 perror(PROGRAM_NAME ": stat()"); 725 perror(PROGRAM_NAME ": stat()");
@@ -707,7 +727,7 @@ char ** get_file_contents(const char * file)
707 }; 727 };
708 728
709 /* opens file for reading */ 729 /* opens file for reading */
710 debug_printf(6, " opening file\n"); 730 debug_printf(6, _(" opening file\n"));
711 if ((fd = open(file, O_RDONLY)) == -1) 731 if ((fd = open(file, O_RDONLY)) == -1)
712 { 732 {
713 perror(PROGRAM_NAME ": open()"); 733 perror(PROGRAM_NAME ": open()");
@@ -715,7 +735,7 @@ char ** get_file_contents(const char * file)
715 }; 735 };
716 736
717 /* allocates memory for buffer */ 737 /* allocates memory for buffer */
718 debug_printf(7, " allocating memory for file buffer\n"); 738 debug_printf(7, _(" allocating memory for file buffer\n"));
719 if (!(buff = (char *) malloc(sb.st_size + 1))) 739 if (!(buff = (char *) malloc(sb.st_size + 1)))
720 { 740 {
721 fprintf(stderr, PROGRAM_NAME ": out of virtual memory\n"); 741 fprintf(stderr, PROGRAM_NAME ": out of virtual memory\n");
@@ -724,7 +744,7 @@ char ** get_file_contents(const char * file)
724 }; 744 };
725 745
726 /* reads file into buffer */ 746 /* reads file into buffer */
727 debug_printf(6, " reading file\n"); 747 debug_printf(6, _(" reading file\n"));
728 if ((len = read(fd, buff, sb.st_size)) == -1) 748 if ((len = read(fd, buff, sb.st_size)) == -1)
729 { 749 {
730 perror(PROGRAM_NAME ": read()"); 750 perror(PROGRAM_NAME ": read()");
@@ -734,11 +754,11 @@ char ** get_file_contents(const char * file)
734 buff[len] = '\0'; 754 buff[len] = '\0';
735 755
736 /* closes file */ 756 /* closes file */
737 debug_printf(6, " closing file\n"); 757 debug_printf(6, _(" closing file\n"));
738 close(fd); 758 close(fd);
739 759
740 /* counts and terminates lines */ 760 /* counts and terminates lines */
741 debug_printf(5, " analyzing file contents\n"); 761 debug_printf(5, _(" analyzing file contents\n"));
742 count = 0; 762 count = 0;
743 for(i = 0; i < len; i++) 763 for(i = 0; i < len; i++)
744 { 764 {
@@ -750,7 +770,7 @@ char ** get_file_contents(const char * file)
750 }; 770 };
751 771
752 /* allocates memory for line array */ 772 /* allocates memory for line array */
753 debug_printf(7, " allocating memory for file index\n"); 773 debug_printf(7, _(" allocating memory for file index\n"));
754 count++; 774 count++;
755 if (!(lines = (char **) malloc(sizeof(char *) * count))) 775 if (!(lines = (char **) malloc(sizeof(char *) * count)))
756 { 776 {
@@ -760,7 +780,7 @@ char ** get_file_contents(const char * file)
760 }; 780 };
761 781
762 /* places lines in array */ 782 /* places lines in array */
763 debug_printf(5, " indexing file's contents\n"); 783 debug_printf(5, _(" indexing file's contents\n"));
764 lines[0] = buff; 784 lines[0] = buff;
765 count = 0; 785 count = 0;
766 for(i = 0; i < len; i++) 786 for(i = 0; i < len; i++)
@@ -800,6 +820,12 @@ int main(int argc, char * argv[])
800 {NULL, 0, 0, 0 } 820 {NULL, 0, 0, 0 }
801 }; 821 };
802 822
823#ifdef HAVE_GETTEXT
824 setlocale (LC_ALL, "");
825 bindtextdomain (PACKAGE, LOCALEDIR);
826 textdomain (PACKAGE);
827#endif
828
803 /* initialize variables */ 829 /* initialize variables */
804 memset(&cnf, 0, sizeof(Config)); 830 memset(&cnf, 0, sizeof(Config));
805 cnf.leftTagString = "@"; 831 cnf.leftTagString = "@";
@@ -846,11 +872,13 @@ int main(int argc, char * argv[])
846 break; 872 break;
847 873
848 case '?': 874 case '?':
849 fprintf(stderr, "Try `%s --help' for more information.\n", PROGRAM_NAME); 875 fprintf(stderr, _("Try `%s --help' for more information.\n"), PROGRAM_NAME);
850 return(1); 876 return(1);
851 default: 877 default:
852 fprintf(stderr, "%s: unrecognized option `--%c'\n", PROGRAM_NAME, c); 878 fprintf(stderr, _("%s: unrecognized option `--%c'\n"
853 fprintf(stderr, "Try `%s --help' for more information.\n", PROGRAM_NAME); 879 "Try `%s --help' for more information.\n"
880 ), PROGRAM_NAME, c, PROGRAM_NAME
881 );
854 return(1); 882 return(1);
855 }; 883 };
856 }; 884 };
@@ -863,8 +891,10 @@ int main(int argc, char * argv[])
863 }; 891 };
864 if (!(cnf.tagFile )) 892 if (!(cnf.tagFile ))
865 { 893 {
866 fprintf(stderr, "%s: missing required option `-f'\n", PROGRAM_NAME); 894 fprintf(stderr, _("%s: missing required option `-f'\n"
867 fprintf(stderr, "Try `%s --help' for more information.\n", PROGRAM_NAME); 895 "Try `%s --help' for more information.\n"
896 ), PROGRAM_NAME, PROGRAM_NAME
897 );
868 return(1); 898 return(1);
869 }; 899 };
870 900
@@ -873,7 +903,7 @@ int main(int argc, char * argv[])
873 return(0); 903 return(0);
874 if (!(cnf.tagCount)) 904 if (!(cnf.tagCount))
875 { 905 {
876 fprintf(stderr, PROGRAM_NAME ": no tag definitions were found in \"%s\"\n", cnf.tagFile); 906 fprintf(stderr, _(PROGRAM_NAME ": no tag definitions were found in \"%s\"\n"), cnf.tagFile);
877 return(1); 907 return(1);
878 }; 908 };
879 909
@@ -892,18 +922,22 @@ int main(int argc, char * argv[])
892/// displays usage 922/// displays usage
893void my_usage(void) 923void my_usage(void)
894{ 924{
895 printf("Usage: %s [OPTIONS] files\n", PROGRAM_NAME); 925 // TRANSLATORS: The following strings provide usage for command. These
896 printf(" -f file file containing tags\n"); 926 // strings are displayed if the program is passed `--help' on the command
897 printf(" -h, --help print this help and exit\n"); 927 // line. The two strings referenced are: PROGRAM_NAME, and
898 printf(" -l str left enclosing string for tags\n"); 928 // PACKAGE_BUGREPORT
899 printf(" -r str right enclosing string for tags\n"); 929 printf(_("Usage: %s [OPTIONS] files\n"
900 printf(" -t, --test show what would be done\n"); 930 " -f file file containing tags\n"
901 printf(" -v, --verbose print verbose messages\n"); 931 " -h, --help print this help and exit\n"
902 printf(" -V, --version print version number and exit\n"); 932 " -l str left enclosing string for tags\n"
903 printf("\n"); 933 " -r str right enclosing string for tags\n"
904#ifdef PACKAGE_BUGREPORT 934 " -t, --test show what would be done\n"
905 printf("Report bugs to <%s>.\n", PACKAGE_BUGREPORT); 935 " -v, --verbose print verbose messages\n"
906#endif 936 " -V, --version print version number and exit\n"
937 "\n"
938 "Report bugs to <%s>.\n"
939 ), PROGRAM_NAME, PACKAGE_BUGREPORT
940 );
907 return; 941 return;
908} 942}
909 943
@@ -911,18 +945,18 @@ void my_usage(void)
911/// displays version information 945/// displays version information
912void my_version(void) 946void my_version(void)
913{ 947{
914#if defined(PACKAGE_NAME) && defined(PACKAGE_VERSION) 948 // TRANSLATORS: The following strings provide version and copyright
915 printf("%s (%s) %s\n", PROGRAM_NAME, PACKAGE_NAME, PACKAGE_VERSION); 949 // information if the program is passed --version on the command line.
916#else 950 // The three strings referenced are: PROGRAM_NAME, PACKAGE_NAME,
917 printf("%s\n", PROGRAM_NAME); 951 // PACKAGE_VERSION.
918#endif 952 printf(_("%s (%s) %s\n"
919 printf("Written by David M. Syzdek.\n"); 953 "Written by David M. Syzdek.\n"
920 printf("\n"); 954 "\n"
921#if defined(PACKAGE_COPYRIGHT) 955 "%s\n"
922 printf("%s\n", PACKAGE_COPYRIGHT); 956 "This is free software; see the source for copying conditions. There is NO\n"
923#endif 957 "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
924 printf("This is free software; see the source for copying conditions. There is NO\n"); 958 ), PROGRAM_NAME, PACKAGE_NAME, PACKAGE_VERSION, PACKAGE_COPYRIGHT
925 printf("warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"); 959 );
926 return; 960 return;
927} 961}
928 962
@@ -959,7 +993,7 @@ int process_tag(char * tagName, char ** data, int len, int pos, Config * cnf)
959 memset(errmsg, 0, STR_LEN); 993 memset(errmsg, 0, STR_LEN);
960 994
961 /* prints debugging information */ 995 /* prints debugging information */
962 debug_printf(5, " indexing tag \"%s\"\n", tagName); 996 debug_printf(5, _(" indexing tag \"%s\"\n"), tagName);
963 997
964 /* counts tags in taglist */ 998 /* counts tags in taglist */
965 tagCount = 0; 999 tagCount = 0;
@@ -970,7 +1004,7 @@ int process_tag(char * tagName, char ** data, int len, int pos, Config * cnf)
970 tagCount++; 1004 tagCount++;
971 if (!(tag = (TagData *) malloc(sizeof(TagData)))) 1005 if (!(tag = (TagData *) malloc(sizeof(TagData))))
972 { 1006 {
973 fprintf(stderr, PROGRAM_NAME ": out of virtual memory\n"); 1007 fprintf(stderr, _(PROGRAM_NAME ": out of virtual memory\n"));
974 return(-1); 1008 return(-1);
975 }; 1009 };
976 memset(tag, 0, sizeof(TagData)); 1010 memset(tag, 0, sizeof(TagData));
@@ -978,7 +1012,7 @@ int process_tag(char * tagName, char ** data, int len, int pos, Config * cnf)
978 /* allocates memory for array */ 1012 /* allocates memory for array */
979 if (!(ptr = realloc(cnf->tagList, sizeof(TagData) * (tagCount + 1)))) 1013 if (!(ptr = realloc(cnf->tagList, sizeof(TagData) * (tagCount + 1))))
980 { 1014 {
981 fprintf(stderr, PROGRAM_NAME ": out of virtual memory\n"); 1015 fprintf(stderr, _(PROGRAM_NAME ": out of virtual memory\n"));
982 free_tag(tag); 1016 free_tag(tag);
983 return(-1); 1017 return(-1);
984 }; 1018 };
@@ -989,13 +1023,13 @@ int process_tag(char * tagName, char ** data, int len, int pos, Config * cnf)
989 /* saves tag name */ 1023 /* saves tag name */
990 if (!(tag->name = strdup(tagName))) 1024 if (!(tag->name = strdup(tagName)))
991 { 1025 {
992 fprintf(stderr, PROGRAM_NAME ": out of virtual memory\n"); 1026 fprintf(stderr, _(PROGRAM_NAME ": out of virtual memory\n"));
993 free_tag(tag); 1027 free_tag(tag);
994 return(-1); 1028 return(-1);
995 }; 1029 };
996 1030
997 /* compiles regular expression */ 1031 /* compiles regular expression */
998 debug_printf(5, " compiling regular expression\n"); 1032 debug_printf(5, _(" compiling regular expression\n"));
999 escape_string(regstr, cnf->leftTagString, STR_LEN); 1033 escape_string(regstr, cnf->leftTagString, STR_LEN);
1000 strncat(regstr, "(", STR_LEN); 1034 strncat(regstr, "(", STR_LEN);
1001 strncat(regstr, tagName, STR_LEN); 1035 strncat(regstr, tagName, STR_LEN);