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