Use "mkdir -p" if it works, as that fixes bugs when making file names
[automake.git] / aclocal.m4
blob3c9f4b21937a5d50e378c55ccb94d329f2e10d6b
1 # aclocal.m4 generated automatically by aclocal 1.5a
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
12 # PARTICULAR PURPOSE.
14 # Do all the work for Automake.  This macro actually does too much --
15 # some checks are only needed if your package does certain things.
16 # But this isn't really a big deal.
18 # Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
20 # This program is free software; you can redistribute it and/or modify
21 # it under the terms of the GNU General Public License as published by
22 # the Free Software Foundation; either version 2, or (at your option)
23 # any later version.
25 # This program is distributed in the hope that it will be useful,
26 # but WITHOUT ANY WARRANTY; without even the implied warranty of
27 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
28 # GNU General Public License for more details.
30 # You should have received a copy of the GNU General Public License
31 # along with this program; if not, write to the Free Software
32 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
33 # 02111-1307, USA.
35 # serial 5
37 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
38 # written in clear, in which case automake, when reading aclocal.m4,
39 # will think it sees a *use*, and therefore will trigger all it's
40 # C support machinery.  Also note that it means that autoscan, seeing
41 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
44 # We require 2.13 because we rely on SHELL being computed by configure.
45 AC_PREREQ([2.13])
47 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
48 # -----------------------------------------------------------
49 # If MACRO-NAME is provided do IF-PROVIDED, else IF-NOT-PROVIDED.
50 # The purpose of this macro is to provide the user with a means to
51 # check macros which are provided without letting her know how the
52 # information is coded.
53 # If this macro is not defined by Autoconf, define it here.
54 ifdef([AC_PROVIDE_IFELSE],
55       [],
56       [define([AC_PROVIDE_IFELSE],
57               [ifdef([AC_PROVIDE_$1],
58                      [$2], [$3])])])
61 # AM_INIT_AUTOMAKE(PACKAGE,VERSION, [NO-DEFINE])
62 # ----------------------------------------------
63 AC_DEFUN([AM_INIT_AUTOMAKE],
64 [AC_REQUIRE([AC_PROG_INSTALL])dnl
65 # test to see if srcdir already configured
66 if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" &&
67    test -f $srcdir/config.status; then
68   AC_MSG_ERROR([source directory already configured; run \"make distclean\" there first])
71 # Define the identity of the package.
72 PACKAGE=$1
73 AC_SUBST(PACKAGE)dnl
74 VERSION=$2
75 AC_SUBST(VERSION)dnl
76 ifelse([$3],,
77 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
78 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])
80 # Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
81 # the ones we care about.
82 ifdef([m4_pattern_allow],
83       [m4_pattern_allow([^AM_[A-Z]+FLAGS])])dnl
85 # Autoconf 2.50 always computes EXEEXT.  However we need to be
86 # compatible with 2.13, for now.  So we always define EXEEXT, but we
87 # don't compute it.
88 AC_SUBST(EXEEXT)
89 # Similar for OBJEXT -- only we only use OBJEXT if the user actually
90 # requests that it be used.  This is a bit dumb.
91 : ${OBJEXT=o}
92 AC_SUBST(OBJEXT)
94 # Some tools Automake needs.
95 AC_REQUIRE([AM_SANITY_CHECK])dnl
96 AC_REQUIRE([AC_ARG_PROGRAM])dnl
97 AM_MISSING_PROG(ACLOCAL, aclocal)
98 AM_MISSING_PROG(AUTOCONF, autoconf)
99 AM_MISSING_PROG(AUTOMAKE, automake)
100 AM_MISSING_PROG(AUTOHEADER, autoheader)
101 AM_MISSING_PROG(MAKEINFO, makeinfo)
102 AM_MISSING_PROG(AMTAR, tar)
103 AM_PROG_INSTALL_SH
104 AM_PROG_INSTALL_STRIP
105 # We need awk for the "check" target.  The system "awk" is bad on
106 # some platforms.
107 AC_REQUIRE([AC_PROG_AWK])dnl
108 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
109 AC_REQUIRE([AM_DEP_TRACK])dnl
110 AC_REQUIRE([AM_SET_DEPDIR])dnl
111 AC_PROVIDE_IFELSE([AC_PROG_][CC],
112                   [_AM_DEPENDENCIES(CC)],
113                   [define([AC_PROG_][CC],
114                           defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
115 AC_PROVIDE_IFELSE([AC_PROG_][CXX],
116                   [_AM_DEPENDENCIES(CXX)],
117                   [define([AC_PROG_][CXX],
118                           defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
122 # Check to make sure that the build environment is sane.
125 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
127 # This program is free software; you can redistribute it and/or modify
128 # it under the terms of the GNU General Public License as published by
129 # the Free Software Foundation; either version 2, or (at your option)
130 # any later version.
132 # This program is distributed in the hope that it will be useful,
133 # but WITHOUT ANY WARRANTY; without even the implied warranty of
134 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
135 # GNU General Public License for more details.
137 # You should have received a copy of the GNU General Public License
138 # along with this program; if not, write to the Free Software
139 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
140 # 02111-1307, USA.
142 # serial 3
144 # AM_SANITY_CHECK
145 # ---------------
146 AC_DEFUN([AM_SANITY_CHECK],
147 [AC_MSG_CHECKING([whether build environment is sane])
148 # Just in case
149 sleep 1
150 echo timestamp > conftest.file
151 # Do `set' in a subshell so we don't clobber the current shell's
152 # arguments.  Must try -L first in case configure is actually a
153 # symlink; some systems play weird games with the mod time of symlinks
154 # (eg FreeBSD returns the mod time of the symlink's containing
155 # directory).
156 if (
157    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
158    if test "$[*]" = "X"; then
159       # -L didn't work.
160       set X `ls -t $srcdir/configure conftest.file`
161    fi
162    rm -f conftest.file
163    if test "$[*]" != "X $srcdir/configure conftest.file" \
164       && test "$[*]" != "X conftest.file $srcdir/configure"; then
166       # If neither matched, then we have a broken ls.  This can happen
167       # if, for instance, CONFIG_SHELL is bash and it inherits a
168       # broken ls alias from the environment.  This has actually
169       # happened.  Such a system could not be considered "sane".
170       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
171 alias in your environment])
172    fi
174    test "$[2]" = conftest.file
175    )
176 then
177    # Ok.
178    :
179 else
180    AC_MSG_ERROR([newly created file is older than distributed files!
181 Check your system clock])
183 AC_MSG_RESULT(yes)])
186 # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
188 # This program is free software; you can redistribute it and/or modify
189 # it under the terms of the GNU General Public License as published by
190 # the Free Software Foundation; either version 2, or (at your option)
191 # any later version.
193 # This program is distributed in the hope that it will be useful,
194 # but WITHOUT ANY WARRANTY; without even the implied warranty of
195 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
196 # GNU General Public License for more details.
198 # You should have received a copy of the GNU General Public License
199 # along with this program; if not, write to the Free Software
200 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
201 # 02111-1307, USA.
203 # serial 2
205 # AM_MISSING_PROG(NAME, PROGRAM)
206 # ------------------------------
207 AC_DEFUN([AM_MISSING_PROG],
208 [AC_REQUIRE([AM_MISSING_HAS_RUN])
209 $1=${$1-"${am_missing_run}$2"}
210 AC_SUBST($1)])
213 # AM_MISSING_HAS_RUN
214 # ------------------
215 # Define MISSING if not defined so far and test if it supports --run.
216 # If it does, set am_missing_run to use it, otherwise, to nothing.
217 AC_DEFUN([AM_MISSING_HAS_RUN],
218 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
219 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
220 # Use eval to expand $SHELL
221 if eval "$MISSING --run true"; then
222   am_missing_run="$MISSING --run "
223 else
224   am_missing_run=
225   am_backtick='`'
226   AC_MSG_WARN([${am_backtick}missing' script is too old or missing])
230 # AM_AUX_DIR_EXPAND
232 # Copyright 2001 Free Software Foundation, Inc.
234 # This program is free software; you can redistribute it and/or modify
235 # it under the terms of the GNU General Public License as published by
236 # the Free Software Foundation; either version 2, or (at your option)
237 # any later version.
239 # This program is distributed in the hope that it will be useful,
240 # but WITHOUT ANY WARRANTY; without even the implied warranty of
241 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
242 # GNU General Public License for more details.
244 # You should have received a copy of the GNU General Public License
245 # along with this program; if not, write to the Free Software
246 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
247 # 02111-1307, USA.
249 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
250 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
251 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
253 # Of course, Automake must honor this variable whenever it calls a
254 # tool from the auxiliary directory.  The problem is that $srcdir (and
255 # therefore $ac_aux_dir as well) can be either absolute or relative,
256 # depending on how configure is run.  This is pretty annoying, since
257 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
258 # source directory, any form will work fine, but in subdirectories a
259 # relative path needs to be adjusted first.
261 # $ac_aux_dir/missing
262 #    fails when called from a subdirectory if $ac_aux_dir is relative
263 # $top_srcdir/$ac_aux_dir/missing
264 #    fails if $ac_aux_dir is absolute,
265 #    fails when called from a subdirectory in a VPATH build with
266 #          a relative $ac_aux_dir
268 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
269 # are both prefixed by $srcdir.  In an in-source build this is usually
270 # harmless because $srcdir is `.', but things will broke when you
271 # start a VPATH build or use an absolute $srcdir.
273 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
274 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
275 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
276 # and then we would define $MISSING as
277 #   MISSING="\${SHELL} $am_aux_dir/missing"
278 # This will work as long as MISSING is not called from configure, because
279 # unfortunately $(top_srcdir) has no meaning in configure.
280 # However there are other variables, like CC, which are often used in
281 # configure, and could therefore not use this "fixed" $ac_aux_dir.
283 # Another solution, used here, is to always expand $ac_aux_dir to an
284 # absolute PATH.  The drawback is that using absolute paths prevent a
285 # configured tree to be moved without reconfiguration.
287 AC_DEFUN([AM_AUX_DIR_EXPAND], [
288 # expand $ac_aux_dir to an absolute path
289 am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd`
292 # AM_PROG_INSTALL_SH
293 # ------------------
294 # Define $install_sh.
296 # Copyright 2001 Free Software Foundation, Inc.
298 # This program is free software; you can redistribute it and/or modify
299 # it under the terms of the GNU General Public License as published by
300 # the Free Software Foundation; either version 2, or (at your option)
301 # any later version.
303 # This program is distributed in the hope that it will be useful,
304 # but WITHOUT ANY WARRANTY; without even the implied warranty of
305 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
306 # GNU General Public License for more details.
308 # You should have received a copy of the GNU General Public License
309 # along with this program; if not, write to the Free Software
310 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
311 # 02111-1307, USA.
313 AC_DEFUN([AM_PROG_INSTALL_SH],
314 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
315 install_sh=${install_sh-"$am_aux_dir/install-sh"}
316 AC_SUBST(install_sh)])
318 # AM_PROG_INSTALL_STRIP
320 # Copyright 2001 Free Software Foundation, Inc.
322 # This program is free software; you can redistribute it and/or modify
323 # it under the terms of the GNU General Public License as published by
324 # the Free Software Foundation; either version 2, or (at your option)
325 # any later version.
327 # This program is distributed in the hope that it will be useful,
328 # but WITHOUT ANY WARRANTY; without even the implied warranty of
329 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
330 # GNU General Public License for more details.
332 # You should have received a copy of the GNU General Public License
333 # along with this program; if not, write to the Free Software
334 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
335 # 02111-1307, USA.
337 # One issue with vendor `install' (even GNU) is that you can't
338 # specify the program used to strip binaries.  This is especially
339 # annoying in cross-compiling environments, where the build's strip
340 # is unlikely to handle the host's binaries.
341 # Fortunately install-sh will honor a STRIPPROG variable, so we
342 # always use install-sh in `make install-strip', and initialize
343 # STRIPPROG with the value of the STRIP variable (set by the user).
344 AC_DEFUN([AM_PROG_INSTALL_STRIP],
345 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
346 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
347 AC_SUBST([INSTALL_STRIP_PROGRAM])])
349 # serial 4                                              -*- Autoconf -*-
351 # Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
353 # This program is free software; you can redistribute it and/or modify
354 # it under the terms of the GNU General Public License as published by
355 # the Free Software Foundation; either version 2, or (at your option)
356 # any later version.
358 # This program is distributed in the hope that it will be useful,
359 # but WITHOUT ANY WARRANTY; without even the implied warranty of
360 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
361 # GNU General Public License for more details.
363 # You should have received a copy of the GNU General Public License
364 # along with this program; if not, write to the Free Software
365 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
366 # 02111-1307, USA.
369 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
370 # written in clear, in which case automake, when reading aclocal.m4,
371 # will think it sees a *use*, and therefore will trigger all it's
372 # C support machinery.  Also note that it means that autoscan, seeing
373 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
377 # _AM_DEPENDENCIES(NAME)
378 # ---------------------
379 # See how the compiler implements dependency checking.
380 # NAME is "CC", "CXX" or "OBJC".
381 # We try a few techniques and use that to set a single cache variable.
383 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
384 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
385 # dependency, and given that the user is not expected to run this macro,
386 # just rely on AC_PROG_CC.
387 AC_DEFUN([_AM_DEPENDENCIES],
388 [AC_REQUIRE([AM_SET_DEPDIR])dnl
389 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
390 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
391 AC_REQUIRE([AM_DEP_TRACK])dnl
393 ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
394        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
395        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc']
396        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
397                    [depcc="$$1"   am_compiler_list=])
399 AC_CACHE_CHECK([dependency style of $depcc],
400                [am_cv_$1_dependencies_compiler_type],
401 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
402   # We make a subdir and do the tests there.  Otherwise we can end up
403   # making bogus files that we don't know about and never remove.  For
404   # instance it was reported that on HP-UX the gcc test will end up
405   # making a dummy file named `D' -- because `-MD' means `put the output
406   # in D'.
407   mkdir conftest.dir
408   # Copy depcomp to subdir because otherwise we won't find it if we're
409   # using a relative directory.
410   cp "$am_depcomp" conftest.dir
411   cd conftest.dir
413   am_cv_$1_dependencies_compiler_type=none
414   if test "$am_compiler_list" = ""; then
415      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
416   fi
417   for depmode in $am_compiler_list; do
418     # We need to recreate these files for each test, as the compiler may
419     # overwrite some of them when testing with obscure command lines.
420     # This happens at least with the AIX C compiler.
421     echo '#include "conftest.h"' > conftest.c
422     echo 'int i;' > conftest.h
423     echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
425     case $depmode in
426     nosideeffect)
427       # after this tag, mechanisms are not by side-effect, so they'll
428       # only be used when explicitly requested
429       if test "x$enable_dependency_tracking" = xyes; then
430         continue
431       else
432         break
433       fi
434       ;;
435     none) break ;;
436     esac
437     # We check with `-c' and `-o' for the sake of the "dashmstdout"
438     # mode.  It turns out that the SunPro C++ compiler does not properly
439     # handle `-M -o', and we need to detect this.
440     if depmode=$depmode \
441        source=conftest.c object=conftest.o \
442        depfile=conftest.Po tmpdepfile=conftest.TPo \
443        $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
444        grep conftest.h conftest.Po > /dev/null 2>&1 &&
445        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
446       am_cv_$1_dependencies_compiler_type=$depmode
447       break
448     fi
449   done
451   cd ..
452   rm -rf conftest.dir
453 else
454   am_cv_$1_dependencies_compiler_type=none
457 $1DEPMODE="depmode=$am_cv_$1_dependencies_compiler_type"
458 AC_SUBST([$1DEPMODE])
462 # AM_SET_DEPDIR
463 # -------------
464 # Choose a directory name for dependency files.
465 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
466 AC_DEFUN([AM_SET_DEPDIR],
467 [rm -f .deps 2>/dev/null
468 mkdir .deps 2>/dev/null
469 if test -d .deps; then
470   DEPDIR=.deps
471 else
472   # MS-DOS does not allow filenames that begin with a dot.
473   DEPDIR=_deps
475 rmdir .deps 2>/dev/null
476 AC_SUBST(DEPDIR)
480 # AM_DEP_TRACK
481 # ------------
482 AC_DEFUN([AM_DEP_TRACK],
483 [AC_ARG_ENABLE(dependency-tracking,
484 [  --disable-dependency-tracking Speeds up one-time builds
485   --enable-dependency-tracking  Do not reject slow dependency extractors])
486 if test "x$enable_dependency_tracking" != xno; then
487   am_depcomp="$ac_aux_dir/depcomp"
488   AMDEPBACKSLASH='\'
490 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
491 pushdef([subst], defn([AC_SUBST]))
492 subst(AMDEPBACKSLASH)
493 popdef([subst])
496 # Generate code to set up dependency tracking.
498 # Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
500 # This program is free software; you can redistribute it and/or modify
501 # it under the terms of the GNU General Public License as published by
502 # the Free Software Foundation; either version 2, or (at your option)
503 # any later version.
505 # This program is distributed in the hope that it will be useful,
506 # but WITHOUT ANY WARRANTY; without even the implied warranty of
507 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
508 # GNU General Public License for more details.
510 # You should have received a copy of the GNU General Public License
511 # along with this program; if not, write to the Free Software
512 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
513 # 02111-1307, USA.
515 # This macro should only be invoked once -- use via AC_REQUIRE.
516 # Usage:
517 # AM_OUTPUT_DEPENDENCY_COMMANDS
520 # This code is only required when automatic dependency tracking
521 # is enabled.  FIXME.  This creates each `.P' file that we will
522 # need in order to bootstrap the dependency handling code.
523 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],[
524 AC_OUTPUT_COMMANDS([
525 test x"$AMDEP_TRUE" != x"" ||
526 for mf in $CONFIG_FILES; do
527   case "$mf" in
528   Makefile) dirpart=.;;
529   */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
530   *) continue;;
531   esac
532   grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
533   # Extract the definition of DEP_FILES from the Makefile without
534   # running `make'.
535   DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
536   test -z "$DEPDIR" && continue
537   # When using ansi2knr, U may be empty or an underscore; expand it
538   U=`sed -n -e '/^U = / s///p' < "$mf"`
539   test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
540   # We invoke sed twice because it is the simplest approach to
541   # changing $(DEPDIR) to its actual value in the expansion.
542   for file in `sed -n -e '
543     /^DEP_FILES = .*\\\\$/ {
544       s/^DEP_FILES = //
545       :loop
546         s/\\\\$//
547         p
548         n
549         /\\\\$/ b loop
550       p
551     }
552     /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
553        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
554     # Make sure the directory exists.
555     test -f "$dirpart/$file" && continue
556     fdir=`echo "$file" | sed -e 's|/[^/]*$||'`
557     $ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1
558     # echo "creating $dirpart/$file"
559     echo '# dummy' > "$dirpart/$file"
560   done
561 done
562 ], [AMDEP_TRUE="$AMDEP_TRUE"
563 ac_aux_dir="$ac_aux_dir"])])
565 # AM_MAKE_INCLUDE()
566 # -----------------
567 # Check to see how make treats includes.
569 # Copyright 2001 Free Software Foundation, Inc.
571 # This program is free software; you can redistribute it and/or modify
572 # it under the terms of the GNU General Public License as published by
573 # the Free Software Foundation; either version 2, or (at your option)
574 # any later version.
576 # This program is distributed in the hope that it will be useful,
577 # but WITHOUT ANY WARRANTY; without even the implied warranty of
578 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
579 # GNU General Public License for more details.
581 # You should have received a copy of the GNU General Public License
582 # along with this program; if not, write to the Free Software
583 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
584 # 02111-1307, USA.
586 AC_DEFUN([AM_MAKE_INCLUDE],
587 [am_make=${MAKE-make}
588 cat > confinc << 'END'
589 doit:
590         @echo done
592 # If we don't find an include directive, just comment out the code.
593 AC_MSG_CHECKING([for style of include used by $am_make])
594 am__include='#'
595 am__quote=
596 _am_result=none
597 # First try GNU make style include.
598 echo "include confinc" > confmf
599 # We grep out `Entering directory' and `Leaving directory'
600 # messages which can occur if `w' ends up in MAKEFLAGS.
601 # In particular we don't look at `^make:' because GNU make might
602 # be invoked under some other name (usually "gmake"), in which
603 # case it prints its new name instead of `make'.
604 if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
605    am__include=include
606    am__quote=
607    _am_result=GNU
609 # Now try BSD make style include.
610 if test "$am__include" = "#"; then
611    echo '.include "confinc"' > confmf
612    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
613       am__include=.include
614       am__quote='"'
615       _am_result=BSD
616    fi
618 AC_SUBST(am__include)
619 AC_SUBST(am__quote)
620 AC_MSG_RESULT($_am_result)
621 rm -f confinc confmf
624 # AM_CONDITIONAL
626 # Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
628 # This program is free software; you can redistribute it and/or modify
629 # it under the terms of the GNU General Public License as published by
630 # the Free Software Foundation; either version 2, or (at your option)
631 # any later version.
633 # This program is distributed in the hope that it will be useful,
634 # but WITHOUT ANY WARRANTY; without even the implied warranty of
635 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
636 # GNU General Public License for more details.
638 # You should have received a copy of the GNU General Public License
639 # along with this program; if not, write to the Free Software
640 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
641 # 02111-1307, USA.
643 # serial 3
645 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
646 # -------------------------------------
647 # Define a conditional.
649 # FIXME: Once using 2.50, use this:
650 # m4_match([$1], [^TRUE\|FALSE$], [AC_FATAL([$0: invalid condition: $1])])dnl
651 AC_DEFUN([AM_CONDITIONAL],
652 [ifelse([$1], [TRUE],
653         [errprint(__file__:__line__: [$0: invalid condition: $1
654 ])dnl
655 m4exit(1)])dnl
656 ifelse([$1], [FALSE],
657        [errprint(__file__:__line__: [$0: invalid condition: $1
658 ])dnl
659 m4exit(1)])dnl
660 AC_SUBST([$1_TRUE])
661 AC_SUBST([$1_FALSE])
662 if $2; then
663   $1_TRUE=
664   $1_FALSE='#'
665 else
666   $1_TRUE='#'
667   $1_FALSE=
668 fi])