1 # aclocal.m4 generated automatically by aclocal 1.5
3 # Copyright 1996, 1997, 1998, 1999, 2000, 2001
4 # Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
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 AC_DEFUN([AC_COMPILE_CHECK_SIZEOF],
15 [changequote(<<, >>)dnl
16 dnl The name to #define.
17 define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
18 dnl The cache variable name.
19 define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
21 AC_MSG_CHECKING(size of $1)
22 AC_CACHE_VAL(AC_CV_NAME,
23 [for ac_size in 4 8 1 2 16 12 $2 ; do # List sizes in rough order of prevalence.
24 AC_TRY_COMPILE([#include "confdefs.h"
25 #include <sys/types.h>
27 ], [switch (0) case 0: case (sizeof ($1) == $ac_size):;], AC_CV_NAME=$ac_size)
28 if test x$AC_CV_NAME != x ; then break; fi
31 if test x$AC_CV_NAME = x ; then
32 AC_MSG_ERROR([cannot determine a size for $1])
34 AC_MSG_RESULT($AC_CV_NAME)
35 AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1])
36 undefine([AC_TYPE_NAME])dnl
37 undefine([AC_CV_NAME])dnl
40 AC_DEFUN(LIBGCJ_CONFIGURE,
42 dnl Default to --enable-multilib
43 AC_ARG_ENABLE(multilib,
44 [ --enable-multilib build many library versions (default)],
45 [case "${enableval}" in
48 *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
49 esac], [multilib=yes])dnl
51 dnl We may get other options which we don't document:
52 dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
54 # When building with srcdir == objdir, links to the source files will
55 # be created in directories within the target_subdir. We have to
56 # adjust toplevel_srcdir accordingly, so that configure finds
57 # install-sh and other auxiliary files that live in the top-level
59 if test "${srcdir}" = "."; then
60 if test -z "${with_target_subdir}"; then
63 if test "${with_target_subdir}" != "."; then
64 toprel="${with_multisrctop}../.."
66 toprel="${with_multisrctop}.."
73 libgcj_basedir=$srcdir/$toprel/$1/libjava
74 AC_SUBST(libgcj_basedir)
76 AC_CONFIG_AUX_DIR(${srcdir}/$toprel)
78 # This overrides the previous occurrence for automake, but not for
79 # autoconf, which is exactly what we want.
83 # This works around an automake problem.
84 mkinstalldirs="`cd $ac_aux_dir && pwd`/mkinstalldirs"
85 AC_SUBST(mkinstalldirs)
89 dnl This shouldn't be needed, as long as top-level dependencies are
90 dnl defined correctly and shared-library paths are set up so that
91 dnl execution tests succeed. FIXME.
92 define([AC_PROG_CC_WORKS],[])
93 define([AC_PROG_CXX_WORKS],[])
97 # We use the libstdc++-v3 version of LIB_AC_PROG_CXX, but use
98 # glibjava_CXX instead of glibcpp_CXX. That's because we're passed a
99 # different definition of CXX than other directories, since we don't
100 # depend on libstdc++-v3 having already been built.
101 AC_DEFUN(LIB_AC_PROG_CXX,
102 [AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl
103 dnl Fool anybody using AC_PROG_CXX.
104 AC_PROVIDE([AC_PROG_CXX])
105 # Use glibjava_CXX so that we do not cause CXX to be cached with the
106 # flags that come in CXX while configuring libjava. They're different
107 # from those used for all other target libraries. If CXX is set in
108 # the environment, respect that here.
110 AC_CHECK_PROGS(glibjava_CXX, $CCC c++ g++ gcc CC cxx cc++, gcc)
113 test -z "$glibjava_CXX" && AC_MSG_ERROR([no acceptable c++ found in \$PATH])
117 if test "$ac_cv_prog_gxx" = yes; then
119 dnl Check whether -g works, even if CXXFLAGS is set, in case the package
120 dnl plays around with CXXFLAGS (such as to build both debugging and
121 dnl normal versions of a library), tasteless as that idea is.
122 ac_test_CXXFLAGS="${CXXFLAGS+set}"
123 ac_save_CXXFLAGS="$CXXFLAGS"
126 if test "$ac_test_CXXFLAGS" = set; then
127 CXXFLAGS="$ac_save_CXXFLAGS"
128 elif test "$ac_cv_prog_cxx_g" = yes; then
135 test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
141 dnl version is pulled out to make it a bit easier to change using sed.
143 dnl Still use "libjava" here to placate dejagnu.
144 AM_INIT_AUTOMAKE(libjava, $version)
146 # AC_CHECK_TOOL does AC_REQUIRE (AC_CANONICAL_BUILD). If we don't
147 # run it explicitly here, it will be run implicitly before
148 # LIBGCJ_CONFIGURE, which doesn't work because that means that it will
149 # be run before AC_CANONICAL_HOST.
152 AC_CHECK_TOOL(AS, as)
153 AC_CHECK_TOOL(AR, ar)
154 AC_CHECK_TOOL(RANLIB, ranlib, :)
160 # We need AC_EXEEXT to keep automake happy in cygnus mode. However,
161 # at least currently, we never actually build a program, so we never
162 # need to use $(EXEEXT). Moreover, the test for EXEEXT normally
163 # fails, because we are probably configuring with a cross compiler
164 # which cant create executables. So we include AC_EXEEXT to keep
165 # automake happy, but we don't execute it, since we don't care about
168 # autoconf 2.50 runs AC_EXEEXT by default, and the macro expands
169 # to nothing, so nothing would remain between `then' and `fi' if it
170 # were not for the `:' below.
175 # configure.host sets the following important variables
176 # libgcj_cflags - host specific C compiler flags
177 # libgcj_cxxflags - host specific C++ compiler flags
178 # libgcj_javaflags - host specific Java compiler flags
184 . [$]{srcdir}/configure.host
186 LIBGCJ_CFLAGS="[$]{libgcj_cflags}"
187 LIBGCJ_CXXFLAGS="[$]{libgcj_cxxflags}"
188 LIBGCJ_JAVAFLAGS="[$]{libgcj_javaflags}"
189 AC_SUBST(LIBGCJ_CFLAGS)
190 AC_SUBST(LIBGCJ_CXXFLAGS)
191 AC_SUBST(LIBGCJ_JAVAFLAGS)
194 sinclude(../libtool.m4)
195 dnl The lines below arrange for aclocal not to bring libtool.m4
196 dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake
197 dnl to add a definition of LIBTOOL to Makefile.in.
199 AC_DEFUN([AM_PROG_LIBTOOL],)
200 AC_DEFUN([AC_LIBTOOL_DLOPEN],)
201 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],)
202 AC_DEFUN([LT_AC_PROG_GCJ],)
209 dnl From Bruno Haible.
213 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
214 dnl those with the standalone portable GNU libiconv installed).
216 am_cv_lib_iconv_ldpath=
217 AC_ARG_WITH([libiconv-prefix],
218 [ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [
219 for dir in `echo "$withval" | tr : ' '`; do
220 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
221 if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
225 AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
226 am_cv_func_iconv="no, consider installing GNU libiconv"
228 AC_TRY_LINK([#include <stdlib.h>
230 [iconv_t cd = iconv_open("","");
231 iconv(cd,NULL,NULL,NULL,NULL);
233 am_cv_func_iconv=yes)
234 if test "$am_cv_func_iconv" != yes; then
236 LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
237 AC_TRY_LINK([#include <stdlib.h>
239 [iconv_t cd = iconv_open("","");
240 iconv(cd,NULL,NULL,NULL,NULL);
243 am_cv_func_iconv=yes)
247 if test "$am_cv_func_iconv" = yes; then
248 AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
249 AC_MSG_CHECKING([for iconv declaration])
250 AC_CACHE_VAL(am_cv_proto_iconv, [
258 #if defined(__STDC__) || defined(__cplusplus)
259 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
263 ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
264 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
265 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
266 AC_MSG_RESULT([$]{ac_t:-
267 }[$]am_cv_proto_iconv)
268 AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
269 [Define as const if the declaration of iconv() needs const.])
272 if test "$am_cv_lib_iconv" = yes; then
273 LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
278 # Check whether LC_MESSAGES is available in <locale.h>.
279 # Ulrich Drepper <drepper@cygnus.com>, 1995.
281 # This file can be copied and used freely without restrictions. It can
282 # be used in projects which are not available under the GNU General Public
283 # License or the GNU Library General Public License but which still want
284 # to provide support for the GNU gettext functionality.
285 # Please note that the actual code of the GNU gettext library is covered
286 # by the GNU Library General Public License, and the rest of the GNU
287 # gettext package package is covered by the GNU General Public License.
288 # They are *not* in the public domain.
292 AC_DEFUN([AM_LC_MESSAGES],
293 [if test "$ac_cv_header_locale_h" = yes; then
294 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
295 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
296 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
297 if test "$am_cv_val_LC_MESSAGES" = yes; then
298 AC_DEFINE(HAVE_LC_MESSAGES, 1,
299 [Define if your <locale.h> file defines LC_MESSAGES.])
303 # Do all the work for Automake. This macro actually does too much --
304 # some checks are only needed if your package does certain things.
305 # But this isn't really a big deal.
309 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
310 # written in clear, in which case automake, when reading aclocal.m4,
311 # will think it sees a *use*, and therefore will trigger all it's
312 # C support machinery. Also note that it means that autoscan, seeing
313 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
316 # We require 2.13 because we rely on SHELL being computed by configure.
319 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
320 # -----------------------------------------------------------
321 # If MACRO-NAME is provided do IF-PROVIDED, else IF-NOT-PROVIDED.
322 # The purpose of this macro is to provide the user with a means to
323 # check macros which are provided without letting her know how the
324 # information is coded.
325 # If this macro is not defined by Autoconf, define it here.
326 ifdef([AC_PROVIDE_IFELSE],
328 [define([AC_PROVIDE_IFELSE],
329 [ifdef([AC_PROVIDE_$1],
333 # AM_INIT_AUTOMAKE(PACKAGE,VERSION, [NO-DEFINE])
334 # ----------------------------------------------
335 AC_DEFUN([AM_INIT_AUTOMAKE],
336 [AC_REQUIRE([AC_PROG_INSTALL])dnl
337 # test to see if srcdir already configured
338 if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" &&
339 test -f $srcdir/config.status; then
340 AC_MSG_ERROR([source directory already configured; run \"make distclean\" there first])
343 # Define the identity of the package.
349 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
350 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])
352 # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
353 # the ones we care about.
354 ifdef([m4_pattern_allow],
355 [m4_pattern_allow([^AM_[A-Z]+FLAGS])])dnl
357 # Autoconf 2.50 always computes EXEEXT. However we need to be
358 # compatible with 2.13, for now. So we always define EXEEXT, but we
361 # Similar for OBJEXT -- only we only use OBJEXT if the user actually
362 # requests that it be used. This is a bit dumb.
366 # Some tools Automake needs.
367 AC_REQUIRE([AM_SANITY_CHECK])dnl
368 AC_REQUIRE([AC_ARG_PROGRAM])dnl
369 AM_MISSING_PROG(ACLOCAL, aclocal)
370 AM_MISSING_PROG(AUTOCONF, autoconf)
371 AM_MISSING_PROG(AUTOMAKE, automake)
372 AM_MISSING_PROG(AUTOHEADER, autoheader)
373 AM_MISSING_PROG(MAKEINFO, makeinfo)
374 AM_MISSING_PROG(AMTAR, tar)
376 AM_PROG_INSTALL_STRIP
377 # We need awk for the "check" target. The system "awk" is bad on
379 AC_REQUIRE([AC_PROG_AWK])dnl
380 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
381 AC_REQUIRE([AM_DEP_TRACK])dnl
382 AC_REQUIRE([AM_SET_DEPDIR])dnl
383 AC_PROVIDE_IFELSE([AC_PROG_][CC],
384 [_AM_DEPENDENCIES(CC)],
385 [define([AC_PROG_][CC],
386 defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
387 AC_PROVIDE_IFELSE([AC_PROG_][CXX],
388 [_AM_DEPENDENCIES(CXX)],
389 [define([AC_PROG_][CXX],
390 defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
394 # Check to make sure that the build environment is sane.
401 AC_DEFUN([AM_SANITY_CHECK],
402 [AC_MSG_CHECKING([whether build environment is sane])
405 echo timestamp > conftest.file
406 # Do `set' in a subshell so we don't clobber the current shell's
407 # arguments. Must try -L first in case configure is actually a
408 # symlink; some systems play weird games with the mod time of symlinks
409 # (eg FreeBSD returns the mod time of the symlink's containing
412 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
413 if test "$[*]" = "X"; then
415 set X `ls -t $srcdir/configure conftest.file`
418 if test "$[*]" != "X $srcdir/configure conftest.file" \
419 && test "$[*]" != "X conftest.file $srcdir/configure"; then
421 # If neither matched, then we have a broken ls. This can happen
422 # if, for instance, CONFIG_SHELL is bash and it inherits a
423 # broken ls alias from the environment. This has actually
424 # happened. Such a system could not be considered "sane".
425 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
426 alias in your environment])
429 test "$[2]" = conftest.file
435 AC_MSG_ERROR([newly created file is older than distributed files!
436 Check your system clock])
443 # AM_MISSING_PROG(NAME, PROGRAM)
444 # ------------------------------
445 AC_DEFUN([AM_MISSING_PROG],
446 [AC_REQUIRE([AM_MISSING_HAS_RUN])
447 $1=${$1-"${am_missing_run}$2"}
453 # Define MISSING if not defined so far and test if it supports --run.
454 # If it does, set am_missing_run to use it, otherwise, to nothing.
455 AC_DEFUN([AM_MISSING_HAS_RUN],
456 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
457 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
458 # Use eval to expand $SHELL
459 if eval "$MISSING --run true"; then
460 am_missing_run="$MISSING --run "
464 AC_MSG_WARN([${am_backtick}missing' script is too old or missing])
470 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
471 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
472 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
474 # Of course, Automake must honor this variable whenever it calls a
475 # tool from the auxiliary directory. The problem is that $srcdir (and
476 # therefore $ac_aux_dir as well) can be either absolute or relative,
477 # depending on how configure is run. This is pretty annoying, since
478 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
479 # source directory, any form will work fine, but in subdirectories a
480 # relative path needs to be adjusted first.
482 # $ac_aux_dir/missing
483 # fails when called from a subdirectory if $ac_aux_dir is relative
484 # $top_srcdir/$ac_aux_dir/missing
485 # fails if $ac_aux_dir is absolute,
486 # fails when called from a subdirectory in a VPATH build with
487 # a relative $ac_aux_dir
489 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
490 # are both prefixed by $srcdir. In an in-source build this is usually
491 # harmless because $srcdir is `.', but things will broke when you
492 # start a VPATH build or use an absolute $srcdir.
494 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
495 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
496 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
497 # and then we would define $MISSING as
498 # MISSING="\${SHELL} $am_aux_dir/missing"
499 # This will work as long as MISSING is not called from configure, because
500 # unfortunately $(top_srcdir) has no meaning in configure.
501 # However there are other variables, like CC, which are often used in
502 # configure, and could therefore not use this "fixed" $ac_aux_dir.
504 # Another solution, used here, is to always expand $ac_aux_dir to an
505 # absolute PATH. The drawback is that using absolute paths prevent a
506 # configured tree to be moved without reconfiguration.
508 AC_DEFUN([AM_AUX_DIR_EXPAND], [
509 # expand $ac_aux_dir to an absolute path
510 am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd`
515 # Define $install_sh.
516 AC_DEFUN([AM_PROG_INSTALL_SH],
517 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
518 install_sh=${install_sh-"$am_aux_dir/install-sh"}
519 AC_SUBST(install_sh)])
521 # One issue with vendor `install' (even GNU) is that you can't
522 # specify the program used to strip binaries. This is especially
523 # annoying in cross-compiling environments, where the build's strip
524 # is unlikely to handle the host's binaries.
525 # Fortunately install-sh will honor a STRIPPROG variable, so we
526 # always use install-sh in `make install-strip', and initialize
527 # STRIPPROG with the value of the STRIP variable (set by the user).
528 AC_DEFUN([AM_PROG_INSTALL_STRIP],
529 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
530 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
531 AC_SUBST([INSTALL_STRIP_PROGRAM])])
533 # serial 4 -*- Autoconf -*-
537 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
538 # written in clear, in which case automake, when reading aclocal.m4,
539 # will think it sees a *use*, and therefore will trigger all it's
540 # C support machinery. Also note that it means that autoscan, seeing
541 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
545 # _AM_DEPENDENCIES(NAME)
546 # ---------------------
547 # See how the compiler implements dependency checking.
548 # NAME is "CC", "CXX" or "OBJC".
549 # We try a few techniques and use that to set a single cache variable.
551 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
552 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
553 # dependency, and given that the user is not expected to run this macro,
554 # just rely on AC_PROG_CC.
555 AC_DEFUN([_AM_DEPENDENCIES],
556 [AC_REQUIRE([AM_SET_DEPDIR])dnl
557 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
558 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
559 AC_REQUIRE([AM_DEP_TRACK])dnl
561 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
562 [$1], CXX, [depcc="$CXX" am_compiler_list=],
563 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc']
564 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
565 [depcc="$$1" am_compiler_list=])
567 AC_CACHE_CHECK([dependency style of $depcc],
568 [am_cv_$1_dependencies_compiler_type],
569 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
570 # We make a subdir and do the tests there. Otherwise we can end up
571 # making bogus files that we don't know about and never remove. For
572 # instance it was reported that on HP-UX the gcc test will end up
573 # making a dummy file named `D' -- because `-MD' means `put the output
576 # Copy depcomp to subdir because otherwise we won't find it if we're
577 # using a relative directory.
578 cp "$am_depcomp" conftest.dir
581 am_cv_$1_dependencies_compiler_type=none
582 if test "$am_compiler_list" = ""; then
583 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
585 for depmode in $am_compiler_list; do
586 # We need to recreate these files for each test, as the compiler may
587 # overwrite some of them when testing with obscure command lines.
588 # This happens at least with the AIX C compiler.
589 echo '#include "conftest.h"' > conftest.c
590 echo 'int i;' > conftest.h
591 echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
595 # after this tag, mechanisms are not by side-effect, so they'll
596 # only be used when explicitly requested
597 if test "x$enable_dependency_tracking" = xyes; then
605 # We check with `-c' and `-o' for the sake of the "dashmstdout"
606 # mode. It turns out that the SunPro C++ compiler does not properly
607 # handle `-M -o', and we need to detect this.
608 if depmode=$depmode \
609 source=conftest.c object=conftest.o \
610 depfile=conftest.Po tmpdepfile=conftest.TPo \
611 $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
612 grep conftest.h conftest.Po > /dev/null 2>&1 &&
613 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
614 am_cv_$1_dependencies_compiler_type=$depmode
622 am_cv_$1_dependencies_compiler_type=none
625 $1DEPMODE="depmode=$am_cv_$1_dependencies_compiler_type"
626 AC_SUBST([$1DEPMODE])
632 # Choose a directory name for dependency files.
633 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
634 AC_DEFUN([AM_SET_DEPDIR],
635 [rm -f .deps 2>/dev/null
636 mkdir .deps 2>/dev/null
637 if test -d .deps; then
640 # MS-DOS does not allow filenames that begin with a dot.
643 rmdir .deps 2>/dev/null
650 AC_DEFUN([AM_DEP_TRACK],
651 [AC_ARG_ENABLE(dependency-tracking,
652 [ --disable-dependency-tracking Speeds up one-time builds
653 --enable-dependency-tracking Do not reject slow dependency extractors])
654 if test "x$enable_dependency_tracking" != xno; then
655 am_depcomp="$ac_aux_dir/depcomp"
658 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
659 pushdef([subst], defn([AC_SUBST]))
660 subst(AMDEPBACKSLASH)
664 # Generate code to set up dependency tracking.
665 # This macro should only be invoked once -- use via AC_REQUIRE.
667 # AM_OUTPUT_DEPENDENCY_COMMANDS
670 # This code is only required when automatic dependency tracking
671 # is enabled. FIXME. This creates each `.P' file that we will
672 # need in order to bootstrap the dependency handling code.
673 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],[
675 test x"$AMDEP_TRUE" != x"" ||
676 for mf in $CONFIG_FILES; do
678 Makefile) dirpart=.;;
679 */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
682 grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
683 # Extract the definition of DEP_FILES from the Makefile without
685 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
686 test -z "$DEPDIR" && continue
687 # When using ansi2knr, U may be empty or an underscore; expand it
688 U=`sed -n -e '/^U = / s///p' < "$mf"`
689 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
690 # We invoke sed twice because it is the simplest approach to
691 # changing $(DEPDIR) to its actual value in the expansion.
692 for file in `sed -n -e '
693 /^DEP_FILES = .*\\\\$/ {
702 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
703 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
704 # Make sure the directory exists.
705 test -f "$dirpart/$file" && continue
706 fdir=`echo "$file" | sed -e 's|/[^/]*$||'`
707 $ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1
708 # echo "creating $dirpart/$file"
709 echo '# dummy' > "$dirpart/$file"
712 ], [AMDEP_TRUE="$AMDEP_TRUE"
713 ac_aux_dir="$ac_aux_dir"])])
717 # Check to see how make treats includes.
718 AC_DEFUN([AM_MAKE_INCLUDE],
719 [am_make=${MAKE-make}
720 cat > confinc << 'END'
724 # If we don't find an include directive, just comment out the code.
725 AC_MSG_CHECKING([for style of include used by $am_make])
729 # First try GNU make style include.
730 echo "include confinc" > confmf
731 # We grep out `Entering directory' and `Leaving directory'
732 # messages which can occur if `w' ends up in MAKEFLAGS.
733 # In particular we don't look at `^make:' because GNU make might
734 # be invoked under some other name (usually "gmake"), in which
735 # case it prints its new name instead of `make'.
736 if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
741 # Now try BSD make style include.
742 if test "$am__include" = "#"; then
743 echo '.include "confinc"' > confmf
744 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
750 AC_SUBST(am__include)
752 AC_MSG_RESULT($_am_result)
758 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
759 # -------------------------------------
760 # Define a conditional.
762 # FIXME: Once using 2.50, use this:
763 # m4_match([$1], [^TRUE\|FALSE$], [AC_FATAL([$0: invalid condition: $1])])dnl
764 AC_DEFUN([AM_CONDITIONAL],
765 [ifelse([$1], [TRUE],
766 [errprint(__file__:__line__: [$0: invalid condition: $1
769 ifelse([$1], [FALSE],
770 [errprint(__file__:__line__: [$0: invalid condition: $1
783 # Add --enable-maintainer-mode option to configure.
788 AC_DEFUN([AM_MAINTAINER_MODE],
789 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
790 dnl maintainer-mode is disabled by default
791 AC_ARG_ENABLE(maintainer-mode,
792 [ --enable-maintainer-mode enable make rules and dependencies not useful
793 (and sometimes confusing) to the casual installer],
794 USE_MAINTAINER_MODE=$enableval,
795 USE_MAINTAINER_MODE=no)
796 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
797 AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
798 MAINT=$MAINTAINER_MODE_TRUE
803 # Like AC_CONFIG_HEADER, but automatically create stamp file.
807 # When config.status generates a header, we must update the stamp-h file.
808 # This file resides in the same directory as the config header
809 # that is generated. We must strip everything past the first ":",
810 # and everything past the last "/".
814 AC_DEFUN([AM_CONFIG_HEADER],
815 [ifdef([AC_FOREACH],dnl
816 [dnl init our file count if it isn't already
817 m4_ifndef([_AM_Config_Header_Index], m4_define([_AM_Config_Header_Index], [0]))
818 dnl prepare to store our destination file list for use in config.status
819 AC_FOREACH([_AM_File], [$1],
820 [m4_pushdef([_AM_Dest], m4_patsubst(_AM_File, [:.*]))
821 m4_define([_AM_Config_Header_Index], m4_incr(_AM_Config_Header_Index))
822 dnl and add it to the list of files AC keeps track of, along
824 AC_CONFIG_HEADERS(_AM_File,
825 dnl COMMANDS, [, INIT-CMDS]
826 [# update the timestamp
827 echo timestamp >"AS_ESCAPE(_AM_DIRNAME(]_AM_Dest[))/stamp-h]_AM_Config_Header_Index["
828 ][$2]m4_ifval([$3], [, [$3]]))dnl AC_CONFIG_HEADERS
829 m4_popdef([_AM_Dest])])],dnl
830 [AC_CONFIG_HEADER([$1])
832 ifelse(patsubst([$1], [[^ ]], []),
834 [test -z "$CONFIG_HEADERS" || echo timestamp >dnl
835 patsubst([$1], [^\([^:]*/\)?.*], [\1])stamp-h]),dnl
837 for am_file in $1; do
838 case " \$CONFIG_HEADERS " in
840 am_dir=\`echo \$am_file |sed 's%:.*%%;s%[^/]*\$%%'\`
841 if test -n "\$am_dir"; then
842 am_tmpdir=\`echo \$am_dir |sed 's%^\(/*\).*\$%\1%'\`
843 for am_subdir in \`echo \$am_dir |sed 's%/% %'\`; do
844 am_tmpdir=\$am_tmpdir\$am_subdir/
845 if test ! -d \$am_tmpdir; then
850 echo timestamp > "\$am_dir"stamp-h\$am_indx
853 am_indx=\`expr \$am_indx + 1\`
855 ])]) # AM_CONFIG_HEADER
859 # Like AS_DIRNAME, only do it during macro expansion
860 AC_DEFUN([_AM_DIRNAME],
861 [m4_if(m4_regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
862 m4_if(m4_regexp([$1], [^//\([^/]\|$\)]), -1,
863 m4_if(m4_regexp([$1], [^/.*]), -1,
865 m4_patsubst([$1], [^\(/\).*], [\1])),
866 m4_patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
867 m4_patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl