OSDN Git Service

2004-10-12 Frank Ch. Eigler <fche@redhat.com>
[pf3gnuchains/gcc-fork.git] / libffi / aclocal.m4
1 # generated automatically by aclocal 1.8.3 -*- Autoconf -*-
2
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
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 #                                                        -*- Autoconf -*-
15 # Copyright (C) 2002, 2003  Free Software Foundation, Inc.
16 # Generated from amversion.in; do not edit by hand.
17
18 # This program is free software; you can redistribute it and/or modify
19 # it under the terms of the GNU General Public License as published by
20 # the Free Software Foundation; either version 2, or (at your option)
21 # any later version.
22
23 # This program is distributed in the hope that it will be useful,
24 # but WITHOUT ANY WARRANTY; without even the implied warranty of
25 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
26 # GNU General Public License for more details.
27
28 # You should have received a copy of the GNU General Public License
29 # along with this program; if not, write to the Free Software
30 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
31
32 # AM_AUTOMAKE_VERSION(VERSION)
33 # ----------------------------
34 # Automake X.Y traces this macro to ensure aclocal.m4 has been
35 # generated from the m4 files accompanying Automake X.Y.
36 AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"])
37
38 # AM_SET_CURRENT_AUTOMAKE_VERSION
39 # -------------------------------
40 # Call AM_AUTOMAKE_VERSION so it can be traced.
41 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
42 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
43          [AM_AUTOMAKE_VERSION([1.8.3])])
44
45 # Figure out how to run the assembler.             -*- Autoconf -*-
46
47 # serial 3
48
49 # Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc.
50
51 # This program is free software; you can redistribute it and/or modify
52 # it under the terms of the GNU General Public License as published by
53 # the Free Software Foundation; either version 2, or (at your option)
54 # any later version.
55
56 # This program is distributed in the hope that it will be useful,
57 # but WITHOUT ANY WARRANTY; without even the implied warranty of
58 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
59 # GNU General Public License for more details.
60
61 # You should have received a copy of the GNU General Public License
62 # along with this program; if not, write to the Free Software
63 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
64 # 02111-1307, USA.
65
66 # AM_PROG_AS
67 # ----------
68 AC_DEFUN([AM_PROG_AS],
69 [# By default we simply use the C compiler to build assembly code.
70 AC_REQUIRE([AC_PROG_CC])
71 test "${CCAS+set}" = set || CCAS=$CC
72 test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
73 AC_ARG_VAR([CCAS],      [assembler compiler command (defaults to CC)])
74 AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)])
75 ])
76
77 # AM_AUX_DIR_EXPAND
78
79 # Copyright (C) 2001, 2003 Free Software Foundation, Inc.
80
81 # This program is free software; you can redistribute it and/or modify
82 # it under the terms of the GNU General Public License as published by
83 # the Free Software Foundation; either version 2, or (at your option)
84 # any later version.
85
86 # This program is distributed in the hope that it will be useful,
87 # but WITHOUT ANY WARRANTY; without even the implied warranty of
88 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
89 # GNU General Public License for more details.
90
91 # You should have received a copy of the GNU General Public License
92 # along with this program; if not, write to the Free Software
93 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
94 # 02111-1307, USA.
95
96 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
97 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
98 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
99 #
100 # Of course, Automake must honor this variable whenever it calls a
101 # tool from the auxiliary directory.  The problem is that $srcdir (and
102 # therefore $ac_aux_dir as well) can be either absolute or relative,
103 # depending on how configure is run.  This is pretty annoying, since
104 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
105 # source directory, any form will work fine, but in subdirectories a
106 # relative path needs to be adjusted first.
107 #
108 # $ac_aux_dir/missing
109 #    fails when called from a subdirectory if $ac_aux_dir is relative
110 # $top_srcdir/$ac_aux_dir/missing
111 #    fails if $ac_aux_dir is absolute,
112 #    fails when called from a subdirectory in a VPATH build with
113 #          a relative $ac_aux_dir
114 #
115 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
116 # are both prefixed by $srcdir.  In an in-source build this is usually
117 # harmless because $srcdir is `.', but things will broke when you
118 # start a VPATH build or use an absolute $srcdir.
119 #
120 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
121 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
122 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
123 # and then we would define $MISSING as
124 #   MISSING="\${SHELL} $am_aux_dir/missing"
125 # This will work as long as MISSING is not called from configure, because
126 # unfortunately $(top_srcdir) has no meaning in configure.
127 # However there are other variables, like CC, which are often used in
128 # configure, and could therefore not use this "fixed" $ac_aux_dir.
129 #
130 # Another solution, used here, is to always expand $ac_aux_dir to an
131 # absolute PATH.  The drawback is that using absolute paths prevent a
132 # configured tree to be moved without reconfiguration.
133
134 AC_DEFUN([AM_AUX_DIR_EXPAND],
135 [dnl Rely on autoconf to set up CDPATH properly.
136 AC_PREREQ([2.50])dnl
137 # expand $ac_aux_dir to an absolute path
138 am_aux_dir=`cd $ac_aux_dir && pwd`
139 ])
140
141 # AM_CONDITIONAL                                              -*- Autoconf -*-
142
143 # Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
144
145 # This program is free software; you can redistribute it and/or modify
146 # it under the terms of the GNU General Public License as published by
147 # the Free Software Foundation; either version 2, or (at your option)
148 # any later version.
149
150 # This program is distributed in the hope that it will be useful,
151 # but WITHOUT ANY WARRANTY; without even the implied warranty of
152 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
153 # GNU General Public License for more details.
154
155 # You should have received a copy of the GNU General Public License
156 # along with this program; if not, write to the Free Software
157 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
158 # 02111-1307, USA.
159
160 # serial 6
161
162 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
163 # -------------------------------------
164 # Define a conditional.
165 AC_DEFUN([AM_CONDITIONAL],
166 [AC_PREREQ(2.52)dnl
167  ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
168         [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
169 AC_SUBST([$1_TRUE])
170 AC_SUBST([$1_FALSE])
171 if $2; then
172   $1_TRUE=
173   $1_FALSE='#'
174 else
175   $1_TRUE='#'
176   $1_FALSE=
177 fi
178 AC_CONFIG_COMMANDS_PRE(
179 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
180   AC_MSG_ERROR([conditional "$1" was never defined.
181 Usually this means the macro was only invoked conditionally.])
182 fi])])
183
184 # serial 7                                              -*- Autoconf -*-
185
186 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
187 # Free Software Foundation, Inc.
188
189 # This program is free software; you can redistribute it and/or modify
190 # it under the terms of the GNU General Public License as published by
191 # the Free Software Foundation; either version 2, or (at your option)
192 # any later version.
193
194 # This program is distributed in the hope that it will be useful,
195 # but WITHOUT ANY WARRANTY; without even the implied warranty of
196 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
197 # GNU General Public License for more details.
198
199 # You should have received a copy of the GNU General Public License
200 # along with this program; if not, write to the Free Software
201 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
202 # 02111-1307, USA.
203
204
205 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
206 # written in clear, in which case automake, when reading aclocal.m4,
207 # will think it sees a *use*, and therefore will trigger all it's
208 # C support machinery.  Also note that it means that autoscan, seeing
209 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
210
211
212
213 # _AM_DEPENDENCIES(NAME)
214 # ----------------------
215 # See how the compiler implements dependency checking.
216 # NAME is "CC", "CXX", "GCJ", or "OBJC".
217 # We try a few techniques and use that to set a single cache variable.
218 #
219 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
220 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
221 # dependency, and given that the user is not expected to run this macro,
222 # just rely on AC_PROG_CC.
223 AC_DEFUN([_AM_DEPENDENCIES],
224 [AC_REQUIRE([AM_SET_DEPDIR])dnl
225 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
226 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
227 AC_REQUIRE([AM_DEP_TRACK])dnl
228
229 ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
230        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
231        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
232        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
233                    [depcc="$$1"   am_compiler_list=])
234
235 AC_CACHE_CHECK([dependency style of $depcc],
236                [am_cv_$1_dependencies_compiler_type],
237 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
238   # We make a subdir and do the tests there.  Otherwise we can end up
239   # making bogus files that we don't know about and never remove.  For
240   # instance it was reported that on HP-UX the gcc test will end up
241   # making a dummy file named `D' -- because `-MD' means `put the output
242   # in D'.
243   mkdir conftest.dir
244   # Copy depcomp to subdir because otherwise we won't find it if we're
245   # using a relative directory.
246   cp "$am_depcomp" conftest.dir
247   cd conftest.dir
248   # We will build objects and dependencies in a subdirectory because
249   # it helps to detect inapplicable dependency modes.  For instance
250   # both Tru64's cc and ICC support -MD to output dependencies as a
251   # side effect of compilation, but ICC will put the dependencies in
252   # the current directory while Tru64 will put them in the object
253   # directory.
254   mkdir sub
255
256   am_cv_$1_dependencies_compiler_type=none
257   if test "$am_compiler_list" = ""; then
258      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
259   fi
260   for depmode in $am_compiler_list; do
261     # Setup a source with many dependencies, because some compilers
262     # like to wrap large dependency lists on column 80 (with \), and
263     # we should not choose a depcomp mode which is confused by this.
264     #
265     # We need to recreate these files for each test, as the compiler may
266     # overwrite some of them when testing with obscure command lines.
267     # This happens at least with the AIX C compiler.
268     : > sub/conftest.c
269     for i in 1 2 3 4 5 6; do
270       echo '#include "conftst'$i'.h"' >> sub/conftest.c
271       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
272       # Solaris 8's {/usr,}/bin/sh.
273       touch sub/conftst$i.h
274     done
275     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
276
277     case $depmode in
278     nosideeffect)
279       # after this tag, mechanisms are not by side-effect, so they'll
280       # only be used when explicitly requested
281       if test "x$enable_dependency_tracking" = xyes; then
282         continue
283       else
284         break
285       fi
286       ;;
287     none) break ;;
288     esac
289     # We check with `-c' and `-o' for the sake of the "dashmstdout"
290     # mode.  It turns out that the SunPro C++ compiler does not properly
291     # handle `-M -o', and we need to detect this.
292     if depmode=$depmode \
293        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
294        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
295        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
296          >/dev/null 2>conftest.err &&
297        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
298        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
299        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
300       # icc doesn't choke on unknown options, it will just issue warnings
301       # (even with -Werror).  So we grep stderr for any message
302       # that says an option was ignored.
303       if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
304         am_cv_$1_dependencies_compiler_type=$depmode
305         break
306       fi
307     fi
308   done
309
310   cd ..
311   rm -rf conftest.dir
312 else
313   am_cv_$1_dependencies_compiler_type=none
314 fi
315 ])
316 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
317 AM_CONDITIONAL([am__fastdep$1], [
318   test "x$enable_dependency_tracking" != xno \
319   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
320 ])
321
322
323 # AM_SET_DEPDIR
324 # -------------
325 # Choose a directory name for dependency files.
326 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
327 AC_DEFUN([AM_SET_DEPDIR],
328 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
329 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
330 ])
331
332
333 # AM_DEP_TRACK
334 # ------------
335 AC_DEFUN([AM_DEP_TRACK],
336 [AC_ARG_ENABLE(dependency-tracking,
337 [  --disable-dependency-tracking  speeds up one-time build
338   --enable-dependency-tracking   do not reject slow dependency extractors])
339 if test "x$enable_dependency_tracking" != xno; then
340   am_depcomp="$ac_aux_dir/depcomp"
341   AMDEPBACKSLASH='\'
342 fi
343 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
344 AC_SUBST([AMDEPBACKSLASH])
345 ])
346
347 # Generate code to set up dependency tracking.   -*- Autoconf -*-
348
349 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
350
351 # This program is free software; you can redistribute it and/or modify
352 # it under the terms of the GNU General Public License as published by
353 # the Free Software Foundation; either version 2, or (at your option)
354 # any later version.
355
356 # This program is distributed in the hope that it will be useful,
357 # but WITHOUT ANY WARRANTY; without even the implied warranty of
358 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
359 # GNU General Public License for more details.
360
361 # You should have received a copy of the GNU General Public License
362 # along with this program; if not, write to the Free Software
363 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
364 # 02111-1307, USA.
365
366 #serial 2
367
368 # _AM_OUTPUT_DEPENDENCY_COMMANDS
369 # ------------------------------
370 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
371 [for mf in $CONFIG_FILES; do
372   # Strip MF so we end up with the name of the file.
373   mf=`echo "$mf" | sed -e 's/:.*$//'`
374   # Check whether this is an Automake generated Makefile or not.
375   # We used to match only the files named `Makefile.in', but
376   # some people rename them; so instead we look at the file content.
377   # Grep'ing the first line is not enough: some people post-process
378   # each Makefile.in and add a new line on top of each file to say so.
379   # So let's grep whole file.
380   if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
381     dirpart=`AS_DIRNAME("$mf")`
382   else
383     continue
384   fi
385   grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
386   # Extract the definition of DEP_FILES from the Makefile without
387   # running `make'.
388   DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
389   test -z "$DEPDIR" && continue
390   # When using ansi2knr, U may be empty or an underscore; expand it
391   U=`sed -n 's/^U = //p' < "$mf"`
392   test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
393   # We invoke sed twice because it is the simplest approach to
394   # changing $(DEPDIR) to its actual value in the expansion.
395   for file in `sed -n '
396     /^DEP_FILES = .*\\\\$/ {
397       s/^DEP_FILES = //
398       :loop
399         s/\\\\$//
400         p
401         n
402         /\\\\$/ b loop
403       p
404     }
405     /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
406        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
407     # Make sure the directory exists.
408     test -f "$dirpart/$file" && continue
409     fdir=`AS_DIRNAME(["$file"])`
410     AS_MKDIR_P([$dirpart/$fdir])
411     # echo "creating $dirpart/$file"
412     echo '# dummy' > "$dirpart/$file"
413   done
414 done
415 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
416
417
418 # AM_OUTPUT_DEPENDENCY_COMMANDS
419 # -----------------------------
420 # This macro should only be invoked once -- use via AC_REQUIRE.
421 #
422 # This code is only required when automatic dependency tracking
423 # is enabled.  FIXME.  This creates each `.P' file that we will
424 # need in order to bootstrap the dependency handling code.
425 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
426 [AC_CONFIG_COMMANDS([depfiles],
427      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
428      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
429 ])
430
431 # Do all the work for Automake.                            -*- Autoconf -*-
432
433 # This macro actually does too much some checks are only needed if
434 # your package does certain things.  But this isn't really a big deal.
435
436 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
437 # Free Software Foundation, Inc.
438
439 # This program is free software; you can redistribute it and/or modify
440 # it under the terms of the GNU General Public License as published by
441 # the Free Software Foundation; either version 2, or (at your option)
442 # any later version.
443
444 # This program is distributed in the hope that it will be useful,
445 # but WITHOUT ANY WARRANTY; without even the implied warranty of
446 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
447 # GNU General Public License for more details.
448
449 # You should have received a copy of the GNU General Public License
450 # along with this program; if not, write to the Free Software
451 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
452 # 02111-1307, USA.
453
454 # serial 11
455
456 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
457 # AM_INIT_AUTOMAKE([OPTIONS])
458 # -----------------------------------------------
459 # The call with PACKAGE and VERSION arguments is the old style
460 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
461 # and VERSION should now be passed to AC_INIT and removed from
462 # the call to AM_INIT_AUTOMAKE.
463 # We support both call styles for the transition.  After
464 # the next Automake release, Autoconf can make the AC_INIT
465 # arguments mandatory, and then we can depend on a new Autoconf
466 # release and drop the old call support.
467 AC_DEFUN([AM_INIT_AUTOMAKE],
468 [AC_PREREQ([2.58])dnl
469 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
470 dnl the ones we care about.
471 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
472 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
473 AC_REQUIRE([AC_PROG_INSTALL])dnl
474 # test to see if srcdir already configured
475 if test "`cd $srcdir && pwd`" != "`pwd`" &&
476    test -f $srcdir/config.status; then
477   AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
478 fi
479
480 # test whether we have cygpath
481 if test -z "$CYGPATH_W"; then
482   if (cygpath --version) >/dev/null 2>/dev/null; then
483     CYGPATH_W='cygpath -w'
484   else
485     CYGPATH_W=echo
486   fi
487 fi
488 AC_SUBST([CYGPATH_W])
489
490 # Define the identity of the package.
491 dnl Distinguish between old-style and new-style calls.
492 m4_ifval([$2],
493 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
494  AC_SUBST([PACKAGE], [$1])dnl
495  AC_SUBST([VERSION], [$2])],
496 [_AM_SET_OPTIONS([$1])dnl
497  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
498  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
499
500 _AM_IF_OPTION([no-define],,
501 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
502  AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
503
504 # Some tools Automake needs.
505 AC_REQUIRE([AM_SANITY_CHECK])dnl
506 AC_REQUIRE([AC_ARG_PROGRAM])dnl
507 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
508 AM_MISSING_PROG(AUTOCONF, autoconf)
509 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
510 AM_MISSING_PROG(AUTOHEADER, autoheader)
511 AM_MISSING_PROG(MAKEINFO, makeinfo)
512 AM_MISSING_PROG(AMTAR, tar)
513 AM_PROG_INSTALL_SH
514 AM_PROG_INSTALL_STRIP
515 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
516 # We need awk for the "check" target.  The system "awk" is bad on
517 # some platforms.
518 AC_REQUIRE([AC_PROG_AWK])dnl
519 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
520 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
521
522 _AM_IF_OPTION([no-dependencies],,
523 [AC_PROVIDE_IFELSE([AC_PROG_CC],
524                   [_AM_DEPENDENCIES(CC)],
525                   [define([AC_PROG_CC],
526                           defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
527 AC_PROVIDE_IFELSE([AC_PROG_CXX],
528                   [_AM_DEPENDENCIES(CXX)],
529                   [define([AC_PROG_CXX],
530                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
531 ])
532 ])
533
534
535 # When config.status generates a header, we must update the stamp-h file.
536 # This file resides in the same directory as the config header
537 # that is generated.  The stamp files are numbered to have different names.
538
539 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
540 # loop where config.status creates the headers, so we can generate
541 # our stamp files there.
542 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
543 [# Compute $1's index in $config_headers.
544 _am_stamp_count=1
545 for _am_header in $config_headers :; do
546   case $_am_header in
547     $1 | $1:* )
548       break ;;
549     * )
550       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
551   esac
552 done
553 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
554
555 # AM_PROG_INSTALL_SH
556 # ------------------
557 # Define $install_sh.
558
559 # Copyright (C) 2001, 2003 Free Software Foundation, Inc.
560
561 # This program is free software; you can redistribute it and/or modify
562 # it under the terms of the GNU General Public License as published by
563 # the Free Software Foundation; either version 2, or (at your option)
564 # any later version.
565
566 # This program is distributed in the hope that it will be useful,
567 # but WITHOUT ANY WARRANTY; without even the implied warranty of
568 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
569 # GNU General Public License for more details.
570
571 # You should have received a copy of the GNU General Public License
572 # along with this program; if not, write to the Free Software
573 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
574 # 02111-1307, USA.
575
576 AC_DEFUN([AM_PROG_INSTALL_SH],
577 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
578 install_sh=${install_sh-"$am_aux_dir/install-sh"}
579 AC_SUBST(install_sh)])
580
581 #                                                          -*- Autoconf -*-
582 # Copyright (C) 2003  Free Software Foundation, Inc.
583
584 # This program is free software; you can redistribute it and/or modify
585 # it under the terms of the GNU General Public License as published by
586 # the Free Software Foundation; either version 2, or (at your option)
587 # any later version.
588
589 # This program is distributed in the hope that it will be useful,
590 # but WITHOUT ANY WARRANTY; without even the implied warranty of
591 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
592 # GNU General Public License for more details.
593
594 # You should have received a copy of the GNU General Public License
595 # along with this program; if not, write to the Free Software
596 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
597 # 02111-1307, USA.
598
599 # serial 1
600
601 # Check whether the underlying file-system supports filenames
602 # with a leading dot.  For instance MS-DOS doesn't.
603 AC_DEFUN([AM_SET_LEADING_DOT],
604 [rm -rf .tst 2>/dev/null
605 mkdir .tst 2>/dev/null
606 if test -d .tst; then
607   am__leading_dot=.
608 else
609   am__leading_dot=_
610 fi
611 rmdir .tst 2>/dev/null
612 AC_SUBST([am__leading_dot])])
613
614 # Add --enable-maintainer-mode option to configure.
615 # From Jim Meyering
616
617 # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004
618 # Free Software Foundation, Inc.
619
620 # This program is free software; you can redistribute it and/or modify
621 # it under the terms of the GNU General Public License as published by
622 # the Free Software Foundation; either version 2, or (at your option)
623 # any later version.
624
625 # This program is distributed in the hope that it will be useful,
626 # but WITHOUT ANY WARRANTY; without even the implied warranty of
627 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
628 # GNU General Public License for more details.
629
630 # You should have received a copy of the GNU General Public License
631 # along with this program; if not, write to the Free Software
632 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
633 # 02111-1307, USA.
634
635 # serial 3
636
637 AC_DEFUN([AM_MAINTAINER_MODE],
638 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
639   dnl maintainer-mode is disabled by default
640   AC_ARG_ENABLE(maintainer-mode,
641 [  --enable-maintainer-mode  enable make rules and dependencies not useful
642                           (and sometimes confusing) to the casual installer],
643       USE_MAINTAINER_MODE=$enableval,
644       USE_MAINTAINER_MODE=no)
645   AC_MSG_RESULT([$USE_MAINTAINER_MODE])
646   AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
647   MAINT=$MAINTAINER_MODE_TRUE
648   AC_SUBST(MAINT)dnl
649 ]
650 )
651
652 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
653
654 # Check to see how 'make' treats includes.      -*- Autoconf -*-
655
656 # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
657
658 # This program is free software; you can redistribute it and/or modify
659 # it under the terms of the GNU General Public License as published by
660 # the Free Software Foundation; either version 2, or (at your option)
661 # any later version.
662
663 # This program is distributed in the hope that it will be useful,
664 # but WITHOUT ANY WARRANTY; without even the implied warranty of
665 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
666 # GNU General Public License for more details.
667
668 # You should have received a copy of the GNU General Public License
669 # along with this program; if not, write to the Free Software
670 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
671 # 02111-1307, USA.
672
673 # serial 2
674
675 # AM_MAKE_INCLUDE()
676 # -----------------
677 # Check to see how make treats includes.
678 AC_DEFUN([AM_MAKE_INCLUDE],
679 [am_make=${MAKE-make}
680 cat > confinc << 'END'
681 am__doit:
682         @echo done
683 .PHONY: am__doit
684 END
685 # If we don't find an include directive, just comment out the code.
686 AC_MSG_CHECKING([for style of include used by $am_make])
687 am__include="#"
688 am__quote=
689 _am_result=none
690 # First try GNU make style include.
691 echo "include confinc" > confmf
692 # We grep out `Entering directory' and `Leaving directory'
693 # messages which can occur if `w' ends up in MAKEFLAGS.
694 # In particular we don't look at `^make:' because GNU make might
695 # be invoked under some other name (usually "gmake"), in which
696 # case it prints its new name instead of `make'.
697 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
698    am__include=include
699    am__quote=
700    _am_result=GNU
701 fi
702 # Now try BSD make style include.
703 if test "$am__include" = "#"; then
704    echo '.include "confinc"' > confmf
705    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
706       am__include=.include
707       am__quote="\""
708       _am_result=BSD
709    fi
710 fi
711 AC_SUBST([am__include])
712 AC_SUBST([am__quote])
713 AC_MSG_RESULT([$_am_result])
714 rm -f confinc confmf
715 ])
716
717 # serial 2
718
719 # AM_PROG_CC_C_O
720 # --------------
721 # Like AC_PROG_CC_C_O, but changed for automake.
722
723 # Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
724
725 # This program is free software; you can redistribute it and/or modify
726 # it under the terms of the GNU General Public License as published by
727 # the Free Software Foundation; either version 2, or (at your option)
728 # any later version.
729
730 # This program is distributed in the hope that it will be useful,
731 # but WITHOUT ANY WARRANTY; without even the implied warranty of
732 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
733 # GNU General Public License for more details.
734
735 # You should have received a copy of the GNU General Public License
736 # along with this program; if not, write to the Free Software
737 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
738 # 02111-1307, USA.
739
740 AC_DEFUN([AM_PROG_CC_C_O],
741 [AC_REQUIRE([AC_PROG_CC_C_O])dnl
742 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
743 # FIXME: we rely on the cache variable name because
744 # there is no other way.
745 set dummy $CC
746 ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
747 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
748    # Losing compiler, so override with the script.
749    # FIXME: It is wrong to rewrite CC.
750    # But if we don't then we get into trouble of one sort or another.
751    # A longer-term fix would be to have automake use am__CC in this case,
752    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
753    CC="$am_aux_dir/compile $CC"
754 fi
755 ])
756
757 #  -*- Autoconf -*-
758
759
760 # Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
761
762 # This program is free software; you can redistribute it and/or modify
763 # it under the terms of the GNU General Public License as published by
764 # the Free Software Foundation; either version 2, or (at your option)
765 # any later version.
766
767 # This program is distributed in the hope that it will be useful,
768 # but WITHOUT ANY WARRANTY; without even the implied warranty of
769 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
770 # GNU General Public License for more details.
771
772 # You should have received a copy of the GNU General Public License
773 # along with this program; if not, write to the Free Software
774 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
775 # 02111-1307, USA.
776
777 # serial 3
778
779 # AM_MISSING_PROG(NAME, PROGRAM)
780 # ------------------------------
781 AC_DEFUN([AM_MISSING_PROG],
782 [AC_REQUIRE([AM_MISSING_HAS_RUN])
783 $1=${$1-"${am_missing_run}$2"}
784 AC_SUBST($1)])
785
786
787 # AM_MISSING_HAS_RUN
788 # ------------------
789 # Define MISSING if not defined so far and test if it supports --run.
790 # If it does, set am_missing_run to use it, otherwise, to nothing.
791 AC_DEFUN([AM_MISSING_HAS_RUN],
792 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
793 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
794 # Use eval to expand $SHELL
795 if eval "$MISSING --run true"; then
796   am_missing_run="$MISSING --run "
797 else
798   am_missing_run=
799   AC_MSG_WARN([`missing' script is too old or missing])
800 fi
801 ])
802
803 # AM_PROG_MKDIR_P
804 # ---------------
805 # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
806
807 # Copyright (C) 2003, 2004 Free Software Foundation, Inc.
808
809 # This program is free software; you can redistribute it and/or modify
810 # it under the terms of the GNU General Public License as published by
811 # the Free Software Foundation; either version 2, or (at your option)
812 # any later version.
813
814 # This program is distributed in the hope that it will be useful,
815 # but WITHOUT ANY WARRANTY; without even the implied warranty of
816 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
817 # GNU General Public License for more details.
818
819 # You should have received a copy of the GNU General Public License
820 # along with this program; if not, write to the Free Software
821 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
822 # 02111-1307, USA.
823
824 # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
825 # created by `make install' are always world readable, even if the
826 # installer happens to have an overly restrictive umask (e.g. 077).
827 # This was a mistake.  There are at least two reasons why we must not
828 # use `-m 0755':
829 #   - it causes special bits like SGID to be ignored,
830 #   - it may be too restrictive (some setups expect 775 directories).
831 #
832 # Do not use -m 0755 and let people choose whatever they expect by
833 # setting umask.
834 #
835 # We cannot accept any implementation of `mkdir' that recognizes `-p'.
836 # Some implementations (such as Solaris 8's) are not thread-safe: if a
837 # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
838 # concurrently, both version can detect that a/ is missing, but only
839 # one can create it and the other will error out.  Consequently we
840 # restrict ourselves to GNU make (using the --version option ensures
841 # this.)
842 AC_DEFUN([AM_PROG_MKDIR_P],
843 [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
844   # Keeping the `.' argument allows $(mkdir_p) to be used without
845   # argument.  Indeed, we sometimes output rules like
846   #   $(mkdir_p) $(somedir)
847   # where $(somedir) is conditionally defined.
848   # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more
849   # expensive solution, as it forces Make to start a sub-shell.)
850   mkdir_p='mkdir -p -- .'
851 else
852   # On NextStep and OpenStep, the `mkdir' command does not
853   # recognize any option.  It will interpret all options as
854   # directories to create, and then abort because `.' already
855   # exists.
856   for d in ./-p ./--version;
857   do
858     test -d $d && rmdir $d
859   done
860   # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
861   if test -f "$ac_aux_dir/mkinstalldirs"; then
862     mkdir_p='$(mkinstalldirs)'
863   else
864     mkdir_p='$(install_sh) -d'
865   fi
866 fi
867 AC_SUBST([mkdir_p])])
868
869 # Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004
870 # Free Software Foundation, Inc.
871
872 # This program is free software; you can redistribute it and/or modify
873 # it under the terms of the GNU General Public License as published by
874 # the Free Software Foundation; either version 2, or (at your option)
875 # any later version.
876
877 # This program is distributed in the hope that it will be useful,
878 # but WITHOUT ANY WARRANTY; without even the implied warranty of
879 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
880 # GNU General Public License for more details.
881
882 # You should have received a copy of the GNU General Public License
883 # along with this program; if not, write to the Free Software
884 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
885 # 02111-1307, USA.
886
887 # serial 4
888
889 # AM_ENABLE_MULTILIB([MAKEFILE], [REL-TO-TOP-SRCDIR])
890 # ---------------------------------------------------
891 # Add --enable-multilib to configure.
892 AC_DEFUN([AM_ENABLE_MULTILIB],
893 [# Default to --enable-multilib
894 AC_ARG_ENABLE(multilib,
895 [  --enable-multilib       build many library versions (default)],
896 [case "$enableval" in
897   yes) multilib=yes ;;
898   no)  multilib=no ;;
899   *)   AC_MSG_ERROR([bad value $enableval for multilib option]) ;;
900  esac],
901               [multilib=yes])
902
903 # We may get other options which we leave undocumented:
904 # --with-target-subdir, --with-multisrctop, --with-multisubdir
905 # See config-ml.in if you want the gory details.
906
907 if test "$srcdir" = "."; then
908   if test "$with_target_subdir" != "."; then
909     multi_basedir="$srcdir/$with_multisrctop../$2"
910   else
911     multi_basedir="$srcdir/$with_multisrctop$2"
912   fi
913 else
914   multi_basedir="$srcdir/$2"
915 fi
916 AC_SUBST(multi_basedir)
917
918 AC_OUTPUT_COMMANDS([
919 # Only add multilib support code if we just rebuilt the top-level
920 # Makefile.
921 case " $CONFIG_FILES " in
922  *" ]m4_default([$1],Makefile)[ "*)
923    ac_file=]m4_default([$1],Makefile)[ . ${multi_basedir}/config-ml.in
924    ;;
925 esac],
926                    [
927 srcdir="$srcdir"
928 host="$host"
929 target="$target"
930 with_multisubdir="$with_multisubdir"
931 with_multisrctop="$with_multisrctop"
932 with_target_subdir="$with_target_subdir"
933 ac_configure_args="${multilib_arg} ${ac_configure_args}"
934 multi_basedir="$multi_basedir"
935 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
936 CC="$CC"])])dnl
937
938 # Helper functions for option handling.                    -*- Autoconf -*-
939
940 # Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
941
942 # This program is free software; you can redistribute it and/or modify
943 # it under the terms of the GNU General Public License as published by
944 # the Free Software Foundation; either version 2, or (at your option)
945 # any later version.
946
947 # This program is distributed in the hope that it will be useful,
948 # but WITHOUT ANY WARRANTY; without even the implied warranty of
949 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
950 # GNU General Public License for more details.
951
952 # You should have received a copy of the GNU General Public License
953 # along with this program; if not, write to the Free Software
954 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
955 # 02111-1307, USA.
956
957 # serial 2
958
959 # _AM_MANGLE_OPTION(NAME)
960 # -----------------------
961 AC_DEFUN([_AM_MANGLE_OPTION],
962 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
963
964 # _AM_SET_OPTION(NAME)
965 # ------------------------------
966 # Set option NAME.  Presently that only means defining a flag for this option.
967 AC_DEFUN([_AM_SET_OPTION],
968 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
969
970 # _AM_SET_OPTIONS(OPTIONS)
971 # ----------------------------------
972 # OPTIONS is a space-separated list of Automake options.
973 AC_DEFUN([_AM_SET_OPTIONS],
974 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
975
976 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
977 # -------------------------------------------
978 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
979 AC_DEFUN([_AM_IF_OPTION],
980 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
981
982 #
983 # Check to make sure that the build environment is sane.
984 #
985
986 # Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
987
988 # This program is free software; you can redistribute it and/or modify
989 # it under the terms of the GNU General Public License as published by
990 # the Free Software Foundation; either version 2, or (at your option)
991 # any later version.
992
993 # This program is distributed in the hope that it will be useful,
994 # but WITHOUT ANY WARRANTY; without even the implied warranty of
995 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
996 # GNU General Public License for more details.
997
998 # You should have received a copy of the GNU General Public License
999 # along with this program; if not, write to the Free Software
1000 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1001 # 02111-1307, USA.
1002
1003 # serial 3
1004
1005 # AM_SANITY_CHECK
1006 # ---------------
1007 AC_DEFUN([AM_SANITY_CHECK],
1008 [AC_MSG_CHECKING([whether build environment is sane])
1009 # Just in case
1010 sleep 1
1011 echo timestamp > conftest.file
1012 # Do `set' in a subshell so we don't clobber the current shell's
1013 # arguments.  Must try -L first in case configure is actually a
1014 # symlink; some systems play weird games with the mod time of symlinks
1015 # (eg FreeBSD returns the mod time of the symlink's containing
1016 # directory).
1017 if (
1018    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
1019    if test "$[*]" = "X"; then
1020       # -L didn't work.
1021       set X `ls -t $srcdir/configure conftest.file`
1022    fi
1023    rm -f conftest.file
1024    if test "$[*]" != "X $srcdir/configure conftest.file" \
1025       && test "$[*]" != "X conftest.file $srcdir/configure"; then
1026
1027       # If neither matched, then we have a broken ls.  This can happen
1028       # if, for instance, CONFIG_SHELL is bash and it inherits a
1029       # broken ls alias from the environment.  This has actually
1030       # happened.  Such a system could not be considered "sane".
1031       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
1032 alias in your environment])
1033    fi
1034
1035    test "$[2]" = conftest.file
1036    )
1037 then
1038    # Ok.
1039    :
1040 else
1041    AC_MSG_ERROR([newly created file is older than distributed files!
1042 Check your system clock])
1043 fi
1044 AC_MSG_RESULT(yes)])
1045
1046 # AM_PROG_INSTALL_STRIP
1047
1048 # Copyright (C) 2001, 2003 Free Software Foundation, Inc.
1049
1050 # This program is free software; you can redistribute it and/or modify
1051 # it under the terms of the GNU General Public License as published by
1052 # the Free Software Foundation; either version 2, or (at your option)
1053 # any later version.
1054
1055 # This program is distributed in the hope that it will be useful,
1056 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1057 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1058 # GNU General Public License for more details.
1059
1060 # You should have received a copy of the GNU General Public License
1061 # along with this program; if not, write to the Free Software
1062 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1063 # 02111-1307, USA.
1064
1065 # One issue with vendor `install' (even GNU) is that you can't
1066 # specify the program used to strip binaries.  This is especially
1067 # annoying in cross-compiling environments, where the build's strip
1068 # is unlikely to handle the host's binaries.
1069 # Fortunately install-sh will honor a STRIPPROG variable, so we
1070 # always use install-sh in `make install-strip', and initialize
1071 # STRIPPROG with the value of the STRIP variable (set by the user).
1072 AC_DEFUN([AM_PROG_INSTALL_STRIP],
1073 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1074 # Installed binaries are usually stripped using `strip' when the user
1075 # run `make install-strip'.  However `strip' might not be the right
1076 # tool to use in cross-compilation environments, therefore Automake
1077 # will honor the `STRIP' environment variable to overrule this program.
1078 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1079 if test "$cross_compiling" != no; then
1080   AC_CHECK_TOOL([STRIP], [strip], :)
1081 fi
1082 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
1083 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1084
1085 m4_include([acinclude.m4])