[PATCH 5/6] Use -lintl when libc doesn't provide dgettext
Mike Frysinger
vapier at gentoo.org
Mon May 4 06:12:50 UTC 2015
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])
dnl Appended to the config.h file.
dnl We hide all kinds of configuration magic in lib/eu-config.h.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://lists.fedorahosted.org/pipermail/elfutils-devel/attachments/20150504/848ac3c6/attachment.sig>
More information about the elfutils-devel
mailing list