Add autogen.sh checks for gettext, and assign the _() macro to gettext.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1323 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
8e0c0f397c
commit
69dd9fbdc5
24
autogen.sh
24
autogen.sh
|
@ -6,6 +6,19 @@ SRCDIR=`dirname $0`
|
||||||
BUILDDIR=`pwd`
|
BUILDDIR=`pwd`
|
||||||
ACLOCAL_FLAGS='-I m4'
|
ACLOCAL_FLAGS='-I m4'
|
||||||
srcfile=src/action.c
|
srcfile=src/action.c
|
||||||
|
WZ_USE_NLS=yes
|
||||||
|
|
||||||
|
# Leave out NLS checks
|
||||||
|
for NAME in $@ ; do
|
||||||
|
if [ "x$NAME" = "x--help" ]; then
|
||||||
|
FC_HELP=yes
|
||||||
|
fi
|
||||||
|
if [ "x$NAME" = "x--disable-nls" ]; then
|
||||||
|
echo "! nls checks disabled"
|
||||||
|
WZ_USE_NLS=no
|
||||||
|
fi
|
||||||
|
FC_NEWARGLINE="$FC_NEWARGLINE $NAME"
|
||||||
|
done
|
||||||
|
|
||||||
debug ()
|
debug ()
|
||||||
# print out a debug message if DEBUG is a defined variable
|
# print out a debug message if DEBUG is a defined variable
|
||||||
|
@ -91,6 +104,17 @@ if [ "$DIE" -eq 1 ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$WZ_USE_NLS" = "yes" ]; then
|
||||||
|
DIE2=0
|
||||||
|
version_check 1 "xgettext" "ftp://ftp.gnu.org/pub/gnu/gettext/" 0 10 36 || DIE2=1
|
||||||
|
version_check 1 "msgfmt" "ftp://ftp.gnu.org/pub/gnu/gettext/" 0 10 36 || DIE2=1
|
||||||
|
if [ "$DIE2" -eq 1 ]; then
|
||||||
|
echo
|
||||||
|
echo "You may want to use --disable-nls to disable NLS."
|
||||||
|
echo "This will also remove the dependency for xgettext and msgfmt."
|
||||||
|
DIE=1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Chdir to the srcdir, then run auto* tools.
|
# Chdir to the srcdir, then run auto* tools.
|
||||||
cd $SRCDIR
|
cd $SRCDIR
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
#include "trig.h"
|
#include "trig.h"
|
||||||
|
|
||||||
#include "gettext.h"
|
#include "gettext.h"
|
||||||
|
#define _(string) gettext(string)
|
||||||
|
|
||||||
/* Initialise the frame work library */
|
/* Initialise the frame work library */
|
||||||
extern BOOL frameInitialise(
|
extern BOOL frameInitialise(
|
||||||
|
|
|
@ -102,10 +102,6 @@ typedef struct
|
||||||
#define FALSE (0)
|
#define FALSE (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Preparation for gettextization of the source code.
|
|
||||||
* Use this for all new strings that may need translation. */
|
|
||||||
#define _(x) x
|
|
||||||
|
|
||||||
/* defines for ONEINX - use
|
/* defines for ONEINX - use
|
||||||
|
|
||||||
if (ONEINX)
|
if (ONEINX)
|
||||||
|
|
Loading…
Reference in New Issue