1 # generated automatically by aclocal 1.7.9 -*- Autoconf -*-
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.
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
14 sinclude(../libtool.m4)
15 dnl The lines below arrange for aclocal not to bring libtool.m4
16 dnl AC_PROG_LIBTOOL into aclocal.m4, while still arranging for automake
17 dnl to add a definition of LIBTOOL to Makefile.in.
19 AC_DEFUN([AC_PROG_LIBTOOL],)
20 AC_DEFUN([AM_PROG_LIBTOOL],)
24 # mmap(2) blacklisting. Some platforms provide the mmap library routine
25 # but don't support all of the features we need from it.
26 AC_DEFUN([AC_FUNC_MMAP_BLACKLIST],
27 [if test $ac_cv_header_sys_mman_h != yes \
28 || test $ac_cv_func_mmap != yes; then
29 ac_cv_func_mmap_file=no
30 ac_cv_func_mmap_dev_zero=no
31 ac_cv_func_mmap_anon=no
33 AC_CACHE_CHECK([whether read-only mmap of a plain file works],
35 [# Add a system to this blacklist if
36 # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a
37 # memory area containing the same data that you'd get if you applied
38 # read() to the same fd. The only system known to have a problem here
39 # is VMS, where text files have record structure.
42 ac_cv_func_mmap_file=no ;;
44 ac_cv_func_mmap_file=yes;;
46 AC_CACHE_CHECK([whether mmap from /dev/zero works],
47 ac_cv_func_mmap_dev_zero,
48 [# Add a system to this blacklist if it has mmap() but /dev/zero
49 # does not exist, or if mmapping /dev/zero does not give anonymous
50 # zeroed pages with both the following properties:
51 # 1. If you map N consecutive pages in with one call, and then
52 # unmap any subset of those pages, the pages that were not
53 # explicitly unmapped remain accessible.
54 # 2. If you map two adjacent blocks of memory and then unmap them
55 # both at once, they must both go away.
56 # Systems known to be in this category are Windows (all variants),
59 vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
60 ac_cv_func_mmap_dev_zero=no ;;
62 ac_cv_func_mmap_dev_zero=yes;;
65 # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
66 AC_CACHE_CHECK([for MAP_ANON(YMOUS)], ac_cv_decl_map_anon,
68 [#include <sys/types.h>
73 #define MAP_ANONYMOUS MAP_ANON
76 [int n = MAP_ANONYMOUS;],
77 ac_cv_decl_map_anon=yes,
78 ac_cv_decl_map_anon=no)])
80 if test $ac_cv_decl_map_anon = no; then
81 ac_cv_func_mmap_anon=no
83 AC_CACHE_CHECK([whether mmap with MAP_ANON(YMOUS) works],
85 [# Add a system to this blacklist if it has mmap() and MAP_ANON or
86 # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
87 # doesn't give anonymous zeroed pages with the same properties listed
88 # above for use of /dev/zero.
89 # Systems known to be in this category are Windows, VMS, and SCO Unix.
91 vms* | cygwin* | pe | mingw* | sco* | udk* )
92 ac_cv_func_mmap_anon=no ;;
94 ac_cv_func_mmap_anon=yes;;
99 if test $ac_cv_func_mmap_file = yes; then
100 AC_DEFINE(HAVE_MMAP_FILE, 1,
101 [Define if read-only mmap of a plain file works.])
103 if test $ac_cv_func_mmap_dev_zero = yes; then
104 AC_DEFINE(HAVE_MMAP_DEV_ZERO, 1,
105 [Define if mmap of /dev/zero works.])
107 if test $ac_cv_func_mmap_anon = yes; then
108 AC_DEFINE(HAVE_MMAP_ANON, 1,
109 [Define if mmap with MAP_ANON(YMOUS) works.])
113 sinclude(../config/accross.m4)
115 # Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
117 # This program is free software; you can redistribute it and/or modify
118 # it under the terms of the GNU General Public License as published by
119 # the Free Software Foundation; either version 2, or (at your option)
122 # This program is distributed in the hope that it will be useful,
123 # but WITHOUT ANY WARRANTY; without even the implied warranty of
124 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
125 # GNU General Public License for more details.
127 # You should have received a copy of the GNU General Public License
128 # along with this program; if not, write to the Free Software
129 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
134 # AM_ENABLE_MULTILIB([MAKEFILE], [REL-TO-TOP-SRCDIR])
135 # ---------------------------------------------------
136 # Add --enable-multilib to configure.
137 AC_DEFUN([AM_ENABLE_MULTILIB],
138 [# Default to --enable-multilib
139 AC_ARG_ENABLE(multilib,
140 [ --enable-multilib build many library versions (default)],
141 [case "$enableval" in
144 *) AC_MSG_ERROR([bad value $enableval for multilib option]) ;;
148 # We may get other options which we leave undocumented:
149 # --with-target-subdir, --with-multisrctop, --with-multisubdir
150 # See config-ml.in if you want the gory details.
152 if test "$srcdir" = "."; then
153 if test "$with_target_subdir" != "."; then
154 multi_basedir="$srcdir/$with_multisrctop../$2"
156 multi_basedir="$srcdir/$with_multisrctop$2"
159 multi_basedir="$srcdir/$2"
161 AC_SUBST(multi_basedir)
164 # Only add multilib support code if we just rebuilt the top-level
166 case " $CONFIG_FILES " in
167 *" ]m4_default([$1],Makefile)[ "*)
168 ac_file=]m4_default([$1],Makefile)[ . ${multi_basedir}/config-ml.in
175 with_multisubdir="$with_multisubdir"
176 with_multisrctop="$with_multisrctop"
177 with_target_subdir="$with_target_subdir"
178 ac_configure_args="${multilib_arg} ${ac_configure_args}"
179 multi_basedir="$multi_basedir"
180 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
183 # Do all the work for Automake. -*- Autoconf -*-
185 # This macro actually does too much some checks are only needed if
186 # your package does certain things. But this isn't really a big deal.
188 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
189 # Free Software Foundation, Inc.
191 # This program is free software; you can redistribute it and/or modify
192 # it under the terms of the GNU General Public License as published by
193 # the Free Software Foundation; either version 2, or (at your option)
196 # This program is distributed in the hope that it will be useful,
197 # but WITHOUT ANY WARRANTY; without even the implied warranty of
198 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
199 # GNU General Public License for more details.
201 # You should have received a copy of the GNU General Public License
202 # along with this program; if not, write to the Free Software
203 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
210 # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
211 # the ones we care about.
212 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
214 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
215 # AM_INIT_AUTOMAKE([OPTIONS])
216 # -----------------------------------------------
217 # The call with PACKAGE and VERSION arguments is the old style
218 # call (pre autoconf-2.50), which is being phased out. PACKAGE
219 # and VERSION should now be passed to AC_INIT and removed from
220 # the call to AM_INIT_AUTOMAKE.
221 # We support both call styles for the transition. After
222 # the next Automake release, Autoconf can make the AC_INIT
223 # arguments mandatory, and then we can depend on a new Autoconf
224 # release and drop the old call support.
225 AC_DEFUN([AM_INIT_AUTOMAKE],
226 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
227 AC_REQUIRE([AC_PROG_INSTALL])dnl
228 # test to see if srcdir already configured
229 if test "`cd $srcdir && pwd`" != "`pwd`" &&
230 test -f $srcdir/config.status; then
231 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
234 # test whether we have cygpath
235 if test -z "$CYGPATH_W"; then
236 if (cygpath --version) >/dev/null 2>/dev/null; then
237 CYGPATH_W='cygpath -w'
242 AC_SUBST([CYGPATH_W])
244 # Define the identity of the package.
245 dnl Distinguish between old-style and new-style calls.
247 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
248 AC_SUBST([PACKAGE], [$1])dnl
249 AC_SUBST([VERSION], [$2])],
250 [_AM_SET_OPTIONS([$1])dnl
251 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
252 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
254 _AM_IF_OPTION([no-define],,
255 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
256 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
258 # Some tools Automake needs.
259 AC_REQUIRE([AM_SANITY_CHECK])dnl
260 AC_REQUIRE([AC_ARG_PROGRAM])dnl
261 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
262 AM_MISSING_PROG(AUTOCONF, autoconf)
263 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
264 AM_MISSING_PROG(AUTOHEADER, autoheader)
265 AM_MISSING_PROG(MAKEINFO, makeinfo)
266 AM_MISSING_PROG(AMTAR, tar)
268 AM_PROG_INSTALL_STRIP
269 # We need awk for the "check" target. The system "awk" is bad on
271 AC_REQUIRE([AC_PROG_AWK])dnl
272 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
273 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
275 _AM_IF_OPTION([no-dependencies],,
276 [AC_PROVIDE_IFELSE([AC_PROG_CC],
277 [_AM_DEPENDENCIES(CC)],
278 [define([AC_PROG_CC],
279 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
280 AC_PROVIDE_IFELSE([AC_PROG_CXX],
281 [_AM_DEPENDENCIES(CXX)],
282 [define([AC_PROG_CXX],
283 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
288 # When config.status generates a header, we must update the stamp-h file.
289 # This file resides in the same directory as the config header
290 # that is generated. The stamp files are numbered to have different names.
292 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
293 # loop where config.status creates the headers, so we can generate
294 # our stamp files there.
295 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
296 [# Compute $1's index in $config_headers.
298 for _am_header in $config_headers :; do
303 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
306 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
308 # Copyright 2002 Free Software Foundation, Inc.
310 # This program is free software; you can redistribute it and/or modify
311 # it under the terms of the GNU General Public License as published by
312 # the Free Software Foundation; either version 2, or (at your option)
315 # This program is distributed in the hope that it will be useful,
316 # but WITHOUT ANY WARRANTY; without even the implied warranty of
317 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
318 # GNU General Public License for more details.
320 # You should have received a copy of the GNU General Public License
321 # along with this program; if not, write to the Free Software
322 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
324 # AM_AUTOMAKE_VERSION(VERSION)
325 # ----------------------------
326 # Automake X.Y traces this macro to ensure aclocal.m4 has been
327 # generated from the m4 files accompanying Automake X.Y.
328 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
330 # AM_SET_CURRENT_AUTOMAKE_VERSION
331 # -------------------------------
332 # Call AM_AUTOMAKE_VERSION so it can be traced.
333 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
334 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
335 [AM_AUTOMAKE_VERSION([1.7.9])])
337 # Helper functions for option handling. -*- Autoconf -*-
339 # Copyright 2001, 2002 Free Software Foundation, Inc.
341 # This program is free software; you can redistribute it and/or modify
342 # it under the terms of the GNU General Public License as published by
343 # the Free Software Foundation; either version 2, or (at your option)
346 # This program is distributed in the hope that it will be useful,
347 # but WITHOUT ANY WARRANTY; without even the implied warranty of
348 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
349 # GNU General Public License for more details.
351 # You should have received a copy of the GNU General Public License
352 # along with this program; if not, write to the Free Software
353 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
358 # _AM_MANGLE_OPTION(NAME)
359 # -----------------------
360 AC_DEFUN([_AM_MANGLE_OPTION],
361 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
363 # _AM_SET_OPTION(NAME)
364 # ------------------------------
365 # Set option NAME. Presently that only means defining a flag for this option.
366 AC_DEFUN([_AM_SET_OPTION],
367 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
369 # _AM_SET_OPTIONS(OPTIONS)
370 # ----------------------------------
371 # OPTIONS is a space-separated list of Automake options.
372 AC_DEFUN([_AM_SET_OPTIONS],
373 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
375 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
376 # -------------------------------------------
377 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
378 AC_DEFUN([_AM_IF_OPTION],
379 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
382 # Check to make sure that the build environment is sane.
385 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
387 # This program is free software; you can redistribute it and/or modify
388 # it under the terms of the GNU General Public License as published by
389 # the Free Software Foundation; either version 2, or (at your option)
392 # This program is distributed in the hope that it will be useful,
393 # but WITHOUT ANY WARRANTY; without even the implied warranty of
394 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
395 # GNU General Public License for more details.
397 # You should have received a copy of the GNU General Public License
398 # along with this program; if not, write to the Free Software
399 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
406 AC_DEFUN([AM_SANITY_CHECK],
407 [AC_MSG_CHECKING([whether build environment is sane])
410 echo timestamp > conftest.file
411 # Do `set' in a subshell so we don't clobber the current shell's
412 # arguments. Must try -L first in case configure is actually a
413 # symlink; some systems play weird games with the mod time of symlinks
414 # (eg FreeBSD returns the mod time of the symlink's containing
417 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
418 if test "$[*]" = "X"; then
420 set X `ls -t $srcdir/configure conftest.file`
423 if test "$[*]" != "X $srcdir/configure conftest.file" \
424 && test "$[*]" != "X conftest.file $srcdir/configure"; then
426 # If neither matched, then we have a broken ls. This can happen
427 # if, for instance, CONFIG_SHELL is bash and it inherits a
428 # broken ls alias from the environment. This has actually
429 # happened. Such a system could not be considered "sane".
430 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
431 alias in your environment])
434 test "$[2]" = conftest.file
440 AC_MSG_ERROR([newly created file is older than distributed files!
441 Check your system clock])
448 # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
450 # This program is free software; you can redistribute it and/or modify
451 # it under the terms of the GNU General Public License as published by
452 # the Free Software Foundation; either version 2, or (at your option)
455 # This program is distributed in the hope that it will be useful,
456 # but WITHOUT ANY WARRANTY; without even the implied warranty of
457 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
458 # GNU General Public License for more details.
460 # You should have received a copy of the GNU General Public License
461 # along with this program; if not, write to the Free Software
462 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
467 # AM_MISSING_PROG(NAME, PROGRAM)
468 # ------------------------------
469 AC_DEFUN([AM_MISSING_PROG],
470 [AC_REQUIRE([AM_MISSING_HAS_RUN])
471 $1=${$1-"${am_missing_run}$2"}
477 # Define MISSING if not defined so far and test if it supports --run.
478 # If it does, set am_missing_run to use it, otherwise, to nothing.
479 AC_DEFUN([AM_MISSING_HAS_RUN],
480 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
481 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
482 # Use eval to expand $SHELL
483 if eval "$MISSING --run true"; then
484 am_missing_run="$MISSING --run "
487 AC_MSG_WARN([`missing' script is too old or missing])
493 # Copyright 2001 Free Software Foundation, Inc.
495 # This program is free software; you can redistribute it and/or modify
496 # it under the terms of the GNU General Public License as published by
497 # the Free Software Foundation; either version 2, or (at your option)
500 # This program is distributed in the hope that it will be useful,
501 # but WITHOUT ANY WARRANTY; without even the implied warranty of
502 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
503 # GNU General Public License for more details.
505 # You should have received a copy of the GNU General Public License
506 # along with this program; if not, write to the Free Software
507 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
510 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
511 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
512 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
514 # Of course, Automake must honor this variable whenever it calls a
515 # tool from the auxiliary directory. The problem is that $srcdir (and
516 # therefore $ac_aux_dir as well) can be either absolute or relative,
517 # depending on how configure is run. This is pretty annoying, since
518 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
519 # source directory, any form will work fine, but in subdirectories a
520 # relative path needs to be adjusted first.
522 # $ac_aux_dir/missing
523 # fails when called from a subdirectory if $ac_aux_dir is relative
524 # $top_srcdir/$ac_aux_dir/missing
525 # fails if $ac_aux_dir is absolute,
526 # fails when called from a subdirectory in a VPATH build with
527 # a relative $ac_aux_dir
529 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
530 # are both prefixed by $srcdir. In an in-source build this is usually
531 # harmless because $srcdir is `.', but things will broke when you
532 # start a VPATH build or use an absolute $srcdir.
534 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
535 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
536 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
537 # and then we would define $MISSING as
538 # MISSING="\${SHELL} $am_aux_dir/missing"
539 # This will work as long as MISSING is not called from configure, because
540 # unfortunately $(top_srcdir) has no meaning in configure.
541 # However there are other variables, like CC, which are often used in
542 # configure, and could therefore not use this "fixed" $ac_aux_dir.
544 # Another solution, used here, is to always expand $ac_aux_dir to an
545 # absolute PATH. The drawback is that using absolute paths prevent a
546 # configured tree to be moved without reconfiguration.
548 # Rely on autoconf to set up CDPATH properly.
551 AC_DEFUN([AM_AUX_DIR_EXPAND], [
552 # expand $ac_aux_dir to an absolute path
553 am_aux_dir=`cd $ac_aux_dir && pwd`
558 # Define $install_sh.
560 # Copyright 2001 Free Software Foundation, Inc.
562 # This program is free software; you can redistribute it and/or modify
563 # it under the terms of the GNU General Public License as published by
564 # the Free Software Foundation; either version 2, or (at your option)
567 # This program is distributed in the hope that it will be useful,
568 # but WITHOUT ANY WARRANTY; without even the implied warranty of
569 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
570 # GNU General Public License for more details.
572 # You should have received a copy of the GNU General Public License
573 # along with this program; if not, write to the Free Software
574 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
577 AC_DEFUN([AM_PROG_INSTALL_SH],
578 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
579 install_sh=${install_sh-"$am_aux_dir/install-sh"}
580 AC_SUBST(install_sh)])
582 # AM_PROG_INSTALL_STRIP
584 # Copyright 2001 Free Software Foundation, Inc.
586 # This program is free software; you can redistribute it and/or modify
587 # it under the terms of the GNU General Public License as published by
588 # the Free Software Foundation; either version 2, or (at your option)
591 # This program is distributed in the hope that it will be useful,
592 # but WITHOUT ANY WARRANTY; without even the implied warranty of
593 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
594 # GNU General Public License for more details.
596 # You should have received a copy of the GNU General Public License
597 # along with this program; if not, write to the Free Software
598 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
601 # One issue with vendor `install' (even GNU) is that you can't
602 # specify the program used to strip binaries. This is especially
603 # annoying in cross-compiling environments, where the build's strip
604 # is unlikely to handle the host's binaries.
605 # Fortunately install-sh will honor a STRIPPROG variable, so we
606 # always use install-sh in `make install-strip', and initialize
607 # STRIPPROG with the value of the STRIP variable (set by the user).
608 AC_DEFUN([AM_PROG_INSTALL_STRIP],
609 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
610 # Installed binaries are usually stripped using `strip' when the user
611 # run `make install-strip'. However `strip' might not be the right
612 # tool to use in cross-compilation environments, therefore Automake
613 # will honor the `STRIP' environment variable to overrule this program.
614 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
615 if test "$cross_compiling" != no; then
616 AC_CHECK_TOOL([STRIP], [strip], :)
618 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
619 AC_SUBST([INSTALL_STRIP_PROGRAM])])
622 # Copyright (C) 2003 Free Software Foundation, Inc.
624 # This program is free software; you can redistribute it and/or modify
625 # it under the terms of the GNU General Public License as published by
626 # the Free Software Foundation; either version 2, or (at your option)
629 # This program is distributed in the hope that it will be useful,
630 # but WITHOUT ANY WARRANTY; without even the implied warranty of
631 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
632 # GNU General Public License for more details.
634 # You should have received a copy of the GNU General Public License
635 # along with this program; if not, write to the Free Software
636 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
641 # Check whether the underlying file-system supports filenames
642 # with a leading dot. For instance MS-DOS doesn't.
643 AC_DEFUN([AM_SET_LEADING_DOT],
644 [rm -rf .tst 2>/dev/null
645 mkdir .tst 2>/dev/null
646 if test -d .tst; then
651 rmdir .tst 2>/dev/null
652 AC_SUBST([am__leading_dot])])
654 # serial 5 -*- Autoconf -*-
656 # Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
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)
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.
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
674 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
675 # written in clear, in which case automake, when reading aclocal.m4,
676 # will think it sees a *use*, and therefore will trigger all it's
677 # C support machinery. Also note that it means that autoscan, seeing
678 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
682 # _AM_DEPENDENCIES(NAME)
683 # ----------------------
684 # See how the compiler implements dependency checking.
685 # NAME is "CC", "CXX", "GCJ", or "OBJC".
686 # We try a few techniques and use that to set a single cache variable.
688 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
689 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
690 # dependency, and given that the user is not expected to run this macro,
691 # just rely on AC_PROG_CC.
692 AC_DEFUN([_AM_DEPENDENCIES],
693 [AC_REQUIRE([AM_SET_DEPDIR])dnl
694 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
695 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
696 AC_REQUIRE([AM_DEP_TRACK])dnl
698 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
699 [$1], CXX, [depcc="$CXX" am_compiler_list=],
700 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
701 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
702 [depcc="$$1" am_compiler_list=])
704 AC_CACHE_CHECK([dependency style of $depcc],
705 [am_cv_$1_dependencies_compiler_type],
706 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
707 # We make a subdir and do the tests there. Otherwise we can end up
708 # making bogus files that we don't know about and never remove. For
709 # instance it was reported that on HP-UX the gcc test will end up
710 # making a dummy file named `D' -- because `-MD' means `put the output
713 # Copy depcomp to subdir because otherwise we won't find it if we're
714 # using a relative directory.
715 cp "$am_depcomp" conftest.dir
717 # We will build objects and dependencies in a subdirectory because
718 # it helps to detect inapplicable dependency modes. For instance
719 # both Tru64's cc and ICC support -MD to output dependencies as a
720 # side effect of compilation, but ICC will put the dependencies in
721 # the current directory while Tru64 will put them in the object
725 am_cv_$1_dependencies_compiler_type=none
726 if test "$am_compiler_list" = ""; then
727 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
729 for depmode in $am_compiler_list; do
730 # Setup a source with many dependencies, because some compilers
731 # like to wrap large dependency lists on column 80 (with \), and
732 # we should not choose a depcomp mode which is confused by this.
734 # We need to recreate these files for each test, as the compiler may
735 # overwrite some of them when testing with obscure command lines.
736 # This happens at least with the AIX C compiler.
738 for i in 1 2 3 4 5 6; do
739 echo '#include "conftst'$i'.h"' >> sub/conftest.c
742 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
746 # after this tag, mechanisms are not by side-effect, so they'll
747 # only be used when explicitly requested
748 if test "x$enable_dependency_tracking" = xyes; then
756 # We check with `-c' and `-o' for the sake of the "dashmstdout"
757 # mode. It turns out that the SunPro C++ compiler does not properly
758 # handle `-M -o', and we need to detect this.
759 if depmode=$depmode \
760 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
761 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
762 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
763 >/dev/null 2>conftest.err &&
764 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
765 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
766 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
767 # icc doesn't choke on unknown options, it will just issue warnings
768 # (even with -Werror). So we grep stderr for any message
769 # that says an option was ignored.
770 if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
771 am_cv_$1_dependencies_compiler_type=$depmode
780 am_cv_$1_dependencies_compiler_type=none
783 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
784 AM_CONDITIONAL([am__fastdep$1], [
785 test "x$enable_dependency_tracking" != xno \
786 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
792 # Choose a directory name for dependency files.
793 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
794 AC_DEFUN([AM_SET_DEPDIR],
795 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
796 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
802 AC_DEFUN([AM_DEP_TRACK],
803 [AC_ARG_ENABLE(dependency-tracking,
804 [ --disable-dependency-tracking Speeds up one-time builds
805 --enable-dependency-tracking Do not reject slow dependency extractors])
806 if test "x$enable_dependency_tracking" != xno; then
807 am_depcomp="$ac_aux_dir/depcomp"
810 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
811 AC_SUBST([AMDEPBACKSLASH])
814 # Generate code to set up dependency tracking. -*- Autoconf -*-
816 # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
818 # This program is free software; you can redistribute it and/or modify
819 # it under the terms of the GNU General Public License as published by
820 # the Free Software Foundation; either version 2, or (at your option)
823 # This program is distributed in the hope that it will be useful,
824 # but WITHOUT ANY WARRANTY; without even the implied warranty of
825 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
826 # GNU General Public License for more details.
828 # You should have received a copy of the GNU General Public License
829 # along with this program; if not, write to the Free Software
830 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
835 # _AM_OUTPUT_DEPENDENCY_COMMANDS
836 # ------------------------------
837 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
838 [for mf in $CONFIG_FILES; do
839 # Strip MF so we end up with the name of the file.
840 mf=`echo "$mf" | sed -e 's/:.*$//'`
841 # Check whether this is an Automake generated Makefile or not.
842 # We used to match only the files named `Makefile.in', but
843 # some people rename them; so instead we look at the file content.
844 # Grep'ing the first line is not enough: some people post-process
845 # each Makefile.in and add a new line on top of each file to say so.
846 # So let's grep whole file.
847 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
848 dirpart=`AS_DIRNAME("$mf")`
852 grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
853 # Extract the definition of DEP_FILES from the Makefile without
855 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
856 test -z "$DEPDIR" && continue
857 # When using ansi2knr, U may be empty or an underscore; expand it
858 U=`sed -n -e '/^U = / s///p' < "$mf"`
859 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
860 # We invoke sed twice because it is the simplest approach to
861 # changing $(DEPDIR) to its actual value in the expansion.
862 for file in `sed -n -e '
863 /^DEP_FILES = .*\\\\$/ {
872 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
873 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
874 # Make sure the directory exists.
875 test -f "$dirpart/$file" && continue
876 fdir=`AS_DIRNAME(["$file"])`
877 AS_MKDIR_P([$dirpart/$fdir])
878 # echo "creating $dirpart/$file"
879 echo '# dummy' > "$dirpart/$file"
882 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
885 # AM_OUTPUT_DEPENDENCY_COMMANDS
886 # -----------------------------
887 # This macro should only be invoked once -- use via AC_REQUIRE.
889 # This code is only required when automatic dependency tracking
890 # is enabled. FIXME. This creates each `.P' file that we will
891 # need in order to bootstrap the dependency handling code.
892 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
893 [AC_CONFIG_COMMANDS([depfiles],
894 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
895 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
898 # Check to see how 'make' treats includes. -*- Autoconf -*-
900 # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
902 # This program is free software; you can redistribute it and/or modify
903 # it under the terms of the GNU General Public License as published by
904 # the Free Software Foundation; either version 2, or (at your option)
907 # This program is distributed in the hope that it will be useful,
908 # but WITHOUT ANY WARRANTY; without even the implied warranty of
909 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
910 # GNU General Public License for more details.
912 # You should have received a copy of the GNU General Public License
913 # along with this program; if not, write to the Free Software
914 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
921 # Check to see how make treats includes.
922 AC_DEFUN([AM_MAKE_INCLUDE],
923 [am_make=${MAKE-make}
924 cat > confinc << 'END'
929 # If we don't find an include directive, just comment out the code.
930 AC_MSG_CHECKING([for style of include used by $am_make])
934 # First try GNU make style include.
935 echo "include confinc" > confmf
936 # We grep out `Entering directory' and `Leaving directory'
937 # messages which can occur if `w' ends up in MAKEFLAGS.
938 # In particular we don't look at `^make:' because GNU make might
939 # be invoked under some other name (usually "gmake"), in which
940 # case it prints its new name instead of `make'.
941 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
946 # Now try BSD make style include.
947 if test "$am__include" = "#"; then
948 echo '.include "confinc"' > confmf
949 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
955 AC_SUBST([am__include])
956 AC_SUBST([am__quote])
957 AC_MSG_RESULT([$_am_result])
961 # AM_CONDITIONAL -*- Autoconf -*-
963 # Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
965 # This program is free software; you can redistribute it and/or modify
966 # it under the terms of the GNU General Public License as published by
967 # the Free Software Foundation; either version 2, or (at your option)
970 # This program is distributed in the hope that it will be useful,
971 # but WITHOUT ANY WARRANTY; without even the implied warranty of
972 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
973 # GNU General Public License for more details.
975 # You should have received a copy of the GNU General Public License
976 # along with this program; if not, write to the Free Software
977 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
984 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
985 # -------------------------------------
986 # Define a conditional.
987 AC_DEFUN([AM_CONDITIONAL],
988 [ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
989 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
999 AC_CONFIG_COMMANDS_PRE(
1000 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1001 AC_MSG_ERROR([conditional "$1" was never defined.
1002 Usually this means the macro was only invoked conditionally.])
1005 # Figure out how to run the assembler. -*- Autoconf -*-
1009 # Copyright 2001 Free Software Foundation, Inc.
1011 # This program is free software; you can redistribute it and/or modify
1012 # it under the terms of the GNU General Public License as published by
1013 # the Free Software Foundation; either version 2, or (at your option)
1014 # any later version.
1016 # This program is distributed in the hope that it will be useful,
1017 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1018 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1019 # GNU General Public License for more details.
1021 # You should have received a copy of the GNU General Public License
1022 # along with this program; if not, write to the Free Software
1023 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1028 AC_DEFUN([AM_PROG_AS],
1029 [# By default we simply use the C compiler to build assembly code.
1030 AC_REQUIRE([AC_PROG_CC])
1032 # Set ASFLAGS if not already set.
1033 : ${CCASFLAGS='$(CFLAGS)'}
1035 AC_SUBST(CCASFLAGS)])
1041 # Like AC_PROG_CC_C_O, but changed for automake.
1043 # Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
1045 # This program is free software; you can redistribute it and/or modify
1046 # it under the terms of the GNU General Public License as published by
1047 # the Free Software Foundation; either version 2, or (at your option)
1048 # any later version.
1050 # This program is distributed in the hope that it will be useful,
1051 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1052 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1053 # GNU General Public License for more details.
1055 # You should have received a copy of the GNU General Public License
1056 # along with this program; if not, write to the Free Software
1057 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1060 AC_DEFUN([AM_PROG_CC_C_O],
1061 [AC_REQUIRE([AC_PROG_CC_C_O])dnl
1062 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1063 # FIXME: we rely on the cache variable name because
1064 # there is no other way.
1066 ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
1067 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
1068 # Losing compiler, so override with the script.
1069 # FIXME: It is wrong to rewrite CC.
1070 # But if we don't then we get into trouble of one sort or another.
1071 # A longer-term fix would be to have automake use am__CC in this case,
1072 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
1073 CC="$am_aux_dir/compile $CC"
1077 # Add --enable-maintainer-mode option to configure.
1080 # Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
1082 # This program is free software; you can redistribute it and/or modify
1083 # it under the terms of the GNU General Public License as published by
1084 # the Free Software Foundation; either version 2, or (at your option)
1085 # any later version.
1087 # This program is distributed in the hope that it will be useful,
1088 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1089 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1090 # GNU General Public License for more details.
1092 # You should have received a copy of the GNU General Public License
1093 # along with this program; if not, write to the Free Software
1094 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1099 AC_DEFUN([AM_MAINTAINER_MODE],
1100 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
1101 dnl maintainer-mode is disabled by default
1102 AC_ARG_ENABLE(maintainer-mode,
1103 [ --enable-maintainer-mode enable make rules and dependencies not useful
1104 (and sometimes confusing) to the casual installer],
1105 USE_MAINTAINER_MODE=$enableval,
1106 USE_MAINTAINER_MODE=no)
1107 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
1108 AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
1109 MAINT=$MAINTAINER_MODE_TRUE
1114 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])