When NLS is disabled, we should not install any .mo files but we still
need to distribute the .po files. However, ALL_LINGUAS was not being
set in this case, so the POFILES was not set if NLS is disabled, causing
a distcheck failure.
Also fix a build error in this case due to a missing #include.
POFILES=
MOFILES=
-if test -f "$srcdir/$POSUB/LINGUAS"; then
- ALL_LINGUAS=`sed 's/#.*$//' "$srcdir/$POSUB/LINGUAS"`
+if test -f "$srcdir/po/LINGUAS"; then
+ ALL_LINGUAS=`sed 's/#.*$//' "$srcdir/po/LINGUAS"`
: ${LINGUAS=all}
if test x"$LINGUAS" != x"all"; then
set x $ALL_LINGUAS; shift
case ${#} in
0) ;;
- *) POFILES=`printf "$POSUB/%s.po\n" "${@}"` ;;
+ *) POFILES=`printf "po/%s.po\n" "${@}"` ;;
esac
- set x $LINGUAS; shift
- case ${#} in
- 0) ;;
- *) MOFILES=`printf "$POSUB/%s.mo\n" "${@}"` ;;
- esac
+ if test x"$USE_NLS" = x"yes"; then
+ set x $LINGUAS; shift
+ case ${#} in
+ 0) ;;
+ *) MOFILES=`printf "po/%s.mo\n" "${@}"` ;;
+ esac
+ fi
fi
AC_SUBST([POFILES])
#include <stdbool.h>
#include <string.h>
#include <errno.h>
+#include <locale.h>
#include <getopt.h>
#include <gettext.h>
#include "readline.h"