~ubuntu-branches/debian/sid/apt-dater/sid

« back to all changes in this revision

Viewing changes to m4/po.m4

  • Committer: Package Import Robot
  • Author(s): Patrick Matthäi
  • Date: 2015-01-19 19:14:15 UTC
  • mfrom: (1.2.4)
  • Revision ID: package-import@ubuntu.com-20150119191415-o5emoeio9lknv8h8
Tags: 1.0.1+git20150119-1
* New upstream git snapshot.
  - Fixes FTBFS with ld -b.
    Closes: #767594

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# po.m4 serial 15 (gettext-0.17)
2
 
dnl Copyright (C) 1995-2007 Free Software Foundation, Inc.
 
1
# po.m4 serial 22 (gettext-0.19)
 
2
dnl Copyright (C) 1995-2014 Free Software Foundation, Inc.
3
3
dnl This file is free software; the Free Software Foundation
4
4
dnl gives unlimited permission to copy and/or distribute it,
5
5
dnl with or without modifications, as long as this notice is preserved.
17
17
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
18
18
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
19
19
 
20
 
AC_PREREQ(2.50)
 
20
AC_PREREQ([2.60])
21
21
 
22
22
dnl Checks for all prerequisites of the po subdirectory.
23
23
AC_DEFUN([AM_PO_SUBDIRS],
24
24
[
25
25
  AC_REQUIRE([AC_PROG_MAKE_SET])dnl
26
26
  AC_REQUIRE([AC_PROG_INSTALL])dnl
27
 
  AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
 
27
  AC_REQUIRE([AC_PROG_MKDIR_P])dnl
 
28
  AC_REQUIRE([AC_PROG_SED])dnl
28
29
  AC_REQUIRE([AM_NLS])dnl
29
30
 
30
31
  dnl Release version of the gettext macros. This is used to ensure that
31
32
  dnl the gettext macros and po/Makefile.in.in are in sync.
32
 
  AC_SUBST([GETTEXT_MACRO_VERSION], [0.17])
 
33
  AC_SUBST([GETTEXT_MACRO_VERSION], [0.19])
33
34
 
34
35
  dnl Perform the following tests also if --disable-nls has been given,
35
36
  dnl because they are needed for "make dist" to work.
41
42
    [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
42
43
     (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
43
44
    :)
44
 
  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
 
45
  AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT])
45
46
 
46
47
  dnl Test whether it is GNU msgfmt >= 0.15.
47
48
changequote(,)dnl
102
103
      case "$ac_file" in */Makefile.in)
103
104
        # Adjust a relative srcdir.
104
105
        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
105
 
        ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
 
106
        ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
106
107
        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
107
108
        # In autoconf-2.13 it is called $ac_given_srcdir.
108
109
        # In autoconf-2.50 it is called $srcdir.
118
119
        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
119
120
          rm -f "$ac_dir/POTFILES"
120
121
          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
121
 
          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[   ]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
 
122
          gt_tab=`printf '\t'`
 
123
          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
122
124
          POMAKEFILEDEPS="POTFILES.in"
123
125
          # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
124
126
          # on $ac_dir but don't depend on user-specified configuration
129
131
              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
130
132
            fi
131
133
            ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
132
 
            # Hide the ALL_LINGUAS assigment from automake < 1.5.
 
134
            # Hide the ALL_LINGUAS assignment from automake < 1.5.
133
135
            eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
134
136
            POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
135
137
          else
136
138
            # The set of available languages was given in configure.in.
137
 
            # Hide the ALL_LINGUAS assigment from automake < 1.5.
 
139
            # Hide the ALL_LINGUAS assignment from automake < 1.5.
138
140
            eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
139
141
          fi
140
142
          # Compute POFILES
226
228
changequote(,)dnl
227
229
  # Adjust a relative srcdir.
228
230
  ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
229
 
  ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
 
231
  ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
230
232
  ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
231
233
  # In autoconf-2.13 it is called $ac_given_srcdir.
232
234
  # In autoconf-2.50 it is called $srcdir.
254
256
  fi
255
257
 
256
258
  # A sed script that extracts the value of VARIABLE from a Makefile.
 
259
  tab=`printf '\t'`
257
260
  sed_x_variable='
258
261
# Test if the hold space is empty.
259
262
x
261
264
x
262
265
ta
263
266
# Yes it was empty. Look if we have the expected variable definition.
264
 
/^[      ]*VARIABLE[     ]*=/{
 
267
/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=/{
265
268
  # Seen the first line of the variable definition.
266
 
  s/^[   ]*VARIABLE[     ]*=//
 
269
  s/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=//
267
270
  ba
268
271
}
269
272
bd
315
318
    sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
316
319
    ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
317
320
  fi
318
 
  # Hide the ALL_LINGUAS assigment from automake < 1.5.
 
321
  # Hide the ALL_LINGUAS assignment from automake < 1.5.
319
322
  eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
320
323
  # Compute POFILES
321
324
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
405
408
  fi
406
409
 
407
410
  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"
 
411
  tab=`printf '\t'`
408
412
  if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
409
413
    # Add dependencies that cannot be formulated as a simple suffix rule.
410
414
    for lang in $ALL_LINGUAS; do
411
415
      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
412
416
      cat >> "$ac_file.tmp" <<EOF
413
417
$frobbedlang.msg: $lang.po
414
 
        @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
415
 
        \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
 
418
${tab}@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
 
419
${tab}\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
416
420
EOF
417
421
    done
418
422
  fi
422
426
      frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
423
427
      cat >> "$ac_file.tmp" <<EOF
424
428
$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
425
 
        @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
426
 
        \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
 
429
${tab}@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
 
430
${tab}\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
427
431
EOF
428
432
    done
429
433
  fi