~ubuntu-branches/ubuntu/saucy/lordsawar/saucy

« back to all changes in this revision

Viewing changes to m4/po.m4

  • Committer: Bazaar Package Importer
  • Author(s): Barry deFreese, Barry deFreese
  • Date: 2008-12-20 13:52:12 UTC
  • mfrom: (1.1.6 upstream) (5.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20081220135212-noeb2w3y98ebo7o9
Tags: 0.1.4-1
[ Barry deFreese ]
* New upstream release.
* Move 0.0.8-2.1 changelog entry to correct point in changelog.
* Make lordsawar-data suggest lordsawar.
* Update my e-mail address.
* Add build-depends on intltool, uuid-dev, and libboost-dev.
* Don't install locales since there are no translations currently.
* Add simple man page for new lordsawar-pbm binary.
* Drop gcc4.3 patches as they have been fixed upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# po.m4 serial 3 (gettext-0.14)
2
 
dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
3
 
dnl This file is free software, distributed under the terms of the GNU
4
 
dnl General Public License.  As a special exception to the GNU General
5
 
dnl Public License, this file may be distributed as part of a program
6
 
dnl that contains a configuration script generated by Autoconf, under
7
 
dnl the same distribution terms as the rest of that program.
 
1
# po.m4 serial 15 (gettext-0.17)
 
2
dnl Copyright (C) 1995-2007 Free Software Foundation, Inc.
 
3
dnl This file is free software; the Free Software Foundation
 
4
dnl gives unlimited permission to copy and/or distribute it,
 
5
dnl with or without modifications, as long as this notice is preserved.
8
6
dnl
9
7
dnl This file can can be used in projects which are not available under
10
8
dnl the GNU General Public License or the GNU Library General Public
19
17
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
20
18
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
21
19
 
 
20
AC_PREREQ(2.50)
 
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_MKINSTALLDIRS])dnl
 
27
  AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
28
28
  AC_REQUIRE([AM_NLS])dnl
29
29
 
 
30
  dnl Release version of the gettext macros. This is used to ensure that
 
31
  dnl the gettext macros and po/Makefile.in.in are in sync.
 
32
  AC_SUBST([GETTEXT_MACRO_VERSION], [0.17])
 
33
 
30
34
  dnl Perform the following tests also if --disable-nls has been given,
31
35
  dnl because they are needed for "make dist" to work.
32
36
 
34
38
  dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
35
39
  dnl The second test excludes FreeBSD msgfmt.
36
40
  AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
37
 
    [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
 
41
    [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
38
42
     (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
39
43
    :)
40
44
  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
41
45
 
 
46
  dnl Test whether it is GNU msgfmt >= 0.15.
 
47
changequote(,)dnl
 
48
  case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
 
49
    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
 
50
    *) MSGFMT_015=$MSGFMT ;;
 
51
  esac
 
52
changequote([,])dnl
 
53
  AC_SUBST([MSGFMT_015])
 
54
changequote(,)dnl
 
55
  case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
 
56
    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
 
57
    *) GMSGFMT_015=$GMSGFMT ;;
 
58
  esac
 
59
changequote([,])dnl
 
60
  AC_SUBST([GMSGFMT_015])
 
61
 
42
62
  dnl Search for GNU xgettext 0.12 or newer in the PATH.
43
63
  dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
44
64
  dnl The second test excludes FreeBSD xgettext.
45
65
  AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
46
 
    [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
 
66
    [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
47
67
     (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)],
48
68
    :)
49
69
  dnl Remove leftover from FreeBSD xgettext call.
50
70
  rm -f messages.po
51
71
 
 
72
  dnl Test whether it is GNU xgettext >= 0.15.
 
73
changequote(,)dnl
 
74
  case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
 
75
    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
 
76
    *) XGETTEXT_015=$XGETTEXT ;;
 
77
  esac
 
78
changequote([,])dnl
 
79
  AC_SUBST([XGETTEXT_015])
 
80
 
52
81
  dnl Search for GNU msgmerge 0.11 or newer in the PATH.
53
82
  AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
54
 
    [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
55
 
 
56
 
  dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
57
 
  dnl Test whether we really found GNU msgfmt.
58
 
  if test "$GMSGFMT" != ":"; then
59
 
    dnl If it is no GNU msgfmt we define it as : so that the
60
 
    dnl Makefiles still can work.
61
 
    if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
62
 
       (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
63
 
      : ;
64
 
    else
65
 
      GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
66
 
      AC_MSG_RESULT(
67
 
        [found $GMSGFMT program is not GNU msgfmt; ignore it])
68
 
      GMSGFMT=":"
69
 
    fi
70
 
  fi
71
 
 
72
 
  dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
73
 
  dnl Test whether we really found GNU xgettext.
74
 
  if test "$XGETTEXT" != ":"; then
75
 
    dnl If it is no GNU xgettext we define it as : so that the
76
 
    dnl Makefiles still can work.
77
 
    if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
78
 
       (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
79
 
      : ;
80
 
    else
81
 
      AC_MSG_RESULT(
82
 
        [found xgettext program is not GNU xgettext; ignore it])
83
 
      XGETTEXT=":"
84
 
    fi
85
 
    dnl Remove leftover from FreeBSD xgettext call.
86
 
    rm -f messages.po
87
 
  fi
88
 
 
89
 
  AC_OUTPUT_COMMANDS([
 
83
    [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
 
84
 
 
85
  dnl Installation directories.
 
86
  dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
 
87
  dnl have to define it here, so that it can be used in po/Makefile.
 
88
  test -n "$localedir" || localedir='${datadir}/locale'
 
89
  AC_SUBST([localedir])
 
90
 
 
91
  dnl Support for AM_XGETTEXT_OPTION.
 
92
  test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
 
93
  AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
 
94
 
 
95
  AC_CONFIG_COMMANDS([po-directories], [[
90
96
    for ac_file in $CONFIG_FILES; do
91
97
      # Support "outfile[:infile[:infile...]]"
92
98
      case "$ac_file" in
106
112
          /*) top_srcdir="$ac_given_srcdir" ;;
107
113
          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
108
114
        esac
 
115
        # Treat a directory as a PO directory if and only if it has a
 
116
        # POTFILES.in file. This allows packages to have multiple PO
 
117
        # directories under different names or in different locations.
109
118
        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
110
119
          rm -f "$ac_dir/POTFILES"
111
120
          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
119
128
            if test -n "$OBSOLETE_ALL_LINGUAS"; then
120
129
              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
121
130
            fi
122
 
            ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
123
 
            # Hide the ALL_LINGUAS assigment from automake.
 
131
            ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
 
132
            # Hide the ALL_LINGUAS assigment from automake < 1.5.
124
133
            eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
125
134
            POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
126
135
          else
127
136
            # The set of available languages was given in configure.in.
 
137
            # Hide the ALL_LINGUAS assigment from automake < 1.5.
128
138
            eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
129
139
          fi
130
140
          # Compute POFILES
194
204
        fi
195
205
        ;;
196
206
      esac
197
 
    done],
 
207
    done]],
198
208
   [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
199
209
    # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
200
 
    # from automake.
 
210
    # from automake < 1.5.
201
211
    eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
202
212
    # Capture the value of LINGUAS because we need it to compute CATALOGS.
203
213
    LINGUAS="${LINGUAS-%UNSET%}"
283
293
changequote([,])dnl
284
294
 
285
295
  # Set POTFILES to the value of the Makefile variable POTFILES.
286
 
  sed_x_POTFILES="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`"
 
296
  sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
287
297
  POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
288
298
  # Compute POTFILES_DEPS as
289
299
  #   $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
298
308
  fi
299
309
  if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
300
310
    # The LINGUAS file contains the set of available languages.
301
 
    ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
 
311
    ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
302
312
    POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
303
313
  else
304
314
    # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
305
 
    sed_x_LINGUAS="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`"
 
315
    sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
306
316
    ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
307
317
  fi
308
 
  # Hide the ALL_LINGUAS assigment from automake.
 
318
  # Hide the ALL_LINGUAS assigment from automake < 1.5.
309
319
  eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
310
320
  # Compute POFILES
311
321
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
348
358
    QMFILES="$QMFILES $srcdirpre$lang.qm"
349
359
    frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
350
360
    MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
351
 
    frobbedlang=`echo $lang | sed -e 's/_/-/g'`
 
361
    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/'`
352
362
    RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
353
363
  done
354
364
  # CATALOGS depends on both $ac_dir and the user's LINGUAS
389
399
      QTCATALOGS="$QTCATALOGS $lang.qm"
390
400
      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
391
401
      TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
392
 
      frobbedlang=`echo $lang | sed -e 's/_/-/g'`
 
402
      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/'`
393
403
      CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
394
404
    done
395
405
  fi
409
419
  if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
410
420
    # Add dependencies that cannot be formulated as a simple suffix rule.
411
421
    for lang in $ALL_LINGUAS; do
412
 
      frobbedlang=`echo $lang | sed -e 's/_/-/g'`
 
422
      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/'`
413
423
      cat >> "$ac_file.tmp" <<EOF
414
424
$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
415
425
        @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
424
434
  fi
425
435
  mv "$ac_file.tmp" "$ac_file"
426
436
])
 
437
 
 
438
dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
 
439
AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
 
440
[
 
441
  XGETTEXT_EXTRA_OPTIONS=
 
442
])
 
443
 
 
444
dnl Registers an option to be passed to xgettext in the po subdirectory.
 
445
AC_DEFUN([AM_XGETTEXT_OPTION],
 
446
[
 
447
  AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
 
448
  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
 
449
])