Good idea, thanks. Two minor points: > if test -n "$BISON_LOCALEDIR"; then > USER_LINGUAS="${LINGUAS-%UNSET%}" > if test -n "$USER_LINGUAS"; then
What is the significance of the %UNSET% here? I.e., why is an unset LINGUAS treated as nonempty? Maybe a comment would help? > if test -n "$YACC"; then > case "$YACC" in > *bison*) > if ($YACC --print-localedir) >/dev/null 2>&1; then This doesn't look quite right, since "yacc" is an alias for "bison" on some implementations, so "yacc --print-localedir" will work. For example, I've installed Bison 2.3 in my home directory, so: $ yacc -print-localedir /home/eggert/opt/Linux-i686/bison-2.3/share/locale How about something like the following code instead? It's a bit shorter and easier for me to read, and takes the above into account. BISON_USE_NLS=no BISON_LOCALEDIR= if test "$USE_NLS" = yes; then dnl AC_PROG_YACC sets the YACC variable; other macros set the BISON variable. if (${YACC-${BISON-:}} --print-localedir) >/dev/null 2>&1; then BISON_LOCALEDIR=`${YACC-${BISON-:}} --print-localedir` fi AC_SUBST([BISON_LOCALEDIR]) if test -n "$BISON_LOCALEDIR"; then USER_LINGUAS="${LINGUAS-%UNSET%}" if test -n "$USER_LINGUAS"; then BISON_USE_NLS=yes fi fi fi