]> git.proxmox.com Git - systemd.git/blob - aclocal.m4
Imported Upstream version 214
[systemd.git] / aclocal.m4
1 # generated automatically by aclocal 1.13.4 -*- Autoconf -*-
2
3 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
4
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
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'.])])
22
23 dnl -*- mode: autoconf -*-
24 dnl Copyright 2009 Johan Dahlin
25 dnl
26 dnl This file is free software; the author(s) gives unlimited
27 dnl permission to copy and/or distribute it, with or without
28 dnl modifications, as long as this notice is preserved.
29 dnl
30
31 # serial 1
32
33 m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
34 [
35 AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
36 AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
37 AC_BEFORE([LT_INIT],[$0])dnl setup libtool first
38
39 dnl enable/disable introspection
40 m4_if([$2], [require],
41 [dnl
42 enable_introspection=yes
43 ],[dnl
44 AC_ARG_ENABLE(introspection,
45 AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]],
46 [Enable introspection for this build]),,
47 [enable_introspection=auto])
48 ])dnl
49
50 AC_MSG_CHECKING([for gobject-introspection])
51
52 dnl presence/version checking
53 AS_CASE([$enable_introspection],
54 [no], [dnl
55 found_introspection="no (disabled, use --enable-introspection to enable)"
56 ],dnl
57 [yes],[dnl
58 PKG_CHECK_EXISTS([gobject-introspection-1.0],,
59 AC_MSG_ERROR([gobject-introspection-1.0 is not installed]))
60 PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1],
61 found_introspection=yes,
62 AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME]))
63 ],dnl
64 [auto],[dnl
65 PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no)
66 dnl Canonicalize enable_introspection
67 enable_introspection=$found_introspection
68 ],dnl
69 [dnl
70 AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@])
71 ])dnl
72
73 AC_MSG_RESULT([$found_introspection])
74
75 INTROSPECTION_SCANNER=
76 INTROSPECTION_COMPILER=
77 INTROSPECTION_GENERATE=
78 INTROSPECTION_GIRDIR=
79 INTROSPECTION_TYPELIBDIR=
80 if test "x$found_introspection" = "xyes"; then
81 INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
82 INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
83 INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
84 INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
85 INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
86 INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
87 INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
88 INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
89 fi
90 AC_SUBST(INTROSPECTION_SCANNER)
91 AC_SUBST(INTROSPECTION_COMPILER)
92 AC_SUBST(INTROSPECTION_GENERATE)
93 AC_SUBST(INTROSPECTION_GIRDIR)
94 AC_SUBST(INTROSPECTION_TYPELIBDIR)
95 AC_SUBST(INTROSPECTION_CFLAGS)
96 AC_SUBST(INTROSPECTION_LIBS)
97 AC_SUBST(INTROSPECTION_MAKEFILE)
98
99 AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
100 ])
101
102
103 dnl Usage:
104 dnl GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version])
105
106 AC_DEFUN([GOBJECT_INTROSPECTION_CHECK],
107 [
108 _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1])
109 ])
110
111 dnl Usage:
112 dnl GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version])
113
114
115 AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE],
116 [
117 _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require])
118 ])
119
120 dnl Autoconf macros for libgcrypt
121 dnl Copyright (C) 2002, 2004 Free Software Foundation, Inc.
122 dnl
123 dnl This file is free software; as a special exception the author gives
124 dnl unlimited permission to copy and/or distribute it, with or without
125 dnl modifications, as long as this notice is preserved.
126 dnl
127 dnl This file is distributed in the hope that it will be useful, but
128 dnl WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
129 dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
130
131
132 dnl AM_PATH_LIBGCRYPT([MINIMUM-VERSION,
133 dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
134 dnl Test for libgcrypt and define LIBGCRYPT_CFLAGS and LIBGCRYPT_LIBS.
135 dnl MINIMUN-VERSION is a string with the version number optionalliy prefixed
136 dnl with the API version to also check the API compatibility. Example:
137 dnl a MINIMUN-VERSION of 1:1.2.5 won't pass the test unless the installed
138 dnl version of libgcrypt is at least 1.2.5 *and* the API number is 1. Using
139 dnl this features allows to prevent build against newer versions of libgcrypt
140 dnl with a changed API.
141 dnl
142 AC_DEFUN([AM_PATH_LIBGCRYPT],
143 [ AC_ARG_WITH(libgcrypt-prefix,
144 AC_HELP_STRING([--with-libgcrypt-prefix=PFX],
145 [prefix where LIBGCRYPT is installed (optional)]),
146 libgcrypt_config_prefix="$withval", libgcrypt_config_prefix="")
147 if test x$libgcrypt_config_prefix != x ; then
148 if test x${LIBGCRYPT_CONFIG+set} != xset ; then
149 LIBGCRYPT_CONFIG=$libgcrypt_config_prefix/bin/libgcrypt-config
150 fi
151 fi
152
153 AC_PATH_TOOL(LIBGCRYPT_CONFIG, libgcrypt-config, no)
154 tmp=ifelse([$1], ,1:1.2.0,$1)
155 if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
156 req_libgcrypt_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'`
157 min_libgcrypt_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'`
158 else
159 req_libgcrypt_api=0
160 min_libgcrypt_version="$tmp"
161 fi
162
163 AC_MSG_CHECKING(for LIBGCRYPT - version >= $min_libgcrypt_version)
164 ok=no
165 if test "$LIBGCRYPT_CONFIG" != "no" ; then
166 req_major=`echo $min_libgcrypt_version | \
167 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
168 req_minor=`echo $min_libgcrypt_version | \
169 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
170 req_micro=`echo $min_libgcrypt_version | \
171 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
172 libgcrypt_config_version=`$LIBGCRYPT_CONFIG --version`
173 major=`echo $libgcrypt_config_version | \
174 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
175 minor=`echo $libgcrypt_config_version | \
176 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
177 micro=`echo $libgcrypt_config_version | \
178 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
179 if test "$major" -gt "$req_major"; then
180 ok=yes
181 else
182 if test "$major" -eq "$req_major"; then
183 if test "$minor" -gt "$req_minor"; then
184 ok=yes
185 else
186 if test "$minor" -eq "$req_minor"; then
187 if test "$micro" -ge "$req_micro"; then
188 ok=yes
189 fi
190 fi
191 fi
192 fi
193 fi
194 fi
195 if test $ok = yes; then
196 AC_MSG_RESULT([yes ($libgcrypt_config_version)])
197 else
198 AC_MSG_RESULT(no)
199 fi
200 if test $ok = yes; then
201 # If we have a recent libgcrypt, we should also check that the
202 # API is compatible
203 if test "$req_libgcrypt_api" -gt 0 ; then
204 tmp=`$LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0`
205 if test "$tmp" -gt 0 ; then
206 AC_MSG_CHECKING([LIBGCRYPT API version])
207 if test "$req_libgcrypt_api" -eq "$tmp" ; then
208 AC_MSG_RESULT([okay])
209 else
210 ok=no
211 AC_MSG_RESULT([does not match. want=$req_libgcrypt_api got=$tmp])
212 fi
213 fi
214 fi
215 fi
216 if test $ok = yes; then
217 LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags`
218 LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs`
219 ifelse([$2], , :, [$2])
220 if test x"$host" != x ; then
221 libgcrypt_config_host=`$LIBGCRYPT_CONFIG --host 2>/dev/null || echo none`
222 if test x"$libgcrypt_config_host" != xnone ; then
223 if test x"$libgcrypt_config_host" != x"$host" ; then
224 AC_MSG_WARN([[
225 ***
226 *** The config script $LIBGCRYPT_CONFIG was
227 *** built for $libgcrypt_config_host and thus may not match the
228 *** used host $host.
229 *** You may want to use the configure option --with-libgcrypt-prefix
230 *** to specify a matching config script.
231 ***]])
232 fi
233 fi
234 fi
235 else
236 LIBGCRYPT_CFLAGS=""
237 LIBGCRYPT_LIBS=""
238 ifelse([$3], , :, [$3])
239 fi
240 AC_SUBST(LIBGCRYPT_CFLAGS)
241 AC_SUBST(LIBGCRYPT_LIBS)
242 ])
243
244 # nls.m4 serial 5 (gettext-0.18)
245 dnl Copyright (C) 1995-2003, 2005-2006, 2008-2013 Free Software Foundation,
246 dnl Inc.
247 dnl This file is free software; the Free Software Foundation
248 dnl gives unlimited permission to copy and/or distribute it,
249 dnl with or without modifications, as long as this notice is preserved.
250 dnl
251 dnl This file can can be used in projects which are not available under
252 dnl the GNU General Public License or the GNU Library General Public
253 dnl License but which still want to provide support for the GNU gettext
254 dnl functionality.
255 dnl Please note that the actual code of the GNU gettext library is covered
256 dnl by the GNU Library General Public License, and the rest of the GNU
257 dnl gettext package package is covered by the GNU General Public License.
258 dnl They are *not* in the public domain.
259
260 dnl Authors:
261 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
262 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
263
264 AC_PREREQ([2.50])
265
266 AC_DEFUN([AM_NLS],
267 [
268 AC_MSG_CHECKING([whether NLS is requested])
269 dnl Default is enabled NLS
270 AC_ARG_ENABLE([nls],
271 [ --disable-nls do not use Native Language Support],
272 USE_NLS=$enableval, USE_NLS=yes)
273 AC_MSG_RESULT([$USE_NLS])
274 AC_SUBST([USE_NLS])
275 ])
276
277 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
278 # serial 1 (pkg-config-0.24)
279 #
280 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
281 #
282 # This program is free software; you can redistribute it and/or modify
283 # it under the terms of the GNU General Public License as published by
284 # the Free Software Foundation; either version 2 of the License, or
285 # (at your option) any later version.
286 #
287 # This program is distributed in the hope that it will be useful, but
288 # WITHOUT ANY WARRANTY; without even the implied warranty of
289 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
290 # General Public License for more details.
291 #
292 # You should have received a copy of the GNU General Public License
293 # along with this program; if not, write to the Free Software
294 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
295 #
296 # As a special exception to the GNU General Public License, if you
297 # distribute this file as part of a program that contains a
298 # configuration script generated by Autoconf, you may include it under
299 # the same distribution terms that you use for the rest of that program.
300
301 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
302 # ----------------------------------
303 AC_DEFUN([PKG_PROG_PKG_CONFIG],
304 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
305 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
306 m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
307 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
308 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
309 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
310
311 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
312 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
313 fi
314 if test -n "$PKG_CONFIG"; then
315 _pkg_min_version=m4_default([$1], [0.9.0])
316 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
317 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
318 AC_MSG_RESULT([yes])
319 else
320 AC_MSG_RESULT([no])
321 PKG_CONFIG=""
322 fi
323 fi[]dnl
324 ])# PKG_PROG_PKG_CONFIG
325
326 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
327 #
328 # Check to see whether a particular set of modules exists. Similar
329 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
330 #
331 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
332 # only at the first occurence in configure.ac, so if the first place
333 # it's called might be skipped (such as if it is within an "if", you
334 # have to call PKG_CHECK_EXISTS manually
335 # --------------------------------------------------------------
336 AC_DEFUN([PKG_CHECK_EXISTS],
337 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
338 if test -n "$PKG_CONFIG" && \
339 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
340 m4_default([$2], [:])
341 m4_ifvaln([$3], [else
342 $3])dnl
343 fi])
344
345 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
346 # ---------------------------------------------
347 m4_define([_PKG_CONFIG],
348 [if test -n "$$1"; then
349 pkg_cv_[]$1="$$1"
350 elif test -n "$PKG_CONFIG"; then
351 PKG_CHECK_EXISTS([$3],
352 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
353 test "x$?" != "x0" && pkg_failed=yes ],
354 [pkg_failed=yes])
355 else
356 pkg_failed=untried
357 fi[]dnl
358 ])# _PKG_CONFIG
359
360 # _PKG_SHORT_ERRORS_SUPPORTED
361 # -----------------------------
362 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
363 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
364 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
365 _pkg_short_errors_supported=yes
366 else
367 _pkg_short_errors_supported=no
368 fi[]dnl
369 ])# _PKG_SHORT_ERRORS_SUPPORTED
370
371
372 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
373 # [ACTION-IF-NOT-FOUND])
374 #
375 #
376 # Note that if there is a possibility the first call to
377 # PKG_CHECK_MODULES might not happen, you should be sure to include an
378 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
379 #
380 #
381 # --------------------------------------------------------------
382 AC_DEFUN([PKG_CHECK_MODULES],
383 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
384 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
385 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
386
387 pkg_failed=no
388 AC_MSG_CHECKING([for $1])
389
390 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
391 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
392
393 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
394 and $1[]_LIBS to avoid the need to call pkg-config.
395 See the pkg-config man page for more details.])
396
397 if test $pkg_failed = yes; then
398 AC_MSG_RESULT([no])
399 _PKG_SHORT_ERRORS_SUPPORTED
400 if test $_pkg_short_errors_supported = yes; then
401 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
402 else
403 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
404 fi
405 # Put the nasty error message in config.log where it belongs
406 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
407
408 m4_default([$4], [AC_MSG_ERROR(
409 [Package requirements ($2) were not met:
410
411 $$1_PKG_ERRORS
412
413 Consider adjusting the PKG_CONFIG_PATH environment variable if you
414 installed software in a non-standard prefix.
415
416 _PKG_TEXT])[]dnl
417 ])
418 elif test $pkg_failed = untried; then
419 AC_MSG_RESULT([no])
420 m4_default([$4], [AC_MSG_FAILURE(
421 [The pkg-config script could not be found or is too old. Make sure it
422 is in your PATH or set the PKG_CONFIG environment variable to the full
423 path to pkg-config.
424
425 _PKG_TEXT
426
427 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
428 ])
429 else
430 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
431 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
432 AC_MSG_RESULT([yes])
433 $3
434 fi[]dnl
435 ])# PKG_CHECK_MODULES
436
437
438 # PKG_INSTALLDIR(DIRECTORY)
439 # -------------------------
440 # Substitutes the variable pkgconfigdir as the location where a module
441 # should install pkg-config .pc files. By default the directory is
442 # $libdir/pkgconfig, but the default can be changed by passing
443 # DIRECTORY. The user can override through the --with-pkgconfigdir
444 # parameter.
445 AC_DEFUN([PKG_INSTALLDIR],
446 [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
447 m4_pushdef([pkg_description],
448 [pkg-config installation directory @<:@]pkg_default[@:>@])
449 AC_ARG_WITH([pkgconfigdir],
450 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
451 [with_pkgconfigdir=]pkg_default)
452 AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
453 m4_popdef([pkg_default])
454 m4_popdef([pkg_description])
455 ]) dnl PKG_INSTALLDIR
456
457
458 # PKG_NOARCH_INSTALLDIR(DIRECTORY)
459 # -------------------------
460 # Substitutes the variable noarch_pkgconfigdir as the location where a
461 # module should install arch-independent pkg-config .pc files. By
462 # default the directory is $datadir/pkgconfig, but the default can be
463 # changed by passing DIRECTORY. The user can override through the
464 # --with-noarch-pkgconfigdir parameter.
465 AC_DEFUN([PKG_NOARCH_INSTALLDIR],
466 [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
467 m4_pushdef([pkg_description],
468 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
469 AC_ARG_WITH([noarch-pkgconfigdir],
470 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
471 [with_noarch_pkgconfigdir=]pkg_default)
472 AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
473 m4_popdef([pkg_default])
474 m4_popdef([pkg_description])
475 ]) dnl PKG_NOARCH_INSTALLDIR
476
477
478 # PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
479 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
480 # -------------------------------------------
481 # Retrieves the value of the pkg-config variable for the given module.
482 AC_DEFUN([PKG_CHECK_VAR],
483 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
484 AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
485
486 _PKG_CONFIG([$1], [variable="][$3]["], [$2])
487 AS_VAR_COPY([$1], [pkg_cv_][$1])
488
489 AS_VAR_IF([$1], [""], [$5], [$4])dnl
490 ])# PKG_CHECK_VAR
491
492 # Copyright (C) 2002-2013 Free Software Foundation, Inc.
493 #
494 # This file is free software; the Free Software Foundation
495 # gives unlimited permission to copy and/or distribute it,
496 # with or without modifications, as long as this notice is preserved.
497
498 # AM_AUTOMAKE_VERSION(VERSION)
499 # ----------------------------
500 # Automake X.Y traces this macro to ensure aclocal.m4 has been
501 # generated from the m4 files accompanying Automake X.Y.
502 # (This private macro should not be called outside this file.)
503 AC_DEFUN([AM_AUTOMAKE_VERSION],
504 [am__api_version='1.13'
505 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
506 dnl require some minimum version. Point them to the right macro.
507 m4_if([$1], [1.13.4], [],
508 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
509 ])
510
511 # _AM_AUTOCONF_VERSION(VERSION)
512 # -----------------------------
513 # aclocal traces this macro to find the Autoconf version.
514 # This is a private macro too. Using m4_define simplifies
515 # the logic in aclocal, which can simply ignore this definition.
516 m4_define([_AM_AUTOCONF_VERSION], [])
517
518 # AM_SET_CURRENT_AUTOMAKE_VERSION
519 # -------------------------------
520 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
521 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
522 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
523 [AM_AUTOMAKE_VERSION([1.13.4])dnl
524 m4_ifndef([AC_AUTOCONF_VERSION],
525 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
526 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
527
528 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
529
530 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
531 #
532 # This file is free software; the Free Software Foundation
533 # gives unlimited permission to copy and/or distribute it,
534 # with or without modifications, as long as this notice is preserved.
535
536 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
537 # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
538 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
539 #
540 # Of course, Automake must honor this variable whenever it calls a
541 # tool from the auxiliary directory. The problem is that $srcdir (and
542 # therefore $ac_aux_dir as well) can be either absolute or relative,
543 # depending on how configure is run. This is pretty annoying, since
544 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
545 # source directory, any form will work fine, but in subdirectories a
546 # relative path needs to be adjusted first.
547 #
548 # $ac_aux_dir/missing
549 # fails when called from a subdirectory if $ac_aux_dir is relative
550 # $top_srcdir/$ac_aux_dir/missing
551 # fails if $ac_aux_dir is absolute,
552 # fails when called from a subdirectory in a VPATH build with
553 # a relative $ac_aux_dir
554 #
555 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
556 # are both prefixed by $srcdir. In an in-source build this is usually
557 # harmless because $srcdir is '.', but things will broke when you
558 # start a VPATH build or use an absolute $srcdir.
559 #
560 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
561 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
562 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
563 # and then we would define $MISSING as
564 # MISSING="\${SHELL} $am_aux_dir/missing"
565 # This will work as long as MISSING is not called from configure, because
566 # unfortunately $(top_srcdir) has no meaning in configure.
567 # However there are other variables, like CC, which are often used in
568 # configure, and could therefore not use this "fixed" $ac_aux_dir.
569 #
570 # Another solution, used here, is to always expand $ac_aux_dir to an
571 # absolute PATH. The drawback is that using absolute paths prevent a
572 # configured tree to be moved without reconfiguration.
573
574 AC_DEFUN([AM_AUX_DIR_EXPAND],
575 [dnl Rely on autoconf to set up CDPATH properly.
576 AC_PREREQ([2.50])dnl
577 # expand $ac_aux_dir to an absolute path
578 am_aux_dir=`cd $ac_aux_dir && pwd`
579 ])
580
581 # AM_CONDITIONAL -*- Autoconf -*-
582
583 # Copyright (C) 1997-2013 Free Software Foundation, Inc.
584 #
585 # This file is free software; the Free Software Foundation
586 # gives unlimited permission to copy and/or distribute it,
587 # with or without modifications, as long as this notice is preserved.
588
589 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
590 # -------------------------------------
591 # Define a conditional.
592 AC_DEFUN([AM_CONDITIONAL],
593 [AC_PREREQ([2.52])dnl
594 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
595 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
596 AC_SUBST([$1_TRUE])dnl
597 AC_SUBST([$1_FALSE])dnl
598 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
599 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
600 m4_define([_AM_COND_VALUE_$1], [$2])dnl
601 if $2; then
602 $1_TRUE=
603 $1_FALSE='#'
604 else
605 $1_TRUE='#'
606 $1_FALSE=
607 fi
608 AC_CONFIG_COMMANDS_PRE(
609 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
610 AC_MSG_ERROR([[conditional "$1" was never defined.
611 Usually this means the macro was only invoked conditionally.]])
612 fi])])
613
614 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
615 #
616 # This file is free software; the Free Software Foundation
617 # gives unlimited permission to copy and/or distribute it,
618 # with or without modifications, as long as this notice is preserved.
619
620
621 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
622 # written in clear, in which case automake, when reading aclocal.m4,
623 # will think it sees a *use*, and therefore will trigger all it's
624 # C support machinery. Also note that it means that autoscan, seeing
625 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
626
627
628 # _AM_DEPENDENCIES(NAME)
629 # ----------------------
630 # See how the compiler implements dependency checking.
631 # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
632 # We try a few techniques and use that to set a single cache variable.
633 #
634 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
635 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
636 # dependency, and given that the user is not expected to run this macro,
637 # just rely on AC_PROG_CC.
638 AC_DEFUN([_AM_DEPENDENCIES],
639 [AC_REQUIRE([AM_SET_DEPDIR])dnl
640 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
641 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
642 AC_REQUIRE([AM_DEP_TRACK])dnl
643
644 m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
645 [$1], [CXX], [depcc="$CXX" am_compiler_list=],
646 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
647 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
648 [$1], [UPC], [depcc="$UPC" am_compiler_list=],
649 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
650 [depcc="$$1" am_compiler_list=])
651
652 AC_CACHE_CHECK([dependency style of $depcc],
653 [am_cv_$1_dependencies_compiler_type],
654 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
655 # We make a subdir and do the tests there. Otherwise we can end up
656 # making bogus files that we don't know about and never remove. For
657 # instance it was reported that on HP-UX the gcc test will end up
658 # making a dummy file named 'D' -- because '-MD' means "put the output
659 # in D".
660 rm -rf conftest.dir
661 mkdir conftest.dir
662 # Copy depcomp to subdir because otherwise we won't find it if we're
663 # using a relative directory.
664 cp "$am_depcomp" conftest.dir
665 cd conftest.dir
666 # We will build objects and dependencies in a subdirectory because
667 # it helps to detect inapplicable dependency modes. For instance
668 # both Tru64's cc and ICC support -MD to output dependencies as a
669 # side effect of compilation, but ICC will put the dependencies in
670 # the current directory while Tru64 will put them in the object
671 # directory.
672 mkdir sub
673
674 am_cv_$1_dependencies_compiler_type=none
675 if test "$am_compiler_list" = ""; then
676 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
677 fi
678 am__universal=false
679 m4_case([$1], [CC],
680 [case " $depcc " in #(
681 *\ -arch\ *\ -arch\ *) am__universal=true ;;
682 esac],
683 [CXX],
684 [case " $depcc " in #(
685 *\ -arch\ *\ -arch\ *) am__universal=true ;;
686 esac])
687
688 for depmode in $am_compiler_list; do
689 # Setup a source with many dependencies, because some compilers
690 # like to wrap large dependency lists on column 80 (with \), and
691 # we should not choose a depcomp mode which is confused by this.
692 #
693 # We need to recreate these files for each test, as the compiler may
694 # overwrite some of them when testing with obscure command lines.
695 # This happens at least with the AIX C compiler.
696 : > sub/conftest.c
697 for i in 1 2 3 4 5 6; do
698 echo '#include "conftst'$i'.h"' >> sub/conftest.c
699 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
700 # Solaris 10 /bin/sh.
701 echo '/* dummy */' > sub/conftst$i.h
702 done
703 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
704
705 # We check with '-c' and '-o' for the sake of the "dashmstdout"
706 # mode. It turns out that the SunPro C++ compiler does not properly
707 # handle '-M -o', and we need to detect this. Also, some Intel
708 # versions had trouble with output in subdirs.
709 am__obj=sub/conftest.${OBJEXT-o}
710 am__minus_obj="-o $am__obj"
711 case $depmode in
712 gcc)
713 # This depmode causes a compiler race in universal mode.
714 test "$am__universal" = false || continue
715 ;;
716 nosideeffect)
717 # After this tag, mechanisms are not by side-effect, so they'll
718 # only be used when explicitly requested.
719 if test "x$enable_dependency_tracking" = xyes; then
720 continue
721 else
722 break
723 fi
724 ;;
725 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
726 # This compiler won't grok '-c -o', but also, the minuso test has
727 # not run yet. These depmodes are late enough in the game, and
728 # so weak that their functioning should not be impacted.
729 am__obj=conftest.${OBJEXT-o}
730 am__minus_obj=
731 ;;
732 none) break ;;
733 esac
734 if depmode=$depmode \
735 source=sub/conftest.c object=$am__obj \
736 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
737 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
738 >/dev/null 2>conftest.err &&
739 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
740 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
741 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
742 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
743 # icc doesn't choke on unknown options, it will just issue warnings
744 # or remarks (even with -Werror). So we grep stderr for any message
745 # that says an option was ignored or not supported.
746 # When given -MP, icc 7.0 and 7.1 complain thusly:
747 # icc: Command line warning: ignoring option '-M'; no argument required
748 # The diagnosis changed in icc 8.0:
749 # icc: Command line remark: option '-MP' not supported
750 if (grep 'ignoring option' conftest.err ||
751 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
752 am_cv_$1_dependencies_compiler_type=$depmode
753 break
754 fi
755 fi
756 done
757
758 cd ..
759 rm -rf conftest.dir
760 else
761 am_cv_$1_dependencies_compiler_type=none
762 fi
763 ])
764 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
765 AM_CONDITIONAL([am__fastdep$1], [
766 test "x$enable_dependency_tracking" != xno \
767 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
768 ])
769
770
771 # AM_SET_DEPDIR
772 # -------------
773 # Choose a directory name for dependency files.
774 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
775 AC_DEFUN([AM_SET_DEPDIR],
776 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
777 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
778 ])
779
780
781 # AM_DEP_TRACK
782 # ------------
783 AC_DEFUN([AM_DEP_TRACK],
784 [AC_ARG_ENABLE([dependency-tracking], [dnl
785 AS_HELP_STRING(
786 [--enable-dependency-tracking],
787 [do not reject slow dependency extractors])
788 AS_HELP_STRING(
789 [--disable-dependency-tracking],
790 [speeds up one-time build])])
791 if test "x$enable_dependency_tracking" != xno; then
792 am_depcomp="$ac_aux_dir/depcomp"
793 AMDEPBACKSLASH='\'
794 am__nodep='_no'
795 fi
796 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
797 AC_SUBST([AMDEPBACKSLASH])dnl
798 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
799 AC_SUBST([am__nodep])dnl
800 _AM_SUBST_NOTMAKE([am__nodep])dnl
801 ])
802
803 # Generate code to set up dependency tracking. -*- Autoconf -*-
804
805 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
806 #
807 # This file is free software; the Free Software Foundation
808 # gives unlimited permission to copy and/or distribute it,
809 # with or without modifications, as long as this notice is preserved.
810
811
812 # _AM_OUTPUT_DEPENDENCY_COMMANDS
813 # ------------------------------
814 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
815 [{
816 # Older Autoconf quotes --file arguments for eval, but not when files
817 # are listed without --file. Let's play safe and only enable the eval
818 # if we detect the quoting.
819 case $CONFIG_FILES in
820 *\'*) eval set x "$CONFIG_FILES" ;;
821 *) set x $CONFIG_FILES ;;
822 esac
823 shift
824 for mf
825 do
826 # Strip MF so we end up with the name of the file.
827 mf=`echo "$mf" | sed -e 's/:.*$//'`
828 # Check whether this is an Automake generated Makefile or not.
829 # We used to match only the files named 'Makefile.in', but
830 # some people rename them; so instead we look at the file content.
831 # Grep'ing the first line is not enough: some people post-process
832 # each Makefile.in and add a new line on top of each file to say so.
833 # Grep'ing the whole file is not good either: AIX grep has a line
834 # limit of 2048, but all sed's we know have understand at least 4000.
835 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
836 dirpart=`AS_DIRNAME("$mf")`
837 else
838 continue
839 fi
840 # Extract the definition of DEPDIR, am__include, and am__quote
841 # from the Makefile without running 'make'.
842 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
843 test -z "$DEPDIR" && continue
844 am__include=`sed -n 's/^am__include = //p' < "$mf"`
845 test -z "$am__include" && continue
846 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
847 # Find all dependency output files, they are included files with
848 # $(DEPDIR) in their names. We invoke sed twice because it is the
849 # simplest approach to changing $(DEPDIR) to its actual value in the
850 # expansion.
851 for file in `sed -n "
852 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
853 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
854 # Make sure the directory exists.
855 test -f "$dirpart/$file" && continue
856 fdir=`AS_DIRNAME(["$file"])`
857 AS_MKDIR_P([$dirpart/$fdir])
858 # echo "creating $dirpart/$file"
859 echo '# dummy' > "$dirpart/$file"
860 done
861 done
862 }
863 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
864
865
866 # AM_OUTPUT_DEPENDENCY_COMMANDS
867 # -----------------------------
868 # This macro should only be invoked once -- use via AC_REQUIRE.
869 #
870 # This code is only required when automatic dependency tracking
871 # is enabled. FIXME. This creates each '.P' file that we will
872 # need in order to bootstrap the dependency handling code.
873 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
874 [AC_CONFIG_COMMANDS([depfiles],
875 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
876 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
877 ])
878
879 # Do all the work for Automake. -*- Autoconf -*-
880
881 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
882 #
883 # This file is free software; the Free Software Foundation
884 # gives unlimited permission to copy and/or distribute it,
885 # with or without modifications, as long as this notice is preserved.
886
887 # This macro actually does too much. Some checks are only needed if
888 # your package does certain things. But this isn't really a big deal.
889
890 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
891 # AM_INIT_AUTOMAKE([OPTIONS])
892 # -----------------------------------------------
893 # The call with PACKAGE and VERSION arguments is the old style
894 # call (pre autoconf-2.50), which is being phased out. PACKAGE
895 # and VERSION should now be passed to AC_INIT and removed from
896 # the call to AM_INIT_AUTOMAKE.
897 # We support both call styles for the transition. After
898 # the next Automake release, Autoconf can make the AC_INIT
899 # arguments mandatory, and then we can depend on a new Autoconf
900 # release and drop the old call support.
901 AC_DEFUN([AM_INIT_AUTOMAKE],
902 [AC_PREREQ([2.65])dnl
903 dnl Autoconf wants to disallow AM_ names. We explicitly allow
904 dnl the ones we care about.
905 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
906 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
907 AC_REQUIRE([AC_PROG_INSTALL])dnl
908 if test "`cd $srcdir && pwd`" != "`pwd`"; then
909 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
910 # is not polluted with repeated "-I."
911 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
912 # test to see if srcdir already configured
913 if test -f $srcdir/config.status; then
914 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
915 fi
916 fi
917
918 # test whether we have cygpath
919 if test -z "$CYGPATH_W"; then
920 if (cygpath --version) >/dev/null 2>/dev/null; then
921 CYGPATH_W='cygpath -w'
922 else
923 CYGPATH_W=echo
924 fi
925 fi
926 AC_SUBST([CYGPATH_W])
927
928 # Define the identity of the package.
929 dnl Distinguish between old-style and new-style calls.
930 m4_ifval([$2],
931 [AC_DIAGNOSE([obsolete],
932 [$0: two- and three-arguments forms are deprecated.])
933 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
934 AC_SUBST([PACKAGE], [$1])dnl
935 AC_SUBST([VERSION], [$2])],
936 [_AM_SET_OPTIONS([$1])dnl
937 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
938 m4_if(
939 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
940 [ok:ok],,
941 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
942 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
943 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
944
945 _AM_IF_OPTION([no-define],,
946 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
947 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
948
949 # Some tools Automake needs.
950 AC_REQUIRE([AM_SANITY_CHECK])dnl
951 AC_REQUIRE([AC_ARG_PROGRAM])dnl
952 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
953 AM_MISSING_PROG([AUTOCONF], [autoconf])
954 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
955 AM_MISSING_PROG([AUTOHEADER], [autoheader])
956 AM_MISSING_PROG([MAKEINFO], [makeinfo])
957 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
958 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
959 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
960 # For better backward compatibility. To be removed once Automake 1.9.x
961 # dies out for good. For more background, see:
962 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
963 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
964 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
965 # We need awk for the "check" target. The system "awk" is bad on
966 # some platforms.
967 AC_REQUIRE([AC_PROG_AWK])dnl
968 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
969 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
970 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
971 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
972 [_AM_PROG_TAR([v7])])])
973 _AM_IF_OPTION([no-dependencies],,
974 [AC_PROVIDE_IFELSE([AC_PROG_CC],
975 [_AM_DEPENDENCIES([CC])],
976 [m4_define([AC_PROG_CC],
977 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
978 AC_PROVIDE_IFELSE([AC_PROG_CXX],
979 [_AM_DEPENDENCIES([CXX])],
980 [m4_define([AC_PROG_CXX],
981 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
982 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
983 [_AM_DEPENDENCIES([OBJC])],
984 [m4_define([AC_PROG_OBJC],
985 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
986 AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
987 [_AM_DEPENDENCIES([OBJCXX])],
988 [m4_define([AC_PROG_OBJCXX],
989 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
990 ])
991 AC_REQUIRE([AM_SILENT_RULES])dnl
992 dnl The testsuite driver may need to know about EXEEXT, so add the
993 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
994 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
995 AC_CONFIG_COMMANDS_PRE(dnl
996 [m4_provide_if([_AM_COMPILER_EXEEXT],
997 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
998 ])
999
1000 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
1001 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
1002 dnl mangled by Autoconf and run in a shell conditional statement.
1003 m4_define([_AC_COMPILER_EXEEXT],
1004 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1005
1006
1007 # When config.status generates a header, we must update the stamp-h file.
1008 # This file resides in the same directory as the config header
1009 # that is generated. The stamp files are numbered to have different names.
1010
1011 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1012 # loop where config.status creates the headers, so we can generate
1013 # our stamp files there.
1014 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1015 [# Compute $1's index in $config_headers.
1016 _am_arg=$1
1017 _am_stamp_count=1
1018 for _am_header in $config_headers :; do
1019 case $_am_header in
1020 $_am_arg | $_am_arg:* )
1021 break ;;
1022 * )
1023 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1024 esac
1025 done
1026 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1027
1028 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
1029 #
1030 # This file is free software; the Free Software Foundation
1031 # gives unlimited permission to copy and/or distribute it,
1032 # with or without modifications, as long as this notice is preserved.
1033
1034 # AM_PROG_INSTALL_SH
1035 # ------------------
1036 # Define $install_sh.
1037 AC_DEFUN([AM_PROG_INSTALL_SH],
1038 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1039 if test x"${install_sh}" != xset; then
1040 case $am_aux_dir in
1041 *\ * | *\ *)
1042 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1043 *)
1044 install_sh="\${SHELL} $am_aux_dir/install-sh"
1045 esac
1046 fi
1047 AC_SUBST([install_sh])])
1048
1049 # Copyright (C) 2003-2013 Free Software Foundation, Inc.
1050 #
1051 # This file is free software; the Free Software Foundation
1052 # gives unlimited permission to copy and/or distribute it,
1053 # with or without modifications, as long as this notice is preserved.
1054
1055 # Check whether the underlying file-system supports filenames
1056 # with a leading dot. For instance MS-DOS doesn't.
1057 AC_DEFUN([AM_SET_LEADING_DOT],
1058 [rm -rf .tst 2>/dev/null
1059 mkdir .tst 2>/dev/null
1060 if test -d .tst; then
1061 am__leading_dot=.
1062 else
1063 am__leading_dot=_
1064 fi
1065 rmdir .tst 2>/dev/null
1066 AC_SUBST([am__leading_dot])])
1067
1068 # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
1069 # From Jim Meyering
1070
1071 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
1072 #
1073 # This file is free software; the Free Software Foundation
1074 # gives unlimited permission to copy and/or distribute it,
1075 # with or without modifications, as long as this notice is preserved.
1076
1077 # AM_MAINTAINER_MODE([DEFAULT-MODE])
1078 # ----------------------------------
1079 # Control maintainer-specific portions of Makefiles.
1080 # Default is to disable them, unless 'enable' is passed literally.
1081 # For symmetry, 'disable' may be passed as well. Anyway, the user
1082 # can override the default with the --enable/--disable switch.
1083 AC_DEFUN([AM_MAINTAINER_MODE],
1084 [m4_case(m4_default([$1], [disable]),
1085 [enable], [m4_define([am_maintainer_other], [disable])],
1086 [disable], [m4_define([am_maintainer_other], [enable])],
1087 [m4_define([am_maintainer_other], [enable])
1088 m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
1089 AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
1090 dnl maintainer-mode's default is 'disable' unless 'enable' is passed
1091 AC_ARG_ENABLE([maintainer-mode],
1092 [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
1093 am_maintainer_other[ make rules and dependencies not useful
1094 (and sometimes confusing) to the casual installer])],
1095 [USE_MAINTAINER_MODE=$enableval],
1096 [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
1097 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
1098 AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
1099 MAINT=$MAINTAINER_MODE_TRUE
1100 AC_SUBST([MAINT])dnl
1101 ]
1102 )
1103
1104 # Check to see how 'make' treats includes. -*- Autoconf -*-
1105
1106 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
1107 #
1108 # This file is free software; the Free Software Foundation
1109 # gives unlimited permission to copy and/or distribute it,
1110 # with or without modifications, as long as this notice is preserved.
1111
1112 # AM_MAKE_INCLUDE()
1113 # -----------------
1114 # Check to see how make treats includes.
1115 AC_DEFUN([AM_MAKE_INCLUDE],
1116 [am_make=${MAKE-make}
1117 cat > confinc << 'END'
1118 am__doit:
1119 @echo this is the am__doit target
1120 .PHONY: am__doit
1121 END
1122 # If we don't find an include directive, just comment out the code.
1123 AC_MSG_CHECKING([for style of include used by $am_make])
1124 am__include="#"
1125 am__quote=
1126 _am_result=none
1127 # First try GNU make style include.
1128 echo "include confinc" > confmf
1129 # Ignore all kinds of additional output from 'make'.
1130 case `$am_make -s -f confmf 2> /dev/null` in #(
1131 *the\ am__doit\ target*)
1132 am__include=include
1133 am__quote=
1134 _am_result=GNU
1135 ;;
1136 esac
1137 # Now try BSD make style include.
1138 if test "$am__include" = "#"; then
1139 echo '.include "confinc"' > confmf
1140 case `$am_make -s -f confmf 2> /dev/null` in #(
1141 *the\ am__doit\ target*)
1142 am__include=.include
1143 am__quote="\""
1144 _am_result=BSD
1145 ;;
1146 esac
1147 fi
1148 AC_SUBST([am__include])
1149 AC_SUBST([am__quote])
1150 AC_MSG_RESULT([$_am_result])
1151 rm -f confinc confmf
1152 ])
1153
1154 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
1155
1156 # Copyright (C) 1997-2013 Free Software Foundation, Inc.
1157 #
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.
1161
1162 # AM_MISSING_PROG(NAME, PROGRAM)
1163 # ------------------------------
1164 AC_DEFUN([AM_MISSING_PROG],
1165 [AC_REQUIRE([AM_MISSING_HAS_RUN])
1166 $1=${$1-"${am_missing_run}$2"}
1167 AC_SUBST($1)])
1168
1169 # AM_MISSING_HAS_RUN
1170 # ------------------
1171 # Define MISSING if not defined so far and test if it is modern enough.
1172 # If it is, set am_missing_run to use it, otherwise, to nothing.
1173 AC_DEFUN([AM_MISSING_HAS_RUN],
1174 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1175 AC_REQUIRE_AUX_FILE([missing])dnl
1176 if test x"${MISSING+set}" != xset; then
1177 case $am_aux_dir in
1178 *\ * | *\ *)
1179 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1180 *)
1181 MISSING="\${SHELL} $am_aux_dir/missing" ;;
1182 esac
1183 fi
1184 # Use eval to expand $SHELL
1185 if eval "$MISSING --is-lightweight"; then
1186 am_missing_run="$MISSING "
1187 else
1188 am_missing_run=
1189 AC_MSG_WARN(['missing' script is too old or missing])
1190 fi
1191 ])
1192
1193 # Helper functions for option handling. -*- Autoconf -*-
1194
1195 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
1196 #
1197 # This file is free software; the Free Software Foundation
1198 # gives unlimited permission to copy and/or distribute it,
1199 # with or without modifications, as long as this notice is preserved.
1200
1201 # _AM_MANGLE_OPTION(NAME)
1202 # -----------------------
1203 AC_DEFUN([_AM_MANGLE_OPTION],
1204 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1205
1206 # _AM_SET_OPTION(NAME)
1207 # --------------------
1208 # Set option NAME. Presently that only means defining a flag for this option.
1209 AC_DEFUN([_AM_SET_OPTION],
1210 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
1211
1212 # _AM_SET_OPTIONS(OPTIONS)
1213 # ------------------------
1214 # OPTIONS is a space-separated list of Automake options.
1215 AC_DEFUN([_AM_SET_OPTIONS],
1216 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1217
1218 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1219 # -------------------------------------------
1220 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1221 AC_DEFUN([_AM_IF_OPTION],
1222 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1223
1224 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
1225 #
1226 # This file is free software; the Free Software Foundation
1227 # gives unlimited permission to copy and/or distribute it,
1228 # with or without modifications, as long as this notice is preserved.
1229
1230
1231 # AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1232 # ---------------------------------------------------------------------------
1233 # Adds support for distributing Python modules and packages. To
1234 # install modules, copy them to $(pythondir), using the python_PYTHON
1235 # automake variable. To install a package with the same name as the
1236 # automake package, install to $(pkgpythondir), or use the
1237 # pkgpython_PYTHON automake variable.
1238 #
1239 # The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
1240 # locations to install python extension modules (shared libraries).
1241 # Another macro is required to find the appropriate flags to compile
1242 # extension modules.
1243 #
1244 # If your package is configured with a different prefix to python,
1245 # users will have to add the install directory to the PYTHONPATH
1246 # environment variable, or create a .pth file (see the python
1247 # documentation for details).
1248 #
1249 # If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
1250 # cause an error if the version of python installed on the system
1251 # doesn't meet the requirement. MINIMUM-VERSION should consist of
1252 # numbers and dots only.
1253 AC_DEFUN([AM_PATH_PYTHON],
1254 [
1255 dnl Find a Python interpreter. Python versions prior to 2.0 are not
1256 dnl supported. (2.0 was released on October 16, 2000).
1257 m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
1258 [python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 dnl
1259 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0])
1260
1261 AC_ARG_VAR([PYTHON], [the Python interpreter])
1262
1263 m4_if([$1],[],[
1264 dnl No version check is needed.
1265 # Find any Python interpreter.
1266 if test -z "$PYTHON"; then
1267 AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :)
1268 fi
1269 am_display_PYTHON=python
1270 ], [
1271 dnl A version check is needed.
1272 if test -n "$PYTHON"; then
1273 # If the user set $PYTHON, use it and don't search something else.
1274 AC_MSG_CHECKING([whether $PYTHON version is >= $1])
1275 AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
1276 [AC_MSG_RESULT([yes])],
1277 [AC_MSG_RESULT([no])
1278 AC_MSG_ERROR([Python interpreter is too old])])
1279 am_display_PYTHON=$PYTHON
1280 else
1281 # Otherwise, try each interpreter until we find one that satisfies
1282 # VERSION.
1283 AC_CACHE_CHECK([for a Python interpreter with version >= $1],
1284 [am_cv_pathless_PYTHON],[
1285 for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
1286 test "$am_cv_pathless_PYTHON" = none && break
1287 AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
1288 done])
1289 # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
1290 if test "$am_cv_pathless_PYTHON" = none; then
1291 PYTHON=:
1292 else
1293 AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
1294 fi
1295 am_display_PYTHON=$am_cv_pathless_PYTHON
1296 fi
1297 ])
1298
1299 if test "$PYTHON" = :; then
1300 dnl Run any user-specified action, or abort.
1301 m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
1302 else
1303
1304 dnl Query Python for its version number. Getting [:3] seems to be
1305 dnl the best way to do this; it's what "site.py" does in the standard
1306 dnl library.
1307
1308 AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
1309 [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`])
1310 AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
1311
1312 dnl Use the values of $prefix and $exec_prefix for the corresponding
1313 dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made
1314 dnl distinct variables so they can be overridden if need be. However,
1315 dnl general consensus is that you shouldn't need this ability.
1316
1317 AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
1318 AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
1319
1320 dnl At times (like when building shared libraries) you may want
1321 dnl to know which OS platform Python thinks this is.
1322
1323 AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
1324 [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`])
1325 AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
1326
1327 # Just factor out some code duplication.
1328 am_python_setup_sysconfig="\
1329 import sys
1330 # Prefer sysconfig over distutils.sysconfig, for better compatibility
1331 # with python 3.x. See automake bug#10227.
1332 try:
1333 import sysconfig
1334 except ImportError:
1335 can_use_sysconfig = 0
1336 else:
1337 can_use_sysconfig = 1
1338 # Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs:
1339 # <https://github.com/pypa/virtualenv/issues/118>
1340 try:
1341 from platform import python_implementation
1342 if python_implementation() == 'CPython' and sys.version[[:3]] == '2.7':
1343 can_use_sysconfig = 0
1344 except ImportError:
1345 pass"
1346
1347 dnl Set up 4 directories:
1348
1349 dnl pythondir -- where to install python scripts. This is the
1350 dnl site-packages directory, not the python standard library
1351 dnl directory like in previous automake betas. This behavior
1352 dnl is more consistent with lispdir.m4 for example.
1353 dnl Query distutils for this directory.
1354 AC_CACHE_CHECK([for $am_display_PYTHON script directory],
1355 [am_cv_python_pythondir],
1356 [if test "x$prefix" = xNONE
1357 then
1358 am_py_prefix=$ac_default_prefix
1359 else
1360 am_py_prefix=$prefix
1361 fi
1362 am_cv_python_pythondir=`$PYTHON -c "
1363 $am_python_setup_sysconfig
1364 if can_use_sysconfig:
1365 sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'})
1366 else:
1367 from distutils import sysconfig
1368 sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix')
1369 sys.stdout.write(sitedir)"`
1370 case $am_cv_python_pythondir in
1371 $am_py_prefix*)
1372 am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
1373 am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
1374 ;;
1375 *)
1376 case $am_py_prefix in
1377 /usr|/System*) ;;
1378 *)
1379 am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages
1380 ;;
1381 esac
1382 ;;
1383 esac
1384 ])
1385 AC_SUBST([pythondir], [$am_cv_python_pythondir])
1386
1387 dnl pkgpythondir -- $PACKAGE directory under pythondir. Was
1388 dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is
1389 dnl more consistent with the rest of automake.
1390
1391 AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
1392
1393 dnl pyexecdir -- directory for installing python extension modules
1394 dnl (shared libraries)
1395 dnl Query distutils for this directory.
1396 AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
1397 [am_cv_python_pyexecdir],
1398 [if test "x$exec_prefix" = xNONE
1399 then
1400 am_py_exec_prefix=$am_py_prefix
1401 else
1402 am_py_exec_prefix=$exec_prefix
1403 fi
1404 am_cv_python_pyexecdir=`$PYTHON -c "
1405 $am_python_setup_sysconfig
1406 if can_use_sysconfig:
1407 sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'})
1408 else:
1409 from distutils import sysconfig
1410 sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix')
1411 sys.stdout.write(sitedir)"`
1412 case $am_cv_python_pyexecdir in
1413 $am_py_exec_prefix*)
1414 am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
1415 am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`
1416 ;;
1417 *)
1418 case $am_py_exec_prefix in
1419 /usr|/System*) ;;
1420 *)
1421 am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages
1422 ;;
1423 esac
1424 ;;
1425 esac
1426 ])
1427 AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
1428
1429 dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
1430
1431 AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
1432
1433 dnl Run any user-specified action.
1434 $2
1435 fi
1436
1437 ])
1438
1439
1440 # AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
1441 # ---------------------------------------------------------------------------
1442 # Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
1443 # Run ACTION-IF-FALSE otherwise.
1444 # This test uses sys.hexversion instead of the string equivalent (first
1445 # word of sys.version), in order to cope with versions such as 2.2c1.
1446 # This supports Python 2.0 or higher. (2.0 was released on October 16, 2000).
1447 AC_DEFUN([AM_PYTHON_CHECK_VERSION],
1448 [prog="import sys
1449 # split strings by '.' and convert to numeric. Append some zeros
1450 # because we need at least 4 digits for the hex conversion.
1451 # map returns an iterator in Python 3.0 and a list in 2.x
1452 minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
1453 minverhex = 0
1454 # xrange is not present in Python 3.0 and range returns an iterator
1455 for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
1456 sys.exit(sys.hexversion < minverhex)"
1457 AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
1458
1459 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
1460 #
1461 # This file is free software; the Free Software Foundation
1462 # gives unlimited permission to copy and/or distribute it,
1463 # with or without modifications, as long as this notice is preserved.
1464
1465 # AM_RUN_LOG(COMMAND)
1466 # -------------------
1467 # Run COMMAND, save the exit status in ac_status, and log it.
1468 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
1469 AC_DEFUN([AM_RUN_LOG],
1470 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
1471 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
1472 ac_status=$?
1473 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1474 (exit $ac_status); }])
1475
1476 # Check to make sure that the build environment is sane. -*- Autoconf -*-
1477
1478 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
1479 #
1480 # This file is free software; the Free Software Foundation
1481 # gives unlimited permission to copy and/or distribute it,
1482 # with or without modifications, as long as this notice is preserved.
1483
1484 # AM_SANITY_CHECK
1485 # ---------------
1486 AC_DEFUN([AM_SANITY_CHECK],
1487 [AC_MSG_CHECKING([whether build environment is sane])
1488 # Reject unsafe characters in $srcdir or the absolute working directory
1489 # name. Accept space and tab only in the latter.
1490 am_lf='
1491 '
1492 case `pwd` in
1493 *[[\\\"\#\$\&\'\`$am_lf]]*)
1494 AC_MSG_ERROR([unsafe absolute working directory name]);;
1495 esac
1496 case $srcdir in
1497 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
1498 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
1499 esac
1500
1501 # Do 'set' in a subshell so we don't clobber the current shell's
1502 # arguments. Must try -L first in case configure is actually a
1503 # symlink; some systems play weird games with the mod time of symlinks
1504 # (eg FreeBSD returns the mod time of the symlink's containing
1505 # directory).
1506 if (
1507 am_has_slept=no
1508 for am_try in 1 2; do
1509 echo "timestamp, slept: $am_has_slept" > conftest.file
1510 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1511 if test "$[*]" = "X"; then
1512 # -L didn't work.
1513 set X `ls -t "$srcdir/configure" conftest.file`
1514 fi
1515 if test "$[*]" != "X $srcdir/configure conftest.file" \
1516 && test "$[*]" != "X conftest.file $srcdir/configure"; then
1517
1518 # If neither matched, then we have a broken ls. This can happen
1519 # if, for instance, CONFIG_SHELL is bash and it inherits a
1520 # broken ls alias from the environment. This has actually
1521 # happened. Such a system could not be considered "sane".
1522 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1523 alias in your environment])
1524 fi
1525 if test "$[2]" = conftest.file || test $am_try -eq 2; then
1526 break
1527 fi
1528 # Just in case.
1529 sleep 1
1530 am_has_slept=yes
1531 done
1532 test "$[2]" = conftest.file
1533 )
1534 then
1535 # Ok.
1536 :
1537 else
1538 AC_MSG_ERROR([newly created file is older than distributed files!
1539 Check your system clock])
1540 fi
1541 AC_MSG_RESULT([yes])
1542 # If we didn't sleep, we still need to ensure time stamps of config.status and
1543 # generated files are strictly newer.
1544 am_sleep_pid=
1545 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
1546 ( sleep 1 ) &
1547 am_sleep_pid=$!
1548 fi
1549 AC_CONFIG_COMMANDS_PRE(
1550 [AC_MSG_CHECKING([that generated files are newer than configure])
1551 if test -n "$am_sleep_pid"; then
1552 # Hide warnings about reused PIDs.
1553 wait $am_sleep_pid 2>/dev/null
1554 fi
1555 AC_MSG_RESULT([done])])
1556 rm -f conftest.file
1557 ])
1558
1559 # Copyright (C) 2009-2013 Free Software Foundation, Inc.
1560 #
1561 # This file is free software; the Free Software Foundation
1562 # gives unlimited permission to copy and/or distribute it,
1563 # with or without modifications, as long as this notice is preserved.
1564
1565 # AM_SILENT_RULES([DEFAULT])
1566 # --------------------------
1567 # Enable less verbose build rules; with the default set to DEFAULT
1568 # ("yes" being less verbose, "no" or empty being verbose).
1569 AC_DEFUN([AM_SILENT_RULES],
1570 [AC_ARG_ENABLE([silent-rules], [dnl
1571 AS_HELP_STRING(
1572 [--enable-silent-rules],
1573 [less verbose build output (undo: "make V=1")])
1574 AS_HELP_STRING(
1575 [--disable-silent-rules],
1576 [verbose build output (undo: "make V=0")])dnl
1577 ])
1578 case $enable_silent_rules in @%:@ (((
1579 yes) AM_DEFAULT_VERBOSITY=0;;
1580 no) AM_DEFAULT_VERBOSITY=1;;
1581 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
1582 esac
1583 dnl
1584 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
1585 dnl do not support nested variable expansions.
1586 dnl See automake bug#9928 and bug#10237.
1587 am_make=${MAKE-make}
1588 AC_CACHE_CHECK([whether $am_make supports nested variables],
1589 [am_cv_make_support_nested_variables],
1590 [if AS_ECHO([['TRUE=$(BAR$(V))
1591 BAR0=false
1592 BAR1=true
1593 V=1
1594 am__doit:
1595 @$(TRUE)
1596 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
1597 am_cv_make_support_nested_variables=yes
1598 else
1599 am_cv_make_support_nested_variables=no
1600 fi])
1601 if test $am_cv_make_support_nested_variables = yes; then
1602 dnl Using '$V' instead of '$(V)' breaks IRIX make.
1603 AM_V='$(V)'
1604 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
1605 else
1606 AM_V=$AM_DEFAULT_VERBOSITY
1607 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
1608 fi
1609 AC_SUBST([AM_V])dnl
1610 AM_SUBST_NOTMAKE([AM_V])dnl
1611 AC_SUBST([AM_DEFAULT_V])dnl
1612 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
1613 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
1614 AM_BACKSLASH='\'
1615 AC_SUBST([AM_BACKSLASH])dnl
1616 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
1617 ])
1618
1619 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
1620 #
1621 # This file is free software; the Free Software Foundation
1622 # gives unlimited permission to copy and/or distribute it,
1623 # with or without modifications, as long as this notice is preserved.
1624
1625 # AM_PROG_INSTALL_STRIP
1626 # ---------------------
1627 # One issue with vendor 'install' (even GNU) is that you can't
1628 # specify the program used to strip binaries. This is especially
1629 # annoying in cross-compiling environments, where the build's strip
1630 # is unlikely to handle the host's binaries.
1631 # Fortunately install-sh will honor a STRIPPROG variable, so we
1632 # always use install-sh in "make install-strip", and initialize
1633 # STRIPPROG with the value of the STRIP variable (set by the user).
1634 AC_DEFUN([AM_PROG_INSTALL_STRIP],
1635 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1636 # Installed binaries are usually stripped using 'strip' when the user
1637 # run "make install-strip". However 'strip' might not be the right
1638 # tool to use in cross-compilation environments, therefore Automake
1639 # will honor the 'STRIP' environment variable to overrule this program.
1640 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
1641 if test "$cross_compiling" != no; then
1642 AC_CHECK_TOOL([STRIP], [strip], :)
1643 fi
1644 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1645 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1646
1647 # Copyright (C) 2006-2013 Free Software Foundation, Inc.
1648 #
1649 # This file is free software; the Free Software Foundation
1650 # gives unlimited permission to copy and/or distribute it,
1651 # with or without modifications, as long as this notice is preserved.
1652
1653 # _AM_SUBST_NOTMAKE(VARIABLE)
1654 # ---------------------------
1655 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1656 # This macro is traced by Automake.
1657 AC_DEFUN([_AM_SUBST_NOTMAKE])
1658
1659 # AM_SUBST_NOTMAKE(VARIABLE)
1660 # --------------------------
1661 # Public sister of _AM_SUBST_NOTMAKE.
1662 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1663
1664 # Check how to create a tarball. -*- Autoconf -*-
1665
1666 # Copyright (C) 2004-2013 Free Software Foundation, Inc.
1667 #
1668 # This file is free software; the Free Software Foundation
1669 # gives unlimited permission to copy and/or distribute it,
1670 # with or without modifications, as long as this notice is preserved.
1671
1672 # _AM_PROG_TAR(FORMAT)
1673 # --------------------
1674 # Check how to create a tarball in format FORMAT.
1675 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
1676 #
1677 # Substitute a variable $(am__tar) that is a command
1678 # writing to stdout a FORMAT-tarball containing the directory
1679 # $tardir.
1680 # tardir=directory && $(am__tar) > result.tar
1681 #
1682 # Substitute a variable $(am__untar) that extract such
1683 # a tarball read from stdin.
1684 # $(am__untar) < result.tar
1685 #
1686 AC_DEFUN([_AM_PROG_TAR],
1687 [# Always define AMTAR for backward compatibility. Yes, it's still used
1688 # in the wild :-( We should find a proper way to deprecate it ...
1689 AC_SUBST([AMTAR], ['$${TAR-tar}'])
1690
1691 # We'll loop over all known methods to create a tar archive until one works.
1692 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1693
1694 m4_if([$1], [v7],
1695 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1696
1697 [m4_case([$1],
1698 [ustar],
1699 [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
1700 # There is notably a 21 bits limit for the UID and the GID. In fact,
1701 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
1702 # and bug#13588).
1703 am_max_uid=2097151 # 2^21 - 1
1704 am_max_gid=$am_max_uid
1705 # The $UID and $GID variables are not portable, so we need to resort
1706 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
1707 # below are definitely unexpected, so allow the users to see them
1708 # (that is, avoid stderr redirection).
1709 am_uid=`id -u || echo unknown`
1710 am_gid=`id -g || echo unknown`
1711 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
1712 if test $am_uid -le $am_max_uid; then
1713 AC_MSG_RESULT([yes])
1714 else
1715 AC_MSG_RESULT([no])
1716 _am_tools=none
1717 fi
1718 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
1719 if test $am_gid -le $am_max_gid; then
1720 AC_MSG_RESULT([yes])
1721 else
1722 AC_MSG_RESULT([no])
1723 _am_tools=none
1724 fi],
1725
1726 [pax],
1727 [],
1728
1729 [m4_fatal([Unknown tar format])])
1730
1731 AC_MSG_CHECKING([how to create a $1 tar archive])
1732
1733 # Go ahead even if we have the value already cached. We do so because we
1734 # need to set the values for the 'am__tar' and 'am__untar' variables.
1735 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1736
1737 for _am_tool in $_am_tools; do
1738 case $_am_tool in
1739 gnutar)
1740 for _am_tar in tar gnutar gtar; do
1741 AM_RUN_LOG([$_am_tar --version]) && break
1742 done
1743 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1744 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1745 am__untar="$_am_tar -xf -"
1746 ;;
1747 plaintar)
1748 # Must skip GNU tar: if it does not support --format= it doesn't create
1749 # ustar tarball either.
1750 (tar --version) >/dev/null 2>&1 && continue
1751 am__tar='tar chf - "$$tardir"'
1752 am__tar_='tar chf - "$tardir"'
1753 am__untar='tar xf -'
1754 ;;
1755 pax)
1756 am__tar='pax -L -x $1 -w "$$tardir"'
1757 am__tar_='pax -L -x $1 -w "$tardir"'
1758 am__untar='pax -r'
1759 ;;
1760 cpio)
1761 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1762 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1763 am__untar='cpio -i -H $1 -d'
1764 ;;
1765 none)
1766 am__tar=false
1767 am__tar_=false
1768 am__untar=false
1769 ;;
1770 esac
1771
1772 # If the value was cached, stop now. We just wanted to have am__tar
1773 # and am__untar set.
1774 test -n "${am_cv_prog_tar_$1}" && break
1775
1776 # tar/untar a dummy directory, and stop if the command works.
1777 rm -rf conftest.dir
1778 mkdir conftest.dir
1779 echo GrepMe > conftest.dir/file
1780 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1781 rm -rf conftest.dir
1782 if test -s conftest.tar; then
1783 AM_RUN_LOG([$am__untar <conftest.tar])
1784 AM_RUN_LOG([cat conftest.dir/file])
1785 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1786 fi
1787 done
1788 rm -rf conftest.dir
1789
1790 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1791 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1792
1793 AC_SUBST([am__tar])
1794 AC_SUBST([am__untar])
1795 ]) # _AM_PROG_TAR
1796
1797 m4_include([m4/attributes.m4])
1798 m4_include([m4/gtk-doc.m4])
1799 m4_include([m4/intltool.m4])
1800 m4_include([m4/libtool.m4])
1801 m4_include([m4/ltoptions.m4])
1802 m4_include([m4/ltsugar.m4])
1803 m4_include([m4/ltversion.m4])
1804 m4_include([m4/lt~obsolete.m4])