1 # generated automatically by aclocal 1.14.1 -*- Autoconf -*-
3 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
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.
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
14 m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15 m4_ifndef([AC_AUTOCONF_VERSION],
16 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
18 [m4_warning([this file was generated for autoconf 2.69.
19 You have another version of autoconf. It may work, but is not guaranteed to.
20 If you have problems, you may need to regenerate the build system entirely.
21 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
24 dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether
25 dnl the schema should be compiled
28 AC_DEFUN([GLIB_GSETTINGS],
30 m4_pattern_allow([AM_V_GEN])
31 AC_ARG_ENABLE(schemas-compile,
32 AS_HELP_STRING([--disable-schemas-compile],
33 [Disable regeneration of gschemas.compiled on install]),
35 yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE="" ;;
36 no) GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;;
37 *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;;
39 AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE])
40 PKG_PROG_PKG_CONFIG([0.16])
41 AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas])
42 if test x$cross_compiling != xyes; then
43 GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0`
45 AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas)
47 AC_SUBST(GLIB_COMPILE_SCHEMAS)
48 if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then
49 ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2])
51 ifelse([$1],,[:],[$1])
55 .PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas
57 mostlyclean-am: clean-gsettings-schemas
59 gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE))
61 %.gschema.valid: %.gschema.xml $(gsettings__enum_file)
62 $(AM_V_GEN) $(GLIB_COMPILE_SCHEMAS) --strict --dry-run $(addprefix --schema-file=,$(gsettings__enum_file)) --schema-file=$< && mkdir -p [$](@D) && touch [$]@
64 all-am: $(gsettings_SCHEMAS:.xml=.valid)
65 uninstall-am: uninstall-gsettings-schemas
66 install-data-am: install-gsettings-schemas
68 .SECONDARY: $(gsettings_SCHEMAS)
70 install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file)
72 if test -n "$^"; then \
73 test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \
74 $(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \
75 test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \
78 uninstall-gsettings-schemas:
80 @list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \
81 files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \
82 test -n "$$files" || exit 0; \
83 echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \
84 cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files
85 test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
87 clean-gsettings-schemas:
88 rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
90 ifdef gsettings_ENUM_NAMESPACE
91 $(gsettings__enum_file): $(gsettings_ENUM_FILES)
92 $(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 [$]@
95 _GSETTINGS_SUBST(GSETTINGS_RULES)
98 dnl _GSETTINGS_SUBST(VARIABLE)
99 dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
100 AC_DEFUN([_GSETTINGS_SUBST],
103 m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
107 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
108 # serial 1 (pkg-config-0.24)
110 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
112 # This program is free software; you can redistribute it and/or modify
113 # it under the terms of the GNU General Public License as published by
114 # the Free Software Foundation; either version 2 of the License, or
115 # (at your option) any later version.
117 # This program is distributed in the hope that it will be useful, but
118 # WITHOUT ANY WARRANTY; without even the implied warranty of
119 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
120 # General Public License for more details.
122 # You should have received a copy of the GNU General Public License
123 # along with this program; if not, write to the Free Software
124 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
126 # As a special exception to the GNU General Public License, if you
127 # distribute this file as part of a program that contains a
128 # configuration script generated by Autoconf, you may include it under
129 # the same distribution terms that you use for the rest of that program.
131 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
132 # ----------------------------------
133 AC_DEFUN([PKG_PROG_PKG_CONFIG],
134 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
135 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
136 m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
137 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
138 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
139 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
141 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
142 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
144 if test -n "$PKG_CONFIG"; then
145 _pkg_min_version=m4_default([$1], [0.9.0])
146 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
147 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
154 ])# PKG_PROG_PKG_CONFIG
156 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
158 # Check to see whether a particular set of modules exists. Similar
159 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
161 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
162 # only at the first occurence in configure.ac, so if the first place
163 # it's called might be skipped (such as if it is within an "if", you
164 # have to call PKG_CHECK_EXISTS manually
165 # --------------------------------------------------------------
166 AC_DEFUN([PKG_CHECK_EXISTS],
167 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
168 if test -n "$PKG_CONFIG" && \
169 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
170 m4_default([$2], [:])
171 m4_ifvaln([$3], [else
175 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
176 # ---------------------------------------------
177 m4_define([_PKG_CONFIG],
178 [if test -n "$$1"; then
180 elif test -n "$PKG_CONFIG"; then
181 PKG_CHECK_EXISTS([$3],
182 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
183 test "x$?" != "x0" && pkg_failed=yes ],
190 # _PKG_SHORT_ERRORS_SUPPORTED
191 # -----------------------------
192 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
193 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
194 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
195 _pkg_short_errors_supported=yes
197 _pkg_short_errors_supported=no
199 ])# _PKG_SHORT_ERRORS_SUPPORTED
202 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
203 # [ACTION-IF-NOT-FOUND])
206 # Note that if there is a possibility the first call to
207 # PKG_CHECK_MODULES might not happen, you should be sure to include an
208 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
211 # --------------------------------------------------------------
212 AC_DEFUN([PKG_CHECK_MODULES],
213 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
214 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
215 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
218 AC_MSG_CHECKING([for $1])
220 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
221 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
223 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
224 and $1[]_LIBS to avoid the need to call pkg-config.
225 See the pkg-config man page for more details.])
227 if test $pkg_failed = yes; then
229 _PKG_SHORT_ERRORS_SUPPORTED
230 if test $_pkg_short_errors_supported = yes; then
231 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
233 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
235 # Put the nasty error message in config.log where it belongs
236 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
238 m4_default([$4], [AC_MSG_ERROR(
239 [Package requirements ($2) were not met:
243 Consider adjusting the PKG_CONFIG_PATH environment variable if you
244 installed software in a non-standard prefix.
248 elif test $pkg_failed = untried; then
250 m4_default([$4], [AC_MSG_FAILURE(
251 [The pkg-config script could not be found or is too old. Make sure it
252 is in your PATH or set the PKG_CONFIG environment variable to the full
257 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
260 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
261 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
265 ])# PKG_CHECK_MODULES
268 # PKG_INSTALLDIR(DIRECTORY)
269 # -------------------------
270 # Substitutes the variable pkgconfigdir as the location where a module
271 # should install pkg-config .pc files. By default the directory is
272 # $libdir/pkgconfig, but the default can be changed by passing
273 # DIRECTORY. The user can override through the --with-pkgconfigdir
275 AC_DEFUN([PKG_INSTALLDIR],
276 [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
277 m4_pushdef([pkg_description],
278 [pkg-config installation directory @<:@]pkg_default[@:>@])
279 AC_ARG_WITH([pkgconfigdir],
280 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
281 [with_pkgconfigdir=]pkg_default)
282 AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
283 m4_popdef([pkg_default])
284 m4_popdef([pkg_description])
285 ]) dnl PKG_INSTALLDIR
288 # PKG_NOARCH_INSTALLDIR(DIRECTORY)
289 # -------------------------
290 # Substitutes the variable noarch_pkgconfigdir as the location where a
291 # module should install arch-independent pkg-config .pc files. By
292 # default the directory is $datadir/pkgconfig, but the default can be
293 # changed by passing DIRECTORY. The user can override through the
294 # --with-noarch-pkgconfigdir parameter.
295 AC_DEFUN([PKG_NOARCH_INSTALLDIR],
296 [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
297 m4_pushdef([pkg_description],
298 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
299 AC_ARG_WITH([noarch-pkgconfigdir],
300 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
301 [with_noarch_pkgconfigdir=]pkg_default)
302 AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
303 m4_popdef([pkg_default])
304 m4_popdef([pkg_description])
305 ]) dnl PKG_NOARCH_INSTALLDIR
308 # PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
309 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
310 # -------------------------------------------
311 # Retrieves the value of the pkg-config variable for the given module.
312 AC_DEFUN([PKG_CHECK_VAR],
313 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
314 AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
316 _PKG_CONFIG([$1], [variable="][$3]["], [$2])
317 AS_VAR_COPY([$1], [pkg_cv_][$1])
319 AS_VAR_IF([$1], [""], [$5], [$4])dnl
322 # Copyright (C) 2002-2013 Free Software Foundation, Inc.
324 # This file is free software; the Free Software Foundation
325 # gives unlimited permission to copy and/or distribute it,
326 # with or without modifications, as long as this notice is preserved.
328 # AM_AUTOMAKE_VERSION(VERSION)
329 # ----------------------------
330 # Automake X.Y traces this macro to ensure aclocal.m4 has been
331 # generated from the m4 files accompanying Automake X.Y.
332 # (This private macro should not be called outside this file.)
333 AC_DEFUN([AM_AUTOMAKE_VERSION],
334 [am__api_version='1.14'
335 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
336 dnl require some minimum version. Point them to the right macro.
337 m4_if([$1], [1.14.1], [],
338 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
341 # _AM_AUTOCONF_VERSION(VERSION)
342 # -----------------------------
343 # aclocal traces this macro to find the Autoconf version.
344 # This is a private macro too. Using m4_define simplifies
345 # the logic in aclocal, which can simply ignore this definition.
346 m4_define([_AM_AUTOCONF_VERSION], [])
348 # AM_SET_CURRENT_AUTOMAKE_VERSION
349 # -------------------------------
350 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
351 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
352 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
353 [AM_AUTOMAKE_VERSION([1.14.1])dnl
354 m4_ifndef([AC_AUTOCONF_VERSION],
355 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
356 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
358 # Copyright (C) 2011-2013 Free Software Foundation, Inc.
360 # This file is free software; the Free Software Foundation
361 # gives unlimited permission to copy and/or distribute it,
362 # with or without modifications, as long as this notice is preserved.
364 # AM_PROG_AR([ACT-IF-FAIL])
365 # -------------------------
366 # Try to determine the archiver interface, and trigger the ar-lib wrapper
367 # if it is needed. If the detection of archiver interface fails, run
368 # ACT-IF-FAIL (default is to abort configure with a proper error message).
369 AC_DEFUN([AM_PROG_AR],
370 [AC_BEFORE([$0], [LT_INIT])dnl
371 AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl
372 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
373 AC_REQUIRE_AUX_FILE([ar-lib])dnl
374 AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false])
377 AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface],
379 am_cv_ar_interface=ar
380 AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])],
381 [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
382 AC_TRY_EVAL([am_ar_try])
383 if test "$ac_status" -eq 0; then
384 am_cv_ar_interface=ar
386 am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
387 AC_TRY_EVAL([am_ar_try])
388 if test "$ac_status" -eq 0; then
389 am_cv_ar_interface=lib
391 am_cv_ar_interface=unknown
394 rm -f conftest.lib libconftest.a
398 case $am_cv_ar_interface in
402 # Microsoft lib, so override with the ar-lib wrapper script.
403 # FIXME: It is wrong to rewrite AR.
404 # But if we don't then we get into trouble of one sort or another.
405 # A longer-term fix would be to have automake use am__AR in this case,
406 # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
408 AR="$am_aux_dir/ar-lib $AR"
412 [AC_MSG_ERROR([could not determine $AR interface])])
418 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
420 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
422 # This file is free software; the Free Software Foundation
423 # gives unlimited permission to copy and/or distribute it,
424 # with or without modifications, as long as this notice is preserved.
426 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
427 # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
428 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
430 # Of course, Automake must honor this variable whenever it calls a
431 # tool from the auxiliary directory. The problem is that $srcdir (and
432 # therefore $ac_aux_dir as well) can be either absolute or relative,
433 # depending on how configure is run. This is pretty annoying, since
434 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
435 # source directory, any form will work fine, but in subdirectories a
436 # relative path needs to be adjusted first.
438 # $ac_aux_dir/missing
439 # fails when called from a subdirectory if $ac_aux_dir is relative
440 # $top_srcdir/$ac_aux_dir/missing
441 # fails if $ac_aux_dir is absolute,
442 # fails when called from a subdirectory in a VPATH build with
443 # a relative $ac_aux_dir
445 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
446 # are both prefixed by $srcdir. In an in-source build this is usually
447 # harmless because $srcdir is '.', but things will broke when you
448 # start a VPATH build or use an absolute $srcdir.
450 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
451 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
452 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
453 # and then we would define $MISSING as
454 # MISSING="\${SHELL} $am_aux_dir/missing"
455 # This will work as long as MISSING is not called from configure, because
456 # unfortunately $(top_srcdir) has no meaning in configure.
457 # However there are other variables, like CC, which are often used in
458 # configure, and could therefore not use this "fixed" $ac_aux_dir.
460 # Another solution, used here, is to always expand $ac_aux_dir to an
461 # absolute PATH. The drawback is that using absolute paths prevent a
462 # configured tree to be moved without reconfiguration.
464 AC_DEFUN([AM_AUX_DIR_EXPAND],
465 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
466 # Expand $ac_aux_dir to an absolute path.
467 am_aux_dir=`cd "$ac_aux_dir" && pwd`
470 # AM_CONDITIONAL -*- Autoconf -*-
472 # Copyright (C) 1997-2013 Free Software Foundation, Inc.
474 # This file is free software; the Free Software Foundation
475 # gives unlimited permission to copy and/or distribute it,
476 # with or without modifications, as long as this notice is preserved.
478 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
479 # -------------------------------------
480 # Define a conditional.
481 AC_DEFUN([AM_CONDITIONAL],
482 [AC_PREREQ([2.52])dnl
483 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
484 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
485 AC_SUBST([$1_TRUE])dnl
486 AC_SUBST([$1_FALSE])dnl
487 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
488 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
489 m4_define([_AM_COND_VALUE_$1], [$2])dnl
497 AC_CONFIG_COMMANDS_PRE(
498 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
499 AC_MSG_ERROR([[conditional "$1" was never defined.
500 Usually this means the macro was only invoked conditionally.]])
503 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
505 # This file is free software; the Free Software Foundation
506 # gives unlimited permission to copy and/or distribute it,
507 # with or without modifications, as long as this notice is preserved.
510 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
511 # written in clear, in which case automake, when reading aclocal.m4,
512 # will think it sees a *use*, and therefore will trigger all it's
513 # C support machinery. Also note that it means that autoscan, seeing
514 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
517 # _AM_DEPENDENCIES(NAME)
518 # ----------------------
519 # See how the compiler implements dependency checking.
520 # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
521 # We try a few techniques and use that to set a single cache variable.
523 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
524 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
525 # dependency, and given that the user is not expected to run this macro,
526 # just rely on AC_PROG_CC.
527 AC_DEFUN([_AM_DEPENDENCIES],
528 [AC_REQUIRE([AM_SET_DEPDIR])dnl
529 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
530 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
531 AC_REQUIRE([AM_DEP_TRACK])dnl
533 m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
534 [$1], [CXX], [depcc="$CXX" am_compiler_list=],
535 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
536 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
537 [$1], [UPC], [depcc="$UPC" am_compiler_list=],
538 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
539 [depcc="$$1" am_compiler_list=])
541 AC_CACHE_CHECK([dependency style of $depcc],
542 [am_cv_$1_dependencies_compiler_type],
543 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
544 # We make a subdir and do the tests there. Otherwise we can end up
545 # making bogus files that we don't know about and never remove. For
546 # instance it was reported that on HP-UX the gcc test will end up
547 # making a dummy file named 'D' -- because '-MD' means "put the output
551 # Copy depcomp to subdir because otherwise we won't find it if we're
552 # using a relative directory.
553 cp "$am_depcomp" conftest.dir
555 # We will build objects and dependencies in a subdirectory because
556 # it helps to detect inapplicable dependency modes. For instance
557 # both Tru64's cc and ICC support -MD to output dependencies as a
558 # side effect of compilation, but ICC will put the dependencies in
559 # the current directory while Tru64 will put them in the object
563 am_cv_$1_dependencies_compiler_type=none
564 if test "$am_compiler_list" = ""; then
565 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
569 [case " $depcc " in #(
570 *\ -arch\ *\ -arch\ *) am__universal=true ;;
573 [case " $depcc " in #(
574 *\ -arch\ *\ -arch\ *) am__universal=true ;;
577 for depmode in $am_compiler_list; do
578 # Setup a source with many dependencies, because some compilers
579 # like to wrap large dependency lists on column 80 (with \), and
580 # we should not choose a depcomp mode which is confused by this.
582 # We need to recreate these files for each test, as the compiler may
583 # overwrite some of them when testing with obscure command lines.
584 # This happens at least with the AIX C compiler.
586 for i in 1 2 3 4 5 6; do
587 echo '#include "conftst'$i'.h"' >> sub/conftest.c
588 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
589 # Solaris 10 /bin/sh.
590 echo '/* dummy */' > sub/conftst$i.h
592 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
594 # We check with '-c' and '-o' for the sake of the "dashmstdout"
595 # mode. It turns out that the SunPro C++ compiler does not properly
596 # handle '-M -o', and we need to detect this. Also, some Intel
597 # versions had trouble with output in subdirs.
598 am__obj=sub/conftest.${OBJEXT-o}
599 am__minus_obj="-o $am__obj"
602 # This depmode causes a compiler race in universal mode.
603 test "$am__universal" = false || continue
606 # After this tag, mechanisms are not by side-effect, so they'll
607 # only be used when explicitly requested.
608 if test "x$enable_dependency_tracking" = xyes; then
614 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
615 # This compiler won't grok '-c -o', but also, the minuso test has
616 # not run yet. These depmodes are late enough in the game, and
617 # so weak that their functioning should not be impacted.
618 am__obj=conftest.${OBJEXT-o}
623 if depmode=$depmode \
624 source=sub/conftest.c object=$am__obj \
625 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
626 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
627 >/dev/null 2>conftest.err &&
628 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
629 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
630 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
631 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
632 # icc doesn't choke on unknown options, it will just issue warnings
633 # or remarks (even with -Werror). So we grep stderr for any message
634 # that says an option was ignored or not supported.
635 # When given -MP, icc 7.0 and 7.1 complain thusly:
636 # icc: Command line warning: ignoring option '-M'; no argument required
637 # The diagnosis changed in icc 8.0:
638 # icc: Command line remark: option '-MP' not supported
639 if (grep 'ignoring option' conftest.err ||
640 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
641 am_cv_$1_dependencies_compiler_type=$depmode
650 am_cv_$1_dependencies_compiler_type=none
653 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
654 AM_CONDITIONAL([am__fastdep$1], [
655 test "x$enable_dependency_tracking" != xno \
656 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
662 # Choose a directory name for dependency files.
663 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
664 AC_DEFUN([AM_SET_DEPDIR],
665 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
666 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
672 AC_DEFUN([AM_DEP_TRACK],
673 [AC_ARG_ENABLE([dependency-tracking], [dnl
675 [--enable-dependency-tracking],
676 [do not reject slow dependency extractors])
678 [--disable-dependency-tracking],
679 [speeds up one-time build])])
680 if test "x$enable_dependency_tracking" != xno; then
681 am_depcomp="$ac_aux_dir/depcomp"
685 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
686 AC_SUBST([AMDEPBACKSLASH])dnl
687 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
688 AC_SUBST([am__nodep])dnl
689 _AM_SUBST_NOTMAKE([am__nodep])dnl
692 # Generate code to set up dependency tracking. -*- Autoconf -*-
694 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
696 # This file is free software; the Free Software Foundation
697 # gives unlimited permission to copy and/or distribute it,
698 # with or without modifications, as long as this notice is preserved.
701 # _AM_OUTPUT_DEPENDENCY_COMMANDS
702 # ------------------------------
703 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
705 # Older Autoconf quotes --file arguments for eval, but not when files
706 # are listed without --file. Let's play safe and only enable the eval
707 # if we detect the quoting.
708 case $CONFIG_FILES in
709 *\'*) eval set x "$CONFIG_FILES" ;;
710 *) set x $CONFIG_FILES ;;
715 # Strip MF so we end up with the name of the file.
716 mf=`echo "$mf" | sed -e 's/:.*$//'`
717 # Check whether this is an Automake generated Makefile or not.
718 # We used to match only the files named 'Makefile.in', but
719 # some people rename them; so instead we look at the file content.
720 # Grep'ing the first line is not enough: some people post-process
721 # each Makefile.in and add a new line on top of each file to say so.
722 # Grep'ing the whole file is not good either: AIX grep has a line
723 # limit of 2048, but all sed's we know have understand at least 4000.
724 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
725 dirpart=`AS_DIRNAME("$mf")`
729 # Extract the definition of DEPDIR, am__include, and am__quote
730 # from the Makefile without running 'make'.
731 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
732 test -z "$DEPDIR" && continue
733 am__include=`sed -n 's/^am__include = //p' < "$mf"`
734 test -z "$am__include" && continue
735 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
736 # Find all dependency output files, they are included files with
737 # $(DEPDIR) in their names. We invoke sed twice because it is the
738 # simplest approach to changing $(DEPDIR) to its actual value in the
740 for file in `sed -n "
741 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
742 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
743 # Make sure the directory exists.
744 test -f "$dirpart/$file" && continue
745 fdir=`AS_DIRNAME(["$file"])`
746 AS_MKDIR_P([$dirpart/$fdir])
747 # echo "creating $dirpart/$file"
748 echo '# dummy' > "$dirpart/$file"
752 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
755 # AM_OUTPUT_DEPENDENCY_COMMANDS
756 # -----------------------------
757 # This macro should only be invoked once -- use via AC_REQUIRE.
759 # This code is only required when automatic dependency tracking
760 # is enabled. FIXME. This creates each '.P' file that we will
761 # need in order to bootstrap the dependency handling code.
762 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
763 [AC_CONFIG_COMMANDS([depfiles],
764 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
765 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
768 # Do all the work for Automake. -*- Autoconf -*-
770 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
772 # This file is free software; the Free Software Foundation
773 # gives unlimited permission to copy and/or distribute it,
774 # with or without modifications, as long as this notice is preserved.
776 # This macro actually does too much. Some checks are only needed if
777 # your package does certain things. But this isn't really a big deal.
779 dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
780 m4_define([AC_PROG_CC],
781 m4_defn([AC_PROG_CC])
785 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
786 # AM_INIT_AUTOMAKE([OPTIONS])
787 # -----------------------------------------------
788 # The call with PACKAGE and VERSION arguments is the old style
789 # call (pre autoconf-2.50), which is being phased out. PACKAGE
790 # and VERSION should now be passed to AC_INIT and removed from
791 # the call to AM_INIT_AUTOMAKE.
792 # We support both call styles for the transition. After
793 # the next Automake release, Autoconf can make the AC_INIT
794 # arguments mandatory, and then we can depend on a new Autoconf
795 # release and drop the old call support.
796 AC_DEFUN([AM_INIT_AUTOMAKE],
797 [AC_PREREQ([2.65])dnl
798 dnl Autoconf wants to disallow AM_ names. We explicitly allow
799 dnl the ones we care about.
800 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
801 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
802 AC_REQUIRE([AC_PROG_INSTALL])dnl
803 if test "`cd $srcdir && pwd`" != "`pwd`"; then
804 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
805 # is not polluted with repeated "-I."
806 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
807 # test to see if srcdir already configured
808 if test -f $srcdir/config.status; then
809 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
813 # test whether we have cygpath
814 if test -z "$CYGPATH_W"; then
815 if (cygpath --version) >/dev/null 2>/dev/null; then
816 CYGPATH_W='cygpath -w'
821 AC_SUBST([CYGPATH_W])
823 # Define the identity of the package.
824 dnl Distinguish between old-style and new-style calls.
826 [AC_DIAGNOSE([obsolete],
827 [$0: two- and three-arguments forms are deprecated.])
828 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
829 AC_SUBST([PACKAGE], [$1])dnl
830 AC_SUBST([VERSION], [$2])],
831 [_AM_SET_OPTIONS([$1])dnl
832 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
834 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
836 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
837 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
838 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
840 _AM_IF_OPTION([no-define],,
841 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
842 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
844 # Some tools Automake needs.
845 AC_REQUIRE([AM_SANITY_CHECK])dnl
846 AC_REQUIRE([AC_ARG_PROGRAM])dnl
847 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
848 AM_MISSING_PROG([AUTOCONF], [autoconf])
849 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
850 AM_MISSING_PROG([AUTOHEADER], [autoheader])
851 AM_MISSING_PROG([MAKEINFO], [makeinfo])
852 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
853 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
854 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
855 # For better backward compatibility. To be removed once Automake 1.9.x
856 # dies out for good. For more background, see:
857 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
858 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
859 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
860 # We need awk for the "check" target. The system "awk" is bad on
862 AC_REQUIRE([AC_PROG_AWK])dnl
863 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
864 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
865 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
866 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
867 [_AM_PROG_TAR([v7])])])
868 _AM_IF_OPTION([no-dependencies],,
869 [AC_PROVIDE_IFELSE([AC_PROG_CC],
870 [_AM_DEPENDENCIES([CC])],
871 [m4_define([AC_PROG_CC],
872 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
873 AC_PROVIDE_IFELSE([AC_PROG_CXX],
874 [_AM_DEPENDENCIES([CXX])],
875 [m4_define([AC_PROG_CXX],
876 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
877 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
878 [_AM_DEPENDENCIES([OBJC])],
879 [m4_define([AC_PROG_OBJC],
880 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
881 AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
882 [_AM_DEPENDENCIES([OBJCXX])],
883 [m4_define([AC_PROG_OBJCXX],
884 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
886 AC_REQUIRE([AM_SILENT_RULES])dnl
887 dnl The testsuite driver may need to know about EXEEXT, so add the
888 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
889 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
890 AC_CONFIG_COMMANDS_PRE(dnl
891 [m4_provide_if([_AM_COMPILER_EXEEXT],
892 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
894 # POSIX will say in a future version that running "rm -f" with no argument
895 # is OK; and we want to be able to make that assumption in our Makefile
896 # recipes. So use an aggressive probe to check that the usage we want is
897 # actually supported "in the wild" to an acceptable degree.
898 # See automake bug#10828.
899 # To make any issue more visible, cause the running configure to be aborted
900 # by default if the 'rm' program in use doesn't match our expectations; the
901 # user can still override this though.
902 if rm -f && rm -fr && rm -rf; then : OK; else
906 Your 'rm' program seems unable to run without file operands specified
907 on the command line, even when the '-f' option is present. This is contrary
908 to the behaviour of most rm programs out there, and not conforming with
909 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
911 Please tell bug-automake@gnu.org about your system, including the value
912 of your $PATH and any error possibly output before this message. This
913 can help us improve future automake versions.
916 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
917 echo 'Configuration will proceed anyway, since you have set the' >&2
918 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
922 Aborting the configuration process, to ensure you take notice of the issue.
924 You can download and install GNU coreutils to get an 'rm' implementation
925 that behaves properly: <http://www.gnu.org/software/coreutils/>.
927 If you want to complete the configuration process using your problematic
928 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
929 to "yes", and re-run configure.
932 AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
937 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
938 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
939 dnl mangled by Autoconf and run in a shell conditional statement.
940 m4_define([_AC_COMPILER_EXEEXT],
941 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
943 # When config.status generates a header, we must update the stamp-h file.
944 # This file resides in the same directory as the config header
945 # that is generated. The stamp files are numbered to have different names.
947 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
948 # loop where config.status creates the headers, so we can generate
949 # our stamp files there.
950 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
951 [# Compute $1's index in $config_headers.
954 for _am_header in $config_headers :; do
956 $_am_arg | $_am_arg:* )
959 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
962 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
964 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
966 # This file is free software; the Free Software Foundation
967 # gives unlimited permission to copy and/or distribute it,
968 # with or without modifications, as long as this notice is preserved.
972 # Define $install_sh.
973 AC_DEFUN([AM_PROG_INSTALL_SH],
974 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
975 if test x"${install_sh}" != xset; then
978 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
980 install_sh="\${SHELL} $am_aux_dir/install-sh"
983 AC_SUBST([install_sh])])
985 # Copyright (C) 2003-2013 Free Software Foundation, Inc.
987 # This file is free software; the Free Software Foundation
988 # gives unlimited permission to copy and/or distribute it,
989 # with or without modifications, as long as this notice is preserved.
991 # Check whether the underlying file-system supports filenames
992 # with a leading dot. For instance MS-DOS doesn't.
993 AC_DEFUN([AM_SET_LEADING_DOT],
994 [rm -rf .tst 2>/dev/null
995 mkdir .tst 2>/dev/null
996 if test -d .tst; then
1001 rmdir .tst 2>/dev/null
1002 AC_SUBST([am__leading_dot])])
1004 # Check to see how 'make' treats includes. -*- Autoconf -*-
1006 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
1008 # This file is free software; the Free Software Foundation
1009 # gives unlimited permission to copy and/or distribute it,
1010 # with or without modifications, as long as this notice is preserved.
1014 # Check to see how make treats includes.
1015 AC_DEFUN([AM_MAKE_INCLUDE],
1016 [am_make=${MAKE-make}
1017 cat > confinc << 'END'
1019 @echo this is the am__doit target
1022 # If we don't find an include directive, just comment out the code.
1023 AC_MSG_CHECKING([for style of include used by $am_make])
1027 # First try GNU make style include.
1028 echo "include confinc" > confmf
1029 # Ignore all kinds of additional output from 'make'.
1030 case `$am_make -s -f confmf 2> /dev/null` in #(
1031 *the\ am__doit\ target*)
1037 # Now try BSD make style include.
1038 if test "$am__include" = "#"; then
1039 echo '.include "confinc"' > confmf
1040 case `$am_make -s -f confmf 2> /dev/null` in #(
1041 *the\ am__doit\ target*)
1042 am__include=.include
1048 AC_SUBST([am__include])
1049 AC_SUBST([am__quote])
1050 AC_MSG_RESULT([$_am_result])
1051 rm -f confinc confmf
1054 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
1056 # Copyright (C) 1997-2013 Free Software Foundation, Inc.
1058 # This file is free software; the Free Software Foundation
1059 # gives unlimited permission to copy and/or distribute it,
1060 # with or without modifications, as long as this notice is preserved.
1062 # AM_MISSING_PROG(NAME, PROGRAM)
1063 # ------------------------------
1064 AC_DEFUN([AM_MISSING_PROG],
1065 [AC_REQUIRE([AM_MISSING_HAS_RUN])
1066 $1=${$1-"${am_missing_run}$2"}
1069 # AM_MISSING_HAS_RUN
1070 # ------------------
1071 # Define MISSING if not defined so far and test if it is modern enough.
1072 # If it is, set am_missing_run to use it, otherwise, to nothing.
1073 AC_DEFUN([AM_MISSING_HAS_RUN],
1074 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1075 AC_REQUIRE_AUX_FILE([missing])dnl
1076 if test x"${MISSING+set}" != xset; then
1079 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1081 MISSING="\${SHELL} $am_aux_dir/missing" ;;
1084 # Use eval to expand $SHELL
1085 if eval "$MISSING --is-lightweight"; then
1086 am_missing_run="$MISSING "
1089 AC_MSG_WARN(['missing' script is too old or missing])
1093 # Copyright (C) 2003-2013 Free Software Foundation, Inc.
1095 # This file is free software; the Free Software Foundation
1096 # gives unlimited permission to copy and/or distribute it,
1097 # with or without modifications, as long as this notice is preserved.
1101 # Check for 'mkdir -p'.
1102 AC_DEFUN([AM_PROG_MKDIR_P],
1103 [AC_PREREQ([2.60])dnl
1104 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1105 dnl FIXME we are no longer going to remove this! adjust warning
1106 dnl FIXME message accordingly.
1107 AC_DIAGNOSE([obsolete],
1108 [$0: this macro is deprecated, and will soon be removed.
1109 You should use the Autoconf-provided 'AC][_PROG_MKDIR_P' macro instead,
1110 and use '$(MKDIR_P)' instead of '$(mkdir_p)'in your Makefile.am files.])
1111 dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
1112 dnl while keeping a definition of mkdir_p for backward compatibility.
1113 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
1114 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
1115 dnl Makefile.ins that do not define MKDIR_P, so we do our own
1116 dnl adjustment using top_builddir (which is defined more often than
1118 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
1120 [[\\/$]]* | ?:[[\\/]]*) ;;
1121 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
1125 # Helper functions for option handling. -*- Autoconf -*-
1127 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
1129 # This file is free software; the Free Software Foundation
1130 # gives unlimited permission to copy and/or distribute it,
1131 # with or without modifications, as long as this notice is preserved.
1133 # _AM_MANGLE_OPTION(NAME)
1134 # -----------------------
1135 AC_DEFUN([_AM_MANGLE_OPTION],
1136 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1138 # _AM_SET_OPTION(NAME)
1139 # --------------------
1140 # Set option NAME. Presently that only means defining a flag for this option.
1141 AC_DEFUN([_AM_SET_OPTION],
1142 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
1144 # _AM_SET_OPTIONS(OPTIONS)
1145 # ------------------------
1146 # OPTIONS is a space-separated list of Automake options.
1147 AC_DEFUN([_AM_SET_OPTIONS],
1148 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1150 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1151 # -------------------------------------------
1152 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1153 AC_DEFUN([_AM_IF_OPTION],
1154 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1156 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
1158 # This file is free software; the Free Software Foundation
1159 # gives unlimited permission to copy and/or distribute it,
1160 # with or without modifications, as long as this notice is preserved.
1164 # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
1165 # to automatically call this.
1166 AC_DEFUN([_AM_PROG_CC_C_O],
1167 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1168 AC_REQUIRE_AUX_FILE([compile])dnl
1169 AC_LANG_PUSH([C])dnl
1171 [whether $CC understands -c and -o together],
1172 [am_cv_prog_cc_c_o],
1173 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
1174 # Make sure it works both with $CC and with simple cc.
1175 # Following AC_PROG_CC_C_O, we do the test twice because some
1176 # compilers refuse to overwrite an existing .o file with -o,
1177 # though they will create one.
1178 am_cv_prog_cc_c_o=yes
1180 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
1181 && test -f conftest2.$ac_objext; then
1184 am_cv_prog_cc_c_o=no
1188 rm -f core conftest*
1190 if test "$am_cv_prog_cc_c_o" != yes; then
1191 # Losing compiler, so override with the script.
1192 # FIXME: It is wrong to rewrite CC.
1193 # But if we don't then we get into trouble of one sort or another.
1194 # A longer-term fix would be to have automake use am__CC in this case,
1195 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
1196 CC="$am_aux_dir/compile $CC"
1200 # For backward compatibility.
1201 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
1203 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
1205 # This file is free software; the Free Software Foundation
1206 # gives unlimited permission to copy and/or distribute it,
1207 # with or without modifications, as long as this notice is preserved.
1209 # AM_RUN_LOG(COMMAND)
1210 # -------------------
1211 # Run COMMAND, save the exit status in ac_status, and log it.
1212 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
1213 AC_DEFUN([AM_RUN_LOG],
1214 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
1215 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
1217 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1218 (exit $ac_status); }])
1220 # Check to make sure that the build environment is sane. -*- Autoconf -*-
1222 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
1224 # This file is free software; the Free Software Foundation
1225 # gives unlimited permission to copy and/or distribute it,
1226 # with or without modifications, as long as this notice is preserved.
1230 AC_DEFUN([AM_SANITY_CHECK],
1231 [AC_MSG_CHECKING([whether build environment is sane])
1232 # Reject unsafe characters in $srcdir or the absolute working directory
1233 # name. Accept space and tab only in the latter.
1237 *[[\\\"\#\$\&\'\`$am_lf]]*)
1238 AC_MSG_ERROR([unsafe absolute working directory name]);;
1241 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
1242 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
1245 # Do 'set' in a subshell so we don't clobber the current shell's
1246 # arguments. Must try -L first in case configure is actually a
1247 # symlink; some systems play weird games with the mod time of symlinks
1248 # (eg FreeBSD returns the mod time of the symlink's containing
1252 for am_try in 1 2; do
1253 echo "timestamp, slept: $am_has_slept" > conftest.file
1254 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1255 if test "$[*]" = "X"; then
1257 set X `ls -t "$srcdir/configure" conftest.file`
1259 if test "$[*]" != "X $srcdir/configure conftest.file" \
1260 && test "$[*]" != "X conftest.file $srcdir/configure"; then
1262 # If neither matched, then we have a broken ls. This can happen
1263 # if, for instance, CONFIG_SHELL is bash and it inherits a
1264 # broken ls alias from the environment. This has actually
1265 # happened. Such a system could not be considered "sane".
1266 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1267 alias in your environment])
1269 if test "$[2]" = conftest.file || test $am_try -eq 2; then
1276 test "$[2]" = conftest.file
1282 AC_MSG_ERROR([newly created file is older than distributed files!
1283 Check your system clock])
1285 AC_MSG_RESULT([yes])
1286 # If we didn't sleep, we still need to ensure time stamps of config.status and
1287 # generated files are strictly newer.
1289 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
1293 AC_CONFIG_COMMANDS_PRE(
1294 [AC_MSG_CHECKING([that generated files are newer than configure])
1295 if test -n "$am_sleep_pid"; then
1296 # Hide warnings about reused PIDs.
1297 wait $am_sleep_pid 2>/dev/null
1299 AC_MSG_RESULT([done])])
1303 # Copyright (C) 2009-2013 Free Software Foundation, Inc.
1305 # This file is free software; the Free Software Foundation
1306 # gives unlimited permission to copy and/or distribute it,
1307 # with or without modifications, as long as this notice is preserved.
1309 # AM_SILENT_RULES([DEFAULT])
1310 # --------------------------
1311 # Enable less verbose build rules; with the default set to DEFAULT
1312 # ("yes" being less verbose, "no" or empty being verbose).
1313 AC_DEFUN([AM_SILENT_RULES],
1314 [AC_ARG_ENABLE([silent-rules], [dnl
1316 [--enable-silent-rules],
1317 [less verbose build output (undo: "make V=1")])
1319 [--disable-silent-rules],
1320 [verbose build output (undo: "make V=0")])dnl
1322 case $enable_silent_rules in @%:@ (((
1323 yes) AM_DEFAULT_VERBOSITY=0;;
1324 no) AM_DEFAULT_VERBOSITY=1;;
1325 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
1328 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
1329 dnl do not support nested variable expansions.
1330 dnl See automake bug#9928 and bug#10237.
1331 am_make=${MAKE-make}
1332 AC_CACHE_CHECK([whether $am_make supports nested variables],
1333 [am_cv_make_support_nested_variables],
1334 [if AS_ECHO([['TRUE=$(BAR$(V))
1340 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
1341 am_cv_make_support_nested_variables=yes
1343 am_cv_make_support_nested_variables=no
1345 if test $am_cv_make_support_nested_variables = yes; then
1346 dnl Using '$V' instead of '$(V)' breaks IRIX make.
1348 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
1350 AM_V=$AM_DEFAULT_VERBOSITY
1351 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
1354 AM_SUBST_NOTMAKE([AM_V])dnl
1355 AC_SUBST([AM_DEFAULT_V])dnl
1356 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
1357 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
1359 AC_SUBST([AM_BACKSLASH])dnl
1360 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
1363 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
1365 # This file is free software; the Free Software Foundation
1366 # gives unlimited permission to copy and/or distribute it,
1367 # with or without modifications, as long as this notice is preserved.
1369 # AM_PROG_INSTALL_STRIP
1370 # ---------------------
1371 # One issue with vendor 'install' (even GNU) is that you can't
1372 # specify the program used to strip binaries. This is especially
1373 # annoying in cross-compiling environments, where the build's strip
1374 # is unlikely to handle the host's binaries.
1375 # Fortunately install-sh will honor a STRIPPROG variable, so we
1376 # always use install-sh in "make install-strip", and initialize
1377 # STRIPPROG with the value of the STRIP variable (set by the user).
1378 AC_DEFUN([AM_PROG_INSTALL_STRIP],
1379 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1380 # Installed binaries are usually stripped using 'strip' when the user
1381 # run "make install-strip". However 'strip' might not be the right
1382 # tool to use in cross-compilation environments, therefore Automake
1383 # will honor the 'STRIP' environment variable to overrule this program.
1384 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
1385 if test "$cross_compiling" != no; then
1386 AC_CHECK_TOOL([STRIP], [strip], :)
1388 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1389 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1391 # Copyright (C) 2006-2013 Free Software Foundation, Inc.
1393 # This file is free software; the Free Software Foundation
1394 # gives unlimited permission to copy and/or distribute it,
1395 # with or without modifications, as long as this notice is preserved.
1397 # _AM_SUBST_NOTMAKE(VARIABLE)
1398 # ---------------------------
1399 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1400 # This macro is traced by Automake.
1401 AC_DEFUN([_AM_SUBST_NOTMAKE])
1403 # AM_SUBST_NOTMAKE(VARIABLE)
1404 # --------------------------
1405 # Public sister of _AM_SUBST_NOTMAKE.
1406 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1408 # Check how to create a tarball. -*- Autoconf -*-
1410 # Copyright (C) 2004-2013 Free Software Foundation, Inc.
1412 # This file is free software; the Free Software Foundation
1413 # gives unlimited permission to copy and/or distribute it,
1414 # with or without modifications, as long as this notice is preserved.
1416 # _AM_PROG_TAR(FORMAT)
1417 # --------------------
1418 # Check how to create a tarball in format FORMAT.
1419 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
1421 # Substitute a variable $(am__tar) that is a command
1422 # writing to stdout a FORMAT-tarball containing the directory
1424 # tardir=directory && $(am__tar) > result.tar
1426 # Substitute a variable $(am__untar) that extract such
1427 # a tarball read from stdin.
1428 # $(am__untar) < result.tar
1430 AC_DEFUN([_AM_PROG_TAR],
1431 [# Always define AMTAR for backward compatibility. Yes, it's still used
1432 # in the wild :-( We should find a proper way to deprecate it ...
1433 AC_SUBST([AMTAR], ['$${TAR-tar}'])
1435 # We'll loop over all known methods to create a tar archive until one works.
1436 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1439 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1443 [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
1444 # There is notably a 21 bits limit for the UID and the GID. In fact,
1445 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
1447 am_max_uid=2097151 # 2^21 - 1
1448 am_max_gid=$am_max_uid
1449 # The $UID and $GID variables are not portable, so we need to resort
1450 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
1451 # below are definitely unexpected, so allow the users to see them
1452 # (that is, avoid stderr redirection).
1453 am_uid=`id -u || echo unknown`
1454 am_gid=`id -g || echo unknown`
1455 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
1456 if test $am_uid -le $am_max_uid; then
1457 AC_MSG_RESULT([yes])
1462 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
1463 if test $am_gid -le $am_max_gid; then
1464 AC_MSG_RESULT([yes])
1473 [m4_fatal([Unknown tar format])])
1475 AC_MSG_CHECKING([how to create a $1 tar archive])
1477 # Go ahead even if we have the value already cached. We do so because we
1478 # need to set the values for the 'am__tar' and 'am__untar' variables.
1479 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1481 for _am_tool in $_am_tools; do
1484 for _am_tar in tar gnutar gtar; do
1485 AM_RUN_LOG([$_am_tar --version]) && break
1487 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1488 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1489 am__untar="$_am_tar -xf -"
1492 # Must skip GNU tar: if it does not support --format= it doesn't create
1493 # ustar tarball either.
1494 (tar --version) >/dev/null 2>&1 && continue
1495 am__tar='tar chf - "$$tardir"'
1496 am__tar_='tar chf - "$tardir"'
1497 am__untar='tar xf -'
1500 am__tar='pax -L -x $1 -w "$$tardir"'
1501 am__tar_='pax -L -x $1 -w "$tardir"'
1505 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1506 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1507 am__untar='cpio -i -H $1 -d'
1516 # If the value was cached, stop now. We just wanted to have am__tar
1517 # and am__untar set.
1518 test -n "${am_cv_prog_tar_$1}" && break
1520 # tar/untar a dummy directory, and stop if the command works.
1523 echo GrepMe > conftest.dir/file
1524 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1526 if test -s conftest.tar; then
1527 AM_RUN_LOG([$am__untar <conftest.tar])
1528 AM_RUN_LOG([cat conftest.dir/file])
1529 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1534 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1535 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1538 AC_SUBST([am__untar])
1541 m4_include([m4/gettext.m4])
1542 m4_include([m4/iconv.m4])
1543 m4_include([m4/lib-ld.m4])
1544 m4_include([m4/lib-link.m4])
1545 m4_include([m4/lib-prefix.m4])
1546 m4_include([m4/nls.m4])
1547 m4_include([m4/po.m4])
1548 m4_include([m4/progtest.m4])