* acspecific.m4: Likewise.
* aclang.m4: Likewise.
+2000-05-22 unknown
+
+ * acgeneral.m4: Quote the names being m4-defined.
+ * acspecific.m4: Likewise.
+ * aclang.m4: Likewise.
+
2000-05-22 Akim Demaille <akim@epita.fr>
Factor the AC_PROG_<compiler>_WORKS macros.
# AC_DIVERT_PUSH(DIVERSION-NAME)
# ------------------------------
# Change the diversion stream to DIVERSION-NAME, while stacking old values.
-define(AC_DIVERT_PUSH,
+define([AC_DIVERT_PUSH],
[pushdef([AC_DIVERT_DIVERSION], _AC_DIVERT([$1]))dnl
divert(AC_DIVERT_DIVERSION)dnl
])
# AC_DIVERT_POP
# -------------
# Change the diversion stream to its previous value, unstacking it.
-define(AC_DIVERT_POP,
+define([AC_DIVERT_POP],
[popdef([AC_DIVERT_DIVERSION])dnl
ifndef([AC_DIVERT_DIVERSION], [AC_FATAL([too many AC_DIVERT_POP])])dnl
divert(AC_DIVERT_DIVERSION)dnl
# AC_PRO(MACRO-NAME)
# ------------------
# The prologue for Autoconf macros.
-define(AC_PRO,
+define([AC_PRO],
[AC_PROVIDE([$1])dnl
ifelse(AC_DIVERT_DIVERSION, _AC_DIVERT([NORMAL]),
[AC_DIVERT_PUSH(m4_eval(AC_DIVERT_DIVERSION - 1))],
# AC_EPI
# ------
# The Epilogue for Autoconf macros.
-define(AC_EPI,
+define([AC_EPI],
[AC_DIVERT_POP()dnl
ifelse(AC_DIVERT_DIVERSION, _AC_DIVERT([NORMAL]),
[undivert(_AC_DIVERT([NORMAL_4]))dnl
# AC_OBSOLETE(THIS-MACRO-NAME, [SUGGESTION])
# ------------------------------------------
-define(AC_OBSOLETE,
+define([AC_OBSOLETE],
[AC_DIAGNOSE([obsolete], [$1 is obsolete$2])])
# there exist a specialized version of MACRO for ARG1, use this macro
# instead with arguments ARGS (i.e., ARG1 is *not* given). See the
# definition of `AC_DEFUN'.
-define(AC_SPECIALIZE,
+define([AC_SPECIALIZE],
[ifdef([$1-$2],
[indir([$1-$2], m4_shift(m4_shift($@)))],
[$1(m4_shift($@))])])
# AC_BEFORE(THIS-MACRO-NAME, CALLED-MACRO-NAME)
# ---------------------------------------------
-define(AC_BEFORE,
+define([AC_BEFORE],
[AC_PROVIDE_IFELSE([$2], [AC_DIAGNOSE([syntax], [$2 was called before $1])])])
# ----------------------
# If MACRO-NAME has never been expanded, expand it *before* the current
# macro expansion.
-define(AC_REQUIRE,
+define([AC_REQUIRE],
[AC_PROVIDE_IFELSE([$1],
[],
[AC_DIVERT(m4_eval(AC_DIVERT_DIVERSION - 1), [$1])])dnl
# AC_EXPAND_ONCE(TEXT)
# --------------------
# If TEXT has never been expanded, expand it *here*.
-define(AC_EXPAND_ONCE,
+define([AC_EXPAND_ONCE],
[AC_PROVIDE_IFELSE([$1],
[],
[AC_PROVIDE([$1])[]$1])])
# AC_PROVIDE(MACRO-NAME)
# ----------------------
-define(AC_PROVIDE,
+define([AC_PROVIDE],
[define([AC_PROVIDE_$1])])
# The purpose of this macro is to provide the user with a means to
# check macros which are provided without letting her know how the
# information is coded.
-define(AC_PROVIDE_IFELSE,
+define([AC_PROVIDE_IFELSE],
[ifdef([AC_PROVIDE_$1],
[$2], [$3])])
# Declare `autoupdate::NAME' to be `GLUE-CODE', with all the needed
# wrapping actions required by `autoupdate'.
# We do not define anything in `autoconf::'.
-define(AU_DEFINE,
+define([AU_DEFINE],
[AC_DEFUN([$1], [$2])])
# This allows to share the same code for both supporting obsoleted macros,
# and to update a configure.in.
# See `acobsolete.m4' for a longer description.
-define(AU_DEFUN,
+define([AU_DEFUN],
[AU_DEFINE([$1],
[AC_DIAGNOSE([obsolete], [The macro `$1' is obsolete.
You should run autoupdate.])dnl
# ---------------------------------------------------
# If EXPRESSION has shell indirections ($var or `expr`), expand
# IF-INDIR, else IF-NOT-INDIR.
-define(AC_VAR_IF_INDIR,
+define([AC_VAR_IF_INDIR],
[ifelse(regexp([$1], [[`$]]),
-1, [$3],
[$2])])
# Set the VALUE of the shell VARIABLE.
# If the variable contains indirections (e.g. `ac_cv_func_$ac_func')
# perform whenever possible at m4 level, otherwise sh level.
-define(AC_VAR_SET,
+define([AC_VAR_SET],
[AC_VAR_IF_INDIR([$1],
[eval "$1=$2"],
[$1=$2])])
# Get the value of the shell VARIABLE.
# Evaluates to $VARIABLE if there are no indirection in VARIABLE,
# else into the appropriate `eval' sequence.
-define(AC_VAR_GET,
+define([AC_VAR_GET],
[AC_VAR_IF_INDIR([$1],
[`eval echo '${'patsubst($1, [[\\`]], [\\\&])'}'`],
[$[]$1])])
# -------------------------
# Expands into the `test' expression which is true if VARIABLE
# is set. Polymorphic. Should be dnl'ed.
-define(AC_VAR_TEST_SET,
+define([AC_VAR_TEST_SET],
[AC_VAR_IF_INDIR([$1],
[eval "test \"\${$1+set}\" = set"],
[test "${$1+set}" = set])])
# ------------------------------------------
# Implement a shell `if-then-else' depending whether VARIABLE is set
# or not. Polymorphic.
-define(AC_VAR_IF_SET,
+define([AC_VAR_IF_SET],
[AC_SHELL_IFELSE([AC_VAR_TEST_SET([$1])], [$2], [$3])])
# Define the m4 macro VARNAME to an accessor to the shell variable
# named VALUE. VALUE does not need to be a valid shell variable name:
# the transliteration is handled here. To be dnl'ed.
-define(AC_VAR_PUSHDEF,
+define([AC_VAR_PUSHDEF],
[AC_VAR_IF_INDIR([$2],
[ac_$1=AC_TR_SH($2)
pushdef([$1], [$ac_[$1]])],
# AC_VAR_POPDEF(VARNAME)
# ----------------------
# Free the shell variable accessor VARNAME. To be dnl'ed.
-define(AC_VAR_POPDEF,
+define([AC_VAR_POPDEF],
[popdef([$1])])
# Map EXPRESSION to an upper case string which is valid as rhs for a
# `#define'. sh/m4 polymorphic. Make sure to update the definition
# of `$ac_tr_cpp' if you change this.
-define(AC_TR_CPP,
+define([AC_TR_CPP],
[AC_VAR_IF_INDIR([$1],
[`echo "$1" | $ac_tr_cpp`],
[patsubst(translit([[$1]],
# Transform EXPRESSION into a valid shell variable name.
# sh/m4 polymorphic.
# Make sure to update the definition of `$ac_tr_sh' if you change this.
-define(AC_TR_SH,
+define([AC_TR_SH],
[AC_VAR_IF_INDIR([$1],
[`echo "$1" | $ac_tr_sh`],
[patsubst(translit([[$1]], [*+], [pp]),
# --------------------------
# The quote in the comment below is just to cope with font-lock-mode
# which sees the opening of a string.
-AC_DEFUN(AC_REVISION,
+AC_DEFUN([AC_REVISION],
[AC_REQUIRE([AC_INIT])dnl
AC_DIVERT([BINSH], [@%:@ From configure.in translit([$1], $")])dnl "
])
#i.e., 2.14a -> 2.15.-1.1, 2.14b -> 2.15.-1.2, etc.
# This macro is absolutely not robust to active macro, it expects
# reasonable version numbers and is valid up to `z', no double letters.
-define(_AC_VERSION_UNLETTER,
+define([_AC_VERSION_UNLETTER],
[translit(patsubst(patsubst(patsubst([$1],
[\([0-9]+\)\([abcdefghi]\)],
[m4_eval(\1 + 1).-1.\2]),
# -1 if VERSION-1 < VERSION-2
# 0 if =
# 1 if >
-define(_AC_VERSION_COMPARE,
+define([_AC_VERSION_COMPARE],
[m4_list_cmp((m4_split(_AC_VERSION_UNLETTER([$1]), [\.])),
(m4_split(_AC_VERSION_UNLETTER([$2]), [\.])))])
# AC_PREREQ(VERSION)
# ------------------
# Complain and exit if the Autoconf version is less than VERSION.
-define(AC_PREREQ,
+define([AC_PREREQ],
[ifelse(_AC_VERSION_COMPARE(AC_ACVERSION, [$1]), -1,
[AC_FATAL([Autoconf version $1 or higher is required for this script])])])
# _AC_INIT_DEFAULTS
# -----------------
# Values which defaults can be set from `configure.in'.
-AC_DEFUN(_AC_INIT_DEFAULTS,
+AC_DEFUN([_AC_INIT_DEFAULTS],
[AC_DIVERT_PUSH([DEFAULTS])dnl
#
# AC_PREFIX_DEFAULT(PREFIX)
# -------------------------
-AC_DEFUN(AC_PREFIX_DEFAULT,
+AC_DEFUN([AC_PREFIX_DEFAULT],
[AC_DIVERT([DEFAULTS], [ac_default_prefix=$1])])
# AC_ARG_ENABLE(FEATURE, HELP-STRING, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
# ------------------------------------------------------------------------
-AC_DEFUN(AC_ARG_ENABLE,
+AC_DEFUN([AC_ARG_ENABLE],
[AC_DIVERT_PUSH([HELP_ENABLE])dnl
AC_EXPAND_ONCE([[
Optional Features:
])# AC_ARG_ENABLE
-AU_DEFUN(AC_ENABLE,
+AU_DEFUN([AC_ENABLE],
[AC_ARG_ENABLE([$1], [ --enable-$1], [$2], [$3])])
# AC_ARG_WITH(PACKAGE, HELP-STRING, ACTION-IF-TRUE, [ACTION-IF-FALSE])
# --------------------------------------------------------------------
-AC_DEFUN(AC_ARG_WITH,
+AC_DEFUN([AC_ARG_WITH],
[AC_DIVERT_PUSH([HELP_WITH])dnl
AC_EXPAND_ONCE([[
Optional Packages:
fi[]dnl
])# AC_ARG_WITH
-AU_DEFUN(AC_WITH,
+AU_DEFUN([AC_WITH],
[AC_ARG_WITH([$1], [ --with-$1], [$2], [$3])])
# ----------------------------------
# Register VARNAME as a variable configure should remember, and
# document it in `configure --help'.
-AC_DEFUN(AC_ARG_VAR,
+AC_DEFUN([AC_ARG_VAR],
[AC_DIVERT_PUSH([HELP_VAR])dnl
AC_EXPAND_ONCE([
Some influent environment variables:
# Find install-sh, config.sub, config.guess, and Cygnus configure
# in directory DIR. These are auxiliary files used in configuration.
# DIR can be either absolute or relative to $srcdir.
-AC_DEFUN(AC_CONFIG_AUX_DIR,
+AC_DEFUN([AC_CONFIG_AUX_DIR],
[AC_CONFIG_AUX_DIRS($1 $srcdir/$1)])
# -------------------------
# The default is `$srcdir' or `$srcdir/..' or `$srcdir/../..'.
# There's no need to call this macro explicitly; just AC_REQUIRE it.
-AC_DEFUN(AC_CONFIG_AUX_DIR_DEFAULT,
+AC_DEFUN([AC_CONFIG_AUX_DIR_DEFAULT],
[AC_CONFIG_AUX_DIRS($srcdir $srcdir/.. $srcdir/../..)])
# Search for the configuration auxiliary files in directory list $1.
# We look only for install-sh, so users of AC_PROG_INSTALL
# do not automatically need to distribute the other auxiliary files.
-AC_DEFUN(AC_CONFIG_AUX_DIRS,
+AC_DEFUN([AC_CONFIG_AUX_DIRS],
[ac_aux_dir=
for ac_dir in $1; do
if test -f $ac_dir/install-sh; then
])# AC_CANONICAL_TARGET
-AU_DEFUN(AC_CANONICAL_SYSTEM, [AC_CANONICAL_TARGET])
+AU_DEFUN([AC_CANONICAL_SYSTEM], [AC_CANONICAL_TARGET])
# AC_VALIDATE_CACHED_SYSTEM_TUPLE([CMD])
# If the cache file is inconsistent with the current host,
# target and build system types, execute CMD or print a default
# error message.
-AC_DEFUN(AC_VALIDATE_CACHED_SYSTEM_TUPLE,
+AC_DEFUN([AC_VALIDATE_CACHED_SYSTEM_TUPLE],
[AC_REQUIRE([AC_CANONICAL_SYSTEM])dnl
AC_MSG_CHECKING([cached system tuple])
if { test x"${ac_cv_host_system_type+set}" = x"set" &&
# AC_SITE_LOAD
# ------------
# Look for site or system specific initialization scripts.
-define(AC_SITE_LOAD,
+define([AC_SITE_LOAD],
[# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
if test "x$prefix" != xNONE; then
#
# The name of shell var CACHE-ID must contain `_cv_' in order to get saved.
# Should be dnl'ed.
-define(AC_CACHE_VAL,
+define([AC_CACHE_VAL],
[dnl We used to use the below line, but it fails if the 1st arg is a
dnl shell variable, so we need the eval.
dnl if test "${$1+set}" = set; then
# AC_CACHE_CHECK(MESSAGE, CACHE-ID, COMMANDS)
# -------------------------------------------
# Do not call this macro with a dnl right behind.
-define(AC_CACHE_CHECK,
+define([AC_CACHE_CHECK],
[AC_MSG_CHECKING([$1])
AC_CACHE_VAL([$2], [$3])dnl
AC_MSG_RESULT_UNQUOTED(AC_VAR_GET([$2]))])
# Set VARIABLE to VALUE, verbatim, or 1. Remember the value
# and if VARIABLE is affected the same VALUE, do nothing, else
# die. The third argument is used by autoheader.
-define(AC_DEFINE,
+define([AC_DEFINE],
[ifval([$3], [AH_TEMPLATE([$1], [$3])])dnl
cat >>confdefs.h <<\EOF
[#define] $1 ifelse($#, 2, [$2], $#, 3, [$2], 1)
# AC_DEFINE_UNQUOTED(VARIABLE, [VALUE], [DESCRIPTION])
# ----------------------------------------------------
# Similar, but perform shell substitutions $ ` \ once on VALUE.
-define(AC_DEFINE_UNQUOTED,
+define([AC_DEFINE_UNQUOTED],
[ifval([$3], [AH_TEMPLATE([$1], [$3])])dnl
cat >>confdefs.h <<EOF
[#define] $1 ifelse($#, 2, [$2], $#, 3, [$2], 1)
# ----------------------------
# If VARIABLE has not already been AC_SUBST'ed, append the sed PROGRAM
# to `_AC_SUBST_SED_PROGRAM'.
-define(_AC_SUBST,
+define([_AC_SUBST],
[AC_EXPAND_ONCE([m4_append([_AC_SUBST_SED_PROGRAM],
[$2
])])dnl
# AC_SUBST_FILE(VARIABLE)
# -----------------------
# Read the comments of the preceding macro.
-define(AC_SUBST_FILE,
+define([AC_SUBST_FILE],
[_AC_SUBST([$1], [/@$1@/r [$]$1
s%@$1@%%;t t])])
# ---------------------
# The purpose of this macro is to "configure:123: command line"
# written into config.log for every test run.
-AC_DEFUN(AC_TRY_EVAL,
+AC_DEFUN([AC_TRY_EVAL],
[{ (eval echo configure:__oline__: \"[$]$1\") >&AC_FD_LOG; dnl
(eval [$]$1) 2>&AC_FD_LOG; }])
# AC_TRY_COMMAND(COMMAND)
# -----------------------
-AC_DEFUN(AC_TRY_COMMAND,
+AC_DEFUN([AC_TRY_COMMAND],
[{ ac_try='$1'; AC_TRY_EVAL(ac_try); }])
# Because I don't see any backward compatible means to fix the
# brokenness of AC_TRY_COMPILE, we are doomed to leave a extra new
# line here.
-define(AC_INCLUDES_DEFAULT,
+define([AC_INCLUDES_DEFAULT],
[ifelse([$1], [], [$ac_includes_default], [$1
])])
# ---------------------------------------------------------
# AGGREGATE.MEMBER is for instance `struct passwd.pw_gecos', shell
# variables are not a valid argument.
-AC_DEFUN(AC_CHECK_MEMBER,
+AC_DEFUN([AC_CHECK_MEMBER],
[AC_VAR_IF_INDIR([$1], [AC_FATAL([$0: requires literal arguments])])dnl
ifelse(regexp([$1], [\.]), -1,
[AC_FATAL([$0: Did not see any dot in `$1'])])dnl
# [INCLUDES])
# ---------------------------------------------------------
# The first argument is an m4 list.
-AC_DEFUN(AC_CHECK_MEMBERS,
+AC_DEFUN([AC_CHECK_MEMBERS],
[m4_foreach([AC_Member], [$1],
[AC_SPECIALIZE([AC_CHECK_MEMBER], AC_Member,
[AC_DEFINE_UNQUOTED(AC_TR_CPP(HAVE_[]AC_Member), 1,
# [VALUE-IF-FOUND], [VALUE-IF-NOT-FOUND],
# [PATH], [REJECT])
# -----------------------------------------------------
-AC_DEFUN(AC_CHECK_PROG,
+AC_DEFUN([AC_CHECK_PROG],
[# Extract the first word of "$2", so it can be a program name with args.
set dummy $2; ac_word=$[2]
AC_MSG_CHECKING([for $ac_word])
# AC_CHECK_PROGS(VARIABLE, PROGS-TO-CHECK-FOR, [VALUE-IF-NOT-FOUND],
# [PATH])
# ------------------------------------------------------------------
-AC_DEFUN(AC_CHECK_PROGS,
+AC_DEFUN([AC_CHECK_PROGS],
[for ac_prog in $2
do
AC_CHECK_PROG([$1], $ac_prog, $ac_prog, , [$4])
# AC_PATH_PROG(VARIABLE, PROG-TO-CHECK-FOR, [VALUE-IF-NOT-FOUND], [PATH])
# -----------------------------------------------------------------------
-AC_DEFUN(AC_PATH_PROG,
+AC_DEFUN([AC_PATH_PROG],
[# Extract the first word of "$2", so it can be a program name with args.
set dummy $2; ac_word=$[2]
AC_MSG_CHECKING([for $ac_word])
# AC_PATH_PROGS(VARIABLE, PROGS-TO-CHECK-FOR, [VALUE-IF-NOT-FOUND],
# [PATH])
# -----------------------------------------------------------------
-AC_DEFUN(AC_PATH_PROGS,
+AC_DEFUN([AC_PATH_PROGS],
[for ac_prog in $2
do
AC_PATH_PROG($1, $ac_prog, , $4)
# AC_CHECK_TOOL_PREFIX
# ---------------------
-AC_DEFUN(AC_CHECK_TOOL_PREFIX,
+AC_DEFUN([AC_CHECK_TOOL_PREFIX],
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
if test $host != $build; then
# AC_PATH_TOOL(VARIABLE, PROG-TO-CHECK-FOR, [VALUE-IF-NOT-FOUND], [PATH])
# -----------------------------------------------------------------------
-AC_DEFUN(AC_PATH_TOOL,
+AC_DEFUN([AC_PATH_TOOL],
[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
AC_PATH_PROG($1, ${ac_tool_prefix}$2, ${ac_tool_prefix}$2,
ifelse([$3], , [$2]), $4)
# AC_CHECK_TOOL(VARIABLE, PROG-TO-CHECK-FOR, [VALUE-IF-NOT-FOUND], [PATH])
# ------------------------------------------------------------------------
-AC_DEFUN(AC_CHECK_TOOL,
+AC_DEFUN([AC_CHECK_TOOL],
[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
AC_CHECK_PROG($1, ${ac_tool_prefix}$2, ${ac_tool_prefix}$2,
ifelse([$3], , [$2], ), $4)
# This comes too late to find a site file based on the prefix,
# and it might use a cached value for the path.
# No big loss, I think, since most configures don't use this macro anyway.
-AC_DEFUN(AC_PREFIX_PROGRAM,
+AC_DEFUN([AC_PREFIX_PROGRAM],
[dnl Get an upper case version of $[1].
pushdef(AC_Prog, translit($1, a-z, A-Z))dnl
if test "x$prefix" = xNONE; then
# Try to link a program that calls FUNC, handling GCC builtins. If
# the link succeeds, execute ACTION-IF-FOUND; otherwise, execute
# ACTION-IF-NOT-FOUND.
-AC_DEFUN(AC_TRY_LINK_FUNC,
+AC_DEFUN([AC_TRY_LINK_FUNC],
[AC_LINK_IFELSE([AC_LANG_CALL([], [$1])], [$2], [$3])])
# [OTHER-LIBRARIES])
# --------------------------------------------------------
# Search for a library defining FUNC, if it's not already available.
-AC_DEFUN(AC_SEARCH_LIBS,
+AC_DEFUN([AC_SEARCH_LIBS],
[AC_CACHE_CHECK([for library containing $1], [ac_cv_search_$1],
[ac_func_search_save_LIBS=$LIBS
ac_cv_search_$1=no
# FIXME: This macro is extremely suspicious. It DEFINEs unconditionnally,
# whatever the FUNCTION, in addition to not being a *S macro. Note
# that the cache does depend upon the function we are looking for.
-AC_DEFUN(AC_CHECK_LIB,
+AC_DEFUN([AC_CHECK_LIB],
[AH_CHECK_LIB([$1])dnl
AC_VAR_PUSHDEF([ac_Lib], [ac_cv_lib_$1_$2])dnl
AC_CACHE_CHECK([for $2 in -l$1], ac_Lib,
# `foo', `-lfoo', or `libfoo.a'. In all of those cases, the compiler
# is passed `-lfoo'. However, LIBRARY cannot be a shell variable;
# it must be a literal name.
-AU_DEFUN(AC_HAVE_LIBRARY,
+AU_DEFUN([AC_HAVE_LIBRARY],
[pushdef([AC_Lib_Name],
patsubst(patsubst([[$1]], [lib\([^\.]*\)\.a], [\1]), [-l], []))dnl
AC_CHECK_LIB(AC_Lib_Name, main, [$2], [$3], [$4])dnl
# AC_TRY_CPP(INCLUDES, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
# ---------------------------------------------------------
# INCLUDES are not defaulted.
-AC_DEFUN(AC_TRY_CPP,
+AC_DEFUN([AC_TRY_CPP],
[AC_REQUIRE_CPP()dnl
cat >conftest.$ac_ext <<EOF
AC_LANG_SOURCE([[$1]])
# AC_EGREP_HEADER(PATTERN, HEADER-FILE,
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
# --------------------------------------------------------
-AC_DEFUN(AC_EGREP_HEADER,
+AC_DEFUN([AC_EGREP_HEADER],
[AC_EGREP_CPP([$1],
[#include <$2>
], [$3], [$4])])
# ------------------------------------------------------
# Because this macro is used by AC_PROG_GCC_TRADITIONAL, which must
# come early, it is not included in AC_BEFORE checks.
-AC_DEFUN(AC_EGREP_CPP,
+AC_DEFUN([AC_EGREP_CPP],
[AC_REQUIRE_CPP()dnl
cat >conftest.$ac_ext <<EOF
AC_LANG_SOURCE([[$2]])
# AC_COMPILE_CHECK(ECHO-TEXT, INCLUDES, FUNCTION-BODY,
# ACTION-IF-FOUND, [ACTION-IF-NOT-FOUND])
# --------------------------------------------------------
-AU_DEFUN(AC_COMPILE_CHECK,
+AU_DEFUN([AC_COMPILE_CHECK],
[ifval([$1], [AC_CHECKING([for $1])
])dnl
AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2]], [[$3]])], [$4], [$5])
# AC_CHECK_HEADER(HEADER-FILE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
# ----------------------------------------------------------------------
-AC_DEFUN(AC_CHECK_HEADER,
+AC_DEFUN([AC_CHECK_HEADER],
[AC_VAR_PUSHDEF([ac_Header], [ac_cv_header_$1])dnl
AC_CACHE_CHECK([for $1], ac_Header,
[AC_TRY_CPP([#include <$1>
])# AC_CHECK_HEADER
-define(AH_CHECK_HEADERS,
+define([AH_CHECK_HEADERS],
[AC_FOREACH([AC_Header], [$1],
[AH_TEMPLATE(AC_TR_CPP(HAVE_[]AC_Header),
[Define if you have the <]AC_Header[> header file.])])])
# AC_CHECK_HEADERS(HEADER-FILE...
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
# ----------------------------------------------------------
-AC_DEFUN(AC_CHECK_HEADERS,
+AC_DEFUN([AC_CHECK_HEADERS],
[AH_CHECK_HEADERS([$1])dnl
for ac_header in $1
do
# -------------------------------------------------------------
#
# Check for the existence of FILE.
-AC_DEFUN(AC_CHECK_FILE,
+AC_DEFUN([AC_CHECK_FILE],
[AC_DIAGNOSE([cross],
[Cannot check for file existence when cross compiling])dnl
AC_VAR_PUSHDEF([ac_File], [ac_cv_file_$1])dnl
# AC_CHECK_FILES(FILE..., [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
# -----------------------------------------------------------------
-AC_DEFUN(AC_CHECK_FILES,
+AC_DEFUN([AC_CHECK_FILES],
[AC_FOREACH([AC_FILE_NAME], [$1],
[AC_SPECIALIZE([AC_CHECK_FILE], AC_FILE_NAME,
[AC_DEFINE_UNQUOTED(AC_TR_CPP(HAVE_[]AC_FILE_NAME), 1,
# AC_CHECK_FUNC(FUNCTION, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
# -----------------------------------------------------------------
-AC_DEFUN(AC_CHECK_FUNC,
+AC_DEFUN([AC_CHECK_FUNC],
[AC_VAR_PUSHDEF([ac_var], [ac_cv_func_$1])dnl
AC_CACHE_CHECK([for $1], ac_var,
[AC_TRY_LINK(
# ---------------------------------------------------------------------
# FIXME: Should we die if there are not enough arguments, or just
# ignore?
-AC_DEFUN(AC_CHECK_FUNCS,
+AC_DEFUN([AC_CHECK_FUNCS],
[AC_FOREACH([AC_Func], [$1],
[AH_TEMPLATE(AC_TR_CPP(HAVE_[]AC_Func),
[Define if you have the `]AC_Func[' function.])])dnl
# -----------------------------------------------
# This macro will probably be obsoleted by the macros of Kaveh. In
# addition `CHECK' is not a proper name (is not boolean).
-AC_DEFUN(AC_CHECK_SIZEOF,
+AC_DEFUN([AC_CHECK_SIZEOF],
[AC_VAR_PUSHDEF([ac_Sizeof], [ac_cv_sizeof_$1])dnl
AC_CACHE_CHECK([size of $1], ac_Sizeof,
[AC_TRY_RUN(AC_INCLUDES_DEFAULT([$3])
# is just no way to simply compare two strings in m4, but to use pattern
# matching. The big problem is then that the active characters should
# be quoted. Currently `+*.' are quoted.
-define(AC_CONFIG_IF_MEMBER,
+define([AC_CONFIG_IF_MEMBER],
[ifelse(regexp($2, [\(^\| \)]patsubst([$1],
[\([+*.]\)], [\\\1])[\(:\| \|$\)]),
-1, [$4], [$3])])
#
# Note that this macro does not check if the list $[1] itself
# contains doubles.
-define(_AC_CONFIG_UNIQUE,
+define([_AC_CONFIG_UNIQUE],
[AC_DIVERT_PUSH([KILL])
AC_FOREACH([AC_File], [$1],
[pushdef([AC_Dest], patsubst(AC_File, [:.*]))
# `config.status'. This is typically used to pass variables from
# `configure' to `config.status'. Note that $[1] is not over quoted as
# was the case in AC_OUTPUT_COMMANDS.
-define(_AC_CONFIG_COMMANDS_INIT,
+define([_AC_CONFIG_COMMANDS_INIT],
[ifval([$1],
[m4_append([_AC_OUTPUT_COMMANDS_INIT], [$1
])])])
# if you update an included file and configure.in: you might have
# clashes :( On the other hand, I'd like to avoid weird keys (e.g.,
# depending upon __file__ or the pid).
-AU_DEFUN(AC_OUTPUT_COMMANDS,
+AU_DEFUN([AC_OUTPUT_COMMANDS],
[define([_AC_OUTPUT_COMMANDS_CNT], incr(_AC_OUTPUT_COMMANDS_CNT))dnl
dnl Double quoted since that was the case in the original macro.
AC_CONFIG_COMMANDS([default-]_AC_OUTPUT_COMMANDS_CNT, [[$1]], [[$2]])dnl
# AC_CONFIG_HEADER(HEADER-TO-CREATE ...)
# --------------------------------------
# FIXME: Make it obsolete?
-AC_DEFUN(AC_CONFIG_HEADER,
+AC_DEFUN([AC_CONFIG_HEADER],
[AC_CONFIG_HEADERS([$1])])
# link from TOP_SRCDIR/SOURCE to TOP_SRCDIR/DEST.
# Reject DEST=., because it is makes it hard for ./config.status
# to guess the links to establish (`./config.status .').
-AC_DEFUN(AC_CONFIG_LINKS,
+AC_DEFUN([AC_CONFIG_LINKS],
[AC_DIVERT_PUSH([KILL])
_AC_CONFIG_UNIQUE([$1])
_AC_CONFIG_DEPENDENCIES([$1])
# This is a subroutine of AC_OUTPUT.
# It is called inside configure, outside of config.status.
# Using a here document instead of a string reduces the quoting nightmare.
-define(AC_OUTPUT_MAKE_DEFS,
+define([AC_OUTPUT_MAKE_DEFS],
[[# Transform confdefs.h into DEFS.
# Protect against shell expansion while executing Makefile rules.
# Protect against Makefile macro expansion.
#
# It has to send itself into $CONFIG_STATUS (eg, via here documents).
# Upon exit, no here document shall be opened.
-define(_AC_OUTPUT_FILES,
+define([_AC_OUTPUT_FILES],
[cat >>$CONFIG_STATUS <<EOF
#
#
# The result is about, hm, ... times blah... plus.... Ahem. The
# result is about much faster.
-define(_AC_OUTPUT_HEADERS,
+define([_AC_OUTPUT_HEADERS],
[cat >>$CONFIG_STATUS <<\EOF
#
#
# It has to send itself into $CONFIG_STATUS (eg, via here documents).
# Upon exit, no here document shall be opened.
-define(_AC_OUTPUT_LINKS,
+define([_AC_OUTPUT_LINKS],
[cat >>$CONFIG_STATUS <<\EOF
#
#
# It has to send itself into $CONFIG_STATUS (eg, via here documents).
# Upon exit, no here document shall be opened.
-define(_AC_OUTPUT_COMMANDS,
+define([_AC_OUTPUT_COMMANDS],
[cat >>$CONFIG_STATUS <<\EOF
#
# You are encouraged to add support for compilers that this macro
# doesn't currently support.
# FIXME: Get rid of this macro.
-AC_DEFUN(AC_LINKER_OPTION,
+AC_DEFUN([AC_LINKER_OPTION],
[AC_LANG_CASE([C], [test x"$GCC" = xyes && using_gnu_compiler=yes],
[C++], [test x"$GXX" = xyes && using_gnu_compiler=yes],
[FORTRAN77], [test x"$G77" = xyes && using_gnu_compiler=yes],
# This macro searches LIST for ELEMENT, and executes ACTION-IF-FOUND
# if ELEMENT is a member of LIST, otherwise it executes
# ACTION-IF-NOT-FOUND.
-AC_DEFUN(AC_LIST_MEMBER_OF,
+AC_DEFUN([AC_LIST_MEMBER_OF],
[dnl Do some sanity checking of the arguments.
ifelse([$1], , [AC_FATAL([$0]: missing argument 1)])dnl
ifelse([$2], , [AC_FATAL([$0]: missing argument 2)])dnl
# ------------------------------------------------------------
# Expand into IF-LANG1 if the current language is LANG1 etc. else
# into default.
-define(AC_LANG_CASE,
+define([AC_LANG_CASE],
[m4_case(_AC_LANG, $@)])
# AC_PROG_CPP
# -----------
-AC_DEFUN(AC_PROG_CPP,
+AC_DEFUN([AC_PROG_CPP],
[AC_MSG_CHECKING(how to run the C preprocessor)
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
# COMPILER ... is a space separated list of C compilers to search for.
# This just gives the user an opportunity to specify an alternative
# search list for the C compiler.
-AC_DEFUN(AC_PROG_CC,
+AC_DEFUN([AC_PROG_CC],
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
AC_LANG_PUSH(C)
AC_ARG_VAR([CFLAGS], [Extra flags for the C compiler])
# AC_PROG_CC_G
# ------------
-AC_DEFUN(AC_PROG_CC_G,
+AC_DEFUN([AC_PROG_CC_G],
[AC_CACHE_CHECK(whether ${CC-cc} accepts -g, ac_cv_prog_cc_g,
[echo 'void f(){}' >conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
# AC_PROG_GCC_TRADITIONAL
# -----------------------
-AC_DEFUN(AC_PROG_GCC_TRADITIONAL,
+AC_DEFUN([AC_PROG_GCC_TRADITIONAL],
[AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_PROG_CPP])dnl
if test $ac_cv_prog_gcc = yes; then
# AC_PROG_CC_C_O
# --------------
-AC_DEFUN(AC_PROG_CC_C_O,
+AC_DEFUN([AC_PROG_CC_C_O],
[if test "x$CC" != xcc; then
AC_MSG_CHECKING(whether $CC and cc understand -c and -o together)
else
# AC_PROG_CXXCPP
# --------------
-AC_DEFUN(AC_PROG_CXXCPP,
+AC_DEFUN([AC_PROG_CXXCPP],
[AC_MSG_CHECKING(how to run the C++ preprocessor)
if test -z "$CXXCPP"; then
AC_CACHE_VAL(ac_cv_prog_CXXCPP,
# for (if not specified, a default list is used). This just gives the
# user an opportunity to specify an alternative search list for the C++
# compiler.
-AC_DEFUN(AC_PROG_CXX,
+AC_DEFUN([AC_PROG_CXX],
[AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl
AC_LANG_PUSH(C++)
AC_CHECK_PROGS(CXX, $CCC m4_default([$1], [c++ g++ gpp CC cxx cc++ cl]), g++)
# AC_PROG_CXX_G
# -------------
-AC_DEFUN(AC_PROG_CXX_G,
+AC_DEFUN([AC_PROG_CXX_G],
[AC_CACHE_CHECK(whether ${CXX-g++} accepts -g, ac_cv_prog_cxx_g,
[echo 'void f(){}' >conftest.cc
if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
# ---------------------------
# COMPILERS is a space separated list of Fortran 77 compilers to search
# for.
-AC_DEFUN(AC_PROG_F77,
+AC_DEFUN([AC_PROG_F77],
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
AC_LANG_PUSH(Fortran 77)
AC_CHECK_PROGS(F77,
# -------------
# Test whether the Fortran 77 compiler can accept the `-g' option to
# enable debugging.
-AC_DEFUN(AC_PROG_F77_G,
+AC_DEFUN([AC_PROG_F77_G],
[AC_CACHE_CHECK(whether $F77 accepts -g, ac_cv_prog_f77_g,
[cat >conftest.f <<EOF
program conftest
# The usefulness of this macro is questionable, as I can't really see
# why anyone would use it. The only reason I include it is for
# completeness, since a similar test exists for the C compiler.
-AC_DEFUN(AC_PROG_F77_C_O,
+AC_DEFUN([AC_PROG_F77_C_O],
[AC_BEFORE([$0], [AC_PROG_F77])dnl
AC_MSG_CHECKING(whether $F77 understand -c and -o together)
set dummy $F77; ac_f77=`echo $[2] |
# various options that select ANSI C on some system or another. It
# considers the compiler to be in ANSI C mode if it handles function
# prototypes correctly.
-AC_DEFUN(AC_PROG_CC_STDC,
+AC_DEFUN([AC_PROG_CC_STDC],
[AC_REQUIRE([AC_PROG_CC])dnl
AC_BEFORE([$0], [AC_C_INLINE])dnl
AC_BEFORE([$0], [AC_C_CONST])dnl
-AC_DEFUN(AC_C_CROSS,
+AC_DEFUN([AC_C_CROSS],
[AC_OBSOLETE([$0], [; it has been merged into AC_PROG_CC])])
# AC_C_CHAR_UNSIGNED
# ------------------
-AC_DEFUN(AC_C_CHAR_UNSIGNED,
+AC_DEFUN([AC_C_CHAR_UNSIGNED],
[AH_VERBATIM([__CHAR_UNSIGNED__],
[/* Define if type `char' is unsigned and you are not using gcc. */
#ifndef __CHAR_UNSIGNED__
# AC_C_LONG_DOUBLE
# ----------------
-AC_DEFUN(AC_C_LONG_DOUBLE,
+AC_DEFUN([AC_C_LONG_DOUBLE],
[AC_CACHE_CHECK(for long double, ac_cv_c_long_double,
[if test "$GCC" = yes; then
ac_cv_c_long_double=yes
# AC_C_BIGENDIAN
# --------------
-AC_DEFUN(AC_C_BIGENDIAN,
+AC_DEFUN([AC_C_BIGENDIAN],
[AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian,
[ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
# Do nothing if the compiler accepts the inline keyword.
# Otherwise define inline to __inline__ or __inline if one of those work,
# otherwise define inline to be empty.
-AC_DEFUN(AC_C_INLINE,
+AC_DEFUN([AC_C_INLINE],
[AC_REQUIRE([AC_PROG_CC_STDC])dnl
AC_CACHE_CHECK([for inline], ac_cv_c_inline,
[ac_cv_c_inline=no
# AC_C_CONST
# ----------
-AC_DEFUN(AC_C_CONST,
+AC_DEFUN([AC_C_CONST],
[AC_REQUIRE([AC_PROG_CC_STDC])dnl
AC_CACHE_CHECK([for an ANSI C-conforming const], ac_cv_c_const,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
# optimizations that could break the user's code. So, do not #define
# volatile away unless it is really necessary to allow the user's code
# to compile cleanly. Benign compiler failures should be tolerated.
-AC_DEFUN(AC_C_VOLATILE,
+AC_DEFUN([AC_C_VOLATILE],
[AC_REQUIRE([AC_PROG_CC_STDC])dnl
AC_CACHE_CHECK([for working volatile], ac_cv_c_volatile,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [
# --------------
# Checks if `#' can be used to glue strings together at the CPP level.
# Defines HAVE_STRINGIZE if positive.
-AC_DEFUN(AC_C_STRINGIZE,
+AC_DEFUN([AC_C_STRINGIZE],
[AC_REQUIRE([AC_PROG_CPP])dnl
AC_MSG_CHECKING([for preprocessor stringizing operator])
AC_CACHE_VAL(ac_cv_c_stringize,
# ---------------
# Check if the C compiler supports prototypes, included if it needs
# options.
-AC_DEFUN(AC_C_PROTOTYPES,
+AC_DEFUN([AC_C_PROTOTYPES],
[AC_REQUIRE([AC_PROG_CC_STDC])dnl
AC_REQUIRE([AC_PROG_CPP])dnl
AC_MSG_CHECKING([for function prototypes])
if test "$ac_cv_prog_cc_stdc" != no; then
AC_MSG_RESULT(yes)
AC_DEFINE(PROTOTYPES, 1,
- [Define if the compiler supports function prototypes.])
+ [Define if the C compiler supports function prototypes.])
else
AC_MSG_RESULT(no)
fi
# properly mangle the names of C identifiers, and C identifiers with
# underscores, respectively, so that they match the name mangling
# scheme used by the Fortran 77 compiler.
-AC_DEFUN(AC_F77_WRAPPERS,
+AC_DEFUN([AC_F77_WRAPPERS],
[AC_REQUIRE([AC_F77_NAME_MANGLING])dnl
AH_TEMPLATE([F77_FUNC],
[Define to a macro mangling the given C identifier (in lower and upper
# display the checking message. In addition, caching something used once
# has little interest.
# Idea borrowed from dist 3.0.
-AC_DEFUN(_AC_PROG_ECHO,
+AC_DEFUN([_AC_PROG_ECHO],
[if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
# Stardent Vistra SVR4 grep lacks -e, says Kaveh R. Ghazi.
if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
# AC_PROG_GNU_M4
# --------------
# Check for GNU m4, at least 1.3 (supports frozen files).
-AC_DEFUN(AC_PROG_GNU_M4,
+AC_DEFUN([AC_PROG_GNU_M4],
[AC_PATH_PROGS(M4, gm4 gnum4 m4, m4)
AC_CACHE_CHECK(whether m4 supports frozen files, ac_cv_prog_gnu_m4,
[ac_cv_prog_gnu_m4=no
# AC_PROG_MAKE_SET
# ----------------
# Define SET_MAKE to set ${MAKE} if make doesn't.
-AC_DEFUN(AC_PROG_MAKE_SET,
+AC_DEFUN([AC_PROG_MAKE_SET],
[AC_MSG_CHECKING(whether ${MAKE-make} sets \${MAKE})
set dummy ${MAKE-make}; ac_make=`echo "$[2]" | sed 'y%./+-%__p_%'`
AC_CACHE_VAL(ac_cv_prog_make_${ac_make}_set,
])# AC_PROG_MAKE_SET
-AC_DEFUN(AC_PROG_RANLIB,
+AC_DEFUN([AC_PROG_RANLIB],
[AC_CHECK_PROG(RANLIB, ranlib, ranlib, :)])
# Check for mawk first since it's generally faster.
-AC_DEFUN(AC_PROG_AWK,
+AC_DEFUN([AC_PROG_AWK],
[AC_CHECK_PROGS(AWK, mawk gawk nawk awk, )])
# AC_PROG_YACC
# ------------
-AC_DEFUN(AC_PROG_YACC,
+AC_DEFUN([AC_PROG_YACC],
[AC_CHECK_PROGS(YACC, 'bison -y' byacc, yacc)])
# AC_PROG_INSTALL
# ---------------
-AC_DEFUN(AC_PROG_INSTALL,
+AC_DEFUN([AC_PROG_INSTALL],
[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# AC_PROG_LN_S
# ------------
-AC_DEFUN(AC_PROG_LN_S,
+AC_DEFUN([AC_PROG_LN_S],
[AC_MSG_CHECKING(whether ln -s works)
AC_CACHE_VAL(ac_cv_prog_LN_S,
[rm -f conftestdata
])# AC_PROG_LN_S
-AC_DEFUNCT(AC_RSH, [; replace it with equivalent code])
+AC_DEFUNCT([AC_RSH], [; replace it with equivalent code])
# AC_DECL_SYS_SIGLIST
# -------------------
-AC_DEFUN(AC_DECL_SYS_SIGLIST,
+AC_DEFUN([AC_DECL_SYS_SIGLIST],
[AC_CACHE_CHECK([for sys_siglist declaration in signal.h or unistd.h],
ac_cv_decl_sys_siglist,
[AC_COMPILE_IFELSE(
# AC_HEADER_DIRENT
# ----------------
-AC_DEFUN(AC_HEADER_DIRENT,
+AC_DEFUN([AC_HEADER_DIRENT],
[AH_CHECK_HEADERS_DIRENT(dirent.h sys/ndir.h sys/dir.h ndir.h)
ac_header_dirent=no
for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
# AC_HEADER_MAJOR
# ---------------
-AC_DEFUN(AC_HEADER_MAJOR,
+AC_DEFUN([AC_HEADER_MAJOR],
[AC_CACHE_CHECK(whether sys/types.h defines makedev,
ac_cv_header_sys_types_h_makedev,
[AC_TRY_LINK([#include <sys/types.h>
# AC_HEADER_STAT
# --------------
# FIXME: Shouldn't this be named AC_HEADER_SYS_STAT?
-AC_DEFUN(AC_HEADER_STAT,
+AC_DEFUN([AC_HEADER_STAT],
[AC_CACHE_CHECK(whether stat file-mode macros are broken,
ac_cv_header_stat_broken,
[AC_EGREP_CPP([You lose], [#include <sys/types.h>
# AC_HEADER_STDC
# --------------
-AC_DEFUN(AC_HEADER_STDC,
+AC_DEFUN([AC_HEADER_STDC],
[AC_REQUIRE_CPP()dnl
AC_CACHE_CHECK(for ANSI C header files, ac_cv_header_stdc,
[AC_TRY_CPP([#include <stdlib.h>
# AC_HEADER_SYS_WAIT
# ------------------
-AC_DEFUN(AC_HEADER_SYS_WAIT,
+AC_DEFUN([AC_HEADER_SYS_WAIT],
[AC_CACHE_CHECK([for sys/wait.h that is POSIX.1 compatible],
ac_cv_header_sys_wait_h,
[AC_COMPILE_IFELSE(
# AC_HEADER_TIME
# --------------
-AC_DEFUN(AC_HEADER_TIME,
+AC_DEFUN([AC_HEADER_TIME],
[AC_CACHE_CHECK([whether time.h and sys/time.h may both be included],
ac_cv_header_time,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
# A few hasbeen'd macros.
-AC_DEFUNCT(AC_UNISTD_H, [; instead use AC_CHECK_HEADERS(unistd.h)])
+AC_DEFUNCT([AC_UNISTD_H], [; instead use AC_CHECK_HEADERS(unistd.h)])
-AC_DEFUNCT(AC_USG,
+AC_DEFUNCT([AC_USG],
[; instead use AC_CHECK_HEADERS(string.h) and HAVE_STRING_H])
# If memchr and the like aren't declared in <string.h>, include <memory.h>.
# To avoid problems, don't check for gcc2 built-ins.
-AC_DEFUNCT(AC_MEMORY_H,
+AC_DEFUNCT([AC_MEMORY_H],
[; instead use AC_CHECK_HEADERS(memory.h) and HAVE_MEMORY_H])
# defines a different set of C preprocessor macros to indicate which
# header file is found. This macro and the names it defines are
# considered obsolete.
-AC_DEFUNCT(AC_DIR_HEADER,
+AC_DEFUNCT([AC_DIR_HEADER],
[; instead use AC_HEADER_DIRENT])
# AC_TYPE_GETGROUPS
# -----------------
-AC_DEFUN(AC_TYPE_GETGROUPS,
+AC_DEFUN([AC_TYPE_GETGROUPS],
[AC_REQUIRE([AC_TYPE_UID_T])dnl
AC_CACHE_CHECK(type of array argument to getgroups, ac_cv_type_getgroups,
[AC_TRY_RUN(
# AC_TYPE_UID_T
# -------------
# FIXME: Rewrite using AC_CHECK_TYPE.
-AC_DEFUN(AC_TYPE_UID_T,
+AC_DEFUN([AC_TYPE_UID_T],
[AC_CACHE_CHECK(for uid_t in sys/types.h, ac_cv_type_uid_t,
[AC_EGREP_HEADER(uid_t, sys/types.h,
ac_cv_type_uid_t=yes, ac_cv_type_uid_t=no)])
])
# FIXME: AU_DEFUN these guys?
-AC_DEFUN(AC_TYPE_SIZE_T,
+AC_DEFUN([AC_TYPE_SIZE_T],
[AC_CHECK_TYPE(size_t, unsigned)])
-AC_DEFUN(AC_TYPE_PID_T,
+AC_DEFUN([AC_TYPE_PID_T],
[AC_CHECK_TYPE(pid_t, int)])
-AC_DEFUN(AC_TYPE_OFF_T,
+AC_DEFUN([AC_TYPE_OFF_T],
[AC_CHECK_TYPE(off_t, long)])
-AC_DEFUN(AC_TYPE_MODE_T,
+AC_DEFUN([AC_TYPE_MODE_T],
[AC_CHECK_TYPE(mode_t, int)])
-AC_DEFUNCT(AC_INT_16_BITS, [; instead use AC_CHECK_SIZEOF(int)])
-AC_DEFUNCT(AC_LONG_64_BITS, [; instead use AC_CHECK_SIZEOF(long)])
+AC_DEFUNCT([AC_INT_16_BITS], [; instead use AC_CHECK_SIZEOF(int)])
+AC_DEFUNCT([AC_LONG_64_BITS], [; instead use AC_CHECK_SIZEOF(long)])
# AC_TYPE_SIGNAL
# --------------
# Note that identifiers starting with SIG are reserved by ANSI C.
-AC_DEFUN(AC_TYPE_SIGNAL,
+AC_DEFUN([AC_TYPE_SIGNAL],
[AC_CACHE_CHECK([return type of signal handlers], ac_cv_type_signal,
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([#include <sys/types.h>
# AC_FUNC_ALLOCA
# --------------
-AC_DEFUN(AC_FUNC_ALLOCA,
+AC_DEFUN([AC_FUNC_ALLOCA],
[AH_VERBATIM([STACK_DIRECTION],
[/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
# ---------------------
# Check whether closedir returns void, and #define CLOSEDIR_VOID in
# that case.
-AC_DEFUN(AC_FUNC_CLOSEDIR_VOID,
+AC_DEFUN([AC_FUNC_CLOSEDIR_VOID],
[AC_REQUIRE([AC_HEADER_DIRENT])dnl
AC_CACHE_CHECK(whether closedir returns void, ac_cv_func_closedir_void,
[AC_TRY_RUN(
# AC_FUNC_FNMATCH
# ---------------
# We look for fnmatch.h to avoid that the test fails in C++.
-AC_DEFUN(AC_FUNC_FNMATCH,
+AC_DEFUN([AC_FUNC_FNMATCH],
[AC_CHECK_HEADERS(fnmatch.h)
AC_CACHE_CHECK(for working fnmatch, ac_cv_func_fnmatch_works,
# Some versions of Solaris or SCO have a broken fnmatch function.
# AC_FUNC_GETMNTENT
# -----------------
-AC_DEFUN(AC_FUNC_GETMNTENT,
+AC_DEFUN([AC_FUNC_GETMNTENT],
[# getmntent is in -lsun on Irix 4, -lseq on Dynix/PTX, -lgen on Unixware.
AC_CHECK_LIB(sun, getmntent, LIBS="-lsun $LIBS",
[AC_CHECK_LIB(seq, getmntent, LIBS="-lseq $LIBS",
# AC_FUNC_GETPGRP
# ---------------
-AC_DEFUN(AC_FUNC_GETPGRP,
+AC_DEFUN([AC_FUNC_GETPGRP],
[AC_CACHE_CHECK(whether getpgrp takes no argument, ac_cv_func_getpgrp_void,
[AC_TRY_RUN(
[/*
# AC_FUNC_MKTIME
# --------------
-AC_DEFUN(AC_FUNC_MKTIME,
+AC_DEFUN([AC_FUNC_MKTIME],
[AC_REQUIRE([AC_HEADER_TIME])dnl
AC_CHECK_HEADERS(sys/time.h unistd.h)
AC_CHECK_FUNCS(alarm)
# AC_FUNC_MMAP
# ------------
-AC_DEFUN(AC_FUNC_MMAP,
+AC_DEFUN([AC_FUNC_MMAP],
[AC_CHECK_HEADERS(stdlib.h unistd.h sys/stat.h)
AC_CHECK_FUNCS(getpagesize)
AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap_fixed_mapped,
# AC_FUNC_MEMCMP
# --------------
-AC_DEFUN(AC_FUNC_MEMCMP,
+AC_DEFUN([AC_FUNC_MEMCMP],
[AC_CACHE_CHECK(for 8-bit clean memcmp, ac_cv_func_memcmp_clean,
[AC_TRY_RUN(
[int
# Determine the correct type to be passed to each of the `select'
# function's arguments, and define those types in `SELECT_TYPE_ARG1',
# `SELECT_TYPE_ARG234', and `SELECT_TYPE_ARG5'.
-AC_DEFUN(AC_FUNC_SELECT_ARGTYPES,
+AC_DEFUN([AC_FUNC_SELECT_ARGTYPES],
[AC_CACHE_CHECK([types of arguments for select],
[ac_cv_func_select_args],
[for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
# AC_FUNC_SETPGRP
# ---------------
-AC_DEFUN(AC_FUNC_SETPGRP,
+AC_DEFUN([AC_FUNC_SETPGRP],
[AC_CACHE_CHECK(whether setpgrp takes no argument, ac_cv_func_setpgrp_void,
AC_TRY_RUN(
[#if HAVE_UNISTD_H
# AC_FUNC_STRFTIME
# ----------------
-AC_DEFUN(AC_FUNC_STRFTIME,
+AC_DEFUN([AC_FUNC_STRFTIME],
[AC_CHECK_FUNC(strftime,
[AC_DEFINE(HAVE_STRFTIME, 1,
[Define if you have the `strftime' function.])],
# AC_FUNC_VFORK
# -------------
-AC_DEFUN(AC_FUNC_VFORK,
+AC_DEFUN([AC_FUNC_VFORK],
[AC_REQUIRE([AC_TYPE_PID_T])dnl
AC_CHECK_HEADER(vfork.h,
AC_DEFINE(HAVE_VFORK_H, 1,
# That the logical name! In addition, why doesn't it use
# AC_CHECK_FUNCS(vprintf)? Because old Autoconf uses sh for loops.
# FIXME: To be changed in Autoconf 3?
-AC_DEFUN(AC_FUNC_VPRINTF,
+AC_DEFUN([AC_FUNC_VPRINTF],
[AC_CHECK_FUNC(vprintf,
AC_DEFINE(HAVE_VPRINTF, 1,
[Define if you have the `vprintf' function.]))
# AC_FUNC_WAIT3
# -------------
-AC_DEFUN(AC_FUNC_WAIT3,
+AC_DEFUN([AC_FUNC_WAIT3],
[AC_CACHE_CHECK(for wait3 that fills in rusage, ac_cv_func_wait3_rusage,
[AC_TRY_RUN(
[#include <sys/types.h>
# AC_FUNC_UTIME_NULL
# ------------------
-AC_DEFUN(AC_FUNC_UTIME_NULL,
+AC_DEFUN([AC_FUNC_UTIME_NULL],
[AC_CACHE_CHECK(whether utime accepts a null argument, ac_cv_func_utime_null,
[rm -f conftestdata; >conftestdata
# Sequent interprets utime(file, 0) to mean use start of epoch. Wrong.
# AC_FUNC_STRCOLL
# ---------------
-AC_DEFUN(AC_FUNC_STRCOLL,
+AC_DEFUN([AC_FUNC_STRCOLL],
[AC_CACHE_CHECK(for working strcoll, ac_cv_func_strcoll_works,
[AC_TRY_RUN([#include <string.h>
int
# AC_FUNC_SETVBUF_REVERSED
# ------------------------
-AC_DEFUN(AC_FUNC_SETVBUF_REVERSED,
+AC_DEFUN([AC_FUNC_SETVBUF_REVERSED],
[AC_CACHE_CHECK(whether setvbuf arguments are reversed,
ac_cv_func_setvbuf_reversed,
[AC_TRY_RUN([#include <stdio.h>
# ------------
# FIXME: This macro is badly named, it should be AC_CHECK_TYPE_STRUCT_TM.
# Or something else, but what? AC_CHECK_TYPE_STRUCT_TM_IN_SYS_TIME?
-AC_DEFUN(AC_STRUCT_TM,
+AC_DEFUN([AC_STRUCT_TM],
[AC_CACHE_CHECK([whether struct tm is in sys/time.h or time.h],
ac_cv_struct_tm,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
# Figure out how to get the current timezone. If `struct tm' has a
# `tm_zone' member, define `HAVE_TM_ZONE'. Otherwise, if the
# external array `tzname' is found, define `HAVE_TZNAME'.
-AC_DEFUN(AC_STRUCT_TIMEZONE,
+AC_DEFUN([AC_STRUCT_TIMEZONE],
[AC_REQUIRE([AC_STRUCT_TM])dnl
AC_CHECK_MEMBERS([struct tm.tm_zone],,,[#include <sys/types.h>
#include <$ac_cv_struct_tm>
# AC_STRUCT_ST_BLKSIZE
# --------------------
-AU_DEFUN(AC_STRUCT_ST_BLKSIZE,
+AU_DEFUN([AC_STRUCT_ST_BLKSIZE],
[AC_WARNING([$0:
your code should no longer depend upon `HAVE_ST_BLKSIZE', but
`HAVE_STRUCT_STAT_ST_BLKSIZE'. Remove this AC_WARNING and
# Please note that it will define `HAVE_STRUCT_STAT_ST_BLOCKS',
# and not `HAVE_ST_BLOCKS'.])dnl
#
-AC_DEFUN(AC_STRUCT_ST_BLOCKS,
+AC_DEFUN([AC_STRUCT_ST_BLOCKS],
[AC_CHECK_MEMBERS([struct stat.st_blocks],
[AC_DEFINE(HAVE_ST_BLOCKS, 1,
[Define if your `struct stat' has
# AC_STRUCT_ST_RDEV
# -----------------
-AU_DEFUN(AC_STRUCT_ST_RDEV,
+AU_DEFUN([AC_STRUCT_ST_RDEV],
[AC_WARNING([$0:
your code should no longer depend upon `HAVE_ST_RDEV', but
`HAVE_STRUCT_STAT_ST_RDEV'. Remove this AC_WARNING and
# AC_SYS_INTERPRETER
# ------------------
-AC_DEFUN(AC_SYS_INTERPRETER,
+AC_DEFUN([AC_SYS_INTERPRETER],
[AC_CACHE_CHECK(whether @%:@! works in shell scripts, ac_cv_sys_interpreter,
[echo '#! /bin/cat
exit 69
interpval=$ac_cv_sys_interpreter
])
-AC_DEFUNCT(AC_HAVE_POUNDBANG, [;use AC_SYS_INTERPRETER, taking no arguments])
-AC_DEFUNCT(AC_ARG_ARRAY, [; don't do unportable things with arguments])
+AC_DEFUNCT([AC_HAVE_POUNDBANG], [;use AC_SYS_INTERPRETER, taking no arguments])
+AC_DEFUNCT([AC_ARG_ARRAY], [; don't do unportable things with arguments])
# AC_SYS_LONG_FILE_NAMES
# use of `mktemp' is probably inappropriate here since it would fail in
# attempting to create different file names differing after the 14th
# character on file systems without long file names.
-AC_DEFUN(AC_SYS_LONG_FILE_NAMES,
+AC_DEFUN([AC_SYS_LONG_FILE_NAMES],
[AC_CACHE_CHECK(for long file names, ac_cv_sys_long_file_names,
[ac_cv_sys_long_file_names=yes
# Test for long file names in all the places we know might matter:
# ---------------------------
# If the system automatically restarts a system call that is
# interrupted by a signal, define `HAVE_RESTARTABLE_SYSCALLS'.
-AC_DEFUN(AC_SYS_RESTARTABLE_SYSCALLS,
+AC_DEFUN([AC_SYS_RESTARTABLE_SYSCALLS],
[AC_REQUIRE([AC_HEADER_SYS_WAIT])dnl
AC_CHECK_HEADERS(unistd.h)
AC_CACHE_CHECK(for restartable system calls, ac_cv_sys_restartable_syscalls,
# paths, otherwise set no_x=yes.
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
-AC_DEFUN(AC_PATH_X,
+AC_DEFUN([AC_PATH_X],
[AC_REQUIRE_CPP()dnl Set CPP; we run _AC_PATH_X_DIRECT conditionally.
AC_MSG_CHECKING(for X)
# ---------------
# Internal subroutine of AC_PATH_X.
# Set ac_x_includes and/or ac_x_libraries.
-AC_DEFUN(_AC_PATH_X_XMKMF,
+AC_DEFUN([_AC_PATH_X_XMKMF],
[rm -fr conftestdir
if mkdir conftestdir; then
cd conftestdir
# ----------------
# Internal subroutine of AC_PATH_X.
# Set ac_x_includes and/or ac_x_libraries.
-AC_DEFUN(_AC_PATH_X_DIRECT,
+AC_DEFUN([_AC_PATH_X_DIRECT],
[if test "$ac_x_includes" = NO; then
# Guess where to find include files, by looking for this one X11 .h file.
test -z "$ac_x_direct_test_include" &&
# AC_PATH_XTRA
# ------------
# Find additional X libraries, magic flags, etc.
-AC_DEFUN(AC_PATH_XTRA,
+AC_DEFUN([AC_PATH_XTRA],
[AC_REQUIRE([AC_PATH_X])dnl
if test "$no_x" = yes; then
# Not all programs may use this symbol, but it does not hurt to define it.
## ------------------------------------ ##
# The old Cygwin32 macro is deprecated.
-AU_DEFUN(AC_CYGWIN32,
+AU_DEFUN([AC_CYGWIN32],
[AC_CYGWIN])
# ---------
# Check for Cygwin. This is a way to set the right value for
# EXEEXT.
-AC_DEFUN(AC_CYGWIN,
+AC_DEFUN([AC_CYGWIN],
[AC_CACHE_CHECK(for Cygwin environment, ac_cv_cygwin,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
[#ifndef __CYGWIN__
# ----------
# Check for mingw32. This is another way to set the right value for
# EXEEXT.
-AC_DEFUN(AC_MINGW32,
+AC_DEFUN([AC_MINGW32],
[AC_CACHE_CHECK(for mingw32 environment, ac_cv_mingw32,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [return __MINGW32__;])],
[ac_cv_mingw32=yes],
# ---------
# Check for EMX on OS/2. This is another way to set the right value
# for EXEEXT.
-AC_DEFUN(AC_EMXOS2,
+AC_DEFUN([AC_EMXOS2],
[AC_CACHE_CHECK(for EMX OS/2 environment, ac_cv_emxos2,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [return __EMX__;])],
[ac_cv_emxos2=yes],
# add .exe for Cygwin or mingw32. Otherwise, it compiles a test
# executable. If this is called, the executable extensions will be
# automatically used by link commands run by the configure script.
-AC_DEFUN(AC_EXEEXT,
+AC_DEFUN([AC_EXEEXT],
[AC_REQUIRE([AC_CYGWIN])dnl
AC_REQUIRE([AC_MINGW32])dnl
AC_REQUIRE([AC_EMXOS2])dnl
# Check the object extension used by the compiler: typically .o or
# .obj. If this is called, some other behaviour will change,
# determined by ac_objext.
-AC_DEFUN(AC_OBJEXT,
+AC_DEFUN([AC_OBJEXT],
[AC_MSG_CHECKING([for object suffix])
AC_CACHE_VAL(ac_cv_objext,
[rm -f conftest*
# AC_AIX
# ------
-AC_DEFUN(AC_AIX,
+AC_DEFUN([AC_AIX],
[AH_VERBATIM([_ALL_SOURCE],
[/* Define if on AIX 3.
System headers sometimes define this.
# AC_MINIX
# --------
-AC_DEFUN(AC_MINIX,
+AC_DEFUN([AC_MINIX],
[AC_BEFORE([$0], [AC_TRY_COMPILE])dnl
AC_BEFORE([$0], [AC_TRY_RUN])dnl
AC_CHECK_HEADER(minix/config.h, MINIX=yes, MINIX=)
# AC_ISC_POSIX
# ------------
-AC_DEFUN(AC_ISC_POSIX,
+AC_DEFUN([AC_ISC_POSIX],
[AC_REQUIRE([AC_PROG_CC])dnl
AC_BEFORE([$0], [AC_TRY_COMPILE])dnl
AC_BEFORE([$0], [AC_TRY_RUN])dnl
fi
])# AC_ISC_POSIX
-AC_DEFUNCT(AC_XENIX_DIR, [; instead use AC_HEADER_DIRENT])
-AC_DEFUNCT(AC_DYNIX_SEQ, [; instead use AC_FUNC_GETMNTENT])
-AC_DEFUNCT(AC_IRIX_SUN,
+AC_DEFUNCT([AC_XENIX_DIR], [; instead use AC_HEADER_DIRENT])
+AC_DEFUNCT([AC_DYNIX_SEQ], [; instead use AC_FUNC_GETMNTENT])
+AC_DEFUNCT([AC_IRIX_SUN],
[; instead use AC_FUNC_GETMNTENT or AC_CHECK_LIB(sun, getpwnam)])
-AC_DEFUNCT(AC_SCO_INTL, [; instead use AC_FUNC_STRFTIME])
+AC_DEFUNCT([AC_SCO_INTL], [; instead use AC_FUNC_STRFTIME])
# ------------------------------------------------------------
# Expand into IF-LANG1 if the current language is LANG1 etc. else
# into default.
-define(AC_LANG_CASE,
+define([AC_LANG_CASE],
[m4_case(_AC_LANG, $@)])
# AC_PROG_CPP
# -----------
-AC_DEFUN(AC_PROG_CPP,
+AC_DEFUN([AC_PROG_CPP],
[AC_MSG_CHECKING(how to run the C preprocessor)
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
# COMPILER ... is a space separated list of C compilers to search for.
# This just gives the user an opportunity to specify an alternative
# search list for the C compiler.
-AC_DEFUN(AC_PROG_CC,
+AC_DEFUN([AC_PROG_CC],
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
AC_LANG_PUSH(C)
AC_ARG_VAR([CFLAGS], [Extra flags for the C compiler])
# AC_PROG_CC_G
# ------------
-AC_DEFUN(AC_PROG_CC_G,
+AC_DEFUN([AC_PROG_CC_G],
[AC_CACHE_CHECK(whether ${CC-cc} accepts -g, ac_cv_prog_cc_g,
[echo 'void f(){}' >conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
# AC_PROG_GCC_TRADITIONAL
# -----------------------
-AC_DEFUN(AC_PROG_GCC_TRADITIONAL,
+AC_DEFUN([AC_PROG_GCC_TRADITIONAL],
[AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_PROG_CPP])dnl
if test $ac_cv_prog_gcc = yes; then
# AC_PROG_CC_C_O
# --------------
-AC_DEFUN(AC_PROG_CC_C_O,
+AC_DEFUN([AC_PROG_CC_C_O],
[if test "x$CC" != xcc; then
AC_MSG_CHECKING(whether $CC and cc understand -c and -o together)
else
# AC_PROG_CXXCPP
# --------------
-AC_DEFUN(AC_PROG_CXXCPP,
+AC_DEFUN([AC_PROG_CXXCPP],
[AC_MSG_CHECKING(how to run the C++ preprocessor)
if test -z "$CXXCPP"; then
AC_CACHE_VAL(ac_cv_prog_CXXCPP,
# for (if not specified, a default list is used). This just gives the
# user an opportunity to specify an alternative search list for the C++
# compiler.
-AC_DEFUN(AC_PROG_CXX,
+AC_DEFUN([AC_PROG_CXX],
[AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl
AC_LANG_PUSH(C++)
AC_CHECK_PROGS(CXX, $CCC m4_default([$1], [c++ g++ gpp CC cxx cc++ cl]), g++)
# AC_PROG_CXX_G
# -------------
-AC_DEFUN(AC_PROG_CXX_G,
+AC_DEFUN([AC_PROG_CXX_G],
[AC_CACHE_CHECK(whether ${CXX-g++} accepts -g, ac_cv_prog_cxx_g,
[echo 'void f(){}' >conftest.cc
if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
# ---------------------------
# COMPILERS is a space separated list of Fortran 77 compilers to search
# for.
-AC_DEFUN(AC_PROG_F77,
+AC_DEFUN([AC_PROG_F77],
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
AC_LANG_PUSH(Fortran 77)
AC_CHECK_PROGS(F77,
# -------------
# Test whether the Fortran 77 compiler can accept the `-g' option to
# enable debugging.
-AC_DEFUN(AC_PROG_F77_G,
+AC_DEFUN([AC_PROG_F77_G],
[AC_CACHE_CHECK(whether $F77 accepts -g, ac_cv_prog_f77_g,
[cat >conftest.f <<EOF
program conftest
# The usefulness of this macro is questionable, as I can't really see
# why anyone would use it. The only reason I include it is for
# completeness, since a similar test exists for the C compiler.
-AC_DEFUN(AC_PROG_F77_C_O,
+AC_DEFUN([AC_PROG_F77_C_O],
[AC_BEFORE([$0], [AC_PROG_F77])dnl
AC_MSG_CHECKING(whether $F77 understand -c and -o together)
set dummy $F77; ac_f77=`echo $[2] |
# various options that select ANSI C on some system or another. It
# considers the compiler to be in ANSI C mode if it handles function
# prototypes correctly.
-AC_DEFUN(AC_PROG_CC_STDC,
+AC_DEFUN([AC_PROG_CC_STDC],
[AC_REQUIRE([AC_PROG_CC])dnl
AC_BEFORE([$0], [AC_C_INLINE])dnl
AC_BEFORE([$0], [AC_C_CONST])dnl
-AC_DEFUN(AC_C_CROSS,
+AC_DEFUN([AC_C_CROSS],
[AC_OBSOLETE([$0], [; it has been merged into AC_PROG_CC])])
# AC_C_CHAR_UNSIGNED
# ------------------
-AC_DEFUN(AC_C_CHAR_UNSIGNED,
+AC_DEFUN([AC_C_CHAR_UNSIGNED],
[AH_VERBATIM([__CHAR_UNSIGNED__],
[/* Define if type `char' is unsigned and you are not using gcc. */
#ifndef __CHAR_UNSIGNED__
# AC_C_LONG_DOUBLE
# ----------------
-AC_DEFUN(AC_C_LONG_DOUBLE,
+AC_DEFUN([AC_C_LONG_DOUBLE],
[AC_CACHE_CHECK(for long double, ac_cv_c_long_double,
[if test "$GCC" = yes; then
ac_cv_c_long_double=yes
# AC_C_BIGENDIAN
# --------------
-AC_DEFUN(AC_C_BIGENDIAN,
+AC_DEFUN([AC_C_BIGENDIAN],
[AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian,
[ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
# Do nothing if the compiler accepts the inline keyword.
# Otherwise define inline to __inline__ or __inline if one of those work,
# otherwise define inline to be empty.
-AC_DEFUN(AC_C_INLINE,
+AC_DEFUN([AC_C_INLINE],
[AC_REQUIRE([AC_PROG_CC_STDC])dnl
AC_CACHE_CHECK([for inline], ac_cv_c_inline,
[ac_cv_c_inline=no
# AC_C_CONST
# ----------
-AC_DEFUN(AC_C_CONST,
+AC_DEFUN([AC_C_CONST],
[AC_REQUIRE([AC_PROG_CC_STDC])dnl
AC_CACHE_CHECK([for an ANSI C-conforming const], ac_cv_c_const,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
# optimizations that could break the user's code. So, do not #define
# volatile away unless it is really necessary to allow the user's code
# to compile cleanly. Benign compiler failures should be tolerated.
-AC_DEFUN(AC_C_VOLATILE,
+AC_DEFUN([AC_C_VOLATILE],
[AC_REQUIRE([AC_PROG_CC_STDC])dnl
AC_CACHE_CHECK([for working volatile], ac_cv_c_volatile,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [
# --------------
# Checks if `#' can be used to glue strings together at the CPP level.
# Defines HAVE_STRINGIZE if positive.
-AC_DEFUN(AC_C_STRINGIZE,
+AC_DEFUN([AC_C_STRINGIZE],
[AC_REQUIRE([AC_PROG_CPP])dnl
AC_MSG_CHECKING([for preprocessor stringizing operator])
AC_CACHE_VAL(ac_cv_c_stringize,
# ---------------
# Check if the C compiler supports prototypes, included if it needs
# options.
-AC_DEFUN(AC_C_PROTOTYPES,
+AC_DEFUN([AC_C_PROTOTYPES],
[AC_REQUIRE([AC_PROG_CC_STDC])dnl
AC_REQUIRE([AC_PROG_CPP])dnl
AC_MSG_CHECKING([for function prototypes])
if test "$ac_cv_prog_cc_stdc" != no; then
AC_MSG_RESULT(yes)
AC_DEFINE(PROTOTYPES, 1,
- [Define if the compiler supports function prototypes.])
+ [Define if the C compiler supports function prototypes.])
else
AC_MSG_RESULT(no)
fi
# properly mangle the names of C identifiers, and C identifiers with
# underscores, respectively, so that they match the name mangling
# scheme used by the Fortran 77 compiler.
-AC_DEFUN(AC_F77_WRAPPERS,
+AC_DEFUN([AC_F77_WRAPPERS],
[AC_REQUIRE([AC_F77_NAME_MANGLING])dnl
AH_TEMPLATE([F77_FUNC],
[Define to a macro mangling the given C identifier (in lower and upper
# ------------------------------------------------------------
# Expand into IF-LANG1 if the current language is LANG1 etc. else
# into default.
-define(AC_LANG_CASE,
+define([AC_LANG_CASE],
[m4_case(_AC_LANG, $@)])
# AC_PROG_CPP
# -----------
-AC_DEFUN(AC_PROG_CPP,
+AC_DEFUN([AC_PROG_CPP],
[AC_MSG_CHECKING(how to run the C preprocessor)
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
# COMPILER ... is a space separated list of C compilers to search for.
# This just gives the user an opportunity to specify an alternative
# search list for the C compiler.
-AC_DEFUN(AC_PROG_CC,
+AC_DEFUN([AC_PROG_CC],
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
AC_LANG_PUSH(C)
AC_ARG_VAR([CFLAGS], [Extra flags for the C compiler])
# AC_PROG_CC_G
# ------------
-AC_DEFUN(AC_PROG_CC_G,
+AC_DEFUN([AC_PROG_CC_G],
[AC_CACHE_CHECK(whether ${CC-cc} accepts -g, ac_cv_prog_cc_g,
[echo 'void f(){}' >conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
# AC_PROG_GCC_TRADITIONAL
# -----------------------
-AC_DEFUN(AC_PROG_GCC_TRADITIONAL,
+AC_DEFUN([AC_PROG_GCC_TRADITIONAL],
[AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_PROG_CPP])dnl
if test $ac_cv_prog_gcc = yes; then
# AC_PROG_CC_C_O
# --------------
-AC_DEFUN(AC_PROG_CC_C_O,
+AC_DEFUN([AC_PROG_CC_C_O],
[if test "x$CC" != xcc; then
AC_MSG_CHECKING(whether $CC and cc understand -c and -o together)
else
# AC_PROG_CXXCPP
# --------------
-AC_DEFUN(AC_PROG_CXXCPP,
+AC_DEFUN([AC_PROG_CXXCPP],
[AC_MSG_CHECKING(how to run the C++ preprocessor)
if test -z "$CXXCPP"; then
AC_CACHE_VAL(ac_cv_prog_CXXCPP,
# for (if not specified, a default list is used). This just gives the
# user an opportunity to specify an alternative search list for the C++
# compiler.
-AC_DEFUN(AC_PROG_CXX,
+AC_DEFUN([AC_PROG_CXX],
[AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl
AC_LANG_PUSH(C++)
AC_CHECK_PROGS(CXX, $CCC m4_default([$1], [c++ g++ gpp CC cxx cc++ cl]), g++)
# AC_PROG_CXX_G
# -------------
-AC_DEFUN(AC_PROG_CXX_G,
+AC_DEFUN([AC_PROG_CXX_G],
[AC_CACHE_CHECK(whether ${CXX-g++} accepts -g, ac_cv_prog_cxx_g,
[echo 'void f(){}' >conftest.cc
if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
# ---------------------------
# COMPILERS is a space separated list of Fortran 77 compilers to search
# for.
-AC_DEFUN(AC_PROG_F77,
+AC_DEFUN([AC_PROG_F77],
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
AC_LANG_PUSH(Fortran 77)
AC_CHECK_PROGS(F77,
# -------------
# Test whether the Fortran 77 compiler can accept the `-g' option to
# enable debugging.
-AC_DEFUN(AC_PROG_F77_G,
+AC_DEFUN([AC_PROG_F77_G],
[AC_CACHE_CHECK(whether $F77 accepts -g, ac_cv_prog_f77_g,
[cat >conftest.f <<EOF
program conftest
# The usefulness of this macro is questionable, as I can't really see
# why anyone would use it. The only reason I include it is for
# completeness, since a similar test exists for the C compiler.
-AC_DEFUN(AC_PROG_F77_C_O,
+AC_DEFUN([AC_PROG_F77_C_O],
[AC_BEFORE([$0], [AC_PROG_F77])dnl
AC_MSG_CHECKING(whether $F77 understand -c and -o together)
set dummy $F77; ac_f77=`echo $[2] |
# various options that select ANSI C on some system or another. It
# considers the compiler to be in ANSI C mode if it handles function
# prototypes correctly.
-AC_DEFUN(AC_PROG_CC_STDC,
+AC_DEFUN([AC_PROG_CC_STDC],
[AC_REQUIRE([AC_PROG_CC])dnl
AC_BEFORE([$0], [AC_C_INLINE])dnl
AC_BEFORE([$0], [AC_C_CONST])dnl
-AC_DEFUN(AC_C_CROSS,
+AC_DEFUN([AC_C_CROSS],
[AC_OBSOLETE([$0], [; it has been merged into AC_PROG_CC])])
# AC_C_CHAR_UNSIGNED
# ------------------
-AC_DEFUN(AC_C_CHAR_UNSIGNED,
+AC_DEFUN([AC_C_CHAR_UNSIGNED],
[AH_VERBATIM([__CHAR_UNSIGNED__],
[/* Define if type `char' is unsigned and you are not using gcc. */
#ifndef __CHAR_UNSIGNED__
# AC_C_LONG_DOUBLE
# ----------------
-AC_DEFUN(AC_C_LONG_DOUBLE,
+AC_DEFUN([AC_C_LONG_DOUBLE],
[AC_CACHE_CHECK(for long double, ac_cv_c_long_double,
[if test "$GCC" = yes; then
ac_cv_c_long_double=yes
# AC_C_BIGENDIAN
# --------------
-AC_DEFUN(AC_C_BIGENDIAN,
+AC_DEFUN([AC_C_BIGENDIAN],
[AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian,
[ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
# Do nothing if the compiler accepts the inline keyword.
# Otherwise define inline to __inline__ or __inline if one of those work,
# otherwise define inline to be empty.
-AC_DEFUN(AC_C_INLINE,
+AC_DEFUN([AC_C_INLINE],
[AC_REQUIRE([AC_PROG_CC_STDC])dnl
AC_CACHE_CHECK([for inline], ac_cv_c_inline,
[ac_cv_c_inline=no
# AC_C_CONST
# ----------
-AC_DEFUN(AC_C_CONST,
+AC_DEFUN([AC_C_CONST],
[AC_REQUIRE([AC_PROG_CC_STDC])dnl
AC_CACHE_CHECK([for an ANSI C-conforming const], ac_cv_c_const,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
# optimizations that could break the user's code. So, do not #define
# volatile away unless it is really necessary to allow the user's code
# to compile cleanly. Benign compiler failures should be tolerated.
-AC_DEFUN(AC_C_VOLATILE,
+AC_DEFUN([AC_C_VOLATILE],
[AC_REQUIRE([AC_PROG_CC_STDC])dnl
AC_CACHE_CHECK([for working volatile], ac_cv_c_volatile,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [
# --------------
# Checks if `#' can be used to glue strings together at the CPP level.
# Defines HAVE_STRINGIZE if positive.
-AC_DEFUN(AC_C_STRINGIZE,
+AC_DEFUN([AC_C_STRINGIZE],
[AC_REQUIRE([AC_PROG_CPP])dnl
AC_MSG_CHECKING([for preprocessor stringizing operator])
AC_CACHE_VAL(ac_cv_c_stringize,
# ---------------
# Check if the C compiler supports prototypes, included if it needs
# options.
-AC_DEFUN(AC_C_PROTOTYPES,
+AC_DEFUN([AC_C_PROTOTYPES],
[AC_REQUIRE([AC_PROG_CC_STDC])dnl
AC_REQUIRE([AC_PROG_CPP])dnl
AC_MSG_CHECKING([for function prototypes])
if test "$ac_cv_prog_cc_stdc" != no; then
AC_MSG_RESULT(yes)
AC_DEFINE(PROTOTYPES, 1,
- [Define if the compiler supports function prototypes.])
+ [Define if the C compiler supports function prototypes.])
else
AC_MSG_RESULT(no)
fi
# properly mangle the names of C identifiers, and C identifiers with
# underscores, respectively, so that they match the name mangling
# scheme used by the Fortran 77 compiler.
-AC_DEFUN(AC_F77_WRAPPERS,
+AC_DEFUN([AC_F77_WRAPPERS],
[AC_REQUIRE([AC_F77_NAME_MANGLING])dnl
AH_TEMPLATE([F77_FUNC],
[Define to a macro mangling the given C identifier (in lower and upper
# AC_DIVERT_PUSH(DIVERSION-NAME)
# ------------------------------
# Change the diversion stream to DIVERSION-NAME, while stacking old values.
-define(AC_DIVERT_PUSH,
+define([AC_DIVERT_PUSH],
[pushdef([AC_DIVERT_DIVERSION], _AC_DIVERT([$1]))dnl
divert(AC_DIVERT_DIVERSION)dnl
])
# AC_DIVERT_POP
# -------------
# Change the diversion stream to its previous value, unstacking it.
-define(AC_DIVERT_POP,
+define([AC_DIVERT_POP],
[popdef([AC_DIVERT_DIVERSION])dnl
ifndef([AC_DIVERT_DIVERSION], [AC_FATAL([too many AC_DIVERT_POP])])dnl
divert(AC_DIVERT_DIVERSION)dnl
# AC_PRO(MACRO-NAME)
# ------------------
# The prologue for Autoconf macros.
-define(AC_PRO,
+define([AC_PRO],
[AC_PROVIDE([$1])dnl
ifelse(AC_DIVERT_DIVERSION, _AC_DIVERT([NORMAL]),
[AC_DIVERT_PUSH(m4_eval(AC_DIVERT_DIVERSION - 1))],
# AC_EPI
# ------
# The Epilogue for Autoconf macros.
-define(AC_EPI,
+define([AC_EPI],
[AC_DIVERT_POP()dnl
ifelse(AC_DIVERT_DIVERSION, _AC_DIVERT([NORMAL]),
[undivert(_AC_DIVERT([NORMAL_4]))dnl
# AC_OBSOLETE(THIS-MACRO-NAME, [SUGGESTION])
# ------------------------------------------
-define(AC_OBSOLETE,
+define([AC_OBSOLETE],
[AC_DIAGNOSE([obsolete], [$1 is obsolete$2])])
# there exist a specialized version of MACRO for ARG1, use this macro
# instead with arguments ARGS (i.e., ARG1 is *not* given). See the
# definition of `AC_DEFUN'.
-define(AC_SPECIALIZE,
+define([AC_SPECIALIZE],
[ifdef([$1-$2],
[indir([$1-$2], m4_shift(m4_shift($@)))],
[$1(m4_shift($@))])])
# AC_BEFORE(THIS-MACRO-NAME, CALLED-MACRO-NAME)
# ---------------------------------------------
-define(AC_BEFORE,
+define([AC_BEFORE],
[AC_PROVIDE_IFELSE([$2], [AC_DIAGNOSE([syntax], [$2 was called before $1])])])
# ----------------------
# If MACRO-NAME has never been expanded, expand it *before* the current
# macro expansion.
-define(AC_REQUIRE,
+define([AC_REQUIRE],
[AC_PROVIDE_IFELSE([$1],
[],
[AC_DIVERT(m4_eval(AC_DIVERT_DIVERSION - 1), [$1])])dnl
# AC_EXPAND_ONCE(TEXT)
# --------------------
# If TEXT has never been expanded, expand it *here*.
-define(AC_EXPAND_ONCE,
+define([AC_EXPAND_ONCE],
[AC_PROVIDE_IFELSE([$1],
[],
[AC_PROVIDE([$1])[]$1])])
# AC_PROVIDE(MACRO-NAME)
# ----------------------
-define(AC_PROVIDE,
+define([AC_PROVIDE],
[define([AC_PROVIDE_$1])])
# The purpose of this macro is to provide the user with a means to
# check macros which are provided without letting her know how the
# information is coded.
-define(AC_PROVIDE_IFELSE,
+define([AC_PROVIDE_IFELSE],
[ifdef([AC_PROVIDE_$1],
[$2], [$3])])
# Declare `autoupdate::NAME' to be `GLUE-CODE', with all the needed
# wrapping actions required by `autoupdate'.
# We do not define anything in `autoconf::'.
-define(AU_DEFINE,
+define([AU_DEFINE],
[AC_DEFUN([$1], [$2])])
# This allows to share the same code for both supporting obsoleted macros,
# and to update a configure.in.
# See `acobsolete.m4' for a longer description.
-define(AU_DEFUN,
+define([AU_DEFUN],
[AU_DEFINE([$1],
[AC_DIAGNOSE([obsolete], [The macro `$1' is obsolete.
You should run autoupdate.])dnl
# ---------------------------------------------------
# If EXPRESSION has shell indirections ($var or `expr`), expand
# IF-INDIR, else IF-NOT-INDIR.
-define(AC_VAR_IF_INDIR,
+define([AC_VAR_IF_INDIR],
[ifelse(regexp([$1], [[`$]]),
-1, [$3],
[$2])])
# Set the VALUE of the shell VARIABLE.
# If the variable contains indirections (e.g. `ac_cv_func_$ac_func')
# perform whenever possible at m4 level, otherwise sh level.
-define(AC_VAR_SET,
+define([AC_VAR_SET],
[AC_VAR_IF_INDIR([$1],
[eval "$1=$2"],
[$1=$2])])
# Get the value of the shell VARIABLE.
# Evaluates to $VARIABLE if there are no indirection in VARIABLE,
# else into the appropriate `eval' sequence.
-define(AC_VAR_GET,
+define([AC_VAR_GET],
[AC_VAR_IF_INDIR([$1],
[`eval echo '${'patsubst($1, [[\\`]], [\\\&])'}'`],
[$[]$1])])
# -------------------------
# Expands into the `test' expression which is true if VARIABLE
# is set. Polymorphic. Should be dnl'ed.
-define(AC_VAR_TEST_SET,
+define([AC_VAR_TEST_SET],
[AC_VAR_IF_INDIR([$1],
[eval "test \"\${$1+set}\" = set"],
[test "${$1+set}" = set])])
# ------------------------------------------
# Implement a shell `if-then-else' depending whether VARIABLE is set
# or not. Polymorphic.
-define(AC_VAR_IF_SET,
+define([AC_VAR_IF_SET],
[AC_SHELL_IFELSE([AC_VAR_TEST_SET([$1])], [$2], [$3])])
# Define the m4 macro VARNAME to an accessor to the shell variable
# named VALUE. VALUE does not need to be a valid shell variable name:
# the transliteration is handled here. To be dnl'ed.
-define(AC_VAR_PUSHDEF,
+define([AC_VAR_PUSHDEF],
[AC_VAR_IF_INDIR([$2],
[ac_$1=AC_TR_SH($2)
pushdef([$1], [$ac_[$1]])],
# AC_VAR_POPDEF(VARNAME)
# ----------------------
# Free the shell variable accessor VARNAME. To be dnl'ed.
-define(AC_VAR_POPDEF,
+define([AC_VAR_POPDEF],
[popdef([$1])])
# Map EXPRESSION to an upper case string which is valid as rhs for a
# `#define'. sh/m4 polymorphic. Make sure to update the definition
# of `$ac_tr_cpp' if you change this.
-define(AC_TR_CPP,
+define([AC_TR_CPP],
[AC_VAR_IF_INDIR([$1],
[`echo "$1" | $ac_tr_cpp`],
[patsubst(translit([[$1]],
# Transform EXPRESSION into a valid shell variable name.
# sh/m4 polymorphic.
# Make sure to update the definition of `$ac_tr_sh' if you change this.
-define(AC_TR_SH,
+define([AC_TR_SH],
[AC_VAR_IF_INDIR([$1],
[`echo "$1" | $ac_tr_sh`],
[patsubst(translit([[$1]], [*+], [pp]),
# --------------------------
# The quote in the comment below is just to cope with font-lock-mode
# which sees the opening of a string.
-AC_DEFUN(AC_REVISION,
+AC_DEFUN([AC_REVISION],
[AC_REQUIRE([AC_INIT])dnl
AC_DIVERT([BINSH], [@%:@ From configure.in translit([$1], $")])dnl "
])
#i.e., 2.14a -> 2.15.-1.1, 2.14b -> 2.15.-1.2, etc.
# This macro is absolutely not robust to active macro, it expects
# reasonable version numbers and is valid up to `z', no double letters.
-define(_AC_VERSION_UNLETTER,
+define([_AC_VERSION_UNLETTER],
[translit(patsubst(patsubst(patsubst([$1],
[\([0-9]+\)\([abcdefghi]\)],
[m4_eval(\1 + 1).-1.\2]),
# -1 if VERSION-1 < VERSION-2
# 0 if =
# 1 if >
-define(_AC_VERSION_COMPARE,
+define([_AC_VERSION_COMPARE],
[m4_list_cmp((m4_split(_AC_VERSION_UNLETTER([$1]), [\.])),
(m4_split(_AC_VERSION_UNLETTER([$2]), [\.])))])
# AC_PREREQ(VERSION)
# ------------------
# Complain and exit if the Autoconf version is less than VERSION.
-define(AC_PREREQ,
+define([AC_PREREQ],
[ifelse(_AC_VERSION_COMPARE(AC_ACVERSION, [$1]), -1,
[AC_FATAL([Autoconf version $1 or higher is required for this script])])])
# _AC_INIT_DEFAULTS
# -----------------
# Values which defaults can be set from `configure.in'.
-AC_DEFUN(_AC_INIT_DEFAULTS,
+AC_DEFUN([_AC_INIT_DEFAULTS],
[AC_DIVERT_PUSH([DEFAULTS])dnl
#
# AC_PREFIX_DEFAULT(PREFIX)
# -------------------------
-AC_DEFUN(AC_PREFIX_DEFAULT,
+AC_DEFUN([AC_PREFIX_DEFAULT],
[AC_DIVERT([DEFAULTS], [ac_default_prefix=$1])])
# AC_ARG_ENABLE(FEATURE, HELP-STRING, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
# ------------------------------------------------------------------------
-AC_DEFUN(AC_ARG_ENABLE,
+AC_DEFUN([AC_ARG_ENABLE],
[AC_DIVERT_PUSH([HELP_ENABLE])dnl
AC_EXPAND_ONCE([[
Optional Features:
])# AC_ARG_ENABLE
-AU_DEFUN(AC_ENABLE,
+AU_DEFUN([AC_ENABLE],
[AC_ARG_ENABLE([$1], [ --enable-$1], [$2], [$3])])
# AC_ARG_WITH(PACKAGE, HELP-STRING, ACTION-IF-TRUE, [ACTION-IF-FALSE])
# --------------------------------------------------------------------
-AC_DEFUN(AC_ARG_WITH,
+AC_DEFUN([AC_ARG_WITH],
[AC_DIVERT_PUSH([HELP_WITH])dnl
AC_EXPAND_ONCE([[
Optional Packages:
fi[]dnl
])# AC_ARG_WITH
-AU_DEFUN(AC_WITH,
+AU_DEFUN([AC_WITH],
[AC_ARG_WITH([$1], [ --with-$1], [$2], [$3])])
# ----------------------------------
# Register VARNAME as a variable configure should remember, and
# document it in `configure --help'.
-AC_DEFUN(AC_ARG_VAR,
+AC_DEFUN([AC_ARG_VAR],
[AC_DIVERT_PUSH([HELP_VAR])dnl
AC_EXPAND_ONCE([
Some influent environment variables:
# Find install-sh, config.sub, config.guess, and Cygnus configure
# in directory DIR. These are auxiliary files used in configuration.
# DIR can be either absolute or relative to $srcdir.
-AC_DEFUN(AC_CONFIG_AUX_DIR,
+AC_DEFUN([AC_CONFIG_AUX_DIR],
[AC_CONFIG_AUX_DIRS($1 $srcdir/$1)])
# -------------------------
# The default is `$srcdir' or `$srcdir/..' or `$srcdir/../..'.
# There's no need to call this macro explicitly; just AC_REQUIRE it.
-AC_DEFUN(AC_CONFIG_AUX_DIR_DEFAULT,
+AC_DEFUN([AC_CONFIG_AUX_DIR_DEFAULT],
[AC_CONFIG_AUX_DIRS($srcdir $srcdir/.. $srcdir/../..)])
# Search for the configuration auxiliary files in directory list $1.
# We look only for install-sh, so users of AC_PROG_INSTALL
# do not automatically need to distribute the other auxiliary files.
-AC_DEFUN(AC_CONFIG_AUX_DIRS,
+AC_DEFUN([AC_CONFIG_AUX_DIRS],
[ac_aux_dir=
for ac_dir in $1; do
if test -f $ac_dir/install-sh; then
])# AC_CANONICAL_TARGET
-AU_DEFUN(AC_CANONICAL_SYSTEM, [AC_CANONICAL_TARGET])
+AU_DEFUN([AC_CANONICAL_SYSTEM], [AC_CANONICAL_TARGET])
# AC_VALIDATE_CACHED_SYSTEM_TUPLE([CMD])
# If the cache file is inconsistent with the current host,
# target and build system types, execute CMD or print a default
# error message.
-AC_DEFUN(AC_VALIDATE_CACHED_SYSTEM_TUPLE,
+AC_DEFUN([AC_VALIDATE_CACHED_SYSTEM_TUPLE],
[AC_REQUIRE([AC_CANONICAL_SYSTEM])dnl
AC_MSG_CHECKING([cached system tuple])
if { test x"${ac_cv_host_system_type+set}" = x"set" &&
# AC_SITE_LOAD
# ------------
# Look for site or system specific initialization scripts.
-define(AC_SITE_LOAD,
+define([AC_SITE_LOAD],
[# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
if test "x$prefix" != xNONE; then
#
# The name of shell var CACHE-ID must contain `_cv_' in order to get saved.
# Should be dnl'ed.
-define(AC_CACHE_VAL,
+define([AC_CACHE_VAL],
[dnl We used to use the below line, but it fails if the 1st arg is a
dnl shell variable, so we need the eval.
dnl if test "${$1+set}" = set; then
# AC_CACHE_CHECK(MESSAGE, CACHE-ID, COMMANDS)
# -------------------------------------------
# Do not call this macro with a dnl right behind.
-define(AC_CACHE_CHECK,
+define([AC_CACHE_CHECK],
[AC_MSG_CHECKING([$1])
AC_CACHE_VAL([$2], [$3])dnl
AC_MSG_RESULT_UNQUOTED(AC_VAR_GET([$2]))])
# Set VARIABLE to VALUE, verbatim, or 1. Remember the value
# and if VARIABLE is affected the same VALUE, do nothing, else
# die. The third argument is used by autoheader.
-define(AC_DEFINE,
+define([AC_DEFINE],
[ifval([$3], [AH_TEMPLATE([$1], [$3])])dnl
cat >>confdefs.h <<\EOF
[#define] $1 ifelse($#, 2, [$2], $#, 3, [$2], 1)
# AC_DEFINE_UNQUOTED(VARIABLE, [VALUE], [DESCRIPTION])
# ----------------------------------------------------
# Similar, but perform shell substitutions $ ` \ once on VALUE.
-define(AC_DEFINE_UNQUOTED,
+define([AC_DEFINE_UNQUOTED],
[ifval([$3], [AH_TEMPLATE([$1], [$3])])dnl
cat >>confdefs.h <<EOF
[#define] $1 ifelse($#, 2, [$2], $#, 3, [$2], 1)
# ----------------------------
# If VARIABLE has not already been AC_SUBST'ed, append the sed PROGRAM
# to `_AC_SUBST_SED_PROGRAM'.
-define(_AC_SUBST,
+define([_AC_SUBST],
[AC_EXPAND_ONCE([m4_append([_AC_SUBST_SED_PROGRAM],
[$2
])])dnl
# AC_SUBST_FILE(VARIABLE)
# -----------------------
# Read the comments of the preceding macro.
-define(AC_SUBST_FILE,
+define([AC_SUBST_FILE],
[_AC_SUBST([$1], [/@$1@/r [$]$1
s%@$1@%%;t t])])
# ---------------------
# The purpose of this macro is to "configure:123: command line"
# written into config.log for every test run.
-AC_DEFUN(AC_TRY_EVAL,
+AC_DEFUN([AC_TRY_EVAL],
[{ (eval echo configure:__oline__: \"[$]$1\") >&AC_FD_LOG; dnl
(eval [$]$1) 2>&AC_FD_LOG; }])
# AC_TRY_COMMAND(COMMAND)
# -----------------------
-AC_DEFUN(AC_TRY_COMMAND,
+AC_DEFUN([AC_TRY_COMMAND],
[{ ac_try='$1'; AC_TRY_EVAL(ac_try); }])
# Because I don't see any backward compatible means to fix the
# brokenness of AC_TRY_COMPILE, we are doomed to leave a extra new
# line here.
-define(AC_INCLUDES_DEFAULT,
+define([AC_INCLUDES_DEFAULT],
[ifelse([$1], [], [$ac_includes_default], [$1
])])
# ---------------------------------------------------------
# AGGREGATE.MEMBER is for instance `struct passwd.pw_gecos', shell
# variables are not a valid argument.
-AC_DEFUN(AC_CHECK_MEMBER,
+AC_DEFUN([AC_CHECK_MEMBER],
[AC_VAR_IF_INDIR([$1], [AC_FATAL([$0: requires literal arguments])])dnl
ifelse(regexp([$1], [\.]), -1,
[AC_FATAL([$0: Did not see any dot in `$1'])])dnl
# [INCLUDES])
# ---------------------------------------------------------
# The first argument is an m4 list.
-AC_DEFUN(AC_CHECK_MEMBERS,
+AC_DEFUN([AC_CHECK_MEMBERS],
[m4_foreach([AC_Member], [$1],
[AC_SPECIALIZE([AC_CHECK_MEMBER], AC_Member,
[AC_DEFINE_UNQUOTED(AC_TR_CPP(HAVE_[]AC_Member), 1,
# [VALUE-IF-FOUND], [VALUE-IF-NOT-FOUND],
# [PATH], [REJECT])
# -----------------------------------------------------
-AC_DEFUN(AC_CHECK_PROG,
+AC_DEFUN([AC_CHECK_PROG],
[# Extract the first word of "$2", so it can be a program name with args.
set dummy $2; ac_word=$[2]
AC_MSG_CHECKING([for $ac_word])
# AC_CHECK_PROGS(VARIABLE, PROGS-TO-CHECK-FOR, [VALUE-IF-NOT-FOUND],
# [PATH])
# ------------------------------------------------------------------
-AC_DEFUN(AC_CHECK_PROGS,
+AC_DEFUN([AC_CHECK_PROGS],
[for ac_prog in $2
do
AC_CHECK_PROG([$1], $ac_prog, $ac_prog, , [$4])
# AC_PATH_PROG(VARIABLE, PROG-TO-CHECK-FOR, [VALUE-IF-NOT-FOUND], [PATH])
# -----------------------------------------------------------------------
-AC_DEFUN(AC_PATH_PROG,
+AC_DEFUN([AC_PATH_PROG],
[# Extract the first word of "$2", so it can be a program name with args.
set dummy $2; ac_word=$[2]
AC_MSG_CHECKING([for $ac_word])
# AC_PATH_PROGS(VARIABLE, PROGS-TO-CHECK-FOR, [VALUE-IF-NOT-FOUND],
# [PATH])
# -----------------------------------------------------------------
-AC_DEFUN(AC_PATH_PROGS,
+AC_DEFUN([AC_PATH_PROGS],
[for ac_prog in $2
do
AC_PATH_PROG($1, $ac_prog, , $4)
# AC_CHECK_TOOL_PREFIX
# ---------------------
-AC_DEFUN(AC_CHECK_TOOL_PREFIX,
+AC_DEFUN([AC_CHECK_TOOL_PREFIX],
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
if test $host != $build; then
# AC_PATH_TOOL(VARIABLE, PROG-TO-CHECK-FOR, [VALUE-IF-NOT-FOUND], [PATH])
# -----------------------------------------------------------------------
-AC_DEFUN(AC_PATH_TOOL,
+AC_DEFUN([AC_PATH_TOOL],
[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
AC_PATH_PROG($1, ${ac_tool_prefix}$2, ${ac_tool_prefix}$2,
ifelse([$3], , [$2]), $4)
# AC_CHECK_TOOL(VARIABLE, PROG-TO-CHECK-FOR, [VALUE-IF-NOT-FOUND], [PATH])
# ------------------------------------------------------------------------
-AC_DEFUN(AC_CHECK_TOOL,
+AC_DEFUN([AC_CHECK_TOOL],
[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
AC_CHECK_PROG($1, ${ac_tool_prefix}$2, ${ac_tool_prefix}$2,
ifelse([$3], , [$2], ), $4)
# This comes too late to find a site file based on the prefix,
# and it might use a cached value for the path.
# No big loss, I think, since most configures don't use this macro anyway.
-AC_DEFUN(AC_PREFIX_PROGRAM,
+AC_DEFUN([AC_PREFIX_PROGRAM],
[dnl Get an upper case version of $[1].
pushdef(AC_Prog, translit($1, a-z, A-Z))dnl
if test "x$prefix" = xNONE; then
# Try to link a program that calls FUNC, handling GCC builtins. If
# the link succeeds, execute ACTION-IF-FOUND; otherwise, execute
# ACTION-IF-NOT-FOUND.
-AC_DEFUN(AC_TRY_LINK_FUNC,
+AC_DEFUN([AC_TRY_LINK_FUNC],
[AC_LINK_IFELSE([AC_LANG_CALL([], [$1])], [$2], [$3])])
# [OTHER-LIBRARIES])
# --------------------------------------------------------
# Search for a library defining FUNC, if it's not already available.
-AC_DEFUN(AC_SEARCH_LIBS,
+AC_DEFUN([AC_SEARCH_LIBS],
[AC_CACHE_CHECK([for library containing $1], [ac_cv_search_$1],
[ac_func_search_save_LIBS=$LIBS
ac_cv_search_$1=no
# FIXME: This macro is extremely suspicious. It DEFINEs unconditionnally,
# whatever the FUNCTION, in addition to not being a *S macro. Note
# that the cache does depend upon the function we are looking for.
-AC_DEFUN(AC_CHECK_LIB,
+AC_DEFUN([AC_CHECK_LIB],
[AH_CHECK_LIB([$1])dnl
AC_VAR_PUSHDEF([ac_Lib], [ac_cv_lib_$1_$2])dnl
AC_CACHE_CHECK([for $2 in -l$1], ac_Lib,
# `foo', `-lfoo', or `libfoo.a'. In all of those cases, the compiler
# is passed `-lfoo'. However, LIBRARY cannot be a shell variable;
# it must be a literal name.
-AU_DEFUN(AC_HAVE_LIBRARY,
+AU_DEFUN([AC_HAVE_LIBRARY],
[pushdef([AC_Lib_Name],
patsubst(patsubst([[$1]], [lib\([^\.]*\)\.a], [\1]), [-l], []))dnl
AC_CHECK_LIB(AC_Lib_Name, main, [$2], [$3], [$4])dnl
# AC_TRY_CPP(INCLUDES, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
# ---------------------------------------------------------
# INCLUDES are not defaulted.
-AC_DEFUN(AC_TRY_CPP,
+AC_DEFUN([AC_TRY_CPP],
[AC_REQUIRE_CPP()dnl
cat >conftest.$ac_ext <<EOF
AC_LANG_SOURCE([[$1]])
# AC_EGREP_HEADER(PATTERN, HEADER-FILE,
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
# --------------------------------------------------------
-AC_DEFUN(AC_EGREP_HEADER,
+AC_DEFUN([AC_EGREP_HEADER],
[AC_EGREP_CPP([$1],
[#include <$2>
], [$3], [$4])])
# ------------------------------------------------------
# Because this macro is used by AC_PROG_GCC_TRADITIONAL, which must
# come early, it is not included in AC_BEFORE checks.
-AC_DEFUN(AC_EGREP_CPP,
+AC_DEFUN([AC_EGREP_CPP],
[AC_REQUIRE_CPP()dnl
cat >conftest.$ac_ext <<EOF
AC_LANG_SOURCE([[$2]])
# AC_COMPILE_CHECK(ECHO-TEXT, INCLUDES, FUNCTION-BODY,
# ACTION-IF-FOUND, [ACTION-IF-NOT-FOUND])
# --------------------------------------------------------
-AU_DEFUN(AC_COMPILE_CHECK,
+AU_DEFUN([AC_COMPILE_CHECK],
[ifval([$1], [AC_CHECKING([for $1])
])dnl
AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2]], [[$3]])], [$4], [$5])
# AC_CHECK_HEADER(HEADER-FILE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
# ----------------------------------------------------------------------
-AC_DEFUN(AC_CHECK_HEADER,
+AC_DEFUN([AC_CHECK_HEADER],
[AC_VAR_PUSHDEF([ac_Header], [ac_cv_header_$1])dnl
AC_CACHE_CHECK([for $1], ac_Header,
[AC_TRY_CPP([#include <$1>
])# AC_CHECK_HEADER
-define(AH_CHECK_HEADERS,
+define([AH_CHECK_HEADERS],
[AC_FOREACH([AC_Header], [$1],
[AH_TEMPLATE(AC_TR_CPP(HAVE_[]AC_Header),
[Define if you have the <]AC_Header[> header file.])])])
# AC_CHECK_HEADERS(HEADER-FILE...
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
# ----------------------------------------------------------
-AC_DEFUN(AC_CHECK_HEADERS,
+AC_DEFUN([AC_CHECK_HEADERS],
[AH_CHECK_HEADERS([$1])dnl
for ac_header in $1
do
# -------------------------------------------------------------
#
# Check for the existence of FILE.
-AC_DEFUN(AC_CHECK_FILE,
+AC_DEFUN([AC_CHECK_FILE],
[AC_DIAGNOSE([cross],
[Cannot check for file existence when cross compiling])dnl
AC_VAR_PUSHDEF([ac_File], [ac_cv_file_$1])dnl
# AC_CHECK_FILES(FILE..., [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
# -----------------------------------------------------------------
-AC_DEFUN(AC_CHECK_FILES,
+AC_DEFUN([AC_CHECK_FILES],
[AC_FOREACH([AC_FILE_NAME], [$1],
[AC_SPECIALIZE([AC_CHECK_FILE], AC_FILE_NAME,
[AC_DEFINE_UNQUOTED(AC_TR_CPP(HAVE_[]AC_FILE_NAME), 1,
# AC_CHECK_FUNC(FUNCTION, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
# -----------------------------------------------------------------
-AC_DEFUN(AC_CHECK_FUNC,
+AC_DEFUN([AC_CHECK_FUNC],
[AC_VAR_PUSHDEF([ac_var], [ac_cv_func_$1])dnl
AC_CACHE_CHECK([for $1], ac_var,
[AC_TRY_LINK(
# ---------------------------------------------------------------------
# FIXME: Should we die if there are not enough arguments, or just
# ignore?
-AC_DEFUN(AC_CHECK_FUNCS,
+AC_DEFUN([AC_CHECK_FUNCS],
[AC_FOREACH([AC_Func], [$1],
[AH_TEMPLATE(AC_TR_CPP(HAVE_[]AC_Func),
[Define if you have the `]AC_Func[' function.])])dnl
# -----------------------------------------------
# This macro will probably be obsoleted by the macros of Kaveh. In
# addition `CHECK' is not a proper name (is not boolean).
-AC_DEFUN(AC_CHECK_SIZEOF,
+AC_DEFUN([AC_CHECK_SIZEOF],
[AC_VAR_PUSHDEF([ac_Sizeof], [ac_cv_sizeof_$1])dnl
AC_CACHE_CHECK([size of $1], ac_Sizeof,
[AC_TRY_RUN(AC_INCLUDES_DEFAULT([$3])
# is just no way to simply compare two strings in m4, but to use pattern
# matching. The big problem is then that the active characters should
# be quoted. Currently `+*.' are quoted.
-define(AC_CONFIG_IF_MEMBER,
+define([AC_CONFIG_IF_MEMBER],
[ifelse(regexp($2, [\(^\| \)]patsubst([$1],
[\([+*.]\)], [\\\1])[\(:\| \|$\)]),
-1, [$4], [$3])])
#
# Note that this macro does not check if the list $[1] itself
# contains doubles.
-define(_AC_CONFIG_UNIQUE,
+define([_AC_CONFIG_UNIQUE],
[AC_DIVERT_PUSH([KILL])
AC_FOREACH([AC_File], [$1],
[pushdef([AC_Dest], patsubst(AC_File, [:.*]))
# `config.status'. This is typically used to pass variables from
# `configure' to `config.status'. Note that $[1] is not over quoted as
# was the case in AC_OUTPUT_COMMANDS.
-define(_AC_CONFIG_COMMANDS_INIT,
+define([_AC_CONFIG_COMMANDS_INIT],
[ifval([$1],
[m4_append([_AC_OUTPUT_COMMANDS_INIT], [$1
])])])
# if you update an included file and configure.in: you might have
# clashes :( On the other hand, I'd like to avoid weird keys (e.g.,
# depending upon __file__ or the pid).
-AU_DEFUN(AC_OUTPUT_COMMANDS,
+AU_DEFUN([AC_OUTPUT_COMMANDS],
[define([_AC_OUTPUT_COMMANDS_CNT], incr(_AC_OUTPUT_COMMANDS_CNT))dnl
dnl Double quoted since that was the case in the original macro.
AC_CONFIG_COMMANDS([default-]_AC_OUTPUT_COMMANDS_CNT, [[$1]], [[$2]])dnl
# AC_CONFIG_HEADER(HEADER-TO-CREATE ...)
# --------------------------------------
# FIXME: Make it obsolete?
-AC_DEFUN(AC_CONFIG_HEADER,
+AC_DEFUN([AC_CONFIG_HEADER],
[AC_CONFIG_HEADERS([$1])])
# link from TOP_SRCDIR/SOURCE to TOP_SRCDIR/DEST.
# Reject DEST=., because it is makes it hard for ./config.status
# to guess the links to establish (`./config.status .').
-AC_DEFUN(AC_CONFIG_LINKS,
+AC_DEFUN([AC_CONFIG_LINKS],
[AC_DIVERT_PUSH([KILL])
_AC_CONFIG_UNIQUE([$1])
_AC_CONFIG_DEPENDENCIES([$1])
# This is a subroutine of AC_OUTPUT.
# It is called inside configure, outside of config.status.
# Using a here document instead of a string reduces the quoting nightmare.
-define(AC_OUTPUT_MAKE_DEFS,
+define([AC_OUTPUT_MAKE_DEFS],
[[# Transform confdefs.h into DEFS.
# Protect against shell expansion while executing Makefile rules.
# Protect against Makefile macro expansion.
#
# It has to send itself into $CONFIG_STATUS (eg, via here documents).
# Upon exit, no here document shall be opened.
-define(_AC_OUTPUT_FILES,
+define([_AC_OUTPUT_FILES],
[cat >>$CONFIG_STATUS <<EOF
#
#
# The result is about, hm, ... times blah... plus.... Ahem. The
# result is about much faster.
-define(_AC_OUTPUT_HEADERS,
+define([_AC_OUTPUT_HEADERS],
[cat >>$CONFIG_STATUS <<\EOF
#
#
# It has to send itself into $CONFIG_STATUS (eg, via here documents).
# Upon exit, no here document shall be opened.
-define(_AC_OUTPUT_LINKS,
+define([_AC_OUTPUT_LINKS],
[cat >>$CONFIG_STATUS <<\EOF
#
#
# It has to send itself into $CONFIG_STATUS (eg, via here documents).
# Upon exit, no here document shall be opened.
-define(_AC_OUTPUT_COMMANDS,
+define([_AC_OUTPUT_COMMANDS],
[cat >>$CONFIG_STATUS <<\EOF
#
# You are encouraged to add support for compilers that this macro
# doesn't currently support.
# FIXME: Get rid of this macro.
-AC_DEFUN(AC_LINKER_OPTION,
+AC_DEFUN([AC_LINKER_OPTION],
[AC_LANG_CASE([C], [test x"$GCC" = xyes && using_gnu_compiler=yes],
[C++], [test x"$GXX" = xyes && using_gnu_compiler=yes],
[FORTRAN77], [test x"$G77" = xyes && using_gnu_compiler=yes],
# This macro searches LIST for ELEMENT, and executes ACTION-IF-FOUND
# if ELEMENT is a member of LIST, otherwise it executes
# ACTION-IF-NOT-FOUND.
-AC_DEFUN(AC_LIST_MEMBER_OF,
+AC_DEFUN([AC_LIST_MEMBER_OF],
[dnl Do some sanity checking of the arguments.
ifelse([$1], , [AC_FATAL([$0]: missing argument 1)])dnl
ifelse([$2], , [AC_FATAL([$0]: missing argument 2)])dnl
# ------------------------------------------------------------
# Expand into IF-LANG1 if the current language is LANG1 etc. else
# into default.
-define(AC_LANG_CASE,
+define([AC_LANG_CASE],
[m4_case(_AC_LANG, $@)])
# AC_PROG_CPP
# -----------
-AC_DEFUN(AC_PROG_CPP,
+AC_DEFUN([AC_PROG_CPP],
[AC_MSG_CHECKING(how to run the C preprocessor)
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
# COMPILER ... is a space separated list of C compilers to search for.
# This just gives the user an opportunity to specify an alternative
# search list for the C compiler.
-AC_DEFUN(AC_PROG_CC,
+AC_DEFUN([AC_PROG_CC],
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
AC_LANG_PUSH(C)
AC_ARG_VAR([CFLAGS], [Extra flags for the C compiler])
# AC_PROG_CC_G
# ------------
-AC_DEFUN(AC_PROG_CC_G,
+AC_DEFUN([AC_PROG_CC_G],
[AC_CACHE_CHECK(whether ${CC-cc} accepts -g, ac_cv_prog_cc_g,
[echo 'void f(){}' >conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
# AC_PROG_GCC_TRADITIONAL
# -----------------------
-AC_DEFUN(AC_PROG_GCC_TRADITIONAL,
+AC_DEFUN([AC_PROG_GCC_TRADITIONAL],
[AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_PROG_CPP])dnl
if test $ac_cv_prog_gcc = yes; then
# AC_PROG_CC_C_O
# --------------
-AC_DEFUN(AC_PROG_CC_C_O,
+AC_DEFUN([AC_PROG_CC_C_O],
[if test "x$CC" != xcc; then
AC_MSG_CHECKING(whether $CC and cc understand -c and -o together)
else
# AC_PROG_CXXCPP
# --------------
-AC_DEFUN(AC_PROG_CXXCPP,
+AC_DEFUN([AC_PROG_CXXCPP],
[AC_MSG_CHECKING(how to run the C++ preprocessor)
if test -z "$CXXCPP"; then
AC_CACHE_VAL(ac_cv_prog_CXXCPP,
# for (if not specified, a default list is used). This just gives the
# user an opportunity to specify an alternative search list for the C++
# compiler.
-AC_DEFUN(AC_PROG_CXX,
+AC_DEFUN([AC_PROG_CXX],
[AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl
AC_LANG_PUSH(C++)
AC_CHECK_PROGS(CXX, $CCC m4_default([$1], [c++ g++ gpp CC cxx cc++ cl]), g++)
# AC_PROG_CXX_G
# -------------
-AC_DEFUN(AC_PROG_CXX_G,
+AC_DEFUN([AC_PROG_CXX_G],
[AC_CACHE_CHECK(whether ${CXX-g++} accepts -g, ac_cv_prog_cxx_g,
[echo 'void f(){}' >conftest.cc
if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
# ---------------------------
# COMPILERS is a space separated list of Fortran 77 compilers to search
# for.
-AC_DEFUN(AC_PROG_F77,
+AC_DEFUN([AC_PROG_F77],
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
AC_LANG_PUSH(Fortran 77)
AC_CHECK_PROGS(F77,
# -------------
# Test whether the Fortran 77 compiler can accept the `-g' option to
# enable debugging.
-AC_DEFUN(AC_PROG_F77_G,
+AC_DEFUN([AC_PROG_F77_G],
[AC_CACHE_CHECK(whether $F77 accepts -g, ac_cv_prog_f77_g,
[cat >conftest.f <<EOF
program conftest
# The usefulness of this macro is questionable, as I can't really see
# why anyone would use it. The only reason I include it is for
# completeness, since a similar test exists for the C compiler.
-AC_DEFUN(AC_PROG_F77_C_O,
+AC_DEFUN([AC_PROG_F77_C_O],
[AC_BEFORE([$0], [AC_PROG_F77])dnl
AC_MSG_CHECKING(whether $F77 understand -c and -o together)
set dummy $F77; ac_f77=`echo $[2] |
# various options that select ANSI C on some system or another. It
# considers the compiler to be in ANSI C mode if it handles function
# prototypes correctly.
-AC_DEFUN(AC_PROG_CC_STDC,
+AC_DEFUN([AC_PROG_CC_STDC],
[AC_REQUIRE([AC_PROG_CC])dnl
AC_BEFORE([$0], [AC_C_INLINE])dnl
AC_BEFORE([$0], [AC_C_CONST])dnl
-AC_DEFUN(AC_C_CROSS,
+AC_DEFUN([AC_C_CROSS],
[AC_OBSOLETE([$0], [; it has been merged into AC_PROG_CC])])
# AC_C_CHAR_UNSIGNED
# ------------------
-AC_DEFUN(AC_C_CHAR_UNSIGNED,
+AC_DEFUN([AC_C_CHAR_UNSIGNED],
[AH_VERBATIM([__CHAR_UNSIGNED__],
[/* Define if type `char' is unsigned and you are not using gcc. */
#ifndef __CHAR_UNSIGNED__
# AC_C_LONG_DOUBLE
# ----------------
-AC_DEFUN(AC_C_LONG_DOUBLE,
+AC_DEFUN([AC_C_LONG_DOUBLE],
[AC_CACHE_CHECK(for long double, ac_cv_c_long_double,
[if test "$GCC" = yes; then
ac_cv_c_long_double=yes
# AC_C_BIGENDIAN
# --------------
-AC_DEFUN(AC_C_BIGENDIAN,
+AC_DEFUN([AC_C_BIGENDIAN],
[AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian,
[ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
# Do nothing if the compiler accepts the inline keyword.
# Otherwise define inline to __inline__ or __inline if one of those work,
# otherwise define inline to be empty.
-AC_DEFUN(AC_C_INLINE,
+AC_DEFUN([AC_C_INLINE],
[AC_REQUIRE([AC_PROG_CC_STDC])dnl
AC_CACHE_CHECK([for inline], ac_cv_c_inline,
[ac_cv_c_inline=no
# AC_C_CONST
# ----------
-AC_DEFUN(AC_C_CONST,
+AC_DEFUN([AC_C_CONST],
[AC_REQUIRE([AC_PROG_CC_STDC])dnl
AC_CACHE_CHECK([for an ANSI C-conforming const], ac_cv_c_const,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
# optimizations that could break the user's code. So, do not #define
# volatile away unless it is really necessary to allow the user's code
# to compile cleanly. Benign compiler failures should be tolerated.
-AC_DEFUN(AC_C_VOLATILE,
+AC_DEFUN([AC_C_VOLATILE],
[AC_REQUIRE([AC_PROG_CC_STDC])dnl
AC_CACHE_CHECK([for working volatile], ac_cv_c_volatile,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [
# --------------
# Checks if `#' can be used to glue strings together at the CPP level.
# Defines HAVE_STRINGIZE if positive.
-AC_DEFUN(AC_C_STRINGIZE,
+AC_DEFUN([AC_C_STRINGIZE],
[AC_REQUIRE([AC_PROG_CPP])dnl
AC_MSG_CHECKING([for preprocessor stringizing operator])
AC_CACHE_VAL(ac_cv_c_stringize,
# ---------------
# Check if the C compiler supports prototypes, included if it needs
# options.
-AC_DEFUN(AC_C_PROTOTYPES,
+AC_DEFUN([AC_C_PROTOTYPES],
[AC_REQUIRE([AC_PROG_CC_STDC])dnl
AC_REQUIRE([AC_PROG_CPP])dnl
AC_MSG_CHECKING([for function prototypes])
if test "$ac_cv_prog_cc_stdc" != no; then
AC_MSG_RESULT(yes)
AC_DEFINE(PROTOTYPES, 1,
- [Define if the compiler supports function prototypes.])
+ [Define if the C compiler supports function prototypes.])
else
AC_MSG_RESULT(no)
fi
# properly mangle the names of C identifiers, and C identifiers with
# underscores, respectively, so that they match the name mangling
# scheme used by the Fortran 77 compiler.
-AC_DEFUN(AC_F77_WRAPPERS,
+AC_DEFUN([AC_F77_WRAPPERS],
[AC_REQUIRE([AC_F77_NAME_MANGLING])dnl
AH_TEMPLATE([F77_FUNC],
[Define to a macro mangling the given C identifier (in lower and upper
# display the checking message. In addition, caching something used once
# has little interest.
# Idea borrowed from dist 3.0.
-AC_DEFUN(_AC_PROG_ECHO,
+AC_DEFUN([_AC_PROG_ECHO],
[if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
# Stardent Vistra SVR4 grep lacks -e, says Kaveh R. Ghazi.
if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
# AC_PROG_GNU_M4
# --------------
# Check for GNU m4, at least 1.3 (supports frozen files).
-AC_DEFUN(AC_PROG_GNU_M4,
+AC_DEFUN([AC_PROG_GNU_M4],
[AC_PATH_PROGS(M4, gm4 gnum4 m4, m4)
AC_CACHE_CHECK(whether m4 supports frozen files, ac_cv_prog_gnu_m4,
[ac_cv_prog_gnu_m4=no
# AC_PROG_MAKE_SET
# ----------------
# Define SET_MAKE to set ${MAKE} if make doesn't.
-AC_DEFUN(AC_PROG_MAKE_SET,
+AC_DEFUN([AC_PROG_MAKE_SET],
[AC_MSG_CHECKING(whether ${MAKE-make} sets \${MAKE})
set dummy ${MAKE-make}; ac_make=`echo "$[2]" | sed 'y%./+-%__p_%'`
AC_CACHE_VAL(ac_cv_prog_make_${ac_make}_set,
])# AC_PROG_MAKE_SET
-AC_DEFUN(AC_PROG_RANLIB,
+AC_DEFUN([AC_PROG_RANLIB],
[AC_CHECK_PROG(RANLIB, ranlib, ranlib, :)])
# Check for mawk first since it's generally faster.
-AC_DEFUN(AC_PROG_AWK,
+AC_DEFUN([AC_PROG_AWK],
[AC_CHECK_PROGS(AWK, mawk gawk nawk awk, )])
# AC_PROG_YACC
# ------------
-AC_DEFUN(AC_PROG_YACC,
+AC_DEFUN([AC_PROG_YACC],
[AC_CHECK_PROGS(YACC, 'bison -y' byacc, yacc)])
# AC_PROG_INSTALL
# ---------------
-AC_DEFUN(AC_PROG_INSTALL,
+AC_DEFUN([AC_PROG_INSTALL],
[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# AC_PROG_LN_S
# ------------
-AC_DEFUN(AC_PROG_LN_S,
+AC_DEFUN([AC_PROG_LN_S],
[AC_MSG_CHECKING(whether ln -s works)
AC_CACHE_VAL(ac_cv_prog_LN_S,
[rm -f conftestdata
])# AC_PROG_LN_S
-AC_DEFUNCT(AC_RSH, [; replace it with equivalent code])
+AC_DEFUNCT([AC_RSH], [; replace it with equivalent code])
# AC_DECL_SYS_SIGLIST
# -------------------
-AC_DEFUN(AC_DECL_SYS_SIGLIST,
+AC_DEFUN([AC_DECL_SYS_SIGLIST],
[AC_CACHE_CHECK([for sys_siglist declaration in signal.h or unistd.h],
ac_cv_decl_sys_siglist,
[AC_COMPILE_IFELSE(
# AC_HEADER_DIRENT
# ----------------
-AC_DEFUN(AC_HEADER_DIRENT,
+AC_DEFUN([AC_HEADER_DIRENT],
[AH_CHECK_HEADERS_DIRENT(dirent.h sys/ndir.h sys/dir.h ndir.h)
ac_header_dirent=no
for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
# AC_HEADER_MAJOR
# ---------------
-AC_DEFUN(AC_HEADER_MAJOR,
+AC_DEFUN([AC_HEADER_MAJOR],
[AC_CACHE_CHECK(whether sys/types.h defines makedev,
ac_cv_header_sys_types_h_makedev,
[AC_TRY_LINK([#include <sys/types.h>
# AC_HEADER_STAT
# --------------
# FIXME: Shouldn't this be named AC_HEADER_SYS_STAT?
-AC_DEFUN(AC_HEADER_STAT,
+AC_DEFUN([AC_HEADER_STAT],
[AC_CACHE_CHECK(whether stat file-mode macros are broken,
ac_cv_header_stat_broken,
[AC_EGREP_CPP([You lose], [#include <sys/types.h>
# AC_HEADER_STDC
# --------------
-AC_DEFUN(AC_HEADER_STDC,
+AC_DEFUN([AC_HEADER_STDC],
[AC_REQUIRE_CPP()dnl
AC_CACHE_CHECK(for ANSI C header files, ac_cv_header_stdc,
[AC_TRY_CPP([#include <stdlib.h>
# AC_HEADER_SYS_WAIT
# ------------------
-AC_DEFUN(AC_HEADER_SYS_WAIT,
+AC_DEFUN([AC_HEADER_SYS_WAIT],
[AC_CACHE_CHECK([for sys/wait.h that is POSIX.1 compatible],
ac_cv_header_sys_wait_h,
[AC_COMPILE_IFELSE(
# AC_HEADER_TIME
# --------------
-AC_DEFUN(AC_HEADER_TIME,
+AC_DEFUN([AC_HEADER_TIME],
[AC_CACHE_CHECK([whether time.h and sys/time.h may both be included],
ac_cv_header_time,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
# A few hasbeen'd macros.
-AC_DEFUNCT(AC_UNISTD_H, [; instead use AC_CHECK_HEADERS(unistd.h)])
+AC_DEFUNCT([AC_UNISTD_H], [; instead use AC_CHECK_HEADERS(unistd.h)])
-AC_DEFUNCT(AC_USG,
+AC_DEFUNCT([AC_USG],
[; instead use AC_CHECK_HEADERS(string.h) and HAVE_STRING_H])
# If memchr and the like aren't declared in <string.h>, include <memory.h>.
# To avoid problems, don't check for gcc2 built-ins.
-AC_DEFUNCT(AC_MEMORY_H,
+AC_DEFUNCT([AC_MEMORY_H],
[; instead use AC_CHECK_HEADERS(memory.h) and HAVE_MEMORY_H])
# defines a different set of C preprocessor macros to indicate which
# header file is found. This macro and the names it defines are
# considered obsolete.
-AC_DEFUNCT(AC_DIR_HEADER,
+AC_DEFUNCT([AC_DIR_HEADER],
[; instead use AC_HEADER_DIRENT])
# AC_TYPE_GETGROUPS
# -----------------
-AC_DEFUN(AC_TYPE_GETGROUPS,
+AC_DEFUN([AC_TYPE_GETGROUPS],
[AC_REQUIRE([AC_TYPE_UID_T])dnl
AC_CACHE_CHECK(type of array argument to getgroups, ac_cv_type_getgroups,
[AC_TRY_RUN(
# AC_TYPE_UID_T
# -------------
# FIXME: Rewrite using AC_CHECK_TYPE.
-AC_DEFUN(AC_TYPE_UID_T,
+AC_DEFUN([AC_TYPE_UID_T],
[AC_CACHE_CHECK(for uid_t in sys/types.h, ac_cv_type_uid_t,
[AC_EGREP_HEADER(uid_t, sys/types.h,
ac_cv_type_uid_t=yes, ac_cv_type_uid_t=no)])
])
# FIXME: AU_DEFUN these guys?
-AC_DEFUN(AC_TYPE_SIZE_T,
+AC_DEFUN([AC_TYPE_SIZE_T],
[AC_CHECK_TYPE(size_t, unsigned)])
-AC_DEFUN(AC_TYPE_PID_T,
+AC_DEFUN([AC_TYPE_PID_T],
[AC_CHECK_TYPE(pid_t, int)])
-AC_DEFUN(AC_TYPE_OFF_T,
+AC_DEFUN([AC_TYPE_OFF_T],
[AC_CHECK_TYPE(off_t, long)])
-AC_DEFUN(AC_TYPE_MODE_T,
+AC_DEFUN([AC_TYPE_MODE_T],
[AC_CHECK_TYPE(mode_t, int)])
-AC_DEFUNCT(AC_INT_16_BITS, [; instead use AC_CHECK_SIZEOF(int)])
-AC_DEFUNCT(AC_LONG_64_BITS, [; instead use AC_CHECK_SIZEOF(long)])
+AC_DEFUNCT([AC_INT_16_BITS], [; instead use AC_CHECK_SIZEOF(int)])
+AC_DEFUNCT([AC_LONG_64_BITS], [; instead use AC_CHECK_SIZEOF(long)])
# AC_TYPE_SIGNAL
# --------------
# Note that identifiers starting with SIG are reserved by ANSI C.
-AC_DEFUN(AC_TYPE_SIGNAL,
+AC_DEFUN([AC_TYPE_SIGNAL],
[AC_CACHE_CHECK([return type of signal handlers], ac_cv_type_signal,
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([#include <sys/types.h>
# AC_FUNC_ALLOCA
# --------------
-AC_DEFUN(AC_FUNC_ALLOCA,
+AC_DEFUN([AC_FUNC_ALLOCA],
[AH_VERBATIM([STACK_DIRECTION],
[/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
# ---------------------
# Check whether closedir returns void, and #define CLOSEDIR_VOID in
# that case.
-AC_DEFUN(AC_FUNC_CLOSEDIR_VOID,
+AC_DEFUN([AC_FUNC_CLOSEDIR_VOID],
[AC_REQUIRE([AC_HEADER_DIRENT])dnl
AC_CACHE_CHECK(whether closedir returns void, ac_cv_func_closedir_void,
[AC_TRY_RUN(
# AC_FUNC_FNMATCH
# ---------------
# We look for fnmatch.h to avoid that the test fails in C++.
-AC_DEFUN(AC_FUNC_FNMATCH,
+AC_DEFUN([AC_FUNC_FNMATCH],
[AC_CHECK_HEADERS(fnmatch.h)
AC_CACHE_CHECK(for working fnmatch, ac_cv_func_fnmatch_works,
# Some versions of Solaris or SCO have a broken fnmatch function.
# AC_FUNC_GETMNTENT
# -----------------
-AC_DEFUN(AC_FUNC_GETMNTENT,
+AC_DEFUN([AC_FUNC_GETMNTENT],
[# getmntent is in -lsun on Irix 4, -lseq on Dynix/PTX, -lgen on Unixware.
AC_CHECK_LIB(sun, getmntent, LIBS="-lsun $LIBS",
[AC_CHECK_LIB(seq, getmntent, LIBS="-lseq $LIBS",
# AC_FUNC_GETPGRP
# ---------------
-AC_DEFUN(AC_FUNC_GETPGRP,
+AC_DEFUN([AC_FUNC_GETPGRP],
[AC_CACHE_CHECK(whether getpgrp takes no argument, ac_cv_func_getpgrp_void,
[AC_TRY_RUN(
[/*
# AC_FUNC_MKTIME
# --------------
-AC_DEFUN(AC_FUNC_MKTIME,
+AC_DEFUN([AC_FUNC_MKTIME],
[AC_REQUIRE([AC_HEADER_TIME])dnl
AC_CHECK_HEADERS(sys/time.h unistd.h)
AC_CHECK_FUNCS(alarm)
# AC_FUNC_MMAP
# ------------
-AC_DEFUN(AC_FUNC_MMAP,
+AC_DEFUN([AC_FUNC_MMAP],
[AC_CHECK_HEADERS(stdlib.h unistd.h sys/stat.h)
AC_CHECK_FUNCS(getpagesize)
AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap_fixed_mapped,
# AC_FUNC_MEMCMP
# --------------
-AC_DEFUN(AC_FUNC_MEMCMP,
+AC_DEFUN([AC_FUNC_MEMCMP],
[AC_CACHE_CHECK(for 8-bit clean memcmp, ac_cv_func_memcmp_clean,
[AC_TRY_RUN(
[int
# Determine the correct type to be passed to each of the `select'
# function's arguments, and define those types in `SELECT_TYPE_ARG1',
# `SELECT_TYPE_ARG234', and `SELECT_TYPE_ARG5'.
-AC_DEFUN(AC_FUNC_SELECT_ARGTYPES,
+AC_DEFUN([AC_FUNC_SELECT_ARGTYPES],
[AC_CACHE_CHECK([types of arguments for select],
[ac_cv_func_select_args],
[for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
# AC_FUNC_SETPGRP
# ---------------
-AC_DEFUN(AC_FUNC_SETPGRP,
+AC_DEFUN([AC_FUNC_SETPGRP],
[AC_CACHE_CHECK(whether setpgrp takes no argument, ac_cv_func_setpgrp_void,
AC_TRY_RUN(
[#if HAVE_UNISTD_H
# AC_FUNC_STRFTIME
# ----------------
-AC_DEFUN(AC_FUNC_STRFTIME,
+AC_DEFUN([AC_FUNC_STRFTIME],
[AC_CHECK_FUNC(strftime,
[AC_DEFINE(HAVE_STRFTIME, 1,
[Define if you have the `strftime' function.])],
# AC_FUNC_VFORK
# -------------
-AC_DEFUN(AC_FUNC_VFORK,
+AC_DEFUN([AC_FUNC_VFORK],
[AC_REQUIRE([AC_TYPE_PID_T])dnl
AC_CHECK_HEADER(vfork.h,
AC_DEFINE(HAVE_VFORK_H, 1,
# That the logical name! In addition, why doesn't it use
# AC_CHECK_FUNCS(vprintf)? Because old Autoconf uses sh for loops.
# FIXME: To be changed in Autoconf 3?
-AC_DEFUN(AC_FUNC_VPRINTF,
+AC_DEFUN([AC_FUNC_VPRINTF],
[AC_CHECK_FUNC(vprintf,
AC_DEFINE(HAVE_VPRINTF, 1,
[Define if you have the `vprintf' function.]))
# AC_FUNC_WAIT3
# -------------
-AC_DEFUN(AC_FUNC_WAIT3,
+AC_DEFUN([AC_FUNC_WAIT3],
[AC_CACHE_CHECK(for wait3 that fills in rusage, ac_cv_func_wait3_rusage,
[AC_TRY_RUN(
[#include <sys/types.h>
# AC_FUNC_UTIME_NULL
# ------------------
-AC_DEFUN(AC_FUNC_UTIME_NULL,
+AC_DEFUN([AC_FUNC_UTIME_NULL],
[AC_CACHE_CHECK(whether utime accepts a null argument, ac_cv_func_utime_null,
[rm -f conftestdata; >conftestdata
# Sequent interprets utime(file, 0) to mean use start of epoch. Wrong.
# AC_FUNC_STRCOLL
# ---------------
-AC_DEFUN(AC_FUNC_STRCOLL,
+AC_DEFUN([AC_FUNC_STRCOLL],
[AC_CACHE_CHECK(for working strcoll, ac_cv_func_strcoll_works,
[AC_TRY_RUN([#include <string.h>
int
# AC_FUNC_SETVBUF_REVERSED
# ------------------------
-AC_DEFUN(AC_FUNC_SETVBUF_REVERSED,
+AC_DEFUN([AC_FUNC_SETVBUF_REVERSED],
[AC_CACHE_CHECK(whether setvbuf arguments are reversed,
ac_cv_func_setvbuf_reversed,
[AC_TRY_RUN([#include <stdio.h>
# ------------
# FIXME: This macro is badly named, it should be AC_CHECK_TYPE_STRUCT_TM.
# Or something else, but what? AC_CHECK_TYPE_STRUCT_TM_IN_SYS_TIME?
-AC_DEFUN(AC_STRUCT_TM,
+AC_DEFUN([AC_STRUCT_TM],
[AC_CACHE_CHECK([whether struct tm is in sys/time.h or time.h],
ac_cv_struct_tm,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
# Figure out how to get the current timezone. If `struct tm' has a
# `tm_zone' member, define `HAVE_TM_ZONE'. Otherwise, if the
# external array `tzname' is found, define `HAVE_TZNAME'.
-AC_DEFUN(AC_STRUCT_TIMEZONE,
+AC_DEFUN([AC_STRUCT_TIMEZONE],
[AC_REQUIRE([AC_STRUCT_TM])dnl
AC_CHECK_MEMBERS([struct tm.tm_zone],,,[#include <sys/types.h>
#include <$ac_cv_struct_tm>
# AC_STRUCT_ST_BLKSIZE
# --------------------
-AU_DEFUN(AC_STRUCT_ST_BLKSIZE,
+AU_DEFUN([AC_STRUCT_ST_BLKSIZE],
[AC_WARNING([$0:
your code should no longer depend upon `HAVE_ST_BLKSIZE', but
`HAVE_STRUCT_STAT_ST_BLKSIZE'. Remove this AC_WARNING and
# Please note that it will define `HAVE_STRUCT_STAT_ST_BLOCKS',
# and not `HAVE_ST_BLOCKS'.])dnl
#
-AC_DEFUN(AC_STRUCT_ST_BLOCKS,
+AC_DEFUN([AC_STRUCT_ST_BLOCKS],
[AC_CHECK_MEMBERS([struct stat.st_blocks],
[AC_DEFINE(HAVE_ST_BLOCKS, 1,
[Define if your `struct stat' has
# AC_STRUCT_ST_RDEV
# -----------------
-AU_DEFUN(AC_STRUCT_ST_RDEV,
+AU_DEFUN([AC_STRUCT_ST_RDEV],
[AC_WARNING([$0:
your code should no longer depend upon `HAVE_ST_RDEV', but
`HAVE_STRUCT_STAT_ST_RDEV'. Remove this AC_WARNING and
# AC_SYS_INTERPRETER
# ------------------
-AC_DEFUN(AC_SYS_INTERPRETER,
+AC_DEFUN([AC_SYS_INTERPRETER],
[AC_CACHE_CHECK(whether @%:@! works in shell scripts, ac_cv_sys_interpreter,
[echo '#! /bin/cat
exit 69
interpval=$ac_cv_sys_interpreter
])
-AC_DEFUNCT(AC_HAVE_POUNDBANG, [;use AC_SYS_INTERPRETER, taking no arguments])
-AC_DEFUNCT(AC_ARG_ARRAY, [; don't do unportable things with arguments])
+AC_DEFUNCT([AC_HAVE_POUNDBANG], [;use AC_SYS_INTERPRETER, taking no arguments])
+AC_DEFUNCT([AC_ARG_ARRAY], [; don't do unportable things with arguments])
# AC_SYS_LONG_FILE_NAMES
# use of `mktemp' is probably inappropriate here since it would fail in
# attempting to create different file names differing after the 14th
# character on file systems without long file names.
-AC_DEFUN(AC_SYS_LONG_FILE_NAMES,
+AC_DEFUN([AC_SYS_LONG_FILE_NAMES],
[AC_CACHE_CHECK(for long file names, ac_cv_sys_long_file_names,
[ac_cv_sys_long_file_names=yes
# Test for long file names in all the places we know might matter:
# ---------------------------
# If the system automatically restarts a system call that is
# interrupted by a signal, define `HAVE_RESTARTABLE_SYSCALLS'.
-AC_DEFUN(AC_SYS_RESTARTABLE_SYSCALLS,
+AC_DEFUN([AC_SYS_RESTARTABLE_SYSCALLS],
[AC_REQUIRE([AC_HEADER_SYS_WAIT])dnl
AC_CHECK_HEADERS(unistd.h)
AC_CACHE_CHECK(for restartable system calls, ac_cv_sys_restartable_syscalls,
# paths, otherwise set no_x=yes.
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
-AC_DEFUN(AC_PATH_X,
+AC_DEFUN([AC_PATH_X],
[AC_REQUIRE_CPP()dnl Set CPP; we run _AC_PATH_X_DIRECT conditionally.
AC_MSG_CHECKING(for X)
# ---------------
# Internal subroutine of AC_PATH_X.
# Set ac_x_includes and/or ac_x_libraries.
-AC_DEFUN(_AC_PATH_X_XMKMF,
+AC_DEFUN([_AC_PATH_X_XMKMF],
[rm -fr conftestdir
if mkdir conftestdir; then
cd conftestdir
# ----------------
# Internal subroutine of AC_PATH_X.
# Set ac_x_includes and/or ac_x_libraries.
-AC_DEFUN(_AC_PATH_X_DIRECT,
+AC_DEFUN([_AC_PATH_X_DIRECT],
[if test "$ac_x_includes" = NO; then
# Guess where to find include files, by looking for this one X11 .h file.
test -z "$ac_x_direct_test_include" &&
# AC_PATH_XTRA
# ------------
# Find additional X libraries, magic flags, etc.
-AC_DEFUN(AC_PATH_XTRA,
+AC_DEFUN([AC_PATH_XTRA],
[AC_REQUIRE([AC_PATH_X])dnl
if test "$no_x" = yes; then
# Not all programs may use this symbol, but it does not hurt to define it.
## ------------------------------------ ##
# The old Cygwin32 macro is deprecated.
-AU_DEFUN(AC_CYGWIN32,
+AU_DEFUN([AC_CYGWIN32],
[AC_CYGWIN])
# ---------
# Check for Cygwin. This is a way to set the right value for
# EXEEXT.
-AC_DEFUN(AC_CYGWIN,
+AC_DEFUN([AC_CYGWIN],
[AC_CACHE_CHECK(for Cygwin environment, ac_cv_cygwin,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
[#ifndef __CYGWIN__
# ----------
# Check for mingw32. This is another way to set the right value for
# EXEEXT.
-AC_DEFUN(AC_MINGW32,
+AC_DEFUN([AC_MINGW32],
[AC_CACHE_CHECK(for mingw32 environment, ac_cv_mingw32,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [return __MINGW32__;])],
[ac_cv_mingw32=yes],
# ---------
# Check for EMX on OS/2. This is another way to set the right value
# for EXEEXT.
-AC_DEFUN(AC_EMXOS2,
+AC_DEFUN([AC_EMXOS2],
[AC_CACHE_CHECK(for EMX OS/2 environment, ac_cv_emxos2,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [return __EMX__;])],
[ac_cv_emxos2=yes],
# add .exe for Cygwin or mingw32. Otherwise, it compiles a test
# executable. If this is called, the executable extensions will be
# automatically used by link commands run by the configure script.
-AC_DEFUN(AC_EXEEXT,
+AC_DEFUN([AC_EXEEXT],
[AC_REQUIRE([AC_CYGWIN])dnl
AC_REQUIRE([AC_MINGW32])dnl
AC_REQUIRE([AC_EMXOS2])dnl
# Check the object extension used by the compiler: typically .o or
# .obj. If this is called, some other behaviour will change,
# determined by ac_objext.
-AC_DEFUN(AC_OBJEXT,
+AC_DEFUN([AC_OBJEXT],
[AC_MSG_CHECKING([for object suffix])
AC_CACHE_VAL(ac_cv_objext,
[rm -f conftest*
# AC_AIX
# ------
-AC_DEFUN(AC_AIX,
+AC_DEFUN([AC_AIX],
[AH_VERBATIM([_ALL_SOURCE],
[/* Define if on AIX 3.
System headers sometimes define this.
# AC_MINIX
# --------
-AC_DEFUN(AC_MINIX,
+AC_DEFUN([AC_MINIX],
[AC_BEFORE([$0], [AC_TRY_COMPILE])dnl
AC_BEFORE([$0], [AC_TRY_RUN])dnl
AC_CHECK_HEADER(minix/config.h, MINIX=yes, MINIX=)
# AC_ISC_POSIX
# ------------
-AC_DEFUN(AC_ISC_POSIX,
+AC_DEFUN([AC_ISC_POSIX],
[AC_REQUIRE([AC_PROG_CC])dnl
AC_BEFORE([$0], [AC_TRY_COMPILE])dnl
AC_BEFORE([$0], [AC_TRY_RUN])dnl
fi
])# AC_ISC_POSIX
-AC_DEFUNCT(AC_XENIX_DIR, [; instead use AC_HEADER_DIRENT])
-AC_DEFUNCT(AC_DYNIX_SEQ, [; instead use AC_FUNC_GETMNTENT])
-AC_DEFUNCT(AC_IRIX_SUN,
+AC_DEFUNCT([AC_XENIX_DIR], [; instead use AC_HEADER_DIRENT])
+AC_DEFUNCT([AC_DYNIX_SEQ], [; instead use AC_FUNC_GETMNTENT])
+AC_DEFUNCT([AC_IRIX_SUN],
[; instead use AC_FUNC_GETMNTENT or AC_CHECK_LIB(sun, getpwnam)])
-AC_DEFUNCT(AC_SCO_INTL, [; instead use AC_FUNC_STRFTIME])
+AC_DEFUNCT([AC_SCO_INTL], [; instead use AC_FUNC_STRFTIME])