bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Possible po.m4 bug in gettext-0.16.1.tar.gz po.m4 -- using "--statis


From: Mark Moriarty
Subject: RE: Possible po.m4 bug in gettext-0.16.1.tar.gz po.m4 -- using "--statistics" to check for msgfmt
Date: Sat, 6 Oct 2007 12:00:13 -0400

I'm building VLC (VideoLAN Client).
The problem I'm observing is that when configure is run on VLC it knows that
it needs to use libintl, but the po.m4 file that's in the gettext v16.1
runtime is old, has a bad switch.

Config.log shows:
configure:22986: checking whether NLS is requested
configure:22995: result: yes
configure:23033: checking for msgfmt
configure: trying /usr/local/bin/msgfmt...
C:\cygwin\usr\local\bin\msgfmt.exe: error while opening "/dev/null" for
reading: No such file or directory
configure: trying /usr/local/bin/msgfmt...
C:\cygwin\usr\local\bin\msgfmt.exe: error while opening "/dev/null" for
reading: No such file or directory
configure:23068: result: no
 
The above tells me it's not correctly detecting msgfmt.  I check VLC's
configure, starting at line 3031, is:
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_MSGFMT+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case "$MSGFMT" in
  [\\/]* | ?:[\\/]*)
    ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a
path.
    ;;
  *)
    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
    for ac_dir in $PATH; do
      IFS="$ac_save_IFS"
      test -z "$ac_dir" && ac_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
          echo "$as_me: trying $ac_dir/$ac_word..." >&5
          if $ac_dir/$ac_word --statistics /dev/null >&5 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); then
            ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
            break 2
          fi
        fi
      done
    done
    IFS="$ac_save_IFS"
  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
    ;;
esac
Fi

The above is coming directly from gettext/gettext-runtime/m4/runtime/po.m4:

dnl Checks for all prerequisites of the po subdirectory.
AC_DEFUN([AM_PO_SUBDIRS],
[
  AC_REQUIRE([AC_PROG_MAKE_SET])dnl
  AC_REQUIRE([AC_PROG_INSTALL])dnl
  AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
  AC_REQUIRE([AM_NLS])dnl

  dnl Perform the following tests also if --disable-nls has been given,
  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 >&]AS_MESSAGE_LOG_FD[ 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)
 file:


The version of gettext that I have, have built, is gettext 0.16.1.  It's
just that the source package has an old po.m4 file in it:
# po.m4 serial 13 (gettext-0.15)

If I physically type msgfmt --version in a bash shell, it reports:
msgfmt.exe (GNU gettext-tools) 0.16.1

Exactly what it should, what is expected.  If I type the command that's
contained in gettext-runtime/m4/po.m4:
Msgfmt --statistics /dev/null

$ msgfmt --statistics /dev/null
C:\cygwin\usr\local\bin\msgfmt.exe: error while opening "/dev/null" for
reading: No such file o
r directory

It generates exactly the error that's being captured in my config.log -- the
"grep usage" part of the test doesn't find "usage".

Instead, it should be:
Msgfmt --help /dev/null

Or something similar -- the switch "--help", not "--statistics" is what's
needed to get msgfmt to spit out the "Usage".

So, I'm saying po.m4 should be adjusted to use:
dnl Checks for all prerequisites of the po subdirectory.
AC_DEFUN([AM_PO_SUBDIRS],
[
  AC_REQUIRE([AC_PROG_MAKE_SET])dnl
  AC_REQUIRE([AC_PROG_INSTALL])dnl
  AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
  AC_REQUIRE([AM_NLS])dnl

  dnl Perform the following tests also if --disable-nls has been given,
  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 --help /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
     (if $ac_dir/$ac_word --help /dev/null 2>&1 >/dev/null | grep usage
>/dev/null; then exit 1; else exit 0; fi)],
    :)
  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)

The only change is that I have replaced "--statistics" by "--help", in two
locations.

Thanks!
-----Original Message-----
From: Bruno Haible [mailto:address@hidden 
Sent: Saturday, October 06, 2007 11:19 AM
To: address@hidden; address@hidden
Subject: Re: Possible po.m4 bug in gettext-0.16.1.tar.gz po.m4 -- using
"--statistics" to check for msgfmt

Mark Moriarty wrote:
> I run a Cygwin environment.
> 
> Downloading and building gettext-0.16.1 appears to be fine.  I run 
> into a problem, however, building apps that use it.

What app are you trying to build?
How do you configure it?
Which msgfmt related autoconf macros does it use?
What problem are you observing?

> Gettext/gettext-runtime/m4/po.m4 appears to be out of date.  The first 
> line of the file shows: # po.m4 serial 13 (gettext-0.15)

This line only means that po.m4 has not needed modifications between 0.15
and 0.16.1.

Bruno





reply via email to

[Prev in Thread] Current Thread [Next in Thread]