source: projects/vine-notify-update/aclocal.m4 @ 9739

Revision 9739, 92.0 KB checked in by tomop, 7 years ago (diff)

0.9.0

Line 
1# generated automatically by aclocal 1.14.1 -*- Autoconf -*-
2
3# Copyright (C) 1996-2013 Free Software Foundation, Inc.
4
5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it,
7# with or without modifications, as long as this notice is preserved.
8
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12# PARTICULAR PURPOSE.
13
14m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15m4_ifndef([AC_AUTOCONF_VERSION],
16  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
18[m4_warning([this file was generated for autoconf 2.69.
19You have another version of autoconf.  It may work, but is not guaranteed to.
20If you have problems, you may need to regenerate the build system entirely.
21To do so, use the procedure documented by the package, typically 'autoreconf'.])])
22
23# gettext.m4 serial 66 (gettext-0.18.2)
24dnl Copyright (C) 1995-2013 Free Software Foundation, Inc.
25dnl This file is free software; the Free Software Foundation
26dnl gives unlimited permission to copy and/or distribute it,
27dnl with or without modifications, as long as this notice is preserved.
28dnl
29dnl This file can can be used in projects which are not available under
30dnl the GNU General Public License or the GNU Library General Public
31dnl License but which still want to provide support for the GNU gettext
32dnl functionality.
33dnl Please note that the actual code of the GNU gettext library is covered
34dnl by the GNU Library General Public License, and the rest of the GNU
35dnl gettext package package is covered by the GNU General Public License.
36dnl They are *not* in the public domain.
37
38dnl Authors:
39dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
40dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2006, 2008-2010.
41
42dnl Macro to add for using GNU gettext.
43
44dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
45dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
46dnl    default (if it is not specified or empty) is 'no-libtool'.
47dnl    INTLSYMBOL should be 'external' for packages with no intl directory,
48dnl    and 'no-libtool' or 'use-libtool' for packages with an intl directory.
49dnl    If INTLSYMBOL is 'use-libtool', then a libtool library
50dnl    $(top_builddir)/intl/libintl.la will be created (shared and/or static,
51dnl    depending on --{enable,disable}-{shared,static} and on the presence of
52dnl    AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
53dnl    $(top_builddir)/intl/libintl.a will be created.
54dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
55dnl    implementations (in libc or libintl) without the ngettext() function
56dnl    will be ignored.  If NEEDSYMBOL is specified and is
57dnl    'need-formatstring-macros', then GNU gettext implementations that don't
58dnl    support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
59dnl INTLDIR is used to find the intl libraries.  If empty,
60dnl    the value '$(top_builddir)/intl/' is used.
61dnl
62dnl The result of the configuration is one of three cases:
63dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
64dnl    and used.
65dnl    Catalog format: GNU --> install in $(datadir)
66dnl    Catalog extension: .mo after installation, .gmo in source tree
67dnl 2) GNU gettext has been found in the system's C library.
68dnl    Catalog format: GNU --> install in $(datadir)
69dnl    Catalog extension: .mo after installation, .gmo in source tree
70dnl 3) No internationalization, always use English msgid.
71dnl    Catalog format: none
72dnl    Catalog extension: none
73dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
74dnl The use of .gmo is historical (it was needed to avoid overwriting the
75dnl GNU format catalogs when building on a platform with an X/Open gettext),
76dnl but we keep it in order not to force irrelevant filename changes on the
77dnl maintainers.
78dnl
79AC_DEFUN([AM_GNU_GETTEXT],
80[
81  dnl Argument checking.
82  ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
83    [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
84])])])])])
85  ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old],
86    [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])])
87  ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
88    [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
89])])])])
90  define([gt_included_intl],
91    ifelse([$1], [external],
92      ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
93      [yes]))
94  define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
95  gt_NEEDS_INIT
96  AM_GNU_GETTEXT_NEED([$2])
97
98  AC_REQUIRE([AM_PO_SUBDIRS])dnl
99  ifelse(gt_included_intl, yes, [
100    AC_REQUIRE([AM_INTL_SUBDIR])dnl
101  ])
102
103  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
104  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
105  AC_REQUIRE([AC_LIB_RPATH])
106
107  dnl Sometimes libintl requires libiconv, so first search for libiconv.
108  dnl Ideally we would do this search only after the
109  dnl      if test "$USE_NLS" = "yes"; then
110  dnl        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
111  dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
112  dnl the configure script would need to contain the same shell code
113  dnl again, outside any 'if'. There are two solutions:
114  dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
115  dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
116  dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
117  dnl documented, we avoid it.
118  ifelse(gt_included_intl, yes, , [
119    AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
120  ])
121
122  dnl Sometimes, on Mac OS X, libintl requires linking with CoreFoundation.
123  gt_INTL_MACOSX
124
125  dnl Set USE_NLS.
126  AC_REQUIRE([AM_NLS])
127
128  ifelse(gt_included_intl, yes, [
129    BUILD_INCLUDED_LIBINTL=no
130    USE_INCLUDED_LIBINTL=no
131  ])
132  LIBINTL=
133  LTLIBINTL=
134  POSUB=
135
136  dnl Add a version number to the cache macros.
137  case " $gt_needs " in
138    *" need-formatstring-macros "*) gt_api_version=3 ;;
139    *" need-ngettext "*) gt_api_version=2 ;;
140    *) gt_api_version=1 ;;
141  esac
142  gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
143  gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
144
145  dnl If we use NLS figure out what method
146  if test "$USE_NLS" = "yes"; then
147    gt_use_preinstalled_gnugettext=no
148    ifelse(gt_included_intl, yes, [
149      AC_MSG_CHECKING([whether included gettext is requested])
150      AC_ARG_WITH([included-gettext],
151        [  --with-included-gettext use the GNU gettext library included here],
152        nls_cv_force_use_gnu_gettext=$withval,
153        nls_cv_force_use_gnu_gettext=no)
154      AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext])
155
156      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
157      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
158    ])
159        dnl User does not insist on using GNU NLS library.  Figure out what
160        dnl to use.  If GNU gettext is available we use this.  Else we have
161        dnl to fall back to GNU NLS library.
162
163        if test $gt_api_version -ge 3; then
164          gt_revision_test_code='
165#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
166#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
167#endif
168changequote(,)dnl
169typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
170changequote([,])dnl
171'
172        else
173          gt_revision_test_code=
174        fi
175        if test $gt_api_version -ge 2; then
176          gt_expression_test_code=' + * ngettext ("", "", 0)'
177        else
178          gt_expression_test_code=
179        fi
180
181        AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
182         [AC_LINK_IFELSE(
183            [AC_LANG_PROGRAM(
184               [[
185#include <libintl.h>
186$gt_revision_test_code
187extern int _nl_msg_cat_cntr;
188extern int *_nl_domain_bindings;
189               ]],
190               [[
191bindtextdomain ("", "");
192return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
193               ]])],
194            [eval "$gt_func_gnugettext_libc=yes"],
195            [eval "$gt_func_gnugettext_libc=no"])])
196
197        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
198          dnl Sometimes libintl requires libiconv, so first search for libiconv.
199          ifelse(gt_included_intl, yes, , [
200            AM_ICONV_LINK
201          ])
202          dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
203          dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
204          dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
205          dnl even if libiconv doesn't exist.
206          AC_LIB_LINKFLAGS_BODY([intl])
207          AC_CACHE_CHECK([for GNU gettext in libintl],
208            [$gt_func_gnugettext_libintl],
209           [gt_save_CPPFLAGS="$CPPFLAGS"
210            CPPFLAGS="$CPPFLAGS $INCINTL"
211            gt_save_LIBS="$LIBS"
212            LIBS="$LIBS $LIBINTL"
213            dnl Now see whether libintl exists and does not depend on libiconv.
214            AC_LINK_IFELSE(
215              [AC_LANG_PROGRAM(
216                 [[
217#include <libintl.h>
218$gt_revision_test_code
219extern int _nl_msg_cat_cntr;
220extern
221#ifdef __cplusplus
222"C"
223#endif
224const char *_nl_expand_alias (const char *);
225                 ]],
226                 [[
227bindtextdomain ("", "");
228return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
229                 ]])],
230              [eval "$gt_func_gnugettext_libintl=yes"],
231              [eval "$gt_func_gnugettext_libintl=no"])
232            dnl Now see whether libintl exists and depends on libiconv.
233            if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
234              LIBS="$LIBS $LIBICONV"
235              AC_LINK_IFELSE(
236                [AC_LANG_PROGRAM(
237                   [[
238#include <libintl.h>
239$gt_revision_test_code
240extern int _nl_msg_cat_cntr;
241extern
242#ifdef __cplusplus
243"C"
244#endif
245const char *_nl_expand_alias (const char *);
246                   ]],
247                   [[
248bindtextdomain ("", "");
249return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
250                   ]])],
251                [LIBINTL="$LIBINTL $LIBICONV"
252                 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
253                 eval "$gt_func_gnugettext_libintl=yes"
254                ])
255            fi
256            CPPFLAGS="$gt_save_CPPFLAGS"
257            LIBS="$gt_save_LIBS"])
258        fi
259
260        dnl If an already present or preinstalled GNU gettext() is found,
261        dnl use it.  But if this macro is used in GNU gettext, and GNU
262        dnl gettext is already preinstalled in libintl, we update this
263        dnl libintl.  (Cf. the install rule in intl/Makefile.in.)
264        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
265           || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
266                && test "$PACKAGE" != gettext-runtime \
267                && test "$PACKAGE" != gettext-tools; }; then
268          gt_use_preinstalled_gnugettext=yes
269        else
270          dnl Reset the values set by searching for libintl.
271          LIBINTL=
272          LTLIBINTL=
273          INCINTL=
274        fi
275
276    ifelse(gt_included_intl, yes, [
277        if test "$gt_use_preinstalled_gnugettext" != "yes"; then
278          dnl GNU gettext is not found in the C library.
279          dnl Fall back on included GNU gettext library.
280          nls_cv_use_gnu_gettext=yes
281        fi
282      fi
283
284      if test "$nls_cv_use_gnu_gettext" = "yes"; then
285        dnl Mark actions used to generate GNU NLS library.
286        BUILD_INCLUDED_LIBINTL=yes
287        USE_INCLUDED_LIBINTL=yes
288        LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
289        LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
290        LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
291      fi
292
293      CATOBJEXT=
294      if test "$gt_use_preinstalled_gnugettext" = "yes" \
295         || test "$nls_cv_use_gnu_gettext" = "yes"; then
296        dnl Mark actions to use GNU gettext tools.
297        CATOBJEXT=.gmo
298      fi
299    ])
300
301    if test -n "$INTL_MACOSX_LIBS"; then
302      if test "$gt_use_preinstalled_gnugettext" = "yes" \
303         || test "$nls_cv_use_gnu_gettext" = "yes"; then
304        dnl Some extra flags are needed during linking.
305        LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
306        LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
307      fi
308    fi
309
310    if test "$gt_use_preinstalled_gnugettext" = "yes" \
311       || test "$nls_cv_use_gnu_gettext" = "yes"; then
312      AC_DEFINE([ENABLE_NLS], [1],
313        [Define to 1 if translation of program messages to the user's native language
314   is requested.])
315    else
316      USE_NLS=no
317    fi
318  fi
319
320  AC_MSG_CHECKING([whether to use NLS])
321  AC_MSG_RESULT([$USE_NLS])
322  if test "$USE_NLS" = "yes"; then
323    AC_MSG_CHECKING([where the gettext function comes from])
324    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
325      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
326        gt_source="external libintl"
327      else
328        gt_source="libc"
329      fi
330    else
331      gt_source="included intl directory"
332    fi
333    AC_MSG_RESULT([$gt_source])
334  fi
335
336  if test "$USE_NLS" = "yes"; then
337
338    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
339      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
340        AC_MSG_CHECKING([how to link with libintl])
341        AC_MSG_RESULT([$LIBINTL])
342        AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
343      fi
344
345      dnl For backward compatibility. Some packages may be using this.
346      AC_DEFINE([HAVE_GETTEXT], [1],
347       [Define if the GNU gettext() function is already present or preinstalled.])
348      AC_DEFINE([HAVE_DCGETTEXT], [1],
349       [Define if the GNU dcgettext() function is already present or preinstalled.])
350    fi
351
352    dnl We need to process the po/ directory.
353    POSUB=po
354  fi
355
356  ifelse(gt_included_intl, yes, [
357    dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
358    dnl to 'yes' because some of the testsuite requires it.
359    if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
360      BUILD_INCLUDED_LIBINTL=yes
361    fi
362
363    dnl Make all variables we use known to autoconf.
364    AC_SUBST([BUILD_INCLUDED_LIBINTL])
365    AC_SUBST([USE_INCLUDED_LIBINTL])
366    AC_SUBST([CATOBJEXT])
367
368    dnl For backward compatibility. Some configure.ins may be using this.
369    nls_cv_header_intl=
370    nls_cv_header_libgt=
371
372    dnl For backward compatibility. Some Makefiles may be using this.
373    DATADIRNAME=share
374    AC_SUBST([DATADIRNAME])
375
376    dnl For backward compatibility. Some Makefiles may be using this.
377    INSTOBJEXT=.mo
378    AC_SUBST([INSTOBJEXT])
379
380    dnl For backward compatibility. Some Makefiles may be using this.
381    GENCAT=gencat
382    AC_SUBST([GENCAT])
383
384    dnl For backward compatibility. Some Makefiles may be using this.
385    INTLOBJS=
386    if test "$USE_INCLUDED_LIBINTL" = yes; then
387      INTLOBJS="\$(GETTOBJS)"
388    fi
389    AC_SUBST([INTLOBJS])
390
391    dnl Enable libtool support if the surrounding package wishes it.
392    INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
393    AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX])
394  ])
395
396  dnl For backward compatibility. Some Makefiles may be using this.
397  INTLLIBS="$LIBINTL"
398  AC_SUBST([INTLLIBS])
399
400  dnl Make all documented variables known to autoconf.
401  AC_SUBST([LIBINTL])
402  AC_SUBST([LTLIBINTL])
403  AC_SUBST([POSUB])
404])
405
406
407dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
408m4_define([gt_NEEDS_INIT],
409[
410  m4_divert_text([DEFAULTS], [gt_needs=])
411  m4_define([gt_NEEDS_INIT], [])
412])
413
414
415dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
416AC_DEFUN([AM_GNU_GETTEXT_NEED],
417[
418  m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
419])
420
421
422dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
423AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
424
425# Copyright (C) 1995-2002 Free Software Foundation, Inc.
426# Copyright (C) 2001-2003,2004 Red Hat, Inc.
427#
428# This file is free software, distributed under the terms of the GNU
429# General Public License.  As a special exception to the GNU General
430# Public License, this file may be distributed as part of a program
431# that contains a configuration script generated by Autoconf, under
432# the same distribution terms as the rest of that program.
433#
434# This file can be copied and used freely without restrictions.  It can
435# be used in projects which are not available under the GNU Public License
436# but which still want to provide support for the GNU gettext functionality.
437#
438# Macro to add for using GNU gettext.
439# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
440#
441# Modified to never use included libintl.
442# Owen Taylor <otaylor@redhat.com>, 12/15/1998
443#
444# Major rework to remove unused code
445# Owen Taylor <otaylor@redhat.com>, 12/11/2002
446#
447# Added better handling of ALL_LINGUAS from GNU gettext version
448# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
449#
450# Modified to require ngettext
451# Matthias Clasen <mclasen@redhat.com> 08/06/2004
452#
453# We need this here as well, since someone might use autoconf-2.5x
454# to configure GLib then an older version to configure a package
455# using AM_GLIB_GNU_GETTEXT
456AC_PREREQ(2.53)
457
458dnl
459dnl We go to great lengths to make sure that aclocal won't
460dnl try to pull in the installed version of these macros
461dnl when running aclocal in the glib directory.
462dnl
463m4_copy([AC_DEFUN],[glib_DEFUN])
464m4_copy([AC_REQUIRE],[glib_REQUIRE])
465dnl
466dnl At the end, if we're not within glib, we'll define the public
467dnl definitions in terms of our private definitions.
468dnl
469
470# GLIB_LC_MESSAGES
471#--------------------
472glib_DEFUN([GLIB_LC_MESSAGES],
473  [AC_CHECK_HEADERS([locale.h])
474    if test $ac_cv_header_locale_h = yes; then
475    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
476      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
477       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
478    if test $am_cv_val_LC_MESSAGES = yes; then
479      AC_DEFINE(HAVE_LC_MESSAGES, 1,
480        [Define if your <locale.h> file defines LC_MESSAGES.])
481    fi
482  fi])
483
484# GLIB_PATH_PROG_WITH_TEST
485#----------------------------
486dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
487dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
488glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
489[# Extract the first word of "$2", so it can be a program name with args.
490set dummy $2; ac_word=[$]2
491AC_MSG_CHECKING([for $ac_word])
492AC_CACHE_VAL(ac_cv_path_$1,
493[case "[$]$1" in
494  /*)
495  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
496  ;;
497  *)
498  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
499  for ac_dir in ifelse([$5], , $PATH, [$5]); do
500    test -z "$ac_dir" && ac_dir=.
501    if test -f $ac_dir/$ac_word; then
502      if [$3]; then
503        ac_cv_path_$1="$ac_dir/$ac_word"
504        break
505      fi
506    fi
507  done
508  IFS="$ac_save_ifs"
509dnl If no 4th arg is given, leave the cache variable unset,
510dnl so AC_PATH_PROGS will keep looking.
511ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
512])dnl
513  ;;
514esac])dnl
515$1="$ac_cv_path_$1"
516if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
517  AC_MSG_RESULT([$]$1)
518else
519  AC_MSG_RESULT(no)
520fi
521AC_SUBST($1)dnl
522])
523
524# GLIB_WITH_NLS
525#-----------------
526glib_DEFUN([GLIB_WITH_NLS],
527  dnl NLS is obligatory
528  [USE_NLS=yes
529    AC_SUBST(USE_NLS)
530
531    gt_cv_have_gettext=no
532
533    CATOBJEXT=NONE
534    XGETTEXT=:
535    INTLLIBS=
536
537    AC_CHECK_HEADER(libintl.h,
538     [gt_cv_func_dgettext_libintl="no"
539      libintl_extra_libs=""
540
541      #
542      # First check in libc
543      #
544      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
545        [AC_TRY_LINK([
546#include <libintl.h>
547],
548         [return !ngettext ("","", 1)],
549          gt_cv_func_ngettext_libc=yes,
550          gt_cv_func_ngettext_libc=no)
551        ])
552 
553      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
554              AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
555                [AC_TRY_LINK([
556#include <libintl.h>
557],
558                  [return !dgettext ("","")],
559                  gt_cv_func_dgettext_libc=yes,
560                  gt_cv_func_dgettext_libc=no)
561                ])
562      fi
563 
564      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
565        AC_CHECK_FUNCS(bind_textdomain_codeset)
566      fi
567
568      #
569      # If we don't have everything we want, check in libintl
570      #
571      if test "$gt_cv_func_dgettext_libc" != "yes" \
572         || test "$gt_cv_func_ngettext_libc" != "yes" \
573         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
574       
575        AC_CHECK_LIB(intl, bindtextdomain,
576            [AC_CHECK_LIB(intl, ngettext,
577                    [AC_CHECK_LIB(intl, dgettext,
578                                  gt_cv_func_dgettext_libintl=yes)])])
579
580        if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
581          AC_MSG_CHECKING([if -liconv is needed to use gettext])
582          AC_MSG_RESULT([])
583          AC_CHECK_LIB(intl, ngettext,
584                [AC_CHECK_LIB(intl, dcgettext,
585                       [gt_cv_func_dgettext_libintl=yes
586                        libintl_extra_libs=-liconv],
587                        :,-liconv)],
588                :,-liconv)
589        fi
590
591        #
592        # If we found libintl, then check in it for bind_textdomain_codeset();
593        # we'll prefer libc if neither have bind_textdomain_codeset(),
594        # and both have dgettext and ngettext
595        #
596        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
597          glib_save_LIBS="$LIBS"
598          LIBS="$LIBS -lintl $libintl_extra_libs"
599          unset ac_cv_func_bind_textdomain_codeset
600          AC_CHECK_FUNCS(bind_textdomain_codeset)
601          LIBS="$glib_save_LIBS"
602
603          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
604            gt_cv_func_dgettext_libc=no
605          else
606            if test "$gt_cv_func_dgettext_libc" = "yes" \
607                && test "$gt_cv_func_ngettext_libc" = "yes"; then
608              gt_cv_func_dgettext_libintl=no
609            fi
610          fi
611        fi
612      fi
613
614      if test "$gt_cv_func_dgettext_libc" = "yes" \
615        || test "$gt_cv_func_dgettext_libintl" = "yes"; then
616        gt_cv_have_gettext=yes
617      fi
618 
619      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
620        INTLLIBS="-lintl $libintl_extra_libs"
621      fi
622 
623      if test "$gt_cv_have_gettext" = "yes"; then
624        AC_DEFINE(HAVE_GETTEXT,1,
625          [Define if the GNU gettext() function is already present or preinstalled.])
626        GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
627          [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
628        if test "$MSGFMT" != "no"; then
629          glib_save_LIBS="$LIBS"
630          LIBS="$LIBS $INTLLIBS"
631          AC_CHECK_FUNCS(dcgettext)
632          MSGFMT_OPTS=
633          AC_MSG_CHECKING([if msgfmt accepts -c])
634          GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
635msgid ""
636msgstr ""
637"Content-Type: text/plain; charset=UTF-8\n"
638"Project-Id-Version: test 1.0\n"
639"PO-Revision-Date: 2007-02-15 12:01+0100\n"
640"Last-Translator: test <foo@bar.xx>\n"
641"Language-Team: C <LL@li.org>\n"
642"MIME-Version: 1.0\n"
643"Content-Transfer-Encoding: 8bit\n"
644], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
645          AC_SUBST(MSGFMT_OPTS)
646          AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
647          GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
648            [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
649          AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
650                         return _nl_msg_cat_cntr],
651            [CATOBJEXT=.gmo
652             DATADIRNAME=share],
653            [case $host in
654            *-*-solaris*)
655            dnl On Solaris, if bind_textdomain_codeset is in libc,
656            dnl GNU format message catalog is always supported,
657            dnl since both are added to the libc all together.
658            dnl Hence, we'd like to go with DATADIRNAME=share and
659            dnl and CATOBJEXT=.gmo in this case.
660            AC_CHECK_FUNC(bind_textdomain_codeset,
661              [CATOBJEXT=.gmo
662               DATADIRNAME=share],
663              [CATOBJEXT=.mo
664               DATADIRNAME=lib])
665            ;;
666            *-*-openbsd*)
667            CATOBJEXT=.mo
668            DATADIRNAME=share
669            ;;
670            *)
671            CATOBJEXT=.mo
672            DATADIRNAME=lib
673            ;;
674            esac])
675          LIBS="$glib_save_LIBS"
676          INSTOBJEXT=.mo
677        else
678          gt_cv_have_gettext=no
679        fi
680      fi
681    ])
682
683    if test "$gt_cv_have_gettext" = "yes" ; then
684      AC_DEFINE(ENABLE_NLS, 1,
685        [always defined to indicate that i18n is enabled])
686    fi
687
688    dnl Test whether we really found GNU xgettext.
689    if test "$XGETTEXT" != ":"; then
690      dnl If it is not GNU xgettext we define it as : so that the
691      dnl Makefiles still can work.
692      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
693        : ;
694      else
695        AC_MSG_RESULT(
696          [found xgettext program is not GNU xgettext; ignore it])
697        XGETTEXT=":"
698      fi
699    fi
700
701    # We need to process the po/ directory.
702    POSUB=po
703
704    AC_OUTPUT_COMMANDS(
705      [case "$CONFIG_FILES" in *po/Makefile.in*)
706        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
707      esac])
708
709    dnl These rules are solely for the distribution goal.  While doing this
710    dnl we only have to keep exactly one list of the available catalogs
711    dnl in configure.ac.
712    for lang in $ALL_LINGUAS; do
713      GMOFILES="$GMOFILES $lang.gmo"
714      POFILES="$POFILES $lang.po"
715    done
716
717    dnl Make all variables we use known to autoconf.
718    AC_SUBST(CATALOGS)
719    AC_SUBST(CATOBJEXT)
720    AC_SUBST(DATADIRNAME)
721    AC_SUBST(GMOFILES)
722    AC_SUBST(INSTOBJEXT)
723    AC_SUBST(INTLLIBS)
724    AC_SUBST(PO_IN_DATADIR_TRUE)
725    AC_SUBST(PO_IN_DATADIR_FALSE)
726    AC_SUBST(POFILES)
727    AC_SUBST(POSUB)
728  ])
729
730# AM_GLIB_GNU_GETTEXT
731# -------------------
732# Do checks necessary for use of gettext. If a suitable implementation
733# of gettext is found in either in libintl or in the C library,
734# it will set INTLLIBS to the libraries needed for use of gettext
735# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
736# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
737# on various variables needed by the Makefile.in.in installed by
738# glib-gettextize.
739dnl
740glib_DEFUN([GLIB_GNU_GETTEXT],
741  [AC_REQUIRE([AC_PROG_CC])dnl
742   
743   GLIB_LC_MESSAGES
744   GLIB_WITH_NLS
745
746   if test "$gt_cv_have_gettext" = "yes"; then
747     if test "x$ALL_LINGUAS" = "x"; then
748       LINGUAS=
749     else
750       AC_MSG_CHECKING(for catalogs to be installed)
751       NEW_LINGUAS=
752       for presentlang in $ALL_LINGUAS; do
753         useit=no
754         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
755           desiredlanguages="$LINGUAS"
756         else
757           desiredlanguages="$ALL_LINGUAS"
758         fi
759         for desiredlang in $desiredlanguages; do
760           # Use the presentlang catalog if desiredlang is
761           #   a. equal to presentlang, or
762           #   b. a variant of presentlang (because in this case,
763           #      presentlang can be used as a fallback for messages
764           #      which are not translated in the desiredlang catalog).
765           case "$desiredlang" in
766             "$presentlang"*) useit=yes;;
767           esac
768         done
769         if test $useit = yes; then
770           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
771         fi
772       done
773       LINGUAS=$NEW_LINGUAS
774       AC_MSG_RESULT($LINGUAS)
775     fi
776
777     dnl Construct list of names of catalog files to be constructed.
778     if test -n "$LINGUAS"; then
779       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
780     fi
781   fi
782
783   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
784   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
785   dnl Try to locate is.
786   MKINSTALLDIRS=
787   if test -n "$ac_aux_dir"; then
788     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
789   fi
790   if test -z "$MKINSTALLDIRS"; then
791     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
792   fi
793   AC_SUBST(MKINSTALLDIRS)
794
795   dnl Generate list of files to be processed by xgettext which will
796   dnl be included in po/Makefile.
797   test -d po || mkdir po
798   if test "x$srcdir" != "x."; then
799     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
800       posrcprefix="$srcdir/"
801     else
802       posrcprefix="../$srcdir/"
803     fi
804   else
805     posrcprefix="../"
806   fi
807   rm -f po/POTFILES
808   sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
809        < $srcdir/po/POTFILES.in > po/POTFILES
810  ])
811
812# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
813# -------------------------------
814# Define VARIABLE to the location where catalog files will
815# be installed by po/Makefile.
816glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
817[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
818glib_save_prefix="$prefix"
819glib_save_exec_prefix="$exec_prefix"
820glib_save_datarootdir="$datarootdir"
821test "x$prefix" = xNONE && prefix=$ac_default_prefix
822test "x$exec_prefix" = xNONE && exec_prefix=$prefix
823datarootdir=`eval echo "${datarootdir}"`
824if test "x$CATOBJEXT" = "x.mo" ; then
825  localedir=`eval echo "${libdir}/locale"`
826else
827  localedir=`eval echo "${datadir}/locale"`
828fi
829prefix="$glib_save_prefix"
830exec_prefix="$glib_save_exec_prefix"
831datarootdir="$glib_save_datarootdir"
832AC_DEFINE_UNQUOTED($1, "$localedir",
833  [Define the location where the catalogs will be installed])
834])
835
836dnl
837dnl Now the definitions that aclocal will find
838dnl
839ifdef(glib_configure_ac,[],[
840AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
841AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
842])dnl
843
844# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
845#
846# Create a temporary file with TEST-FILE as its contents and pass the
847# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
848# 0 and perform ACTION-IF-FAIL for any other exit status.
849AC_DEFUN([GLIB_RUN_PROG],
850[cat >conftest.foo <<_ACEOF
851$2
852_ACEOF
853if AC_RUN_LOG([$1 conftest.foo]); then
854  m4_ifval([$3], [$3], [:])
855m4_ifvaln([$4], [else $4])dnl
856echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
857sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
858fi])
859
860
861
862dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
863# serial 42 IT_PROG_INTLTOOL
864AC_DEFUN([IT_PROG_INTLTOOL], [
865AC_PREREQ([2.50])dnl
866AC_REQUIRE([AM_NLS])dnl
867
868case "$am__api_version" in
869    1.[01234])
870        AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
871    ;;
872    *)
873    ;;
874esac
875
876INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
877INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
878INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
879if test -n "$1"; then
880    AC_MSG_CHECKING([for intltool >= $1])
881    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
882    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
883        AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
884fi
885
886AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
887AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
888AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
889if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
890    AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
891fi
892
893if test -z "$AM_DEFAULT_VERBOSITY"; then
894  AM_DEFAULT_VERBOSITY=1
895fi
896AC_SUBST([AM_DEFAULT_VERBOSITY])
897
898INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
899INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
900INTLTOOL__v_MERGE_0='@echo "  ITMRG " [$]@;'
901AC_SUBST(INTLTOOL_V_MERGE)
902AC_SUBST(INTLTOOL__v_MERGE_)
903AC_SUBST(INTLTOOL__v_MERGE_0)
904
905INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
906intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
907intltool__v_merge_options_0='-q'
908AC_SUBST(INTLTOOL_V_MERGE_OPTIONS)
909AC_SUBST(intltool__v_merge_options_)
910AC_SUBST(intltool__v_merge_options_0)
911
912  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
913INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
914     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
915     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
916      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< [$]@'
917     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
918   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
919    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
920INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
921       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
922      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
923if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
924      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< [$]@'
925else
926      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.[$][$]RANDOM && mkdir [$][$]_it_tmp_dir && LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u [$][$]_it_tmp_dir $< [$]@ && rmdir [$][$]_it_tmp_dir'
927fi
928      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
929      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
930    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
931  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
932    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
933    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
934   INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
935
936_IT_SUBST(INTLTOOL_DESKTOP_RULE)
937_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
938_IT_SUBST(INTLTOOL_KEYS_RULE)
939_IT_SUBST(INTLTOOL_PROP_RULE)
940_IT_SUBST(INTLTOOL_OAF_RULE)
941_IT_SUBST(INTLTOOL_PONG_RULE)
942_IT_SUBST(INTLTOOL_SERVER_RULE)
943_IT_SUBST(INTLTOOL_SHEET_RULE)
944_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
945_IT_SUBST(INTLTOOL_UI_RULE)
946_IT_SUBST(INTLTOOL_XAM_RULE)
947_IT_SUBST(INTLTOOL_KBD_RULE)
948_IT_SUBST(INTLTOOL_XML_RULE)
949_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
950_IT_SUBST(INTLTOOL_CAVES_RULE)
951_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
952_IT_SUBST(INTLTOOL_THEME_RULE)
953_IT_SUBST(INTLTOOL_SERVICE_RULE)
954_IT_SUBST(INTLTOOL_POLICY_RULE)
955
956# Check the gettext tools to make sure they are GNU
957AC_PATH_PROG(XGETTEXT, xgettext)
958AC_PATH_PROG(MSGMERGE, msgmerge)
959AC_PATH_PROG(MSGFMT, msgfmt)
960AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
961if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
962    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
963fi
964xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
965mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
966mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
967if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
968    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
969fi
970
971AC_PATH_PROG(INTLTOOL_PERL, perl)
972if test -z "$INTLTOOL_PERL"; then
973   AC_MSG_ERROR([perl not found])
974fi
975AC_MSG_CHECKING([for perl >= 5.8.1])
976$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
977if test $? -ne 0; then
978   AC_MSG_ERROR([perl 5.8.1 is required for intltool])
979else
980   IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"`
981   AC_MSG_RESULT([$IT_PERL_VERSION])
982fi
983if test "x$2" != "xno-xml"; then
984   AC_MSG_CHECKING([for XML::Parser])
985   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
986       AC_MSG_RESULT([ok])
987   else
988       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
989   fi
990fi
991
992# Substitute ALL_LINGUAS so we can use it in po/Makefile
993AC_SUBST(ALL_LINGUAS)
994
995# Set DATADIRNAME correctly if it is not set yet
996# (copied from glib-gettext.m4)
997if test -z "$DATADIRNAME"; then
998  AC_LINK_IFELSE(
999    [AC_LANG_PROGRAM([[]],
1000                     [[extern int _nl_msg_cat_cntr;
1001                       return _nl_msg_cat_cntr]])],
1002    [DATADIRNAME=share],
1003    [case $host in
1004    *-*-solaris*)
1005    dnl On Solaris, if bind_textdomain_codeset is in libc,
1006    dnl GNU format message catalog is always supported,
1007    dnl since both are added to the libc all together.
1008    dnl Hence, we'd like to go with DATADIRNAME=share
1009    dnl in this case.
1010    AC_CHECK_FUNC(bind_textdomain_codeset,
1011      [DATADIRNAME=share], [DATADIRNAME=lib])
1012    ;;
1013    *)
1014    [DATADIRNAME=lib]
1015    ;;
1016    esac])
1017fi
1018AC_SUBST(DATADIRNAME)
1019
1020IT_PO_SUBDIR([po])
1021
1022])
1023
1024
1025# IT_PO_SUBDIR(DIRNAME)
1026# ---------------------
1027# All po subdirs have to be declared with this macro; the subdir "po" is
1028# declared by IT_PROG_INTLTOOL.
1029#
1030AC_DEFUN([IT_PO_SUBDIR],
1031[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
1032dnl
1033dnl The following CONFIG_COMMANDS should be executed at the very end
1034dnl of config.status.
1035AC_CONFIG_COMMANDS_PRE([
1036  AC_CONFIG_COMMANDS([$1/stamp-it], [
1037    if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
1038       AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
1039    fi
1040    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
1041    >"$1/stamp-it.tmp"
1042    [sed '/^#/d
1043         s/^[[].*] *//
1044         /^[    ]*$/d
1045        '"s|^|  $ac_top_srcdir/|" \
1046      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
1047    ]
1048    [sed '/^POTFILES =/,/[^\\]$/ {
1049                /^POTFILES =/!d
1050                r $1/POTFILES
1051          }
1052         ' "$1/Makefile.in" >"$1/Makefile"]
1053    rm -f "$1/Makefile.tmp"
1054    mv "$1/stamp-it.tmp" "$1/stamp-it"
1055  ])
1056])dnl
1057])
1058
1059# _IT_SUBST(VARIABLE)
1060# -------------------
1061# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
1062#
1063AC_DEFUN([_IT_SUBST],
1064[
1065AC_SUBST([$1])
1066m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
1067]
1068)
1069
1070# deprecated macros
1071AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
1072# A hint is needed for aclocal from Automake <= 1.9.4:
1073# AC_DEFUN([AC_PROG_INTLTOOL], ...)
1074
1075
1076# nls.m4 serial 5 (gettext-0.18)
1077dnl Copyright (C) 1995-2003, 2005-2006, 2008-2013 Free Software Foundation,
1078dnl Inc.
1079dnl This file is free software; the Free Software Foundation
1080dnl gives unlimited permission to copy and/or distribute it,
1081dnl with or without modifications, as long as this notice is preserved.
1082dnl
1083dnl This file can can be used in projects which are not available under
1084dnl the GNU General Public License or the GNU Library General Public
1085dnl License but which still want to provide support for the GNU gettext
1086dnl functionality.
1087dnl Please note that the actual code of the GNU gettext library is covered
1088dnl by the GNU Library General Public License, and the rest of the GNU
1089dnl gettext package package is covered by the GNU General Public License.
1090dnl They are *not* in the public domain.
1091
1092dnl Authors:
1093dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1094dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
1095
1096AC_PREREQ([2.50])
1097
1098AC_DEFUN([AM_NLS],
1099[
1100  AC_MSG_CHECKING([whether NLS is requested])
1101  dnl Default is enabled NLS
1102  AC_ARG_ENABLE([nls],
1103    [  --disable-nls           do not use Native Language Support],
1104    USE_NLS=$enableval, USE_NLS=yes)
1105  AC_MSG_RESULT([$USE_NLS])
1106  AC_SUBST([USE_NLS])
1107])
1108
1109# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
1110# serial 1 (pkg-config-0.24)
1111#
1112# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
1113#
1114# This program is free software; you can redistribute it and/or modify
1115# it under the terms of the GNU General Public License as published by
1116# the Free Software Foundation; either version 2 of the License, or
1117# (at your option) any later version.
1118#
1119# This program is distributed in the hope that it will be useful, but
1120# WITHOUT ANY WARRANTY; without even the implied warranty of
1121# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
1122# General Public License for more details.
1123#
1124# You should have received a copy of the GNU General Public License
1125# along with this program; if not, write to the Free Software
1126# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1127#
1128# As a special exception to the GNU General Public License, if you
1129# distribute this file as part of a program that contains a
1130# configuration script generated by Autoconf, you may include it under
1131# the same distribution terms that you use for the rest of that program.
1132
1133# PKG_PROG_PKG_CONFIG([MIN-VERSION])
1134# ----------------------------------
1135AC_DEFUN([PKG_PROG_PKG_CONFIG],
1136[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
1137m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
1138m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
1139AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
1140AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
1141AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
1142
1143if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
1144        AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
1145fi
1146if test -n "$PKG_CONFIG"; then
1147        _pkg_min_version=m4_default([$1], [0.9.0])
1148        AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
1149        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
1150                AC_MSG_RESULT([yes])
1151        else
1152                AC_MSG_RESULT([no])
1153                PKG_CONFIG=""
1154        fi
1155fi[]dnl
1156])# PKG_PROG_PKG_CONFIG
1157
1158# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1159#
1160# Check to see whether a particular set of modules exists.  Similar
1161# to PKG_CHECK_MODULES(), but does not set variables or print errors.
1162#
1163# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1164# only at the first occurence in configure.ac, so if the first place
1165# it's called might be skipped (such as if it is within an "if", you
1166# have to call PKG_CHECK_EXISTS manually
1167# --------------------------------------------------------------
1168AC_DEFUN([PKG_CHECK_EXISTS],
1169[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1170if test -n "$PKG_CONFIG" && \
1171    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
1172  m4_default([$2], [:])
1173m4_ifvaln([$3], [else
1174  $3])dnl
1175fi])
1176
1177# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
1178# ---------------------------------------------
1179m4_define([_PKG_CONFIG],
1180[if test -n "$$1"; then
1181    pkg_cv_[]$1="$$1"
1182 elif test -n "$PKG_CONFIG"; then
1183    PKG_CHECK_EXISTS([$3],
1184                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
1185                      test "x$?" != "x0" && pkg_failed=yes ],
1186                     [pkg_failed=yes])
1187 else
1188    pkg_failed=untried
1189fi[]dnl
1190])# _PKG_CONFIG
1191
1192# _PKG_SHORT_ERRORS_SUPPORTED
1193# -----------------------------
1194AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
1195[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1196if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1197        _pkg_short_errors_supported=yes
1198else
1199        _pkg_short_errors_supported=no
1200fi[]dnl
1201])# _PKG_SHORT_ERRORS_SUPPORTED
1202
1203
1204# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1205# [ACTION-IF-NOT-FOUND])
1206#
1207#
1208# Note that if there is a possibility the first call to
1209# PKG_CHECK_MODULES might not happen, you should be sure to include an
1210# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
1211#
1212#
1213# --------------------------------------------------------------
1214AC_DEFUN([PKG_CHECK_MODULES],
1215[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1216AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
1217AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
1218
1219pkg_failed=no
1220AC_MSG_CHECKING([for $1])
1221
1222_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
1223_PKG_CONFIG([$1][_LIBS], [libs], [$2])
1224
1225m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
1226and $1[]_LIBS to avoid the need to call pkg-config.
1227See the pkg-config man page for more details.])
1228
1229if test $pkg_failed = yes; then
1230        AC_MSG_RESULT([no])
1231        _PKG_SHORT_ERRORS_SUPPORTED
1232        if test $_pkg_short_errors_supported = yes; then
1233                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
1234        else
1235                $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
1236        fi
1237        # Put the nasty error message in config.log where it belongs
1238        echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1239
1240        m4_default([$4], [AC_MSG_ERROR(
1241[Package requirements ($2) were not met:
1242
1243$$1_PKG_ERRORS
1244
1245Consider adjusting the PKG_CONFIG_PATH environment variable if you
1246installed software in a non-standard prefix.
1247
1248_PKG_TEXT])[]dnl
1249        ])
1250elif test $pkg_failed = untried; then
1251        AC_MSG_RESULT([no])
1252        m4_default([$4], [AC_MSG_FAILURE(
1253[The pkg-config script could not be found or is too old.  Make sure it
1254is in your PATH or set the PKG_CONFIG environment variable to the full
1255path to pkg-config.
1256
1257_PKG_TEXT
1258
1259To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
1260        ])
1261else
1262        $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
1263        $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1264        AC_MSG_RESULT([yes])
1265        $3
1266fi[]dnl
1267])# PKG_CHECK_MODULES
1268
1269
1270# PKG_INSTALLDIR(DIRECTORY)
1271# -------------------------
1272# Substitutes the variable pkgconfigdir as the location where a module
1273# should install pkg-config .pc files. By default the directory is
1274# $libdir/pkgconfig, but the default can be changed by passing
1275# DIRECTORY. The user can override through the --with-pkgconfigdir
1276# parameter.
1277AC_DEFUN([PKG_INSTALLDIR],
1278[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
1279m4_pushdef([pkg_description],
1280    [pkg-config installation directory @<:@]pkg_default[@:>@])
1281AC_ARG_WITH([pkgconfigdir],
1282    [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
1283    [with_pkgconfigdir=]pkg_default)
1284AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
1285m4_popdef([pkg_default])
1286m4_popdef([pkg_description])
1287]) dnl PKG_INSTALLDIR
1288
1289
1290# PKG_NOARCH_INSTALLDIR(DIRECTORY)
1291# -------------------------
1292# Substitutes the variable noarch_pkgconfigdir as the location where a
1293# module should install arch-independent pkg-config .pc files. By
1294# default the directory is $datadir/pkgconfig, but the default can be
1295# changed by passing DIRECTORY. The user can override through the
1296# --with-noarch-pkgconfigdir parameter.
1297AC_DEFUN([PKG_NOARCH_INSTALLDIR],
1298[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
1299m4_pushdef([pkg_description],
1300    [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
1301AC_ARG_WITH([noarch-pkgconfigdir],
1302    [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
1303    [with_noarch_pkgconfigdir=]pkg_default)
1304AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
1305m4_popdef([pkg_default])
1306m4_popdef([pkg_description])
1307]) dnl PKG_NOARCH_INSTALLDIR
1308
1309
1310# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
1311# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1312# -------------------------------------------
1313# Retrieves the value of the pkg-config variable for the given module.
1314AC_DEFUN([PKG_CHECK_VAR],
1315[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1316AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
1317
1318_PKG_CONFIG([$1], [variable="][$3]["], [$2])
1319AS_VAR_COPY([$1], [pkg_cv_][$1])
1320
1321AS_VAR_IF([$1], [""], [$5], [$4])dnl
1322])# PKG_CHECK_VAR
1323
1324# Copyright (C) 2002-2013 Free Software Foundation, Inc.
1325#
1326# This file is free software; the Free Software Foundation
1327# gives unlimited permission to copy and/or distribute it,
1328# with or without modifications, as long as this notice is preserved.
1329
1330# AM_AUTOMAKE_VERSION(VERSION)
1331# ----------------------------
1332# Automake X.Y traces this macro to ensure aclocal.m4 has been
1333# generated from the m4 files accompanying Automake X.Y.
1334# (This private macro should not be called outside this file.)
1335AC_DEFUN([AM_AUTOMAKE_VERSION],
1336[am__api_version='1.14'
1337dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
1338dnl require some minimum version.  Point them to the right macro.
1339m4_if([$1], [1.14.1], [],
1340      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
1341])
1342
1343# _AM_AUTOCONF_VERSION(VERSION)
1344# -----------------------------
1345# aclocal traces this macro to find the Autoconf version.
1346# This is a private macro too.  Using m4_define simplifies
1347# the logic in aclocal, which can simply ignore this definition.
1348m4_define([_AM_AUTOCONF_VERSION], [])
1349
1350# AM_SET_CURRENT_AUTOMAKE_VERSION
1351# -------------------------------
1352# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
1353# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
1354AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
1355[AM_AUTOMAKE_VERSION([1.14.1])dnl
1356m4_ifndef([AC_AUTOCONF_VERSION],
1357  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
1358_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
1359
1360# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
1361
1362# Copyright (C) 2001-2013 Free Software Foundation, Inc.
1363#
1364# This file is free software; the Free Software Foundation
1365# gives unlimited permission to copy and/or distribute it,
1366# with or without modifications, as long as this notice is preserved.
1367
1368# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
1369# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
1370# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
1371#
1372# Of course, Automake must honor this variable whenever it calls a
1373# tool from the auxiliary directory.  The problem is that $srcdir (and
1374# therefore $ac_aux_dir as well) can be either absolute or relative,
1375# depending on how configure is run.  This is pretty annoying, since
1376# it makes $ac_aux_dir quite unusable in subdirectories: in the top
1377# source directory, any form will work fine, but in subdirectories a
1378# relative path needs to be adjusted first.
1379#
1380# $ac_aux_dir/missing
1381#    fails when called from a subdirectory if $ac_aux_dir is relative
1382# $top_srcdir/$ac_aux_dir/missing
1383#    fails if $ac_aux_dir is absolute,
1384#    fails when called from a subdirectory in a VPATH build with
1385#          a relative $ac_aux_dir
1386#
1387# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
1388# are both prefixed by $srcdir.  In an in-source build this is usually
1389# harmless because $srcdir is '.', but things will broke when you
1390# start a VPATH build or use an absolute $srcdir.
1391#
1392# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
1393# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
1394#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
1395# and then we would define $MISSING as
1396#   MISSING="\${SHELL} $am_aux_dir/missing"
1397# This will work as long as MISSING is not called from configure, because
1398# unfortunately $(top_srcdir) has no meaning in configure.
1399# However there are other variables, like CC, which are often used in
1400# configure, and could therefore not use this "fixed" $ac_aux_dir.
1401#
1402# Another solution, used here, is to always expand $ac_aux_dir to an
1403# absolute PATH.  The drawback is that using absolute paths prevent a
1404# configured tree to be moved without reconfiguration.
1405
1406AC_DEFUN([AM_AUX_DIR_EXPAND],
1407[dnl Rely on autoconf to set up CDPATH properly.
1408AC_PREREQ([2.50])dnl
1409# expand $ac_aux_dir to an absolute path
1410am_aux_dir=`cd $ac_aux_dir && pwd`
1411])
1412
1413# AM_CONDITIONAL                                            -*- Autoconf -*-
1414
1415# Copyright (C) 1997-2013 Free Software Foundation, Inc.
1416#
1417# This file is free software; the Free Software Foundation
1418# gives unlimited permission to copy and/or distribute it,
1419# with or without modifications, as long as this notice is preserved.
1420
1421# AM_CONDITIONAL(NAME, SHELL-CONDITION)
1422# -------------------------------------
1423# Define a conditional.
1424AC_DEFUN([AM_CONDITIONAL],
1425[AC_PREREQ([2.52])dnl
1426 m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
1427       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1428AC_SUBST([$1_TRUE])dnl
1429AC_SUBST([$1_FALSE])dnl
1430_AM_SUBST_NOTMAKE([$1_TRUE])dnl
1431_AM_SUBST_NOTMAKE([$1_FALSE])dnl
1432m4_define([_AM_COND_VALUE_$1], [$2])dnl
1433if $2; then
1434  $1_TRUE=
1435  $1_FALSE='#'
1436else
1437  $1_TRUE='#'
1438  $1_FALSE=
1439fi
1440AC_CONFIG_COMMANDS_PRE(
1441[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1442  AC_MSG_ERROR([[conditional "$1" was never defined.
1443Usually this means the macro was only invoked conditionally.]])
1444fi])])
1445
1446# Copyright (C) 1999-2013 Free Software Foundation, Inc.
1447#
1448# This file is free software; the Free Software Foundation
1449# gives unlimited permission to copy and/or distribute it,
1450# with or without modifications, as long as this notice is preserved.
1451
1452
1453# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
1454# written in clear, in which case automake, when reading aclocal.m4,
1455# will think it sees a *use*, and therefore will trigger all it's
1456# C support machinery.  Also note that it means that autoscan, seeing
1457# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
1458
1459
1460# _AM_DEPENDENCIES(NAME)
1461# ----------------------
1462# See how the compiler implements dependency checking.
1463# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
1464# We try a few techniques and use that to set a single cache variable.
1465#
1466# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
1467# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
1468# dependency, and given that the user is not expected to run this macro,
1469# just rely on AC_PROG_CC.
1470AC_DEFUN([_AM_DEPENDENCIES],
1471[AC_REQUIRE([AM_SET_DEPDIR])dnl
1472AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
1473AC_REQUIRE([AM_MAKE_INCLUDE])dnl
1474AC_REQUIRE([AM_DEP_TRACK])dnl
1475
1476m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
1477      [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
1478      [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
1479      [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
1480      [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
1481      [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
1482                    [depcc="$$1"   am_compiler_list=])
1483
1484AC_CACHE_CHECK([dependency style of $depcc],
1485               [am_cv_$1_dependencies_compiler_type],
1486[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
1487  # We make a subdir and do the tests there.  Otherwise we can end up
1488  # making bogus files that we don't know about and never remove.  For
1489  # instance it was reported that on HP-UX the gcc test will end up
1490  # making a dummy file named 'D' -- because '-MD' means "put the output
1491  # in D".
1492  rm -rf conftest.dir
1493  mkdir conftest.dir
1494  # Copy depcomp to subdir because otherwise we won't find it if we're
1495  # using a relative directory.
1496  cp "$am_depcomp" conftest.dir
1497  cd conftest.dir
1498  # We will build objects and dependencies in a subdirectory because
1499  # it helps to detect inapplicable dependency modes.  For instance
1500  # both Tru64's cc and ICC support -MD to output dependencies as a
1501  # side effect of compilation, but ICC will put the dependencies in
1502  # the current directory while Tru64 will put them in the object
1503  # directory.
1504  mkdir sub
1505
1506  am_cv_$1_dependencies_compiler_type=none
1507  if test "$am_compiler_list" = ""; then
1508     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
1509  fi
1510  am__universal=false
1511  m4_case([$1], [CC],
1512    [case " $depcc " in #(
1513     *\ -arch\ *\ -arch\ *) am__universal=true ;;
1514     esac],
1515    [CXX],
1516    [case " $depcc " in #(
1517     *\ -arch\ *\ -arch\ *) am__universal=true ;;
1518     esac])
1519
1520  for depmode in $am_compiler_list; do
1521    # Setup a source with many dependencies, because some compilers
1522    # like to wrap large dependency lists on column 80 (with \), and
1523    # we should not choose a depcomp mode which is confused by this.
1524    #
1525    # We need to recreate these files for each test, as the compiler may
1526    # overwrite some of them when testing with obscure command lines.
1527    # This happens at least with the AIX C compiler.
1528    : > sub/conftest.c
1529    for i in 1 2 3 4 5 6; do
1530      echo '#include "conftst'$i'.h"' >> sub/conftest.c
1531      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
1532      # Solaris 10 /bin/sh.
1533      echo '/* dummy */' > sub/conftst$i.h
1534    done
1535    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
1536
1537    # We check with '-c' and '-o' for the sake of the "dashmstdout"
1538    # mode.  It turns out that the SunPro C++ compiler does not properly
1539    # handle '-M -o', and we need to detect this.  Also, some Intel
1540    # versions had trouble with output in subdirs.
1541    am__obj=sub/conftest.${OBJEXT-o}
1542    am__minus_obj="-o $am__obj"
1543    case $depmode in
1544    gcc)
1545      # This depmode causes a compiler race in universal mode.
1546      test "$am__universal" = false || continue
1547      ;;
1548    nosideeffect)
1549      # After this tag, mechanisms are not by side-effect, so they'll
1550      # only be used when explicitly requested.
1551      if test "x$enable_dependency_tracking" = xyes; then
1552        continue
1553      else
1554        break
1555      fi
1556      ;;
1557    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
1558      # This compiler won't grok '-c -o', but also, the minuso test has
1559      # not run yet.  These depmodes are late enough in the game, and
1560      # so weak that their functioning should not be impacted.
1561      am__obj=conftest.${OBJEXT-o}
1562      am__minus_obj=
1563      ;;
1564    none) break ;;
1565    esac
1566    if depmode=$depmode \
1567       source=sub/conftest.c object=$am__obj \
1568       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
1569       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
1570         >/dev/null 2>conftest.err &&
1571       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
1572       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
1573       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
1574       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
1575      # icc doesn't choke on unknown options, it will just issue warnings
1576      # or remarks (even with -Werror).  So we grep stderr for any message
1577      # that says an option was ignored or not supported.
1578      # When given -MP, icc 7.0 and 7.1 complain thusly:
1579      #   icc: Command line warning: ignoring option '-M'; no argument required
1580      # The diagnosis changed in icc 8.0:
1581      #   icc: Command line remark: option '-MP' not supported
1582      if (grep 'ignoring option' conftest.err ||
1583          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
1584        am_cv_$1_dependencies_compiler_type=$depmode
1585        break
1586      fi
1587    fi
1588  done
1589
1590  cd ..
1591  rm -rf conftest.dir
1592else
1593  am_cv_$1_dependencies_compiler_type=none
1594fi
1595])
1596AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
1597AM_CONDITIONAL([am__fastdep$1], [
1598  test "x$enable_dependency_tracking" != xno \
1599  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
1600])
1601
1602
1603# AM_SET_DEPDIR
1604# -------------
1605# Choose a directory name for dependency files.
1606# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
1607AC_DEFUN([AM_SET_DEPDIR],
1608[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1609AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
1610])
1611
1612
1613# AM_DEP_TRACK
1614# ------------
1615AC_DEFUN([AM_DEP_TRACK],
1616[AC_ARG_ENABLE([dependency-tracking], [dnl
1617AS_HELP_STRING(
1618  [--enable-dependency-tracking],
1619  [do not reject slow dependency extractors])
1620AS_HELP_STRING(
1621  [--disable-dependency-tracking],
1622  [speeds up one-time build])])
1623if test "x$enable_dependency_tracking" != xno; then
1624  am_depcomp="$ac_aux_dir/depcomp"
1625  AMDEPBACKSLASH='\'
1626  am__nodep='_no'
1627fi
1628AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1629AC_SUBST([AMDEPBACKSLASH])dnl
1630_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
1631AC_SUBST([am__nodep])dnl
1632_AM_SUBST_NOTMAKE([am__nodep])dnl
1633])
1634
1635# Generate code to set up dependency tracking.              -*- Autoconf -*-
1636
1637# Copyright (C) 1999-2013 Free Software Foundation, Inc.
1638#
1639# This file is free software; the Free Software Foundation
1640# gives unlimited permission to copy and/or distribute it,
1641# with or without modifications, as long as this notice is preserved.
1642
1643
1644# _AM_OUTPUT_DEPENDENCY_COMMANDS
1645# ------------------------------
1646AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1647[{
1648  # Older Autoconf quotes --file arguments for eval, but not when files
1649  # are listed without --file.  Let's play safe and only enable the eval
1650  # if we detect the quoting.
1651  case $CONFIG_FILES in
1652  *\'*) eval set x "$CONFIG_FILES" ;;
1653  *)   set x $CONFIG_FILES ;;
1654  esac
1655  shift
1656  for mf
1657  do
1658    # Strip MF so we end up with the name of the file.
1659    mf=`echo "$mf" | sed -e 's/:.*$//'`
1660    # Check whether this is an Automake generated Makefile or not.
1661    # We used to match only the files named 'Makefile.in', but
1662    # some people rename them; so instead we look at the file content.
1663    # Grep'ing the first line is not enough: some people post-process
1664    # each Makefile.in and add a new line on top of each file to say so.
1665    # Grep'ing the whole file is not good either: AIX grep has a line
1666    # limit of 2048, but all sed's we know have understand at least 4000.
1667    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
1668      dirpart=`AS_DIRNAME("$mf")`
1669    else
1670      continue
1671    fi
1672    # Extract the definition of DEPDIR, am__include, and am__quote
1673    # from the Makefile without running 'make'.
1674    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
1675    test -z "$DEPDIR" && continue
1676    am__include=`sed -n 's/^am__include = //p' < "$mf"`
1677    test -z "$am__include" && continue
1678    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
1679    # Find all dependency output files, they are included files with
1680    # $(DEPDIR) in their names.  We invoke sed twice because it is the
1681    # simplest approach to changing $(DEPDIR) to its actual value in the
1682    # expansion.
1683    for file in `sed -n "
1684      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
1685         sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
1686      # Make sure the directory exists.
1687      test -f "$dirpart/$file" && continue
1688      fdir=`AS_DIRNAME(["$file"])`
1689      AS_MKDIR_P([$dirpart/$fdir])
1690      # echo "creating $dirpart/$file"
1691      echo '# dummy' > "$dirpart/$file"
1692    done
1693  done
1694}
1695])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1696
1697
1698# AM_OUTPUT_DEPENDENCY_COMMANDS
1699# -----------------------------
1700# This macro should only be invoked once -- use via AC_REQUIRE.
1701#
1702# This code is only required when automatic dependency tracking
1703# is enabled.  FIXME.  This creates each '.P' file that we will
1704# need in order to bootstrap the dependency handling code.
1705AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1706[AC_CONFIG_COMMANDS([depfiles],
1707     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1708     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1709])
1710
1711# Do all the work for Automake.                             -*- Autoconf -*-
1712
1713# Copyright (C) 1996-2013 Free Software Foundation, Inc.
1714#
1715# This file is free software; the Free Software Foundation
1716# gives unlimited permission to copy and/or distribute it,
1717# with or without modifications, as long as this notice is preserved.
1718
1719# This macro actually does too much.  Some checks are only needed if
1720# your package does certain things.  But this isn't really a big deal.
1721
1722dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
1723m4_define([AC_PROG_CC],
1724m4_defn([AC_PROG_CC])
1725[_AM_PROG_CC_C_O
1726])
1727
1728# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1729# AM_INIT_AUTOMAKE([OPTIONS])
1730# -----------------------------------------------
1731# The call with PACKAGE and VERSION arguments is the old style
1732# call (pre autoconf-2.50), which is being phased out.  PACKAGE
1733# and VERSION should now be passed to AC_INIT and removed from
1734# the call to AM_INIT_AUTOMAKE.
1735# We support both call styles for the transition.  After
1736# the next Automake release, Autoconf can make the AC_INIT
1737# arguments mandatory, and then we can depend on a new Autoconf
1738# release and drop the old call support.
1739AC_DEFUN([AM_INIT_AUTOMAKE],
1740[AC_PREREQ([2.65])dnl
1741dnl Autoconf wants to disallow AM_ names.  We explicitly allow
1742dnl the ones we care about.
1743m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1744AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1745AC_REQUIRE([AC_PROG_INSTALL])dnl
1746if test "`cd $srcdir && pwd`" != "`pwd`"; then
1747  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
1748  # is not polluted with repeated "-I."
1749  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
1750  # test to see if srcdir already configured
1751  if test -f $srcdir/config.status; then
1752    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1753  fi
1754fi
1755
1756# test whether we have cygpath
1757if test -z "$CYGPATH_W"; then
1758  if (cygpath --version) >/dev/null 2>/dev/null; then
1759    CYGPATH_W='cygpath -w'
1760  else
1761    CYGPATH_W=echo
1762  fi
1763fi
1764AC_SUBST([CYGPATH_W])
1765
1766# Define the identity of the package.
1767dnl Distinguish between old-style and new-style calls.
1768m4_ifval([$2],
1769[AC_DIAGNOSE([obsolete],
1770             [$0: two- and three-arguments forms are deprecated.])
1771m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1772 AC_SUBST([PACKAGE], [$1])dnl
1773 AC_SUBST([VERSION], [$2])],
1774[_AM_SET_OPTIONS([$1])dnl
1775dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
1776m4_if(
1777  m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
1778  [ok:ok],,
1779  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1780 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1781 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1782
1783_AM_IF_OPTION([no-define],,
1784[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
1785 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
1786
1787# Some tools Automake needs.
1788AC_REQUIRE([AM_SANITY_CHECK])dnl
1789AC_REQUIRE([AC_ARG_PROGRAM])dnl
1790AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
1791AM_MISSING_PROG([AUTOCONF], [autoconf])
1792AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
1793AM_MISSING_PROG([AUTOHEADER], [autoheader])
1794AM_MISSING_PROG([MAKEINFO], [makeinfo])
1795AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1796AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
1797AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1798# For better backward compatibility.  To be removed once Automake 1.9.x
1799# dies out for good.  For more background, see:
1800# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
1801# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
1802AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
1803# We need awk for the "check" target.  The system "awk" is bad on
1804# some platforms.
1805AC_REQUIRE([AC_PROG_AWK])dnl
1806AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1807AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1808_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1809              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1810                             [_AM_PROG_TAR([v7])])])
1811_AM_IF_OPTION([no-dependencies],,
1812[AC_PROVIDE_IFELSE([AC_PROG_CC],
1813                  [_AM_DEPENDENCIES([CC])],
1814                  [m4_define([AC_PROG_CC],
1815                             m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
1816AC_PROVIDE_IFELSE([AC_PROG_CXX],
1817                  [_AM_DEPENDENCIES([CXX])],
1818                  [m4_define([AC_PROG_CXX],
1819                             m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
1820AC_PROVIDE_IFELSE([AC_PROG_OBJC],
1821                  [_AM_DEPENDENCIES([OBJC])],
1822                  [m4_define([AC_PROG_OBJC],
1823                             m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
1824AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
1825                  [_AM_DEPENDENCIES([OBJCXX])],
1826                  [m4_define([AC_PROG_OBJCXX],
1827                             m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
1828])
1829AC_REQUIRE([AM_SILENT_RULES])dnl
1830dnl The testsuite driver may need to know about EXEEXT, so add the
1831dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
1832dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
1833AC_CONFIG_COMMANDS_PRE(dnl
1834[m4_provide_if([_AM_COMPILER_EXEEXT],
1835  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
1836
1837# POSIX will say in a future version that running "rm -f" with no argument
1838# is OK; and we want to be able to make that assumption in our Makefile
1839# recipes.  So use an aggressive probe to check that the usage we want is
1840# actually supported "in the wild" to an acceptable degree.
1841# See automake bug#10828.
1842# To make any issue more visible, cause the running configure to be aborted
1843# by default if the 'rm' program in use doesn't match our expectations; the
1844# user can still override this though.
1845if rm -f && rm -fr && rm -rf; then : OK; else
1846  cat >&2 <<'END'
1847Oops!
1848
1849Your 'rm' program seems unable to run without file operands specified
1850on the command line, even when the '-f' option is present.  This is contrary
1851to the behaviour of most rm programs out there, and not conforming with
1852the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
1853
1854Please tell bug-automake@gnu.org about your system, including the value
1855of your $PATH and any error possibly output before this message.  This
1856can help us improve future automake versions.
1857
1858END
1859  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
1860    echo 'Configuration will proceed anyway, since you have set the' >&2
1861    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
1862    echo >&2
1863  else
1864    cat >&2 <<'END'
1865Aborting the configuration process, to ensure you take notice of the issue.
1866
1867You can download and install GNU coreutils to get an 'rm' implementation
1868that behaves properly: <http://www.gnu.org/software/coreutils/>.
1869
1870If you want to complete the configuration process using your problematic
1871'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
1872to "yes", and re-run configure.
1873
1874END
1875    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
1876  fi
1877fi])
1878
1879dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
1880dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
1881dnl mangled by Autoconf and run in a shell conditional statement.
1882m4_define([_AC_COMPILER_EXEEXT],
1883m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1884
1885# When config.status generates a header, we must update the stamp-h file.
1886# This file resides in the same directory as the config header
1887# that is generated.  The stamp files are numbered to have different names.
1888
1889# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1890# loop where config.status creates the headers, so we can generate
1891# our stamp files there.
1892AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1893[# Compute $1's index in $config_headers.
1894_am_arg=$1
1895_am_stamp_count=1
1896for _am_header in $config_headers :; do
1897  case $_am_header in
1898    $_am_arg | $_am_arg:* )
1899      break ;;
1900    * )
1901      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1902  esac
1903done
1904echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1905
1906# Copyright (C) 2001-2013 Free Software Foundation, Inc.
1907#
1908# This file is free software; the Free Software Foundation
1909# gives unlimited permission to copy and/or distribute it,
1910# with or without modifications, as long as this notice is preserved.
1911
1912# AM_PROG_INSTALL_SH
1913# ------------------
1914# Define $install_sh.
1915AC_DEFUN([AM_PROG_INSTALL_SH],
1916[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1917if test x"${install_sh}" != xset; then
1918  case $am_aux_dir in
1919  *\ * | *\     *)
1920    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1921  *)
1922    install_sh="\${SHELL} $am_aux_dir/install-sh"
1923  esac
1924fi
1925AC_SUBST([install_sh])])
1926
1927# Copyright (C) 2003-2013 Free Software Foundation, Inc.
1928#
1929# This file is free software; the Free Software Foundation
1930# gives unlimited permission to copy and/or distribute it,
1931# with or without modifications, as long as this notice is preserved.
1932
1933# Check whether the underlying file-system supports filenames
1934# with a leading dot.  For instance MS-DOS doesn't.
1935AC_DEFUN([AM_SET_LEADING_DOT],
1936[rm -rf .tst 2>/dev/null
1937mkdir .tst 2>/dev/null
1938if test -d .tst; then
1939  am__leading_dot=.
1940else
1941  am__leading_dot=_
1942fi
1943rmdir .tst 2>/dev/null
1944AC_SUBST([am__leading_dot])])
1945
1946# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
1947# From Jim Meyering
1948
1949# Copyright (C) 1996-2013 Free Software Foundation, Inc.
1950#
1951# This file is free software; the Free Software Foundation
1952# gives unlimited permission to copy and/or distribute it,
1953# with or without modifications, as long as this notice is preserved.
1954
1955# AM_MAINTAINER_MODE([DEFAULT-MODE])
1956# ----------------------------------
1957# Control maintainer-specific portions of Makefiles.
1958# Default is to disable them, unless 'enable' is passed literally.
1959# For symmetry, 'disable' may be passed as well.  Anyway, the user
1960# can override the default with the --enable/--disable switch.
1961AC_DEFUN([AM_MAINTAINER_MODE],
1962[m4_case(m4_default([$1], [disable]),
1963       [enable], [m4_define([am_maintainer_other], [disable])],
1964       [disable], [m4_define([am_maintainer_other], [enable])],
1965       [m4_define([am_maintainer_other], [enable])
1966        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
1967AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
1968  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
1969  AC_ARG_ENABLE([maintainer-mode],
1970    [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
1971      am_maintainer_other[ make rules and dependencies not useful
1972      (and sometimes confusing) to the casual installer])],
1973    [USE_MAINTAINER_MODE=$enableval],
1974    [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
1975  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
1976  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
1977  MAINT=$MAINTAINER_MODE_TRUE
1978  AC_SUBST([MAINT])dnl
1979]
1980)
1981
1982# Check to see how 'make' treats includes.                  -*- Autoconf -*-
1983
1984# Copyright (C) 2001-2013 Free Software Foundation, Inc.
1985#
1986# This file is free software; the Free Software Foundation
1987# gives unlimited permission to copy and/or distribute it,
1988# with or without modifications, as long as this notice is preserved.
1989
1990# AM_MAKE_INCLUDE()
1991# -----------------
1992# Check to see how make treats includes.
1993AC_DEFUN([AM_MAKE_INCLUDE],
1994[am_make=${MAKE-make}
1995cat > confinc << 'END'
1996am__doit:
1997        @echo this is the am__doit target
1998.PHONY: am__doit
1999END
2000# If we don't find an include directive, just comment out the code.
2001AC_MSG_CHECKING([for style of include used by $am_make])
2002am__include="#"
2003am__quote=
2004_am_result=none
2005# First try GNU make style include.
2006echo "include confinc" > confmf
2007# Ignore all kinds of additional output from 'make'.
2008case `$am_make -s -f confmf 2> /dev/null` in #(
2009*the\ am__doit\ target*)
2010  am__include=include
2011  am__quote=
2012  _am_result=GNU
2013  ;;
2014esac
2015# Now try BSD make style include.
2016if test "$am__include" = "#"; then
2017   echo '.include "confinc"' > confmf
2018   case `$am_make -s -f confmf 2> /dev/null` in #(
2019   *the\ am__doit\ target*)
2020     am__include=.include
2021     am__quote="\""
2022     _am_result=BSD
2023     ;;
2024   esac
2025fi
2026AC_SUBST([am__include])
2027AC_SUBST([am__quote])
2028AC_MSG_RESULT([$_am_result])
2029rm -f confinc confmf
2030])
2031
2032# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
2033
2034# Copyright (C) 1997-2013 Free Software Foundation, Inc.
2035#
2036# This file is free software; the Free Software Foundation
2037# gives unlimited permission to copy and/or distribute it,
2038# with or without modifications, as long as this notice is preserved.
2039
2040# AM_MISSING_PROG(NAME, PROGRAM)
2041# ------------------------------
2042AC_DEFUN([AM_MISSING_PROG],
2043[AC_REQUIRE([AM_MISSING_HAS_RUN])
2044$1=${$1-"${am_missing_run}$2"}
2045AC_SUBST($1)])
2046
2047# AM_MISSING_HAS_RUN
2048# ------------------
2049# Define MISSING if not defined so far and test if it is modern enough.
2050# If it is, set am_missing_run to use it, otherwise, to nothing.
2051AC_DEFUN([AM_MISSING_HAS_RUN],
2052[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2053AC_REQUIRE_AUX_FILE([missing])dnl
2054if test x"${MISSING+set}" != xset; then
2055  case $am_aux_dir in
2056  *\ * | *\     *)
2057    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
2058  *)
2059    MISSING="\${SHELL} $am_aux_dir/missing" ;;
2060  esac
2061fi
2062# Use eval to expand $SHELL
2063if eval "$MISSING --is-lightweight"; then
2064  am_missing_run="$MISSING "
2065else
2066  am_missing_run=
2067  AC_MSG_WARN(['missing' script is too old or missing])
2068fi
2069])
2070
2071# Helper functions for option handling.                     -*- Autoconf -*-
2072
2073# Copyright (C) 2001-2013 Free Software Foundation, Inc.
2074#
2075# This file is free software; the Free Software Foundation
2076# gives unlimited permission to copy and/or distribute it,
2077# with or without modifications, as long as this notice is preserved.
2078
2079# _AM_MANGLE_OPTION(NAME)
2080# -----------------------
2081AC_DEFUN([_AM_MANGLE_OPTION],
2082[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
2083
2084# _AM_SET_OPTION(NAME)
2085# --------------------
2086# Set option NAME.  Presently that only means defining a flag for this option.
2087AC_DEFUN([_AM_SET_OPTION],
2088[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
2089
2090# _AM_SET_OPTIONS(OPTIONS)
2091# ------------------------
2092# OPTIONS is a space-separated list of Automake options.
2093AC_DEFUN([_AM_SET_OPTIONS],
2094[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
2095
2096# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
2097# -------------------------------------------
2098# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
2099AC_DEFUN([_AM_IF_OPTION],
2100[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
2101
2102# Copyright (C) 1999-2013 Free Software Foundation, Inc.
2103#
2104# This file is free software; the Free Software Foundation
2105# gives unlimited permission to copy and/or distribute it,
2106# with or without modifications, as long as this notice is preserved.
2107
2108# _AM_PROG_CC_C_O
2109# ---------------
2110# Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
2111# to automatically call this.
2112AC_DEFUN([_AM_PROG_CC_C_O],
2113[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2114AC_REQUIRE_AUX_FILE([compile])dnl
2115AC_LANG_PUSH([C])dnl
2116AC_CACHE_CHECK(
2117  [whether $CC understands -c and -o together],
2118  [am_cv_prog_cc_c_o],
2119  [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
2120  # Make sure it works both with $CC and with simple cc.
2121  # Following AC_PROG_CC_C_O, we do the test twice because some
2122  # compilers refuse to overwrite an existing .o file with -o,
2123  # though they will create one.
2124  am_cv_prog_cc_c_o=yes
2125  for am_i in 1 2; do
2126    if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
2127         && test -f conftest2.$ac_objext; then
2128      : OK
2129    else
2130      am_cv_prog_cc_c_o=no
2131      break
2132    fi
2133  done
2134  rm -f core conftest*
2135  unset am_i])
2136if test "$am_cv_prog_cc_c_o" != yes; then
2137   # Losing compiler, so override with the script.
2138   # FIXME: It is wrong to rewrite CC.
2139   # But if we don't then we get into trouble of one sort or another.
2140   # A longer-term fix would be to have automake use am__CC in this case,
2141   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
2142   CC="$am_aux_dir/compile $CC"
2143fi
2144AC_LANG_POP([C])])
2145
2146# For backward compatibility.
2147AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
2148
2149# Copyright (C) 2001-2013 Free Software Foundation, Inc.
2150#
2151# This file is free software; the Free Software Foundation
2152# gives unlimited permission to copy and/or distribute it,
2153# with or without modifications, as long as this notice is preserved.
2154
2155# AM_RUN_LOG(COMMAND)
2156# -------------------
2157# Run COMMAND, save the exit status in ac_status, and log it.
2158# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
2159AC_DEFUN([AM_RUN_LOG],
2160[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
2161   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
2162   ac_status=$?
2163   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2164   (exit $ac_status); }])
2165
2166# Check to make sure that the build environment is sane.    -*- Autoconf -*-
2167
2168# Copyright (C) 1996-2013 Free Software Foundation, Inc.
2169#
2170# This file is free software; the Free Software Foundation
2171# gives unlimited permission to copy and/or distribute it,
2172# with or without modifications, as long as this notice is preserved.
2173
2174# AM_SANITY_CHECK
2175# ---------------
2176AC_DEFUN([AM_SANITY_CHECK],
2177[AC_MSG_CHECKING([whether build environment is sane])
2178# Reject unsafe characters in $srcdir or the absolute working directory
2179# name.  Accept space and tab only in the latter.
2180am_lf='
2181'
2182case `pwd` in
2183  *[[\\\"\#\$\&\'\`$am_lf]]*)
2184    AC_MSG_ERROR([unsafe absolute working directory name]);;
2185esac
2186case $srcdir in
2187  *[[\\\"\#\$\&\'\`$am_lf\ \    ]]*)
2188    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
2189esac
2190
2191# Do 'set' in a subshell so we don't clobber the current shell's
2192# arguments.  Must try -L first in case configure is actually a
2193# symlink; some systems play weird games with the mod time of symlinks
2194# (eg FreeBSD returns the mod time of the symlink's containing
2195# directory).
2196if (
2197   am_has_slept=no
2198   for am_try in 1 2; do
2199     echo "timestamp, slept: $am_has_slept" > conftest.file
2200     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
2201     if test "$[*]" = "X"; then
2202        # -L didn't work.
2203        set X `ls -t "$srcdir/configure" conftest.file`
2204     fi
2205     if test "$[*]" != "X $srcdir/configure conftest.file" \
2206        && test "$[*]" != "X conftest.file $srcdir/configure"; then
2207
2208        # If neither matched, then we have a broken ls.  This can happen
2209        # if, for instance, CONFIG_SHELL is bash and it inherits a
2210        # broken ls alias from the environment.  This has actually
2211        # happened.  Such a system could not be considered "sane".
2212        AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
2213  alias in your environment])
2214     fi
2215     if test "$[2]" = conftest.file || test $am_try -eq 2; then
2216       break
2217     fi
2218     # Just in case.
2219     sleep 1
2220     am_has_slept=yes
2221   done
2222   test "$[2]" = conftest.file
2223   )
2224then
2225   # Ok.
2226   :
2227else
2228   AC_MSG_ERROR([newly created file is older than distributed files!
2229Check your system clock])
2230fi
2231AC_MSG_RESULT([yes])
2232# If we didn't sleep, we still need to ensure time stamps of config.status and
2233# generated files are strictly newer.
2234am_sleep_pid=
2235if grep 'slept: no' conftest.file >/dev/null 2>&1; then
2236  ( sleep 1 ) &
2237  am_sleep_pid=$!
2238fi
2239AC_CONFIG_COMMANDS_PRE(
2240  [AC_MSG_CHECKING([that generated files are newer than configure])
2241   if test -n "$am_sleep_pid"; then
2242     # Hide warnings about reused PIDs.
2243     wait $am_sleep_pid 2>/dev/null
2244   fi
2245   AC_MSG_RESULT([done])])
2246rm -f conftest.file
2247])
2248
2249# Copyright (C) 2009-2013 Free Software Foundation, Inc.
2250#
2251# This file is free software; the Free Software Foundation
2252# gives unlimited permission to copy and/or distribute it,
2253# with or without modifications, as long as this notice is preserved.
2254
2255# AM_SILENT_RULES([DEFAULT])
2256# --------------------------
2257# Enable less verbose build rules; with the default set to DEFAULT
2258# ("yes" being less verbose, "no" or empty being verbose).
2259AC_DEFUN([AM_SILENT_RULES],
2260[AC_ARG_ENABLE([silent-rules], [dnl
2261AS_HELP_STRING(
2262  [--enable-silent-rules],
2263  [less verbose build output (undo: "make V=1")])
2264AS_HELP_STRING(
2265  [--disable-silent-rules],
2266  [verbose build output (undo: "make V=0")])dnl
2267])
2268case $enable_silent_rules in @%:@ (((
2269  yes) AM_DEFAULT_VERBOSITY=0;;
2270   no) AM_DEFAULT_VERBOSITY=1;;
2271    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
2272esac
2273dnl
2274dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
2275dnl do not support nested variable expansions.
2276dnl See automake bug#9928 and bug#10237.
2277am_make=${MAKE-make}
2278AC_CACHE_CHECK([whether $am_make supports nested variables],
2279   [am_cv_make_support_nested_variables],
2280   [if AS_ECHO([['TRUE=$(BAR$(V))
2281BAR0=false
2282BAR1=true
2283V=1
2284am__doit:
2285        @$(TRUE)
2286.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
2287  am_cv_make_support_nested_variables=yes
2288else
2289  am_cv_make_support_nested_variables=no
2290fi])
2291if test $am_cv_make_support_nested_variables = yes; then
2292  dnl Using '$V' instead of '$(V)' breaks IRIX make.
2293  AM_V='$(V)'
2294  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
2295else
2296  AM_V=$AM_DEFAULT_VERBOSITY
2297  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
2298fi
2299AC_SUBST([AM_V])dnl
2300AM_SUBST_NOTMAKE([AM_V])dnl
2301AC_SUBST([AM_DEFAULT_V])dnl
2302AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
2303AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
2304AM_BACKSLASH='\'
2305AC_SUBST([AM_BACKSLASH])dnl
2306_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
2307])
2308
2309# Copyright (C) 2001-2013 Free Software Foundation, Inc.
2310#
2311# This file is free software; the Free Software Foundation
2312# gives unlimited permission to copy and/or distribute it,
2313# with or without modifications, as long as this notice is preserved.
2314
2315# AM_PROG_INSTALL_STRIP
2316# ---------------------
2317# One issue with vendor 'install' (even GNU) is that you can't
2318# specify the program used to strip binaries.  This is especially
2319# annoying in cross-compiling environments, where the build's strip
2320# is unlikely to handle the host's binaries.
2321# Fortunately install-sh will honor a STRIPPROG variable, so we
2322# always use install-sh in "make install-strip", and initialize
2323# STRIPPROG with the value of the STRIP variable (set by the user).
2324AC_DEFUN([AM_PROG_INSTALL_STRIP],
2325[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
2326# Installed binaries are usually stripped using 'strip' when the user
2327# run "make install-strip".  However 'strip' might not be the right
2328# tool to use in cross-compilation environments, therefore Automake
2329# will honor the 'STRIP' environment variable to overrule this program.
2330dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
2331if test "$cross_compiling" != no; then
2332  AC_CHECK_TOOL([STRIP], [strip], :)
2333fi
2334INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
2335AC_SUBST([INSTALL_STRIP_PROGRAM])])
2336
2337# Copyright (C) 2006-2013 Free Software Foundation, Inc.
2338#
2339# This file is free software; the Free Software Foundation
2340# gives unlimited permission to copy and/or distribute it,
2341# with or without modifications, as long as this notice is preserved.
2342
2343# _AM_SUBST_NOTMAKE(VARIABLE)
2344# ---------------------------
2345# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
2346# This macro is traced by Automake.
2347AC_DEFUN([_AM_SUBST_NOTMAKE])
2348
2349# AM_SUBST_NOTMAKE(VARIABLE)
2350# --------------------------
2351# Public sister of _AM_SUBST_NOTMAKE.
2352AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
2353
2354# Check how to create a tarball.                            -*- Autoconf -*-
2355
2356# Copyright (C) 2004-2013 Free Software Foundation, Inc.
2357#
2358# This file is free software; the Free Software Foundation
2359# gives unlimited permission to copy and/or distribute it,
2360# with or without modifications, as long as this notice is preserved.
2361
2362# _AM_PROG_TAR(FORMAT)
2363# --------------------
2364# Check how to create a tarball in format FORMAT.
2365# FORMAT should be one of 'v7', 'ustar', or 'pax'.
2366#
2367# Substitute a variable $(am__tar) that is a command
2368# writing to stdout a FORMAT-tarball containing the directory
2369# $tardir.
2370#     tardir=directory && $(am__tar) > result.tar
2371#
2372# Substitute a variable $(am__untar) that extract such
2373# a tarball read from stdin.
2374#     $(am__untar) < result.tar
2375#
2376AC_DEFUN([_AM_PROG_TAR],
2377[# Always define AMTAR for backward compatibility.  Yes, it's still used
2378# in the wild :-(  We should find a proper way to deprecate it ...
2379AC_SUBST([AMTAR], ['$${TAR-tar}'])
2380
2381# We'll loop over all known methods to create a tar archive until one works.
2382_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
2383
2384m4_if([$1], [v7],
2385  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
2386
2387  [m4_case([$1],
2388    [ustar],
2389     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
2390      # There is notably a 21 bits limit for the UID and the GID.  In fact,
2391      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
2392      # and bug#13588).
2393      am_max_uid=2097151 # 2^21 - 1
2394      am_max_gid=$am_max_uid
2395      # The $UID and $GID variables are not portable, so we need to resort
2396      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
2397      # below are definitely unexpected, so allow the users to see them
2398      # (that is, avoid stderr redirection).
2399      am_uid=`id -u || echo unknown`
2400      am_gid=`id -g || echo unknown`
2401      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
2402      if test $am_uid -le $am_max_uid; then
2403         AC_MSG_RESULT([yes])
2404      else
2405         AC_MSG_RESULT([no])
2406         _am_tools=none
2407      fi
2408      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
2409      if test $am_gid -le $am_max_gid; then
2410         AC_MSG_RESULT([yes])
2411      else
2412        AC_MSG_RESULT([no])
2413        _am_tools=none
2414      fi],
2415
2416  [pax],
2417    [],
2418
2419  [m4_fatal([Unknown tar format])])
2420
2421  AC_MSG_CHECKING([how to create a $1 tar archive])
2422
2423  # Go ahead even if we have the value already cached.  We do so because we
2424  # need to set the values for the 'am__tar' and 'am__untar' variables.
2425  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
2426
2427  for _am_tool in $_am_tools; do
2428    case $_am_tool in
2429    gnutar)
2430      for _am_tar in tar gnutar gtar; do
2431        AM_RUN_LOG([$_am_tar --version]) && break
2432      done
2433      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
2434      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
2435      am__untar="$_am_tar -xf -"
2436      ;;
2437    plaintar)
2438      # Must skip GNU tar: if it does not support --format= it doesn't create
2439      # ustar tarball either.
2440      (tar --version) >/dev/null 2>&1 && continue
2441      am__tar='tar chf - "$$tardir"'
2442      am__tar_='tar chf - "$tardir"'
2443      am__untar='tar xf -'
2444      ;;
2445    pax)
2446      am__tar='pax -L -x $1 -w "$$tardir"'
2447      am__tar_='pax -L -x $1 -w "$tardir"'
2448      am__untar='pax -r'
2449      ;;
2450    cpio)
2451      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
2452      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
2453      am__untar='cpio -i -H $1 -d'
2454      ;;
2455    none)
2456      am__tar=false
2457      am__tar_=false
2458      am__untar=false
2459      ;;
2460    esac
2461
2462    # If the value was cached, stop now.  We just wanted to have am__tar
2463    # and am__untar set.
2464    test -n "${am_cv_prog_tar_$1}" && break
2465
2466    # tar/untar a dummy directory, and stop if the command works.
2467    rm -rf conftest.dir
2468    mkdir conftest.dir
2469    echo GrepMe > conftest.dir/file
2470    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
2471    rm -rf conftest.dir
2472    if test -s conftest.tar; then
2473      AM_RUN_LOG([$am__untar <conftest.tar])
2474      AM_RUN_LOG([cat conftest.dir/file])
2475      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
2476    fi
2477  done
2478  rm -rf conftest.dir
2479
2480  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
2481  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
2482
2483AC_SUBST([am__tar])
2484AC_SUBST([am__untar])
2485]) # _AM_PROG_TAR
2486
2487# Autoconf support for the Vala compiler
2488
2489# Copyright (C) 2008-2013 Free Software Foundation, Inc.
2490#
2491# This file is free software; the Free Software Foundation
2492# gives unlimited permission to copy and/or distribute it,
2493# with or without modifications, as long as this notice is preserved.
2494
2495# Check whether the Vala compiler exists in $PATH.  If it is found, the
2496# variable VALAC is set pointing to its absolute path.  Otherwise, it is
2497# simply set to 'valac'.
2498# Optionally a minimum release number of the compiler can be requested.
2499# If the ACTION-IF-FOUND parameter is given, it will be run if a proper
2500# Vala compiler is found.
2501# Similarly, if the ACTION-IF-FOUND is given, it will be run if no proper
2502# Vala compiler is found.  It defaults to simply print a warning about the
2503# situation, but otherwise proceeding with the configuration.
2504#
2505# AM_PROG_VALAC([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2506# --------------------------------------------------------------------------
2507AC_DEFUN([AM_PROG_VALAC],
2508  [AC_PATH_PROG([VALAC], [valac], [valac])
2509   AS_IF([test "$VALAC" != valac && test -n "$1"],
2510      [AC_MSG_CHECKING([whether $VALAC is at least version $1])
2511       am__vala_version=`$VALAC --version | sed 's/Vala  *//'`
2512       AS_VERSION_COMPARE([$1], ["$am__vala_version"],
2513         [AC_MSG_RESULT([yes])],
2514         [AC_MSG_RESULT([yes])],
2515         [AC_MSG_RESULT([no])
2516          VALAC=valac])])
2517    if test "$VALAC" = valac; then
2518      m4_default([$3],
2519        [AC_MSG_WARN([no proper vala compiler found])
2520         AC_MSG_WARN([you will not be able to compile vala source files])])
2521    else
2522      m4_default([$2], [:])
2523    fi])
2524
Note: See TracBrowser for help on using the repository browser.