1 # generated automatically by aclocal 1.11.6 -*- Autoconf -*-
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
6 # This file is free software; the Free Software Foundation
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
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.68],,
18 [m4_warning([this file was generated for autoconf 2.68.
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'.])])
23 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
24 # serial 1 (pkg-config-0.24)
26 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
28 # This program is free software; you can redistribute it and/or modify
29 # it under the terms of the GNU General Public License as published by
30 # the Free Software Foundation; either version 2 of the License, or
31 # (at your option) any later version.
33 # This program is distributed in the hope that it will be useful, but
34 # WITHOUT ANY WARRANTY; without even the implied warranty of
35 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
36 # General Public License for more details.
38 # You should have received a copy of the GNU General Public License
39 # along with this program; if not, write to the Free Software
40 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
42 # As a special exception to the GNU General Public License, if you
43 # distribute this file as part of a program that contains a
44 # configuration script generated by Autoconf, you may include it under
45 # the same distribution terms that you use for the rest of that program.
47 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
48 # ----------------------------------
49 AC_DEFUN([PKG_PROG_PKG_CONFIG],
50 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
51 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
52 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
53 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
54 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
56 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
57 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
59 if test -n "$PKG_CONFIG"; then
60 _pkg_min_version=m4_default([$1], [0.9.0])
61 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
62 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
69 ])# PKG_PROG_PKG_CONFIG
71 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
73 # Check to see whether a particular set of modules exists. Similar
74 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
76 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
77 # only at the first occurence in configure.ac, so if the first place
78 # it's called might be skipped (such as if it is within an "if", you
79 # have to call PKG_CHECK_EXISTS manually
80 # --------------------------------------------------------------
81 AC_DEFUN([PKG_CHECK_EXISTS],
82 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
83 if test -n "$PKG_CONFIG" && \
84 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
90 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
91 # ---------------------------------------------
92 m4_define([_PKG_CONFIG],
93 [if test -n "$$1"; then
95 elif test -n "$PKG_CONFIG"; then
96 PKG_CHECK_EXISTS([$3],
97 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
104 # _PKG_SHORT_ERRORS_SUPPORTED
105 # -----------------------------
106 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
107 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
108 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
109 _pkg_short_errors_supported=yes
111 _pkg_short_errors_supported=no
113 ])# _PKG_SHORT_ERRORS_SUPPORTED
116 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
117 # [ACTION-IF-NOT-FOUND])
120 # Note that if there is a possibility the first call to
121 # PKG_CHECK_MODULES might not happen, you should be sure to include an
122 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
125 # --------------------------------------------------------------
126 AC_DEFUN([PKG_CHECK_MODULES],
127 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
128 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
129 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
132 AC_MSG_CHECKING([for $1])
134 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
135 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
137 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
138 and $1[]_LIBS to avoid the need to call pkg-config.
139 See the pkg-config man page for more details.])
141 if test $pkg_failed = yes; then
143 _PKG_SHORT_ERRORS_SUPPORTED
144 if test $_pkg_short_errors_supported = yes; then
145 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
147 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
149 # Put the nasty error message in config.log where it belongs
150 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
152 m4_default([$4], [AC_MSG_ERROR(
153 [Package requirements ($2) were not met:
157 Consider adjusting the PKG_CONFIG_PATH environment variable if you
158 installed software in a non-standard prefix.
162 elif test $pkg_failed = untried; then
164 m4_default([$4], [AC_MSG_FAILURE(
165 [The pkg-config script could not be found or is too old. Make sure it
166 is in your PATH or set the PKG_CONFIG environment variable to the full
171 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])
174 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
175 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
179 ])# PKG_CHECK_MODULES
181 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
184 # This file is free software; the Free Software Foundation
185 # gives unlimited permission to copy and/or distribute it,
186 # with or without modifications, as long as this notice is preserved.
190 # AM_AUTOMAKE_VERSION(VERSION)
191 # ----------------------------
192 # Automake X.Y traces this macro to ensure aclocal.m4 has been
193 # generated from the m4 files accompanying Automake X.Y.
194 # (This private macro should not be called outside this file.)
195 AC_DEFUN([AM_AUTOMAKE_VERSION],
196 [am__api_version='1.11'
197 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
198 dnl require some minimum version. Point them to the right macro.
199 m4_if([$1], [1.11.6], [],
200 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
203 # _AM_AUTOCONF_VERSION(VERSION)
204 # -----------------------------
205 # aclocal traces this macro to find the Autoconf version.
206 # This is a private macro too. Using m4_define simplifies
207 # the logic in aclocal, which can simply ignore this definition.
208 m4_define([_AM_AUTOCONF_VERSION], [])
210 # AM_SET_CURRENT_AUTOMAKE_VERSION
211 # -------------------------------
212 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
213 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
214 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
215 [AM_AUTOMAKE_VERSION([1.11.6])dnl
216 m4_ifndef([AC_AUTOCONF_VERSION],
217 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
218 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
220 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
222 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
224 # This file is free software; the Free Software Foundation
225 # gives unlimited permission to copy and/or distribute it,
226 # with or without modifications, as long as this notice is preserved.
230 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
231 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
232 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
234 # Of course, Automake must honor this variable whenever it calls a
235 # tool from the auxiliary directory. The problem is that $srcdir (and
236 # therefore $ac_aux_dir as well) can be either absolute or relative,
237 # depending on how configure is run. This is pretty annoying, since
238 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
239 # source directory, any form will work fine, but in subdirectories a
240 # relative path needs to be adjusted first.
242 # $ac_aux_dir/missing
243 # fails when called from a subdirectory if $ac_aux_dir is relative
244 # $top_srcdir/$ac_aux_dir/missing
245 # fails if $ac_aux_dir is absolute,
246 # fails when called from a subdirectory in a VPATH build with
247 # a relative $ac_aux_dir
249 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
250 # are both prefixed by $srcdir. In an in-source build this is usually
251 # harmless because $srcdir is `.', but things will broke when you
252 # start a VPATH build or use an absolute $srcdir.
254 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
255 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
256 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
257 # and then we would define $MISSING as
258 # MISSING="\${SHELL} $am_aux_dir/missing"
259 # This will work as long as MISSING is not called from configure, because
260 # unfortunately $(top_srcdir) has no meaning in configure.
261 # However there are other variables, like CC, which are often used in
262 # configure, and could therefore not use this "fixed" $ac_aux_dir.
264 # Another solution, used here, is to always expand $ac_aux_dir to an
265 # absolute PATH. The drawback is that using absolute paths prevent a
266 # configured tree to be moved without reconfiguration.
268 AC_DEFUN([AM_AUX_DIR_EXPAND],
269 [dnl Rely on autoconf to set up CDPATH properly.
271 # expand $ac_aux_dir to an absolute path
272 am_aux_dir=`cd $ac_aux_dir && pwd`
275 # AM_CONDITIONAL -*- Autoconf -*-
277 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
278 # Free Software Foundation, Inc.
280 # This file is free software; the Free Software Foundation
281 # gives unlimited permission to copy and/or distribute it,
282 # with or without modifications, as long as this notice is preserved.
286 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
287 # -------------------------------------
288 # Define a conditional.
289 AC_DEFUN([AM_CONDITIONAL],
291 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
292 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
293 AC_SUBST([$1_TRUE])dnl
294 AC_SUBST([$1_FALSE])dnl
295 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
296 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
297 m4_define([_AM_COND_VALUE_$1], [$2])dnl
305 AC_CONFIG_COMMANDS_PRE(
306 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
307 AC_MSG_ERROR([[conditional "$1" was never defined.
308 Usually this means the macro was only invoked conditionally.]])
311 # Do all the work for Automake. -*- Autoconf -*-
313 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
314 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
316 # This file is free software; the Free Software Foundation
317 # gives unlimited permission to copy and/or distribute it,
318 # with or without modifications, as long as this notice is preserved.
322 # This macro actually does too much. Some checks are only needed if
323 # your package does certain things. But this isn't really a big deal.
325 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
326 # AM_INIT_AUTOMAKE([OPTIONS])
327 # -----------------------------------------------
328 # The call with PACKAGE and VERSION arguments is the old style
329 # call (pre autoconf-2.50), which is being phased out. PACKAGE
330 # and VERSION should now be passed to AC_INIT and removed from
331 # the call to AM_INIT_AUTOMAKE.
332 # We support both call styles for the transition. After
333 # the next Automake release, Autoconf can make the AC_INIT
334 # arguments mandatory, and then we can depend on a new Autoconf
335 # release and drop the old call support.
336 AC_DEFUN([AM_INIT_AUTOMAKE],
337 [AC_PREREQ([2.62])dnl
338 dnl Autoconf wants to disallow AM_ names. We explicitly allow
339 dnl the ones we care about.
340 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
341 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
342 AC_REQUIRE([AC_PROG_INSTALL])dnl
343 if test "`cd $srcdir && pwd`" != "`pwd`"; then
344 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
345 # is not polluted with repeated "-I."
346 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
347 # test to see if srcdir already configured
348 if test -f $srcdir/config.status; then
349 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
353 # test whether we have cygpath
354 if test -z "$CYGPATH_W"; then
355 if (cygpath --version) >/dev/null 2>/dev/null; then
356 CYGPATH_W='cygpath -w'
361 AC_SUBST([CYGPATH_W])
363 # Define the identity of the package.
364 dnl Distinguish between old-style and new-style calls.
366 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
367 AC_SUBST([PACKAGE], [$1])dnl
368 AC_SUBST([VERSION], [$2])],
369 [_AM_SET_OPTIONS([$1])dnl
370 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
371 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
372 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
373 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
374 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
376 _AM_IF_OPTION([no-define],,
377 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
378 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
380 # Some tools Automake needs.
381 AC_REQUIRE([AM_SANITY_CHECK])dnl
382 AC_REQUIRE([AC_ARG_PROGRAM])dnl
383 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
384 AM_MISSING_PROG(AUTOCONF, autoconf)
385 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
386 AM_MISSING_PROG(AUTOHEADER, autoheader)
387 AM_MISSING_PROG(MAKEINFO, makeinfo)
388 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
389 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
390 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
391 # We need awk for the "check" target. The system "awk" is bad on
393 AC_REQUIRE([AC_PROG_AWK])dnl
394 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
395 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
396 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
397 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
398 [_AM_PROG_TAR([v7])])])
399 _AM_IF_OPTION([no-dependencies],,
400 [AC_PROVIDE_IFELSE([AC_PROG_CC],
401 [_AM_DEPENDENCIES(CC)],
402 [define([AC_PROG_CC],
403 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
404 AC_PROVIDE_IFELSE([AC_PROG_CXX],
405 [_AM_DEPENDENCIES(CXX)],
406 [define([AC_PROG_CXX],
407 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
408 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
409 [_AM_DEPENDENCIES(OBJC)],
410 [define([AC_PROG_OBJC],
411 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
413 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
414 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
415 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
416 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
417 AC_CONFIG_COMMANDS_PRE(dnl
418 [m4_provide_if([_AM_COMPILER_EXEEXT],
419 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
422 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
423 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
424 dnl mangled by Autoconf and run in a shell conditional statement.
425 m4_define([_AC_COMPILER_EXEEXT],
426 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
429 # When config.status generates a header, we must update the stamp-h file.
430 # This file resides in the same directory as the config header
431 # that is generated. The stamp files are numbered to have different names.
433 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
434 # loop where config.status creates the headers, so we can generate
435 # our stamp files there.
436 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
437 [# Compute $1's index in $config_headers.
440 for _am_header in $config_headers :; do
442 $_am_arg | $_am_arg:* )
445 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
448 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
450 # Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
453 # This file is free software; the Free Software Foundation
454 # gives unlimited permission to copy and/or distribute it,
455 # with or without modifications, as long as this notice is preserved.
461 # Define $install_sh.
462 AC_DEFUN([AM_PROG_INSTALL_SH],
463 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
464 if test x"${install_sh}" != xset; then
467 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
469 install_sh="\${SHELL} $am_aux_dir/install-sh"
472 AC_SUBST(install_sh)])
474 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
476 # This file is free software; the Free Software Foundation
477 # gives unlimited permission to copy and/or distribute it,
478 # with or without modifications, as long as this notice is preserved.
482 # Check whether the underlying file-system supports filenames
483 # with a leading dot. For instance MS-DOS doesn't.
484 AC_DEFUN([AM_SET_LEADING_DOT],
485 [rm -rf .tst 2>/dev/null
486 mkdir .tst 2>/dev/null
487 if test -d .tst; then
492 rmdir .tst 2>/dev/null
493 AC_SUBST([am__leading_dot])])
495 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
497 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
498 # Free Software Foundation, Inc.
500 # This file is free software; the Free Software Foundation
501 # gives unlimited permission to copy and/or distribute it,
502 # with or without modifications, as long as this notice is preserved.
506 # AM_MISSING_PROG(NAME, PROGRAM)
507 # ------------------------------
508 AC_DEFUN([AM_MISSING_PROG],
509 [AC_REQUIRE([AM_MISSING_HAS_RUN])
510 $1=${$1-"${am_missing_run}$2"}
516 # Define MISSING if not defined so far and test if it supports --run.
517 # If it does, set am_missing_run to use it, otherwise, to nothing.
518 AC_DEFUN([AM_MISSING_HAS_RUN],
519 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
520 AC_REQUIRE_AUX_FILE([missing])dnl
521 if test x"${MISSING+set}" != xset; then
524 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
526 MISSING="\${SHELL} $am_aux_dir/missing" ;;
529 # Use eval to expand $SHELL
530 if eval "$MISSING --run true"; then
531 am_missing_run="$MISSING --run "
534 AC_MSG_WARN([`missing' script is too old or missing])
538 # Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
541 # This file is free software; the Free Software Foundation
542 # gives unlimited permission to copy and/or distribute it,
543 # with or without modifications, as long as this notice is preserved.
549 # Check for `mkdir -p'.
550 AC_DEFUN([AM_PROG_MKDIR_P],
551 [AC_PREREQ([2.60])dnl
552 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
553 dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
554 dnl while keeping a definition of mkdir_p for backward compatibility.
555 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
556 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
557 dnl Makefile.ins that do not define MKDIR_P, so we do our own
558 dnl adjustment using top_builddir (which is defined more often than
560 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
562 [[\\/$]]* | ?:[[\\/]]*) ;;
563 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
567 # Helper functions for option handling. -*- Autoconf -*-
569 # Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
572 # This file is free software; the Free Software Foundation
573 # gives unlimited permission to copy and/or distribute it,
574 # with or without modifications, as long as this notice is preserved.
578 # _AM_MANGLE_OPTION(NAME)
579 # -----------------------
580 AC_DEFUN([_AM_MANGLE_OPTION],
581 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
583 # _AM_SET_OPTION(NAME)
584 # --------------------
585 # Set option NAME. Presently that only means defining a flag for this option.
586 AC_DEFUN([_AM_SET_OPTION],
587 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
589 # _AM_SET_OPTIONS(OPTIONS)
590 # ------------------------
591 # OPTIONS is a space-separated list of Automake options.
592 AC_DEFUN([_AM_SET_OPTIONS],
593 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
595 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
596 # -------------------------------------------
597 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
598 AC_DEFUN([_AM_IF_OPTION],
599 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
601 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
603 # This file is free software; the Free Software Foundation
604 # gives unlimited permission to copy and/or distribute it,
605 # with or without modifications, as long as this notice is preserved.
609 # AM_RUN_LOG(COMMAND)
610 # -------------------
611 # Run COMMAND, save the exit status in ac_status, and log it.
612 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
613 AC_DEFUN([AM_RUN_LOG],
614 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
615 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
617 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
618 (exit $ac_status); }])
620 # Check to make sure that the build environment is sane. -*- Autoconf -*-
622 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
623 # Free Software Foundation, Inc.
625 # This file is free software; the Free Software Foundation
626 # gives unlimited permission to copy and/or distribute it,
627 # with or without modifications, as long as this notice is preserved.
633 AC_DEFUN([AM_SANITY_CHECK],
634 [AC_MSG_CHECKING([whether build environment is sane])
637 echo timestamp > conftest.file
638 # Reject unsafe characters in $srcdir or the absolute working directory
639 # name. Accept space and tab only in the latter.
643 *[[\\\"\#\$\&\'\`$am_lf]]*)
644 AC_MSG_ERROR([unsafe absolute working directory name]);;
647 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
648 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
651 # Do `set' in a subshell so we don't clobber the current shell's
652 # arguments. Must try -L first in case configure is actually a
653 # symlink; some systems play weird games with the mod time of symlinks
654 # (eg FreeBSD returns the mod time of the symlink's containing
657 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
658 if test "$[*]" = "X"; then
660 set X `ls -t "$srcdir/configure" conftest.file`
663 if test "$[*]" != "X $srcdir/configure conftest.file" \
664 && test "$[*]" != "X conftest.file $srcdir/configure"; then
666 # If neither matched, then we have a broken ls. This can happen
667 # if, for instance, CONFIG_SHELL is bash and it inherits a
668 # broken ls alias from the environment. This has actually
669 # happened. Such a system could not be considered "sane".
670 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
671 alias in your environment])
674 test "$[2]" = conftest.file
680 AC_MSG_ERROR([newly created file is older than distributed files!
681 Check your system clock])
685 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
687 # This file is free software; the Free Software Foundation
688 # gives unlimited permission to copy and/or distribute it,
689 # with or without modifications, as long as this notice is preserved.
693 # AM_PROG_INSTALL_STRIP
694 # ---------------------
695 # One issue with vendor `install' (even GNU) is that you can't
696 # specify the program used to strip binaries. This is especially
697 # annoying in cross-compiling environments, where the build's strip
698 # is unlikely to handle the host's binaries.
699 # Fortunately install-sh will honor a STRIPPROG variable, so we
700 # always use install-sh in `make install-strip', and initialize
701 # STRIPPROG with the value of the STRIP variable (set by the user).
702 AC_DEFUN([AM_PROG_INSTALL_STRIP],
703 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
704 # Installed binaries are usually stripped using `strip' when the user
705 # run `make install-strip'. However `strip' might not be the right
706 # tool to use in cross-compilation environments, therefore Automake
707 # will honor the `STRIP' environment variable to overrule this program.
708 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
709 if test "$cross_compiling" != no; then
710 AC_CHECK_TOOL([STRIP], [strip], :)
712 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
713 AC_SUBST([INSTALL_STRIP_PROGRAM])])
715 # Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
717 # This file is free software; the Free Software Foundation
718 # gives unlimited permission to copy and/or distribute it,
719 # with or without modifications, as long as this notice is preserved.
723 # _AM_SUBST_NOTMAKE(VARIABLE)
724 # ---------------------------
725 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
726 # This macro is traced by Automake.
727 AC_DEFUN([_AM_SUBST_NOTMAKE])
729 # AM_SUBST_NOTMAKE(VARIABLE)
730 # --------------------------
731 # Public sister of _AM_SUBST_NOTMAKE.
732 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
734 # Check how to create a tarball. -*- Autoconf -*-
736 # Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
738 # This file is free software; the Free Software Foundation
739 # gives unlimited permission to copy and/or distribute it,
740 # with or without modifications, as long as this notice is preserved.
744 # _AM_PROG_TAR(FORMAT)
745 # --------------------
746 # Check how to create a tarball in format FORMAT.
747 # FORMAT should be one of `v7', `ustar', or `pax'.
749 # Substitute a variable $(am__tar) that is a command
750 # writing to stdout a FORMAT-tarball containing the directory
752 # tardir=directory && $(am__tar) > result.tar
754 # Substitute a variable $(am__untar) that extract such
755 # a tarball read from stdin.
756 # $(am__untar) < result.tar
757 AC_DEFUN([_AM_PROG_TAR],
758 [# Always define AMTAR for backward compatibility. Yes, it's still used
759 # in the wild :-( We should find a proper way to deprecate it ...
760 AC_SUBST([AMTAR], ['$${TAR-tar}'])
762 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
763 [m4_case([$1], [ustar],, [pax],,
764 [m4_fatal([Unknown tar format])])
765 AC_MSG_CHECKING([how to create a $1 tar archive])
766 # Loop over all known methods to create a tar archive until one works.
767 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
768 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
769 # Do not fold the above two line into one, because Tru64 sh and
770 # Solaris sh will not grok spaces in the rhs of `-'.
771 for _am_tool in $_am_tools
775 for _am_tar in tar gnutar gtar;
777 AM_RUN_LOG([$_am_tar --version]) && break
779 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
780 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
781 am__untar="$_am_tar -xf -"
784 # Must skip GNU tar: if it does not support --format= it doesn't create
785 # ustar tarball either.
786 (tar --version) >/dev/null 2>&1 && continue
787 am__tar='tar chf - "$$tardir"'
788 am__tar_='tar chf - "$tardir"'
792 am__tar='pax -L -x $1 -w "$$tardir"'
793 am__tar_='pax -L -x $1 -w "$tardir"'
797 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
798 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
799 am__untar='cpio -i -H $1 -d'
808 # If the value was cached, stop now. We just wanted to have am__tar
810 test -n "${am_cv_prog_tar_$1}" && break
812 # tar/untar a dummy directory, and stop if the command works
815 echo GrepMe > conftest.dir/file
816 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
818 if test -s conftest.tar; then
819 AM_RUN_LOG([$am__untar <conftest.tar])
820 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
825 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
826 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
828 AC_SUBST([am__untar])