~ubuntu-branches/ubuntu/utopic/indicator-printers/utopic

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Package Import Robot
  • Author(s): Lars Uebernickel
  • Date: 2012-02-16 21:19:35 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20120216211935-3xrgag9lqadzp96j
Tags: 0.1.1-0ubuntu1
* New upstream release.
  - prepare for i18n
  - make sure CUPS' dbus notification is on while the service is running
  - fix build system to enable out-of-tree builds

* debian/control
  - bump libindicator dependency 0.3.91

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
If you have problems, you may need to regenerate the build system entirely.
21
21
To do so, use the procedure documented by the package, typically `autoreconf'.])])
22
22
 
 
23
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
 
24
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
 
25
#
 
26
# This file is free software, distributed under the terms of the GNU
 
27
# General Public License.  As a special exception to the GNU General
 
28
# Public License, this file may be distributed as part of a program
 
29
# that contains a configuration script generated by Autoconf, under
 
30
# the same distribution terms as the rest of that program.
 
31
#
 
32
# This file can be copied and used freely without restrictions.  It can
 
33
# be used in projects which are not available under the GNU Public License
 
34
# but which still want to provide support for the GNU gettext functionality.
 
35
#
 
36
# Macro to add for using GNU gettext.
 
37
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
 
38
#
 
39
# Modified to never use included libintl. 
 
40
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
 
41
#
 
42
# Major rework to remove unused code
 
43
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
 
44
#
 
45
# Added better handling of ALL_LINGUAS from GNU gettext version 
 
46
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
 
47
#
 
48
# Modified to require ngettext
 
49
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
 
50
#
 
51
# We need this here as well, since someone might use autoconf-2.5x
 
52
# to configure GLib then an older version to configure a package
 
53
# using AM_GLIB_GNU_GETTEXT
 
54
AC_PREREQ(2.53)
 
55
 
 
56
dnl
 
57
dnl We go to great lengths to make sure that aclocal won't 
 
58
dnl try to pull in the installed version of these macros
 
59
dnl when running aclocal in the glib directory.
 
60
dnl
 
61
m4_copy([AC_DEFUN],[glib_DEFUN])
 
62
m4_copy([AC_REQUIRE],[glib_REQUIRE])
 
63
dnl
 
64
dnl At the end, if we're not within glib, we'll define the public
 
65
dnl definitions in terms of our private definitions.
 
66
dnl
 
67
 
 
68
# GLIB_LC_MESSAGES
 
69
#--------------------
 
70
glib_DEFUN([GLIB_LC_MESSAGES],
 
71
  [AC_CHECK_HEADERS([locale.h])
 
72
    if test $ac_cv_header_locale_h = yes; then
 
73
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
 
74
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
 
75
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
 
76
    if test $am_cv_val_LC_MESSAGES = yes; then
 
77
      AC_DEFINE(HAVE_LC_MESSAGES, 1,
 
78
        [Define if your <locale.h> file defines LC_MESSAGES.])
 
79
    fi
 
80
  fi])
 
81
 
 
82
# GLIB_PATH_PROG_WITH_TEST
 
83
#----------------------------
 
84
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
 
85
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
 
86
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
 
87
[# Extract the first word of "$2", so it can be a program name with args.
 
88
set dummy $2; ac_word=[$]2
 
89
AC_MSG_CHECKING([for $ac_word])
 
90
AC_CACHE_VAL(ac_cv_path_$1,
 
91
[case "[$]$1" in
 
92
  /*)
 
93
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
 
94
  ;;
 
95
  *)
 
96
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
 
97
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
 
98
    test -z "$ac_dir" && ac_dir=.
 
99
    if test -f $ac_dir/$ac_word; then
 
100
      if [$3]; then
 
101
        ac_cv_path_$1="$ac_dir/$ac_word"
 
102
        break
 
103
      fi
 
104
    fi
 
105
  done
 
106
  IFS="$ac_save_ifs"
 
107
dnl If no 4th arg is given, leave the cache variable unset,
 
108
dnl so AC_PATH_PROGS will keep looking.
 
109
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
 
110
])dnl
 
111
  ;;
 
112
esac])dnl
 
113
$1="$ac_cv_path_$1"
 
114
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
 
115
  AC_MSG_RESULT([$]$1)
 
116
else
 
117
  AC_MSG_RESULT(no)
 
118
fi
 
119
AC_SUBST($1)dnl
 
120
])
 
121
 
 
122
# GLIB_WITH_NLS
 
123
#-----------------
 
124
glib_DEFUN([GLIB_WITH_NLS],
 
125
  dnl NLS is obligatory
 
126
  [USE_NLS=yes
 
127
    AC_SUBST(USE_NLS)
 
128
 
 
129
    gt_cv_have_gettext=no
 
130
 
 
131
    CATOBJEXT=NONE
 
132
    XGETTEXT=:
 
133
    INTLLIBS=
 
134
 
 
135
    AC_CHECK_HEADER(libintl.h,
 
136
     [gt_cv_func_dgettext_libintl="no"
 
137
      libintl_extra_libs=""
 
138
 
 
139
      #
 
140
      # First check in libc
 
141
      #
 
142
      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
 
143
        [AC_TRY_LINK([
 
144
#include <libintl.h>
 
145
],
 
146
         [return !ngettext ("","", 1)],
 
147
          gt_cv_func_ngettext_libc=yes,
 
148
          gt_cv_func_ngettext_libc=no)
 
149
        ])
 
150
  
 
151
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
 
152
              AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
 
153
                [AC_TRY_LINK([
 
154
#include <libintl.h>
 
155
],
 
156
                  [return !dgettext ("","")],
 
157
                  gt_cv_func_dgettext_libc=yes,
 
158
                  gt_cv_func_dgettext_libc=no)
 
159
                ])
 
160
      fi
 
161
  
 
162
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
 
163
        AC_CHECK_FUNCS(bind_textdomain_codeset)
 
164
      fi
 
165
 
 
166
      #
 
167
      # If we don't have everything we want, check in libintl
 
168
      #
 
169
      if test "$gt_cv_func_dgettext_libc" != "yes" \
 
170
         || test "$gt_cv_func_ngettext_libc" != "yes" \
 
171
         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
 
172
        
 
173
        AC_CHECK_LIB(intl, bindtextdomain,
 
174
            [AC_CHECK_LIB(intl, ngettext,
 
175
                    [AC_CHECK_LIB(intl, dgettext,
 
176
                                  gt_cv_func_dgettext_libintl=yes)])])
 
177
 
 
178
        if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
 
179
          AC_MSG_CHECKING([if -liconv is needed to use gettext])
 
180
          AC_MSG_RESULT([])
 
181
          AC_CHECK_LIB(intl, ngettext,
 
182
                [AC_CHECK_LIB(intl, dcgettext,
 
183
                       [gt_cv_func_dgettext_libintl=yes
 
184
                        libintl_extra_libs=-liconv],
 
185
                        :,-liconv)],
 
186
                :,-liconv)
 
187
        fi
 
188
 
 
189
        #
 
190
        # If we found libintl, then check in it for bind_textdomain_codeset();
 
191
        # we'll prefer libc if neither have bind_textdomain_codeset(),
 
192
        # and both have dgettext and ngettext
 
193
        #
 
194
        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
 
195
          glib_save_LIBS="$LIBS"
 
196
          LIBS="$LIBS -lintl $libintl_extra_libs"
 
197
          unset ac_cv_func_bind_textdomain_codeset
 
198
          AC_CHECK_FUNCS(bind_textdomain_codeset)
 
199
          LIBS="$glib_save_LIBS"
 
200
 
 
201
          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
 
202
            gt_cv_func_dgettext_libc=no
 
203
          else
 
204
            if test "$gt_cv_func_dgettext_libc" = "yes" \
 
205
                && test "$gt_cv_func_ngettext_libc" = "yes"; then
 
206
              gt_cv_func_dgettext_libintl=no
 
207
            fi
 
208
          fi
 
209
        fi
 
210
      fi
 
211
 
 
212
      if test "$gt_cv_func_dgettext_libc" = "yes" \
 
213
        || test "$gt_cv_func_dgettext_libintl" = "yes"; then
 
214
        gt_cv_have_gettext=yes
 
215
      fi
 
216
  
 
217
      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
 
218
        INTLLIBS="-lintl $libintl_extra_libs"
 
219
      fi
 
220
  
 
221
      if test "$gt_cv_have_gettext" = "yes"; then
 
222
        AC_DEFINE(HAVE_GETTEXT,1,
 
223
          [Define if the GNU gettext() function is already present or preinstalled.])
 
224
        GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
 
225
          [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
 
226
        if test "$MSGFMT" != "no"; then
 
227
          glib_save_LIBS="$LIBS"
 
228
          LIBS="$LIBS $INTLLIBS"
 
229
          AC_CHECK_FUNCS(dcgettext)
 
230
          MSGFMT_OPTS=
 
231
          AC_MSG_CHECKING([if msgfmt accepts -c])
 
232
          GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
 
233
msgid ""
 
234
msgstr ""
 
235
"Content-Type: text/plain; charset=UTF-8\n"
 
236
"Project-Id-Version: test 1.0\n"
 
237
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
 
238
"Last-Translator: test <foo@bar.xx>\n"
 
239
"Language-Team: C <LL@li.org>\n"
 
240
"MIME-Version: 1.0\n"
 
241
"Content-Transfer-Encoding: 8bit\n"
 
242
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
 
243
          AC_SUBST(MSGFMT_OPTS)
 
244
          AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
 
245
          GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
 
246
            [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
 
247
          AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
 
248
                         return _nl_msg_cat_cntr],
 
249
            [CATOBJEXT=.gmo 
 
250
             DATADIRNAME=share],
 
251
            [case $host in
 
252
            *-*-solaris*)
 
253
            dnl On Solaris, if bind_textdomain_codeset is in libc,
 
254
            dnl GNU format message catalog is always supported,
 
255
            dnl since both are added to the libc all together.
 
256
            dnl Hence, we'd like to go with DATADIRNAME=share and
 
257
            dnl and CATOBJEXT=.gmo in this case.
 
258
            AC_CHECK_FUNC(bind_textdomain_codeset,
 
259
              [CATOBJEXT=.gmo 
 
260
               DATADIRNAME=share],
 
261
              [CATOBJEXT=.mo
 
262
               DATADIRNAME=lib])
 
263
            ;;
 
264
            *-*-openbsd*)
 
265
            CATOBJEXT=.mo
 
266
            DATADIRNAME=share
 
267
            ;;
 
268
            *)
 
269
            CATOBJEXT=.mo
 
270
            DATADIRNAME=lib
 
271
            ;;
 
272
            esac])
 
273
          LIBS="$glib_save_LIBS"
 
274
          INSTOBJEXT=.mo
 
275
        else
 
276
          gt_cv_have_gettext=no
 
277
        fi
 
278
      fi
 
279
    ])
 
280
 
 
281
    if test "$gt_cv_have_gettext" = "yes" ; then
 
282
      AC_DEFINE(ENABLE_NLS, 1,
 
283
        [always defined to indicate that i18n is enabled])
 
284
    fi
 
285
 
 
286
    dnl Test whether we really found GNU xgettext.
 
287
    if test "$XGETTEXT" != ":"; then
 
288
      dnl If it is not GNU xgettext we define it as : so that the
 
289
      dnl Makefiles still can work.
 
290
      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
 
291
        : ;
 
292
      else
 
293
        AC_MSG_RESULT(
 
294
          [found xgettext program is not GNU xgettext; ignore it])
 
295
        XGETTEXT=":"
 
296
      fi
 
297
    fi
 
298
 
 
299
    # We need to process the po/ directory.
 
300
    POSUB=po
 
301
 
 
302
    AC_OUTPUT_COMMANDS(
 
303
      [case "$CONFIG_FILES" in *po/Makefile.in*)
 
304
        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
 
305
      esac])
 
306
 
 
307
    dnl These rules are solely for the distribution goal.  While doing this
 
308
    dnl we only have to keep exactly one list of the available catalogs
 
309
    dnl in configure.ac.
 
310
    for lang in $ALL_LINGUAS; do
 
311
      GMOFILES="$GMOFILES $lang.gmo"
 
312
      POFILES="$POFILES $lang.po"
 
313
    done
 
314
 
 
315
    dnl Make all variables we use known to autoconf.
 
316
    AC_SUBST(CATALOGS)
 
317
    AC_SUBST(CATOBJEXT)
 
318
    AC_SUBST(DATADIRNAME)
 
319
    AC_SUBST(GMOFILES)
 
320
    AC_SUBST(INSTOBJEXT)
 
321
    AC_SUBST(INTLLIBS)
 
322
    AC_SUBST(PO_IN_DATADIR_TRUE)
 
323
    AC_SUBST(PO_IN_DATADIR_FALSE)
 
324
    AC_SUBST(POFILES)
 
325
    AC_SUBST(POSUB)
 
326
  ])
 
327
 
 
328
# AM_GLIB_GNU_GETTEXT
 
329
# -------------------
 
330
# Do checks necessary for use of gettext. If a suitable implementation 
 
331
# of gettext is found in either in libintl or in the C library,
 
332
# it will set INTLLIBS to the libraries needed for use of gettext
 
333
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
 
334
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
 
335
# on various variables needed by the Makefile.in.in installed by 
 
336
# glib-gettextize.
 
337
dnl
 
338
glib_DEFUN([GLIB_GNU_GETTEXT],
 
339
  [AC_REQUIRE([AC_PROG_CC])dnl
 
340
   AC_REQUIRE([AC_HEADER_STDC])dnl
 
341
   
 
342
   GLIB_LC_MESSAGES
 
343
   GLIB_WITH_NLS
 
344
 
 
345
   if test "$gt_cv_have_gettext" = "yes"; then
 
346
     if test "x$ALL_LINGUAS" = "x"; then
 
347
       LINGUAS=
 
348
     else
 
349
       AC_MSG_CHECKING(for catalogs to be installed)
 
350
       NEW_LINGUAS=
 
351
       for presentlang in $ALL_LINGUAS; do
 
352
         useit=no
 
353
         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
 
354
           desiredlanguages="$LINGUAS"
 
355
         else
 
356
           desiredlanguages="$ALL_LINGUAS"
 
357
         fi
 
358
         for desiredlang in $desiredlanguages; do
 
359
           # Use the presentlang catalog if desiredlang is
 
360
           #   a. equal to presentlang, or
 
361
           #   b. a variant of presentlang (because in this case,
 
362
           #      presentlang can be used as a fallback for messages
 
363
           #      which are not translated in the desiredlang catalog).
 
364
           case "$desiredlang" in
 
365
             "$presentlang"*) useit=yes;;
 
366
           esac
 
367
         done
 
368
         if test $useit = yes; then
 
369
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
 
370
         fi
 
371
       done
 
372
       LINGUAS=$NEW_LINGUAS
 
373
       AC_MSG_RESULT($LINGUAS)
 
374
     fi
 
375
 
 
376
     dnl Construct list of names of catalog files to be constructed.
 
377
     if test -n "$LINGUAS"; then
 
378
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
 
379
     fi
 
380
   fi
 
381
 
 
382
   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
 
383
   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
 
384
   dnl Try to locate is.
 
385
   MKINSTALLDIRS=
 
386
   if test -n "$ac_aux_dir"; then
 
387
     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
 
388
   fi
 
389
   if test -z "$MKINSTALLDIRS"; then
 
390
     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
 
391
   fi
 
392
   AC_SUBST(MKINSTALLDIRS)
 
393
 
 
394
   dnl Generate list of files to be processed by xgettext which will
 
395
   dnl be included in po/Makefile.
 
396
   test -d po || mkdir po
 
397
   if test "x$srcdir" != "x."; then
 
398
     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
 
399
       posrcprefix="$srcdir/"
 
400
     else
 
401
       posrcprefix="../$srcdir/"
 
402
     fi
 
403
   else
 
404
     posrcprefix="../"
 
405
   fi
 
406
   rm -f po/POTFILES
 
407
   sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
 
408
        < $srcdir/po/POTFILES.in > po/POTFILES
 
409
  ])
 
410
 
 
411
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
 
412
# -------------------------------
 
413
# Define VARIABLE to the location where catalog files will
 
414
# be installed by po/Makefile.
 
415
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
 
416
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
 
417
glib_save_prefix="$prefix"
 
418
glib_save_exec_prefix="$exec_prefix"
 
419
glib_save_datarootdir="$datarootdir"
 
420
test "x$prefix" = xNONE && prefix=$ac_default_prefix
 
421
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
 
422
datarootdir=`eval echo "${datarootdir}"`
 
423
if test "x$CATOBJEXT" = "x.mo" ; then
 
424
  localedir=`eval echo "${libdir}/locale"`
 
425
else
 
426
  localedir=`eval echo "${datadir}/locale"`
 
427
fi
 
428
prefix="$glib_save_prefix"
 
429
exec_prefix="$glib_save_exec_prefix"
 
430
datarootdir="$glib_save_datarootdir"
 
431
AC_DEFINE_UNQUOTED($1, "$localedir",
 
432
  [Define the location where the catalogs will be installed])
 
433
])
 
434
 
 
435
dnl
 
436
dnl Now the definitions that aclocal will find
 
437
dnl
 
438
ifdef(glib_configure_ac,[],[
 
439
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
 
440
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
 
441
])dnl
 
442
 
 
443
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
 
444
 
445
# Create a temporary file with TEST-FILE as its contents and pass the
 
446
# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
 
447
# 0 and perform ACTION-IF-FAIL for any other exit status.
 
448
AC_DEFUN([GLIB_RUN_PROG],
 
449
[cat >conftest.foo <<_ACEOF
 
450
$2
 
451
_ACEOF
 
452
if AC_RUN_LOG([$1 conftest.foo]); then
 
453
  m4_ifval([$3], [$3], [:])
 
454
m4_ifvaln([$4], [else $4])dnl
 
455
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
 
456
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
 
457
fi])
 
458
 
 
459
 
 
460
 
 
461
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
 
462
# serial 41 IT_PROG_INTLTOOL
 
463
AC_DEFUN([IT_PROG_INTLTOOL], [
 
464
AC_PREREQ([2.50])dnl
 
465
AC_REQUIRE([AM_NLS])dnl
 
466
 
 
467
case "$am__api_version" in
 
468
    1.[01234])
 
469
        AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
 
470
    ;;
 
471
    *)
 
472
    ;;
 
473
esac
 
474
 
 
475
if test -n "$1"; then
 
476
    AC_MSG_CHECKING([for intltool >= $1])
 
477
 
 
478
    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
 
479
    INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
 
480
    [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
 
481
    ]
 
482
    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
 
483
    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
 
484
        AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
 
485
fi
 
486
 
 
487
AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
 
488
AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
 
489
AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
 
490
if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
 
491
    AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
 
492
fi
 
493
 
 
494
if test -z "$AM_DEFAULT_VERBOSITY"; then
 
495
  AM_DEFAULT_VERBOSITY=1
 
496
fi
 
497
AC_SUBST([AM_DEFAULT_VERBOSITY])
 
498
 
 
499
INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
 
500
INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
 
501
INTLTOOL__v_MERGE_0='@echo "  ITMRG " [$]@;'
 
502
AC_SUBST(INTLTOOL_V_MERGE)
 
503
AC_SUBST(INTLTOOL__v_MERGE_)
 
504
AC_SUBST(INTLTOOL__v_MERGE_0)
 
505
 
 
506
INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
 
507
intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
 
508
intltool__v_merge_options_0='-q'
 
509
AC_SUBST(INTLTOOL_V_MERGE_OPTIONS)
 
510
AC_SUBST(intltool__v_merge_options_)
 
511
AC_SUBST(intltool__v_merge_options_0)
 
512
 
 
513
  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
514
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
515
     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
516
     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
517
      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< [$]@'
 
518
     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
519
   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
520
    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
521
INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
522
       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
523
      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
524
      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< [$]@'
 
525
      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
526
      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
527
    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
528
  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
529
    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
530
    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
 
531
   INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
 
532
 
 
533
_IT_SUBST(INTLTOOL_DESKTOP_RULE)
 
534
_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
 
535
_IT_SUBST(INTLTOOL_KEYS_RULE)
 
536
_IT_SUBST(INTLTOOL_PROP_RULE)
 
537
_IT_SUBST(INTLTOOL_OAF_RULE)
 
538
_IT_SUBST(INTLTOOL_PONG_RULE)
 
539
_IT_SUBST(INTLTOOL_SERVER_RULE)
 
540
_IT_SUBST(INTLTOOL_SHEET_RULE)
 
541
_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
 
542
_IT_SUBST(INTLTOOL_UI_RULE)
 
543
_IT_SUBST(INTLTOOL_XAM_RULE)
 
544
_IT_SUBST(INTLTOOL_KBD_RULE)
 
545
_IT_SUBST(INTLTOOL_XML_RULE)
 
546
_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
 
547
_IT_SUBST(INTLTOOL_CAVES_RULE)
 
548
_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
 
549
_IT_SUBST(INTLTOOL_THEME_RULE)
 
550
_IT_SUBST(INTLTOOL_SERVICE_RULE)
 
551
_IT_SUBST(INTLTOOL_POLICY_RULE)
 
552
 
 
553
# Check the gettext tools to make sure they are GNU
 
554
AC_PATH_PROG(XGETTEXT, xgettext)
 
555
AC_PATH_PROG(MSGMERGE, msgmerge)
 
556
AC_PATH_PROG(MSGFMT, msgfmt)
 
557
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
 
558
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
 
559
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
 
560
fi
 
561
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
 
562
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
 
563
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
 
564
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
 
565
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
 
566
fi
 
567
 
 
568
AC_PATH_PROG(INTLTOOL_PERL, perl)
 
569
if test -z "$INTLTOOL_PERL"; then
 
570
   AC_MSG_ERROR([perl not found])
 
571
fi
 
572
AC_MSG_CHECKING([for perl >= 5.8.1])
 
573
$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
 
574
if test $? -ne 0; then
 
575
   AC_MSG_ERROR([perl 5.8.1 is required for intltool])
 
576
else
 
577
   IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"`
 
578
   AC_MSG_RESULT([$IT_PERL_VERSION])
 
579
fi
 
580
if test "x$2" != "xno-xml"; then
 
581
   AC_MSG_CHECKING([for XML::Parser])
 
582
   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
 
583
       AC_MSG_RESULT([ok])
 
584
   else
 
585
       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
 
586
   fi
 
587
fi
 
588
 
 
589
# Substitute ALL_LINGUAS so we can use it in po/Makefile
 
590
AC_SUBST(ALL_LINGUAS)
 
591
 
 
592
# Set DATADIRNAME correctly if it is not set yet
 
593
# (copied from glib-gettext.m4)
 
594
if test -z "$DATADIRNAME"; then
 
595
  AC_LINK_IFELSE(
 
596
    [AC_LANG_PROGRAM([[]],
 
597
                     [[extern int _nl_msg_cat_cntr;
 
598
                       return _nl_msg_cat_cntr]])],
 
599
    [DATADIRNAME=share],
 
600
    [case $host in
 
601
    *-*-solaris*)
 
602
    dnl On Solaris, if bind_textdomain_codeset is in libc,
 
603
    dnl GNU format message catalog is always supported,
 
604
    dnl since both are added to the libc all together.
 
605
    dnl Hence, we'd like to go with DATADIRNAME=share
 
606
    dnl in this case.
 
607
    AC_CHECK_FUNC(bind_textdomain_codeset,
 
608
      [DATADIRNAME=share], [DATADIRNAME=lib])
 
609
    ;;
 
610
    *)
 
611
    [DATADIRNAME=lib]
 
612
    ;;
 
613
    esac])
 
614
fi
 
615
AC_SUBST(DATADIRNAME)
 
616
 
 
617
IT_PO_SUBDIR([po])
 
618
 
 
619
])
 
620
 
 
621
 
 
622
# IT_PO_SUBDIR(DIRNAME)
 
623
# ---------------------
 
624
# All po subdirs have to be declared with this macro; the subdir "po" is
 
625
# declared by IT_PROG_INTLTOOL.
 
626
#
 
627
AC_DEFUN([IT_PO_SUBDIR],
 
628
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
 
629
dnl
 
630
dnl The following CONFIG_COMMANDS should be executed at the very end
 
631
dnl of config.status.
 
632
AC_CONFIG_COMMANDS_PRE([
 
633
  AC_CONFIG_COMMANDS([$1/stamp-it], [
 
634
    if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
 
635
       AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
 
636
    fi
 
637
    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
 
638
    >"$1/stamp-it.tmp"
 
639
    [sed '/^#/d
 
640
         s/^[[].*] *//
 
641
         /^[    ]*$/d
 
642
        '"s|^|  $ac_top_srcdir/|" \
 
643
      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
 
644
    ]
 
645
    [sed '/^POTFILES =/,/[^\\]$/ {
 
646
                /^POTFILES =/!d
 
647
                r $1/POTFILES
 
648
          }
 
649
         ' "$1/Makefile.in" >"$1/Makefile"]
 
650
    rm -f "$1/Makefile.tmp"
 
651
    mv "$1/stamp-it.tmp" "$1/stamp-it"
 
652
  ])
 
653
])dnl
 
654
])
 
655
 
 
656
# _IT_SUBST(VARIABLE)
 
657
# -------------------
 
658
# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
 
659
#
 
660
AC_DEFUN([_IT_SUBST],
 
661
[
 
662
AC_SUBST([$1])
 
663
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
 
664
]
 
665
)
 
666
 
 
667
# deprecated macros
 
668
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
 
669
# A hint is needed for aclocal from Automake <= 1.9.4:
 
670
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
 
671
 
 
672
 
23
673
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
24
674
#
25
675
#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
8626
9276
m4_ifndef([_LT_PROG_FC],                [AC_DEFUN([_LT_PROG_FC])])
8627
9277
m4_ifndef([_LT_PROG_CXX],               [AC_DEFUN([_LT_PROG_CXX])])
8628
9278
 
 
9279
# nls.m4 serial 5 (gettext-0.18)
 
9280
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
 
9281
dnl Inc.
 
9282
dnl This file is free software; the Free Software Foundation
 
9283
dnl gives unlimited permission to copy and/or distribute it,
 
9284
dnl with or without modifications, as long as this notice is preserved.
 
9285
dnl
 
9286
dnl This file can can be used in projects which are not available under
 
9287
dnl the GNU General Public License or the GNU Library General Public
 
9288
dnl License but which still want to provide support for the GNU gettext
 
9289
dnl functionality.
 
9290
dnl Please note that the actual code of the GNU gettext library is covered
 
9291
dnl by the GNU Library General Public License, and the rest of the GNU
 
9292
dnl gettext package package is covered by the GNU General Public License.
 
9293
dnl They are *not* in the public domain.
 
9294
 
 
9295
dnl Authors:
 
9296
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
 
9297
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
 
9298
 
 
9299
AC_PREREQ([2.50])
 
9300
 
 
9301
AC_DEFUN([AM_NLS],
 
9302
[
 
9303
  AC_MSG_CHECKING([whether NLS is requested])
 
9304
  dnl Default is enabled NLS
 
9305
  AC_ARG_ENABLE([nls],
 
9306
    [  --disable-nls           do not use Native Language Support],
 
9307
    USE_NLS=$enableval, USE_NLS=yes)
 
9308
  AC_MSG_RESULT([$USE_NLS])
 
9309
  AC_SUBST([USE_NLS])
 
9310
])
 
9311
 
8629
9312
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
8630
9313
# serial 1 (pkg-config-0.24)
8631
9314