From: Nick Alcock Date: Mon, 16 Dec 2019 14:17:26 +0000 (+0000) Subject: libctf: support platforms with separate libintl X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8e6635bd14a94d4363ad79f5bb40fcc7b99a2ca6;p=binutils-gdb.git libctf: support platforms with separate libintl We were not using the right configure machinery to spot libintl on platforms where it was required, leading to the spurious failure of various configure tests (e.g. for things like ELF support in BFD). libctf/ * aclocal.m4: Add config/gettext-sister.m4: Shuffle into alphabetical order. * configure.ac: Add ZW_GNU_GETTEXT_SISTER_DIR. * config.h.in: Regenerated. * Makefile.in: Likewise. * configure: Likewise. --- diff --git a/libctf/ChangeLog b/libctf/ChangeLog index a631d55464b..c69b764fad4 100644 --- a/libctf/ChangeLog +++ b/libctf/ChangeLog @@ -1,3 +1,12 @@ +2020-06-26 Nick Alcock + + * aclocal.m4: Add config/gettext-sister.m4: Shuffle into + alphabetical order. + * configure.ac: Add ZW_GNU_GETTEXT_SISTER_DIR. + * config.h.in: Regenerated. + * Makefile.in: Likewise. + * configure: Likewise. + 2020-06-26 Nick Alcock * ctf-create.c: Include . diff --git a/libctf/Makefile.in b/libctf/Makefile.in index 3e8a0172f79..9e6f2551a56 100644 --- a/libctf/Makefile.in +++ b/libctf/Makefile.in @@ -113,6 +113,7 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/../bfd/acinclude.m4 \ $(top_srcdir)/../config/acx.m4 \ $(top_srcdir)/../config/depstand.m4 \ + $(top_srcdir)/../config/gettext-sister.m4 \ $(top_srcdir)/../config/lead-dot.m4 \ $(top_srcdir)/../config/override.m4 \ $(top_srcdir)/../config/warnings.m4 \ @@ -297,12 +298,15 @@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BFD_DEPENDENCIES = @BFD_DEPENDENCIES@ BFD_LIBADD = @BFD_LIBADD@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ @@ -313,14 +317,20 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GENCAT = @GENCAT@ +GMSGFMT = @GMSGFMT@ GREP = @GREP@ +INCINTL = @INCINTL@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBINTL = @LIBINTL@ +LIBINTL_DEP = @LIBINTL_DEP@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ @@ -344,6 +354,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +POSUB = @POSUB@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -351,10 +362,12 @@ SHARED_LDFLAGS = @SHARED_LDFLAGS@ SHARED_LIBADD = @SHARED_LIBADD@ SHELL = @SHELL@ STRIP = @STRIP@ +USE_NLS = @USE_NLS@ VERSION = @VERSION@ VERSION_FLAGS = @VERSION_FLAGS@ WARN_PEDANTIC = @WARN_PEDANTIC@ WERROR = @WERROR@ +XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ diff --git a/libctf/aclocal.m4 b/libctf/aclocal.m4 index 15d96cd63e3..8ae4b534629 100644 --- a/libctf/aclocal.m4 +++ b/libctf/aclocal.m4 @@ -1230,6 +1230,7 @@ AC_SUBST([am__untar]) m4_include([../bfd/acinclude.m4]) m4_include([../config/acx.m4]) m4_include([../config/depstand.m4]) +m4_include([../config/gettext-sister.m4]) m4_include([../config/lead-dot.m4]) m4_include([../config/override.m4]) m4_include([../config/warnings.m4]) diff --git a/libctf/config.h.in b/libctf/config.h.in index ac0eb3e12f8..e663c694d85 100644 --- a/libctf/config.h.in +++ b/libctf/config.h.in @@ -3,6 +3,10 @@ /* Define if building universal (internal helper macro) */ #undef AC_APPLE_UNIVERSAL_BUILD +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +#undef ENABLE_NLS + /* Whether libbfd was configured for an ELF target. */ #undef HAVE_BFD_ELF diff --git a/libctf/configure b/libctf/configure index 58263e5632d..1dc1b65fac3 100755 --- a/libctf/configure +++ b/libctf/configure @@ -680,6 +680,18 @@ build_vendor build_cpu build LIBTOOL +CATOBJEXT +GENCAT +INSTOBJEXT +DATADIRNAME +CATALOGS +POSUB +GMSGFMT +XGETTEXT +INCINTL +LIBINTL_DEP +LIBINTL +USE_NLS ac_ct_AR AR RANLIB @@ -5283,6 +5295,76 @@ unknown) ;; esac +# If we haven't got the data from the intl directory, +# assume NLS is disabled. +USE_NLS=no +LIBINTL= +LIBINTL_DEP= +INCINTL= +XGETTEXT= +GMSGFMT= +POSUB= + +if test -f ../intl/config.intl; then + . ../intl/config.intl +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 +$as_echo_n "checking whether NLS is requested... " >&6; } +if test x"$USE_NLS" != xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define ENABLE_NLS 1" >>confdefs.h + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5 +$as_echo_n "checking for catalogs to be installed... " >&6; } + # Look for .po and .gmo files in the source directory. + CATALOGS= + XLINGUAS= + for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do + # If there aren't any .gmo files the shell will give us the + # literal string "../path/to/srcdir/po/*.gmo" which has to be + # weeded out. + case "$cat" in *\**) + continue;; + esac + # The quadruple backslash is collapsed to a double backslash + # by the backticks, then collapsed again by the double quotes, + # leaving us with one backslash in the sed expression (right + # before the dot that mustn't act as a wildcard). + cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"` + lang=`echo $cat | sed -e "s!\\\\.gmo!!"` + # The user is allowed to set LINGUAS to a list of languages to + # install catalogs for. If it's empty that means "all of them." + if test "x$LINGUAS" = x; then + CATALOGS="$CATALOGS $cat" + XLINGUAS="$XLINGUAS $lang" + else + case "$LINGUAS" in *$lang*) + CATALOGS="$CATALOGS $cat" + XLINGUAS="$XLINGUAS $lang" + ;; + esac + fi + done + LINGUAS="$XLINGUAS" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5 +$as_echo "$LINGUAS" >&6; } + + + DATADIRNAME=share + + INSTOBJEXT=.mo + + GENCAT=gencat + + CATOBJEXT=.gmo + +fi # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : @@ -11431,7 +11513,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11434 "configure" +#line 11516 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11537,7 +11619,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11540 "configure" +#line 11622 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libctf/configure.ac b/libctf/configure.ac index f7e0cace52c..f31108c0fad 100644 --- a/libctf/configure.ac +++ b/libctf/configure.ac @@ -31,6 +31,7 @@ AC_PROG_MAKE_SET AC_PROG_CC AC_PROG_RANLIB AM_PROG_AR +ZW_GNU_GETTEXT_SISTER_DIR dnl Default to a non shared library. This may be overridden by the dnl configure option --enable-shared.