diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-06-19 00:52:10 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-06-19 16:18:07 -0400 |
commit | ce3ec98acd2f344ae911de3f41dd2e3c6c68b141 (patch) | |
tree | fa9a1ef1190111696b857178593ee7a1b777c65a /sim/configure | |
parent | bc56166f66244a9e3abc62c7bc595a6f800f23b0 (diff) | |
download | fsf-binutils-gdb-ce3ec98acd2f344ae911de3f41dd2e3c6c68b141.zip fsf-binutils-gdb-ce3ec98acd2f344ae911de3f41dd2e3c6c68b141.tar.gz fsf-binutils-gdb-ce3ec98acd2f344ae911de3f41dd2e3c6c68b141.tar.bz2 |
sim: unify gettext/intl probing logic
Move these options up to the common dir so we only test & export
them once across all ports.
Diffstat (limited to 'sim/configure')
-rwxr-xr-x | sim/configure | 88 |
1 files changed, 86 insertions, 2 deletions
diff --git a/sim/configure b/sim/configure index 0f130dd..1b56b62 100755 --- a/sim/configure +++ b/sim/configure @@ -698,6 +698,18 @@ PLUGINS_FALSE PLUGINS_TRUE zlibinc zlibdir +CATOBJEXT +GENCAT +INSTOBJEXT +DATADIRNAME +CATALOGS +POSUB +GMSGFMT +XGETTEXT +INCINTL +LIBINTL_DEP +LIBINTL +USE_NLS LIBOBJS C_DIALECT RANLIB @@ -8259,6 +8271,78 @@ $as_echo "#define gid_t int" >>confdefs.h fi +ALL_LINGUAS= +# 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 + # Use the system's zlib library. zlibdir="-L\$(top_builddir)/../zlib" @@ -11854,7 +11938,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11857 "configure" +#line 11941 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11960,7 +12044,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11963 "configure" +#line 12047 "configure" #include "confdefs.h" #if HAVE_DLFCN_H |