~ubuntu-branches/ubuntu/jaunty/gvfs/jaunty-updates

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2009-03-02 18:10:40 UTC
  • mfrom: (1.1.37 upstream)
  • Revision ID: james.westby@ubuntu.com-20090302181040-bozliyntjtpd0ozp
Tags: 1.1.7-0ubuntu1
* New upstream version:
  - Fix build on some platforms
  - ftp: Fix short read errors (lp: #208750)
  - gphoto2: Make it work on iphone
  - sftp: Fix symlink creation
  - fuse: Better support of truncation, fixing OOo save (lp: #317587)
  - proxy monitors: Support mount operations, etc
  - gvfs-mount: add --device commandline support
  - sftp: Fix protocol bug that made some servers not work (lp: #286053)
  - general support for query_info over streams, implemented for smb, sftp
  - Initial support for .xdg-volume-info reading (lp: #269159)
  - fix trash crasher (lp: #332554)
  - use ssh config (lp: #264803)
* debian/patches/02_support_xdg_volume_info.patch:
  - the new version fixes this issue
* debian/patches/91_upstream_change_fix_trash_crasher.patch:
  - upstream change to fix a trash crasher (lp: #333791)
* debian/rules:
  - shlibs version update

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
If you have problems, you may need to regenerate the build system entirely.
20
20
To do so, use the procedure documented by the package, typically `autoreconf'.])])
21
21
 
22
 
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
23
 
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
24
 
#
25
 
# This file is free software, distributed under the terms of the GNU
26
 
# General Public License.  As a special exception to the GNU General
27
 
# Public License, this file may be distributed as part of a program
28
 
# that contains a configuration script generated by Autoconf, under
29
 
# the same distribution terms as the rest of that program.
30
 
#
31
 
# This file can be copied and used freely without restrictions.  It can
32
 
# be used in projects which are not available under the GNU Public License
33
 
# but which still want to provide support for the GNU gettext functionality.
34
 
#
35
 
# Macro to add for using GNU gettext.
36
 
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
37
 
#
38
 
# Modified to never use included libintl. 
39
 
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
40
 
#
41
 
# Major rework to remove unused code
42
 
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
43
 
#
44
 
# Added better handling of ALL_LINGUAS from GNU gettext version 
45
 
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
46
 
#
47
 
# Modified to require ngettext
48
 
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
49
 
#
50
 
# We need this here as well, since someone might use autoconf-2.5x
51
 
# to configure GLib then an older version to configure a package
52
 
# using AM_GLIB_GNU_GETTEXT
53
 
AC_PREREQ(2.53)
54
 
 
55
 
dnl
56
 
dnl We go to great lengths to make sure that aclocal won't 
57
 
dnl try to pull in the installed version of these macros
58
 
dnl when running aclocal in the glib directory.
59
 
dnl
60
 
m4_copy([AC_DEFUN],[glib_DEFUN])
61
 
m4_copy([AC_REQUIRE],[glib_REQUIRE])
62
 
dnl
63
 
dnl At the end, if we're not within glib, we'll define the public
64
 
dnl definitions in terms of our private definitions.
65
 
dnl
66
 
 
67
 
# GLIB_LC_MESSAGES
68
 
#--------------------
69
 
glib_DEFUN([GLIB_LC_MESSAGES],
70
 
  [AC_CHECK_HEADERS([locale.h])
71
 
    if test $ac_cv_header_locale_h = yes; then
72
 
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
73
 
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
74
 
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
75
 
    if test $am_cv_val_LC_MESSAGES = yes; then
76
 
      AC_DEFINE(HAVE_LC_MESSAGES, 1,
77
 
        [Define if your <locale.h> file defines LC_MESSAGES.])
78
 
    fi
79
 
  fi])
80
 
 
81
 
# GLIB_PATH_PROG_WITH_TEST
82
 
#----------------------------
83
 
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
84
 
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
85
 
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
86
 
[# Extract the first word of "$2", so it can be a program name with args.
87
 
set dummy $2; ac_word=[$]2
88
 
AC_MSG_CHECKING([for $ac_word])
89
 
AC_CACHE_VAL(ac_cv_path_$1,
90
 
[case "[$]$1" in
91
 
  /*)
92
 
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
93
 
  ;;
94
 
  *)
95
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
96
 
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
97
 
    test -z "$ac_dir" && ac_dir=.
98
 
    if test -f $ac_dir/$ac_word; then
99
 
      if [$3]; then
100
 
        ac_cv_path_$1="$ac_dir/$ac_word"
101
 
        break
102
 
      fi
103
 
    fi
104
 
  done
105
 
  IFS="$ac_save_ifs"
106
 
dnl If no 4th arg is given, leave the cache variable unset,
107
 
dnl so AC_PATH_PROGS will keep looking.
108
 
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
109
 
])dnl
110
 
  ;;
111
 
esac])dnl
112
 
$1="$ac_cv_path_$1"
113
 
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
114
 
  AC_MSG_RESULT([$]$1)
115
 
else
116
 
  AC_MSG_RESULT(no)
117
 
fi
118
 
AC_SUBST($1)dnl
119
 
])
120
 
 
121
 
# GLIB_WITH_NLS
122
 
#-----------------
123
 
glib_DEFUN([GLIB_WITH_NLS],
124
 
  dnl NLS is obligatory
125
 
  [USE_NLS=yes
126
 
    AC_SUBST(USE_NLS)
127
 
 
128
 
    gt_cv_have_gettext=no
129
 
 
130
 
    CATOBJEXT=NONE
131
 
    XGETTEXT=:
132
 
    INTLLIBS=
133
 
 
134
 
    AC_CHECK_HEADER(libintl.h,
135
 
     [gt_cv_func_dgettext_libintl="no"
136
 
      libintl_extra_libs=""
137
 
 
138
 
      #
139
 
      # First check in libc
140
 
      #
141
 
      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
142
 
        [AC_TRY_LINK([
143
 
#include <libintl.h>
144
 
],
145
 
         [return !ngettext ("","", 1)],
146
 
          gt_cv_func_ngettext_libc=yes,
147
 
          gt_cv_func_ngettext_libc=no)
148
 
        ])
149
 
  
150
 
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
151
 
              AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
152
 
                [AC_TRY_LINK([
153
 
#include <libintl.h>
154
 
],
155
 
                  [return !dgettext ("","")],
156
 
                  gt_cv_func_dgettext_libc=yes,
157
 
                  gt_cv_func_dgettext_libc=no)
158
 
                ])
159
 
      fi
160
 
  
161
 
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
162
 
        AC_CHECK_FUNCS(bind_textdomain_codeset)
163
 
      fi
164
 
 
165
 
      #
166
 
      # If we don't have everything we want, check in libintl
167
 
      #
168
 
      if test "$gt_cv_func_dgettext_libc" != "yes" \
169
 
         || test "$gt_cv_func_ngettext_libc" != "yes" \
170
 
         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
171
 
        
172
 
        AC_CHECK_LIB(intl, bindtextdomain,
173
 
            [AC_CHECK_LIB(intl, ngettext,
174
 
                    [AC_CHECK_LIB(intl, dgettext,
175
 
                                  gt_cv_func_dgettext_libintl=yes)])])
176
 
 
177
 
        if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
178
 
          AC_MSG_CHECKING([if -liconv is needed to use gettext])
179
 
          AC_MSG_RESULT([])
180
 
          AC_CHECK_LIB(intl, ngettext,
181
 
                [AC_CHECK_LIB(intl, dcgettext,
182
 
                       [gt_cv_func_dgettext_libintl=yes
183
 
                        libintl_extra_libs=-liconv],
184
 
                        :,-liconv)],
185
 
                :,-liconv)
186
 
        fi
187
 
 
188
 
        #
189
 
        # If we found libintl, then check in it for bind_textdomain_codeset();
190
 
        # we'll prefer libc if neither have bind_textdomain_codeset(),
191
 
        # and both have dgettext and ngettext
192
 
        #
193
 
        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
194
 
          glib_save_LIBS="$LIBS"
195
 
          LIBS="$LIBS -lintl $libintl_extra_libs"
196
 
          unset ac_cv_func_bind_textdomain_codeset
197
 
          AC_CHECK_FUNCS(bind_textdomain_codeset)
198
 
          LIBS="$glib_save_LIBS"
199
 
 
200
 
          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
201
 
            gt_cv_func_dgettext_libc=no
202
 
          else
203
 
            if test "$gt_cv_func_dgettext_libc" = "yes" \
204
 
                && test "$gt_cv_func_ngettext_libc" = "yes"; then
205
 
              gt_cv_func_dgettext_libintl=no
206
 
            fi
207
 
          fi
208
 
        fi
209
 
      fi
210
 
 
211
 
      if test "$gt_cv_func_dgettext_libc" = "yes" \
212
 
        || test "$gt_cv_func_dgettext_libintl" = "yes"; then
213
 
        gt_cv_have_gettext=yes
214
 
      fi
215
 
  
216
 
      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
217
 
        INTLLIBS="-lintl $libintl_extra_libs"
218
 
      fi
219
 
  
220
 
      if test "$gt_cv_have_gettext" = "yes"; then
221
 
        AC_DEFINE(HAVE_GETTEXT,1,
222
 
          [Define if the GNU gettext() function is already present or preinstalled.])
223
 
        GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
224
 
          [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
225
 
        if test "$MSGFMT" != "no"; then
226
 
          glib_save_LIBS="$LIBS"
227
 
          LIBS="$LIBS $INTLLIBS"
228
 
          AC_CHECK_FUNCS(dcgettext)
229
 
          MSGFMT_OPTS=
230
 
          AC_MSG_CHECKING([if msgfmt accepts -c])
231
 
          GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
232
 
msgid ""
233
 
msgstr ""
234
 
"Content-Type: text/plain; charset=UTF-8\n"
235
 
"Project-Id-Version: test 1.0\n"
236
 
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
237
 
"Last-Translator: test <foo@bar.xx>\n"
238
 
"Language-Team: C <LL@li.org>\n"
239
 
"MIME-Version: 1.0\n"
240
 
"Content-Transfer-Encoding: 8bit\n"
241
 
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
242
 
          AC_SUBST(MSGFMT_OPTS)
243
 
          AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
244
 
          GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
245
 
            [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
246
 
          AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
247
 
                         return _nl_msg_cat_cntr],
248
 
            [CATOBJEXT=.gmo 
249
 
             DATADIRNAME=share],
250
 
            [case $host in
251
 
            *-*-solaris*)
252
 
            dnl On Solaris, if bind_textdomain_codeset is in libc,
253
 
            dnl GNU format message catalog is always supported,
254
 
            dnl since both are added to the libc all together.
255
 
            dnl Hence, we'd like to go with DATADIRNAME=share and
256
 
            dnl and CATOBJEXT=.gmo in this case.
257
 
            AC_CHECK_FUNC(bind_textdomain_codeset,
258
 
              [CATOBJEXT=.gmo 
259
 
               DATADIRNAME=share],
260
 
              [CATOBJEXT=.mo
261
 
               DATADIRNAME=lib])
262
 
            ;;
263
 
            *)
264
 
            CATOBJEXT=.mo
265
 
            DATADIRNAME=lib
266
 
            ;;
267
 
            esac])
268
 
          LIBS="$glib_save_LIBS"
269
 
          INSTOBJEXT=.mo
270
 
        else
271
 
          gt_cv_have_gettext=no
272
 
        fi
273
 
      fi
274
 
    ])
275
 
 
276
 
    if test "$gt_cv_have_gettext" = "yes" ; then
277
 
      AC_DEFINE(ENABLE_NLS, 1,
278
 
        [always defined to indicate that i18n is enabled])
279
 
    fi
280
 
 
281
 
    dnl Test whether we really found GNU xgettext.
282
 
    if test "$XGETTEXT" != ":"; then
283
 
      dnl If it is not GNU xgettext we define it as : so that the
284
 
      dnl Makefiles still can work.
285
 
      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
286
 
        : ;
287
 
      else
288
 
        AC_MSG_RESULT(
289
 
          [found xgettext program is not GNU xgettext; ignore it])
290
 
        XGETTEXT=":"
291
 
      fi
292
 
    fi
293
 
 
294
 
    # We need to process the po/ directory.
295
 
    POSUB=po
296
 
 
297
 
    AC_OUTPUT_COMMANDS(
298
 
      [case "$CONFIG_FILES" in *po/Makefile.in*)
299
 
        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
300
 
      esac])
301
 
 
302
 
    dnl These rules are solely for the distribution goal.  While doing this
303
 
    dnl we only have to keep exactly one list of the available catalogs
304
 
    dnl in configure.in.
305
 
    for lang in $ALL_LINGUAS; do
306
 
      GMOFILES="$GMOFILES $lang.gmo"
307
 
      POFILES="$POFILES $lang.po"
308
 
    done
309
 
 
310
 
    dnl Make all variables we use known to autoconf.
311
 
    AC_SUBST(CATALOGS)
312
 
    AC_SUBST(CATOBJEXT)
313
 
    AC_SUBST(DATADIRNAME)
314
 
    AC_SUBST(GMOFILES)
315
 
    AC_SUBST(INSTOBJEXT)
316
 
    AC_SUBST(INTLLIBS)
317
 
    AC_SUBST(PO_IN_DATADIR_TRUE)
318
 
    AC_SUBST(PO_IN_DATADIR_FALSE)
319
 
    AC_SUBST(POFILES)
320
 
    AC_SUBST(POSUB)
321
 
  ])
322
 
 
323
 
# AM_GLIB_GNU_GETTEXT
324
 
# -------------------
325
 
# Do checks necessary for use of gettext. If a suitable implementation 
326
 
# of gettext is found in either in libintl or in the C library,
327
 
# it will set INTLLIBS to the libraries needed for use of gettext
328
 
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
329
 
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
330
 
# on various variables needed by the Makefile.in.in installed by 
331
 
# glib-gettextize.
332
 
dnl
333
 
glib_DEFUN([GLIB_GNU_GETTEXT],
334
 
  [AC_REQUIRE([AC_PROG_CC])dnl
335
 
   AC_REQUIRE([AC_HEADER_STDC])dnl
336
 
   
337
 
   GLIB_LC_MESSAGES
338
 
   GLIB_WITH_NLS
339
 
 
340
 
   if test "$gt_cv_have_gettext" = "yes"; then
341
 
     if test "x$ALL_LINGUAS" = "x"; then
342
 
       LINGUAS=
343
 
     else
344
 
       AC_MSG_CHECKING(for catalogs to be installed)
345
 
       NEW_LINGUAS=
346
 
       for presentlang in $ALL_LINGUAS; do
347
 
         useit=no
348
 
         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
349
 
           desiredlanguages="$LINGUAS"
350
 
         else
351
 
           desiredlanguages="$ALL_LINGUAS"
352
 
         fi
353
 
         for desiredlang in $desiredlanguages; do
354
 
           # Use the presentlang catalog if desiredlang is
355
 
           #   a. equal to presentlang, or
356
 
           #   b. a variant of presentlang (because in this case,
357
 
           #      presentlang can be used as a fallback for messages
358
 
           #      which are not translated in the desiredlang catalog).
359
 
           case "$desiredlang" in
360
 
             "$presentlang"*) useit=yes;;
361
 
           esac
362
 
         done
363
 
         if test $useit = yes; then
364
 
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
365
 
         fi
366
 
       done
367
 
       LINGUAS=$NEW_LINGUAS
368
 
       AC_MSG_RESULT($LINGUAS)
369
 
     fi
370
 
 
371
 
     dnl Construct list of names of catalog files to be constructed.
372
 
     if test -n "$LINGUAS"; then
373
 
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
374
 
     fi
375
 
   fi
376
 
 
377
 
   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
378
 
   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
379
 
   dnl Try to locate is.
380
 
   MKINSTALLDIRS=
381
 
   if test -n "$ac_aux_dir"; then
382
 
     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
383
 
   fi
384
 
   if test -z "$MKINSTALLDIRS"; then
385
 
     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
386
 
   fi
387
 
   AC_SUBST(MKINSTALLDIRS)
388
 
 
389
 
   dnl Generate list of files to be processed by xgettext which will
390
 
   dnl be included in po/Makefile.
391
 
   test -d po || mkdir po
392
 
   if test "x$srcdir" != "x."; then
393
 
     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
394
 
       posrcprefix="$srcdir/"
395
 
     else
396
 
       posrcprefix="../$srcdir/"
397
 
     fi
398
 
   else
399
 
     posrcprefix="../"
400
 
   fi
401
 
   rm -f po/POTFILES
402
 
   sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
403
 
        < $srcdir/po/POTFILES.in > po/POTFILES
404
 
  ])
405
 
 
406
 
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
407
 
# -------------------------------
408
 
# Define VARIABLE to the location where catalog files will
409
 
# be installed by po/Makefile.
410
 
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
411
 
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
412
 
glib_save_prefix="$prefix"
413
 
glib_save_exec_prefix="$exec_prefix"
414
 
glib_save_datarootdir="$datarootdir"
415
 
test "x$prefix" = xNONE && prefix=$ac_default_prefix
416
 
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
417
 
datarootdir=`eval echo "${datarootdir}"`
418
 
if test "x$CATOBJEXT" = "x.mo" ; then
419
 
  localedir=`eval echo "${libdir}/locale"`
420
 
else
421
 
  localedir=`eval echo "${datadir}/locale"`
422
 
fi
423
 
prefix="$glib_save_prefix"
424
 
exec_prefix="$glib_save_exec_prefix"
425
 
datarootdir="$glib_save_datarootdir"
426
 
AC_DEFINE_UNQUOTED($1, "$localedir",
427
 
  [Define the location where the catalogs will be installed])
428
 
])
429
 
 
430
 
dnl
431
 
dnl Now the definitions that aclocal will find
432
 
dnl
433
 
ifdef(glib_configure_in,[],[
434
 
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
435
 
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
436
 
])dnl
437
 
 
438
 
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
439
 
440
 
# Create a temporary file with TEST-FILE as its contents and pass the
441
 
# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
442
 
# 0 and perform ACTION-IF-FAIL for any other exit status.
443
 
AC_DEFUN([GLIB_RUN_PROG],
444
 
[cat >conftest.foo <<_ACEOF
445
 
$2
446
 
_ACEOF
447
 
if AC_RUN_LOG([$1 conftest.foo]); then
448
 
  m4_ifval([$3], [$3], [:])
449
 
m4_ifvaln([$4], [else $4])dnl
450
 
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
451
 
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
452
 
fi])
453
 
 
454
 
 
455
 
dnl -*- mode: autoconf -*-
456
 
 
457
 
# serial 1
458
 
 
459
 
dnl Usage:
460
 
dnl   GTK_DOC_CHECK([minimum-gtk-doc-version])
461
 
AC_DEFUN([GTK_DOC_CHECK],
462
 
[
463
 
  AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
464
 
  AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
465
 
  dnl for overriding the documentation installation directory
466
 
  AC_ARG_WITH([html-dir],
467
 
    AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
468
 
    [with_html_dir='${datadir}/gtk-doc/html'])
469
 
  HTML_DIR="$with_html_dir"
470
 
  AC_SUBST([HTML_DIR])
471
 
 
472
 
  dnl enable/disable documentation building
473
 
  AC_ARG_ENABLE([gtk-doc],
474
 
    AS_HELP_STRING([--enable-gtk-doc],
475
 
                   [use gtk-doc to build documentation [[default=no]]]),,
476
 
    [enable_gtk_doc=no])
477
 
 
478
 
  if test x$enable_gtk_doc = xyes; then
479
 
    ifelse([$1],[],
480
 
      [PKG_CHECK_EXISTS([gtk-doc],,
481
 
                        AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))],
482
 
      [PKG_CHECK_EXISTS([gtk-doc >= $1],,
483
 
                        AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build gtk-doc]))])
484
 
  fi
485
 
 
486
 
  AC_MSG_CHECKING([whether to build gtk-doc documentation])
487
 
  AC_MSG_RESULT($enable_gtk_doc)
488
 
 
489
 
  AC_PATH_PROGS(GTKDOC_CHECK,gtkdoc-check,)
490
 
 
491
 
  AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
492
 
  AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
493
 
])
494
 
 
495
 
 
496
 
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
497
 
# serial 40 IT_PROG_INTLTOOL
498
 
AC_DEFUN([IT_PROG_INTLTOOL], [
499
 
AC_PREREQ([2.50])dnl
500
 
AC_REQUIRE([AM_NLS])dnl
501
 
 
502
 
case "$am__api_version" in
503
 
    1.[01234])
504
 
        AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
505
 
    ;;
506
 
    *)
507
 
    ;;
508
 
esac
509
 
 
510
 
if test -n "$1"; then
511
 
    AC_MSG_CHECKING([for intltool >= $1])
512
 
 
513
 
    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
514
 
    INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
515
 
    [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
516
 
    ]
517
 
    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
518
 
    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
519
 
        AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
520
 
fi
521
 
 
522
 
AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
523
 
AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
524
 
AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
525
 
if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
526
 
    AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
527
 
fi
528
 
 
529
 
  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
530
 
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
531
 
     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
532
 
     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
533
 
      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
534
 
     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
535
 
   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
536
 
    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
537
 
INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
538
 
       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
539
 
      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
540
 
      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' 
541
 
      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
542
 
      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
543
 
    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
544
 
  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
545
 
    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
546
 
    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
547
 
   INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
548
 
 
549
 
AC_SUBST(INTLTOOL_DESKTOP_RULE)
550
 
AC_SUBST(INTLTOOL_DIRECTORY_RULE)
551
 
AC_SUBST(INTLTOOL_KEYS_RULE)
552
 
AC_SUBST(INTLTOOL_PROP_RULE)
553
 
AC_SUBST(INTLTOOL_OAF_RULE)
554
 
AC_SUBST(INTLTOOL_PONG_RULE)
555
 
AC_SUBST(INTLTOOL_SERVER_RULE)
556
 
AC_SUBST(INTLTOOL_SHEET_RULE)
557
 
AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
558
 
AC_SUBST(INTLTOOL_UI_RULE)
559
 
AC_SUBST(INTLTOOL_XAM_RULE)
560
 
AC_SUBST(INTLTOOL_KBD_RULE)
561
 
AC_SUBST(INTLTOOL_XML_RULE)
562
 
AC_SUBST(INTLTOOL_XML_NOMERGE_RULE)
563
 
AC_SUBST(INTLTOOL_CAVES_RULE)
564
 
AC_SUBST(INTLTOOL_SCHEMAS_RULE)
565
 
AC_SUBST(INTLTOOL_THEME_RULE)
566
 
AC_SUBST(INTLTOOL_SERVICE_RULE)
567
 
AC_SUBST(INTLTOOL_POLICY_RULE)
568
 
 
569
 
# Check the gettext tools to make sure they are GNU
570
 
AC_PATH_PROG(XGETTEXT, xgettext)
571
 
AC_PATH_PROG(MSGMERGE, msgmerge)
572
 
AC_PATH_PROG(MSGFMT, msgfmt)
573
 
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
574
 
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
575
 
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
576
 
fi
577
 
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
578
 
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
579
 
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
580
 
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
581
 
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
582
 
fi
583
 
 
584
 
AC_PATH_PROG(INTLTOOL_PERL, [perl])
585
 
if test -z "$INTLTOOL_PERL"; then
586
 
   AC_MSG_ERROR([perl not found; required for intltool])
587
 
fi
588
 
if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
589
 
   AC_MSG_ERROR([perl 5.x required for intltool])
590
 
fi
591
 
if test "x$2" != "xno-xml"; then
592
 
   AC_MSG_CHECKING([for XML::Parser])
593
 
   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
594
 
       AC_MSG_RESULT([ok])
595
 
   else
596
 
       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
597
 
   fi
598
 
fi
599
 
 
600
 
# Substitute ALL_LINGUAS so we can use it in po/Makefile
601
 
AC_SUBST(ALL_LINGUAS)
602
 
 
603
 
# Set DATADIRNAME correctly if it is not set yet
604
 
# (copied from glib-gettext.m4)
605
 
if test -z "$DATADIRNAME"; then
606
 
  AC_LINK_IFELSE(
607
 
    [AC_LANG_PROGRAM([[]],
608
 
                     [[extern int _nl_msg_cat_cntr;
609
 
                       return _nl_msg_cat_cntr]])],
610
 
    [DATADIRNAME=share],
611
 
    [case $host in
612
 
    *-*-solaris*)
613
 
    dnl On Solaris, if bind_textdomain_codeset is in libc,
614
 
    dnl GNU format message catalog is always supported,
615
 
    dnl since both are added to the libc all together.
616
 
    dnl Hence, we'd like to go with DATADIRNAME=share
617
 
    dnl in this case.
618
 
    AC_CHECK_FUNC(bind_textdomain_codeset,
619
 
      [DATADIRNAME=share], [DATADIRNAME=lib])
620
 
    ;;
621
 
    *)
622
 
    [DATADIRNAME=lib]
623
 
    ;;
624
 
    esac])
625
 
fi
626
 
AC_SUBST(DATADIRNAME)
627
 
 
628
 
IT_PO_SUBDIR([po])
629
 
 
630
 
])
631
 
 
632
 
 
633
 
# IT_PO_SUBDIR(DIRNAME)
634
 
# ---------------------
635
 
# All po subdirs have to be declared with this macro; the subdir "po" is
636
 
# declared by IT_PROG_INTLTOOL.
637
 
#
638
 
AC_DEFUN([IT_PO_SUBDIR],
639
 
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
640
 
dnl
641
 
dnl The following CONFIG_COMMANDS should be exetuted at the very end
642
 
dnl of config.status.
643
 
AC_CONFIG_COMMANDS_PRE([
644
 
  AC_CONFIG_COMMANDS([$1/stamp-it], [
645
 
    if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" ]; then
646
 
       AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
647
 
    fi
648
 
    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
649
 
    >"$1/stamp-it.tmp"
650
 
    [sed '/^#/d
651
 
         s/^[[].*] *//
652
 
         /^[    ]*$/d
653
 
        '"s|^|  $ac_top_srcdir/|" \
654
 
      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
655
 
    ]
656
 
    [sed '/^POTFILES =/,/[^\\]$/ {
657
 
                /^POTFILES =/!d
658
 
                r $1/POTFILES
659
 
          }
660
 
         ' "$1/Makefile.in" >"$1/Makefile"]
661
 
    rm -f "$1/Makefile.tmp"
662
 
    mv "$1/stamp-it.tmp" "$1/stamp-it"
663
 
  ])
664
 
])dnl
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
 
 
673
22
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
674
23
 
675
24
# serial 52 AC_PROG_LIBTOOL
8390
7739
AC_SUBST([am__untar])
8391
7740
]) # _AM_PROG_TAR
8392
7741
 
 
7742
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
 
7743
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
 
7744
#
 
7745
# This file is free software, distributed under the terms of the GNU
 
7746
# General Public License.  As a special exception to the GNU General
 
7747
# Public License, this file may be distributed as part of a program
 
7748
# that contains a configuration script generated by Autoconf, under
 
7749
# the same distribution terms as the rest of that program.
 
7750
#
 
7751
# This file can be copied and used freely without restrictions.  It can
 
7752
# be used in projects which are not available under the GNU Public License
 
7753
# but which still want to provide support for the GNU gettext functionality.
 
7754
#
 
7755
# Macro to add for using GNU gettext.
 
7756
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
 
7757
#
 
7758
# Modified to never use included libintl. 
 
7759
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
 
7760
#
 
7761
# Major rework to remove unused code
 
7762
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
 
7763
#
 
7764
# Added better handling of ALL_LINGUAS from GNU gettext version 
 
7765
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
 
7766
#
 
7767
# Modified to require ngettext
 
7768
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
 
7769
#
 
7770
# We need this here as well, since someone might use autoconf-2.5x
 
7771
# to configure GLib then an older version to configure a package
 
7772
# using AM_GLIB_GNU_GETTEXT
 
7773
AC_PREREQ(2.53)
 
7774
 
 
7775
dnl
 
7776
dnl We go to great lengths to make sure that aclocal won't 
 
7777
dnl try to pull in the installed version of these macros
 
7778
dnl when running aclocal in the glib directory.
 
7779
dnl
 
7780
m4_copy([AC_DEFUN],[glib_DEFUN])
 
7781
m4_copy([AC_REQUIRE],[glib_REQUIRE])
 
7782
dnl
 
7783
dnl At the end, if we're not within glib, we'll define the public
 
7784
dnl definitions in terms of our private definitions.
 
7785
dnl
 
7786
 
 
7787
# GLIB_LC_MESSAGES
 
7788
#--------------------
 
7789
glib_DEFUN([GLIB_LC_MESSAGES],
 
7790
  [AC_CHECK_HEADERS([locale.h])
 
7791
    if test $ac_cv_header_locale_h = yes; then
 
7792
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
 
7793
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
 
7794
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
 
7795
    if test $am_cv_val_LC_MESSAGES = yes; then
 
7796
      AC_DEFINE(HAVE_LC_MESSAGES, 1,
 
7797
        [Define if your <locale.h> file defines LC_MESSAGES.])
 
7798
    fi
 
7799
  fi])
 
7800
 
 
7801
# GLIB_PATH_PROG_WITH_TEST
 
7802
#----------------------------
 
7803
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
 
7804
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
 
7805
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
 
7806
[# Extract the first word of "$2", so it can be a program name with args.
 
7807
set dummy $2; ac_word=[$]2
 
7808
AC_MSG_CHECKING([for $ac_word])
 
7809
AC_CACHE_VAL(ac_cv_path_$1,
 
7810
[case "[$]$1" in
 
7811
  /*)
 
7812
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
 
7813
  ;;
 
7814
  *)
 
7815
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
 
7816
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
 
7817
    test -z "$ac_dir" && ac_dir=.
 
7818
    if test -f $ac_dir/$ac_word; then
 
7819
      if [$3]; then
 
7820
        ac_cv_path_$1="$ac_dir/$ac_word"
 
7821
        break
 
7822
      fi
 
7823
    fi
 
7824
  done
 
7825
  IFS="$ac_save_ifs"
 
7826
dnl If no 4th arg is given, leave the cache variable unset,
 
7827
dnl so AC_PATH_PROGS will keep looking.
 
7828
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
 
7829
])dnl
 
7830
  ;;
 
7831
esac])dnl
 
7832
$1="$ac_cv_path_$1"
 
7833
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
 
7834
  AC_MSG_RESULT([$]$1)
 
7835
else
 
7836
  AC_MSG_RESULT(no)
 
7837
fi
 
7838
AC_SUBST($1)dnl
 
7839
])
 
7840
 
 
7841
# GLIB_WITH_NLS
 
7842
#-----------------
 
7843
glib_DEFUN([GLIB_WITH_NLS],
 
7844
  dnl NLS is obligatory
 
7845
  [USE_NLS=yes
 
7846
    AC_SUBST(USE_NLS)
 
7847
 
 
7848
    gt_cv_have_gettext=no
 
7849
 
 
7850
    CATOBJEXT=NONE
 
7851
    XGETTEXT=:
 
7852
    INTLLIBS=
 
7853
 
 
7854
    AC_CHECK_HEADER(libintl.h,
 
7855
     [gt_cv_func_dgettext_libintl="no"
 
7856
      libintl_extra_libs=""
 
7857
 
 
7858
      #
 
7859
      # First check in libc
 
7860
      #
 
7861
      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
 
7862
        [AC_TRY_LINK([
 
7863
#include <libintl.h>
 
7864
],
 
7865
         [return !ngettext ("","", 1)],
 
7866
          gt_cv_func_ngettext_libc=yes,
 
7867
          gt_cv_func_ngettext_libc=no)
 
7868
        ])
 
7869
  
 
7870
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
 
7871
              AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
 
7872
                [AC_TRY_LINK([
 
7873
#include <libintl.h>
 
7874
],
 
7875
                  [return !dgettext ("","")],
 
7876
                  gt_cv_func_dgettext_libc=yes,
 
7877
                  gt_cv_func_dgettext_libc=no)
 
7878
                ])
 
7879
      fi
 
7880
  
 
7881
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
 
7882
        AC_CHECK_FUNCS(bind_textdomain_codeset)
 
7883
      fi
 
7884
 
 
7885
      #
 
7886
      # If we don't have everything we want, check in libintl
 
7887
      #
 
7888
      if test "$gt_cv_func_dgettext_libc" != "yes" \
 
7889
         || test "$gt_cv_func_ngettext_libc" != "yes" \
 
7890
         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
 
7891
        
 
7892
        AC_CHECK_LIB(intl, bindtextdomain,
 
7893
            [AC_CHECK_LIB(intl, ngettext,
 
7894
                    [AC_CHECK_LIB(intl, dgettext,
 
7895
                                  gt_cv_func_dgettext_libintl=yes)])])
 
7896
 
 
7897
        if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
 
7898
          AC_MSG_CHECKING([if -liconv is needed to use gettext])
 
7899
          AC_MSG_RESULT([])
 
7900
          AC_CHECK_LIB(intl, ngettext,
 
7901
                [AC_CHECK_LIB(intl, dcgettext,
 
7902
                       [gt_cv_func_dgettext_libintl=yes
 
7903
                        libintl_extra_libs=-liconv],
 
7904
                        :,-liconv)],
 
7905
                :,-liconv)
 
7906
        fi
 
7907
 
 
7908
        #
 
7909
        # If we found libintl, then check in it for bind_textdomain_codeset();
 
7910
        # we'll prefer libc if neither have bind_textdomain_codeset(),
 
7911
        # and both have dgettext and ngettext
 
7912
        #
 
7913
        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
 
7914
          glib_save_LIBS="$LIBS"
 
7915
          LIBS="$LIBS -lintl $libintl_extra_libs"
 
7916
          unset ac_cv_func_bind_textdomain_codeset
 
7917
          AC_CHECK_FUNCS(bind_textdomain_codeset)
 
7918
          LIBS="$glib_save_LIBS"
 
7919
 
 
7920
          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
 
7921
            gt_cv_func_dgettext_libc=no
 
7922
          else
 
7923
            if test "$gt_cv_func_dgettext_libc" = "yes" \
 
7924
                && test "$gt_cv_func_ngettext_libc" = "yes"; then
 
7925
              gt_cv_func_dgettext_libintl=no
 
7926
            fi
 
7927
          fi
 
7928
        fi
 
7929
      fi
 
7930
 
 
7931
      if test "$gt_cv_func_dgettext_libc" = "yes" \
 
7932
        || test "$gt_cv_func_dgettext_libintl" = "yes"; then
 
7933
        gt_cv_have_gettext=yes
 
7934
      fi
 
7935
  
 
7936
      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
 
7937
        INTLLIBS="-lintl $libintl_extra_libs"
 
7938
      fi
 
7939
  
 
7940
      if test "$gt_cv_have_gettext" = "yes"; then
 
7941
        AC_DEFINE(HAVE_GETTEXT,1,
 
7942
          [Define if the GNU gettext() function is already present or preinstalled.])
 
7943
        GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
 
7944
          [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
 
7945
        if test "$MSGFMT" != "no"; then
 
7946
          glib_save_LIBS="$LIBS"
 
7947
          LIBS="$LIBS $INTLLIBS"
 
7948
          AC_CHECK_FUNCS(dcgettext)
 
7949
          MSGFMT_OPTS=
 
7950
          AC_MSG_CHECKING([if msgfmt accepts -c])
 
7951
          GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
 
7952
msgid ""
 
7953
msgstr ""
 
7954
"Content-Type: text/plain; charset=UTF-8\n"
 
7955
"Project-Id-Version: test 1.0\n"
 
7956
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
 
7957
"Last-Translator: test <foo@bar.xx>\n"
 
7958
"Language-Team: C <LL@li.org>\n"
 
7959
"MIME-Version: 1.0\n"
 
7960
"Content-Transfer-Encoding: 8bit\n"
 
7961
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
 
7962
          AC_SUBST(MSGFMT_OPTS)
 
7963
          AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
 
7964
          GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
 
7965
            [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
 
7966
          AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
 
7967
                         return _nl_msg_cat_cntr],
 
7968
            [CATOBJEXT=.gmo 
 
7969
             DATADIRNAME=share],
 
7970
            [case $host in
 
7971
            *-*-solaris*)
 
7972
            dnl On Solaris, if bind_textdomain_codeset is in libc,
 
7973
            dnl GNU format message catalog is always supported,
 
7974
            dnl since both are added to the libc all together.
 
7975
            dnl Hence, we'd like to go with DATADIRNAME=share and
 
7976
            dnl and CATOBJEXT=.gmo in this case.
 
7977
            AC_CHECK_FUNC(bind_textdomain_codeset,
 
7978
              [CATOBJEXT=.gmo 
 
7979
               DATADIRNAME=share],
 
7980
              [CATOBJEXT=.mo
 
7981
               DATADIRNAME=lib])
 
7982
            ;;
 
7983
            *)
 
7984
            CATOBJEXT=.mo
 
7985
            DATADIRNAME=lib
 
7986
            ;;
 
7987
            esac])
 
7988
          LIBS="$glib_save_LIBS"
 
7989
          INSTOBJEXT=.mo
 
7990
        else
 
7991
          gt_cv_have_gettext=no
 
7992
        fi
 
7993
      fi
 
7994
    ])
 
7995
 
 
7996
    if test "$gt_cv_have_gettext" = "yes" ; then
 
7997
      AC_DEFINE(ENABLE_NLS, 1,
 
7998
        [always defined to indicate that i18n is enabled])
 
7999
    fi
 
8000
 
 
8001
    dnl Test whether we really found GNU xgettext.
 
8002
    if test "$XGETTEXT" != ":"; then
 
8003
      dnl If it is not GNU xgettext we define it as : so that the
 
8004
      dnl Makefiles still can work.
 
8005
      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
 
8006
        : ;
 
8007
      else
 
8008
        AC_MSG_RESULT(
 
8009
          [found xgettext program is not GNU xgettext; ignore it])
 
8010
        XGETTEXT=":"
 
8011
      fi
 
8012
    fi
 
8013
 
 
8014
    # We need to process the po/ directory.
 
8015
    POSUB=po
 
8016
 
 
8017
    AC_OUTPUT_COMMANDS(
 
8018
      [case "$CONFIG_FILES" in *po/Makefile.in*)
 
8019
        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
 
8020
      esac])
 
8021
 
 
8022
    dnl These rules are solely for the distribution goal.  While doing this
 
8023
    dnl we only have to keep exactly one list of the available catalogs
 
8024
    dnl in configure.in.
 
8025
    for lang in $ALL_LINGUAS; do
 
8026
      GMOFILES="$GMOFILES $lang.gmo"
 
8027
      POFILES="$POFILES $lang.po"
 
8028
    done
 
8029
 
 
8030
    dnl Make all variables we use known to autoconf.
 
8031
    AC_SUBST(CATALOGS)
 
8032
    AC_SUBST(CATOBJEXT)
 
8033
    AC_SUBST(DATADIRNAME)
 
8034
    AC_SUBST(GMOFILES)
 
8035
    AC_SUBST(INSTOBJEXT)
 
8036
    AC_SUBST(INTLLIBS)
 
8037
    AC_SUBST(PO_IN_DATADIR_TRUE)
 
8038
    AC_SUBST(PO_IN_DATADIR_FALSE)
 
8039
    AC_SUBST(POFILES)
 
8040
    AC_SUBST(POSUB)
 
8041
  ])
 
8042
 
 
8043
# AM_GLIB_GNU_GETTEXT
 
8044
# -------------------
 
8045
# Do checks necessary for use of gettext. If a suitable implementation 
 
8046
# of gettext is found in either in libintl or in the C library,
 
8047
# it will set INTLLIBS to the libraries needed for use of gettext
 
8048
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
 
8049
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
 
8050
# on various variables needed by the Makefile.in.in installed by 
 
8051
# glib-gettextize.
 
8052
dnl
 
8053
glib_DEFUN([GLIB_GNU_GETTEXT],
 
8054
  [AC_REQUIRE([AC_PROG_CC])dnl
 
8055
   AC_REQUIRE([AC_HEADER_STDC])dnl
 
8056
   
 
8057
   GLIB_LC_MESSAGES
 
8058
   GLIB_WITH_NLS
 
8059
 
 
8060
   if test "$gt_cv_have_gettext" = "yes"; then
 
8061
     if test "x$ALL_LINGUAS" = "x"; then
 
8062
       LINGUAS=
 
8063
     else
 
8064
       AC_MSG_CHECKING(for catalogs to be installed)
 
8065
       NEW_LINGUAS=
 
8066
       for presentlang in $ALL_LINGUAS; do
 
8067
         useit=no
 
8068
         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
 
8069
           desiredlanguages="$LINGUAS"
 
8070
         else
 
8071
           desiredlanguages="$ALL_LINGUAS"
 
8072
         fi
 
8073
         for desiredlang in $desiredlanguages; do
 
8074
           # Use the presentlang catalog if desiredlang is
 
8075
           #   a. equal to presentlang, or
 
8076
           #   b. a variant of presentlang (because in this case,
 
8077
           #      presentlang can be used as a fallback for messages
 
8078
           #      which are not translated in the desiredlang catalog).
 
8079
           case "$desiredlang" in
 
8080
             "$presentlang"*) useit=yes;;
 
8081
           esac
 
8082
         done
 
8083
         if test $useit = yes; then
 
8084
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
 
8085
         fi
 
8086
       done
 
8087
       LINGUAS=$NEW_LINGUAS
 
8088
       AC_MSG_RESULT($LINGUAS)
 
8089
     fi
 
8090
 
 
8091
     dnl Construct list of names of catalog files to be constructed.
 
8092
     if test -n "$LINGUAS"; then
 
8093
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
 
8094
     fi
 
8095
   fi
 
8096
 
 
8097
   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
 
8098
   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
 
8099
   dnl Try to locate is.
 
8100
   MKINSTALLDIRS=
 
8101
   if test -n "$ac_aux_dir"; then
 
8102
     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
 
8103
   fi
 
8104
   if test -z "$MKINSTALLDIRS"; then
 
8105
     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
 
8106
   fi
 
8107
   AC_SUBST(MKINSTALLDIRS)
 
8108
 
 
8109
   dnl Generate list of files to be processed by xgettext which will
 
8110
   dnl be included in po/Makefile.
 
8111
   test -d po || mkdir po
 
8112
   if test "x$srcdir" != "x."; then
 
8113
     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
 
8114
       posrcprefix="$srcdir/"
 
8115
     else
 
8116
       posrcprefix="../$srcdir/"
 
8117
     fi
 
8118
   else
 
8119
     posrcprefix="../"
 
8120
   fi
 
8121
   rm -f po/POTFILES
 
8122
   sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
 
8123
        < $srcdir/po/POTFILES.in > po/POTFILES
 
8124
  ])
 
8125
 
 
8126
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
 
8127
# -------------------------------
 
8128
# Define VARIABLE to the location where catalog files will
 
8129
# be installed by po/Makefile.
 
8130
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
 
8131
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
 
8132
glib_save_prefix="$prefix"
 
8133
glib_save_exec_prefix="$exec_prefix"
 
8134
glib_save_datarootdir="$datarootdir"
 
8135
test "x$prefix" = xNONE && prefix=$ac_default_prefix
 
8136
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
 
8137
datarootdir=`eval echo "${datarootdir}"`
 
8138
if test "x$CATOBJEXT" = "x.mo" ; then
 
8139
  localedir=`eval echo "${libdir}/locale"`
 
8140
else
 
8141
  localedir=`eval echo "${datadir}/locale"`
 
8142
fi
 
8143
prefix="$glib_save_prefix"
 
8144
exec_prefix="$glib_save_exec_prefix"
 
8145
datarootdir="$glib_save_datarootdir"
 
8146
AC_DEFINE_UNQUOTED($1, "$localedir",
 
8147
  [Define the location where the catalogs will be installed])
 
8148
])
 
8149
 
 
8150
dnl
 
8151
dnl Now the definitions that aclocal will find
 
8152
dnl
 
8153
ifdef(glib_configure_in,[],[
 
8154
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
 
8155
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
 
8156
])dnl
 
8157
 
 
8158
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
 
8159
 
8160
# Create a temporary file with TEST-FILE as its contents and pass the
 
8161
# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
 
8162
# 0 and perform ACTION-IF-FAIL for any other exit status.
 
8163
AC_DEFUN([GLIB_RUN_PROG],
 
8164
[cat >conftest.foo <<_ACEOF
 
8165
$2
 
8166
_ACEOF
 
8167
if AC_RUN_LOG([$1 conftest.foo]); then
 
8168
  m4_ifval([$3], [$3], [:])
 
8169
m4_ifvaln([$4], [else $4])dnl
 
8170
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
 
8171
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
 
8172
fi])
 
8173
 
 
8174
 
 
8175
dnl -*- mode: autoconf -*-
 
8176
 
 
8177
# serial 1
 
8178
 
 
8179
dnl Usage:
 
8180
dnl   GTK_DOC_CHECK([minimum-gtk-doc-version])
 
8181
AC_DEFUN([GTK_DOC_CHECK],
 
8182
[
 
8183
  AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
 
8184
  AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
 
8185
 
 
8186
  dnl for overriding the documentation installation directory
 
8187
  AC_ARG_WITH([html-dir],
 
8188
    AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
 
8189
    [with_html_dir='${datadir}/gtk-doc/html'])
 
8190
  HTML_DIR="$with_html_dir"
 
8191
  AC_SUBST([HTML_DIR])
 
8192
 
 
8193
  dnl enable/disable documentation building
 
8194
  AC_ARG_ENABLE([gtk-doc],
 
8195
    AS_HELP_STRING([--enable-gtk-doc],
 
8196
                   [use gtk-doc to build documentation [[default=no]]]),,
 
8197
    [enable_gtk_doc=no])
 
8198
 
 
8199
  if test x$enable_gtk_doc = xyes; then
 
8200
    ifelse([$1],[],
 
8201
      [PKG_CHECK_EXISTS([gtk-doc],,
 
8202
                        AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))],
 
8203
      [PKG_CHECK_EXISTS([gtk-doc >= $1],,
 
8204
                        AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build $PACKAGE_NAME]))])
 
8205
  fi
 
8206
 
 
8207
  AC_MSG_CHECKING([whether to build gtk-doc documentation])
 
8208
  AC_MSG_RESULT($enable_gtk_doc)
 
8209
 
 
8210
  dnl check for tools we added during development
 
8211
  AC_PATH_PROG([GTKDOC_CHECK],[gtkdoc-check])
 
8212
  AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true])
 
8213
 
 
8214
  AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
 
8215
  AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
 
8216
  AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"])
 
8217
])
 
8218
 
 
8219
 
 
8220
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
 
8221
# serial 40 IT_PROG_INTLTOOL
 
8222
AC_DEFUN([IT_PROG_INTLTOOL], [
 
8223
AC_PREREQ([2.50])dnl
 
8224
AC_REQUIRE([AM_NLS])dnl
 
8225
 
 
8226
case "$am__api_version" in
 
8227
    1.[01234])
 
8228
        AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
 
8229
    ;;
 
8230
    *)
 
8231
    ;;
 
8232
esac
 
8233
 
 
8234
if test -n "$1"; then
 
8235
    AC_MSG_CHECKING([for intltool >= $1])
 
8236
 
 
8237
    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
 
8238
    INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
 
8239
    [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
 
8240
    ]
 
8241
    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
 
8242
    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
 
8243
        AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
 
8244
fi
 
8245
 
 
8246
AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
 
8247
AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
 
8248
AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
 
8249
if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
 
8250
    AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
 
8251
fi
 
8252
 
 
8253
  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
8254
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
8255
     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
8256
     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
8257
      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
 
8258
     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
8259
   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
8260
    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
8261
INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
8262
       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
8263
      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
8264
      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' 
 
8265
      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
8266
      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
8267
    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
8268
  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
8269
    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
8270
    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
 
8271
   INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
 
8272
 
 
8273
AC_SUBST(INTLTOOL_DESKTOP_RULE)
 
8274
AC_SUBST(INTLTOOL_DIRECTORY_RULE)
 
8275
AC_SUBST(INTLTOOL_KEYS_RULE)
 
8276
AC_SUBST(INTLTOOL_PROP_RULE)
 
8277
AC_SUBST(INTLTOOL_OAF_RULE)
 
8278
AC_SUBST(INTLTOOL_PONG_RULE)
 
8279
AC_SUBST(INTLTOOL_SERVER_RULE)
 
8280
AC_SUBST(INTLTOOL_SHEET_RULE)
 
8281
AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
 
8282
AC_SUBST(INTLTOOL_UI_RULE)
 
8283
AC_SUBST(INTLTOOL_XAM_RULE)
 
8284
AC_SUBST(INTLTOOL_KBD_RULE)
 
8285
AC_SUBST(INTLTOOL_XML_RULE)
 
8286
AC_SUBST(INTLTOOL_XML_NOMERGE_RULE)
 
8287
AC_SUBST(INTLTOOL_CAVES_RULE)
 
8288
AC_SUBST(INTLTOOL_SCHEMAS_RULE)
 
8289
AC_SUBST(INTLTOOL_THEME_RULE)
 
8290
AC_SUBST(INTLTOOL_SERVICE_RULE)
 
8291
AC_SUBST(INTLTOOL_POLICY_RULE)
 
8292
 
 
8293
# Check the gettext tools to make sure they are GNU
 
8294
AC_PATH_PROG(XGETTEXT, xgettext)
 
8295
AC_PATH_PROG(MSGMERGE, msgmerge)
 
8296
AC_PATH_PROG(MSGFMT, msgfmt)
 
8297
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
 
8298
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
 
8299
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
 
8300
fi
 
8301
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
 
8302
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
 
8303
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
 
8304
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
 
8305
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
 
8306
fi
 
8307
 
 
8308
AC_PATH_PROG(INTLTOOL_PERL, [perl])
 
8309
if test -z "$INTLTOOL_PERL"; then
 
8310
   AC_MSG_ERROR([perl not found; required for intltool])
 
8311
fi
 
8312
if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
 
8313
   AC_MSG_ERROR([perl 5.x required for intltool])
 
8314
fi
 
8315
if test "x$2" != "xno-xml"; then
 
8316
   AC_MSG_CHECKING([for XML::Parser])
 
8317
   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
 
8318
       AC_MSG_RESULT([ok])
 
8319
   else
 
8320
       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
 
8321
   fi
 
8322
fi
 
8323
 
 
8324
# Substitute ALL_LINGUAS so we can use it in po/Makefile
 
8325
AC_SUBST(ALL_LINGUAS)
 
8326
 
 
8327
# Set DATADIRNAME correctly if it is not set yet
 
8328
# (copied from glib-gettext.m4)
 
8329
if test -z "$DATADIRNAME"; then
 
8330
  AC_LINK_IFELSE(
 
8331
    [AC_LANG_PROGRAM([[]],
 
8332
                     [[extern int _nl_msg_cat_cntr;
 
8333
                       return _nl_msg_cat_cntr]])],
 
8334
    [DATADIRNAME=share],
 
8335
    [case $host in
 
8336
    *-*-solaris*)
 
8337
    dnl On Solaris, if bind_textdomain_codeset is in libc,
 
8338
    dnl GNU format message catalog is always supported,
 
8339
    dnl since both are added to the libc all together.
 
8340
    dnl Hence, we'd like to go with DATADIRNAME=share
 
8341
    dnl in this case.
 
8342
    AC_CHECK_FUNC(bind_textdomain_codeset,
 
8343
      [DATADIRNAME=share], [DATADIRNAME=lib])
 
8344
    ;;
 
8345
    *)
 
8346
    [DATADIRNAME=lib]
 
8347
    ;;
 
8348
    esac])
 
8349
fi
 
8350
AC_SUBST(DATADIRNAME)
 
8351
 
 
8352
IT_PO_SUBDIR([po])
 
8353
 
 
8354
])
 
8355
 
 
8356
 
 
8357
# IT_PO_SUBDIR(DIRNAME)
 
8358
# ---------------------
 
8359
# All po subdirs have to be declared with this macro; the subdir "po" is
 
8360
# declared by IT_PROG_INTLTOOL.
 
8361
#
 
8362
AC_DEFUN([IT_PO_SUBDIR],
 
8363
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
 
8364
dnl
 
8365
dnl The following CONFIG_COMMANDS should be exetuted at the very end
 
8366
dnl of config.status.
 
8367
AC_CONFIG_COMMANDS_PRE([
 
8368
  AC_CONFIG_COMMANDS([$1/stamp-it], [
 
8369
    if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" ]; then
 
8370
       AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
 
8371
    fi
 
8372
    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
 
8373
    >"$1/stamp-it.tmp"
 
8374
    [sed '/^#/d
 
8375
         s/^[[].*] *//
 
8376
         /^[    ]*$/d
 
8377
        '"s|^|  $ac_top_srcdir/|" \
 
8378
      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
 
8379
    ]
 
8380
    [sed '/^POTFILES =/,/[^\\]$/ {
 
8381
                /^POTFILES =/!d
 
8382
                r $1/POTFILES
 
8383
          }
 
8384
         ' "$1/Makefile.in" >"$1/Makefile"]
 
8385
    rm -f "$1/Makefile.tmp"
 
8386
    mv "$1/stamp-it.tmp" "$1/stamp-it"
 
8387
  ])
 
8388
])dnl
 
8389
])
 
8390
 
 
8391
# deprecated macros
 
8392
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
 
8393
# A hint is needed for aclocal from Automake <= 1.9.4:
 
8394
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
 
8395
 
 
8396