1 # generated automatically by aclocal 1.11.3 -*- 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 # longlong.m4 serial 14
24 dnl Copyright (C) 1999-2007, 2009-2010 Free Software Foundation, Inc.
25 dnl This file is free software; the Free Software Foundation
26 dnl gives unlimited permission to copy and/or distribute it,
27 dnl with or without modifications, as long as this notice is preserved.
31 # Define HAVE_LONG_LONG_INT if 'long long int' works.
32 # This fixes a bug in Autoconf 2.61, but can be removed once we
33 # assume 2.62 everywhere.
35 # Note: If the type 'long long int' exists but is only 32 bits large
36 # (as on some very old compilers), HAVE_LONG_LONG_INT will not be
37 # defined. In this case you can treat 'long long int' like 'long int'.
39 AC_DEFUN([AC_TYPE_LONG_LONG_INT],
41 AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int],
43 [_AC_TYPE_LONG_LONG_SNIPPET],
44 [dnl This catches a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004.
45 dnl If cross compiling, assume the bug isn't important, since
46 dnl nobody cross compiles for this platform as far as we know.
49 [[@%:@include <limits.h>
52 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
53 @%:@ define LLONG_MAX (HALF - 1 + HALF)
55 [[long long int n = 1;
59 long long int m = n << i;
62 if (LLONG_MAX / 2 < m)
66 [ac_cv_type_long_long_int=yes],
67 [ac_cv_type_long_long_int=no],
68 [ac_cv_type_long_long_int=yes])],
69 [ac_cv_type_long_long_int=no])])
70 if test $ac_cv_type_long_long_int = yes; then
71 AC_DEFINE([HAVE_LONG_LONG_INT], [1],
72 [Define to 1 if the system has the type `long long int'.])
76 # Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works.
77 # This fixes a bug in Autoconf 2.61, but can be removed once we
78 # assume 2.62 everywhere.
80 # Note: If the type 'unsigned long long int' exists but is only 32 bits
81 # large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT
82 # will not be defined. In this case you can treat 'unsigned long long int'
83 # like 'unsigned long int'.
85 AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT],
87 AC_CACHE_CHECK([for unsigned long long int],
88 [ac_cv_type_unsigned_long_long_int],
90 [_AC_TYPE_LONG_LONG_SNIPPET],
91 [ac_cv_type_unsigned_long_long_int=yes],
92 [ac_cv_type_unsigned_long_long_int=no])])
93 if test $ac_cv_type_unsigned_long_long_int = yes; then
94 AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1],
95 [Define to 1 if the system has the type `unsigned long long int'.])
99 # Expands to a C program that can be used to test for simultaneous support
100 # of 'long long' and 'unsigned long long'. We don't want to say that
101 # 'long long' is available if 'unsigned long long' is not, or vice versa,
102 # because too many programs rely on the symmetry between signed and unsigned
103 # integer types (excluding 'bool').
104 AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET],
107 [[/* For now, do not test the preprocessor; as of 2007 there are too many
108 implementations with broken preprocessors. Perhaps this can
109 be revisited in 2012. In the meantime, code should not expect
110 #if to work with literals wider than 32 bits. */
112 long long int ll = 9223372036854775807ll;
113 long long int nll = -9223372036854775807LL;
114 unsigned long long int ull = 18446744073709551615ULL;
115 /* Test constant expressions. */
116 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
118 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
121 [[/* Test availability of runtime routines for shift and division. */
122 long long int llmax = 9223372036854775807ll;
123 unsigned long long int ullmax = 18446744073709551615ull;
124 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
125 | (llmax / ll) | (llmax % ll)
126 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
127 | (ullmax / ull) | (ullmax % ull));]])
130 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
133 # This file is free software; the Free Software Foundation
134 # gives unlimited permission to copy and/or distribute it,
135 # with or without modifications, as long as this notice is preserved.
139 # AM_AUTOMAKE_VERSION(VERSION)
140 # ----------------------------
141 # Automake X.Y traces this macro to ensure aclocal.m4 has been
142 # generated from the m4 files accompanying Automake X.Y.
143 # (This private macro should not be called outside this file.)
144 AC_DEFUN([AM_AUTOMAKE_VERSION],
145 [am__api_version='1.11'
146 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
147 dnl require some minimum version. Point them to the right macro.
148 m4_if([$1], [1.11.3], [],
149 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
152 # _AM_AUTOCONF_VERSION(VERSION)
153 # -----------------------------
154 # aclocal traces this macro to find the Autoconf version.
155 # This is a private macro too. Using m4_define simplifies
156 # the logic in aclocal, which can simply ignore this definition.
157 m4_define([_AM_AUTOCONF_VERSION], [])
159 # AM_SET_CURRENT_AUTOMAKE_VERSION
160 # -------------------------------
161 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
162 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
163 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
164 [AM_AUTOMAKE_VERSION([1.11.3])dnl
165 m4_ifndef([AC_AUTOCONF_VERSION],
166 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
167 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
169 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
171 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
173 # This file is free software; the Free Software Foundation
174 # gives unlimited permission to copy and/or distribute it,
175 # with or without modifications, as long as this notice is preserved.
179 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
180 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
181 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
183 # Of course, Automake must honor this variable whenever it calls a
184 # tool from the auxiliary directory. The problem is that $srcdir (and
185 # therefore $ac_aux_dir as well) can be either absolute or relative,
186 # depending on how configure is run. This is pretty annoying, since
187 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
188 # source directory, any form will work fine, but in subdirectories a
189 # relative path needs to be adjusted first.
191 # $ac_aux_dir/missing
192 # fails when called from a subdirectory if $ac_aux_dir is relative
193 # $top_srcdir/$ac_aux_dir/missing
194 # fails if $ac_aux_dir is absolute,
195 # fails when called from a subdirectory in a VPATH build with
196 # a relative $ac_aux_dir
198 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
199 # are both prefixed by $srcdir. In an in-source build this is usually
200 # harmless because $srcdir is `.', but things will broke when you
201 # start a VPATH build or use an absolute $srcdir.
203 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
204 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
205 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
206 # and then we would define $MISSING as
207 # MISSING="\${SHELL} $am_aux_dir/missing"
208 # This will work as long as MISSING is not called from configure, because
209 # unfortunately $(top_srcdir) has no meaning in configure.
210 # However there are other variables, like CC, which are often used in
211 # configure, and could therefore not use this "fixed" $ac_aux_dir.
213 # Another solution, used here, is to always expand $ac_aux_dir to an
214 # absolute PATH. The drawback is that using absolute paths prevent a
215 # configured tree to be moved without reconfiguration.
217 AC_DEFUN([AM_AUX_DIR_EXPAND],
218 [dnl Rely on autoconf to set up CDPATH properly.
220 # expand $ac_aux_dir to an absolute path
221 am_aux_dir=`cd $ac_aux_dir && pwd`
224 # AM_CONDITIONAL -*- Autoconf -*-
226 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
227 # Free Software Foundation, Inc.
229 # This file is free software; the Free Software Foundation
230 # gives unlimited permission to copy and/or distribute it,
231 # with or without modifications, as long as this notice is preserved.
235 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
236 # -------------------------------------
237 # Define a conditional.
238 AC_DEFUN([AM_CONDITIONAL],
240 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
241 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
242 AC_SUBST([$1_TRUE])dnl
243 AC_SUBST([$1_FALSE])dnl
244 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
245 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
246 m4_define([_AM_COND_VALUE_$1], [$2])dnl
254 AC_CONFIG_COMMANDS_PRE(
255 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
256 AC_MSG_ERROR([[conditional "$1" was never defined.
257 Usually this means the macro was only invoked conditionally.]])
260 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
261 # 2010, 2011 Free Software Foundation, Inc.
263 # This file is free software; the Free Software Foundation
264 # gives unlimited permission to copy and/or distribute it,
265 # with or without modifications, as long as this notice is preserved.
269 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
270 # written in clear, in which case automake, when reading aclocal.m4,
271 # will think it sees a *use*, and therefore will trigger all it's
272 # C support machinery. Also note that it means that autoscan, seeing
273 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
276 # _AM_DEPENDENCIES(NAME)
277 # ----------------------
278 # See how the compiler implements dependency checking.
279 # NAME is "CC", "CXX", "GCJ", or "OBJC".
280 # We try a few techniques and use that to set a single cache variable.
282 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
283 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
284 # dependency, and given that the user is not expected to run this macro,
285 # just rely on AC_PROG_CC.
286 AC_DEFUN([_AM_DEPENDENCIES],
287 [AC_REQUIRE([AM_SET_DEPDIR])dnl
288 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
289 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
290 AC_REQUIRE([AM_DEP_TRACK])dnl
292 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
293 [$1], CXX, [depcc="$CXX" am_compiler_list=],
294 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
295 [$1], UPC, [depcc="$UPC" am_compiler_list=],
296 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
297 [depcc="$$1" am_compiler_list=])
299 AC_CACHE_CHECK([dependency style of $depcc],
300 [am_cv_$1_dependencies_compiler_type],
301 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
302 # We make a subdir and do the tests there. Otherwise we can end up
303 # making bogus files that we don't know about and never remove. For
304 # instance it was reported that on HP-UX the gcc test will end up
305 # making a dummy file named `D' -- because `-MD' means `put the output
309 # Copy depcomp to subdir because otherwise we won't find it if we're
310 # using a relative directory.
311 cp "$am_depcomp" conftest.dir
313 # We will build objects and dependencies in a subdirectory because
314 # it helps to detect inapplicable dependency modes. For instance
315 # both Tru64's cc and ICC support -MD to output dependencies as a
316 # side effect of compilation, but ICC will put the dependencies in
317 # the current directory while Tru64 will put them in the object
321 am_cv_$1_dependencies_compiler_type=none
322 if test "$am_compiler_list" = ""; then
323 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
327 [case " $depcc " in #(
328 *\ -arch\ *\ -arch\ *) am__universal=true ;;
331 [case " $depcc " in #(
332 *\ -arch\ *\ -arch\ *) am__universal=true ;;
335 for depmode in $am_compiler_list; do
336 # Setup a source with many dependencies, because some compilers
337 # like to wrap large dependency lists on column 80 (with \), and
338 # we should not choose a depcomp mode which is confused by this.
340 # We need to recreate these files for each test, as the compiler may
341 # overwrite some of them when testing with obscure command lines.
342 # This happens at least with the AIX C compiler.
344 for i in 1 2 3 4 5 6; do
345 echo '#include "conftst'$i'.h"' >> sub/conftest.c
346 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
347 # Solaris 8's {/usr,}/bin/sh.
348 touch sub/conftst$i.h
350 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
352 # We check with `-c' and `-o' for the sake of the "dashmstdout"
353 # mode. It turns out that the SunPro C++ compiler does not properly
354 # handle `-M -o', and we need to detect this. Also, some Intel
355 # versions had trouble with output in subdirs
356 am__obj=sub/conftest.${OBJEXT-o}
357 am__minus_obj="-o $am__obj"
360 # This depmode causes a compiler race in universal mode.
361 test "$am__universal" = false || continue
364 # after this tag, mechanisms are not by side-effect, so they'll
365 # only be used when explicitly requested
366 if test "x$enable_dependency_tracking" = xyes; then
372 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
373 # This compiler won't grok `-c -o', but also, the minuso test has
374 # not run yet. These depmodes are late enough in the game, and
375 # so weak that their functioning should not be impacted.
376 am__obj=conftest.${OBJEXT-o}
381 if depmode=$depmode \
382 source=sub/conftest.c object=$am__obj \
383 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
384 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
385 >/dev/null 2>conftest.err &&
386 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
387 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
388 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
389 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
390 # icc doesn't choke on unknown options, it will just issue warnings
391 # or remarks (even with -Werror). So we grep stderr for any message
392 # that says an option was ignored or not supported.
393 # When given -MP, icc 7.0 and 7.1 complain thusly:
394 # icc: Command line warning: ignoring option '-M'; no argument required
395 # The diagnosis changed in icc 8.0:
396 # icc: Command line remark: option '-MP' not supported
397 if (grep 'ignoring option' conftest.err ||
398 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
399 am_cv_$1_dependencies_compiler_type=$depmode
408 am_cv_$1_dependencies_compiler_type=none
411 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
412 AM_CONDITIONAL([am__fastdep$1], [
413 test "x$enable_dependency_tracking" != xno \
414 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
420 # Choose a directory name for dependency files.
421 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
422 AC_DEFUN([AM_SET_DEPDIR],
423 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
424 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
430 AC_DEFUN([AM_DEP_TRACK],
431 [AC_ARG_ENABLE(dependency-tracking,
432 [ --disable-dependency-tracking speeds up one-time build
433 --enable-dependency-tracking do not reject slow dependency extractors])
434 if test "x$enable_dependency_tracking" != xno; then
435 am_depcomp="$ac_aux_dir/depcomp"
439 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
440 AC_SUBST([AMDEPBACKSLASH])dnl
441 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
442 AC_SUBST([am__nodep])dnl
443 _AM_SUBST_NOTMAKE([am__nodep])dnl
446 # Generate code to set up dependency tracking. -*- Autoconf -*-
448 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
449 # Free Software Foundation, Inc.
451 # This file is free software; the Free Software Foundation
452 # gives unlimited permission to copy and/or distribute it,
453 # with or without modifications, as long as this notice is preserved.
457 # _AM_OUTPUT_DEPENDENCY_COMMANDS
458 # ------------------------------
459 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
461 # Autoconf 2.62 quotes --file arguments for eval, but not when files
462 # are listed without --file. Let's play safe and only enable the eval
463 # if we detect the quoting.
464 case $CONFIG_FILES in
465 *\'*) eval set x "$CONFIG_FILES" ;;
466 *) set x $CONFIG_FILES ;;
471 # Strip MF so we end up with the name of the file.
472 mf=`echo "$mf" | sed -e 's/:.*$//'`
473 # Check whether this is an Automake generated Makefile or not.
474 # We used to match only the files named `Makefile.in', but
475 # some people rename them; so instead we look at the file content.
476 # Grep'ing the first line is not enough: some people post-process
477 # each Makefile.in and add a new line on top of each file to say so.
478 # Grep'ing the whole file is not good either: AIX grep has a line
479 # limit of 2048, but all sed's we know have understand at least 4000.
480 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
481 dirpart=`AS_DIRNAME("$mf")`
485 # Extract the definition of DEPDIR, am__include, and am__quote
486 # from the Makefile without running `make'.
487 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
488 test -z "$DEPDIR" && continue
489 am__include=`sed -n 's/^am__include = //p' < "$mf"`
490 test -z "am__include" && continue
491 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
492 # When using ansi2knr, U may be empty or an underscore; expand it
493 U=`sed -n 's/^U = //p' < "$mf"`
494 # Find all dependency output files, they are included files with
495 # $(DEPDIR) in their names. We invoke sed twice because it is the
496 # simplest approach to changing $(DEPDIR) to its actual value in the
498 for file in `sed -n "
499 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
500 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
501 # Make sure the directory exists.
502 test -f "$dirpart/$file" && continue
503 fdir=`AS_DIRNAME(["$file"])`
504 AS_MKDIR_P([$dirpart/$fdir])
505 # echo "creating $dirpart/$file"
506 echo '# dummy' > "$dirpart/$file"
510 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
513 # AM_OUTPUT_DEPENDENCY_COMMANDS
514 # -----------------------------
515 # This macro should only be invoked once -- use via AC_REQUIRE.
517 # This code is only required when automatic dependency tracking
518 # is enabled. FIXME. This creates each `.P' file that we will
519 # need in order to bootstrap the dependency handling code.
520 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
521 [AC_CONFIG_COMMANDS([depfiles],
522 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
523 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
526 # Do all the work for Automake. -*- Autoconf -*-
528 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
529 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
531 # This file is free software; the Free Software Foundation
532 # gives unlimited permission to copy and/or distribute it,
533 # with or without modifications, as long as this notice is preserved.
537 # This macro actually does too much. Some checks are only needed if
538 # your package does certain things. But this isn't really a big deal.
540 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
541 # AM_INIT_AUTOMAKE([OPTIONS])
542 # -----------------------------------------------
543 # The call with PACKAGE and VERSION arguments is the old style
544 # call (pre autoconf-2.50), which is being phased out. PACKAGE
545 # and VERSION should now be passed to AC_INIT and removed from
546 # the call to AM_INIT_AUTOMAKE.
547 # We support both call styles for the transition. After
548 # the next Automake release, Autoconf can make the AC_INIT
549 # arguments mandatory, and then we can depend on a new Autoconf
550 # release and drop the old call support.
551 AC_DEFUN([AM_INIT_AUTOMAKE],
552 [AC_PREREQ([2.62])dnl
553 dnl Autoconf wants to disallow AM_ names. We explicitly allow
554 dnl the ones we care about.
555 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
556 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
557 AC_REQUIRE([AC_PROG_INSTALL])dnl
558 if test "`cd $srcdir && pwd`" != "`pwd`"; then
559 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
560 # is not polluted with repeated "-I."
561 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
562 # test to see if srcdir already configured
563 if test -f $srcdir/config.status; then
564 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
568 # test whether we have cygpath
569 if test -z "$CYGPATH_W"; then
570 if (cygpath --version) >/dev/null 2>/dev/null; then
571 CYGPATH_W='cygpath -w'
576 AC_SUBST([CYGPATH_W])
578 # Define the identity of the package.
579 dnl Distinguish between old-style and new-style calls.
581 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
582 AC_SUBST([PACKAGE], [$1])dnl
583 AC_SUBST([VERSION], [$2])],
584 [_AM_SET_OPTIONS([$1])dnl
585 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
586 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
587 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
588 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
589 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
591 _AM_IF_OPTION([no-define],,
592 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
593 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
595 # Some tools Automake needs.
596 AC_REQUIRE([AM_SANITY_CHECK])dnl
597 AC_REQUIRE([AC_ARG_PROGRAM])dnl
598 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
599 AM_MISSING_PROG(AUTOCONF, autoconf)
600 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
601 AM_MISSING_PROG(AUTOHEADER, autoheader)
602 AM_MISSING_PROG(MAKEINFO, makeinfo)
603 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
604 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
605 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
606 # We need awk for the "check" target. The system "awk" is bad on
608 AC_REQUIRE([AC_PROG_AWK])dnl
609 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
610 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
611 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
612 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
613 [_AM_PROG_TAR([v7])])])
614 _AM_IF_OPTION([no-dependencies],,
615 [AC_PROVIDE_IFELSE([AC_PROG_CC],
616 [_AM_DEPENDENCIES(CC)],
617 [define([AC_PROG_CC],
618 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
619 AC_PROVIDE_IFELSE([AC_PROG_CXX],
620 [_AM_DEPENDENCIES(CXX)],
621 [define([AC_PROG_CXX],
622 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
623 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
624 [_AM_DEPENDENCIES(OBJC)],
625 [define([AC_PROG_OBJC],
626 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
628 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
629 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
630 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
631 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
632 AC_CONFIG_COMMANDS_PRE(dnl
633 [m4_provide_if([_AM_COMPILER_EXEEXT],
634 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
637 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
638 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
639 dnl mangled by Autoconf and run in a shell conditional statement.
640 m4_define([_AC_COMPILER_EXEEXT],
641 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
644 # When config.status generates a header, we must update the stamp-h file.
645 # This file resides in the same directory as the config header
646 # that is generated. The stamp files are numbered to have different names.
648 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
649 # loop where config.status creates the headers, so we can generate
650 # our stamp files there.
651 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
652 [# Compute $1's index in $config_headers.
655 for _am_header in $config_headers :; do
657 $_am_arg | $_am_arg:* )
660 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
663 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
665 # Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
668 # This file is free software; the Free Software Foundation
669 # gives unlimited permission to copy and/or distribute it,
670 # with or without modifications, as long as this notice is preserved.
676 # Define $install_sh.
677 AC_DEFUN([AM_PROG_INSTALL_SH],
678 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
679 if test x"${install_sh}" != xset; then
682 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
684 install_sh="\${SHELL} $am_aux_dir/install-sh"
687 AC_SUBST(install_sh)])
689 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
691 # This file is free software; the Free Software Foundation
692 # gives unlimited permission to copy and/or distribute it,
693 # with or without modifications, as long as this notice is preserved.
697 # Check whether the underlying file-system supports filenames
698 # with a leading dot. For instance MS-DOS doesn't.
699 AC_DEFUN([AM_SET_LEADING_DOT],
700 [rm -rf .tst 2>/dev/null
701 mkdir .tst 2>/dev/null
702 if test -d .tst; then
707 rmdir .tst 2>/dev/null
708 AC_SUBST([am__leading_dot])])
710 # Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005
711 # Free Software Foundation, Inc.
713 # This file is free software; the Free Software Foundation
714 # gives unlimited permission to copy and/or distribute it,
715 # with or without modifications, as long as this notice is preserved.
721 # Autoconf leaves LEX=: if lex or flex can't be found. Change that to a
722 # "missing" invocation, for better error output.
723 AC_DEFUN([AM_PROG_LEX],
725 AC_REQUIRE([AM_MISSING_HAS_RUN])dnl
726 AC_REQUIRE([AC_PROG_LEX])dnl
727 if test "$LEX" = :; then
728 LEX=${am_missing_run}flex
731 # Check to see how 'make' treats includes. -*- Autoconf -*-
733 # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
735 # This file is free software; the Free Software Foundation
736 # gives unlimited permission to copy and/or distribute it,
737 # with or without modifications, as long as this notice is preserved.
743 # Check to see how make treats includes.
744 AC_DEFUN([AM_MAKE_INCLUDE],
745 [am_make=${MAKE-make}
746 cat > confinc << 'END'
748 @echo this is the am__doit target
751 # If we don't find an include directive, just comment out the code.
752 AC_MSG_CHECKING([for style of include used by $am_make])
756 # First try GNU make style include.
757 echo "include confinc" > confmf
758 # Ignore all kinds of additional output from `make'.
759 case `$am_make -s -f confmf 2> /dev/null` in #(
760 *the\ am__doit\ target*)
766 # Now try BSD make style include.
767 if test "$am__include" = "#"; then
768 echo '.include "confinc"' > confmf
769 case `$am_make -s -f confmf 2> /dev/null` in #(
770 *the\ am__doit\ target*)
777 AC_SUBST([am__include])
778 AC_SUBST([am__quote])
779 AC_MSG_RESULT([$_am_result])
783 # Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
784 # Free Software Foundation, Inc.
786 # This file is free software; the Free Software Foundation
787 # gives unlimited permission to copy and/or distribute it,
788 # with or without modifications, as long as this notice is preserved.
794 # Like AC_PROG_CC_C_O, but changed for automake.
795 AC_DEFUN([AM_PROG_CC_C_O],
796 [AC_REQUIRE([AC_PROG_CC_C_O])dnl
797 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
798 AC_REQUIRE_AUX_FILE([compile])dnl
799 # FIXME: we rely on the cache variable name because
800 # there is no other way.
802 am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
803 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
804 if test "$am_t" != yes; then
805 # Losing compiler, so override with the script.
806 # FIXME: It is wrong to rewrite CC.
807 # But if we don't then we get into trouble of one sort or another.
808 # A longer-term fix would be to have automake use am__CC in this case,
809 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
810 CC="$am_aux_dir/compile $CC"
812 dnl Make sure AC_PROG_CC is never called again, or it will override our
814 m4_define([AC_PROG_CC],
815 [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
818 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
820 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
821 # Free Software Foundation, Inc.
823 # This file is free software; the Free Software Foundation
824 # gives unlimited permission to copy and/or distribute it,
825 # with or without modifications, as long as this notice is preserved.
829 # AM_MISSING_PROG(NAME, PROGRAM)
830 # ------------------------------
831 AC_DEFUN([AM_MISSING_PROG],
832 [AC_REQUIRE([AM_MISSING_HAS_RUN])
833 $1=${$1-"${am_missing_run}$2"}
839 # Define MISSING if not defined so far and test if it supports --run.
840 # If it does, set am_missing_run to use it, otherwise, to nothing.
841 AC_DEFUN([AM_MISSING_HAS_RUN],
842 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
843 AC_REQUIRE_AUX_FILE([missing])dnl
844 if test x"${MISSING+set}" != xset; then
847 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
849 MISSING="\${SHELL} $am_aux_dir/missing" ;;
852 # Use eval to expand $SHELL
853 if eval "$MISSING --run true"; then
854 am_missing_run="$MISSING --run "
857 AC_MSG_WARN([`missing' script is too old or missing])
861 # Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
864 # This file is free software; the Free Software Foundation
865 # gives unlimited permission to copy and/or distribute it,
866 # with or without modifications, as long as this notice is preserved.
872 # Check for `mkdir -p'.
873 AC_DEFUN([AM_PROG_MKDIR_P],
874 [AC_PREREQ([2.60])dnl
875 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
876 dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
877 dnl while keeping a definition of mkdir_p for backward compatibility.
878 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
879 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
880 dnl Makefile.ins that do not define MKDIR_P, so we do our own
881 dnl adjustment using top_builddir (which is defined more often than
883 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
885 [[\\/$]]* | ?:[[\\/]]*) ;;
886 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
890 # Helper functions for option handling. -*- Autoconf -*-
892 # Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
895 # This file is free software; the Free Software Foundation
896 # gives unlimited permission to copy and/or distribute it,
897 # with or without modifications, as long as this notice is preserved.
901 # _AM_MANGLE_OPTION(NAME)
902 # -----------------------
903 AC_DEFUN([_AM_MANGLE_OPTION],
904 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
906 # _AM_SET_OPTION(NAME)
907 # --------------------
908 # Set option NAME. Presently that only means defining a flag for this option.
909 AC_DEFUN([_AM_SET_OPTION],
910 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
912 # _AM_SET_OPTIONS(OPTIONS)
913 # ------------------------
914 # OPTIONS is a space-separated list of Automake options.
915 AC_DEFUN([_AM_SET_OPTIONS],
916 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
918 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
919 # -------------------------------------------
920 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
921 AC_DEFUN([_AM_IF_OPTION],
922 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
924 # Check to make sure that the build environment is sane. -*- Autoconf -*-
926 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
927 # Free Software Foundation, Inc.
929 # This file is free software; the Free Software Foundation
930 # gives unlimited permission to copy and/or distribute it,
931 # with or without modifications, as long as this notice is preserved.
937 AC_DEFUN([AM_SANITY_CHECK],
938 [AC_MSG_CHECKING([whether build environment is sane])
941 echo timestamp > conftest.file
942 # Reject unsafe characters in $srcdir or the absolute working directory
943 # name. Accept space and tab only in the latter.
947 *[[\\\"\#\$\&\'\`$am_lf]]*)
948 AC_MSG_ERROR([unsafe absolute working directory name]);;
951 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
952 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
955 # Do `set' in a subshell so we don't clobber the current shell's
956 # arguments. Must try -L first in case configure is actually a
957 # symlink; some systems play weird games with the mod time of symlinks
958 # (eg FreeBSD returns the mod time of the symlink's containing
961 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
962 if test "$[*]" = "X"; then
964 set X `ls -t "$srcdir/configure" conftest.file`
967 if test "$[*]" != "X $srcdir/configure conftest.file" \
968 && test "$[*]" != "X conftest.file $srcdir/configure"; then
970 # If neither matched, then we have a broken ls. This can happen
971 # if, for instance, CONFIG_SHELL is bash and it inherits a
972 # broken ls alias from the environment. This has actually
973 # happened. Such a system could not be considered "sane".
974 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
975 alias in your environment])
978 test "$[2]" = conftest.file
984 AC_MSG_ERROR([newly created file is older than distributed files!
985 Check your system clock])
989 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
991 # This file is free software; the Free Software Foundation
992 # gives unlimited permission to copy and/or distribute it,
993 # with or without modifications, as long as this notice is preserved.
997 # AM_PROG_INSTALL_STRIP
998 # ---------------------
999 # One issue with vendor `install' (even GNU) is that you can't
1000 # specify the program used to strip binaries. This is especially
1001 # annoying in cross-compiling environments, where the build's strip
1002 # is unlikely to handle the host's binaries.
1003 # Fortunately install-sh will honor a STRIPPROG variable, so we
1004 # always use install-sh in `make install-strip', and initialize
1005 # STRIPPROG with the value of the STRIP variable (set by the user).
1006 AC_DEFUN([AM_PROG_INSTALL_STRIP],
1007 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1008 # Installed binaries are usually stripped using `strip' when the user
1009 # run `make install-strip'. However `strip' might not be the right
1010 # tool to use in cross-compilation environments, therefore Automake
1011 # will honor the `STRIP' environment variable to overrule this program.
1012 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1013 if test "$cross_compiling" != no; then
1014 AC_CHECK_TOOL([STRIP], [strip], :)
1016 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1017 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1019 # Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
1021 # This file is free software; the Free Software Foundation
1022 # gives unlimited permission to copy and/or distribute it,
1023 # with or without modifications, as long as this notice is preserved.
1027 # _AM_SUBST_NOTMAKE(VARIABLE)
1028 # ---------------------------
1029 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1030 # This macro is traced by Automake.
1031 AC_DEFUN([_AM_SUBST_NOTMAKE])
1033 # AM_SUBST_NOTMAKE(VARIABLE)
1034 # --------------------------
1035 # Public sister of _AM_SUBST_NOTMAKE.
1036 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1038 # Check how to create a tarball. -*- Autoconf -*-
1040 # Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
1042 # This file is free software; the Free Software Foundation
1043 # gives unlimited permission to copy and/or distribute it,
1044 # with or without modifications, as long as this notice is preserved.
1048 # _AM_PROG_TAR(FORMAT)
1049 # --------------------
1050 # Check how to create a tarball in format FORMAT.
1051 # FORMAT should be one of `v7', `ustar', or `pax'.
1053 # Substitute a variable $(am__tar) that is a command
1054 # writing to stdout a FORMAT-tarball containing the directory
1056 # tardir=directory && $(am__tar) > result.tar
1058 # Substitute a variable $(am__untar) that extract such
1059 # a tarball read from stdin.
1060 # $(am__untar) < result.tar
1061 AC_DEFUN([_AM_PROG_TAR],
1062 [# Always define AMTAR for backward compatibility. Yes, it's still used
1063 # in the wild :-( We should find a proper way to deprecate it ...
1064 AC_SUBST([AMTAR], ['$${TAR-tar}'])
1066 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1067 [m4_case([$1], [ustar],, [pax],,
1068 [m4_fatal([Unknown tar format])])
1069 AC_MSG_CHECKING([how to create a $1 tar archive])
1070 # Loop over all known methods to create a tar archive until one works.
1071 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1072 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1073 # Do not fold the above two line into one, because Tru64 sh and
1074 # Solaris sh will not grok spaces in the rhs of `-'.
1075 for _am_tool in $_am_tools
1079 for _am_tar in tar gnutar gtar;
1081 AM_RUN_LOG([$_am_tar --version]) && break
1083 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1084 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1085 am__untar="$_am_tar -xf -"
1088 # Must skip GNU tar: if it does not support --format= it doesn't create
1089 # ustar tarball either.
1090 (tar --version) >/dev/null 2>&1 && continue
1091 am__tar='tar chf - "$$tardir"'
1092 am__tar_='tar chf - "$tardir"'
1093 am__untar='tar xf -'
1096 am__tar='pax -L -x $1 -w "$$tardir"'
1097 am__tar_='pax -L -x $1 -w "$tardir"'
1101 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1102 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1103 am__untar='cpio -i -H $1 -d'
1112 # If the value was cached, stop now. We just wanted to have am__tar
1113 # and am__untar set.
1114 test -n "${am_cv_prog_tar_$1}" && break
1116 # tar/untar a dummy directory, and stop if the command works
1119 echo GrepMe > conftest.dir/file
1120 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1122 if test -s conftest.tar; then
1123 AM_RUN_LOG([$am__untar <conftest.tar])
1124 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1129 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1130 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1132 AC_SUBST([am__untar])
1135 m4_include([acinclude.m4])