diff --git a/Makefile.am b/Makefile.am index 8ec96f02..fb8e0500 100644 --- a/Makefile.am +++ b/Makefile.am @@ -16,9 +16,6 @@ EXTRA_DIST = config.rpath m4/ChangeLog .version Makefile.config contrib ABOUT-N ACLOCAL_AMFLAGS = -I m4 -PACKAGE = @PACKAGE@ -VERSION = @VERSION@ - dist-hook: find $(distdir) -depth -name CVS -print | xargs rm -fr @@ -41,18 +38,3 @@ install-data-hook: @echo "installed as " $(DESTDIR)$(bindir)/rundig distdir = $(PACKAGE)-$(VERSION) -dist: Makefile - rm -fr $(distdir) - mkdir $(distdir) - chmod 777 $(distdir) - for file in $(DISTFILES); do \ - ln $$file $(distdir) 2>/dev/null || cp -p $$file $(distdir); \ - done - for subdir in $(SUBDIRS); do \ - mkdir $(distdir)/$$subdir || exit 1; \ - chmod 777 $(distdir)/$$subdir; \ - (cd $$subdir && $(MAKE) $@) || exit 1; \ - done - tar chozf $(distdir).tar.gz $(distdir) - rm -fr $(distdir) - diff --git a/Makefile.config b/Makefile.config index ca0ed45d..0bdcafb0 100644 --- a/Makefile.config +++ b/Makefile.config @@ -14,6 +14,9 @@ AUTOMAKE_OPTIONS = foreign no-dependencies +PACKAGE = @PACKAGE@ +VERSION = @VERSION@ + AM_CPPFLAGS=-std=c++11 -pedantic \ -DDEFAULT_CONFIG_FILE=\"$(DEFAULT_CONFIG_FILE)\" \ -I$(top_srcdir)/include -I$(top_srcdir)/htlib \ @@ -29,3 +32,7 @@ HTLIBS= $(top_builddir)/htnet/libhtnet.la \ $(top_builddir)/htlib/libht.la \ $(top_builddir)/db/libhtdb.la +localedir = @localedir@ +LIBS = @LIBINTL@ @LIBS@ + +LDADD = $(HTLIBS) @LIBINTL@ diff --git a/Makefile.in b/Makefile.in index 2f88660b..eb02e34b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -287,7 +287,7 @@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ +LIBS = @LIBINTL@ @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -410,6 +410,7 @@ HTLIBS = $(top_builddir)/htnet/libhtnet.la \ $(top_builddir)/htlib/libht.la \ $(top_builddir)/db/libhtdb.la +LDADD = $(HTLIBS) @LIBINTL@ @TESTS_TRUE@TESTDIR = test SUBDIRS = db htlib htword htcommon htnet htfuzzy htdb hldig hlsearch httools installdir include $(TESTDIR) po EXTRA_DIST = config.rpath m4/ChangeLog .version Makefile.config contrib ABOUT-NLS @@ -908,20 +909,6 @@ install-data-hook: @echo "Before you can start searching, you will need to create a" @echo "search database. A sample script to do this has been" @echo "installed as " $(DESTDIR)$(bindir)/rundig -dist: Makefile - rm -fr $(distdir) - mkdir $(distdir) - chmod 777 $(distdir) - for file in $(DISTFILES); do \ - ln $$file $(distdir) 2>/dev/null || cp -p $$file $(distdir); \ - done - for subdir in $(SUBDIRS); do \ - mkdir $(distdir)/$$subdir || exit 1; \ - chmod 777 $(distdir)/$$subdir; \ - (cd $$subdir && $(MAKE) $@) || exit 1; \ - done - tar chozf $(distdir).tar.gz $(distdir) - rm -fr $(distdir) # 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/hldig/Makefile.am b/hldig/Makefile.am index 46acf6bf..b9c9fc5d 100644 --- a/hldig/Makefile.am +++ b/hldig/Makefile.am @@ -12,19 +12,7 @@ noinst_HEADERS = Document.h ExternalParser.h HTML.h \ Parsable.h Plaintext.h Retriever.h Server.h URLRef.h hldig.h \ ExternalTransport.h -PACKAGE = @PACKAGE@ -VERSION = @VERSION@ - ACLOCAL_AMFLAGS = -I m4 -top_srcdir = @top_srcdir@ -subdir = @top_srcdir@ - -datadir = @datadir@ -datarootdir= @datarootdir@ -localedir = @localedir@ -LIBS = @LIBINTL@ @LIBS@ - hldig_DEPENDENCIES = $(HTLIBS) hldig_LDFLAGS = $(PROFILING) ${extra_ldflags} -hldig_LDADD = $(HTLIBS) @LIBINTL@ diff --git a/hldig/Makefile.in b/hldig/Makefile.in index 435c6287..a42d78ce 100644 --- a/hldig/Makefile.in +++ b/hldig/Makefile.in @@ -96,6 +96,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = hldig$(EXEEXT) +subdir = hldig ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ @@ -121,6 +122,7 @@ am_hldig_OBJECTS = Document.$(OBJEXT) HTML.$(OBJEXT) \ Server.$(OBJEXT) ExternalTransport.$(OBJEXT) URLRef.$(OBJEXT) \ hldig.$(OBJEXT) ExternalParser.$(OBJEXT) hldig_OBJECTS = $(am_hldig_OBJECTS) +hldig_LDADD = $(LDADD) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent @@ -378,6 +380,7 @@ HTLIBS = $(top_builddir)/htnet/libhtnet.la \ $(top_builddir)/htlib/libht.la \ $(top_builddir)/db/libhtdb.la +LDADD = $(HTLIBS) @LIBINTL@ hldig_SOURCES = Document.cc HTML.cc \ Parsable.cc Plaintext.cc \ Retriever.cc Server.cc ExternalTransport.cc \ @@ -388,10 +391,8 @@ noinst_HEADERS = Document.h ExternalParser.h HTML.h \ ExternalTransport.h ACLOCAL_AMFLAGS = -I m4 -subdir = @top_srcdir@ hldig_DEPENDENCIES = $(HTLIBS) hldig_LDFLAGS = $(PROFILING) ${extra_ldflags} -hldig_LDADD = $(HTLIBS) @LIBINTL@ all: all-am .SUFFIXES: diff --git a/hldig/hldig.h b/hldig/hldig.h index 8b0f66bb..d50a44b0 100644 --- a/hldig/hldig.h +++ b/hldig/hldig.h @@ -37,11 +37,6 @@ using namespace std; #include -#include "gettext.h" -#define _(String) gettext (String) -#define gettext_noop(String) String -#define N_(String) gettext_noop (String) - extern int debug; extern DocumentDB docs; extern HtRegexList limits; diff --git a/hlsearch/Makefile.in b/hlsearch/Makefile.in index 18032688..374808ff 100644 --- a/hlsearch/Makefile.in +++ b/hlsearch/Makefile.in @@ -270,7 +270,7 @@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ +LIBS = @LIBINTL@ @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -393,6 +393,7 @@ HTLIBS = $(top_builddir)/htnet/libhtnet.la \ $(top_builddir)/htlib/libht.la \ $(top_builddir)/db/libhtdb.la +LDADD = $(HTLIBS) @LIBINTL@ LOCAL_DEFINES = -DCONFIG_DIR=\"$(CONFIG_DIR)\" -I$(top_srcdir)/htfuzzy hlsearch_SOURCES = Display.cc DocMatch.cc ResultList.cc ResultMatch.cc \ Template.cc TemplateList.cc WeightWord.cc hlsearch.cc \ diff --git a/hlsearch/hlsearch.cc b/hlsearch/hlsearch.cc index 808552ce..6893feae 100644 --- a/hlsearch/hlsearch.cc +++ b/hlsearch/hlsearch.cc @@ -104,6 +104,10 @@ struct int main (int ac, char **av) { + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); + int c; extern char *optarg; int override_config = 0; @@ -965,7 +969,7 @@ reportError (char *msg) void usage () { - cout << "usage: hlsearch [-v][-d][-c configfile] [query_string]\n"; + cout << _("usage: hlsearch [-v][-d][-c configfile] [query_string]\n"); cout << "This program is part of hl://Dig " << VERSION << "\n\n"; cout << "Options:\n"; cout << "\t-v -d\tVerbose mode. This increases the verbosity of the\n"; diff --git a/htcommon/Makefile.in b/htcommon/Makefile.in index 74c60a4b..046ff909 100644 --- a/htcommon/Makefile.in +++ b/htcommon/Makefile.in @@ -322,7 +322,7 @@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ +LIBS = @LIBINTL@ @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -445,6 +445,7 @@ HTLIBS = $(top_builddir)/htnet/libhtnet.la \ $(top_builddir)/htlib/libht.la \ $(top_builddir)/db/libhtdb.la +LDADD = $(HTLIBS) @LIBINTL@ # # Do not output #line because it confuses the dependencies diff --git a/htdb/Makefile.in b/htdb/Makefile.in index 9ae3316a..32437f3b 100644 --- a/htdb/Makefile.in +++ b/htdb/Makefile.in @@ -263,7 +263,7 @@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ +LIBS = @LIBINTL@ @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -386,6 +386,7 @@ HTLIBS = $(top_builddir)/htnet/libhtnet.la \ $(top_builddir)/htlib/libht.la \ $(top_builddir)/db/libhtdb.la +LDADD = $(HTLIBS) @LIBINTL@ htdb_load_SOURCES = htdb_load.cc htdb_load_DEPENDENCIES = $(HTLIBS) htdb_load_LDFLAGS = $(PROFILING) ${extra_ldflags} diff --git a/htfuzzy/Makefile.in b/htfuzzy/Makefile.in index de84ea73..25d9b13c 100644 --- a/htfuzzy/Makefile.in +++ b/htfuzzy/Makefile.in @@ -290,7 +290,7 @@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ +LIBS = @LIBINTL@ @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -413,6 +413,7 @@ HTLIBS = $(top_builddir)/htnet/libhtnet.la \ $(top_builddir)/htlib/libht.la \ $(top_builddir)/db/libhtdb.la +LDADD = $(HTLIBS) @LIBINTL@ LOCAL_DEFINES = -DMV=\"$(MV)\" pkglib_LTLIBRARIES = libfuzzy.la libfuzzy_la_SOURCES = Endings.cc EndingsDB.cc Exact.cc \ diff --git a/htlib/Makefile.in b/htlib/Makefile.in index e14b93de..d29c6b4a 100644 --- a/htlib/Makefile.in +++ b/htlib/Makefile.in @@ -308,7 +308,7 @@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ +LIBS = @LIBINTL@ @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -431,6 +431,7 @@ HTLIBS = $(top_builddir)/htnet/libhtnet.la \ $(top_builddir)/htlib/libht.la \ $(top_builddir)/db/libhtdb.la +LDADD = $(HTLIBS) @LIBINTL@ pkglib_LTLIBRARIES = libht.la libht_la_SOURCES = Configuration.cc Database.cc Dictionary.cc \ DB2_db.cc IntObject.cc List.cc Object.cc \ diff --git a/htnet/Makefile.in b/htnet/Makefile.in index 6d16ac2b..b4bec16c 100644 --- a/htnet/Makefile.in +++ b/htnet/Makefile.in @@ -284,7 +284,7 @@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ +LIBS = @LIBINTL@ @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -407,6 +407,7 @@ HTLIBS = $(top_builddir)/htnet/libhtnet.la \ $(top_builddir)/htlib/libht.la \ $(top_builddir)/db/libhtdb.la +LDADD = $(HTLIBS) @LIBINTL@ pkglib_LTLIBRARIES = libhtnet.la libhtnet_la_SOURCES = Connection.cc Transport.cc HtHTTP.cc HtFile.cc \ HtNNTP.cc HtFTP.cc HtCookie.cc HtCookieJar.cc HtCookieMemJar.cc \ diff --git a/httools/Makefile.in b/httools/Makefile.in index 961175bf..7d972ee5 100644 --- a/httools/Makefile.in +++ b/httools/Makefile.in @@ -278,7 +278,7 @@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ +LIBS = @LIBINTL@ @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -401,6 +401,7 @@ HTLIBS = $(top_builddir)/htnet/libhtnet.la \ $(top_builddir)/htlib/libht.la \ $(top_builddir)/db/libhtdb.la +LDADD = $(HTLIBS) @LIBINTL@ LOCAL_DEFINES = -DSENDMAIL=\"$(SENDMAIL)\" htpurge_SOURCES = htpurge.cc htpurge_DEPENDENCIES = $(HTLIBS) diff --git a/htword/Makefile.in b/htword/Makefile.in index d607bb4a..515e29dd 100644 --- a/htword/Makefile.in +++ b/htword/Makefile.in @@ -285,7 +285,7 @@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ +LIBS = @LIBINTL@ @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -408,6 +408,7 @@ HTLIBS = $(top_builddir)/htnet/libhtnet.la \ $(top_builddir)/htlib/libht.la \ $(top_builddir)/db/libhtdb.la +LDADD = $(HTLIBS) @LIBINTL@ # # Part of the ht://Dig package diff --git a/include/Makefile.in b/include/Makefile.in index ea46512d..34d45342 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -250,7 +250,7 @@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ +LIBS = @LIBINTL@ @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -373,6 +373,7 @@ HTLIBS = $(top_builddir)/htnet/libhtnet.la \ $(top_builddir)/htlib/libht.la \ $(top_builddir)/db/libhtdb.la +LDADD = $(HTLIBS) @LIBINTL@ EXTRA_DIST = config.h.in stamp-h.in pkginclude_HEADERS = htconfig.h all: config.h diff --git a/htlib/gettext.h b/include/gettext.h similarity index 100% rename from htlib/gettext.h rename to include/gettext.h diff --git a/include/htconfig.h b/include/htconfig.h index 7c110650..8890d74b 100644 --- a/include/htconfig.h +++ b/include/htconfig.h @@ -5,11 +5,16 @@ For copyright details, see the file COPYING in your distribution or the GNU General Public License version 2 or later - + */ #include +#include "gettext.h" +#define _(String) gettext (String) +#define gettext_noop(String) String +#define N_(String) gettext_noop (String) + #if HAVE_STDBOOL_H #include #else diff --git a/installdir/Makefile.in b/installdir/Makefile.in index 2420a566..035888f7 100644 --- a/installdir/Makefile.in +++ b/installdir/Makefile.in @@ -240,7 +240,7 @@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ +LIBS = @LIBINTL@ @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -363,6 +363,7 @@ HTLIBS = $(top_builddir)/htnet/libhtnet.la \ $(top_builddir)/htlib/libht.la \ $(top_builddir)/db/libhtdb.la +LDADD = $(HTLIBS) @LIBINTL@ man_MANS = htdig-pdfparser.1 htdig.1 htdump.1 htfuzzy.1 htload.1 htmerge.1 \ htnotify.1 htpurge.1 htsearch.1 htstat.1 rundig.1 htdigconfig.8 diff --git a/po/POTFILES.in b/po/POTFILES.in index 79dd1c5f..f9175877 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,3 +1,4 @@ # List of source files which contain translatable strings. hldig/hldig.cc +hlsearch/hlsearch.cc diff --git a/po/hldig.pot b/po/hldig.pot index e9672a75..156edb58 100644 --- a/po/hldig.pot +++ b/po/hldig.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: hldig 0.1.01\n" "Report-Msgid-Bugs-To: andy400-dev@yahoo.com\n" -"POT-Creation-Date: 2017-12-28 05:00-0600\n" +"POT-Creation-Date: 2017-12-28 23:11-0600\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -172,3 +172,7 @@ msgid "" "\n" "Options:\n" msgstr "" + +#: hlsearch/hlsearch.cc:968 +msgid "usage: hlsearch [-v][-d][-c configfile] [query_string]\n" +msgstr "" diff --git a/test/Makefile.in b/test/Makefile.in index 7f06fad0..4dea06c5 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -488,7 +488,7 @@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ +LIBS = @LIBINTL@ @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -611,6 +611,7 @@ HTLIBS = $(top_builddir)/htnet/libhtnet.la \ $(top_builddir)/htlib/libht.la \ $(top_builddir)/db/libhtdb.la +LDADD = $(HTLIBS) @LIBINTL@ # # Part of the ht://Dig package