This is the mail archive of the
mailing list for the elfutils project.
Re: [PATCH 5/6] Use -lintl when libc doesn't provide dgettext
- From: Max Filippov <jcmvbkbc at gmail dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Mon, 04 May 2015 20:26:26 +0300
- Subject: Re: [PATCH 5/6] Use -lintl when libc doesn't provide dgettext
On Mon, May 4, 2015 at 9:12 AM, Mike Frysinger <firstname.lastname@example.org> wrote:
> On 04 May 2015 02:25, Max Filippov wrote:
>> + [char *test=dgettext("test","test"); return 0;]
> these tests might be a little more robust if you return the value:
> return dgettext("test","test") != NULL;
> that said, i think you can drop all of this custom logic. elfutils uses
> gettext, which means it should call AM_GNU_GETTEXT. once you do that, gettext
> already sets up $LIBINTL for you and exports it to makefiles.
> elfutils used to use this macro, but Ulrich dropped it back in 2005 which is
> before the git history started, although i doubt he provided a useful commit
> message in the first place.
> maybe something like this ? i picked 0.18.2 merely becuase that's what is
> listed in m4/gettext.m4 already.
> --- a/configure.ac
> +++ b/configure.ac
> @@ -71,6 +71,7 @@ AS_IF([test "$use_locks" = yes],
> AH_TEMPLATE([USE_LOCKS], [Defined if libraries should be thread-safe.])
> @@ -258,10 +259,8 @@ dnl Test suite.
> AM_CONDITIONAL(STANDALONE, false)dnl Used in tests/Makefile.am, which see.
> -# Get the definitions necessary to create the Makefiles in the po
> -# subdirectories. This is a small subset of the gettext rules.
> -AC_SUBST(USE_NLS, yes)
This doesn't work (as I'd expect): LIBINTL is empty in the config.log and
the build fails in the absence of -lintl in e.g. libelf and libdw.