summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2002-01-30 13:54:58 +0000
committerBruno Haible <bruno@clisp.org>2009-06-22 01:11:17 +0200
commitea626ba6388044ff7d73c7115005709b03b86d49 (patch)
tree9d064b95490804a6bbc7bfed050b3d5366ae5e97
parent66a3a5fb3169e3aeeefc6da968b631fee1fbb2bf (diff)
downloadexternal_gettext-ea626ba6388044ff7d73c7115005709b03b86d49.zip
external_gettext-ea626ba6388044ff7d73c7115005709b03b86d49.tar.gz
external_gettext-ea626ba6388044ff7d73c7115005709b03b86d49.tar.bz2
Remove the dependency of the gettext and ngettext programs towards
libgettextlib. Recommend a split packaging.
-rw-r--r--ChangeLog8
-rw-r--r--Makefile.am2
-rw-r--r--NEWS2
-rw-r--r--PACKAGING79
-rw-r--r--configure.in10
-rw-r--r--lib/ChangeLog8
-rw-r--r--lib/Makefile.am5
-rw-r--r--lib/error.c7
-rw-r--r--lib/strtoul.c14
-rw-r--r--m4/ChangeLog5
-rw-r--r--m4/Makefile.am2
-rw-r--r--m4/error.m421
-rw-r--r--src/ChangeLog5
-rw-r--r--src/Makefile.am2
14 files changed, 155 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 6b78857..4189349 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2002-01-30 Bruno Haible <bruno@clisp.org>
+
+ * configure.in:
+ Check for strtoul through AC_CHECK_FUNCS, not AC_REPLACE_FUNCS.
+ Call gt_FUNC_ERROR_AT_LINE instead of AM_FUNC_ERROR_AT_LINE.
+ * PACKAGING: New file.
+ * Makefile.am (EXTRA_DIST): Add it.
+
2002-01-24 Bruno Haible <bruno@clisp.org>
* Makefile.am ($(srcdir)/tests/rpathy/aclocal.m4): Fix dependencies.
diff --git a/Makefile.am b/Makefile.am
index 31b9e2a..a7ce43f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -26,7 +26,7 @@ gettextsrc_SCRIPTS = config.rpath
SUBDIRS = doc intl intl-java lib src po man m4 projects misc tests
-EXTRA_DIST = config.rpath BUGS DISCLAIM README.gemtext README-alpha \
+EXTRA_DIST = config.rpath BUGS DISCLAIM PACKAGING README.gemtext README-alpha \
djgpp/Makefile.maint djgpp/README.in djgpp/README \
djgpp/config.bat djgpp/config.in djgpp/config.sed \
djgpp/config.site djgpp/edtests.bat djgpp/fnchange.in \
diff --git a/NEWS b/NEWS
index 52822fb..ff62948 100644
--- a/NEWS
+++ b/NEWS
@@ -51,6 +51,8 @@ Version 0.11 - XXX 2002
@LIBINTL@ (in projects without libtool) or @LTLIBINTL@ (in projects with
libtool).
+* New packaging hints for binary package distributors. See file PACKAGING.
+
* New documentation sections:
- Manipulating
- po/LINGUAS
diff --git a/PACKAGING b/PACKAGING
new file mode 100644
index 0000000..14a5c79
--- /dev/null
+++ b/PACKAGING
@@ -0,0 +1,79 @@
+Packaging hints for binary package distributors
+===============================================
+
+Although the source of the gettext package comes as a single package,
+I recommend that in distributions of binary packages the installed files
+be split into two packages:
+
+ gettext
+ Contents: Runtime libraries and programs.
+ Audience: Anyone who wants to run internationalized programs.
+
+ gettext-tools
+ Contents: Tools and documentation for developers and translators.
+ Audience: Anyone who wants to develop or localize internationalized
+ programs, i.e. developers and translators.
+ Dependencies: requires gettext.
+
+The 'gettext' binary package is much smaller than the 'gettext-tools' binary
+package (90 KB versus 4 MB). I recommend to include it in the default
+installation list, like GNU 'sh-utils'; in fact, the runtime programs are
+utilities for sh programs.
+
+The precise split between gettext and gettext-tools is according to the
+following file list.
+
+ gettext
+
+ $prefix/bin/gettext
+ $prefix/bin/ngettext
+ $prefix/man/man1/gettext.1
+ $prefix/man/man1/ngettext.1
+ $prefix/doc/gettext/gettext.1.html
+ $prefix/doc/gettext/ngettext.1.html
+ $prefix/share/gettext/ABOUT-NLS
+ $prefix/share/gettext/libintl.jar
+ $prefix/lib/libintl.* (not installed on glibc systems)
+ $prefix/lib/charset.alias (not installed on glibc systems)
+ $prefix/share/locale/locale.alias (not installed on glibc systems)
+ $prefix/include/libintl.h (not installed on glibc systems)
+
+ gettext-tools
+
+ Everything else, i.e. currently:
+
+ $prefix/bin/msg*
+ $prefix/bin/xgettext
+ $prefix/bin/gettextize
+ $prefix/man/man1/msg*.1
+ $prefix/man/man1/xgettext.1
+ $prefix/man/man3/*
+ $prefix/doc/gettext/msg*.1.html
+ $prefix/doc/gettext/xgettext.1.html
+ $prefix/doc/gettext/*.3.html
+ $prefix/doc/gettext/javadoc1/*
+ $prefix/doc/gettext/javadoc2/*
+ $prefix/doc/gettext/gettext_*.html
+ $prefix/info/gettext.info*
+ $prefix/lib/libgettextlib.*
+ $prefix/lib/libgettextsrc.*
+ $prefix/lib/gettext/*
+ $prefix/share/locale/*/LC_MESSAGES/gettext.mo
+ $prefix/share/gettext/config.rpath
+ $prefix/share/gettext/intl/*
+ $prefix/share/gettext/po/*
+ $prefix/share/gettext/projects/*
+ $prefix/share/gettext/gettext.h
+ $prefix/share/gettext/gettext.jar
+ $prefix/share/aclocal/codeset.m4
+ $prefix/share/aclocal/gettext.m4
+ $prefix/share/aclocal/glibc21.m4
+ $prefix/share/aclocal/iconv.m4
+ $prefix/share/aclocal/isc-posix.m4
+ $prefix/share/aclocal/lcmessage.m4
+ $prefix/share/aclocal/lib-ld.m4
+ $prefix/share/aclocal/lib-link.m4
+ $prefix/share/aclocal/lib-prefix.m4
+ $prefix/share/aclocal/progtest.m4
+ $prefix/share/emacs/site-lisp/po-mode.el
+ $prefix/share/emacs/site-lisp/po-mode.elc
diff --git a/configure.in b/configure.in
index dd533dd..3235aaf 100644
--- a/configure.in
+++ b/configure.in
@@ -1,7 +1,7 @@
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.13)
AC_INIT(src/msgfmt.c)
-AM_INIT_AUTOMAKE(gettext, 0.11-pre5+)
+AM_INIT_AUTOMAKE(gettext, 0.11-pre5++)
RELEASE_DATE=2001-05-23 dnl in "date +%Y-%m-%d" format
AM_CONFIG_HEADER(config.h)
@@ -67,9 +67,9 @@ dnl Checks for library functions.
AC_FUNC_ALLOCA
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([getcwd mblen memcpy posix_spawn putc_unlocked raise select \
-strerror uname utime utimes])
+strerror strtoul uname utime utimes])
AC_REPLACE_FUNCS([memset stpcpy stpncpy strcspn \
-strcasecmp strncasecmp strpbrk strstr strtoul vasprintf])
+strcasecmp strncasecmp strpbrk strstr vasprintf])
AM_FUNC_GETLINE
if test $am_cv_func_working_getline != yes; then
AC_CHECK_FUNCS(getdelim)
@@ -84,9 +84,7 @@ gt_FUNC_MKDTEMP
gt_SIGNALBLOCKING
gt_SIGINFO
gt_FUNC_SETENV
-
-AM_FUNC_ERROR_AT_LINE
-
+gt_FUNC_ERROR_AT_LINE
gt_SETLOCALE
gt_PREREQ_HOSTNAME
diff --git a/lib/ChangeLog b/lib/ChangeLog
index 270c050..e6b854d 100644
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -1,3 +1,11 @@
+2002-01-30 Bruno Haible <bruno@clisp.org>
+
+ * error.c: Compile nothing if HAVE_ERROR_AT_LINE is set.
+ * strtoul.c: Compile nothing if HAVE_STRTOUL is set.
+ * Makefile.am (libgettextlib_la_SOURCES): Add error.h, error.c,
+ strtoul.c.
+ (LIBADD_SOURCE): Remove error.h, error.c, strtoul.c.
+
2002-01-24 Bruno Haible <bruno@clisp.org>
* getline.c: Remove NDEBUG. It killed the effect of assert().
diff --git a/lib/Makefile.am b/lib/Makefile.am
index bb1b030..d6b5594 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -30,6 +30,7 @@ libgettextlib_la_SOURCES = \
binary-io.h \
c-ctype.h c-ctype.c \
copy-file.h copy-file.c \
+ error.h error.c \
execute.h execute.c \
exit.h \
findprog.h findprog.c \
@@ -51,6 +52,7 @@ libgettextlib_la_SOURCES = \
progname.h progname.c \
safe-read.h safe-read.c \
sh-quote.h sh-quote.c \
+ strtoul.c \
tmpdir.h tmpdir.c \
wait-process.h wait-process.c \
xerror.h xerror.c \
@@ -61,7 +63,6 @@ libgettextlib_la_SOURCES = \
LIBADD_SOURCE = \
liballoca.h alloca.c \
- error.h error.c \
getline.h getline.c \
memset.c \
mkdtemp.h mkdtemp.c \
@@ -73,7 +74,7 @@ LIBADD_SOURCE = \
strcspn.c \
strpbrk.h strpbrk.c \
strstr.h strstr.c \
- strtol.c strtoul.c \
+ strtol.c \
vasprintf.c
# Unused sources.
diff --git a/lib/error.c b/lib/error.c
index cae8794..64504af 100644
--- a/lib/error.c
+++ b/lib/error.c
@@ -1,6 +1,5 @@
/* Error handler for noninteractive utilities
- Copyright (C) 1990-1998, 2000, 2001 Free Software Foundation, Inc.
-
+ Copyright (C) 1990-1998, 2000-2002 Free Software Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C Library.
Bugs can be reported to bug-glibc@gnu.org.
@@ -26,6 +25,8 @@
# include <config.h>
#endif
+#if !HAVE_ERROR_AT_LINE
+
#include <stdio.h>
#if HAVE_VPRINTF || HAVE_DOPRNT || _LIBC
@@ -258,3 +259,5 @@ error_at_line (status, errnum, file_name, line_number, message, va_alist)
weak_alias (__error, error)
weak_alias (__error_at_line, error_at_line)
#endif
+
+#endif
diff --git a/lib/strtoul.c b/lib/strtoul.c
index 6b2e246..d39643d 100644
--- a/lib/strtoul.c
+++ b/lib/strtoul.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1997, 2002 Free Software Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C Library.
Bugs can be reported to bug-glibc@gnu.org.
@@ -18,6 +18,14 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA. */
-#define UNSIGNED 1
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
-#include <strtol.c>
+#if !HAVE_STRTOUL
+
+# define UNSIGNED 1
+
+# include <strtol.c>
+
+#endif
diff --git a/m4/ChangeLog b/m4/ChangeLog
index e253baf..ed0e38a 100644
--- a/m4/ChangeLog
+++ b/m4/ChangeLog
@@ -1,3 +1,8 @@
+2002-01-30 Bruno Haible <bruno@clisp.org>
+
+ * error.m4: New file.
+ * Makefile.am (EXTRA_DIST): Add it.
+
2002-01-24 Bruno Haible <bruno@clisp.org>
* lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Don't use AC_LIB_APPENDTOVAR
diff --git a/m4/Makefile.am b/m4/Makefile.am
index 38303e9..58d06f4 100644
--- a/m4/Makefile.am
+++ b/m4/Makefile.am
@@ -7,7 +7,7 @@ aclocal_DATA = codeset.m4 gettext.m4 glibc21.m4 iconv.m4 isc-posix.m4 lib-ld.m4
# find . -type f -name '*.m4' -printf '%f\n'|sort |fmt |tr '\012' @ \
# |sed 's/@$/%/;s/@/ \\@/g' |tr @% '\012\012'
EXTRA_DIST = README \
-backupfile.m4 c-bs-a.m4 codeset.m4 flex.m4 fnmatch.m4 getline.m4 \
+backupfile.m4 c-bs-a.m4 codeset.m4 error.m4 flex.m4 fnmatch.m4 getline.m4 \
gettext.m4 glibc21.m4 hostname.m4 iconv.m4 inttypes_h.m4 isc-posix.m4 \
javacomp.m4 javaexec.m4 lcmessage.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 \
libtool.m4 mbrtowc.m4 mbstate_t.m4 mbswidth.m4 mkdtemp.m4 progtest.m4 \
diff --git a/m4/error.m4 b/m4/error.m4
new file mode 100644
index 0000000..5849460
--- /dev/null
+++ b/m4/error.m4
@@ -0,0 +1,21 @@
+# error.m4 serial 1 (gettext-0.11)
+dnl Copyright (C) 2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+# A modified version of AM_FUNC_ERROR_AT_LINE that triggers HAVE_ERROR_AT_LINE
+# in config.h instead of modifying LIBOBJS.
+AC_DEFUN([gt_FUNC_ERROR_AT_LINE],
+[
+ AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line,
+ [AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");],
+ am_cv_lib_error_at_line=yes,
+ am_cv_lib_error_at_line=no)])
+ if test $am_cv_lib_error_at_line = yes; then
+ AC_DEFINE(HAVE_ERROR_AT_LINE, 1,
+ [Define to 1 if you have the functions error() and error_at_line().])
+ fi
+])
diff --git a/src/ChangeLog b/src/ChangeLog
index 40b6d64..89a5fdc 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2002-01-30 Bruno Haible <bruno@clisp.org>
+
+ Make the gettext and ngettext programs independent of libgettextlib.
+ * Makefile.am (gettext_LDADD, ngettext_LDADD): New variables.
+
2002-01-27 Bruno Haible <bruno@clisp.org>
* x-ycp.c (enum token_type_ty): New enum value token_type_symbol.
diff --git a/src/Makefile.am b/src/Makefile.am
index 1233ed9..dd9e944 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -107,6 +107,8 @@ libgettextsrc_la_LDFLAGS = \
../lib/libgettextlib.la @LTLIBINTL@ @LTLIBICONV@ -lc -no-undefined
# Link dependencies.
+gettext_LDADD = ../lib/basename.lo ../lib/error.lo ../lib/getopt.lo ../lib/getopt1.lo ../lib/strtoul.lo ../lib/xmalloc.lo @LTLIBINTL@
+ngettext_LDADD = ../lib/basename.lo ../lib/error.lo ../lib/getopt.lo ../lib/getopt1.lo ../lib/strtoul.lo ../lib/xmalloc.lo @LTLIBINTL@
msgcmp_LDADD = libgettextsrc.la
msgfmt_LDADD = libgettextsrc.la
msgmerge_LDADD = libgettextsrc.la