summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Estes <wlestes@users.sourceforge.net>2002-03-12 18:29:38 +0000
committerWill Estes <wlestes@users.sourceforge.net>2002-03-12 18:29:38 +0000
commit043a833788d5c6c786b0a0723d73eccde29da754 (patch)
tree756cd4f1b00aae85ae326072deb759947dd0e9fa
parenta97720db44d7ffcd273182ed94ac90aea016bc5c (diff)
mostly, changes for gettext
-rw-r--r--Makefile.am21
-rwxr-xr-xautogen.sh2
-rw-r--r--configure.in11
-rw-r--r--flexdef.h6
-rw-r--r--main.c4
5 files changed, 30 insertions, 14 deletions
diff --git a/Makefile.am b/Makefile.am
index a9c8079..8975079 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -34,8 +34,10 @@
# additional info.
YFLAGS = -d
+ACLOCAL_AMFLAGS = -I m4
AUTOMAKE_OPTIONS = \
+ readme-alpha \
gnits \
check-news \
no-texinfo.tex \
@@ -76,8 +78,7 @@ noinst_HEADERS = \
include_HEADERS = \
FlexLexer.h
-info_TEXINFOS = \
- flex.texi
+info_TEXINFOS = flex.texi
EXTRA_DIST = \
AUTHORS \
@@ -91,8 +92,10 @@ EXTRA_DIST = \
TODO \
autogen.sh \
flex.skl \
- mkskel.sh
-
+ mkskel.sh \
+ ABOUT-NLS \
+ config.rpath \
+ gettext.h
BUILT_SOURCES = \
skel.c \
@@ -100,7 +103,13 @@ BUILT_SOURCES = \
scan.c
SUBDIRS = \
- examples
+ m4 \
+ examples \
+ po
+
+localedir = $(datadir)/locale
+INCLUDES = -DLOCALEDIR=\"$(localedir)\" -I@includedir@
+LIBS = @LIBINTL@ @LIBS@
# We have a few dependencies and rules to enumerate. (from the old
# Makefile.in by Vern)
@@ -132,5 +141,3 @@ ChangeLog:
-rcs2log -l 72 -u "vern Vern vern@ee.lbl.gov" -u "wlestes W. L. Estes wlestes@uncg.edu" -u "millaway John Millaway johnmillaway@yahoo.com" | sed s:/usr/local/cvsroot/flex/::g >ChangeLog
.PHONY: ChangeLog
-
-dist-hook:
diff --git a/autogen.sh b/autogen.sh
index dc0d0bc..c21056d 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -30,7 +30,7 @@
touch ChangeLog
-aclocal && autoheader && automake -a && autoconf
+aclocal -I m4 && autoheader && automake -a && autoconf
for i in tests
do
diff --git a/configure.in b/configure.in
index 4df1b3b..5773d51 100644
--- a/configure.in
+++ b/configure.in
@@ -24,6 +24,7 @@ dnl PURPOSE.
AC_INIT(scan.l)
AM_INIT_AUTOMAKE(flex,2.5.6)
AM_CONFIG_HEADER(config.h:conf.in)
+ AM_GNU_GETTEXT([external])
AC_LN_S
AC_PROG_CC
@@ -43,5 +44,11 @@ esac
AC_CONFIG_SUBDIRS(tests)
-AC_OUTPUT(Makefile examples/Makefile examples/fastwc/Makefile examples/manual/Makefile ,
-[test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h])
+AC_OUTPUT(
+Makefile
+examples/Makefile
+examples/fastwc/Makefile
+examples/manual/Makefile
+m4/Makefile
+po/Makefile.in
+)
diff --git a/flexdef.h b/flexdef.h
index 2b8feb9..3ecdc53 100644
--- a/flexdef.h
+++ b/flexdef.h
@@ -72,10 +72,8 @@
#include <stdlib.h>
#endif
-/* As an aid for the internationalization patch to flex, which
- * is maintained outside this distribution for copyright reasons.
- */
-#define _(String) (String)
+#include "gettext.h"
+#define _(String) gettext (String)
/* Always be prepared to generate an 8-bit scanner. */
#define CSIZE 256
diff --git a/main.c b/main.c
index a8d49a3..0ad0dc1 100644
--- a/main.c
+++ b/main.c
@@ -136,6 +136,10 @@ char **argv;
{
int i;
+ setlocale(LC_MESSAGES, "");
+ textdomain(PACKAGE);
+ bindtextdomain(PACKAGE, LOCALEDIR);
+
#ifdef THINK_C
argc = ccommand( &argv );
#endif