summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>1998-02-09 18:43:42 +0100
committerWerner Koch <wk@gnupg.org>1998-02-09 18:43:42 +0100
commitd6fa02add60c1d9ef6c7c576de3beb0a5debfade (patch)
tree4d33ad9fa6f8013b274ecb0dfe36cab7b15b47eb /tools
parentremoved aclocal (diff)
downloadgnupg2-d6fa02add60c1d9ef6c7c576de3beb0a5debfade.tar.xz
gnupg2-d6fa02add60c1d9ef6c7c576de3beb0a5debfade.zip
release 0.2.3
Diffstat (limited to 'tools')
-rw-r--r--tools/Makefile.am8
-rw-r--r--tools/Makefile.in14
-rw-r--r--tools/bftest.c16
-rw-r--r--tools/mpicalc.c17
4 files changed, 45 insertions, 10 deletions
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 3b43090c8..fb88d9171 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -1,6 +1,7 @@
## Process this file with automake to produce Makefile.in
-INCLUDES = -I.. -I$(top_srcdir)/include
+INCLUDES = -I$(top_srcdir)/include
+needed_libs = ../cipher/libcipher.a ../util/libutil.a ../mpi/libmpi.a ../util/libutil.a
noinst_PROGRAMS = mpicalc bftest
@@ -9,8 +10,7 @@ mpicalc_SOURCES = mpicalc.c
bftest_SOURCES = bftest.c
-LDADD = -L ../cipher -L ../mpi -L ../util -L ../cipher \
- -lmpi -lutil -lmpi -lutil -lcipher
+LDADD = @INTLLIBS@ $(needed_libs)
-$(PROGRAMS): ../mpi/libmpi.a ../cipher/libcipher.a
+$(PROGRAMS): $(needed_libs)
diff --git a/tools/Makefile.in b/tools/Makefile.in
index 6b9d2a32a..0594ccd4d 100644
--- a/tools/Makefile.in
+++ b/tools/Makefile.in
@@ -86,7 +86,8 @@ POSUB = @POSUB@
RANLIB = @RANLIB@
VERSION = @VERSION@
-INCLUDES = -I.. -I$(top_srcdir)/include
+INCLUDES = -I$(top_srcdir)/include
+needed_libs = ../cipher/libcipher.a ../util/libutil.a ../mpi/libmpi.a ../util/libutil.a
noinst_PROGRAMS = mpicalc bftest
@@ -94,8 +95,7 @@ mpicalc_SOURCES = mpicalc.c
bftest_SOURCES = bftest.c
-LDADD = -L ../cipher -L ../mpi -L ../util -L ../cipher \
- -lmpi -lutil -lmpi -lutil -lcipher
+LDADD = @INTLLIBS@ $(needed_libs)
mkinstalldirs = $(SHELL) $(top_srcdir)/scripts/mkinstalldirs
CONFIG_HEADER = ../config.h
CONFIG_CLEAN_FILES =
@@ -108,11 +108,13 @@ LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
mpicalc_OBJECTS = mpicalc.o
mpicalc_LDADD = $(LDADD)
-mpicalc_DEPENDENCIES = ../cipher ../mpi ../util ../cipher
+mpicalc_DEPENDENCIES = ../cipher/libcipher.a ../util/libutil.a \
+../mpi/libmpi.a ../util/libutil.a
mpicalc_LDFLAGS =
bftest_OBJECTS = bftest.o
bftest_LDADD = $(LDADD)
-bftest_DEPENDENCIES = ../cipher ../mpi ../util ../cipher
+bftest_DEPENDENCIES = ../cipher/libcipher.a ../util/libutil.a \
+../mpi/libmpi.a ../util/libutil.a
bftest_LDFLAGS =
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
@@ -304,7 +306,7 @@ installdirs mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-$(PROGRAMS): ../mpi/libmpi.a ../cipher/libcipher.a
+$(PROGRAMS): $(needed_libs)
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/tools/bftest.c b/tools/bftest.c
index c5d31eb1e..cd0eef972 100644
--- a/tools/bftest.c
+++ b/tools/bftest.c
@@ -29,6 +29,7 @@
#include "util.h"
#include "cipher.h"
+#include "i18n.h"
static void
my_usage(void)
@@ -43,6 +44,20 @@ strusage( int level )
return default_strusage(level);
}
+static void
+i18n_init(void)
+{
+ #ifdef HAVE_LIBINTL
+ #ifdef HAVE_LC_MESSAGES
+ setlocale( LC_MESSAGES, "" );
+ #else
+ setlocale( LC_ALL, "" );
+ #endif
+ bindtextdomain( PACKAGE, G10_LOCALEDIR );
+ textdomain( PACKAGE );
+ #endif
+}
+
int
main(int argc, char **argv)
{
@@ -57,6 +72,7 @@ main(int argc, char **argv)
setmode( fileno(stdout), O_BINARY );
#endif
+ i18n_init();
if( argc > 1 && !strcmp(argv[1], "-e") ) {
encode++;
argc--; argv++;
diff --git a/tools/mpicalc.c b/tools/mpicalc.c
index 28c498548..0bee7fc42 100644
--- a/tools/mpicalc.c
+++ b/tools/mpicalc.c
@@ -31,6 +31,7 @@
#include "util.h"
#include "mpi.h"
+#include "i18n.h"
#define STACKSIZE 100
static MPI stack[STACKSIZE];
@@ -62,6 +63,21 @@ strusage( int level )
static void
+i18n_init(void)
+{
+ #ifdef HAVE_LIBINTL
+ #ifdef HAVE_LC_MESSAGES
+ setlocale( LC_MESSAGES, "" );
+ #else
+ setlocale( LC_ALL, "" );
+ #endif
+ bindtextdomain( PACKAGE, G10_LOCALEDIR );
+ textdomain( PACKAGE );
+ #endif
+}
+
+
+static void
do_add(void)
{
if( stackidx < 2 ) {
@@ -201,6 +217,7 @@ main(int argc, char **argv)
char strbuf[1000];
int stridx=0;
+ i18n_init();
while( arg_parse( &pargs, opts) ) {
switch( pargs.r_opt ) {
default : pargs.err = 2; break;