1 # generated automatically by aclocal 1.7.9 -*- Autoconf -*-
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
4 # 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
15 # Copyright (c) 1998 Etienne Bernard
16 # Copyright (c) 2002 Clinton Ebadi
19 # Check if we have a decent C++ compiler
20 # that supports Standard Template Library (STL)
23 AC_MSG_CHECKING([for STL support])
25 AC_CACHE_VAL(ac_cv_cpp_stl,
28 cat > conftest.$ac_ext <<EOF
37 if AC_TRY_EVAL(ac_link) && test -s conftest; then
38 ac_cv_cpp_stl="have_stl=yes"
40 ac_cv_cpp_stl="have_stl=no"
46 AC_MSG_RESULT([$have_stl])
48 if test "$have_stl" != "yes"; then
49 AC_MSG_ERROR([Sorry, you need STL support with your compiler])
54 # Check is compiler has ios_base
55 AC_DEFUN(AC_CPP_STL_IOSBASE,
57 AC_MSG_CHECKING([for std::ios_base in iostreams])
59 AC_CACHE_VAL(ac_cv_cpp_iosbase,
62 cat > conftest.$ac_ext <<EOF
66 std::ifstream file ("README", std::ios_base::in);
71 if AC_TRY_EVAL(ac_link) && test -s conftest; then
72 ac_cv_cpp_iosbase="have_iosbase=yes"
74 ac_cv_cpp_iosbase="have_iosbase=no"
78 eval "$ac_cv_cpp_iosbase"
80 AC_MSG_RESULT([$have_iosbase])
82 if test "$have_iosbase" = "yes"; then
83 HAVE_IOSBASE="-DHAVE_IOSBASE"
84 AC_DEFINE(HAVE_IOSBASE,1, [std::ios_base])
86 AC_DEFINE(HAVE_IOSBASE,0)
90 # Check if STL elements support the clear() method
91 AC_DEFUN(AC_CPP_STL_CLEAR,
93 AC_MSG_CHECKING([for clear() method in STL objects])
95 AC_CACHE_VAL(ac_cv_cpp_stl_clear,
98 cat > conftest.$ac_ext <<EOF
101 std::map<int, int, std::less<int> > m;
107 if AC_TRY_EVAL(ac_link) && test -s conftest; then
108 ac_cv_cpp_stl_clear="have_stl_clear=yes"
110 ac_cv_cpp_stl_clear="have_stl_clear=no"
114 eval "$ac_cv_cpp_stl_clear"
116 AC_MSG_RESULT([$have_stl_clear])
118 if test "$have_stl_clear" = "yes"; then
119 HAVE_STL_CLEAR="-DHAVE_STL_CLEAR"
120 AC_DEFINE(HAVE_STL_CLEAR,1, [STL Objects have a clear method])
127 # GUILE_PROGS -- set paths to Guile interpreter, config and tool programs
131 # This macro looks for programs @code{guile}, @code{guile-config} and
132 # @code{guile-tools}, and sets variables @var{GUILE}, @var{GUILE_CONFIG} and
133 # @var{GUILE_TOOLS}, to their paths, respectively. If either of the first two
134 # is not found, signal error.
136 # The variables are marked for substitution, as by @code{AC_SUBST}.
138 AC_DEFUN([GUILE_PROGS],
139 [AC_PATH_PROG(GUILE,guile)
140 if test "$GUILE" = "" ; then
141 AC_MSG_ERROR([guile required but not found])
144 AC_PATH_PROG(GUILE_CONFIG,guile-config)
145 if test "$GUILE_CONFIG" = "" ; then
146 AC_MSG_ERROR([guile-config required but not found])
148 AC_SUBST(GUILE_CONFIG)
149 AC_PATH_PROG(GUILE_TOOLS,guile-tools)
150 AC_SUBST(GUILE_TOOLS)
153 # GUILE_FLAGS -- set flags for compiling and linking with Guile
157 # This macro runs the @code{guile-config} script, installed with Guile, to
158 # find out where Guile's header files and libraries are installed. It sets
159 # two variables, @var{GUILE_CFLAGS} and @var{GUILE_LDFLAGS}.
161 # @var{GUILE_CFLAGS}: flags to pass to a C or C++ compiler to build code that
162 # uses Guile header files. This is almost always just a @code{-I} flag.
164 # @var{GUILE_LDFLAGS}: flags to pass to the linker to link a program against
165 # Guile. This includes @code{-lguile} for the Guile library itself, any
166 # libraries that Guile itself requires (like -lqthreads), and so on. It may
167 # also include a @code{-L} flag to tell the compiler where to find the
170 # The variables are marked for substitution, as by @code{AC_SUBST}.
172 AC_DEFUN([GUILE_FLAGS],
173 [AC_REQUIRE([GUILE_PROGS])dnl
174 AC_MSG_CHECKING([libguile compile flags])
175 GUILE_CFLAGS="`$GUILE_CONFIG compile`"
176 AC_MSG_RESULT([$GUILE_CFLAGS])
177 AC_MSG_CHECKING([libguile link flags])
178 GUILE_LDFLAGS="`$GUILE_CONFIG link`"
179 AC_MSG_RESULT([$GUILE_LDFLAGS])
180 AC_SUBST(GUILE_CFLAGS)
181 AC_SUBST(GUILE_LDFLAGS)
184 # GUILE_SITE_DIR -- find path to Guile "site" directory
186 # Usage: GUILE_SITE_DIR
188 # This looks for Guile's "site" directory, usually something like
189 # PREFIX/share/guile/site, and sets var @var{GUILE_SITE} to the path.
190 # Note that the var name is different from the macro name.
192 # The variable is marked for substitution, as by @code{AC_SUBST}.
194 AC_DEFUN([GUILE_SITE_DIR],
195 [AC_REQUIRE([GUILE_PROGS])dnl
196 AC_MSG_CHECKING(for Guile site directory)
197 GUILE_SITE=`[$GUILE_CONFIG] info pkgdatadir`/site
198 AC_MSG_RESULT($GUILE_SITE)
202 # GUILE_CHECK -- evaluate Guile Scheme code and capture the return value
204 # Usage: GUILE_CHECK_RETVAL(var,check)
206 # @var{var} is a shell variable name to be set to the return value.
207 # @var{check} is a Guile Scheme expression, evaluated with "$GUILE -c", and
208 # returning either 0 or non-#f to indicate the check passed.
209 # Non-0 number or #f indicates failure.
210 # Avoid using the character "#" since that confuses autoconf.
212 AC_DEFUN([GUILE_CHECK],
213 [AC_REQUIRE([GUILE_PROGS])
214 $GUILE -c "$2" > /dev/null 2>&1
218 # GUILE_MODULE_CHECK -- check feature of a Guile Scheme module
220 # Usage: GUILE_MODULE_CHECK(var,module,featuretest,description)
222 # @var{var} is a shell variable name to be set to "yes" or "no".
223 # @var{module} is a list of symbols, like: (ice-9 common-list).
224 # @var{featuretest} is an expression acceptable to GUILE_CHECK, q.v.
225 # @var{description} is a present-tense verb phrase (passed to AC_MSG_CHECKING).
227 AC_DEFUN([GUILE_MODULE_CHECK],
228 [AC_MSG_CHECKING([if $2 $4])
229 GUILE_CHECK($1,(use-modules $2) (exit ((lambda () $3))))
230 if test "$$1" = "0" ; then $1=yes ; else $1=no ; fi
234 # GUILE_MODULE_AVAILABLE -- check availability of a Guile Scheme module
236 # Usage: GUILE_MODULE_AVAILABLE(var,module)
238 # @var{var} is a shell variable name to be set to "yes" or "no".
239 # @var{module} is a list of symbols, like: (ice-9 common-list).
241 AC_DEFUN([GUILE_MODULE_AVAILABLE],
242 [GUILE_MODULE_CHECK($1,$2,0,is available)
245 # GUILE_MODULE_REQUIRED -- fail if a Guile Scheme module is unavailable
247 # Usage: GUILE_MODULE_REQUIRED(symlist)
249 # @var{symlist} is a list of symbols, WITHOUT surrounding parens,
250 # like: ice-9 common-list.
252 AC_DEFUN([GUILE_MODULE_REQUIRED],
253 [GUILE_MODULE_AVAILABLE(ac_guile_module_required, ($1))
254 if test "$ac_guile_module_required" = "no" ; then
255 AC_MSG_ERROR([required guile module not found: ($1)])
259 # GUILE_MODULE_EXPORTS -- check if a module exports a variable
261 # Usage: GUILE_MODULE_EXPORTS(var,module,modvar)
263 # @var{var} is a shell variable to be set to "yes" or "no".
264 # @var{module} is a list of symbols, like: (ice-9 common-list).
265 # @var{modvar} is the Guile Scheme variable to check.
267 AC_DEFUN([GUILE_MODULE_EXPORTS],
268 [GUILE_MODULE_CHECK($1,$2,$3,exports `$3')
271 # GUILE_MODULE_REQUIRED_EXPORT -- fail if a module doesn't export a variable
273 # Usage: GUILE_MODULE_REQUIRED_EXPORT(module,modvar)
275 # @var{module} is a list of symbols, like: (ice-9 common-list).
276 # @var{modvar} is the Guile Scheme variable to check.
278 AC_DEFUN([GUILE_MODULE_REQUIRED_EXPORT],
279 [GUILE_MODULE_EXPORTS(guile_module_required_export,$1,$2)
280 if test "$guile_module_required_export" = "no" ; then
281 AC_MSG_ERROR([module $1 does not export $2; required])
286 # Do all the work for Automake. -*- Autoconf -*-
288 # This macro actually does too much some checks are only needed if
289 # your package does certain things. But this isn't really a big deal.
291 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
292 # Free Software Foundation, Inc.
294 # This program is free software; you can redistribute it and/or modify
295 # it under the terms of the GNU General Public License as published by
296 # the Free Software Foundation; either version 2, or (at your option)
299 # This program is distributed in the hope that it will be useful,
300 # but WITHOUT ANY WARRANTY; without even the implied warranty of
301 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
302 # GNU General Public License for more details.
304 # You should have received a copy of the GNU General Public License
305 # along with this program; if not, write to the Free Software
306 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
313 # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
314 # the ones we care about.
315 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
317 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
318 # AM_INIT_AUTOMAKE([OPTIONS])
319 # -----------------------------------------------
320 # The call with PACKAGE and VERSION arguments is the old style
321 # call (pre autoconf-2.50), which is being phased out. PACKAGE
322 # and VERSION should now be passed to AC_INIT and removed from
323 # the call to AM_INIT_AUTOMAKE.
324 # We support both call styles for the transition. After
325 # the next Automake release, Autoconf can make the AC_INIT
326 # arguments mandatory, and then we can depend on a new Autoconf
327 # release and drop the old call support.
328 AC_DEFUN([AM_INIT_AUTOMAKE],
329 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
330 AC_REQUIRE([AC_PROG_INSTALL])dnl
331 # test to see if srcdir already configured
332 if test "`cd $srcdir && pwd`" != "`pwd`" &&
333 test -f $srcdir/config.status; then
334 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
337 # test whether we have cygpath
338 if test -z "$CYGPATH_W"; then
339 if (cygpath --version) >/dev/null 2>/dev/null; then
340 CYGPATH_W='cygpath -w'
345 AC_SUBST([CYGPATH_W])
347 # Define the identity of the package.
348 dnl Distinguish between old-style and new-style calls.
350 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
351 AC_SUBST([PACKAGE], [$1])dnl
352 AC_SUBST([VERSION], [$2])],
353 [_AM_SET_OPTIONS([$1])dnl
354 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
355 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
357 _AM_IF_OPTION([no-define],,
358 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
359 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
361 # Some tools Automake needs.
362 AC_REQUIRE([AM_SANITY_CHECK])dnl
363 AC_REQUIRE([AC_ARG_PROGRAM])dnl
364 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
365 AM_MISSING_PROG(AUTOCONF, autoconf)
366 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
367 AM_MISSING_PROG(AUTOHEADER, autoheader)
368 AM_MISSING_PROG(MAKEINFO, makeinfo)
369 AM_MISSING_PROG(AMTAR, tar)
371 AM_PROG_INSTALL_STRIP
372 # We need awk for the "check" target. The system "awk" is bad on
374 AC_REQUIRE([AC_PROG_AWK])dnl
375 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
376 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
378 _AM_IF_OPTION([no-dependencies],,
379 [AC_PROVIDE_IFELSE([AC_PROG_CC],
380 [_AM_DEPENDENCIES(CC)],
381 [define([AC_PROG_CC],
382 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
383 AC_PROVIDE_IFELSE([AC_PROG_CXX],
384 [_AM_DEPENDENCIES(CXX)],
385 [define([AC_PROG_CXX],
386 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
391 # When config.status generates a header, we must update the stamp-h file.
392 # This file resides in the same directory as the config header
393 # that is generated. The stamp files are numbered to have different names.
395 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
396 # loop where config.status creates the headers, so we can generate
397 # our stamp files there.
398 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
399 [# Compute $1's index in $config_headers.
401 for _am_header in $config_headers :; do
406 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
409 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
411 # Copyright 2002 Free Software Foundation, Inc.
413 # This program is free software; you can redistribute it and/or modify
414 # it under the terms of the GNU General Public License as published by
415 # the Free Software Foundation; either version 2, or (at your option)
418 # This program is distributed in the hope that it will be useful,
419 # but WITHOUT ANY WARRANTY; without even the implied warranty of
420 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
421 # GNU General Public License for more details.
423 # You should have received a copy of the GNU General Public License
424 # along with this program; if not, write to the Free Software
425 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
427 # AM_AUTOMAKE_VERSION(VERSION)
428 # ----------------------------
429 # Automake X.Y traces this macro to ensure aclocal.m4 has been
430 # generated from the m4 files accompanying Automake X.Y.
431 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
433 # AM_SET_CURRENT_AUTOMAKE_VERSION
434 # -------------------------------
435 # Call AM_AUTOMAKE_VERSION so it can be traced.
436 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
437 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
438 [AM_AUTOMAKE_VERSION([1.7.9])])
440 # Helper functions for option handling. -*- Autoconf -*-
442 # Copyright 2001, 2002 Free Software Foundation, Inc.
444 # This program is free software; you can redistribute it and/or modify
445 # it under the terms of the GNU General Public License as published by
446 # the Free Software Foundation; either version 2, or (at your option)
449 # This program is distributed in the hope that it will be useful,
450 # but WITHOUT ANY WARRANTY; without even the implied warranty of
451 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
452 # GNU General Public License for more details.
454 # You should have received a copy of the GNU General Public License
455 # along with this program; if not, write to the Free Software
456 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
461 # _AM_MANGLE_OPTION(NAME)
462 # -----------------------
463 AC_DEFUN([_AM_MANGLE_OPTION],
464 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
466 # _AM_SET_OPTION(NAME)
467 # ------------------------------
468 # Set option NAME. Presently that only means defining a flag for this option.
469 AC_DEFUN([_AM_SET_OPTION],
470 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
472 # _AM_SET_OPTIONS(OPTIONS)
473 # ----------------------------------
474 # OPTIONS is a space-separated list of Automake options.
475 AC_DEFUN([_AM_SET_OPTIONS],
476 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
478 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
479 # -------------------------------------------
480 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
481 AC_DEFUN([_AM_IF_OPTION],
482 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
485 # Check to make sure that the build environment is sane.
488 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
490 # This program is free software; you can redistribute it and/or modify
491 # it under the terms of the GNU General Public License as published by
492 # the Free Software Foundation; either version 2, or (at your option)
495 # This program is distributed in the hope that it will be useful,
496 # but WITHOUT ANY WARRANTY; without even the implied warranty of
497 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
498 # GNU General Public License for more details.
500 # You should have received a copy of the GNU General Public License
501 # along with this program; if not, write to the Free Software
502 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
509 AC_DEFUN([AM_SANITY_CHECK],
510 [AC_MSG_CHECKING([whether build environment is sane])
513 echo timestamp > conftest.file
514 # Do `set' in a subshell so we don't clobber the current shell's
515 # arguments. Must try -L first in case configure is actually a
516 # symlink; some systems play weird games with the mod time of symlinks
517 # (eg FreeBSD returns the mod time of the symlink's containing
520 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
521 if test "$[*]" = "X"; then
523 set X `ls -t $srcdir/configure conftest.file`
526 if test "$[*]" != "X $srcdir/configure conftest.file" \
527 && test "$[*]" != "X conftest.file $srcdir/configure"; then
529 # If neither matched, then we have a broken ls. This can happen
530 # if, for instance, CONFIG_SHELL is bash and it inherits a
531 # broken ls alias from the environment. This has actually
532 # happened. Such a system could not be considered "sane".
533 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
534 alias in your environment])
537 test "$[2]" = conftest.file
543 AC_MSG_ERROR([newly created file is older than distributed files!
544 Check your system clock])
551 # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
553 # This program is free software; you can redistribute it and/or modify
554 # it under the terms of the GNU General Public License as published by
555 # the Free Software Foundation; either version 2, or (at your option)
558 # This program is distributed in the hope that it will be useful,
559 # but WITHOUT ANY WARRANTY; without even the implied warranty of
560 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
561 # GNU General Public License for more details.
563 # You should have received a copy of the GNU General Public License
564 # along with this program; if not, write to the Free Software
565 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
570 # AM_MISSING_PROG(NAME, PROGRAM)
571 # ------------------------------
572 AC_DEFUN([AM_MISSING_PROG],
573 [AC_REQUIRE([AM_MISSING_HAS_RUN])
574 $1=${$1-"${am_missing_run}$2"}
580 # Define MISSING if not defined so far and test if it supports --run.
581 # If it does, set am_missing_run to use it, otherwise, to nothing.
582 AC_DEFUN([AM_MISSING_HAS_RUN],
583 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
584 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
585 # Use eval to expand $SHELL
586 if eval "$MISSING --run true"; then
587 am_missing_run="$MISSING --run "
590 AC_MSG_WARN([`missing' script is too old or missing])
596 # Copyright 2001 Free Software Foundation, Inc.
598 # This program is free software; you can redistribute it and/or modify
599 # it under the terms of the GNU General Public License as published by
600 # the Free Software Foundation; either version 2, or (at your option)
603 # This program is distributed in the hope that it will be useful,
604 # but WITHOUT ANY WARRANTY; without even the implied warranty of
605 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
606 # GNU General Public License for more details.
608 # You should have received a copy of the GNU General Public License
609 # along with this program; if not, write to the Free Software
610 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
613 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
614 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
615 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
617 # Of course, Automake must honor this variable whenever it calls a
618 # tool from the auxiliary directory. The problem is that $srcdir (and
619 # therefore $ac_aux_dir as well) can be either absolute or relative,
620 # depending on how configure is run. This is pretty annoying, since
621 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
622 # source directory, any form will work fine, but in subdirectories a
623 # relative path needs to be adjusted first.
625 # $ac_aux_dir/missing
626 # fails when called from a subdirectory if $ac_aux_dir is relative
627 # $top_srcdir/$ac_aux_dir/missing
628 # fails if $ac_aux_dir is absolute,
629 # fails when called from a subdirectory in a VPATH build with
630 # a relative $ac_aux_dir
632 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
633 # are both prefixed by $srcdir. In an in-source build this is usually
634 # harmless because $srcdir is `.', but things will broke when you
635 # start a VPATH build or use an absolute $srcdir.
637 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
638 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
639 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
640 # and then we would define $MISSING as
641 # MISSING="\${SHELL} $am_aux_dir/missing"
642 # This will work as long as MISSING is not called from configure, because
643 # unfortunately $(top_srcdir) has no meaning in configure.
644 # However there are other variables, like CC, which are often used in
645 # configure, and could therefore not use this "fixed" $ac_aux_dir.
647 # Another solution, used here, is to always expand $ac_aux_dir to an
648 # absolute PATH. The drawback is that using absolute paths prevent a
649 # configured tree to be moved without reconfiguration.
651 # Rely on autoconf to set up CDPATH properly.
654 AC_DEFUN([AM_AUX_DIR_EXPAND], [
655 # expand $ac_aux_dir to an absolute path
656 am_aux_dir=`cd $ac_aux_dir && pwd`
661 # Define $install_sh.
663 # Copyright 2001 Free Software Foundation, Inc.
665 # This program is free software; you can redistribute it and/or modify
666 # it under the terms of the GNU General Public License as published by
667 # the Free Software Foundation; either version 2, or (at your option)
670 # This program is distributed in the hope that it will be useful,
671 # but WITHOUT ANY WARRANTY; without even the implied warranty of
672 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
673 # GNU General Public License for more details.
675 # You should have received a copy of the GNU General Public License
676 # along with this program; if not, write to the Free Software
677 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
680 AC_DEFUN([AM_PROG_INSTALL_SH],
681 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
682 install_sh=${install_sh-"$am_aux_dir/install-sh"}
683 AC_SUBST(install_sh)])
685 # AM_PROG_INSTALL_STRIP
687 # Copyright 2001 Free Software Foundation, Inc.
689 # This program is free software; you can redistribute it and/or modify
690 # it under the terms of the GNU General Public License as published by
691 # the Free Software Foundation; either version 2, or (at your option)
694 # This program is distributed in the hope that it will be useful,
695 # but WITHOUT ANY WARRANTY; without even the implied warranty of
696 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
697 # GNU General Public License for more details.
699 # You should have received a copy of the GNU General Public License
700 # along with this program; if not, write to the Free Software
701 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
704 # One issue with vendor `install' (even GNU) is that you can't
705 # specify the program used to strip binaries. This is especially
706 # annoying in cross-compiling environments, where the build's strip
707 # is unlikely to handle the host's binaries.
708 # Fortunately install-sh will honor a STRIPPROG variable, so we
709 # always use install-sh in `make install-strip', and initialize
710 # STRIPPROG with the value of the STRIP variable (set by the user).
711 AC_DEFUN([AM_PROG_INSTALL_STRIP],
712 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
713 # Installed binaries are usually stripped using `strip' when the user
714 # run `make install-strip'. However `strip' might not be the right
715 # tool to use in cross-compilation environments, therefore Automake
716 # will honor the `STRIP' environment variable to overrule this program.
717 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
718 if test "$cross_compiling" != no; then
719 AC_CHECK_TOOL([STRIP], [strip], :)
721 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
722 AC_SUBST([INSTALL_STRIP_PROGRAM])])
725 # Copyright (C) 2003 Free Software Foundation, Inc.
727 # This program is free software; you can redistribute it and/or modify
728 # it under the terms of the GNU General Public License as published by
729 # the Free Software Foundation; either version 2, or (at your option)
732 # This program is distributed in the hope that it will be useful,
733 # but WITHOUT ANY WARRANTY; without even the implied warranty of
734 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
735 # GNU General Public License for more details.
737 # You should have received a copy of the GNU General Public License
738 # along with this program; if not, write to the Free Software
739 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
744 # Check whether the underlying file-system supports filenames
745 # with a leading dot. For instance MS-DOS doesn't.
746 AC_DEFUN([AM_SET_LEADING_DOT],
747 [rm -rf .tst 2>/dev/null
748 mkdir .tst 2>/dev/null
749 if test -d .tst; then
754 rmdir .tst 2>/dev/null
755 AC_SUBST([am__leading_dot])])
757 # serial 5 -*- Autoconf -*-
759 # Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
761 # This program is free software; you can redistribute it and/or modify
762 # it under the terms of the GNU General Public License as published by
763 # the Free Software Foundation; either version 2, or (at your option)
766 # This program is distributed in the hope that it will be useful,
767 # but WITHOUT ANY WARRANTY; without even the implied warranty of
768 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
769 # GNU General Public License for more details.
771 # You should have received a copy of the GNU General Public License
772 # along with this program; if not, write to the Free Software
773 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
777 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
778 # written in clear, in which case automake, when reading aclocal.m4,
779 # will think it sees a *use*, and therefore will trigger all it's
780 # C support machinery. Also note that it means that autoscan, seeing
781 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
785 # _AM_DEPENDENCIES(NAME)
786 # ----------------------
787 # See how the compiler implements dependency checking.
788 # NAME is "CC", "CXX", "GCJ", or "OBJC".
789 # We try a few techniques and use that to set a single cache variable.
791 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
792 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
793 # dependency, and given that the user is not expected to run this macro,
794 # just rely on AC_PROG_CC.
795 AC_DEFUN([_AM_DEPENDENCIES],
796 [AC_REQUIRE([AM_SET_DEPDIR])dnl
797 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
798 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
799 AC_REQUIRE([AM_DEP_TRACK])dnl
801 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
802 [$1], CXX, [depcc="$CXX" am_compiler_list=],
803 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
804 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
805 [depcc="$$1" am_compiler_list=])
807 AC_CACHE_CHECK([dependency style of $depcc],
808 [am_cv_$1_dependencies_compiler_type],
809 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
810 # We make a subdir and do the tests there. Otherwise we can end up
811 # making bogus files that we don't know about and never remove. For
812 # instance it was reported that on HP-UX the gcc test will end up
813 # making a dummy file named `D' -- because `-MD' means `put the output
816 # Copy depcomp to subdir because otherwise we won't find it if we're
817 # using a relative directory.
818 cp "$am_depcomp" conftest.dir
820 # We will build objects and dependencies in a subdirectory because
821 # it helps to detect inapplicable dependency modes. For instance
822 # both Tru64's cc and ICC support -MD to output dependencies as a
823 # side effect of compilation, but ICC will put the dependencies in
824 # the current directory while Tru64 will put them in the object
828 am_cv_$1_dependencies_compiler_type=none
829 if test "$am_compiler_list" = ""; then
830 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
832 for depmode in $am_compiler_list; do
833 # Setup a source with many dependencies, because some compilers
834 # like to wrap large dependency lists on column 80 (with \), and
835 # we should not choose a depcomp mode which is confused by this.
837 # We need to recreate these files for each test, as the compiler may
838 # overwrite some of them when testing with obscure command lines.
839 # This happens at least with the AIX C compiler.
841 for i in 1 2 3 4 5 6; do
842 echo '#include "conftst'$i'.h"' >> sub/conftest.c
845 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
849 # after this tag, mechanisms are not by side-effect, so they'll
850 # only be used when explicitly requested
851 if test "x$enable_dependency_tracking" = xyes; then
859 # We check with `-c' and `-o' for the sake of the "dashmstdout"
860 # mode. It turns out that the SunPro C++ compiler does not properly
861 # handle `-M -o', and we need to detect this.
862 if depmode=$depmode \
863 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
864 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
865 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
866 >/dev/null 2>conftest.err &&
867 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
868 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
869 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
870 # icc doesn't choke on unknown options, it will just issue warnings
871 # (even with -Werror). So we grep stderr for any message
872 # that says an option was ignored.
873 if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
874 am_cv_$1_dependencies_compiler_type=$depmode
883 am_cv_$1_dependencies_compiler_type=none
886 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
887 AM_CONDITIONAL([am__fastdep$1], [
888 test "x$enable_dependency_tracking" != xno \
889 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
895 # Choose a directory name for dependency files.
896 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
897 AC_DEFUN([AM_SET_DEPDIR],
898 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
899 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
905 AC_DEFUN([AM_DEP_TRACK],
906 [AC_ARG_ENABLE(dependency-tracking,
907 [ --disable-dependency-tracking Speeds up one-time builds
908 --enable-dependency-tracking Do not reject slow dependency extractors])
909 if test "x$enable_dependency_tracking" != xno; then
910 am_depcomp="$ac_aux_dir/depcomp"
913 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
914 AC_SUBST([AMDEPBACKSLASH])
917 # Generate code to set up dependency tracking. -*- Autoconf -*-
919 # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
921 # This program is free software; you can redistribute it and/or modify
922 # it under the terms of the GNU General Public License as published by
923 # the Free Software Foundation; either version 2, or (at your option)
926 # This program is distributed in the hope that it will be useful,
927 # but WITHOUT ANY WARRANTY; without even the implied warranty of
928 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
929 # GNU General Public License for more details.
931 # You should have received a copy of the GNU General Public License
932 # along with this program; if not, write to the Free Software
933 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
938 # _AM_OUTPUT_DEPENDENCY_COMMANDS
939 # ------------------------------
940 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
941 [for mf in $CONFIG_FILES; do
942 # Strip MF so we end up with the name of the file.
943 mf=`echo "$mf" | sed -e 's/:.*$//'`
944 # Check whether this is an Automake generated Makefile or not.
945 # We used to match only the files named `Makefile.in', but
946 # some people rename them; so instead we look at the file content.
947 # Grep'ing the first line is not enough: some people post-process
948 # each Makefile.in and add a new line on top of each file to say so.
949 # So let's grep whole file.
950 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
951 dirpart=`AS_DIRNAME("$mf")`
955 grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
956 # Extract the definition of DEP_FILES from the Makefile without
958 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
959 test -z "$DEPDIR" && continue
960 # When using ansi2knr, U may be empty or an underscore; expand it
961 U=`sed -n -e '/^U = / s///p' < "$mf"`
962 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
963 # We invoke sed twice because it is the simplest approach to
964 # changing $(DEPDIR) to its actual value in the expansion.
965 for file in `sed -n -e '
966 /^DEP_FILES = .*\\\\$/ {
975 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
976 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
977 # Make sure the directory exists.
978 test -f "$dirpart/$file" && continue
979 fdir=`AS_DIRNAME(["$file"])`
980 AS_MKDIR_P([$dirpart/$fdir])
981 # echo "creating $dirpart/$file"
982 echo '# dummy' > "$dirpart/$file"
985 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
988 # AM_OUTPUT_DEPENDENCY_COMMANDS
989 # -----------------------------
990 # This macro should only be invoked once -- use via AC_REQUIRE.
992 # This code is only required when automatic dependency tracking
993 # is enabled. FIXME. This creates each `.P' file that we will
994 # need in order to bootstrap the dependency handling code.
995 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
996 [AC_CONFIG_COMMANDS([depfiles],
997 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
998 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1001 # Check to see how 'make' treats includes. -*- Autoconf -*-
1003 # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
1005 # This program is free software; you can redistribute it and/or modify
1006 # it under the terms of the GNU General Public License as published by
1007 # the Free Software Foundation; either version 2, or (at your option)
1008 # any later version.
1010 # This program is distributed in the hope that it will be useful,
1011 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1012 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1013 # GNU General Public License for more details.
1015 # You should have received a copy of the GNU General Public License
1016 # along with this program; if not, write to the Free Software
1017 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1024 # Check to see how make treats includes.
1025 AC_DEFUN([AM_MAKE_INCLUDE],
1026 [am_make=${MAKE-make}
1027 cat > confinc << 'END'
1032 # If we don't find an include directive, just comment out the code.
1033 AC_MSG_CHECKING([for style of include used by $am_make])
1037 # First try GNU make style include.
1038 echo "include confinc" > confmf
1039 # We grep out `Entering directory' and `Leaving directory'
1040 # messages which can occur if `w' ends up in MAKEFLAGS.
1041 # In particular we don't look at `^make:' because GNU make might
1042 # be invoked under some other name (usually "gmake"), in which
1043 # case it prints its new name instead of `make'.
1044 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
1049 # Now try BSD make style include.
1050 if test "$am__include" = "#"; then
1051 echo '.include "confinc"' > confmf
1052 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
1053 am__include=.include
1058 AC_SUBST([am__include])
1059 AC_SUBST([am__quote])
1060 AC_MSG_RESULT([$_am_result])
1061 rm -f confinc confmf
1064 # AM_CONDITIONAL -*- Autoconf -*-
1066 # Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
1068 # This program is free software; you can redistribute it and/or modify
1069 # it under the terms of the GNU General Public License as published by
1070 # the Free Software Foundation; either version 2, or (at your option)
1071 # any later version.
1073 # This program is distributed in the hope that it will be useful,
1074 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1075 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1076 # GNU General Public License for more details.
1078 # You should have received a copy of the GNU General Public License
1079 # along with this program; if not, write to the Free Software
1080 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1087 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
1088 # -------------------------------------
1089 # Define a conditional.
1090 AC_DEFUN([AM_CONDITIONAL],
1091 [ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
1092 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1094 AC_SUBST([$1_FALSE])
1102 AC_CONFIG_COMMANDS_PRE(
1103 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1104 AC_MSG_ERROR([conditional "$1" was never defined.
1105 Usually this means the macro was only invoked conditionally.])
1108 # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
1110 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
1112 # This program is free software; you can redistribute it and/or modify
1113 # it under the terms of the GNU General Public License as published by
1114 # the Free Software Foundation; either version 2, or (at your option)
1115 # any later version.
1117 # This program is distributed in the hope that it will be useful,
1118 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1119 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1120 # GNU General Public License for more details.
1122 # You should have received a copy of the GNU General Public License
1123 # along with this program; if not, write to the Free Software
1124 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1131 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
1132 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])