~ubuntu-branches/ubuntu/oneiric/gnome-themes/oneiric

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Brian Curtis
  • Date: 2010-09-28 18:52:41 UTC
  • mfrom: (1.2.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20100928185241-3se9uy3umzbmx7mi
Tags: 2.32.0-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# generated automatically by aclocal 1.10 -*- Autoconf -*-
 
1
# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
2
2
 
3
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4
 
# 2005, 2006  Free Software Foundation, Inc.
 
4
# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
5
5
# This file is free software; the Free Software Foundation
6
6
# gives unlimited permission to copy and/or distribute it,
7
7
# with or without modifications, as long as this notice is preserved.
11
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12
12
# PARTICULAR PURPOSE.
13
13
 
14
 
m4_if(m4_PACKAGE_VERSION, [2.63],,
15
 
[m4_fatal([this file was generated for autoconf 2.63.
16
 
You have another version of autoconf.  If you want to use that,
17
 
you should regenerate the build system entirely.], [63])])
18
 
 
19
 
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
20
 
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
21
 
#
22
 
# This file is free software, distributed under the terms of the GNU
23
 
# General Public License.  As a special exception to the GNU General
24
 
# Public License, this file may be distributed as part of a program
25
 
# that contains a configuration script generated by Autoconf, under
26
 
# the same distribution terms as the rest of that program.
27
 
#
28
 
# This file can be copied and used freely without restrictions.  It can
29
 
# be used in projects which are not available under the GNU Public License
30
 
# but which still want to provide support for the GNU gettext functionality.
31
 
#
32
 
# Macro to add for using GNU gettext.
33
 
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
34
 
#
35
 
# Modified to never use included libintl. 
36
 
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
37
 
#
38
 
# Major rework to remove unused code
39
 
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
40
 
#
41
 
# Added better handling of ALL_LINGUAS from GNU gettext version 
42
 
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
43
 
#
44
 
# Modified to require ngettext
45
 
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
46
 
#
47
 
# We need this here as well, since someone might use autoconf-2.5x
48
 
# to configure GLib then an older version to configure a package
49
 
# using AM_GLIB_GNU_GETTEXT
50
 
AC_PREREQ(2.53)
51
 
 
52
 
dnl
53
 
dnl We go to great lengths to make sure that aclocal won't 
54
 
dnl try to pull in the installed version of these macros
55
 
dnl when running aclocal in the glib directory.
56
 
dnl
57
 
m4_copy([AC_DEFUN],[glib_DEFUN])
58
 
m4_copy([AC_REQUIRE],[glib_REQUIRE])
59
 
dnl
60
 
dnl At the end, if we're not within glib, we'll define the public
61
 
dnl definitions in terms of our private definitions.
62
 
dnl
63
 
 
64
 
# GLIB_LC_MESSAGES
65
 
#--------------------
66
 
glib_DEFUN([GLIB_LC_MESSAGES],
67
 
  [AC_CHECK_HEADERS([locale.h])
68
 
    if test $ac_cv_header_locale_h = yes; then
69
 
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
70
 
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
71
 
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
72
 
    if test $am_cv_val_LC_MESSAGES = yes; then
73
 
      AC_DEFINE(HAVE_LC_MESSAGES, 1,
74
 
        [Define if your <locale.h> file defines LC_MESSAGES.])
75
 
    fi
76
 
  fi])
77
 
 
78
 
# GLIB_PATH_PROG_WITH_TEST
79
 
#----------------------------
80
 
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
81
 
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
82
 
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
83
 
[# Extract the first word of "$2", so it can be a program name with args.
84
 
set dummy $2; ac_word=[$]2
85
 
AC_MSG_CHECKING([for $ac_word])
86
 
AC_CACHE_VAL(ac_cv_path_$1,
87
 
[case "[$]$1" in
88
 
  /*)
89
 
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
90
 
  ;;
91
 
  *)
92
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
93
 
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
94
 
    test -z "$ac_dir" && ac_dir=.
95
 
    if test -f $ac_dir/$ac_word; then
96
 
      if [$3]; then
97
 
        ac_cv_path_$1="$ac_dir/$ac_word"
98
 
        break
99
 
      fi
100
 
    fi
101
 
  done
102
 
  IFS="$ac_save_ifs"
103
 
dnl If no 4th arg is given, leave the cache variable unset,
104
 
dnl so AC_PATH_PROGS will keep looking.
105
 
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
106
 
])dnl
107
 
  ;;
108
 
esac])dnl
109
 
$1="$ac_cv_path_$1"
110
 
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
111
 
  AC_MSG_RESULT([$]$1)
112
 
else
113
 
  AC_MSG_RESULT(no)
114
 
fi
115
 
AC_SUBST($1)dnl
116
 
])
117
 
 
118
 
# GLIB_WITH_NLS
119
 
#-----------------
120
 
glib_DEFUN([GLIB_WITH_NLS],
121
 
  dnl NLS is obligatory
122
 
  [AC_REQUIRE([AC_CANONICAL_HOST])dnl
123
 
    USE_NLS=yes
124
 
    AC_SUBST(USE_NLS)
125
 
 
126
 
    gt_cv_have_gettext=no
127
 
 
128
 
    CATOBJEXT=NONE
129
 
    XGETTEXT=:
130
 
    INTLLIBS=
131
 
 
132
 
    AC_CHECK_HEADER(libintl.h,
133
 
     [gt_cv_func_dgettext_libintl="no"
134
 
      libintl_extra_libs=""
135
 
 
136
 
      #
137
 
      # First check in libc
138
 
      #
139
 
      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
140
 
        [AC_TRY_LINK([
141
 
#include <libintl.h>
142
 
],
143
 
         [return !ngettext ("","", 1)],
144
 
          gt_cv_func_ngettext_libc=yes,
145
 
          gt_cv_func_ngettext_libc=no)
146
 
        ])
147
 
  
148
 
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
149
 
              AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
150
 
                [AC_TRY_LINK([
151
 
#include <libintl.h>
152
 
],
153
 
                  [return !dgettext ("","")],
154
 
                  gt_cv_func_dgettext_libc=yes,
155
 
                  gt_cv_func_dgettext_libc=no)
156
 
                ])
157
 
      fi
158
 
  
159
 
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
160
 
        AC_CHECK_FUNCS(bind_textdomain_codeset)
161
 
      fi
162
 
 
163
 
      #
164
 
      # If we don't have everything we want, check in libintl
165
 
      #
166
 
      if test "$gt_cv_func_dgettext_libc" != "yes" \
167
 
         || test "$gt_cv_func_ngettext_libc" != "yes" \
168
 
         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
169
 
        
170
 
        AC_CHECK_LIB(intl, bindtextdomain,
171
 
            [AC_CHECK_LIB(intl, ngettext,
172
 
                    [AC_CHECK_LIB(intl, dgettext,
173
 
                                  gt_cv_func_dgettext_libintl=yes)])])
174
 
 
175
 
        if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
176
 
          AC_MSG_CHECKING([if -liconv is needed to use gettext])
177
 
          AC_MSG_RESULT([])
178
 
          AC_CHECK_LIB(intl, ngettext,
179
 
                [AC_CHECK_LIB(intl, dcgettext,
180
 
                       [gt_cv_func_dgettext_libintl=yes
181
 
                        libintl_extra_libs=-liconv],
182
 
                        :,-liconv)],
183
 
                :,-liconv)
184
 
        fi
185
 
 
186
 
        #
187
 
        # If we found libintl, then check in it for bind_textdomain_codeset();
188
 
        # we'll prefer libc if neither have bind_textdomain_codeset(),
189
 
        # and both have dgettext and ngettext
190
 
        #
191
 
        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
192
 
          glib_save_LIBS="$LIBS"
193
 
          LIBS="$LIBS -lintl $libintl_extra_libs"
194
 
          unset ac_cv_func_bind_textdomain_codeset
195
 
          AC_CHECK_FUNCS(bind_textdomain_codeset)
196
 
          LIBS="$glib_save_LIBS"
197
 
 
198
 
          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
199
 
            gt_cv_func_dgettext_libc=no
200
 
          else
201
 
            if test "$gt_cv_func_dgettext_libc" = "yes" \
202
 
                && test "$gt_cv_func_ngettext_libc" = "yes"; then
203
 
              gt_cv_func_dgettext_libintl=no
204
 
            fi
205
 
          fi
206
 
        fi
207
 
      fi
208
 
 
209
 
      if test "$gt_cv_func_dgettext_libc" = "yes" \
210
 
        || test "$gt_cv_func_dgettext_libintl" = "yes"; then
211
 
        gt_cv_have_gettext=yes
212
 
      fi
213
 
  
214
 
      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
215
 
        INTLLIBS="-lintl $libintl_extra_libs"
216
 
      fi
217
 
  
218
 
      if test "$gt_cv_have_gettext" = "yes"; then
219
 
        AC_DEFINE(HAVE_GETTEXT,1,
220
 
          [Define if the GNU gettext() function is already present or preinstalled.])
221
 
        GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
222
 
          [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
223
 
        if test "$MSGFMT" != "no"; then
224
 
          glib_save_LIBS="$LIBS"
225
 
          LIBS="$LIBS $INTLLIBS"
226
 
          AC_CHECK_FUNCS(dcgettext)
227
 
          MSGFMT_OPTS=
228
 
          AC_MSG_CHECKING([if msgfmt accepts -c])
229
 
          GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
230
 
msgid ""
231
 
msgstr ""
232
 
"Content-Type: text/plain; charset=UTF-8\n"
233
 
"Project-Id-Version: test 1.0\n"
234
 
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
235
 
"Last-Translator: test <foo@bar.xx>\n"
236
 
"Language-Team: C <LL@li.org>\n"
237
 
"MIME-Version: 1.0\n"
238
 
"Content-Transfer-Encoding: 8bit\n"
239
 
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
240
 
          AC_SUBST(MSGFMT_OPTS)
241
 
          AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
242
 
          GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
243
 
            [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
244
 
          AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
245
 
                         return _nl_msg_cat_cntr],
246
 
            [CATOBJEXT=.gmo 
247
 
             DATADIRNAME=share],
248
 
            [case $host in
249
 
            *-*-solaris*)
250
 
            dnl On Solaris, if bind_textdomain_codeset is in libc,
251
 
            dnl GNU format message catalog is always supported,
252
 
            dnl since both are added to the libc all together.
253
 
            dnl Hence, we'd like to go with DATADIRNAME=share and
254
 
            dnl and CATOBJEXT=.gmo in this case.
255
 
            AC_CHECK_FUNC(bind_textdomain_codeset,
256
 
              [CATOBJEXT=.gmo 
257
 
               DATADIRNAME=share],
258
 
              [CATOBJEXT=.mo
259
 
               DATADIRNAME=lib])
260
 
            ;;
261
 
            *)
262
 
            CATOBJEXT=.mo
263
 
            DATADIRNAME=lib
264
 
            ;;
265
 
            esac])
266
 
          LIBS="$glib_save_LIBS"
267
 
          INSTOBJEXT=.mo
268
 
        else
269
 
          gt_cv_have_gettext=no
270
 
        fi
271
 
      fi
272
 
    ])
273
 
 
274
 
    if test "$gt_cv_have_gettext" = "yes" ; then
275
 
      AC_DEFINE(ENABLE_NLS, 1,
276
 
        [always defined to indicate that i18n is enabled])
277
 
    fi
278
 
 
279
 
    dnl Test whether we really found GNU xgettext.
280
 
    if test "$XGETTEXT" != ":"; then
281
 
      dnl If it is not GNU xgettext we define it as : so that the
282
 
      dnl Makefiles still can work.
283
 
      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
284
 
        : ;
285
 
      else
286
 
        AC_MSG_RESULT(
287
 
          [found xgettext program is not GNU xgettext; ignore it])
288
 
        XGETTEXT=":"
289
 
      fi
290
 
    fi
291
 
 
292
 
    # We need to process the po/ directory.
293
 
    POSUB=po
294
 
 
295
 
    AC_OUTPUT_COMMANDS(
296
 
      [case "$CONFIG_FILES" in *po/Makefile.in*)
297
 
        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
298
 
      esac])
299
 
 
300
 
    dnl These rules are solely for the distribution goal.  While doing this
301
 
    dnl we only have to keep exactly one list of the available catalogs
302
 
    dnl in configure.in.
303
 
    for lang in $ALL_LINGUAS; do
304
 
      GMOFILES="$GMOFILES $lang.gmo"
305
 
      POFILES="$POFILES $lang.po"
306
 
    done
307
 
 
308
 
    dnl Make all variables we use known to autoconf.
309
 
    AC_SUBST(CATALOGS)
310
 
    AC_SUBST(CATOBJEXT)
311
 
    AC_SUBST(DATADIRNAME)
312
 
    AC_SUBST(GMOFILES)
313
 
    AC_SUBST(INSTOBJEXT)
314
 
    AC_SUBST(INTLLIBS)
315
 
    AC_SUBST(PO_IN_DATADIR_TRUE)
316
 
    AC_SUBST(PO_IN_DATADIR_FALSE)
317
 
    AC_SUBST(POFILES)
318
 
    AC_SUBST(POSUB)
319
 
  ])
320
 
 
321
 
# AM_GLIB_GNU_GETTEXT
322
 
# -------------------
323
 
# Do checks necessary for use of gettext. If a suitable implementation 
324
 
# of gettext is found in either in libintl or in the C library,
325
 
# it will set INTLLIBS to the libraries needed for use of gettext
326
 
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
327
 
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
328
 
# on various variables needed by the Makefile.in.in installed by 
329
 
# glib-gettextize.
330
 
dnl
331
 
glib_DEFUN([GLIB_GNU_GETTEXT],
332
 
  [AC_REQUIRE([AC_PROG_CC])dnl
333
 
   AC_REQUIRE([AC_HEADER_STDC])dnl
334
 
   
335
 
   GLIB_LC_MESSAGES
336
 
   GLIB_WITH_NLS
337
 
 
338
 
   if test "$gt_cv_have_gettext" = "yes"; then
339
 
     if test "x$ALL_LINGUAS" = "x"; then
340
 
       LINGUAS=
341
 
     else
342
 
       AC_MSG_CHECKING(for catalogs to be installed)
343
 
       NEW_LINGUAS=
344
 
       for presentlang in $ALL_LINGUAS; do
345
 
         useit=no
346
 
         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
347
 
           desiredlanguages="$LINGUAS"
348
 
         else
349
 
           desiredlanguages="$ALL_LINGUAS"
350
 
         fi
351
 
         for desiredlang in $desiredlanguages; do
352
 
           # Use the presentlang catalog if desiredlang is
353
 
           #   a. equal to presentlang, or
354
 
           #   b. a variant of presentlang (because in this case,
355
 
           #      presentlang can be used as a fallback for messages
356
 
           #      which are not translated in the desiredlang catalog).
357
 
           case "$desiredlang" in
358
 
             "$presentlang"*) useit=yes;;
359
 
           esac
360
 
         done
361
 
         if test $useit = yes; then
362
 
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
363
 
         fi
364
 
       done
365
 
       LINGUAS=$NEW_LINGUAS
366
 
       AC_MSG_RESULT($LINGUAS)
367
 
     fi
368
 
 
369
 
     dnl Construct list of names of catalog files to be constructed.
370
 
     if test -n "$LINGUAS"; then
371
 
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
372
 
     fi
373
 
   fi
374
 
 
375
 
   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
376
 
   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
377
 
   dnl Try to locate is.
378
 
   MKINSTALLDIRS=
379
 
   if test -n "$ac_aux_dir"; then
380
 
     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
381
 
   fi
382
 
   if test -z "$MKINSTALLDIRS"; then
383
 
     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
384
 
   fi
385
 
   AC_SUBST(MKINSTALLDIRS)
386
 
 
387
 
   dnl Generate list of files to be processed by xgettext which will
388
 
   dnl be included in po/Makefile.
389
 
   test -d po || mkdir po
390
 
   if test "x$srcdir" != "x."; then
391
 
     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
392
 
       posrcprefix="$srcdir/"
393
 
     else
394
 
       posrcprefix="../$srcdir/"
395
 
     fi
396
 
   else
397
 
     posrcprefix="../"
398
 
   fi
399
 
   rm -f po/POTFILES
400
 
   sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
401
 
        < $srcdir/po/POTFILES.in > po/POTFILES
402
 
  ])
403
 
 
404
 
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
405
 
# -------------------------------
406
 
# Define VARIABLE to the location where catalog files will
407
 
# be installed by po/Makefile.
408
 
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
409
 
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
410
 
glib_save_prefix="$prefix"
411
 
glib_save_exec_prefix="$exec_prefix"
412
 
glib_save_datarootdir="$datarootdir"
413
 
test "x$prefix" = xNONE && prefix=$ac_default_prefix
414
 
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
415
 
datarootdir=`eval echo "${datarootdir}"`
416
 
if test "x$CATOBJEXT" = "x.mo" ; then
417
 
  localedir=`eval echo "${libdir}/locale"`
418
 
else
419
 
  localedir=`eval echo "${datadir}/locale"`
420
 
fi
421
 
prefix="$glib_save_prefix"
422
 
exec_prefix="$glib_save_exec_prefix"
423
 
datarootdir="$glib_save_datarootdir"
424
 
AC_DEFINE_UNQUOTED($1, "$localedir",
425
 
  [Define the location where the catalogs will be installed])
426
 
])
427
 
 
428
 
dnl
429
 
dnl Now the definitions that aclocal will find
430
 
dnl
431
 
ifdef(glib_configure_in,[],[
432
 
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
433
 
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
434
 
])dnl
435
 
 
436
 
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
437
 
438
 
# Create a temporary file with TEST-FILE as its contents and pass the
439
 
# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
440
 
# 0 and perform ACTION-IF-FAIL for any other exit status.
441
 
AC_DEFUN([GLIB_RUN_PROG],
442
 
[cat >conftest.foo <<_ACEOF
443
 
$2
444
 
_ACEOF
445
 
if AC_RUN_LOG([$1 conftest.foo]); then
446
 
  m4_ifval([$3], [$3], [:])
447
 
m4_ifvaln([$4], [else $4])dnl
448
 
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
449
 
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
450
 
fi])
451
 
 
452
 
 
453
 
 
454
 
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
455
 
# serial 40 IT_PROG_INTLTOOL
456
 
AC_DEFUN([IT_PROG_INTLTOOL], [
457
 
AC_PREREQ([2.50])dnl
458
 
AC_REQUIRE([AM_NLS])dnl
459
 
 
460
 
case "$am__api_version" in
461
 
    1.[01234])
462
 
        AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
463
 
    ;;
464
 
    *)
465
 
    ;;
466
 
esac
467
 
 
468
 
if test -n "$1"; then
469
 
    AC_MSG_CHECKING([for intltool >= $1])
470
 
 
471
 
    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
472
 
    INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
473
 
    [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
474
 
    ]
475
 
    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
476
 
    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
477
 
        AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
478
 
fi
479
 
 
480
 
AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
481
 
AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
482
 
AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
483
 
if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
484
 
    AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
485
 
fi
486
 
 
487
 
  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 $< [$]@' 
488
 
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 $< [$]@' 
489
 
     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 $< [$]@' 
490
 
     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 $< [$]@' 
491
 
      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
492
 
     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 $< [$]@' 
493
 
   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 $< [$]@' 
494
 
    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 $< [$]@' 
495
 
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 $< [$]@' 
496
 
       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 $< [$]@' 
497
 
      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 $< [$]@' 
498
 
      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' 
499
 
      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 $< [$]@' 
500
 
      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 $< [$]@' 
501
 
    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 $< [$]@' 
502
 
  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 $< [$]@' 
503
 
    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 $< [$]@' 
504
 
    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 $< [$]@'
505
 
   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 $< [$]@'
506
 
 
507
 
_IT_SUBST(INTLTOOL_DESKTOP_RULE)
508
 
_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
509
 
_IT_SUBST(INTLTOOL_KEYS_RULE)
510
 
_IT_SUBST(INTLTOOL_PROP_RULE)
511
 
_IT_SUBST(INTLTOOL_OAF_RULE)
512
 
_IT_SUBST(INTLTOOL_PONG_RULE)
513
 
_IT_SUBST(INTLTOOL_SERVER_RULE)
514
 
_IT_SUBST(INTLTOOL_SHEET_RULE)
515
 
_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
516
 
_IT_SUBST(INTLTOOL_UI_RULE)
517
 
_IT_SUBST(INTLTOOL_XAM_RULE)
518
 
_IT_SUBST(INTLTOOL_KBD_RULE)
519
 
_IT_SUBST(INTLTOOL_XML_RULE)
520
 
_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
521
 
_IT_SUBST(INTLTOOL_CAVES_RULE)
522
 
_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
523
 
_IT_SUBST(INTLTOOL_THEME_RULE)
524
 
_IT_SUBST(INTLTOOL_SERVICE_RULE)
525
 
_IT_SUBST(INTLTOOL_POLICY_RULE)
526
 
 
527
 
# Check the gettext tools to make sure they are GNU
528
 
AC_PATH_PROG(XGETTEXT, xgettext)
529
 
AC_PATH_PROG(MSGMERGE, msgmerge)
530
 
AC_PATH_PROG(MSGFMT, msgfmt)
531
 
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
532
 
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
533
 
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
534
 
fi
535
 
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
536
 
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
537
 
if test -z "$xgversion" -o -z "$mmversion"; then
538
 
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
539
 
fi
540
 
 
541
 
AC_PATH_PROG(INTLTOOL_PERL, perl)
542
 
if test -z "$INTLTOOL_PERL"; then
543
 
   AC_MSG_ERROR([perl not found])
544
 
fi
545
 
AC_MSG_CHECKING([for perl >= 5.8.1])
546
 
$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
547
 
if test $? -ne 0; then
548
 
   AC_MSG_ERROR([perl 5.8.1 is required for intltool])
549
 
else
550
 
   IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
551
 
   AC_MSG_RESULT([$IT_PERL_VERSION])
552
 
fi
553
 
if test "x$2" != "xno-xml"; then
554
 
   AC_MSG_CHECKING([for XML::Parser])
555
 
   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
556
 
       AC_MSG_RESULT([ok])
557
 
   else
558
 
       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
559
 
   fi
560
 
fi
561
 
 
562
 
# Substitute ALL_LINGUAS so we can use it in po/Makefile
563
 
AC_SUBST(ALL_LINGUAS)
564
 
 
565
 
# Set DATADIRNAME correctly if it is not set yet
566
 
# (copied from glib-gettext.m4)
567
 
if test -z "$DATADIRNAME"; then
568
 
  AC_LINK_IFELSE(
569
 
    [AC_LANG_PROGRAM([[]],
570
 
                     [[extern int _nl_msg_cat_cntr;
571
 
                       return _nl_msg_cat_cntr]])],
572
 
    [DATADIRNAME=share],
573
 
    [case $host in
574
 
    *-*-solaris*)
575
 
    dnl On Solaris, if bind_textdomain_codeset is in libc,
576
 
    dnl GNU format message catalog is always supported,
577
 
    dnl since both are added to the libc all together.
578
 
    dnl Hence, we'd like to go with DATADIRNAME=share
579
 
    dnl in this case.
580
 
    AC_CHECK_FUNC(bind_textdomain_codeset,
581
 
      [DATADIRNAME=share], [DATADIRNAME=lib])
582
 
    ;;
583
 
    *)
584
 
    [DATADIRNAME=lib]
585
 
    ;;
586
 
    esac])
587
 
fi
588
 
AC_SUBST(DATADIRNAME)
589
 
 
590
 
IT_PO_SUBDIR([po])
591
 
 
592
 
])
593
 
 
594
 
 
595
 
# IT_PO_SUBDIR(DIRNAME)
596
 
# ---------------------
597
 
# All po subdirs have to be declared with this macro; the subdir "po" is
598
 
# declared by IT_PROG_INTLTOOL.
599
 
#
600
 
AC_DEFUN([IT_PO_SUBDIR],
601
 
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
602
 
dnl
603
 
dnl The following CONFIG_COMMANDS should be exetuted at the very end
604
 
dnl of config.status.
605
 
AC_CONFIG_COMMANDS_PRE([
606
 
  AC_CONFIG_COMMANDS([$1/stamp-it], [
607
 
    if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
608
 
       AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
609
 
    fi
610
 
    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
611
 
    >"$1/stamp-it.tmp"
612
 
    [sed '/^#/d
613
 
         s/^[[].*] *//
614
 
         /^[    ]*$/d
615
 
        '"s|^|  $ac_top_srcdir/|" \
616
 
      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
617
 
    ]
618
 
    [sed '/^POTFILES =/,/[^\\]$/ {
619
 
                /^POTFILES =/!d
620
 
                r $1/POTFILES
621
 
          }
622
 
         ' "$1/Makefile.in" >"$1/Makefile"]
623
 
    rm -f "$1/Makefile.tmp"
624
 
    mv "$1/stamp-it.tmp" "$1/stamp-it"
625
 
  ])
626
 
])dnl
627
 
])
628
 
 
629
 
# _IT_SUBST(VARIABLE)
630
 
# -------------------
631
 
# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
632
 
#
633
 
AC_DEFUN([_IT_SUBST],
634
 
[
635
 
AC_SUBST([$1])
636
 
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
637
 
]
638
 
)
639
 
 
640
 
# deprecated macros
641
 
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
642
 
# A hint is needed for aclocal from Automake <= 1.9.4:
643
 
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
644
 
 
645
 
 
646
 
# nls.m4 serial 3 (gettext-0.15)
647
 
dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
648
 
dnl This file is free software; the Free Software Foundation
649
 
dnl gives unlimited permission to copy and/or distribute it,
650
 
dnl with or without modifications, as long as this notice is preserved.
651
 
dnl
652
 
dnl This file can can be used in projects which are not available under
653
 
dnl the GNU General Public License or the GNU Library General Public
654
 
dnl License but which still want to provide support for the GNU gettext
655
 
dnl functionality.
656
 
dnl Please note that the actual code of the GNU gettext library is covered
657
 
dnl by the GNU Library General Public License, and the rest of the GNU
658
 
dnl gettext package package is covered by the GNU General Public License.
659
 
dnl They are *not* in the public domain.
660
 
 
661
 
dnl Authors:
662
 
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
663
 
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
664
 
 
665
 
AC_PREREQ(2.50)
666
 
 
667
 
AC_DEFUN([AM_NLS],
668
 
[
669
 
  AC_MSG_CHECKING([whether NLS is requested])
670
 
  dnl Default is enabled NLS
671
 
  AC_ARG_ENABLE(nls,
672
 
    [  --disable-nls           do not use Native Language Support],
673
 
    USE_NLS=$enableval, USE_NLS=yes)
674
 
  AC_MSG_RESULT($USE_NLS)
675
 
  AC_SUBST(USE_NLS)
676
 
])
677
 
 
678
 
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
679
 
680
 
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
681
 
#
682
 
# This program is free software; you can redistribute it and/or modify
683
 
# it under the terms of the GNU General Public License as published by
684
 
# the Free Software Foundation; either version 2 of the License, or
685
 
# (at your option) any later version.
686
 
#
687
 
# This program is distributed in the hope that it will be useful, but
688
 
# WITHOUT ANY WARRANTY; without even the implied warranty of
689
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
690
 
# General Public License for more details.
691
 
#
692
 
# You should have received a copy of the GNU General Public License
693
 
# along with this program; if not, write to the Free Software
694
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
695
 
#
696
 
# As a special exception to the GNU General Public License, if you
697
 
# distribute this file as part of a program that contains a
698
 
# configuration script generated by Autoconf, you may include it under
699
 
# the same distribution terms that you use for the rest of that program.
700
 
 
701
 
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
702
 
# ----------------------------------
703
 
AC_DEFUN([PKG_PROG_PKG_CONFIG],
704
 
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
705
 
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
706
 
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
707
 
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
708
 
        AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
709
 
fi
710
 
if test -n "$PKG_CONFIG"; then
711
 
        _pkg_min_version=m4_default([$1], [0.9.0])
712
 
        AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
713
 
        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
714
 
                AC_MSG_RESULT([yes])
715
 
        else
716
 
                AC_MSG_RESULT([no])
717
 
                PKG_CONFIG=""
718
 
        fi
719
 
                
720
 
fi[]dnl
721
 
])# PKG_PROG_PKG_CONFIG
722
 
 
723
 
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
724
 
#
725
 
# Check to see whether a particular set of modules exists.  Similar
726
 
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
727
 
#
728
 
#
729
 
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
730
 
# this or PKG_CHECK_MODULES is called, or make sure to call
731
 
# PKG_CHECK_EXISTS manually
732
 
# --------------------------------------------------------------
733
 
AC_DEFUN([PKG_CHECK_EXISTS],
734
 
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
735
 
if test -n "$PKG_CONFIG" && \
736
 
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
737
 
  m4_ifval([$2], [$2], [:])
738
 
m4_ifvaln([$3], [else
739
 
  $3])dnl
740
 
fi])
741
 
 
742
 
 
743
 
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
744
 
# ---------------------------------------------
745
 
m4_define([_PKG_CONFIG],
746
 
[if test -n "$$1"; then
747
 
    pkg_cv_[]$1="$$1"
748
 
 elif test -n "$PKG_CONFIG"; then
749
 
    PKG_CHECK_EXISTS([$3],
750
 
                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
751
 
                     [pkg_failed=yes])
752
 
 else
753
 
    pkg_failed=untried
754
 
fi[]dnl
755
 
])# _PKG_CONFIG
756
 
 
757
 
# _PKG_SHORT_ERRORS_SUPPORTED
758
 
# -----------------------------
759
 
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
760
 
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
761
 
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
762
 
        _pkg_short_errors_supported=yes
763
 
else
764
 
        _pkg_short_errors_supported=no
765
 
fi[]dnl
766
 
])# _PKG_SHORT_ERRORS_SUPPORTED
767
 
 
768
 
 
769
 
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
770
 
# [ACTION-IF-NOT-FOUND])
771
 
#
772
 
#
773
 
# Note that if there is a possibility the first call to
774
 
# PKG_CHECK_MODULES might not happen, you should be sure to include an
775
 
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
776
 
#
777
 
#
778
 
# --------------------------------------------------------------
779
 
AC_DEFUN([PKG_CHECK_MODULES],
780
 
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
781
 
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
782
 
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
783
 
 
784
 
pkg_failed=no
785
 
AC_MSG_CHECKING([for $1])
786
 
 
787
 
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
788
 
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
789
 
 
790
 
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
791
 
and $1[]_LIBS to avoid the need to call pkg-config.
792
 
See the pkg-config man page for more details.])
793
 
 
794
 
if test $pkg_failed = yes; then
795
 
        _PKG_SHORT_ERRORS_SUPPORTED
796
 
        if test $_pkg_short_errors_supported = yes; then
797
 
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
798
 
        else 
799
 
                $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
800
 
        fi
801
 
        # Put the nasty error message in config.log where it belongs
802
 
        echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
803
 
 
804
 
        ifelse([$4], , [AC_MSG_ERROR(dnl
805
 
[Package requirements ($2) were not met:
806
 
 
807
 
$$1_PKG_ERRORS
808
 
 
809
 
Consider adjusting the PKG_CONFIG_PATH environment variable if you
810
 
installed software in a non-standard prefix.
811
 
 
812
 
_PKG_TEXT
813
 
])],
814
 
                [AC_MSG_RESULT([no])
815
 
                $4])
816
 
elif test $pkg_failed = untried; then
817
 
        ifelse([$4], , [AC_MSG_FAILURE(dnl
818
 
[The pkg-config script could not be found or is too old.  Make sure it
819
 
is in your PATH or set the PKG_CONFIG environment variable to the full
820
 
path to pkg-config.
821
 
 
822
 
_PKG_TEXT
823
 
 
824
 
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
825
 
                [$4])
826
 
else
827
 
        $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
828
 
        $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
829
 
        AC_MSG_RESULT([yes])
830
 
        ifelse([$3], , :, [$3])
831
 
fi[]dnl
832
 
])# PKG_CHECK_MODULES
833
 
 
834
 
# Copyright (C) 2002, 2003, 2005, 2006  Free Software Foundation, Inc.
 
14
m4_ifndef([AC_AUTOCONF_VERSION],
 
15
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 
16
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],,
 
17
[m4_warning([this file was generated for autoconf 2.67.
 
18
You have another version of autoconf.  It may work, but is not guaranteed to.
 
19
If you have problems, you may need to regenerate the build system entirely.
 
20
To do so, use the procedure documented by the package, typically `autoreconf'.])])
 
21
 
 
22
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
835
23
#
836
24
# This file is free software; the Free Software Foundation
837
25
# gives unlimited permission to copy and/or distribute it,
843
31
# generated from the m4 files accompanying Automake X.Y.
844
32
# (This private macro should not be called outside this file.)
845
33
AC_DEFUN([AM_AUTOMAKE_VERSION],
846
 
[am__api_version='1.10'
 
34
[am__api_version='1.11'
847
35
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
848
36
dnl require some minimum version.  Point them to the right macro.
849
 
m4_if([$1], [1.10], [],
 
37
m4_if([$1], [1.11.1], [],
850
38
      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
851
39
])
852
40
 
860
48
# AM_SET_CURRENT_AUTOMAKE_VERSION
861
49
# -------------------------------
862
50
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
863
 
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
 
51
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
864
52
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
865
 
[AM_AUTOMAKE_VERSION([1.10])dnl
866
 
_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)])
 
53
[AM_AUTOMAKE_VERSION([1.11.1])dnl
 
54
m4_ifndef([AC_AUTOCONF_VERSION],
 
55
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 
56
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
867
57
 
868
58
# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
869
59
 
920
110
 
921
111
# AM_CONDITIONAL                                            -*- Autoconf -*-
922
112
 
923
 
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
 
113
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
924
114
# Free Software Foundation, Inc.
925
115
#
926
116
# This file is free software; the Free Software Foundation
927
117
# gives unlimited permission to copy and/or distribute it,
928
118
# with or without modifications, as long as this notice is preserved.
929
119
 
930
 
# serial 8
 
120
# serial 9
931
121
 
932
122
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
933
123
# -------------------------------------
940
130
AC_SUBST([$1_FALSE])dnl
941
131
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
942
132
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
 
133
m4_define([_AM_COND_VALUE_$1], [$2])dnl
943
134
if $2; then
944
135
  $1_TRUE=
945
136
  $1_FALSE='#'
953
144
Usually this means the macro was only invoked conditionally.]])
954
145
fi])])
955
146
 
956
 
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
 
147
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
957
148
# Free Software Foundation, Inc.
958
149
#
959
150
# This file is free software; the Free Software Foundation
960
151
# gives unlimited permission to copy and/or distribute it,
961
152
# with or without modifications, as long as this notice is preserved.
962
153
 
963
 
# serial 9
 
154
# serial 10
964
155
 
965
156
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
966
157
# written in clear, in which case automake, when reading aclocal.m4,
1017
208
  if test "$am_compiler_list" = ""; then
1018
209
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
1019
210
  fi
 
211
  am__universal=false
 
212
  m4_case([$1], [CC],
 
213
    [case " $depcc " in #(
 
214
     *\ -arch\ *\ -arch\ *) am__universal=true ;;
 
215
     esac],
 
216
    [CXX],
 
217
    [case " $depcc " in #(
 
218
     *\ -arch\ *\ -arch\ *) am__universal=true ;;
 
219
     esac])
 
220
 
1020
221
  for depmode in $am_compiler_list; do
1021
222
    # Setup a source with many dependencies, because some compilers
1022
223
    # like to wrap large dependency lists on column 80 (with \), and
1034
235
    done
1035
236
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
1036
237
 
 
238
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
 
239
    # mode.  It turns out that the SunPro C++ compiler does not properly
 
240
    # handle `-M -o', and we need to detect this.  Also, some Intel
 
241
    # versions had trouble with output in subdirs
 
242
    am__obj=sub/conftest.${OBJEXT-o}
 
243
    am__minus_obj="-o $am__obj"
1037
244
    case $depmode in
 
245
    gcc)
 
246
      # This depmode causes a compiler race in universal mode.
 
247
      test "$am__universal" = false || continue
 
248
      ;;
1038
249
    nosideeffect)
1039
250
      # after this tag, mechanisms are not by side-effect, so they'll
1040
251
      # only be used when explicitly requested
1044
255
        break
1045
256
      fi
1046
257
      ;;
 
258
    msvisualcpp | msvcmsys)
 
259
      # This compiler won't grok `-c -o', but also, the minuso test has
 
260
      # not run yet.  These depmodes are late enough in the game, and
 
261
      # so weak that their functioning should not be impacted.
 
262
      am__obj=conftest.${OBJEXT-o}
 
263
      am__minus_obj=
 
264
      ;;
1047
265
    none) break ;;
1048
266
    esac
1049
 
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
1050
 
    # mode.  It turns out that the SunPro C++ compiler does not properly
1051
 
    # handle `-M -o', and we need to detect this.
1052
267
    if depmode=$depmode \
1053
 
       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
 
268
       source=sub/conftest.c object=$am__obj \
1054
269
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
1055
 
       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
 
270
       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
1056
271
         >/dev/null 2>conftest.err &&
1057
272
       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
1058
273
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
1059
 
       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
 
274
       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
1060
275
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
1061
276
      # icc doesn't choke on unknown options, it will just issue warnings
1062
277
      # or remarks (even with -Werror).  So we grep stderr for any message
1113
328
 
1114
329
# Generate code to set up dependency tracking.              -*- Autoconf -*-
1115
330
 
1116
 
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
 
331
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
1117
332
# Free Software Foundation, Inc.
1118
333
#
1119
334
# This file is free software; the Free Software Foundation
1120
335
# gives unlimited permission to copy and/or distribute it,
1121
336
# with or without modifications, as long as this notice is preserved.
1122
337
 
1123
 
#serial 3
 
338
#serial 5
1124
339
 
1125
340
# _AM_OUTPUT_DEPENDENCY_COMMANDS
1126
341
# ------------------------------
1127
342
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1128
 
[for mf in $CONFIG_FILES; do
1129
 
  # Strip MF so we end up with the name of the file.
1130
 
  mf=`echo "$mf" | sed -e 's/:.*$//'`
1131
 
  # Check whether this is an Automake generated Makefile or not.
1132
 
  # We used to match only the files named `Makefile.in', but
1133
 
  # some people rename them; so instead we look at the file content.
1134
 
  # Grep'ing the first line is not enough: some people post-process
1135
 
  # each Makefile.in and add a new line on top of each file to say so.
1136
 
  # Grep'ing the whole file is not good either: AIX grep has a line
1137
 
  # limit of 2048, but all sed's we know have understand at least 4000.
1138
 
  if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
1139
 
    dirpart=`AS_DIRNAME("$mf")`
1140
 
  else
1141
 
    continue
1142
 
  fi
1143
 
  # Extract the definition of DEPDIR, am__include, and am__quote
1144
 
  # from the Makefile without running `make'.
1145
 
  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
1146
 
  test -z "$DEPDIR" && continue
1147
 
  am__include=`sed -n 's/^am__include = //p' < "$mf"`
1148
 
  test -z "am__include" && continue
1149
 
  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
1150
 
  # When using ansi2knr, U may be empty or an underscore; expand it
1151
 
  U=`sed -n 's/^U = //p' < "$mf"`
1152
 
  # Find all dependency output files, they are included files with
1153
 
  # $(DEPDIR) in their names.  We invoke sed twice because it is the
1154
 
  # simplest approach to changing $(DEPDIR) to its actual value in the
1155
 
  # expansion.
1156
 
  for file in `sed -n "
1157
 
    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
1158
 
       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
1159
 
    # Make sure the directory exists.
1160
 
    test -f "$dirpart/$file" && continue
1161
 
    fdir=`AS_DIRNAME(["$file"])`
1162
 
    AS_MKDIR_P([$dirpart/$fdir])
1163
 
    # echo "creating $dirpart/$file"
1164
 
    echo '# dummy' > "$dirpart/$file"
 
343
[{
 
344
  # Autoconf 2.62 quotes --file arguments for eval, but not when files
 
345
  # are listed without --file.  Let's play safe and only enable the eval
 
346
  # if we detect the quoting.
 
347
  case $CONFIG_FILES in
 
348
  *\'*) eval set x "$CONFIG_FILES" ;;
 
349
  *)   set x $CONFIG_FILES ;;
 
350
  esac
 
351
  shift
 
352
  for mf
 
353
  do
 
354
    # Strip MF so we end up with the name of the file.
 
355
    mf=`echo "$mf" | sed -e 's/:.*$//'`
 
356
    # Check whether this is an Automake generated Makefile or not.
 
357
    # We used to match only the files named `Makefile.in', but
 
358
    # some people rename them; so instead we look at the file content.
 
359
    # Grep'ing the first line is not enough: some people post-process
 
360
    # each Makefile.in and add a new line on top of each file to say so.
 
361
    # Grep'ing the whole file is not good either: AIX grep has a line
 
362
    # limit of 2048, but all sed's we know have understand at least 4000.
 
363
    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
 
364
      dirpart=`AS_DIRNAME("$mf")`
 
365
    else
 
366
      continue
 
367
    fi
 
368
    # Extract the definition of DEPDIR, am__include, and am__quote
 
369
    # from the Makefile without running `make'.
 
370
    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
 
371
    test -z "$DEPDIR" && continue
 
372
    am__include=`sed -n 's/^am__include = //p' < "$mf"`
 
373
    test -z "am__include" && continue
 
374
    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
 
375
    # When using ansi2knr, U may be empty or an underscore; expand it
 
376
    U=`sed -n 's/^U = //p' < "$mf"`
 
377
    # Find all dependency output files, they are included files with
 
378
    # $(DEPDIR) in their names.  We invoke sed twice because it is the
 
379
    # simplest approach to changing $(DEPDIR) to its actual value in the
 
380
    # expansion.
 
381
    for file in `sed -n "
 
382
      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
 
383
         sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
 
384
      # Make sure the directory exists.
 
385
      test -f "$dirpart/$file" && continue
 
386
      fdir=`AS_DIRNAME(["$file"])`
 
387
      AS_MKDIR_P([$dirpart/$fdir])
 
388
      # echo "creating $dirpart/$file"
 
389
      echo '# dummy' > "$dirpart/$file"
 
390
    done
1165
391
  done
1166
 
done
 
392
}
1167
393
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1168
394
 
1169
395
 
1183
409
# Do all the work for Automake.                             -*- Autoconf -*-
1184
410
 
1185
411
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
1186
 
# 2005, 2006 Free Software Foundation, Inc.
 
412
# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
1187
413
#
1188
414
# This file is free software; the Free Software Foundation
1189
415
# gives unlimited permission to copy and/or distribute it,
1190
416
# with or without modifications, as long as this notice is preserved.
1191
417
 
1192
 
# serial 12
 
418
# serial 16
1193
419
 
1194
420
# This macro actually does too much.  Some checks are only needed if
1195
421
# your package does certain things.  But this isn't really a big deal.
1206
432
# arguments mandatory, and then we can depend on a new Autoconf
1207
433
# release and drop the old call support.
1208
434
AC_DEFUN([AM_INIT_AUTOMAKE],
1209
 
[AC_PREREQ([2.60])dnl
 
435
[AC_PREREQ([2.62])dnl
1210
436
dnl Autoconf wants to disallow AM_ names.  We explicitly allow
1211
437
dnl the ones we care about.
1212
438
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1257
483
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
1258
484
AM_MISSING_PROG(AUTOHEADER, autoheader)
1259
485
AM_MISSING_PROG(MAKEINFO, makeinfo)
1260
 
AM_PROG_INSTALL_SH
1261
 
AM_PROG_INSTALL_STRIP
 
486
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 
487
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
1262
488
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
1263
489
# We need awk for the "check" target.  The system "awk" is bad on
1264
490
# some platforms.
1266
492
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1267
493
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1268
494
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1269
 
              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1270
 
                             [_AM_PROG_TAR([v7])])])
 
495
              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
 
496
                             [_AM_PROG_TAR([v7])])])
1271
497
_AM_IF_OPTION([no-dependencies],,
1272
498
[AC_PROVIDE_IFELSE([AC_PROG_CC],
1273
 
                  [_AM_DEPENDENCIES(CC)],
1274
 
                  [define([AC_PROG_CC],
1275
 
                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
 
499
                  [_AM_DEPENDENCIES(CC)],
 
500
                  [define([AC_PROG_CC],
 
501
                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
1276
502
AC_PROVIDE_IFELSE([AC_PROG_CXX],
1277
 
                  [_AM_DEPENDENCIES(CXX)],
1278
 
                  [define([AC_PROG_CXX],
1279
 
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
 
503
                  [_AM_DEPENDENCIES(CXX)],
 
504
                  [define([AC_PROG_CXX],
 
505
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1280
506
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
1281
 
                  [_AM_DEPENDENCIES(OBJC)],
1282
 
                  [define([AC_PROG_OBJC],
1283
 
                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
1284
 
])
1285
 
])
 
507
                  [_AM_DEPENDENCIES(OBJC)],
 
508
                  [define([AC_PROG_OBJC],
 
509
                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
 
510
])
 
511
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
 
512
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
 
513
dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
 
514
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
 
515
AC_CONFIG_COMMANDS_PRE(dnl
 
516
[m4_provide_if([_AM_COMPILER_EXEEXT],
 
517
  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
 
518
])
 
519
 
 
520
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
 
521
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
 
522
dnl mangled by Autoconf and run in a shell conditional statement.
 
523
m4_define([_AC_COMPILER_EXEEXT],
 
524
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1286
525
 
1287
526
 
1288
527
# When config.status generates a header, we must update the stamp-h file.
1294
533
# our stamp files there.
1295
534
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1296
535
[# Compute $1's index in $config_headers.
 
536
_am_arg=$1
1297
537
_am_stamp_count=1
1298
538
for _am_header in $config_headers :; do
1299
539
  case $_am_header in
1300
 
    $1 | $1:* )
 
540
    $_am_arg | $_am_arg:* )
1301
541
      break ;;
1302
542
    * )
1303
543
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1304
544
  esac
1305
545
done
1306
 
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
 
546
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1307
547
 
1308
 
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
548
# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
1309
549
#
1310
550
# This file is free software; the Free Software Foundation
1311
551
# gives unlimited permission to copy and/or distribute it,
1316
556
# Define $install_sh.
1317
557
AC_DEFUN([AM_PROG_INSTALL_SH],
1318
558
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1319
 
install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
 
559
if test x"${install_sh}" != xset; then
 
560
  case $am_aux_dir in
 
561
  *\ * | *\     *)
 
562
    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
 
563
  *)
 
564
    install_sh="\${SHELL} $am_aux_dir/install-sh"
 
565
  esac
 
566
fi
1320
567
AC_SUBST(install_sh)])
1321
568
 
1322
569
# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
1342
589
 
1343
590
# Check to see how 'make' treats includes.                  -*- Autoconf -*-
1344
591
 
1345
 
# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
 
592
# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
1346
593
#
1347
594
# This file is free software; the Free Software Foundation
1348
595
# gives unlimited permission to copy and/or distribute it,
1349
596
# with or without modifications, as long as this notice is preserved.
1350
597
 
1351
 
# serial 3
 
598
# serial 4
1352
599
 
1353
600
# AM_MAKE_INCLUDE()
1354
601
# -----------------
1357
604
[am_make=${MAKE-make}
1358
605
cat > confinc << 'END'
1359
606
am__doit:
1360
 
        @echo done
 
607
        @echo this is the am__doit target
1361
608
.PHONY: am__doit
1362
609
END
1363
610
# If we don't find an include directive, just comment out the code.
1367
614
_am_result=none
1368
615
# First try GNU make style include.
1369
616
echo "include confinc" > confmf
1370
 
# We grep out `Entering directory' and `Leaving directory'
1371
 
# messages which can occur if `w' ends up in MAKEFLAGS.
1372
 
# In particular we don't look at `^make:' because GNU make might
1373
 
# be invoked under some other name (usually "gmake"), in which
1374
 
# case it prints its new name instead of `make'.
1375
 
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
1376
 
   am__include=include
1377
 
   am__quote=
1378
 
   _am_result=GNU
1379
 
fi
 
617
# Ignore all kinds of additional output from `make'.
 
618
case `$am_make -s -f confmf 2> /dev/null` in #(
 
619
*the\ am__doit\ target*)
 
620
  am__include=include
 
621
  am__quote=
 
622
  _am_result=GNU
 
623
  ;;
 
624
esac
1380
625
# Now try BSD make style include.
1381
626
if test "$am__include" = "#"; then
1382
627
   echo '.include "confinc"' > confmf
1383
 
   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
1384
 
      am__include=.include
1385
 
      am__quote="\""
1386
 
      _am_result=BSD
1387
 
   fi
 
628
   case `$am_make -s -f confmf 2> /dev/null` in #(
 
629
   *the\ am__doit\ target*)
 
630
     am__include=.include
 
631
     am__quote="\""
 
632
     _am_result=BSD
 
633
     ;;
 
634
   esac
1388
635
fi
1389
636
AC_SUBST([am__include])
1390
637
AC_SUBST([am__quote])
1394
641
 
1395
642
# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
1396
643
 
1397
 
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
 
644
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
1398
645
# Free Software Foundation, Inc.
1399
646
#
1400
647
# This file is free software; the Free Software Foundation
1401
648
# gives unlimited permission to copy and/or distribute it,
1402
649
# with or without modifications, as long as this notice is preserved.
1403
650
 
1404
 
# serial 5
 
651
# serial 6
1405
652
 
1406
653
# AM_MISSING_PROG(NAME, PROGRAM)
1407
654
# ------------------------------
1418
665
AC_DEFUN([AM_MISSING_HAS_RUN],
1419
666
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1420
667
AC_REQUIRE_AUX_FILE([missing])dnl
1421
 
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
 
668
if test x"${MISSING+set}" != xset; then
 
669
  case $am_aux_dir in
 
670
  *\ * | *\     *)
 
671
    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
 
672
  *)
 
673
    MISSING="\${SHELL} $am_aux_dir/missing" ;;
 
674
  esac
 
675
fi
1422
676
# Use eval to expand $SHELL
1423
677
if eval "$MISSING --run true"; then
1424
678
  am_missing_run="$MISSING --run "
1456
710
 
1457
711
# Helper functions for option handling.                     -*- Autoconf -*-
1458
712
 
1459
 
# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
 
713
# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
1460
714
#
1461
715
# This file is free software; the Free Software Foundation
1462
716
# gives unlimited permission to copy and/or distribute it,
1463
717
# with or without modifications, as long as this notice is preserved.
1464
718
 
1465
 
# serial 3
 
719
# serial 4
1466
720
 
1467
721
# _AM_MANGLE_OPTION(NAME)
1468
722
# -----------------------
1479
733
# ----------------------------------
1480
734
# OPTIONS is a space-separated list of Automake options.
1481
735
AC_DEFUN([_AM_SET_OPTIONS],
1482
 
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 
736
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1483
737
 
1484
738
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1485
739
# -------------------------------------------
1506
760
 
1507
761
# Check to make sure that the build environment is sane.    -*- Autoconf -*-
1508
762
 
1509
 
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
 
763
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
1510
764
# Free Software Foundation, Inc.
1511
765
#
1512
766
# This file is free software; the Free Software Foundation
1513
767
# gives unlimited permission to copy and/or distribute it,
1514
768
# with or without modifications, as long as this notice is preserved.
1515
769
 
1516
 
# serial 4
 
770
# serial 5
1517
771
 
1518
772
# AM_SANITY_CHECK
1519
773
# ---------------
1522
776
# Just in case
1523
777
sleep 1
1524
778
echo timestamp > conftest.file
 
779
# Reject unsafe characters in $srcdir or the absolute working directory
 
780
# name.  Accept space and tab only in the latter.
 
781
am_lf='
 
782
'
 
783
case `pwd` in
 
784
  *[[\\\"\#\$\&\'\`$am_lf]]*)
 
785
    AC_MSG_ERROR([unsafe absolute working directory name]);;
 
786
esac
 
787
case $srcdir in
 
788
  *[[\\\"\#\$\&\'\`$am_lf\ \    ]]*)
 
789
    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
 
790
esac
 
791
 
1525
792
# Do `set' in a subshell so we don't clobber the current shell's
1526
793
# arguments.  Must try -L first in case configure is actually a
1527
794
# symlink; some systems play weird games with the mod time of symlinks
1528
795
# (eg FreeBSD returns the mod time of the symlink's containing
1529
796
# directory).
1530
797
if (
1531
 
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
 
798
   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1532
799
   if test "$[*]" = "X"; then
1533
800
      # -L didn't work.
1534
 
      set X `ls -t $srcdir/configure conftest.file`
 
801
      set X `ls -t "$srcdir/configure" conftest.file`
1535
802
   fi
1536
803
   rm -f conftest.file
1537
804
   if test "$[*]" != "X $srcdir/configure conftest.file" \
1556
823
fi
1557
824
AC_MSG_RESULT(yes)])
1558
825
 
 
826
# Copyright (C) 2009  Free Software Foundation, Inc.
 
827
#
 
828
# This file is free software; the Free Software Foundation
 
829
# gives unlimited permission to copy and/or distribute it,
 
830
# with or without modifications, as long as this notice is preserved.
 
831
 
 
832
# serial 1
 
833
 
 
834
# AM_SILENT_RULES([DEFAULT])
 
835
# --------------------------
 
836
# Enable less verbose build rules; with the default set to DEFAULT
 
837
# (`yes' being less verbose, `no' or empty being verbose).
 
838
AC_DEFUN([AM_SILENT_RULES],
 
839
[AC_ARG_ENABLE([silent-rules],
 
840
[  --enable-silent-rules          less verbose build output (undo: `make V=1')
 
841
  --disable-silent-rules         verbose build output (undo: `make V=0')])
 
842
case $enable_silent_rules in
 
843
yes) AM_DEFAULT_VERBOSITY=0;;
 
844
no)  AM_DEFAULT_VERBOSITY=1;;
 
845
*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
 
846
esac
 
847
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
 
848
AM_BACKSLASH='\'
 
849
AC_SUBST([AM_BACKSLASH])dnl
 
850
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
 
851
])
 
852
 
1559
853
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
1560
854
#
1561
855
# This file is free software; the Free Software Foundation
1584
878
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1585
879
AC_SUBST([INSTALL_STRIP_PROGRAM])])
1586
880
 
1587
 
# Copyright (C) 2006  Free Software Foundation, Inc.
 
881
# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
1588
882
#
1589
883
# This file is free software; the Free Software Foundation
1590
884
# gives unlimited permission to copy and/or distribute it,
1591
885
# with or without modifications, as long as this notice is preserved.
1592
886
 
 
887
# serial 2
 
888
 
1593
889
# _AM_SUBST_NOTMAKE(VARIABLE)
1594
890
# ---------------------------
1595
 
# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in.
 
891
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1596
892
# This macro is traced by Automake.
1597
893
AC_DEFUN([_AM_SUBST_NOTMAKE])
1598
894
 
 
895
# AM_SUBST_NOTMAKE(VARIABLE)
 
896
# ---------------------------
 
897
# Public sister of _AM_SUBST_NOTMAKE.
 
898
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 
899
 
1599
900
# Check how to create a tarball.                            -*- Autoconf -*-
1600
901
 
1601
902
# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
1692
993
AC_SUBST([am__untar])
1693
994
]) # _AM_PROG_TAR
1694
995
 
 
996
# nls.m4 serial 3 (gettext-0.15)
 
997
dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
 
998
dnl This file is free software; the Free Software Foundation
 
999
dnl gives unlimited permission to copy and/or distribute it,
 
1000
dnl with or without modifications, as long as this notice is preserved.
 
1001
dnl
 
1002
dnl This file can can be used in projects which are not available under
 
1003
dnl the GNU General Public License or the GNU Library General Public
 
1004
dnl License but which still want to provide support for the GNU gettext
 
1005
dnl functionality.
 
1006
dnl Please note that the actual code of the GNU gettext library is covered
 
1007
dnl by the GNU Library General Public License, and the rest of the GNU
 
1008
dnl gettext package package is covered by the GNU General Public License.
 
1009
dnl They are *not* in the public domain.
 
1010
 
 
1011
dnl Authors:
 
1012
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
 
1013
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
 
1014
 
 
1015
AC_PREREQ(2.50)
 
1016
 
 
1017
AC_DEFUN([AM_NLS],
 
1018
[
 
1019
  AC_MSG_CHECKING([whether NLS is requested])
 
1020
  dnl Default is enabled NLS
 
1021
  AC_ARG_ENABLE(nls,
 
1022
    [  --disable-nls           do not use Native Language Support],
 
1023
    USE_NLS=$enableval, USE_NLS=yes)
 
1024
  AC_MSG_RESULT($USE_NLS)
 
1025
  AC_SUBST(USE_NLS)
 
1026
])
 
1027
 
 
1028
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
 
1029
# serial 1 (pkg-config-0.24)
 
1030
 
1031
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
 
1032
#
 
1033
# This program is free software; you can redistribute it and/or modify
 
1034
# it under the terms of the GNU General Public License as published by
 
1035
# the Free Software Foundation; either version 2 of the License, or
 
1036
# (at your option) any later version.
 
1037
#
 
1038
# This program is distributed in the hope that it will be useful, but
 
1039
# WITHOUT ANY WARRANTY; without even the implied warranty of
 
1040
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
1041
# General Public License for more details.
 
1042
#
 
1043
# You should have received a copy of the GNU General Public License
 
1044
# along with this program; if not, write to the Free Software
 
1045
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
1046
#
 
1047
# As a special exception to the GNU General Public License, if you
 
1048
# distribute this file as part of a program that contains a
 
1049
# configuration script generated by Autoconf, you may include it under
 
1050
# the same distribution terms that you use for the rest of that program.
 
1051
 
 
1052
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
 
1053
# ----------------------------------
 
1054
AC_DEFUN([PKG_PROG_PKG_CONFIG],
 
1055
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
 
1056
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
 
1057
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
 
1058
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
 
1059
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
 
1060
 
 
1061
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
 
1062
        AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
 
1063
fi
 
1064
if test -n "$PKG_CONFIG"; then
 
1065
        _pkg_min_version=m4_default([$1], [0.9.0])
 
1066
        AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
 
1067
        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
 
1068
                AC_MSG_RESULT([yes])
 
1069
        else
 
1070
                AC_MSG_RESULT([no])
 
1071
                PKG_CONFIG=""
 
1072
        fi
 
1073
fi[]dnl
 
1074
])# PKG_PROG_PKG_CONFIG
 
1075
 
 
1076
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 
1077
#
 
1078
# Check to see whether a particular set of modules exists.  Similar
 
1079
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
 
1080
#
 
1081
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 
1082
# only at the first occurence in configure.ac, so if the first place
 
1083
# it's called might be skipped (such as if it is within an "if", you
 
1084
# have to call PKG_CHECK_EXISTS manually
 
1085
# --------------------------------------------------------------
 
1086
AC_DEFUN([PKG_CHECK_EXISTS],
 
1087
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
1088
if test -n "$PKG_CONFIG" && \
 
1089
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
 
1090
  m4_default([$2], [:])
 
1091
m4_ifvaln([$3], [else
 
1092
  $3])dnl
 
1093
fi])
 
1094
 
 
1095
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
 
1096
# ---------------------------------------------
 
1097
m4_define([_PKG_CONFIG],
 
1098
[if test -n "$$1"; then
 
1099
    pkg_cv_[]$1="$$1"
 
1100
 elif test -n "$PKG_CONFIG"; then
 
1101
    PKG_CHECK_EXISTS([$3],
 
1102
                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
 
1103
                     [pkg_failed=yes])
 
1104
 else
 
1105
    pkg_failed=untried
 
1106
fi[]dnl
 
1107
])# _PKG_CONFIG
 
1108
 
 
1109
# _PKG_SHORT_ERRORS_SUPPORTED
 
1110
# -----------------------------
 
1111
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
 
1112
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 
1113
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
 
1114
        _pkg_short_errors_supported=yes
 
1115
else
 
1116
        _pkg_short_errors_supported=no
 
1117
fi[]dnl
 
1118
])# _PKG_SHORT_ERRORS_SUPPORTED
 
1119
 
 
1120
 
 
1121
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
 
1122
# [ACTION-IF-NOT-FOUND])
 
1123
#
 
1124
#
 
1125
# Note that if there is a possibility the first call to
 
1126
# PKG_CHECK_MODULES might not happen, you should be sure to include an
 
1127
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
 
1128
#
 
1129
#
 
1130
# --------------------------------------------------------------
 
1131
AC_DEFUN([PKG_CHECK_MODULES],
 
1132
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
1133
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
 
1134
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
 
1135
 
 
1136
pkg_failed=no
 
1137
AC_MSG_CHECKING([for $1])
 
1138
 
 
1139
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
 
1140
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
 
1141
 
 
1142
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
 
1143
and $1[]_LIBS to avoid the need to call pkg-config.
 
1144
See the pkg-config man page for more details.])
 
1145
 
 
1146
if test $pkg_failed = yes; then
 
1147
        AC_MSG_RESULT([no])
 
1148
        _PKG_SHORT_ERRORS_SUPPORTED
 
1149
        if test $_pkg_short_errors_supported = yes; then
 
1150
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
 
1151
        else 
 
1152
                $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
 
1153
        fi
 
1154
        # Put the nasty error message in config.log where it belongs
 
1155
        echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
 
1156
 
 
1157
        m4_default([$4], [AC_MSG_ERROR(
 
1158
[Package requirements ($2) were not met:
 
1159
 
 
1160
$$1_PKG_ERRORS
 
1161
 
 
1162
Consider adjusting the PKG_CONFIG_PATH environment variable if you
 
1163
installed software in a non-standard prefix.
 
1164
 
 
1165
_PKG_TEXT])[]dnl
 
1166
        ])
 
1167
elif test $pkg_failed = untried; then
 
1168
        AC_MSG_RESULT([no])
 
1169
        m4_default([$4], [AC_MSG_FAILURE(
 
1170
[The pkg-config script could not be found or is too old.  Make sure it
 
1171
is in your PATH or set the PKG_CONFIG environment variable to the full
 
1172
path to pkg-config.
 
1173
 
 
1174
_PKG_TEXT
 
1175
 
 
1176
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
 
1177
        ])
 
1178
else
 
1179
        $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
 
1180
        $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
 
1181
        AC_MSG_RESULT([yes])
 
1182
        $3
 
1183
fi[]dnl
 
1184
])# PKG_CHECK_MODULES
 
1185
 
 
1186
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
 
1187
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
 
1188
#
 
1189
# This file is free software, distributed under the terms of the GNU
 
1190
# General Public License.  As a special exception to the GNU General
 
1191
# Public License, this file may be distributed as part of a program
 
1192
# that contains a configuration script generated by Autoconf, under
 
1193
# the same distribution terms as the rest of that program.
 
1194
#
 
1195
# This file can be copied and used freely without restrictions.  It can
 
1196
# be used in projects which are not available under the GNU Public License
 
1197
# but which still want to provide support for the GNU gettext functionality.
 
1198
#
 
1199
# Macro to add for using GNU gettext.
 
1200
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
 
1201
#
 
1202
# Modified to never use included libintl. 
 
1203
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
 
1204
#
 
1205
# Major rework to remove unused code
 
1206
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
 
1207
#
 
1208
# Added better handling of ALL_LINGUAS from GNU gettext version 
 
1209
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
 
1210
#
 
1211
# Modified to require ngettext
 
1212
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
 
1213
#
 
1214
# We need this here as well, since someone might use autoconf-2.5x
 
1215
# to configure GLib then an older version to configure a package
 
1216
# using AM_GLIB_GNU_GETTEXT
 
1217
AC_PREREQ(2.53)
 
1218
 
 
1219
dnl
 
1220
dnl We go to great lengths to make sure that aclocal won't 
 
1221
dnl try to pull in the installed version of these macros
 
1222
dnl when running aclocal in the glib directory.
 
1223
dnl
 
1224
m4_copy([AC_DEFUN],[glib_DEFUN])
 
1225
m4_copy([AC_REQUIRE],[glib_REQUIRE])
 
1226
dnl
 
1227
dnl At the end, if we're not within glib, we'll define the public
 
1228
dnl definitions in terms of our private definitions.
 
1229
dnl
 
1230
 
 
1231
# GLIB_LC_MESSAGES
 
1232
#--------------------
 
1233
glib_DEFUN([GLIB_LC_MESSAGES],
 
1234
  [AC_CHECK_HEADERS([locale.h])
 
1235
    if test $ac_cv_header_locale_h = yes; then
 
1236
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
 
1237
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
 
1238
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
 
1239
    if test $am_cv_val_LC_MESSAGES = yes; then
 
1240
      AC_DEFINE(HAVE_LC_MESSAGES, 1,
 
1241
        [Define if your <locale.h> file defines LC_MESSAGES.])
 
1242
    fi
 
1243
  fi])
 
1244
 
 
1245
# GLIB_PATH_PROG_WITH_TEST
 
1246
#----------------------------
 
1247
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
 
1248
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
 
1249
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
 
1250
[# Extract the first word of "$2", so it can be a program name with args.
 
1251
set dummy $2; ac_word=[$]2
 
1252
AC_MSG_CHECKING([for $ac_word])
 
1253
AC_CACHE_VAL(ac_cv_path_$1,
 
1254
[case "[$]$1" in
 
1255
  /*)
 
1256
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
 
1257
  ;;
 
1258
  *)
 
1259
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
 
1260
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
 
1261
    test -z "$ac_dir" && ac_dir=.
 
1262
    if test -f $ac_dir/$ac_word; then
 
1263
      if [$3]; then
 
1264
        ac_cv_path_$1="$ac_dir/$ac_word"
 
1265
        break
 
1266
      fi
 
1267
    fi
 
1268
  done
 
1269
  IFS="$ac_save_ifs"
 
1270
dnl If no 4th arg is given, leave the cache variable unset,
 
1271
dnl so AC_PATH_PROGS will keep looking.
 
1272
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
 
1273
])dnl
 
1274
  ;;
 
1275
esac])dnl
 
1276
$1="$ac_cv_path_$1"
 
1277
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
 
1278
  AC_MSG_RESULT([$]$1)
 
1279
else
 
1280
  AC_MSG_RESULT(no)
 
1281
fi
 
1282
AC_SUBST($1)dnl
 
1283
])
 
1284
 
 
1285
# GLIB_WITH_NLS
 
1286
#-----------------
 
1287
glib_DEFUN([GLIB_WITH_NLS],
 
1288
  dnl NLS is obligatory
 
1289
  [USE_NLS=yes
 
1290
    AC_SUBST(USE_NLS)
 
1291
 
 
1292
    gt_cv_have_gettext=no
 
1293
 
 
1294
    CATOBJEXT=NONE
 
1295
    XGETTEXT=:
 
1296
    INTLLIBS=
 
1297
 
 
1298
    AC_CHECK_HEADER(libintl.h,
 
1299
     [gt_cv_func_dgettext_libintl="no"
 
1300
      libintl_extra_libs=""
 
1301
 
 
1302
      #
 
1303
      # First check in libc
 
1304
      #
 
1305
      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
 
1306
        [AC_TRY_LINK([
 
1307
#include <libintl.h>
 
1308
],
 
1309
         [return !ngettext ("","", 1)],
 
1310
          gt_cv_func_ngettext_libc=yes,
 
1311
          gt_cv_func_ngettext_libc=no)
 
1312
        ])
 
1313
  
 
1314
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
 
1315
              AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
 
1316
                [AC_TRY_LINK([
 
1317
#include <libintl.h>
 
1318
],
 
1319
                  [return !dgettext ("","")],
 
1320
                  gt_cv_func_dgettext_libc=yes,
 
1321
                  gt_cv_func_dgettext_libc=no)
 
1322
                ])
 
1323
      fi
 
1324
  
 
1325
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
 
1326
        AC_CHECK_FUNCS(bind_textdomain_codeset)
 
1327
      fi
 
1328
 
 
1329
      #
 
1330
      # If we don't have everything we want, check in libintl
 
1331
      #
 
1332
      if test "$gt_cv_func_dgettext_libc" != "yes" \
 
1333
         || test "$gt_cv_func_ngettext_libc" != "yes" \
 
1334
         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
 
1335
        
 
1336
        AC_CHECK_LIB(intl, bindtextdomain,
 
1337
            [AC_CHECK_LIB(intl, ngettext,
 
1338
                    [AC_CHECK_LIB(intl, dgettext,
 
1339
                                  gt_cv_func_dgettext_libintl=yes)])])
 
1340
 
 
1341
        if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
 
1342
          AC_MSG_CHECKING([if -liconv is needed to use gettext])
 
1343
          AC_MSG_RESULT([])
 
1344
          AC_CHECK_LIB(intl, ngettext,
 
1345
                [AC_CHECK_LIB(intl, dcgettext,
 
1346
                       [gt_cv_func_dgettext_libintl=yes
 
1347
                        libintl_extra_libs=-liconv],
 
1348
                        :,-liconv)],
 
1349
                :,-liconv)
 
1350
        fi
 
1351
 
 
1352
        #
 
1353
        # If we found libintl, then check in it for bind_textdomain_codeset();
 
1354
        # we'll prefer libc if neither have bind_textdomain_codeset(),
 
1355
        # and both have dgettext and ngettext
 
1356
        #
 
1357
        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
 
1358
          glib_save_LIBS="$LIBS"
 
1359
          LIBS="$LIBS -lintl $libintl_extra_libs"
 
1360
          unset ac_cv_func_bind_textdomain_codeset
 
1361
          AC_CHECK_FUNCS(bind_textdomain_codeset)
 
1362
          LIBS="$glib_save_LIBS"
 
1363
 
 
1364
          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
 
1365
            gt_cv_func_dgettext_libc=no
 
1366
          else
 
1367
            if test "$gt_cv_func_dgettext_libc" = "yes" \
 
1368
                && test "$gt_cv_func_ngettext_libc" = "yes"; then
 
1369
              gt_cv_func_dgettext_libintl=no
 
1370
            fi
 
1371
          fi
 
1372
        fi
 
1373
      fi
 
1374
 
 
1375
      if test "$gt_cv_func_dgettext_libc" = "yes" \
 
1376
        || test "$gt_cv_func_dgettext_libintl" = "yes"; then
 
1377
        gt_cv_have_gettext=yes
 
1378
      fi
 
1379
  
 
1380
      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
 
1381
        INTLLIBS="-lintl $libintl_extra_libs"
 
1382
      fi
 
1383
  
 
1384
      if test "$gt_cv_have_gettext" = "yes"; then
 
1385
        AC_DEFINE(HAVE_GETTEXT,1,
 
1386
          [Define if the GNU gettext() function is already present or preinstalled.])
 
1387
        GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
 
1388
          [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
 
1389
        if test "$MSGFMT" != "no"; then
 
1390
          glib_save_LIBS="$LIBS"
 
1391
          LIBS="$LIBS $INTLLIBS"
 
1392
          AC_CHECK_FUNCS(dcgettext)
 
1393
          MSGFMT_OPTS=
 
1394
          AC_MSG_CHECKING([if msgfmt accepts -c])
 
1395
          GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
 
1396
msgid ""
 
1397
msgstr ""
 
1398
"Content-Type: text/plain; charset=UTF-8\n"
 
1399
"Project-Id-Version: test 1.0\n"
 
1400
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
 
1401
"Last-Translator: test <foo@bar.xx>\n"
 
1402
"Language-Team: C <LL@li.org>\n"
 
1403
"MIME-Version: 1.0\n"
 
1404
"Content-Transfer-Encoding: 8bit\n"
 
1405
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
 
1406
          AC_SUBST(MSGFMT_OPTS)
 
1407
          AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
 
1408
          GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
 
1409
            [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
 
1410
          AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
 
1411
                         return _nl_msg_cat_cntr],
 
1412
            [CATOBJEXT=.gmo 
 
1413
             DATADIRNAME=share],
 
1414
            [case $host in
 
1415
            *-*-solaris*)
 
1416
            dnl On Solaris, if bind_textdomain_codeset is in libc,
 
1417
            dnl GNU format message catalog is always supported,
 
1418
            dnl since both are added to the libc all together.
 
1419
            dnl Hence, we'd like to go with DATADIRNAME=share and
 
1420
            dnl and CATOBJEXT=.gmo in this case.
 
1421
            AC_CHECK_FUNC(bind_textdomain_codeset,
 
1422
              [CATOBJEXT=.gmo 
 
1423
               DATADIRNAME=share],
 
1424
              [CATOBJEXT=.mo
 
1425
               DATADIRNAME=lib])
 
1426
            ;;
 
1427
            *)
 
1428
            CATOBJEXT=.mo
 
1429
            DATADIRNAME=lib
 
1430
            ;;
 
1431
            esac])
 
1432
          LIBS="$glib_save_LIBS"
 
1433
          INSTOBJEXT=.mo
 
1434
        else
 
1435
          gt_cv_have_gettext=no
 
1436
        fi
 
1437
      fi
 
1438
    ])
 
1439
 
 
1440
    if test "$gt_cv_have_gettext" = "yes" ; then
 
1441
      AC_DEFINE(ENABLE_NLS, 1,
 
1442
        [always defined to indicate that i18n is enabled])
 
1443
    fi
 
1444
 
 
1445
    dnl Test whether we really found GNU xgettext.
 
1446
    if test "$XGETTEXT" != ":"; then
 
1447
      dnl If it is not GNU xgettext we define it as : so that the
 
1448
      dnl Makefiles still can work.
 
1449
      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
 
1450
        : ;
 
1451
      else
 
1452
        AC_MSG_RESULT(
 
1453
          [found xgettext program is not GNU xgettext; ignore it])
 
1454
        XGETTEXT=":"
 
1455
      fi
 
1456
    fi
 
1457
 
 
1458
    # We need to process the po/ directory.
 
1459
    POSUB=po
 
1460
 
 
1461
    AC_OUTPUT_COMMANDS(
 
1462
      [case "$CONFIG_FILES" in *po/Makefile.in*)
 
1463
        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
 
1464
      esac])
 
1465
 
 
1466
    dnl These rules are solely for the distribution goal.  While doing this
 
1467
    dnl we only have to keep exactly one list of the available catalogs
 
1468
    dnl in configure.ac.
 
1469
    for lang in $ALL_LINGUAS; do
 
1470
      GMOFILES="$GMOFILES $lang.gmo"
 
1471
      POFILES="$POFILES $lang.po"
 
1472
    done
 
1473
 
 
1474
    dnl Make all variables we use known to autoconf.
 
1475
    AC_SUBST(CATALOGS)
 
1476
    AC_SUBST(CATOBJEXT)
 
1477
    AC_SUBST(DATADIRNAME)
 
1478
    AC_SUBST(GMOFILES)
 
1479
    AC_SUBST(INSTOBJEXT)
 
1480
    AC_SUBST(INTLLIBS)
 
1481
    AC_SUBST(PO_IN_DATADIR_TRUE)
 
1482
    AC_SUBST(PO_IN_DATADIR_FALSE)
 
1483
    AC_SUBST(POFILES)
 
1484
    AC_SUBST(POSUB)
 
1485
  ])
 
1486
 
 
1487
# AM_GLIB_GNU_GETTEXT
 
1488
# -------------------
 
1489
# Do checks necessary for use of gettext. If a suitable implementation 
 
1490
# of gettext is found in either in libintl or in the C library,
 
1491
# it will set INTLLIBS to the libraries needed for use of gettext
 
1492
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
 
1493
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
 
1494
# on various variables needed by the Makefile.in.in installed by 
 
1495
# glib-gettextize.
 
1496
dnl
 
1497
glib_DEFUN([GLIB_GNU_GETTEXT],
 
1498
  [AC_REQUIRE([AC_PROG_CC])dnl
 
1499
   AC_REQUIRE([AC_HEADER_STDC])dnl
 
1500
   
 
1501
   GLIB_LC_MESSAGES
 
1502
   GLIB_WITH_NLS
 
1503
 
 
1504
   if test "$gt_cv_have_gettext" = "yes"; then
 
1505
     if test "x$ALL_LINGUAS" = "x"; then
 
1506
       LINGUAS=
 
1507
     else
 
1508
       AC_MSG_CHECKING(for catalogs to be installed)
 
1509
       NEW_LINGUAS=
 
1510
       for presentlang in $ALL_LINGUAS; do
 
1511
         useit=no
 
1512
         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
 
1513
           desiredlanguages="$LINGUAS"
 
1514
         else
 
1515
           desiredlanguages="$ALL_LINGUAS"
 
1516
         fi
 
1517
         for desiredlang in $desiredlanguages; do
 
1518
           # Use the presentlang catalog if desiredlang is
 
1519
           #   a. equal to presentlang, or
 
1520
           #   b. a variant of presentlang (because in this case,
 
1521
           #      presentlang can be used as a fallback for messages
 
1522
           #      which are not translated in the desiredlang catalog).
 
1523
           case "$desiredlang" in
 
1524
             "$presentlang"*) useit=yes;;
 
1525
           esac
 
1526
         done
 
1527
         if test $useit = yes; then
 
1528
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
 
1529
         fi
 
1530
       done
 
1531
       LINGUAS=$NEW_LINGUAS
 
1532
       AC_MSG_RESULT($LINGUAS)
 
1533
     fi
 
1534
 
 
1535
     dnl Construct list of names of catalog files to be constructed.
 
1536
     if test -n "$LINGUAS"; then
 
1537
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
 
1538
     fi
 
1539
   fi
 
1540
 
 
1541
   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
 
1542
   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
 
1543
   dnl Try to locate is.
 
1544
   MKINSTALLDIRS=
 
1545
   if test -n "$ac_aux_dir"; then
 
1546
     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
 
1547
   fi
 
1548
   if test -z "$MKINSTALLDIRS"; then
 
1549
     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
 
1550
   fi
 
1551
   AC_SUBST(MKINSTALLDIRS)
 
1552
 
 
1553
   dnl Generate list of files to be processed by xgettext which will
 
1554
   dnl be included in po/Makefile.
 
1555
   test -d po || mkdir po
 
1556
   if test "x$srcdir" != "x."; then
 
1557
     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
 
1558
       posrcprefix="$srcdir/"
 
1559
     else
 
1560
       posrcprefix="../$srcdir/"
 
1561
     fi
 
1562
   else
 
1563
     posrcprefix="../"
 
1564
   fi
 
1565
   rm -f po/POTFILES
 
1566
   sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
 
1567
        < $srcdir/po/POTFILES.in > po/POTFILES
 
1568
  ])
 
1569
 
 
1570
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
 
1571
# -------------------------------
 
1572
# Define VARIABLE to the location where catalog files will
 
1573
# be installed by po/Makefile.
 
1574
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
 
1575
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
 
1576
glib_save_prefix="$prefix"
 
1577
glib_save_exec_prefix="$exec_prefix"
 
1578
glib_save_datarootdir="$datarootdir"
 
1579
test "x$prefix" = xNONE && prefix=$ac_default_prefix
 
1580
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
 
1581
datarootdir=`eval echo "${datarootdir}"`
 
1582
if test "x$CATOBJEXT" = "x.mo" ; then
 
1583
  localedir=`eval echo "${libdir}/locale"`
 
1584
else
 
1585
  localedir=`eval echo "${datadir}/locale"`
 
1586
fi
 
1587
prefix="$glib_save_prefix"
 
1588
exec_prefix="$glib_save_exec_prefix"
 
1589
datarootdir="$glib_save_datarootdir"
 
1590
AC_DEFINE_UNQUOTED($1, "$localedir",
 
1591
  [Define the location where the catalogs will be installed])
 
1592
])
 
1593
 
 
1594
dnl
 
1595
dnl Now the definitions that aclocal will find
 
1596
dnl
 
1597
ifdef(glib_configure_ac,[],[
 
1598
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
 
1599
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
 
1600
])dnl
 
1601
 
 
1602
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
 
1603
 
1604
# Create a temporary file with TEST-FILE as its contents and pass the
 
1605
# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
 
1606
# 0 and perform ACTION-IF-FAIL for any other exit status.
 
1607
AC_DEFUN([GLIB_RUN_PROG],
 
1608
[cat >conftest.foo <<_ACEOF
 
1609
$2
 
1610
_ACEOF
 
1611
if AC_RUN_LOG([$1 conftest.foo]); then
 
1612
  m4_ifval([$3], [$3], [:])
 
1613
m4_ifvaln([$4], [else $4])dnl
 
1614
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
 
1615
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
 
1616
fi])
 
1617
 
 
1618
 
 
1619
 
 
1620
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
 
1621
# serial 40 IT_PROG_INTLTOOL
 
1622
AC_DEFUN([IT_PROG_INTLTOOL], [
 
1623
AC_PREREQ([2.50])dnl
 
1624
AC_REQUIRE([AM_NLS])dnl
 
1625
 
 
1626
case "$am__api_version" in
 
1627
    1.[01234])
 
1628
        AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
 
1629
    ;;
 
1630
    *)
 
1631
    ;;
 
1632
esac
 
1633
 
 
1634
if test -n "$1"; then
 
1635
    AC_MSG_CHECKING([for intltool >= $1])
 
1636
 
 
1637
    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
 
1638
    INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
 
1639
    [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
 
1640
    ]
 
1641
    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
 
1642
    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
 
1643
        AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
 
1644
fi
 
1645
 
 
1646
AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
 
1647
AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
 
1648
AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
 
1649
if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
 
1650
    AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
 
1651
fi
 
1652
 
 
1653
  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 $< [$]@' 
 
1654
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 $< [$]@' 
 
1655
     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 $< [$]@' 
 
1656
     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 $< [$]@' 
 
1657
      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
 
1658
     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 $< [$]@' 
 
1659
   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 $< [$]@' 
 
1660
    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 $< [$]@' 
 
1661
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 $< [$]@' 
 
1662
       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 $< [$]@' 
 
1663
      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 $< [$]@' 
 
1664
      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' 
 
1665
      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 $< [$]@' 
 
1666
      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 $< [$]@' 
 
1667
    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 $< [$]@' 
 
1668
  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 $< [$]@' 
 
1669
    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 $< [$]@' 
 
1670
    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 $< [$]@'
 
1671
   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 $< [$]@'
 
1672
 
 
1673
_IT_SUBST(INTLTOOL_DESKTOP_RULE)
 
1674
_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
 
1675
_IT_SUBST(INTLTOOL_KEYS_RULE)
 
1676
_IT_SUBST(INTLTOOL_PROP_RULE)
 
1677
_IT_SUBST(INTLTOOL_OAF_RULE)
 
1678
_IT_SUBST(INTLTOOL_PONG_RULE)
 
1679
_IT_SUBST(INTLTOOL_SERVER_RULE)
 
1680
_IT_SUBST(INTLTOOL_SHEET_RULE)
 
1681
_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
 
1682
_IT_SUBST(INTLTOOL_UI_RULE)
 
1683
_IT_SUBST(INTLTOOL_XAM_RULE)
 
1684
_IT_SUBST(INTLTOOL_KBD_RULE)
 
1685
_IT_SUBST(INTLTOOL_XML_RULE)
 
1686
_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
 
1687
_IT_SUBST(INTLTOOL_CAVES_RULE)
 
1688
_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
 
1689
_IT_SUBST(INTLTOOL_THEME_RULE)
 
1690
_IT_SUBST(INTLTOOL_SERVICE_RULE)
 
1691
_IT_SUBST(INTLTOOL_POLICY_RULE)
 
1692
 
 
1693
# Check the gettext tools to make sure they are GNU
 
1694
AC_PATH_PROG(XGETTEXT, xgettext)
 
1695
AC_PATH_PROG(MSGMERGE, msgmerge)
 
1696
AC_PATH_PROG(MSGFMT, msgfmt)
 
1697
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
 
1698
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
 
1699
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
 
1700
fi
 
1701
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
 
1702
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
 
1703
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
 
1704
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
 
1705
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
 
1706
fi
 
1707
 
 
1708
AC_PATH_PROG(INTLTOOL_PERL, perl)
 
1709
if test -z "$INTLTOOL_PERL"; then
 
1710
   AC_MSG_ERROR([perl not found])
 
1711
fi
 
1712
AC_MSG_CHECKING([for perl >= 5.8.1])
 
1713
$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
 
1714
if test $? -ne 0; then
 
1715
   AC_MSG_ERROR([perl 5.8.1 is required for intltool])
 
1716
else
 
1717
   IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
 
1718
   AC_MSG_RESULT([$IT_PERL_VERSION])
 
1719
fi
 
1720
if test "x$2" != "xno-xml"; then
 
1721
   AC_MSG_CHECKING([for XML::Parser])
 
1722
   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
 
1723
       AC_MSG_RESULT([ok])
 
1724
   else
 
1725
       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
 
1726
   fi
 
1727
fi
 
1728
 
 
1729
# Substitute ALL_LINGUAS so we can use it in po/Makefile
 
1730
AC_SUBST(ALL_LINGUAS)
 
1731
 
 
1732
# Set DATADIRNAME correctly if it is not set yet
 
1733
# (copied from glib-gettext.m4)
 
1734
if test -z "$DATADIRNAME"; then
 
1735
  AC_LINK_IFELSE(
 
1736
    [AC_LANG_PROGRAM([[]],
 
1737
                     [[extern int _nl_msg_cat_cntr;
 
1738
                       return _nl_msg_cat_cntr]])],
 
1739
    [DATADIRNAME=share],
 
1740
    [case $host in
 
1741
    *-*-solaris*)
 
1742
    dnl On Solaris, if bind_textdomain_codeset is in libc,
 
1743
    dnl GNU format message catalog is always supported,
 
1744
    dnl since both are added to the libc all together.
 
1745
    dnl Hence, we'd like to go with DATADIRNAME=share
 
1746
    dnl in this case.
 
1747
    AC_CHECK_FUNC(bind_textdomain_codeset,
 
1748
      [DATADIRNAME=share], [DATADIRNAME=lib])
 
1749
    ;;
 
1750
    *)
 
1751
    [DATADIRNAME=lib]
 
1752
    ;;
 
1753
    esac])
 
1754
fi
 
1755
AC_SUBST(DATADIRNAME)
 
1756
 
 
1757
IT_PO_SUBDIR([po])
 
1758
 
 
1759
])
 
1760
 
 
1761
 
 
1762
# IT_PO_SUBDIR(DIRNAME)
 
1763
# ---------------------
 
1764
# All po subdirs have to be declared with this macro; the subdir "po" is
 
1765
# declared by IT_PROG_INTLTOOL.
 
1766
#
 
1767
AC_DEFUN([IT_PO_SUBDIR],
 
1768
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
 
1769
dnl
 
1770
dnl The following CONFIG_COMMANDS should be executed at the very end
 
1771
dnl of config.status.
 
1772
AC_CONFIG_COMMANDS_PRE([
 
1773
  AC_CONFIG_COMMANDS([$1/stamp-it], [
 
1774
    if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
 
1775
       AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
 
1776
    fi
 
1777
    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
 
1778
    >"$1/stamp-it.tmp"
 
1779
    [sed '/^#/d
 
1780
         s/^[[].*] *//
 
1781
         /^[    ]*$/d
 
1782
        '"s|^|  $ac_top_srcdir/|" \
 
1783
      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
 
1784
    ]
 
1785
    [sed '/^POTFILES =/,/[^\\]$/ {
 
1786
                /^POTFILES =/!d
 
1787
                r $1/POTFILES
 
1788
          }
 
1789
         ' "$1/Makefile.in" >"$1/Makefile"]
 
1790
    rm -f "$1/Makefile.tmp"
 
1791
    mv "$1/stamp-it.tmp" "$1/stamp-it"
 
1792
  ])
 
1793
])dnl
 
1794
])
 
1795
 
 
1796
# _IT_SUBST(VARIABLE)
 
1797
# -------------------
 
1798
# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
 
1799
#
 
1800
AC_DEFUN([_IT_SUBST],
 
1801
[
 
1802
AC_SUBST([$1])
 
1803
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
 
1804
]
 
1805
)
 
1806
 
 
1807
# deprecated macros
 
1808
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
 
1809
# A hint is needed for aclocal from Automake <= 1.9.4:
 
1810
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
 
1811
 
 
1812