[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
m4/bison-i18n.m4: add --with-bisonlocaledir to assign BISON_LOCALEDIR
From: |
Akim Demaille |
Subject: |
m4/bison-i18n.m4: add --with-bisonlocaledir to assign BISON_LOCALEDIR |
Date: |
Sat, 2 May 2020 07:50:38 +0200 |
Hi,
Someone suggested that it would be nice to force a given value
to BISON_LOCALEDIR in ./configure. Are you interested in that?
I'm not a huge fan of adding tons of options to configure, I would
rather have this macro take incoming values of $BISON_LOCALEDIR,
and of course document it with AC_ARG_VAR.
I can wrap a commit if considered relevant.
Cheers!
> Début du message réexpédié :
>
> De: Hongxu Jia <address@hidden>
> Objet: [PATCH] m4/bison-i18n.m4: add --with-bisonlocaledir to assign
> BISON_LOCALEDIR
> Date: 18 février 2016 à 07:00:09 UTC+1
> À: <address@hidden>
>
> The variable BISON_LOCALEDIR is assigned only by the output of
> 'bison --print-localedir', we add option --with-bisonlocaledir
> to assign it explicitly. It is helpful for user to split the
> native compile and cross compile.
>
> For backward compatibility, if option not used, it still
> make use of the output of 'bison --print-localedir'.
>
> Signed-off-by: Hongxu Jia <address@hidden>
> ---
> m4/bison-i18n.m4 | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/m4/bison-i18n.m4 b/m4/bison-i18n.m4
> index 8e57caf..f74187a 100644
> --- a/m4/bison-i18n.m4
> +++ b/m4/bison-i18n.m4
> @@ -16,11 +16,16 @@ dnl sets BISON_LOCALEDIR to indicate where to find the
> bison-runtime.mo files
> dnl and defines YYENABLE_NLS if there are bison-runtime.mo files at all.
> AC_DEFUN([BISON_I18N],
> [
> + dnl Default is not to set bisonlocaledir
> + AC_ARG_WITH([bisonlocaledir],
> + [ --with-bisonlocaledir sets BISON_LOCALEDIR to indicate where to
> find the bison-runtime.mo files],
> + BISON_LOCALEDIR=$withval,
> + BISON_LOCALEDIR=)
> +
> if test -z "$USE_NLS"; then
> echo "The BISON-I18N macro is used without being preceded by
> AM-GNU-GETTEXT." 1>&2
> exit 1
> fi
> - BISON_LOCALEDIR=
> BISON_USE_NLS=no
> if test "$USE_NLS" = yes; then
> dnl Determine bison's localedir.
> @@ -28,9 +33,10 @@ AC_DEFUN([BISON_I18N],
> dnl But even is YACC is called "yacc", it may be a script that invokes
> bison
> dnl and accepts the --print-localedir option.
> dnl YACC's default value is empty; BISON's default value is :.
> - if (${YACC-${BISON-:}} --print-localedir) >/dev/null 2>&1; then
> + if test -z "$BISON_LOCALEDIR" -a ${YACC-${BISON-:}} --print-localedir
> >/dev/null 2>&1; then
> BISON_LOCALEDIR=`${YACC-${BISON-:}} --print-localedir`
> fi
> + AC_MSG_RESULT([$BISON_LOCALEDIR])
> AC_SUBST([BISON_LOCALEDIR])
> if test -n "$BISON_LOCALEDIR"; then
> dnl There is no need to enable internationalization if the user doesn't
> --
> 1.9.1
>
>
- m4/bison-i18n.m4: add --with-bisonlocaledir to assign BISON_LOCALEDIR,
Akim Demaille <=