For PR automake/347:
[platform/upstream/automake.git] / aclocal.m4
1 # generated automatically by aclocal 1.6c -*- Autoconf -*-
2
3 # Copyright 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.
8
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.
13
14 # Do all the work for Automake.                            -*- Autoconf -*-
15
16 # This macro actually does too much some checks are only needed if
17 # your package does certain things.  But this isn't really a big deal.
18
19 # Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
20 # Free Software Foundation, Inc.
21
22 # This program is free software; you can redistribute it and/or modify
23 # it under the terms of the GNU General Public License as published by
24 # the Free Software Foundation; either version 2, or (at your option)
25 # any later version.
26
27 # This program is distributed in the hope that it will be useful,
28 # but WITHOUT ANY WARRANTY; without even the implied warranty of
29 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
30 # GNU General Public License for more details.
31
32 # You should have received a copy of the GNU General Public License
33 # along with this program; if not, write to the Free Software
34 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
35 # 02111-1307, USA.
36
37 # serial 8
38
39 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
40 # written in clear, in which case automake, when reading aclocal.m4,
41 # will think it sees a *use*, and therefore will trigger all it's
42 # C support machinery.  Also note that it means that autoscan, seeing
43 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
44
45
46 AC_PREREQ([2.53b])
47
48 # Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
49 # the ones we care about.
50 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
51
52 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
53 # AM_INIT_AUTOMAKE([OPTIONS])
54 # -----------------------------------------------
55 # The call with PACKAGE and VERSION arguments is the old style
56 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
57 # and VERSION should now be passed to AC_INIT and removed from
58 # the call to AM_INIT_AUTOMAKE.
59 # We support both call styles for the transition.  After
60 # the next Automake release, Autoconf can make the AC_INIT
61 # arguments mandatory, and then we can depend on a new Autoconf
62 # release and drop the old call support.
63 AC_DEFUN([AM_INIT_AUTOMAKE],
64 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
65  AC_REQUIRE([AC_PROG_INSTALL])dnl
66 # test to see if srcdir already configured
67 if test "`cd $srcdir && pwd`" != "`pwd`" &&
68    test -f $srcdir/config.status; then
69   AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
70 fi
71
72 # Define the identity of the package.
73 dnl Distinguish between old-style and new-style calls.
74 m4_ifval([$2],
75 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
76  AC_SUBST([PACKAGE], [$1])dnl
77  AC_SUBST([VERSION], [$2])],
78 [_AM_SET_OPTIONS([$1])dnl
79  AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl
80  AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl
81
82 _AM_IF_OPTION([no-define],,
83 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
84  AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
85
86 # Some tools Automake needs.
87 AC_REQUIRE([AM_SANITY_CHECK])dnl
88 AC_REQUIRE([AC_ARG_PROGRAM])dnl
89 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
90 AM_MISSING_PROG(AUTOCONF, autoconf)
91 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
92 AM_MISSING_PROG(AUTOHEADER, autoheader)
93 AM_MISSING_PROG(MAKEINFO, makeinfo)
94 AM_MISSING_PROG(AMTAR, tar)
95 AM_PROG_INSTALL_SH
96 AM_PROG_INSTALL_STRIP
97 # We need awk for the "check" target.  The system "awk" is bad on
98 # some platforms.
99 AC_REQUIRE([AC_PROG_AWK])dnl
100 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
101
102 _AM_IF_OPTION([no-dependencies],,
103 [AC_PROVIDE_IFELSE([AC_PROG_CC],
104                   [_AM_DEPENDENCIES(CC)],
105                   [define([AC_PROG_CC],
106                           defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
107 AC_PROVIDE_IFELSE([AC_PROG_CXX],
108                   [_AM_DEPENDENCIES(CXX)],
109                   [define([AC_PROG_CXX],
110                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
111 ])
112 ])
113
114
115 # When config.status generates a header, we must update the stamp-h file.
116 # This file resides in the same directory as the config header
117 # that is generated.  The stamp files are numbered to have different names.
118
119 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
120 # loop where config.status creates the headers, so we can generate
121 # our stamp files there.
122 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
123 [_am_stamp_count=`expr ${_am_stamp_count-0} + 1`
124 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
125
126 # Copyright 2002  Free Software Foundation, Inc.
127
128 # This program is free software; you can redistribute it and/or modify
129 # it under the terms of the GNU General Public License as published by
130 # the Free Software Foundation; either version 2, or (at your option)
131 # any later version.
132
133 # This program is distributed in the hope that it will be useful,
134 # but WITHOUT ANY WARRANTY; without even the implied warranty of
135 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
136 # GNU General Public License for more details.
137
138 # You should have received a copy of the GNU General Public License
139 # along with this program; if not, write to the Free Software
140 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
141
142 # AM_AUTOMAKE_VERSION(VERSION)
143 # ----------------------------
144 # Automake X.Y traces this macro to ensure aclocal.m4 has been
145 # generated from the m4 files accompanying Automake X.Y.
146 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.6c"])
147
148 # AM_SET_CURRENT_AUTOMAKE_VERSION
149 # -------------------------------
150 # Call AM_AUTOMAKE_VERSION so it can be traced.
151 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
152 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
153          [AM_AUTOMAKE_VERSION([1.6c])])
154
155 # Helper functions for option handling.                    -*- Autoconf -*-
156
157 # Copyright 2001, 2002  Free Software Foundation, Inc.
158
159 # This program is free software; you can redistribute it and/or modify
160 # it under the terms of the GNU General Public License as published by
161 # the Free Software Foundation; either version 2, or (at your option)
162 # any later version.
163
164 # This program is distributed in the hope that it will be useful,
165 # but WITHOUT ANY WARRANTY; without even the implied warranty of
166 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
167 # GNU General Public License for more details.
168
169 # You should have received a copy of the GNU General Public License
170 # along with this program; if not, write to the Free Software
171 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
172 # 02111-1307, USA.
173
174 # serial 2
175
176 # _AM_MANGLE_OPTION(NAME)
177 # -----------------------
178 AC_DEFUN([_AM_MANGLE_OPTION],
179 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
180
181 # _AM_SET_OPTION(NAME)
182 # ------------------------------
183 # Set option NAME.  Presently that only means defining a flag for this option.
184 AC_DEFUN([_AM_SET_OPTION],
185 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
186
187 # _AM_SET_OPTIONS(OPTIONS)
188 # ----------------------------------
189 # OPTIONS is a space-separated list of Automake options.
190 AC_DEFUN([_AM_SET_OPTIONS],
191 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
192
193 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
194 # -------------------------------------------
195 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
196 AC_DEFUN([_AM_IF_OPTION],
197 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
198
199 #
200 # Check to make sure that the build environment is sane.
201 #
202
203 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
204
205 # This program is free software; you can redistribute it and/or modify
206 # it under the terms of the GNU General Public License as published by
207 # the Free Software Foundation; either version 2, or (at your option)
208 # any later version.
209
210 # This program is distributed in the hope that it will be useful,
211 # but WITHOUT ANY WARRANTY; without even the implied warranty of
212 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
213 # GNU General Public License for more details.
214
215 # You should have received a copy of the GNU General Public License
216 # along with this program; if not, write to the Free Software
217 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
218 # 02111-1307, USA.
219
220 # serial 3
221
222 # AM_SANITY_CHECK
223 # ---------------
224 AC_DEFUN([AM_SANITY_CHECK],
225 [AC_MSG_CHECKING([whether build environment is sane])
226 # Just in case
227 sleep 1
228 echo timestamp > conftest.file
229 # Do `set' in a subshell so we don't clobber the current shell's
230 # arguments.  Must try -L first in case configure is actually a
231 # symlink; some systems play weird games with the mod time of symlinks
232 # (eg FreeBSD returns the mod time of the symlink's containing
233 # directory).
234 if (
235    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
236    if test "$[*]" = "X"; then
237       # -L didn't work.
238       set X `ls -t $srcdir/configure conftest.file`
239    fi
240    rm -f conftest.file
241    if test "$[*]" != "X $srcdir/configure conftest.file" \
242       && test "$[*]" != "X conftest.file $srcdir/configure"; then
243
244       # If neither matched, then we have a broken ls.  This can happen
245       # if, for instance, CONFIG_SHELL is bash and it inherits a
246       # broken ls alias from the environment.  This has actually
247       # happened.  Such a system could not be considered "sane".
248       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
249 alias in your environment])
250    fi
251
252    test "$[2]" = conftest.file
253    )
254 then
255    # Ok.
256    :
257 else
258    AC_MSG_ERROR([newly created file is older than distributed files!
259 Check your system clock])
260 fi
261 AC_MSG_RESULT(yes)])
262
263 #  -*- Autoconf -*-
264
265
266 # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
267
268 # This program is free software; you can redistribute it and/or modify
269 # it under the terms of the GNU General Public License as published by
270 # the Free Software Foundation; either version 2, or (at your option)
271 # any later version.
272
273 # This program is distributed in the hope that it will be useful,
274 # but WITHOUT ANY WARRANTY; without even the implied warranty of
275 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
276 # GNU General Public License for more details.
277
278 # You should have received a copy of the GNU General Public License
279 # along with this program; if not, write to the Free Software
280 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
281 # 02111-1307, USA.
282
283 # serial 3
284
285 # AM_MISSING_PROG(NAME, PROGRAM)
286 # ------------------------------
287 AC_DEFUN([AM_MISSING_PROG],
288 [AC_REQUIRE([AM_MISSING_HAS_RUN])
289 $1=${$1-"${am_missing_run}$2"}
290 AC_SUBST($1)])
291
292
293 # AM_MISSING_HAS_RUN
294 # ------------------
295 # Define MISSING if not defined so far and test if it supports --run.
296 # If it does, set am_missing_run to use it, otherwise, to nothing.
297 AC_DEFUN([AM_MISSING_HAS_RUN],
298 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
299 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
300 # Use eval to expand $SHELL
301 if eval "$MISSING --run true"; then
302   am_missing_run="$MISSING --run "
303 else
304   am_missing_run=
305   AC_MSG_WARN([`missing' script is too old or missing])
306 fi
307 ])
308
309 # AM_AUX_DIR_EXPAND
310
311 # Copyright 2001 Free Software Foundation, Inc.
312
313 # This program is free software; you can redistribute it and/or modify
314 # it under the terms of the GNU General Public License as published by
315 # the Free Software Foundation; either version 2, or (at your option)
316 # any later version.
317
318 # This program is distributed in the hope that it will be useful,
319 # but WITHOUT ANY WARRANTY; without even the implied warranty of
320 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
321 # GNU General Public License for more details.
322
323 # You should have received a copy of the GNU General Public License
324 # along with this program; if not, write to the Free Software
325 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
326 # 02111-1307, USA.
327
328 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
329 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
330 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
331 #
332 # Of course, Automake must honor this variable whenever it calls a
333 # tool from the auxiliary directory.  The problem is that $srcdir (and
334 # therefore $ac_aux_dir as well) can be either absolute or relative,
335 # depending on how configure is run.  This is pretty annoying, since
336 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
337 # source directory, any form will work fine, but in subdirectories a
338 # relative path needs to be adjusted first.
339 #
340 # $ac_aux_dir/missing
341 #    fails when called from a subdirectory if $ac_aux_dir is relative
342 # $top_srcdir/$ac_aux_dir/missing
343 #    fails if $ac_aux_dir is absolute,
344 #    fails when called from a subdirectory in a VPATH build with
345 #          a relative $ac_aux_dir
346 #
347 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
348 # are both prefixed by $srcdir.  In an in-source build this is usually
349 # harmless because $srcdir is `.', but things will broke when you
350 # start a VPATH build or use an absolute $srcdir.
351 #
352 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
353 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
354 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
355 # and then we would define $MISSING as
356 #   MISSING="\${SHELL} $am_aux_dir/missing"
357 # This will work as long as MISSING is not called from configure, because
358 # unfortunately $(top_srcdir) has no meaning in configure.
359 # However there are other variables, like CC, which are often used in
360 # configure, and could therefore not use this "fixed" $ac_aux_dir.
361 #
362 # Another solution, used here, is to always expand $ac_aux_dir to an
363 # absolute PATH.  The drawback is that using absolute paths prevent a
364 # configured tree to be moved without reconfiguration.
365
366 # Rely on autoconf to set up CDPATH properly.
367 AC_PREREQ([2.50])
368
369 AC_DEFUN([AM_AUX_DIR_EXPAND], [
370 # expand $ac_aux_dir to an absolute path
371 am_aux_dir=`cd $ac_aux_dir && pwd`
372 ])
373
374 # AM_PROG_INSTALL_SH
375 # ------------------
376 # Define $install_sh.
377
378 # Copyright 2001 Free Software Foundation, Inc.
379
380 # This program is free software; you can redistribute it and/or modify
381 # it under the terms of the GNU General Public License as published by
382 # the Free Software Foundation; either version 2, or (at your option)
383 # any later version.
384
385 # This program is distributed in the hope that it will be useful,
386 # but WITHOUT ANY WARRANTY; without even the implied warranty of
387 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
388 # GNU General Public License for more details.
389
390 # You should have received a copy of the GNU General Public License
391 # along with this program; if not, write to the Free Software
392 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
393 # 02111-1307, USA.
394
395 AC_DEFUN([AM_PROG_INSTALL_SH],
396 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
397 install_sh=${install_sh-"$am_aux_dir/install-sh"}
398 AC_SUBST(install_sh)])
399
400 # AM_PROG_INSTALL_STRIP
401
402 # Copyright 2001 Free Software Foundation, Inc.
403
404 # This program is free software; you can redistribute it and/or modify
405 # it under the terms of the GNU General Public License as published by
406 # the Free Software Foundation; either version 2, or (at your option)
407 # any later version.
408
409 # This program is distributed in the hope that it will be useful,
410 # but WITHOUT ANY WARRANTY; without even the implied warranty of
411 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
412 # GNU General Public License for more details.
413
414 # You should have received a copy of the GNU General Public License
415 # along with this program; if not, write to the Free Software
416 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
417 # 02111-1307, USA.
418
419 # One issue with vendor `install' (even GNU) is that you can't
420 # specify the program used to strip binaries.  This is especially
421 # annoying in cross-compiling environments, where the build's strip
422 # is unlikely to handle the host's binaries.
423 # Fortunately install-sh will honor a STRIPPROG variable, so we
424 # always use install-sh in `make install-strip', and initialize
425 # STRIPPROG with the value of the STRIP variable (set by the user).
426 AC_DEFUN([AM_PROG_INSTALL_STRIP],
427 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
428 # Installed binaries are usually stripped using `strip' when the user
429 # run `make install-strip'.  However `strip' might not be the right
430 # tool to use in cross-compilation environments, therefore Automake
431 # will honor the `STRIP' environment variable to overrule this program.
432 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
433 if test "$cross_compiling" != no; then
434   AC_CHECK_TOOL([STRIP], [strip], :)
435 fi
436 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
437 AC_SUBST([INSTALL_STRIP_PROGRAM])])
438
439 # serial 4                                              -*- Autoconf -*-
440
441 # Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
442
443 # This program is free software; you can redistribute it and/or modify
444 # it under the terms of the GNU General Public License as published by
445 # the Free Software Foundation; either version 2, or (at your option)
446 # any later version.
447
448 # This program is distributed in the hope that it will be useful,
449 # but WITHOUT ANY WARRANTY; without even the implied warranty of
450 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
451 # GNU General Public License for more details.
452
453 # You should have received a copy of the GNU General Public License
454 # along with this program; if not, write to the Free Software
455 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
456 # 02111-1307, USA.
457
458
459 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
460 # written in clear, in which case automake, when reading aclocal.m4,
461 # will think it sees a *use*, and therefore will trigger all it's
462 # C support machinery.  Also note that it means that autoscan, seeing
463 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
464
465
466
467 # _AM_DEPENDENCIES(NAME)
468 # ----------------------
469 # See how the compiler implements dependency checking.
470 # NAME is "CC", "CXX", "GCJ", or "OBJC".
471 # We try a few techniques and use that to set a single cache variable.
472 #
473 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
474 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
475 # dependency, and given that the user is not expected to run this macro,
476 # just rely on AC_PROG_CC.
477 AC_DEFUN([_AM_DEPENDENCIES],
478 [AC_REQUIRE([AM_SET_DEPDIR])dnl
479 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
480 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
481 AC_REQUIRE([AM_DEP_TRACK])dnl
482
483 ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
484        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
485        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
486        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
487                    [depcc="$$1"   am_compiler_list=])
488
489 AC_CACHE_CHECK([dependency style of $depcc],
490                [am_cv_$1_dependencies_compiler_type],
491 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
492   # We make a subdir and do the tests there.  Otherwise we can end up
493   # making bogus files that we don't know about and never remove.  For
494   # instance it was reported that on HP-UX the gcc test will end up
495   # making a dummy file named `D' -- because `-MD' means `put the output
496   # in D'.
497   mkdir conftest.dir
498   # Copy depcomp to subdir because otherwise we won't find it if we're
499   # using a relative directory.
500   cp "$am_depcomp" conftest.dir
501   cd conftest.dir
502
503   am_cv_$1_dependencies_compiler_type=none
504   if test "$am_compiler_list" = ""; then
505      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
506   fi
507   for depmode in $am_compiler_list; do
508     # We need to recreate these files for each test, as the compiler may
509     # overwrite some of them when testing with obscure command lines.
510     # This happens at least with the AIX C compiler.
511     echo '#include "conftest.h"' > conftest.c
512     echo 'int i;' > conftest.h
513     echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
514
515     case $depmode in
516     nosideeffect)
517       # after this tag, mechanisms are not by side-effect, so they'll
518       # only be used when explicitly requested
519       if test "x$enable_dependency_tracking" = xyes; then
520         continue
521       else
522         break
523       fi
524       ;;
525     none) break ;;
526     esac
527     # We check with `-c' and `-o' for the sake of the "dashmstdout"
528     # mode.  It turns out that the SunPro C++ compiler does not properly
529     # handle `-M -o', and we need to detect this.
530     if depmode=$depmode \
531        source=conftest.c object=conftest.o \
532        depfile=conftest.Po tmpdepfile=conftest.TPo \
533        $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
534        grep conftest.h conftest.Po > /dev/null 2>&1 &&
535        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
536       am_cv_$1_dependencies_compiler_type=$depmode
537       break
538     fi
539   done
540
541   cd ..
542   rm -rf conftest.dir
543 else
544   am_cv_$1_dependencies_compiler_type=none
545 fi
546 ])
547 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
548 AM_CONDITIONAL([am__fastdep$1], [
549   test "x$enable_dependency_tracking" != xno \
550   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
551 ])
552
553
554 # AM_SET_DEPDIR
555 # -------------
556 # Choose a directory name for dependency files.
557 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
558 AC_DEFUN([AM_SET_DEPDIR],
559 [rm -f .deps 2>/dev/null
560 mkdir .deps 2>/dev/null
561 if test -d .deps; then
562   DEPDIR=.deps
563 else
564   # MS-DOS does not allow filenames that begin with a dot.
565   DEPDIR=_deps
566 fi
567 rmdir .deps 2>/dev/null
568 AC_SUBST([DEPDIR])
569 ])
570
571
572 # AM_DEP_TRACK
573 # ------------
574 AC_DEFUN([AM_DEP_TRACK],
575 [AC_ARG_ENABLE(dependency-tracking,
576 [  --disable-dependency-tracking Speeds up one-time builds
577   --enable-dependency-tracking  Do not reject slow dependency extractors])
578 if test "x$enable_dependency_tracking" != xno; then
579   am_depcomp="$ac_aux_dir/depcomp"
580   AMDEPBACKSLASH='\'
581 fi
582 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
583 AC_SUBST([AMDEPBACKSLASH])
584 ])
585
586 # Generate code to set up dependency tracking.   -*- Autoconf -*-
587
588 # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
589
590 # This program is free software; you can redistribute it and/or modify
591 # it under the terms of the GNU General Public License as published by
592 # the Free Software Foundation; either version 2, or (at your option)
593 # any later version.
594
595 # This program is distributed in the hope that it will be useful,
596 # but WITHOUT ANY WARRANTY; without even the implied warranty of
597 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
598 # GNU General Public License for more details.
599
600 # You should have received a copy of the GNU General Public License
601 # along with this program; if not, write to the Free Software
602 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
603 # 02111-1307, USA.
604
605 #serial 2
606
607 # _AM_OUTPUT_DEPENDENCY_COMMANDS
608 # ------------------------------
609 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
610 [for mf in $CONFIG_FILES; do
611   # Strip MF so we end up with the name of the file.
612   mf=`echo "$mf" | sed -e 's/:.*$//'`
613   # Check whether this is an Automake generated Makefile or not.
614   # We used to match only the files named `Makefile.in', but
615   # some people rename them; so instead we look at the file content.
616   # Grep'ing the first line is not enough: some people post-process
617   # each Makefile.in and add a new line on top of each file to say so.
618   # So let's grep whole file.
619   if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
620     dirpart=`AS_DIRNAME("$mf")`
621   else
622     continue
623   fi
624   grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
625   # Extract the definition of DEP_FILES from the Makefile without
626   # running `make'.
627   DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
628   test -z "$DEPDIR" && continue
629   # When using ansi2knr, U may be empty or an underscore; expand it
630   U=`sed -n -e '/^U = / s///p' < "$mf"`
631   test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
632   # We invoke sed twice because it is the simplest approach to
633   # changing $(DEPDIR) to its actual value in the expansion.
634   for file in `sed -n -e '
635     /^DEP_FILES = .*\\\\$/ {
636       s/^DEP_FILES = //
637       :loop
638         s/\\\\$//
639         p
640         n
641         /\\\\$/ b loop
642       p
643     }
644     /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
645        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
646     # Make sure the directory exists.
647     test -f "$dirpart/$file" && continue
648     fdir=`AS_DIRNAME(["$file"])`
649     AS_MKDIR_P([$dirpart/$fdir])
650     # echo "creating $dirpart/$file"
651     echo '# dummy' > "$dirpart/$file"
652   done
653 done
654 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
655
656
657 # AM_OUTPUT_DEPENDENCY_COMMANDS
658 # -----------------------------
659 # This macro should only be invoked once -- use via AC_REQUIRE.
660 #
661 # This code is only required when automatic dependency tracking
662 # is enabled.  FIXME.  This creates each `.P' file that we will
663 # need in order to bootstrap the dependency handling code.
664 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
665 [AC_CONFIG_COMMANDS([depfiles],
666      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
667      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
668 ])
669
670 # Check to see how 'make' treats includes.      -*- Autoconf -*-
671
672 # Copyright (C) 2001, 2002 Free Software Foundation, Inc.
673
674 # This program is free software; you can redistribute it and/or modify
675 # it under the terms of the GNU General Public License as published by
676 # the Free Software Foundation; either version 2, or (at your option)
677 # any later version.
678
679 # This program is distributed in the hope that it will be useful,
680 # but WITHOUT ANY WARRANTY; without even the implied warranty of
681 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
682 # GNU General Public License for more details.
683
684 # You should have received a copy of the GNU General Public License
685 # along with this program; if not, write to the Free Software
686 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
687 # 02111-1307, USA.
688
689 # serial 2
690
691 # AM_MAKE_INCLUDE()
692 # -----------------
693 # Check to see how make treats includes.
694 AC_DEFUN([AM_MAKE_INCLUDE],
695 [am_make=${MAKE-make}
696 cat > confinc << 'END'
697 doit:
698         @echo done
699 END
700 # If we don't find an include directive, just comment out the code.
701 AC_MSG_CHECKING([for style of include used by $am_make])
702 am__include="#"
703 am__quote=
704 _am_result=none
705 # First try GNU make style include.
706 echo "include confinc" > confmf
707 # We grep out `Entering directory' and `Leaving directory'
708 # messages which can occur if `w' ends up in MAKEFLAGS.
709 # In particular we don't look at `^make:' because GNU make might
710 # be invoked under some other name (usually "gmake"), in which
711 # case it prints its new name instead of `make'.
712 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
713    am__include=include
714    am__quote=
715    _am_result=GNU
716 fi
717 # Now try BSD make style include.
718 if test "$am__include" = "#"; then
719    echo '.include "confinc"' > confmf
720    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
721       am__include=.include
722       am__quote="\""
723       _am_result=BSD
724    fi
725 fi
726 AC_SUBST(am__include)
727 AC_SUBST(am__quote)
728 AC_MSG_RESULT($_am_result)
729 rm -f confinc confmf
730 ])
731
732 # AM_CONDITIONAL                                              -*- Autoconf -*-
733
734 # Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
735
736 # This program is free software; you can redistribute it and/or modify
737 # it under the terms of the GNU General Public License as published by
738 # the Free Software Foundation; either version 2, or (at your option)
739 # any later version.
740
741 # This program is distributed in the hope that it will be useful,
742 # but WITHOUT ANY WARRANTY; without even the implied warranty of
743 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
744 # GNU General Public License for more details.
745
746 # You should have received a copy of the GNU General Public License
747 # along with this program; if not, write to the Free Software
748 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
749 # 02111-1307, USA.
750
751 # serial 5
752
753 AC_PREREQ(2.52)
754
755 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
756 # -------------------------------------
757 # Define a conditional.
758 AC_DEFUN([AM_CONDITIONAL],
759 [ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
760         [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
761 AC_SUBST([$1_TRUE])
762 AC_SUBST([$1_FALSE])
763 if $2; then
764   $1_TRUE=
765   $1_FALSE='#'
766 else
767   $1_TRUE='#'
768   $1_FALSE=
769 fi
770 AC_CONFIG_COMMANDS_PRE(
771 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
772   AC_MSG_ERROR([conditional \"$1\" was never defined.
773 Usually this means the macro was only invoked conditionally.])
774 fi])])
775
776 # Copyright 2001 Free Software Foundation, Inc.             -*- Autoconf -*-
777
778 # This program is free software; you can redistribute it and/or modify
779 # it under the terms of the GNU General Public License as published by
780 # the Free Software Foundation; either version 2, or (at your option)
781 # any later version.
782
783 # This program is distributed in the hope that it will be useful,
784 # but WITHOUT ANY WARRANTY; without even the implied warranty of
785 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
786 # GNU General Public License for more details.
787
788 # You should have received a copy of the GNU General Public License
789 # along with this program; if not, write to the Free Software
790 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
791 # 02111-1307, USA.
792
793 # AM_RUN_LOG(COMMAND)
794 # -------------------
795 # Run COMMAND, save the exit status in ac_status, and log it.
796 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
797 AC_DEFUN([AM_RUN_LOG],
798 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
799    ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
800    ac_status=$?
801    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
802    (exit $ac_status); }])
803