From: Nick Bowler Date: Wed, 21 Sep 2011 23:11:39 +0000 (-0400) Subject: Fix build with NLS disabled. X-Git-Tag: v1~101 X-Git-Url: https://git.draconx.ca/gitweb/cdecl99.git/commitdiff_plain/66df1b09aaf2805cf08c6788456fb9c9f02279e9?ds=sidebyside 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. --- 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"