1 # generated automatically by aclocal 1.9.6 -*- Autoconf -*-
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005 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 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
16 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
18 # This program is free software; you can redistribute it and/or modify
19 # it under the terms of the GNU General Public License as published by
20 # the Free Software Foundation; either version 2 of the License, or
21 # (at your option) any later version.
23 # This program is distributed in the hope that it will be useful, but
24 # WITHOUT ANY WARRANTY; without even the implied warranty of
25 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
26 # General Public License for more details.
28 # You should have received a copy of the GNU General Public License
29 # along with this program; if not, write to the Free Software
30 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
32 # As a special exception to the GNU General Public License, if you
33 # distribute this file as part of a program that contains a
34 # configuration script generated by Autoconf, you may include it under
35 # the same distribution terms that you use for the rest of that program.
37 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
38 # ----------------------------------
39 AC_DEFUN([PKG_PROG_PKG_CONFIG],
40 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
41 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
42 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
43 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
44 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
46 if test -n "$PKG_CONFIG"; then
47 _pkg_min_version=m4_default([$1], [0.9.0])
48 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
49 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
57 ])# PKG_PROG_PKG_CONFIG
59 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
61 # Check to see whether a particular set of modules exists. Similar
62 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
65 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
66 # this or PKG_CHECK_MODULES is called, or make sure to call
67 # PKG_CHECK_EXISTS manually
68 # --------------------------------------------------------------
69 AC_DEFUN([PKG_CHECK_EXISTS],
70 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
71 if test -n "$PKG_CONFIG" && \
72 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
73 m4_ifval([$2], [$2], [:])
79 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
80 # ---------------------------------------------
81 m4_define([_PKG_CONFIG],
82 [if test -n "$PKG_CONFIG"; then
83 if test -n "$$1"; then
86 PKG_CHECK_EXISTS([$3],
87 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
95 # _PKG_SHORT_ERRORS_SUPPORTED
96 # -----------------------------
97 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
98 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
99 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
100 _pkg_short_errors_supported=yes
102 _pkg_short_errors_supported=no
104 ])# _PKG_SHORT_ERRORS_SUPPORTED
107 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
108 # [ACTION-IF-NOT-FOUND])
111 # Note that if there is a possibility the first call to
112 # PKG_CHECK_MODULES might not happen, you should be sure to include an
113 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
116 # --------------------------------------------------------------
117 AC_DEFUN([PKG_CHECK_MODULES],
118 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
119 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
120 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
123 AC_MSG_CHECKING([for $1])
125 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
126 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
128 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
129 and $1[]_LIBS to avoid the need to call pkg-config.
130 See the pkg-config man page for more details.])
132 if test $pkg_failed = yes; then
133 _PKG_SHORT_ERRORS_SUPPORTED
134 if test $_pkg_short_errors_supported = yes; then
135 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
137 $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
139 # Put the nasty error message in config.log where it belongs
140 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
142 ifelse([$4], , [AC_MSG_ERROR(dnl
143 [Package requirements ($2) were not met:
147 Consider adjusting the PKG_CONFIG_PATH environment variable if you
148 installed software in a non-standard prefix.
154 elif test $pkg_failed = untried; then
155 ifelse([$4], , [AC_MSG_FAILURE(dnl
156 [The pkg-config script could not be found or is too old. Make sure it
157 is in your PATH or set the PKG_CONFIG environment variable to the full
162 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
165 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
166 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
168 ifelse([$3], , :, [$3])
170 ])# PKG_CHECK_MODULES
172 # Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
174 # This file is free software; the Free Software Foundation
175 # gives unlimited permission to copy and/or distribute it,
176 # with or without modifications, as long as this notice is preserved.
178 # AM_AUTOMAKE_VERSION(VERSION)
179 # ----------------------------
180 # Automake X.Y traces this macro to ensure aclocal.m4 has been
181 # generated from the m4 files accompanying Automake X.Y.
182 AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
184 # AM_SET_CURRENT_AUTOMAKE_VERSION
185 # -------------------------------
186 # Call AM_AUTOMAKE_VERSION so it can be traced.
187 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
188 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
189 [AM_AUTOMAKE_VERSION([1.9.6])])
191 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
193 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
195 # This file is free software; the Free Software Foundation
196 # gives unlimited permission to copy and/or distribute it,
197 # with or without modifications, as long as this notice is preserved.
199 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
200 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
201 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
203 # Of course, Automake must honor this variable whenever it calls a
204 # tool from the auxiliary directory. The problem is that $srcdir (and
205 # therefore $ac_aux_dir as well) can be either absolute or relative,
206 # depending on how configure is run. This is pretty annoying, since
207 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
208 # source directory, any form will work fine, but in subdirectories a
209 # relative path needs to be adjusted first.
211 # $ac_aux_dir/missing
212 # fails when called from a subdirectory if $ac_aux_dir is relative
213 # $top_srcdir/$ac_aux_dir/missing
214 # fails if $ac_aux_dir is absolute,
215 # fails when called from a subdirectory in a VPATH build with
216 # a relative $ac_aux_dir
218 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
219 # are both prefixed by $srcdir. In an in-source build this is usually
220 # harmless because $srcdir is `.', but things will broke when you
221 # start a VPATH build or use an absolute $srcdir.
223 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
224 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
225 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
226 # and then we would define $MISSING as
227 # MISSING="\${SHELL} $am_aux_dir/missing"
228 # This will work as long as MISSING is not called from configure, because
229 # unfortunately $(top_srcdir) has no meaning in configure.
230 # However there are other variables, like CC, which are often used in
231 # configure, and could therefore not use this "fixed" $ac_aux_dir.
233 # Another solution, used here, is to always expand $ac_aux_dir to an
234 # absolute PATH. The drawback is that using absolute paths prevent a
235 # configured tree to be moved without reconfiguration.
237 AC_DEFUN([AM_AUX_DIR_EXPAND],
238 [dnl Rely on autoconf to set up CDPATH properly.
240 # expand $ac_aux_dir to an absolute path
241 am_aux_dir=`cd $ac_aux_dir && pwd`
244 # AM_CONDITIONAL -*- Autoconf -*-
246 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
247 # Free Software Foundation, Inc.
249 # This file is free software; the Free Software Foundation
250 # gives unlimited permission to copy and/or distribute it,
251 # with or without modifications, as long as this notice is preserved.
255 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
256 # -------------------------------------
257 # Define a conditional.
258 AC_DEFUN([AM_CONDITIONAL],
260 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
261 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
271 AC_CONFIG_COMMANDS_PRE(
272 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
273 AC_MSG_ERROR([[conditional "$1" was never defined.
274 Usually this means the macro was only invoked conditionally.]])
278 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
279 # Free Software Foundation, Inc.
281 # This file is free software; the Free Software Foundation
282 # gives unlimited permission to copy and/or distribute it,
283 # with or without modifications, as long as this notice is preserved.
287 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
288 # written in clear, in which case automake, when reading aclocal.m4,
289 # will think it sees a *use*, and therefore will trigger all it's
290 # C support machinery. Also note that it means that autoscan, seeing
291 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
294 # _AM_DEPENDENCIES(NAME)
295 # ----------------------
296 # See how the compiler implements dependency checking.
297 # NAME is "CC", "CXX", "GCJ", or "OBJC".
298 # We try a few techniques and use that to set a single cache variable.
300 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
301 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
302 # dependency, and given that the user is not expected to run this macro,
303 # just rely on AC_PROG_CC.
304 AC_DEFUN([_AM_DEPENDENCIES],
305 [AC_REQUIRE([AM_SET_DEPDIR])dnl
306 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
307 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
308 AC_REQUIRE([AM_DEP_TRACK])dnl
310 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
311 [$1], CXX, [depcc="$CXX" am_compiler_list=],
312 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
313 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
314 [depcc="$$1" am_compiler_list=])
316 AC_CACHE_CHECK([dependency style of $depcc],
317 [am_cv_$1_dependencies_compiler_type],
318 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
319 # We make a subdir and do the tests there. Otherwise we can end up
320 # making bogus files that we don't know about and never remove. For
321 # instance it was reported that on HP-UX the gcc test will end up
322 # making a dummy file named `D' -- because `-MD' means `put the output
325 # Copy depcomp to subdir because otherwise we won't find it if we're
326 # using a relative directory.
327 cp "$am_depcomp" conftest.dir
329 # We will build objects and dependencies in a subdirectory because
330 # it helps to detect inapplicable dependency modes. For instance
331 # both Tru64's cc and ICC support -MD to output dependencies as a
332 # side effect of compilation, but ICC will put the dependencies in
333 # the current directory while Tru64 will put them in the object
337 am_cv_$1_dependencies_compiler_type=none
338 if test "$am_compiler_list" = ""; then
339 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
341 for depmode in $am_compiler_list; do
342 # Setup a source with many dependencies, because some compilers
343 # like to wrap large dependency lists on column 80 (with \), and
344 # we should not choose a depcomp mode which is confused by this.
346 # We need to recreate these files for each test, as the compiler may
347 # overwrite some of them when testing with obscure command lines.
348 # This happens at least with the AIX C compiler.
350 for i in 1 2 3 4 5 6; do
351 echo '#include "conftst'$i'.h"' >> sub/conftest.c
352 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
353 # Solaris 8's {/usr,}/bin/sh.
354 touch sub/conftst$i.h
356 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
360 # after this tag, mechanisms are not by side-effect, so they'll
361 # only be used when explicitly requested
362 if test "x$enable_dependency_tracking" = xyes; then
370 # We check with `-c' and `-o' for the sake of the "dashmstdout"
371 # mode. It turns out that the SunPro C++ compiler does not properly
372 # handle `-M -o', and we need to detect this.
373 if depmode=$depmode \
374 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
375 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
376 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
377 >/dev/null 2>conftest.err &&
378 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
379 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
380 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
381 # icc doesn't choke on unknown options, it will just issue warnings
382 # or remarks (even with -Werror). So we grep stderr for any message
383 # that says an option was ignored or not supported.
384 # When given -MP, icc 7.0 and 7.1 complain thusly:
385 # icc: Command line warning: ignoring option '-M'; no argument required
386 # The diagnosis changed in icc 8.0:
387 # icc: Command line remark: option '-MP' not supported
388 if (grep 'ignoring option' conftest.err ||
389 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
390 am_cv_$1_dependencies_compiler_type=$depmode
399 am_cv_$1_dependencies_compiler_type=none
402 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
403 AM_CONDITIONAL([am__fastdep$1], [
404 test "x$enable_dependency_tracking" != xno \
405 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
411 # Choose a directory name for dependency files.
412 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
413 AC_DEFUN([AM_SET_DEPDIR],
414 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
415 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
421 AC_DEFUN([AM_DEP_TRACK],
422 [AC_ARG_ENABLE(dependency-tracking,
423 [ --disable-dependency-tracking speeds up one-time build
424 --enable-dependency-tracking do not reject slow dependency extractors])
425 if test "x$enable_dependency_tracking" != xno; then
426 am_depcomp="$ac_aux_dir/depcomp"
429 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
430 AC_SUBST([AMDEPBACKSLASH])
433 # Generate code to set up dependency tracking. -*- Autoconf -*-
435 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
436 # Free Software Foundation, Inc.
438 # This file is free software; the Free Software Foundation
439 # gives unlimited permission to copy and/or distribute it,
440 # with or without modifications, as long as this notice is preserved.
444 # _AM_OUTPUT_DEPENDENCY_COMMANDS
445 # ------------------------------
446 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
447 [for mf in $CONFIG_FILES; do
448 # Strip MF so we end up with the name of the file.
449 mf=`echo "$mf" | sed -e 's/:.*$//'`
450 # Check whether this is an Automake generated Makefile or not.
451 # We used to match only the files named `Makefile.in', but
452 # some people rename them; so instead we look at the file content.
453 # Grep'ing the first line is not enough: some people post-process
454 # each Makefile.in and add a new line on top of each file to say so.
455 # So let's grep whole file.
456 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
457 dirpart=`AS_DIRNAME("$mf")`
461 # Extract the definition of DEPDIR, am__include, and am__quote
462 # from the Makefile without running `make'.
463 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
464 test -z "$DEPDIR" && continue
465 am__include=`sed -n 's/^am__include = //p' < "$mf"`
466 test -z "am__include" && continue
467 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
468 # When using ansi2knr, U may be empty or an underscore; expand it
469 U=`sed -n 's/^U = //p' < "$mf"`
470 # Find all dependency output files, they are included files with
471 # $(DEPDIR) in their names. We invoke sed twice because it is the
472 # simplest approach to changing $(DEPDIR) to its actual value in the
474 for file in `sed -n "
475 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
476 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
477 # Make sure the directory exists.
478 test -f "$dirpart/$file" && continue
479 fdir=`AS_DIRNAME(["$file"])`
480 AS_MKDIR_P([$dirpart/$fdir])
481 # echo "creating $dirpart/$file"
482 echo '# dummy' > "$dirpart/$file"
485 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
488 # AM_OUTPUT_DEPENDENCY_COMMANDS
489 # -----------------------------
490 # This macro should only be invoked once -- use via AC_REQUIRE.
492 # This code is only required when automatic dependency tracking
493 # is enabled. FIXME. This creates each `.P' file that we will
494 # need in order to bootstrap the dependency handling code.
495 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
496 [AC_CONFIG_COMMANDS([depfiles],
497 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
498 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
501 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
502 # Free Software Foundation, Inc.
504 # This file is free software; the Free Software Foundation
505 # gives unlimited permission to copy and/or distribute it,
506 # with or without modifications, as long as this notice is preserved.
510 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
511 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
513 # Do all the work for Automake. -*- Autoconf -*-
515 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
516 # Free Software Foundation, Inc.
518 # This file is free software; the Free Software Foundation
519 # gives unlimited permission to copy and/or distribute it,
520 # with or without modifications, as long as this notice is preserved.
524 # This macro actually does too much. Some checks are only needed if
525 # your package does certain things. But this isn't really a big deal.
527 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
528 # AM_INIT_AUTOMAKE([OPTIONS])
529 # -----------------------------------------------
530 # The call with PACKAGE and VERSION arguments is the old style
531 # call (pre autoconf-2.50), which is being phased out. PACKAGE
532 # and VERSION should now be passed to AC_INIT and removed from
533 # the call to AM_INIT_AUTOMAKE.
534 # We support both call styles for the transition. After
535 # the next Automake release, Autoconf can make the AC_INIT
536 # arguments mandatory, and then we can depend on a new Autoconf
537 # release and drop the old call support.
538 AC_DEFUN([AM_INIT_AUTOMAKE],
539 [AC_PREREQ([2.58])dnl
540 dnl Autoconf wants to disallow AM_ names. We explicitly allow
541 dnl the ones we care about.
542 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
543 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
544 AC_REQUIRE([AC_PROG_INSTALL])dnl
545 # test to see if srcdir already configured
546 if test "`cd $srcdir && pwd`" != "`pwd`" &&
547 test -f $srcdir/config.status; then
548 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
551 # test whether we have cygpath
552 if test -z "$CYGPATH_W"; then
553 if (cygpath --version) >/dev/null 2>/dev/null; then
554 CYGPATH_W='cygpath -w'
559 AC_SUBST([CYGPATH_W])
561 # Define the identity of the package.
562 dnl Distinguish between old-style and new-style calls.
564 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
565 AC_SUBST([PACKAGE], [$1])dnl
566 AC_SUBST([VERSION], [$2])],
567 [_AM_SET_OPTIONS([$1])dnl
568 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
569 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
571 _AM_IF_OPTION([no-define],,
572 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
573 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
575 # Some tools Automake needs.
576 AC_REQUIRE([AM_SANITY_CHECK])dnl
577 AC_REQUIRE([AC_ARG_PROGRAM])dnl
578 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
579 AM_MISSING_PROG(AUTOCONF, autoconf)
580 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
581 AM_MISSING_PROG(AUTOHEADER, autoheader)
582 AM_MISSING_PROG(MAKEINFO, makeinfo)
584 AM_PROG_INSTALL_STRIP
585 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
586 # We need awk for the "check" target. The system "awk" is bad on
588 AC_REQUIRE([AC_PROG_AWK])dnl
589 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
590 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
591 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
592 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
593 [_AM_PROG_TAR([v7])])])
594 _AM_IF_OPTION([no-dependencies],,
595 [AC_PROVIDE_IFELSE([AC_PROG_CC],
596 [_AM_DEPENDENCIES(CC)],
597 [define([AC_PROG_CC],
598 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
599 AC_PROVIDE_IFELSE([AC_PROG_CXX],
600 [_AM_DEPENDENCIES(CXX)],
601 [define([AC_PROG_CXX],
602 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
607 # When config.status generates a header, we must update the stamp-h file.
608 # This file resides in the same directory as the config header
609 # that is generated. The stamp files are numbered to have different names.
611 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
612 # loop where config.status creates the headers, so we can generate
613 # our stamp files there.
614 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
615 [# Compute $1's index in $config_headers.
617 for _am_header in $config_headers :; do
622 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
625 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
627 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
629 # This file is free software; the Free Software Foundation
630 # gives unlimited permission to copy and/or distribute it,
631 # with or without modifications, as long as this notice is preserved.
635 # Define $install_sh.
636 AC_DEFUN([AM_PROG_INSTALL_SH],
637 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
638 install_sh=${install_sh-"$am_aux_dir/install-sh"}
639 AC_SUBST(install_sh)])
641 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
643 # This file is free software; the Free Software Foundation
644 # gives unlimited permission to copy and/or distribute it,
645 # with or without modifications, as long as this notice is preserved.
649 # Check whether the underlying file-system supports filenames
650 # with a leading dot. For instance MS-DOS doesn't.
651 AC_DEFUN([AM_SET_LEADING_DOT],
652 [rm -rf .tst 2>/dev/null
653 mkdir .tst 2>/dev/null
654 if test -d .tst; then
659 rmdir .tst 2>/dev/null
660 AC_SUBST([am__leading_dot])])
662 # Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005
663 # Free Software Foundation, Inc.
665 # This file is free software; the Free Software Foundation
666 # gives unlimited permission to copy and/or distribute it,
667 # with or without modifications, as long as this notice is preserved.
673 # Autoconf leaves LEX=: if lex or flex can't be found. Change that to a
674 # "missing" invocation, for better error output.
675 AC_DEFUN([AM_PROG_LEX],
677 AC_REQUIRE([AM_MISSING_HAS_RUN])dnl
678 AC_REQUIRE([AC_PROG_LEX])dnl
679 if test "$LEX" = :; then
680 LEX=${am_missing_run}flex
683 # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
686 # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
687 # Free Software Foundation, Inc.
689 # This file is free software; the Free Software Foundation
690 # gives unlimited permission to copy and/or distribute it,
691 # with or without modifications, as long as this notice is preserved.
695 AC_DEFUN([AM_MAINTAINER_MODE],
696 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
697 dnl maintainer-mode is disabled by default
698 AC_ARG_ENABLE(maintainer-mode,
699 [ --enable-maintainer-mode enable make rules and dependencies not useful
700 (and sometimes confusing) to the casual installer],
701 USE_MAINTAINER_MODE=$enableval,
702 USE_MAINTAINER_MODE=no)
703 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
704 AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
705 MAINT=$MAINTAINER_MODE_TRUE
710 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
712 # Check to see how 'make' treats includes. -*- Autoconf -*-
714 # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
716 # This file is free software; the Free Software Foundation
717 # gives unlimited permission to copy and/or distribute it,
718 # with or without modifications, as long as this notice is preserved.
724 # Check to see how make treats includes.
725 AC_DEFUN([AM_MAKE_INCLUDE],
726 [am_make=${MAKE-make}
727 cat > confinc << 'END'
732 # If we don't find an include directive, just comment out the code.
733 AC_MSG_CHECKING([for style of include used by $am_make])
737 # First try GNU make style include.
738 echo "include confinc" > confmf
739 # We grep out `Entering directory' and `Leaving directory'
740 # messages which can occur if `w' ends up in MAKEFLAGS.
741 # In particular we don't look at `^make:' because GNU make might
742 # be invoked under some other name (usually "gmake"), in which
743 # case it prints its new name instead of `make'.
744 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
749 # Now try BSD make style include.
750 if test "$am__include" = "#"; then
751 echo '.include "confinc"' > confmf
752 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
758 AC_SUBST([am__include])
759 AC_SUBST([am__quote])
760 AC_MSG_RESULT([$_am_result])
764 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
766 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
767 # Free Software Foundation, Inc.
769 # This file is free software; the Free Software Foundation
770 # gives unlimited permission to copy and/or distribute it,
771 # with or without modifications, as long as this notice is preserved.
775 # AM_MISSING_PROG(NAME, PROGRAM)
776 # ------------------------------
777 AC_DEFUN([AM_MISSING_PROG],
778 [AC_REQUIRE([AM_MISSING_HAS_RUN])
779 $1=${$1-"${am_missing_run}$2"}
785 # Define MISSING if not defined so far and test if it supports --run.
786 # If it does, set am_missing_run to use it, otherwise, to nothing.
787 AC_DEFUN([AM_MISSING_HAS_RUN],
788 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
789 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
790 # Use eval to expand $SHELL
791 if eval "$MISSING --run true"; then
792 am_missing_run="$MISSING --run "
795 AC_MSG_WARN([`missing' script is too old or missing])
799 # Copyright (C) 2003, 2004, 2005 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.
807 # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
809 # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
810 # created by `make install' are always world readable, even if the
811 # installer happens to have an overly restrictive umask (e.g. 077).
812 # This was a mistake. There are at least two reasons why we must not
814 # - it causes special bits like SGID to be ignored,
815 # - it may be too restrictive (some setups expect 775 directories).
817 # Do not use -m 0755 and let people choose whatever they expect by
820 # We cannot accept any implementation of `mkdir' that recognizes `-p'.
821 # Some implementations (such as Solaris 8's) are not thread-safe: if a
822 # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
823 # concurrently, both version can detect that a/ is missing, but only
824 # one can create it and the other will error out. Consequently we
825 # restrict ourselves to GNU make (using the --version option ensures
827 AC_DEFUN([AM_PROG_MKDIR_P],
828 [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
829 # We used to keeping the `.' as first argument, in order to
830 # allow $(mkdir_p) to be used without argument. As in
831 # $(mkdir_p) $(somedir)
832 # where $(somedir) is conditionally defined. However this is wrong
834 # 1. if the package is installed by a user who cannot write `.'
835 # make install will fail,
836 # 2. the above comment should most certainly read
837 # $(mkdir_p) $(DESTDIR)$(somedir)
838 # so it does not work when $(somedir) is undefined and
840 # To support the latter case, we have to write
841 # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
842 # so the `.' trick is pointless.
843 mkdir_p='mkdir -p --'
845 # On NextStep and OpenStep, the `mkdir' command does not
846 # recognize any option. It will interpret all options as
847 # directories to create, and then abort because `.' already
849 for d in ./-p ./--version;
851 test -d $d && rmdir $d
853 # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
854 if test -f "$ac_aux_dir/mkinstalldirs"; then
855 mkdir_p='$(mkinstalldirs)'
857 mkdir_p='$(install_sh) -d'
860 AC_SUBST([mkdir_p])])
862 # Helper functions for option handling. -*- Autoconf -*-
864 # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
866 # This file is free software; the Free Software Foundation
867 # gives unlimited permission to copy and/or distribute it,
868 # with or without modifications, as long as this notice is preserved.
872 # _AM_MANGLE_OPTION(NAME)
873 # -----------------------
874 AC_DEFUN([_AM_MANGLE_OPTION],
875 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
877 # _AM_SET_OPTION(NAME)
878 # ------------------------------
879 # Set option NAME. Presently that only means defining a flag for this option.
880 AC_DEFUN([_AM_SET_OPTION],
881 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
883 # _AM_SET_OPTIONS(OPTIONS)
884 # ----------------------------------
885 # OPTIONS is a space-separated list of Automake options.
886 AC_DEFUN([_AM_SET_OPTIONS],
887 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
889 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
890 # -------------------------------------------
891 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
892 AC_DEFUN([_AM_IF_OPTION],
893 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
895 # Check to make sure that the build environment is sane. -*- Autoconf -*-
897 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
898 # Free Software Foundation, Inc.
900 # This file is free software; the Free Software Foundation
901 # gives unlimited permission to copy and/or distribute it,
902 # with or without modifications, as long as this notice is preserved.
908 AC_DEFUN([AM_SANITY_CHECK],
909 [AC_MSG_CHECKING([whether build environment is sane])
912 echo timestamp > conftest.file
913 # Do `set' in a subshell so we don't clobber the current shell's
914 # arguments. Must try -L first in case configure is actually a
915 # symlink; some systems play weird games with the mod time of symlinks
916 # (eg FreeBSD returns the mod time of the symlink's containing
919 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
920 if test "$[*]" = "X"; then
922 set X `ls -t $srcdir/configure conftest.file`
925 if test "$[*]" != "X $srcdir/configure conftest.file" \
926 && test "$[*]" != "X conftest.file $srcdir/configure"; then
928 # If neither matched, then we have a broken ls. This can happen
929 # if, for instance, CONFIG_SHELL is bash and it inherits a
930 # broken ls alias from the environment. This has actually
931 # happened. Such a system could not be considered "sane".
932 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
933 alias in your environment])
936 test "$[2]" = conftest.file
942 AC_MSG_ERROR([newly created file is older than distributed files!
943 Check your system clock])
947 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
949 # This file is free software; the Free Software Foundation
950 # gives unlimited permission to copy and/or distribute it,
951 # with or without modifications, as long as this notice is preserved.
953 # AM_PROG_INSTALL_STRIP
954 # ---------------------
955 # One issue with vendor `install' (even GNU) is that you can't
956 # specify the program used to strip binaries. This is especially
957 # annoying in cross-compiling environments, where the build's strip
958 # is unlikely to handle the host's binaries.
959 # Fortunately install-sh will honor a STRIPPROG variable, so we
960 # always use install-sh in `make install-strip', and initialize
961 # STRIPPROG with the value of the STRIP variable (set by the user).
962 AC_DEFUN([AM_PROG_INSTALL_STRIP],
963 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
964 # Installed binaries are usually stripped using `strip' when the user
965 # run `make install-strip'. However `strip' might not be the right
966 # tool to use in cross-compilation environments, therefore Automake
967 # will honor the `STRIP' environment variable to overrule this program.
968 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
969 if test "$cross_compiling" != no; then
970 AC_CHECK_TOOL([STRIP], [strip], :)
972 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
973 AC_SUBST([INSTALL_STRIP_PROGRAM])])
975 # Check how to create a tarball. -*- Autoconf -*-
977 # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
979 # This file is free software; the Free Software Foundation
980 # gives unlimited permission to copy and/or distribute it,
981 # with or without modifications, as long as this notice is preserved.
985 # _AM_PROG_TAR(FORMAT)
986 # --------------------
987 # Check how to create a tarball in format FORMAT.
988 # FORMAT should be one of `v7', `ustar', or `pax'.
990 # Substitute a variable $(am__tar) that is a command
991 # writing to stdout a FORMAT-tarball containing the directory
993 # tardir=directory && $(am__tar) > result.tar
995 # Substitute a variable $(am__untar) that extract such
996 # a tarball read from stdin.
997 # $(am__untar) < result.tar
998 AC_DEFUN([_AM_PROG_TAR],
999 [# Always define AMTAR for backward compatibility.
1000 AM_MISSING_PROG([AMTAR], [tar])
1002 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
1003 [m4_case([$1], [ustar],, [pax],,
1004 [m4_fatal([Unknown tar format])])
1005 AC_MSG_CHECKING([how to create a $1 tar archive])
1006 # Loop over all known methods to create a tar archive until one works.
1007 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1008 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1009 # Do not fold the above two line into one, because Tru64 sh and
1010 # Solaris sh will not grok spaces in the rhs of `-'.
1011 for _am_tool in $_am_tools
1015 for _am_tar in tar gnutar gtar;
1017 AM_RUN_LOG([$_am_tar --version]) && break
1019 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1020 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1021 am__untar="$_am_tar -xf -"
1024 # Must skip GNU tar: if it does not support --format= it doesn't create
1025 # ustar tarball either.
1026 (tar --version) >/dev/null 2>&1 && continue
1027 am__tar='tar chf - "$$tardir"'
1028 am__tar_='tar chf - "$tardir"'
1029 am__untar='tar xf -'
1032 am__tar='pax -L -x $1 -w "$$tardir"'
1033 am__tar_='pax -L -x $1 -w "$tardir"'
1037 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1038 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1039 am__untar='cpio -i -H $1 -d'
1048 # If the value was cached, stop now. We just wanted to have am__tar
1049 # and am__untar set.
1050 test -n "${am_cv_prog_tar_$1}" && break
1052 # tar/untar a dummy directory, and stop if the command works
1055 echo GrepMe > conftest.dir/file
1056 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1058 if test -s conftest.tar; then
1059 AM_RUN_LOG([$am__untar <conftest.tar])
1060 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1065 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1066 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1068 AC_SUBST([am__untar])