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