summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2002-01-15 12:52:49 +0000
committerBruno Haible <bruno@clisp.org>2009-06-22 00:59:28 +0200
commit74ccb05f7fbca72155259e0ae3e8c014058e79b7 (patch)
tree0354f1fda338e560e9a2607de1b30c195c266b23
parent265146a758a2b56444df7d6cc154b33c31792ff7 (diff)
downloadexternal_gettext-74ccb05f7fbca72155259e0ae3e8c014058e79b7.zip
external_gettext-74ccb05f7fbca72155259e0ae3e8c014058e79b7.tar.gz
external_gettext-74ccb05f7fbca72155259e0ae3e8c014058e79b7.tar.bz2
FreeBSD portability.
-rw-r--r--m4/ChangeLog6
-rw-r--r--m4/gettext.m422
2 files changed, 24 insertions, 4 deletions
diff --git a/m4/ChangeLog b/m4/ChangeLog
index 7b4c9d3..a3c654f 100644
--- a/m4/ChangeLog
+++ b/m4/ChangeLog
@@ -1,3 +1,9 @@
+2002-01-12 Bruno Haible <bruno@clisp.org>
+
+ * gettext.m4 (AM_PO_SUBDIRS): Exclude FreeBSD's msgfmt and xgettext
+ programs. They give usage messages on stderr but then terminate with
+ exit code 0.
+
2002-01-05 Bruno Haible <bruno@clisp.org>
* gettext.m4 (AM_PO_SUBDIRS): Look for Rules-* files in the source dir,
diff --git a/m4/gettext.m4 b/m4/gettext.m4
index 8ffba95..0ac5a9a 100644
--- a/m4/gettext.m4
+++ b/m4/gettext.m4
@@ -255,13 +255,23 @@ AC_DEFUN([AM_PO_SUBDIRS],
dnl because they are needed for "make dist" to work.
dnl Search for GNU msgfmt in the PATH.
+ dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
+ dnl The second test excludes FreeBSD msgfmt.
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
- [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1], :)
+ [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
+ (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+ :)
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
dnl Search for GNU xgettext 0.11 or newer in the PATH.
+ dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
+ dnl The second test excludes FreeBSD xgettext.
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
- [$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1], :)
+ [$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
+ (if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+ :)
+ dnl Remove leftover from FreeBSD xgettext call.
+ rm -f messages.po
dnl Search for GNU msgmerge 0.11 or newer in the PATH.
AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
@@ -272,7 +282,8 @@ AC_DEFUN([AM_PO_SUBDIRS],
if test "$GMSGFMT" != ":"; then
dnl If it is no GNU msgfmt we define it as : so that the
dnl Makefiles still can work.
- if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
+ if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
+ (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
: ;
else
AC_MSG_RESULT(
@@ -286,13 +297,16 @@ AC_DEFUN([AM_PO_SUBDIRS],
if test "$XGETTEXT" != ":"; then
dnl If it is no GNU xgettext we define it as : so that the
dnl Makefiles still can work.
- if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1; then
+ if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
+ (if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
: ;
else
AC_MSG_RESULT(
[found xgettext program is not GNU xgettext; ignore it])
XGETTEXT=":"
fi
+ dnl Remove leftover from FreeBSD xgettext call.
+ rm -f messages.po
fi
AC_OUTPUT_COMMANDS([