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