Blame m4/po.m4

Packit Service 9f2c4a
# po.m4 serial 3 (gettext-0.14)
Packit Service 9f2c4a
dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
Packit Service 9f2c4a
dnl This file is free software, distributed under the terms of the GNU
Packit Service 9f2c4a
dnl General Public License.  As a special exception to the GNU General
Packit Service 9f2c4a
dnl Public License, this file may be distributed as part of a program
Packit Service 9f2c4a
dnl that contains a configuration script generated by Autoconf, under
Packit Service 9f2c4a
dnl the same distribution terms as the rest of that program.
Packit Service 9f2c4a
dnl
Packit Service 9f2c4a
dnl This file can can be used in projects which are not available under
Packit Service 9f2c4a
dnl the GNU General Public License or the GNU Library General Public
Packit Service 9f2c4a
dnl License but which still want to provide support for the GNU gettext
Packit Service 9f2c4a
dnl functionality.
Packit Service 9f2c4a
dnl Please note that the actual code of the GNU gettext library is covered
Packit Service 9f2c4a
dnl by the GNU Library General Public License, and the rest of the GNU
Packit Service 9f2c4a
dnl gettext package package is covered by the GNU General Public License.
Packit Service 9f2c4a
dnl They are *not* in the public domain.
Packit Service 9f2c4a
Packit Service 9f2c4a
dnl Authors:
Packit Service 9f2c4a
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
Packit Service 9f2c4a
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
Packit Service 9f2c4a
Packit Service 9f2c4a
dnl Checks for all prerequisites of the po subdirectory.
Packit Service 9f2c4a
AC_DEFUN([AM_PO_SUBDIRS],
Packit Service 9f2c4a
[
Packit Service 9f2c4a
  AC_REQUIRE([AC_PROG_MAKE_SET])dnl
Packit Service 9f2c4a
  AC_REQUIRE([AC_PROG_INSTALL])dnl
Packit Service 9f2c4a
  AC_REQUIRE([AM_MKINSTALLDIRS])dnl
Packit Service 9f2c4a
  AC_REQUIRE([AM_NLS])dnl
Packit Service 9f2c4a
Packit Service 9f2c4a
  dnl Perform the following tests also if --disable-nls has been given,
Packit Service 9f2c4a
  dnl because they are needed for "make dist" to work.
Packit Service 9f2c4a
Packit Service 9f2c4a
  dnl Search for GNU msgfmt in the PATH.
Packit Service 9f2c4a
  dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
Packit Service 9f2c4a
  dnl The second test excludes FreeBSD msgfmt.
Packit Service 9f2c4a
  AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
Packit Service 9f2c4a
    [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
Packit Service 9f2c4a
     (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
Packit Service 9f2c4a
    :)
Packit Service 9f2c4a
  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
Packit Service 9f2c4a
Packit Service 9f2c4a
  dnl Search for GNU xgettext 0.12 or newer in the PATH.
Packit Service 9f2c4a
  dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
Packit Service 9f2c4a
  dnl The second test excludes FreeBSD xgettext.
Packit Service 9f2c4a
  AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
Packit Service 9f2c4a
    [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
Packit Service 9f2c4a
     (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
Packit Service 9f2c4a
    :)
Packit Service 9f2c4a
  dnl Remove leftover from FreeBSD xgettext call.
Packit Service 9f2c4a
  rm -f messages.po
Packit Service 9f2c4a
Packit Service 9f2c4a
  dnl Search for GNU msgmerge 0.11 or newer in the PATH.
Packit Service 9f2c4a
  AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
Packit Service 9f2c4a
    [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
Packit Service 9f2c4a
Packit Service 9f2c4a
  dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
Packit Service 9f2c4a
  dnl Test whether we really found GNU msgfmt.
Packit Service 9f2c4a
  if test "$GMSGFMT" != ":"; then
Packit Service 9f2c4a
    dnl If it is no GNU msgfmt we define it as : so that the
Packit Service 9f2c4a
    dnl Makefiles still can work.
Packit Service 9f2c4a
    if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
Packit Service 9f2c4a
       (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
Packit Service 9f2c4a
      : ;
Packit Service 9f2c4a
    else
Packit Service 9f2c4a
      GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
Packit Service 9f2c4a
      AC_MSG_RESULT(
Packit Service 9f2c4a
        [found $GMSGFMT program is not GNU msgfmt; ignore it])
Packit Service 9f2c4a
      GMSGFMT=":"
Packit Service 9f2c4a
    fi
Packit Service 9f2c4a
  fi
Packit Service 9f2c4a
Packit Service 9f2c4a
  dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
Packit Service 9f2c4a
  dnl Test whether we really found GNU xgettext.
Packit Service 9f2c4a
  if test "$XGETTEXT" != ":"; then
Packit Service 9f2c4a
    dnl If it is no GNU xgettext we define it as : so that the
Packit Service 9f2c4a
    dnl Makefiles still can work.
Packit Service 9f2c4a
    if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
Packit Service 9f2c4a
       (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
Packit Service 9f2c4a
      : ;
Packit Service 9f2c4a
    else
Packit Service 9f2c4a
      AC_MSG_RESULT(
Packit Service 9f2c4a
        [found xgettext program is not GNU xgettext; ignore it])
Packit Service 9f2c4a
      XGETTEXT=":"
Packit Service 9f2c4a
    fi
Packit Service 9f2c4a
    dnl Remove leftover from FreeBSD xgettext call.
Packit Service 9f2c4a
    rm -f messages.po
Packit Service 9f2c4a
  fi
Packit Service 9f2c4a
Packit Service 9f2c4a
  AC_OUTPUT_COMMANDS([
Packit Service 9f2c4a
    for ac_file in $CONFIG_FILES; do
Packit Service 9f2c4a
      # Support "outfile[:infile[:infile...]]"
Packit Service 9f2c4a
      case "$ac_file" in
Packit Service 9f2c4a
        *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
Packit Service 9f2c4a
      esac
Packit Service 9f2c4a
      # PO directories have a Makefile.in generated from Makefile.in.in.
Packit Service 9f2c4a
      case "$ac_file" in */Makefile.in)
Packit Service 9f2c4a
        # Adjust a relative srcdir.
Packit Service 9f2c4a
        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
Packit Service 9f2c4a
        ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
Packit Service 9f2c4a
        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
Packit Service 9f2c4a
        # In autoconf-2.13 it is called $ac_given_srcdir.
Packit Service 9f2c4a
        # In autoconf-2.50 it is called $srcdir.
Packit Service 9f2c4a
        test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
Packit Service 9f2c4a
        case "$ac_given_srcdir" in
Packit Service 9f2c4a
          .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
Packit Service 9f2c4a
          /*) top_srcdir="$ac_given_srcdir" ;;
Packit Service 9f2c4a
          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
Packit Service 9f2c4a
        esac
Packit Service 9f2c4a
        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
Packit Service 9f2c4a
          rm -f "$ac_dir/POTFILES"
Packit Service 9f2c4a
          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
Packit Service 9f2c4a
          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ 	]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
Packit Service 9f2c4a
          POMAKEFILEDEPS="POTFILES.in"
Packit Service 9f2c4a
          # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
Packit Service 9f2c4a
          # on $ac_dir but don't depend on user-specified configuration
Packit Service 9f2c4a
          # parameters.
Packit Service 9f2c4a
          if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
Packit Service 9f2c4a
            # The LINGUAS file contains the set of available languages.
Packit Service 9f2c4a
            if test -n "$OBSOLETE_ALL_LINGUAS"; then
Packit Service 9f2c4a
              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
Packit Service 9f2c4a
            fi
Packit Service 9f2c4a
            ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
Packit Service 9f2c4a
            # Hide the ALL_LINGUAS assigment from automake.
Packit Service 9f2c4a
            eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
Packit Service 9f2c4a
            POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
Packit Service 9f2c4a
          else
Packit Service 9f2c4a
            # The set of available languages was given in configure.in.
Packit Service 9f2c4a
            eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
Packit Service 9f2c4a
          fi
Packit Service 9f2c4a
          # Compute POFILES
Packit Service 9f2c4a
          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
Packit Service 9f2c4a
          # Compute UPDATEPOFILES
Packit Service 9f2c4a
          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
Packit Service 9f2c4a
          # Compute DUMMYPOFILES
Packit Service 9f2c4a
          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
Packit Service 9f2c4a
          # Compute GMOFILES
Packit Service 9f2c4a
          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
Packit Service 9f2c4a
          case "$ac_given_srcdir" in
Packit Service 9f2c4a
            .) srcdirpre= ;;
Packit Service 9f2c4a
            *) srcdirpre='$(srcdir)/' ;;
Packit Service 9f2c4a
          esac
Packit Service 9f2c4a
          POFILES=
Packit Service 9f2c4a
          UPDATEPOFILES=
Packit Service 9f2c4a
          DUMMYPOFILES=
Packit Service 9f2c4a
          GMOFILES=
Packit Service 9f2c4a
          for lang in $ALL_LINGUAS; do
Packit Service 9f2c4a
            POFILES="$POFILES $srcdirpre$lang.po"
Packit Service 9f2c4a
            UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
Packit Service 9f2c4a
            DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
Packit Service 9f2c4a
            GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
Packit Service 9f2c4a
          done
Packit Service 9f2c4a
          # CATALOGS depends on both $ac_dir and the user's LINGUAS
Packit Service 9f2c4a
          # environment variable.
Packit Service 9f2c4a
          INST_LINGUAS=
Packit Service 9f2c4a
          if test -n "$ALL_LINGUAS"; then
Packit Service 9f2c4a
            for presentlang in $ALL_LINGUAS; do
Packit Service 9f2c4a
              useit=no
Packit Service 9f2c4a
              if test "%UNSET%" != "$LINGUAS"; then
Packit Service 9f2c4a
                desiredlanguages="$LINGUAS"
Packit Service 9f2c4a
              else
Packit Service 9f2c4a
                desiredlanguages="$ALL_LINGUAS"
Packit Service 9f2c4a
              fi
Packit Service 9f2c4a
              for desiredlang in $desiredlanguages; do
Packit Service 9f2c4a
                # Use the presentlang catalog if desiredlang is
Packit Service 9f2c4a
                #   a. equal to presentlang, or
Packit Service 9f2c4a
                #   b. a variant of presentlang (because in this case,
Packit Service 9f2c4a
                #      presentlang can be used as a fallback for messages
Packit Service 9f2c4a
                #      which are not translated in the desiredlang catalog).
Packit Service 9f2c4a
                case "$desiredlang" in
Packit Service 9f2c4a
                  "$presentlang"*) useit=yes;;
Packit Service 9f2c4a
                esac
Packit Service 9f2c4a
              done
Packit Service 9f2c4a
              if test $useit = yes; then
Packit Service 9f2c4a
                INST_LINGUAS="$INST_LINGUAS $presentlang"
Packit Service 9f2c4a
              fi
Packit Service 9f2c4a
            done
Packit Service 9f2c4a
          fi
Packit Service 9f2c4a
          CATALOGS=
Packit Service 9f2c4a
          if test -n "$INST_LINGUAS"; then
Packit Service 9f2c4a
            for lang in $INST_LINGUAS; do
Packit Service 9f2c4a
              CATALOGS="$CATALOGS $lang.gmo"
Packit Service 9f2c4a
            done
Packit Service 9f2c4a
          fi
Packit Service 9f2c4a
          test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
Packit Service 9f2c4a
          sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
Packit Service 9f2c4a
          for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
Packit Service 9f2c4a
            if test -f "$f"; then
Packit Service 9f2c4a
              case "$f" in
Packit Service 9f2c4a
                *.orig | *.bak | *~) ;;
Packit Service 9f2c4a
                *) cat "$f" >> "$ac_dir/Makefile" ;;
Packit Service 9f2c4a
              esac
Packit Service 9f2c4a
            fi
Packit Service 9f2c4a
          done
Packit Service 9f2c4a
        fi
Packit Service 9f2c4a
        ;;
Packit Service 9f2c4a
      esac
Packit Service 9f2c4a
    done],
Packit Service 9f2c4a
   [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
Packit Service 9f2c4a
    # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
Packit Service 9f2c4a
    # from automake.
Packit Service 9f2c4a
    eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
Packit Service 9f2c4a
    # Capture the value of LINGUAS because we need it to compute CATALOGS.
Packit Service 9f2c4a
    LINGUAS="${LINGUAS-%UNSET%}"
Packit Service 9f2c4a
   ])
Packit Service 9f2c4a
])
Packit Service 9f2c4a
Packit Service 9f2c4a
dnl Postprocesses a Makefile in a directory containing PO files.
Packit Service 9f2c4a
AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
Packit Service 9f2c4a
[
Packit Service 9f2c4a
  # When this code is run, in config.status, two variables have already been
Packit Service 9f2c4a
  # set:
Packit Service 9f2c4a
  # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
Packit Service 9f2c4a
  # - LINGUAS is the value of the environment variable LINGUAS at configure
Packit Service 9f2c4a
  #   time.
Packit Service 9f2c4a
Packit Service 9f2c4a
changequote(,)dnl
Packit Service 9f2c4a
  # Adjust a relative srcdir.
Packit Service 9f2c4a
  ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
Packit Service 9f2c4a
  ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
Packit Service 9f2c4a
  ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
Packit Service 9f2c4a
  # In autoconf-2.13 it is called $ac_given_srcdir.
Packit Service 9f2c4a
  # In autoconf-2.50 it is called $srcdir.
Packit Service 9f2c4a
  test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
Packit Service 9f2c4a
  case "$ac_given_srcdir" in
Packit Service 9f2c4a
    .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
Packit Service 9f2c4a
    /*) top_srcdir="$ac_given_srcdir" ;;
Packit Service 9f2c4a
    *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
Packit Service 9f2c4a
  esac
Packit Service 9f2c4a
Packit Service 9f2c4a
  # Find a way to echo strings without interpreting backslash.
Packit Service 9f2c4a
  if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
Packit Service 9f2c4a
    gt_echo='echo'
Packit Service 9f2c4a
  else
Packit Service 9f2c4a
    if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
Packit Service 9f2c4a
      gt_echo='printf %s\n'
Packit Service 9f2c4a
    else
Packit Service 9f2c4a
      echo_func () {
Packit Service 9f2c4a
        cat <
Packit Service 9f2c4a
$*
Packit Service 9f2c4a
EOT
Packit Service 9f2c4a
      }
Packit Service 9f2c4a
      gt_echo='echo_func'
Packit Service 9f2c4a
    fi
Packit Service 9f2c4a
  fi
Packit Service 9f2c4a
Packit Service 9f2c4a
  # A sed script that extracts the value of VARIABLE from a Makefile.
Packit Service 9f2c4a
  sed_x_variable='
Packit Service 9f2c4a
# Test if the hold space is empty.
Packit Service 9f2c4a
x
Packit Service 9f2c4a
s/P/P/
Packit Service 9f2c4a
x
Packit Service 9f2c4a
ta
Packit Service 9f2c4a
# Yes it was empty. Look if we have the expected variable definition.
Packit Service 9f2c4a
/^[	 ]*VARIABLE[	 ]*=/{
Packit Service 9f2c4a
  # Seen the first line of the variable definition.
Packit Service 9f2c4a
  s/^[	 ]*VARIABLE[	 ]*=//
Packit Service 9f2c4a
  ba
Packit Service 9f2c4a
}
Packit Service 9f2c4a
bd
Packit Service 9f2c4a
:a
Packit Service 9f2c4a
# Here we are processing a line from the variable definition.
Packit Service 9f2c4a
# Remove comment, more precisely replace it with a space.
Packit Service 9f2c4a
s/#.*$/ /
Packit Service 9f2c4a
# See if the line ends in a backslash.
Packit Service 9f2c4a
tb
Packit Service 9f2c4a
:b
Packit Service 9f2c4a
s/\\$//
Packit Service 9f2c4a
# Print the line, without the trailing backslash.
Packit Service 9f2c4a
p
Packit Service 9f2c4a
tc
Packit Service 9f2c4a
# There was no trailing backslash. The end of the variable definition is
Packit Service 9f2c4a
# reached. Clear the hold space.
Packit Service 9f2c4a
s/^.*$//
Packit Service 9f2c4a
x
Packit Service 9f2c4a
bd
Packit Service 9f2c4a
:c
Packit Service 9f2c4a
# A trailing backslash means that the variable definition continues in the
Packit Service 9f2c4a
# next line. Put a nonempty string into the hold space to indicate this.
Packit Service 9f2c4a
s/^.*$/P/
Packit Service 9f2c4a
x
Packit Service 9f2c4a
:d
Packit Service 9f2c4a
'
Packit Service 9f2c4a
changequote([,])dnl
Packit Service 9f2c4a
Packit Service 9f2c4a
  # Set POTFILES to the value of the Makefile variable POTFILES.
Packit Service 9f2c4a
  sed_x_POTFILES="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`"
Packit Service 9f2c4a
  POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
Packit Service 9f2c4a
  # Compute POTFILES_DEPS as
Packit Service 9f2c4a
  #   $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
Packit Service 9f2c4a
  POTFILES_DEPS=
Packit Service 9f2c4a
  for file in $POTFILES; do
Packit Service 9f2c4a
    POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
Packit Service 9f2c4a
  done
Packit Service 9f2c4a
  POMAKEFILEDEPS=""
Packit Service 9f2c4a
Packit Service 9f2c4a
  if test -n "$OBSOLETE_ALL_LINGUAS"; then
Packit Service 9f2c4a
    test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
Packit Service 9f2c4a
  fi
Packit Service 9f2c4a
  if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
Packit Service 9f2c4a
    # The LINGUAS file contains the set of available languages.
Packit Service 9f2c4a
    ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
Packit Service 9f2c4a
    POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
Packit Service 9f2c4a
  else
Packit Service 9f2c4a
    # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
Packit Service 9f2c4a
    sed_x_LINGUAS="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`"
Packit Service 9f2c4a
    ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
Packit Service 9f2c4a
  fi
Packit Service 9f2c4a
  # Hide the ALL_LINGUAS assigment from automake.
Packit Service 9f2c4a
  eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
Packit Service 9f2c4a
  # Compute POFILES
Packit Service 9f2c4a
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
Packit Service 9f2c4a
  # Compute UPDATEPOFILES
Packit Service 9f2c4a
  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
Packit Service 9f2c4a
  # Compute DUMMYPOFILES
Packit Service 9f2c4a
  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
Packit Service 9f2c4a
  # Compute GMOFILES
Packit Service 9f2c4a
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
Packit Service 9f2c4a
  # Compute PROPERTIESFILES
Packit Service 9f2c4a
  # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
Packit Service 9f2c4a
  # Compute CLASSFILES
Packit Service 9f2c4a
  # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
Packit Service 9f2c4a
  # Compute QMFILES
Packit Service 9f2c4a
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
Packit Service 9f2c4a
  # Compute MSGFILES
Packit Service 9f2c4a
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
Packit Service 9f2c4a
  # Compute RESOURCESDLLFILES
Packit Service 9f2c4a
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
Packit Service 9f2c4a
  case "$ac_given_srcdir" in
Packit Service 9f2c4a
    .) srcdirpre= ;;
Packit Service 9f2c4a
    *) srcdirpre='$(srcdir)/' ;;
Packit Service 9f2c4a
  esac
Packit Service 9f2c4a
  POFILES=
Packit Service 9f2c4a
  UPDATEPOFILES=
Packit Service 9f2c4a
  DUMMYPOFILES=
Packit Service 9f2c4a
  GMOFILES=
Packit Service 9f2c4a
  PROPERTIESFILES=
Packit Service 9f2c4a
  CLASSFILES=
Packit Service 9f2c4a
  QMFILES=
Packit Service 9f2c4a
  MSGFILES=
Packit Service 9f2c4a
  RESOURCESDLLFILES=
Packit Service 9f2c4a
  for lang in $ALL_LINGUAS; do
Packit Service 9f2c4a
    POFILES="$POFILES $srcdirpre$lang.po"
Packit Service 9f2c4a
    UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
Packit Service 9f2c4a
    DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
Packit Service 9f2c4a
    GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
Packit Service 9f2c4a
    PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
Packit Service 9f2c4a
    CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
Packit Service 9f2c4a
    QMFILES="$QMFILES $srcdirpre$lang.qm"
Packit Service 9f2c4a
    frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
Packit Service 9f2c4a
    MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
Packit Service 9f2c4a
    frobbedlang=`echo $lang | sed -e 's/_/-/g'`
Packit Service 9f2c4a
    RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
Packit Service 9f2c4a
  done
Packit Service 9f2c4a
  # CATALOGS depends on both $ac_dir and the user's LINGUAS
Packit Service 9f2c4a
  # environment variable.
Packit Service 9f2c4a
  INST_LINGUAS=
Packit Service 9f2c4a
  if test -n "$ALL_LINGUAS"; then
Packit Service 9f2c4a
    for presentlang in $ALL_LINGUAS; do
Packit Service 9f2c4a
      useit=no
Packit Service 9f2c4a
      if test "%UNSET%" != "$LINGUAS"; then
Packit Service 9f2c4a
        desiredlanguages="$LINGUAS"
Packit Service 9f2c4a
      else
Packit Service 9f2c4a
        desiredlanguages="$ALL_LINGUAS"
Packit Service 9f2c4a
      fi
Packit Service 9f2c4a
      for desiredlang in $desiredlanguages; do
Packit Service 9f2c4a
        # Use the presentlang catalog if desiredlang is
Packit Service 9f2c4a
        #   a. equal to presentlang, or
Packit Service 9f2c4a
        #   b. a variant of presentlang (because in this case,
Packit Service 9f2c4a
        #      presentlang can be used as a fallback for messages
Packit Service 9f2c4a
        #      which are not translated in the desiredlang catalog).
Packit Service 9f2c4a
        case "$desiredlang" in
Packit Service 9f2c4a
          "$presentlang"*) useit=yes;;
Packit Service 9f2c4a
        esac
Packit Service 9f2c4a
      done
Packit Service 9f2c4a
      if test $useit = yes; then
Packit Service 9f2c4a
        INST_LINGUAS="$INST_LINGUAS $presentlang"
Packit Service 9f2c4a
      fi
Packit Service 9f2c4a
    done
Packit Service 9f2c4a
  fi
Packit Service 9f2c4a
  CATALOGS=
Packit Service 9f2c4a
  JAVACATALOGS=
Packit Service 9f2c4a
  QTCATALOGS=
Packit Service 9f2c4a
  TCLCATALOGS=
Packit Service 9f2c4a
  CSHARPCATALOGS=
Packit Service 9f2c4a
  if test -n "$INST_LINGUAS"; then
Packit Service 9f2c4a
    for lang in $INST_LINGUAS; do
Packit Service 9f2c4a
      CATALOGS="$CATALOGS $lang.gmo"
Packit Service 9f2c4a
      JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
Packit Service 9f2c4a
      QTCATALOGS="$QTCATALOGS $lang.qm"
Packit Service 9f2c4a
      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
Packit Service 9f2c4a
      TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
Packit Service 9f2c4a
      frobbedlang=`echo $lang | sed -e 's/_/-/g'`
Packit Service 9f2c4a
      CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
Packit Service 9f2c4a
    done
Packit Service 9f2c4a
  fi
Packit Service 9f2c4a
Packit Service 9f2c4a
  sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
Packit Service 9f2c4a
  if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
Packit Service 9f2c4a
    # Add dependencies that cannot be formulated as a simple suffix rule.
Packit Service 9f2c4a
    for lang in $ALL_LINGUAS; do
Packit Service 9f2c4a
      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
Packit Service 9f2c4a
      cat >> "$ac_file.tmp" <
Packit Service 9f2c4a
$frobbedlang.msg: $lang.po
Packit Service 9f2c4a
	@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
Packit Service 9f2c4a
	\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
Packit Service 9f2c4a
EOF
Packit Service 9f2c4a
    done
Packit Service 9f2c4a
  fi
Packit Service 9f2c4a
  if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
Packit Service 9f2c4a
    # Add dependencies that cannot be formulated as a simple suffix rule.
Packit Service 9f2c4a
    for lang in $ALL_LINGUAS; do
Packit Service 9f2c4a
      frobbedlang=`echo $lang | sed -e 's/_/-/g'`
Packit Service 9f2c4a
      cat >> "$ac_file.tmp" <
Packit Service 9f2c4a
$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
Packit Service 9f2c4a
	@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
Packit Service 9f2c4a
	\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
Packit Service 9f2c4a
EOF
Packit Service 9f2c4a
    done
Packit Service 9f2c4a
  fi
Packit Service 9f2c4a
  if test -n "$POMAKEFILEDEPS"; then
Packit Service 9f2c4a
    cat >> "$ac_file.tmp" <
Packit Service 9f2c4a
Makefile: $POMAKEFILEDEPS
Packit Service 9f2c4a
EOF
Packit Service 9f2c4a
  fi
Packit Service 9f2c4a
  mv "$ac_file.tmp" "$ac_file"
Packit Service 9f2c4a
])