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