From 66df1b09aaf2805cf08c6788456fb9c9f02279e9 Mon Sep 17 00:00:00 2001 From: Nick Bowler Date: Wed, 21 Sep 2011 19:11:39 -0400 Subject: [PATCH] Fix build with NLS disabled. 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. --- m4/linguas.m4 | 18 ++++++++++-------- src/cdecl99.c | 1 + 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/m4/linguas.m4 b/m4/linguas.m4 index 5577c8a..2ae8a9d 100644 --- a/m4/linguas.m4 +++ b/m4/linguas.m4 @@ -16,8 +16,8 @@ AC_REQUIRE([AM_GNU_GETTEXT]) 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 @@ -36,14 +36,16 @@ if test -f "$srcdir/$POSUB/LINGUAS"; 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]) diff --git a/src/cdecl99.c b/src/cdecl99.c index fcd7f50..04de1a6 100644 --- a/src/cdecl99.c +++ b/src/cdecl99.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include "readline.h" -- 2.43.2