1 # aclocal.m4 generated automatically by aclocal 1.4e
3 # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000
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 /* This program is free software; you can redistribute it and/or modify
15 it under the terms of the GNU General Public License as published by
16 the Free Software Foundation; either version 2, or (at your option)
19 This program is distributed in the hope that it will be useful,
20 but WITHOUT ANY WARRANTY; without even the implied warranty of
21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 GNU General Public License for more details. */
24 AC_DEFUN(ACX_WITH_GSSAPI,[
26 # Use --with-gssapi[=DIR] to enable GSSAPI support.
28 # defaults to enabled with DIR in default list below
30 # Search for /SUNHEA/ and read the comments about this default below.
33 [ --with-gssapi=value GSSAPI directory],
34 [acx_gssapi_withgssapi=$withval], [acx_gssapi_withgssapi=yes])dnl
37 dnl FIXME - cache withval and obliterate later cache values when options change
40 # Try to locate a GSSAPI installation if no location was specified, assuming
41 # GSSAPI was enabled (the default).
43 if test -n "$acx_gssapi_cv_gssapi"; then
44 # Granted, this is a slightly ugly way to print this info, but the
45 # AC_CHECK_HEADER used in the search for a GSSAPI installation makes using
46 # AC_CACHE_CHECK worse
47 AC_MSG_CHECKING([for GSSAPI])
49 AC_CACHE_VAL([acx_gssapi_cv_gssapi], [
50 if test x$acx_gssapi_withgssapi = xyes; then
51 # --with but no location specified
52 # assume a gssapi.h or gssapi/gssapi.h locates our install.
54 # This isn't always strictly true. For instance Solaris 7's SUNHEA (header)
55 # package installs gssapi.h whether or not the necessary libraries are
56 # installed. I'm still not sure whether to consider this a bug. The long
57 # way around is to not consider GSSPAI installed unless gss_import_name is
58 # found, but that brings up a lot of other hassles, like continuing to let
59 # gcc & ld generate the error messages when the user uses --with-gssapi=dir
60 # as a debugging aid. The short way around is to disable GSSAPI by default,
61 # but I think Sun users have been faced with this for awhile and I haven't
62 # heard many complaints.
63 acx_gssapi_save_CPPFLAGS=$CPPFLAGS
64 for acx_gssapi_cv_gssapi in yes /usr/kerberos /usr/cygnus/kerbnet no; do
65 if test x$acx_gssapi_cv_gssapi = xno; then
68 if test x$acx_gssapi_cv_gssapi = xyes; then
69 AC_CHECKING([for GSSAPI])
71 CPPFLAGS="$acx_gssapi_save_CPPFLAGS -I$acx_gssapi_cv_gssapi/include"
72 AC_CHECKING([for GSSAPI in $acx_gssapi_cv_gssapi])
74 unset ac_cv_header_gssapi_h
75 unset ac_cv_header_gssapi_gssapi_h
76 AC_CHECK_HEADERS([gssapi.h gssapi/gssapi.h])
77 if test "$ac_cv_header_gssapi_h" = "yes" ||
78 test "$ac_cv_header_gssapi_gssapi_h" = "yes"; then
82 CPPFLAGS=$acx_gssapi_save_CPPFLAGS
84 acx_gssapi_cv_gssapi=$acx_gssapi_withgssapi
86 AC_MSG_CHECKING([for GSSAPI])
88 AC_MSG_RESULT([$acx_gssapi_cv_gssapi])
91 # Set up GSSAPI includes for later use. We don't bother to check for
92 # $acx_gssapi_cv_gssapi=no here since that will be caught later.
94 if test x$acx_gssapi_cv_gssapi = yes; then
95 # no special includes necessary
98 # GSSAPI at $acx_gssapi_cv_gssapi (could be 'no')
99 GSSAPI_INCLUDES=" -I$acx_gssapi_cv_gssapi/include"
103 # Get the rest of the information CVS needs to compile with GSSAPI support
105 if test x$acx_gssapi_cv_gssapi != xno; then
106 # define HAVE_GSSAPI and set up the includes
107 AC_DEFINE([HAVE_GSSAPI],, [Define if you have GSSAPI with Kerberos version 5 available.])
108 includeopt=$includeopt$GSSAPI_INCLUDES
110 # locate any other headers
111 acx_gssapi_save_CPPFLAGS=$CPPFLAGS
112 CPPFLAGS=$CPPFLAGS$GSSAPI_INCLUDES
113 dnl We don't use HAVE_KRB5_H anywhere, but including it here might make it
114 dnl easier to spot errors by reading configure output
115 AC_CHECK_HEADERS([gssapi.h gssapi/gssapi.h gssapi/gssapi_generic.h krb5.h])
116 # And look through them for GSS_C_NT_HOSTBASED_SERVICE or its alternatives
117 AC_CACHE_CHECK([for GSS_C_NT_HOSTBASED_SERVICE], [acx_gssapi_cv_gss_c_nt_hostbased_service],
118 [acx_gssapi_cv_gss_c_nt_hostbased_service=no
119 if test "$ac_cv_header_gssapi_h" = "yes"; then
120 AC_EGREP_HEADER([GSS_C_NT_HOSTBASED_SERVICE], [gssapi.h],
121 [acx_gssapi_cv_gss_c_nt_hostbased_service=yes],
122 AC_EGREP_HEADER([gss_nt_service_name], [gssapi.h],
123 [acx_gssapi_cv_gss_c_nt_hostbased_service=gss_nt_service_name]))
125 if test $acx_gssapi_cv_gss_c_nt_hostbased_service = no &&
126 test "$ac_cv_header_gssapi_gssapi_h" = "yes"; then
127 AC_EGREP_HEADER([GSS_C_NT_HOSTBASED_SERVICE], [gssapi/gssapi.h],
128 [acx_gssapi_cv_gss_c_nt_hostbased_service],
129 AC_EGREP_HEADER([gss_nt_service_name], [gssapi/gssapi.h],
130 [acx_gssapi_cv_gss_c_nt_hostbased_service=gss_nt_service_name]))
132 if test $acx_gssapi_cv_gss_c_nt_hostbased_service = no &&
133 test "$ac_cv_header_gssapi_gssapi_generic_h" = "yes"; then
134 AC_EGREP_HEADER([GSS_C_NT_HOSTBASED_SERVICE], [gssapi/gssapi_generic.h],
135 [acx_gssapi_cv_gss_c_nt_hostbased_service],
136 AC_EGREP_HEADER([gss_nt_service_name], [gssapi/gssapi_generic.h],
137 [acx_gssapi_cv_gss_c_nt_hostbased_service=gss_nt_service_name]))
139 if test $acx_gssapi_cv_gss_c_nt_hostbased_service != yes &&
140 test $acx_gssapi_cv_gss_c_nt_hostbased_service != no; then
141 # don't define for yes since that means it already means something and
142 # don't define for no since we'd rather the compiler catch the error
143 AC_DEFINE_UNQUOTED([GSS_C_NT_HOSTBASED_SERVICE], [$acx_gssapi_cv_gss_c_nt_hostbased_service],
144 [Define to an alternative value if GSS_C_NT_HOSTBASED_SERVICE isn't defined
145 in the gssapi.h header file. MIT Kerberos 1.2.1 requires this. Only relevant
148 CPPFLAGS=$acx_gssapi_save_CPPFLAGS
150 # Expect the libs to be installed parallel to the headers
152 # We could try once with and once without, but I'm not sure it's worth the
154 if test x$acx_gssapi_cv_gssapi != xyes; then
155 if test -z "$LIBS"; then
156 LIBS="-L$acx_gssapi_cv_gssapi/lib"
158 LIBS="-L$acx_gssapi_cv_gssapi/lib $LIBS"
162 dnl What happens if we want to enable, say, krb5 and some other GSSAPI
163 dnl authentication method at the same time?
165 # Some of the order below is particular due to library dependencies
169 # des Heimdal K 0.3d, but Heimdal seems to be set up such
170 # that it could have been installed from elsewhere.
172 AC_SEARCH_LIBS([des_set_odd_parity], [des])
175 # com_err Heimdal K 0.3d
177 # com_err MIT K5 v1.2.2-beta1
179 AC_SEARCH_LIBS([com_err], [com_err])
182 # asn1 Heimdal K 0.3d -lcom_err
184 AC_SEARCH_LIBS([initialize_asn1_error_table_r], [asn1])
187 # resolv required, but not installed by Heimdal K 0.3d
189 # resolv MIT K5 1.2.2-beta1
192 AC_SEARCH_LIBS([__dn_expand], [resolv])
195 # roken Heimdal K 0.3d -lresolv
197 AC_SEARCH_LIBS([roken_gethostbyaddr], [roken])
200 # k5crypto MIT K5 v1.2.2-beta1
202 AC_SEARCH_LIBS([valid_enctype], [k5crypto])
205 # gen ? ? ? Needed on Irix 5.3 with some
206 # Irix 5.3 version of Kerberos. I'm not
207 # sure which since Irix didn't
208 # get any testing this time
209 # around. Original comment:
211 # This is necessary on Irix 5.3, in order to link against libkrb5 --
212 # there, an_to_ln.o refers to things defined only in -lgen.
214 AC_SEARCH_LIBS([compile], [gen])
217 # krb5 ? ? ? -lgen -l???
222 # krb5 MIT K5 v1.2.2-beta1 -lcrypto -lcom_err
225 # krb5 MIT K5 v1.2.2-beta1 -lcrypto -lcom_err -lresolv
227 # krb5 Heimdal K 0.3d -lasn1 -lroken -ldes
229 AC_SEARCH_LIBS([krb5_free_context], [krb5])
232 # gssapi_krb5 Only lib needed with MIT K5 v1.2.1, so find it first in
233 # order to prefer MIT Kerberos. If both MIT & Heimdal
234 # Kerberos are installed and in the path, this will leave
235 # some of the libraries above in LIBS unnecessarily, but
236 # noone would ever do that, right?
238 # gssapi_krb5 MIT K5 v1.2.2-beta1 -lkrb5
240 # gssapi Heimdal K 0.3d -lkrb5
242 AC_SEARCH_LIBS([gss_import_name], [gssapi_krb5 gssapi])
246 # Do all the work for Automake. This macro actually does too much --
247 # some checks are only needed if your package does certain things.
248 # But this isn't really a big deal.
252 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
253 # written in clear, in which case automake, when reading aclocal.m4,
254 # will think it sees a *use*, and therefore will trigger all it's
255 # C support machinery. Also note that it means that autoscan, seeing
256 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
259 # We require 2.13 because we rely on SHELL being computed by configure.
262 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
263 # -----------------------------------------------------------
264 # If MACRO-NAME is provided do IF-PROVIDED, else IF-NOT-PROVIDED.
265 # The purpose of this macro is to provide the user with a means to
266 # check macros which are provided without letting her know how the
267 # information is coded.
268 # If this macro is not defined by Autoconf, define it here.
269 ifdef([AC_PROVIDE_IFELSE],
271 [define([AC_PROVIDE_IFELSE],
272 [ifdef([AC_PROVIDE_$1],
276 # AM_INIT_AUTOMAKE(PACKAGE,VERSION, [NO-DEFINE])
277 # ----------------------------------------------
278 AC_DEFUN([AM_INIT_AUTOMAKE],
279 [AC_REQUIRE([AC_PROG_INSTALL])dnl
280 # test to see if srcdir already configured
281 if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" &&
282 test -f $srcdir/config.status; then
283 AC_MSG_ERROR([source directory already configured; run \"make distclean\" there first])
286 # Define the identity of the package.
292 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
293 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])
295 # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
296 # the ones we care about.
297 ifdef([m4_pattern_allow],
298 [m4_pattern_allow([^AM_(C|CPP|CXX|OBJC|F|R|GCJ)FLAGS])])dnl
300 # Some tools Automake needs.
301 AC_REQUIRE([AM_SANITY_CHECK])dnl
302 AC_REQUIRE([AC_ARG_PROGRAM])dnl
303 AM_MISSING_PROG(ACLOCAL, aclocal)
304 AM_MISSING_PROG(AUTOCONF, autoconf)
305 AM_MISSING_PROG(AUTOMAKE, automake)
306 AM_MISSING_PROG(AUTOHEADER, autoheader)
307 AM_MISSING_PROG(MAKEINFO, makeinfo)
308 AM_MISSING_PROG(AMTAR, tar)
309 AM_MISSING_INSTALL_SH
310 AM_PROG_INSTALL_STRIP
311 # We need awk for the "check" target. The system "awk" is bad on
313 AC_REQUIRE([AC_PROG_AWK])dnl
314 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
315 AC_REQUIRE([AM_PROG_ETAGS])dnl
316 AC_REQUIRE([AM_DEP_TRACK])dnl
317 AC_REQUIRE([AM_SET_DEPDIR])dnl
318 AC_PROVIDE_IFELSE([AC_PROG_][CC],
319 [AM_DEPENDENCIES(CC)],
320 [define([AC_PROG_][CC],
321 defn([AC_PROG_][CC])[AM_DEPENDENCIES(CC)])])dnl
322 AC_PROVIDE_IFELSE([AC_PROG_][CXX],
323 [AM_DEPENDENCIES(CXX)],
324 [define([AC_PROG_][CXX],
325 defn([AC_PROG_][CXX])[AM_DEPENDENCIES(CXX)])])dnl
329 # Check to make sure that the build environment is sane.
336 AC_DEFUN([AM_SANITY_CHECK],
337 [AC_MSG_CHECKING([whether build environment is sane])
340 echo timestamp > conftest.file
341 # Do `set' in a subshell so we don't clobber the current shell's
342 # arguments. Must try -L first in case configure is actually a
343 # symlink; some systems play weird games with the mod time of symlinks
344 # (eg FreeBSD returns the mod time of the symlink's containing
347 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
348 if test "$[*]" = "X"; then
350 set X `ls -t $srcdir/configure conftest.file`
352 if test "$[*]" != "X $srcdir/configure conftest.file" \
353 && test "$[*]" != "X conftest.file $srcdir/configure"; then
355 # If neither matched, then we have a broken ls. This can happen
356 # if, for instance, CONFIG_SHELL is bash and it inherits a
357 # broken ls alias from the environment. This has actually
358 # happened. Such a system could not be considered "sane".
359 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
360 alias in your environment])
363 test "$[2]" = conftest.file
369 AC_MSG_ERROR([newly created file is older than distributed files!
370 Check your system clock])
378 # AM_MISSING_PROG(NAME, PROGRAM)
379 # ------------------------------
380 AC_DEFUN([AM_MISSING_PROG],
381 [AC_REQUIRE([AM_MISSING_HAS_RUN])
382 $1=${$1-"${am_missing_run}$2"}
386 # AM_MISSING_INSTALL_SH
387 # ---------------------
388 # Like AM_MISSING_PROG, but only looks for install-sh.
389 AC_DEFUN([AM_MISSING_INSTALL_SH],
390 [AC_REQUIRE([AM_MISSING_HAS_RUN])
391 if test -z "$install_sh"; then
392 for install_sh in "$ac_aux_dir/install-sh" \
393 "$ac_aux_dir/install.sh" \
394 "${am_missing_run}${ac_auxdir}/install-sh";
396 test -f "$install_sh" && break
398 # FIXME: an evil hack: we remove the SHELL invocation from
399 # install_sh because automake adds it back in. Sigh.
400 install_sh=`echo $install_sh | sed -e 's/\${SHELL}//'`
402 AC_SUBST(install_sh)])
407 # Define MISSING if not defined so far and test if it supports --run.
408 # If it does, set am_missing_run to use it, otherwise, to nothing.
409 AC_DEFUN([AM_MISSING_HAS_RUN],
410 [test x"${MISSING+set}" = xset ||
411 MISSING="\${SHELL} `CDPATH=:; cd $ac_aux_dir && pwd`/missing"
412 # Use eval to expand $SHELL
413 if eval "$MISSING --run true"; then
414 am_missing_run="$MISSING --run "
418 AC_MSG_WARN([${am_backtick}missing' script is too old or missing])
424 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
425 # $ac_aux_dir to ${srcdir}/foo. In other projects, it is set to `.'.
426 # Of course, Automake must honor this variable whenever it call a tool
427 # from the auxiliary directory. The problem is that $srcdir (hence
428 # $ac_aux_dir) can be either an absolute path or a path relative to
429 # $top_srcdir or absolute, this depends on how configure is run. This
430 # is pretty anoying since it makes $ac_aux_dir quite unusable in
431 # subdirectories: on the top source directory, any form will work
432 # fine, but in subdirectories relative pat needs to be adapted.
433 # - calling $top_srcidr/$ac_aux_dir/missing would success if $srcdir is
434 # relative, but fail if $srcdir is absolute
435 # - conversly, calling $ax_aux_dir/missing would fail if $srcdir is
436 # absolute, and success on relative paths.
438 # Consequently, we define and use $am_aux_dir, the "always absolute"
439 # version of $ac_aux_dir.
441 AC_DEFUN([AM_AUX_DIR_EXPAND], [
442 # expand $ac_aux_dir to an absolute path
443 am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd`
446 # One issue with vendor `install' (even GNU) is that you can't
447 # specify the program used to strip binaries. This is especially
448 # annoying in cross=compiling environments, where the build's strip
449 # is unlikely to handle the host's binaries.
450 # Fortunately install-sh will honor a STRIPPROG variable, so if we ever
451 # need to use a non standard strip, we just have to make sure we use
452 # install-sh with the STRIPPROG variable set.
453 AC_DEFUN([AM_PROG_INSTALL_STRIP],
454 [AC_REQUIRE([AM_MISSING_INSTALL_SH])
455 dnl Don't test for $cross_compiling = yes, it might be `maybe'...
456 # We'd like to do this but we can't because it will unconditionally
457 # require config.guess. One way would be if autoconf had the capability
458 # to let us compile in this code only when config.guess was already
460 #if test "$cross_compiling" != no; then
461 # # since we are cross-compiling, we need to check for a suitable `strip'
463 # if test -z "$STRIP"; then
464 # AC_MSG_WARN([strip missing, install-strip will not strip binaries])
468 # If $STRIP is defined (either by the user, or by AM_PROG_STRIP),
469 # instruct install-strip to use install-sh and the given $STRIP program.
470 # Otherwise, just use ${INSTALL}: the idea is to use the vendor install
471 # as much as possible, because it's faster.
472 if test -z "$STRIP"; then
473 # The top level make will set INSTALL_PROGRAM=$(INSTALL_STRIP_PROGRAM)
474 # and the double dolard below is there to make sure that ${INSTALL}
475 # is substitued in the sub-makes, not at the top-level; this is
476 # needed if ${INSTALL} is a relative path (ajusted in each subdirectory
478 INSTALL_STRIP_PROGRAM='$${INSTALL} -s'
479 INSTALL_STRIP_PROGRAM_ENV=''
481 _am_dirpart="`echo $install_sh | sed -e 's,//*[[^/]]*$,,'`"
482 INSTALL_STRIP_PROGRAM="\${SHELL} \`CDPATH=: && cd $_am_dirpart && pwd\`/install-sh -c -s"
483 INSTALL_STRIP_PROGRAM_ENV="STRIPPROG='\$(STRIP)'"
486 AC_SUBST([INSTALL_STRIP_PROGRAM])
487 AC_SUBST([INSTALL_STRIP_PROGRAM_ENV])])
489 #AC_DEFUN([AM_PROG_STRIP],
490 #[# Check for `strip', unless the installer
491 # has set the STRIP environment variable.
492 # Note: don't explicitly check for -z "$STRIP" here because
493 # that will cause problems if AC_CANONICAL_* is AC_REQUIREd after
494 # this macro, and anyway it doesn't have an effect anyway.
495 #AC_CHECK_TOOL([STRIP],[strip])
499 # Find some information about the etags program
502 # ETAGS = path to etags
503 # ETAGS_INCLUDE_OPTION = option to pass to etags with arg for includes
506 AC_DEFUN([AM_PROG_ETAGS],
507 [AC_BEFORE([$0], [AM_PROG_ETAGS_WORKS])dnl
508 AC_CHECK_PROG(ETAGS, etags, etags)
509 if test -z "$ETAGS"; then
510 AC_CHECK_PROG(ETAGS, ctags, ctags -e)
512 if test -n "$ETAGS"; then
514 if test "$am_cv_prog_etags_works" = yes ; then
515 AM_PROG_ETAGS_INCLUDE_OPTION
517 AM_MISSING_PROG(ETAGS, etags)
520 AM_MISSING_PROG(ETAGS, etags)
524 AC_DEFUN([AM_PROG_ETAGS_WORKS],
525 [AC_CACHE_CHECK([whether ${ETAGS-etags} works], [am_cv_prog_etags_works],
526 [cat >conftest.c <<EOF
529 if AC_TRY_COMMAND([${ETAGS-etags} -f - conftest.c |egrep ^int\ globalvar\; >&2]); then
530 am_cv_prog_etags_works=yes
532 am_cv_prog_etags_works=no
536 AC_DEFUN([AM_PROG_ETAGS_INCLUDE_OPTION],
537 [AC_REQUIRE([AM_PROG_ETAGS_WORKS])dnl
538 if test "$am_cv_prog_etags_works" = yes ; then
539 AC_CACHE_CHECK([for etags include option],
540 [am_cv_prog_etags_include_option],
541 [cat >conftest.c <<EOF
544 if AC_TRY_COMMAND([${ETAGS-etags} --etags-include=TAGS.inc -f - conftest.c |egrep ^TAGS.inc,include\$ >&2]); then
545 am_cv_prog_etags_include_option=--etags-include=
546 elif AC_TRY_COMMAND([${ETAGS-etags} -i TAGS.inc -f - conftest.c |egrep ^TAGS.inc,include\$ >&2]); then
547 am_cv_prog_etags_include_option='"-i "'
549 # AC_MSG_ERROR(unfamiliar etags implementation)
555 ETAGS_INCLUDE_OPTION="$am_cv_prog_etags_include_option"
556 AC_SUBST(ETAGS_INCLUDE_OPTION)])
560 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
561 # written in clear, in which case automake, when reading aclocal.m4,
562 # will think it sees a *use*, and therefore will trigger all it's
563 # C support machinery. Also note that it means that autoscan, seeing
564 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
566 # AM_DEPENDENCIES(NAME)
567 # ---------------------
568 # See how the compiler implements dependency checking.
569 # NAME is "CC", "CXX" or "OBJC".
570 # We try a few techniques and use that to set a single cache variable.
571 AC_DEFUN([AM_DEPENDENCIES],
572 [AC_REQUIRE([AM_SET_DEPDIR])dnl
573 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
575 [AC_REQUIRE([AC_PROG_][CC])dnl
576 AC_REQUIRE([AC_PROG_][CPP])
579 [$1], CXX, [AC_REQUIRE([AC_PROG_][CXX])dnl
580 AC_REQUIRE([AC_PROG_][CXXCPP])
583 [$1], OBJC, [am_cv_OBJC_dependencies_compiler_type=gcc],
584 [AC_REQUIRE([AC_PROG_][$1])dnl
588 AC_REQUIRE([AM_MAKE_INCLUDE])
590 AC_CACHE_CHECK([dependency style of $depcc],
591 [am_cv_$1_dependencies_compiler_type],
592 [if test -z "$AMDEP"; then
593 # We make a subdir and do the tests there. Otherwise we can end up
594 # making bogus files that we don't know about and never remove. For
595 # instance it was reported that on HP-UX the gcc test will end up
596 # making a dummy file named `D' -- because `-MD' means `put the output
599 # Copy depcomp to subdir because otherwise we won't find it if we're
600 # using a relative directory.
601 cp "$am_depcomp" confdir
604 am_cv_$1_dependencies_compiler_type=none
605 for depmode in `sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < "./depcomp"`; do
606 # We need to recreate these files for each test, as the compiler may
607 # overwrite some of them when testing with obscure command lines.
608 # This happens at least with the AIX C compiler.
609 echo '#include "conftest.h"' > conftest.c
610 echo 'int i;' > conftest.h
614 # after this tag, mechanisms are not by side-effect, so they'll
615 # only be used when explicitly requested
616 if test "x$enable_dependency_tracking" = xyes; then
624 # We check with `-c' and `-o' for the sake of the "dashmstdout"
625 # mode. It turns out that the SunPro C++ compiler does not properly
626 # handle `-M -o', and we need to detect this.
627 if depmode="$depmode" \
628 source=conftest.c object=conftest.o \
629 depfile=conftest.Po tmpdepfile=conftest.TPo \
630 $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
631 grep conftest.h conftest.Po > /dev/null 2>&1; then
632 am_cv_$1_dependencies_compiler_type="$depmode"
640 am_cv_$1_dependencies_compiler_type=none
643 $1DEPMODE="depmode=$am_cv_$1_dependencies_compiler_type"
644 AC_SUBST([$1DEPMODE])
650 # Choose a directory name for dependency files.
651 # This macro is AC_REQUIREd in AM_DEPENDENCIES
652 AC_DEFUN([AM_SET_DEPDIR],
653 [if test -d .deps || mkdir .deps 2> /dev/null || test -d .deps; then
655 # We redirect because .deps might already exist and be populated.
656 # In this situation we don't want to see an error.
657 rmdir .deps > /dev/null 2>&1
667 AC_DEFUN([AM_DEP_TRACK],
668 [AC_ARG_ENABLE(dependency-tracking,
669 [ --disable-dependency-tracking Speeds up one-time builds
670 --enable-dependency-tracking Do not reject slow dependency extractors])
671 if test "x$enable_dependency_tracking" != xno; then
672 am_depcomp="$ac_aux_dir/depcomp"
675 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
676 pushdef([subst], defn([AC_SUBST]))
677 subst(AMDEPBACKSLASH)
681 # Generate code to set up dependency tracking.
682 # This macro should only be invoked once -- use via AC_REQUIRE.
684 # AM_OUTPUT_DEPENDENCY_COMMANDS
687 # This code is only required when automatic dependency tracking
688 # is enabled. FIXME. This creates each `.P' file that we will
689 # need in order to bootstrap the dependency handling code.
690 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],[
692 test x"$AMDEP" != x"" ||
693 for mf in $CONFIG_FILES; do
695 Makefile) dirpart=.;;
696 */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
699 grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
700 # Extract the definition of DEP_FILES from the Makefile without
702 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
703 test -z "$DEPDIR" && continue
704 # When using ansi2knr, U may be empty or an underscore; expand it
705 U=`sed -n -e '/^U = / s///p' < "$mf"`
706 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
707 # We invoke sed twice because it is the simplest approach to
708 # changing $(DEPDIR) to its actual value in the expansion.
709 for file in `sed -n -e '
710 /^DEP_FILES = .*\\\\$/ {
719 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
720 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
721 # Make sure the directory exists.
722 test -f "$dirpart/$file" && continue
723 fdir=`echo "$file" | sed -e 's|/[^/]*$||'`
724 $ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1
725 # echo "creating $dirpart/$file"
726 echo '# dummy' > "$dirpart/$file"
730 ac_aux_dir="$ac_aux_dir"])])
734 # Check to see how make treats includes.
735 AC_DEFUN([AM_MAKE_INCLUDE],
736 [am_make=${MAKE-make}
737 cat > confinc << 'END'
741 # If we don't find an include directive, just comment out the code.
742 AC_MSG_CHECKING([for style of include used by $am_make])
746 # First try GNU make style include.
747 echo "include confinc" > confmf
748 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
753 # Now try BSD make style include.
754 if test "$_am_include" = "#"; then
755 echo '.include "confinc"' > confmf
756 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
762 AC_SUBST(_am_include)
764 AC_MSG_RESULT($_am_result)
770 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
771 # -------------------------------------
772 # Define a conditional.
774 # FIXME: Once using 2.50, use this:
775 # m4_match([$1], [^TRUE\|FALSE$], [AC_FATAL([$0: invalid condition: $1])])dnl
776 AC_DEFUN([AM_CONDITIONAL],
777 [ifelse([$1], [TRUE],
778 [errprint(__file__:__line__: [$0: invalid condition: $1
781 ifelse([$1], [FALSE],
782 [errprint(__file__:__line__: [$0: invalid condition: $1
795 # Like AC_CONFIG_HEADER, but automatically create stamp file.
799 # When config.status generates a header, we must update the stamp-h file.
800 # This file resides in the same directory as the config header
801 # that is generated. We must strip everything past the first ":",
802 # and everything past the last "/".
806 AC_DEFUN([AM_CONFIG_HEADER],
807 [ifdef([AC_FOREACH],dnl
808 [dnl init our file count if it isn't already
809 m4_ifndef([_AM_Config_Header_Index], m4_define([_AM_Config_Header_Index], [0]))
810 dnl prepare to store our destination file list for use in config.status
811 AC_FOREACH([_AM_File], [$1],
812 [m4_pushdef([_AM_Dest], m4_patsubst(_AM_File, [:.*]))
813 m4_define([_AM_Config_Header_Index], m4_incr(_AM_Config_Header_Index))
814 dnl and add it to the list of files AC keeps track of, along
816 AC_CONFIG_HEADERS(_AM_File,
817 dnl COMMANDS, [, INIT-CMDS]
818 [# update the timestamp
819 echo timestamp >"AS_ESCAPE(_AM_DIRNAME(]_AM_Dest[))/stamp-h]_AM_Config_Header_Index["
820 ][$2]m4_ifval([$3], [, [$3]]))dnl AC_CONFIG_HEADERS
821 m4_popdef([_AM_Dest])])],dnl
822 [AC_CONFIG_HEADER([$1])
824 ifelse(patsubst([$1], [[^ ]], []),
826 [test -z "$CONFIG_HEADERS" || echo timestamp >dnl
827 patsubst([$1], [^\([^:]*/\)?.*], [\1])stamp-h]),dnl
829 for am_file in $1; do
830 case " \$CONFIG_HEADERS " in
832 am_dir=\`echo \$am_file |sed 's%:.*%%;s%[^/]*\$%%'\`
833 if test -n "\$am_dir"; then
834 am_tmpdir=\`echo \$am_dir |sed 's%^\(/*\).*\$%\1%'\`
835 for am_subdir in \`echo \$am_dir |sed 's%/% %'\`; do
836 am_tmpdir=\$am_tmpdir\$am_subdir/
837 if test ! -d \$am_tmpdir; then
842 echo timestamp > "\$am_dir"stamp-h\$am_indx
845 am_indx=\`expr \$am_indx + 1\`
847 ])]) # AM_CONFIG_HEADER
851 # Like AS_DIRNAME, only do it during macro expansion
852 AC_DEFUN([_AM_DIRNAME],
853 [m4_if(m4_regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
854 m4_if(m4_regexp([$1], [^//\([^/]\|$\)]), -1,
855 m4_if(m4_regexp([$1], [^/.*]), -1,
857 m4_patsubst([$1], [^\(/\).*], [\1])),
858 m4_patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
859 m4_patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl