~ubuntu-branches/debian/squeeze/pyrenamer/squeeze

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Adolfo González Blázquez
  • Date: 2007-07-30 20:08:09 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070730200809-ddmgnjaczyu7qzgh
Tags: 0.3-1
* New upstream relase
* Added libxml-parser-perl to Build-Depends-Indep (intltool need it)

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
  AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL], [test "$enable_schemas_install" != no])
52
52
])
53
53
 
 
54
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
 
55
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
 
56
#
 
57
# This file is free software, distributed under the terms of the GNU
 
58
# General Public License.  As a special exception to the GNU General
 
59
# Public License, this file may be distributed as part of a program
 
60
# that contains a configuration script generated by Autoconf, under
 
61
# the same distribution terms as the rest of that program.
 
62
#
 
63
# This file can be copied and used freely without restrictions.  It can
 
64
# be used in projects which are not available under the GNU Public License
 
65
# but which still want to provide support for the GNU gettext functionality.
 
66
#
 
67
# Macro to add for using GNU gettext.
 
68
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
 
69
#
 
70
# Modified to never use included libintl. 
 
71
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
 
72
#
 
73
# Major rework to remove unused code
 
74
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
 
75
#
 
76
# Added better handling of ALL_LINGUAS from GNU gettext version 
 
77
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
 
78
#
 
79
# Modified to require ngettext
 
80
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
 
81
#
 
82
# We need this here as well, since someone might use autoconf-2.5x
 
83
# to configure GLib then an older version to configure a package
 
84
# using AM_GLIB_GNU_GETTEXT
 
85
AC_PREREQ(2.53)
 
86
 
 
87
dnl
 
88
dnl We go to great lengths to make sure that aclocal won't 
 
89
dnl try to pull in the installed version of these macros
 
90
dnl when running aclocal in the glib directory.
 
91
dnl
 
92
m4_copy([AC_DEFUN],[glib_DEFUN])
 
93
m4_copy([AC_REQUIRE],[glib_REQUIRE])
 
94
dnl
 
95
dnl At the end, if we're not within glib, we'll define the public
 
96
dnl definitions in terms of our private definitions.
 
97
dnl
 
98
 
 
99
# GLIB_LC_MESSAGES
 
100
#--------------------
 
101
glib_DEFUN([GLIB_LC_MESSAGES],
 
102
  [AC_CHECK_HEADERS([locale.h])
 
103
    if test $ac_cv_header_locale_h = yes; then
 
104
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
 
105
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
 
106
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
 
107
    if test $am_cv_val_LC_MESSAGES = yes; then
 
108
      AC_DEFINE(HAVE_LC_MESSAGES, 1,
 
109
        [Define if your <locale.h> file defines LC_MESSAGES.])
 
110
    fi
 
111
  fi])
 
112
 
 
113
# GLIB_PATH_PROG_WITH_TEST
 
114
#----------------------------
 
115
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
 
116
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
 
117
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
 
118
[# Extract the first word of "$2", so it can be a program name with args.
 
119
set dummy $2; ac_word=[$]2
 
120
AC_MSG_CHECKING([for $ac_word])
 
121
AC_CACHE_VAL(ac_cv_path_$1,
 
122
[case "[$]$1" in
 
123
  /*)
 
124
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
 
125
  ;;
 
126
  *)
 
127
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
 
128
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
 
129
    test -z "$ac_dir" && ac_dir=.
 
130
    if test -f $ac_dir/$ac_word; then
 
131
      if [$3]; then
 
132
        ac_cv_path_$1="$ac_dir/$ac_word"
 
133
        break
 
134
      fi
 
135
    fi
 
136
  done
 
137
  IFS="$ac_save_ifs"
 
138
dnl If no 4th arg is given, leave the cache variable unset,
 
139
dnl so AC_PATH_PROGS will keep looking.
 
140
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
 
141
])dnl
 
142
  ;;
 
143
esac])dnl
 
144
$1="$ac_cv_path_$1"
 
145
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
 
146
  AC_MSG_RESULT([$]$1)
 
147
else
 
148
  AC_MSG_RESULT(no)
 
149
fi
 
150
AC_SUBST($1)dnl
 
151
])
 
152
 
 
153
# GLIB_WITH_NLS
 
154
#-----------------
 
155
glib_DEFUN([GLIB_WITH_NLS],
 
156
  dnl NLS is obligatory
 
157
  [AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
158
    USE_NLS=yes
 
159
    AC_SUBST(USE_NLS)
 
160
 
 
161
    gt_cv_have_gettext=no
 
162
 
 
163
    CATOBJEXT=NONE
 
164
    XGETTEXT=:
 
165
    INTLLIBS=
 
166
 
 
167
    AC_CHECK_HEADER(libintl.h,
 
168
     [gt_cv_func_dgettext_libintl="no"
 
169
      libintl_extra_libs=""
 
170
 
 
171
      #
 
172
      # First check in libc
 
173
      #
 
174
      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
 
175
        [AC_TRY_LINK([
 
176
#include <libintl.h>
 
177
],
 
178
         [return !ngettext ("","", 1)],
 
179
          gt_cv_func_ngettext_libc=yes,
 
180
          gt_cv_func_ngettext_libc=no)
 
181
        ])
 
182
  
 
183
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
 
184
              AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
 
185
                [AC_TRY_LINK([
 
186
#include <libintl.h>
 
187
],
 
188
                  [return !dgettext ("","")],
 
189
                  gt_cv_func_dgettext_libc=yes,
 
190
                  gt_cv_func_dgettext_libc=no)
 
191
                ])
 
192
      fi
 
193
  
 
194
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
 
195
        AC_CHECK_FUNCS(bind_textdomain_codeset)
 
196
      fi
 
197
 
 
198
      #
 
199
      # If we don't have everything we want, check in libintl
 
200
      #
 
201
      if test "$gt_cv_func_dgettext_libc" != "yes" \
 
202
         || test "$gt_cv_func_ngettext_libc" != "yes" \
 
203
         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
 
204
        
 
205
        AC_CHECK_LIB(intl, bindtextdomain,
 
206
            [AC_CHECK_LIB(intl, ngettext,
 
207
                    [AC_CHECK_LIB(intl, dgettext,
 
208
                                  gt_cv_func_dgettext_libintl=yes)])])
 
209
 
 
210
        if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
 
211
          AC_MSG_CHECKING([if -liconv is needed to use gettext])
 
212
          AC_MSG_RESULT([])
 
213
          AC_CHECK_LIB(intl, ngettext,
 
214
                [AC_CHECK_LIB(intl, dcgettext,
 
215
                       [gt_cv_func_dgettext_libintl=yes
 
216
                        libintl_extra_libs=-liconv],
 
217
                        :,-liconv)],
 
218
                :,-liconv)
 
219
        fi
 
220
 
 
221
        #
 
222
        # If we found libintl, then check in it for bind_textdomain_codeset();
 
223
        # we'll prefer libc if neither have bind_textdomain_codeset(),
 
224
        # and both have dgettext and ngettext
 
225
        #
 
226
        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
 
227
          glib_save_LIBS="$LIBS"
 
228
          LIBS="$LIBS -lintl $libintl_extra_libs"
 
229
          unset ac_cv_func_bind_textdomain_codeset
 
230
          AC_CHECK_FUNCS(bind_textdomain_codeset)
 
231
          LIBS="$glib_save_LIBS"
 
232
 
 
233
          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
 
234
            gt_cv_func_dgettext_libc=no
 
235
          else
 
236
            if test "$gt_cv_func_dgettext_libc" = "yes" \
 
237
                && test "$gt_cv_func_ngettext_libc" = "yes"; then
 
238
              gt_cv_func_dgettext_libintl=no
 
239
            fi
 
240
          fi
 
241
        fi
 
242
      fi
 
243
 
 
244
      if test "$gt_cv_func_dgettext_libc" = "yes" \
 
245
        || test "$gt_cv_func_dgettext_libintl" = "yes"; then
 
246
        gt_cv_have_gettext=yes
 
247
      fi
 
248
  
 
249
      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
 
250
        INTLLIBS="-lintl $libintl_extra_libs"
 
251
      fi
 
252
  
 
253
      if test "$gt_cv_have_gettext" = "yes"; then
 
254
        AC_DEFINE(HAVE_GETTEXT,1,
 
255
          [Define if the GNU gettext() function is already present or preinstalled.])
 
256
        GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
 
257
          [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
 
258
        if test "$MSGFMT" != "no"; then
 
259
          glib_save_LIBS="$LIBS"
 
260
          LIBS="$LIBS $INTLLIBS"
 
261
          AC_CHECK_FUNCS(dcgettext)
 
262
          MSGFMT_OPTS=
 
263
          AC_MSG_CHECKING([if msgfmt accepts -c])
 
264
          GLIB_RUN_PROG([msgfmt -c -o /dev/null],[
 
265
msgid ""
 
266
msgstr ""
 
267
"Content-Type: text/plain; charset=UTF-8\n"
 
268
"Project-Id-Version: test 1.0\n"
 
269
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
 
270
"Last-Translator: test <foo@bar.xx>\n"
 
271
"Language-Team: C <LL@li.org>\n"
 
272
"MIME-Version: 1.0\n"
 
273
"Content-Transfer-Encoding: 8bit\n"
 
274
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
 
275
          AC_SUBST(MSGFMT_OPTS)
 
276
          AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
 
277
          GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
 
278
            [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
 
279
          AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
 
280
                         return _nl_msg_cat_cntr],
 
281
            [CATOBJEXT=.gmo 
 
282
             DATADIRNAME=share],
 
283
            [case $host in
 
284
            *-*-solaris*)
 
285
            dnl On Solaris, if bind_textdomain_codeset is in libc,
 
286
            dnl GNU format message catalog is always supported,
 
287
            dnl since both are added to the libc all together.
 
288
            dnl Hence, we'd like to go with DATADIRNAME=share and
 
289
            dnl and CATOBJEXT=.gmo in this case.
 
290
            AC_CHECK_FUNC(bind_textdomain_codeset,
 
291
              [CATOBJEXT=.gmo 
 
292
               DATADIRNAME=share],
 
293
              [CATOBJEXT=.mo
 
294
               DATADIRNAME=lib])
 
295
            ;;
 
296
            *)
 
297
            CATOBJEXT=.mo
 
298
            DATADIRNAME=lib
 
299
            ;;
 
300
            esac])
 
301
          LIBS="$glib_save_LIBS"
 
302
          INSTOBJEXT=.mo
 
303
        else
 
304
          gt_cv_have_gettext=no
 
305
        fi
 
306
      fi
 
307
    ])
 
308
 
 
309
    if test "$gt_cv_have_gettext" = "yes" ; then
 
310
      AC_DEFINE(ENABLE_NLS, 1,
 
311
        [always defined to indicate that i18n is enabled])
 
312
    fi
 
313
 
 
314
    dnl Test whether we really found GNU xgettext.
 
315
    if test "$XGETTEXT" != ":"; then
 
316
      dnl If it is not GNU xgettext we define it as : so that the
 
317
      dnl Makefiles still can work.
 
318
      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
 
319
        : ;
 
320
      else
 
321
        AC_MSG_RESULT(
 
322
          [found xgettext program is not GNU xgettext; ignore it])
 
323
        XGETTEXT=":"
 
324
      fi
 
325
    fi
 
326
 
 
327
    # We need to process the po/ directory.
 
328
    POSUB=po
 
329
 
 
330
    AC_OUTPUT_COMMANDS(
 
331
      [case "$CONFIG_FILES" in *po/Makefile.in*)
 
332
        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
 
333
      esac])
 
334
 
 
335
    dnl These rules are solely for the distribution goal.  While doing this
 
336
    dnl we only have to keep exactly one list of the available catalogs
 
337
    dnl in configure.in.
 
338
    for lang in $ALL_LINGUAS; do
 
339
      GMOFILES="$GMOFILES $lang.gmo"
 
340
      POFILES="$POFILES $lang.po"
 
341
    done
 
342
 
 
343
    dnl Make all variables we use known to autoconf.
 
344
    AC_SUBST(CATALOGS)
 
345
    AC_SUBST(CATOBJEXT)
 
346
    AC_SUBST(DATADIRNAME)
 
347
    AC_SUBST(GMOFILES)
 
348
    AC_SUBST(INSTOBJEXT)
 
349
    AC_SUBST(INTLLIBS)
 
350
    AC_SUBST(PO_IN_DATADIR_TRUE)
 
351
    AC_SUBST(PO_IN_DATADIR_FALSE)
 
352
    AC_SUBST(POFILES)
 
353
    AC_SUBST(POSUB)
 
354
  ])
 
355
 
 
356
# AM_GLIB_GNU_GETTEXT
 
357
# -------------------
 
358
# Do checks necessary for use of gettext. If a suitable implementation 
 
359
# of gettext is found in either in libintl or in the C library,
 
360
# it will set INTLLIBS to the libraries needed for use of gettext
 
361
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
 
362
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
 
363
# on various variables needed by the Makefile.in.in installed by 
 
364
# glib-gettextize.
 
365
dnl
 
366
glib_DEFUN([GLIB_GNU_GETTEXT],
 
367
  [AC_REQUIRE([AC_PROG_CC])dnl
 
368
   AC_REQUIRE([AC_HEADER_STDC])dnl
 
369
   
 
370
   GLIB_LC_MESSAGES
 
371
   GLIB_WITH_NLS
 
372
 
 
373
   if test "$gt_cv_have_gettext" = "yes"; then
 
374
     if test "x$ALL_LINGUAS" = "x"; then
 
375
       LINGUAS=
 
376
     else
 
377
       AC_MSG_CHECKING(for catalogs to be installed)
 
378
       NEW_LINGUAS=
 
379
       for presentlang in $ALL_LINGUAS; do
 
380
         useit=no
 
381
         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
 
382
           desiredlanguages="$LINGUAS"
 
383
         else
 
384
           desiredlanguages="$ALL_LINGUAS"
 
385
         fi
 
386
         for desiredlang in $desiredlanguages; do
 
387
           # Use the presentlang catalog if desiredlang is
 
388
           #   a. equal to presentlang, or
 
389
           #   b. a variant of presentlang (because in this case,
 
390
           #      presentlang can be used as a fallback for messages
 
391
           #      which are not translated in the desiredlang catalog).
 
392
           case "$desiredlang" in
 
393
             "$presentlang"*) useit=yes;;
 
394
           esac
 
395
         done
 
396
         if test $useit = yes; then
 
397
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
 
398
         fi
 
399
       done
 
400
       LINGUAS=$NEW_LINGUAS
 
401
       AC_MSG_RESULT($LINGUAS)
 
402
     fi
 
403
 
 
404
     dnl Construct list of names of catalog files to be constructed.
 
405
     if test -n "$LINGUAS"; then
 
406
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
 
407
     fi
 
408
   fi
 
409
 
 
410
   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
 
411
   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
 
412
   dnl Try to locate is.
 
413
   MKINSTALLDIRS=
 
414
   if test -n "$ac_aux_dir"; then
 
415
     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
 
416
   fi
 
417
   if test -z "$MKINSTALLDIRS"; then
 
418
     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
 
419
   fi
 
420
   AC_SUBST(MKINSTALLDIRS)
 
421
 
 
422
   dnl Generate list of files to be processed by xgettext which will
 
423
   dnl be included in po/Makefile.
 
424
   test -d po || mkdir po
 
425
   if test "x$srcdir" != "x."; then
 
426
     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
 
427
       posrcprefix="$srcdir/"
 
428
     else
 
429
       posrcprefix="../$srcdir/"
 
430
     fi
 
431
   else
 
432
     posrcprefix="../"
 
433
   fi
 
434
   rm -f po/POTFILES
 
435
   sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
 
436
        < $srcdir/po/POTFILES.in > po/POTFILES
 
437
  ])
 
438
 
 
439
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
 
440
# -------------------------------
 
441
# Define VARIABLE to the location where catalog files will
 
442
# be installed by po/Makefile.
 
443
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
 
444
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
 
445
glib_save_prefix="$prefix"
 
446
glib_save_exec_prefix="$exec_prefix"
 
447
glib_save_datarootdir="$datarootdir"
 
448
test "x$prefix" = xNONE && prefix=$ac_default_prefix
 
449
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
 
450
datarootdir=`eval echo "${datarootdir}"`
 
451
if test "x$CATOBJEXT" = "x.mo" ; then
 
452
  localedir=`eval echo "${libdir}/locale"`
 
453
else
 
454
  localedir=`eval echo "${datadir}/locale"`
 
455
fi
 
456
prefix="$glib_save_prefix"
 
457
exec_prefix="$glib_save_exec_prefix"
 
458
datarootdir="$glib_save_datarootdir"
 
459
AC_DEFINE_UNQUOTED($1, "$localedir",
 
460
  [Define the location where the catalogs will be installed])
 
461
])
 
462
 
 
463
dnl
 
464
dnl Now the definitions that aclocal will find
 
465
dnl
 
466
ifdef(glib_configure_in,[],[
 
467
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
 
468
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
 
469
])dnl
 
470
 
 
471
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
 
472
 
473
# Create a temporary file with TEST-FILE as its contents and pass the
 
474
# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
 
475
# 0 and perform ACTION-IF-FAIL for any other exit status.
 
476
AC_DEFUN([GLIB_RUN_PROG],
 
477
[cat >conftest.foo <<_ACEOF
 
478
$2
 
479
_ACEOF
 
480
if AC_RUN_LOG([$1 conftest.foo]); then
 
481
  m4_ifval([$3], [$3], [:])
 
482
m4_ifvaln([$4], [else $4])dnl
 
483
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
 
484
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
 
485
fi])
 
486
 
 
487
 
 
488
 
 
489
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
 
490
# serial 35 IT_PROG_INTLTOOL
 
491
AC_DEFUN([IT_PROG_INTLTOOL],
 
492
[AC_PREREQ([2.50])dnl
 
493
 
 
494
case "$am__api_version" in
 
495
    1.[01234])
 
496
        AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
 
497
    ;;
 
498
    *)
 
499
    ;;
 
500
esac
 
501
 
 
502
if test -n "$1"; then
 
503
    AC_MSG_CHECKING(for intltool >= $1)
 
504
 
 
505
    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
 
506
    INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in`
 
507
    [INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($ 2, VERSION, "."); print VERSION[1] * 1000 + VERSION[2] * 100 + VERSION[3];}' ${ac_aux_dir}/intltool-update.in`
 
508
    ]
 
509
    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
 
510
    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
 
511
        AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
 
512
fi
 
513
 
 
514
  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 $< [$]@' 
 
515
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 $< [$]@' 
 
516
     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 $< [$]@' 
 
517
     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 $< [$]@' 
 
518
      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
 
519
     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 $< [$]@' 
 
520
   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 $< [$]@' 
 
521
    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 $< [$]@' 
 
522
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 $< [$]@' 
 
523
       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 $< [$]@' 
 
524
      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 $< [$]@' 
 
525
      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' 
 
526
      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 $< [$]@' 
 
527
      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 $< [$]@' 
 
528
    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 $< [$]@' 
 
529
  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 $< [$]@' 
 
530
    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 $< [$]@' 
 
531
    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 $< [$]@'
 
532
 
 
533
AC_SUBST(INTLTOOL_DESKTOP_RULE)
 
534
AC_SUBST(INTLTOOL_DIRECTORY_RULE)
 
535
AC_SUBST(INTLTOOL_KEYS_RULE)
 
536
AC_SUBST(INTLTOOL_PROP_RULE)
 
537
AC_SUBST(INTLTOOL_OAF_RULE)
 
538
AC_SUBST(INTLTOOL_PONG_RULE)
 
539
AC_SUBST(INTLTOOL_SERVER_RULE)
 
540
AC_SUBST(INTLTOOL_SHEET_RULE)
 
541
AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
 
542
AC_SUBST(INTLTOOL_UI_RULE)
 
543
AC_SUBST(INTLTOOL_XAM_RULE)
 
544
AC_SUBST(INTLTOOL_KBD_RULE)
 
545
AC_SUBST(INTLTOOL_XML_RULE)
 
546
AC_SUBST(INTLTOOL_XML_NOMERGE_RULE)
 
547
AC_SUBST(INTLTOOL_CAVES_RULE)
 
548
AC_SUBST(INTLTOOL_SCHEMAS_RULE)
 
549
AC_SUBST(INTLTOOL_THEME_RULE)
 
550
AC_SUBST(INTLTOOL_SERVICE_RULE)
 
551
 
 
552
# Use the tools built into the package, not the ones that are installed.
 
553
AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract')
 
554
AC_SUBST(INTLTOOL_MERGE, '$(top_builddir)/intltool-merge')
 
555
AC_SUBST(INTLTOOL_UPDATE, '$(top_builddir)/intltool-update')
 
556
 
 
557
AC_PATH_PROG(INTLTOOL_PERL, perl)
 
558
if test -z "$INTLTOOL_PERL"; then
 
559
   AC_MSG_ERROR([perl not found; required for intltool])
 
560
fi
 
561
if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
 
562
   AC_MSG_ERROR([perl 5.x required for intltool])
 
563
fi
 
564
if test "x$2" != "xno-xml"; then
 
565
   AC_MSG_CHECKING([for XML::Parser])
 
566
   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
 
567
       AC_MSG_RESULT([ok])
 
568
   else
 
569
       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
 
570
   fi
 
571
fi
 
572
 
 
573
AC_PATH_PROG(INTLTOOL_ICONV, iconv, iconv)
 
574
AC_PATH_PROG(INTLTOOL_MSGFMT, msgfmt, msgfmt)
 
575
AC_PATH_PROG(INTLTOOL_MSGMERGE, msgmerge, msgmerge)
 
576
AC_PATH_PROG(INTLTOOL_XGETTEXT, xgettext, xgettext)
 
577
 
 
578
# Substitute ALL_LINGUAS so we can use it in po/Makefile
 
579
AC_SUBST(ALL_LINGUAS)
 
580
 
 
581
# Set DATADIRNAME correctly if it is not set yet
 
582
# (copied from glib-gettext.m4)
 
583
if test -z "$DATADIRNAME"; then
 
584
  AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
 
585
                 return _nl_msg_cat_cntr],
 
586
    [DATADIRNAME=share],
 
587
    [case $host in
 
588
    *-*-solaris*)
 
589
    dnl On Solaris, if bind_textdomain_codeset is in libc,
 
590
    dnl GNU format message catalog is always supported,
 
591
    dnl since both are added to the libc all together.
 
592
    dnl Hence, we'd like to go with DATADIRNAME=share
 
593
    dnl in this case.
 
594
    AC_CHECK_FUNC(bind_textdomain_codeset,
 
595
      [DATADIRNAME=share], [DATADIRNAME=lib])
 
596
    ;;
 
597
    *)
 
598
    [DATADIRNAME=lib]
 
599
    ;;
 
600
    esac])
 
601
fi
 
602
AC_SUBST(DATADIRNAME)
 
603
 
 
604
IT_PO_SUBDIR([po])
 
605
 
 
606
dnl The following is very similar to
 
607
dnl
 
608
dnl     AC_CONFIG_FILES([intltool-extract intltool-merge intltool-update])
 
609
dnl
 
610
dnl with the following slight differences:
 
611
dnl  - the *.in files are in ac_aux_dir,
 
612
dnl  - if the file haven't changed upon reconfigure, it's not touched,
 
613
dnl  - the evaluation of the third parameter enables a hack which computes
 
614
dnl    the actual value of $libdir,
 
615
dnl  - the user sees "executing intltool commands", instead of
 
616
dnl    "creating intltool-extract" and such.
 
617
dnl
 
618
dnl Nothing crucial here, and we could use AC_CONFIG_FILES, if there were
 
619
dnl a reason for it.
 
620
 
 
621
AC_CONFIG_COMMANDS([intltool], [
 
622
 
 
623
for file in intltool-extract intltool-merge intltool-update; do
 
624
  sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \
 
625
      -e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \
 
626
      -e "s|@INTLTOOL_ICONV@|${INTLTOOL_ICONV}|g" \
 
627
      -e "s|@INTLTOOL_MSGFMT@|${INTLTOOL_MSGFMT}|g" \
 
628
      -e "s|@INTLTOOL_MSGMERGE@|${INTLTOOL_MSGMERGE}|g" \
 
629
      -e "s|@INTLTOOL_XGETTEXT@|${INTLTOOL_XGETTEXT}|g" \
 
630
      -e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \
 
631
        < ${ac_aux_dir}/${file}.in > ${file}.out
 
632
  if cmp -s ${file} ${file}.out 2>/dev/null; then
 
633
    rm -f ${file}.out
 
634
  else
 
635
    mv -f ${file}.out ${file}
 
636
  fi
 
637
  chmod ugo+x ${file}
 
638
  chmod u+w ${file}
 
639
done
 
640
 
 
641
],
 
642
[INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}'
 
643
prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir" 
 
644
INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}' INTLTOOL_ICONV='${INTLTOOL_ICONV}'
 
645
INTLTOOL_MSGFMT='${INTLTOOL_MSGFMT}' INTLTOOL_MSGMERGE='${INTLTOOL_MSGMERGE}'
 
646
INTLTOOL_XGETTEXT='${INTLTOOL_XGETTEXT}'])
 
647
 
 
648
])
 
649
 
 
650
 
 
651
# IT_PO_SUBDIR(DIRNAME)
 
652
# ---------------------
 
653
# All po subdirs have to be declared with this macro; the subdir "po" is
 
654
# declared by IT_PROG_INTLTOOL.
 
655
#
 
656
AC_DEFUN([IT_PO_SUBDIR],
 
657
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
 
658
dnl
 
659
dnl The following CONFIG_COMMANDS should be exetuted at the very end
 
660
dnl of config.status.
 
661
AC_CONFIG_COMMANDS_PRE([
 
662
  AC_CONFIG_COMMANDS([$1/stamp-it], [
 
663
    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
 
664
    >"$1/stamp-it.tmp"
 
665
    [sed '/^#/d
 
666
         s/^[[].*] *//
 
667
         /^[    ]*$/d
 
668
        '"s|^|  $ac_top_srcdir/|" \
 
669
      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
 
670
    ]
 
671
    if test ! -f "$1/Makefile"; then
 
672
      AC_MSG_ERROR([$1/Makefile is not ready.])
 
673
    fi
 
674
    mv "$1/Makefile" "$1/Makefile.tmp"
 
675
    [sed '/^POTFILES =/,/[^\\]$/ {
 
676
                /^POTFILES =/!d
 
677
                r $1/POTFILES
 
678
          }
 
679
         ' "$1/Makefile.tmp" >"$1/Makefile"]
 
680
    rm -f "$1/Makefile.tmp"
 
681
    mv "$1/stamp-it.tmp" "$1/stamp-it"
 
682
  ])
 
683
])dnl
 
684
])
 
685
 
 
686
 
 
687
# deprecated macros
 
688
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
 
689
# A hint is needed for aclocal from Automake <= 1.9.4:
 
690
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
 
691
 
 
692
 
54
693
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
55
694
56
695
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
314
953
Usually this means the macro was only invoked conditionally.]])
315
954
fi])])
316
955
 
 
956
 
 
957
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
 
958
# Free Software Foundation, Inc.
 
959
#
 
960
# This file is free software; the Free Software Foundation
 
961
# gives unlimited permission to copy and/or distribute it,
 
962
# with or without modifications, as long as this notice is preserved.
 
963
 
 
964
# serial 8
 
965
 
 
966
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
 
967
# written in clear, in which case automake, when reading aclocal.m4,
 
968
# will think it sees a *use*, and therefore will trigger all it's
 
969
# C support machinery.  Also note that it means that autoscan, seeing
 
970
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
 
971
 
 
972
 
 
973
# _AM_DEPENDENCIES(NAME)
 
974
# ----------------------
 
975
# See how the compiler implements dependency checking.
 
976
# NAME is "CC", "CXX", "GCJ", or "OBJC".
 
977
# We try a few techniques and use that to set a single cache variable.
 
978
#
 
979
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
 
980
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
 
981
# dependency, and given that the user is not expected to run this macro,
 
982
# just rely on AC_PROG_CC.
 
983
AC_DEFUN([_AM_DEPENDENCIES],
 
984
[AC_REQUIRE([AM_SET_DEPDIR])dnl
 
985
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
 
986
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
 
987
AC_REQUIRE([AM_DEP_TRACK])dnl
 
988
 
 
989
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
 
990
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
 
991
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
 
992
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
 
993
                   [depcc="$$1"   am_compiler_list=])
 
994
 
 
995
AC_CACHE_CHECK([dependency style of $depcc],
 
996
               [am_cv_$1_dependencies_compiler_type],
 
997
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
 
998
  # We make a subdir and do the tests there.  Otherwise we can end up
 
999
  # making bogus files that we don't know about and never remove.  For
 
1000
  # instance it was reported that on HP-UX the gcc test will end up
 
1001
  # making a dummy file named `D' -- because `-MD' means `put the output
 
1002
  # in D'.
 
1003
  mkdir conftest.dir
 
1004
  # Copy depcomp to subdir because otherwise we won't find it if we're
 
1005
  # using a relative directory.
 
1006
  cp "$am_depcomp" conftest.dir
 
1007
  cd conftest.dir
 
1008
  # We will build objects and dependencies in a subdirectory because
 
1009
  # it helps to detect inapplicable dependency modes.  For instance
 
1010
  # both Tru64's cc and ICC support -MD to output dependencies as a
 
1011
  # side effect of compilation, but ICC will put the dependencies in
 
1012
  # the current directory while Tru64 will put them in the object
 
1013
  # directory.
 
1014
  mkdir sub
 
1015
 
 
1016
  am_cv_$1_dependencies_compiler_type=none
 
1017
  if test "$am_compiler_list" = ""; then
 
1018
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
 
1019
  fi
 
1020
  for depmode in $am_compiler_list; do
 
1021
    # Setup a source with many dependencies, because some compilers
 
1022
    # like to wrap large dependency lists on column 80 (with \), and
 
1023
    # we should not choose a depcomp mode which is confused by this.
 
1024
    #
 
1025
    # We need to recreate these files for each test, as the compiler may
 
1026
    # overwrite some of them when testing with obscure command lines.
 
1027
    # This happens at least with the AIX C compiler.
 
1028
    : > sub/conftest.c
 
1029
    for i in 1 2 3 4 5 6; do
 
1030
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
 
1031
      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
 
1032
      # Solaris 8's {/usr,}/bin/sh.
 
1033
      touch sub/conftst$i.h
 
1034
    done
 
1035
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
1036
 
 
1037
    case $depmode in
 
1038
    nosideeffect)
 
1039
      # after this tag, mechanisms are not by side-effect, so they'll
 
1040
      # only be used when explicitly requested
 
1041
      if test "x$enable_dependency_tracking" = xyes; then
 
1042
        continue
 
1043
      else
 
1044
        break
 
1045
      fi
 
1046
      ;;
 
1047
    none) break ;;
 
1048
    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
    if depmode=$depmode \
 
1053
       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
 
1054
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
 
1055
       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
 
1056
         >/dev/null 2>conftest.err &&
 
1057
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
 
1058
       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
 
1059
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
 
1060
      # icc doesn't choke on unknown options, it will just issue warnings
 
1061
      # or remarks (even with -Werror).  So we grep stderr for any message
 
1062
      # that says an option was ignored or not supported.
 
1063
      # When given -MP, icc 7.0 and 7.1 complain thusly:
 
1064
      #   icc: Command line warning: ignoring option '-M'; no argument required
 
1065
      # The diagnosis changed in icc 8.0:
 
1066
      #   icc: Command line remark: option '-MP' not supported
 
1067
      if (grep 'ignoring option' conftest.err ||
 
1068
          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
 
1069
        am_cv_$1_dependencies_compiler_type=$depmode
 
1070
        break
 
1071
      fi
 
1072
    fi
 
1073
  done
 
1074
 
 
1075
  cd ..
 
1076
  rm -rf conftest.dir
 
1077
else
 
1078
  am_cv_$1_dependencies_compiler_type=none
 
1079
fi
 
1080
])
 
1081
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
 
1082
AM_CONDITIONAL([am__fastdep$1], [
 
1083
  test "x$enable_dependency_tracking" != xno \
 
1084
  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
 
1085
])
 
1086
 
 
1087
 
 
1088
# AM_SET_DEPDIR
 
1089
# -------------
 
1090
# Choose a directory name for dependency files.
 
1091
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
 
1092
AC_DEFUN([AM_SET_DEPDIR],
 
1093
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 
1094
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
 
1095
])
 
1096
 
 
1097
 
 
1098
# AM_DEP_TRACK
 
1099
# ------------
 
1100
AC_DEFUN([AM_DEP_TRACK],
 
1101
[AC_ARG_ENABLE(dependency-tracking,
 
1102
[  --disable-dependency-tracking  speeds up one-time build
 
1103
  --enable-dependency-tracking   do not reject slow dependency extractors])
 
1104
if test "x$enable_dependency_tracking" != xno; then
 
1105
  am_depcomp="$ac_aux_dir/depcomp"
 
1106
  AMDEPBACKSLASH='\'
 
1107
fi
 
1108
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
 
1109
AC_SUBST([AMDEPBACKSLASH])
 
1110
])
 
1111
 
 
1112
# Generate code to set up dependency tracking.              -*- Autoconf -*-
 
1113
 
 
1114
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
 
1115
# Free Software Foundation, Inc.
 
1116
#
 
1117
# This file is free software; the Free Software Foundation
 
1118
# gives unlimited permission to copy and/or distribute it,
 
1119
# with or without modifications, as long as this notice is preserved.
 
1120
 
 
1121
#serial 3
 
1122
 
 
1123
# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
1124
# ------------------------------
 
1125
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
 
1126
[for mf in $CONFIG_FILES; do
 
1127
  # Strip MF so we end up with the name of the file.
 
1128
  mf=`echo "$mf" | sed -e 's/:.*$//'`
 
1129
  # Check whether this is an Automake generated Makefile or not.
 
1130
  # We used to match only the files named `Makefile.in', but
 
1131
  # some people rename them; so instead we look at the file content.
 
1132
  # Grep'ing the first line is not enough: some people post-process
 
1133
  # each Makefile.in and add a new line on top of each file to say so.
 
1134
  # So let's grep whole file.
 
1135
  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
 
1136
    dirpart=`AS_DIRNAME("$mf")`
 
1137
  else
 
1138
    continue
 
1139
  fi
 
1140
  # Extract the definition of DEPDIR, am__include, and am__quote
 
1141
  # from the Makefile without running `make'.
 
1142
  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
 
1143
  test -z "$DEPDIR" && continue
 
1144
  am__include=`sed -n 's/^am__include = //p' < "$mf"`
 
1145
  test -z "am__include" && continue
 
1146
  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
 
1147
  # When using ansi2knr, U may be empty or an underscore; expand it
 
1148
  U=`sed -n 's/^U = //p' < "$mf"`
 
1149
  # Find all dependency output files, they are included files with
 
1150
  # $(DEPDIR) in their names.  We invoke sed twice because it is the
 
1151
  # simplest approach to changing $(DEPDIR) to its actual value in the
 
1152
  # expansion.
 
1153
  for file in `sed -n "
 
1154
    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
 
1155
       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
 
1156
    # Make sure the directory exists.
 
1157
    test -f "$dirpart/$file" && continue
 
1158
    fdir=`AS_DIRNAME(["$file"])`
 
1159
    AS_MKDIR_P([$dirpart/$fdir])
 
1160
    # echo "creating $dirpart/$file"
 
1161
    echo '# dummy' > "$dirpart/$file"
 
1162
  done
 
1163
done
 
1164
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
1165
 
 
1166
 
 
1167
# AM_OUTPUT_DEPENDENCY_COMMANDS
 
1168
# -----------------------------
 
1169
# This macro should only be invoked once -- use via AC_REQUIRE.
 
1170
#
 
1171
# This code is only required when automatic dependency tracking
 
1172
# is enabled.  FIXME.  This creates each `.P' file that we will
 
1173
# need in order to bootstrap the dependency handling code.
 
1174
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 
1175
[AC_CONFIG_COMMANDS([depfiles],
 
1176
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
 
1177
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
 
1178
])
 
1179
 
317
1180
# Do all the work for Automake.                             -*- Autoconf -*-
318
1181
 
319
1182
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
492
1355
 
493
1356
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
494
1357
 
 
1358
# Check to see how 'make' treats includes.                  -*- Autoconf -*-
 
1359
 
 
1360
# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
 
1361
#
 
1362
# This file is free software; the Free Software Foundation
 
1363
# gives unlimited permission to copy and/or distribute it,
 
1364
# with or without modifications, as long as this notice is preserved.
 
1365
 
 
1366
# serial 3
 
1367
 
 
1368
# AM_MAKE_INCLUDE()
 
1369
# -----------------
 
1370
# Check to see how make treats includes.
 
1371
AC_DEFUN([AM_MAKE_INCLUDE],
 
1372
[am_make=${MAKE-make}
 
1373
cat > confinc << 'END'
 
1374
am__doit:
 
1375
        @echo done
 
1376
.PHONY: am__doit
 
1377
END
 
1378
# If we don't find an include directive, just comment out the code.
 
1379
AC_MSG_CHECKING([for style of include used by $am_make])
 
1380
am__include="#"
 
1381
am__quote=
 
1382
_am_result=none
 
1383
# First try GNU make style include.
 
1384
echo "include confinc" > confmf
 
1385
# We grep out `Entering directory' and `Leaving directory'
 
1386
# messages which can occur if `w' ends up in MAKEFLAGS.
 
1387
# In particular we don't look at `^make:' because GNU make might
 
1388
# be invoked under some other name (usually "gmake"), in which
 
1389
# case it prints its new name instead of `make'.
 
1390
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
 
1391
   am__include=include
 
1392
   am__quote=
 
1393
   _am_result=GNU
 
1394
fi
 
1395
# Now try BSD make style include.
 
1396
if test "$am__include" = "#"; then
 
1397
   echo '.include "confinc"' > confmf
 
1398
   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
 
1399
      am__include=.include
 
1400
      am__quote="\""
 
1401
      _am_result=BSD
 
1402
   fi
 
1403
fi
 
1404
AC_SUBST([am__include])
 
1405
AC_SUBST([am__quote])
 
1406
AC_MSG_RESULT([$_am_result])
 
1407
rm -f confinc confmf
 
1408
])
 
1409
 
495
1410
# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
496
1411
 
497
1412
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005