Added translation framework and translated a few strings.
authorWerner Koch <wk@gnupg.org>
Wed, 30 Nov 2005 14:31:38 +0000 (14:31 +0000)
committerWerner Koch <wk@gnupg.org>
Wed, 30 Nov 2005 14:31:38 +0000 (14:31 +0000)
56 files changed:
ABOUT-NLS [new file with mode: 0644]
ChangeLog
Makefile.am
NEWS
autogen.sh
config.rpath [new file with mode: 0755]
configure.ac
m4/Makefile.am
m4/codeset.m4 [new file with mode: 0644]
m4/gettext.m4 [new file with mode: 0644]
m4/glibc21.m4 [new file with mode: 0644]
m4/iconv.m4 [new file with mode: 0644]
m4/intdiv0.m4 [new file with mode: 0644]
m4/inttypes-pri.m4 [new file with mode: 0644]
m4/inttypes.m4 [new file with mode: 0644]
m4/inttypes_h.m4 [new file with mode: 0644]
m4/isc-posix.m4 [new file with mode: 0644]
m4/lcmessage.m4 [new file with mode: 0644]
m4/lib-ld.m4 [new file with mode: 0644]
m4/lib-link.m4 [new file with mode: 0644]
m4/lib-prefix.m4 [new file with mode: 0644]
m4/nls.m4 [new file with mode: 0644]
m4/po.m4 [new file with mode: 0644]
m4/progtest.m4 [new file with mode: 0644]
m4/stdint_h.m4 [new file with mode: 0644]
m4/uintmax_t.m4 [new file with mode: 0644]
m4/ulonglong.m4 [new file with mode: 0644]
mkinstalldirs [new file with mode: 0755]
po/LINGUAS [new file with mode: 0644]
po/Makefile.in.in [new file with mode: 0644]
po/Makevars [new file with mode: 0644]
po/POTFILES.in [new file with mode: 0644]
po/Rules-quot [new file with mode: 0644]
po/boldquot.sed [new file with mode: 0644]
po/de.po [new file with mode: 0644]
po/en@boldquot.header [new file with mode: 0644]
po/en@quot.header [new file with mode: 0644]
po/insert-header.sin [new file with mode: 0644]
po/quot.sed [new file with mode: 0644]
po/remove-potcdate.sin [new file with mode: 0644]
src/ChangeLog
src/Makefile.am
src/common.c
src/display.cpp
src/display.h
src/engine-gpgme.c
src/gpgmsg.cpp
src/main.c
src/msgcache.c
src/olflange.cpp
src/passcache.c
src/passphrase-dialog.c
src/pgpmime.c
src/recipient-dialog.c
src/util.h
src/verify-dialog.c

diff --git a/ABOUT-NLS b/ABOUT-NLS
new file mode 100644 (file)
index 0000000..892361c
--- /dev/null
+++ b/ABOUT-NLS
@@ -0,0 +1,775 @@
+Warning:  We are using our own getetxt implementation here, so this file
+might not be correct in all parts.
+
+IMPORTANT:  When creating a new translation, make sure that you  create the
+.mo files UTF-8 encoded.
+
+
+Notes on the Free Translation Project
+*************************************
+
+Free software is going international!  The Free Translation Project is
+a way to get maintainers of free software, translators, and users all
+together, so that will gradually become able to speak many languages.
+A few packages already provide translations for their messages.
+
+   If you found this `ABOUT-NLS' file inside a distribution, you may
+assume that the distributed package does use GNU `gettext' internally,
+itself available at your nearest GNU archive site.  But you do _not_
+need to install GNU `gettext' prior to configuring, installing or using
+this package with messages translated.
+
+   Installers will find here some useful hints.  These notes also
+explain how users should proceed for getting the programs to use the
+available translations.  They tell how people wanting to contribute and
+work at translations should contact the appropriate team.
+
+   When reporting bugs in the `intl/' directory or bugs which may be
+related to internationalization, you should tell about the version of
+`gettext' which is used.  The information can be found in the
+`intl/VERSION' file, in internationalized packages.
+
+Quick configuration advice
+==========================
+
+If you want to exploit the full power of internationalization, you
+should configure it using
+
+     ./configure --with-included-gettext
+
+to force usage of internationalizing routines provided within this
+package, despite the existence of internationalizing capabilities in the
+operating system where this package is being installed.  So far, only
+the `gettext' implementation in the GNU C library version 2 provides as
+many features (such as locale alias, message inheritance, automatic
+charset conversion or plural form handling) as the implementation here.
+It is also not possible to offer this additional functionality on top
+of a `catgets' implementation.  Future versions of GNU `gettext' will
+very likely convey even more functionality.  So it might be a good idea
+to change to GNU `gettext' as soon as possible.
+
+   So you need _not_ provide this option if you are using GNU libc 2 or
+you have installed a recent copy of the GNU gettext package with the
+included `libintl'.
+
+INSTALL Matters
+===============
+
+Some packages are "localizable" when properly installed; the programs
+they contain can be made to speak your own native language.  Most such
+packages use GNU `gettext'.  Other packages have their own ways to
+internationalization, predating GNU `gettext'.
+
+   By default, this package will be installed to allow translation of
+messages.  It will automatically detect whether the system already
+provides the GNU `gettext' functions.  If not, the GNU `gettext' own
+library will be used.  This library is wholly contained within this
+package, usually in the `intl/' subdirectory, so prior installation of
+the GNU `gettext' package is _not_ required.  Installers may use
+special options at configuration time for changing the default
+behaviour.  The commands:
+
+     ./configure --with-included-gettext
+     ./configure --disable-nls
+
+will respectively bypass any pre-existing `gettext' to use the
+internationalizing routines provided within this package, or else,
+_totally_ disable translation of messages.
+
+   When you already have GNU `gettext' installed on your system and run
+configure without an option for your new package, `configure' will
+probably detect the previously built and installed `libintl.a' file and
+will decide to use this.  This might be not what is desirable.  You
+should use the more recent version of the GNU `gettext' library.  I.e.
+if the file `intl/VERSION' shows that the library which comes with this
+package is more recent, you should use
+
+     ./configure --with-included-gettext
+
+to prevent auto-detection.
+
+   The configuration process will not test for the `catgets' function
+and therefore it will not be used.  The reason is that even an
+emulation of `gettext' on top of `catgets' could not provide all the
+extensions of the GNU `gettext' library.
+
+   Internationalized packages have usually many `po/LL.po' files, where
+LL gives an ISO 639 two-letter code identifying the language.  Unless
+translations have been forbidden at `configure' time by using the
+`--disable-nls' switch, all available translations are installed
+together with the package.  However, the environment variable `LINGUAS'
+may be set, prior to configuration, to limit the installed set.
+`LINGUAS' should then contain a space separated list of two-letter
+codes, stating which languages are allowed.
+
+Using This Package
+==================
+
+As a user, if your language has been installed for this package, you
+only have to set the `LANG' environment variable to the appropriate
+`LL_CC' combination.  Here `LL' is an ISO 639 two-letter language code,
+and `CC' is an ISO 3166 two-letter country code.  For example, let's
+suppose that you speak German and live in Germany.  At the shell
+prompt, merely execute `setenv LANG de_DE' (in `csh'),
+`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
+This can be done from your `.login' or `.profile' file, once and for
+all.
+
+   You might think that the country code specification is redundant.
+But in fact, some languages have dialects in different countries.  For
+example, `de_AT' is used for Austria, and `pt_BR' for Brazil.  The
+country code serves to distinguish the dialects.
+
+   The locale naming convention of `LL_CC', with `LL' denoting the
+language and `CC' denoting the country, is the one use on systems based
+on GNU libc.  On other systems, some variations of this scheme are
+used, such as `LL' or `LL_CC.ENCODING'.  You can get the list of
+locales supported by your system for your country by running the command
+`locale -a | grep '^LL''.
+
+   Not all programs have translations for all languages.  By default, an
+English message is shown in place of a nonexistent translation.  If you
+understand other languages, you can set up a priority list of languages.
+This is done through a different environment variable, called
+`LANGUAGE'.  GNU `gettext' gives preference to `LANGUAGE' over `LANG'
+for the purpose of message handling, but you still need to have `LANG'
+set to the primary language; this is required by other parts of the
+system libraries.  For example, some Swedish users who would rather
+read translations in German than English for when Swedish is not
+available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
+
+   Special advice for Norwegian users: The language code for Norwegian
+bokma*l changed from `no' to `nb' recently (in 2003).  During the
+transition period, while some message catalogs for this language are
+installed under `nb' and some older ones under `no', it's recommended
+for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and
+older translations are used.
+
+   In the `LANGUAGE' environment variable, but not in the `LANG'
+environment variable, `LL_CC' combinations can be abbreviated as `LL'
+to denote the language's main dialect.  For example, `de' is equivalent
+to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
+(Portuguese as spoken in Portugal) in this context.
+
+Translating Teams
+=================
+
+For the Free Translation Project to be a success, we need interested
+people who like their own language and write it well, and who are also
+able to synergize with other translators speaking the same language.
+Each translation team has its own mailing list.  The up-to-date list of
+teams can be found at the Free Translation Project's homepage,
+`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams"
+area.
+
+   If you'd like to volunteer to _work_ at translating messages, you
+should become a member of the translating team for your own language.
+The subscribing address is _not_ the same as the list itself, it has
+`-request' appended.  For example, speakers of Swedish can send a
+message to `sv-request@li.org', having this message body:
+
+     subscribe
+
+   Keep in mind that team members are expected to participate
+_actively_ in translations, or at solving translational difficulties,
+rather than merely lurking around.  If your team does not exist yet and
+you want to start one, or if you are unsure about what to do or how to
+get started, please write to `translation@iro.umontreal.ca' to reach the
+coordinator for all translator teams.
+
+   The English team is special.  It works at improving and uniformizing
+the terminology in use.  Proven linguistic skill are praised more than
+programming skill, here.
+
+Available Packages
+==================
+
+Languages are not equally supported in all packages.  The following
+matrix shows the current state of internationalization, as of January
+2004.  The matrix shows, in regard of each package, for which languages
+PO files have been submitted to translation coordination, with a
+translation percentage of at least 50%.
+
+     Ready PO files       af am ar az be bg bs ca cs da de el en en_GB eo es
+                        +----------------------------------------------------+
+     a2ps               |             []             [] [] []                |
+     aegis              |                               ()                   |
+     ant-phone          |                               ()                   |
+     anubis             |                                                    |
+     ap-utils           |                                                    |
+     aspell             |             []                                     |
+     bash               |                      []       []             [] [] |
+     batchelor          |                                                    |
+     bfd                |                            []                   [] |
+     binutils           |                            []                   [] |
+     bison              |                            [] []                [] |
+     bluez-pin          | []                      []                   []    |
+     clisp              |                                                    |
+     clisp              |                               []    []          [] |
+     console-tools      |                         []    []                   |
+     coreutils          |                      []    [] []                [] |
+     cpio               |                            [] []                [] |
+     darkstat           |                []          ()                   [] |
+     diffutils          |                      [] [] [] [] []          [] [] |
+     e2fsprogs          |                         []    []                [] |
+     enscript           |                      []    [] []        []         |
+     error              |                      []    [] []        []      [] |
+     fetchmail          |                      [] () [] [] []             [] |
+     fileutils          |                            [] []                [] |
+     findutils          |             []       []    [] [] []          [] [] |
+     flex               |                      []    [] []                [] |
+     fslint             |                                                    |
+     gas                |                                                 [] |
+     gawk               |                      []    [] []                [] |
+     gbiff              |                               []                   |
+     gcal               |                      []                            |
+     gcc                |                            []                   [] |
+     gettext            |             []       []    [] []                [] |
+     gettext-examples   | []                   []       []                [] |
+     gettext-runtime    |             []       []    [] []                [] |
+     gettext-tools      |                      []       []                [] |
+     gimp-print         |                         [] [] []        []      [] |
+     gliv               |                                                    |
+     glunarclock        |                            [] []                   |
+     gnubiff            |                               []                   |
+     gnucash            |                         []    ()        []      [] |
+     gnucash-glossary   |                            [] ()                [] |
+     gnupg              |                      [] ()    [] []          [] [] |
+     gpe-aerial         |                         []                         |
+     gpe-beam           |                         []    []                   |
+     gpe-calendar       |                         []    []                   |
+     gpe-clock          |                         []    []                   |
+     gpe-conf           |                         []    []                   |
+     gpe-contacts       |                         []    []                   |
+     gpe-edit           |                         []                         |
+     gpe-go             |                         []                         |
+     gpe-login          |                         []    []                   |
+     gpe-ownerinfo      |                         []    []                   |
+     gpe-sketchbook     |                         []    []                   |
+     gpe-su             |                         []    []                   |
+     gpe-taskmanager    |                         []    []                   |
+     gpe-timesheet      |                         []                         |
+     gpe-today          |                         []    []                   |
+     gpe-todo           |                         []    []                   |
+     gphoto2            |                         [] [] []                [] |
+     gprof              |                            [] []                [] |
+     gpsdrive           |                               ()    ()          () |
+     gramadoir          |                               []                   |
+     grep               |             [] []    []       [] []             [] |
+     gretl              |                                                 [] |
+     gtick              | []                            ()                   |
+     hello              |                      []    [] [] []          [] [] |
+     id-utils           |                            [] []                   |
+     indent             |                      []       []             [] [] |
+     iso_3166           |          []    [] [] [] [] [] [] []          [] [] |
+     iso_3166_1         |                      [] [] [] [] []             [] |
+     iso_3166_2         |                                                    |
+     iso_3166_3         |                               []                   |
+     iso_4217           |                      []    [] []                [] |
+     iso_639            |                                                    |
+     jpilot             |                         [] []                   [] |
+     jtag               |                                                    |
+     jwhois             |                                                 [] |
+     kbd                |                         [] [] [] []             [] |
+     latrine            |                               ()                   |
+     ld                 |                            []                   [] |
+     libc               |                      [] [] [] [] []             [] |
+     libgpewidget       |                         []    []                   |
+     libiconv           |                      []    [] []             [] [] |
+     lifelines          |                            [] ()                   |
+     lilypond           |                               []                   |
+     lingoteach         |                                                    |
+     lingoteach_lessons |                               ()                () |
+     lynx               |                      [] [] [] []                   |
+     m4                 |                         [] [] [] []                |
+     mailutils          |                      []                         [] |
+     make               |                            [] []                [] |
+     man-db             |                      [] () [] []                () |
+     minicom            |                         []    []                [] |
+     mysecretdiary      |                            [] []                [] |
+     nano               |                      [] () [] []                [] |
+     nano_1_0           |                      [] () [] []                [] |
+     opcodes            |                                                 [] |
+     parted             |                      [] [] [] []                [] |
+     ptx                |                      []    [] []             [] [] |
+     python             |                                                    |
+     radius             |                                                 [] |
+     recode             |             []       []    [] [] []          [] [] |
+     rpm                |                         [] []                      |
+     screem             |                                                    |
+     scrollkeeper       |             []       [] [] [] []                [] |
+     sed                | []                   []    [] []             [] [] |
+     sh-utils           |                            [] []                [] |
+     shared-mime-info   |                                                    |
+     sharutils          |                      [] [] [] [] []             [] |
+     silky              |                               ()                   |
+     skencil            |                            [] ()                [] |
+     sketch             |                            [] ()                [] |
+     soundtracker       |                            [] []                [] |
+     sp                 |                               []                   |
+     tar                |                         [] [] []                [] |
+     texinfo            |                            [] []             []    |
+     textutils          |                      []    [] []                [] |
+     tin                |                               ()        ()         |
+     tp-robot           |                                                    |
+     tuxpaint           |                      [] [] [] [] []     []      [] |
+     unicode-han-tra... |                                                    |
+     unicode-transla... |                                                    |
+     util-linux         |                      [] [] [] []                [] |
+     vorbis-tools       |             []          [] []                   [] |
+     wastesedge         |                               ()                   |
+     wdiff              |                      []    [] []                [] |
+     wget               |                []    []    [] [] []             [] |
+     xchat              |                      []       [] []             [] |
+     xfree86_xkb_xml    |                         [] []                      |
+     xpad               |                                                 [] |
+                        +----------------------------------------------------+
+                          af am ar az be bg bs ca cs da de el en en_GB eo es
+                           4  0  0  1  9  4  1 40 41 60 78 17  1   5   13 68
+     
+                          et eu fa fi fr ga gl he hr hu id is it ja ko lg
+                        +-------------------------------------------------+
+     a2ps               | []       [] []                      ()    ()    |
+     aegis              |                                                 |
+     ant-phone          |             []                                  |
+     anubis             |             []                                  |
+     ap-utils           |             []                                  |
+     aspell             |             [] []                               |
+     bash               |             []             []                   |
+     batchelor          |             [] []                               |
+     bfd                |             []                                  |
+     binutils           |             []                         []       |
+     bison              | []          []                []    []          |
+     bluez-pin          |          [] [] []          [] []                |
+     clisp              |                                                 |
+     clisp              |             []                                  |
+     console-tools      |                                                 |
+     coreutils          | []       [] [] []                   [] []       |
+     cpio               |             []    []       []             []    |
+     darkstat           |             () []          [] []                |
+     diffutils          |          [] []    [] []    [] []       []       |
+     e2fsprogs          |                                                 |
+     enscript           |             []          []                      |
+     error              |          [] [] []          []                   |
+     fetchmail          |                                        []       |
+     fileutils          | []          [] []          []       [] []       |
+     findutils          | []       [] [] [] []    [] [] []    [] [] []    |
+     flex               |             [] []                         []    |
+     fslint             |             []                                  |
+     gas                |             []                                  |
+     gawk               |             []       []                []       |
+     gbiff              |             []                                  |
+     gcal               |             []                                  |
+     gcc                |             []                                  |
+     gettext            |             []                         [] []    |
+     gettext-examples   |             []                         []       |
+     gettext-runtime    |          [] []                []       [] []    |
+     gettext-tools      |             []                         [] []    |
+     gimp-print         |             []                         []       |
+     gliv               |             ()                                  |
+     glunarclock        |          []    [] []       []                   |
+     gnubiff            |             []                                  |
+     gnucash            |             ()                      []          |
+     gnucash-glossary   |                                     []          |
+     gnupg              | []       [] []    []          []    [] []       |
+     gpe-aerial         |             []                                  |
+     gpe-beam           |             []                                  |
+     gpe-calendar       |             []             [] []                |
+     gpe-clock          |             []                                  |
+     gpe-conf           |             []                                  |
+     gpe-contacts       |             []             []                   |
+     gpe-edit           |             []                []                |
+     gpe-go             |             []                                  |
+     gpe-login          |             []             []                   |
+     gpe-ownerinfo      |             []             [] []                |
+     gpe-sketchbook     |             []                                  |
+     gpe-su             |             []                                  |
+     gpe-taskmanager    |             []                                  |
+     gpe-timesheet      |             [] []             []                |
+     gpe-today          |             [] []                               |
+     gpe-todo           |             []                []                |
+     gphoto2            |             []             []          []       |
+     gprof              |             []                []                |
+     gpsdrive           |             ()                      () ()       |
+     gramadoir          |             [] []                               |
+     grep               | []       [] [] [] [] [] [] [] []    [] []       |
+     gretl              |             []                      []          |
+     gtick              |          [] [] []                               |
+     hello              | []    [] [] [] [] [] [] [] [] []    [] [] []    |
+     id-utils           |             []             [] []    []          |
+     indent             | []       [] [] [] []       [] []    [] []       |
+     iso_3166           |    []       [] []       [] [] []    []          |
+     iso_3166_1         |    []       [] []          [] []                |
+     iso_3166_2         |                                                 |
+     iso_3166_3         |                                                 |
+     iso_4217           | []          []    []       []       [] []       |
+     iso_639            |                                                 |
+     jpilot             |             []                         ()       |
+     jtag               |             []                                  |
+     jwhois             |             []             [] []    []          |
+     kbd                |             []                                  |
+     latrine            |             []                                  |
+     ld                 |             []                                  |
+     libc               |          [] []    []       []          [] []    |
+     libgpewidget       |             [] []          [] []                |
+     libiconv           | []       [] [] [] []    [] [] []    []          |
+     lifelines          |             ()                                  |
+     lilypond           |             []                                  |
+     lingoteach         |             []                []                |
+     lingoteach_lessons |                                                 |
+     lynx               | []                         []       [] []       |
+     m4                 |             []    []          []       []       |
+     mailutils          |                                                 |
+     make               |             []    [] [] []             [] []    |
+     man-db             |                                     () ()       |
+     minicom            |          [] []             []          []       |
+     mysecretdiary      |             []                []                |
+     nano               |             []    []          []    []          |
+     nano_1_0           |             []    []          []    []          |
+     opcodes            |             []                                  |
+     parted             |             []    []                   []       |
+     ptx                | []       [] [] [] []       [] []                |
+     python             |                                                 |
+     radius             |             []                                  |
+     recode             |             []    [] []    [] []    []          |
+     rpm                |             []                            []    |
+     screem             |                                                 |
+     scrollkeeper       |                            []                   |
+     sed                | []       [] [] [] []       [] []    [] []       |
+     sh-utils           | []       [] [] []          []       [] []       |
+     shared-mime-info   |          [] []             []                   |
+     sharutils          | []          []    []       []          []       |
+     silky              |          () []             ()       ()          |
+     skencil            |             []                                  |
+     sketch             |             []                                  |
+     soundtracker       |             []                      []          |
+     sp                 |             []                         ()       |
+     tar                | []       [] []    []    [] [] []    [] []       |
+     texinfo            |             []       [] []             []       |
+     textutils          |             [] [] []       []          [] []    |
+     tin                | []          ()                                  |
+     tp-robot           |             []                                  |
+     tuxpaint           |          [] []       []    [] [] [] [] [] []    |
+     unicode-han-tra... |                                                 |
+     unicode-transla... |             [] []                               |
+     util-linux         | []       [] []             []       () []       |
+     vorbis-tools       |             []                                  |
+     wastesedge         |             ()                                  |
+     wdiff              | []          [] [] []       [] []                |
+     wget               | []       [] []    []    [] []          []       |
+     xchat              | []       [] []                                  |
+     xfree86_xkb_xml    |             []             []                   |
+     xpad               |             [] []                               |
+                        +-------------------------------------------------+
+                          et eu fa fi fr ga gl he hr hu id is it ja ko lg
+                          22  2  1 26 106 28 24  8 10 41 33  1 26 33 12  0
+     
+                          lt lv mk mn ms mt nb nl nn no nso pl pt pt_BR ro ru
+                        +-----------------------------------------------------+
+     a2ps               |             []       []    ()     ()     []   [] [] |
+     aegis              |                      ()                       () () |
+     ant-phone          |                      []                       []    |
+     anubis             |             []    [] []           []          [] [] |
+     ap-utils           |                      []           ()          []    |
+     aspell             |                      []                             |
+     bash               |                                          []   [] [] |
+     batchelor          |                                               []    |
+     bfd                |                                               []    |
+     binutils           |                                                  [] |
+     bison              |             []       []                  []   [] [] |
+     bluez-pin          |                      []           []          []    |
+     clisp              |                                                     |
+     clisp              |                      []                             |
+     console-tools      |                                                  [] |
+     coreutils          |                                   []             [] |
+     cpio               |                      []           []     []   [] [] |
+     darkstat           |             []       []                  []   []    |
+     diffutils          |             []       []           []     []   [] [] |
+     e2fsprogs          |                                   []                |
+     enscript           |                      []                  []   [] [] |
+     error              |                      []                  []   []    |
+     fetchmail          |                      []           []     ()      [] |
+     fileutils          |                                   []          [] [] |
+     findutils          |                      []           []     []   [] [] |
+     flex               |                                   []     []   [] [] |
+     fslint             |                      []                       []    |
+     gas                |                                                     |
+     gawk               |                                   []     []   []    |
+     gbiff              |                      []                       []    |
+     gcal               |                                                     |
+     gcc                |                                                     |
+     gettext            |                                   []          [] [] |
+     gettext-examples   |                      []           []          []    |
+     gettext-runtime    |                      []           []          [] [] |
+     gettext-tools      |                                   []          []    |
+     gimp-print         |                      []                             |
+     gliv               |                      []                  []   []    |
+     glunarclock        |             []       []                       [] [] |
+     gnubiff            |                      []                             |
+     gnucash            |                      []              []  ()      [] |
+     gnucash-glossary   |                      []              []             |
+     gnupg              |                                               []    |
+     gpe-aerial         |                      []              []       [] [] |
+     gpe-beam           |                      []              []       [] [] |
+     gpe-calendar       |                      []              []       [] [] |
+     gpe-clock          |                      []              []       [] [] |
+     gpe-conf           |                      []              []       [] [] |
+     gpe-contacts       |                      []              []       [] [] |
+     gpe-edit           |                      []              []       [] [] |
+     gpe-go             |                      []                       [] [] |
+     gpe-login          |                      []              []       [] [] |
+     gpe-ownerinfo      |                      []              []       [] [] |
+     gpe-sketchbook     |                      []              []       [] [] |
+     gpe-su             |                      []              []       [] [] |
+     gpe-taskmanager    |                      []              []       [] [] |
+     gpe-timesheet      |                      []              []       [] [] |
+     gpe-today          |                      []              []       [] [] |
+     gpe-todo           |                      []              []       [] [] |
+     gphoto2            |                                               []    |
+     gprof              |                                          []   []    |
+     gpsdrive           |                      ()    ()                 []    |
+     gramadoir          |                      ()                       []    |
+     grep               |                                   [] []  []   [] [] |
+     gretl              |                                                     |
+     gtick              |                      []                       [] [] |
+     hello              |    []       []    [] [] [] []     []     []   [] [] |
+     id-utils           |                      []                  []   [] [] |
+     indent             |                      []                  []   [] [] |
+     iso_3166           |          []                [] []                    |
+     iso_3166_1         |                      []    []                       |
+     iso_3166_2         |                                                     |
+     iso_3166_3         |                      []                             |
+     iso_4217           |          []          [] [] []     [] []  []      [] |
+     iso_639            |          []                                         |
+     jpilot             |                      ()    ()                       |
+     jtag               |                                                     |
+     jwhois             |                      []           []     []   [] () |
+     kbd                |                      []           []          []    |
+     latrine            |                                               []    |
+     ld                 |                                                     |
+     libc               |                   []       []     []     []         |
+     libgpewidget       |                      []              []       []    |
+     libiconv           |                      []           []     []   [] [] |
+     lifelines          |                                                     |
+     lilypond           |                                                     |
+     lingoteach         |                                                     |
+     lingoteach_lessons |                                                     |
+     lynx               |                      []                  []      [] |
+     m4                 |                      []           []     []   [] [] |
+     mailutils          |                                   []          [] [] |
+     make               |                      []           []     []      [] |
+     man-db             |                                               []    |
+     minicom            |                                   []     []   [] [] |
+     mysecretdiary      |                      []                  []   []    |
+     nano               |             []       []           []          [] [] |
+     nano_1_0           |             []    []    []        []          [] [] |
+     opcodes            |                      []                       []    |
+     parted             |                         []        [] []  []         |
+     ptx                |                   [] []    []     [] []  []   [] [] |
+     python             |                                                     |
+     radius             |                                   []             [] |
+     recode             |                                   []     []   [] [] |
+     rpm                |                                   [] []          [] |
+     screem             |                                                     |
+     scrollkeeper       |                   [] []           []          [] [] |
+     sed                |                                   []     []   []    |
+     sh-utils           |                   []                             [] |
+     shared-mime-info   |                      [] []                          |
+     sharutils          |                      []                          [] |
+     silky              |                                                  () |
+     skencil            |                                      []  []         |
+     sketch             |                                      []  []         |
+     soundtracker       |                                                     |
+     sp                 |                                                     |
+     tar                |             []    []       []     []     []   []    |
+     texinfo            |                   []              []          [] [] |
+     textutils          |                   []                             [] |
+     tin                |                                                     |
+     tp-robot           |                      []                             |
+     tuxpaint           | []          []       [] []        [] []  []   []    |
+     unicode-han-tra... |                                                     |
+     unicode-transla... |                                                     |
+     util-linux         |                      []                  []      [] |
+     vorbis-tools       |                      []                       [] [] |
+     wastesedge         |                                                     |
+     wdiff              |             []                    []     []   [] [] |
+     wget               |                                   []          [] [] |
+     xchat              |    []                []                          [] |
+     xfree86_xkb_xml    |                      []                          [] |
+     xpad               |                      []                       []    |
+                        +-----------------------------------------------------+
+                          lt lv mk mn ms mt nb nl nn no nso pl pt pt_BR ro ru
+                           1  2  0  3 12  0 10 69  6  7  1  40 26  36   76 63
+     
+                          sk sl sr sv ta th tr uk ven vi wa xh zh_CN zh_TW zu
+                        +-----------------------------------------------------+
+     a2ps               |    []    []       [] []                             | 16
+     aegis              |                                                     |  0
+     ant-phone          |                                                     |  3
+     anubis             |                   [] []                             |  9
+     ap-utils           |                      ()                             |  3
+     aspell             |                                                     |  4
+     bash               |                                                     |  9
+     batchelor          |                                                     |  3
+     bfd                |          []       []                                |  6
+     binutils           |          []       []                  []            |  8
+     bison              |          []       []                                | 14
+     bluez-pin          | []       []                    []                   | 14
+     clisp              |                                                     |  0
+     clisp              |                                                     |  5
+     console-tools      |                                                     |  3
+     coreutils          |    []    []       []                        []      | 16
+     cpio               |          []                           []            | 14
+     darkstat           | []    [] []                           ()    ()      | 12
+     diffutils          |          []       []                        []      | 23
+     e2fsprogs          |          []       []                                |  6
+     enscript           |          []       []                                | 12
+     error              | []                []                        []      | 15
+     fetchmail          | []                []                                | 11
+     fileutils          |    []    []       []                  []    []      | 17
+     findutils          | [] [] [] []       []                  []            | 29
+     flex               |          []       []                                | 13
+     fslint             |                                                     |  3
+     gas                |                   []                                |  3
+     gawk               |          []       []                                | 12
+     gbiff              |                                                     |  4
+     gcal               |          []       []                                |  4
+     gcc                |                   []                                |  4
+     gettext            | [] []    []       []                        []      | 16
+     gettext-examples   | []    [] []       []                  []            | 14
+     gettext-runtime    | [] [] [] []       [] []               []    []      | 22
+     gettext-tools      | [] [] [] []       []                  []            | 14
+     gimp-print         | []       []                                         | 10
+     gliv               |                                                     |  3
+     glunarclock        |       [] []                    []                   | 13
+     gnubiff            |                                                     |  3
+     gnucash            | []                                          []      |  9
+     gnucash-glossary   | []       []                                 []      |  8
+     gnupg              | []       []       []                        []      | 17
+     gpe-aerial         |          []                                         |  7
+     gpe-beam           |          []                                         |  8
+     gpe-calendar       | []       []                    []           []      | 13
+     gpe-clock          | []    [] []                                         | 10
+     gpe-conf           | []       []                                         |  9
+     gpe-contacts       | []       []                                 []      | 11
+     gpe-edit           | []    [] []                    []           []      | 12
+     gpe-go             |                                                     |  5
+     gpe-login          | []    [] []                    []           []      | 13
+     gpe-ownerinfo      | []    [] []                                 []      | 13
+     gpe-sketchbook     | []       []                                         |  9
+     gpe-su             | []    [] []                                         | 10
+     gpe-taskmanager    | []    [] []                                         | 10
+     gpe-timesheet      | []    [] []                                 []      | 12
+     gpe-today          | []    [] []                    []           []      | 13
+     gpe-todo           | []       []                    []           []      | 12
+     gphoto2            | []       []                           []            | 11
+     gprof              |          []       []                                |  9
+     gpsdrive           | []       []                                         |  3
+     gramadoir          | []                                                  |  5
+     grep               |    [] []          [] []                             | 26
+     gretl              |                                                     |  3
+     gtick              |                                                     |  7
+     hello              | []    [] []       [] []                             | 34
+     id-utils           |          []       []                                | 12
+     indent             | []    [] []       []                                | 21
+     iso_3166           | [] [] [] []       []    []     []                   | 27
+     iso_3166_1         | [] []             []                                | 16
+     iso_3166_2         |                                                     |  0
+     iso_3166_3         |                                                     |  2
+     iso_4217           | [] []    []       [] []               []            | 24
+     iso_639            |                                                     |  1
+     jpilot             |          []       []        []        []    []      |  9
+     jtag               | []                                                  |  2
+     jwhois             |          ()       []                        []      | 11
+     kbd                |          []       []                                | 11
+     latrine            |                                                     |  2
+     ld                 |          []       []                                |  5
+     libc               | []       []       []                  []            | 20
+     libgpewidget       | []    [] []                    []                   | 13
+     libiconv           | [] [] [] []       [] []        []     []            | 27
+     lifelines          |          []                                         |  2
+     lilypond           |          []                                         |  3
+     lingoteach         |                                                     |  2
+     lingoteach_lessons |                                       ()            |  0
+     lynx               |          []       [] []                             | 14
+     m4                 |          []                           []            | 15
+     mailutils          |                                                     |  5
+     make               |          []       []                  []            | 16
+     man-db             |          []                                         |  5
+     minicom            |                                                     | 11
+     mysecretdiary      |          []       []                                | 10
+     nano               |       [] []       [] []                             | 17
+     nano_1_0           |          []       [] []                             | 17
+     opcodes            |          []       []                                |  6
+     parted             |          []       []                  []            | 15
+     ptx                |          []       []                                | 22
+     python             |                                                     |  0
+     radius             |                                                     |  4
+     recode             |    []    []       []                                | 20
+     rpm                |          []       []                                |  9
+     screem             |          []                           []            |  2
+     scrollkeeper       | []    [] []                                         | 15
+     sed                | [] [] [] []       [] []                             | 24
+     sh-utils           |    []             []                                | 14
+     shared-mime-info   |       [] []                                         |  7
+     sharutils          |       [] []       []                        []      | 17
+     silky              | ()                                                  |  3
+     skencil            |          []                                         |  6
+     sketch             |          []                                         |  6
+     soundtracker       | []       []                                         |  7
+     sp                 |                   []                                |  3
+     tar                | [] []    []       []                  []            | 24
+     texinfo            |          []       []                  []            | 14
+     textutils          |    []    []       []                        []      | 16
+     tin                |                                                     |  1
+     tp-robot           |                                                     |  2
+     tuxpaint           | []       []       []           []     []            | 29
+     unicode-han-tra... |                                                     |  0
+     unicode-transla... |                                                     |  2
+     util-linux         |          []       []                                | 15
+     vorbis-tools       |                                                     |  8
+     wastesedge         |                                                     |  0
+     wdiff              | []       []       []                                | 18
+     wget               | [] [] [] []       [] []               []    []      | 24
+     xchat              | [] [] [] []                           []            | 15
+     xfree86_xkb_xml    | []    []          [] []               []            | 11
+     xpad               |                                                     |  5
+                        +-----------------------------------------------------+
+       63 teams           sk sl sr sv ta th tr uk ven vi wa xh zh_CN zh_TW zu
+      131 domains         47 19 28 83  0  0 59 13  1   1 11  0  22    22    0  1373
+
+   Some counters in the preceding matrix are higher than the number of
+visible blocks let us expect.  This is because a few extra PO files are
+used for implementing regional variants of languages, or language
+dialects.
+
+   For a PO file in the matrix above to be effective, the package to
+which it applies should also have been internationalized and
+distributed as such by its maintainer.  There might be an observable
+lag between the mere existence a PO file and its wide availability in a
+distribution.
+
+   If January 2004 seems to be old, you may fetch a more recent copy of
+this `ABOUT-NLS' file on most GNU archive sites.  The most up-to-date
+matrix with full percentage details can be found at
+`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
+
+Using `gettext' in new packages
+===============================
+
+If you are writing a freely available program and want to
+internationalize it you are welcome to use GNU `gettext' in your
+package.  Of course you have to respect the GNU Library General Public
+License which covers the use of the GNU `gettext' library.  This means
+in particular that even non-free programs can use `libintl' as a shared
+library, whereas only free software can use `libintl' as a static
+library or use modified versions of `libintl'.
+
+   Once the sources are changed appropriately and the setup can handle
+the use of `gettext' the only thing missing are the translations.  The
+Free Translation Project is also available for packages which are not
+developed inside the GNU project.  Therefore the information given above
+applies also for every other Free Software Project.  Contact
+`translation@iro.umontreal.ca' to make the `.pot' files available to
+the translation teams.
+
index 69c4c5c..0babb06 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2005-11-30  Werner Koch  <wk@g10code.com>
+
+       * po/: New; created by autopoint.
+       * po/Makevars: New.
+       * m4/Makefile.am: Add new m4 files.
+       * autogen.sh: Detect gettext.
+       * configure.ac: Check for gettext.
+
 2005-11-15  Werner Koch  <wk@g10code.com>
 
        * configure.ac (BUILD_TIMESTAMP): Include SVN revision.
 2005-11-15  Werner Koch  <wk@g10code.com>
 
        * configure.ac (BUILD_TIMESTAMP): Include SVN revision.
index dd29049..c64524f 100644 (file)
@@ -17,7 +17,7 @@ AUTOMAKE_OPTIONS = dist-bzip2
 EXTRA_DIST = autogen.sh
 
 
 EXTRA_DIST = autogen.sh
 
 
-SUBDIRS = src
+SUBDIRS = src po m4
 
 dist-hook:
        echo "$(VERSION)" > $(distdir)/VERSION
 
 dist-hook:
        echo "$(VERSION)" > $(distdir)/VERSION
diff --git a/NEWS b/NEWS
index a311c55..27bebc5 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,8 @@
 Noteworthy changes for version 0.9.4
 =================================================
 
 Noteworthy changes for version 0.9.4
 =================================================
 
+* Added translation framework.  Provided German translation.
+
 
 Noteworthy changes for version 0.9.3 (2005-09-29)
 =================================================
 
 Noteworthy changes for version 0.9.3 (2005-09-29)
 =================================================
index 5917c57..a5a8def 100755 (executable)
@@ -35,6 +35,9 @@ AUTOHEADER=${AUTOCONF_PREFIX}${AUTOHEADER:-autoheader}${AUTOCONF_SUFFIX}
 AUTOMAKE=${AUTOMAKE_PREFIX}${AUTOMAKE:-automake}${AUTOMAKE_SUFFIX}
 ACLOCAL=${AUTOMAKE_PREFIX}${ACLOCAL:-aclocal}${AUTOMAKE_SUFFIX}
 
 AUTOMAKE=${AUTOMAKE_PREFIX}${AUTOMAKE:-automake}${AUTOMAKE_SUFFIX}
 ACLOCAL=${AUTOMAKE_PREFIX}${ACLOCAL:-aclocal}${AUTOMAKE_SUFFIX}
 
+GETTEXT=${GETTEXT_PREFIX}${GETTEXT:-gettext}${GETTEXT_SUFFIX}
+MSGMERGE=${GETTEXT_PREFIX}${MSGMERGE:-msgmerge}${GETTEXT_SUFFIX}
+
 DIE=no
 
 # ***** W32 build script *******
 DIE=no
 
 # ***** W32 build script *******
@@ -106,6 +109,13 @@ q
 }' ${configure_ac}`
 automake_vers_num=`echo "$automake_vers" | cvtver`
 
 }' ${configure_ac}`
 automake_vers_num=`echo "$automake_vers" | cvtver`
 
+gettext_vers=`sed -n '/^AM_GNU_GETTEXT_VERSION(/ { 
+s/^.*(\(.*\))/\1/p
+q
+}' ${configure_ac}`
+gettext_vers_num=`echo "$gettext_vers" | cvtver`
+
+
 
 if [ -z "$autoconf_vers" -o -z "$automake_vers" ]
 then
 
 if [ -z "$autoconf_vers" -o -z "$automake_vers" ]
 then
@@ -120,12 +130,15 @@ fi
 if check_version $AUTOMAKE $automake_vers_num $automake_vers; then
   check_version $ACLOCAL $automake_vers_num $autoconf_vers automake
 fi
 if check_version $AUTOMAKE $automake_vers_num $automake_vers; then
   check_version $ACLOCAL $automake_vers_num $autoconf_vers automake
 fi
+if check_version $GETTEXT $gettext_vers_num $gettext_vers; then
+  check_version $MSGMERGE $gettext_vers_num $gettext_vers gettext
+fi
 
 if test "$DIE" = "yes"; then
     cat <<EOF
 
 Note that you may use alternative versions of the tools by setting 
 
 if test "$DIE" = "yes"; then
     cat <<EOF
 
 Note that you may use alternative versions of the tools by setting 
-the corresponding environment variables; see README.CVS for details.
+the corresponding environment variables; see README.SVN for details.
                    
 EOF
     exit 1
                    
 EOF
     exit 1
diff --git a/config.rpath b/config.rpath
new file mode 100755 (executable)
index 0000000..fa24bfc
--- /dev/null
@@ -0,0 +1,548 @@
+#! /bin/sh
+# Output a system dependent set of variables, describing how to set the
+# run time search path of shared libraries in an executable.
+#
+#   Copyright 1996-2003 Free Software Foundation, Inc.
+#   Taken from GNU libtool, 2001
+#   Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+#   This program is free software; you can redistribute it and/or modify
+#   it under the terms of the GNU General Public License as published by
+#   the Free Software Foundation; either version 2 of the License, or
+#   (at your option) any later version.
+#
+#   This program is distributed in the hope that it will be useful, but
+#   WITHOUT ANY WARRANTY; without even the implied warranty of
+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#   General Public License for more details.
+#
+#   You should have received a copy of the GNU General Public License
+#   along with this program; if not, write to the Free Software
+#   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+#   As a special exception to the GNU General Public License, if you
+#   distribute this file as part of a program that contains a
+#   configuration script generated by Autoconf, you may include it under
+#   the same distribution terms that you use for the rest of that program.
+#
+# The first argument passed to this file is the canonical host specification,
+#    CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or
+#    CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
+# should be set by the caller.
+#
+# The set of defined variables is at the end of this script.
+
+# Known limitations:
+# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
+#   than 256 bytes, otherwise the compiler driver will dump core. The only
+#   known workaround is to choose shorter directory names for the build
+#   directory and/or the installation directory.
+
+# All known linkers require a `.a' archive for static linking (except M$VC,
+# which needs '.lib').
+libext=a
+shrext=.so
+
+host="$1"
+host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
+
+wl=
+if test "$GCC" = yes; then
+  wl='-Wl,'
+else
+  case "$host_os" in
+    aix*)
+      wl='-Wl,'
+      ;;
+    mingw* | pw32* | os2*)
+      ;;
+    hpux9* | hpux10* | hpux11*)
+      wl='-Wl,'
+      ;;
+    irix5* | irix6* | nonstopux*)
+      wl='-Wl,'
+      ;;
+    newsos6)
+      ;;
+    linux*)
+      case $CC in
+        icc|ecc)
+          wl='-Wl,'
+          ;;
+        ccc)
+          wl='-Wl,'
+          ;;
+      esac
+      ;;
+    osf3* | osf4* | osf5*)
+      wl='-Wl,'
+      ;;
+    sco3.2v5*)
+      ;;
+    solaris*)
+      wl='-Wl,'
+      ;;
+    sunos4*)
+      wl='-Qoption ld '
+      ;;
+    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+      wl='-Wl,'
+      ;;
+    sysv4*MP*)
+      ;;
+    uts4*)
+      ;;
+  esac
+fi
+
+# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS.
+
+hardcode_libdir_flag_spec=
+hardcode_libdir_separator=
+hardcode_direct=no
+hardcode_minus_L=no
+
+case "$host_os" in
+  cygwin* | mingw* | pw32*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+esac
+
+ld_shlibs=yes
+if test "$with_gnu_ld" = yes; then
+  case "$host_os" in
+    aix3* | aix4* | aix5*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+        ld_shlibs=no
+      fi
+      ;;
+    amigaos*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+      # that the semantics of dynamic libraries on AmigaOS, at least up
+      # to version 4, is to share data among multiple programs linked
+      # with the same dynamic library.  Since this doesn't match the
+      # behavior of shared libraries on other platforms, we can use
+      # them.
+      ld_shlibs=no
+      ;;
+    beos*)
+      if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    cygwin* | mingw* | pw32*)
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec='-L$libdir'
+      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    netbsd*)
+      ;;
+    solaris* | sysv5*)
+      if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
+        ld_shlibs=no
+      elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    sunos4*)
+      hardcode_direct=yes
+      ;;
+    *)
+      if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+  esac
+  if test "$ld_shlibs" = yes; then
+    # Unlike libtool, we use -rpath here, not --rpath, since the documented
+    # option of GNU ld is called -rpath, not --rpath.
+    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+  fi
+else
+  case "$host_os" in
+    aix3*)
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      hardcode_minus_L=yes
+      if test "$GCC" = yes; then
+        # Neither direct hardcoding nor static linking is supported with a
+        # broken collect2.
+        hardcode_direct=unsupported
+      fi
+      ;;
+    aix4* | aix5*)
+      if test "$host_cpu" = ia64; then
+        # On IA64, the linker does run time linking by default, so we don't
+        # have to do anything special.
+        aix_use_runtimelinking=no
+      else
+        aix_use_runtimelinking=no
+        # Test if we are trying to use run time linking or normal
+        # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+        # need to do runtime linking.
+        case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+          for ld_flag in $LDFLAGS; do
+            if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+              aix_use_runtimelinking=yes
+              break
+            fi
+          done
+        esac
+      fi
+      hardcode_direct=yes
+      hardcode_libdir_separator=':'
+      if test "$GCC" = yes; then
+        case $host_os in aix4.[012]|aix4.[012].*)
+          collect2name=`${CC} -print-prog-name=collect2`
+          if test -f "$collect2name" && \
+            strings "$collect2name" | grep resolve_lib_name >/dev/null
+          then
+            # We have reworked collect2
+            hardcode_direct=yes
+          else
+            # We have old collect2
+            hardcode_direct=unsupported
+            hardcode_minus_L=yes
+            hardcode_libdir_flag_spec='-L$libdir'
+            hardcode_libdir_separator=
+          fi
+        esac
+      fi
+      # Begin _LT_AC_SYS_LIBPATH_AIX.
+      echo 'int main () { return 0; }' > conftest.c
+      ${CC} ${LDFLAGS} conftest.c -o conftest
+      aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+      if test -z "$aix_libpath"; then
+        aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+      fi
+      if test -z "$aix_libpath"; then
+        aix_libpath="/usr/lib:/lib"
+      fi
+      rm -f conftest.c conftest
+      # End _LT_AC_SYS_LIBPATH_AIX.
+      if test "$aix_use_runtimelinking" = yes; then
+        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+      else
+        if test "$host_cpu" = ia64; then
+          hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+        else
+          hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+        fi
+      fi
+      ;;
+    amigaos*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      # see comment about different semantics on the GNU ld section
+      ld_shlibs=no
+      ;;
+    bsdi4*)
+      ;;
+    cygwin* | mingw* | pw32*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec=' '
+      libext=lib
+      ;;
+    darwin* | rhapsody*)
+      if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then
+        hardcode_direct=no
+      fi
+      ;;
+    dgux*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      ;;
+    freebsd1*)
+      ld_shlibs=no
+      ;;
+    freebsd2.2*)
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      ;;
+    freebsd2*)
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      ;;
+    freebsd*)
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      ;;
+    hpux9*)
+      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_direct=yes
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L=yes
+      ;;
+    hpux10* | hpux11*)
+      if test "$with_gnu_ld" = no; then
+        case "$host_cpu" in
+          hppa*64*)
+            hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+            hardcode_libdir_separator=:
+            hardcode_direct=no
+            ;;
+          ia64*)
+            hardcode_libdir_flag_spec='-L$libdir'
+            hardcode_direct=no
+            # hardcode_minus_L: Not really in the search PATH,
+            # but as the default location of the library.
+            hardcode_minus_L=yes
+            ;;
+          *)
+            hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+            hardcode_libdir_separator=:
+            hardcode_direct=yes
+            # hardcode_minus_L: Not really in the search PATH,
+            # but as the default location of the library.
+            hardcode_minus_L=yes
+            ;;
+        esac
+      fi
+      ;;
+    irix5* | irix6* | nonstopux*)
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      ;;
+    netbsd*)
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      ;;
+    newsos6)
+      hardcode_direct=yes
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      ;;
+    openbsd*)
+      hardcode_direct=yes
+      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+        hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+      else
+        case "$host_os" in
+          openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+            hardcode_libdir_flag_spec='-R$libdir'
+            ;;
+          *)
+            hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+            ;;
+        esac
+      fi
+      ;;
+    os2*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      ;;
+    osf3*)
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      ;;
+    osf4* | osf5*)
+      if test "$GCC" = yes; then
+        hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      else
+        # Both cc and cxx compiler support -rpath directly
+        hardcode_libdir_flag_spec='-rpath $libdir'
+      fi
+      hardcode_libdir_separator=:
+      ;;
+    sco3.2v5*)
+      ;;
+    solaris*)
+      hardcode_libdir_flag_spec='-R$libdir'
+      ;;
+    sunos4*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      ;;
+    sysv4)
+      case $host_vendor in
+        sni)
+          hardcode_direct=yes # is this really true???
+          ;;
+        siemens)
+          hardcode_direct=no
+          ;;
+        motorola)
+          hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+          ;;
+      esac
+      ;;
+    sysv4.3*)
+      ;;
+    sysv4*MP*)
+      if test -d /usr/nec; then
+        ld_shlibs=yes
+      fi
+      ;;
+    sysv4.2uw2*)
+      hardcode_direct=yes
+      hardcode_minus_L=no
+      ;;
+    sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[78]* | unixware7*)
+      ;;
+    sysv5*)
+      hardcode_libdir_flag_spec=
+      ;;
+    uts4*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      ;;
+    *)
+      ld_shlibs=no
+      ;;
+  esac
+fi
+
+# Check dynamic linker characteristics
+# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER.
+libname_spec='lib$name'
+case "$host_os" in
+  aix3*)
+    ;;
+  aix4* | aix5*)
+    ;;
+  amigaos*)
+    ;;
+  beos*)
+    ;;
+  bsdi4*)
+    ;;
+  cygwin* | mingw* | pw32*)
+    shrext=.dll
+    ;;
+  darwin* | rhapsody*)
+    shrext=.dylib
+    ;;
+  dgux*)
+    ;;
+  freebsd1*)
+    ;;
+  freebsd*)
+    ;;
+  gnu*)
+    ;;
+  hpux9* | hpux10* | hpux11*)
+    case "$host_cpu" in
+      ia64*)
+        shrext=.so
+        ;;
+      hppa*64*)
+        shrext=.sl
+        ;;
+      *)
+        shrext=.sl
+        ;;
+    esac
+    ;;
+  irix5* | irix6* | nonstopux*)
+    case "$host_os" in
+      irix5* | nonstopux*)
+        libsuff= shlibsuff=
+        ;;
+      *)
+        case $LD in
+          *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
+          *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
+          *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
+          *) libsuff= shlibsuff= ;;
+        esac
+        ;;
+    esac
+    ;;
+  linux*oldld* | linux*aout* | linux*coff*)
+    ;;
+  linux*)
+    ;;
+  netbsd*)
+    ;;
+  newsos6)
+    ;;
+  nto-qnx)
+    ;;
+  openbsd*)
+    ;;
+  os2*)
+    libname_spec='$name'
+    shrext=.dll
+    ;;
+  osf3* | osf4* | osf5*)
+    ;;
+  sco3.2v5*)
+    ;;
+  solaris*)
+    ;;
+  sunos4*)
+    ;;
+  sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+    ;;
+  sysv4*MP*)
+    ;;
+  uts4*)
+    ;;
+esac
+
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
+shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
+escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+
+sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
+
+# How to pass a linker flag through the compiler.
+wl="$escaped_wl"
+
+# Static library suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally "so").
+shlibext="$shlibext"
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator="$hardcode_libdir_separator"
+
+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct="$hardcode_direct"
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L="$hardcode_minus_L"
+
+EOF
index 6c380a1..f0ca324 100644 (file)
@@ -60,7 +60,11 @@ AC_SUBST(BUILD_FILEVERSION)
 AH_BOTTOM([
 /* Some global constants. */
 
 AH_BOTTOM([
 /* Some global constants. */
 
-
+/* Force using of NLS for W32 even if no libintl has been found.  This is 
+   okay because we have our own gettext implementation for W32.  */
+#if defined(HAVE_W32_SYSTEM) && !defined(ENABLE_NLS)
+#define ENABLE_NLS 1
+#endif
 ])
 
 AM_MAINTAINER_MODE
 ])
 
 AM_MAINTAINER_MODE
@@ -87,7 +91,6 @@ AC_CHECK_TOOL(DLLTOOL, dlltool, :)
 AC_CHECK_TOOL(WINDRES, windres, :)
 
 
 AC_CHECK_TOOL(WINDRES, windres, :)
 
 
-try_gettext=yes
 have_dosish_system=no
 have_w32_system=no
 case "${host}" in
 have_dosish_system=no
 have_w32_system=no
 case "${host}" in
@@ -98,13 +101,8 @@ case "${host}" in
                   [set this to limit filenames to the 8.3 format])
         AC_DEFINE(HAVE_DRIVE_LETTERS,1,
                   [defined if we must run on a stupid file system])
                   [set this to limit filenames to the 8.3 format])
         AC_DEFINE(HAVE_DRIVE_LETTERS,1,
                   [defined if we must run on a stupid file system])
-        AC_DEFINE(USE_SIMPLE_GETTEXT,1,
-                  [because the Unix gettext has too much overhead on
-                   MingW32 systems and these systems lack Posix functions,
-                   we use a simplified version of gettext])
         have_dosish_system=yes
         have_w32_system=yes
         have_dosish_system=yes
         have_w32_system=yes
-        try_gettext="no"
         ;;
     *)
     AC_MSG_ERROR([[
         ;;
     *)
     AC_MSG_ERROR([[
@@ -141,6 +139,12 @@ AM_PATH_GPGME("$NEED_GPGME_API:$NEED_GPGME_VERSION",
 AM_PATH_GPG_ERROR(0.5,, AC_MSG_ERROR([libgpg-error was not found]))
 
 
 AM_PATH_GPG_ERROR(0.5,, AC_MSG_ERROR([libgpg-error was not found]))
 
 
+# Note, that autogen.sh greps for the next line.
+AM_GNU_GETTEXT_VERSION(0.12.1)
+AM_GNU_GETTEXT([external])
+# We always want NLs, despite what the above macro figures out.
+USE_NLS=yes
+
 # Checks for header files.
 AC_HEADER_STDC
 AC_CHECK_HEADERS(string.h unistd.h langinfo.h termio.h locale.h)
 # Checks for header files.
 AC_HEADER_STDC
 AC_CHECK_HEADERS(string.h unistd.h langinfo.h termio.h locale.h)
@@ -203,5 +207,7 @@ fi
 AC_CONFIG_FILES([ Makefile
 src/Makefile
 src/versioninfo.rc        
 AC_CONFIG_FILES([ Makefile
 src/Makefile
 src/versioninfo.rc        
+po/Makefile.in
+m4/Makefile
 ])
 AC_OUTPUT
 ])
 AC_OUTPUT
index e3e6744..778f192 100644 (file)
@@ -1 +1,4 @@
-EXTRA_DIST = gpgme.m4
+EXTRA_DIST = gpgme.m4 codeset.m4 gettext.m4 glibc21.m4 gpg-error.m4 \
+             iconv.m4 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 \
+             isc-posix.m4 lcmessage.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 \
+            nls.m4 po.m4 progtest.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4
diff --git a/m4/codeset.m4 b/m4/codeset.m4
new file mode 100644 (file)
index 0000000..59535eb
--- /dev/null
@@ -0,0 +1,23 @@
+# codeset.m4 serial AM1 (gettext-0.10.40)
+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([AM_LANGINFO_CODESET],
+[
+  AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
+    [AC_TRY_LINK([#include <langinfo.h>],
+      [char* cs = nl_langinfo(CODESET);],
+      am_cv_langinfo_codeset=yes,
+      am_cv_langinfo_codeset=no)
+    ])
+  if test $am_cv_langinfo_codeset = yes; then
+    AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
+      [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
+  fi
+])
diff --git a/m4/gettext.m4 b/m4/gettext.m4
new file mode 100644 (file)
index 0000000..16070b4
--- /dev/null
@@ -0,0 +1,415 @@
+# gettext.m4 serial 20 (gettext-0.12)
+dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
+
+dnl Macro to add for using GNU gettext.
+
+dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
+dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
+dnl    default (if it is not specified or empty) is 'no-libtool'.
+dnl    INTLSYMBOL should be 'external' for packages with no intl directory,
+dnl    and 'no-libtool' or 'use-libtool' for packages with an intl directory.
+dnl    If INTLSYMBOL is 'use-libtool', then a libtool library
+dnl    $(top_builddir)/intl/libintl.la will be created (shared and/or static,
+dnl    depending on --{enable,disable}-{shared,static} and on the presence of
+dnl    AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
+dnl    $(top_builddir)/intl/libintl.a will be created.
+dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
+dnl    implementations (in libc or libintl) without the ngettext() function
+dnl    will be ignored.  If NEEDSYMBOL is specified and is
+dnl    'need-formatstring-macros', then GNU gettext implementations that don't
+dnl    support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
+dnl INTLDIR is used to find the intl libraries.  If empty,
+dnl    the value `$(top_builddir)/intl/' is used.
+dnl
+dnl The result of the configuration is one of three cases:
+dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
+dnl    and used.
+dnl    Catalog format: GNU --> install in $(datadir)
+dnl    Catalog extension: .mo after installation, .gmo in source tree
+dnl 2) GNU gettext has been found in the system's C library.
+dnl    Catalog format: GNU --> install in $(datadir)
+dnl    Catalog extension: .mo after installation, .gmo in source tree
+dnl 3) No internationalization, always use English msgid.
+dnl    Catalog format: none
+dnl    Catalog extension: none
+dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
+dnl The use of .gmo is historical (it was needed to avoid overwriting the
+dnl GNU format catalogs when building on a platform with an X/Open gettext),
+dnl but we keep it in order not to force irrelevant filename changes on the
+dnl maintainers.
+dnl
+AC_DEFUN([AM_GNU_GETTEXT],
+[
+  dnl Argument checking.
+  ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
+    [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
+])])])])])
+  ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
+    [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
+])])])])
+  define(gt_included_intl, ifelse([$1], [external], [no], [yes]))
+  define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
+
+  AC_REQUIRE([AM_PO_SUBDIRS])dnl
+  ifelse(gt_included_intl, yes, [
+    AC_REQUIRE([AM_INTL_SUBDIR])dnl
+  ])
+
+  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  AC_REQUIRE([AC_LIB_RPATH])
+
+  dnl Sometimes libintl requires libiconv, so first search for libiconv.
+  dnl Ideally we would do this search only after the
+  dnl      if test "$USE_NLS" = "yes"; then
+  dnl        if test "$gt_cv_func_gnugettext_libc" != "yes"; then
+  dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
+  dnl the configure script would need to contain the same shell code
+  dnl again, outside any 'if'. There are two solutions:
+  dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
+  dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
+  dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
+  dnl documented, we avoid it.
+  ifelse(gt_included_intl, yes, , [
+    AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+  ])
+
+  dnl Set USE_NLS.
+  AM_NLS
+
+  ifelse(gt_included_intl, yes, [
+    BUILD_INCLUDED_LIBINTL=no
+    USE_INCLUDED_LIBINTL=no
+  ])
+  LIBINTL=
+  LTLIBINTL=
+  POSUB=
+
+  dnl If we use NLS figure out what method
+  if test "$USE_NLS" = "yes"; then
+    gt_use_preinstalled_gnugettext=no
+    ifelse(gt_included_intl, yes, [
+      AC_MSG_CHECKING([whether included gettext is requested])
+      AC_ARG_WITH(included-gettext,
+        [  --with-included-gettext use the GNU gettext library included here],
+        nls_cv_force_use_gnu_gettext=$withval,
+        nls_cv_force_use_gnu_gettext=no)
+      AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
+
+      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+    ])
+        dnl User does not insist on using GNU NLS library.  Figure out what
+        dnl to use.  If GNU gettext is available we use this.  Else we have
+        dnl to fall back to GNU NLS library.
+
+        dnl Add a version number to the cache macros.
+        define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
+        define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
+        define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
+
+        AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
+         [AC_TRY_LINK([#include <libintl.h>
+]ifelse([$2], [need-formatstring-macros],
+[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+changequote(,)dnl
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+changequote([,])dnl
+], [])[extern int _nl_msg_cat_cntr;
+extern int *_nl_domain_bindings;],
+            [bindtextdomain ("", "");
+return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
+            gt_cv_func_gnugettext_libc=yes,
+            gt_cv_func_gnugettext_libc=no)])
+
+        if test "$gt_cv_func_gnugettext_libc" != "yes"; then
+          dnl Sometimes libintl requires libiconv, so first search for libiconv.
+          ifelse(gt_included_intl, yes, , [
+            AM_ICONV_LINK
+          ])
+          dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
+          dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
+          dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
+          dnl even if libiconv doesn't exist.
+          AC_LIB_LINKFLAGS_BODY([intl])
+          AC_CACHE_CHECK([for GNU gettext in libintl],
+            gt_cv_func_gnugettext_libintl,
+           [gt_save_CPPFLAGS="$CPPFLAGS"
+            CPPFLAGS="$CPPFLAGS $INCINTL"
+            gt_save_LIBS="$LIBS"
+            LIBS="$LIBS $LIBINTL"
+            dnl Now see whether libintl exists and does not depend on libiconv.
+            AC_TRY_LINK([#include <libintl.h>
+]ifelse([$2], [need-formatstring-macros],
+[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+changequote(,)dnl
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+changequote([,])dnl
+], [])[extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias ();],
+              [bindtextdomain ("", "");
+return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
+              gt_cv_func_gnugettext_libintl=yes,
+              gt_cv_func_gnugettext_libintl=no)
+            dnl Now see whether libintl exists and depends on libiconv.
+            if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
+              LIBS="$LIBS $LIBICONV"
+              AC_TRY_LINK([#include <libintl.h>
+]ifelse([$2], [need-formatstring-macros],
+[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+changequote(,)dnl
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+changequote([,])dnl
+], [])[extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias ();],
+                [bindtextdomain ("", "");
+return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
+               [LIBINTL="$LIBINTL $LIBICONV"
+                LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+                gt_cv_func_gnugettext_libintl=yes
+               ])
+            fi
+            CPPFLAGS="$gt_save_CPPFLAGS"
+            LIBS="$gt_save_LIBS"])
+        fi
+
+        dnl If an already present or preinstalled GNU gettext() is found,
+        dnl use it.  But if this macro is used in GNU gettext, and GNU
+        dnl gettext is already preinstalled in libintl, we update this
+        dnl libintl.  (Cf. the install rule in intl/Makefile.in.)
+        if test "$gt_cv_func_gnugettext_libc" = "yes" \
+           || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
+                && test "$PACKAGE" != gettext-runtime \
+                && test "$PACKAGE" != gettext-tools; }; then
+          gt_use_preinstalled_gnugettext=yes
+        else
+          dnl Reset the values set by searching for libintl.
+          LIBINTL=
+          LTLIBINTL=
+          INCINTL=
+        fi
+
+    ifelse(gt_included_intl, yes, [
+        if test "$gt_use_preinstalled_gnugettext" != "yes"; then
+          dnl GNU gettext is not found in the C library.
+          dnl Fall back on included GNU gettext library.
+          nls_cv_use_gnu_gettext=yes
+        fi
+      fi
+
+      if test "$nls_cv_use_gnu_gettext" = "yes"; then
+        dnl Mark actions used to generate GNU NLS library.
+        BUILD_INCLUDED_LIBINTL=yes
+        USE_INCLUDED_LIBINTL=yes
+        LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
+        LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
+        LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
+      fi
+
+      if test "$gt_use_preinstalled_gnugettext" = "yes" \
+         || test "$nls_cv_use_gnu_gettext" = "yes"; then
+        dnl Mark actions to use GNU gettext tools.
+        CATOBJEXT=.gmo
+      fi
+    ])
+
+    if test "$gt_use_preinstalled_gnugettext" = "yes" \
+       || test "$nls_cv_use_gnu_gettext" = "yes"; then
+      AC_DEFINE(ENABLE_NLS, 1,
+        [Define to 1 if translation of program messages to the user's native language
+   is requested.])
+    else
+      USE_NLS=no
+    fi
+  fi
+
+  AC_MSG_CHECKING([whether to use NLS])
+  AC_MSG_RESULT([$USE_NLS])
+  if test "$USE_NLS" = "yes"; then
+    AC_MSG_CHECKING([where the gettext function comes from])
+    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+      if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
+        gt_source="external libintl"
+      else
+        gt_source="libc"
+      fi
+    else
+      gt_source="included intl directory"
+    fi
+    AC_MSG_RESULT([$gt_source])
+  fi
+
+  if test "$USE_NLS" = "yes"; then
+
+    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+      if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
+        AC_MSG_CHECKING([how to link with libintl])
+        AC_MSG_RESULT([$LIBINTL])
+        AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
+      fi
+
+      dnl For backward compatibility. Some packages may be using this.
+      AC_DEFINE(HAVE_GETTEXT, 1,
+       [Define if the GNU gettext() function is already present or preinstalled.])
+      AC_DEFINE(HAVE_DCGETTEXT, 1,
+       [Define if the GNU dcgettext() function is already present or preinstalled.])
+    fi
+
+    dnl We need to process the po/ directory.
+    POSUB=po
+  fi
+
+  ifelse(gt_included_intl, yes, [
+    dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
+    dnl to 'yes' because some of the testsuite requires it.
+    if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
+      BUILD_INCLUDED_LIBINTL=yes
+    fi
+
+    dnl Make all variables we use known to autoconf.
+    AC_SUBST(BUILD_INCLUDED_LIBINTL)
+    AC_SUBST(USE_INCLUDED_LIBINTL)
+    AC_SUBST(CATOBJEXT)
+
+    dnl For backward compatibility. Some configure.ins may be using this.
+    nls_cv_header_intl=
+    nls_cv_header_libgt=
+
+    dnl For backward compatibility. Some Makefiles may be using this.
+    DATADIRNAME=share
+    AC_SUBST(DATADIRNAME)
+
+    dnl For backward compatibility. Some Makefiles may be using this.
+    INSTOBJEXT=.mo
+    AC_SUBST(INSTOBJEXT)
+
+    dnl For backward compatibility. Some Makefiles may be using this.
+    GENCAT=gencat
+    AC_SUBST(GENCAT)
+
+    dnl For backward compatibility. Some Makefiles may be using this.
+    if test "$USE_INCLUDED_LIBINTL" = yes; then
+      INTLOBJS="\$(GETTOBJS)"
+    fi
+    AC_SUBST(INTLOBJS)
+
+    dnl Enable libtool support if the surrounding package wishes it.
+    INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
+    AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
+  ])
+
+  dnl For backward compatibility. Some Makefiles may be using this.
+  INTLLIBS="$LIBINTL"
+  AC_SUBST(INTLLIBS)
+
+  dnl Make all documented variables known to autoconf.
+  AC_SUBST(LIBINTL)
+  AC_SUBST(LTLIBINTL)
+  AC_SUBST(POSUB)
+])
+
+
+dnl Checks for all prerequisites of the intl subdirectory,
+dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
+dnl            USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
+AC_DEFUN([AM_INTL_SUBDIR],
+[
+  AC_REQUIRE([AC_PROG_INSTALL])dnl
+  AC_REQUIRE([AM_MKINSTALLDIRS])dnl
+  AC_REQUIRE([AC_PROG_CC])dnl
+  AC_REQUIRE([AC_CANONICAL_HOST])dnl
+  AC_REQUIRE([AC_PROG_RANLIB])dnl
+  AC_REQUIRE([AC_ISC_POSIX])dnl
+  AC_REQUIRE([AC_HEADER_STDC])dnl
+  AC_REQUIRE([AC_C_CONST])dnl
+  AC_REQUIRE([AC_C_INLINE])dnl
+  AC_REQUIRE([AC_TYPE_OFF_T])dnl
+  AC_REQUIRE([AC_TYPE_SIZE_T])dnl
+  AC_REQUIRE([AC_FUNC_ALLOCA])dnl
+  AC_REQUIRE([AC_FUNC_MMAP])dnl
+  AC_REQUIRE([jm_GLIBC21])dnl
+  AC_REQUIRE([gt_INTDIV0])dnl
+  AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl
+  AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
+  AC_REQUIRE([gt_INTTYPES_PRI])dnl
+
+  AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
+stdlib.h string.h unistd.h sys/param.h])
+  AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
+geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \
+strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next \
+__fsetlocking])
+
+  AM_ICONV
+  AM_LANGINFO_CODESET
+  if test $ac_cv_header_locale_h = yes; then
+    AM_LC_MESSAGES
+  fi
+
+  dnl intl/plural.c is generated from intl/plural.y. It requires bison,
+  dnl because plural.y uses bison specific features. It requires at least
+  dnl bison-1.26 because earlier versions generate a plural.c that doesn't
+  dnl compile.
+  dnl bison is only needed for the maintainer (who touches plural.y). But in
+  dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
+  dnl the rule in general Makefile. Now, some people carelessly touch the
+  dnl files or have a broken "make" program, hence the plural.c rule will
+  dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
+  dnl present or too old.
+  AC_CHECK_PROGS([INTLBISON], [bison])
+  if test -z "$INTLBISON"; then
+    ac_verc_fail=yes
+  else
+    dnl Found it, now check the version.
+    AC_MSG_CHECKING([version of bison])
+changequote(<<,>>)dnl
+    ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
+    case $ac_prog_version in
+      '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+      1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
+changequote([,])dnl
+         ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+      *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+    esac
+    AC_MSG_RESULT([$ac_prog_version])
+  fi
+  if test $ac_verc_fail = yes; then
+    INTLBISON=:
+  fi
+])
+
+
+dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
+AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
diff --git a/m4/glibc21.m4 b/m4/glibc21.m4
new file mode 100644 (file)
index 0000000..9c9f3db
--- /dev/null
@@ -0,0 +1,32 @@
+# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+# Test for the GNU C Library, version 2.1 or newer.
+# From Bruno Haible.
+
+AC_DEFUN([jm_GLIBC21],
+  [
+    AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
+      ac_cv_gnu_library_2_1,
+      [AC_EGREP_CPP([Lucky GNU user],
+       [
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
+  Lucky GNU user
+ #endif
+#endif
+       ],
+       ac_cv_gnu_library_2_1=yes,
+       ac_cv_gnu_library_2_1=no)
+      ]
+    )
+    AC_SUBST(GLIBC21)
+    GLIBC21="$ac_cv_gnu_library_2_1"
+  ]
+)
diff --git a/m4/iconv.m4 b/m4/iconv.m4
new file mode 100644 (file)
index 0000000..c5f3579
--- /dev/null
@@ -0,0 +1,103 @@
+# iconv.m4 serial AM4 (gettext-0.11.3)
+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
+[
+  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  AC_REQUIRE([AC_LIB_RPATH])
+
+  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+  dnl accordingly.
+  AC_LIB_LINKFLAGS_BODY([iconv])
+])
+
+AC_DEFUN([AM_ICONV_LINK],
+[
+  dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+  dnl those with the standalone portable GNU libiconv installed).
+
+  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+  dnl accordingly.
+  AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+
+  dnl Add $INCICONV to CPPFLAGS before performing the following checks,
+  dnl because if the user has installed libiconv and not disabled its use
+  dnl via --without-libiconv-prefix, he wants to use it. The first
+  dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
+  am_save_CPPFLAGS="$CPPFLAGS"
+  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
+
+  AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
+    am_cv_func_iconv="no, consider installing GNU libiconv"
+    am_cv_lib_iconv=no
+    AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+      [iconv_t cd = iconv_open("","");
+       iconv(cd,NULL,NULL,NULL,NULL);
+       iconv_close(cd);],
+      am_cv_func_iconv=yes)
+    if test "$am_cv_func_iconv" != yes; then
+      am_save_LIBS="$LIBS"
+      LIBS="$LIBS $LIBICONV"
+      AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+        [iconv_t cd = iconv_open("","");
+         iconv(cd,NULL,NULL,NULL,NULL);
+         iconv_close(cd);],
+        am_cv_lib_iconv=yes
+        am_cv_func_iconv=yes)
+      LIBS="$am_save_LIBS"
+    fi
+  ])
+  if test "$am_cv_func_iconv" = yes; then
+    AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
+  fi
+  if test "$am_cv_lib_iconv" = yes; then
+    AC_MSG_CHECKING([how to link with libiconv])
+    AC_MSG_RESULT([$LIBICONV])
+  else
+    dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
+    dnl either.
+    CPPFLAGS="$am_save_CPPFLAGS"
+    LIBICONV=
+    LTLIBICONV=
+  fi
+  AC_SUBST(LIBICONV)
+  AC_SUBST(LTLIBICONV)
+])
+
+AC_DEFUN([AM_ICONV],
+[
+  AM_ICONV_LINK
+  if test "$am_cv_func_iconv" = yes; then
+    AC_MSG_CHECKING([for iconv declaration])
+    AC_CACHE_VAL(am_cv_proto_iconv, [
+      AC_TRY_COMPILE([
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
+      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);"])
+    am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+    AC_MSG_RESULT([$]{ac_t:-
+         }[$]am_cv_proto_iconv)
+    AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
+      [Define as const if the declaration of iconv() needs const.])
+  fi
+])
diff --git a/m4/intdiv0.m4 b/m4/intdiv0.m4
new file mode 100644 (file)
index 0000000..55dddcf
--- /dev/null
@@ -0,0 +1,72 @@
+# intdiv0.m4 serial 1 (gettext-0.11.3)
+dnl Copyright (C) 2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([gt_INTDIV0],
+[
+  AC_REQUIRE([AC_PROG_CC])dnl
+  AC_REQUIRE([AC_CANONICAL_HOST])dnl
+
+  AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
+    gt_cv_int_divbyzero_sigfpe,
+    [
+      AC_TRY_RUN([
+#include <stdlib.h>
+#include <signal.h>
+
+static void
+#ifdef __cplusplus
+sigfpe_handler (int sig)
+#else
+sigfpe_handler (sig) int sig;
+#endif
+{
+  /* Exit with code 0 if SIGFPE, with code 1 if any other signal.  */
+  exit (sig != SIGFPE);
+}
+
+int x = 1;
+int y = 0;
+int z;
+int nan;
+
+int main ()
+{
+  signal (SIGFPE, sigfpe_handler);
+/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP.  */
+#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
+  signal (SIGTRAP, sigfpe_handler);
+#endif
+/* Linux/SPARC yields signal SIGILL.  */
+#if defined (__sparc__) && defined (__linux__)
+  signal (SIGILL, sigfpe_handler);
+#endif
+
+  z = x / y;
+  nan = y / y;
+  exit (1);
+}
+], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
+        [
+          # Guess based on the CPU.
+          case "$host_cpu" in
+            alpha* | i[34567]86 | m68k | s390*)
+              gt_cv_int_divbyzero_sigfpe="guessing yes";;
+            *)
+              gt_cv_int_divbyzero_sigfpe="guessing no";;
+          esac
+        ])
+    ])
+  case "$gt_cv_int_divbyzero_sigfpe" in
+    *yes) value=1;;
+    *) value=0;;
+  esac
+  AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
+    [Define if integer division by zero raises signal SIGFPE.])
+])
diff --git a/m4/inttypes-pri.m4 b/m4/inttypes-pri.m4
new file mode 100644 (file)
index 0000000..fd007c3
--- /dev/null
@@ -0,0 +1,32 @@
+# inttypes-pri.m4 serial 1 (gettext-0.11.4)
+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
+# macros to non-string values.  This is the case on AIX 4.3.3.
+
+AC_DEFUN([gt_INTTYPES_PRI],
+[
+  AC_REQUIRE([gt_HEADER_INTTYPES_H])
+  if test $gt_cv_header_inttypes_h = yes; then
+    AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
+      gt_cv_inttypes_pri_broken,
+      [
+        AC_TRY_COMPILE([#include <inttypes.h>
+#ifdef PRId32
+char *p = PRId32;
+#endif
+], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
+      ])
+  fi
+  if test "$gt_cv_inttypes_pri_broken" = yes; then
+    AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
+      [Define if <inttypes.h> exists and defines unusable PRI* macros.])
+  fi
+])
diff --git a/m4/inttypes.m4 b/m4/inttypes.m4
new file mode 100644 (file)
index 0000000..ab370ff
--- /dev/null
@@ -0,0 +1,27 @@
+# inttypes.m4 serial 1 (gettext-0.11.4)
+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Paul Eggert.
+
+# Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
+# <sys/types.h>.
+
+AC_DEFUN([gt_HEADER_INTTYPES_H],
+[
+  AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
+  [
+    AC_TRY_COMPILE(
+      [#include <sys/types.h>
+#include <inttypes.h>],
+      [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
+  ])
+  if test $gt_cv_header_inttypes_h = yes; then
+    AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
+      [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
+  fi
+])
diff --git a/m4/inttypes_h.m4 b/m4/inttypes_h.m4
new file mode 100644 (file)
index 0000000..f342eba
--- /dev/null
@@ -0,0 +1,28 @@
+# inttypes_h.m4 serial 5 (gettext-0.12)
+dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Paul Eggert.
+
+# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
+# doesn't clash with <sys/types.h>, and declares uintmax_t.
+
+AC_DEFUN([jm_AC_HEADER_INTTYPES_H],
+[
+  AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
+  [AC_TRY_COMPILE(
+    [#include <sys/types.h>
+#include <inttypes.h>],
+    [uintmax_t i = (uintmax_t) -1;],
+    jm_ac_cv_header_inttypes_h=yes,
+    jm_ac_cv_header_inttypes_h=no)])
+  if test $jm_ac_cv_header_inttypes_h = yes; then
+    AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
+      [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
+       and declares uintmax_t. ])
+  fi
+])
diff --git a/m4/isc-posix.m4 b/m4/isc-posix.m4
new file mode 100644 (file)
index 0000000..1319dd1
--- /dev/null
@@ -0,0 +1,26 @@
+# isc-posix.m4 serial 2 (gettext-0.11.2)
+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+# This file is not needed with autoconf-2.53 and newer.  Remove it in 2005.
+
+# This test replaces the one in autoconf.
+# Currently this macro should have the same name as the autoconf macro
+# because gettext's gettext.m4 (distributed in the automake package)
+# still uses it.  Otherwise, the use in gettext.m4 makes autoheader
+# give these diagnostics:
+#   configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
+#   configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
+
+undefine([AC_ISC_POSIX])
+
+AC_DEFUN([AC_ISC_POSIX],
+  [
+    dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
+    AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
+  ]
+)
diff --git a/m4/lcmessage.m4 b/m4/lcmessage.m4
new file mode 100644 (file)
index 0000000..ffd4008
--- /dev/null
@@ -0,0 +1,32 @@
+# lcmessage.m4 serial 3 (gettext-0.11.3)
+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl   Ulrich Drepper <drepper@cygnus.com>, 1995.
+
+# Check whether LC_MESSAGES is available in <locale.h>.
+
+AC_DEFUN([AM_LC_MESSAGES],
+[
+  AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
+    [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
+       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
+  if test $am_cv_val_LC_MESSAGES = yes; then
+    AC_DEFINE(HAVE_LC_MESSAGES, 1,
+      [Define if your <locale.h> file defines LC_MESSAGES.])
+  fi
+])
diff --git a/m4/lib-ld.m4 b/m4/lib-ld.m4
new file mode 100644 (file)
index 0000000..11d0ce7
--- /dev/null
@@ -0,0 +1,110 @@
+# lib-ld.m4 serial 2 (gettext-0.12)
+dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl Subroutines of libtool.m4,
+dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
+dnl with libtool.m4.
+
+dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
+AC_DEFUN([AC_LIB_PROG_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+  acl_cv_prog_gnu_ld=yes
+else
+  acl_cv_prog_gnu_ld=no
+fi])
+with_gnu_ld=$acl_cv_prog_gnu_ld
+])
+
+dnl From libtool-1.4. Sets the variable LD.
+AC_DEFUN([AC_LIB_PROG_LD],
+[AC_ARG_WITH(gnu-ld,
+[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
+test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  AC_MSG_CHECKING([for ld used by GCC])
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [[\\/]* | [A-Za-z]:[\\/]*)]
+      [re_direlt='/[^/][^/]*/\.\./']
+      # Canonicalize the path of ld
+      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+       ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  AC_MSG_CHECKING([for GNU ld])
+else
+  AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(acl_cv_path_LD,
+[if test -z "$LD"; then
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      acl_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some GNU ld's only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+       test "$with_gnu_ld" != no && break
+      else
+       test "$with_gnu_ld" != yes && break
+      fi
+    fi
+  done
+  IFS="$ac_save_ifs"
+else
+  acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$acl_cv_path_LD"
+if test -n "$LD"; then
+  AC_MSG_RESULT($LD)
+else
+  AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_LIB_PROG_LD_GNU
+])
diff --git a/m4/lib-link.m4 b/m4/lib-link.m4
new file mode 100644 (file)
index 0000000..eeb200d
--- /dev/null
@@ -0,0 +1,551 @@
+# lib-link.m4 serial 4 (gettext-0.12)
+dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
+dnl augments the CPPFLAGS variable.
+AC_DEFUN([AC_LIB_LINKFLAGS],
+[
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  AC_REQUIRE([AC_LIB_RPATH])
+  define([Name],[translit([$1],[./-], [___])])
+  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+  AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
+    AC_LIB_LINKFLAGS_BODY([$1], [$2])
+    ac_cv_lib[]Name[]_libs="$LIB[]NAME"
+    ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
+    ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
+  ])
+  LIB[]NAME="$ac_cv_lib[]Name[]_libs"
+  LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
+  INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
+  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+  AC_SUBST([LIB]NAME)
+  AC_SUBST([LTLIB]NAME)
+  dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
+  dnl results of this search when this library appears as a dependency.
+  HAVE_LIB[]NAME=yes
+  undefine([Name])
+  undefine([NAME])
+])
+
+dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
+dnl searches for libname and the libraries corresponding to explicit and
+dnl implicit dependencies, together with the specified include files and
+dnl the ability to compile and link the specified testcode. If found, it
+dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
+dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
+dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
+dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
+AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
+[
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  AC_REQUIRE([AC_LIB_RPATH])
+  define([Name],[translit([$1],[./-], [___])])
+  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+
+  dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
+  dnl accordingly.
+  AC_LIB_LINKFLAGS_BODY([$1], [$2])
+
+  dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
+  dnl because if the user has installed lib[]Name and not disabled its use
+  dnl via --without-lib[]Name-prefix, he wants to use it.
+  ac_save_CPPFLAGS="$CPPFLAGS"
+  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+
+  AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
+    ac_save_LIBS="$LIBS"
+    LIBS="$LIBS $LIB[]NAME"
+    AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
+    LIBS="$ac_save_LIBS"
+  ])
+  if test "$ac_cv_lib[]Name" = yes; then
+    HAVE_LIB[]NAME=yes
+    AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
+    AC_MSG_CHECKING([how to link with lib[]$1])
+    AC_MSG_RESULT([$LIB[]NAME])
+  else
+    HAVE_LIB[]NAME=no
+    dnl If $LIB[]NAME didn't lead to a usable library, we don't need
+    dnl $INC[]NAME either.
+    CPPFLAGS="$ac_save_CPPFLAGS"
+    LIB[]NAME=
+    LTLIB[]NAME=
+  fi
+  AC_SUBST([HAVE_LIB]NAME)
+  AC_SUBST([LIB]NAME)
+  AC_SUBST([LTLIB]NAME)
+  undefine([Name])
+  undefine([NAME])
+])
+
+dnl Determine the platform dependent parameters needed to use rpath:
+dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
+dnl hardcode_direct, hardcode_minus_L.
+AC_DEFUN([AC_LIB_RPATH],
+[
+  AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
+  AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
+  AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
+  AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
+  AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
+    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+    . ./conftest.sh
+    rm -f ./conftest.sh
+    acl_cv_rpath=done
+  ])
+  wl="$acl_cv_wl"
+  libext="$acl_cv_libext"
+  shlibext="$acl_cv_shlibext"
+  hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+  hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+  hardcode_direct="$acl_cv_hardcode_direct"
+  hardcode_minus_L="$acl_cv_hardcode_minus_L"
+  dnl Determine whether the user wants rpath handling at all.
+  AC_ARG_ENABLE(rpath,
+    [  --disable-rpath         do not hardcode runtime library paths],
+    :, enable_rpath=yes)
+])
+
+dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
+AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
+[
+  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+  dnl By default, look in $includedir and $libdir.
+  use_additional=yes
+  AC_LIB_WITH_FINAL_PREFIX([
+    eval additional_includedir=\"$includedir\"
+    eval additional_libdir=\"$libdir\"
+  ])
+  AC_LIB_ARG_WITH([lib$1-prefix],
+[  --with-lib$1-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib
+  --without-lib$1-prefix     don't search for lib$1 in includedir and libdir],
+[
+    if test "X$withval" = "Xno"; then
+      use_additional=no
+    else
+      if test "X$withval" = "X"; then
+        AC_LIB_WITH_FINAL_PREFIX([
+          eval additional_includedir=\"$includedir\"
+          eval additional_libdir=\"$libdir\"
+        ])
+      else
+        additional_includedir="$withval/include"
+        additional_libdir="$withval/lib"
+      fi
+    fi
+])
+  dnl Search the library and its dependencies in $additional_libdir and
+  dnl $LDFLAGS. Using breadth-first-seach.
+  LIB[]NAME=
+  LTLIB[]NAME=
+  INC[]NAME=
+  rpathdirs=
+  ltrpathdirs=
+  names_already_handled=
+  names_next_round='$1 $2'
+  while test -n "$names_next_round"; do
+    names_this_round="$names_next_round"
+    names_next_round=
+    for name in $names_this_round; do
+      already_handled=
+      for n in $names_already_handled; do
+        if test "$n" = "$name"; then
+          already_handled=yes
+          break
+        fi
+      done
+      if test -z "$already_handled"; then
+        names_already_handled="$names_already_handled $name"
+        dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
+        dnl or AC_LIB_HAVE_LINKFLAGS call.
+        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+        eval value=\"\$HAVE_LIB$uppername\"
+        if test -n "$value"; then
+          if test "$value" = yes; then
+            eval value=\"\$LIB$uppername\"
+            test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
+            eval value=\"\$LTLIB$uppername\"
+            test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
+          else
+            dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
+            dnl that this library doesn't exist. So just drop it.
+            :
+          fi
+        else
+          dnl Search the library lib$name in $additional_libdir and $LDFLAGS
+          dnl and the already constructed $LIBNAME/$LTLIBNAME.
+          found_dir=
+          found_la=
+          found_so=
+          found_a=
+          if test $use_additional = yes; then
+            if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
+              found_dir="$additional_libdir"
+              found_so="$additional_libdir/lib$name.$shlibext"
+              if test -f "$additional_libdir/lib$name.la"; then
+                found_la="$additional_libdir/lib$name.la"
+              fi
+            else
+              if test -f "$additional_libdir/lib$name.$libext"; then
+                found_dir="$additional_libdir"
+                found_a="$additional_libdir/lib$name.$libext"
+                if test -f "$additional_libdir/lib$name.la"; then
+                  found_la="$additional_libdir/lib$name.la"
+                fi
+              fi
+            fi
+          fi
+          if test "X$found_dir" = "X"; then
+            for x in $LDFLAGS $LTLIB[]NAME; do
+              AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+              case "$x" in
+                -L*)
+                  dir=`echo "X$x" | sed -e 's/^X-L//'`
+                  if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
+                    found_dir="$dir"
+                    found_so="$dir/lib$name.$shlibext"
+                    if test -f "$dir/lib$name.la"; then
+                      found_la="$dir/lib$name.la"
+                    fi
+                  else
+                    if test -f "$dir/lib$name.$libext"; then
+                      found_dir="$dir"
+                      found_a="$dir/lib$name.$libext"
+                      if test -f "$dir/lib$name.la"; then
+                        found_la="$dir/lib$name.la"
+                      fi
+                    fi
+                  fi
+                  ;;
+              esac
+              if test "X$found_dir" != "X"; then
+                break
+              fi
+            done
+          fi
+          if test "X$found_dir" != "X"; then
+            dnl Found the library.
+            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
+            if test "X$found_so" != "X"; then
+              dnl Linking with a shared library. We attempt to hardcode its
+              dnl directory into the executable's runpath, unless it's the
+              dnl standard /usr/lib.
+              if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
+                dnl No hardcoding is needed.
+                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+              else
+                dnl Use an explicit option to hardcode DIR into the resulting
+                dnl binary.
+                dnl Potentially add DIR to ltrpathdirs.
+                dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+                haveit=
+                for x in $ltrpathdirs; do
+                  if test "X$x" = "X$found_dir"; then
+                    haveit=yes
+                    break
+                  fi
+                done
+                if test -z "$haveit"; then
+                  ltrpathdirs="$ltrpathdirs $found_dir"
+                fi
+                dnl The hardcoding into $LIBNAME is system dependent.
+                if test "$hardcode_direct" = yes; then
+                  dnl Using DIR/libNAME.so during linking hardcodes DIR into the
+                  dnl resulting binary.
+                  LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+                else
+                  if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
+                    dnl Use an explicit option to hardcode DIR into the resulting
+                    dnl binary.
+                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+                    dnl Potentially add DIR to rpathdirs.
+                    dnl The rpathdirs will be appended to $LIBNAME at the end.
+                    haveit=
+                    for x in $rpathdirs; do
+                      if test "X$x" = "X$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      rpathdirs="$rpathdirs $found_dir"
+                    fi
+                  else
+                    dnl Rely on "-L$found_dir".
+                    dnl But don't add it if it's already contained in the LDFLAGS
+                    dnl or the already constructed $LIBNAME
+                    haveit=
+                    for x in $LDFLAGS $LIB[]NAME; do
+                      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+                      if test "X$x" = "X-L$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
+                    fi
+                    if test "$hardcode_minus_L" != no; then
+                      dnl FIXME: Not sure whether we should use
+                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+                      dnl here.
+                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+                    else
+                      dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
+                      dnl here, because this doesn't fit in flags passed to the
+                      dnl compiler. So give up. No hardcoding. This affects only
+                      dnl very old systems.
+                      dnl FIXME: Not sure whether we should use
+                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+                      dnl here.
+                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+                    fi
+                  fi
+                fi
+              fi
+            else
+              if test "X$found_a" != "X"; then
+                dnl Linking with a static library.
+                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
+              else
+                dnl We shouldn't come here, but anyway it's good to have a
+                dnl fallback.
+                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
+              fi
+            fi
+            dnl Assume the include files are nearby.
+            additional_includedir=
+            case "$found_dir" in
+              */lib | */lib/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
+                additional_includedir="$basedir/include"
+                ;;
+            esac
+            if test "X$additional_includedir" != "X"; then
+              dnl Potentially add $additional_includedir to $INCNAME.
+              dnl But don't add it
+              dnl   1. if it's the standard /usr/include,
+              dnl   2. if it's /usr/local/include and we are using GCC on Linux,
+              dnl   3. if it's already present in $CPPFLAGS or the already
+              dnl      constructed $INCNAME,
+              dnl   4. if it doesn't exist as a directory.
+              if test "X$additional_includedir" != "X/usr/include"; then
+                haveit=
+                if test "X$additional_includedir" = "X/usr/local/include"; then
+                  if test -n "$GCC"; then
+                    case $host_os in
+                      linux*) haveit=yes;;
+                    esac
+                  fi
+                fi
+                if test -z "$haveit"; then
+                  for x in $CPPFLAGS $INC[]NAME; do
+                    AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+                    if test "X$x" = "X-I$additional_includedir"; then
+                      haveit=yes
+                      break
+                    fi
+                  done
+                  if test -z "$haveit"; then
+                    if test -d "$additional_includedir"; then
+                      dnl Really add $additional_includedir to $INCNAME.
+                      INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
+                    fi
+                  fi
+                fi
+              fi
+            fi
+            dnl Look for dependencies.
+            if test -n "$found_la"; then
+              dnl Read the .la file. It defines the variables
+              dnl dlname, library_names, old_library, dependency_libs, current,
+              dnl age, revision, installed, dlopen, dlpreopen, libdir.
+              save_libdir="$libdir"
+              case "$found_la" in
+                */* | *\\*) . "$found_la" ;;
+                *) . "./$found_la" ;;
+              esac
+              libdir="$save_libdir"
+              dnl We use only dependency_libs.
+              for dep in $dependency_libs; do
+                case "$dep" in
+                  -L*)
+                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+                    dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
+                    dnl But don't add it
+                    dnl   1. if it's the standard /usr/lib,
+                    dnl   2. if it's /usr/local/lib and we are using GCC on Linux,
+                    dnl   3. if it's already present in $LDFLAGS or the already
+                    dnl      constructed $LIBNAME,
+                    dnl   4. if it doesn't exist as a directory.
+                    if test "X$additional_libdir" != "X/usr/lib"; then
+                      haveit=
+                      if test "X$additional_libdir" = "X/usr/local/lib"; then
+                        if test -n "$GCC"; then
+                          case $host_os in
+                            linux*) haveit=yes;;
+                          esac
+                        fi
+                      fi
+                      if test -z "$haveit"; then
+                        haveit=
+                        for x in $LDFLAGS $LIB[]NAME; do
+                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                            dnl Really add $additional_libdir to $LIBNAME.
+                            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
+                          fi
+                        fi
+                        haveit=
+                        for x in $LDFLAGS $LTLIB[]NAME; do
+                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                            dnl Really add $additional_libdir to $LTLIBNAME.
+                            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
+                          fi
+                        fi
+                      fi
+                    fi
+                    ;;
+                  -R*)
+                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
+                    if test "$enable_rpath" != no; then
+                      dnl Potentially add DIR to rpathdirs.
+                      dnl The rpathdirs will be appended to $LIBNAME at the end.
+                      haveit=
+                      for x in $rpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        rpathdirs="$rpathdirs $dir"
+                      fi
+                      dnl Potentially add DIR to ltrpathdirs.
+                      dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+                      haveit=
+                      for x in $ltrpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        ltrpathdirs="$ltrpathdirs $dir"
+                      fi
+                    fi
+                    ;;
+                  -l*)
+                    dnl Handle this in the next round.
+                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+                    ;;
+                  *.la)
+                    dnl Handle this in the next round. Throw away the .la's
+                    dnl directory; it is already contained in a preceding -L
+                    dnl option.
+                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+                    ;;
+                  *)
+                    dnl Most likely an immediate library name.
+                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
+                    LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
+                    ;;
+                esac
+              done
+            fi
+          else
+            dnl Didn't find the library; assume it is in the system directories
+            dnl known to the linker and runtime loader. (All the system
+            dnl directories known to the linker should also be known to the
+            dnl runtime loader, otherwise the system is severely misconfigured.)
+            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
+          fi
+        fi
+      fi
+    done
+  done
+  if test "X$rpathdirs" != "X"; then
+    if test -n "$hardcode_libdir_separator"; then
+      dnl Weird platform: only the last -rpath option counts, the user must
+      dnl pass all path elements in one option. We can arrange that for a
+      dnl single library, but not when more than one $LIBNAMEs are used.
+      alldirs=
+      for found_dir in $rpathdirs; do
+        alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
+      done
+      dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
+      acl_save_libdir="$libdir"
+      libdir="$alldirs"
+      eval flag=\"$hardcode_libdir_flag_spec\"
+      libdir="$acl_save_libdir"
+      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+    else
+      dnl The -rpath options are cumulative.
+      for found_dir in $rpathdirs; do
+        acl_save_libdir="$libdir"
+        libdir="$found_dir"
+        eval flag=\"$hardcode_libdir_flag_spec\"
+        libdir="$acl_save_libdir"
+        LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+      done
+    fi
+  fi
+  if test "X$ltrpathdirs" != "X"; then
+    dnl When using libtool, the option that works for both libraries and
+    dnl executables is -R. The -R options are cumulative.
+    for found_dir in $ltrpathdirs; do
+      LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
+    done
+  fi
+])
+
+dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
+dnl unless already present in VAR.
+dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
+dnl contains two or three consecutive elements that belong together.
+AC_DEFUN([AC_LIB_APPENDTOVAR],
+[
+  for element in [$2]; do
+    haveit=
+    for x in $[$1]; do
+      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+      if test "X$x" = "X$element"; then
+        haveit=yes
+        break
+      fi
+    done
+    if test -z "$haveit"; then
+      [$1]="${[$1]}${[$1]:+ }$element"
+    fi
+  done
+])
diff --git a/m4/lib-prefix.m4 b/m4/lib-prefix.m4
new file mode 100644 (file)
index 0000000..c719bc8
--- /dev/null
@@ -0,0 +1,155 @@
+# lib-prefix.m4 serial 2 (gettext-0.12)
+dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
+dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
+dnl require excessive bracketing.
+ifdef([AC_HELP_STRING],
+[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
+[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
+
+dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
+dnl to access previously installed libraries. The basic assumption is that
+dnl a user will want packages to use other packages he previously installed
+dnl with the same --prefix option.
+dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
+dnl libraries, but is otherwise very convenient.
+AC_DEFUN([AC_LIB_PREFIX],
+[
+  AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  dnl By default, look in $includedir and $libdir.
+  use_additional=yes
+  AC_LIB_WITH_FINAL_PREFIX([
+    eval additional_includedir=\"$includedir\"
+    eval additional_libdir=\"$libdir\"
+  ])
+  AC_LIB_ARG_WITH([lib-prefix],
+[  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
+  --without-lib-prefix    don't search for libraries in includedir and libdir],
+[
+    if test "X$withval" = "Xno"; then
+      use_additional=no
+    else
+      if test "X$withval" = "X"; then
+        AC_LIB_WITH_FINAL_PREFIX([
+          eval additional_includedir=\"$includedir\"
+          eval additional_libdir=\"$libdir\"
+        ])
+      else
+        additional_includedir="$withval/include"
+        additional_libdir="$withval/lib"
+      fi
+    fi
+])
+  if test $use_additional = yes; then
+    dnl Potentially add $additional_includedir to $CPPFLAGS.
+    dnl But don't add it
+    dnl   1. if it's the standard /usr/include,
+    dnl   2. if it's already present in $CPPFLAGS,
+    dnl   3. if it's /usr/local/include and we are using GCC on Linux,
+    dnl   4. if it doesn't exist as a directory.
+    if test "X$additional_includedir" != "X/usr/include"; then
+      haveit=
+      for x in $CPPFLAGS; do
+        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+        if test "X$x" = "X-I$additional_includedir"; then
+          haveit=yes
+          break
+        fi
+      done
+      if test -z "$haveit"; then
+        if test "X$additional_includedir" = "X/usr/local/include"; then
+          if test -n "$GCC"; then
+            case $host_os in
+              linux*) haveit=yes;;
+            esac
+          fi
+        fi
+        if test -z "$haveit"; then
+          if test -d "$additional_includedir"; then
+            dnl Really add $additional_includedir to $CPPFLAGS.
+            CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
+          fi
+        fi
+      fi
+    fi
+    dnl Potentially add $additional_libdir to $LDFLAGS.
+    dnl But don't add it
+    dnl   1. if it's the standard /usr/lib,
+    dnl   2. if it's already present in $LDFLAGS,
+    dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
+    dnl   4. if it doesn't exist as a directory.
+    if test "X$additional_libdir" != "X/usr/lib"; then
+      haveit=
+      for x in $LDFLAGS; do
+        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+        if test "X$x" = "X-L$additional_libdir"; then
+          haveit=yes
+          break
+        fi
+      done
+      if test -z "$haveit"; then
+        if test "X$additional_libdir" = "X/usr/local/lib"; then
+          if test -n "$GCC"; then
+            case $host_os in
+              linux*) haveit=yes;;
+            esac
+          fi
+        fi
+        if test -z "$haveit"; then
+          if test -d "$additional_libdir"; then
+            dnl Really add $additional_libdir to $LDFLAGS.
+            LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
+          fi
+        fi
+      fi
+    fi
+  fi
+])
+
+dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
+dnl acl_final_exec_prefix, containing the values to which $prefix and
+dnl $exec_prefix will expand at the end of the configure script.
+AC_DEFUN([AC_LIB_PREPARE_PREFIX],
+[
+  dnl Unfortunately, prefix and exec_prefix get only finally determined
+  dnl at the end of configure.
+  if test "X$prefix" = "XNONE"; then
+    acl_final_prefix="$ac_default_prefix"
+  else
+    acl_final_prefix="$prefix"
+  fi
+  if test "X$exec_prefix" = "XNONE"; then
+    acl_final_exec_prefix='${prefix}'
+  else
+    acl_final_exec_prefix="$exec_prefix"
+  fi
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+  prefix="$acl_save_prefix"
+])
+
+dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
+dnl variables prefix and exec_prefix bound to the values they will have
+dnl at the end of the configure script.
+AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
+[
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  $1
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+])
diff --git a/m4/nls.m4 b/m4/nls.m4
new file mode 100644 (file)
index 0000000..36bc493
--- /dev/null
+++ b/m4/nls.m4
@@ -0,0 +1,49 @@
+# nls.m4 serial 1 (gettext-0.12)
+dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
+
+AC_DEFUN([AM_NLS],
+[
+  AC_MSG_CHECKING([whether NLS is requested])
+  dnl Default is enabled NLS
+  AC_ARG_ENABLE(nls,
+    [  --disable-nls           do not use Native Language Support],
+    USE_NLS=$enableval, USE_NLS=yes)
+  AC_MSG_RESULT($USE_NLS)
+  AC_SUBST(USE_NLS)
+])
+
+AC_DEFUN([AM_MKINSTALLDIRS],
+[
+  dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
+  dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
+  dnl Try to locate it.
+  MKINSTALLDIRS=
+  if test -n "$ac_aux_dir"; then
+    case "$ac_aux_dir" in
+      /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
+      *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
+    esac
+  fi
+  if test -z "$MKINSTALLDIRS"; then
+    MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+  fi
+  AC_SUBST(MKINSTALLDIRS)
+])
diff --git a/m4/po.m4 b/m4/po.m4
new file mode 100644 (file)
index 0000000..861e3de
--- /dev/null
+++ b/m4/po.m4
@@ -0,0 +1,197 @@
+# po.m4 serial 1 (gettext-0.12)
+dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
+
+dnl Checks for all prerequisites of the po subdirectory.
+AC_DEFUN([AM_PO_SUBDIRS],
+[
+  AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+  AC_REQUIRE([AC_PROG_INSTALL])dnl
+  AC_REQUIRE([AM_MKINSTALLDIRS])dnl
+  AC_REQUIRE([AM_NLS])dnl
+
+  dnl Perform the following tests also if --disable-nls has been given,
+  dnl because they are needed for "make dist" to work.
+
+  dnl Search for GNU msgfmt in the PATH.
+  dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
+  dnl The second test excludes FreeBSD msgfmt.
+  AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+    [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
+     (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+    :)
+  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+
+  dnl Search for GNU xgettext 0.12 or newer in the PATH.
+  dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
+  dnl The second test excludes FreeBSD xgettext.
+  AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+    [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
+     (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)],
+    :)
+  dnl Remove leftover from FreeBSD xgettext call.
+  rm -f messages.po
+
+  dnl Search for GNU msgmerge 0.11 or newer in the PATH.
+  AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
+    [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
+
+  dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
+  dnl Test whether we really found GNU msgfmt.
+  if test "$GMSGFMT" != ":"; then
+    dnl If it is no GNU msgfmt we define it as : so that the
+    dnl Makefiles still can work.
+    if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
+       (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+      : ;
+    else
+      GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
+      AC_MSG_RESULT(
+        [found $GMSGFMT program is not GNU msgfmt; ignore it])
+      GMSGFMT=":"
+    fi
+  fi
+
+  dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
+  dnl Test whether we really found GNU xgettext.
+  if test "$XGETTEXT" != ":"; then
+    dnl If it is no GNU xgettext we define it as : so that the
+    dnl Makefiles still can work.
+    if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
+       (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+      : ;
+    else
+      AC_MSG_RESULT(
+        [found xgettext program is not GNU xgettext; ignore it])
+      XGETTEXT=":"
+    fi
+    dnl Remove leftover from FreeBSD xgettext call.
+    rm -f messages.po
+  fi
+
+  AC_OUTPUT_COMMANDS([
+    for ac_file in $CONFIG_FILES; do
+      # Support "outfile[:infile[:infile...]]"
+      case "$ac_file" in
+        *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+      esac
+      # PO directories have a Makefile.in generated from Makefile.in.in.
+      case "$ac_file" in */Makefile.in)
+        # Adjust a relative srcdir.
+        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+        ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+        # In autoconf-2.13 it is called $ac_given_srcdir.
+        # In autoconf-2.50 it is called $srcdir.
+        test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+        case "$ac_given_srcdir" in
+          .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+          /*) top_srcdir="$ac_given_srcdir" ;;
+          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
+        esac
+        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+          rm -f "$ac_dir/POTFILES"
+          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
+          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[  ]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+          POMAKEFILEDEPS="POTFILES.in"
+          # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
+          # on $ac_dir but don't depend on user-specified configuration
+          # parameters.
+          if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+            # The LINGUAS file contains the set of available languages.
+            if test -n "$OBSOLETE_ALL_LINGUAS"; then
+              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+            fi
+            ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+            # Hide the ALL_LINGUAS assigment from automake.
+            eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+            POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+          else
+            # The set of available languages was given in configure.in.
+            eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
+          fi
+          case "$ac_given_srcdir" in
+            .) srcdirpre= ;;
+            *) srcdirpre='$(srcdir)/' ;;
+          esac
+          POFILES=
+          GMOFILES=
+          UPDATEPOFILES=
+          DUMMYPOFILES=
+          for lang in $ALL_LINGUAS; do
+            POFILES="$POFILES $srcdirpre$lang.po"
+            GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+            UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+            DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+          done
+          # CATALOGS depends on both $ac_dir and the user's LINGUAS
+          # environment variable.
+          INST_LINGUAS=
+          if test -n "$ALL_LINGUAS"; then
+            for presentlang in $ALL_LINGUAS; do
+              useit=no
+              if test "%UNSET%" != "$LINGUAS"; then
+                desiredlanguages="$LINGUAS"
+              else
+                desiredlanguages="$ALL_LINGUAS"
+              fi
+              for desiredlang in $desiredlanguages; do
+                # Use the presentlang catalog if desiredlang is
+                #   a. equal to presentlang, or
+                #   b. a variant of presentlang (because in this case,
+                #      presentlang can be used as a fallback for messages
+                #      which are not translated in the desiredlang catalog).
+                case "$desiredlang" in
+                  "$presentlang"*) useit=yes;;
+                esac
+              done
+              if test $useit = yes; then
+                INST_LINGUAS="$INST_LINGUAS $presentlang"
+              fi
+            done
+          fi
+          CATALOGS=
+          if test -n "$INST_LINGUAS"; then
+            for lang in $INST_LINGUAS; do
+              CATALOGS="$CATALOGS $lang.gmo"
+            done
+          fi
+          test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
+          sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+          for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
+            if test -f "$f"; then
+              case "$f" in
+                *.orig | *.bak | *~) ;;
+                *) cat "$f" >> "$ac_dir/Makefile" ;;
+              esac
+            fi
+          done
+        fi
+        ;;
+      esac
+    done],
+   [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
+    # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
+    # from automake.
+    eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
+    # Capture the value of LINGUAS because we need it to compute CATALOGS.
+    LINGUAS="${LINGUAS-%UNSET%}"
+   ])
+])
diff --git a/m4/progtest.m4 b/m4/progtest.m4
new file mode 100644 (file)
index 0000000..8fe527c
--- /dev/null
@@ -0,0 +1,91 @@
+# progtest.m4 serial 3 (gettext-0.12)
+dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl   Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+# Search path for a program which passes the given test.
+
+dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
+dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+AC_DEFUN([AM_PATH_PROG_WITH_TEST],
+[
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+  ac_executable_p="test -x"
+else
+  ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL(ac_cv_path_$1,
+[case "[$]$1" in
+  [[\\/]]* | ?:[[\\/]]*)
+    ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+    ;;
+  *)
+    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in ifelse([$5], , $PATH, [$5]); do
+      IFS="$ac_save_IFS"
+      test -z "$ac_dir" && ac_dir=.
+      for ac_exec_ext in '' $ac_executable_extensions; do
+        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+          if [$3]; then
+            ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
+            break 2
+          fi
+        fi
+      done
+    done
+    IFS="$ac_save_IFS"
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+    ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
+  AC_MSG_RESULT([$]$1)
+else
+  AC_MSG_RESULT(no)
+fi
+AC_SUBST($1)dnl
+])
diff --git a/m4/stdint_h.m4 b/m4/stdint_h.m4
new file mode 100644 (file)
index 0000000..32ba7ae
--- /dev/null
@@ -0,0 +1,28 @@
+# stdint_h.m4 serial 3 (gettext-0.12)
+dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Paul Eggert.
+
+# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
+# doesn't clash with <sys/types.h>, and declares uintmax_t.
+
+AC_DEFUN([jm_AC_HEADER_STDINT_H],
+[
+  AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h,
+  [AC_TRY_COMPILE(
+    [#include <sys/types.h>
+#include <stdint.h>],
+    [uintmax_t i = (uintmax_t) -1;],
+    jm_ac_cv_header_stdint_h=yes,
+    jm_ac_cv_header_stdint_h=no)])
+  if test $jm_ac_cv_header_stdint_h = yes; then
+    AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
+      [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
+       and declares uintmax_t. ])
+  fi
+])
diff --git a/m4/uintmax_t.m4 b/m4/uintmax_t.m4
new file mode 100644 (file)
index 0000000..b5f28d4
--- /dev/null
@@ -0,0 +1,32 @@
+# uintmax_t.m4 serial 7 (gettext-0.12)
+dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Paul Eggert.
+
+AC_PREREQ(2.13)
+
+# Define uintmax_t to 'unsigned long' or 'unsigned long long'
+# if it is not already defined in <stdint.h> or <inttypes.h>.
+
+AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
+[
+  AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
+  AC_REQUIRE([jm_AC_HEADER_STDINT_H])
+  if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
+    AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
+    test $ac_cv_type_unsigned_long_long = yes \
+      && ac_type='unsigned long long' \
+      || ac_type='unsigned long'
+    AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
+      [Define to unsigned long or unsigned long long
+       if <stdint.h> and <inttypes.h> don't define.])
+  else
+    AC_DEFINE(HAVE_UINTMAX_T, 1,
+      [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
+  fi
+])
diff --git a/m4/ulonglong.m4 b/m4/ulonglong.m4
new file mode 100644 (file)
index 0000000..c375e47
--- /dev/null
@@ -0,0 +1,23 @@
+# ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40)
+dnl Copyright (C) 1999-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Paul Eggert.
+
+AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
+[
+  AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
+  [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;],
+    [unsigned long long ullmax = (unsigned long long) -1;
+     return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
+    ac_cv_type_unsigned_long_long=yes,
+    ac_cv_type_unsigned_long_long=no)])
+  if test $ac_cv_type_unsigned_long_long = yes; then
+    AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
+      [Define if you have the unsigned long long type.])
+  fi
+])
diff --git a/mkinstalldirs b/mkinstalldirs
new file mode 100755 (executable)
index 0000000..d2d5f21
--- /dev/null
@@ -0,0 +1,111 @@
+#! /bin/sh
+# mkinstalldirs --- make directory hierarchy
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1993-05-16
+# Public domain
+
+errstatus=0
+dirmode=""
+
+usage="\
+Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
+
+# process command line arguments
+while test $# -gt 0 ; do
+  case $1 in
+    -h | --help | --h*)         # -h for help
+      echo "$usage" 1>&2
+      exit 0
+      ;;
+    -m)                         # -m PERM arg
+      shift
+      test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
+      dirmode=$1
+      shift
+      ;;
+    --)                         # stop option processing
+      shift
+      break
+      ;;
+    -*)                         # unknown option
+      echo "$usage" 1>&2
+      exit 1
+      ;;
+    *)                          # first non-opt arg
+      break
+      ;;
+  esac
+done
+
+for file
+do
+  if test -d "$file"; then
+    shift
+  else
+    break
+  fi
+done
+
+case $# in
+  0) exit 0 ;;
+esac
+
+case $dirmode in
+  '')
+    if mkdir -p -- . 2>/dev/null; then
+      echo "mkdir -p -- $*"
+      exec mkdir -p -- "$@"
+    fi
+    ;;
+  *)
+    if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
+      echo "mkdir -m $dirmode -p -- $*"
+      exec mkdir -m "$dirmode" -p -- "$@"
+    fi
+    ;;
+esac
+
+for file
+do
+  set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+  shift
+
+  pathcomp=
+  for d
+  do
+    pathcomp="$pathcomp$d"
+    case $pathcomp in
+      -*) pathcomp=./$pathcomp ;;
+    esac
+
+    if test ! -d "$pathcomp"; then
+      echo "mkdir $pathcomp"
+
+      mkdir "$pathcomp" || lasterr=$?
+
+      if test ! -d "$pathcomp"; then
+       errstatus=$lasterr
+      else
+       if test ! -z "$dirmode"; then
+         echo "chmod $dirmode $pathcomp"
+         lasterr=""
+         chmod "$dirmode" "$pathcomp" || lasterr=$?
+
+         if test ! -z "$lasterr"; then
+           errstatus=$lasterr
+         fi
+       fi
+      fi
+    fi
+
+    pathcomp="$pathcomp/"
+  done
+done
+
+exit $errstatus
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# End:
+# mkinstalldirs ends here
diff --git a/po/LINGUAS b/po/LINGUAS
new file mode 100644 (file)
index 0000000..eaa0fea
--- /dev/null
@@ -0,0 +1,4 @@
+# Set of available languages.
+de 
+
+
diff --git a/po/Makefile.in.in b/po/Makefile.in.in
new file mode 100644 (file)
index 0000000..27b721a
--- /dev/null
@@ -0,0 +1,353 @@
+# Makefile for PO directory in any package using GNU gettext.
+# Copyright (C) 1995-1997, 2000-2003 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
+#
+# This file can be copied and used freely without restrictions.  It can
+# be used in projects which are not available under the GNU General Public
+# License but which still want to provide support for the GNU gettext
+# functionality.
+# Please note that the actual code of GNU gettext is covered by the GNU
+# General Public License and is *not* in the public domain.
+
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+SHELL = /bin/sh
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+datadir = @datadir@
+localedir = $(datadir)/locale
+gettextsrcdir = $(datadir)/gettext/po
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+mkinstalldirs = $(SHELL) $(MKINSTALLDIRS)
+
+GMSGFMT = @GMSGFMT@
+MSGFMT = @MSGFMT@
+XGETTEXT = @XGETTEXT@
+MSGMERGE = msgmerge
+MSGMERGE_UPDATE = @MSGMERGE@ --update
+MSGINIT = msginit
+MSGCONV = msgconv
+MSGFILTER = msgfilter
+
+POFILES = @POFILES@
+GMOFILES = @GMOFILES@
+UPDATEPOFILES = @UPDATEPOFILES@
+DUMMYPOFILES = @DUMMYPOFILES@
+DISTFILES.common = Makefile.in.in remove-potcdate.sin \
+$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
+DISTFILES = $(DISTFILES.common) Makevars POTFILES.in $(DOMAIN).pot stamp-po \
+$(POFILES) $(GMOFILES) \
+$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
+
+POTFILES = \
+
+CATALOGS = @CATALOGS@
+
+# Makevars gets inserted here. (Don't remove this line!)
+
+.SUFFIXES:
+.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-update
+
+.po.mo:
+       @echo "$(MSGFMT) -c -o $@ $<"; \
+       $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
+
+.po.gmo:
+       @lang=`echo $* | sed -e 's,.*/,,'`; \
+       test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+       echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \
+       cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
+
+.sin.sed:
+       sed -e '/^#/d' $< > t-$@
+       mv t-$@ $@
+
+
+all: all-@USE_NLS@
+
+all-yes: stamp-po
+all-no:
+
+# stamp-po is a timestamp denoting the last time at which the CATALOGS have
+# been loosely updated. Its purpose is that when a developer or translator
+# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
+# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
+# invocations of "make" will do nothing. This timestamp would not be necessary
+# if updating the $(CATALOGS) would always touch them; however, the rule for
+# $(POFILES) has been designed to not touch files that don't need to be
+# changed.
+stamp-po: $(srcdir)/$(DOMAIN).pot
+       test -z "$(CATALOGS)" || $(MAKE) $(CATALOGS)
+       @echo "touch stamp-po"
+       @echo timestamp > stamp-poT
+       @mv stamp-poT stamp-po
+
+# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
+# otherwise packages like GCC can not be built if only parts of the source
+# have been downloaded.
+
+# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
+# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
+$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
+       $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
+         --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
+         --files-from=$(srcdir)/POTFILES.in \
+         --copyright-holder='$(COPYRIGHT_HOLDER)' \
+         --msgid-bugs-address='$(MSGID_BUGS_ADDRESS)'
+       test ! -f $(DOMAIN).po || { \
+         if test -f $(srcdir)/$(DOMAIN).pot; then \
+           sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
+           sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
+           if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
+             rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
+           else \
+             rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
+             mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
+           fi; \
+         else \
+           mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
+         fi; \
+       }
+
+# This rule has no dependencies: we don't need to update $(DOMAIN).pot at
+# every "make" invocation, only create it when it is missing.
+# Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
+$(srcdir)/$(DOMAIN).pot:
+       $(MAKE) $(DOMAIN).pot-update
+
+# This target rebuilds a PO file if $(DOMAIN).pot has changed.
+# Note that a PO file is not touched if it doesn't need to be changed.
+$(POFILES): $(srcdir)/$(DOMAIN).pot
+       @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
+       test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+       echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
+       cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot
+
+
+install: install-exec install-data
+install-exec:
+install-data: install-data-@USE_NLS@
+       if test "$(PACKAGE)" = "gettext-tools"; then \
+         $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
+         for file in $(DISTFILES.common) Makevars.template; do \
+           $(INSTALL_DATA) $(srcdir)/$$file \
+                           $(DESTDIR)$(gettextsrcdir)/$$file; \
+         done; \
+         for file in Makevars; do \
+           rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
+         done; \
+       else \
+         : ; \
+       fi
+install-data-no: all
+install-data-yes: all
+       $(mkinstalldirs) $(DESTDIR)$(datadir)
+       @catalogs='$(CATALOGS)'; \
+       for cat in $$catalogs; do \
+         cat=`basename $$cat`; \
+         lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+         dir=$(localedir)/$$lang/LC_MESSAGES; \
+         $(mkinstalldirs) $(DESTDIR)$$dir; \
+         if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
+         $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
+         echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
+         for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
+           if test -n "$$lc"; then \
+             if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
+               link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
+               mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+               mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+               (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
+                for file in *; do \
+                  if test -f $$file; then \
+                    ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
+                  fi; \
+                done); \
+               rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+             else \
+               if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
+                 :; \
+               else \
+                 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
+                 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+               fi; \
+             fi; \
+             rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+             ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
+             ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
+             cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+             echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
+           fi; \
+         done; \
+       done
+
+install-strip: install
+
+installdirs: installdirs-exec installdirs-data
+installdirs-exec:
+installdirs-data: installdirs-data-@USE_NLS@
+       if test "$(PACKAGE)" = "gettext-tools"; then \
+         $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
+       else \
+         : ; \
+       fi
+installdirs-data-no:
+installdirs-data-yes:
+       $(mkinstalldirs) $(DESTDIR)$(datadir)
+       @catalogs='$(CATALOGS)'; \
+       for cat in $$catalogs; do \
+         cat=`basename $$cat`; \
+         lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+         dir=$(localedir)/$$lang/LC_MESSAGES; \
+         $(mkinstalldirs) $(DESTDIR)$$dir; \
+         for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
+           if test -n "$$lc"; then \
+             if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
+               link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
+               mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+               mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+               (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
+                for file in *; do \
+                  if test -f $$file; then \
+                    ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
+                  fi; \
+                done); \
+               rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+             else \
+               if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
+                 :; \
+               else \
+                 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
+                 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+               fi; \
+             fi; \
+           fi; \
+         done; \
+       done
+
+# Define this as empty until I found a useful application.
+installcheck:
+
+uninstall: uninstall-exec uninstall-data
+uninstall-exec:
+uninstall-data: uninstall-data-@USE_NLS@
+       if test "$(PACKAGE)" = "gettext-tools"; then \
+         for file in $(DISTFILES.common) Makevars.template; do \
+           rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
+         done; \
+       else \
+         : ; \
+       fi
+uninstall-data-no:
+uninstall-data-yes:
+       catalogs='$(CATALOGS)'; \
+       for cat in $$catalogs; do \
+         cat=`basename $$cat`; \
+         lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+         for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
+           rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+         done; \
+       done
+
+check: all
+
+info dvi ps pdf html tags TAGS ctags CTAGS ID:
+
+mostlyclean:
+       rm -f remove-potcdate.sed
+       rm -f stamp-poT
+       rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
+       rm -fr *.o
+
+clean: mostlyclean
+
+distclean: clean
+       rm -f Makefile Makefile.in POTFILES *.mo
+
+maintainer-clean: distclean
+       @echo "This command is intended for maintainers to use;"
+       @echo "it deletes files that may require special tools to rebuild."
+       rm -f stamp-po $(GMOFILES)
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir:
+       $(MAKE) update-po
+       @$(MAKE) dist2
+# This is a separate target because 'update-po' must be executed before.
+dist2: $(DISTFILES)
+       dists="$(DISTFILES)"; \
+       if test "$(PACKAGE)" = "gettext-tools"; then \
+         dists="$$dists Makevars.template"; \
+       fi; \
+       if test -f $(srcdir)/ChangeLog; then \
+         dists="$$dists ChangeLog"; \
+       fi; \
+       for i in 0 1 2 3 4 5 6 7 8 9; do \
+         if test -f $(srcdir)/ChangeLog.$$i; then \
+           dists="$$dists ChangeLog.$$i"; \
+         fi; \
+       done; \
+       if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
+       for file in $$dists; do \
+         if test -f $$file; then \
+           cp -p $$file $(distdir); \
+         else \
+           cp -p $(srcdir)/$$file $(distdir); \
+         fi; \
+       done
+
+update-po: Makefile
+       $(MAKE) $(DOMAIN).pot-update
+       test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
+       $(MAKE) update-gmo
+
+# General rule for updating PO files.
+
+.nop.po-update:
+       @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
+       if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \
+       tmpdir=`pwd`; \
+       echo "$$lang:"; \
+       test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+       echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
+       cd $(srcdir); \
+       if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \
+         if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
+           rm -f $$tmpdir/$$lang.new.po; \
+         else \
+           if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
+             :; \
+           else \
+             echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+             exit 1; \
+           fi; \
+         fi; \
+       else \
+         echo "msgmerge for $$lang.po failed!" 1>&2; \
+         rm -f $$tmpdir/$$lang.new.po; \
+       fi
+
+$(DUMMYPOFILES):
+
+update-gmo: Makefile $(GMOFILES)
+       @:
+
+Makefile: Makefile.in.in $(top_builddir)/config.status @POMAKEFILEDEPS@
+       cd $(top_builddir) \
+         && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
+              $(SHELL) ./config.status
+
+force:
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/po/Makevars b/po/Makevars
new file mode 100644 (file)
index 0000000..adb9df6
--- /dev/null
@@ -0,0 +1,41 @@
+# Makefile variables for PO directory in any package using GNU gettext.
+
+# Usually the message domain is the same as the package name.
+DOMAIN = $(PACKAGE)
+
+# These two variables depend on the location of this directory.
+subdir = po
+top_builddir = ..
+
+# These options get passed to xgettext.
+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
+
+# This is the copyright holder that gets inserted into the header of the
+# $(DOMAIN).pot file.  Set this to the copyright holder of the surrounding
+# package.  (Note that the msgstr strings, extracted from the package's
+# sources, belong to the copyright holder of the package.)  Translators are
+# expected to transfer the copyright for their translations to this person
+# or entity, or to disclaim their copyright.  The empty string stands for
+# the public domain; in this case the translators are expected to disclaim
+# their copyright.
+COPYRIGHT_HOLDER = g10 Code GmbH
+
+# This is the email address or URL to which the translators shall report
+# bugs in the untranslated strings:
+# - Strings which are not entire sentences, see the maintainer guidelines
+#   in the GNU gettext documentation, section 'Preparing Strings'.
+# - Strings which use unclear terms or require additional context to be
+#   understood.
+# - Strings which make invalid assumptions about notation of date, time or
+#   money.
+# - Pluralisation problems.
+# - Incorrect English spelling.
+# - Incorrect formatting.
+# It can be your email address, or a mailing list address where translators
+# can write to without being subscribed, or the URL of a web page through
+# which the translators can contact you.
+MSGID_BUGS_ADDRESS = bug-gpgol@g10code.com
+
+# This is the list of locale categories, beyond LC_MESSAGES, for which the
+# message catalogs shall be used.  It is usually empty.
+EXTRA_LOCALE_CATEGORIES =
diff --git a/po/POTFILES.in b/po/POTFILES.in
new file mode 100644 (file)
index 0000000..5f6d739
--- /dev/null
@@ -0,0 +1,21 @@
+
+src/attach.cpp
+src/common.c
+src/config-dialog.c
+src/display.cpp
+src/engine-gpgme.c
+src/gpgmsg.cpp
+src/keylist.c
+src/main.c
+src/msgcache.c
+src/olflange-dlgs.cpp
+src/olflange.cpp
+src/passcache.c
+src/passphrase-dialog.c
+src/pgpmime.c
+src/recipient-dialog.c
+src/rfc822parse.c
+src/vasprintf.c
+src/verify-dialog.c
+src/w32-gettext.c
+src/watcher.cpp
diff --git a/po/Rules-quot b/po/Rules-quot
new file mode 100644 (file)
index 0000000..5f46d23
--- /dev/null
@@ -0,0 +1,42 @@
+# Special Makefile rules for English message catalogs with quotation marks.
+
+DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot
+
+.SUFFIXES: .insert-header .po-update-en
+
+en@quot.po-update: en@quot.po-update-en
+en@boldquot.po-update: en@boldquot.po-update-en
+
+.insert-header.po-update-en:
+       @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \
+       if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \
+       tmpdir=`pwd`; \
+       echo "$$lang:"; \
+       ll=`echo $$lang | sed -e 's/@.*//'`; \
+       LC_ALL=C; export LC_ALL; \
+       cd $(srcdir); \
+       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 \
+         if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
+           rm -f $$tmpdir/$$lang.new.po; \
+         else \
+           if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
+             :; \
+           else \
+             echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+             exit 1; \
+           fi; \
+         fi; \
+       else \
+         echo "creation of $$lang.po failed!" 1>&2; \
+         rm -f $$tmpdir/$$lang.new.po; \
+       fi
+
+en@quot.insert-header: insert-header.sin
+       sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header
+
+en@boldquot.insert-header: insert-header.sin
+       sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header
+
+mostlyclean: mostlyclean-quot
+mostlyclean-quot:
+       rm -f *.insert-header
diff --git a/po/boldquot.sed b/po/boldquot.sed
new file mode 100644 (file)
index 0000000..4b937aa
--- /dev/null
@@ -0,0 +1,10 @@
+s/"\([^"]*\)"/“\1”/g
+s/`\([^`']*\)'/‘\1’/g
+s/ '\([^`']*\)' / ‘\1’ /g
+s/ '\([^`']*\)'$/ ‘\1’/g
+s/^'\([^`']*\)' /‘\1’ /g
+s/“”/""/g
+s/“/“\e[1m/g
+s/”/\e[0m”/g
+s/‘/‘\e[1m/g
+s/’/\e[0m’/g
diff --git a/po/de.po b/po/de.po
new file mode 100644 (file)
index 0000000..319dc05
--- /dev/null
+++ b/po/de.po
@@ -0,0 +1,204 @@
+# de.po - German translation for GPGol
+# Copyright (C) 2005 g10 Code GmbH
+# This file is distributed under the same license as the GPGol package.
+# Werner Koch <wk@gnupg.org>, 2005.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: GPGol 0.9.4\n"
+"Report-Msgid-Bugs-To: bug-gpgol@g10code.com\n"
+"POT-Creation-Date: 2005-11-30 12:02+0100\n"
+"PO-Revision-Date: 2005-11-30 12:55+0100\n"
+"Last-Translator: Werner Koch <wk@gnupg.org>\n"
+"Language-Team: de\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: src/engine-gpgme.c:880
+msgid "Fingerprint: "
+msgstr "Fingerabdruck: "
+
+#: src/engine-gpgme.c:937
+msgid "This signature is valid\n"
+msgstr "Diese Unterschrift ist korrekt\n"
+
+#: src/engine-gpgme.c:939
+msgid "signature state is \"green\"\n"
+msgstr "Status der Unterschrift ist \"grün\"\n"
+
+#: src/engine-gpgme.c:941
+msgid "signature state is \"red\"\n"
+msgstr "Status der Unterschrift ist \"rot\"\n"
+
+#: src/engine-gpgme.c:945
+msgid "Warning: One of the keys has been revoked\n"
+msgstr "Warnung: Einer der Schlüssel wurde widerrufen\n"
+
+#: src/engine-gpgme.c:955
+msgid "Warning: The key used to create the signature expired at: "
+msgstr "Warnung: Der Schlüssel mit der diese Unterschrift erzeugt wurde verfiel am: "
+
+#: src/engine-gpgme.c:961
+msgid "Warning: At least one certification key has expired\n"
+msgstr "Warnung: Mindestens einer der Zertifizierungsschlüssel ist abgelaufen\n"
+
+#: src/engine-gpgme.c:967
+msgid "Warning: The signature expired at: "
+msgstr "Die Unterschrift verfiel am: "
+
+#: src/engine-gpgme.c:973
+msgid "Can't verify due to a missing key or certificate\n"
+msgstr "Aufrund eines fehlenden Schlüssels ist eine Überprüfung nicht möglich\n"
+
+#: src/engine-gpgme.c:977
+msgid "The CRL is not available\n"
+msgstr "Die CRL ist nicht verfügbar\n"
+
+#: src/engine-gpgme.c:983
+msgid "Available CRL is too old\n"
+msgstr "Die vorhandene CRL ist zu alt\n"
+
+#: src/engine-gpgme.c:988
+msgid "A policy requirement was not met\n"
+msgstr "Eine Richtlinie wurde nicht erfüllt\n"
+
+#: src/engine-gpgme.c:994
+msgid "A system error occured"
+msgstr "Ein Systemfehler ist aufgetreten"
+
+#: src/engine-gpgme.c:1031
+msgid ""
+"WARNING: We have NO indication whether the key belongs to the person named "
+"as shown above\n"
+msgstr "WARNUNG: Es gibt keinen Hinweis darauf, ob der Schlüssel wirklich der Person gehört, die oben angezeigt ist\n"
+
+#: src/engine-gpgme.c:1038
+msgid "WARNING: The key does NOT BELONG to the person named as shown above\n"
+msgstr "WARNUNG: Der Schlüssel gehört NICHT der Person die oben angezeigt ist\n"
+
+#: src/engine-gpgme.c:1042
+msgid ""
+"WARNING: It is NOT certain that the key belongs to the person named as shown "
+"above\n"
+msgstr "WARNING: Es ist nicht sicher, daß der Schlüssel der Person gehört, die oben angezeigt ist\n"
+
+#: src/engine-gpgme.c:1075
+msgid "Verification started at: "
+msgstr "Überprüfung begann am: "
+
+#: src/engine-gpgme.c:1080
+msgid "Verification result for: "
+msgstr "Prüfungsresultat für: "
+
+#: src/engine-gpgme.c:1081
+msgid "[unnamed part]"
+msgstr "[Unbenannter Teil]"
+
+#: src/engine-gpgme.c:1099 src/engine-gpgme.c:1129
+msgid "Good signature from: "
+msgstr "Korrekte Unterschrift von: "
+
+#: src/engine-gpgme.c:1106
+msgid "                aka: "
+msgstr "                    alias: "
+
+#: src/engine-gpgme.c:1110 src/engine-gpgme.c:1132
+msgid "            created: "
+msgstr "                  erzeugt: "
+
+#: src/engine-gpgme.c:1119
+msgid "*BAD* signature claimed to be from: "
+msgstr "*FALSCHE* Unterschrift, vorgeblich von: "
+
+#: src/engine-gpgme.c:1142
+msgid "Error checking signature"
+msgstr "Fehler beim Prüfen der Unetrschrift"
+
+#: src/engine-gpgme.c:1158
+msgid "*** Begin Notation (signature by: "
+msgstr "*** Anfang Notation (Unterschrift von: "
+
+#: src/engine-gpgme.c:1178
+msgid "*** End Notation ***\n"
+msgstr "*** Ende Notation ***\n"
+
+#: src/gpgmsg.cpp:804
+msgid "[No attestation computed (e.g. messages was not signed)"
+msgstr "[Kein Testat berechnet (z.B. da die Nachricht nicht unterschrieben war)"
+
+#: src/passphrase-dialog.c:322 src/passphrase-dialog.c:464
+msgid "Invalid passphrase; please try again..."
+msgstr "Ungültige Passphrase; bitte nochmal versuchen..."
+
+#: src/passphrase-dialog.c:404 src/passphrase-dialog.c:523
+msgid ""
+"If you cancel this dialog, the message will be sent in cleartext!\n"
+"\n"
+"Do you really want to cancel?"
+msgstr ""
+"Wenn Sie diesen Dialog abbrechen, wird die Nachricht im Klartext ausgesendet!\n"
+"\n"
+"Möchten Sie wirklich abbrechen?"
+
+#: src/passphrase-dialog.c:410
+msgid ""
+"If you cancel this dialog, the message will be sent without signing.\n"
+"\n"
+"Do you really want to cancel?"
+msgstr ""
+"Wenn Sie diesen Dialog abbrechen, so wird die Nachricht ohne Unterschrift versendet.\n"
+"\n"
+"Möchten Sie wirklich abbrechen?"
+
+#: src/passphrase-dialog.c:529
+msgid ""
+"If you cancel this dialog, the message will be sent without signing.\n"
+"Do you really want to cancel?"
+msgstr ""
+"Wenn Sie diesen Dialog abbrechen, so wird die Nachricht ohne Unterschrift versendet.\n"
+"\n"
+"Möchten Sie wirklich abbrechen?"
+
+#: src/recipient-dialog.c:459
+msgid ""
+"If you cancel this dialog, the message will be sent in cleartext.\n"
+"\n"
+"Do you really want to cancel?"
+msgstr ""
+"Wenn Sie diesen Dialog abbrechen, so wird die NAchricht im Klartext versendet!\n"
+"\n"
+"Möchten Sie wirklich abbrechen?"
+
+#: src/recipient-dialog.c:531 src/verify-dialog.c:152
+msgid "User-ID not found"
+msgstr "User-ID nicht gefunden"
+
+#: src/verify-dialog.c:121
+msgid "Good signature"
+msgstr "Korrekte Unterschrift"
+
+#: src/verify-dialog.c:123
+msgid "BAD signature!"
+msgstr "FALSCHE Unterschrift!"
+
+#: src/verify-dialog.c:125
+msgid "Good signature from revoked key"
+msgstr "Korrekte Unterschrift; aber Schlüssel wurde widerrufen"
+
+#: src/verify-dialog.c:127
+msgid "Good signature from expired key"
+msgstr "Korrekte Unterschrift; allerdings ist der Schlüssel abgelaufen"
+
+#: src/verify-dialog.c:129
+msgid "Good expired signature"
+msgstr "Korrekte aber abgelaufene Unterschrift"
+
+#: src/verify-dialog.c:132
+msgid "Could not check signature: missing key"
+msgstr "Unterschrift konnte nicht geprüft werden:  Schlüssel fehlt"
+
+#: src/verify-dialog.c:136
+msgid "Verification error"
+msgstr "Überprüfungsfehler"
+
diff --git a/po/en@boldquot.header b/po/en@boldquot.header
new file mode 100644 (file)
index 0000000..fedb6a0
--- /dev/null
@@ -0,0 +1,25 @@
+# All this catalog "translates" are quotation characters.
+# The msgids must be ASCII and therefore cannot contain real quotation
+# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
+# and double quote (0x22). These substitutes look strange; see
+# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
+#
+# This catalog translates grave accent (0x60) and apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019).
+# It also translates pairs of apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019)
+# and pairs of quotation mark (0x22) to
+# left double quotation mark (U+201C) and right double quotation mark (U+201D).
+#
+# When output to an UTF-8 terminal, the quotation characters appear perfectly.
+# When output to an ISO-8859-1 terminal, the single quotation marks are
+# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
+# grave/acute accent (by libiconv), and the double quotation marks are
+# transliterated to 0x22.
+# When output to an ASCII terminal, the single quotation marks are
+# transliterated to apostrophes, and the double quotation marks are
+# transliterated to 0x22.
+#
+# This catalog furthermore displays the text between the quotation marks in
+# bold face, assuming the VT100/XTerm escape sequences.
+#
diff --git a/po/en@quot.header b/po/en@quot.header
new file mode 100644 (file)
index 0000000..a9647fc
--- /dev/null
@@ -0,0 +1,22 @@
+# All this catalog "translates" are quotation characters.
+# The msgids must be ASCII and therefore cannot contain real quotation
+# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
+# and double quote (0x22). These substitutes look strange; see
+# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
+#
+# This catalog translates grave accent (0x60) and apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019).
+# It also translates pairs of apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019)
+# and pairs of quotation mark (0x22) to
+# left double quotation mark (U+201C) and right double quotation mark (U+201D).
+#
+# When output to an UTF-8 terminal, the quotation characters appear perfectly.
+# When output to an ISO-8859-1 terminal, the single quotation marks are
+# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
+# grave/acute accent (by libiconv), and the double quotation marks are
+# transliterated to 0x22.
+# When output to an ASCII terminal, the single quotation marks are
+# transliterated to apostrophes, and the double quotation marks are
+# transliterated to 0x22.
+#
diff --git a/po/insert-header.sin b/po/insert-header.sin
new file mode 100644 (file)
index 0000000..b26de01
--- /dev/null
@@ -0,0 +1,23 @@
+# Sed script that inserts the file called HEADER before the header entry.
+#
+# At each occurrence of a line starting with "msgid ", we execute the following
+# commands. At the first occurrence, insert the file. At the following
+# occurrences, do nothing. The distinction between the first and the following
+# occurrences is achieved by looking at the hold space.
+/^msgid /{
+x
+# Test if the hold space is empty.
+s/m/m/
+ta
+# Yes it was empty. First occurrence. Read the file.
+r HEADER
+# Output the file's contents by reading the next line. But don't lose the
+# current line while doing this.
+g
+N
+bb
+:a
+# The hold space was nonempty. Following occurrences. Do nothing.
+x
+:b
+}
diff --git a/po/quot.sed b/po/quot.sed
new file mode 100644 (file)
index 0000000..0122c46
--- /dev/null
@@ -0,0 +1,6 @@
+s/"\([^"]*\)"/“\1”/g
+s/`\([^`']*\)'/‘\1’/g
+s/ '\([^`']*\)' / ‘\1’ /g
+s/ '\([^`']*\)'$/ ‘\1’/g
+s/^'\([^`']*\)' /‘\1’ /g
+s/“”/""/g
diff --git a/po/remove-potcdate.sin b/po/remove-potcdate.sin
new file mode 100644 (file)
index 0000000..2436c49
--- /dev/null
@@ -0,0 +1,19 @@
+# Sed script that remove the POT-Creation-Date line in the header entry
+# from a POT file.
+#
+# The distinction between the first and the following occurrences of the
+# pattern is achieved by looking at the hold space.
+/^"POT-Creation-Date: .*"$/{
+x
+# Test if the hold space is empty.
+s/P/P/
+ta
+# Yes it was empty. First occurrence. Remove the line.
+g
+d
+bb
+:a
+# The hold space was nonempty. Following occurrences. Do nothing.
+x
+:b
+}
index 8e57f86..d7a937b 100644 (file)
@@ -1,3 +1,27 @@
+2005-11-30  Werner Koch  <wk@g10code.com>
+
+       * common.c (get_root_key, read_w32_registry_string): New.  Taken
+       for libgpg-error.
+       * main.c (i18n_init): New.
+       (DllMain): Call it.
+       (get_locale_dir, drop_locale_dir): New.
+
+       * w32-gettext.c, w32-gettext.h: New.  Taken form libgpg-error.
+       Slightly modified due to the fact that gpgol is W32-only.
+       * util.h (_, N_): Define standard i18n macros.
+
+       * display.cpp (set_message_body): Do not delete a RTF property.
+
+       * util.h (SRCNAME): New.  Changed all __FILE__ to this.
+       * main.c (log_srcname): New.
+
+2005-11-20  Werner Koch  <wk@g10code.com>
+
+       * gpgmsg.cpp (loadBody): For HTML try to read the HTMLBody from
+       the OOM as a last resort.
+       * olflange.cpp (get_outlook_property): New.
+       (put_outlook_property_int): New.
+
 2005-11-15  Werner Koch  <wk@g10code.com>
 
        * Makefile.am (gpgol_LDADD): Remove -lintl for now.
 2005-11-15  Werner Koch  <wk@g10code.com>
 
        * Makefile.am (gpgol_LDADD): Remove -lintl for now.
index b678500..cb2e32e 100644 (file)
@@ -44,7 +44,9 @@ gpgol_SOURCES = \
        mymapi.h  mymapitags.h      \
         vasprintf.c                 \
        watcher.cpp \
        mymapi.h  mymapitags.h      \
         vasprintf.c                 \
        watcher.cpp \
-       attach.cpp attach.h
+       attach.cpp attach.h \
+       w32-gettext.c w32-gettext.h 
+
 
 # W32API 3.2 comes with an unusable libmapi32.a.  We build our own
 # version.  Note the omission of -k (--kill-at) from the DLLTOOL
 
 # W32API 3.2 comes with an unusable libmapi32.a.  We build our own
 # version.  Note the omission of -k (--kill-at) from the DLLTOOL
index 80ba448..49fd9c1 100644 (file)
@@ -340,3 +340,117 @@ trim_trailing_spaces (char *string)
     *mark = 0;
   return string;
 }
     *mark = 0;
   return string;
 }
+
+
+/* Helper for read_w32_registry_string(). */
+static HKEY
+get_root_key(const char *root)
+{
+  HKEY root_key;
+
+  if( !root )
+    root_key = HKEY_CURRENT_USER;
+  else if( !strcmp( root, "HKEY_CLASSES_ROOT" ) )
+    root_key = HKEY_CLASSES_ROOT;
+  else if( !strcmp( root, "HKEY_CURRENT_USER" ) )
+    root_key = HKEY_CURRENT_USER;
+  else if( !strcmp( root, "HKEY_LOCAL_MACHINE" ) )
+    root_key = HKEY_LOCAL_MACHINE;
+  else if( !strcmp( root, "HKEY_USERS" ) )
+    root_key = HKEY_USERS;
+  else if( !strcmp( root, "HKEY_PERFORMANCE_DATA" ) )
+    root_key = HKEY_PERFORMANCE_DATA;
+  else if( !strcmp( root, "HKEY_CURRENT_CONFIG" ) )
+    root_key = HKEY_CURRENT_CONFIG;
+  else
+    return NULL;
+  return root_key;
+}
+
+/* Return a string from the Win32 Registry or NULL in case of error.
+   Caller must release the return value.  A NULL for root is an alias
+   for HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE in turn.  NOTE: The value
+   is allocated with a plain malloc() - use free() and not the usual
+   xfree(). */
+char *
+read_w32_registry_string (const char *root, const char *dir, const char *name)
+{
+  HKEY root_key, key_handle;
+  DWORD n1, nbytes, type;
+  char *result = NULL;
+
+  if ( !(root_key = get_root_key(root) ) )
+    return NULL;
+
+  if( RegOpenKeyEx( root_key, dir, 0, KEY_READ, &key_handle ) )
+    {
+      if (root)
+       return NULL; /* no need for a RegClose, so return direct */
+      /* It seems to be common practise to fall back to HKLM. */
+      if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, dir, 0, KEY_READ, &key_handle) )
+       return NULL; /* still no need for a RegClose, so return direct */
+    }
+
+  nbytes = 1;
+  if( RegQueryValueEx( key_handle, name, 0, NULL, NULL, &nbytes ) ) {
+    if (root)
+      goto leave;
+    /* Try to fallback to HKLM also vor a missing value.  */
+    RegCloseKey (key_handle);
+    if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, dir, 0, KEY_READ, &key_handle) )
+      return NULL; /* Nope.  */
+    if (RegQueryValueEx( key_handle, name, 0, NULL, NULL, &nbytes))
+      goto leave;
+  }
+  result = malloc( (n1=nbytes+1) );
+  if( !result )
+    goto leave;
+  if( RegQueryValueEx( key_handle, name, 0, &type, result, &n1 ) ) {
+    free(result); result = NULL;
+    goto leave;
+  }
+  result[nbytes] = 0; /* make sure it is really a string  */
+  if (type == REG_EXPAND_SZ && strchr (result, '%')) {
+    char *tmp;
+
+    n1 += 1000;
+    tmp = malloc (n1+1);
+    if (!tmp)
+      goto leave;
+    nbytes = ExpandEnvironmentStrings (result, tmp, n1);
+    if (nbytes && nbytes > n1) {
+      free (tmp);
+      n1 = nbytes;
+      tmp = malloc (n1 + 1);
+      if (!tmp)
+       goto leave;
+      nbytes = ExpandEnvironmentStrings (result, tmp, n1);
+      if (nbytes && nbytes > n1) {
+       free (tmp); /* oops - truncated, better don't expand at all */
+       goto leave;
+      }
+      tmp[nbytes] = 0;
+      free (result);
+      result = tmp;
+    }
+    else if (nbytes) { /* okay, reduce the length */
+      tmp[nbytes] = 0;
+      free (result);
+      result = malloc (strlen (tmp)+1);
+      if (!result)
+       result = tmp;
+      else {
+       strcpy (result, tmp);
+       free (tmp);
+      }
+    }
+    else {  /* error - don't expand */
+      free (tmp);
+    }
+  }
+
+ leave:
+  RegCloseKey( key_handle );
+  return result;
+}
+
index aef5993..0465100 100644 (file)
@@ -140,7 +140,7 @@ update_display (HWND hwnd, GpgMsg *msg, void *exchange_cb, bool is_html)
     {
       const char *string, *s;
 
     {
       const char *string, *s;
 
-      log_debug ("%s:%s: window handle %p\n", __FILE__, __func__, window);
+      log_debug ("%s:%s: window handle %p\n", SRCNAME, __func__, window);
       string = msg->getDisplayText ();
       
       /* Decide whether we need to use the Unicode version. */
       string = msg->getDisplayText ();
       
       /* Decide whether we need to use the Unicode version. */
@@ -155,7 +155,7 @@ update_display (HWND hwnd, GpgMsg *msg, void *exchange_cb, bool is_html)
       else
         SetWindowTextA (window, string);
       log_debug ("%s:%s: window text is now `%s'",
       else
         SetWindowTextA (window, string);
       log_debug ("%s:%s: window text is now `%s'",
-                 __FILE__, __func__, string);
+                 SRCNAME, __func__, string);
       return 0;
     }
   else if (exchange_cb && !opt.compat.no_oom_write)
       return 0;
     }
   else if (exchange_cb && !opt.compat.no_oom_write)
@@ -204,17 +204,14 @@ set_message_body (LPMESSAGE message, const char *string, bool is_html)
   if (hr != S_OK)
     {
       log_debug ("%s:%s: HrSetOneProp failed: hr=%#lx\n",
   if (hr != S_OK)
     {
       log_debug ("%s:%s: HrSetOneProp failed: hr=%#lx\n",
-                 __FILE__, __func__, hr); 
+                 SRCNAME, __func__, hr); 
       return gpg_error (GPG_ERR_GENERAL);
     }
 
       return gpg_error (GPG_ERR_GENERAL);
     }
 
-  /* Instead of using RTF Sync, we simply delete any RTF property. */
-  proparray.cValues = 1;
-  proparray.aulPropTag[0] = PR_RTF_COMPRESSED;
-  hr = message->DeleteProps (&proparray, NULL);
-  if (hr != S_OK)
-    log_debug ("%s:%s: DeleteProps failed: hr=%#lx\n", __FILE__, __func__, hr);
-  
-    
+  /* Note: we once tried to delete the RTF property here to avoid any
+     syncing mess and more important to make sure that no RTF rendered
+     plaintext is left over.  The side effect of this was that the
+     entire PR_BODY go deleted too. */
+
   return 0;
 }
   return 0;
 }
index b051ffe..8ba19dd 100644 (file)
@@ -35,6 +35,8 @@ int set_message_body (LPMESSAGE message, const char *string, bool is_html);
 
 /*-- olflange.cpp --*/
 int put_outlook_property (void *pEECB, const char *key, const char *value);
 
 /*-- olflange.cpp --*/
 int put_outlook_property (void *pEECB, const char *key, const char *value);
+int put_outlook_property_int (void *pEECB, const char *key, int value);
+char *get_outlook_property (void *pEECB, const char *key);
 
 
 #endif /*DISPLAY_H*/
 
 
 #endif /*DISPLAY_H*/
index 3c08118..cef7912 100644 (file)
@@ -40,7 +40,7 @@
 #include "engine.h"
 
 #define TRACEPOINT() do { log_debug ("%s:%s:%d: tracepoint\n", \
 #include "engine.h"
 
 #define TRACEPOINT() do { log_debug ("%s:%s:%d: tracepoint\n", \
-                                       __FILE__, __func__, __LINE__); \
+                                       SRCNAME, __func__, __LINE__); \
                         } while (0)
 
 
                         } while (0)
 
 
@@ -141,7 +141,7 @@ stream_read_cb (void *handle, void *buffer, size_t size)
   hr = IStream_Read (stream, buffer, size, &nread);
   if (hr != S_OK)
     {
   hr = IStream_Read (stream, buffer, size, &nread);
   if (hr != S_OK)
     {
-      log_debug ("%s:%s: Read failed: hr=%#lx", __FILE__, __func__, hr);
+      log_debug ("%s:%s: Read failed: hr=%#lx", SRCNAME, __func__, hr);
       errno = EIO;
       return -1;
     }
       errno = EIO;
       return -1;
     }
@@ -159,7 +159,7 @@ stream_write_cb (void *handle, const void *buffer, size_t size)
   hr = IStream_Write (stream, buffer, size, &nwritten);
   if (hr != S_OK)
     {
   hr = IStream_Write (stream, buffer, size, &nwritten);
   if (hr != S_OK)
     {
-      log_debug ("%s:%s: Write failed: hr=%#lx", __FILE__, __func__, hr);
+      log_debug ("%s:%s: Write failed: hr=%#lx", SRCNAME, __func__, hr);
       errno = EIO;
       return -1;
     }
       errno = EIO;
       return -1;
     }
index d3a32fb..b4edf31 100644 (file)
@@ -43,7 +43,7 @@ static const char oid_mimetag[] =
 
 
 #define TRACEPOINT() do { log_debug ("%s:%s:%d: tracepoint\n", \
 
 
 #define TRACEPOINT() do { log_debug ("%s:%s:%d: tracepoint\n", \
-                                       __FILE__, __func__, __LINE__); \
+                                       SRCNAME, __func__, __LINE__); \
                         } while (0)
 
 /* Constants to describe the PGP armor types. */
                         } while (0)
 
 /* Constants to describe the PGP armor types. */
@@ -408,14 +408,23 @@ GpgMsgImpl::loadBody (bool want_html)
       if ( hr != S_OK )
         {
           log_debug ("%s:%s: OpenProperty failed: hr=%#lx",
       if ( hr != S_OK )
         {
           log_debug ("%s:%s: OpenProperty failed: hr=%#lx",
-                     __FILE__, __func__, hr);
+                     SRCNAME, __func__, hr);
+          if (want_html)
+            {
+              log_debug ("%s:%s: trying to read it from the OOM\n",
+                         SRCNAME, __func__);
+              body = get_outlook_property (exchange_cb, "HTMLBody");
+              if (body)
+                goto ready;
+            }
+          
           return;
         }
       
       hr = stream->Stat (&statInfo, STATFLAG_NONAME);
       if ( hr != S_OK )
         {
           return;
         }
       
       hr = stream->Stat (&statInfo, STATFLAG_NONAME);
       if ( hr != S_OK )
         {
-          log_debug ("%s:%s: Stat failed: hr=%#lx", __FILE__, __func__, hr);
+          log_debug ("%s:%s: Stat failed: hr=%#lx", SRCNAME, __func__, hr);
           stream->Release ();
           return;
         }
           stream->Release ();
           return;
         }
@@ -428,7 +437,7 @@ GpgMsgImpl::loadBody (bool want_html)
       hr = stream->Read (body, (size_t)statInfo.cbSize.QuadPart, &nread);
       if ( hr != S_OK )
         {
       hr = stream->Read (body, (size_t)statInfo.cbSize.QuadPart, &nread);
       if ( hr != S_OK )
         {
-          log_debug ("%s:%s: Read failed: hr=%#lx", __FILE__, __func__, hr);
+          log_debug ("%s:%s: Read failed: hr=%#lx", SRCNAME, __func__, hr);
           xfree (body);
           body = NULL;
           stream->Release ();
           xfree (body);
           body = NULL;
           stream->Release ();
@@ -438,7 +447,7 @@ GpgMsgImpl::loadBody (bool want_html)
       body[nread+1] = 0;
       if (nread != statInfo.cbSize.QuadPart)
         {
       body[nread+1] = 0;
       if (nread != statInfo.cbSize.QuadPart)
         {
-          log_debug ("%s:%s: not enough bytes returned\n", __FILE__, __func__);
+          log_debug ("%s:%s: not enough bytes returned\n", SRCNAME, __func__);
           xfree (body);
           body = NULL;
           stream->Release ();
           xfree (body);
           body = NULL;
           stream->Release ();
@@ -460,9 +469,10 @@ GpgMsgImpl::loadBody (bool want_html)
       }
     }
 
       }
     }
 
+ ready:
   if (body)
     log_debug ("%s:%s: loaded body `%s' at %p\n",
   if (body)
     log_debug ("%s:%s: loaded body `%s' at %p\n",
-               __FILE__, __func__, body, body);
+               SRCNAME, __func__, body, body);
   
 
 //   prop.ulPropTag = PR_ACCESS;
   
 
 //   prop.ulPropTag = PR_ACCESS;
@@ -470,7 +480,7 @@ GpgMsgImpl::loadBody (bool want_html)
 //   hr = HrSetOneProp (message, &prop);
 //   if (FAILED (hr))
 //     log_debug ("%s:%s: updating message access to 0x%08lx failed: hr=%#lx",
 //   hr = HrSetOneProp (message, &prop);
 //   if (FAILED (hr))
 //     log_debug ("%s:%s: updating message access to 0x%08lx failed: hr=%#lx",
-//                    __FILE__, __func__, prop.Value.l, hr);
+//                    SRCNAME, __func__, prop.Value.l, hr);
 }
 
 
 }
 
 
@@ -488,7 +498,7 @@ get_subject (LPMESSAGE obj)
   if (FAILED (hr))
     {
       log_error ("%s:%s: error getting the subject: hr=%#lx",
   if (FAILED (hr))
     {
       log_error ("%s:%s: error getting the subject: hr=%#lx",
-                 __FILE__, __func__, hr);
+                 SRCNAME, __func__, hr);
       return NULL; 
     }
   switch ( PROP_TYPE (propval->ulPropTag) )
       return NULL; 
     }
   switch ( PROP_TYPE (propval->ulPropTag) )
@@ -496,7 +506,7 @@ get_subject (LPMESSAGE obj)
     case PT_UNICODE:
       name = wchar_to_utf8 (propval->Value.lpszW);
       if (!name)
     case PT_UNICODE:
       name = wchar_to_utf8 (propval->Value.lpszW);
       if (!name)
-        log_debug ("%s:%s: error converting to utf8\n", __FILE__, __func__);
+        log_debug ("%s:%s: error converting to utf8\n", SRCNAME, __func__);
       break;
       
     case PT_STRING8:
       break;
       
     case PT_STRING8:
@@ -505,7 +515,7 @@ get_subject (LPMESSAGE obj)
       
     default:
       log_debug ("%s:%s: proptag=%#lx not supported\n",
       
     default:
       log_debug ("%s:%s: proptag=%#lx not supported\n",
-                 __FILE__, __func__, propval->ulPropTag);
+                 SRCNAME, __func__, propval->ulPropTag);
       name = NULL;
       break;
     }
       name = NULL;
       break;
     }
@@ -543,7 +553,7 @@ set_subject (LPMESSAGE obj, const char *string)
   if (hr != S_OK)
     {
       log_debug ("%s:%s: HrSetOneProp failed: hr=%#lx\n",
   if (hr != S_OK)
     {
       log_debug ("%s:%s: HrSetOneProp failed: hr=%#lx\n",
-                 __FILE__, __func__, hr); 
+                 SRCNAME, __func__, hr); 
       return gpg_error (GPG_ERR_GENERAL);
     }
   return 0;
       return gpg_error (GPG_ERR_GENERAL);
     }
   return 0;
@@ -628,7 +638,7 @@ GpgMsgImpl::getRecipients ()
   if (FAILED (hr)) 
     {
       log_debug_w32 (-1, "%s:%s: GetRecipientTable failed",
   if (FAILED (hr)) 
     {
       log_debug_w32 (-1, "%s:%s: GetRecipientTable failed",
-                     __FILE__, __func__);
+                     SRCNAME, __func__);
       return NULL;
     }
 
       return NULL;
     }
 
@@ -636,7 +646,7 @@ GpgMsgImpl::getRecipients ()
                        NULL, NULL, 0L, &lpRecipientRows);
   if (FAILED (hr)) 
     {
                        NULL, NULL, 0L, &lpRecipientRows);
   if (FAILED (hr)) 
     {
-      log_debug_w32 (-1, "%s:%s: GHrQueryAllRows failed", __FILE__, __func__);
+      log_debug_w32 (-1, "%s:%s: GHrQueryAllRows failed", SRCNAME, __func__);
       if (lpRecipientTable)
         lpRecipientTable->Release();
       return NULL;
       if (lpRecipientTable)
         lpRecipientTable->Release();
       return NULL;
@@ -660,7 +670,7 @@ GpgMsgImpl::getRecipients ()
             j++;
           else
             log_debug ("%s:%s: error converting recipient to utf8\n",
             j++;
           else
             log_debug ("%s:%s: error converting recipient to utf8\n",
-                       __FILE__, __func__);
+                       SRCNAME, __func__);
           break;
       
         case PT_STRING8: /* Assume Ascii. */
           break;
       
         case PT_STRING8: /* Assume Ascii. */
@@ -669,7 +679,7 @@ GpgMsgImpl::getRecipients ()
           
         default:
           log_debug ("%s:%s: proptag=0x%08lx not supported\n",
           
         default:
           log_debug ("%s:%s: proptag=0x%08lx not supported\n",
-                     __FILE__, __func__, row->ulPropTag);
+                     SRCNAME, __func__, row->ulPropTag);
           break;
         }
     }
           break;
         }
     }
@@ -681,9 +691,9 @@ GpgMsgImpl::getRecipients ()
     FreeProws(lpRecipientRows);        
   
   log_debug ("%s:%s: got %d recipients:\n",
     FreeProws(lpRecipientRows);        
   
   log_debug ("%s:%s: got %d recipients:\n",
-             __FILE__, __func__, j);
+             SRCNAME, __func__, j);
   for (i=0; rset[i]; i++)
   for (i=0; rset[i]; i++)
-    log_debug ("%s:%s: \t`%s'\n", __FILE__, __func__, rset[i]);
+    log_debug ("%s:%s: \t`%s'\n", SRCNAME, __func__, rset[i]);
 
   return rset;
 }
 
   return rset;
 }
@@ -709,7 +719,7 @@ GpgMsgImpl::writeAttestation (void)
   if (hr != S_OK)
     {
       log_error ("%s:%s: can't create attachment: hr=%#lx\n",
   if (hr != S_OK)
     {
       log_error ("%s:%s: can't create attachment: hr=%#lx\n",
-                 __FILE__, __func__, hr); 
+                 SRCNAME, __func__, hr); 
       goto leave;
     }
           
       goto leave;
     }
           
@@ -719,7 +729,7 @@ GpgMsgImpl::writeAttestation (void)
   if (hr != S_OK)
     {
       log_error ("%s:%s: can't set attach method: hr=%#lx\n",
   if (hr != S_OK)
     {
       log_error ("%s:%s: can't set attach method: hr=%#lx\n",
-                 __FILE__, __func__, hr); 
+                 SRCNAME, __func__, hr); 
       goto leave;
     }
   
       goto leave;
     }
   
@@ -732,7 +742,7 @@ GpgMsgImpl::writeAttestation (void)
   if (hr != S_OK)
     {
       log_error ("%s:%s: can't set attach filename: hr=%#lx\n",
   if (hr != S_OK)
     {
       log_error ("%s:%s: can't set attach filename: hr=%#lx\n",
-                 __FILE__, __func__, hr); 
+                 SRCNAME, __func__, hr); 
       goto leave;
     }
 
       goto leave;
     }
 
@@ -743,7 +753,7 @@ GpgMsgImpl::writeAttestation (void)
   if (hr != S_OK)
     {
       log_error ("%s:%s: can't set attach filename: hr=%#lx\n",
   if (hr != S_OK)
     {
       log_error ("%s:%s: can't set attach filename: hr=%#lx\n",
-                 __FILE__, __func__, hr); 
+                 SRCNAME, __func__, hr); 
       goto leave;
     }
 
       goto leave;
     }
 
@@ -754,7 +764,7 @@ GpgMsgImpl::writeAttestation (void)
   if (hr != S_OK)
     {
       log_error ("%s:%s: can't set attach tag: hr=%#lx\n",
   if (hr != S_OK)
     {
       log_error ("%s:%s: can't set attach tag: hr=%#lx\n",
-                 __FILE__, __func__, hr); 
+                 SRCNAME, __func__, hr); 
       goto leave;
     }
 
       goto leave;
     }
 
@@ -764,7 +774,7 @@ GpgMsgImpl::writeAttestation (void)
   if (hr != S_OK)
     {
       log_error ("%s:%s: can't set attach mime tag: hr=%#lx\n",
   if (hr != S_OK)
     {
       log_error ("%s:%s: can't set attach mime tag: hr=%#lx\n",
-                 __FILE__, __func__, hr); 
+                 SRCNAME, __func__, hr); 
       goto leave;
     }
 
       goto leave;
     }
 
@@ -773,7 +783,7 @@ GpgMsgImpl::writeAttestation (void)
   if (FAILED (hr)) 
     {
       log_error ("%s:%s: can't create output stream: hr=%#lx\n",
   if (FAILED (hr)) 
     {
       log_error ("%s:%s: can't create output stream: hr=%#lx\n",
-                 __FILE__, __func__, hr); 
+                 SRCNAME, __func__, hr); 
       goto leave;
     }
   
       goto leave;
     }
   
@@ -782,7 +792,7 @@ GpgMsgImpl::writeAttestation (void)
       || !(buffer = gpgme_data_release_and_get_mem (attestation, NULL)))
     {
       attestation = NULL;
       || !(buffer = gpgme_data_release_and_get_mem (attestation, NULL)))
     {
       attestation = NULL;
-      log_error ("%s:%s: gpgme_data_write failed\n", __FILE__, __func__); 
+      log_error ("%s:%s: gpgme_data_write failed\n", SRCNAME, __func__); 
       goto leave;
     }
   attestation = NULL;
       goto leave;
     }
   attestation = NULL;
@@ -791,8 +801,9 @@ GpgMsgImpl::writeAttestation (void)
   hr = S_OK;
   if (!*buffer)
     {
   hr = S_OK;
   if (!*buffer)
     {
-      p = _("[No attestation computed (e.g. messages was not signed)");
-      hr = to->Write (p, strlen (p), &nwritten);
+      const char *s = _("[No attestation computed "
+                        "(e.g. messages was not signed)");
+      hr = to->Write (s, strlen (s), &nwritten);
     }
   else
     {
     }
   else
     {
@@ -807,7 +818,7 @@ GpgMsgImpl::writeAttestation (void)
     }
   if (hr != S_OK)
     {
     }
   if (hr != S_OK)
     {
-      log_debug ("%s:%s: Write failed: hr=%#lx", __FILE__, __func__, hr);
+      log_debug ("%s:%s: Write failed: hr=%#lx", SRCNAME, __func__, hr);
       goto leave;
     }
       
       goto leave;
     }
       
@@ -820,14 +831,14 @@ GpgMsgImpl::writeAttestation (void)
   if (hr != S_OK)
     {
       log_error ("%s:%s: SaveChanges(attachment) failed: hr=%#lx\n",
   if (hr != S_OK)
     {
       log_error ("%s:%s: SaveChanges(attachment) failed: hr=%#lx\n",
-                 __FILE__, __func__, hr); 
+                 SRCNAME, __func__, hr); 
       goto leave;
     }
   hr = message->SaveChanges (KEEP_OPEN_READWRITE|FORCE_SAVE);
   if (hr != S_OK)
     {
       log_error ("%s:%s: SaveChanges(message) failed: hr=%#lx\n",
       goto leave;
     }
   hr = message->SaveChanges (KEEP_OPEN_READWRITE|FORCE_SAVE);
   if (hr != S_OK)
     {
       log_error ("%s:%s: SaveChanges(message) failed: hr=%#lx\n",
-                 __FILE__, __func__, hr); 
+                 SRCNAME, __func__, hr); 
       goto leave;
     }
 
       goto leave;
     }
 
@@ -850,7 +861,7 @@ GpgMsgImpl::writeAttestation (void)
 int 
 GpgMsgImpl::decrypt (HWND hwnd)
 {
 int 
 GpgMsgImpl::decrypt (HWND hwnd)
 {
-  log_debug ("%s:%s: enter\n", __FILE__, __func__);
+  log_debug ("%s:%s: enter\n", SRCNAME, __func__);
   openpgp_t mtype;
   char *plaintext = NULL;
   attach_info_t table = NULL;
   openpgp_t mtype;
   char *plaintext = NULL;
   attach_info_t table = NULL;
@@ -880,7 +891,7 @@ GpgMsgImpl::decrypt (HWND hwnd)
     }
   log_debug ("%s:%s: message has %u attachments with "
              "%u signed and %d encrypted\n",
     }
   log_debug ("%s:%s: message has %u attachments with "
              "%u signed and %d encrypted\n",
-             __FILE__, __func__, n_attach, n_signed, n_encrypted);
+             SRCNAME, __func__, n_attach, n_signed, n_encrypted);
   if (mtype == OPENPGP_NONE && !n_encrypted && !n_signed) 
     {
       /* Because we usually work around the OL object model, it can't
   if (mtype == OPENPGP_NONE && !n_encrypted && !n_signed) 
     {
       /* Because we usually work around the OL object model, it can't
@@ -908,13 +919,13 @@ GpgMsgImpl::decrypt (HWND hwnd)
           body_plain = xstrdup (s);
           update_display (hwnd, this, exchange_cb, is_html_body (s));
           msgcache_unref (refhandle);
           body_plain = xstrdup (s);
           update_display (hwnd, this, exchange_cb, is_html_body (s));
           msgcache_unref (refhandle);
-          log_debug ("%s:%s: leave (already decrypted)\n", __FILE__, __func__);
+          log_debug ("%s:%s: leave (already decrypted)\n", SRCNAME, __func__);
         }
       else
         {
           MessageBox (hwnd, "No valid OpenPGP data found.",
                       "GPG Decryption", MB_ICONWARNING|MB_OK);
         }
       else
         {
           MessageBox (hwnd, "No valid OpenPGP data found.",
                       "GPG Decryption", MB_ICONWARNING|MB_OK);
-          log_debug ("%s:%s: leave (no OpenPGP data)\n", __FILE__, __func__);
+          log_debug ("%s:%s: leave (no OpenPGP data)\n", SRCNAME, __func__);
         }
       
       release_attach_info (table);
         }
       
       release_attach_info (table);
@@ -929,7 +940,7 @@ GpgMsgImpl::decrypt (HWND hwnd)
       if (attestation)
         gpgme_data_release (attestation);
       log_debug ("%s:%s: we already have an attestation\n",
       if (attestation)
         gpgme_data_release (attestation);
       log_debug ("%s:%s: we already have an attestation\n",
-                 __FILE__, __func__);
+                 SRCNAME, __func__);
     }
   else if (!attestation && !opt.compat.no_attestation)
     gpgme_data_new (&attestation);
     }
   else if (!attestation && !opt.compat.no_attestation)
     gpgme_data_new (&attestation);
@@ -946,10 +957,10 @@ GpgMsgImpl::decrypt (HWND hwnd)
       if (FAILED (hr))
         {
           log_error ("%s:%s: can't open PGP/MIME attachment 2: hr=%#lx",
       if (FAILED (hr))
         {
           log_error ("%s:%s: can't open PGP/MIME attachment 2: hr=%#lx",
-                     __FILE__, __func__, hr);
+                     SRCNAME, __func__, hr);
           MessageBox (hwnd, "Problem decrypting PGP/MIME message",
                       "GPG Decryption", MB_ICONERROR|MB_OK);
           MessageBox (hwnd, "Problem decrypting PGP/MIME message",
                       "GPG Decryption", MB_ICONERROR|MB_OK);
-          log_debug ("%s:%s: leave (PGP/MIME problem)\n", __FILE__, __func__);
+          log_debug ("%s:%s: leave (PGP/MIME problem)\n", SRCNAME, __func__);
           release_attach_info (table);
           return gpg_error (GPG_ERR_GENERAL);
         }
           release_attach_info (table);
           return gpg_error (GPG_ERR_GENERAL);
         }
@@ -958,10 +969,10 @@ GpgMsgImpl::decrypt (HWND hwnd)
       if (method != ATTACH_BY_VALUE)
         {
           log_error ("%s:%s: unsupported method %d for PGP/MIME attachment 2",
       if (method != ATTACH_BY_VALUE)
         {
           log_error ("%s:%s: unsupported method %d for PGP/MIME attachment 2",
-                     __FILE__, __func__, method);
+                     SRCNAME, __func__, method);
           MessageBox (hwnd, "Problem decrypting PGP/MIME message",
                       "GPG Decryption", MB_ICONERROR|MB_OK);
           MessageBox (hwnd, "Problem decrypting PGP/MIME message",
                       "GPG Decryption", MB_ICONERROR|MB_OK);
-          log_debug ("%s:%s: leave (bad PGP/MIME method)\n",__FILE__,__func__);
+          log_debug ("%s:%s: leave (bad PGP/MIME method)\n",SRCNAME,__func__);
           att->Release ();
           release_attach_info (table);
           return gpg_error (GPG_ERR_GENERAL);
           att->Release ();
           release_attach_info (table);
           return gpg_error (GPG_ERR_GENERAL);
@@ -972,10 +983,10 @@ GpgMsgImpl::decrypt (HWND hwnd)
       if (FAILED (hr))
         {
           log_error ("%s:%s: can't open data of attachment 2: hr=%#lx",
       if (FAILED (hr))
         {
           log_error ("%s:%s: can't open data of attachment 2: hr=%#lx",
-                     __FILE__, __func__, hr);
+                     SRCNAME, __func__, hr);
           MessageBox (hwnd, "Problem decrypting PGP/MIME message",
                       "GPG Decryption", MB_ICONERROR|MB_OK);
           MessageBox (hwnd, "Problem decrypting PGP/MIME message",
                       "GPG Decryption", MB_ICONERROR|MB_OK);
-          log_debug ("%s:%s: leave (OpenProperty failed)\n",__FILE__,__func__);
+          log_debug ("%s:%s: leave (OpenProperty failed)\n",SRCNAME,__func__);
           att->Release ();
           release_attach_info (table);
           return gpg_error (GPG_ERR_GENERAL);
           att->Release ();
           release_attach_info (table);
           return gpg_error (GPG_ERR_GENERAL);
@@ -1037,7 +1048,7 @@ GpgMsgImpl::decrypt (HWND hwnd)
           hr = message->SaveChanges (KEEP_OPEN_READWRITE|FORCE_SAVE);
           if (FAILED (hr))
             log_debug ("%s:%s: SaveChanges failed: hr=%#lx",
           hr = message->SaveChanges (KEEP_OPEN_READWRITE|FORCE_SAVE);
           if (FAILED (hr))
             log_debug ("%s:%s: SaveChanges failed: hr=%#lx",
-                       __FILE__, __func__, hr);
+                       SRCNAME, __func__, hr);
           update_display (hwnd, this, exchange_cb, is_html);
           
         }
           update_display (hwnd, this, exchange_cb, is_html);
           
         }
@@ -1058,7 +1069,7 @@ GpgMsgImpl::decrypt (HWND hwnd)
               hr = message->SaveChanges (KEEP_OPEN_READWRITE|FORCE_SAVE);
               if (FAILED (hr))
                 log_debug ("%s:%s: SaveChanges failed: hr=%#lx",
               hr = message->SaveChanges (KEEP_OPEN_READWRITE|FORCE_SAVE);
               if (FAILED (hr))
                 log_debug ("%s:%s: SaveChanges failed: hr=%#lx",
-                           __FILE__, __func__, hr);
+                           SRCNAME, __func__, hr);
             }
        }
     }
             }
        }
     }
@@ -1117,7 +1128,7 @@ GpgMsgImpl::decrypt (HWND hwnd)
   writeAttestation ();
 
   release_attach_info (table);
   writeAttestation ();
 
   release_attach_info (table);
-  log_debug ("%s:%s: leave (rc=%d)\n", __FILE__, __func__, err);
+  log_debug ("%s:%s: leave (rc=%d)\n", SRCNAME, __func__, err);
   return err;
 }
 
   return err;
 }
 
@@ -1136,20 +1147,20 @@ GpgMsgImpl::sign (HWND hwnd)
   gpgme_key_t sign_key = NULL;
   SPropValue prop;
 
   gpgme_key_t sign_key = NULL;
   SPropValue prop;
 
-  log_debug ("%s:%s: enter message=%p\n", __FILE__, __func__, message);
+  log_debug ("%s:%s: enter message=%p\n", SRCNAME, __func__, message);
   
   /* We don't sign an empty body - a signature on a zero length string
      is pretty much useless. */
   if (!*(plaintext = getOrigText (false)) && !hasAttachments ()) 
     {
   
   /* We don't sign an empty body - a signature on a zero length string
      is pretty much useless. */
   if (!*(plaintext = getOrigText (false)) && !hasAttachments ()) 
     {
-      log_debug ("%s:%s: leave (empty)", __FILE__, __func__);
+      log_debug ("%s:%s: leave (empty)", SRCNAME, __func__);
       return 0; 
     }
 
   /* Pop up a dialog box to ask for the signer of the message. */
   if (signer_dialog_box (&sign_key, NULL, 0) == -1)
     {
       return 0; 
     }
 
   /* Pop up a dialog box to ask for the signer of the message. */
   if (signer_dialog_box (&sign_key, NULL, 0) == -1)
     {
-      log_debug ("%s.%s: leave (dialog failed)\n", __FILE__, __func__);
+      log_debug ("%s.%s: leave (dialog failed)\n", SRCNAME, __func__);
       return gpg_error (GPG_ERR_CANCELED);  
     }
 
       return gpg_error (GPG_ERR_CANCELED);  
     }
 
@@ -1170,7 +1181,7 @@ GpgMsgImpl::sign (HWND hwnd)
       unsigned int n;
       
       n = getAttachments ();
       unsigned int n;
       
       n = getAttachments ();
-      log_debug ("%s:%s: message has %u attachments\n", __FILE__, __func__, n);
+      log_debug ("%s:%s: message has %u attachments\n", SRCNAME, __func__, n);
       for (unsigned int i=0; i < n; i++) 
         signAttachment (hwnd, i, sign_key, opt.passwd_ttl);
       /* FIXME: we should throw an error if signing of any attachment
       for (unsigned int i=0; i < n; i++) 
         signAttachment (hwnd, i, sign_key, opt.passwd_ttl);
       /* FIXME: we should throw an error if signing of any attachment
@@ -1197,7 +1208,7 @@ GpgMsgImpl::sign (HWND hwnd)
       if (hr != S_OK)
         {
           log_error ("%s:%s: can't set content type: hr=%#lx\n",
       if (hr != S_OK)
         {
           log_error ("%s:%s: can't set content type: hr=%#lx\n",
-                     __FILE__, __func__, hr);
+                     SRCNAME, __func__, hr);
         }
     }
   
         }
     }
   
@@ -1205,7 +1216,7 @@ GpgMsgImpl::sign (HWND hwnd)
   if (hr != S_OK)
     {
       log_error ("%s:%s: SaveChanges(message) failed: hr=%#lx\n",
   if (hr != S_OK)
     {
       log_error ("%s:%s: SaveChanges(message) failed: hr=%#lx\n",
-                 __FILE__, __func__, hr); 
+                 SRCNAME, __func__, hr); 
       err = gpg_error (GPG_ERR_GENERAL);
       goto leave;
     }
       err = gpg_error (GPG_ERR_GENERAL);
       goto leave;
     }
@@ -1213,7 +1224,7 @@ GpgMsgImpl::sign (HWND hwnd)
  leave:
   xfree (signedtext);
   gpgme_key_release (sign_key);
  leave:
   xfree (signedtext);
   gpgme_key_release (sign_key);
-  log_debug ("%s:%s: leave (err=%s)\n", __FILE__, __func__, op_strerror (err));
+  log_debug ("%s:%s: leave (err=%s)\n", SRCNAME, __func__, op_strerror (err));
   return err;
 }
 
   return err;
 }
 
@@ -1226,7 +1237,7 @@ GpgMsgImpl::sign (HWND hwnd)
 int 
 GpgMsgImpl::encrypt_and_sign (HWND hwnd, bool want_html, bool sign_flag)
 {
 int 
 GpgMsgImpl::encrypt_and_sign (HWND hwnd, bool want_html, bool sign_flag)
 {
-  log_debug ("%s:%s: enter\n", __FILE__, __func__);
+  log_debug ("%s:%s: enter\n", SRCNAME, __func__);
   HRESULT hr;
   gpgme_key_t *keys = NULL;
   gpgme_key_t sign_key = NULL;
   HRESULT hr;
   gpgme_key_t *keys = NULL;
   gpgme_key_t sign_key = NULL;
@@ -1241,7 +1252,7 @@ GpgMsgImpl::encrypt_and_sign (HWND hwnd, bool want_html, bool sign_flag)
   
   if (!*(plaintext = getOrigText (want_html)) && !hasAttachments ()) 
     {
   
   if (!*(plaintext = getOrigText (want_html)) && !hasAttachments ()) 
     {
-      log_debug ("%s:%s: leave (empty)", __FILE__, __func__);
+      log_debug ("%s:%s: leave (empty)", SRCNAME, __func__);
       return 0; 
     }
 
       return 0; 
     }
 
@@ -1250,7 +1261,7 @@ GpgMsgImpl::encrypt_and_sign (HWND hwnd, bool want_html, bool sign_flag)
     {
       if (signer_dialog_box (&sign_key, NULL, 1) == -1)
         {
     {
       if (signer_dialog_box (&sign_key, NULL, 1) == -1)
         {
-          log_debug ("%s.%s: leave (dialog failed)\n", __FILE__, __func__);
+          log_debug ("%s.%s: leave (dialog failed)\n", SRCNAME, __func__);
           return gpg_error (GPG_ERR_CANCELED);  
         }
     }
           return gpg_error (GPG_ERR_CANCELED);  
         }
     }
@@ -1259,7 +1270,7 @@ GpgMsgImpl::encrypt_and_sign (HWND hwnd, bool want_html, bool sign_flag)
   recipients = getRecipients ();
   if ( op_lookup_keys (recipients, &keys, &unknown) )
     {
   recipients = getRecipients ();
   if ( op_lookup_keys (recipients, &keys, &unknown) )
     {
-      log_debug ("%s.%s: leave (lookup keys failed)\n", __FILE__, __func__);
+      log_debug ("%s.%s: leave (lookup keys failed)\n", SRCNAME, __func__);
       return gpg_error (GPG_ERR_GENERAL);  
     }
   n_recp = count_strings (recipients);
       return gpg_error (GPG_ERR_GENERAL);  
     }
   n_recp = count_strings (recipients);
@@ -1268,14 +1279,14 @@ GpgMsgImpl::encrypt_and_sign (HWND hwnd, bool want_html, bool sign_flag)
 
   
   log_debug ("%s:%s: found %d recipients, need %d, unknown=%d\n",
 
   
   log_debug ("%s:%s: found %d recipients, need %d, unknown=%d\n",
-             __FILE__, __func__, (int)n_keys, (int)n_recp, (int)n_unknown);
+             SRCNAME, __func__, (int)n_keys, (int)n_recp, (int)n_unknown);
   
   if (n_keys != n_recp)
     {
       unsigned int opts;
       gpgme_key_t *keys2;
 
   
   if (n_keys != n_recp)
     {
       unsigned int opts;
       gpgme_key_t *keys2;
 
-      log_debug ("%s:%s: calling recipient_dialog_box2", __FILE__, __func__);
+      log_debug ("%s:%s: calling recipient_dialog_box2", SRCNAME, __func__);
       opts = recipient_dialog_box2 (keys, unknown, &keys2);
       free_key_array (keys);
       keys = keys2;
       opts = recipient_dialog_box2 (keys, unknown, &keys2);
       free_key_array (keys);
       keys = keys2;
@@ -1287,14 +1298,14 @@ GpgMsgImpl::encrypt_and_sign (HWND hwnd, bool want_html, bool sign_flag)
     }
 
   if (sign_key)
     }
 
   if (sign_key)
-    log_debug ("%s:%s: signer: 0x%s %s\n",  __FILE__, __func__,
+    log_debug ("%s:%s: signer: 0x%s %s\n",  SRCNAME, __func__,
                keyid_from_key (sign_key), userid_from_key (sign_key));
   else
                keyid_from_key (sign_key), userid_from_key (sign_key));
   else
-    log_debug ("%s:%s: no signer\n", __FILE__, __func__);
+    log_debug ("%s:%s: no signer\n", SRCNAME, __func__);
   if (keys)
     {
       for (int i=0; keys[i] != NULL; i++)
   if (keys)
     {
       for (int i=0; keys[i] != NULL; i++)
-        log_debug ("%s.%s: recp.%d 0x%s %s\n", __FILE__, __func__,
+        log_debug ("%s.%s: recp.%d 0x%s %s\n", SRCNAME, __func__,
                    i, keyid_from_key (keys[i]), userid_from_key (keys[i]));
     }
 
                    i, keyid_from_key (keys[i]), userid_from_key (keys[i]));
     }
 
@@ -1324,7 +1335,7 @@ GpgMsgImpl::encrypt_and_sign (HWND hwnd, bool want_html, bool sign_flag)
 //         if (hr != S_OK)
 //           {
 //             log_error ("%s:%s: can't set message class: hr=%#lx\n",
 //         if (hr != S_OK)
 //           {
 //             log_error ("%s:%s: can't set message class: hr=%#lx\n",
-//                        __FILE__, __func__, hr); 
+//                        SRCNAME, __func__, hr); 
 //           }
 //       }
 
 //           }
 //       }
 
@@ -1335,7 +1346,7 @@ GpgMsgImpl::encrypt_and_sign (HWND hwnd, bool want_html, bool sign_flag)
       unsigned int n;
       
       n = getAttachments ();
       unsigned int n;
       
       n = getAttachments ();
-      log_debug ("%s:%s: message has %u attachments\n", __FILE__, __func__, n);
+      log_debug ("%s:%s: message has %u attachments\n", SRCNAME, __func__, n);
       for (unsigned int i=0; !err && i < n; i++) 
         err = encryptAttachment (hwnd, i, keys, NULL, 0);
       if (err)
       for (unsigned int i=0; !err && i < n; i++) 
         err = encryptAttachment (hwnd, i, keys, NULL, 0);
       if (err)
@@ -1352,6 +1363,19 @@ GpgMsgImpl::encrypt_and_sign (HWND hwnd, bool want_html, bool sign_flag)
      the changes to the body.  */
   if (*plaintext)
     {
      the changes to the body.  */
   if (*plaintext)
     {
+      if (want_html)
+        {
+          /* We better update the body of the OOM too. */
+          if (put_outlook_property (exchange_cb, "Body", ciphertext))
+            log_error ("%s:%s: put OOM property Body failed\n",
+                       SRCNAME, __func__);
+          /* And set the format to plain text. */
+          if (put_outlook_property_int (exchange_cb, "BodyFormat", 1))
+            log_error ("%s:%s: put OOM property BodyFormat failed\n",
+                       SRCNAME, __func__);
+        }
+
+
       err = set_message_body (message, ciphertext, want_html);
       if (err)
         goto leave;
       err = set_message_body (message, ciphertext, want_html);
       if (err)
         goto leave;
@@ -1367,15 +1391,16 @@ GpgMsgImpl::encrypt_and_sign (HWND hwnd, bool want_html, bool sign_flag)
       if (hr != S_OK)
         {
           log_error ("%s:%s: can't set content type: hr=%#lx\n",
       if (hr != S_OK)
         {
           log_error ("%s:%s: can't set content type: hr=%#lx\n",
-                     __FILE__, __func__, hr);
+                     SRCNAME, __func__, hr);
         }
         }
+
     }
   
   hr = message->SaveChanges (KEEP_OPEN_READWRITE|FORCE_SAVE);
   if (hr != S_OK)
     {
       log_error ("%s:%s: SaveChanges(message) failed: hr=%#lx\n",
     }
   
   hr = message->SaveChanges (KEEP_OPEN_READWRITE|FORCE_SAVE);
   if (hr != S_OK)
     {
       log_error ("%s:%s: SaveChanges(message) failed: hr=%#lx\n",
-                 __FILE__, __func__, hr); 
+                 SRCNAME, __func__, hr); 
       err = gpg_error (GPG_ERR_GENERAL);
       goto leave;
     }
       err = gpg_error (GPG_ERR_GENERAL);
       goto leave;
     }
@@ -1388,7 +1413,7 @@ GpgMsgImpl::encrypt_and_sign (HWND hwnd, bool want_html, bool sign_flag)
   free_string_array (recipients);
   free_string_array (unknown);
   xfree (ciphertext);
   free_string_array (recipients);
   free_string_array (unknown);
   xfree (ciphertext);
-  log_debug ("%s:%s: leave (err=%s)\n", __FILE__, __func__, op_strerror (err));
+  log_debug ("%s:%s: leave (err=%s)\n", SRCNAME, __func__, op_strerror (err));
   return err;
 }
 
   return err;
 }
 
@@ -1460,7 +1485,7 @@ GpgMsgImpl::getAttachments (void)
       if (FAILED (hr))
         {
           log_debug ("%s:%s: GetAttachmentTable failed: hr=%#lx",
       if (FAILED (hr))
         {
           log_debug ("%s:%s: GetAttachmentTable failed: hr=%#lx",
-                     __FILE__, __func__, hr);
+                     SRCNAME, __func__, hr);
           return 0;
         }
       
           return 0;
         }
       
@@ -1469,7 +1494,7 @@ GpgMsgImpl::getAttachments (void)
       if (FAILED (hr))
         {
           log_debug ("%s:%s: HrQueryAllRows failed: hr=%#lx",
       if (FAILED (hr))
         {
           log_debug ("%s:%s: HrQueryAllRows failed: hr=%#lx",
-                     __FILE__, __func__, hr);
+                     SRCNAME, __func__, hr);
           table->Release ();
           return 0;
         }
           table->Release ();
           return 0;
         }
@@ -1495,7 +1520,7 @@ get_attach_method (LPATTACH obj)
   if (FAILED (hr))
     {
       log_error ("%s:%s: error getting attachment method: hr=%#lx",
   if (FAILED (hr))
     {
       log_error ("%s:%s: error getting attachment method: hr=%#lx",
-                 __FILE__, __func__, hr);
+                 SRCNAME, __func__, hr);
       return 0; 
     }
   /* We don't bother checking whether we really get a PT_LONG ulong
       return 0; 
     }
   /* We don't bother checking whether we really get a PT_LONG ulong
@@ -1520,7 +1545,7 @@ get_attach_mime_tag (LPATTACH obj)
   if (FAILED (hr))
     {
       log_error ("%s:%s: error getting attachment's MIME tag: hr=%#lx",
   if (FAILED (hr))
     {
       log_error ("%s:%s: error getting attachment's MIME tag: hr=%#lx",
-                 __FILE__, __func__, hr);
+                 SRCNAME, __func__, hr);
       return NULL; 
     }
   switch ( PROP_TYPE (propval->ulPropTag) )
       return NULL; 
     }
   switch ( PROP_TYPE (propval->ulPropTag) )
@@ -1528,7 +1553,7 @@ get_attach_mime_tag (LPATTACH obj)
     case PT_UNICODE:
       name = wchar_to_utf8 (propval->Value.lpszW);
       if (!name)
     case PT_UNICODE:
       name = wchar_to_utf8 (propval->Value.lpszW);
       if (!name)
-        log_debug ("%s:%s: error converting to utf8\n", __FILE__, __func__);
+        log_debug ("%s:%s: error converting to utf8\n", SRCNAME, __func__);
       break;
       
     case PT_STRING8:
       break;
       
     case PT_STRING8:
@@ -1537,7 +1562,7 @@ get_attach_mime_tag (LPATTACH obj)
       
     default:
       log_debug ("%s:%s: proptag=%#lx not supported\n",
       
     default:
       log_debug ("%s:%s: proptag=%#lx not supported\n",
-                 __FILE__, __func__, propval->ulPropTag);
+                 SRCNAME, __func__, propval->ulPropTag);
       name = NULL;
       break;
     }
       name = NULL;
       break;
     }
@@ -1560,7 +1585,7 @@ get_short_attach_data (LPATTACH obj)
   if (FAILED (hr))
     {
       log_error ("%s:%s: error getting attachment's data: hr=%#lx",
   if (FAILED (hr))
     {
       log_error ("%s:%s: error getting attachment's data: hr=%#lx",
-                 __FILE__, __func__, hr);
+                 SRCNAME, __func__, hr);
       return NULL; 
     }
   switch ( PROP_TYPE (propval->ulPropTag) )
       return NULL; 
     }
   switch ( PROP_TYPE (propval->ulPropTag) )
@@ -1575,7 +1600,7 @@ get_short_attach_data (LPATTACH obj)
       
     default:
       log_debug ("%s:%s: proptag=%#lx not supported\n",
       
     default:
       log_debug ("%s:%s: proptag=%#lx not supported\n",
-                 __FILE__, __func__, propval->ulPropTag);
+                 SRCNAME, __func__, propval->ulPropTag);
       data = NULL;
       break;
     }
       data = NULL;
       break;
     }
@@ -1660,7 +1685,7 @@ set_x_header (LPMESSAGE msg, const char *name, const char *val)
   if (FAILED (hr)) 
     {
       log_error ("%s:%s: can't get mapping for header `%s': hr=%#lx\n",
   if (FAILED (hr)) 
     {
       log_error ("%s:%s: can't get mapping for header `%s': hr=%#lx\n",
-                 __FILE__, __func__, name, hr); 
+                 SRCNAME, __func__, name, hr); 
       return false;
     }
     
       return false;
     }
     
@@ -1670,7 +1695,7 @@ set_x_header (LPMESSAGE msg, const char *name, const char *val)
   if (hr != S_OK)
     {
       log_error ("%s:%s: can't set header `%s': hr=%#lx\n",
   if (hr != S_OK)
     {
       log_error ("%s:%s: can't set header `%s': hr=%#lx\n",
-                 __FILE__, __func__, name, hr); 
+                 SRCNAME, __func__, name, hr); 
       return false;
     }
   return true;
       return false;
     }
   return true;
@@ -1696,7 +1721,7 @@ get_attach_filename (LPATTACH obj)
     hr = HrGetOneProp ((LPMAPIPROP)obj, PR_ATTACH_FILENAME, &propval);
   if (FAILED(hr))
     {
     hr = HrGetOneProp ((LPMAPIPROP)obj, PR_ATTACH_FILENAME, &propval);
   if (FAILED(hr))
     {
-      log_debug ("%s:%s: no filename property found", __FILE__, __func__);
+      log_debug ("%s:%s: no filename property found", SRCNAME, __func__);
       return NULL;
     }
 
       return NULL;
     }
 
@@ -1705,7 +1730,7 @@ get_attach_filename (LPATTACH obj)
     case PT_UNICODE:
       name = wchar_to_utf8 (propval->Value.lpszW);
       if (!name)
     case PT_UNICODE:
       name = wchar_to_utf8 (propval->Value.lpszW);
       if (!name)
-        log_debug ("%s:%s: error converting to utf8\n", __FILE__, __func__);
+        log_debug ("%s:%s: error converting to utf8\n", SRCNAME, __func__);
       break;
       
     case PT_STRING8:
       break;
       
     case PT_STRING8:
@@ -1714,7 +1739,7 @@ get_attach_filename (LPATTACH obj)
       
     default:
       log_debug ("%s:%s: proptag=%#lx not supported\n",
       
     default:
       log_debug ("%s:%s: proptag=%#lx not supported\n",
-                 __FILE__, __func__, propval->ulPropTag);
+                 SRCNAME, __func__, propval->ulPropTag);
       name = NULL;
       break;
     }
       name = NULL;
       break;
     }
@@ -1745,14 +1770,14 @@ get_pgp_armor_type (LPATTACH att, int method)
   if (FAILED (hr))
     {
       log_debug ("%s:%s: can't attachment data: hr=%#lx",
   if (FAILED (hr))
     {
       log_debug ("%s:%s: can't attachment data: hr=%#lx",
-                 __FILE__, __func__,  hr);
+                 SRCNAME, __func__,  hr);
       return ARMOR_NONE;
     }
 
   hr = stream->Read (buffer, sizeof buffer -1, &nread);
   if ( hr != S_OK )
     {
       return ARMOR_NONE;
     }
 
   hr = stream->Read (buffer, sizeof buffer -1, &nread);
   if ( hr != S_OK )
     {
-      log_debug ("%s:%s: Read failed: hr=%#lx", __FILE__, __func__, hr);
+      log_debug ("%s:%s: Read failed: hr=%#lx", SRCNAME, __func__, hr);
       stream->Release ();
       return ARMOR_NONE;
     }
       stream->Release ();
       return ARMOR_NONE;
     }
@@ -1800,7 +1825,7 @@ GpgMsgImpl::gatherAttachmentInfo (void)
   has_attestation = false;
   n_attach = getAttachments ();
   log_debug ("%s:%s: message has %u attachments\n",
   has_attestation = false;
   n_attach = getAttachments ();
   log_debug ("%s:%s: message has %u attachments\n",
-             __FILE__, __func__, n_attach);
+             SRCNAME, __func__, n_attach);
   if (!n_attach)
       return NULL;
 
   if (!n_attach)
       return NULL;
 
@@ -1813,7 +1838,7 @@ GpgMsgImpl::gatherAttachmentInfo (void)
       if (FAILED (hr))
         {
           log_error ("%s:%s: can't open attachment %d: hr=%#lx",
       if (FAILED (hr))
         {
           log_error ("%s:%s: can't open attachment %d: hr=%#lx",
-                     __FILE__, __func__, pos, hr);
+                     SRCNAME, __func__, pos, hr);
           table[pos].invalid = 1;
           invalid_count++;
           continue;
           table[pos].invalid = 1;
           invalid_count++;
           continue;
@@ -1915,7 +1940,7 @@ GpgMsgImpl::gatherAttachmentInfo (void)
         table[pos].is_signed = 1;
     }
 
         table[pos].is_signed = 1;
     }
 
-  log_debug ("%s:%s: attachment info:\n", __FILE__, __func__);
+  log_debug ("%s:%s: attachment info:\n", SRCNAME, __func__);
   for (pos=0; !table[pos].end_of_table; pos++)
     {
       if (table[pos].invalid)
   for (pos=0; !table[pos].end_of_table; pos++)
     {
       if (table[pos].invalid)
@@ -1969,7 +1994,7 @@ GpgMsgImpl::verifyAttachment (HWND hwnd, attach_info_t table,
   char *sig_data;
 
   log_debug ("%s:%s: verifying attachment %d/%d",
   char *sig_data;
 
   log_debug ("%s:%s: verifying attachment %d/%d",
-             __FILE__, __func__, pos_data, pos_sig);
+             SRCNAME, __func__, pos_data, pos_sig);
 
   assert (table);
   assert (message);
 
   assert (table);
   assert (message);
@@ -1981,7 +2006,7 @@ GpgMsgImpl::verifyAttachment (HWND hwnd, attach_info_t table,
   if (FAILED (hr))
     {
       log_error ("%s:%s: can't open attachment %d (sig): hr=%#lx",
   if (FAILED (hr))
     {
       log_error ("%s:%s: can't open attachment %d (sig): hr=%#lx",
-                 __FILE__, __func__, pos_sig, hr);
+                 SRCNAME, __func__, pos_sig, hr);
       return;
     }
 
       return;
     }
 
@@ -1990,7 +2015,7 @@ GpgMsgImpl::verifyAttachment (HWND hwnd, attach_info_t table,
   else
     {
       log_error ("%s:%s: attachment %d (sig): method %d not supported",
   else
     {
       log_error ("%s:%s: attachment %d (sig): method %d not supported",
-                 __FILE__, __func__, pos_sig, table[pos_sig].method);
+                 SRCNAME, __func__, pos_sig, table[pos_sig].method);
       att->Release ();
       return;
     }
       att->Release ();
       return;
     }
@@ -2004,7 +2029,7 @@ GpgMsgImpl::verifyAttachment (HWND hwnd, attach_info_t table,
   if (FAILED (hr))
     {
       log_error ("%s:%s: can't open attachment %d (data): hr=%#lx",
   if (FAILED (hr))
     {
       log_error ("%s:%s: can't open attachment %d (data): hr=%#lx",
-                 __FILE__, __func__, pos_data, hr);
+                 SRCNAME, __func__, pos_data, hr);
       xfree (sig_data);
       return;
     }
       xfree (sig_data);
       return;
     }
@@ -2018,7 +2043,7 @@ GpgMsgImpl::verifyAttachment (HWND hwnd, attach_info_t table,
       if (FAILED (hr))
         {
           log_error ("%s:%s: can't open data of attachment %d: hr=%#lx",
       if (FAILED (hr))
         {
           log_error ("%s:%s: can't open data of attachment %d: hr=%#lx",
-                     __FILE__, __func__, pos_data, hr);
+                     SRCNAME, __func__, pos_data, hr);
           goto leave;
         }
       err = op_verify_detached_sig (stream, sig_data,
           goto leave;
         }
       err = op_verify_detached_sig (stream, sig_data,
@@ -2026,7 +2051,7 @@ GpgMsgImpl::verifyAttachment (HWND hwnd, attach_info_t table,
       if (err)
         {
           log_debug ("%s:%s: verify detached signature failed: %s",
       if (err)
         {
           log_debug ("%s:%s: verify detached signature failed: %s",
-                     __FILE__, __func__, op_strerror (err)); 
+                     SRCNAME, __func__, op_strerror (err)); 
           MessageBox (hwnd, op_strerror (err),
                       "GPG Attachment Verification", MB_ICONERROR|MB_OK);
         }
           MessageBox (hwnd, op_strerror (err),
                       "GPG Attachment Verification", MB_ICONERROR|MB_OK);
         }
@@ -2035,7 +2060,7 @@ GpgMsgImpl::verifyAttachment (HWND hwnd, attach_info_t table,
   else
     {
       log_error ("%s:%s: attachment %d (data): method %d not supported",
   else
     {
       log_error ("%s:%s: attachment %d (data): method %d not supported",
-                 __FILE__, __func__, pos_data, table[pos_data].method);
+                 SRCNAME, __func__, pos_data, table[pos_data].method);
     }
 
  leave:
     }
 
  leave:
@@ -2060,18 +2085,18 @@ GpgMsgImpl::decryptAttachment (HWND hwnd, int pos, bool save_plaintext,
   char *outname = NULL;
   
 
   char *outname = NULL;
   
 
-  log_debug ("%s:%s: processing attachment %d", __FILE__, __func__, pos);
+  log_debug ("%s:%s: processing attachment %d", SRCNAME, __func__, pos);
 
   /* Make sure that we can access the attachment table. */
   if (!message || !getAttachments ())
     {
 
   /* Make sure that we can access the attachment table. */
   if (!message || !getAttachments ())
     {
-      log_debug ("%s:%s: no attachemnts at all", __FILE__, __func__);
+      log_debug ("%s:%s: no attachemnts at all", SRCNAME, __func__);
       return;
     }
 
   if (!save_plaintext)
     {
       return;
     }
 
   if (!save_plaintext)
     {
-      log_error ("%s:%s: save_plaintext not requested", __FILE__, __func__);
+      log_error ("%s:%s: save_plaintext not requested", SRCNAME, __func__);
       return;
     }
 
       return;
     }
 
@@ -2079,7 +2104,7 @@ GpgMsgImpl::decryptAttachment (HWND hwnd, int pos, bool save_plaintext,
   if (FAILED (hr))
     {
       log_debug ("%s:%s: can't open attachment %d: hr=%#lx",
   if (FAILED (hr))
     {
       log_debug ("%s:%s: can't open attachment %d: hr=%#lx",
-                 __FILE__, __func__, pos, hr);
+                 SRCNAME, __func__, pos, hr);
       return;
     }
 
       return;
     }
 
@@ -2100,7 +2125,7 @@ GpgMsgImpl::decryptAttachment (HWND hwnd, int pos, bool save_plaintext,
       if (FAILED (hr))
         {
           log_error ("%s:%s: can't open data obj of attachment %d: hr=%#lx",
       if (FAILED (hr))
         {
           log_error ("%s:%s: can't open data obj of attachment %d: hr=%#lx",
-                     __FILE__, __func__, pos, hr);
+                     SRCNAME, __func__, pos, hr);
           goto leave;
         }
 
           goto leave;
         }
 
@@ -2123,7 +2148,7 @@ GpgMsgImpl::decryptAttachment (HWND hwnd, int pos, bool save_plaintext,
       suggested_name = get_attach_filename (att);
       if (suggested_name)
         log_debug ("%s:%s: attachment %d, filename `%s'", 
       suggested_name = get_attach_filename (att);
       if (suggested_name)
         log_debug ("%s:%s: attachment %d, filename `%s'", 
-                   __FILE__, __func__, pos, suggested_name);
+                   SRCNAME, __func__, pos, suggested_name);
       /* Strip of know extensions or use a default name. */
       if (!suggested_name)
         {
       /* Strip of know extensions or use a default name. */
       if (!suggested_name)
         {
@@ -2151,7 +2176,7 @@ GpgMsgImpl::decryptAttachment (HWND hwnd, int pos, bool save_plaintext,
       if (FAILED (hr))
         {
           log_error ("%s:%s: can't open data of attachment %d: hr=%#lx",
       if (FAILED (hr))
         {
           log_error ("%s:%s: can't open data of attachment %d: hr=%#lx",
-                     __FILE__, __func__, pos, hr);
+                     SRCNAME, __func__, pos, hr);
           goto leave;
         }
 
           goto leave;
         }
 
@@ -2165,7 +2190,7 @@ GpgMsgImpl::decryptAttachment (HWND hwnd, int pos, bool save_plaintext,
           if (hr != S_OK)
             {
               log_error ("%s:%s: can't create attachment: hr=%#lx\n",
           if (hr != S_OK)
             {
               log_error ("%s:%s: can't create attachment: hr=%#lx\n",
-                         __FILE__, __func__, hr); 
+                         SRCNAME, __func__, hr); 
               goto leave;
             }
           
               goto leave;
             }
           
@@ -2175,7 +2200,7 @@ GpgMsgImpl::decryptAttachment (HWND hwnd, int pos, bool save_plaintext,
           if (hr != S_OK)
             {
               log_error ("%s:%s: can't set attach method: hr=%#lx\n",
           if (hr != S_OK)
             {
               log_error ("%s:%s: can't set attach method: hr=%#lx\n",
-                         __FILE__, __func__, hr); 
+                         SRCNAME, __func__, hr); 
               goto leave;
             }
           
               goto leave;
             }
           
@@ -2185,11 +2210,11 @@ GpgMsgImpl::decryptAttachment (HWND hwnd, int pos, bool save_plaintext,
           if (hr != S_OK)
             {
               log_error ("%s:%s: can't set attach filename: hr=%#lx\n",
           if (hr != S_OK)
             {
               log_error ("%s:%s: can't set attach filename: hr=%#lx\n",
-                         __FILE__, __func__, hr); 
+                         SRCNAME, __func__, hr); 
               goto leave;
             }
           log_debug ("%s:%s: setting filename of attachment %d/%ld to `%s'",
               goto leave;
             }
           log_debug ("%s:%s: setting filename of attachment %d/%ld to `%s'",
-                     __FILE__, __func__, pos, newpos, outname);
+                     SRCNAME, __func__, pos, newpos, outname);
           
 
           hr = newatt->OpenProperty (PR_ATTACH_DATA_BIN, &IID_IStream, 0,
           
 
           hr = newatt->OpenProperty (PR_ATTACH_DATA_BIN, &IID_IStream, 0,
@@ -2197,7 +2222,7 @@ GpgMsgImpl::decryptAttachment (HWND hwnd, int pos, bool save_plaintext,
           if (FAILED (hr)) 
             {
               log_error ("%s:%s: can't create output stream: hr=%#lx\n",
           if (FAILED (hr)) 
             {
               log_error ("%s:%s: can't create output stream: hr=%#lx\n",
-                         __FILE__, __func__, hr); 
+                         SRCNAME, __func__, hr); 
               goto leave;
             }
       
               goto leave;
             }
       
@@ -2205,7 +2230,7 @@ GpgMsgImpl::decryptAttachment (HWND hwnd, int pos, bool save_plaintext,
           if (err)
             {
               log_debug ("%s:%s: decrypt stream failed: %s",
           if (err)
             {
               log_debug ("%s:%s: decrypt stream failed: %s",
-                         __FILE__, __func__, op_strerror (err)); 
+                         SRCNAME, __func__, op_strerror (err)); 
               to->Revert ();
               to->Release ();
               from->Release ();
               to->Revert ();
               to->Release ();
               from->Release ();
@@ -2222,7 +2247,7 @@ GpgMsgImpl::decryptAttachment (HWND hwnd, int pos, bool save_plaintext,
           if (hr != S_OK)
             {
               log_error ("%s:%s: SaveChanges failed: hr=%#lx\n",
           if (hr != S_OK)
             {
               log_error ("%s:%s: SaveChanges failed: hr=%#lx\n",
-                         __FILE__, __func__, hr); 
+                         SRCNAME, __func__, hr); 
               goto leave;
             }
 
               goto leave;
             }
 
@@ -2233,7 +2258,7 @@ GpgMsgImpl::decryptAttachment (HWND hwnd, int pos, bool save_plaintext,
           att = NULL;
           if (message->DeleteAttach (pos, 0, NULL, 0) == S_OK)
             log_error ("%s:%s: failed to delete attachment %d: %s",
           att = NULL;
           if (message->DeleteAttach (pos, 0, NULL, 0) == S_OK)
             log_error ("%s:%s: failed to delete attachment %d: %s",
-                       __FILE__, __func__, pos, op_strerror (err)); 
+                       SRCNAME, __func__, pos, op_strerror (err)); 
           
         }
       else  /* Save attachment to a file. */
           
         }
       else  /* Save attachment to a file. */
@@ -2244,7 +2269,7 @@ GpgMsgImpl::decryptAttachment (HWND hwnd, int pos, bool save_plaintext,
           if (FAILED (hr)) 
             {
               log_error ("%s:%s: can't create stream for `%s': hr=%#lx\n",
           if (FAILED (hr)) 
             {
               log_error ("%s:%s: can't create stream for `%s': hr=%#lx\n",
-                         __FILE__, __func__, outname, hr); 
+                         SRCNAME, __func__, outname, hr); 
               from->Release ();
               goto leave;
             }
               from->Release ();
               goto leave;
             }
@@ -2253,7 +2278,7 @@ GpgMsgImpl::decryptAttachment (HWND hwnd, int pos, bool save_plaintext,
           if (err)
             {
               log_debug ("%s:%s: decrypt stream failed: %s",
           if (err)
             {
               log_debug ("%s:%s: decrypt stream failed: %s",
-                         __FILE__, __func__, op_strerror (err)); 
+                         SRCNAME, __func__, op_strerror (err)); 
               to->Revert ();
               to->Release ();
               from->Release ();
               to->Revert ();
               to->Release ();
               from->Release ();
@@ -2274,7 +2299,7 @@ GpgMsgImpl::decryptAttachment (HWND hwnd, int pos, bool save_plaintext,
   else
     {
       log_error ("%s:%s: attachment %d: method %d not supported",
   else
     {
       log_error ("%s:%s: attachment %d: method %d not supported",
-                 __FILE__, __func__, pos, method);
+                 SRCNAME, __func__, pos, method);
     }
 
  leave:
     }
 
  leave:
@@ -2302,7 +2327,7 @@ GpgMsgImpl::signAttachment (HWND hwnd, int pos, gpgme_key_t sign_key, int ttl)
   /* Make sure that we can access the attachment table. */
   if (!message || !getAttachments ())
     {
   /* Make sure that we can access the attachment table. */
   if (!message || !getAttachments ())
     {
-      log_debug ("%s:%s: no attachemnts at all", __FILE__, __func__);
+      log_debug ("%s:%s: no attachemnts at all", SRCNAME, __func__);
       return;
     }
 
       return;
     }
 
@@ -2310,7 +2335,7 @@ GpgMsgImpl::signAttachment (HWND hwnd, int pos, gpgme_key_t sign_key, int ttl)
   if (FAILED (hr))
     {
       log_debug ("%s:%s: can't open attachment %d: hr=%#lx",
   if (FAILED (hr))
     {
       log_debug ("%s:%s: can't open attachment %d: hr=%#lx",
-                 __FILE__, __func__, pos, hr);
+                 SRCNAME, __func__, pos, hr);
       return;
     }
 
       return;
     }
 
@@ -2334,7 +2359,7 @@ GpgMsgImpl::signAttachment (HWND hwnd, int pos, gpgme_key_t sign_key, int ttl)
   if (method == ATTACH_EMBEDDED_MSG)
     {
       log_debug ("%s:%s: signing embedded attachments is not supported",
   if (method == ATTACH_EMBEDDED_MSG)
     {
       log_debug ("%s:%s: signing embedded attachments is not supported",
-                 __FILE__, __func__);
+                 SRCNAME, __func__);
     }
   else if (method == ATTACH_BY_VALUE)
     {
     }
   else if (method == ATTACH_BY_VALUE)
     {
@@ -2346,7 +2371,7 @@ GpgMsgImpl::signAttachment (HWND hwnd, int pos, gpgme_key_t sign_key, int ttl)
       if (FAILED (hr))
         {
           log_error ("%s:%s: can't open data of attachment %d: hr=%#lx",
       if (FAILED (hr))
         {
           log_error ("%s:%s: can't open data of attachment %d: hr=%#lx",
-                     __FILE__, __func__, pos, hr);
+                     SRCNAME, __func__, pos, hr);
           goto leave;
         }
 
           goto leave;
         }
 
@@ -2354,7 +2379,7 @@ GpgMsgImpl::signAttachment (HWND hwnd, int pos, gpgme_key_t sign_key, int ttl)
       if (hr != S_OK)
         {
           log_error ("%s:%s: can't create attachment: hr=%#lx\n",
       if (hr != S_OK)
         {
           log_error ("%s:%s: can't create attachment: hr=%#lx\n",
-                     __FILE__, __func__, hr); 
+                     SRCNAME, __func__, hr); 
           goto leave;
         }
 
           goto leave;
         }
 
@@ -2364,7 +2389,7 @@ GpgMsgImpl::signAttachment (HWND hwnd, int pos, gpgme_key_t sign_key, int ttl)
       if (hr != S_OK)
         {
           log_error ("%s:%s: can't set attach method: hr=%#lx\n",
       if (hr != S_OK)
         {
           log_error ("%s:%s: can't set attach method: hr=%#lx\n",
-                     __FILE__, __func__, hr); 
+                     SRCNAME, __func__, hr); 
           goto leave;
         }
       
           goto leave;
         }
       
@@ -2374,11 +2399,11 @@ GpgMsgImpl::signAttachment (HWND hwnd, int pos, gpgme_key_t sign_key, int ttl)
       if (hr != S_OK)
         {
           log_error ("%s:%s: can't set attach filename: hr=%#lx\n",
       if (hr != S_OK)
         {
           log_error ("%s:%s: can't set attach filename: hr=%#lx\n",
-                     __FILE__, __func__, hr); 
+                     SRCNAME, __func__, hr); 
           goto leave;
         }
       log_debug ("%s:%s: setting filename of attachment %d/%ld to `%s'",
           goto leave;
         }
       log_debug ("%s:%s: setting filename of attachment %d/%ld to `%s'",
-                 __FILE__, __func__, pos, newpos, signame);
+                 SRCNAME, __func__, pos, newpos, signame);
 
       prop.ulPropTag = PR_ATTACH_EXTENSION_A;
       prop.Value.lpszA = ".pgpsig";   
 
       prop.ulPropTag = PR_ATTACH_EXTENSION_A;
       prop.Value.lpszA = ".pgpsig";   
@@ -2386,7 +2411,7 @@ GpgMsgImpl::sig