1 # aclocal.m4 generated automatically by aclocal 1.5
3 # Copyright 1996, 1997, 1998, 1999, 2000, 2001
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)
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)
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. This macro actually does too much --
287 # some checks are only needed if your package does certain things.
288 # But this isn't really a big deal.
292 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
293 # written in clear, in which case automake, when reading aclocal.m4,
294 # will think it sees a *use*, and therefore will trigger all it's
295 # C support machinery. Also note that it means that autoscan, seeing
296 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
299 # We require 2.13 because we rely on SHELL being computed by configure.
302 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
303 # -----------------------------------------------------------
304 # If MACRO-NAME is provided do IF-PROVIDED, else IF-NOT-PROVIDED.
305 # The purpose of this macro is to provide the user with a means to
306 # check macros which are provided without letting her know how the
307 # information is coded.
308 # If this macro is not defined by Autoconf, define it here.
309 ifdef([AC_PROVIDE_IFELSE],
311 [define([AC_PROVIDE_IFELSE],
312 [ifdef([AC_PROVIDE_$1],
316 # AM_INIT_AUTOMAKE(PACKAGE,VERSION, [NO-DEFINE])
317 # ----------------------------------------------
318 AC_DEFUN([AM_INIT_AUTOMAKE],
319 [AC_REQUIRE([AC_PROG_INSTALL])dnl
320 # test to see if srcdir already configured
321 if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" &&
322 test -f $srcdir/config.status; then
323 AC_MSG_ERROR([source directory already configured; run \"make distclean\" there first])
326 # Define the identity of the package.
332 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
333 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])
335 # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
336 # the ones we care about.
337 ifdef([m4_pattern_allow],
338 [m4_pattern_allow([^AM_[A-Z]+FLAGS])])dnl
340 # Autoconf 2.50 always computes EXEEXT. However we need to be
341 # compatible with 2.13, for now. So we always define EXEEXT, but we
344 # Similar for OBJEXT -- only we only use OBJEXT if the user actually
345 # requests that it be used. This is a bit dumb.
349 # Some tools Automake needs.
350 AC_REQUIRE([AM_SANITY_CHECK])dnl
351 AC_REQUIRE([AC_ARG_PROGRAM])dnl
352 AM_MISSING_PROG(ACLOCAL, aclocal)
353 AM_MISSING_PROG(AUTOCONF, autoconf)
354 AM_MISSING_PROG(AUTOMAKE, automake)
355 AM_MISSING_PROG(AUTOHEADER, autoheader)
356 AM_MISSING_PROG(MAKEINFO, makeinfo)
357 AM_MISSING_PROG(AMTAR, tar)
359 AM_PROG_INSTALL_STRIP
360 # We need awk for the "check" target. The system "awk" is bad on
362 AC_REQUIRE([AC_PROG_AWK])dnl
363 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
364 AC_REQUIRE([AM_DEP_TRACK])dnl
365 AC_REQUIRE([AM_SET_DEPDIR])dnl
366 AC_PROVIDE_IFELSE([AC_PROG_][CC],
367 [_AM_DEPENDENCIES(CC)],
368 [define([AC_PROG_][CC],
369 defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
370 AC_PROVIDE_IFELSE([AC_PROG_][CXX],
371 [_AM_DEPENDENCIES(CXX)],
372 [define([AC_PROG_][CXX],
373 defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
377 # Check to make sure that the build environment is sane.
384 AC_DEFUN([AM_SANITY_CHECK],
385 [AC_MSG_CHECKING([whether build environment is sane])
388 echo timestamp > conftest.file
389 # Do `set' in a subshell so we don't clobber the current shell's
390 # arguments. Must try -L first in case configure is actually a
391 # symlink; some systems play weird games with the mod time of symlinks
392 # (eg FreeBSD returns the mod time of the symlink's containing
395 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
396 if test "$[*]" = "X"; then
398 set X `ls -t $srcdir/configure conftest.file`
401 if test "$[*]" != "X $srcdir/configure conftest.file" \
402 && test "$[*]" != "X conftest.file $srcdir/configure"; then
404 # If neither matched, then we have a broken ls. This can happen
405 # if, for instance, CONFIG_SHELL is bash and it inherits a
406 # broken ls alias from the environment. This has actually
407 # happened. Such a system could not be considered "sane".
408 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
409 alias in your environment])
412 test "$[2]" = conftest.file
418 AC_MSG_ERROR([newly created file is older than distributed files!
419 Check your system clock])
426 # AM_MISSING_PROG(NAME, PROGRAM)
427 # ------------------------------
428 AC_DEFUN([AM_MISSING_PROG],
429 [AC_REQUIRE([AM_MISSING_HAS_RUN])
430 $1=${$1-"${am_missing_run}$2"}
436 # Define MISSING if not defined so far and test if it supports --run.
437 # If it does, set am_missing_run to use it, otherwise, to nothing.
438 AC_DEFUN([AM_MISSING_HAS_RUN],
439 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
440 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
441 # Use eval to expand $SHELL
442 if eval "$MISSING --run true"; then
443 am_missing_run="$MISSING --run "
447 AC_MSG_WARN([${am_backtick}missing' script is too old or missing])
453 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
454 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
455 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
457 # Of course, Automake must honor this variable whenever it calls a
458 # tool from the auxiliary directory. The problem is that $srcdir (and
459 # therefore $ac_aux_dir as well) can be either absolute or relative,
460 # depending on how configure is run. This is pretty annoying, since
461 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
462 # source directory, any form will work fine, but in subdirectories a
463 # relative path needs to be adjusted first.
465 # $ac_aux_dir/missing
466 # fails when called from a subdirectory if $ac_aux_dir is relative
467 # $top_srcdir/$ac_aux_dir/missing
468 # fails if $ac_aux_dir is absolute,
469 # fails when called from a subdirectory in a VPATH build with
470 # a relative $ac_aux_dir
472 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
473 # are both prefixed by $srcdir. In an in-source build this is usually
474 # harmless because $srcdir is `.', but things will broke when you
475 # start a VPATH build or use an absolute $srcdir.
477 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
478 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
479 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
480 # and then we would define $MISSING as
481 # MISSING="\${SHELL} $am_aux_dir/missing"
482 # This will work as long as MISSING is not called from configure, because
483 # unfortunately $(top_srcdir) has no meaning in configure.
484 # However there are other variables, like CC, which are often used in
485 # configure, and could therefore not use this "fixed" $ac_aux_dir.
487 # Another solution, used here, is to always expand $ac_aux_dir to an
488 # absolute PATH. The drawback is that using absolute paths prevent a
489 # configured tree to be moved without reconfiguration.
491 AC_DEFUN([AM_AUX_DIR_EXPAND], [
492 # expand $ac_aux_dir to an absolute path
493 am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd`
498 # Define $install_sh.
499 AC_DEFUN([AM_PROG_INSTALL_SH],
500 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
501 install_sh=${install_sh-"$am_aux_dir/install-sh"}
502 AC_SUBST(install_sh)])
504 # One issue with vendor `install' (even GNU) is that you can't
505 # specify the program used to strip binaries. This is especially
506 # annoying in cross-compiling environments, where the build's strip
507 # is unlikely to handle the host's binaries.
508 # Fortunately install-sh will honor a STRIPPROG variable, so we
509 # always use install-sh in `make install-strip', and initialize
510 # STRIPPROG with the value of the STRIP variable (set by the user).
511 AC_DEFUN([AM_PROG_INSTALL_STRIP],
512 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
513 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
514 AC_SUBST([INSTALL_STRIP_PROGRAM])])
516 # serial 4 -*- Autoconf -*-
520 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
521 # written in clear, in which case automake, when reading aclocal.m4,
522 # will think it sees a *use*, and therefore will trigger all it's
523 # C support machinery. Also note that it means that autoscan, seeing
524 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
528 # _AM_DEPENDENCIES(NAME)
529 # ---------------------
530 # See how the compiler implements dependency checking.
531 # NAME is "CC", "CXX" or "OBJC".
532 # We try a few techniques and use that to set a single cache variable.
534 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
535 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
536 # dependency, and given that the user is not expected to run this macro,
537 # just rely on AC_PROG_CC.
538 AC_DEFUN([_AM_DEPENDENCIES],
539 [AC_REQUIRE([AM_SET_DEPDIR])dnl
540 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
541 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
542 AC_REQUIRE([AM_DEP_TRACK])dnl
544 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
545 [$1], CXX, [depcc="$CXX" am_compiler_list=],
546 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc']
547 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
548 [depcc="$$1" am_compiler_list=])
550 AC_CACHE_CHECK([dependency style of $depcc],
551 [am_cv_$1_dependencies_compiler_type],
552 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
553 # We make a subdir and do the tests there. Otherwise we can end up
554 # making bogus files that we don't know about and never remove. For
555 # instance it was reported that on HP-UX the gcc test will end up
556 # making a dummy file named `D' -- because `-MD' means `put the output
559 # Copy depcomp to subdir because otherwise we won't find it if we're
560 # using a relative directory.
561 cp "$am_depcomp" conftest.dir
564 am_cv_$1_dependencies_compiler_type=none
565 if test "$am_compiler_list" = ""; then
566 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
568 for depmode in $am_compiler_list; do
569 # We need to recreate these files for each test, as the compiler may
570 # overwrite some of them when testing with obscure command lines.
571 # This happens at least with the AIX C compiler.
572 echo '#include "conftest.h"' > conftest.c
573 echo 'int i;' > conftest.h
574 echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
578 # after this tag, mechanisms are not by side-effect, so they'll
579 # only be used when explicitly requested
580 if test "x$enable_dependency_tracking" = xyes; then
588 # We check with `-c' and `-o' for the sake of the "dashmstdout"
589 # mode. It turns out that the SunPro C++ compiler does not properly
590 # handle `-M -o', and we need to detect this.
591 if depmode=$depmode \
592 source=conftest.c object=conftest.o \
593 depfile=conftest.Po tmpdepfile=conftest.TPo \
594 $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
595 grep conftest.h conftest.Po > /dev/null 2>&1 &&
596 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
597 am_cv_$1_dependencies_compiler_type=$depmode
605 am_cv_$1_dependencies_compiler_type=none
608 $1DEPMODE="depmode=$am_cv_$1_dependencies_compiler_type"
609 AC_SUBST([$1DEPMODE])
615 # Choose a directory name for dependency files.
616 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
617 AC_DEFUN([AM_SET_DEPDIR],
618 [rm -f .deps 2>/dev/null
619 mkdir .deps 2>/dev/null
620 if test -d .deps; then
623 # MS-DOS does not allow filenames that begin with a dot.
626 rmdir .deps 2>/dev/null
633 AC_DEFUN([AM_DEP_TRACK],
634 [AC_ARG_ENABLE(dependency-tracking,
635 [ --disable-dependency-tracking Speeds up one-time builds
636 --enable-dependency-tracking Do not reject slow dependency extractors])
637 if test "x$enable_dependency_tracking" != xno; then
638 am_depcomp="$ac_aux_dir/depcomp"
641 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
642 pushdef([subst], defn([AC_SUBST]))
643 subst(AMDEPBACKSLASH)
647 # Generate code to set up dependency tracking.
648 # This macro should only be invoked once -- use via AC_REQUIRE.
650 # AM_OUTPUT_DEPENDENCY_COMMANDS
653 # This code is only required when automatic dependency tracking
654 # is enabled. FIXME. This creates each `.P' file that we will
655 # need in order to bootstrap the dependency handling code.
656 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],[
658 test x"$AMDEP_TRUE" != x"" ||
659 for mf in $CONFIG_FILES; do
661 Makefile) dirpart=.;;
662 */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
665 grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
666 # Extract the definition of DEP_FILES from the Makefile without
668 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
669 test -z "$DEPDIR" && continue
670 # When using ansi2knr, U may be empty or an underscore; expand it
671 U=`sed -n -e '/^U = / s///p' < "$mf"`
672 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
673 # We invoke sed twice because it is the simplest approach to
674 # changing $(DEPDIR) to its actual value in the expansion.
675 for file in `sed -n -e '
676 /^DEP_FILES = .*\\\\$/ {
685 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
686 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
687 # Make sure the directory exists.
688 test -f "$dirpart/$file" && continue
689 fdir=`echo "$file" | sed -e 's|/[^/]*$||'`
690 $ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1
691 # echo "creating $dirpart/$file"
692 echo '# dummy' > "$dirpart/$file"
695 ], [AMDEP_TRUE="$AMDEP_TRUE"
696 ac_aux_dir="$ac_aux_dir"])])
700 # Check to see how make treats includes.
701 AC_DEFUN([AM_MAKE_INCLUDE],
702 [am_make=${MAKE-make}
703 cat > confinc << 'END'
707 # If we don't find an include directive, just comment out the code.
708 AC_MSG_CHECKING([for style of include used by $am_make])
712 # First try GNU make style include.
713 echo "include confinc" > confmf
714 # We grep out `Entering directory' and `Leaving directory'
715 # messages which can occur if `w' ends up in MAKEFLAGS.
716 # In particular we don't look at `^make:' because GNU make might
717 # be invoked under some other name (usually "gmake"), in which
718 # case it prints its new name instead of `make'.
719 if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
724 # Now try BSD make style include.
725 if test "$am__include" = "#"; then
726 echo '.include "confinc"' > confmf
727 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
733 AC_SUBST(am__include)
735 AC_MSG_RESULT($_am_result)
741 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
742 # -------------------------------------
743 # Define a conditional.
745 # FIXME: Once using 2.50, use this:
746 # m4_match([$1], [^TRUE\|FALSE$], [AC_FATAL([$0: invalid condition: $1])])dnl
747 AC_DEFUN([AM_CONDITIONAL],
748 [ifelse([$1], [TRUE],
749 [errprint(__file__:__line__: [$0: invalid condition: $1
752 ifelse([$1], [FALSE],
753 [errprint(__file__:__line__: [$0: invalid condition: $1
766 # Like AC_CONFIG_HEADER, but automatically create stamp file.
770 # When config.status generates a header, we must update the stamp-h file.
771 # This file resides in the same directory as the config header
772 # that is generated. We must strip everything past the first ":",
773 # and everything past the last "/".
777 AC_DEFUN([AM_CONFIG_HEADER],
778 [ifdef([AC_FOREACH],dnl
779 [dnl init our file count if it isn't already
780 m4_ifndef([_AM_Config_Header_Index], m4_define([_AM_Config_Header_Index], [0]))
781 dnl prepare to store our destination file list for use in config.status
782 AC_FOREACH([_AM_File], [$1],
783 [m4_pushdef([_AM_Dest], m4_patsubst(_AM_File, [:.*]))
784 m4_define([_AM_Config_Header_Index], m4_incr(_AM_Config_Header_Index))
785 dnl and add it to the list of files AC keeps track of, along
787 AC_CONFIG_HEADERS(_AM_File,
788 dnl COMMANDS, [, INIT-CMDS]
789 [# update the timestamp
790 echo timestamp >"AS_ESCAPE(_AM_DIRNAME(]_AM_Dest[))/stamp-h]_AM_Config_Header_Index["
791 ][$2]m4_ifval([$3], [, [$3]]))dnl AC_CONFIG_HEADERS
792 m4_popdef([_AM_Dest])])],dnl
793 [AC_CONFIG_HEADER([$1])
795 ifelse(patsubst([$1], [[^ ]], []),
797 [test -z "$CONFIG_HEADERS" || echo timestamp >dnl
798 patsubst([$1], [^\([^:]*/\)?.*], [\1])stamp-h]),dnl
800 for am_file in $1; do
801 case " \$CONFIG_HEADERS " in
803 am_dir=\`echo \$am_file |sed 's%:.*%%;s%[^/]*\$%%'\`
804 if test -n "\$am_dir"; then
805 am_tmpdir=\`echo \$am_dir |sed 's%^\(/*\).*\$%\1%'\`
806 for am_subdir in \`echo \$am_dir |sed 's%/% %'\`; do
807 am_tmpdir=\$am_tmpdir\$am_subdir/
808 if test ! -d \$am_tmpdir; then
813 echo timestamp > "\$am_dir"stamp-h\$am_indx
816 am_indx=\`expr \$am_indx + 1\`
818 ])]) # AM_CONFIG_HEADER
822 # Like AS_DIRNAME, only do it during macro expansion
823 AC_DEFUN([_AM_DIRNAME],
824 [m4_if(m4_regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
825 m4_if(m4_regexp([$1], [^//\([^/]\|$\)]), -1,
826 m4_if(m4_regexp([$1], [^/.*]), -1,
828 m4_patsubst([$1], [^\(/\).*], [\1])),
829 m4_patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
830 m4_patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl