1# aclocal.m4 generated automatically by aclocal 1.4e 2 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. 8 9# This program is distributed in the hope that it will be useful, 10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12# PARTICULAR PURPOSE. 13 14/* 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) 17 any later version. 18 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. */ 23 24AC_DEFUN(ACX_WITH_GSSAPI,[ 25# 26# Use --with-gssapi[=DIR] to enable GSSAPI support. 27# 28# defaults to enabled with DIR in default list below 29# 30# Search for /SUNHEA/ and read the comments about this default below. 31# 32AC_ARG_WITH([gssapi], 33 [ --with-gssapi=value GSSAPI directory], 34 [acx_gssapi_withgssapi=$withval], [acx_gssapi_withgssapi=yes])dnl 35 36dnl 37dnl FIXME - cache withval and obliterate later cache values when options change 38dnl 39# 40# Try to locate a GSSAPI installation if no location was specified, assuming 41# GSSAPI was enabled (the default). 42# 43if 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]) 48else :; fi 49AC_CACHE_VAL([acx_gssapi_cv_gssapi], [ 50if 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. 53 # 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 66 break 67 fi 68 if test x$acx_gssapi_cv_gssapi = xyes; then 69 AC_CHECKING([for GSSAPI]) 70 else 71 CPPFLAGS="$acx_gssapi_save_CPPFLAGS -I$acx_gssapi_cv_gssapi/include" 72 AC_CHECKING([for GSSAPI in $acx_gssapi_cv_gssapi]) 73 fi 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 79 break 80 fi 81 done 82 CPPFLAGS=$acx_gssapi_save_CPPFLAGS 83else 84 acx_gssapi_cv_gssapi=$acx_gssapi_withgssapi 85fi 86AC_MSG_CHECKING([for GSSAPI]) 87])dnl 88AC_MSG_RESULT([$acx_gssapi_cv_gssapi]) 89 90# 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. 93# 94if test x$acx_gssapi_cv_gssapi = yes; then 95 # no special includes necessary 96 GSSAPI_INCLUDES="" 97else 98 # GSSAPI at $acx_gssapi_cv_gssapi (could be 'no') 99 GSSAPI_INCLUDES=" -I$acx_gssapi_cv_gssapi/include" 100fi 101 102# 103# Get the rest of the information CVS needs to compile with GSSAPI support 104# 105if 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 109 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])) 124 fi 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])) 131 fi 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])) 138 fi]) 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 145in the gssapi.h header file. MIT Kerberos 1.2.1 requires this. Only relevant 146when using GSSAPI.]) 147 fi 148 CPPFLAGS=$acx_gssapi_save_CPPFLAGS 149 150 # Expect the libs to be installed parallel to the headers 151 # 152 # We could try once with and once without, but I'm not sure it's worth the 153 # trouble. 154 if test x$acx_gssapi_cv_gssapi != xyes; then 155 if test -z "$LIBS"; then 156 LIBS="-L$acx_gssapi_cv_gssapi/lib" 157 else 158 LIBS="-L$acx_gssapi_cv_gssapi/lib $LIBS" 159 fi 160 else :; fi 161 162 dnl What happens if we want to enable, say, krb5 and some other GSSAPI 163 dnl authentication method at the same time? 164 # 165 # Some of the order below is particular due to library dependencies 166 # 167 168 # 169 # des Heimdal K 0.3d, but Heimdal seems to be set up such 170 # that it could have been installed from elsewhere. 171 # 172 AC_SEARCH_LIBS([des_set_odd_parity], [des]) 173 174 # 175 # com_err Heimdal K 0.3d 176 # 177 # com_err MIT K5 v1.2.2-beta1 178 # 179 AC_SEARCH_LIBS([com_err], [com_err]) 180 181 # 182 # asn1 Heimdal K 0.3d -lcom_err 183 # 184 AC_SEARCH_LIBS([initialize_asn1_error_table_r], [asn1]) 185 186 # 187 # resolv required, but not installed by Heimdal K 0.3d 188 # 189 # resolv MIT K5 1.2.2-beta1 190 # Linux 2.2.17 191 # 192 AC_SEARCH_LIBS([__dn_expand], [resolv]) 193 194 # 195 # roken Heimdal K 0.3d -lresolv 196 # 197 AC_SEARCH_LIBS([roken_gethostbyaddr], [roken]) 198 199 # 200 # k5crypto MIT K5 v1.2.2-beta1 201 # 202 AC_SEARCH_LIBS([valid_enctype], [k5crypto]) 203 204 # 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: 210 # 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. 213 # 214 AC_SEARCH_LIBS([compile], [gen]) 215 216 # 217 # krb5 ? ? ? -lgen -l??? 218 # Irix 5.3 219 # 220 # krb5 MIT K5 v1.1.1 221 # 222 # krb5 MIT K5 v1.2.2-beta1 -lcrypto -lcom_err 223 # Linux 2.2.17 224 # 225 # krb5 MIT K5 v1.2.2-beta1 -lcrypto -lcom_err -lresolv 226 # 227 # krb5 Heimdal K 0.3d -lasn1 -lroken -ldes 228 # 229 AC_SEARCH_LIBS([krb5_free_context], [krb5]) 230 231 # 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? 237 # 238 # gssapi_krb5 MIT K5 v1.2.2-beta1 -lkrb5 239 # 240 # gssapi Heimdal K 0.3d -lkrb5 241 # 242 AC_SEARCH_LIBS([gss_import_name], [gssapi_krb5 gssapi]) 243fi 244])dnl 245 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. 249 250# serial 5 251 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... 257 258 259# We require 2.13 because we rely on SHELL being computed by configure. 260AC_PREREQ([2.13]) 261 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. 269ifdef([AC_PROVIDE_IFELSE], 270 [], 271 [define([AC_PROVIDE_IFELSE], 272 [ifdef([AC_PROVIDE_$1], 273 [$2], [$3])])]) 274 275 276# AM_INIT_AUTOMAKE(PACKAGE,VERSION, [NO-DEFINE]) 277# ---------------------------------------------- 278AC_DEFUN([AM_INIT_AUTOMAKE], 279[AC_REQUIRE([AC_PROG_INSTALL])dnl 280# test to see if srcdir already configured 281if 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]) 284fi 285 286# Define the identity of the package. 287PACKAGE=$1 288AC_SUBST(PACKAGE)dnl 289VERSION=$2 290AC_SUBST(VERSION)dnl 291ifelse([$3],, 292[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 293AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])]) 294 295# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow 296# the ones we care about. 297ifdef([m4_pattern_allow], 298 [m4_pattern_allow([^AM_(C|CPP|CXX|OBJC|F|R|GCJ)FLAGS])])dnl 299 300# Some tools Automake needs. 301AC_REQUIRE([AM_SANITY_CHECK])dnl 302AC_REQUIRE([AC_ARG_PROGRAM])dnl 303AM_MISSING_PROG(ACLOCAL, aclocal) 304AM_MISSING_PROG(AUTOCONF, autoconf) 305AM_MISSING_PROG(AUTOMAKE, automake) 306AM_MISSING_PROG(AUTOHEADER, autoheader) 307AM_MISSING_PROG(MAKEINFO, makeinfo) 308AM_MISSING_PROG(AMTAR, tar) 309AM_MISSING_INSTALL_SH 310AM_PROG_INSTALL_STRIP 311# We need awk for the "check" target. The system "awk" is bad on 312# some platforms. 313AC_REQUIRE([AC_PROG_AWK])dnl 314AC_REQUIRE([AC_PROG_MAKE_SET])dnl 315AC_REQUIRE([AM_PROG_ETAGS])dnl 316AC_REQUIRE([AM_DEP_TRACK])dnl 317AC_REQUIRE([AM_SET_DEPDIR])dnl 318AC_PROVIDE_IFELSE([AC_PROG_][CC], 319 [AM_DEPENDENCIES(CC)], 320 [define([AC_PROG_][CC], 321 defn([AC_PROG_][CC])[AM_DEPENDENCIES(CC)])])dnl 322AC_PROVIDE_IFELSE([AC_PROG_][CXX], 323 [AM_DEPENDENCIES(CXX)], 324 [define([AC_PROG_][CXX], 325 defn([AC_PROG_][CXX])[AM_DEPENDENCIES(CXX)])])dnl 326]) 327 328# 329# Check to make sure that the build environment is sane. 330# 331 332# serial 3 333 334# AM_SANITY_CHECK 335# --------------- 336AC_DEFUN([AM_SANITY_CHECK], 337[AC_MSG_CHECKING([whether build environment is sane]) 338# Just in case 339sleep 1 340echo 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 345# directory). 346if ( 347 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 348 if test "$[*]" = "X"; then 349 # -L didn't work. 350 set X `ls -t $srcdir/configure conftest.file` 351 fi 352 if test "$[*]" != "X $srcdir/configure conftest.file" \ 353 && test "$[*]" != "X conftest.file $srcdir/configure"; then 354 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 360alias in your environment]) 361 fi 362 363 test "$[2]" = conftest.file 364 ) 365then 366 # Ok. 367 : 368else 369 AC_MSG_ERROR([newly created file is older than distributed files! 370Check your system clock]) 371fi 372rm -f conftest* 373AC_MSG_RESULT(yes)]) 374 375 376# serial 2 377 378# AM_MISSING_PROG(NAME, PROGRAM) 379# ------------------------------ 380AC_DEFUN([AM_MISSING_PROG], 381[AC_REQUIRE([AM_MISSING_HAS_RUN]) 382$1=${$1-"${am_missing_run}$2"} 383AC_SUBST($1)]) 384 385 386# AM_MISSING_INSTALL_SH 387# --------------------- 388# Like AM_MISSING_PROG, but only looks for install-sh. 389AC_DEFUN([AM_MISSING_INSTALL_SH], 390[AC_REQUIRE([AM_MISSING_HAS_RUN]) 391if 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"; 395 do 396 test -f "$install_sh" && break 397 done 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}//'` 401fi 402AC_SUBST(install_sh)]) 403 404 405# AM_MISSING_HAS_RUN 406# ------------------ 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. 409AC_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 413if eval "$MISSING --run true"; then 414 am_missing_run="$MISSING --run " 415else 416 am_missing_run= 417 am_backtick='`' 418 AC_MSG_WARN([${am_backtick}missing' script is too old or missing]) 419fi 420]) 421 422# AM_AUX_DIR_EXPAND 423 424# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 425# $ac_aux_dir to ${srcdir}/foo. In other projects, it is set to `.'. 426# 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. 437# 438# Consequently, we define and use $am_aux_dir, the "always absolute" 439# version of $ac_aux_dir. 440 441AC_DEFUN([AM_AUX_DIR_EXPAND], [ 442# expand $ac_aux_dir to an absolute path 443am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd` 444]) 445 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. 453AC_DEFUN([AM_PROG_INSTALL_STRIP], 454[AC_REQUIRE([AM_MISSING_INSTALL_SH]) 455dnl 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 459# a possibility. 460#if test "$cross_compiling" != no; then 461# # since we are cross-compiling, we need to check for a suitable `strip' 462# AM_PROG_STRIP 463# if test -z "$STRIP"; then 464# AC_MSG_WARN([strip missing, install-strip will not strip binaries]) 465# fi 466#fi 467 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. 472if 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 477 # by config.status). 478 INSTALL_STRIP_PROGRAM='$${INSTALL} -s' 479 INSTALL_STRIP_PROGRAM_ENV='' 480else 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)'" 484fi 485AC_SUBST([STRIP]) 486AC_SUBST([INSTALL_STRIP_PROGRAM]) 487AC_SUBST([INSTALL_STRIP_PROGRAM_ENV])]) 488 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]) 496#]) 497 498# 499# Find some information about the etags program 500# 501# Sets 502# ETAGS = path to etags 503# ETAGS_INCLUDE_OPTION = option to pass to etags with arg for includes 504# 505 506AC_DEFUN([AM_PROG_ETAGS], 507[AC_BEFORE([$0], [AM_PROG_ETAGS_WORKS])dnl 508AC_CHECK_PROG(ETAGS, etags, etags) 509if test -z "$ETAGS"; then 510 AC_CHECK_PROG(ETAGS, ctags, ctags -e) 511fi 512if test -n "$ETAGS"; then 513 AM_PROG_ETAGS_WORKS 514 if test "$am_cv_prog_etags_works" = yes ; then 515 AM_PROG_ETAGS_INCLUDE_OPTION 516 else 517 AM_MISSING_PROG(ETAGS, etags) 518 fi 519else 520 AM_MISSING_PROG(ETAGS, etags) 521fi]) 522 523 524AC_DEFUN([AM_PROG_ETAGS_WORKS], 525[AC_CACHE_CHECK([whether ${ETAGS-etags} works], [am_cv_prog_etags_works], 526[cat >conftest.c <<EOF 527int globalvar; 528EOF 529if AC_TRY_COMMAND([${ETAGS-etags} -f - conftest.c |egrep ^int\ globalvar\; >&2]); then 530 am_cv_prog_etags_works=yes 531else 532 am_cv_prog_etags_works=no 533fi 534rm -f conftest.c])]) 535 536AC_DEFUN([AM_PROG_ETAGS_INCLUDE_OPTION], 537[AC_REQUIRE([AM_PROG_ETAGS_WORKS])dnl 538if 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 542int globalvar; 543EOF 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 "' 548 else : 549 # AC_MSG_ERROR(unfamiliar etags implementation) 550 fi 551 rm -f conftest.c]) 552else 553 : 554fi 555ETAGS_INCLUDE_OPTION="$am_cv_prog_etags_include_option" 556AC_SUBST(ETAGS_INCLUDE_OPTION)]) 557 558# serial 3 559 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... 565 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. 571AC_DEFUN([AM_DEPENDENCIES], 572[AC_REQUIRE([AM_SET_DEPDIR])dnl 573AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 574ifelse([$1], CC, 575 [AC_REQUIRE([AC_PROG_][CC])dnl 576AC_REQUIRE([AC_PROG_][CPP]) 577depcc="$CC" 578depcpp="$CPP"], 579 [$1], CXX, [AC_REQUIRE([AC_PROG_][CXX])dnl 580AC_REQUIRE([AC_PROG_][CXXCPP]) 581depcc="$CXX" 582depcpp="$CXXCPP"], 583 [$1], OBJC, [am_cv_OBJC_dependencies_compiler_type=gcc], 584 [AC_REQUIRE([AC_PROG_][$1])dnl 585depcc="$$1" 586depcpp=""]) 587 588AC_REQUIRE([AM_MAKE_INCLUDE]) 589 590AC_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 597 # in D'. 598 mkdir confdir 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 602 cd confdir 603 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 611 612 case "$depmode" in 613 nosideeffect) 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 617 continue 618 else 619 break 620 fi 621 ;; 622 none) break ;; 623 esac 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" 633 break 634 fi 635 done 636 637 cd .. 638 rm -rf confdir 639else 640 am_cv_$1_dependencies_compiler_type=none 641fi 642]) 643$1DEPMODE="depmode=$am_cv_$1_dependencies_compiler_type" 644AC_SUBST([$1DEPMODE]) 645]) 646 647 648# AM_SET_DEPDIR 649# ------------- 650# Choose a directory name for dependency files. 651# This macro is AC_REQUIREd in AM_DEPENDENCIES 652AC_DEFUN([AM_SET_DEPDIR], 653[if test -d .deps || mkdir .deps 2> /dev/null || test -d .deps; then 654 DEPDIR=.deps 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 658else 659 DEPDIR=_deps 660fi 661AC_SUBST(DEPDIR) 662]) 663 664 665# AM_DEP_TRACK 666# ------------ 667AC_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]) 671if test "x$enable_dependency_tracking" != xno; then 672 am_depcomp="$ac_aux_dir/depcomp" 673 AMDEPBACKSLASH='\' 674fi 675AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 676pushdef([subst], defn([AC_SUBST])) 677subst(AMDEPBACKSLASH) 678popdef([subst]) 679]) 680 681# Generate code to set up dependency tracking. 682# This macro should only be invoked once -- use via AC_REQUIRE. 683# Usage: 684# AM_OUTPUT_DEPENDENCY_COMMANDS 685 686# 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. 690AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],[ 691AC_OUTPUT_COMMANDS([ 692test x"$AMDEP" != x"" || 693for mf in $CONFIG_FILES; do 694 case "$mf" in 695 Makefile) dirpart=.;; 696 */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;; 697 *) continue;; 698 esac 699 grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue 700 # Extract the definition of DEP_FILES from the Makefile without 701 # running `make'. 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 = .*\\\\$/ { 711 s/^DEP_FILES = // 712 :loop 713 s/\\\\$// 714 p 715 n 716 /\\\\$/ b loop 717 p 718 } 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" 727 done 728done 729], [AMDEP="$AMDEP" 730ac_aux_dir="$ac_aux_dir"])]) 731 732# AM_MAKE_INCLUDE() 733# ----------------- 734# Check to see how make treats includes. 735AC_DEFUN([AM_MAKE_INCLUDE], 736[am_make=${MAKE-make} 737cat > confinc << 'END' 738doit: 739 @echo done 740END 741# If we don't find an include directive, just comment out the code. 742AC_MSG_CHECKING([for style of include used by $am_make]) 743_am_include='#' 744_am_quote= 745_am_result=none 746# First try GNU make style include. 747echo "include confinc" > confmf 748if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 749 _am_include=include 750 _am_quote= 751 _am_result=GNU 752fi 753# Now try BSD make style include. 754if test "$_am_include" = "#"; then 755 echo '.include "confinc"' > confmf 756 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 757 _am_include=.include 758 _am_quote='"' 759 _am_result=BSD 760 fi 761fi 762AC_SUBST(_am_include) 763AC_SUBST(_am_quote) 764AC_MSG_RESULT($_am_result) 765rm -f confinc confmf 766]) 767 768# serial 3 769 770# AM_CONDITIONAL(NAME, SHELL-CONDITION) 771# ------------------------------------- 772# Define a conditional. 773# 774# FIXME: Once using 2.50, use this: 775# m4_match([$1], [^TRUE\|FALSE$], [AC_FATAL([$0: invalid condition: $1])])dnl 776AC_DEFUN([AM_CONDITIONAL], 777[ifelse([$1], [TRUE], 778 [errprint(__file__:__line__: [$0: invalid condition: $1 779])dnl 780m4exit(1)])dnl 781ifelse([$1], [FALSE], 782 [errprint(__file__:__line__: [$0: invalid condition: $1 783])dnl 784m4exit(1)])dnl 785AC_SUBST([$1_TRUE]) 786AC_SUBST([$1_FALSE]) 787if $2; then 788 $1_TRUE= 789 $1_FALSE='#' 790else 791 $1_TRUE='#' 792 $1_FALSE= 793fi]) 794 795# Like AC_CONFIG_HEADER, but automatically create stamp file. 796 797# serial 3 798 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 "/". 803 804AC_PREREQ([2.12]) 805 806AC_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 815 dnl with our hook 816 AC_CONFIG_HEADERS(_AM_File, 817dnl COMMANDS, [, INIT-CMDS] 818[# update the timestamp 819echo 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]) 823 AC_OUTPUT_COMMANDS( 824 ifelse(patsubst([$1], [[^ ]], []), 825 [], 826 [test -z "$CONFIG_HEADERS" || echo timestamp >dnl 827 patsubst([$1], [^\([^:]*/\)?.*], [\1])stamp-h]),dnl 828[am_indx=1 829for am_file in $1; do 830 case " \$CONFIG_HEADERS " in 831 *" \$am_file "*) 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 838 mkdir \$am_tmpdir 839 fi 840 done 841 fi 842 echo timestamp > "\$am_dir"stamp-h\$am_indx 843 ;; 844 esac 845 am_indx=\`expr \$am_indx + 1\` 846done]) 847])]) # AM_CONFIG_HEADER 848 849# _AM_DIRNAME(PATH) 850# ----------------- 851# Like AS_DIRNAME, only do it during macro expansion 852AC_DEFUN([_AM_DIRNAME], 853 [m4_if(m4_regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1, 854 m4_if(m4_regexp([$1], [^//\([^/]\|$\)]), -1, 855 m4_if(m4_regexp([$1], [^/.*]), -1, 856 [.], 857 m4_patsubst([$1], [^\(/\).*], [\1])), 858 m4_patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])), 859 m4_patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl 860]) # _AM_DIRNAME 861 862