1 # generated automatically by aclocal 1.10 -*- Autoconf -*-
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005, 2006 Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14 m4_if(m4_PACKAGE_VERSION, [2.61],,
15 [m4_fatal([this file was generated for autoconf 2.61.
16 You have another version of autoconf. If you want to use that,
17 you should regenerate the build system entirely.], [63])])
19 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
21 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
23 # This program is free software; you can redistribute it and/or modify
24 # it under the terms of the GNU General Public License as published by
25 # the Free Software Foundation; either version 2 of the License, or
26 # (at your option) any later version.
28 # This program is distributed in the hope that it will be useful, but
29 # WITHOUT ANY WARRANTY; without even the implied warranty of
30 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
31 # General Public License for more details.
33 # You should have received a copy of the GNU General Public License
34 # along with this program; if not, write to the Free Software
35 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
37 # As a special exception to the GNU General Public License, if you
38 # distribute this file as part of a program that contains a
39 # configuration script generated by Autoconf, you may include it under
40 # the same distribution terms that you use for the rest of that program.
42 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
43 # ----------------------------------
44 AC_DEFUN([PKG_PROG_PKG_CONFIG],
45 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
46 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
47 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
48 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
49 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
51 if test -n "$PKG_CONFIG"; then
52 _pkg_min_version=m4_default([$1], [0.9.0])
53 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
54 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
62 ])# PKG_PROG_PKG_CONFIG
64 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
66 # Check to see whether a particular set of modules exists. Similar
67 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
70 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
71 # this or PKG_CHECK_MODULES is called, or make sure to call
72 # PKG_CHECK_EXISTS manually
73 # --------------------------------------------------------------
74 AC_DEFUN([PKG_CHECK_EXISTS],
75 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
76 if test -n "$PKG_CONFIG" && \
77 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
78 m4_ifval([$2], [$2], [:])
84 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
85 # ---------------------------------------------
86 m4_define([_PKG_CONFIG],
87 [if test -n "$$1"; then
89 elif test -n "$PKG_CONFIG"; then
90 PKG_CHECK_EXISTS([$3],
91 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
98 # _PKG_SHORT_ERRORS_SUPPORTED
99 # -----------------------------
100 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
101 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
102 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
103 _pkg_short_errors_supported=yes
105 _pkg_short_errors_supported=no
107 ])# _PKG_SHORT_ERRORS_SUPPORTED
110 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
111 # [ACTION-IF-NOT-FOUND])
114 # Note that if there is a possibility the first call to
115 # PKG_CHECK_MODULES might not happen, you should be sure to include an
116 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
119 # --------------------------------------------------------------
120 AC_DEFUN([PKG_CHECK_MODULES],
121 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
122 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
123 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
126 AC_MSG_CHECKING([for $1])
128 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
129 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
131 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
132 and $1[]_LIBS to avoid the need to call pkg-config.
133 See the pkg-config man page for more details.])
135 if test $pkg_failed = yes; then
136 _PKG_SHORT_ERRORS_SUPPORTED
137 if test $_pkg_short_errors_supported = yes; then
138 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
140 $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
142 # Put the nasty error message in config.log where it belongs
143 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
145 ifelse([$4], , [AC_MSG_ERROR(dnl
146 [Package requirements ($2) were not met:
150 Consider adjusting the PKG_CONFIG_PATH environment variable if you
151 installed software in a non-standard prefix.
157 elif test $pkg_failed = untried; then
158 ifelse([$4], , [AC_MSG_FAILURE(dnl
159 [The pkg-config script could not be found or is too old. Make sure it
160 is in your PATH or set the PKG_CONFIG environment variable to the full
165 To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
168 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
169 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
171 ifelse([$3], , :, [$3])
173 ])# PKG_CHECK_MODULES
175 # Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
177 # This file is free software; the Free Software Foundation
178 # gives unlimited permission to copy and/or distribute it,
179 # with or without modifications, as long as this notice is preserved.
181 # AM_AUTOMAKE_VERSION(VERSION)
182 # ----------------------------
183 # Automake X.Y traces this macro to ensure aclocal.m4 has been
184 # generated from the m4 files accompanying Automake X.Y.
185 # (This private macro should not be called outside this file.)
186 AC_DEFUN([AM_AUTOMAKE_VERSION],
187 [am__api_version='1.10'
188 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
189 dnl require some minimum version. Point them to the right macro.
190 m4_if([$1], [1.10], [],
191 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
194 # _AM_AUTOCONF_VERSION(VERSION)
195 # -----------------------------
196 # aclocal traces this macro to find the Autoconf version.
197 # This is a private macro too. Using m4_define simplifies
198 # the logic in aclocal, which can simply ignore this definition.
199 m4_define([_AM_AUTOCONF_VERSION], [])
201 # AM_SET_CURRENT_AUTOMAKE_VERSION
202 # -------------------------------
203 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
204 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
205 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
206 [AM_AUTOMAKE_VERSION([1.10])dnl
207 _AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)])
209 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
211 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
213 # This file is free software; the Free Software Foundation
214 # gives unlimited permission to copy and/or distribute it,
215 # with or without modifications, as long as this notice is preserved.
217 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
218 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
219 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
221 # Of course, Automake must honor this variable whenever it calls a
222 # tool from the auxiliary directory. The problem is that $srcdir (and
223 # therefore $ac_aux_dir as well) can be either absolute or relative,
224 # depending on how configure is run. This is pretty annoying, since
225 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
226 # source directory, any form will work fine, but in subdirectories a
227 # relative path needs to be adjusted first.
229 # $ac_aux_dir/missing
230 # fails when called from a subdirectory if $ac_aux_dir is relative
231 # $top_srcdir/$ac_aux_dir/missing
232 # fails if $ac_aux_dir is absolute,
233 # fails when called from a subdirectory in a VPATH build with
234 # a relative $ac_aux_dir
236 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
237 # are both prefixed by $srcdir. In an in-source build this is usually
238 # harmless because $srcdir is `.', but things will broke when you
239 # start a VPATH build or use an absolute $srcdir.
241 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
242 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
243 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
244 # and then we would define $MISSING as
245 # MISSING="\${SHELL} $am_aux_dir/missing"
246 # This will work as long as MISSING is not called from configure, because
247 # unfortunately $(top_srcdir) has no meaning in configure.
248 # However there are other variables, like CC, which are often used in
249 # configure, and could therefore not use this "fixed" $ac_aux_dir.
251 # Another solution, used here, is to always expand $ac_aux_dir to an
252 # absolute PATH. The drawback is that using absolute paths prevent a
253 # configured tree to be moved without reconfiguration.
255 AC_DEFUN([AM_AUX_DIR_EXPAND],
256 [dnl Rely on autoconf to set up CDPATH properly.
258 # expand $ac_aux_dir to an absolute path
259 am_aux_dir=`cd $ac_aux_dir && pwd`
262 # AM_CONDITIONAL -*- Autoconf -*-
264 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
265 # Free Software Foundation, Inc.
267 # This file is free software; the Free Software Foundation
268 # gives unlimited permission to copy and/or distribute it,
269 # with or without modifications, as long as this notice is preserved.
273 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
274 # -------------------------------------
275 # Define a conditional.
276 AC_DEFUN([AM_CONDITIONAL],
278 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
279 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
280 AC_SUBST([$1_TRUE])dnl
281 AC_SUBST([$1_FALSE])dnl
282 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
283 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
291 AC_CONFIG_COMMANDS_PRE(
292 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
293 AC_MSG_ERROR([[conditional "$1" was never defined.
294 Usually this means the macro was only invoked conditionally.]])
297 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
298 # Free Software Foundation, Inc.
300 # This file is free software; the Free Software Foundation
301 # gives unlimited permission to copy and/or distribute it,
302 # with or without modifications, as long as this notice is preserved.
306 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
307 # written in clear, in which case automake, when reading aclocal.m4,
308 # will think it sees a *use*, and therefore will trigger all it's
309 # C support machinery. Also note that it means that autoscan, seeing
310 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
313 # _AM_DEPENDENCIES(NAME)
314 # ----------------------
315 # See how the compiler implements dependency checking.
316 # NAME is "CC", "CXX", "GCJ", or "OBJC".
317 # We try a few techniques and use that to set a single cache variable.
319 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
320 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
321 # dependency, and given that the user is not expected to run this macro,
322 # just rely on AC_PROG_CC.
323 AC_DEFUN([_AM_DEPENDENCIES],
324 [AC_REQUIRE([AM_SET_DEPDIR])dnl
325 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
326 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
327 AC_REQUIRE([AM_DEP_TRACK])dnl
329 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
330 [$1], CXX, [depcc="$CXX" am_compiler_list=],
331 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
332 [$1], UPC, [depcc="$UPC" am_compiler_list=],
333 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
334 [depcc="$$1" am_compiler_list=])
336 AC_CACHE_CHECK([dependency style of $depcc],
337 [am_cv_$1_dependencies_compiler_type],
338 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
339 # We make a subdir and do the tests there. Otherwise we can end up
340 # making bogus files that we don't know about and never remove. For
341 # instance it was reported that on HP-UX the gcc test will end up
342 # making a dummy file named `D' -- because `-MD' means `put the output
345 # Copy depcomp to subdir because otherwise we won't find it if we're
346 # using a relative directory.
347 cp "$am_depcomp" conftest.dir
349 # We will build objects and dependencies in a subdirectory because
350 # it helps to detect inapplicable dependency modes. For instance
351 # both Tru64's cc and ICC support -MD to output dependencies as a
352 # side effect of compilation, but ICC will put the dependencies in
353 # the current directory while Tru64 will put them in the object
357 am_cv_$1_dependencies_compiler_type=none
358 if test "$am_compiler_list" = ""; then
359 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
361 for depmode in $am_compiler_list; do
362 # Setup a source with many dependencies, because some compilers
363 # like to wrap large dependency lists on column 80 (with \), and
364 # we should not choose a depcomp mode which is confused by this.
366 # We need to recreate these files for each test, as the compiler may
367 # overwrite some of them when testing with obscure command lines.
368 # This happens at least with the AIX C compiler.
370 for i in 1 2 3 4 5 6; do
371 echo '#include "conftst'$i'.h"' >> sub/conftest.c
372 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
373 # Solaris 8's {/usr,}/bin/sh.
374 touch sub/conftst$i.h
376 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
380 # after this tag, mechanisms are not by side-effect, so they'll
381 # only be used when explicitly requested
382 if test "x$enable_dependency_tracking" = xyes; then
390 # We check with `-c' and `-o' for the sake of the "dashmstdout"
391 # mode. It turns out that the SunPro C++ compiler does not properly
392 # handle `-M -o', and we need to detect this.
393 if depmode=$depmode \
394 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
395 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
396 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
397 >/dev/null 2>conftest.err &&
398 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
399 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
400 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
401 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
402 # icc doesn't choke on unknown options, it will just issue warnings
403 # or remarks (even with -Werror). So we grep stderr for any message
404 # that says an option was ignored or not supported.
405 # When given -MP, icc 7.0 and 7.1 complain thusly:
406 # icc: Command line warning: ignoring option '-M'; no argument required
407 # The diagnosis changed in icc 8.0:
408 # icc: Command line remark: option '-MP' not supported
409 if (grep 'ignoring option' conftest.err ||
410 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
411 am_cv_$1_dependencies_compiler_type=$depmode
420 am_cv_$1_dependencies_compiler_type=none
423 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
424 AM_CONDITIONAL([am__fastdep$1], [
425 test "x$enable_dependency_tracking" != xno \
426 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
432 # Choose a directory name for dependency files.
433 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
434 AC_DEFUN([AM_SET_DEPDIR],
435 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
436 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
442 AC_DEFUN([AM_DEP_TRACK],
443 [AC_ARG_ENABLE(dependency-tracking,
444 [ --disable-dependency-tracking speeds up one-time build
445 --enable-dependency-tracking do not reject slow dependency extractors])
446 if test "x$enable_dependency_tracking" != xno; then
447 am_depcomp="$ac_aux_dir/depcomp"
450 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
451 AC_SUBST([AMDEPBACKSLASH])dnl
452 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
455 # Generate code to set up dependency tracking. -*- Autoconf -*-
457 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
458 # Free Software Foundation, Inc.
460 # This file is free software; the Free Software Foundation
461 # gives unlimited permission to copy and/or distribute it,
462 # with or without modifications, as long as this notice is preserved.
466 # _AM_OUTPUT_DEPENDENCY_COMMANDS
467 # ------------------------------
468 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
469 [for mf in $CONFIG_FILES; do
470 # Strip MF so we end up with the name of the file.
471 mf=`echo "$mf" | sed -e 's/:.*$//'`
472 # Check whether this is an Automake generated Makefile or not.
473 # We used to match only the files named `Makefile.in', but
474 # some people rename them; so instead we look at the file content.
475 # Grep'ing the first line is not enough: some people post-process
476 # each Makefile.in and add a new line on top of each file to say so.
477 # Grep'ing the whole file is not good either: AIX grep has a line
478 # limit of 2048, but all sed's we know have understand at least 4000.
479 if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
480 dirpart=`AS_DIRNAME("$mf")`
484 # Extract the definition of DEPDIR, am__include, and am__quote
485 # from the Makefile without running `make'.
486 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
487 test -z "$DEPDIR" && continue
488 am__include=`sed -n 's/^am__include = //p' < "$mf"`
489 test -z "am__include" && continue
490 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
491 # When using ansi2knr, U may be empty or an underscore; expand it
492 U=`sed -n 's/^U = //p' < "$mf"`
493 # Find all dependency output files, they are included files with
494 # $(DEPDIR) in their names. We invoke sed twice because it is the
495 # simplest approach to changing $(DEPDIR) to its actual value in the
497 for file in `sed -n "
498 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
499 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
500 # Make sure the directory exists.
501 test -f "$dirpart/$file" && continue
502 fdir=`AS_DIRNAME(["$file"])`
503 AS_MKDIR_P([$dirpart/$fdir])
504 # echo "creating $dirpart/$file"
505 echo '# dummy' > "$dirpart/$file"
508 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
511 # AM_OUTPUT_DEPENDENCY_COMMANDS
512 # -----------------------------
513 # This macro should only be invoked once -- use via AC_REQUIRE.
515 # This code is only required when automatic dependency tracking
516 # is enabled. FIXME. This creates each `.P' file that we will
517 # need in order to bootstrap the dependency handling code.
518 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
519 [AC_CONFIG_COMMANDS([depfiles],
520 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
521 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
524 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
525 # Free Software Foundation, Inc.
527 # This file is free software; the Free Software Foundation
528 # gives unlimited permission to copy and/or distribute it,
529 # with or without modifications, as long as this notice is preserved.
533 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
534 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
536 # Do all the work for Automake. -*- Autoconf -*-
538 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
539 # 2005, 2006 Free Software Foundation, Inc.
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.
547 # This macro actually does too much. Some checks are only needed if
548 # your package does certain things. But this isn't really a big deal.
550 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
551 # AM_INIT_AUTOMAKE([OPTIONS])
552 # -----------------------------------------------
553 # The call with PACKAGE and VERSION arguments is the old style
554 # call (pre autoconf-2.50), which is being phased out. PACKAGE
555 # and VERSION should now be passed to AC_INIT and removed from
556 # the call to AM_INIT_AUTOMAKE.
557 # We support both call styles for the transition. After
558 # the next Automake release, Autoconf can make the AC_INIT
559 # arguments mandatory, and then we can depend on a new Autoconf
560 # release and drop the old call support.
561 AC_DEFUN([AM_INIT_AUTOMAKE],
562 [AC_PREREQ([2.60])dnl
563 dnl Autoconf wants to disallow AM_ names. We explicitly allow
564 dnl the ones we care about.
565 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
566 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
567 AC_REQUIRE([AC_PROG_INSTALL])dnl
568 if test "`cd $srcdir && pwd`" != "`pwd`"; then
569 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
570 # is not polluted with repeated "-I."
571 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
572 # test to see if srcdir already configured
573 if test -f $srcdir/config.status; then
574 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
578 # test whether we have cygpath
579 if test -z "$CYGPATH_W"; then
580 if (cygpath --version) >/dev/null 2>/dev/null; then
581 CYGPATH_W='cygpath -w'
586 AC_SUBST([CYGPATH_W])
588 # Define the identity of the package.
589 dnl Distinguish between old-style and new-style calls.
591 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
592 AC_SUBST([PACKAGE], [$1])dnl
593 AC_SUBST([VERSION], [$2])],
594 [_AM_SET_OPTIONS([$1])dnl
595 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
596 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
597 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
598 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
599 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
601 _AM_IF_OPTION([no-define],,
602 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
603 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
605 # Some tools Automake needs.
606 AC_REQUIRE([AM_SANITY_CHECK])dnl
607 AC_REQUIRE([AC_ARG_PROGRAM])dnl
608 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
609 AM_MISSING_PROG(AUTOCONF, autoconf)
610 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
611 AM_MISSING_PROG(AUTOHEADER, autoheader)
612 AM_MISSING_PROG(MAKEINFO, makeinfo)
614 AM_PROG_INSTALL_STRIP
615 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
616 # We need awk for the "check" target. The system "awk" is bad on
618 AC_REQUIRE([AC_PROG_AWK])dnl
619 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
620 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
621 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
622 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
623 [_AM_PROG_TAR([v7])])])
624 _AM_IF_OPTION([no-dependencies],,
625 [AC_PROVIDE_IFELSE([AC_PROG_CC],
626 [_AM_DEPENDENCIES(CC)],
627 [define([AC_PROG_CC],
628 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
629 AC_PROVIDE_IFELSE([AC_PROG_CXX],
630 [_AM_DEPENDENCIES(CXX)],
631 [define([AC_PROG_CXX],
632 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
633 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
634 [_AM_DEPENDENCIES(OBJC)],
635 [define([AC_PROG_OBJC],
636 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
641 # When config.status generates a header, we must update the stamp-h file.
642 # This file resides in the same directory as the config header
643 # that is generated. The stamp files are numbered to have different names.
645 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
646 # loop where config.status creates the headers, so we can generate
647 # our stamp files there.
648 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
649 [# Compute $1's index in $config_headers.
651 for _am_header in $config_headers :; do
656 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
659 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
661 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
663 # This file is free software; the Free Software Foundation
664 # gives unlimited permission to copy and/or distribute it,
665 # with or without modifications, as long as this notice is preserved.
669 # Define $install_sh.
670 AC_DEFUN([AM_PROG_INSTALL_SH],
671 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
672 install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
673 AC_SUBST(install_sh)])
675 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
677 # This file is free software; the Free Software Foundation
678 # gives unlimited permission to copy and/or distribute it,
679 # with or without modifications, as long as this notice is preserved.
683 # Check whether the underlying file-system supports filenames
684 # with a leading dot. For instance MS-DOS doesn't.
685 AC_DEFUN([AM_SET_LEADING_DOT],
686 [rm -rf .tst 2>/dev/null
687 mkdir .tst 2>/dev/null
688 if test -d .tst; then
693 rmdir .tst 2>/dev/null
694 AC_SUBST([am__leading_dot])])
696 # Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005
697 # Free Software Foundation, Inc.
699 # This file is free software; the Free Software Foundation
700 # gives unlimited permission to copy and/or distribute it,
701 # with or without modifications, as long as this notice is preserved.
707 # Autoconf leaves LEX=: if lex or flex can't be found. Change that to a
708 # "missing" invocation, for better error output.
709 AC_DEFUN([AM_PROG_LEX],
711 AC_REQUIRE([AM_MISSING_HAS_RUN])dnl
712 AC_REQUIRE([AC_PROG_LEX])dnl
713 if test "$LEX" = :; then
714 LEX=${am_missing_run}flex
717 # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
720 # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
721 # Free Software Foundation, Inc.
723 # This file is free software; the Free Software Foundation
724 # gives unlimited permission to copy and/or distribute it,
725 # with or without modifications, as long as this notice is preserved.
729 AC_DEFUN([AM_MAINTAINER_MODE],
730 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
731 dnl maintainer-mode is disabled by default
732 AC_ARG_ENABLE(maintainer-mode,
733 [ --enable-maintainer-mode enable make rules and dependencies not useful
734 (and sometimes confusing) to the casual installer],
735 USE_MAINTAINER_MODE=$enableval,
736 USE_MAINTAINER_MODE=no)
737 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
738 AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
739 MAINT=$MAINTAINER_MODE_TRUE
744 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
746 # Check to see how 'make' treats includes. -*- Autoconf -*-
748 # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
750 # This file is free software; the Free Software Foundation
751 # gives unlimited permission to copy and/or distribute it,
752 # with or without modifications, as long as this notice is preserved.
758 # Check to see how make treats includes.
759 AC_DEFUN([AM_MAKE_INCLUDE],
760 [am_make=${MAKE-make}
761 cat > confinc << 'END'
766 # If we don't find an include directive, just comment out the code.
767 AC_MSG_CHECKING([for style of include used by $am_make])
771 # First try GNU make style include.
772 echo "include confinc" > confmf
773 # We grep out `Entering directory' and `Leaving directory'
774 # messages which can occur if `w' ends up in MAKEFLAGS.
775 # In particular we don't look at `^make:' because GNU make might
776 # be invoked under some other name (usually "gmake"), in which
777 # case it prints its new name instead of `make'.
778 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
783 # Now try BSD make style include.
784 if test "$am__include" = "#"; then
785 echo '.include "confinc"' > confmf
786 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
792 AC_SUBST([am__include])
793 AC_SUBST([am__quote])
794 AC_MSG_RESULT([$_am_result])
798 # Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005
799 # Free Software Foundation, Inc.
801 # This file is free software; the Free Software Foundation
802 # gives unlimited permission to copy and/or distribute it,
803 # with or without modifications, as long as this notice is preserved.
809 # Like AC_PROG_CC_C_O, but changed for automake.
810 AC_DEFUN([AM_PROG_CC_C_O],
811 [AC_REQUIRE([AC_PROG_CC_C_O])dnl
812 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
813 AC_REQUIRE_AUX_FILE([compile])dnl
814 # FIXME: we rely on the cache variable name because
815 # there is no other way.
817 ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
818 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
819 # Losing compiler, so override with the script.
820 # FIXME: It is wrong to rewrite CC.
821 # But if we don't then we get into trouble of one sort or another.
822 # A longer-term fix would be to have automake use am__CC in this case,
823 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
824 CC="$am_aux_dir/compile $CC"
826 dnl Make sure AC_PROG_CC is never called again, or it will override our
828 m4_define([AC_PROG_CC],
829 [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
832 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
834 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
835 # Free Software Foundation, Inc.
837 # This file is free software; the Free Software Foundation
838 # gives unlimited permission to copy and/or distribute it,
839 # with or without modifications, as long as this notice is preserved.
843 # AM_MISSING_PROG(NAME, PROGRAM)
844 # ------------------------------
845 AC_DEFUN([AM_MISSING_PROG],
846 [AC_REQUIRE([AM_MISSING_HAS_RUN])
847 $1=${$1-"${am_missing_run}$2"}
853 # Define MISSING if not defined so far and test if it supports --run.
854 # If it does, set am_missing_run to use it, otherwise, to nothing.
855 AC_DEFUN([AM_MISSING_HAS_RUN],
856 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
857 AC_REQUIRE_AUX_FILE([missing])dnl
858 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
859 # Use eval to expand $SHELL
860 if eval "$MISSING --run true"; then
861 am_missing_run="$MISSING --run "
864 AC_MSG_WARN([`missing' script is too old or missing])
868 # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
870 # This file is free software; the Free Software Foundation
871 # gives unlimited permission to copy and/or distribute it,
872 # with or without modifications, as long as this notice is preserved.
876 # Check for `mkdir -p'.
877 AC_DEFUN([AM_PROG_MKDIR_P],
878 [AC_PREREQ([2.60])dnl
879 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
880 dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
881 dnl while keeping a definition of mkdir_p for backward compatibility.
882 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
883 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
884 dnl Makefile.ins that do not define MKDIR_P, so we do our own
885 dnl adjustment using top_builddir (which is defined more often than
887 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
889 [[\\/$]]* | ?:[[\\/]]*) ;;
890 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
894 # Helper functions for option handling. -*- Autoconf -*-
896 # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
898 # This file is free software; the Free Software Foundation
899 # gives unlimited permission to copy and/or distribute it,
900 # with or without modifications, as long as this notice is preserved.
904 # _AM_MANGLE_OPTION(NAME)
905 # -----------------------
906 AC_DEFUN([_AM_MANGLE_OPTION],
907 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
909 # _AM_SET_OPTION(NAME)
910 # ------------------------------
911 # Set option NAME. Presently that only means defining a flag for this option.
912 AC_DEFUN([_AM_SET_OPTION],
913 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
915 # _AM_SET_OPTIONS(OPTIONS)
916 # ----------------------------------
917 # OPTIONS is a space-separated list of Automake options.
918 AC_DEFUN([_AM_SET_OPTIONS],
919 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
921 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
922 # -------------------------------------------
923 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
924 AC_DEFUN([_AM_IF_OPTION],
925 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
927 # Check to make sure that the build environment is sane. -*- Autoconf -*-
929 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
930 # Free Software Foundation, Inc.
932 # This file is free software; the Free Software Foundation
933 # gives unlimited permission to copy and/or distribute it,
934 # with or without modifications, as long as this notice is preserved.
940 AC_DEFUN([AM_SANITY_CHECK],
941 [AC_MSG_CHECKING([whether build environment is sane])
944 echo timestamp > conftest.file
945 # Do `set' in a subshell so we don't clobber the current shell's
946 # arguments. Must try -L first in case configure is actually a
947 # symlink; some systems play weird games with the mod time of symlinks
948 # (eg FreeBSD returns the mod time of the symlink's containing
951 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
952 if test "$[*]" = "X"; then
954 set X `ls -t $srcdir/configure conftest.file`
957 if test "$[*]" != "X $srcdir/configure conftest.file" \
958 && test "$[*]" != "X conftest.file $srcdir/configure"; then
960 # If neither matched, then we have a broken ls. This can happen
961 # if, for instance, CONFIG_SHELL is bash and it inherits a
962 # broken ls alias from the environment. This has actually
963 # happened. Such a system could not be considered "sane".
964 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
965 alias in your environment])
968 test "$[2]" = conftest.file
974 AC_MSG_ERROR([newly created file is older than distributed files!
975 Check your system clock])
979 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
981 # This file is free software; the Free Software Foundation
982 # gives unlimited permission to copy and/or distribute it,
983 # with or without modifications, as long as this notice is preserved.
985 # AM_PROG_INSTALL_STRIP
986 # ---------------------
987 # One issue with vendor `install' (even GNU) is that you can't
988 # specify the program used to strip binaries. This is especially
989 # annoying in cross-compiling environments, where the build's strip
990 # is unlikely to handle the host's binaries.
991 # Fortunately install-sh will honor a STRIPPROG variable, so we
992 # always use install-sh in `make install-strip', and initialize
993 # STRIPPROG with the value of the STRIP variable (set by the user).
994 AC_DEFUN([AM_PROG_INSTALL_STRIP],
995 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
996 # Installed binaries are usually stripped using `strip' when the user
997 # run `make install-strip'. However `strip' might not be the right
998 # tool to use in cross-compilation environments, therefore Automake
999 # will honor the `STRIP' environment variable to overrule this program.
1000 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1001 if test "$cross_compiling" != no; then
1002 AC_CHECK_TOOL([STRIP], [strip], :)
1004 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1005 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1007 # Copyright (C) 2006 Free Software Foundation, Inc.
1009 # This file is free software; the Free Software Foundation
1010 # gives unlimited permission to copy and/or distribute it,
1011 # with or without modifications, as long as this notice is preserved.
1013 # _AM_SUBST_NOTMAKE(VARIABLE)
1014 # ---------------------------
1015 # Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in.
1016 # This macro is traced by Automake.
1017 AC_DEFUN([_AM_SUBST_NOTMAKE])
1019 # Check how to create a tarball. -*- Autoconf -*-
1021 # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
1023 # This file is free software; the Free Software Foundation
1024 # gives unlimited permission to copy and/or distribute it,
1025 # with or without modifications, as long as this notice is preserved.
1029 # _AM_PROG_TAR(FORMAT)
1030 # --------------------
1031 # Check how to create a tarball in format FORMAT.
1032 # FORMAT should be one of `v7', `ustar', or `pax'.
1034 # Substitute a variable $(am__tar) that is a command
1035 # writing to stdout a FORMAT-tarball containing the directory
1037 # tardir=directory && $(am__tar) > result.tar
1039 # Substitute a variable $(am__untar) that extract such
1040 # a tarball read from stdin.
1041 # $(am__untar) < result.tar
1042 AC_DEFUN([_AM_PROG_TAR],
1043 [# Always define AMTAR for backward compatibility.
1044 AM_MISSING_PROG([AMTAR], [tar])
1046 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
1047 [m4_case([$1], [ustar],, [pax],,
1048 [m4_fatal([Unknown tar format])])
1049 AC_MSG_CHECKING([how to create a $1 tar archive])
1050 # Loop over all known methods to create a tar archive until one works.
1051 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1052 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1053 # Do not fold the above two line into one, because Tru64 sh and
1054 # Solaris sh will not grok spaces in the rhs of `-'.
1055 for _am_tool in $_am_tools
1059 for _am_tar in tar gnutar gtar;
1061 AM_RUN_LOG([$_am_tar --version]) && break
1063 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1064 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1065 am__untar="$_am_tar -xf -"
1068 # Must skip GNU tar: if it does not support --format= it doesn't create
1069 # ustar tarball either.
1070 (tar --version) >/dev/null 2>&1 && continue
1071 am__tar='tar chf - "$$tardir"'
1072 am__tar_='tar chf - "$tardir"'
1073 am__untar='tar xf -'
1076 am__tar='pax -L -x $1 -w "$$tardir"'
1077 am__tar_='pax -L -x $1 -w "$tardir"'
1081 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1082 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1083 am__untar='cpio -i -H $1 -d'
1092 # If the value was cached, stop now. We just wanted to have am__tar
1093 # and am__untar set.
1094 test -n "${am_cv_prog_tar_$1}" && break
1096 # tar/untar a dummy directory, and stop if the command works
1099 echo GrepMe > conftest.dir/file
1100 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1102 if test -s conftest.tar; then
1103 AM_RUN_LOG([$am__untar <conftest.tar])
1104 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1109 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1110 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1112 AC_SUBST([am__untar])
1115 m4_include([acinclude.m4])