This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 5/6] Use -lintl when libc doesn't provide dgettext


Hi Mike,

On Mon, May 4, 2015 at 9:12 AM, Mike Frysinger <vapier@gentoo.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.
> -mike
>
> --- 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.])
>
>  AC_PROG_CC
> +AC_USE_SYSTEM_EXTENSIONS
>  AC_PROG_RANLIB
>  AC_PROG_YACC
>  AM_PROG_LEX
> @@ -258,10 +259,8 @@ dnl Test suite.
>  AM_CONDITIONAL(STANDALONE, false)dnl Used in tests/Makefile.am, which see.
>  AC_CONFIG_FILES([tests/Makefile])
>
> -# 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)
> -AM_PO_SUBDIRS
> +AM_GNU_GETTEXT([external])
> +AM_GNU_GETTEXT_VERSION([0.18.2])

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.

-- 
Thanks.
-- Max

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]