]> git.proxmox.com Git - mirror_zfs.git/commit
config: libintl/libiconv for gettext() detection
authorRafael Kitover <rkitover@gmail.com>
Fri, 19 Apr 2019 19:09:29 +0000 (19:09 +0000)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 19 Apr 2019 19:09:29 +0000 (12:09 -0700)
commite8864b1b28c231d80f0df8b1c4b893f9ada73aad
treecec47485a186c97254b54486f87c2359aef5736b
parent34d343c2a8ff849c46001c2ee2f1081f489192ef
config: libintl/libiconv for gettext() detection

Detect in autoconf whether `-lintl` and possibly `-liconv` are necessary
for translation functions like `gettext()`.

The actual autoconf code is just:

```
AM_ICONV
AM_GNU_GETTEXT([external])
LIBS="$LIBS $LTLIBINTL $LTLIBICONV"
```

References:

https://www.gnu.org/software/gettext/manual/html_node/AM_005fGNU_005fGETTEXT.html
https://www.gnu.org/software/gettext/manual/html_node/AM_005fICONV.html

The reason to check for `libiconv` and add it separately is that this is
sometimes necessary if users are linking statically.

The `config/*.m4` files were added by running `gettextize` and removing
everything else.

The empty file `config/config.rpath` is necessary to avoid an error with
some versions of autotools, see:

http://ramblingfoo.blogspot.com/2007/07/required-file-configrpath-not-found.html

The `config.rpath` copied by `gettextize` does not currently work, there
is some kind of missing interaction with `libtool` and it tries to apply
`libtool` flags to the compiler.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Richard Laager <rlaager@wiktel.com>
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Closes #8554
13 files changed:
config/config.rpath [new file with mode: 0644]
config/gettext.m4 [new file with mode: 0644]
config/host-cpu-c-abi.m4 [new file with mode: 0644]
config/iconv.m4 [new file with mode: 0644]
config/intlmacosx.m4 [new file with mode: 0644]
config/lib-ld.m4 [new file with mode: 0644]
config/lib-link.m4 [new file with mode: 0644]
config/lib-prefix.m4 [new file with mode: 0644]
config/nls.m4 [new file with mode: 0644]
config/po.m4 [new file with mode: 0644]
config/progtest.m4 [new file with mode: 0644]
config/user-gettext.m4 [new file with mode: 0644]
config/user.m4